@akinon/projectzero 1.119.0-rc.1 → 1.119.0-rc.3

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,14 @@
1
1
  # @akinon/projectzero
2
2
 
3
+ ## 1.119.0-rc.3
4
+
5
+ ## 1.119.0-rc.2
6
+
7
+ ### Minor Changes
8
+
9
+ - 143be2b9: ZERO-3457: Crop styles are customizable and logic improved for rendering similar products modal
10
+ - d99a6a7d: ZERO-3457_1: Fixed the settings prop and made sure everything is customizable.
11
+
3
12
  ## 1.119.0-rc.1
4
13
 
5
14
  ## 1.119.0-rc.0
@@ -1,5 +1,117 @@
1
1
  # projectzeronext
2
2
 
3
+ ## 1.119.0-rc.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [cd68a97a]
8
+ - @akinon/next@1.119.0-rc.3
9
+ - @akinon/pz-virtual-try-on@1.119.0-rc.3
10
+ - @akinon/pz-akifast@1.119.0-rc.3
11
+ - @akinon/pz-apple-pay@1.119.0-rc.3
12
+ - @akinon/pz-b2b@1.119.0-rc.3
13
+ - @akinon/pz-basket-gift-pack@1.119.0-rc.3
14
+ - @akinon/pz-bkm@1.119.0-rc.3
15
+ - @akinon/pz-checkout-gift-pack@1.119.0-rc.3
16
+ - @akinon/pz-click-collect@1.119.0-rc.3
17
+ - @akinon/pz-credit-payment@1.119.0-rc.3
18
+ - @akinon/pz-cybersource-uc@1.119.0-rc.3
19
+ - @akinon/pz-flow-payment@1.119.0-rc.3
20
+ - @akinon/pz-google-pay@1.119.0-rc.3
21
+ - @akinon/pz-gpay@1.119.0-rc.3
22
+ - @akinon/pz-haso@1.119.0-rc.3
23
+ - @akinon/pz-hepsipay@1.119.0-rc.3
24
+ - @akinon/pz-masterpass@1.119.0-rc.3
25
+ - @akinon/pz-masterpass-rest@1.119.0-rc.3
26
+ - @akinon/pz-multi-basket@1.119.0-rc.3
27
+ - @akinon/pz-one-click-checkout@1.119.0-rc.3
28
+ - @akinon/pz-otp@1.119.0-rc.3
29
+ - @akinon/pz-pay-on-delivery@1.119.0-rc.3
30
+ - @akinon/pz-saved-card@1.119.0-rc.3
31
+ - @akinon/pz-similar-products@1.119.0-rc.3
32
+ - @akinon/pz-tabby-extension@1.119.0-rc.3
33
+ - @akinon/pz-tamara-extension@1.119.0-rc.3
34
+
35
+ ## 1.119.0-rc.2
36
+
37
+ ### Minor Changes
38
+
39
+ - 6ad72e8d: ZERO-4032: Add loading state management for payment submissions across multiple components and add safe guarding
40
+ - 4449f3a3: ZERO-3681: Add order details localization and improve order handling in AccountOrderDetail
41
+ - 31b4a266: ZERO-4102: Add support for post-checkout redirect in middleware
42
+ - 1a8622a9: ZERO-3392: Implemented AI Search functionality and update env
43
+ - b55acb76: ZERO-2577: Fix pagination bug and update usePagination hook and ensure pagination controls rendering correctly
44
+ - 36143125: ZERO-3987: Add barcode scanner functionality with modal and button
45
+ - f7e0f646: ZERO-4032: Add bfcache-headers middleware, integrate it into the default chain, and introduce a new environment variable for control.
46
+ - 143be2b9: ZERO-3457: Crop styles are customizable and logic improved for rendering similar products modal
47
+ - 9f8cd3bc: ZERO-3449: AI Search Active Filters & Crop Style changes have been implemented
48
+ - 5fb34b5c: ZERO-3955: Add aspect ratio validation and error handling for image cropping
49
+ - d99a6a7d: ZERO-3457_1: Fixed the settings prop and made sure everything is customizable.
50
+ - b87517ff: ZERO-3680: Enhance select component styling to ensure focus state is consistent
51
+ - b59fdd1c: ZERO-4009: Add password reset token validation
52
+ - d76d3255: ZERO-4011: Refactor sitemap content generation to append locale suffix based on matched locale
53
+ - b05c3543: ZERO-2570: Category filters routes to absolute url
54
+ - c3244a31: ZERO-4013: Update runtime version to node:25-alpine in project configuration
55
+
56
+ ### Patch Changes
57
+
58
+ - Updated dependencies [6ad72e8d]
59
+ - Updated dependencies [4798959a]
60
+ - Updated dependencies [31b4a266]
61
+ - Updated dependencies [d2c0e759]
62
+ - Updated dependencies [aef81c5d]
63
+ - Updated dependencies [b55acb76]
64
+ - Updated dependencies [8a7fd0f4]
65
+ - Updated dependencies [36143125]
66
+ - Updated dependencies [572f4f7b]
67
+ - Updated dependencies [0754c835]
68
+ - Updated dependencies [f7e0f646]
69
+ - Updated dependencies [94a86fcc]
70
+ - Updated dependencies [143be2b9]
71
+ - Updated dependencies [9f8cd3bc]
72
+ - Updated dependencies [49c82e1a]
73
+ - Updated dependencies [a9f5cdb1]
74
+ - Updated dependencies [5fb34b5c]
75
+ - Updated dependencies [88cb4f62]
76
+ - Updated dependencies [d99a6a7d]
77
+ - Updated dependencies [d7e5178b]
78
+ - Updated dependencies [591e345e]
79
+ - Updated dependencies [01ee41f1]
80
+ - Updated dependencies [187208d2]
81
+ - Updated dependencies [4de5303c]
82
+ - Updated dependencies [63a72000]
83
+ - Updated dependencies [b59fdd1c]
84
+ - Updated dependencies [95b139dc]
85
+ - Updated dependencies [c6c5c1cd]
86
+ - Updated dependencies [3909d322]
87
+ - Updated dependencies [6b73b050]
88
+ - @akinon/pz-pay-on-delivery@1.119.0-rc.2
89
+ - @akinon/pz-credit-payment@1.119.0-rc.2
90
+ - @akinon/pz-google-pay@1.119.0-rc.2
91
+ - @akinon/pz-masterpass@1.119.0-rc.2
92
+ - @akinon/pz-saved-card@1.119.0-rc.2
93
+ - @akinon/pz-apple-pay@1.119.0-rc.2
94
+ - @akinon/pz-hepsipay@1.119.0-rc.2
95
+ - @akinon/pz-gpay@1.119.0-rc.2
96
+ - @akinon/pz-bkm@1.119.0-rc.2
97
+ - @akinon/pz-otp@1.119.0-rc.2
98
+ - @akinon/pz-masterpass-rest@1.119.0-rc.2
99
+ - @akinon/next@1.119.0-rc.2
100
+ - @akinon/pz-virtual-try-on@1.119.0-rc.2
101
+ - @akinon/pz-similar-products@1.119.0-rc.2
102
+ - @akinon/pz-akifast@1.119.0-rc.2
103
+ - @akinon/pz-b2b@1.119.0-rc.2
104
+ - @akinon/pz-basket-gift-pack@1.119.0-rc.2
105
+ - @akinon/pz-checkout-gift-pack@1.119.0-rc.2
106
+ - @akinon/pz-click-collect@1.119.0-rc.2
107
+ - @akinon/pz-cybersource-uc@1.119.0-rc.2
108
+ - @akinon/pz-flow-payment@1.119.0-rc.2
109
+ - @akinon/pz-haso@1.119.0-rc.2
110
+ - @akinon/pz-multi-basket@1.119.0-rc.2
111
+ - @akinon/pz-one-click-checkout@1.119.0-rc.2
112
+ - @akinon/pz-tabby-extension@1.119.0-rc.2
113
+ - @akinon/pz-tamara-extension@1.119.0-rc.2
114
+
3
115
  ## 1.119.0-rc.1
4
116
 
5
117
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "projectzeronext",
3
- "version": "1.119.0-rc.1",
3
+ "version": "1.119.0-rc.3",
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.119.0-rc.1",
28
- "@akinon/pz-akifast": "1.119.0-rc.1",
29
- "@akinon/pz-apple-pay": "1.119.0-rc.1",
30
- "@akinon/pz-b2b": "1.119.0-rc.1",
31
- "@akinon/pz-basket-gift-pack": "1.119.0-rc.1",
32
- "@akinon/pz-bkm": "1.119.0-rc.1",
33
- "@akinon/pz-checkout-gift-pack": "1.119.0-rc.1",
34
- "@akinon/pz-click-collect": "1.119.0-rc.1",
35
- "@akinon/pz-credit-payment": "1.119.0-rc.1",
36
- "@akinon/pz-cybersource-uc": "1.119.0-rc.1",
37
- "@akinon/pz-flow-payment": "1.119.0-rc.1",
38
- "@akinon/pz-google-pay": "1.119.0-rc.1",
39
- "@akinon/pz-gpay": "1.119.0-rc.1",
40
- "@akinon/pz-haso": "1.119.0-rc.1",
41
- "@akinon/pz-hepsipay": "1.119.0-rc.1",
42
- "@akinon/pz-masterpass": "1.119.0-rc.1",
43
- "@akinon/pz-masterpass-rest": "1.119.0-rc.1",
44
- "@akinon/pz-multi-basket": "1.119.0-rc.1",
45
- "@akinon/pz-one-click-checkout": "1.119.0-rc.1",
46
- "@akinon/pz-otp": "1.119.0-rc.1",
47
- "@akinon/pz-pay-on-delivery": "1.119.0-rc.1",
48
- "@akinon/pz-saved-card": "1.119.0-rc.1",
49
- "@akinon/pz-similar-products": "1.119.0-rc.1",
50
- "@akinon/pz-tabby-extension": "1.119.0-rc.1",
51
- "@akinon/pz-tamara-extension": "1.119.0-rc.1",
52
- "@akinon/pz-virtual-try-on": "1.119.0-rc.1",
27
+ "@akinon/next": "1.119.0-rc.3",
28
+ "@akinon/pz-akifast": "1.119.0-rc.3",
29
+ "@akinon/pz-apple-pay": "1.119.0-rc.3",
30
+ "@akinon/pz-b2b": "1.119.0-rc.3",
31
+ "@akinon/pz-basket-gift-pack": "1.119.0-rc.3",
32
+ "@akinon/pz-bkm": "1.119.0-rc.3",
33
+ "@akinon/pz-checkout-gift-pack": "1.119.0-rc.3",
34
+ "@akinon/pz-click-collect": "1.119.0-rc.3",
35
+ "@akinon/pz-credit-payment": "1.119.0-rc.3",
36
+ "@akinon/pz-cybersource-uc": "1.119.0-rc.3",
37
+ "@akinon/pz-flow-payment": "1.119.0-rc.3",
38
+ "@akinon/pz-google-pay": "1.119.0-rc.3",
39
+ "@akinon/pz-gpay": "1.119.0-rc.3",
40
+ "@akinon/pz-haso": "1.119.0-rc.3",
41
+ "@akinon/pz-hepsipay": "1.119.0-rc.3",
42
+ "@akinon/pz-masterpass": "1.119.0-rc.3",
43
+ "@akinon/pz-masterpass-rest": "1.119.0-rc.3",
44
+ "@akinon/pz-multi-basket": "1.119.0-rc.3",
45
+ "@akinon/pz-one-click-checkout": "1.119.0-rc.3",
46
+ "@akinon/pz-otp": "1.119.0-rc.3",
47
+ "@akinon/pz-pay-on-delivery": "1.119.0-rc.3",
48
+ "@akinon/pz-saved-card": "1.119.0-rc.3",
49
+ "@akinon/pz-similar-products": "1.119.0-rc.3",
50
+ "@akinon/pz-tabby-extension": "1.119.0-rc.3",
51
+ "@akinon/pz-tamara-extension": "1.119.0-rc.3",
52
+ "@akinon/pz-virtual-try-on": "1.119.0-rc.3",
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.119.0-rc.1",
75
+ "@akinon/eslint-plugin-projectzero": "1.119.0-rc.3",
76
76
  "@semantic-release/changelog": "6.0.2",
77
77
  "@semantic-release/exec": "6.0.3",
78
78
  "@semantic-release/git": "10.0.1",
@@ -1,11 +1,10 @@
1
1
  'use client';
2
2
 
3
- import { useEffect, useState } from 'react';
3
+ import { forwardRef } from 'react';
4
4
  import 'react-multi-carousel/lib/styles.css';
5
5
  import Carousel, {
6
6
  CarouselProps as BaseCarouselProps
7
7
  } from 'react-multi-carousel';
8
- import { forwardRef } from 'react';
9
8
  import { useMediaQuery } from '@akinon/next/hooks';
10
9
 
11
10
  type ContainerAspectRatioType = {
@@ -20,15 +19,9 @@ interface CarouselProps extends BaseCarouselProps {
20
19
  const CarouselCore = forwardRef<Carousel, CarouselProps>((props, ref) => {
21
20
  const { containerAspectRatio } = props;
22
21
  const matches = useMediaQuery('(min-width: 768px)');
23
- const [aspectRatio, setAspectRatio] = useState(containerAspectRatio.mobile);
24
-
25
- useEffect(() => {
26
- if (matches) {
27
- setAspectRatio(containerAspectRatio.desktop);
28
- } else {
29
- setAspectRatio(containerAspectRatio.mobile);
30
- }
31
- }, [matches, containerAspectRatio]);
22
+ const aspectRatio = matches
23
+ ? containerAspectRatio.desktop
24
+ : containerAspectRatio.mobile;
32
25
 
33
26
  return (
34
27
  <div className="w-full" style={{ aspectRatio }}>
@@ -35,7 +35,7 @@ const useFavButton = (productPk: number) => {
35
35
  [favorites, productPk]
36
36
  );
37
37
 
38
- const [isActive, setIsActive] = useState(Boolean(favoriteItem));
38
+ const isActive = Boolean(favoriteItem);
39
39
  const [isPushed, setIsPushed] = useState<boolean>(false);
40
40
 
41
41
  const [addFavorite] = useAddFavoriteMutation();
@@ -55,20 +55,16 @@ const useFavButton = (productPk: number) => {
55
55
  }, [favoriteItem, productPk, addFavorite, removeFavorite]);
56
56
 
57
57
  useEffect(() => {
58
- setIsActive(Boolean(favoriteItem));
59
- }, [favoriteItem]);
60
-
61
- useEffect(() => {
62
- if (favoriteItem && !isActive && isPushed) {
63
- setIsActive(true);
58
+ if (favoriteItem && isPushed) {
64
59
  pushAddToWishlist({
65
60
  base_code: favoriteItem?.product?.base_code,
66
61
  name: favoriteItem?.product?.name,
67
62
  price: favoriteItem?.product?.price,
68
63
  currency_type: favoriteItem?.product?.currency_type
69
64
  });
65
+ setIsPushed(false);
70
66
  }
71
- }, [favoriteItem, isActive, isPushed]);
67
+ }, [favoriteItem, isPushed]);
72
68
 
73
69
  const FavButton = useMemo(() => {
74
70
  const View = (props: FavButtonProps) => (
@@ -6,6 +6,41 @@ import { getWidgetData } from '@akinon/next/data/server';
6
6
  import { Link } from '@theme/components';
7
7
  import { Image } from '@akinon/next/components/image';
8
8
 
9
+ function TitleSection({
10
+ mobileTitle,
11
+ mobileSubtitle
12
+ }: {
13
+ mobileTitle?: { value: string };
14
+ mobileSubtitle?: { value: string };
15
+ }) {
16
+ return (
17
+ <>
18
+ {mobileTitle ? (
19
+ <h2 className="text-5xl text-center font-light px-11 mb-2 lg:hidden">
20
+ {mobileTitle.value}
21
+ </h2>
22
+ ) : null}
23
+ {mobileSubtitle ? (
24
+ <p className="text-sm text-center mb-2 lg:hidden">
25
+ {mobileSubtitle.value}
26
+ </p>
27
+ ) : null}
28
+ </>
29
+ );
30
+ }
31
+
32
+ function MobileLinks({ mobileLinks }: { mobileLinks?: MobileLink[] }) {
33
+ return (
34
+ <ul className="flex justify-center text-sm font-medium underline mb-4 lg:hidden">
35
+ {mobileLinks?.map((item, index) => (
36
+ <li className="mr-4 first:ml-4" key={`${item?.value?.text}__${index}`}>
37
+ <Link href={item?.value?.url}>{item?.value?.text}</Link>
38
+ </li>
39
+ ))}
40
+ </ul>
41
+ );
42
+ }
43
+
9
44
  type StoryData = {
10
45
  value: {
11
46
  url: string;
@@ -20,7 +55,7 @@ type StoryData = {
20
55
  };
21
56
  };
22
57
 
23
- type MobileLinks = {
58
+ type MobileLink = {
24
59
  value: {
25
60
  url: string;
26
61
  text: string;
@@ -35,7 +70,7 @@ type HomeStoriesEngType = {
35
70
  value: string;
36
71
  };
37
72
  stories: StoryData[];
38
- mobileLinks: MobileLinks[];
73
+ mobileLinks: MobileLink[];
39
74
  };
40
75
 
41
76
  export default async function HomeStoriesEng() {
@@ -43,40 +78,13 @@ export default async function HomeStoriesEng() {
43
78
  slug: 'home-storieseng'
44
79
  });
45
80
 
46
- const TitleSection = () => (
47
- <>
48
- {data?.attributes?.mobileTitle ? (
49
- <h2 className="text-5xl text-center font-light px-11 mb-2 lg:hidden">
50
- {data?.attributes?.mobileTitle?.value}
51
- </h2>
52
- ) : null}
53
- {data?.attributes?.mobileSubtitle ? (
54
- <p className="text-sm text-center mb-2 lg:hidden">
55
- {data?.attributes?.mobileSubtitle?.value}
56
- </p>
57
- ) : null}
58
- </>
59
- );
60
-
61
- const MobileLinks = () => (
62
- <ul className="flex justify-center text-sm font-medium underline mb-4 lg:hidden">
63
- {data?.attributes?.mobileLinks?.map((item, index) => {
64
- return (
65
- <li
66
- className="mr-4 first:ml-4"
67
- key={`${item?.value?.text}__${index}`}
68
- >
69
- <Link href={item?.value?.url}>{item?.value?.text}</Link>
70
- </li>
71
- );
72
- })}
73
- </ul>
74
- );
75
-
76
81
  return (
77
82
  <section className="my-8">
78
- <TitleSection />
79
- <MobileLinks />
83
+ <TitleSection
84
+ mobileTitle={data?.attributes?.mobileTitle}
85
+ mobileSubtitle={data?.attributes?.mobileSubtitle}
86
+ />
87
+ <MobileLinks mobileLinks={data?.attributes?.mobileLinks} />
80
88
 
81
89
  <div className="flex items-center overflow-x-auto pb-4 md:justify-center">
82
90
  {data?.attributes?.stories?.map((story, index) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/projectzero",
3
- "version": "1.119.0-rc.1",
3
+ "version": "1.119.0-rc.3",
4
4
  "private": false,
5
5
  "description": "CLI tool to manage your Project Zero Next project",
6
6
  "bin": {