@ramp-network/ramp-instant-sdk
Advanced tools
Comparing version 4.0.3-rc3 to 4.0.3-rc4
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SEND_CRYPTO_SUPPORTED_VERSION = exports.baseWidgetUrl = void 0; | ||
exports.SDK_VERSION = exports.SEND_CRYPTO_SUPPORTED_VERSION = exports.baseWidgetUrl = void 0; | ||
exports.baseWidgetUrl = 'https://buy.ramp.network/'; | ||
exports.SEND_CRYPTO_SUPPORTED_VERSION = 1; | ||
// It will be evaluated by rollup-plugin-version-injector | ||
exports.SDK_VERSION = '[VI]{version}[/VI]'; | ||
//# sourceMappingURL=consts.js.map |
@@ -385,7 +385,7 @@ "use strict"; | ||
RampInstantSDK.prototype._isConfiguredAsEmbedded = function () { | ||
return ['embedded-desktop', 'embedded-mobile', 'webview-mobile'].includes(this._rawNormalizedConfig.variant); | ||
return ['embedded-desktop', 'embedded-mobile'].includes(this._rawNormalizedConfig.variant); | ||
}; | ||
RampInstantSDK.prototype._getHostConfigSdkParams = function (config, useSendCryptoCallback) { | ||
var widgetVariant = (0, utils_1.determineWidgetVariant)(config); | ||
return __assign({ variant: widgetVariant, widgetInstanceId: (0, utils_1.getRandomIntString)() }, (useSendCryptoCallback | ||
return __assign({ sdkType: 'WEB', sdkVersion: consts_1.SDK_VERSION, variant: widgetVariant, widgetInstanceId: (0, utils_1.getRandomIntString)() }, (useSendCryptoCallback | ||
? { useSendCryptoCallbackVersion: consts_1.SEND_CRYPTO_SUPPORTED_VERSION } | ||
@@ -392,0 +392,0 @@ : {})); |
@@ -52,3 +52,2 @@ "use strict"; | ||
'embedded-mobile', | ||
'webview-mobile', | ||
].includes(config.variant)) { | ||
@@ -63,8 +62,6 @@ configCopy.variant = 'desktop'; | ||
} | ||
if (config.variant === 'embedded-desktop' || | ||
config.variant === 'embedded-mobile' || | ||
config.variant === 'webview-mobile') { | ||
if (config.variant === 'embedded-desktop' || config.variant === 'embedded-mobile') { | ||
validateContainerNode(config.containerNode, config.variant); | ||
} | ||
if (!['embedded-desktop', 'embedded-mobile', 'webview-mobile'].includes(configCopy.variant)) { | ||
if (!['embedded-desktop', 'embedded-mobile'].includes(configCopy.variant)) { | ||
delete configCopy.containerNode; | ||
@@ -113,4 +110,3 @@ } | ||
variant === 'embedded-desktop' || | ||
variant === 'embedded-mobile' || | ||
variant === 'webview-mobile') { | ||
variant === 'embedded-mobile') { | ||
return variant; | ||
@@ -148,3 +144,3 @@ } | ||
} | ||
else if (variant === 'embedded-mobile' || variant === 'webview-mobile') { | ||
else if (variant === 'embedded-mobile') { | ||
if (width + 1 < exports.minWidgetMobileWidth) { | ||
@@ -151,0 +147,0 @@ throw new Error("Container node must be at least ".concat(exports.minWidgetMobileWidth, "px wide.")); |
@@ -0,1 +1,2 @@ | ||
/* Version: 4.0.3-rc4 - May 16, 2023 18:04:23 */ | ||
/*! ***************************************************************************** | ||
@@ -277,2 +278,4 @@ Copyright (c) Microsoft Corporation. | ||
var SEND_CRYPTO_SUPPORTED_VERSION = 1; | ||
// It will be evaluated by rollup-plugin-version-injector | ||
var SDK_VERSION = '4.0.3-rc4'; | ||
@@ -357,3 +360,2 @@ var PaymentMethodName; | ||
'embedded-mobile', | ||
'webview-mobile', | ||
].includes(config.variant)) { | ||
@@ -368,8 +370,6 @@ configCopy.variant = 'desktop'; | ||
} | ||
if (config.variant === 'embedded-desktop' || | ||
config.variant === 'embedded-mobile' || | ||
config.variant === 'webview-mobile') { | ||
if (config.variant === 'embedded-desktop' || config.variant === 'embedded-mobile') { | ||
validateContainerNode(config.containerNode, config.variant); | ||
} | ||
if (!['embedded-desktop', 'embedded-mobile', 'webview-mobile'].includes(configCopy.variant)) { | ||
if (!['embedded-desktop', 'embedded-mobile'].includes(configCopy.variant)) { | ||
delete configCopy.containerNode; | ||
@@ -416,4 +416,3 @@ } | ||
variant === 'embedded-desktop' || | ||
variant === 'embedded-mobile' || | ||
variant === 'webview-mobile') { | ||
variant === 'embedded-mobile') { | ||
return variant; | ||
@@ -449,3 +448,3 @@ } | ||
} | ||
else if (variant === 'embedded-mobile' || variant === 'webview-mobile') { | ||
else if (variant === 'embedded-mobile') { | ||
if (width + 1 < minWidgetMobileWidth) { | ||
@@ -967,7 +966,7 @@ throw new Error("Container node must be at least ".concat(minWidgetMobileWidth, "px wide.")); | ||
RampInstantSDK.prototype._isConfiguredAsEmbedded = function () { | ||
return ['embedded-desktop', 'embedded-mobile', 'webview-mobile'].includes(this._rawNormalizedConfig.variant); | ||
return ['embedded-desktop', 'embedded-mobile'].includes(this._rawNormalizedConfig.variant); | ||
}; | ||
RampInstantSDK.prototype._getHostConfigSdkParams = function (config, useSendCryptoCallback) { | ||
var widgetVariant = determineWidgetVariant(config); | ||
return __assign({ variant: widgetVariant, widgetInstanceId: getRandomIntString() }, (useSendCryptoCallback | ||
return __assign({ sdkType: 'WEB', sdkVersion: SDK_VERSION, variant: widgetVariant, widgetInstanceId: getRandomIntString() }, (useSendCryptoCallback | ||
? { useSendCryptoCallbackVersion: SEND_CRYPTO_SUPPORTED_VERSION } | ||
@@ -974,0 +973,0 @@ : {})); |
@@ -0,1 +1,2 @@ | ||
/* Version: 4.0.3-rc4 - May 16, 2023 18:04:23 */ | ||
(function (global, factory) { | ||
@@ -283,2 +284,4 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
var SEND_CRYPTO_SUPPORTED_VERSION = 1; | ||
// It will be evaluated by rollup-plugin-version-injector | ||
var SDK_VERSION = '4.0.3-rc4'; | ||
@@ -363,3 +366,2 @@ var PaymentMethodName; | ||
'embedded-mobile', | ||
'webview-mobile', | ||
].includes(config.variant)) { | ||
@@ -374,8 +376,6 @@ configCopy.variant = 'desktop'; | ||
} | ||
if (config.variant === 'embedded-desktop' || | ||
config.variant === 'embedded-mobile' || | ||
config.variant === 'webview-mobile') { | ||
if (config.variant === 'embedded-desktop' || config.variant === 'embedded-mobile') { | ||
validateContainerNode(config.containerNode, config.variant); | ||
} | ||
if (!['embedded-desktop', 'embedded-mobile', 'webview-mobile'].includes(configCopy.variant)) { | ||
if (!['embedded-desktop', 'embedded-mobile'].includes(configCopy.variant)) { | ||
delete configCopy.containerNode; | ||
@@ -422,4 +422,3 @@ } | ||
variant === 'embedded-desktop' || | ||
variant === 'embedded-mobile' || | ||
variant === 'webview-mobile') { | ||
variant === 'embedded-mobile') { | ||
return variant; | ||
@@ -455,3 +454,3 @@ } | ||
} | ||
else if (variant === 'embedded-mobile' || variant === 'webview-mobile') { | ||
else if (variant === 'embedded-mobile') { | ||
if (width + 1 < minWidgetMobileWidth) { | ||
@@ -973,7 +972,7 @@ throw new Error("Container node must be at least ".concat(minWidgetMobileWidth, "px wide.")); | ||
RampInstantSDK.prototype._isConfiguredAsEmbedded = function () { | ||
return ['embedded-desktop', 'embedded-mobile', 'webview-mobile'].includes(this._rawNormalizedConfig.variant); | ||
return ['embedded-desktop', 'embedded-mobile'].includes(this._rawNormalizedConfig.variant); | ||
}; | ||
RampInstantSDK.prototype._getHostConfigSdkParams = function (config, useSendCryptoCallback) { | ||
var widgetVariant = determineWidgetVariant(config); | ||
return __assign({ variant: widgetVariant, widgetInstanceId: getRandomIntString() }, (useSendCryptoCallback | ||
return __assign({ sdkType: 'WEB', sdkVersion: SDK_VERSION, variant: widgetVariant, widgetInstanceId: getRandomIntString() }, (useSendCryptoCallback | ||
? { useSendCryptoCallbackVersion: SEND_CRYPTO_SUPPORTED_VERSION } | ||
@@ -980,0 +979,0 @@ : {})); |
export declare const baseWidgetUrl = "https://buy.ramp.network/"; | ||
export declare const SEND_CRYPTO_SUPPORTED_VERSION: 1; | ||
export declare const SDK_VERSION = "[VI]{version}[/VI]"; |
@@ -69,2 +69,4 @@ import { SEND_CRYPTO_SUPPORTED_VERSION } from './consts'; | ||
export interface IHostConfigWithSdkParams extends Omit<IHostConfig, 'useSendCryptoCallback'> { | ||
sdkType: 'WEB'; | ||
sdkVersion: string; | ||
widgetInstanceId: string; | ||
@@ -71,0 +73,0 @@ variant: AllWidgetVariants; |
{ | ||
"name": "@ramp-network/ramp-instant-sdk", | ||
"version": "4.0.3-rc3", | ||
"version": "4.0.3-rc4", | ||
"description": "SDK for Ramp Instant", | ||
@@ -69,2 +69,3 @@ "keywords": [], | ||
"rollup-plugin-commonjs": "^10.1.0", | ||
"rollup-plugin-version-injector": "^1.3.3", | ||
"rollup-plugin-json": "^4.0.0", | ||
@@ -71,0 +72,0 @@ "rollup-plugin-node-resolve": "^5.2.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
350377
25
3114