@lookiero/checkout 7.1.0 → 7.2.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 (155) hide show
  1. package/dist/index.d.ts +4 -4
  2. package/dist/index.js +1 -2
  3. package/dist/src/ExpoRoot.js +11 -11
  4. package/dist/src/infrastructure/projection/pricing/pricing.d.ts +1 -1
  5. package/dist/src/infrastructure/tracking/tracking.d.ts +1 -1
  6. package/dist/src/infrastructure/tracking/useTrackAssignedVariationByExperiment.d.ts +1 -1
  7. package/dist/src/infrastructure/tracking/useTrackChangeFeedback.d.ts +1 -1
  8. package/dist/src/infrastructure/tracking/useTrackCheckout.d.ts +2 -2
  9. package/dist/src/infrastructure/tracking/useTrackImageView.d.ts +1 -1
  10. package/dist/src/infrastructure/tracking/useTrackItemPageView.d.ts +1 -1
  11. package/dist/src/infrastructure/tracking/useTrackKeepItem.d.ts +1 -1
  12. package/dist/src/infrastructure/tracking/useTrackPageView.d.ts +1 -1
  13. package/dist/src/infrastructure/tracking/useTrackPressBack.d.ts +1 -1
  14. package/dist/src/infrastructure/tracking/useTrackPressContinue.d.ts +1 -1
  15. package/dist/src/infrastructure/tracking/useTrackPressItem.d.ts +1 -1
  16. package/dist/src/infrastructure/tracking/useTrackPressNext.d.ts +1 -1
  17. package/dist/src/infrastructure/tracking/useTrackPressPrevious.d.ts +1 -1
  18. package/dist/src/infrastructure/tracking/useTrackPressPricing.d.ts +1 -1
  19. package/dist/src/infrastructure/tracking/useTrackReplaceItem.d.ts +1 -1
  20. package/dist/src/infrastructure/tracking/useTrackResetItem.d.ts +1 -1
  21. package/dist/src/infrastructure/tracking/useTrackReturnItem.d.ts +1 -1
  22. package/dist/src/infrastructure/tracking/useTrackTabView.d.ts +1 -1
  23. package/dist/src/infrastructure/ui/Root.d.ts +5 -4
  24. package/dist/src/infrastructure/ui/Root.js +1 -1
  25. package/dist/src/infrastructure/ui/components/atoms/price/Price.d.ts +1 -1
  26. package/dist/src/infrastructure/ui/hooks/useStaticInfo.d.ts +1 -1
  27. package/dist/src/infrastructure/ui/routing/Routing.d.ts +5 -4
  28. package/dist/src/infrastructure/ui/views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal.d.ts +1 -1
  29. package/dist/src/infrastructure/ui/views/item/components/itemActions/ItemActions.d.ts +1 -1
  30. package/dist/src/infrastructure/ui/views/item/components/itemActions/ItemActions.js +1 -1
  31. package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.d.ts +3 -3
  32. package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.js +1 -1
  33. package/dist/src/infrastructure/ui/views/item/views/productVariant/ProductVariant.d.ts +1 -1
  34. package/dist/src/infrastructure/ui/views/return/components/price/Price.d.ts +1 -1
  35. package/dist/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.d.ts +1 -1
  36. package/dist/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.js +1 -1
  37. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +1 -1
  38. package/dist/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.d.ts +3 -3
  39. package/dist/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.js +1 -1
  40. package/dist/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.d.ts +1 -1
  41. package/dist/src/projection/bookedProductsVariants/bookedProductsVariants.d.ts +1 -1
  42. package/dist/src/projection/checkoutItem/checkoutItem.d.ts +2 -2
  43. package/dist/src/projection/pricing/pricing.d.ts +1 -1
  44. package/dist/src/projection/{shared → size}/size.d.ts +1 -1
  45. package/dist/src/projection/{shared → size}/size.js +1 -1
  46. package/dist/src/shared/ui/components/molecules/inputField/InputField.d.ts +1 -1
  47. package/dist/src/shared/ui/components/molecules/inputField/InputField.js +1 -2
  48. package/dist/src/version.d.ts +1 -1
  49. package/dist/src/version.js +1 -1
  50. package/index.ts +4 -5
  51. package/package.json +4 -4
  52. package/src/ExpoRoot.tsx +15 -13
  53. package/src/infrastructure/domain/checkoutItem/model/httpCheckoutItems.test.ts +1 -1
  54. package/src/infrastructure/projection/pricing/pricing.ts +1 -1
  55. package/src/infrastructure/tracking/tracking.ts +1 -1
  56. package/src/infrastructure/tracking/useTrackAssignedVariationByExperiment.test.ts +1 -1
  57. package/src/infrastructure/tracking/useTrackAssignedVariationByExperiment.ts +1 -1
  58. package/src/infrastructure/tracking/useTrackChangeFeedback.test.tsx +1 -1
  59. package/src/infrastructure/tracking/useTrackChangeFeedback.ts +1 -1
  60. package/src/infrastructure/tracking/useTrackCheckout.test.tsx +1 -1
  61. package/src/infrastructure/tracking/useTrackCheckout.ts +2 -2
  62. package/src/infrastructure/tracking/useTrackImageView.test.tsx +1 -1
  63. package/src/infrastructure/tracking/useTrackImageView.ts +1 -1
  64. package/src/infrastructure/tracking/useTrackItemPageView.test.tsx +1 -1
  65. package/src/infrastructure/tracking/useTrackItemPageView.ts +1 -1
  66. package/src/infrastructure/tracking/useTrackKeepItem.test.tsx +1 -1
  67. package/src/infrastructure/tracking/useTrackKeepItem.ts +1 -1
  68. package/src/infrastructure/tracking/useTrackPageView.test.tsx +1 -1
  69. package/src/infrastructure/tracking/useTrackPageView.ts +1 -1
  70. package/src/infrastructure/tracking/useTrackPressBack.test.tsx +1 -1
  71. package/src/infrastructure/tracking/useTrackPressBack.ts +1 -1
  72. package/src/infrastructure/tracking/useTrackPressContinue.test.tsx +1 -1
  73. package/src/infrastructure/tracking/useTrackPressContinue.ts +1 -1
  74. package/src/infrastructure/tracking/useTrackPressItem.test.tsx +1 -1
  75. package/src/infrastructure/tracking/useTrackPressItem.ts +1 -1
  76. package/src/infrastructure/tracking/useTrackPressNext.test.tsx +1 -1
  77. package/src/infrastructure/tracking/useTrackPressNext.ts +1 -1
  78. package/src/infrastructure/tracking/useTrackPressPrevious.test.tsx +1 -1
  79. package/src/infrastructure/tracking/useTrackPressPrevious.ts +1 -1
  80. package/src/infrastructure/tracking/useTrackPressPricing.test.tsx +1 -1
  81. package/src/infrastructure/tracking/useTrackPressPricing.ts +1 -1
  82. package/src/infrastructure/tracking/useTrackReplaceItem.test.tsx +1 -1
  83. package/src/infrastructure/tracking/useTrackReplaceItem.ts +1 -1
  84. package/src/infrastructure/tracking/useTrackResetItem.test.tsx +1 -1
  85. package/src/infrastructure/tracking/useTrackResetItem.ts +1 -1
  86. package/src/infrastructure/tracking/useTrackReturnItem.test.tsx +1 -1
  87. package/src/infrastructure/tracking/useTrackReturnItem.ts +1 -1
  88. package/src/infrastructure/tracking/useTrackTabView.test.tsx +1 -1
  89. package/src/infrastructure/tracking/useTrackTabView.ts +1 -1
  90. package/src/infrastructure/ui/Root.tsx +6 -5
  91. package/src/infrastructure/ui/components/atoms/price/Price.test.tsx +1 -1
  92. package/src/infrastructure/ui/components/atoms/price/Price.tsx +1 -1
  93. package/src/infrastructure/ui/hooks/useStaticInfo.test.tsx +1 -1
  94. package/src/infrastructure/ui/hooks/useStaticInfo.tsx +1 -1
  95. package/src/infrastructure/ui/routing/Routing.tsx +5 -4
  96. package/src/infrastructure/ui/views/checkout/Checkout.test.tsx +1 -1
  97. package/src/infrastructure/ui/views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal.test.tsx +1 -1
  98. package/src/infrastructure/ui/views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal.tsx +1 -1
  99. package/src/infrastructure/ui/views/feedback/Feedback.test.tsx +1 -1
  100. package/src/infrastructure/ui/views/item/Item.test.tsx +1 -1
  101. package/src/infrastructure/ui/views/item/components/itemActions/ItemActions.test.tsx +1 -1
  102. package/src/infrastructure/ui/views/item/components/itemActions/ItemActions.tsx +2 -2
  103. package/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.test.tsx +1 -1
  104. package/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.tsx +3 -3
  105. package/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.test.tsx +1 -1
  106. package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.test.tsx +1 -1
  107. package/src/infrastructure/ui/views/item/views/productVariant/ProductVariant.test.tsx +1 -1
  108. package/src/infrastructure/ui/views/item/views/productVariant/ProductVariant.tsx +1 -1
  109. package/src/infrastructure/ui/views/return/components/price/Price.test.tsx +1 -1
  110. package/src/infrastructure/ui/views/return/components/price/Price.tsx +1 -1
  111. package/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.tsx +2 -2
  112. package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +1 -1
  113. package/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.test.tsx +1 -1
  114. package/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.tsx +3 -3
  115. package/src/infrastructure/ui/views/summary/Summary.test.tsx +1 -1
  116. package/src/infrastructure/ui/views/summaryTabs/SummaryTabs.test.tsx +1 -1
  117. package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.test.tsx +1 -1
  118. package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.tsx +2 -2
  119. package/src/projection/bookedProductsVariants/bookedProductsVariants.ts +1 -1
  120. package/src/projection/checkoutItem/checkoutItem.ts +2 -2
  121. package/src/projection/pricing/pricing.ts +1 -1
  122. package/src/projection/{shared → size}/size.test.ts +1 -1
  123. package/src/projection/{shared → size}/size.ts +1 -1
  124. package/src/shared/ui/components/molecules/inputField/InputField.tsx +1 -2
  125. package/dist/src/infrastructure/ui/i18n/fetchTranslations.d.ts +0 -9
  126. package/dist/src/infrastructure/ui/i18n/fetchTranslations.js +0 -9
  127. package/dist/src/infrastructure/ui/i18n/translationEndpoint.d.ts +0 -19
  128. package/dist/src/infrastructure/ui/i18n/translationEndpoint.js +0 -21
  129. package/dist/src/projection/shared/country.d.ts +0 -14
  130. package/dist/src/projection/shared/country.js +0 -15
  131. package/dist/src/projection/shared/locale.d.ts +0 -12
  132. package/dist/src/projection/shared/locale.js +0 -13
  133. package/dist/src/shared/ui/components/atoms/error/Error.d.ts +0 -10
  134. package/dist/src/shared/ui/components/atoms/error/Error.js +0 -4
  135. package/src/infrastructure/ui/i18n/fetchTranslations.test.ts +0 -29
  136. package/src/infrastructure/ui/i18n/fetchTranslations.ts +0 -27
  137. package/src/infrastructure/ui/i18n/translationEndpoint.test.ts +0 -13
  138. package/src/infrastructure/ui/i18n/translationEndpoint.ts +0 -50
  139. package/src/projection/shared/country.ts +0 -15
  140. package/src/projection/shared/locale.ts +0 -13
  141. package/src/shared/ui/components/atoms/error/Error.test.tsx +0 -11
  142. package/src/shared/ui/components/atoms/error/Error.tsx +0 -18
  143. package/src/shared/ui/components/atoms/error/__snapshots__/Error.test.tsx.snap +0 -54
  144. /package/dist/src/projection/{shared → customer}/customer.d.ts +0 -0
  145. /package/dist/src/projection/{shared → customer}/customer.js +0 -0
  146. /package/dist/src/projection/{shared → order}/order.d.ts +0 -0
  147. /package/dist/src/projection/{shared → order}/order.js +0 -0
  148. /package/dist/src/projection/{shared → price}/price.d.ts +0 -0
  149. /package/dist/src/projection/{shared → price}/price.js +0 -0
  150. /package/dist/src/projection/{shared → subscription}/subscription.d.ts +0 -0
  151. /package/dist/src/projection/{shared → subscription}/subscription.js +0 -0
  152. /package/src/projection/{shared → customer}/customer.ts +0 -0
  153. /package/src/projection/{shared → order}/order.ts +0 -0
  154. /package/src/projection/{shared → price}/price.ts +0 -0
  155. /package/src/projection/{shared → subscription}/subscription.ts +0 -0
@@ -1,8 +1,8 @@
1
1
  import { fireEvent, RenderAPI } from "@testing-library/react-native";
2
2
  import React from "react";
3
+ import { Country } from "@lookiero/sty-psp-locale";
3
4
  import { ProductVariantProjection } from "../../../../../../projection/bookedProductsVariants/bookedProductsVariants";
4
5
  import { CheckoutItemProductVariantProjection } from "../../../../../../projection/checkoutItem/checkoutItem";
5
- import { Country } from "../../../../../../projection/shared/country";
6
6
  import { I18nMessages } from "../../../../i18n/i18n";
7
7
  import { render } from "../../../../test/render";
8
8
  import { ItemActions } from "./ItemActions";
@@ -2,10 +2,10 @@ import React, { FC, useCallback, useMemo, useState } from "react";
2
2
  import { LayoutRectangle, View } from "react-native";
3
3
  import { Button, BUTTON_VARIANT } from "@lookiero/aurora";
4
4
  import { useI18nMessage } from "@lookiero/i18n-react";
5
+ import { Country } from "@lookiero/sty-psp-locale";
5
6
  import { Sticky } from "@lookiero/sty-psp-ui";
6
7
  import { ProductVariantProjection } from "../../../../../../projection/bookedProductsVariants/bookedProductsVariants";
7
- import { Country } from "../../../../../../projection/shared/country";
8
- import { size } from "../../../../../../projection/shared/size";
8
+ import { size } from "../../../../../../projection/size/size";
9
9
  import { Body } from "../../../../components/layouts/body/Body";
10
10
  import { I18nMessages } from "../../../../i18n/i18n";
11
11
  import { SelectModal } from "../selectModal/SelectModal";
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
+ import { Country } from "@lookiero/sty-psp-locale";
2
3
  import { Currency } from "../../../../../../domain/checkoutItem/model/currency";
3
- import { Country } from "../../../../../../projection/shared/country";
4
4
  import { I18nMessages } from "../../../../i18n/i18n";
5
5
  import { render } from "../../../../test/render";
6
6
  import { ProductVariantDescription } from "./ProductVariantDescription";
@@ -2,10 +2,10 @@ import React, { FC } from "react";
2
2
  import { View } from "react-native";
3
3
  import { COLOR, Text } from "@lookiero/aurora";
4
4
  import { useI18nMessage } from "@lookiero/i18n-react";
5
+ import { Country } from "@lookiero/sty-psp-locale";
5
6
  import { useScreenSize } from "@lookiero/sty-psp-ui";
6
- import { Country } from "../../../../../../projection/shared/country";
7
- import { PriceProjection } from "../../../../../../projection/shared/price";
8
- import { size, SizeProjection } from "../../../../../../projection/shared/size";
7
+ import { PriceProjection } from "../../../../../../projection/price/price";
8
+ import { SizeProjection, size } from "../../../../../../projection/size/size";
9
9
  import { Price } from "../../../../components/atoms/price/Price";
10
10
  import { I18nMessages } from "../../../../i18n/i18n";
11
11
  import { style } from "./ProductVariantDescription.style";
@@ -1,9 +1,9 @@
1
1
  import { fireEvent, RenderAPI } from "@testing-library/react-native";
2
2
  import React from "react";
3
3
  import { CommandStatus } from "@lookiero/messaging-react";
4
+ import { Country } from "@lookiero/sty-psp-locale";
4
5
  import { Segment } from "@lookiero/sty-psp-segment";
5
6
  import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
6
- import { Country } from "../../../../../../projection/shared/country";
7
7
  import { useResetCheckoutItem } from "../../../../../domain/checkoutItem/react/useResetCheckoutItem";
8
8
  import { checkoutItem } from "../../../../../projection/checkoutItem/checkoutItem.mock";
9
9
  import { returnQuestions as mockReturnQuestions } from "../../../../../projection/returnQuestion/returnQuestions.mock";
@@ -1,10 +1,10 @@
1
1
  import { fireEvent, RenderAPI, within } from "@testing-library/react-native";
2
2
  import React from "react";
3
3
  import { CommandStatus } from "@lookiero/messaging-react";
4
+ import { Country } from "@lookiero/sty-psp-locale";
4
5
  import { Segment } from "@lookiero/sty-psp-segment";
5
6
  import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
6
7
  import { BookedProductsVariantsProjection } from "../../../../../../projection/bookedProductsVariants/bookedProductsVariants";
7
- import { Country } from "../../../../../../projection/shared/country";
8
8
  import { useKeepCheckoutItem } from "../../../../../domain/checkoutItem/react/useKeepCheckoutItem";
9
9
  import { useReplaceCheckoutItem } from "../../../../../domain/checkoutItem/react/useReplaceCheckoutItem";
10
10
  import { bookedProductsVariants as mockBookedProductsVariants } from "../../../../../projection/bookedProductsVariants/bookedProductsVariants.mock";
@@ -1,10 +1,10 @@
1
1
  import { RenderAPI, fireEvent } from "@testing-library/react-native";
2
2
  import React from "react";
3
+ import { Country } from "@lookiero/sty-psp-locale";
3
4
  import { Segment } from "@lookiero/sty-psp-segment";
4
5
  import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
5
6
  import { ProductVariantProjection } from "../../../../../../projection/bookedProductsVariants/bookedProductsVariants";
6
7
  import { CheckoutItemProjection } from "../../../../../../projection/checkoutItem/checkoutItem";
7
- import { Country } from "../../../../../../projection/shared/country";
8
8
  import { checkoutItem } from "../../../../../projection/checkoutItem/checkoutItem.mock";
9
9
  import { render } from "../../../../test/render";
10
10
  import { ProductVariant } from "./ProductVariant";
@@ -1,5 +1,6 @@
1
1
  import React, { FC, ReactNode, useCallback, useEffect } from "react";
2
2
  import { StyleProp, View, ViewStyle } from "react-native";
3
+ import { Country } from "@lookiero/sty-psp-locale";
3
4
  import { Segment } from "@lookiero/sty-psp-segment";
4
5
  import { useScreenSize } from "@lookiero/sty-psp-ui";
5
6
  import { ProductVariantProjection } from "../../../../../../projection/bookedProductsVariants/bookedProductsVariants";
@@ -8,7 +9,6 @@ import {
8
9
  MediaPerspective,
9
10
  MediaProjection,
10
11
  } from "../../../../../../projection/checkoutItem/checkoutItem";
11
- import { Country } from "../../../../../../projection/shared/country";
12
12
  import { TrackingPage } from "../../../../../tracking/tracking";
13
13
  import { useTrackImageView } from "../../../../../tracking/useTrackImageView";
14
14
  import { ProductVariantDescription } from "../../components/productVariantDescription/ProductVariantDescription";
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { Currency } from "../../../../../../domain/checkoutItem/model/currency";
3
- import { PriceProjection } from "../../../../../../projection/shared/price";
3
+ import { PriceProjection } from "../../../../../../projection/price/price";
4
4
  import { render } from "../../../../test/render";
5
5
  import { Price } from "./Price";
6
6
 
@@ -2,7 +2,7 @@ import React, { FC } from "react";
2
2
  import { View } from "react-native";
3
3
  import { Text } from "@lookiero/aurora";
4
4
  import { useI18nNumber } from "@lookiero/i18n-react";
5
- import { PriceProjection } from "../../../../../../projection/shared/price";
5
+ import { PriceProjection } from "../../../../../../projection/price/price";
6
6
  import { style } from "./Price.style";
7
7
 
8
8
  interface PriceProps {
@@ -2,10 +2,10 @@ import React, { FC } from "react";
2
2
  import { Image } from "react-native";
3
3
  import { COLOR, Text, View, useDevice } from "@lookiero/aurora";
4
4
  import { useI18nMessage } from "@lookiero/i18n-react";
5
+ import { Country } from "@lookiero/sty-psp-locale";
5
6
  import { Column, Row } from "@lookiero/sty-psp-ui";
6
7
  import { CheckoutItemProjection } from "../../../../../../projection/checkoutItem/checkoutItem";
7
- import { Country } from "../../../../../../projection/shared/country";
8
- import { size } from "../../../../../../projection/shared/size";
8
+ import { size } from "../../../../../../projection/size/size";
9
9
  import { useMediaImage } from "../../../../hooks/useMediaImage";
10
10
  import { I18nMessages } from "../../../../i18n/i18n";
11
11
  import { Price } from "../price/Price";
@@ -5,13 +5,13 @@ import { generatePath, useNavigate } from "react-router-native";
5
5
  import { Box, Button, Layout as AuroraLayout, Spinner, Text, View, useDevice } from "@lookiero/aurora";
6
6
  import { useI18nMessage } from "@lookiero/i18n-react";
7
7
  import { CommandStatus } from "@lookiero/messaging-react";
8
+ import { Country } from "@lookiero/sty-psp-locale";
8
9
  import { useLogger } from "@lookiero/sty-psp-logging";
9
10
  import { Segment } from "@lookiero/sty-psp-segment";
10
11
  import { Layout as UiLayout } from "@lookiero/sty-psp-ui";
11
12
  import { CheckoutProjection } from "../../../../../../projection/checkout/checkout";
12
13
  import { CheckoutItemProjection } from "../../../../../../projection/checkoutItem/checkoutItem";
13
14
  import { ReturnQuestionType } from "../../../../../../projection/returnQuestion/returnQuestion";
14
- import { Country } from "../../../../../../projection/shared/country";
15
15
  import { useReturnCheckoutItem } from "../../../../../domain/checkoutItem/react/useReturnCheckoutItem";
16
16
  import { useListReturnQuestionsByCheckoutItemId } from "../../../../../projection/returnQuestion/react/useListReturnQuestionsByCheckoutItemId";
17
17
  import { TrackingPage } from "../../../../../tracking/tracking";
@@ -1,9 +1,9 @@
1
1
  import { fireEvent } from "@testing-library/react-native";
2
2
  import React from "react";
3
+ import { Country } from "@lookiero/sty-psp-locale";
3
4
  import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
4
5
  import { Currency } from "../../../../../../domain/checkoutItem/model/currency";
5
6
  import { ColorProjection, MediaPerspective } from "../../../../../../projection/checkoutItem/checkoutItem";
6
- import { Country } from "../../../../../../projection/shared/country";
7
7
  import { COLOR_I18N_PREFIX, I18nMessages } from "../../../../i18n/i18n";
8
8
  import { render } from "../../../../test/render";
9
9
  import { ProductVariant } from "./ProductVariant";
@@ -2,11 +2,11 @@ import React, { FC } from "react";
2
2
  import { Image, ImageStyle, Pressable, StyleProp, View } from "react-native";
3
3
  import { COLOR, Icon, Text } from "@lookiero/aurora";
4
4
  import { useI18nMessage } from "@lookiero/i18n-react";
5
+ import { Country } from "@lookiero/sty-psp-locale";
5
6
  import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
6
7
  import { ColorProjection, MediaProjection } from "../../../../../../projection/checkoutItem/checkoutItem";
7
- import { Country } from "../../../../../../projection/shared/country";
8
- import { PriceProjection } from "../../../../../../projection/shared/price";
9
- import { SizeProjection, size } from "../../../../../../projection/shared/size";
8
+ import { PriceProjection } from "../../../../../../projection/price/price";
9
+ import { size, SizeProjection } from "../../../../../../projection/size/size";
10
10
  import { Price } from "../../../../components/atoms/price/Price";
11
11
  import { useMediaImage } from "../../../../hooks/useMediaImage";
12
12
  import { COLOR_I18N_PREFIX, I18nMessages } from "../../../../i18n/i18n";
@@ -2,10 +2,10 @@ import { fireEvent } from "@testing-library/react-native";
2
2
  import React from "react";
3
3
  import { Text } from "react-native";
4
4
  import { QueryStatus } from "@lookiero/messaging-react";
5
+ import { Country } from "@lookiero/sty-psp-locale";
5
6
  import { Segment } from "@lookiero/sty-psp-segment";
6
7
  import { DummyLayout } from "@lookiero/sty-psp-ui";
7
8
  import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
8
- import { Country } from "../../../../projection/shared/country";
9
9
  import { checkout } from "../../../projection/checkout/checkout.mock";
10
10
  import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
11
11
  import { useViewFiveItemsDiscountByCustomerId } from "../../../projection/checkout/react/useViewFiveItemsDiscountByCustomerId";
@@ -1,9 +1,9 @@
1
1
  import { fireEvent, waitFor } from "@testing-library/react-native";
2
2
  import React from "react";
3
3
  import { QueryStatus } from "@lookiero/messaging-react";
4
+ import { Country } from "@lookiero/sty-psp-locale";
4
5
  import { Segment } from "@lookiero/sty-psp-segment";
5
6
  import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
6
- import { Country } from "../../../../projection/shared/country";
7
7
  import { checkout } from "../../../projection/checkout/checkout.mock";
8
8
  import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
9
9
  import { render } from "../../test/render";
@@ -1,8 +1,8 @@
1
1
  import { fireEvent } from "@testing-library/react-native";
2
2
  import React from "react";
3
+ import { Country } from "@lookiero/sty-psp-locale";
3
4
  import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
4
5
  import { CheckoutItemProjection } from "../../../../../../projection/checkoutItem/checkoutItem";
5
- import { Country } from "../../../../../../projection/shared/country";
6
6
  import { checkoutItem } from "../../../../../projection/checkoutItem/checkoutItem.mock";
7
7
  import { I18nMessages } from "../../../../i18n/i18n";
8
8
  import { render } from "../../../../test/render";
@@ -2,14 +2,14 @@ import React, { FC, useCallback, useMemo } from "react";
2
2
  import { View } from "react-native";
3
3
  import { Text, useDevice } from "@lookiero/aurora";
4
4
  import { useI18nMessage } from "@lookiero/i18n-react";
5
+ import { Country } from "@lookiero/sty-psp-locale";
5
6
  import { RenderItemFunction, Tabs } from "@lookiero/sty-psp-ui";
6
7
  import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
7
8
  import {
8
9
  CheckoutItemProductVariantProjection,
9
10
  CheckoutItemProjection,
10
11
  } from "../../../../../../projection/checkoutItem/checkoutItem";
11
- import { Country } from "../../../../../../projection/shared/country";
12
- import { PriceProjection } from "../../../../../../projection/shared/price";
12
+ import { PriceProjection } from "../../../../../../projection/price/price";
13
13
  import { I18nMessages } from "../../../../i18n/i18n";
14
14
  import { ProductVariant, ProductVariantStyle } from "../../../shared/components/productVariant/ProductVariant";
15
15
  import { style } from "./CheckoutItemsTabs.style";
@@ -1,4 +1,4 @@
1
- import { SizeProjection } from "../shared/size";
1
+ import { SizeProjection } from "../size/size";
2
2
 
3
3
  interface ProductVariantProjection {
4
4
  readonly id: string;
@@ -1,7 +1,7 @@
1
1
  import { CheckoutItemStatus } from "../../domain/checkoutItem/model/checkoutItem";
2
2
  import { FeedbackProjection } from "../feedback/feedback";
3
- import { PriceProjection } from "../shared/price";
4
- import { SizeProjection } from "../shared/size";
3
+ import { PriceProjection } from "../price/price";
4
+ import { SizeProjection } from "../size/size";
5
5
 
6
6
  enum MediaPerspective {
7
7
  BACK = "BACK",
@@ -1,4 +1,4 @@
1
- import { PriceProjection } from "../shared/price";
1
+ import { PriceProjection } from "../price/price";
2
2
 
3
3
  interface ServiceProjection {
4
4
  readonly discount: PriceProjection;
@@ -1,4 +1,4 @@
1
- import { Country } from "./country";
1
+ import { Country } from "@lookiero/sty-psp-locale";
2
2
  import { size, SizeProjection } from "./size";
3
3
 
4
4
  const sizeProjection: SizeProjection = {
@@ -1,4 +1,4 @@
1
- import { Country } from "./country";
1
+ import { Country } from "@lookiero/sty-psp-locale";
2
2
 
3
3
  interface SizeProjection {
4
4
  readonly id: string;
@@ -1,8 +1,7 @@
1
1
  import React, { FC, useCallback, useState } from "react";
2
2
  import { StyleProp, TextStyle, View, ViewStyle } from "react-native";
3
3
  import { COLOR, Icon, IconName, Input, InputProperties } from "@lookiero/aurora";
4
- import { theme } from "@lookiero/sty-psp-ui";
5
- import { Error, ErrorStyle } from "../../atoms/error/Error";
4
+ import { Error, ErrorStyle, theme } from "@lookiero/sty-psp-ui";
6
5
  import { Field, FieldStyle } from "../../atoms/field/Field";
7
6
  import { style } from "./InputField.style";
8
7
 
@@ -1,9 +0,0 @@
1
- import { EndpointFunction, FetchTranslationFuction } from "@lookiero/i18n";
2
- interface FetchTranslationsFuntionArgs {
3
- readonly translations: EndpointFunction[];
4
- }
5
- interface FetchTranslationsFuntion {
6
- (args: FetchTranslationsFuntionArgs): FetchTranslationFuction;
7
- }
8
- declare const fetchTranslations: FetchTranslationsFuntion;
9
- export { fetchTranslations };
@@ -1,9 +0,0 @@
1
- import { fetchFetchTranslation } from "@lookiero/i18n";
2
- const fetchTranslations = ({ translations }) => async ({ locale }) => {
3
- const translationsMessages = await Promise.all(translations.map((endpoint) => fetchFetchTranslation({ endpoint })({ locale })));
4
- return translationsMessages.reduce((acc, translationMessages) => ({
5
- ...acc,
6
- ...translationMessages,
7
- }), {});
8
- };
9
- export { fetchTranslations };
@@ -1,19 +0,0 @@
1
- import { EndpointFunction } from "@lookiero/i18n";
2
- interface TranslationEndpointFunctionArgs {
3
- readonly translationsUrl: string;
4
- readonly translationsApiKey: string;
5
- }
6
- interface TranslationEndpointFunction {
7
- (args: TranslationEndpointFunctionArgs): EndpointFunction;
8
- }
9
- declare const translationEndpoint: TranslationEndpointFunction;
10
- type Project = "user-area-front" | "inventory-catalog" | "checkout";
11
- interface TranslationExternalEndpointFunctionArgs {
12
- readonly translationsUrl: string;
13
- readonly projects: [project: Project, filter?: string][];
14
- }
15
- interface TranslationExternalEndpointFunction {
16
- (args: TranslationExternalEndpointFunctionArgs): EndpointFunction;
17
- }
18
- declare const translationExternalEndpoint: TranslationExternalEndpointFunction;
19
- export { translationEndpoint, translationExternalEndpoint };
@@ -1,21 +0,0 @@
1
- import { Country } from "../../../projection/shared/country";
2
- import { Locale } from "../../../projection/shared/locale";
3
- const translationEndpoint = ({ translationsUrl, translationsApiKey }) => (locale) => `${translationsUrl}/${locale}?key=${translationsApiKey}&no-folding=true`;
4
- const COUNTRY = {
5
- [Locale.ES]: Country.ES,
6
- [Locale.FR]: Country.FR,
7
- [Locale.EN]: Country.GB,
8
- [Locale.IT]: Country.IT,
9
- [Locale.PT]: Country.PT,
10
- [Locale.DE]: Country.DE,
11
- [Locale.AT]: Country.AT,
12
- [Locale.NL]: Country.NL,
13
- [Locale.SE]: Country.SE,
14
- };
15
- const translationExternalEndpoint = ({ translationsUrl, projects }) => (locale) => {
16
- const projectsQueryParam = projects
17
- .map(([project, filter]) => `projectFilter=${project}${filter ? `:${filter}` : ""}`)
18
- .join("&");
19
- return `${translationsUrl}/${locale}/${COUNTRY[locale]}?${projectsQueryParam}`;
20
- };
21
- export { translationEndpoint, translationExternalEndpoint };
@@ -1,14 +0,0 @@
1
- declare enum Country {
2
- ES = "ES",
3
- FR = "FR",
4
- GB = "GB",
5
- BE = "BE",
6
- LU = "LU",
7
- IT = "IT",
8
- PT = "PT",
9
- DE = "DE",
10
- AT = "AT",
11
- NL = "NL",
12
- SE = "SE"
13
- }
14
- export { Country };
@@ -1,15 +0,0 @@
1
- var Country;
2
- (function (Country) {
3
- Country["ES"] = "ES";
4
- Country["FR"] = "FR";
5
- Country["GB"] = "GB";
6
- Country["BE"] = "BE";
7
- Country["LU"] = "LU";
8
- Country["IT"] = "IT";
9
- Country["PT"] = "PT";
10
- Country["DE"] = "DE";
11
- Country["AT"] = "AT";
12
- Country["NL"] = "NL";
13
- Country["SE"] = "SE";
14
- })(Country || (Country = {}));
15
- export { Country };
@@ -1,12 +0,0 @@
1
- declare enum Locale {
2
- ES = "es",
3
- FR = "fr",
4
- EN = "en",
5
- IT = "it",
6
- PT = "pt",
7
- DE = "de",
8
- AT = "at",
9
- NL = "nl",
10
- SE = "sv"
11
- }
12
- export { Locale };
@@ -1,13 +0,0 @@
1
- var Locale;
2
- (function (Locale) {
3
- Locale["ES"] = "es";
4
- Locale["FR"] = "fr";
5
- Locale["EN"] = "en";
6
- Locale["IT"] = "it";
7
- Locale["PT"] = "pt";
8
- Locale["DE"] = "de";
9
- Locale["AT"] = "at";
10
- Locale["NL"] = "nl";
11
- Locale["SE"] = "sv";
12
- })(Locale || (Locale = {}));
13
- export { Locale };
@@ -1,10 +0,0 @@
1
- import { FC } from "react";
2
- import { StyleProp, TextStyle } from "react-native";
3
- type ErrorStyle = StyleProp<TextStyle>;
4
- interface ErrorProps {
5
- readonly error?: string | null;
6
- readonly style?: ErrorStyle;
7
- }
8
- declare const Error: FC<ErrorProps>;
9
- export type { ErrorStyle };
10
- export { Error };
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import { COLOR, Text } from "@lookiero/aurora";
3
- const Error = ({ error, style: customStyle }) => (React.createElement(Text, { color: COLOR.TEXT_ERROR, level: 2, style: customStyle, detail: true }, error));
4
- export { Error };
@@ -1,29 +0,0 @@
1
- import { EndpointFunction } from "@lookiero/i18n";
2
- import { fetchTranslations } from "./fetchTranslations";
3
- import { translationEndpoint } from "./translationEndpoint";
4
-
5
- const translations: EndpointFunction[] = [
6
- (locale) => translationEndpoint({ translationsUrl: "", translationsApiKey: "" })(locale),
7
- (locale) => translationEndpoint({ translationsUrl: "", translationsApiKey: "" })(locale),
8
- ];
9
- const locale = "es";
10
-
11
- const mockFetchFetchTranslation = jest.fn();
12
- jest.mock("@lookiero/i18n", () => ({
13
- fetchFetchTranslation: jest.fn(() => mockFetchFetchTranslation),
14
- }));
15
-
16
- describe("fetchTranslations", () => {
17
- test("does fetch translations with the expected response", async () => {
18
- mockFetchFetchTranslation
19
- .mockResolvedValueOnce({ test: "test" })
20
- .mockResolvedValueOnce({ another_test: "another_test" });
21
-
22
- const results = await fetchTranslations({ translations })({ locale });
23
-
24
- expect(results).toStrictEqual({
25
- test: "test",
26
- another_test: "another_test",
27
- });
28
- });
29
- });
@@ -1,27 +0,0 @@
1
- import { EndpointFunction, fetchFetchTranslation, FetchTranslationFuction } from "@lookiero/i18n";
2
-
3
- interface FetchTranslationsFuntionArgs {
4
- readonly translations: EndpointFunction[];
5
- }
6
-
7
- interface FetchTranslationsFuntion {
8
- (args: FetchTranslationsFuntionArgs): FetchTranslationFuction;
9
- }
10
-
11
- const fetchTranslations: FetchTranslationsFuntion =
12
- ({ translations }) =>
13
- async ({ locale }) => {
14
- const translationsMessages = await Promise.all(
15
- translations.map((endpoint) => fetchFetchTranslation({ endpoint })({ locale })),
16
- );
17
-
18
- return translationsMessages.reduce(
19
- (acc, translationMessages) => ({
20
- ...acc,
21
- ...translationMessages,
22
- }),
23
- {},
24
- );
25
- };
26
-
27
- export { fetchTranslations };
@@ -1,13 +0,0 @@
1
- import { translationEndpoint } from "./translationEndpoint";
2
-
3
- const translationsUrl = "https://translation_url.com";
4
- const translationsApiKey = "NZpj4kL_BRo0ugLDTgV34s9ZVlopBFyM";
5
- const locale = "es";
6
-
7
- describe("translationEndpoint", () => {
8
- test("create translation endpoint with the expected response", async () => {
9
- expect(translationEndpoint({ translationsUrl, translationsApiKey })(locale)).toStrictEqual(
10
- "https://translation_url.com/es?key=NZpj4kL_BRo0ugLDTgV34s9ZVlopBFyM&no-folding=true",
11
- );
12
- });
13
- });
@@ -1,50 +0,0 @@
1
- import { EndpointFunction } from "@lookiero/i18n";
2
- import { Country } from "../../../projection/shared/country";
3
- import { Locale } from "../../../projection/shared/locale";
4
-
5
- interface TranslationEndpointFunctionArgs {
6
- readonly translationsUrl: string;
7
- readonly translationsApiKey: string;
8
- }
9
- interface TranslationEndpointFunction {
10
- (args: TranslationEndpointFunctionArgs): EndpointFunction;
11
- }
12
-
13
- const translationEndpoint: TranslationEndpointFunction =
14
- ({ translationsUrl, translationsApiKey }) =>
15
- (locale) =>
16
- `${translationsUrl}/${locale}?key=${translationsApiKey}&no-folding=true`;
17
-
18
- type Project = "user-area-front" | "inventory-catalog" | "checkout";
19
-
20
- const COUNTRY: Record<Locale, Country> = {
21
- [Locale.ES]: Country.ES,
22
- [Locale.FR]: Country.FR,
23
- [Locale.EN]: Country.GB,
24
- [Locale.IT]: Country.IT,
25
- [Locale.PT]: Country.PT,
26
- [Locale.DE]: Country.DE,
27
- [Locale.AT]: Country.AT,
28
- [Locale.NL]: Country.NL,
29
- [Locale.SE]: Country.SE,
30
- };
31
-
32
- interface TranslationExternalEndpointFunctionArgs {
33
- readonly translationsUrl: string;
34
- readonly projects: [project: Project, filter?: string][];
35
- }
36
- interface TranslationExternalEndpointFunction {
37
- (args: TranslationExternalEndpointFunctionArgs): EndpointFunction;
38
- }
39
-
40
- const translationExternalEndpoint: TranslationExternalEndpointFunction =
41
- ({ translationsUrl, projects }) =>
42
- (locale) => {
43
- const projectsQueryParam = projects
44
- .map(([project, filter]) => `projectFilter=${project}${filter ? `:${filter}` : ""}`)
45
- .join("&");
46
-
47
- return `${translationsUrl}/${locale}/${COUNTRY[locale as Locale]}?${projectsQueryParam}`;
48
- };
49
-
50
- export { translationEndpoint, translationExternalEndpoint };
@@ -1,15 +0,0 @@
1
- enum Country {
2
- ES = "ES",
3
- FR = "FR",
4
- GB = "GB",
5
- BE = "BE",
6
- LU = "LU",
7
- IT = "IT",
8
- PT = "PT",
9
- DE = "DE",
10
- AT = "AT",
11
- NL = "NL",
12
- SE = "SE",
13
- }
14
-
15
- export { Country };
@@ -1,13 +0,0 @@
1
- enum Locale {
2
- ES = "es",
3
- FR = "fr",
4
- EN = "en",
5
- IT = "it",
6
- PT = "pt",
7
- DE = "de",
8
- AT = "at",
9
- NL = "nl",
10
- SE = "sv",
11
- }
12
-
13
- export { Locale };
@@ -1,11 +0,0 @@
1
- import React from "react";
2
- import { render } from "../../../../../infrastructure/ui/test/render";
3
- import { Error } from "./Error";
4
-
5
- describe("Error atom", () => {
6
- it("matches the snapshot", () => {
7
- const { toJSON } = render(<Error error="Error" />);
8
-
9
- expect(toJSON()).toMatchSnapshot();
10
- });
11
- });
@@ -1,18 +0,0 @@
1
- import React, { FC } from "react";
2
- import { StyleProp, TextStyle } from "react-native";
3
- import { COLOR, Text } from "@lookiero/aurora";
4
-
5
- type ErrorStyle = StyleProp<TextStyle>;
6
-
7
- interface ErrorProps {
8
- readonly error?: string | null;
9
- readonly style?: ErrorStyle;
10
- }
11
- const Error: FC<ErrorProps> = ({ error, style: customStyle }) => (
12
- <Text color={COLOR.TEXT_ERROR} level={2} style={customStyle} detail>
13
- {error}
14
- </Text>
15
- );
16
-
17
- export type { ErrorStyle };
18
- export { Error };