@akinon/projectzero 1.119.0-rc.0 → 1.119.0-rc.2

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.2
4
+
5
+ ### Minor Changes
6
+
7
+ - 143be2b9: ZERO-3457: Crop styles are customizable and logic improved for rendering similar products modal
8
+ - d99a6a7d: ZERO-3457_1: Fixed the settings prop and made sure everything is customizable.
9
+
10
+ ## 1.119.0-rc.1
11
+
3
12
  ## 1.119.0-rc.0
4
13
 
5
14
  ### Minor Changes
@@ -1,5 +1,117 @@
1
1
  # projectzeronext
2
2
 
3
+ ## 1.119.0-rc.2
4
+
5
+ ### Minor Changes
6
+
7
+ - 6ad72e8d: ZERO-4032: Add loading state management for payment submissions across multiple components and add safe guarding
8
+ - 4449f3a3: ZERO-3681: Add order details localization and improve order handling in AccountOrderDetail
9
+ - 31b4a266: ZERO-4102: Add support for post-checkout redirect in middleware
10
+ - 1a8622a9: ZERO-3392: Implemented AI Search functionality and update env
11
+ - b55acb76: ZERO-2577: Fix pagination bug and update usePagination hook and ensure pagination controls rendering correctly
12
+ - 36143125: ZERO-3987: Add barcode scanner functionality with modal and button
13
+ - f7e0f646: ZERO-4032: Add bfcache-headers middleware, integrate it into the default chain, and introduce a new environment variable for control.
14
+ - 143be2b9: ZERO-3457: Crop styles are customizable and logic improved for rendering similar products modal
15
+ - 9f8cd3bc: ZERO-3449: AI Search Active Filters & Crop Style changes have been implemented
16
+ - 5fb34b5c: ZERO-3955: Add aspect ratio validation and error handling for image cropping
17
+ - d99a6a7d: ZERO-3457_1: Fixed the settings prop and made sure everything is customizable.
18
+ - b87517ff: ZERO-3680: Enhance select component styling to ensure focus state is consistent
19
+ - b59fdd1c: ZERO-4009: Add password reset token validation
20
+ - d76d3255: ZERO-4011: Refactor sitemap content generation to append locale suffix based on matched locale
21
+ - b05c3543: ZERO-2570: Category filters routes to absolute url
22
+ - c3244a31: ZERO-4013: Update runtime version to node:25-alpine in project configuration
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies [6ad72e8d]
27
+ - Updated dependencies [4798959a]
28
+ - Updated dependencies [31b4a266]
29
+ - Updated dependencies [d2c0e759]
30
+ - Updated dependencies [aef81c5d]
31
+ - Updated dependencies [b55acb76]
32
+ - Updated dependencies [8a7fd0f4]
33
+ - Updated dependencies [36143125]
34
+ - Updated dependencies [572f4f7b]
35
+ - Updated dependencies [0754c835]
36
+ - Updated dependencies [f7e0f646]
37
+ - Updated dependencies [94a86fcc]
38
+ - Updated dependencies [143be2b9]
39
+ - Updated dependencies [9f8cd3bc]
40
+ - Updated dependencies [49c82e1a]
41
+ - Updated dependencies [a9f5cdb1]
42
+ - Updated dependencies [5fb34b5c]
43
+ - Updated dependencies [88cb4f62]
44
+ - Updated dependencies [d99a6a7d]
45
+ - Updated dependencies [d7e5178b]
46
+ - Updated dependencies [591e345e]
47
+ - Updated dependencies [01ee41f1]
48
+ - Updated dependencies [187208d2]
49
+ - Updated dependencies [4de5303c]
50
+ - Updated dependencies [63a72000]
51
+ - Updated dependencies [b59fdd1c]
52
+ - Updated dependencies [95b139dc]
53
+ - Updated dependencies [c6c5c1cd]
54
+ - Updated dependencies [3909d322]
55
+ - Updated dependencies [6b73b050]
56
+ - @akinon/pz-pay-on-delivery@1.119.0-rc.2
57
+ - @akinon/pz-credit-payment@1.119.0-rc.2
58
+ - @akinon/pz-google-pay@1.119.0-rc.2
59
+ - @akinon/pz-masterpass@1.119.0-rc.2
60
+ - @akinon/pz-saved-card@1.119.0-rc.2
61
+ - @akinon/pz-apple-pay@1.119.0-rc.2
62
+ - @akinon/pz-hepsipay@1.119.0-rc.2
63
+ - @akinon/pz-gpay@1.119.0-rc.2
64
+ - @akinon/pz-bkm@1.119.0-rc.2
65
+ - @akinon/pz-otp@1.119.0-rc.2
66
+ - @akinon/pz-masterpass-rest@1.119.0-rc.2
67
+ - @akinon/next@1.119.0-rc.2
68
+ - @akinon/pz-virtual-try-on@1.119.0-rc.2
69
+ - @akinon/pz-similar-products@1.119.0-rc.2
70
+ - @akinon/pz-akifast@1.119.0-rc.2
71
+ - @akinon/pz-b2b@1.119.0-rc.2
72
+ - @akinon/pz-basket-gift-pack@1.119.0-rc.2
73
+ - @akinon/pz-checkout-gift-pack@1.119.0-rc.2
74
+ - @akinon/pz-click-collect@1.119.0-rc.2
75
+ - @akinon/pz-cybersource-uc@1.119.0-rc.2
76
+ - @akinon/pz-flow-payment@1.119.0-rc.2
77
+ - @akinon/pz-haso@1.119.0-rc.2
78
+ - @akinon/pz-multi-basket@1.119.0-rc.2
79
+ - @akinon/pz-one-click-checkout@1.119.0-rc.2
80
+ - @akinon/pz-tabby-extension@1.119.0-rc.2
81
+ - @akinon/pz-tamara-extension@1.119.0-rc.2
82
+
83
+ ## 1.119.0-rc.1
84
+
85
+ ### Patch Changes
86
+
87
+ - Updated dependencies [c6c5c1cd]
88
+ - @akinon/next@1.119.0-rc.1
89
+ - @akinon/pz-virtual-try-on@1.119.0-rc.1
90
+ - @akinon/pz-akifast@1.119.0-rc.1
91
+ - @akinon/pz-apple-pay@1.119.0-rc.1
92
+ - @akinon/pz-b2b@1.119.0-rc.1
93
+ - @akinon/pz-basket-gift-pack@1.119.0-rc.1
94
+ - @akinon/pz-bkm@1.119.0-rc.1
95
+ - @akinon/pz-checkout-gift-pack@1.119.0-rc.1
96
+ - @akinon/pz-click-collect@1.119.0-rc.1
97
+ - @akinon/pz-credit-payment@1.119.0-rc.1
98
+ - @akinon/pz-cybersource-uc@1.119.0-rc.1
99
+ - @akinon/pz-flow-payment@1.119.0-rc.1
100
+ - @akinon/pz-google-pay@1.119.0-rc.1
101
+ - @akinon/pz-gpay@1.119.0-rc.1
102
+ - @akinon/pz-haso@1.119.0-rc.1
103
+ - @akinon/pz-hepsipay@1.119.0-rc.1
104
+ - @akinon/pz-masterpass@1.119.0-rc.1
105
+ - @akinon/pz-masterpass-rest@1.119.0-rc.1
106
+ - @akinon/pz-multi-basket@1.119.0-rc.1
107
+ - @akinon/pz-one-click-checkout@1.119.0-rc.1
108
+ - @akinon/pz-otp@1.119.0-rc.1
109
+ - @akinon/pz-pay-on-delivery@1.119.0-rc.1
110
+ - @akinon/pz-saved-card@1.119.0-rc.1
111
+ - @akinon/pz-similar-products@1.119.0-rc.1
112
+ - @akinon/pz-tabby-extension@1.119.0-rc.1
113
+ - @akinon/pz-tamara-extension@1.119.0-rc.1
114
+
3
115
  ## 1.119.0-rc.0
4
116
 
5
117
  ### Minor Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "projectzeronext",
3
- "version": "1.119.0-rc.0",
3
+ "version": "1.119.0-rc.2",
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.0",
28
- "@akinon/pz-akifast": "1.119.0-rc.0",
29
- "@akinon/pz-apple-pay": "1.119.0-rc.0",
30
- "@akinon/pz-b2b": "1.119.0-rc.0",
31
- "@akinon/pz-basket-gift-pack": "1.119.0-rc.0",
32
- "@akinon/pz-bkm": "1.119.0-rc.0",
33
- "@akinon/pz-checkout-gift-pack": "1.119.0-rc.0",
34
- "@akinon/pz-click-collect": "1.119.0-rc.0",
35
- "@akinon/pz-credit-payment": "1.119.0-rc.0",
36
- "@akinon/pz-cybersource-uc": "1.119.0-rc.0",
37
- "@akinon/pz-flow-payment": "1.119.0-rc.0",
38
- "@akinon/pz-google-pay": "1.119.0-rc.0",
39
- "@akinon/pz-gpay": "1.119.0-rc.0",
40
- "@akinon/pz-haso": "1.119.0-rc.0",
41
- "@akinon/pz-hepsipay": "1.119.0-rc.0",
42
- "@akinon/pz-masterpass": "1.119.0-rc.0",
43
- "@akinon/pz-masterpass-rest": "1.119.0-rc.0",
44
- "@akinon/pz-multi-basket": "1.119.0-rc.0",
45
- "@akinon/pz-one-click-checkout": "1.119.0-rc.0",
46
- "@akinon/pz-otp": "1.119.0-rc.0",
47
- "@akinon/pz-pay-on-delivery": "1.119.0-rc.0",
48
- "@akinon/pz-saved-card": "1.119.0-rc.0",
49
- "@akinon/pz-similar-products": "1.119.0-rc.0",
50
- "@akinon/pz-tabby-extension": "1.119.0-rc.0",
51
- "@akinon/pz-tamara-extension": "1.119.0-rc.0",
52
- "@akinon/pz-virtual-try-on": "1.119.0-rc.0",
27
+ "@akinon/next": "1.119.0-rc.2",
28
+ "@akinon/pz-akifast": "1.119.0-rc.2",
29
+ "@akinon/pz-apple-pay": "1.119.0-rc.2",
30
+ "@akinon/pz-b2b": "1.119.0-rc.2",
31
+ "@akinon/pz-basket-gift-pack": "1.119.0-rc.2",
32
+ "@akinon/pz-bkm": "1.119.0-rc.2",
33
+ "@akinon/pz-checkout-gift-pack": "1.119.0-rc.2",
34
+ "@akinon/pz-click-collect": "1.119.0-rc.2",
35
+ "@akinon/pz-credit-payment": "1.119.0-rc.2",
36
+ "@akinon/pz-cybersource-uc": "1.119.0-rc.2",
37
+ "@akinon/pz-flow-payment": "1.119.0-rc.2",
38
+ "@akinon/pz-google-pay": "1.119.0-rc.2",
39
+ "@akinon/pz-gpay": "1.119.0-rc.2",
40
+ "@akinon/pz-haso": "1.119.0-rc.2",
41
+ "@akinon/pz-hepsipay": "1.119.0-rc.2",
42
+ "@akinon/pz-masterpass": "1.119.0-rc.2",
43
+ "@akinon/pz-masterpass-rest": "1.119.0-rc.2",
44
+ "@akinon/pz-multi-basket": "1.119.0-rc.2",
45
+ "@akinon/pz-one-click-checkout": "1.119.0-rc.2",
46
+ "@akinon/pz-otp": "1.119.0-rc.2",
47
+ "@akinon/pz-pay-on-delivery": "1.119.0-rc.2",
48
+ "@akinon/pz-saved-card": "1.119.0-rc.2",
49
+ "@akinon/pz-similar-products": "1.119.0-rc.2",
50
+ "@akinon/pz-tabby-extension": "1.119.0-rc.2",
51
+ "@akinon/pz-tamara-extension": "1.119.0-rc.2",
52
+ "@akinon/pz-virtual-try-on": "1.119.0-rc.2",
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.0",
75
+ "@akinon/eslint-plugin-projectzero": "1.119.0-rc.2",
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.0",
3
+ "version": "1.119.0-rc.2",
4
4
  "private": false,
5
5
  "description": "CLI tool to manage your Project Zero Next project",
6
6
  "bin": {