@taxbit/react-sdk 0.2.3 → 0.3.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/dist/basic.css +26 -20
- package/dist/contexts/FormUI/useFormUI.d.ts +4 -3
- package/dist/contexts/FormUI/useFormUIContext.d.ts +20 -18
- package/dist/contexts/TaxDocumentation/useTaxDocumentation.d.ts +1 -1
- package/dist/contexts/TaxDocumentation/useTaxDocumentationContext.d.ts +2 -2
- package/dist/hooks/useTaxBit/__tests__/clientTaxDocumentation.d.ts +2 -0
- package/dist/hooks/useTaxBit/__tests__/serverTaxDocumentation.d.ts +2 -0
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/types/LocalizationKey.d.ts +4 -4
- package/dist/i18n/types/PropertyFile.d.ts +6 -6
- package/dist/i18n/utils/getText.d.ts +6 -6
- package/dist/inline.css +26 -21
- package/dist/lookups/countryOptions.d.ts +2 -1
- package/dist/lookups/foreignAccountHolderAccountTypeOptions.d.ts +1 -1
- package/dist/lookups/foreignOtherClassificationOptions.d.ts +1 -1
- package/dist/lookups/usAccountHolderAccountTypeOptions.d.ts +1 -1
- package/dist/{taxbit-react-sdk.es.js → taxbit-react-sdk.js} +2105 -1912
- package/dist/taxbit-react-sdk.umd.cjs +27 -0
- package/dist/types/CamelCaseKeys.d.ts +1 -2
- package/dist/types/TaxDocumentation.d.ts +5 -2
- package/dist/types/client/ClientTaxDocumentation.d.ts +19 -15
- package/dist/types/server/ComprehensiveTaxDocumentation.d.ts +4 -1
- package/dist/ui/Actions/Actions.d.ts +1 -1
- package/dist/ui/CheckBox/CheckBox.d.ts +4 -3
- package/dist/ui/MaskedContent/MaskedContent.d.ts +1 -1
- package/dist/ui/MaskedInput/MaskedInput.d.ts +4 -3
- package/dist/ui/Password/Password.d.ts +2 -1
- package/dist/ui/Select/Select.d.ts +9 -8
- package/dist/utils/camelCaseKeys.d.ts +2 -1
- package/dist/utils/getFieldsState.d.ts +2 -2
- package/dist/utils/getHintKeyMap.d.ts +5 -2
- package/dist/utils/getPromptKeyMap.d.ts +5 -2
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/{transformOutbound → transformForClient}/convertYesNoToBoolean.d.ts +1 -1
- package/dist/utils/transformForClient/transformForClientAccoutHolder.d.ts +54 -0
- package/dist/utils/transformForClient/transformForClientAddress.d.ts +33 -0
- package/dist/utils/transformForClient/transformForClientRegardedOwner.d.ts +37 -0
- package/dist/utils/transformForClient/transformForClientTaxResidenceFields.d.ts +6 -0
- package/dist/validations/getSupportedFields.d.ts +1 -1
- package/dist/validations/getVisibleFields.d.ts +2 -2
- package/dist/wizard/ResidenceInput/ResidenceInput.d.ts +2 -1
- package/dist/wizard/RowInput/ErrorRow/ErrorRow.d.ts +3 -2
- package/dist/wizard/RowInput/MaskedInputRow/MaskedInputRow.d.ts +4 -3
- package/dist/wizard/RowInput/SelectRow/SelectRow.d.ts +4 -3
- package/package.json +7 -8
- package/dist/taxbit-react-sdk.umd.js +0 -27
- package/dist/utils/transformOutbound/index.d.ts +0 -6
- package/dist/utils/transformOutbound/transformOutbound.d.ts +0 -3
- package/dist/utils/transformOutbound/transformToOutboundAccoutHolder.d.ts +0 -3
- package/dist/utils/transformOutbound/transformToOutboundAddress.d.ts +0 -6
- package/dist/utils/transformOutbound/transformToOutboundRegardedOwner.d.ts +0 -3
- package/dist/utils/transformOutbound/transformToOutboundTaxResidenceFields.d.ts +0 -3
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
type CamelCase<S extends string> = S extends `${infer T}_${infer U}` ? `${T}${Capitalize<CamelCase<U>>}` : S;
|
|
1
|
+
export type CamelCase<S extends string> = S extends `${infer T}_${infer U}` ? `${T}${Capitalize<CamelCase<U>>}` : S;
|
|
2
2
|
export type CamelCaseKeys<T> = T extends object ? T extends (infer U)[] ? U extends object ? {
|
|
3
3
|
[K in keyof U as CamelCase<K & string>]: CamelCaseKeys<U[K]>;
|
|
4
4
|
}[] : T : {
|
|
5
5
|
[K in keyof T as CamelCase<K & string>]: CamelCaseKeys<T[K]>;
|
|
6
6
|
} : T;
|
|
7
|
-
export {};
|
|
@@ -61,8 +61,10 @@ export type AccountHolderTaxData = {
|
|
|
61
61
|
accountHolderShowTaxResidence5?: YesNo;
|
|
62
62
|
accountHolderUsTin?: string;
|
|
63
63
|
accountHolderVatIdentificationNumber?: string;
|
|
64
|
-
|
|
64
|
+
accountHolderVatIsNotRequired?: Yes;
|
|
65
65
|
accountHolderVatCountry?: string;
|
|
66
|
+
accountHolderBusinessRegistrationNumber?: string;
|
|
67
|
+
accountHolderBusinessRegistrationCountry?: string;
|
|
66
68
|
};
|
|
67
69
|
export type RegardedOwnerClassificationData = {
|
|
68
70
|
regardedOwnerUsPerson?: YesNo;
|
|
@@ -111,13 +113,14 @@ export type SummaryData = {
|
|
|
111
113
|
iConfirmTheBeneficialOwnerIsExempt?: Yes;
|
|
112
114
|
iConfirmTheEntityIsNotAUsPerson?: Yes;
|
|
113
115
|
iConfirmTheEntityIsTheBeneficialOwner?: Yes;
|
|
116
|
+
iConfirmTheInformationIsCorrectComplete?: Yes;
|
|
114
117
|
iConfirmTheTaxIdIsCorrect?: Yes;
|
|
115
118
|
iHaveLegalCapacityToSign?: Yes;
|
|
116
119
|
signature?: string;
|
|
117
120
|
source?: string;
|
|
118
121
|
};
|
|
119
122
|
export type CalculatedData = {
|
|
120
|
-
|
|
123
|
+
accountHolderTaxResidences?: YesNo;
|
|
121
124
|
};
|
|
122
125
|
export type TaxDocumentation = AccountHolderContactData & AccountHolderTaxData & AccountHolderClassificationData & RegardedOwnerContactData & RegardedOwnerClassificationData & RegardedOwnerTaxData & SummaryData & CalculatedData;
|
|
123
126
|
export type TaxDocumentationKey = keyof TaxDocumentation;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type
|
|
1
|
+
type ClientAddress = {
|
|
2
2
|
city?: string;
|
|
3
3
|
country?: string;
|
|
4
4
|
stateOrProvince?: string;
|
|
@@ -6,12 +6,17 @@ type Address = {
|
|
|
6
6
|
secondLine?: string;
|
|
7
7
|
postalCode?: string;
|
|
8
8
|
};
|
|
9
|
-
type
|
|
10
|
-
|
|
9
|
+
type ClientTaxResidence = {
|
|
10
|
+
country?: string;
|
|
11
|
+
tin?: string;
|
|
12
|
+
tinNotRequired?: boolean;
|
|
13
|
+
};
|
|
14
|
+
type ClientAccountHolderTaxDocumentation = {
|
|
15
|
+
address?: ClientAddress;
|
|
11
16
|
countryOfCitizenship?: string;
|
|
12
17
|
dateOfBirth?: string;
|
|
13
18
|
dbaName?: string;
|
|
14
|
-
mailingAddress?:
|
|
19
|
+
mailingAddress?: ClientAddress;
|
|
15
20
|
mailingAddressIsDifferent?: boolean;
|
|
16
21
|
name?: string;
|
|
17
22
|
cityOfBirth?: string;
|
|
@@ -20,15 +25,13 @@ type AccountHolderTaxDocumentation = {
|
|
|
20
25
|
financialAccountName?: string;
|
|
21
26
|
ftin?: string;
|
|
22
27
|
ftinNotLegallyRequired?: boolean;
|
|
23
|
-
taxResidences?: Array<
|
|
24
|
-
country?: string;
|
|
25
|
-
tin?: string;
|
|
26
|
-
tinNotRequired?: boolean;
|
|
27
|
-
}>;
|
|
28
|
+
taxResidences?: Array<ClientTaxResidence>;
|
|
28
29
|
tin?: string;
|
|
29
30
|
vatin?: string;
|
|
30
31
|
vatinCountry?: string;
|
|
31
32
|
vatinNotRequired?: boolean;
|
|
33
|
+
businessRegistrationNumber?: string;
|
|
34
|
+
businessRegistrationCountry?: string;
|
|
32
35
|
exemptFatcaCode?: string;
|
|
33
36
|
exemptPayeeCode?: string;
|
|
34
37
|
isIndividual?: boolean;
|
|
@@ -43,12 +46,12 @@ type AccountHolderTaxDocumentation = {
|
|
|
43
46
|
foreignTrustClassification?: string;
|
|
44
47
|
foreignOtherClassification?: string;
|
|
45
48
|
};
|
|
46
|
-
type
|
|
47
|
-
address?:
|
|
49
|
+
type ClientRegardedOwnerTaxDocumentation = {
|
|
50
|
+
address?: ClientAddress;
|
|
48
51
|
countryOfCitizenship?: string;
|
|
49
52
|
dateOfBirth?: string;
|
|
50
53
|
dbaName?: string;
|
|
51
|
-
mailingAddress?:
|
|
54
|
+
mailingAddress?: ClientAddress;
|
|
52
55
|
mailingAddressIsDifferent?: boolean;
|
|
53
56
|
name?: string;
|
|
54
57
|
ftin?: string;
|
|
@@ -66,15 +69,16 @@ type RegardedOwnerTaxDocumentation = {
|
|
|
66
69
|
foreignOtherClassification?: string;
|
|
67
70
|
};
|
|
68
71
|
export type ClientTaxDocumentation = {
|
|
69
|
-
accountHolder?:
|
|
72
|
+
accountHolder?: ClientAccountHolderTaxDocumentation;
|
|
70
73
|
} & {
|
|
71
|
-
regardedOwner?:
|
|
74
|
+
regardedOwner?: ClientRegardedOwnerTaxDocumentation;
|
|
72
75
|
} & {
|
|
73
76
|
hasCertified?: boolean;
|
|
74
77
|
isNotSubjectBackupWithholding?: boolean;
|
|
78
|
+
isConfirmedCorrectComplete?: boolean;
|
|
75
79
|
signature?: string;
|
|
76
80
|
documentType?: 'COMPREHENSIVE';
|
|
77
81
|
source?: string;
|
|
78
|
-
|
|
82
|
+
signatureDate?: string;
|
|
79
83
|
};
|
|
80
84
|
export {};
|
|
@@ -29,6 +29,8 @@ export type AccountHolderTaxDocumentation = {
|
|
|
29
29
|
vatin?: string;
|
|
30
30
|
vatin_country?: string;
|
|
31
31
|
vatin_not_required?: boolean;
|
|
32
|
+
business_registration_number?: string;
|
|
33
|
+
business_registration_country?: string;
|
|
32
34
|
exempt_fatca_code?: string;
|
|
33
35
|
exempt_payee_code?: string;
|
|
34
36
|
is_individual?: boolean;
|
|
@@ -72,10 +74,11 @@ export type SignedComprehensiveTaxDocumentation = {
|
|
|
72
74
|
} & {
|
|
73
75
|
has_certified?: boolean;
|
|
74
76
|
is_not_subject_backup_withholding?: boolean;
|
|
77
|
+
is_confirmed_correct_complete?: boolean;
|
|
75
78
|
signature?: string;
|
|
76
79
|
document_type?: 'COMPREHENSIVE';
|
|
77
80
|
source?: string;
|
|
78
81
|
};
|
|
79
82
|
export type SignedDatedComprehensiveTaxDocumentation = SignedComprehensiveTaxDocumentation & {
|
|
80
|
-
|
|
83
|
+
signature_date?: string;
|
|
81
84
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { TaxDocumentationKey } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TaxDocumentationKey } from 'types/TaxDocumentation';
|
|
3
|
+
import { Yes } from 'types/Yes';
|
|
3
4
|
export type CheckBoxProps = {
|
|
4
5
|
label: boolean;
|
|
5
6
|
subLabel?: boolean;
|
|
6
7
|
name: TaxDocumentationKey;
|
|
7
|
-
onClick?: (val:
|
|
8
|
+
onClick?: (val: Yes | undefined) => void;
|
|
8
9
|
};
|
|
9
10
|
export declare const CheckBox: ({ label, subLabel, name, onClick }: CheckBoxProps) => React.JSX.Element;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { TaxDocumentationKey } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TaxDocumentationKey } from 'types/TaxDocumentation';
|
|
3
3
|
export type MaskedInputProps = {
|
|
4
4
|
name: TaxDocumentationKey;
|
|
5
5
|
className?: string;
|
|
6
6
|
onChange?: (val: string) => string;
|
|
7
7
|
hint?: true;
|
|
8
8
|
children?: React.ReactNode;
|
|
9
|
+
disabled?: boolean;
|
|
9
10
|
};
|
|
10
|
-
export declare const MaskedInput: ({ name, className, onChange, hint, children, }: MaskedInputProps) => React.JSX.Element;
|
|
11
|
+
export declare const MaskedInput: ({ name, className, onChange, hint, children, disabled, }: MaskedInputProps) => React.JSX.Element;
|
|
@@ -5,6 +5,7 @@ type PasswordProps = {
|
|
|
5
5
|
onChange?: (val: string) => void;
|
|
6
6
|
show?: boolean;
|
|
7
7
|
className?: string;
|
|
8
|
+
disabled?: boolean;
|
|
8
9
|
};
|
|
9
|
-
export declare const Password: ({ value, mask, onChange, show, ...inputProps }: PasswordProps) => React.JSX.Element;
|
|
10
|
+
export declare const Password: ({ value, mask, onChange, disabled, show, ...inputProps }: PasswordProps) => React.JSX.Element;
|
|
10
11
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
1
|
+
import { OptionKey } from 'i18n/types';
|
|
2
|
+
import { FatcaCode, PayeeCode } from 'lookups';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import type { CaProvinceCode } from 'types/CaProvinceCode';
|
|
5
|
+
import type { CountryCode } from 'types/CountryCode';
|
|
6
|
+
import { TaxDocumentationKey } from 'types/TaxDocumentation';
|
|
7
|
+
import type { UsStateCode } from 'types/UsStateCode';
|
|
8
8
|
type FatcaSelectOption = {
|
|
9
9
|
value: FatcaCode;
|
|
10
10
|
};
|
|
@@ -22,6 +22,7 @@ export type SelectProps = {
|
|
|
22
22
|
addBlank?: boolean;
|
|
23
23
|
className?: string;
|
|
24
24
|
onChange?: () => void;
|
|
25
|
+
disabled?: boolean;
|
|
25
26
|
};
|
|
26
|
-
export declare const Select: <T extends OptionKey>({ name, options, addBlank, className, onChange, }: SelectProps) => React.JSX.Element;
|
|
27
|
+
export declare const Select: <T extends OptionKey>({ name, options, addBlank, className, onChange, disabled, }: SelectProps) => React.JSX.Element;
|
|
27
28
|
export {};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { CamelCaseKeys } from '../types';
|
|
2
|
+
export declare const camelCaseKeys: <T, U>(item: T) => CamelCaseKeys<T>;
|
|
@@ -2,8 +2,8 @@ import { TaxDocumentation } from 'types/TaxDocumentation';
|
|
|
2
2
|
import { TaxForm } from '../types';
|
|
3
3
|
export declare const getFieldsState: (fields: TaxDocumentation, supportedForms?: TaxForm[]) => {
|
|
4
4
|
accountHolderIsDisregarded: boolean;
|
|
5
|
-
|
|
6
|
-
isDac7: boolean
|
|
5
|
+
hasNoEUTaxId: boolean;
|
|
6
|
+
isDac7: boolean;
|
|
7
7
|
isW9: boolean;
|
|
8
8
|
isW8: boolean;
|
|
9
9
|
isW8Ben: boolean;
|
|
@@ -13,6 +13,7 @@ export declare const getHintKeyMap: () => {
|
|
|
13
13
|
iCertifyToAll?: "dateOfBirth" | undefined;
|
|
14
14
|
iConfirmIncomeIsNonUs?: "dateOfBirth" | undefined;
|
|
15
15
|
iConfirmTheBeneficialOwnerIsExempt?: "dateOfBirth" | undefined;
|
|
16
|
+
iConfirmTheInformationIsCorrectComplete?: "dateOfBirth" | undefined;
|
|
16
17
|
iConfirmTheEntityIsNotAUsPerson?: "dateOfBirth" | undefined;
|
|
17
18
|
iConfirmTheEntityIsTheBeneficialOwner?: "dateOfBirth" | undefined;
|
|
18
19
|
iConfirmTheTaxIdIsCorrect?: "dateOfBirth" | undefined;
|
|
@@ -62,8 +63,10 @@ export declare const getHintKeyMap: () => {
|
|
|
62
63
|
accountHolderShowTaxResidence5?: "dateOfBirth" | undefined;
|
|
63
64
|
accountHolderUsTin?: "dateOfBirth" | undefined;
|
|
64
65
|
accountHolderVatIdentificationNumber?: "dateOfBirth" | undefined;
|
|
65
|
-
|
|
66
|
+
accountHolderVatIsNotRequired?: "dateOfBirth" | undefined;
|
|
66
67
|
accountHolderVatCountry?: "dateOfBirth" | undefined;
|
|
68
|
+
accountHolderBusinessRegistrationNumber?: "dateOfBirth" | undefined;
|
|
69
|
+
accountHolderBusinessRegistrationCountry?: "dateOfBirth" | undefined;
|
|
67
70
|
accountHolderIsIndividual?: "dateOfBirth" | undefined;
|
|
68
71
|
accountHolderIsEuResident?: "dateOfBirth" | undefined;
|
|
69
72
|
accountHolderUsPerson?: "dateOfBirth" | undefined;
|
|
@@ -102,5 +105,5 @@ export declare const getHintKeyMap: () => {
|
|
|
102
105
|
regardedOwnerForeignTin?: "dateOfBirth" | undefined;
|
|
103
106
|
regardedOwnerForeignTinIsNotRequired?: "dateOfBirth" | undefined;
|
|
104
107
|
regardedOwnerUsTin?: "dateOfBirth" | undefined;
|
|
105
|
-
|
|
108
|
+
accountHolderTaxResidences?: "dateOfBirth" | undefined;
|
|
106
109
|
};
|
|
@@ -13,6 +13,7 @@ export declare const getPromptKeyMap: (data: TaxDocumentation) => {
|
|
|
13
13
|
iCertifyToAll?: PromptKey | undefined;
|
|
14
14
|
iConfirmIncomeIsNonUs?: PromptKey | undefined;
|
|
15
15
|
iConfirmTheBeneficialOwnerIsExempt?: PromptKey | undefined;
|
|
16
|
+
iConfirmTheInformationIsCorrectComplete?: PromptKey | undefined;
|
|
16
17
|
iConfirmTheEntityIsNotAUsPerson?: PromptKey | undefined;
|
|
17
18
|
iConfirmTheEntityIsTheBeneficialOwner?: PromptKey | undefined;
|
|
18
19
|
iConfirmTheTaxIdIsCorrect?: PromptKey | undefined;
|
|
@@ -62,8 +63,10 @@ export declare const getPromptKeyMap: (data: TaxDocumentation) => {
|
|
|
62
63
|
accountHolderShowTaxResidence5?: PromptKey | undefined;
|
|
63
64
|
accountHolderUsTin?: PromptKey | undefined;
|
|
64
65
|
accountHolderVatIdentificationNumber?: PromptKey | undefined;
|
|
65
|
-
|
|
66
|
+
accountHolderVatIsNotRequired?: PromptKey | undefined;
|
|
66
67
|
accountHolderVatCountry?: PromptKey | undefined;
|
|
68
|
+
accountHolderBusinessRegistrationNumber?: PromptKey | undefined;
|
|
69
|
+
accountHolderBusinessRegistrationCountry?: PromptKey | undefined;
|
|
67
70
|
accountHolderIsIndividual?: PromptKey | undefined;
|
|
68
71
|
accountHolderIsEuResident?: PromptKey | undefined;
|
|
69
72
|
accountHolderUsPerson?: PromptKey | undefined;
|
|
@@ -102,5 +105,5 @@ export declare const getPromptKeyMap: (data: TaxDocumentation) => {
|
|
|
102
105
|
regardedOwnerForeignTin?: PromptKey | undefined;
|
|
103
106
|
regardedOwnerForeignTinIsNotRequired?: PromptKey | undefined;
|
|
104
107
|
regardedOwnerUsTin?: PromptKey | undefined;
|
|
105
|
-
|
|
108
|
+
accountHolderTaxResidences?: PromptKey | undefined;
|
|
106
109
|
};
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { YesNo } from
|
|
1
|
+
import { YesNo } from 'types';
|
|
2
2
|
export declare const convertYesNoToBoolean: (val: YesNo | undefined) => boolean | undefined;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { TaxDocumentation } from 'types';
|
|
2
|
+
export declare const transformForClientAccountHolder: (data: TaxDocumentation) => {
|
|
3
|
+
address?: {
|
|
4
|
+
city?: string | undefined;
|
|
5
|
+
country?: string | undefined;
|
|
6
|
+
stateOrProvince?: string | undefined;
|
|
7
|
+
firstLine?: string | undefined;
|
|
8
|
+
secondLine?: string | undefined;
|
|
9
|
+
postalCode?: string | undefined;
|
|
10
|
+
} | undefined;
|
|
11
|
+
countryOfCitizenship?: string | undefined;
|
|
12
|
+
dateOfBirth?: string | undefined;
|
|
13
|
+
dbaName?: string | undefined;
|
|
14
|
+
mailingAddress?: {
|
|
15
|
+
city?: string | undefined;
|
|
16
|
+
country?: string | undefined;
|
|
17
|
+
stateOrProvince?: string | undefined;
|
|
18
|
+
firstLine?: string | undefined;
|
|
19
|
+
secondLine?: string | undefined;
|
|
20
|
+
postalCode?: string | undefined;
|
|
21
|
+
} | undefined;
|
|
22
|
+
mailingAddressIsDifferent?: boolean | undefined;
|
|
23
|
+
name?: string | undefined;
|
|
24
|
+
cityOfBirth?: string | undefined;
|
|
25
|
+
countryOfBirth?: string | undefined;
|
|
26
|
+
financialAccountIdentifier?: string | undefined;
|
|
27
|
+
financialAccountName?: string | undefined;
|
|
28
|
+
ftin?: string | undefined;
|
|
29
|
+
ftinNotLegallyRequired?: boolean | undefined;
|
|
30
|
+
taxResidences?: {
|
|
31
|
+
country?: string | undefined;
|
|
32
|
+
tin?: string | undefined;
|
|
33
|
+
tinNotRequired?: boolean | undefined;
|
|
34
|
+
}[] | undefined;
|
|
35
|
+
tin?: string | undefined;
|
|
36
|
+
vatin?: string | undefined;
|
|
37
|
+
vatinCountry?: string | undefined;
|
|
38
|
+
vatinNotRequired?: boolean | undefined;
|
|
39
|
+
businessRegistrationNumber?: string | undefined;
|
|
40
|
+
businessRegistrationCountry?: string | undefined;
|
|
41
|
+
exemptFatcaCode?: string | undefined;
|
|
42
|
+
exemptPayeeCode?: string | undefined;
|
|
43
|
+
isIndividual?: boolean | undefined;
|
|
44
|
+
isEuResident?: boolean | undefined;
|
|
45
|
+
isUsPerson?: boolean | undefined;
|
|
46
|
+
usAccountType?: string | undefined;
|
|
47
|
+
usSmllcElection?: boolean | undefined;
|
|
48
|
+
usLlcClassification?: string | undefined;
|
|
49
|
+
usOtherClassification?: string | undefined;
|
|
50
|
+
usTrustEstateEin?: boolean | undefined;
|
|
51
|
+
foreignAccountType?: string | undefined;
|
|
52
|
+
foreignTrustClassification?: string | undefined;
|
|
53
|
+
foreignOtherClassification?: string | undefined;
|
|
54
|
+
} | undefined;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { TaxDocumentation } from 'types';
|
|
2
|
+
export declare const transformForClientAccountHolderAddress: (data: TaxDocumentation) => {
|
|
3
|
+
city?: string | undefined;
|
|
4
|
+
country?: string | undefined;
|
|
5
|
+
stateOrProvince?: string | undefined;
|
|
6
|
+
firstLine?: string | undefined;
|
|
7
|
+
secondLine?: string | undefined;
|
|
8
|
+
postalCode?: string | undefined;
|
|
9
|
+
} | undefined;
|
|
10
|
+
export declare const transformForClientRegardedOwnerAddress: (data: TaxDocumentation) => {
|
|
11
|
+
city?: string | undefined;
|
|
12
|
+
country?: string | undefined;
|
|
13
|
+
stateOrProvince?: string | undefined;
|
|
14
|
+
firstLine?: string | undefined;
|
|
15
|
+
secondLine?: string | undefined;
|
|
16
|
+
postalCode?: string | undefined;
|
|
17
|
+
} | undefined;
|
|
18
|
+
export declare const transformForClientAccountHolderMailingAddress: (data: TaxDocumentation) => {
|
|
19
|
+
city?: string | undefined;
|
|
20
|
+
country?: string | undefined;
|
|
21
|
+
stateOrProvince?: string | undefined;
|
|
22
|
+
firstLine?: string | undefined;
|
|
23
|
+
secondLine?: string | undefined;
|
|
24
|
+
postalCode?: string | undefined;
|
|
25
|
+
} | undefined;
|
|
26
|
+
export declare const transformForClientRegardedOwnerMailingAddress: (data: TaxDocumentation) => {
|
|
27
|
+
city?: string | undefined;
|
|
28
|
+
country?: string | undefined;
|
|
29
|
+
stateOrProvince?: string | undefined;
|
|
30
|
+
firstLine?: string | undefined;
|
|
31
|
+
secondLine?: string | undefined;
|
|
32
|
+
postalCode?: string | undefined;
|
|
33
|
+
} | undefined;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { TaxDocumentation } from 'types';
|
|
2
|
+
export declare const transformForClientRegardedOwner: (data: TaxDocumentation) => {
|
|
3
|
+
address?: {
|
|
4
|
+
city?: string | undefined;
|
|
5
|
+
country?: string | undefined;
|
|
6
|
+
stateOrProvince?: string | undefined;
|
|
7
|
+
firstLine?: string | undefined;
|
|
8
|
+
secondLine?: string | undefined;
|
|
9
|
+
postalCode?: string | undefined;
|
|
10
|
+
} | undefined;
|
|
11
|
+
countryOfCitizenship?: string | undefined;
|
|
12
|
+
dateOfBirth?: string | undefined;
|
|
13
|
+
dbaName?: string | undefined;
|
|
14
|
+
mailingAddress?: {
|
|
15
|
+
city?: string | undefined;
|
|
16
|
+
country?: string | undefined;
|
|
17
|
+
stateOrProvince?: string | undefined;
|
|
18
|
+
firstLine?: string | undefined;
|
|
19
|
+
secondLine?: string | undefined;
|
|
20
|
+
postalCode?: string | undefined;
|
|
21
|
+
} | undefined;
|
|
22
|
+
mailingAddressIsDifferent?: boolean | undefined;
|
|
23
|
+
name?: string | undefined;
|
|
24
|
+
ftin?: string | undefined;
|
|
25
|
+
ftinNotLegallyRequired?: boolean | undefined;
|
|
26
|
+
tin?: string | undefined;
|
|
27
|
+
exemptFatcaCode?: string | undefined;
|
|
28
|
+
exemptPayeeCode?: string | undefined;
|
|
29
|
+
isUsPerson?: boolean | undefined;
|
|
30
|
+
usAccountType?: string | undefined;
|
|
31
|
+
usLlcClassification?: string | undefined;
|
|
32
|
+
usOtherClassification?: string | undefined;
|
|
33
|
+
usTrustEstateEin?: boolean | undefined;
|
|
34
|
+
foreignAccountType?: string | undefined;
|
|
35
|
+
foreignTrustClassification?: string | undefined;
|
|
36
|
+
foreignOtherClassification?: string | undefined;
|
|
37
|
+
} | undefined;
|
|
@@ -2,5 +2,5 @@ import type { TaxDocumentationKey, TaxForm } from 'types';
|
|
|
2
2
|
type TaxDocumentationPropertyFile = {
|
|
3
3
|
[key in TaxDocumentationKey]: boolean;
|
|
4
4
|
};
|
|
5
|
-
export declare const getSupportedFields: (taxForms: TaxForm
|
|
5
|
+
export declare const getSupportedFields: (taxForms: Array<TaxForm>) => TaxDocumentationPropertyFile;
|
|
6
6
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { TaxDocumentation
|
|
1
|
+
import type { TaxDocumentation } from 'types';
|
|
2
2
|
import { TaxDocumentationPropertyFile } from '../contexts';
|
|
3
|
-
export declare const getVisibleFields: (fields: TaxDocumentation, supportedFields: TaxDocumentationPropertyFile
|
|
3
|
+
export declare const getVisibleFields: (fields: TaxDocumentation | undefined, supportedFields: TaxDocumentationPropertyFile) => TaxDocumentationPropertyFile;
|
|
@@ -4,10 +4,11 @@ type AddressProps = {
|
|
|
4
4
|
index: 1 | 2 | 3 | 4 | 5;
|
|
5
5
|
showIf?: boolean;
|
|
6
6
|
more?: true;
|
|
7
|
+
onShow?: () => void;
|
|
7
8
|
countryOptions: ReadonlyArray<{
|
|
8
9
|
value: CountryCode;
|
|
9
10
|
label: string;
|
|
10
11
|
}>;
|
|
11
12
|
};
|
|
12
|
-
export declare const ResidenceInput: ({ index, showIf, more, countryOptions, }: AddressProps) => React.JSX.Element | null;
|
|
13
|
+
export declare const ResidenceInput: ({ index, showIf, onShow, more, countryOptions, }: AddressProps) => React.JSX.Element | null;
|
|
13
14
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TaxDocumentationKey } from 'types';
|
|
3
|
-
export declare const ErrorRow: ({ label, name, }: {
|
|
4
|
-
label?:
|
|
3
|
+
export declare const ErrorRow: ({ label, subLabel, name, }: {
|
|
4
|
+
label?: boolean | undefined;
|
|
5
|
+
subLabel?: boolean | undefined;
|
|
5
6
|
name: TaxDocumentationKey;
|
|
6
7
|
}) => React.JSX.Element;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { MaskedInputProps } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MaskedInputProps } from 'ui';
|
|
3
3
|
type MaskedInputRowProps = {
|
|
4
4
|
label?: true;
|
|
5
5
|
subLabel?: true;
|
|
6
6
|
hint?: true;
|
|
7
7
|
onChange?: (val: string) => string;
|
|
8
|
+
disabled?: boolean;
|
|
8
9
|
};
|
|
9
|
-
export declare const MaskedInputRow: ({ name, label, hint, subLabel, onChange, }: MaskedInputProps & MaskedInputRowProps) => React.JSX.Element;
|
|
10
|
+
export declare const MaskedInputRow: ({ name, label, hint, subLabel, onChange, disabled, }: MaskedInputProps & MaskedInputRowProps) => React.JSX.Element;
|
|
10
11
|
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { SelectProps } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SelectProps } from 'ui';
|
|
3
3
|
type SelectRowProps = {
|
|
4
4
|
label?: true;
|
|
5
5
|
subLabel?: true;
|
|
6
6
|
onChange?: () => void;
|
|
7
|
+
disabled?: boolean;
|
|
7
8
|
};
|
|
8
|
-
export declare const SelectRow: ({ name, label, options, subLabel, addBlank, onChange, }: SelectProps & SelectRowProps) => React.JSX.Element;
|
|
9
|
+
export declare const SelectRow: ({ name, label, options, subLabel, addBlank, onChange, disabled, }: SelectProps & SelectRowProps) => React.JSX.Element;
|
|
9
10
|
export {};
|
package/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taxbit/react-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "TaxBit Tax Documentation",
|
|
5
5
|
"author": "TaxBit",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist",
|
|
9
|
-
"dist/
|
|
9
|
+
"dist/src"
|
|
10
10
|
],
|
|
11
|
-
"main": "./dist/taxbit-react-sdk.umd.
|
|
12
|
-
"module": "./dist/taxbit-react-sdk.
|
|
11
|
+
"main": "./dist/taxbit-react-sdk.umd.cjs",
|
|
12
|
+
"module": "./dist/taxbit-react-sdk.js",
|
|
13
13
|
"exports": {
|
|
14
14
|
"./style/basic.css": "./dist/basic.css",
|
|
15
15
|
"./style/inline.css": "./dist/inline.css",
|
|
16
16
|
"./style/minimal.css": "./dist/minimal.css",
|
|
17
17
|
".": {
|
|
18
18
|
"types": "./dist/index.d.ts",
|
|
19
|
-
"import": "./dist/taxbit-react-sdk.
|
|
20
|
-
"require": "./dist/taxbit-react-sdk.umd.
|
|
19
|
+
"import": "./dist/taxbit-react-sdk.js",
|
|
20
|
+
"require": "./dist/taxbit-react-sdk.umd.cjs"
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"types": "./dist/index.d.ts",
|
|
@@ -33,8 +33,7 @@
|
|
|
33
33
|
"test": "vitest"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"react": "^16.0.0 || ^17.0.0 || ^18.0.0"
|
|
37
|
-
"react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0"
|
|
36
|
+
"react": "^16.0.0 || ^17.0.0 || ^18.0.0"
|
|
38
37
|
},
|
|
39
38
|
"devDependencies": {
|
|
40
39
|
"@types/react": "^18.0.0",
|