@taxbit/react-sdk 0.0.15 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +309 -10
- package/dist/basic.css +52 -7
- package/dist/components/Notification/Notification.d.ts +5 -0
- package/dist/components/Notification/index.d.ts +1 -0
- package/dist/components/Page/Page.d.ts +3 -1
- package/dist/components/Section/Section.d.ts +2 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/contexts/FormUI/useFormUI.d.ts +11 -3
- package/dist/contexts/FormUI/useFormUIContext.d.ts +20 -4
- package/dist/contexts/TaxDocumentation/TaxBitFormProvider.d.ts +3 -3
- package/dist/contexts/TaxDocumentation/useTaxDocumentation.d.ts +6 -5
- package/dist/contexts/TaxDocumentation/useTaxDocumentationContext.d.ts +114 -12
- package/dist/entry/index.d.ts +3 -3
- package/dist/i18n/i18n.d.ts +1 -1
- package/dist/i18n/index.d.ts +1 -2
- package/dist/i18n/locales/bg-bg.d.ts +2 -0
- package/dist/i18n/locales/cs-cz.d.ts +2 -0
- package/dist/i18n/locales/el-gr.d.ts +2 -0
- package/dist/i18n/locales/et-ee.d.ts +2 -0
- package/dist/i18n/locales/hu-hu.d.ts +2 -0
- package/dist/i18n/locales/index.d.ts +10 -0
- package/dist/i18n/locales/mt-mt.d.ts +2 -0
- package/dist/i18n/locales/pt-pt.d.ts +2 -0
- package/dist/i18n/locales/ro-ro.d.ts +2 -0
- package/dist/i18n/locales/sk-sk.d.ts +2 -0
- package/dist/i18n/locales/sl-si.d.ts +2 -0
- package/dist/i18n/types/LocalizationKey.d.ts +9 -6
- package/dist/i18n/types/PropertyFile.d.ts +16 -2
- package/dist/i18n/types/index.d.ts +0 -1
- package/dist/i18n/utils/getText.d.ts +17 -13
- package/dist/index.css +4 -0
- package/dist/inline.css +53 -8
- package/dist/lookups/dayOptions.d.ts +3 -0
- package/dist/lookups/foreignAccountHolderAccountTypeOptions.d.ts +2 -0
- package/dist/lookups/foreignOtherClassificationOptions.d.ts +17 -0
- package/dist/lookups/foreignTrustClassificationOptions.d.ts +9 -0
- package/dist/lookups/index.d.ts +6 -2
- package/dist/lookups/localeOptions.d.ts +4 -0
- package/dist/lookups/monthOptions.d.ts +4 -0
- package/dist/lookups/usAccountHolderAccountTypeOptions.d.ts +2 -0
- package/dist/lookups/usLlcAccountTypeOptions.d.ts +2 -0
- package/dist/lookups/yearOptions.d.ts +4 -0
- package/dist/minimal.css +3 -1
- package/dist/taxbit-react-sdk.es.js +13131 -6599
- package/dist/taxbit-react-sdk.umd.js +10 -10
- package/dist/types/AccountType.d.ts +3 -3
- package/dist/types/Locale.d.ts +1 -0
- package/dist/types/MonthCode.d.ts +1 -0
- package/dist/types/TaxDocumentation.d.ts +1 -0
- package/dist/types/external/ComprehensiveTaxDocumentation.d.ts +78 -65
- package/dist/types/index.d.ts +2 -0
- package/dist/ui/ActionButton/ActionButton.d.ts +7 -0
- package/dist/ui/ActionButton/index.d.ts +1 -0
- package/dist/ui/CheckBox/CheckBox.d.ts +2 -1
- package/dist/ui/DateOfBirthInput/DateOfBirthInput.d.ts +9 -0
- package/dist/ui/DateOfBirthInput/index.d.ts +1 -0
- package/dist/ui/HideShowButton/HideShowButton.d.ts +5 -0
- package/dist/ui/HideShowButton/index.d.ts +1 -0
- package/dist/ui/MaskedContent/MaskedContent.d.ts +4 -0
- package/dist/ui/MaskedContent/index.d.ts +1 -0
- package/dist/ui/MaskedInput/MaskedInput.d.ts +10 -0
- package/dist/ui/MaskedInput/index.d.ts +1 -0
- package/dist/ui/Password/Password.d.ts +11 -0
- package/dist/ui/Password/index.d.ts +1 -0
- package/dist/ui/TextInput/TextInput.d.ts +4 -1
- package/dist/ui/index.d.ts +4 -0
- package/dist/utils/getForeignAccountType.d.ts +2 -0
- package/dist/utils/getForeignOtherClassification.d.ts +2 -0
- package/dist/utils/getForeignTrustClassification.d.ts +2 -0
- package/dist/utils/getHintKeyMap.d.ts +1 -0
- package/dist/utils/getLLCClassification.d.ts +2 -0
- package/dist/utils/getMonthlyDayCount.d.ts +1 -0
- package/dist/utils/getNotifications.d.ts +10 -0
- package/dist/utils/getPromptKeyMap.d.ts +1 -0
- package/dist/utils/getRequiredFields.d.ts +103 -0
- package/dist/utils/getUsAccountType.d.ts +2 -0
- package/dist/utils/getValidationMessages.d.ts +104 -0
- package/dist/utils/index.d.ts +8 -2
- package/dist/utils/isBlank.d.ts +2 -2
- package/dist/utils/transformInbound.d.ts +2 -1
- package/dist/utils/transformOutbound/convertYesNoToBoolean.d.ts +2 -0
- package/dist/utils/transformOutbound/transformOutbound.d.ts +3 -0
- package/dist/utils/transformOutbound/transformToOutboundAccoutHolder.d.ts +3 -0
- package/dist/utils/transformOutbound/transformToOutboundAddress.d.ts +6 -0
- package/dist/utils/transformOutbound/transformToOutboundRegardedOwner.d.ts +3 -0
- package/dist/utils/transformOutbound/transformToOutboundTaxResidenceFields.d.ts +4 -0
- package/dist/validations/index.d.ts +1 -0
- package/dist/validations/requiredFields.d.ts +7 -0
- package/dist/widgets/TaxBitForm/TaxBitDAC7Form.d.ts +3 -3
- package/dist/widgets/TaxBitForm/TaxBitForm.d.ts +3 -3
- package/dist/wizard/LanguageSelector/LanguageSelector.d.ts +2 -0
- package/dist/wizard/LanguageSelector/index.d.ts +1 -0
- package/dist/{paths → wizard}/ResidenceInput/ResidenceInput.d.ts +5 -2
- package/dist/wizard/RowInput/CheckBoxRow/CheckBoxRow.d.ts +8 -0
- package/dist/wizard/RowInput/DateOfBirthRow/DateOfBirthRow.d.ts +10 -0
- package/dist/wizard/RowInput/DateOfBirthRow/index.d.ts +1 -0
- package/dist/wizard/RowInput/MaskedInputRow/MaskedInputRow.d.ts +10 -0
- package/dist/wizard/RowInput/MaskedInputRow/index.d.ts +1 -0
- package/dist/{paths → wizard}/RowInput/TextInputRow/TextInputRow.d.ts +3 -1
- package/dist/{paths → wizard}/RowInput/VisibleRow/VisibleRow.d.ts +2 -1
- package/dist/{paths → wizard}/RowInput/index.d.ts +1 -1
- package/dist/{paths → wizard}/TaxBitFormUI/TaxBitDAC7FormUI.d.ts +3 -3
- package/dist/{paths → wizard}/TaxBitFormUI/TaxBitFormUI.d.ts +3 -3
- package/package.json +4 -2
- package/dist/components/Title/Title.d.ts +0 -5
- package/dist/components/Title/index.d.ts +0 -1
- package/dist/i18n/types/Locale.d.ts +0 -1
- package/dist/lookups/foreignOtherAccountTypeOptions.d.ts +0 -15
- package/dist/lookups/foreignTrustAccountTypeOptions.d.ts +0 -7
- package/dist/paths/FinancialAccountInput/FinancialAccountInput.d.ts +0 -6
- package/dist/paths/FinancialAccountInput/index.d.ts +0 -1
- package/dist/paths/RowInput/CheckBoxRow/CheckBoxRow.d.ts +0 -8
- package/dist/paths/RowInput/ErrorRow/ErrorRow.d.ts +0 -2
- package/dist/paths/RowInput/ErrorRow/index.d.ts +0 -1
- package/dist/paths/VatInput/VatInput.d.ts +0 -8
- package/dist/paths/VatInput/index.d.ts +0 -1
- package/dist/utils/transformOutbound.d.ts +0 -3
- /package/dist/{paths → wizard}/AddressInput/AddressInput.d.ts +0 -0
- /package/dist/{paths → wizard}/AddressInput/index.d.ts +0 -0
- /package/dist/{paths → wizard}/PlaceOfBirthInput/PlaceOfBirthInput.d.ts +0 -0
- /package/dist/{paths → wizard}/PlaceOfBirthInput/index.d.ts +0 -0
- /package/dist/{paths → wizard}/ResidenceInput/index.d.ts +0 -0
- /package/dist/{paths → wizard}/RowInput/CheckBoxRow/index.d.ts +0 -0
- /package/dist/{paths → wizard}/RowInput/RadioButtonRow/RadioButtonRow.d.ts +0 -0
- /package/dist/{paths → wizard}/RowInput/RadioButtonRow/index.d.ts +0 -0
- /package/dist/{paths → wizard}/RowInput/SelectRow/SelectRow.d.ts +0 -0
- /package/dist/{paths → wizard}/RowInput/SelectRow/index.d.ts +0 -0
- /package/dist/{paths → wizard}/RowInput/TextInputRow/index.d.ts +0 -0
- /package/dist/{paths → wizard}/RowInput/ToggleButtonRow/ToggleButtonRow.d.ts +0 -0
- /package/dist/{paths → wizard}/RowInput/ToggleButtonRow/index.d.ts +0 -0
- /package/dist/{paths → wizard}/RowInput/VisibleRow/index.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderClassification/AccountHolderClassification.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderClassification/index.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderContact/AccountHolderContact.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderContact/index.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderTax/AccountHolderTax.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderTax/index.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderTaxClarification/AccountHolderTaxClarification.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderTaxClarification/index.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/Exemptions/Exemptions.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/Exemptions/index.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/RegardedOwnerClassification/RegardedOwnerClassification.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/RegardedOwnerClassification/index.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/RegardedOwnerContact/RegardedOwnerContact.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/RegardedOwnerContact/index.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/RegardedOwnerTax/RegardedOwnerTax.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/RegardedOwnerTax/index.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/Summary/Recap.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/Summary/Summary.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/Summary/index.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/index.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/steps.d.ts +0 -0
- /package/dist/{paths → wizard}/index.d.ts +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TaxDocumentation, TaxDocumentationKey } from "types/TaxDocumentation";
|
|
2
|
+
import { TaxForm } from "../types";
|
|
3
|
+
export type FormUIRequired = ((fields: TaxDocumentation, taxForms?: TaxForm[]) => boolean | undefined) | (() => boolean | undefined);
|
|
4
|
+
export type FormUIRequiredFields = {
|
|
5
|
+
[key in TaxDocumentationKey]?: FormUIRequired;
|
|
6
|
+
};
|
|
7
|
+
export declare const requiredFields: FormUIRequiredFields;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type { Locale } from "../../
|
|
3
|
-
import {
|
|
2
|
+
import type { Locale } from "../../types";
|
|
3
|
+
import { ClientTaxDocumentation } from "../../types/external";
|
|
4
4
|
type TaxBitDAC7FormProps = {
|
|
5
|
-
data?:
|
|
5
|
+
data?: ClientTaxDocumentation;
|
|
6
6
|
bearerToken: string;
|
|
7
7
|
language?: Locale;
|
|
8
8
|
staging?: true;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
2
|
+
import { Locale, TaxForm } from "../../types";
|
|
3
|
+
import { ClientTaxDocumentation } from "../../types/external";
|
|
4
4
|
type TaxBitFormProps = {
|
|
5
|
-
data?:
|
|
5
|
+
data?: ClientTaxDocumentation;
|
|
6
6
|
staging?: true;
|
|
7
7
|
bearerToken: string;
|
|
8
8
|
language?: Locale;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./LanguageSelector";
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { CountryCode } from "types";
|
|
3
3
|
type AddressProps = {
|
|
4
4
|
index: 1 | 2 | 3 | 4 | 5;
|
|
5
5
|
showIf?: boolean;
|
|
6
6
|
more?: true;
|
|
7
|
-
countryOptions:
|
|
7
|
+
countryOptions: ReadonlyArray<{
|
|
8
|
+
value: CountryCode;
|
|
9
|
+
label: string;
|
|
10
|
+
}>;
|
|
8
11
|
};
|
|
9
12
|
export declare const ResidenceInput: ({ index, showIf, more, countryOptions, }: AddressProps) => React.JSX.Element | undefined;
|
|
10
13
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CheckBoxProps } from "ui";
|
|
3
|
+
type CheckBoxRowProps = {
|
|
4
|
+
label?: boolean;
|
|
5
|
+
subLabel?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const CheckBoxRow: ({ name, label, subLabel, onClick, }: CheckBoxProps & CheckBoxRowProps) => React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { DateOfBirthInputProps } from "ui";
|
|
3
|
+
import { TaxDocumentationKey } from "types";
|
|
4
|
+
type DateOfBirthRowProps = {
|
|
5
|
+
name: TaxDocumentationKey;
|
|
6
|
+
label?: true;
|
|
7
|
+
subLabel?: true;
|
|
8
|
+
};
|
|
9
|
+
export declare const DateOfBirthRow: ({ name, label, subLabel, }: DateOfBirthRowProps & DateOfBirthInputProps) => React.JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DateOfBirthRow.tsx";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { MaskedInputProps } from "ui";
|
|
3
|
+
type MaskedInputRowProps = {
|
|
4
|
+
label?: true;
|
|
5
|
+
subLabel?: true;
|
|
6
|
+
hint?: true;
|
|
7
|
+
onChange?: (val: string) => string;
|
|
8
|
+
};
|
|
9
|
+
export declare const MaskedInputRow: ({ name, label, hint, subLabel, onChange, }: MaskedInputProps & MaskedInputRowProps) => React.JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./MaskedInputRow";
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TextInputProps } from "ui";
|
|
3
|
+
import { TaxDocumentationKey } from "types";
|
|
3
4
|
type TextInputRowProps = {
|
|
4
5
|
label?: true;
|
|
5
6
|
subLabel?: true;
|
|
6
7
|
hint?: true;
|
|
7
8
|
onChange?: (val: string) => string;
|
|
9
|
+
syncName?: TaxDocumentationKey;
|
|
8
10
|
};
|
|
9
|
-
export declare const TextInputRow: ({ name, label, hint, subLabel, onChange, }: TextInputProps & TextInputRowProps) => React.JSX.Element;
|
|
11
|
+
export declare const TextInputRow: ({ name, label, hint, subLabel, onChange, disabled, syncName, }: TextInputProps & TextInputRowProps) => React.JSX.Element;
|
|
10
12
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TaxDocumentationKey } from "types";
|
|
3
|
-
export declare const VisibleRow: ({ label, subLabel, name, children, onEdit, }: {
|
|
3
|
+
export declare const VisibleRow: ({ label, subLabel, name, children, onEdit, notification, }: {
|
|
4
4
|
label?: boolean | undefined;
|
|
5
5
|
subLabel?: boolean | undefined;
|
|
6
|
+
notification?: boolean | undefined;
|
|
6
7
|
name: TaxDocumentationKey;
|
|
7
8
|
children: React.ReactNode;
|
|
8
9
|
onEdit?: (() => void) | undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type { Locale } from "../../
|
|
3
|
-
import
|
|
2
|
+
import type { Locale, TaxDocumentation } from "../../types";
|
|
3
|
+
import { ClientTaxDocumentation } from "../../types/external";
|
|
4
4
|
type TaxDocumentationDAC7PathProps = {
|
|
5
|
-
data?:
|
|
5
|
+
data?: ClientTaxDocumentation;
|
|
6
6
|
onSubmit: (data: TaxDocumentation) => void;
|
|
7
7
|
language?: Locale;
|
|
8
8
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type { Locale } from "../../
|
|
3
|
-
import
|
|
2
|
+
import type { Locale, TaxForm, TaxDocumentation } from "../../types";
|
|
3
|
+
import { ClientTaxDocumentation } from "../../types/external";
|
|
4
4
|
type TaxBitFormUIProps = {
|
|
5
|
-
data?:
|
|
5
|
+
data?: ClientTaxDocumentation;
|
|
6
6
|
onSubmit: (data: TaxDocumentation) => void;
|
|
7
7
|
language?: Locale;
|
|
8
8
|
taxForms?: TaxForm[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taxbit/react-sdk",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "TaxBit Tax Documentation",
|
|
5
5
|
"author": "TaxBit",
|
|
6
6
|
"type": "module",
|
|
@@ -33,11 +33,13 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"react": "^18.2.0",
|
|
35
35
|
"react-dom": "^18.2.0",
|
|
36
|
-
"react-input-mask": "^2.0.4"
|
|
36
|
+
"react-input-mask": "^2.0.4",
|
|
37
|
+
"type-fest": "^4.3.2"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
40
|
"@types/node": "^18.17.0",
|
|
40
41
|
"@types/react": "^18.2.15",
|
|
42
|
+
"@types/react-better-password": "^1.0.3",
|
|
41
43
|
"@types/react-dom": "^18.2.7",
|
|
42
44
|
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
43
45
|
"@typescript-eslint/parser": "^6.0.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Title.tsx';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type Locale = "en-us" | "de-de" | "en-gb" | "it-it" | "nl-nl" | "no-no" | "sv-se" | "fr-fr" | "es-es";
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare const foreignOtherAccountTypeOptions: readonly [{
|
|
2
|
-
readonly value: "taxExemptOrganization";
|
|
3
|
-
}, {
|
|
4
|
-
readonly value: "privateFoundation";
|
|
5
|
-
}, {
|
|
6
|
-
readonly value: "internationalOrganization";
|
|
7
|
-
}, {
|
|
8
|
-
readonly value: "centralBankOfIssue";
|
|
9
|
-
}, {
|
|
10
|
-
readonly value: "foreignGovernmentControlledEntity";
|
|
11
|
-
}, {
|
|
12
|
-
readonly value: "foreignGovernmentIntegralPart";
|
|
13
|
-
}, {
|
|
14
|
-
readonly value: "estate";
|
|
15
|
-
}];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./FinancialAccountInput";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CheckBoxProps } from "ui";
|
|
3
|
-
type CheckBoxRowProps = {
|
|
4
|
-
label?: true;
|
|
5
|
-
subLabel?: true;
|
|
6
|
-
};
|
|
7
|
-
export declare const CheckBoxRow: ({ name, label, subLabel, }: CheckBoxProps & CheckBoxRowProps) => React.JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./ErrorRow";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./VatInput";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|