@akinon/pz-saved-card 2.0.0-beta.1 → 2.0.0-beta.11
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# @akinon/pz-saved-card
|
|
2
2
|
|
|
3
|
+
## 2.0.0-beta.11
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- ac783d6: ZERO-3482: Update tailwindcss to version 4.1.11 and enhance button cursor styles
|
|
8
|
+
|
|
9
|
+
## 2.0.0-beta.10
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 2806320: ZERO-3390: Update version tailwindcss, autoprefixer, tailwind-merge, postcss
|
|
14
|
+
|
|
15
|
+
## 2.0.0-beta.9
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- 0fe7711: ZERO-3387: Upgrade nextjs, eslint-config-next
|
|
20
|
+
|
|
21
|
+
## 2.0.0-beta.8
|
|
22
|
+
|
|
23
|
+
## 2.0.0-beta.7
|
|
24
|
+
|
|
25
|
+
## 2.0.0-beta.6
|
|
26
|
+
|
|
27
|
+
### Minor Changes
|
|
28
|
+
|
|
29
|
+
- 8f05f9b: ZERO-3250: Beta branch synchronized with Main branch
|
|
30
|
+
|
|
31
|
+
## 2.0.0-beta.5
|
|
32
|
+
|
|
33
|
+
## 2.0.0-beta.4
|
|
34
|
+
|
|
35
|
+
## 2.0.0-beta.3
|
|
36
|
+
|
|
37
|
+
## 2.0.0-beta.2
|
|
38
|
+
|
|
39
|
+
### Minor Changes
|
|
40
|
+
|
|
41
|
+
- a006015: ZERO-3116: Add not-found page and update default middleware.
|
|
42
|
+
- 1eeb3d8: ZERO-3116: Add not found page
|
|
43
|
+
|
|
3
44
|
## 2.0.0-beta.1
|
|
4
45
|
|
|
5
46
|
### Minor Changes
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -2,19 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Installation
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
### 1. Install the npm package using Yarn
|
|
8
|
-
|
|
9
|
-
For the latest version, you can install the package using Yarn:
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
yarn add @akinon/pz-saved-card
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### 2. Preferred installation method
|
|
16
|
-
|
|
17
|
-
You can also use the following command to install the extension with the latest plugins:
|
|
5
|
+
You can use the following command to install the extension with the latest plugins:
|
|
18
6
|
|
|
19
7
|
```bash
|
|
20
8
|
npx @akinon/projectzero@latest --plugins
|
|
@@ -28,17 +16,17 @@ npx @akinon/projectzero@latest --plugins
|
|
|
28
16
|
import PluginModule, { Component } from '@akinon/next/components/plugin-module';
|
|
29
17
|
|
|
30
18
|
const SavedCard = () => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
19
|
+
return (
|
|
20
|
+
<PluginModule
|
|
21
|
+
component={Component.SavedCard}
|
|
22
|
+
props={{
|
|
23
|
+
texts: {
|
|
24
|
+
title: 'Pay with Saved Card',
|
|
25
|
+
button: 'Pay Now'
|
|
26
|
+
}
|
|
27
|
+
}}
|
|
28
|
+
/>
|
|
29
|
+
);
|
|
42
30
|
};
|
|
43
31
|
|
|
44
32
|
export default SavedCard;
|
|
@@ -17,6 +17,7 @@ export const AgreementAndSubmit = ({
|
|
|
17
17
|
<Button
|
|
18
18
|
type="submit"
|
|
19
19
|
className="group uppercase mt-4 inline-flex items-center justify-center"
|
|
20
|
+
data-testid="saved-card-submit-button"
|
|
20
21
|
>
|
|
21
22
|
<span>{buttonText}</span>
|
|
22
23
|
<Icon name="chevron-end" size={12} className="ml-2 h-3" />
|
|
@@ -16,7 +16,7 @@ export const CardSelectionSection = ({
|
|
|
16
16
|
<div className="border-solid border-gray-400 px-4 py-2">
|
|
17
17
|
<span className="text-black-800 text-lg font-medium">{title}</span>
|
|
18
18
|
<ul className="mt-4 text-xs w-full">
|
|
19
|
-
{cards?.map((card) => (
|
|
19
|
+
{cards?.map((card, index) => (
|
|
20
20
|
<li
|
|
21
21
|
key={card.token}
|
|
22
22
|
className="p-4 mb-2 border-2 border-gray-200 flex justify-between items-center cursor-pointer"
|
|
@@ -24,6 +24,7 @@ export const CardSelectionSection = ({
|
|
|
24
24
|
e.preventDefault();
|
|
25
25
|
onSelect(card);
|
|
26
26
|
}}
|
|
27
|
+
data-testid={`saved-card-item-${index}`}
|
|
27
28
|
>
|
|
28
29
|
<input
|
|
29
30
|
name="card"
|
|
@@ -68,7 +68,7 @@ const SavedCardInstallments = ({
|
|
|
68
68
|
</tr>
|
|
69
69
|
</thead>
|
|
70
70
|
<tbody>
|
|
71
|
-
{installmentOptions.map((option) => (
|
|
71
|
+
{installmentOptions.map((option, index) => (
|
|
72
72
|
<tr
|
|
73
73
|
key={`installment-${option.pk}`}
|
|
74
74
|
className="border-t border-solid border-gray-400"
|
|
@@ -84,6 +84,7 @@ const SavedCardInstallments = ({
|
|
|
84
84
|
});
|
|
85
85
|
setInstallmentOption(option.pk);
|
|
86
86
|
}}
|
|
87
|
+
data-testid={`saved-card-installment-${index}`}
|
|
87
88
|
>
|
|
88
89
|
<span className="w-full flex items-center justify-start pl-2">
|
|
89
90
|
<span className="text-xs text-black-800 transition-all">
|
|
@@ -95,7 +95,7 @@ const SavedCardOption = ({
|
|
|
95
95
|
customRender,
|
|
96
96
|
formWrapperClassName = 'flex flex-wrap w-full',
|
|
97
97
|
cardSelectionWrapperClassName = 'w-full flex flex-col xl:w-6/10',
|
|
98
|
-
installmentWrapperClassName = 'w-full xl:w-4/10 xl:border-l xl:border-t-0',
|
|
98
|
+
installmentWrapperClassName = 'w-full xl:w-4/10 xl:border-l xl:border-t-0 xl:border-gray-200',
|
|
99
99
|
formProps = {},
|
|
100
100
|
cardSelectionWrapperProps = {},
|
|
101
101
|
installmentWrapperProps = {}
|