@akinon/pz-checkout-gift-pack 2.0.0-beta.1 → 2.0.0-beta.10
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 +35 -0
- package/README.md +6 -3
- package/package.json +1 -1
- package/src/index.tsx +19 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @akinon/pz-checkout-gift-pack
|
|
2
2
|
|
|
3
|
+
## 2.0.0-beta.10
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 2806320: ZERO-3390: Update version tailwindcss, autoprefixer, tailwind-merge, postcss
|
|
8
|
+
|
|
9
|
+
## 2.0.0-beta.9
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 0fe7711: ZERO-3387: Upgrade nextjs, eslint-config-next
|
|
14
|
+
|
|
15
|
+
## 2.0.0-beta.8
|
|
16
|
+
|
|
17
|
+
## 2.0.0-beta.7
|
|
18
|
+
|
|
19
|
+
## 2.0.0-beta.6
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- 8f05f9b: ZERO-3250: Beta branch synchronized with Main branch
|
|
24
|
+
|
|
25
|
+
## 2.0.0-beta.5
|
|
26
|
+
|
|
27
|
+
## 2.0.0-beta.4
|
|
28
|
+
|
|
29
|
+
## 2.0.0-beta.3
|
|
30
|
+
|
|
31
|
+
## 2.0.0-beta.2
|
|
32
|
+
|
|
33
|
+
### Minor Changes
|
|
34
|
+
|
|
35
|
+
- a006015: ZERO-3116: Add not-found page and update default middleware.
|
|
36
|
+
- 1eeb3d8: ZERO-3116: Add not found page
|
|
37
|
+
|
|
3
38
|
## 2.0.0-beta.1
|
|
4
39
|
|
|
5
40
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
# @akinon/pz-checkout-gift-package
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Installation
|
|
4
|
+
|
|
5
|
+
You can use the following command to install the extension with the latest plugins:
|
|
4
6
|
|
|
5
7
|
```bash
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
|
|
9
|
+
npx @akinon/projectzero@latest --plugins
|
|
10
|
+
|
|
8
11
|
```
|
|
9
12
|
|
|
10
13
|
### Props
|
package/package.json
CHANGED
package/src/index.tsx
CHANGED
|
@@ -120,19 +120,23 @@ export const CheckoutGiftPack = ({
|
|
|
120
120
|
>
|
|
121
121
|
<textarea
|
|
122
122
|
className={clsx(
|
|
123
|
-
'w-full border border-solid p-4 placeholder:text-[0.75rem] placeholder:text-[#9c9d9d] outline-
|
|
123
|
+
'w-full border border-solid p-4 placeholder:text-[0.75rem] placeholder:text-[#9c9d9d] outline-hidden text-[0.75rem]',
|
|
124
124
|
noteLength > 160 ? 'border-[#e85150]' : 'border-[#7b9d75]'
|
|
125
125
|
)}
|
|
126
126
|
rows={4}
|
|
127
127
|
placeholder={_translations.placeholderInput}
|
|
128
128
|
{...register('message')}
|
|
129
|
+
data-testid="gift-note-input"
|
|
129
130
|
/>
|
|
130
131
|
{errors.message && (
|
|
131
|
-
<span
|
|
132
|
+
<span
|
|
133
|
+
className="text-sm text-[#d72a04] text-[0.875rem]"
|
|
134
|
+
data-testid="error-message"
|
|
135
|
+
>
|
|
132
136
|
{errors.message.message}
|
|
133
137
|
</span>
|
|
134
138
|
)}
|
|
135
|
-
<div className="text-[0.75rem]">
|
|
139
|
+
<div className="text-[0.75rem]" data-testid="characters-length">
|
|
136
140
|
{noteLength} / 160 {_translations.charactersLength}
|
|
137
141
|
</div>
|
|
138
142
|
<div className="flex justify-end items-end gap-2">
|
|
@@ -141,6 +145,7 @@ export const CheckoutGiftPack = ({
|
|
|
141
145
|
appearance="ghost"
|
|
142
146
|
className="text-[0.75rem] underline cursor-pointer border-0 px-0 py-0 h-auto hover:bg-transparent hover:text-[#e95151]"
|
|
143
147
|
onClick={removeGiftNote}
|
|
148
|
+
data-testid="remove-gift-note-button"
|
|
144
149
|
>
|
|
145
150
|
{_translations.removeGiftNoteText}
|
|
146
151
|
</Button>
|
|
@@ -149,6 +154,7 @@ export const CheckoutGiftPack = ({
|
|
|
149
154
|
type="submit"
|
|
150
155
|
className="w-[7rem] h-[1.75rem] font-[0.75rem] uppercase"
|
|
151
156
|
appearance="outlined"
|
|
157
|
+
data-testid="save-gift-pack-button"
|
|
152
158
|
>
|
|
153
159
|
{_translations.save}
|
|
154
160
|
</Button>
|
|
@@ -175,6 +181,7 @@ export const CheckoutGiftPack = ({
|
|
|
175
181
|
appearance="ghost"
|
|
176
182
|
className="cursor-pointer border-0 px-0 py-0 text-[1rem] font-light h-auto hover:bg-transparent hover:text-[#000000]"
|
|
177
183
|
onClick={() => addGiftPack({ note: DEFAULT_NOTE })}
|
|
184
|
+
data-testid="add-gift-pack-button"
|
|
178
185
|
>
|
|
179
186
|
{_translations.addGiftPackText}
|
|
180
187
|
</Button>
|
|
@@ -193,6 +200,7 @@ export const CheckoutGiftPack = ({
|
|
|
193
200
|
await removeGiftPack().unwrap();
|
|
194
201
|
setIsNoteFormOpen(false);
|
|
195
202
|
}}
|
|
203
|
+
data-testid="remove-gift-pack-button"
|
|
196
204
|
>
|
|
197
205
|
{_translations.removeGiftPackText}
|
|
198
206
|
</Button>
|
|
@@ -206,15 +214,20 @@ export const CheckoutGiftPack = ({
|
|
|
206
214
|
)}
|
|
207
215
|
>
|
|
208
216
|
<div className="flex justify-between items-center">
|
|
209
|
-
<span>
|
|
217
|
+
<span data-testid="information-text">
|
|
218
|
+
{_translations.informationText}
|
|
219
|
+
</span>
|
|
210
220
|
<Icon name="giftbox" size={14} className="fill-[#58585a]" />
|
|
211
221
|
</div>
|
|
212
222
|
<div className="flex justify-between items-center gap-8">
|
|
213
|
-
<span
|
|
223
|
+
<span data-testid="saved-gift-note">
|
|
224
|
+
{giftBox?.note !== DEFAULT_NOTE ? giftBox?.note : ''}
|
|
225
|
+
</span>
|
|
214
226
|
<Button
|
|
215
227
|
appearance="ghost"
|
|
216
|
-
className="underline cursor-pointer
|
|
228
|
+
className="underline cursor-pointer shrink-0 border-0 px-0 py-0 h-auto hover:bg-transparent hover:text-[#000000]"
|
|
217
229
|
onClick={() => setIsNoteFormOpen(true)}
|
|
230
|
+
data-testid="update-gift-pack-button"
|
|
218
231
|
>
|
|
219
232
|
{_translations.updateNote}
|
|
220
233
|
</Button>
|