@paypal/checkout-components
Advanced tools
Comparing version 5.0.299 to 5.0.300
{ | ||
"name": "@paypal/checkout-components", | ||
"version": "5.0.299", | ||
"version": "5.0.300", | ||
"description": "PayPal Checkout components, for integrating checkout products.", | ||
@@ -113,4 +113,4 @@ "main": "index.js", | ||
"@krakenjs/zoid": "^10.3.1", | ||
"@paypal/accelerated-checkout-loader": "^1.0.0", | ||
"@paypal/common-components": "^1.0.35", | ||
"@paypal/connect-loader-component": "1.1.1", | ||
"@paypal/funding-components": "^1.0.31", | ||
@@ -117,0 +117,0 @@ "@paypal/sdk-client": "^4.0.181", |
/* @flow */ | ||
import { loadAxo } from "@paypal/connect-loader-component"; | ||
import { loadAxo } from "@paypal/accelerated-checkout-loader/dist/loader.esm"; | ||
import { stringifyError } from "@krakenjs/belter/src"; | ||
@@ -4,0 +4,0 @@ import { |
/* @flow */ | ||
import { getUserIDToken, getSDKToken } from "@paypal/sdk-client/src"; | ||
import { loadAxo } from "@paypal/connect-loader-component"; | ||
// eslint-disable-next-line import/no-namespace | ||
import * as axo from "@paypal/accelerated-checkout-loader/dist/loader.esm"; | ||
import { describe, expect, test, vi } from "vitest"; | ||
@@ -33,8 +34,2 @@ | ||
vi.mock("@paypal/connect-loader-component", () => { | ||
return { | ||
loadAxo: vi.fn(), | ||
}; | ||
}); | ||
describe("getConnectComponent: returns ConnectComponent", () => { | ||
@@ -52,3 +47,3 @@ const mockAxoMetadata = { someData: "data" }; | ||
loadAxo.mockResolvedValue({ metadata: mockAxoMetadata }); | ||
vi.spyOn(axo, "loadAxo").mockResolvedValue({ metadata: mockAxoMetadata }); | ||
}); | ||
@@ -102,3 +97,3 @@ | ||
const errorMessage = "Something went wrong"; | ||
loadAxo.mockRejectedValue(errorMessage); | ||
axo.loadAxo.mockRejectedValue(errorMessage); | ||
@@ -121,3 +116,3 @@ await expect(() => getConnectComponent(mockProps)).rejects.toThrow( | ||
await getConnectComponent(mockProps); | ||
expect(loadAxo).toHaveBeenCalledWith({ | ||
expect(axo.loadAxo).toHaveBeenCalledWith({ | ||
minified: true, | ||
@@ -124,0 +119,0 @@ btSdkVersion: "3.97.3-connect-alpha.6.1", |
@@ -126,3 +126,3 @@ /* @flow */ | ||
layouts: [BUTTON_LAYOUT.VERTICAL], | ||
layouts: [BUTTON_LAYOUT.HORIZONTAL, BUTTON_LAYOUT.VERTICAL], | ||
@@ -129,0 +129,0 @@ maxCards: maxCardForCountry, |
@@ -291,3 +291,6 @@ /* @flow */ | ||
{tagline && layout === BUTTON_LAYOUT.HORIZONTAL && !fundingSource ? ( | ||
{tagline && | ||
layout === BUTTON_LAYOUT.HORIZONTAL && | ||
!fundingSource && | ||
!fundingSources.includes(FUNDING.CARD) ? ( | ||
<TagLine | ||
@@ -314,4 +317,3 @@ fundingSource={fundingSources[0]} | ||
{layout === BUTTON_LAYOUT.VERTICAL && | ||
fundingSources.indexOf(FUNDING.CARD) !== -1 ? ( | ||
{fundingSources.includes(FUNDING.CARD) ? ( | ||
<PoweredByPayPal locale={locale} nonce={nonce} /> | ||
@@ -318,0 +320,0 @@ ) : null} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
1159587
199
14805
+ Added@paypal/accelerated-checkout-loader@1.1.0(transitive)
- Removed@paypal/connect-loader-component@1.1.1(transitive)