@akinon/projectzero 1.73.0-rc.9 → 1.74.0-rc.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.
- package/CHANGELOG.md +4 -23
- package/app-template/CHANGELOG.md +61 -213
- package/app-template/next.config.mjs +1 -2
- package/app-template/package.json +17 -17
- package/app-template/src/views/product/variant.tsx +38 -37
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,33 +1,14 @@
|
|
|
1
1
|
# @akinon/projectzero
|
|
2
2
|
|
|
3
|
-
## 1.
|
|
4
|
-
|
|
5
|
-
## 1.73.0-rc.8
|
|
6
|
-
|
|
7
|
-
## 1.73.0-rc.7
|
|
8
|
-
|
|
9
|
-
## 1.73.0-rc.6
|
|
10
|
-
|
|
11
|
-
## 1.73.0-rc.5
|
|
12
|
-
|
|
13
|
-
## 1.73.0-rc.4
|
|
14
|
-
|
|
15
|
-
## 1.73.0-rc.3
|
|
16
|
-
|
|
17
|
-
### Minor Changes
|
|
18
|
-
|
|
19
|
-
- 7727ae55: ZERO-3073: Refactor basket page to use server-side data fetching and simplify component structure
|
|
20
|
-
|
|
21
|
-
## 1.73.0-rc.2
|
|
22
|
-
|
|
23
|
-
## 1.73.0-rc.1
|
|
24
|
-
|
|
25
|
-
## 1.73.0-rc.0
|
|
3
|
+
## 1.74.0-rc.0
|
|
26
4
|
|
|
27
5
|
### Minor Changes
|
|
28
6
|
|
|
29
7
|
- 1ebe1da0: ZERO-3016:move pagination fixes and add optional chaining
|
|
30
8
|
- 64699d3f: ZERO-2761: Fix invalid import for plugin module
|
|
9
|
+
- 7727ae55: ZERO-3073: Refactor basket page to use server-side data fetching and simplify component structure
|
|
10
|
+
|
|
11
|
+
## 1.73.0
|
|
31
12
|
|
|
32
13
|
## 1.72.0
|
|
33
14
|
|
|
@@ -1,203 +1,6 @@
|
|
|
1
1
|
# projectzeronext
|
|
2
2
|
|
|
3
|
-
## 1.
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- Updated dependencies [6d6a39d5]
|
|
8
|
-
- @akinon/next@1.73.0-rc.9
|
|
9
|
-
- @akinon/pz-akifast@1.73.0-rc.9
|
|
10
|
-
- @akinon/pz-b2b@1.73.0-rc.9
|
|
11
|
-
- @akinon/pz-basket-gift-pack@1.73.0-rc.9
|
|
12
|
-
- @akinon/pz-bkm@1.73.0-rc.9
|
|
13
|
-
- @akinon/pz-checkout-gift-pack@1.73.0-rc.9
|
|
14
|
-
- @akinon/pz-click-collect@1.73.0-rc.9
|
|
15
|
-
- @akinon/pz-credit-payment@1.73.0-rc.9
|
|
16
|
-
- @akinon/pz-gpay@1.73.0-rc.9
|
|
17
|
-
- @akinon/pz-masterpass@1.73.0-rc.9
|
|
18
|
-
- @akinon/pz-one-click-checkout@1.73.0-rc.9
|
|
19
|
-
- @akinon/pz-otp@1.73.0-rc.9
|
|
20
|
-
- @akinon/pz-pay-on-delivery@1.73.0-rc.9
|
|
21
|
-
- @akinon/pz-saved-card@1.73.0-rc.9
|
|
22
|
-
- @akinon/pz-tabby-extension@1.73.0-rc.9
|
|
23
|
-
|
|
24
|
-
## 1.73.0-rc.8
|
|
25
|
-
|
|
26
|
-
### Patch Changes
|
|
27
|
-
|
|
28
|
-
- Updated dependencies [72fd4d67]
|
|
29
|
-
- @akinon/next@1.73.0-rc.8
|
|
30
|
-
- @akinon/pz-akifast@1.73.0-rc.8
|
|
31
|
-
- @akinon/pz-b2b@1.73.0-rc.8
|
|
32
|
-
- @akinon/pz-basket-gift-pack@1.73.0-rc.8
|
|
33
|
-
- @akinon/pz-bkm@1.73.0-rc.8
|
|
34
|
-
- @akinon/pz-checkout-gift-pack@1.73.0-rc.8
|
|
35
|
-
- @akinon/pz-click-collect@1.73.0-rc.8
|
|
36
|
-
- @akinon/pz-credit-payment@1.73.0-rc.8
|
|
37
|
-
- @akinon/pz-gpay@1.73.0-rc.8
|
|
38
|
-
- @akinon/pz-masterpass@1.73.0-rc.8
|
|
39
|
-
- @akinon/pz-one-click-checkout@1.73.0-rc.8
|
|
40
|
-
- @akinon/pz-otp@1.73.0-rc.8
|
|
41
|
-
- @akinon/pz-pay-on-delivery@1.73.0-rc.8
|
|
42
|
-
- @akinon/pz-saved-card@1.73.0-rc.8
|
|
43
|
-
- @akinon/pz-tabby-extension@1.73.0-rc.8
|
|
44
|
-
|
|
45
|
-
## 1.73.0-rc.7
|
|
46
|
-
|
|
47
|
-
### Patch Changes
|
|
48
|
-
|
|
49
|
-
- Updated dependencies [37239b31]
|
|
50
|
-
- @akinon/next@1.73.0-rc.7
|
|
51
|
-
- @akinon/pz-akifast@1.73.0-rc.7
|
|
52
|
-
- @akinon/pz-b2b@1.73.0-rc.7
|
|
53
|
-
- @akinon/pz-basket-gift-pack@1.73.0-rc.7
|
|
54
|
-
- @akinon/pz-bkm@1.73.0-rc.7
|
|
55
|
-
- @akinon/pz-checkout-gift-pack@1.73.0-rc.7
|
|
56
|
-
- @akinon/pz-click-collect@1.73.0-rc.7
|
|
57
|
-
- @akinon/pz-credit-payment@1.73.0-rc.7
|
|
58
|
-
- @akinon/pz-gpay@1.73.0-rc.7
|
|
59
|
-
- @akinon/pz-masterpass@1.73.0-rc.7
|
|
60
|
-
- @akinon/pz-one-click-checkout@1.73.0-rc.7
|
|
61
|
-
- @akinon/pz-otp@1.73.0-rc.7
|
|
62
|
-
- @akinon/pz-pay-on-delivery@1.73.0-rc.7
|
|
63
|
-
- @akinon/pz-saved-card@1.73.0-rc.7
|
|
64
|
-
- @akinon/pz-tabby-extension@1.73.0-rc.7
|
|
65
|
-
|
|
66
|
-
## 1.73.0-rc.6
|
|
67
|
-
|
|
68
|
-
### Patch Changes
|
|
69
|
-
|
|
70
|
-
- Updated dependencies [31d5a712]
|
|
71
|
-
- @akinon/next@1.73.0-rc.6
|
|
72
|
-
- @akinon/pz-akifast@1.73.0-rc.6
|
|
73
|
-
- @akinon/pz-b2b@1.73.0-rc.6
|
|
74
|
-
- @akinon/pz-basket-gift-pack@1.73.0-rc.6
|
|
75
|
-
- @akinon/pz-bkm@1.73.0-rc.6
|
|
76
|
-
- @akinon/pz-checkout-gift-pack@1.73.0-rc.6
|
|
77
|
-
- @akinon/pz-click-collect@1.73.0-rc.6
|
|
78
|
-
- @akinon/pz-credit-payment@1.73.0-rc.6
|
|
79
|
-
- @akinon/pz-gpay@1.73.0-rc.6
|
|
80
|
-
- @akinon/pz-masterpass@1.73.0-rc.6
|
|
81
|
-
- @akinon/pz-one-click-checkout@1.73.0-rc.6
|
|
82
|
-
- @akinon/pz-otp@1.73.0-rc.6
|
|
83
|
-
- @akinon/pz-pay-on-delivery@1.73.0-rc.6
|
|
84
|
-
- @akinon/pz-saved-card@1.73.0-rc.6
|
|
85
|
-
- @akinon/pz-tabby-extension@1.73.0-rc.6
|
|
86
|
-
|
|
87
|
-
## 1.73.0-rc.5
|
|
88
|
-
|
|
89
|
-
### Patch Changes
|
|
90
|
-
|
|
91
|
-
- Updated dependencies [24557b3c]
|
|
92
|
-
- Updated dependencies [178044ed]
|
|
93
|
-
- @akinon/next@1.73.0-rc.5
|
|
94
|
-
- @akinon/pz-akifast@1.73.0-rc.5
|
|
95
|
-
- @akinon/pz-b2b@1.73.0-rc.5
|
|
96
|
-
- @akinon/pz-basket-gift-pack@1.73.0-rc.5
|
|
97
|
-
- @akinon/pz-bkm@1.73.0-rc.5
|
|
98
|
-
- @akinon/pz-checkout-gift-pack@1.73.0-rc.5
|
|
99
|
-
- @akinon/pz-click-collect@1.73.0-rc.5
|
|
100
|
-
- @akinon/pz-credit-payment@1.73.0-rc.5
|
|
101
|
-
- @akinon/pz-gpay@1.73.0-rc.5
|
|
102
|
-
- @akinon/pz-masterpass@1.73.0-rc.5
|
|
103
|
-
- @akinon/pz-one-click-checkout@1.73.0-rc.5
|
|
104
|
-
- @akinon/pz-otp@1.73.0-rc.5
|
|
105
|
-
- @akinon/pz-pay-on-delivery@1.73.0-rc.5
|
|
106
|
-
- @akinon/pz-saved-card@1.73.0-rc.5
|
|
107
|
-
- @akinon/pz-tabby-extension@1.73.0-rc.5
|
|
108
|
-
|
|
109
|
-
## 1.73.0-rc.4
|
|
110
|
-
|
|
111
|
-
### Patch Changes
|
|
112
|
-
|
|
113
|
-
- Updated dependencies [c594b469]
|
|
114
|
-
- @akinon/pz-saved-card@1.73.0-rc.4
|
|
115
|
-
- @akinon/next@1.73.0-rc.4
|
|
116
|
-
- @akinon/pz-akifast@1.73.0-rc.4
|
|
117
|
-
- @akinon/pz-b2b@1.73.0-rc.4
|
|
118
|
-
- @akinon/pz-basket-gift-pack@1.73.0-rc.4
|
|
119
|
-
- @akinon/pz-bkm@1.73.0-rc.4
|
|
120
|
-
- @akinon/pz-checkout-gift-pack@1.73.0-rc.4
|
|
121
|
-
- @akinon/pz-click-collect@1.73.0-rc.4
|
|
122
|
-
- @akinon/pz-credit-payment@1.73.0-rc.4
|
|
123
|
-
- @akinon/pz-gpay@1.73.0-rc.4
|
|
124
|
-
- @akinon/pz-masterpass@1.73.0-rc.4
|
|
125
|
-
- @akinon/pz-one-click-checkout@1.73.0-rc.4
|
|
126
|
-
- @akinon/pz-otp@1.73.0-rc.4
|
|
127
|
-
- @akinon/pz-pay-on-delivery@1.73.0-rc.4
|
|
128
|
-
- @akinon/pz-tabby-extension@1.73.0-rc.4
|
|
129
|
-
|
|
130
|
-
## 1.73.0-rc.3
|
|
131
|
-
|
|
132
|
-
### Minor Changes
|
|
133
|
-
|
|
134
|
-
- 7727ae55: ZERO-3073: Refactor basket page to use server-side data fetching and simplify component structure
|
|
135
|
-
- 07b2298e: ZERO-3074: Exclude url schemes to init url without locales
|
|
136
|
-
|
|
137
|
-
### Patch Changes
|
|
138
|
-
|
|
139
|
-
- Updated dependencies [5e3333dc]
|
|
140
|
-
- Updated dependencies [7727ae55]
|
|
141
|
-
- Updated dependencies [07b2298e]
|
|
142
|
-
- @akinon/pz-saved-card@1.73.0-rc.3
|
|
143
|
-
- @akinon/next@1.73.0-rc.3
|
|
144
|
-
- @akinon/pz-checkout-gift-pack@1.73.0-rc.3
|
|
145
|
-
- @akinon/pz-one-click-checkout@1.73.0-rc.3
|
|
146
|
-
- @akinon/pz-basket-gift-pack@1.73.0-rc.3
|
|
147
|
-
- @akinon/pz-pay-on-delivery@1.73.0-rc.3
|
|
148
|
-
- @akinon/pz-tabby-extension@1.73.0-rc.3
|
|
149
|
-
- @akinon/pz-credit-payment@1.73.0-rc.3
|
|
150
|
-
- @akinon/pz-click-collect@1.73.0-rc.3
|
|
151
|
-
- @akinon/pz-masterpass@1.73.0-rc.3
|
|
152
|
-
- @akinon/pz-akifast@1.73.0-rc.3
|
|
153
|
-
- @akinon/pz-gpay@1.73.0-rc.3
|
|
154
|
-
- @akinon/pz-b2b@1.73.0-rc.3
|
|
155
|
-
- @akinon/pz-bkm@1.73.0-rc.3
|
|
156
|
-
- @akinon/pz-otp@1.73.0-rc.3
|
|
157
|
-
|
|
158
|
-
## 1.73.0-rc.2
|
|
159
|
-
|
|
160
|
-
### Patch Changes
|
|
161
|
-
|
|
162
|
-
- Updated dependencies [eeb20bea]
|
|
163
|
-
- @akinon/next@1.73.0-rc.2
|
|
164
|
-
- @akinon/pz-akifast@1.73.0-rc.2
|
|
165
|
-
- @akinon/pz-b2b@1.73.0-rc.2
|
|
166
|
-
- @akinon/pz-basket-gift-pack@1.73.0-rc.2
|
|
167
|
-
- @akinon/pz-bkm@1.73.0-rc.2
|
|
168
|
-
- @akinon/pz-checkout-gift-pack@1.73.0-rc.2
|
|
169
|
-
- @akinon/pz-click-collect@1.73.0-rc.2
|
|
170
|
-
- @akinon/pz-credit-payment@1.73.0-rc.2
|
|
171
|
-
- @akinon/pz-gpay@1.73.0-rc.2
|
|
172
|
-
- @akinon/pz-masterpass@1.73.0-rc.2
|
|
173
|
-
- @akinon/pz-one-click-checkout@1.73.0-rc.2
|
|
174
|
-
- @akinon/pz-otp@1.73.0-rc.2
|
|
175
|
-
- @akinon/pz-pay-on-delivery@1.73.0-rc.2
|
|
176
|
-
- @akinon/pz-saved-card@1.73.0-rc.2
|
|
177
|
-
- @akinon/pz-tabby-extension@1.73.0-rc.2
|
|
178
|
-
|
|
179
|
-
## 1.73.0-rc.1
|
|
180
|
-
|
|
181
|
-
### Patch Changes
|
|
182
|
-
|
|
183
|
-
- Updated dependencies [fdd255ee]
|
|
184
|
-
- @akinon/next@1.73.0-rc.1
|
|
185
|
-
- @akinon/pz-akifast@1.73.0-rc.1
|
|
186
|
-
- @akinon/pz-b2b@1.73.0-rc.1
|
|
187
|
-
- @akinon/pz-basket-gift-pack@1.73.0-rc.1
|
|
188
|
-
- @akinon/pz-bkm@1.73.0-rc.1
|
|
189
|
-
- @akinon/pz-checkout-gift-pack@1.73.0-rc.1
|
|
190
|
-
- @akinon/pz-click-collect@1.73.0-rc.1
|
|
191
|
-
- @akinon/pz-credit-payment@1.73.0-rc.1
|
|
192
|
-
- @akinon/pz-gpay@1.73.0-rc.1
|
|
193
|
-
- @akinon/pz-masterpass@1.73.0-rc.1
|
|
194
|
-
- @akinon/pz-one-click-checkout@1.73.0-rc.1
|
|
195
|
-
- @akinon/pz-otp@1.73.0-rc.1
|
|
196
|
-
- @akinon/pz-pay-on-delivery@1.73.0-rc.1
|
|
197
|
-
- @akinon/pz-saved-card@1.73.0-rc.1
|
|
198
|
-
- @akinon/pz-tabby-extension@1.73.0-rc.1
|
|
199
|
-
|
|
200
|
-
## 1.73.0-rc.0
|
|
3
|
+
## 1.74.0-rc.0
|
|
201
4
|
|
|
202
5
|
### Minor Changes
|
|
203
6
|
|
|
@@ -205,23 +8,31 @@
|
|
|
205
8
|
- 4d3deb4f: ZERO-2935: sentry 8 upgrade
|
|
206
9
|
- 1ebe1da0: ZERO-3016:move pagination fixes and add optional chaining
|
|
207
10
|
- 64699d3f: ZERO-2761: Fix invalid import for plugin module
|
|
11
|
+
- 7727ae55: ZERO-3073: Refactor basket page to use server-side data fetching and simplify component structure
|
|
208
12
|
- 7d2d66e0: ZERO-3012: Upgrade version for tailwindcss
|
|
13
|
+
- 2d305aaf: ZERO-2935: Update Sentry configuration: remove hideSourceMaps option and add it to withPzConfig
|
|
209
14
|
- 3344bca5: ZERO-3013: Enable web vitals tracking in settings.js
|
|
210
15
|
|
|
211
16
|
### Patch Changes
|
|
212
17
|
|
|
18
|
+
- Updated dependencies [5e3333dc]
|
|
213
19
|
- Updated dependencies [5dfeea04]
|
|
214
20
|
- Updated dependencies [81248a14]
|
|
215
21
|
- Updated dependencies [ed55a810]
|
|
216
22
|
- Updated dependencies [2d9b2b2c]
|
|
217
23
|
- Updated dependencies [3bfa12aa]
|
|
218
24
|
- Updated dependencies [cc538c6a]
|
|
25
|
+
- Updated dependencies [f49bb74f]
|
|
219
26
|
- Updated dependencies [e9541a13]
|
|
220
27
|
- Updated dependencies [94eb8252]
|
|
221
28
|
- Updated dependencies [4d3deb4f]
|
|
29
|
+
- Updated dependencies [72fd4d67]
|
|
222
30
|
- Updated dependencies [c53ef7b9]
|
|
223
31
|
- Updated dependencies [0ab91e56]
|
|
32
|
+
- Updated dependencies [178044ed]
|
|
224
33
|
- Updated dependencies [64699d3f]
|
|
34
|
+
- Updated dependencies [999168d6]
|
|
35
|
+
- Updated dependencies [7727ae55]
|
|
225
36
|
- Updated dependencies [17f87524]
|
|
226
37
|
- Updated dependencies [65d3b862]
|
|
227
38
|
- Updated dependencies [30105142]
|
|
@@ -231,29 +42,66 @@
|
|
|
231
42
|
- Updated dependencies [7e56d6b6]
|
|
232
43
|
- Updated dependencies [5a333a57]
|
|
233
44
|
- Updated dependencies [43c182ee]
|
|
45
|
+
- Updated dependencies [31d5a712]
|
|
234
46
|
- Updated dependencies [ca774b39]
|
|
47
|
+
- Updated dependencies [2d305aaf]
|
|
48
|
+
- Updated dependencies [eeb20bea]
|
|
235
49
|
- Updated dependencies [56cdddc8]
|
|
236
50
|
- Updated dependencies [f2c92d5c]
|
|
237
51
|
- Updated dependencies [7bd3d992]
|
|
238
52
|
- Updated dependencies [f0b2f416]
|
|
53
|
+
- Updated dependencies [fdd255ee]
|
|
54
|
+
- Updated dependencies [c594b469]
|
|
55
|
+
- Updated dependencies [86a5a620]
|
|
239
56
|
- Updated dependencies [49eeebfa]
|
|
240
57
|
- Updated dependencies [3f9b8d7e]
|
|
241
58
|
- Updated dependencies [3344bca5]
|
|
242
|
-
- @akinon/
|
|
243
|
-
- @akinon/
|
|
244
|
-
- @akinon/pz-
|
|
245
|
-
- @akinon/pz-
|
|
246
|
-
- @akinon/pz-
|
|
247
|
-
- @akinon/pz-
|
|
248
|
-
- @akinon/pz-
|
|
249
|
-
- @akinon/pz-
|
|
250
|
-
- @akinon/pz-
|
|
251
|
-
- @akinon/pz-
|
|
252
|
-
- @akinon/pz-
|
|
253
|
-
- @akinon/pz-
|
|
254
|
-
- @akinon/pz-
|
|
255
|
-
- @akinon/pz-
|
|
256
|
-
- @akinon/pz-tabby-extension@1.
|
|
59
|
+
- @akinon/pz-saved-card@1.74.0-rc.0
|
|
60
|
+
- @akinon/next@1.74.0-rc.0
|
|
61
|
+
- @akinon/pz-akifast@1.74.0-rc.0
|
|
62
|
+
- @akinon/pz-checkout-gift-pack@1.74.0-rc.0
|
|
63
|
+
- @akinon/pz-one-click-checkout@1.74.0-rc.0
|
|
64
|
+
- @akinon/pz-basket-gift-pack@1.74.0-rc.0
|
|
65
|
+
- @akinon/pz-pay-on-delivery@1.74.0-rc.0
|
|
66
|
+
- @akinon/pz-credit-payment@1.74.0-rc.0
|
|
67
|
+
- @akinon/pz-click-collect@1.74.0-rc.0
|
|
68
|
+
- @akinon/pz-masterpass@1.74.0-rc.0
|
|
69
|
+
- @akinon/pz-gpay@1.74.0-rc.0
|
|
70
|
+
- @akinon/pz-b2b@1.74.0-rc.0
|
|
71
|
+
- @akinon/pz-bkm@1.74.0-rc.0
|
|
72
|
+
- @akinon/pz-otp@1.74.0-rc.0
|
|
73
|
+
- @akinon/pz-tabby-extension@1.74.0-rc.0
|
|
74
|
+
|
|
75
|
+
## 1.73.0
|
|
76
|
+
|
|
77
|
+
### Minor Changes
|
|
78
|
+
|
|
79
|
+
- 20d6394: ZERO-3090: Optimize Variant component for better performance
|
|
80
|
+
- 07b2298: ZERO-3074: Exclude url schemes to init url without locales
|
|
81
|
+
|
|
82
|
+
### Patch Changes
|
|
83
|
+
|
|
84
|
+
- Updated dependencies [6d6a39d]
|
|
85
|
+
- Updated dependencies [7b93652]
|
|
86
|
+
- Updated dependencies [24557b3]
|
|
87
|
+
- Updated dependencies [07b2298]
|
|
88
|
+
- Updated dependencies [37239b3]
|
|
89
|
+
- Updated dependencies [e96633e]
|
|
90
|
+
- @akinon/next@1.73.0
|
|
91
|
+
- @akinon/pz-akifast@1.73.0
|
|
92
|
+
- @akinon/pz-b2b@1.73.0
|
|
93
|
+
- @akinon/pz-basket-gift-pack@1.73.0
|
|
94
|
+
- @akinon/pz-bkm@1.73.0
|
|
95
|
+
- @akinon/pz-checkout-gift-pack@1.73.0
|
|
96
|
+
- @akinon/pz-click-collect@1.73.0
|
|
97
|
+
- @akinon/pz-credit-payment@1.73.0
|
|
98
|
+
- @akinon/pz-gpay@1.73.0
|
|
99
|
+
- @akinon/pz-masterpass@1.73.0
|
|
100
|
+
- @akinon/pz-one-click-checkout@1.73.0
|
|
101
|
+
- @akinon/pz-otp@1.73.0
|
|
102
|
+
- @akinon/pz-pay-on-delivery@1.73.0
|
|
103
|
+
- @akinon/pz-saved-card@1.73.0
|
|
104
|
+
- @akinon/pz-tabby-extension@1.73.0
|
|
257
105
|
|
|
258
106
|
## 1.72.0
|
|
259
107
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "projectzeronext",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.74.0-rc.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -22,21 +22,21 @@
|
|
|
22
22
|
"prestart": "pz-prestart"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@akinon/next": "1.
|
|
26
|
-
"@akinon/pz-akifast": "1.
|
|
27
|
-
"@akinon/pz-b2b": "1.
|
|
28
|
-
"@akinon/pz-basket-gift-pack": "1.
|
|
29
|
-
"@akinon/pz-bkm": "1.
|
|
30
|
-
"@akinon/pz-checkout-gift-pack": "1.
|
|
31
|
-
"@akinon/pz-click-collect": "1.
|
|
32
|
-
"@akinon/pz-credit-payment": "1.
|
|
33
|
-
"@akinon/pz-gpay": "1.
|
|
34
|
-
"@akinon/pz-masterpass": "1.
|
|
35
|
-
"@akinon/pz-one-click-checkout": "1.
|
|
36
|
-
"@akinon/pz-otp": "1.
|
|
37
|
-
"@akinon/pz-pay-on-delivery": "1.
|
|
38
|
-
"@akinon/pz-saved-card": "1.
|
|
39
|
-
"@akinon/pz-tabby-extension": "1.
|
|
25
|
+
"@akinon/next": "1.74.0-rc.0",
|
|
26
|
+
"@akinon/pz-akifast": "1.74.0-rc.0",
|
|
27
|
+
"@akinon/pz-b2b": "1.74.0-rc.0",
|
|
28
|
+
"@akinon/pz-basket-gift-pack": "1.74.0-rc.0",
|
|
29
|
+
"@akinon/pz-bkm": "1.74.0-rc.0",
|
|
30
|
+
"@akinon/pz-checkout-gift-pack": "1.74.0-rc.0",
|
|
31
|
+
"@akinon/pz-click-collect": "1.74.0-rc.0",
|
|
32
|
+
"@akinon/pz-credit-payment": "1.74.0-rc.0",
|
|
33
|
+
"@akinon/pz-gpay": "1.74.0-rc.0",
|
|
34
|
+
"@akinon/pz-masterpass": "1.74.0-rc.0",
|
|
35
|
+
"@akinon/pz-one-click-checkout": "1.74.0-rc.0",
|
|
36
|
+
"@akinon/pz-otp": "1.74.0-rc.0",
|
|
37
|
+
"@akinon/pz-pay-on-delivery": "1.74.0-rc.0",
|
|
38
|
+
"@akinon/pz-saved-card": "1.74.0-rc.0",
|
|
39
|
+
"@akinon/pz-tabby-extension": "1.74.0-rc.0",
|
|
40
40
|
"@hookform/resolvers": "2.9.0",
|
|
41
41
|
"@next/third-parties": "14.1.0",
|
|
42
42
|
"@react-google-maps/api": "2.17.1",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"yup": "0.32.11"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@akinon/eslint-plugin-projectzero": "1.
|
|
63
|
+
"@akinon/eslint-plugin-projectzero": "1.74.0-rc.0",
|
|
64
64
|
"@semantic-release/changelog": "6.0.2",
|
|
65
65
|
"@semantic-release/exec": "6.0.3",
|
|
66
66
|
"@semantic-release/git": "10.0.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import React, { useMemo } from 'react';
|
|
3
|
+
import React, { useMemo, useCallback } from 'react';
|
|
4
4
|
import { VariantOption, VariantType } from '@akinon/next/types';
|
|
5
5
|
import { usePathname, useSearchParams } from 'next/navigation';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -12,20 +12,23 @@ type VariantProps = {
|
|
|
12
12
|
preventDefaultClick?: boolean;
|
|
13
13
|
} & VariantType;
|
|
14
14
|
|
|
15
|
-
export const Variant = (
|
|
15
|
+
export const Variant = ({
|
|
16
|
+
attribute_key,
|
|
17
|
+
attribute_name,
|
|
18
|
+
options,
|
|
19
|
+
preventDefaultClick,
|
|
20
|
+
onChange,
|
|
21
|
+
className
|
|
22
|
+
}: VariantProps) => {
|
|
16
23
|
const { t } = useLocalization();
|
|
17
|
-
const {
|
|
18
|
-
attribute_key,
|
|
19
|
-
attribute_name,
|
|
20
|
-
options,
|
|
21
|
-
preventDefaultClick,
|
|
22
|
-
onChange
|
|
23
|
-
} = props;
|
|
24
24
|
const router = useRouter();
|
|
25
25
|
const pathname = usePathname();
|
|
26
26
|
const searchParams = useSearchParams();
|
|
27
27
|
// This is a workaround for the fact that we can't use the useSearchParams set method because of this is not implemented in next.js yet. So we have to use the URLSearchParams's set method.
|
|
28
|
-
const params =
|
|
28
|
+
const params = useMemo(
|
|
29
|
+
() => new URLSearchParams(searchParams.toString()),
|
|
30
|
+
[searchParams]
|
|
31
|
+
);
|
|
29
32
|
|
|
30
33
|
const hasSelected = useMemo(
|
|
31
34
|
() => options.some((option) => option.is_selected),
|
|
@@ -37,22 +40,23 @@ export const Variant = (props: VariantProps) => {
|
|
|
37
40
|
[options]
|
|
38
41
|
);
|
|
39
42
|
|
|
40
|
-
const handleClick = (
|
|
41
|
-
|
|
42
|
-
onChange
|
|
43
|
-
|
|
43
|
+
const handleClick = useCallback(
|
|
44
|
+
(option: VariantOption) => {
|
|
45
|
+
if (onChange) {
|
|
46
|
+
onChange(option);
|
|
47
|
+
}
|
|
44
48
|
|
|
45
|
-
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
49
|
+
if (preventDefaultClick) return;
|
|
48
50
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
params.set(attribute_key, option.value);
|
|
52
|
+
router.push(`${pathname}?${params.toString()}`);
|
|
53
|
+
},
|
|
54
|
+
[onChange, preventDefaultClick, params, attribute_key, pathname, router]
|
|
55
|
+
);
|
|
52
56
|
|
|
53
57
|
return (
|
|
54
58
|
<div
|
|
55
|
-
className={clsx('flex flex-col gap-2',
|
|
59
|
+
className={clsx('flex flex-col gap-2', className)}
|
|
56
60
|
data-testid={`product-variant-${attribute_name}`}
|
|
57
61
|
>
|
|
58
62
|
<p className="flex gap-2 text-xs leading-4">
|
|
@@ -66,30 +70,27 @@ export const Variant = (props: VariantProps) => {
|
|
|
66
70
|
className="font-bold"
|
|
67
71
|
data-testid={`product-variant-${attribute_name}-value`}
|
|
68
72
|
>
|
|
69
|
-
{selectedVariant
|
|
73
|
+
{selectedVariant?.value}
|
|
70
74
|
</span>
|
|
71
75
|
)}
|
|
72
76
|
</p>
|
|
73
77
|
<div className="flex gap-3 flex-wrap justify-center">
|
|
74
78
|
{options.map((option, i) => (
|
|
75
79
|
<button
|
|
76
|
-
key={i}
|
|
80
|
+
key={`${i}-${option.value}`}
|
|
77
81
|
className={clsx(
|
|
78
82
|
'h-10 px-4 transition-colors duration-200 text-xs',
|
|
79
|
-
|
|
80
|
-
'bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground pointer-events-none'
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
!option.is_selectable &&
|
|
91
|
-
option.is_selected &&
|
|
92
|
-
'border border-dashed border-black bg-white text-gray-600 overflow-hidden relative'
|
|
83
|
+
{
|
|
84
|
+
'bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground pointer-events-none':
|
|
85
|
+
option.is_selected,
|
|
86
|
+
'bg-gray-200 hover:bg-gray-400':
|
|
87
|
+
option.is_selectable && !option.is_selected,
|
|
88
|
+
'border border-gray-300 text-gray-600': !option.is_selectable,
|
|
89
|
+
'cursor-not-allowed':
|
|
90
|
+
!option.is_selectable && !option.is_selectable_without_stock,
|
|
91
|
+
'border border-dashed border-black bg-white text-gray-600 overflow-hidden relative':
|
|
92
|
+
!option.is_selectable && option.is_selected
|
|
93
|
+
}
|
|
93
94
|
)}
|
|
94
95
|
onClick={() => handleClick(option)}
|
|
95
96
|
>
|