@txgw/payout-components 1.2.1 → 1.3.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
@@ -109,6 +109,7 @@ export declare interface InitOptions {
109
109
  domain: string;
110
110
  codeVerifier: string;
111
111
  locale?: Locale;
112
+ isMobile?: boolean;
112
113
  }
113
114
 
114
115
  export declare interface LayoutSection {
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{o as t}from"./rolldown-runtime-DXzHzmmG.js";import{c as n,d as e,f as o,l as i,n as s,r,s as a,u}from"./request-CLLl5Hjd.js";var m=class{loader;options;mounted=!1;root;emitter;mi18n;constructor(t,n,e){var o;this.loader=t,this.options=n,this.emitter={all:o=o||/* @__PURE__ */new Map,on:function(t,n){var e=o.get(t);e?e.push(n):o.set(t,[n])},off:function(t,n){var e=o.get(t);e&&(n?e.splice(e.indexOf(n)>>>0,1):o.set(t,[]))},emit:function(t,n){var e=o.get(t);e&&e.slice().map(function(t){t(n)}),(e=o.get("*"))&&e.slice().map(function(e){e(t,n)})}},this.mi18n=e,this.root=null}async mount(n){if(this.mounted)return;const e=await this.loader(),o=e.default??e,i=await import("./react-CWkhIp2c.js").then(n=>/* @__PURE__ */t(n.t(),1)),s=(await import("./client-CGP9wC59.js").then(n=>/* @__PURE__ */t(n.default,1))).createRoot(n);s.render(i.createElement(o,{...this.options,emitter:this.emitter,mi18n:this.mi18n})),this.root=s,this.mounted=!0}unmount(){this.root&&(this.root.unmount(),this.root=null),this.mounted=!1}on(t,n){return this.emitter.on(t,n)}off(t,n){return this.emitter.off(t,n)}isMounted(){return this.mounted}},c={beneficiaryForm:()=>import("./beneficiary-form-BRRcLnIQ.js")},l=class{options;mi18n;components={};constructor(t){var s;this.options=t,this.mi18n=(s=this.options?.locale||"en",e().use(n()).use(i()).use(u()).use(a({env:"release",pathTemplate:`/i18n/project-export/{env}/{projectId}/{language}.json?t=${Date.now()}`})).init({language:o()||s,defaultLanguage:s,fallbackLanguage:"en",availableLanguages:["en"],apiUrl:"https://admin.midasbuy.com/i18n/api",apiKey:"********************",projectId:358}))}createElement(t,n){if(!this.options)throw new Error("[payout-sdk] options are not initialized");const e=c[t];if(!e)throw new Error(`[payout-sdk] component ${t} not found`);return this.components[t]||(this.components[t]=new m(e,{...this.options,...n},this.mi18n)),this.components[t]}getAccessToken(){return s(this.options)}},p=null;function h(t){p=new l(t)}function f(t,n){if(!p)throw new Error("[payout-sdk] SDK is not initialized");return p.createElement(t,n)}function d(){if(!p)throw new Error("[payout-sdk] SDK is not initialized");return p.getAccessToken()}function g(t){return r(t)}export{f as createElement,d as getAccessToken,h as init,g as onTokenChange};
1
+ import{o as t}from"./rolldown-runtime-DXzHzmmG.js";import{c as n,d as e,f as o,l as i,n as s,r,s as a,u}from"./request-CLLl5Hjd.js";var m=class{loader;options;mounted=!1;root;emitter;mi18n;constructor(t,n,e){var o;this.loader=t,this.options=n,this.emitter={all:o=o||/* @__PURE__ */new Map,on:function(t,n){var e=o.get(t);e?e.push(n):o.set(t,[n])},off:function(t,n){var e=o.get(t);e&&(n?e.splice(e.indexOf(n)>>>0,1):o.set(t,[]))},emit:function(t,n){var e=o.get(t);e&&e.slice().map(function(t){t(n)}),(e=o.get("*"))&&e.slice().map(function(e){e(t,n)})}},this.mi18n=e,this.root=null}async mount(n){if(this.mounted)return;const e=await this.loader(),o=e.default??e,i=await import("./react-CWkhIp2c.js").then(n=>/* @__PURE__ */t(n.t(),1)),s=(await import("./client-CGP9wC59.js").then(n=>/* @__PURE__ */t(n.default,1))).createRoot(n);s.render(i.createElement(o,{...this.options,emitter:this.emitter,mi18n:this.mi18n})),this.root=s,this.mounted=!0}unmount(){this.root&&(this.root.unmount(),this.root=null),this.mounted=!1}on(t,n){return this.emitter.on(t,n)}off(t,n){return this.emitter.off(t,n)}isMounted(){return this.mounted}},c={beneficiaryForm:()=>import("./beneficiary-form-BB_evGSy.js")},l=class{options;mi18n;components={};constructor(t){var s;this.options=t,this.mi18n=(s=this.options?.locale||"en",e().use(n()).use(i()).use(u()).use(a({env:"release",pathTemplate:`/i18n/project-export/{env}/{projectId}/{language}.json?t=${Date.now()}`})).init({language:o()||s,defaultLanguage:s,fallbackLanguage:"en",availableLanguages:["en"],apiUrl:"https://admin.midasbuy.com/i18n/api",apiKey:"********************",projectId:358}))}createElement(t,n){if(!this.options)throw new Error("[payout-sdk] options are not initialized");const e=c[t];if(!e)throw new Error(`[payout-sdk] component ${t} not found`);return this.components[t]||(this.components[t]=new m(e,{...this.options,...n},this.mi18n)),this.components[t]}getAccessToken(){return s(this.options)}},p=null;function h(t){p=new l(t)}function f(t,n){if(!p)throw new Error("[payout-sdk] SDK is not initialized");return p.createElement(t,n)}function d(){if(!p)throw new Error("[payout-sdk] SDK is not initialized");return p.getAccessToken()}function g(t){return r(t)}export{f as createElement,d as getAccessToken,h as init,g as onTokenChange};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@txgw/payout-components",
3
- "version": "1.2.1",
3
+ "version": "1.3.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -1 +0,0 @@
1
- import{_ as r,g as o}from"./beneficiary-form-BRRcLnIQ.js";export{o as CardItemFieldRenderer,r as CardRenderer};
@@ -1 +0,0 @@
1
- import{h as a,m as r}from"./beneficiary-form-BRRcLnIQ.js";export{a as CheckboxControlRenderer,r as default};
@@ -1 +0,0 @@
1
- import{f as a,p as f}from"./beneficiary-form-BRRcLnIQ.js";export{f as FieldSetRenderer,a as default};
@@ -1 +0,0 @@
1
- import{o as a,s as o}from"./beneficiary-form-BRRcLnIQ.js";export{o as HBoxRenderer,a as default};
@@ -1 +0,0 @@
1
- import{d as a,u as r}from"./beneficiary-form-BRRcLnIQ.js";export{a as ImageControlRenderer,r as default};
@@ -1 +0,0 @@
1
- import{c as a,l as r}from"./beneficiary-form-BRRcLnIQ.js";export{r as RichTextControlRenderer,a as default};
@@ -1 +0,0 @@
1
- import{a,i as s,n as r,r as e,t as f}from"./beneficiary-form-BRRcLnIQ.js";export{r as ListItem,e as ListItemFieldRenderer,s as ListItemRenderer,a as ListRenderer,f as default};