@meshconnect/web-link-sdk 3.1.4 → 3.1.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshconnect/web-link-sdk",
3
- "version": "3.1.4",
3
+ "version": "3.1.6",
4
4
  "description": "A client-side JS library for integrating with Mesh Connect",
5
5
  "exports": "./index.js",
6
6
  "license": "MIT",
package/utils/popup.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { Language } from './types';
1
2
  export declare const iframeId = "mesh-link-popup__iframe";
2
3
  export declare function removePopup(): void;
3
- export declare function addPopup(iframeLink: string, language: string | undefined): void;
4
+ export declare function addPopup(iframeLink: string, language: Language | undefined): void;
package/utils/popup.js CHANGED
@@ -19,9 +19,7 @@ export function addPopup(iframeLink, language) {
19
19
  var style = getLinkStyle(iframeLink);
20
20
  styleElement.textContent = getStylesContent(style);
21
21
  window.document.head.appendChild(styleElement);
22
- if (language) {
23
- iframeLink = "".concat(iframeLink).concat(iframeLink.includes('?') ? '&' : '?', "lng=").concat(language);
24
- }
22
+ iframeLink = "".concat(iframeLink).concat(iframeLink.includes('?') ? '&' : '?', "lng=").concat(language || 'en');
25
23
  var popupRootElement = document.createElement('div');
26
24
  popupRootElement.id = popupId;
27
25
  var popupBackdropElement = document.createElement('div');
package/utils/types.d.ts CHANGED
@@ -26,6 +26,7 @@ export interface Account {
26
26
  }
27
27
  export interface BrandInfo {
28
28
  brokerLogo: string;
29
+ brokerLogoUrl?: string;
29
30
  brokerPrimaryColor?: string;
30
31
  }
31
32
  export interface LinkPayload {
@@ -107,6 +108,7 @@ export interface DisconnectPayload {
107
108
  networkType?: string;
108
109
  walletName?: string;
109
110
  }
111
+ export type Language = 'en' | 'ru';
110
112
  export interface LinkOptions {
111
113
  /**
112
114
  * Client ID that can be obtained at https://dashboard.meshconnect.com/company/keys
@@ -142,9 +144,9 @@ export interface LinkOptions {
142
144
  */
143
145
  transferDestinationTokens?: IntegrationAccessToken[];
144
146
  /**
145
- * Link UI language. Right now only 'en' is supported.
147
+ * Link UI language. Supported: 'en', 'ru'.
146
148
  */
147
- language?: 'en';
149
+ language?: Language;
148
150
  }
149
151
  export interface LinkStyle {
150
152
  ir: number;
@@ -1 +1 @@
1
- export declare const sdkVersion = "3.1.4";
1
+ export declare const sdkVersion = "3.1.6";
package/utils/version.js CHANGED
@@ -1 +1 @@
1
- export var sdkVersion = '3.1.4';
1
+ export var sdkVersion = '3.1.6';