@newskit-render/core 4.7.4-alpha.2 → 4.8.0-alpha.0

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.
@@ -0,0 +1,83 @@
1
+ import { IconCreditCard, IconDirectDebit } from '@newskit-render/my-account'
2
+ const itemFilterDataPath = 'paymentFailure.active'
3
+ const lablIconOverrides = {
4
+ size: 'iconSize030',
5
+ stylePreset: 'inkContrast',
6
+ marginInlineEnd: 'space040',
7
+ }
8
+
9
+ const iconOverrides = {
10
+ xs: true,
11
+ sm: true,
12
+ md: true,
13
+ lg: true,
14
+ xl: true,
15
+ }
16
+
17
+ export const paymentMethodContext = {
18
+ items: [
19
+ {
20
+ label: 'Debit/Credit Card',
21
+ href: '[baseURL]/payment',
22
+ default: 'Debit/Credit Card',
23
+ labelIcon: {
24
+ Icon: IconCreditCard,
25
+ overrides: lablIconOverrides,
26
+ },
27
+ icon: 'internal',
28
+ iconOverrides,
29
+ filter: {
30
+ dataPath: itemFilterDataPath,
31
+ showOnTrue: true,
32
+ },
33
+ },
34
+ {
35
+ label: 'Direct Debit',
36
+ href: '[baseURL]/payment-direct-debit',
37
+ default: 'Direct Debit',
38
+ labelIcon: {
39
+ Icon: IconDirectDebit,
40
+ overrides: lablIconOverrides,
41
+ },
42
+ icon: 'internal',
43
+ iconOverrides,
44
+ filter: {
45
+ dataPath: itemFilterDataPath,
46
+ showOnTrue: false,
47
+ },
48
+ },
49
+ // {
50
+ // label: 'PayPal',
51
+ // href: '[baseURL]/payment-paypal',
52
+ // default: 'PayPal',
53
+ // labelIcon: {
54
+ // Icon: IconPaypal,
55
+ // overrides: lablIconOverrides,
56
+ // },
57
+ // icon: 'internal',
58
+ // iconOverrides,
59
+ // },
60
+ // {
61
+ // label: 'ApplePay',
62
+ // href: '[baseURL]/payment-applepay',
63
+ // default: 'ApplePay',
64
+ // labelIcon: {
65
+ // Icon: IconApplePay,
66
+ // overrides: lablIconOverrides,
67
+ // },
68
+ // icon: 'internal',
69
+ // iconOverrides,
70
+ // },
71
+ // {
72
+ // label: 'Google Pay',
73
+ // href: '[baseURL]/payment-google-pay',
74
+ // default: 'Google Pay',
75
+ // labelIcon: {
76
+ // Icon: IconGooglePay,
77
+ // overrides: lablIconOverrides,
78
+ // },
79
+ // icon: 'internal',
80
+ // iconOverrides,
81
+ // },
82
+ ],
83
+ }
@@ -1,5 +1,6 @@
1
1
  describe('My account Payment methods page', () => {
2
2
  beforeEach(() => {
3
+ cy.GetTnlAcsSession()
3
4
  cy.mockConsentAndVisit('/account/payment-methods')
4
5
  })
5
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newskit-render/core",
3
- "version": "4.7.4-alpha.2",
3
+ "version": "4.8.0-alpha.0",
4
4
  "description": "Newskit Render - Core package",
5
5
  "author": "",
6
6
  "license": "UNLICENSED",
@@ -41,12 +41,12 @@
41
41
  "@emotion/styled": "11.9.3",
42
42
  "@newskit-render/api": "^1.6.8",
43
43
  "@newskit-render/auth": "^1.4.0",
44
- "@newskit-render/checkout": "^3.3.3",
44
+ "@newskit-render/checkout": "^3.3.4-alpha.0",
45
45
  "@newskit-render/feature-flags": "^1.4.11",
46
46
  "@newskit-render/feed": "^1.5.0",
47
- "@newskit-render/my-account": "^6.9.2-alpha.2",
48
- "@newskit-render/shared-components": "^3.12.1",
49
- "@newskit-render/standalone-components": "^3.10.1",
47
+ "@newskit-render/my-account": "^6.10.0-alpha.0",
48
+ "@newskit-render/shared-components": "^3.13.0-alpha.0",
49
+ "@newskit-render/standalone-components": "^3.10.2-alpha.0",
50
50
  "@newskit-render/validation": "^1.8.1",
51
51
  "@next/font": "13.1.6",
52
52
  "cross-fetch": "3.1.5",
@@ -3,8 +3,11 @@ import { getProviderProps, PaymentMethods } from '@newskit-render/my-account'
3
3
  import newrelic from 'newrelic'
4
4
  import { initAndGetFeatureFlag } from '@newskit-render/feature-flags' // create-render-app effected
5
5
  import { optimizelysdkKey } from '../../../config' // create-render-app effected
6
+ import { paymentMethodContext } from '../../../context/app-context/paymentMethodContext'
6
7
 
7
- const AccountPaymentMethods = (props) => <PaymentMethods {...props} />
8
+ const AccountPaymentMethods = (props) => (
9
+ <PaymentMethods {...props} context={paymentMethodContext} />
10
+ )
8
11
 
9
12
  export default AccountPaymentMethods
10
13