@meshconnect/web-link-sdk 3.1.5 → 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.5",
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
@@ -108,6 +108,7 @@ export interface DisconnectPayload {
108
108
  networkType?: string;
109
109
  walletName?: string;
110
110
  }
111
+ export type Language = 'en' | 'ru';
111
112
  export interface LinkOptions {
112
113
  /**
113
114
  * Client ID that can be obtained at https://dashboard.meshconnect.com/company/keys
@@ -143,9 +144,9 @@ export interface LinkOptions {
143
144
  */
144
145
  transferDestinationTokens?: IntegrationAccessToken[];
145
146
  /**
146
- * Link UI language. Right now only 'en' is supported.
147
+ * Link UI language. Supported: 'en', 'ru'.
147
148
  */
148
- language?: 'en';
149
+ language?: Language;
149
150
  }
150
151
  export interface LinkStyle {
151
152
  ir: number;
@@ -1 +1 @@
1
- export declare const sdkVersion = "3.1.5";
1
+ export declare const sdkVersion = "3.1.6";
package/utils/version.js CHANGED
@@ -1 +1 @@
1
- export var sdkVersion = '3.1.5';
1
+ export var sdkVersion = '3.1.6';