@taxbit/react-sdk 1.1.0-beta.1 → 1.2.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 +13 -4
- package/dist/src/contexts/QuestionnaireStep/getLocal.d.ts +4 -3
- package/dist/src/contexts/QuestionnaireStep/shiftControllingPerson.d.ts +3 -0
- package/dist/src/contexts/QuestionnaireStep/shiftResidence.d.ts +1 -1
- package/dist/src/contexts/QuestionnaireStep/useQuestionnaireStep.d.ts +2 -1
- package/dist/src/contexts/QuestionnaireStep/useQuestionnaireStepContext.d.ts +4 -2
- package/dist/src/contexts/TaxDocumentation/useTaxDocumentation.d.ts +5 -5
- package/dist/src/contexts/TaxDocumentation/useTaxDocumentationContext.d.ts +6 -6
- package/dist/src/hooks/useTaxbit/useTaxbit.d.ts +2 -2
- package/dist/src/hooks/useTaxbit/useTaxbitStatus.d.ts +2 -2
- package/dist/src/i18n/locales/de.d.ts +2 -2
- package/dist/src/i18n/locales/el.d.ts +2 -2
- package/dist/src/i18n/locales/ga.d.ts +1 -3
- package/dist/src/i18n/locales/lt.d.ts +2 -2
- package/dist/src/i18n/locales/pl.d.ts +2 -2
- package/dist/src/i18n/types/LocalizationKey.d.ts +6 -6
- package/dist/src/i18n/types/PropertyFile.d.ts +15 -14
- package/dist/src/index.d.ts +2 -2
- package/dist/src/lookups/activeNonFinancialEntityTypeOptions.d.ts +3 -0
- package/dist/src/lookups/controllingPersonRoleOptions.d.ts +3 -0
- package/dist/src/lookups/entityTypeOptions.d.ts +3 -0
- package/dist/src/lookups/financialInstitutionTypeOptions.d.ts +3 -0
- package/dist/src/lookups/index.d.ts +7 -0
- package/dist/src/lookups/payeeCodeOptions.d.ts +1 -1
- package/dist/src/lookups/selfCertificationAccountTypeOptions.d.ts +3 -0
- package/dist/src/lookups/signatureCapacityOptions.d.ts +3 -0
- package/dist/src/lookups/tinNotRequiredReasonOptions.d.ts +3 -0
- package/dist/src/services/api.d.ts +5 -2
- package/dist/src/services/msw.d.ts +33 -0
- package/dist/src/test/Wrapper.d.ts +2 -2
- package/dist/src/test/getWrapper.d.ts +2 -2
- package/dist/src/test/utils/helpers.d.ts +10 -0
- package/dist/src/types/InputStep.d.ts +1 -1
- package/dist/src/types/QuestionnaireProp.d.ts +1 -0
- package/dist/src/types/StepId.d.ts +1 -1
- package/dist/src/types/TaxDocumentation.d.ts +87 -50
- package/dist/src/types/client/ClientTaxDocumentationStatus.d.ts +4 -0
- package/dist/src/types/index.d.ts +1 -1
- package/dist/src/types/server/TaxDocumentationStatus.d.ts +4 -0
- package/dist/src/ui/InputValue/InputValue.d.ts +2 -1
- package/dist/src/ui/Select/Select.d.ts +0 -1
- package/dist/src/utils/getFieldsState.d.ts +7 -2
- package/dist/src/utils/getFormStatus.d.ts +2 -1
- package/dist/src/utils/getLanguage.d.ts +2 -2
- package/dist/src/utils/index.d.ts +1 -1
- package/dist/src/utils/promptKeyMapping/getAddressPromptKeyMap.d.ts +6 -0
- package/dist/src/utils/promptKeyMapping/getControllingPersonPromptKeyMap.d.ts +4 -0
- package/dist/src/utils/promptKeyMapping/getTaxResidencesPromptKeyMap.d.ts +6 -0
- package/dist/src/utils/transformForClient/transformForClient.d.ts +2 -2
- package/dist/src/utils/transformForClient/transformForClientAddress.d.ts +4 -32
- package/dist/src/utils/transformForClient/transformForClientTaxResidences.d.ts +11 -0
- package/dist/src/utils/transformForClient/transformForControllingPersons.d.ts +4 -0
- package/dist/src/utils/transformInbound/getActiveNonFinancialEntityType.d.ts +3 -0
- package/dist/src/utils/transformInbound/getCountryCode.d.ts +1 -0
- package/dist/src/utils/transformInbound/getEntityType.d.ts +3 -0
- package/dist/src/utils/transformInbound/getFinancialInstitutionType.d.ts +3 -0
- package/dist/src/utils/transformInbound/getSelfCertificationAccountType.d.ts +3 -0
- package/dist/src/utils/transformInbound/transformInbound.d.ts +2 -2
- package/dist/src/utils/transformInbound/transformInboundAddress.d.ts +6 -0
- package/dist/src/utils/transformInbound/transformInboundControllingPersons.d.ts +440 -0
- package/dist/src/utils/transformInbound/transformInboundTaxResidencies.d.ts +7 -0
- package/dist/src/validations/getSteps.d.ts +2 -2
- package/dist/src/validations/index.d.ts +5 -5
- package/dist/src/validations/invalidFields/getInvalidAddressFields.d.ts +5 -0
- package/dist/src/validations/invalidFields/getInvalidControllingPersonsFields.d.ts +3 -0
- package/dist/src/validations/invalidFields/getInvalidFields.d.ts +5 -0
- package/dist/src/validations/invalidFields/getInvalidTaxResidencyFields.d.ts +5 -0
- package/dist/src/validations/{invalidFieldRules.d.ts → invalidFields/invalidFieldRules.d.ts} +1 -1
- package/dist/src/validations/requiredFields/getRequiredAddressFields.d.ts +7 -0
- package/dist/src/validations/requiredFields/getRequiredControllingPersonFields.d.ts +4 -0
- package/dist/src/validations/requiredFields/getRequiredFields.d.ts +4 -0
- package/dist/src/validations/requiredFields/getRequiredTaxResidenceFields.d.ts +7 -0
- package/dist/src/validations/supportedFields/__tests__/generateStrings.d.ts +5 -0
- package/dist/src/validations/supportedFields/getSupportedAddressFields.d.ts +8 -0
- package/dist/src/validations/supportedFields/getSupportedControllingPersonFields.d.ts +7 -0
- package/dist/src/validations/supportedFields/getSupportedFields.d.ts +4 -0
- package/dist/src/validations/supportedFields/getSupportedTaxResidenceFields.d.ts +8 -0
- package/dist/src/validations/supportedFields/getSupportedTreatyClaimFields.d.ts +3 -0
- package/dist/src/validations/visibleFields/getVisibleAddressFields.d.ts +5 -0
- package/dist/src/validations/visibleFields/getVisibleControllingPersonFields.d.ts +4 -0
- package/dist/src/validations/visibleFields/getVisibleFields.d.ts +4 -0
- package/dist/src/validations/visibleFields/getVisibleTaxResidenceFields.d.ts +9 -0
- package/dist/src/{entry → widgets}/TaxbitQuestionnaire/TaxbitQuestionnaire.d.ts +3 -3
- package/dist/src/widgets/TaxbitQuestionnairePersist/useTaxbitPersist.d.ts +2 -2
- package/dist/src/wizard/AddressInput/AddressInput.d.ts +1 -1
- package/dist/src/wizard/ControllingPersonInput/ControllingPersonInput.d.ts +11 -0
- package/dist/src/wizard/ControllingPersonInput/index.d.ts +1 -0
- package/dist/src/wizard/LanguageSelector/LanguageSelector.d.ts +2 -2
- package/dist/src/wizard/ResidenceInput/ResidenceInput.d.ts +2 -1
- package/dist/src/wizard/RowInput/AddressRow/AddressRow.d.ts +1 -1
- package/dist/src/wizard/RowInput/PercentInputRow/PercentInputRow.d.ts +9 -0
- package/dist/src/wizard/RowInput/PercentInputRow/index.d.ts +1 -0
- package/dist/src/wizard/RowInput/SelectRow/SelectRow.d.ts +2 -1
- package/dist/src/wizard/RowInput/index.d.ts +1 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/ControllingPersonDetails/ControllingPersonDetails.d.ts +7 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/ControllingPersonDetails/index.d.ts +1 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/AccountHolder/AccountHolderClassificationSummary.d.ts +3 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/AccountHolder/AccountHolderForeignClassificationSummary.d.ts +6 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/AccountHolder/AccountHolderSelfCertificationClassificationSummary.d.ts +6 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/AccountHolder/AccountHolderUsClassificationSummary.d.ts +6 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/ControllingPerson/ControllingPersonRoleInputValue.d.ts +7 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/ControllingPerson/ControllingPersonSummary.d.ts +7 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/ControllingPerson/ControllingPersonTypeSummary.d.ts +7 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/RegardedOwner/RegardedOwnerClassificationSummary.d.ts +3 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/RegardedOwner/RegardedOwnerForeignClassificationSummary.d.ts +6 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/RegardedOwner/RegardedOwnerUsClassificationSummary.d.ts +6 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/TaxResidency/TaxResidenciesSummary.d.ts +11 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/__tests__/TaxbitQuestionnaireUI.SelfCert.AccountClassification.test.d.ts +1 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/__tests__/TaxbitQuestionnaireUI.SelfCert.ControllingPerson.test.d.ts +1 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/__tests__/TaxbitQuestionnaireUI.SelfCert.NameAndAddress.test.d.ts +1 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/__tests__/TaxbitQuestionnaireUI.SelfCert.Summary.test.d.ts +1 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/__tests__/TaxbitQuestionnaireUI.SelfCert.TaxResidencies.test.d.ts +1 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/steps.d.ts +1 -0
- package/dist/taxbit-react-sdk.js +7466 -4608
- package/dist/taxbit-react-sdk.umd.cjs +1 -1
- package/package.json +7 -6
- package/style/basic.css +4 -0
- package/style/inline.css +1 -0
- package/dist/src/types/Questionnaire.d.ts +0 -1
- package/dist/src/utils/transformForClient/transformForClientTaxResidenceFields.d.ts +0 -7
- package/dist/src/validations/getInvalidFields.d.ts +0 -5
- package/dist/src/validations/getRequiredFields.d.ts +0 -4
- package/dist/src/validations/getSupportedFields.d.ts +0 -7
- package/dist/src/validations/getVisibleFields.d.ts +0 -4
- /package/dist/src/utils/{getPromptKeyMap.d.ts → promptKeyMapping/getPromptKeyMap.d.ts} +0 -0
- /package/dist/src/{entry → widgets}/TaxbitQuestionnaire/index.d.ts +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ClientTaxDocumentation, SignedClientTaxDocumentation } from '@taxbit/utilities';
|
|
2
|
-
import {
|
|
2
|
+
import { QuestionnaireProp } from 'types';
|
|
3
3
|
import { ExternalValidations } from 'types/client';
|
|
4
4
|
|
|
5
5
|
export type UseTaxbitPersistProps = {
|
|
6
6
|
data?: ClientTaxDocumentation;
|
|
7
7
|
staging?: boolean;
|
|
8
8
|
bearerToken: string;
|
|
9
|
-
questionnaire:
|
|
9
|
+
questionnaire: QuestionnaireProp;
|
|
10
10
|
onSuccess?: (data: ClientTaxDocumentation) => void | Promise<void>;
|
|
11
11
|
onSettled?: (data: ClientTaxDocumentation) => void | Promise<void>;
|
|
12
12
|
onError?: (error: Error) => void | Promise<void>;
|
|
@@ -4,7 +4,7 @@ type AddressProps = {
|
|
|
4
4
|
prompt: string;
|
|
5
5
|
subPrompt?: string;
|
|
6
6
|
showIf?: boolean;
|
|
7
|
-
prefix: 'accountHolderAddress' | 'accountHolderMailingAddress' | 'regardedOwnerAddress' | 'regardedOwnerMailingAddress';
|
|
7
|
+
prefix: 'accountHolderAddress' | 'accountHolderMailingAddress' | 'regardedOwnerAddress' | 'regardedOwnerMailingAddress' | 'controllingPerson1Address' | 'controllingPerson1MailingAddress' | 'controllingPerson2Address' | 'controllingPerson2MailingAddress' | 'controllingPerson3Address' | 'controllingPerson3MailingAddress' | 'controllingPerson4Address' | 'controllingPerson4MailingAddress' | 'controllingPerson5Address' | 'controllingPerson5MailingAddress';
|
|
8
8
|
};
|
|
9
9
|
export declare const AddressInput: ({ prompt, subPrompt, prefix, showIf, }: AddressProps) => React.JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
type ControllingPersonInputProps = {
|
|
4
|
+
index: 1 | 2 | 3 | 4 | 5;
|
|
5
|
+
showIf?: boolean;
|
|
6
|
+
more?: boolean;
|
|
7
|
+
remove?: boolean;
|
|
8
|
+
onShow?: () => void;
|
|
9
|
+
};
|
|
10
|
+
export declare const ControllingPersonInput: ({ index, showIf, onShow, more, remove, }: ControllingPersonInputProps) => React.JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ControllingPersonInput.tsx';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { QuestionnaireProp } from 'types';
|
|
3
3
|
|
|
4
4
|
export declare const LanguageSelector: ({ questionnaire, }: {
|
|
5
|
-
questionnaire:
|
|
5
|
+
questionnaire: QuestionnaireProp;
|
|
6
6
|
}) => React.JSX.Element | null;
|
|
@@ -2,6 +2,7 @@ import { default as React } from 'react';
|
|
|
2
2
|
|
|
3
3
|
type ResidenceInputProps = {
|
|
4
4
|
index: 1 | 2 | 3 | 4 | 5;
|
|
5
|
+
prefix: 'accountHolder' | 'controllingPerson1' | 'controllingPerson2' | 'controllingPerson3' | 'controllingPerson4' | 'controllingPerson5';
|
|
5
6
|
showIf?: boolean;
|
|
6
7
|
more?: boolean;
|
|
7
8
|
remove?: boolean;
|
|
@@ -11,5 +12,5 @@ type ResidenceInputProps = {
|
|
|
11
12
|
label: string;
|
|
12
13
|
}>;
|
|
13
14
|
};
|
|
14
|
-
export declare const ResidenceInput: ({ index, showIf, onShow, more, remove, countryOptions, }: ResidenceInputProps) => React.JSX.Element;
|
|
15
|
+
export declare const ResidenceInput: ({ index, prefix, showIf, onShow, more, remove, countryOptions, }: ResidenceInputProps) => React.JSX.Element;
|
|
15
16
|
export {};
|
|
@@ -3,7 +3,7 @@ import { default as React } from 'react';
|
|
|
3
3
|
type AddressRowProps = {
|
|
4
4
|
onEdit?: () => void;
|
|
5
5
|
prompt?: string;
|
|
6
|
-
name: 'accountHolderAddress' | 'accountHolderMailingAddress' | 'regardedOwnerAddress' | 'regardedOwnerMailingAddress';
|
|
6
|
+
name: 'accountHolderAddress' | 'accountHolderMailingAddress' | 'regardedOwnerAddress' | 'regardedOwnerMailingAddress' | 'controllingPerson1Address' | 'controllingPerson1MailingAddress' | 'controllingPerson2Address' | 'controllingPerson2MailingAddress' | 'controllingPerson3Address' | 'controllingPerson3MailingAddress' | 'controllingPerson4Address' | 'controllingPerson4MailingAddress' | 'controllingPerson5Address' | 'controllingPerson5MailingAddress';
|
|
7
7
|
};
|
|
8
8
|
export declare const AddressRow: ({ onEdit, name, prompt }: AddressRowProps) => React.JSX.Element | null;
|
|
9
9
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TextInputProps } from 'ui';
|
|
3
|
+
|
|
4
|
+
type PercentInputRowProps = {
|
|
5
|
+
label?: boolean;
|
|
6
|
+
subLabel?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const PercentInputRow: ({ name, label, subLabel, disabled, defaultValue, }: TextInputProps & PercentInputRowProps) => React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PercentInputRow.tsx';
|
|
@@ -6,6 +6,7 @@ type SelectRowProps = {
|
|
|
6
6
|
subLabel?: true;
|
|
7
7
|
onChange?: () => void;
|
|
8
8
|
disabled?: boolean;
|
|
9
|
+
prompt?: string;
|
|
9
10
|
};
|
|
10
|
-
export declare const SelectRow: ({ name, label, options, subLabel, addBlank, onChange, disabled, }: SelectProps & SelectRowProps) => React.JSX.Element;
|
|
11
|
+
export declare const SelectRow: ({ name, label, options, subLabel, addBlank, onChange, disabled, prompt, }: SelectProps & SelectRowProps) => React.JSX.Element;
|
|
11
12
|
export {};
|
package/dist/src/wizard/TaxbitQuestionnaireUI/ControllingPersonDetails/ControllingPersonDetails.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export declare const ControllingPersonDetails1: () => React.JSX.Element;
|
|
4
|
+
export declare const ControllingPersonDetails2: () => React.JSX.Element;
|
|
5
|
+
export declare const ControllingPersonDetails3: () => React.JSX.Element;
|
|
6
|
+
export declare const ControllingPersonDetails4: () => React.JSX.Element;
|
|
7
|
+
export declare const ControllingPersonDetails5: () => React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ControllingPersonDetails';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ForeignAccountHolderAccountType } from '@taxbit/utilities';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
|
|
4
|
+
export declare const AccountHolderForeignClassificationSummary: ({ classification, }: {
|
|
5
|
+
classification: ForeignAccountHolderAccountType;
|
|
6
|
+
}) => React.JSX.Element | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SelfCertificationAccountType } from '@taxbit/utilities';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
|
|
4
|
+
export declare const AccountHolderSelfCertificationClassificationSummary: ({ classification, }: {
|
|
5
|
+
classification: SelfCertificationAccountType;
|
|
6
|
+
}) => React.JSX.Element | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UsAccountHolderAccountType } from '@taxbit/utilities';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
|
|
4
|
+
export declare const AccountHolderUsClassificationSummary: ({ classification, }: {
|
|
5
|
+
classification: UsAccountHolderAccountType;
|
|
6
|
+
}) => React.JSX.Element | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TaxDocumentation } from '../../../../types';
|
|
3
|
+
|
|
4
|
+
export declare const ControllingPersonRoleInputValue: ({ fields, index, }: {
|
|
5
|
+
fields: TaxDocumentation;
|
|
6
|
+
index: "1" | "2" | "3" | "4" | "5";
|
|
7
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ForeignRegardedOwnerAccountType } from '@taxbit/utilities';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
|
|
4
|
+
export declare const RegardedOwnerForeignClassificationSummary: ({ classification, }: {
|
|
5
|
+
classification: ForeignRegardedOwnerAccountType;
|
|
6
|
+
}) => React.JSX.Element | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UsRegardedOwnerAccountType } from '@taxbit/utilities';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
|
|
4
|
+
export declare const RegardedOwnerUsClassificationSummary: ({ classification, }: {
|
|
5
|
+
classification: UsRegardedOwnerAccountType;
|
|
6
|
+
}) => React.JSX.Element | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { InputStep } from '../../../../types';
|
|
3
|
+
|
|
4
|
+
type Prefix = 'accountHolder' | 'controllingPerson1' | 'controllingPerson2' | 'controllingPerson3' | 'controllingPerson4' | 'controllingPerson5';
|
|
5
|
+
type TaxResidenciesSummaryProps = {
|
|
6
|
+
prefix: Prefix;
|
|
7
|
+
showIf?: boolean;
|
|
8
|
+
goToStep: InputStep;
|
|
9
|
+
};
|
|
10
|
+
export declare const TaxResidenciesSummary: ({ prefix, goToStep, }: TaxResidenciesSummaryProps) => React.JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -3,6 +3,7 @@ export * from './AccountHolderContact';
|
|
|
3
3
|
export * from './AccountHolderTax';
|
|
4
4
|
export * from './AccountHolderTaxClarification';
|
|
5
5
|
export * from './AccountHolderTreatyClaims';
|
|
6
|
+
export * from './ControllingPersonDetails';
|
|
6
7
|
export * from './Exemptions';
|
|
7
8
|
export * from './RegardedOwnerContact';
|
|
8
9
|
export * from './RegardedOwnerTax';
|