@akinon/projectzero 1.126.13 → 1.126.14-v1-rc.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,72 @@
|
|
|
1
1
|
# projectzeronext
|
|
2
2
|
|
|
3
|
+
## 1.126.14-v1-rc.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [a34bb1b]
|
|
8
|
+
- @akinon/next@1.126.14-v1-rc.11
|
|
9
|
+
- @akinon/pz-virtual-try-on@1.126.14-v1-rc.11
|
|
10
|
+
- @akinon/pz-akifast@1.126.14-v1-rc.11
|
|
11
|
+
- @akinon/pz-apple-pay@1.126.14-v1-rc.11
|
|
12
|
+
- @akinon/pz-b2b@1.126.14-v1-rc.11
|
|
13
|
+
- @akinon/pz-basket-gift-pack@1.126.14-v1-rc.11
|
|
14
|
+
- @akinon/pz-bkm@1.126.14-v1-rc.11
|
|
15
|
+
- @akinon/pz-checkout-gift-pack@1.126.14-v1-rc.11
|
|
16
|
+
- @akinon/pz-click-collect@1.126.14-v1-rc.11
|
|
17
|
+
- @akinon/pz-credit-payment@1.126.14-v1-rc.11
|
|
18
|
+
- @akinon/pz-cybersource-uc@1.126.14-v1-rc.11
|
|
19
|
+
- @akinon/pz-flow-payment@1.126.14-v1-rc.11
|
|
20
|
+
- @akinon/pz-google-pay@1.126.14-v1-rc.11
|
|
21
|
+
- @akinon/pz-gpay@1.126.14-v1-rc.11
|
|
22
|
+
- @akinon/pz-haso@1.126.14-v1-rc.11
|
|
23
|
+
- @akinon/pz-hepsipay@1.126.14-v1-rc.11
|
|
24
|
+
- @akinon/pz-masterpass@1.126.14-v1-rc.11
|
|
25
|
+
- @akinon/pz-masterpass-rest@1.126.14-v1-rc.11
|
|
26
|
+
- @akinon/pz-multi-basket@1.126.14-v1-rc.11
|
|
27
|
+
- @akinon/pz-one-click-checkout@1.126.14-v1-rc.11
|
|
28
|
+
- @akinon/pz-otp@1.126.14-v1-rc.11
|
|
29
|
+
- @akinon/pz-pay-on-delivery@1.126.14-v1-rc.11
|
|
30
|
+
- @akinon/pz-saved-card@1.126.14-v1-rc.11
|
|
31
|
+
- @akinon/pz-similar-products@1.126.14-v1-rc.11
|
|
32
|
+
- @akinon/pz-tabby-extension@1.126.14-v1-rc.11
|
|
33
|
+
- @akinon/pz-tamara-extension@1.126.14-v1-rc.11
|
|
34
|
+
|
|
35
|
+
## 1.126.14-v1-rc.10
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- Updated dependencies [560e209]
|
|
40
|
+
- Updated dependencies [d480941]
|
|
41
|
+
- Updated dependencies [560e209]
|
|
42
|
+
- Updated dependencies [182a639b]
|
|
43
|
+
- @akinon/pz-tamara-extension@1.126.14-v1-rc.10
|
|
44
|
+
- @akinon/pz-masterpass-rest@1.126.14-v1-rc.10
|
|
45
|
+
- @akinon/next@1.126.14-v1-rc.10
|
|
46
|
+
- @akinon/pz-virtual-try-on@1.126.14-v1-rc.10
|
|
47
|
+
- @akinon/pz-akifast@1.126.14-v1-rc.10
|
|
48
|
+
- @akinon/pz-apple-pay@1.126.14-v1-rc.10
|
|
49
|
+
- @akinon/pz-b2b@1.126.14-v1-rc.10
|
|
50
|
+
- @akinon/pz-basket-gift-pack@1.126.14-v1-rc.10
|
|
51
|
+
- @akinon/pz-bkm@1.126.14-v1-rc.10
|
|
52
|
+
- @akinon/pz-checkout-gift-pack@1.126.14-v1-rc.10
|
|
53
|
+
- @akinon/pz-click-collect@1.126.14-v1-rc.10
|
|
54
|
+
- @akinon/pz-credit-payment@1.126.14-v1-rc.10
|
|
55
|
+
- @akinon/pz-cybersource-uc@1.126.14-v1-rc.10
|
|
56
|
+
- @akinon/pz-flow-payment@1.126.14-v1-rc.10
|
|
57
|
+
- @akinon/pz-google-pay@1.126.14-v1-rc.10
|
|
58
|
+
- @akinon/pz-gpay@1.126.14-v1-rc.10
|
|
59
|
+
- @akinon/pz-haso@1.126.14-v1-rc.10
|
|
60
|
+
- @akinon/pz-hepsipay@1.126.14-v1-rc.10
|
|
61
|
+
- @akinon/pz-masterpass@1.126.14-v1-rc.10
|
|
62
|
+
- @akinon/pz-multi-basket@1.126.14-v1-rc.10
|
|
63
|
+
- @akinon/pz-one-click-checkout@1.126.14-v1-rc.10
|
|
64
|
+
- @akinon/pz-otp@1.126.14-v1-rc.10
|
|
65
|
+
- @akinon/pz-pay-on-delivery@1.126.14-v1-rc.10
|
|
66
|
+
- @akinon/pz-saved-card@1.126.14-v1-rc.10
|
|
67
|
+
- @akinon/pz-similar-products@1.126.14-v1-rc.10
|
|
68
|
+
- @akinon/pz-tabby-extension@1.126.14-v1-rc.10
|
|
69
|
+
|
|
3
70
|
## 1.126.13
|
|
4
71
|
|
|
5
72
|
### Patch Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "projectzeronext",
|
|
3
|
-
"version": "1.126.
|
|
3
|
+
"version": "1.126.14-v1-rc.11",
|
|
4
4
|
"private": true,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -24,32 +24,32 @@
|
|
|
24
24
|
"test:middleware": "jest middleware-matcher.test.ts --bail"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@akinon/next": "1.126.
|
|
28
|
-
"@akinon/pz-akifast": "1.126.
|
|
29
|
-
"@akinon/pz-apple-pay": "1.126.
|
|
30
|
-
"@akinon/pz-b2b": "1.126.
|
|
31
|
-
"@akinon/pz-basket-gift-pack": "1.126.
|
|
32
|
-
"@akinon/pz-bkm": "1.126.
|
|
33
|
-
"@akinon/pz-checkout-gift-pack": "1.126.
|
|
34
|
-
"@akinon/pz-click-collect": "1.126.
|
|
35
|
-
"@akinon/pz-credit-payment": "1.126.
|
|
36
|
-
"@akinon/pz-cybersource-uc": "1.126.
|
|
37
|
-
"@akinon/pz-flow-payment": "1.126.
|
|
38
|
-
"@akinon/pz-google-pay": "1.126.
|
|
39
|
-
"@akinon/pz-gpay": "1.126.
|
|
40
|
-
"@akinon/pz-haso": "1.126.
|
|
41
|
-
"@akinon/pz-hepsipay": "1.126.
|
|
42
|
-
"@akinon/pz-masterpass": "1.126.
|
|
43
|
-
"@akinon/pz-masterpass-rest": "1.126.
|
|
44
|
-
"@akinon/pz-multi-basket": "1.126.
|
|
45
|
-
"@akinon/pz-one-click-checkout": "1.126.
|
|
46
|
-
"@akinon/pz-otp": "1.126.
|
|
47
|
-
"@akinon/pz-pay-on-delivery": "1.126.
|
|
48
|
-
"@akinon/pz-saved-card": "1.126.
|
|
49
|
-
"@akinon/pz-similar-products": "1.126.
|
|
50
|
-
"@akinon/pz-tabby-extension": "1.126.
|
|
51
|
-
"@akinon/pz-tamara-extension": "1.126.
|
|
52
|
-
"@akinon/pz-virtual-try-on": "1.126.
|
|
27
|
+
"@akinon/next": "1.126.14-v1-rc.11",
|
|
28
|
+
"@akinon/pz-akifast": "1.126.14-v1-rc.11",
|
|
29
|
+
"@akinon/pz-apple-pay": "1.126.14-v1-rc.11",
|
|
30
|
+
"@akinon/pz-b2b": "1.126.14-v1-rc.11",
|
|
31
|
+
"@akinon/pz-basket-gift-pack": "1.126.14-v1-rc.11",
|
|
32
|
+
"@akinon/pz-bkm": "1.126.14-v1-rc.11",
|
|
33
|
+
"@akinon/pz-checkout-gift-pack": "1.126.14-v1-rc.11",
|
|
34
|
+
"@akinon/pz-click-collect": "1.126.14-v1-rc.11",
|
|
35
|
+
"@akinon/pz-credit-payment": "1.126.14-v1-rc.11",
|
|
36
|
+
"@akinon/pz-cybersource-uc": "1.126.14-v1-rc.11",
|
|
37
|
+
"@akinon/pz-flow-payment": "1.126.14-v1-rc.11",
|
|
38
|
+
"@akinon/pz-google-pay": "1.126.14-v1-rc.11",
|
|
39
|
+
"@akinon/pz-gpay": "1.126.14-v1-rc.11",
|
|
40
|
+
"@akinon/pz-haso": "1.126.14-v1-rc.11",
|
|
41
|
+
"@akinon/pz-hepsipay": "1.126.14-v1-rc.11",
|
|
42
|
+
"@akinon/pz-masterpass": "1.126.14-v1-rc.11",
|
|
43
|
+
"@akinon/pz-masterpass-rest": "1.126.14-v1-rc.11",
|
|
44
|
+
"@akinon/pz-multi-basket": "1.126.14-v1-rc.11",
|
|
45
|
+
"@akinon/pz-one-click-checkout": "1.126.14-v1-rc.11",
|
|
46
|
+
"@akinon/pz-otp": "1.126.14-v1-rc.11",
|
|
47
|
+
"@akinon/pz-pay-on-delivery": "1.126.14-v1-rc.11",
|
|
48
|
+
"@akinon/pz-saved-card": "1.126.14-v1-rc.11",
|
|
49
|
+
"@akinon/pz-similar-products": "1.126.14-v1-rc.11",
|
|
50
|
+
"@akinon/pz-tabby-extension": "1.126.14-v1-rc.11",
|
|
51
|
+
"@akinon/pz-tamara-extension": "1.126.14-v1-rc.11",
|
|
52
|
+
"@akinon/pz-virtual-try-on": "1.126.14-v1-rc.11",
|
|
53
53
|
"@hookform/resolvers": "2.9.0",
|
|
54
54
|
"@next/third-parties": "14.1.0",
|
|
55
55
|
"@react-google-maps/api": "2.17.1",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"yup": "0.32.11"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"@akinon/eslint-plugin-projectzero": "1.126.
|
|
75
|
+
"@akinon/eslint-plugin-projectzero": "1.126.14-v1-rc.11",
|
|
76
76
|
"@semantic-release/changelog": "6.0.2",
|
|
77
77
|
"@semantic-release/exec": "6.0.3",
|
|
78
78
|
"@semantic-release/git": "10.0.1",
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
useSetDataSourceShippingOptionsMutation
|
|
12
12
|
} from '@akinon/next/data/client/checkout';
|
|
13
13
|
import { Price, Button, Radio } from '@theme/components';
|
|
14
|
-
import { CheckoutStep } from '@akinon/next/types';
|
|
14
|
+
import { AttributeBasedShippingOption, CheckoutStep } from '@akinon/next/types';
|
|
15
15
|
import { useLocalization } from '@akinon/next/hooks';
|
|
16
16
|
|
|
17
17
|
const ShippingOptions: React.FC = () => {
|
|
@@ -47,22 +47,41 @@ const ShippingOptions: React.FC = () => {
|
|
|
47
47
|
|
|
48
48
|
const initializeSelectedOptions = useCallback(() => {
|
|
49
49
|
if (attribute_based_shipping_options) {
|
|
50
|
-
const newSelected = {
|
|
50
|
+
const newSelected: Record<string, number> = {};
|
|
51
51
|
let hasChanges = false;
|
|
52
52
|
|
|
53
53
|
Object.entries(attributeBasedShippingOptions).forEach(
|
|
54
|
-
([color,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
([color, group]) => {
|
|
55
|
+
// The step arrives as a dictionary of groups, each carrying its own
|
|
56
|
+
// option list. Both the local and the remote page use this shape.
|
|
57
|
+
const options: AttributeBasedShippingOption[] =
|
|
58
|
+
group?.attribute_based_shipping_options ?? [];
|
|
59
|
+
|
|
60
|
+
if (options.length === 0) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const previous = selectedShippingOptions[color];
|
|
65
|
+
const keepsPrevious = options.some((opt) => opt.pk === previous);
|
|
66
|
+
|
|
67
|
+
newSelected[color] = keepsPrevious ? previous : options[0].pk;
|
|
68
|
+
|
|
69
|
+
if (!keepsPrevious) {
|
|
60
70
|
hasChanges = true;
|
|
61
71
|
}
|
|
62
72
|
}
|
|
63
73
|
);
|
|
64
74
|
|
|
65
|
-
|
|
75
|
+
// A group the backend no longer reports must not stay in the selection:
|
|
76
|
+
// it rejects the whole payload when the group count does not match.
|
|
77
|
+
if (
|
|
78
|
+
Object.keys(newSelected).length !==
|
|
79
|
+
Object.keys(selectedShippingOptions).length
|
|
80
|
+
) {
|
|
81
|
+
hasChanges = true;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (hasChanges && Object.keys(newSelected).length > 0) {
|
|
66
85
|
dispatch(setSelectedShippingOptions(newSelected));
|
|
67
86
|
setAttributeBasedShippingOptions(newSelected);
|
|
68
87
|
}
|
|
@@ -203,7 +222,15 @@ const ShippingOptions: React.FC = () => {
|
|
|
203
222
|
{attributeBasedShippingOptions &&
|
|
204
223
|
Object.keys(attributeBasedShippingOptions).length > 0 &&
|
|
205
224
|
Object.entries(attributeBasedShippingOptions).map(
|
|
206
|
-
([color,
|
|
225
|
+
([color, group]) => {
|
|
226
|
+
const options: AttributeBasedShippingOption[] =
|
|
227
|
+
group?.attribute_based_shipping_options ?? [];
|
|
228
|
+
|
|
229
|
+
if (options.length === 0) {
|
|
230
|
+
return null;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
return (
|
|
207
234
|
<div key={color}>
|
|
208
235
|
<h3 className="text-lg font-bold">{color}</h3>
|
|
209
236
|
{options.map((option) => (
|
|
@@ -227,7 +254,8 @@ const ShippingOptions: React.FC = () => {
|
|
|
227
254
|
</div>
|
|
228
255
|
))}
|
|
229
256
|
</div>
|
|
230
|
-
|
|
257
|
+
);
|
|
258
|
+
}
|
|
231
259
|
)}
|
|
232
260
|
|
|
233
261
|
{dataSourceShippingOptions &&
|