@taxbit/react-sdk 0.5.0 → 0.5.1

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.
@@ -21,7 +21,6 @@ export declare const useTaxDocumentation: ({ data: startingData, language: initi
21
21
  onPersistAccountHolderData: (newData: TaxDocumentation) => void;
22
22
  onPersistCollectedData: (newData: TaxDocumentation) => void;
23
23
  onSubmitTaxDocumentation: (data: TaxDocumentation) => void;
24
- onResetTaxDocumentation: (data: ClientTaxDocumentation) => void;
25
24
  error: string | undefined;
26
25
  editTo: (form: InputStep) => void;
27
26
  onCancel: (() => void) | undefined;
@@ -37,7 +36,6 @@ export declare const useTaxDocumentation: ({ data: startingData, language: initi
37
36
  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">>;
38
37
  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";
39
38
  supportedForms: TaxForm[];
40
- setSupportedForms: import("react").Dispatch<import("react").SetStateAction<TaxForm[]>>;
41
39
  externalValidations: ExternalValidations | undefined;
42
40
  };
43
41
  export {};
@@ -8,7 +8,6 @@ export declare const useTaxDocumentationContext: () => {
8
8
  onPersistAccountHolderData: (newData: import("../../types").TaxDocumentation) => void;
9
9
  onPersistCollectedData: (newData: import("../../types").TaxDocumentation) => void;
10
10
  onSubmitTaxDocumentation: (data: import("../../types").TaxDocumentation) => void;
11
- onResetTaxDocumentation: (data: import("../../entry").ClientTaxDocumentation) => void;
12
11
  error: string | undefined;
13
12
  editTo: (form: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Confirmation" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary") => void;
14
13
  onCancel: (() => void) | undefined;
@@ -24,7 +23,6 @@ export declare const useTaxDocumentationContext: () => {
24
23
  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">>;
25
24
  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";
26
25
  supportedForms: import("../../types").TaxForm[];
27
- setSupportedForms: import("react").Dispatch<import("react").SetStateAction<import("../../types").TaxForm[]>>;
28
26
  externalValidations: import("../../entry").ExternalValidations | undefined;
29
27
  }, TaxDocumentationContextProvider: import("react").Provider<{
30
28
  isW9: boolean;
@@ -35,7 +33,6 @@ export declare const useTaxDocumentationContext: () => {
35
33
  onPersistAccountHolderData: (newData: import("../../types").TaxDocumentation) => void;
36
34
  onPersistCollectedData: (newData: import("../../types").TaxDocumentation) => void;
37
35
  onSubmitTaxDocumentation: (data: import("../../types").TaxDocumentation) => void;
38
- onResetTaxDocumentation: (data: import("../../entry").ClientTaxDocumentation) => void;
39
36
  error: string | undefined;
40
37
  editTo: (form: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Confirmation" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary") => void;
41
38
  onCancel: (() => void) | undefined;
@@ -51,6 +48,5 @@ export declare const useTaxDocumentationContext: () => {
51
48
  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">>;
52
49
  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";
53
50
  supportedForms: import("../../types").TaxForm[];
54
- setSupportedForms: import("react").Dispatch<import("react").SetStateAction<import("../../types").TaxForm[]>>;
55
51
  externalValidations: import("../../entry").ExternalValidations | undefined;
56
52
  } | undefined>;
@@ -9,5 +9,5 @@ export type RadioButtonsProps = {
9
9
  name: TaxDocumentationKey;
10
10
  options: ReadonlyArray<SelectOption>;
11
11
  };
12
- export declare const RadioButtons: ({ name, options }: RadioButtonsProps) => React.JSX.Element;
12
+ export declare const RadioButtons: <T extends OptionKey>({ name, options, }: RadioButtonsProps) => React.JSX.Element;
13
13
  export {};
@@ -1,24 +1,14 @@
1
1
  import { OptionKey } from 'i18n/types';
2
- import { FatcaCode, PayeeCode } from 'lookups';
3
2
  import React from 'react';
4
- import type { CaProvinceCode } from 'types/CaProvinceCode';
5
- import type { CountryCode } from 'types/CountryCode';
6
3
  import { TaxDocumentationKey } from 'types/TaxDocumentation';
7
- import type { UsStateCode } from 'types/UsStateCode';
8
- type FatcaSelectOption = {
9
- value: FatcaCode;
10
- };
11
- type PayeeSelectOption = {
12
- value: PayeeCode;
13
- };
14
- type SpecialSelectOption = {
15
- value: CountryCode | UsStateCode | CaProvinceCode;
16
- label: string;
4
+ type ValueOption = {
5
+ value: string;
6
+ label?: string;
17
7
  };
18
8
  export type SelectProps = {
19
9
  prompt?: string;
20
10
  name: TaxDocumentationKey;
21
- options: ReadonlyArray<FatcaSelectOption> | ReadonlyArray<PayeeSelectOption> | ReadonlyArray<SpecialSelectOption>;
11
+ options: ReadonlyArray<ValueOption>;
22
12
  addBlank?: boolean;
23
13
  className?: string;
24
14
  onChange?: () => void;
@@ -7,7 +7,6 @@ export type TextInputProps = {
7
7
  hint?: true;
8
8
  disabled?: boolean;
9
9
  children?: React.ReactNode;
10
- syncName?: TaxDocumentationKey;
11
10
  defaultValue?: string;
12
11
  };
13
- export declare const TextInput: ({ name, className, onChange, hint, children, disabled, syncName, defaultValue, }: TextInputProps) => React.JSX.Element;
12
+ export declare const TextInput: ({ name, className, onChange, hint, children, disabled, defaultValue, }: TextInputProps) => React.JSX.Element;
@@ -0,0 +1,5 @@
1
+ export declare const byOptionalLabel: (a: {
2
+ label?: string;
3
+ }, b: {
4
+ label?: string;
5
+ }) => number;
@@ -0,0 +1 @@
1
+ export * from './byOptionalLabel';
@@ -1,2 +1,2 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  export declare const LanguageSelector: () => React.JSX.Element;
@@ -1,12 +1,10 @@
1
1
  import React from 'react';
2
- import { TaxDocumentationKey } from 'types';
3
2
  import { TextInputProps } from 'ui';
4
3
  type TextInputRowProps = {
5
4
  label?: true;
6
5
  subLabel?: true;
7
6
  hint?: true;
8
7
  onChange?: (val: string) => string;
9
- syncName?: TaxDocumentationKey;
10
8
  };
11
- export declare const TextInputRow: ({ name, label, hint, subLabel, onChange, disabled, defaultValue, syncName, }: TextInputProps & TextInputRowProps) => React.JSX.Element;
9
+ export declare const TextInputRow: ({ name, label, hint, subLabel, onChange, disabled, defaultValue, }: TextInputProps & TextInputRowProps) => React.JSX.Element;
12
10
  export {};