@lookiero/checkout 11.5.0 → 12.1.0

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.
Files changed (129) hide show
  1. package/dist/index.d.ts +1 -2
  2. package/dist/src/ExpoRoot.d.ts +0 -1
  3. package/dist/src/ExpoRoot.js +2 -3
  4. package/dist/src/infrastructure/tracking/useTrackAssignedVariationByExperiment.d.ts +2 -0
  5. package/dist/src/infrastructure/tracking/useTrackAssignedVariationByExperiment.js +3 -2
  6. package/dist/src/infrastructure/tracking/useTrackChangeFeedback.d.ts +2 -0
  7. package/dist/src/infrastructure/tracking/useTrackChangeFeedback.js +3 -2
  8. package/dist/src/infrastructure/tracking/useTrackCheckout.d.ts +2 -0
  9. package/dist/src/infrastructure/tracking/useTrackCheckout.js +3 -1
  10. package/dist/src/infrastructure/tracking/useTrackImageView.d.ts +2 -0
  11. package/dist/src/infrastructure/tracking/useTrackImageView.js +3 -2
  12. package/dist/src/infrastructure/tracking/useTrackItemPageView.d.ts +2 -0
  13. package/dist/src/infrastructure/tracking/useTrackItemPageView.js +3 -1
  14. package/dist/src/infrastructure/tracking/useTrackKeepItem.d.ts +2 -0
  15. package/dist/src/infrastructure/tracking/useTrackKeepItem.js +3 -2
  16. package/dist/src/infrastructure/tracking/useTrackPageView.d.ts +2 -0
  17. package/dist/src/infrastructure/tracking/useTrackPageView.js +3 -2
  18. package/dist/src/infrastructure/tracking/useTrackPressBack.d.ts +2 -0
  19. package/dist/src/infrastructure/tracking/useTrackPressBack.js +3 -2
  20. package/dist/src/infrastructure/tracking/useTrackPressContinue.d.ts +2 -0
  21. package/dist/src/infrastructure/tracking/useTrackPressContinue.js +3 -2
  22. package/dist/src/infrastructure/tracking/useTrackPressItem.d.ts +2 -0
  23. package/dist/src/infrastructure/tracking/useTrackPressItem.js +3 -2
  24. package/dist/src/infrastructure/tracking/useTrackPressNext.d.ts +2 -0
  25. package/dist/src/infrastructure/tracking/useTrackPressNext.js +3 -2
  26. package/dist/src/infrastructure/tracking/useTrackPressPrevious.d.ts +2 -0
  27. package/dist/src/infrastructure/tracking/useTrackPressPrevious.js +3 -2
  28. package/dist/src/infrastructure/tracking/useTrackPressPricing.d.ts +2 -0
  29. package/dist/src/infrastructure/tracking/useTrackPressPricing.js +3 -2
  30. package/dist/src/infrastructure/tracking/useTrackReplaceItem.d.ts +2 -0
  31. package/dist/src/infrastructure/tracking/useTrackReplaceItem.js +3 -2
  32. package/dist/src/infrastructure/tracking/useTrackResetItem.d.ts +2 -0
  33. package/dist/src/infrastructure/tracking/useTrackResetItem.js +3 -2
  34. package/dist/src/infrastructure/tracking/useTrackReturnItem.d.ts +2 -0
  35. package/dist/src/infrastructure/tracking/useTrackReturnItem.js +3 -2
  36. package/dist/src/infrastructure/tracking/useTrackTabView.d.ts +3 -1
  37. package/dist/src/infrastructure/tracking/useTrackTabView.js +3 -2
  38. package/dist/src/infrastructure/ui/hooks/useCheckoutFlow.js +2 -1
  39. package/dist/src/infrastructure/ui/routing/CheckoutMiddleware.d.ts +1 -1
  40. package/dist/src/infrastructure/ui/routing/CheckoutMiddleware.js +5 -3
  41. package/dist/src/infrastructure/ui/test/render.js +1 -1
  42. package/dist/src/infrastructure/ui/views/App.d.ts +1 -1
  43. package/dist/src/infrastructure/ui/views/checkout/Checkout.js +4 -1
  44. package/dist/src/infrastructure/ui/views/feedback/Feedback.js +4 -1
  45. package/dist/src/infrastructure/ui/views/item/Item.js +5 -1
  46. package/dist/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.js +3 -2
  47. package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.js +4 -2
  48. package/dist/src/infrastructure/ui/views/item/views/productVariant/ProductVariant.d.ts +2 -0
  49. package/dist/src/infrastructure/ui/views/item/views/productVariant/ProductVariant.js +2 -1
  50. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.js +5 -2
  51. package/dist/src/infrastructure/ui/views/summary/Summary.js +4 -1
  52. package/dist/src/infrastructure/ui/views/summaryTabs/SummaryTabs.js +4 -1
  53. package/dist/src/projection/returnQuestion/returnQuestion.typeguard.d.ts +2 -2
  54. package/dist/src/version.d.ts +1 -1
  55. package/dist/src/version.js +1 -1
  56. package/index.ts +1 -1
  57. package/jest.config.js +0 -3
  58. package/jest.setup.js +9 -1
  59. package/package.json +22 -20
  60. package/src/ExpoRoot.tsx +2 -3
  61. package/src/infrastructure/tracking/useTrackAssignedVariationByExperiment.test.ts +4 -0
  62. package/src/infrastructure/tracking/useTrackAssignedVariationByExperiment.ts +5 -1
  63. package/src/infrastructure/tracking/useTrackChangeFeedback.test.tsx +4 -0
  64. package/src/infrastructure/tracking/useTrackChangeFeedback.ts +5 -2
  65. package/src/infrastructure/tracking/useTrackCheckout.test.tsx +4 -0
  66. package/src/infrastructure/tracking/useTrackCheckout.ts +5 -0
  67. package/src/infrastructure/tracking/useTrackImageView.test.tsx +4 -0
  68. package/src/infrastructure/tracking/useTrackImageView.ts +5 -1
  69. package/src/infrastructure/tracking/useTrackItemPageView.test.tsx +4 -0
  70. package/src/infrastructure/tracking/useTrackItemPageView.ts +5 -0
  71. package/src/infrastructure/tracking/useTrackKeepItem.test.tsx +4 -0
  72. package/src/infrastructure/tracking/useTrackKeepItem.ts +12 -2
  73. package/src/infrastructure/tracking/useTrackPageView.test.tsx +4 -0
  74. package/src/infrastructure/tracking/useTrackPageView.ts +5 -2
  75. package/src/infrastructure/tracking/useTrackPressBack.test.tsx +4 -0
  76. package/src/infrastructure/tracking/useTrackPressBack.ts +5 -2
  77. package/src/infrastructure/tracking/useTrackPressContinue.test.tsx +4 -0
  78. package/src/infrastructure/tracking/useTrackPressContinue.ts +5 -2
  79. package/src/infrastructure/tracking/useTrackPressItem.test.tsx +4 -0
  80. package/src/infrastructure/tracking/useTrackPressItem.ts +5 -2
  81. package/src/infrastructure/tracking/useTrackPressNext.test.tsx +4 -0
  82. package/src/infrastructure/tracking/useTrackPressNext.ts +5 -2
  83. package/src/infrastructure/tracking/useTrackPressPrevious.test.tsx +4 -0
  84. package/src/infrastructure/tracking/useTrackPressPrevious.ts +5 -2
  85. package/src/infrastructure/tracking/useTrackPressPricing.test.tsx +4 -0
  86. package/src/infrastructure/tracking/useTrackPressPricing.ts +5 -2
  87. package/src/infrastructure/tracking/useTrackReplaceItem.test.tsx +4 -0
  88. package/src/infrastructure/tracking/useTrackReplaceItem.ts +5 -1
  89. package/src/infrastructure/tracking/useTrackResetItem.test.tsx +4 -0
  90. package/src/infrastructure/tracking/useTrackResetItem.ts +12 -2
  91. package/src/infrastructure/tracking/useTrackReturnItem.test.tsx +4 -0
  92. package/src/infrastructure/tracking/useTrackReturnItem.ts +12 -2
  93. package/src/infrastructure/tracking/useTrackTabView.test.tsx +4 -0
  94. package/src/infrastructure/tracking/useTrackTabView.ts +5 -1
  95. package/src/infrastructure/ui/hooks/useCheckoutFlow.test.tsx +11 -1
  96. package/src/infrastructure/ui/hooks/useCheckoutFlow.tsx +2 -0
  97. package/src/infrastructure/ui/hooks/useQueryBus.test.tsx +1 -1
  98. package/src/infrastructure/ui/hooks/useStaticInfo.test.tsx +1 -1
  99. package/src/infrastructure/ui/routing/CheckoutMiddleware.tsx +6 -4
  100. package/src/infrastructure/ui/test/render.tsx +1 -1
  101. package/src/infrastructure/ui/views/App.tsx +1 -1
  102. package/src/infrastructure/ui/views/checkout/Checkout.test.tsx +9 -2
  103. package/src/infrastructure/ui/views/checkout/Checkout.tsx +4 -0
  104. package/src/infrastructure/ui/views/feedback/Feedback.test.tsx +7 -1
  105. package/src/infrastructure/ui/views/feedback/Feedback.tsx +4 -0
  106. package/src/infrastructure/ui/views/item/Item.test.tsx +7 -1
  107. package/src/infrastructure/ui/views/item/Item.tsx +5 -0
  108. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/__snapshots__/GetOutOfCheckoutModal.test.tsx.snap +34 -43
  109. package/src/infrastructure/ui/views/item/components/itemActions/__snapshots__/ItemActions.test.tsx.snap +34 -43
  110. package/src/infrastructure/ui/views/item/components/productVariantSlider/__snapshots__/ProductVariantSlider.test.tsx.snap +76 -99
  111. package/src/infrastructure/ui/views/item/components/selectModal/__snapshots__/SelecModal.test.tsx.snap +34 -43
  112. package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/__snapshots__/SizeWithoutStockModal.test.tsx.snap +34 -43
  113. package/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.test.tsx +7 -1
  114. package/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.tsx +3 -0
  115. package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.test.tsx +7 -1
  116. package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.tsx +4 -0
  117. package/src/infrastructure/ui/views/item/views/productVariant/ProductVariant.test.tsx +2 -0
  118. package/src/infrastructure/ui/views/item/views/productVariant/ProductVariant.tsx +4 -0
  119. package/src/infrastructure/ui/views/item/views/productVariant/__snapshots__/ProductVariant.test.tsx.snap +228 -297
  120. package/src/infrastructure/ui/views/return/Return.test.tsx +8 -1
  121. package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.test.tsx +2 -1
  122. package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +5 -2
  123. package/src/infrastructure/ui/views/shared/components/productVariant/__snapshots__/ProductVariant.test.tsx.snap +26 -32
  124. package/src/infrastructure/ui/views/summary/Summary.test.tsx +7 -1
  125. package/src/infrastructure/ui/views/summary/Summary.tsx +4 -0
  126. package/src/infrastructure/ui/views/summary/components/collapsiblePricing/__snapshots__/CollapsiblePricing.test.tsx.snap +16 -24
  127. package/src/infrastructure/ui/views/summaryTabs/SummaryTabs.test.tsx +7 -1
  128. package/src/infrastructure/ui/views/summaryTabs/SummaryTabs.tsx +4 -0
  129. package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/__snapshots__/CheckoutItemsTabs.test.tsx.snap +105 -135
package/dist/index.d.ts CHANGED
@@ -33,6 +33,5 @@ interface BootstrapFunction {
33
33
  (args: BootstrapFunctionArgs): BootstrapFunctionReturn;
34
34
  }
35
35
  declare const bootstrap: BootstrapFunction;
36
- export type { Project };
37
36
  export { bootstrap, translationEndpoint, translationExternalEndpoint, Country, Segment, CheckoutStatus, Tradename };
38
- export type { SentryEnvironment, KameleoonEnvironment, Customer, SubscriptionProjection as Subscription, OrderProjection as Order, Locale, };
37
+ export type { Project, SentryEnvironment, KameleoonEnvironment, Customer, SubscriptionProjection as Subscription, OrderProjection as Order, Locale, };
@@ -1,4 +1,3 @@
1
- import "expo/build/Expo.fx";
2
1
  import { FC } from "react";
3
2
  declare const ExpoRoot: FC;
4
3
  export { ExpoRoot };
@@ -1,6 +1,5 @@
1
1
  import { PortalProvider } from "@gorhom/portal";
2
2
  import { useFonts } from "expo-font";
3
- import "expo/build/Expo.fx";
4
3
  import React, { useCallback, useState } from "react";
5
4
  import { Platform, ScrollView } from "react-native";
6
5
  import { Navigate, Route, Routes } from "react-router-native";
@@ -29,7 +28,7 @@ const order = {
29
28
  coupon: "MYLOOKIERO",
30
29
  };
31
30
  const customer = {
32
- customerId: "dd186ec9-109f-418d-a770-c6721aa2a97e",
31
+ customerId: "5c38e826-3d01-4a4b-a3d1-8a4166dc2a31",
33
32
  country: Country.NL,
34
33
  segment: Segment.WOMEN,
35
34
  email: "email@example.com",
@@ -46,7 +45,7 @@ const apiUrl = Platform.OS !== "web"
46
45
  : __DEV__
47
46
  ? "/local-to-dev"
48
47
  : "/checkout/api";
49
- const authToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjU2OTUxOTEsImV4cCI6MTc0ODA3NzU5NSwiZGlzcGxheU5hbWUiOiJUZXN0aW5nIiwiY291bnRyeV9jb2RlIjoiRVMiLCJhY2Nlc3NWaWEiOiJlbWFpbCIsInN1YnNjcmlwdGlvblN0YXJ0aW5nRGF0ZSI6IjIwMjUtMDQtMjQiLCJpbXBlcnNvbmF0ZWQiOmZhbHNlLCJ1dWlkIjoiZGQxODZlYzktMTA5Zi00MThkLWE3NzAtYzY3MjFhYTJhOTdlIiwidHJhZGVuYW1lIjoiTE9PS0lFUk8iLCJpYXQiOjE3NDU0ODU1OTV9.MHdtbMWX4lUU98ARiGALsUNkoqu1wKN7Qd-fCv6oqi4";
48
+ const authToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjU3MDEwMTIsImV4cCI6MTc1MDMyMTgwOSwiZGlzcGxheU5hbWUiOiJUZXN0aW5nIiwiY291bnRyeV9jb2RlIjoiRVMiLCJhY2Nlc3NWaWEiOiJlbWFpbCIsInN1YnNjcmlwdGlvblN0YXJ0aW5nRGF0ZSI6IjIwMjUtMDUtMTkiLCJpbXBlcnNvbmF0ZWQiOmZhbHNlLCJ1dWlkIjoiNWMzOGU4MjYtM2QwMS00YTRiLWEzZDEtOGE0MTY2ZGMyYTMxIiwidHJhZGVuYW1lIjoiTE9PS0lFUk8iLCJpYXQiOjE3NDc2NDM0MDl9.-amqZAXKy9KKeo9a7bOQigWw1flM99OBlddxbMBA_PU";
50
49
  const getAuthToken = () => Promise.resolve(authToken);
51
50
  const externalTranslationsUrl = Platform.OS !== "web"
52
51
  ? "https://backend-for-user.dev.envs.lookiero.tech/api/v2/translations"
@@ -1,6 +1,7 @@
1
1
  import { Variation } from "@lookiero/sty-psp-ab-testing";
2
2
  import { Country } from "@lookiero/sty-psp-locale";
3
3
  import { Segment } from "@lookiero/sty-psp-segment";
4
+ import { Tradename } from "@lookiero/sty-sp-tradename";
4
5
  interface TrackAssignedVariationFunctionArgs {
5
6
  readonly assignedVariation: Variation;
6
7
  }
@@ -12,6 +13,7 @@ interface UseTrackAssignedVariationByExperimentFunctionArgs {
12
13
  readonly country: Country;
13
14
  readonly segment: Segment;
14
15
  readonly checkoutId: string | undefined;
16
+ readonly tradename: Tradename;
15
17
  }
16
18
  interface UseTrackAssignedVariationByExperimentFunction {
17
19
  (args: UseTrackAssignedVariationByExperimentFunctionArgs): TrackAssignedVariationFunction;
@@ -2,7 +2,7 @@ import { useCallback } from "react";
2
2
  import { useEmitUserEvent } from "@lookiero/sty-psp-tracking";
3
3
  import { TrackingEventName, TrackingEventCategory } from "./tracking";
4
4
  import { PROJECT } from "./tracking";
5
- const useTrackAssignedVariationByExperiment = ({ experimentId, country, checkoutId, segment, }) => {
5
+ const useTrackAssignedVariationByExperiment = ({ experimentId, country, tradename, checkoutId, segment, }) => {
6
6
  const emitUserEvent = useEmitUserEvent();
7
7
  const trackAssignedVariation = useCallback(({ assignedVariation }) => {
8
8
  if (!checkoutId || !assignedVariation) {
@@ -13,13 +13,14 @@ const useTrackAssignedVariationByExperiment = ({ experimentId, country, checkout
13
13
  eventCategory: TrackingEventCategory.NAVIGATION,
14
14
  section: PROJECT,
15
15
  store: country,
16
+ tradename,
16
17
  segment,
17
18
  checkoutId,
18
19
  experiment: experimentId,
19
20
  variation: String(assignedVariation.id),
20
21
  };
21
22
  emitUserEvent(abTestTrackingEvent);
22
- }, [checkoutId, country, emitUserEvent, experimentId, segment]);
23
+ }, [checkoutId, country, tradename, emitUserEvent, experimentId, segment]);
23
24
  return trackAssignedVariation;
24
25
  };
25
26
  export { useTrackAssignedVariationByExperiment };
@@ -1,5 +1,6 @@
1
1
  import { Country } from "@lookiero/sty-psp-locale";
2
2
  import { Segment } from "@lookiero/sty-psp-segment";
3
+ import { Tradename } from "@lookiero/sty-sp-tradename";
3
4
  import { TrackingPage } from "./tracking";
4
5
  interface ChangeFeedbackFunctionArgs {
5
6
  readonly questionId: string;
@@ -14,6 +15,7 @@ interface UseTrackChangeFeedbackArgs {
14
15
  readonly country: Country;
15
16
  readonly checkoutId?: string;
16
17
  readonly segment: Segment;
18
+ readonly tradename: Tradename;
17
19
  }
18
20
  interface UseTrackChangeFeedback {
19
21
  (agrs: UseTrackChangeFeedbackArgs): ChangeFeedbackFunction;
@@ -2,7 +2,7 @@ import { useCallback } from "react";
2
2
  import { useEmitUserEvent } from "@lookiero/sty-psp-tracking";
3
3
  import { PROJECT } from "./tracking";
4
4
  import { TrackingEventName, TrackingEventCategory } from "./tracking";
5
- const useTrackChangeFeedback = ({ page, country, checkoutId, segment }) => {
5
+ const useTrackChangeFeedback = ({ page, country, tradename, checkoutId, segment }) => {
6
6
  const emitUserEvent = useEmitUserEvent();
7
7
  const changeFeedback = useCallback(({ questionId, questionName, feedback }) => {
8
8
  if (!checkoutId) {
@@ -13,6 +13,7 @@ const useTrackChangeFeedback = ({ page, country, checkoutId, segment }) => {
13
13
  eventCategory: TrackingEventCategory.NAVIGATION,
14
14
  section: `${PROJECT}_${page}`,
15
15
  store: country,
16
+ tradename,
16
17
  segment,
17
18
  checkoutId,
18
19
  questionId,
@@ -20,7 +21,7 @@ const useTrackChangeFeedback = ({ page, country, checkoutId, segment }) => {
20
21
  feedback,
21
22
  };
22
23
  emitUserEvent(changeFeedbackTrackingEvent);
23
- }, [checkoutId, country, emitUserEvent, page, segment]);
24
+ }, [checkoutId, country, tradename, emitUserEvent, page, segment]);
24
25
  return changeFeedback;
25
26
  };
26
27
  export { useTrackChangeFeedback };
@@ -1,5 +1,6 @@
1
1
  import { Country } from "@lookiero/sty-psp-locale";
2
2
  import { Segment } from "@lookiero/sty-psp-segment";
3
+ import { Tradename } from "@lookiero/sty-sp-tradename";
3
4
  import { CheckoutProjection } from "../../projection/checkout/checkout";
4
5
  import { OrderProjection } from "../../projection/order/order";
5
6
  import { PricingProjection } from "../../projection/pricing/pricing";
@@ -15,6 +16,7 @@ interface UseTrackCheckoutFunctionArgs {
15
16
  readonly userId: string;
16
17
  readonly country: Country;
17
18
  readonly segment: Segment;
19
+ readonly tradename: Tradename;
18
20
  }
19
21
  interface UseTrackCheckoutFunction {
20
22
  (args: UseTrackCheckoutFunctionArgs): TrackCheckoutFunction;
@@ -4,7 +4,7 @@ import { useEmitUserEvent } from "@lookiero/sty-psp-tracking";
4
4
  import { CheckoutItemStatus } from "../../domain/checkoutItem/model/checkoutItem";
5
5
  import { PROJECT, TrackingPage } from "./tracking";
6
6
  import { TrackingEventName, TrackingEventCategory } from "./tracking";
7
- const useTrackCheckout = ({ order, checkout, pricing, subscription, segment, country, userId, }) => {
7
+ const useTrackCheckout = ({ order, checkout, pricing, subscription, segment, country, userId, tradename, }) => {
8
8
  const emitUserEvent = useEmitUserEvent();
9
9
  const { coupon, isFirstOrder, orderNumber } = order;
10
10
  const trackCheckout = useCallback(() => {
@@ -19,6 +19,7 @@ const useTrackCheckout = ({ order, checkout, pricing, subscription, segment, cou
19
19
  segment,
20
20
  checkoutId: checkout.id,
21
21
  userId,
22
+ tradename,
22
23
  sizeChanges: totalReplacedFor,
23
24
  isFirstOrder,
24
25
  ecommerce: {
@@ -47,6 +48,7 @@ const useTrackCheckout = ({ order, checkout, pricing, subscription, segment, cou
47
48
  segment,
48
49
  subscription,
49
50
  userId,
51
+ tradename,
50
52
  ]);
51
53
  return trackCheckout;
52
54
  };
@@ -1,5 +1,6 @@
1
1
  import { Country } from "@lookiero/sty-psp-locale";
2
2
  import { Segment } from "@lookiero/sty-psp-segment";
3
+ import { Tradename } from "@lookiero/sty-sp-tradename";
3
4
  import { MediaPerspective } from "../../projection/checkoutItem/checkoutItem";
4
5
  import { TrackingPage } from "./tracking";
5
6
  interface ImageViewFunctionArgs {
@@ -15,6 +16,7 @@ interface UseTrackImageViewFunctionArgs {
15
16
  readonly checkoutId: string | undefined;
16
17
  readonly checkoutItemId: string;
17
18
  readonly productVariantId: string;
19
+ readonly tradename: Tradename;
18
20
  }
19
21
  interface UseTrackImageViewFunction {
20
22
  (agrs: UseTrackImageViewFunctionArgs): ImageViewFunction;
@@ -1,7 +1,7 @@
1
1
  import { useCallback } from "react";
2
2
  import { TrackingEventCategory, useEmitUserEvent } from "@lookiero/sty-psp-tracking";
3
3
  import { PROJECT, TrackingEventName } from "./tracking";
4
- const useTrackImageView = ({ page, country, segment, checkoutId, checkoutItemId, productVariantId, }) => {
4
+ const useTrackImageView = ({ page, country, segment, checkoutId, checkoutItemId, productVariantId, tradename, }) => {
5
5
  const emitUserEvent = useEmitUserEvent();
6
6
  const imageView = useCallback(({ perspective }) => {
7
7
  if (!checkoutId) {
@@ -16,10 +16,11 @@ const useTrackImageView = ({ page, country, segment, checkoutId, checkoutItemId,
16
16
  checkoutId,
17
17
  checkoutItemId,
18
18
  productVariantId,
19
+ tradename,
19
20
  perspective,
20
21
  };
21
22
  emitUserEvent(imageViewTrackingEvent);
22
- }, [checkoutId, checkoutItemId, country, emitUserEvent, page, productVariantId, segment]);
23
+ }, [checkoutId, checkoutItemId, country, emitUserEvent, page, productVariantId, tradename, segment]);
23
24
  return imageView;
24
25
  };
25
26
  export { useTrackImageView };
@@ -1,5 +1,6 @@
1
1
  import { Country } from "@lookiero/sty-psp-locale";
2
2
  import { Segment } from "@lookiero/sty-psp-segment";
3
+ import { Tradename } from "@lookiero/sty-sp-tradename";
3
4
  import { CheckoutItemStatus } from "../../domain/checkoutItem/model/checkoutItem";
4
5
  import { TrackingPage } from "./tracking";
5
6
  interface UseTrackItemPageViewFunctionArgs {
@@ -12,6 +13,7 @@ interface UseTrackItemPageViewFunctionArgs {
12
13
  readonly replaceableFor: string[] | undefined;
13
14
  readonly status: CheckoutItemStatus;
14
15
  readonly unique: boolean;
16
+ readonly tradename: Tradename;
15
17
  }
16
18
  interface UseTrackItemPageViewFunction {
17
19
  (agrs: UseTrackItemPageViewFunctionArgs): void;
@@ -2,7 +2,7 @@ import { useLayoutEffect } from "react";
2
2
  import { useEmitUserEvent } from "@lookiero/sty-psp-tracking";
3
3
  import { TrackingEventName, TrackingEventCategory } from "./tracking";
4
4
  import { PROJECT } from "./tracking";
5
- const useTrackItemPageView = ({ page, country, segment, checkoutId, checkoutItemId, productVariantId, replaceableFor, status, unique, }) => {
5
+ const useTrackItemPageView = ({ page, country, segment, checkoutId, checkoutItemId, productVariantId, replaceableFor, status, unique, tradename, }) => {
6
6
  const emitUserEvent = useEmitUserEvent();
7
7
  useLayoutEffect(() => {
8
8
  if (!(checkoutId && replaceableFor)) {
@@ -20,6 +20,7 @@ const useTrackItemPageView = ({ page, country, segment, checkoutId, checkoutItem
20
20
  productVariantId,
21
21
  replaceableFor: replaceableFor.toString(),
22
22
  unique,
23
+ tradename,
23
24
  };
24
25
  emitUserEvent(itemPageViewTrackingEvent);
25
26
  }, [
@@ -33,6 +34,7 @@ const useTrackItemPageView = ({ page, country, segment, checkoutId, checkoutItem
33
34
  segment,
34
35
  status,
35
36
  unique,
37
+ tradename,
36
38
  ]);
37
39
  };
38
40
  export { useTrackItemPageView };
@@ -1,5 +1,6 @@
1
1
  import { Country } from "@lookiero/sty-psp-locale";
2
2
  import { Segment } from "@lookiero/sty-psp-segment";
3
+ import { Tradename } from "@lookiero/sty-sp-tradename";
3
4
  import { TrackingPage } from "./tracking";
4
5
  interface KeepItemFunction {
5
6
  (): void;
@@ -10,6 +11,7 @@ interface UseTrackKeepItemFunctionArgs {
10
11
  readonly segment: Segment;
11
12
  readonly checkoutId: string | undefined;
12
13
  readonly checkoutItemId: string;
14
+ readonly tradename: Tradename;
13
15
  }
14
16
  interface UseTrackKeepItemFunction {
15
17
  (agrs: UseTrackKeepItemFunctionArgs): KeepItemFunction;
@@ -2,7 +2,7 @@ import { useCallback } from "react";
2
2
  import { useEmitUserEvent } from "@lookiero/sty-psp-tracking";
3
3
  import { TrackingEventName, TrackingEventCategory } from "./tracking";
4
4
  import { PROJECT } from "./tracking";
5
- const useTrackKeepItem = ({ page, country, segment, checkoutId, checkoutItemId }) => {
5
+ const useTrackKeepItem = ({ page, country, tradename, segment, checkoutId, checkoutItemId, }) => {
6
6
  const emitUserEvent = useEmitUserEvent();
7
7
  const keepItem = useCallback(() => {
8
8
  if (!checkoutId) {
@@ -13,12 +13,13 @@ const useTrackKeepItem = ({ page, country, segment, checkoutId, checkoutItemId }
13
13
  eventCategory: TrackingEventCategory.NAVIGATION,
14
14
  section: `${PROJECT}_${page}`,
15
15
  store: country,
16
+ tradename,
16
17
  segment,
17
18
  checkoutId,
18
19
  checkoutItemId,
19
20
  };
20
21
  emitUserEvent(keepItemTrackingEvent);
21
- }, [checkoutId, checkoutItemId, country, emitUserEvent, page, segment]);
22
+ }, [checkoutId, checkoutItemId, country, tradename, emitUserEvent, page, segment]);
22
23
  return keepItem;
23
24
  };
24
25
  export { useTrackKeepItem };
@@ -1,11 +1,13 @@
1
1
  import { Country } from "@lookiero/sty-psp-locale";
2
2
  import { Segment } from "@lookiero/sty-psp-segment";
3
+ import { Tradename } from "@lookiero/sty-sp-tradename";
3
4
  import { TrackingPage } from "./tracking";
4
5
  interface UseTrackPageViewFunctionArgs {
5
6
  readonly page: TrackingPage;
6
7
  readonly country: Country;
7
8
  readonly segment: Segment;
8
9
  readonly checkoutId: string | undefined;
10
+ readonly tradename: Tradename;
9
11
  }
10
12
  interface UseTrackPageViewFunction {
11
13
  (agrs: UseTrackPageViewFunctionArgs): void;
@@ -1,7 +1,7 @@
1
1
  import { useLayoutEffect } from "react";
2
2
  import { useEmitUserEvent } from "@lookiero/sty-psp-tracking";
3
3
  import { PROJECT, TrackingEventName, TrackingEventCategory } from "./tracking";
4
- const useTrackPageView = ({ page, country, segment, checkoutId }) => {
4
+ const useTrackPageView = ({ page, country, tradename, segment, checkoutId }) => {
5
5
  const emitUserEvent = useEmitUserEvent();
6
6
  useLayoutEffect(() => {
7
7
  if (!checkoutId) {
@@ -12,10 +12,11 @@ const useTrackPageView = ({ page, country, segment, checkoutId }) => {
12
12
  eventCategory: TrackingEventCategory.NAVIGATION,
13
13
  section: `${PROJECT}_${page}`,
14
14
  store: country,
15
+ tradename,
15
16
  segment,
16
17
  checkoutId,
17
18
  };
18
19
  emitUserEvent(pageViewTrackingEvent);
19
- }, [checkoutId, country, emitUserEvent, page, segment]);
20
+ }, [checkoutId, country, tradename, emitUserEvent, page, segment]);
20
21
  };
21
22
  export { useTrackPageView };
@@ -1,5 +1,6 @@
1
1
  import { Country } from "@lookiero/sty-psp-locale";
2
2
  import { Segment } from "@lookiero/sty-psp-segment";
3
+ import { Tradename } from "@lookiero/sty-sp-tradename";
3
4
  import { TrackingPage } from "./tracking";
4
5
  interface PressBackFunction {
5
6
  (): void;
@@ -9,6 +10,7 @@ interface UseTrackPressBackFunctionArgs {
9
10
  readonly country: Country;
10
11
  readonly segment: Segment;
11
12
  readonly checkoutId: string | undefined;
13
+ readonly tradename: Tradename;
12
14
  }
13
15
  interface UseTrackPressBackFunction {
14
16
  (args: UseTrackPressBackFunctionArgs): PressBackFunction;
@@ -1,7 +1,7 @@
1
1
  import { useCallback } from "react";
2
2
  import { useEmitUserEvent } from "@lookiero/sty-psp-tracking";
3
3
  import { PROJECT, TrackingEventName, TrackingEventCategory } from "./tracking";
4
- const useTrackPressBack = ({ page, country, segment, checkoutId }) => {
4
+ const useTrackPressBack = ({ page, country, tradename, segment, checkoutId }) => {
5
5
  const emitUserEvent = useEmitUserEvent();
6
6
  const pressBack = useCallback(() => {
7
7
  if (!checkoutId) {
@@ -12,11 +12,12 @@ const useTrackPressBack = ({ page, country, segment, checkoutId }) => {
12
12
  eventCategory: TrackingEventCategory.NAVIGATION,
13
13
  section: `${PROJECT}_${page}`,
14
14
  store: country,
15
+ tradename,
15
16
  segment,
16
17
  checkoutId,
17
18
  };
18
19
  emitUserEvent(pressBackTrackingEvent);
19
- }, [checkoutId, country, emitUserEvent, page, segment]);
20
+ }, [checkoutId, country, tradename, emitUserEvent, page, segment]);
20
21
  return pressBack;
21
22
  };
22
23
  export { useTrackPressBack };
@@ -1,5 +1,6 @@
1
1
  import { Country } from "@lookiero/sty-psp-locale";
2
2
  import { Segment } from "@lookiero/sty-psp-segment";
3
+ import { Tradename } from "@lookiero/sty-sp-tradename";
3
4
  import { TrackingPage } from "./tracking";
4
5
  interface PressContinueFunction {
5
6
  (): void;
@@ -9,6 +10,7 @@ interface UseTrackPressContinueFunctionArgs {
9
10
  readonly country: Country;
10
11
  readonly segment: Segment;
11
12
  readonly checkoutId: string | undefined;
13
+ readonly tradename: Tradename;
12
14
  }
13
15
  interface UseTrackPressContinueFunction {
14
16
  (agrs: UseTrackPressContinueFunctionArgs): PressContinueFunction;
@@ -1,7 +1,7 @@
1
1
  import { useCallback } from "react";
2
2
  import { useEmitUserEvent } from "@lookiero/sty-psp-tracking";
3
3
  import { PROJECT, TrackingEventName, TrackingEventCategory, } from "./tracking";
4
- const useTrackPressContinue = ({ page, country, segment, checkoutId }) => {
4
+ const useTrackPressContinue = ({ page, country, tradename, segment, checkoutId }) => {
5
5
  const emitUserEvent = useEmitUserEvent();
6
6
  const pressContinue = useCallback(() => {
7
7
  if (!checkoutId) {
@@ -12,11 +12,12 @@ const useTrackPressContinue = ({ page, country, segment, checkoutId }) => {
12
12
  eventCategory: TrackingEventCategory.NAVIGATION,
13
13
  section: `${PROJECT}_${page}`,
14
14
  store: country,
15
+ tradename,
15
16
  segment,
16
17
  checkoutId,
17
18
  };
18
19
  emitUserEvent(pressContinueTrackingEvent);
19
- }, [checkoutId, country, emitUserEvent, page, segment]);
20
+ }, [checkoutId, country, tradename, emitUserEvent, page, segment]);
20
21
  return pressContinue;
21
22
  };
22
23
  export { useTrackPressContinue };
@@ -1,5 +1,6 @@
1
1
  import { Country } from "@lookiero/sty-psp-locale";
2
2
  import { Segment } from "@lookiero/sty-psp-segment";
3
+ import { Tradename } from "@lookiero/sty-sp-tradename";
3
4
  import { TrackingPage } from "./tracking";
4
5
  interface PressItemFunctionArgs {
5
6
  readonly checkoutItemId: string;
@@ -12,6 +13,7 @@ interface UseTrackPressItemFunctionArgs {
12
13
  readonly country: Country;
13
14
  readonly segment: Segment;
14
15
  readonly checkoutId: string | undefined;
16
+ readonly tradename: Tradename;
15
17
  }
16
18
  interface UseTrackPressItemFunction {
17
19
  (agrs: UseTrackPressItemFunctionArgs): PressItemFunction;
@@ -1,7 +1,7 @@
1
1
  import { useCallback } from "react";
2
2
  import { useEmitUserEvent } from "@lookiero/sty-psp-tracking";
3
3
  import { PROJECT, TrackingEventName, TrackingEventCategory } from "./tracking";
4
- const useTrackPressItem = ({ page, country, segment, checkoutId }) => {
4
+ const useTrackPressItem = ({ page, country, segment, checkoutId, tradename }) => {
5
5
  const emitUserEvent = useEmitUserEvent();
6
6
  const pressItem = useCallback(({ checkoutItemId }) => {
7
7
  if (!checkoutId) {
@@ -14,10 +14,11 @@ const useTrackPressItem = ({ page, country, segment, checkoutId }) => {
14
14
  store: country,
15
15
  segment,
16
16
  checkoutId,
17
+ tradename,
17
18
  checkoutItemId,
18
19
  };
19
20
  emitUserEvent(pressItemTrackingEvent);
20
- }, [checkoutId, country, emitUserEvent, page, segment]);
21
+ }, [checkoutId, tradename, country, emitUserEvent, page, segment]);
21
22
  return pressItem;
22
23
  };
23
24
  export { useTrackPressItem };
@@ -1,5 +1,6 @@
1
1
  import { Country } from "@lookiero/sty-psp-locale";
2
2
  import { Segment } from "@lookiero/sty-psp-segment";
3
+ import { Tradename } from "@lookiero/sty-sp-tradename";
3
4
  import { TrackingPage } from "./tracking";
4
5
  interface PressNextFunctionArgs {
5
6
  readonly from: string;
@@ -13,6 +14,7 @@ interface UseTrackPressNextFunctionArgs {
13
14
  readonly country: Country;
14
15
  readonly segment: Segment;
15
16
  readonly checkoutId: string | undefined;
17
+ readonly tradename: Tradename;
16
18
  }
17
19
  interface UseTrackPressNextFunction {
18
20
  (args: UseTrackPressNextFunctionArgs): PressNextFunction;
@@ -1,7 +1,7 @@
1
1
  import { useCallback } from "react";
2
2
  import { useEmitUserEvent } from "@lookiero/sty-psp-tracking";
3
3
  import { PROJECT, TrackingEventName, TrackingEventCategory } from "./tracking";
4
- const useTrackPressNext = ({ page, country, segment, checkoutId }) => {
4
+ const useTrackPressNext = ({ page, country, segment, checkoutId, tradename }) => {
5
5
  const emitUserEvent = useEmitUserEvent();
6
6
  const pressNext = useCallback(({ from, to }) => {
7
7
  if (!checkoutId) {
@@ -14,11 +14,12 @@ const useTrackPressNext = ({ page, country, segment, checkoutId }) => {
14
14
  store: country,
15
15
  segment,
16
16
  checkoutId,
17
+ tradename,
17
18
  from,
18
19
  to,
19
20
  };
20
21
  emitUserEvent(pressNextTrackingEvent);
21
- }, [checkoutId, country, emitUserEvent, page, segment]);
22
+ }, [checkoutId, tradename, country, emitUserEvent, page, segment]);
22
23
  return pressNext;
23
24
  };
24
25
  export { useTrackPressNext };
@@ -1,5 +1,6 @@
1
1
  import { Country } from "@lookiero/sty-psp-locale";
2
2
  import { Segment } from "@lookiero/sty-psp-segment";
3
+ import { Tradename } from "@lookiero/sty-sp-tradename";
3
4
  import { TrackingPage } from "./tracking";
4
5
  interface PressPreviousFunctionArgs {
5
6
  readonly from: string;
@@ -13,6 +14,7 @@ interface UseTrackPressPreviousFunctionArgs {
13
14
  readonly country: Country;
14
15
  readonly segment: Segment;
15
16
  readonly checkoutId: string | undefined;
17
+ readonly tradename: Tradename;
16
18
  }
17
19
  interface UseTrackPressPreviousFunction {
18
20
  (args: UseTrackPressPreviousFunctionArgs): PressPreviousFunction;
@@ -1,7 +1,7 @@
1
1
  import { useCallback } from "react";
2
2
  import { useEmitUserEvent } from "@lookiero/sty-psp-tracking";
3
3
  import { PROJECT, TrackingEventName, TrackingEventCategory, } from "./tracking";
4
- const useTrackPressPrevious = ({ page, country, segment, checkoutId }) => {
4
+ const useTrackPressPrevious = ({ page, country, segment, checkoutId, tradename }) => {
5
5
  const emitUserEvent = useEmitUserEvent();
6
6
  const pressPrevious = useCallback(({ from, to }) => {
7
7
  if (!checkoutId) {
@@ -14,11 +14,12 @@ const useTrackPressPrevious = ({ page, country, segment, checkoutId }) => {
14
14
  store: country,
15
15
  segment,
16
16
  checkoutId,
17
+ tradename,
17
18
  from,
18
19
  to,
19
20
  };
20
21
  emitUserEvent(pressPreviousTrackingEvent);
21
- }, [checkoutId, country, emitUserEvent, page, segment]);
22
+ }, [checkoutId, tradename, country, emitUserEvent, page, segment]);
22
23
  return pressPrevious;
23
24
  };
24
25
  export { useTrackPressPrevious };
@@ -1,5 +1,6 @@
1
1
  import { Country } from "@lookiero/sty-psp-locale";
2
2
  import { Segment } from "@lookiero/sty-psp-segment";
3
+ import { Tradename } from "@lookiero/sty-sp-tradename";
3
4
  import { TrackingPage } from "./tracking";
4
5
  interface PressPricingFunctionArgs {
5
6
  readonly collapse: boolean;
@@ -12,6 +13,7 @@ interface UseTrackPressPricingFunctionArgs {
12
13
  readonly country: Country;
13
14
  readonly segment: Segment;
14
15
  readonly checkoutId: string | undefined;
16
+ readonly tradename: Tradename;
15
17
  }
16
18
  interface UseTrackPressPricingFunction {
17
19
  (agrs: UseTrackPressPricingFunctionArgs): PressPricingFunction;
@@ -2,7 +2,7 @@ import { useCallback } from "react";
2
2
  import { useEmitUserEvent } from "@lookiero/sty-psp-tracking";
3
3
  import { TrackingEventName, TrackingEventCategory } from "./tracking";
4
4
  import { PROJECT } from "./tracking";
5
- const useTrackPressPricing = ({ page, country, segment, checkoutId }) => {
5
+ const useTrackPressPricing = ({ page, country, segment, checkoutId, tradename }) => {
6
6
  const emitUserEvent = useEmitUserEvent();
7
7
  const pressPricing = useCallback(({ collapse }) => {
8
8
  if (!checkoutId) {
@@ -15,10 +15,11 @@ const useTrackPressPricing = ({ page, country, segment, checkoutId }) => {
15
15
  store: country,
16
16
  segment,
17
17
  checkoutId,
18
+ tradename,
18
19
  collapse,
19
20
  };
20
21
  emitUserEvent(pressPricingTrackingEvent);
21
- }, [checkoutId, country, emitUserEvent, page, segment]);
22
+ }, [checkoutId, tradename, country, emitUserEvent, page, segment]);
22
23
  return pressPricing;
23
24
  };
24
25
  export { useTrackPressPricing };
@@ -1,5 +1,6 @@
1
1
  import { Country } from "@lookiero/sty-psp-locale";
2
2
  import { Segment } from "@lookiero/sty-psp-segment";
3
+ import { Tradename } from "@lookiero/sty-sp-tradename";
3
4
  import { TrackingPage } from "./tracking";
4
5
  interface ReplaceItemFunctionArgs {
5
6
  readonly replaceFor: string;
@@ -14,6 +15,7 @@ interface UseTrackReplaceItemFunctionArgs {
14
15
  readonly checkoutId: string | undefined;
15
16
  readonly checkoutItemId: string;
16
17
  readonly productVariantId: string;
18
+ readonly tradename: Tradename;
17
19
  }
18
20
  interface UseTrackReplaceItemFunction {
19
21
  (agrs: UseTrackReplaceItemFunctionArgs): ReplaceItemFunction;
@@ -1,7 +1,7 @@
1
1
  import { useCallback } from "react";
2
2
  import { useEmitUserEvent } from "@lookiero/sty-psp-tracking";
3
3
  import { PROJECT, TrackingEventName, TrackingEventCategory } from "./tracking";
4
- const useTrackReplaceItem = ({ page, country, segment, checkoutId, checkoutItemId, productVariantId, }) => {
4
+ const useTrackReplaceItem = ({ page, country, segment, checkoutId, checkoutItemId, productVariantId, tradename, }) => {
5
5
  const emitUserEvent = useEmitUserEvent();
6
6
  const replaceItem = useCallback(({ replaceFor }) => {
7
7
  if (!checkoutId) {
@@ -16,10 +16,11 @@ const useTrackReplaceItem = ({ page, country, segment, checkoutId, checkoutItemI
16
16
  checkoutId,
17
17
  checkoutItemId,
18
18
  productVariantId,
19
+ tradename,
19
20
  replaceFor,
20
21
  };
21
22
  emitUserEvent(replaceItemTrackingEvent);
22
- }, [checkoutId, checkoutItemId, country, emitUserEvent, page, productVariantId, segment]);
23
+ }, [checkoutId, checkoutItemId, country, emitUserEvent, page, productVariantId, tradename, segment]);
23
24
  return replaceItem;
24
25
  };
25
26
  export { useTrackReplaceItem };
@@ -1,5 +1,6 @@
1
1
  import { Country } from "@lookiero/sty-psp-locale";
2
2
  import { Segment } from "@lookiero/sty-psp-segment";
3
+ import { Tradename } from "@lookiero/sty-sp-tradename";
3
4
  import { TrackingPage } from "./tracking";
4
5
  interface ResetItemFunction {
5
6
  (): void;
@@ -10,6 +11,7 @@ interface UseTrackResetItemFunctionArgs {
10
11
  readonly segment: Segment;
11
12
  readonly checkoutId: string | undefined;
12
13
  readonly checkoutItemId: string;
14
+ readonly tradename: Tradename;
13
15
  }
14
16
  interface UseTrackResetItemFunction {
15
17
  (agrs: UseTrackResetItemFunctionArgs): ResetItemFunction;
@@ -1,7 +1,7 @@
1
1
  import { useCallback } from "react";
2
2
  import { useEmitUserEvent } from "@lookiero/sty-psp-tracking";
3
3
  import { PROJECT, TrackingEventName, TrackingEventCategory } from "./tracking";
4
- const useTrackResetItem = ({ page, country, segment, checkoutId, checkoutItemId }) => {
4
+ const useTrackResetItem = ({ page, country, segment, checkoutId, tradename, checkoutItemId, }) => {
5
5
  const emitUserEvent = useEmitUserEvent();
6
6
  const resetItem = useCallback(() => {
7
7
  if (!checkoutId) {
@@ -14,10 +14,11 @@ const useTrackResetItem = ({ page, country, segment, checkoutId, checkoutItemId
14
14
  store: country,
15
15
  segment,
16
16
  checkoutId,
17
+ tradename,
17
18
  checkoutItemId,
18
19
  };
19
20
  emitUserEvent(resetItemTrackingEvent);
20
- }, [checkoutId, checkoutItemId, country, emitUserEvent, page, segment]);
21
+ }, [checkoutId, tradename, checkoutItemId, country, emitUserEvent, page, segment]);
21
22
  return resetItem;
22
23
  };
23
24
  export { useTrackResetItem };