Skip to content

Commit 885a034

Browse files
authored
chore: cut release (#1264)
2 parents 9c27558 + 61ea1b3 commit 885a034

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1082
-591
lines changed

content/modals/GB/short_term_xo.json

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"amount": "{transaction_amount}",
99
"useV5Design": "true",
1010
"apr": "{apr}",
11+
"preapproved": "false",
1112
"variables": {
1213
"transaction_amount": "${eval(transaction_amount ? transaction_amount : '-')}",
1314
"qualifying_offer": "${eval(CREDIT_OFFERS_DS.qualifying_offer ? CREDIT_OFFERS_DS.qualifying_offer : 'false')}",
@@ -46,9 +47,25 @@
4647
"preapproval": {
4748
"preapprovalHeadline": "Pay in 3 interest-free payments",
4849
"preapprovalLabel": "Pre-approved",
49-
"preapprovalSubHeadline": "Pay {formattedTotalCost} in {total_payments} interest-free payments.",
50-
"preapprovalDisclaimerHeadline": "What to know about pre-approval",
51-
"preapprovalDisclaimerBody": "Pre-approval may not be valid if you make another Pay in 3 purchase before the session expires."
50+
"preapprovalSubHeadline": "Split your purchase of {formattedTotalCost} into {total_payments} with no sign-up fees or late fees.",
51+
"preapprovalDisclaimerHeadline": "What does pre-approval mean?",
52+
"preapprovalDisclaimerBody": [
53+
"Pre-approval applies to this purchase only. It is based on a recent assessment of PayPal internal data that includes your account status, payment history and other factors. We use this data to assess if this loan is affordable to you.",
54+
"If this data changes in the period between showing pre-approval and the completion of your purchase and after completion of final identity and fraud checks, there is a small risk that this may result in a decline.",
55+
"You should consider if the purchase is affordable and how you will make repayments.",
56+
"Missing payments may make other borrowing more difficult or expensive for you."
57+
],
58+
"preapprovalPrivacyDisclaimer": [
59+
"To stop seeing the Pay in 3 ",
60+
"'Pre-approved'",
61+
" badge in PayPal checkout, go to Data & Privacy in your settings and ",
62+
[
63+
"turn off permission",
64+
"https://www.paypal.com/myaccount/privacy/settings/personalization/paypal",
65+
"turn off permission, opens new tab"
66+
],
67+
" for interest-based marketing."
68+
]
5269
},
5370
"cta": {
5471
"buttonTextEligible": "Continue",

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@
5050
"@paypal/common-components": "^1.0.33",
5151
"@paypal/sdk-client": "^4.0.166",
5252
"@paypal/sdk-constants": "^1.0.118",
53-
"@paypal/sdk-logos": "^2.0.0",
54-
"core-js-pure": "3.31.1"
53+
"@paypal/sdk-logos": "^2.0.0"
5554
},
5655
"devDependencies": {
5756
"@axe-core/playwright": "^4.10.1",

src/components/message/Message.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import objectEntries from 'core-js-pure/stable/object/entries';
21
import { uniqueID } from '@krakenjs/belter/src';
32

43
import {
@@ -159,7 +158,7 @@ const Message = function ({ markup, meta, parentStyles, warnings }) {
159158
// Generate new MRID on message update.
160159
const newMessageRequestId = uniqueID();
161160

162-
const query = objectEntries({
161+
const query = Object.entries({
163162
message_request_id: newMessageRequestId,
164163
amount,
165164
currency,

src/components/modal/v2/lib/hooks/content.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
1-
import arrayFind from 'core-js-pure/stable/array/find';
21
import { useServerData } from '../providers';
32

3+
/**
4+
* Retrieves product data from server views by product identifier.
5+
* Returns a fallback object with empty content if views is not an array or product is not found.
6+
*
7+
* @param {string} product - The product identifier to find
8+
* @returns {Object} Product object containing meta and content
9+
*/
410
export function useProduct(product) {
11+
const fallback = { content: {} };
512
const { views } = useServerData();
613

7-
return arrayFind(views, ({ meta }) => meta.product === product) ?? { content: {} };
14+
if (!Array.isArray(views)) {
15+
return fallback;
16+
}
17+
const view = views.find(({ meta }) => meta.product === product);
18+
19+
return view ?? fallback;
820
}
921

1022
export function useContent(product) {

src/components/modal/v2/lib/utils.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import objectEntries from 'core-js-pure/stable/object/entries';
2-
import arrayFrom from 'core-js-pure/stable/array/from';
31
import { isIosWebview, isAndroidWebview } from '@krakenjs/belter/src';
42
import { request, memoize, ppDebug } from '../../../../utils';
53
import validate from '../../../../library/zoid/message/validation';
@@ -28,7 +26,7 @@ export const getContent = memoize(
2826
buttonSessionId,
2927
integrationIdentifier
3028
}) => {
31-
const query = objectEntries({
29+
const query = Object.entries({
3230
currency,
3331
amount,
3432
payer_id: payerId,
@@ -87,7 +85,7 @@ export function setupTabTrap() {
8785
function trapTabKey(e) {
8886
// Check for TAB key press
8987
if (e.keyCode === 9 && !document.querySelector('.modal-closed')) {
90-
const tabArray = arrayFrom(document.querySelectorAll(focusableElementsString)).filter(
88+
const tabArray = Array.from(document.querySelectorAll(focusableElementsString)).filter(
9189
node => window.getComputedStyle(node).visibility === 'visible'
9290
);
9391
// SHIFT + TAB

src/components/modal/v2/parts/LoadingShimmer.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/* eslint-disable eslint-comments/disable-enable-pair */
22
/** @jsx h */
33
import { Fragment, h } from 'preact';
4-
import arrayFrom from 'core-js-pure/stable/array/from';
54

65
const LoadingShimmer = ({ numOffers = 3, offerCountry, useNewCheckoutDesign }) => {
76
/**
@@ -11,7 +10,7 @@ const LoadingShimmer = ({ numOffers = 3, offerCountry, useNewCheckoutDesign }) =
1110

1211
return (
1312
<Fragment>
14-
{arrayFrom({ length: numOffers }).map((_, index) => {
13+
{Array.from({ length: numOffers }).map((_, index) => {
1514
if (offerCountry === 'DE') {
1615
return (
1716
<div id={index} className="accordion__container shimmer">

src/components/modal/v2/parts/PreapprovalDisclaimer.jsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
/** @jsx h */
22
import { h } from 'preact';
33
import { currencyFormat, formatDateByCountry } from '../lib';
4+
import InlineLinks from './InlineLinks';
45

56
const PreapprovalDisclaimer = ({
67
preapprovalDisclaimerHeadline,
78
preapprovalDisclaimerBody,
9+
preapprovalPrivacyDisclaimer,
810
country,
911
useNewCheckoutDesign
1012
}) => {
@@ -35,6 +37,11 @@ const PreapprovalDisclaimer = ({
3537
/>
3638
</div>
3739
)}
40+
{preapprovalPrivacyDisclaimer && (
41+
<div className="preapproval-disclaimer__privacy">
42+
<InlineLinks text={preapprovalPrivacyDisclaimer} />
43+
</div>
44+
)}
3845
</div>
3946
);
4047
};
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
@import '../../../styles/globals/colors';
2-
@import '../../../styles/globals/mixins';
3-
@import '../../../styles/globals/variables';
1+
@use '../../../styles/globals/colors';
2+
@use '../../../styles/globals/mixins';
3+
@use '../../../styles/globals/variables';
44

55
.spinner {
66
display: block;
77
position: absolute;
88
left: 50%;
99
top: 50%;
1010
border-radius: 50%;
11-
border-top: 4px solid $spinner-green;
11+
border-top: 4px solid colors.$spinner-green;
1212
width: 80px;
1313
height: 80px;
1414
opacity: 0;
@@ -24,30 +24,30 @@
2424
padding: 0px;
2525
font-size: 14px;
2626
margin: 0px;
27-
@include tablet {
27+
@include mixins.tablet {
2828
margin: 0px 44px 0px 44px;
2929
}
3030

31-
@include desktop {
31+
@include mixins.desktop {
3232
margin-left: 30px;
3333
}
3434

35-
@include mobile {
35+
@include mixins.mobile {
3636
margin-top: 20px;
3737
margin-left: 0px;
3838
}
3939
}
4040

4141
.button__fixed-wrapper {
42-
@include fixedWrapper;
42+
@include mixins.fixedWrapper;
4343
bottom: 0;
4444
z-index: 1;
4545

46-
@include tablet {
47-
border-radius: 0 0 $content-wrapper-border-radius $content-wrapper-border-radius;
46+
@include mixins.tablet {
47+
border-radius: 0 0 variables.$content-wrapper-border-radius variables.$content-wrapper-border-radius;
4848
overflow: hidden;
4949

50-
@include lander {
50+
@include mixins.lander {
5151
border-radius: 0;
5252
}
5353
}
@@ -58,29 +58,29 @@
5858
flex-direction: column;
5959
align-items: center;
6060

61-
@include tablet {
61+
@include mixins.tablet {
6262
margin-bottom: 0;
63-
max-width: $content-wrapper-max-width-tablet;
63+
max-width: variables.$content-wrapper-max-width-tablet;
6464
padding: 15px 0;
6565
.button {
6666
width: calc(80%);
6767
}
6868
}
6969

70-
@include mobile {
70+
@include mixins.mobile {
7171
margin-bottom: 0;
72-
max-width: $content-wrapper-max-width-tablet;
72+
max-width: variables.$content-wrapper-max-width-tablet;
7373
padding: 15px 0;
7474
.button {
7575
width: calc(80%);
7676
}
7777
}
7878

79-
@include apiIframe {
80-
max-width: $content-wrapper-max-width-api-iframe;
79+
@include mixins.apiIframe {
80+
max-width: variables.$content-wrapper-max-width-api-iframe;
8181
}
8282
}
8383

8484
.checkout {
85-
background: $white;
85+
background: colors.$white;
8686
}

0 commit comments

Comments
 (0)