@lookiero/checkout 1.1.4-beta.4 → 1.1.4-beta.5

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.
@@ -85,6 +85,7 @@ const Item = ({ customerId, country }) => {
85
85
  country,
86
86
  checkoutId: checkout?.id,
87
87
  checkoutItemId: checkoutItem.id,
88
+ status: checkoutItem.status,
88
89
  productVariantId: checkoutItem.productVariant.id,
89
90
  replaceableFor,
90
91
  unique: checkoutItem.productVariant.size.unique,
@@ -1,3 +1,4 @@
1
+ import { CheckoutItemStatus } from "../../../domain/checkoutItem/model/checkoutItem";
1
2
  import { TrackingPage } from "../../../infrastructure/tracking/tracking";
2
3
  import { Country } from "../../../projection/shared/country";
3
4
  interface UseTrackItemPageViewFunctionArgs {
@@ -7,6 +8,7 @@ interface UseTrackItemPageViewFunctionArgs {
7
8
  readonly checkoutItemId: string;
8
9
  readonly productVariantId: string;
9
10
  readonly replaceableFor: string[] | undefined;
11
+ readonly status: CheckoutItemStatus;
10
12
  readonly unique: boolean;
11
13
  }
12
14
  interface UseTrackItemPageViewFunction {
@@ -2,7 +2,7 @@ import { useLayoutEffect } from "react";
2
2
  import { PROJECT } from "../../../infrastructure/tracking/tracking";
3
3
  import { TrackingEvent, TrackingEventCategory } from "../tracking";
4
4
  import { useEmitUserEvent } from "./useEmitUserEvent";
5
- const useTrackItemPageView = ({ page, country, checkoutId, checkoutItemId, productVariantId, replaceableFor, unique, }) => {
5
+ const useTrackItemPageView = ({ page, country, checkoutId, checkoutItemId, productVariantId, replaceableFor, status, unique, }) => {
6
6
  const emitUserEvent = useEmitUserEvent();
7
7
  useLayoutEffect(() => {
8
8
  if (!(checkoutId && replaceableFor)) {
@@ -15,11 +15,12 @@ const useTrackItemPageView = ({ page, country, checkoutId, checkoutItemId, produ
15
15
  store: country,
16
16
  checkoutId,
17
17
  checkoutItemId,
18
+ status,
18
19
  productVariantId,
19
20
  replaceableFor: replaceableFor.toString(),
20
21
  unique,
21
22
  };
22
23
  emitUserEvent(itemPageViewTrackingEvent);
23
- }, [checkoutId, checkoutItemId, country, emitUserEvent, page, productVariantId, replaceableFor, unique]);
24
+ }, [checkoutId, checkoutItemId, country, emitUserEvent, page, productVariantId, replaceableFor, status, unique]);
24
25
  };
25
26
  export { useTrackItemPageView };
@@ -1,3 +1,4 @@
1
+ import { CheckoutItemStatus } from "../../domain/checkoutItem/model/checkoutItem";
1
2
  import { MediaPerspective } from "../../projection/checkoutItem/checkoutItem";
2
3
  import { Country } from "../../projection/shared/country";
3
4
  declare enum TrackingEvent {
@@ -30,6 +31,7 @@ interface BaseTrackingEvent {
30
31
  type PageViewTrackingEvent = BaseTrackingEvent;
31
32
  interface ItemPageViewTrackingEvent extends BaseTrackingEvent {
32
33
  readonly checkoutItemId: string;
34
+ readonly status: CheckoutItemStatus;
33
35
  readonly productVariantId: string;
34
36
  readonly replaceableFor: string;
35
37
  readonly unique: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lookiero/checkout",
3
- "version": "1.1.4-beta.4",
3
+ "version": "1.1.4-beta.5",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [