@txgw/payout-components 0.1.7 → 0.2.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.
package/dist/index.d.ts CHANGED
@@ -12,7 +12,7 @@ declare interface BaseProps<T extends keyof typeof ElementsMap> extends InitOpti
12
12
  emitter: Emitter<Events<T>>;
13
13
  }
14
14
 
15
- declare function BeneficiaryForm({ authCode, domain, codeVerifier, emitter, defaultValues, customizations, }: Props): JSX_2.Element;
15
+ declare function BeneficiaryForm(props: Props): JSX_2.Element;
16
16
 
17
17
  declare interface BeneficiaryFormCustomizations {
18
18
  layout?: LayoutSection[];
@@ -76,6 +76,7 @@ declare interface InitOptions {
76
76
  authCode: string;
77
77
  domain: string;
78
78
  codeVerifier: string;
79
+ locale?: Locale;
79
80
  }
80
81
 
81
82
  declare interface LayoutSection {
@@ -84,13 +85,11 @@ declare interface LayoutSection {
84
85
  hidden?: boolean;
85
86
  }
86
87
 
88
+ declare type Locale = "en" | "zh-Hant" | "ar" | "ja" | "th" | "tr" | "zh";
89
+
87
90
  declare type PayoutType = "B2P";
88
91
 
89
- declare interface Props {
90
- authCode: string;
91
- domain: string;
92
- codeVerifier: string;
93
- emitter: Emitter<ElementEventsMap["beneficiaryForm"]>;
92
+ declare interface Props extends BaseProps<"beneficiaryForm"> {
94
93
  defaultValues?: BeneficiaryFormDefaultValues;
95
94
  customizations?: BeneficiaryFormCustomizations;
96
95
  }
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { bY as a } from "./vendor-C7cpyYhi.js";
2
- class u {
1
+ import { c4 as a } from "./vendor-fKhExfo_.js";
2
+ class c {
3
3
  loader;
4
4
  options;
5
5
  mounted = !1;
@@ -10,7 +10,7 @@ class u {
10
10
  }
11
11
  async mount(t) {
12
12
  if (this.mounted) return;
13
- const o = await this.loader(), e = o.default ?? o, m = await import("./vendor-C7cpyYhi.js").then((i) => i.R), s = (await import("./vendor-C7cpyYhi.js").then((i) => i.c)).createRoot(t);
13
+ const o = await this.loader(), e = o.default ?? o, m = await import("./vendor-fKhExfo_.js").then((i) => i.R), s = (await import("./vendor-fKhExfo_.js").then((i) => i.c)).createRoot(t);
14
14
  s.render(
15
15
  m.createElement(e, {
16
16
  ...this.options,
@@ -31,8 +31,8 @@ class u {
31
31
  return this.mounted;
32
32
  }
33
33
  }
34
- const c = {
35
- beneficiaryForm: () => import("./component-beneficiary-form-BFa6ZStw.js")
34
+ const u = {
35
+ beneficiaryForm: () => import("./component-beneficiary-form-DIpi8Ma-.js")
36
36
  };
37
37
  class h {
38
38
  options;
@@ -43,10 +43,10 @@ class h {
43
43
  createElement(t, o) {
44
44
  if (!this.options)
45
45
  throw new Error("[payout-sdk] options are not initialized");
46
- const e = c[t];
46
+ const e = u[t];
47
47
  if (!e)
48
48
  throw new Error(`[payout-sdk] component ${t} not found`);
49
- return this.components[t] ? this.components[t] : (this.components[t] = new u(e, {
49
+ return this.components[t] ? this.components[t] : (this.components[t] = new c(e, {
50
50
  ...this.options,
51
51
  ...o
52
52
  }), this.components[t]);