@akinon/projectzero 1.82.0-rc.5 → 1.82.0-rc.6

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,7 @@
1
1
  # @akinon/projectzero
2
2
 
3
+ ## 1.82.0-rc.6
4
+
3
5
  ## 1.82.0-rc.5
4
6
 
5
7
  ## 1.82.0-rc.4
@@ -1,10 +1,38 @@
1
1
  # projectzeronext
2
2
 
3
+ ## 1.82.0-rc.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [0b1bd07f]
8
+ - @akinon/next@1.82.0-rc.6
9
+ - @akinon/pz-akifast@1.82.0-rc.6
10
+ - @akinon/pz-b2b@1.82.0-rc.6
11
+ - @akinon/pz-basket-gift-pack@1.82.0-rc.6
12
+ - @akinon/pz-bkm@1.82.0-rc.6
13
+ - @akinon/pz-checkout-gift-pack@1.82.0-rc.6
14
+ - @akinon/pz-click-collect@1.82.0-rc.6
15
+ - @akinon/pz-credit-payment@1.82.0-rc.6
16
+ - @akinon/pz-gpay@1.82.0-rc.6
17
+ - @akinon/pz-masterpass@1.82.0-rc.6
18
+ - @akinon/pz-one-click-checkout@1.82.0-rc.6
19
+ - @akinon/pz-otp@1.82.0-rc.6
20
+ - @akinon/pz-pay-on-delivery@1.82.0-rc.6
21
+ - @akinon/pz-saved-card@1.82.0-rc.6
22
+ - @akinon/pz-tabby-extension@1.82.0-rc.6
23
+ - @akinon/pz-tamara-extension@1.82.0-rc.6
24
+
3
25
  ## 1.82.0-rc.5
4
26
 
27
+ ### Minor Changes
28
+
29
+ - 6f506afc: ZERO-3229: Implement mini basket query for basket total quantity
30
+
5
31
  ### Patch Changes
6
32
 
33
+ - Updated dependencies [6f506afc]
7
34
  - Updated dependencies [c0c19629]
35
+ - Updated dependencies [9be2c081]
8
36
  - @akinon/next@1.82.0-rc.5
9
37
  - @akinon/pz-akifast@1.82.0-rc.5
10
38
  - @akinon/pz-b2b@1.82.0-rc.5
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "projectzeronext",
3
- "version": "1.82.0-rc.5",
3
+ "version": "1.82.0-rc.6",
4
4
  "private": true,
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -22,22 +22,22 @@
22
22
  "prestart": "pz-prestart"
23
23
  },
24
24
  "dependencies": {
25
- "@akinon/next": "1.82.0-rc.5",
26
- "@akinon/pz-akifast": "1.82.0-rc.5",
27
- "@akinon/pz-b2b": "1.82.0-rc.5",
28
- "@akinon/pz-basket-gift-pack": "1.82.0-rc.5",
29
- "@akinon/pz-bkm": "1.82.0-rc.5",
30
- "@akinon/pz-checkout-gift-pack": "1.82.0-rc.5",
31
- "@akinon/pz-click-collect": "1.82.0-rc.5",
32
- "@akinon/pz-credit-payment": "1.82.0-rc.5",
33
- "@akinon/pz-gpay": "1.82.0-rc.5",
34
- "@akinon/pz-masterpass": "1.82.0-rc.5",
35
- "@akinon/pz-one-click-checkout": "1.82.0-rc.5",
36
- "@akinon/pz-otp": "1.82.0-rc.5",
37
- "@akinon/pz-pay-on-delivery": "1.82.0-rc.5",
38
- "@akinon/pz-saved-card": "1.82.0-rc.5",
39
- "@akinon/pz-tabby-extension": "1.82.0-rc.5",
40
- "@akinon/pz-tamara-extension": "1.82.0-rc.5",
25
+ "@akinon/next": "1.82.0-rc.6",
26
+ "@akinon/pz-akifast": "1.82.0-rc.6",
27
+ "@akinon/pz-b2b": "1.82.0-rc.6",
28
+ "@akinon/pz-basket-gift-pack": "1.82.0-rc.6",
29
+ "@akinon/pz-bkm": "1.82.0-rc.6",
30
+ "@akinon/pz-checkout-gift-pack": "1.82.0-rc.6",
31
+ "@akinon/pz-click-collect": "1.82.0-rc.6",
32
+ "@akinon/pz-credit-payment": "1.82.0-rc.6",
33
+ "@akinon/pz-gpay": "1.82.0-rc.6",
34
+ "@akinon/pz-masterpass": "1.82.0-rc.6",
35
+ "@akinon/pz-one-click-checkout": "1.82.0-rc.6",
36
+ "@akinon/pz-otp": "1.82.0-rc.6",
37
+ "@akinon/pz-pay-on-delivery": "1.82.0-rc.6",
38
+ "@akinon/pz-saved-card": "1.82.0-rc.6",
39
+ "@akinon/pz-tabby-extension": "1.82.0-rc.6",
40
+ "@akinon/pz-tamara-extension": "1.82.0-rc.6",
41
41
  "@hookform/resolvers": "2.9.0",
42
42
  "@next/third-parties": "14.1.0",
43
43
  "@react-google-maps/api": "2.17.1",
@@ -62,7 +62,7 @@
62
62
  "yup": "0.32.11"
63
63
  },
64
64
  "devDependencies": {
65
- "@akinon/eslint-plugin-projectzero": "1.82.0-rc.5",
65
+ "@akinon/eslint-plugin-projectzero": "1.82.0-rc.6",
66
66
  "@semantic-release/changelog": "6.0.2",
67
67
  "@semantic-release/exec": "6.0.3",
68
68
  "@semantic-release/git": "10.0.1",
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
3
  import { ReactNode, useMemo, useRef, useCallback } from 'react';
4
- import { useGetBasketQuery } from '@akinon/next/data/client/basket';
4
+ import { useGetMiniBasketQuery } from '@akinon/next/data/client/basket';
5
5
  import { useAppDispatch, useAppSelector } from '@akinon/next/redux/hooks';
6
6
  import {
7
7
  closeMiniBasket,
@@ -29,8 +29,11 @@ interface MenuItem {
29
29
  export default function ActionMenu() {
30
30
  const dispatch = useAppDispatch();
31
31
 
32
- const { data } = useGetBasketQuery();
33
- const totalQuantity = useMemo(() => data?.total_quantity ?? 0, [data]);
32
+ const { data: miniBasket } = useGetMiniBasketQuery();
33
+ const totalQuantity = useMemo(
34
+ () => miniBasket?.total_quantity ?? 0,
35
+ [miniBasket]
36
+ );
34
37
 
35
38
  const { open: miniBasketOpen } = useAppSelector(
36
39
  (state) => state.root.miniBasket
@@ -5,6 +5,7 @@ import clsx from 'clsx';
5
5
  import {
6
6
  basketApi,
7
7
  useGetBasketQuery,
8
+ useGetMiniBasketQuery,
8
9
  useUpdateQuantityMutation
9
10
  } from '@akinon/next/data/client/basket';
10
11
  import { useAppDispatch, useAppSelector } from '@akinon/next/redux/hooks';
@@ -151,12 +152,16 @@ export default function MiniBasket() {
151
152
  );
152
153
  const dispatch = useAppDispatch();
153
154
  const { data: basket, isLoading, isSuccess } = useGetBasketQuery();
155
+ const { data: miniBasket } = useGetMiniBasketQuery();
154
156
  const { t } = useLocalization();
155
157
  const { highlightedItem } = useAppSelector((state) => state.root.miniBasket);
156
158
  const [highlightedItemPk, setHighlightedItemPk] = useState(0);
157
159
  const [sortedBasket, setSortedBasket] = useState([]);
158
160
 
159
- const totalQuantity = useMemo(() => basket?.total_quantity ?? 0, [basket]);
161
+ const totalQuantity = useMemo(
162
+ () => miniBasket?.total_quantity ?? 0,
163
+ [miniBasket]
164
+ );
160
165
  const miniBasketList = useRef();
161
166
 
162
167
  useEffect(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/projectzero",
3
- "version": "1.82.0-rc.5",
3
+ "version": "1.82.0-rc.6",
4
4
  "private": false,
5
5
  "description": "CLI tool to manage your Project Zero Next project",
6
6
  "bin": {