@lookiero/checkout 14.4.0 → 14.8.0-beta.1

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 (70) hide show
  1. package/dist/public/public/assets/adaptive-icon.png +0 -0
  2. package/dist/public/public/assets/favicon.png +0 -0
  3. package/dist/public/public/assets/icon.png +0 -0
  4. package/dist/public/public/assets/splash.png +0 -0
  5. package/dist/public/public/images/not-found.png +0 -0
  6. package/dist/src/ExpoRoot.js +2 -3
  7. package/dist/src/infrastructure/delivery/bootstrap.mock.js +2 -2
  8. package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.js +2 -3
  9. package/dist/src/infrastructure/projection/pricing/pricing.d.ts +1 -18
  10. package/dist/src/infrastructure/projection/pricing/pricing.js +1 -12
  11. package/dist/src/infrastructure/projection/pricing/pricing.mock.d.ts +2 -9
  12. package/dist/src/infrastructure/projection/pricing/pricing.mock.js +10 -50
  13. package/dist/src/infrastructure/projection/pricing/react/useViewPricingByCheckoutId.d.ts +2 -2
  14. package/dist/src/infrastructure/tracking/useTrackCheckout.d.ts +2 -2
  15. package/dist/src/infrastructure/tracking/useTrackCheckout.js +3 -3
  16. package/dist/src/infrastructure/ui/components/atoms/price/Price.d.ts +7 -2
  17. package/dist/src/infrastructure/ui/components/atoms/price/Price.js +7 -7
  18. package/dist/src/infrastructure/ui/views/checkout/Checkout.js +2 -2
  19. package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.js +1 -1
  20. package/dist/src/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.js +2 -1
  21. package/dist/src/infrastructure/ui/views/item/components/productVariantSlider/components/aspectRatioView/AspectRatioView.d.ts +15 -0
  22. package/dist/src/infrastructure/ui/views/item/components/productVariantSlider/components/aspectRatioView/AspectRatioView.js +16 -0
  23. package/dist/src/infrastructure/ui/views/return/components/price/Price.d.ts +7 -2
  24. package/dist/src/infrastructure/ui/views/return/components/price/Price.js +7 -7
  25. package/dist/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.js +1 -1
  26. package/dist/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.js +1 -1
  27. package/dist/src/infrastructure/ui/views/summary/Summary.js +3 -3
  28. package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.d.ts +2 -5
  29. package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.js +4 -4
  30. package/dist/src/infrastructure/ui/views/summary/components/pricing/Pricing.d.ts +2 -5
  31. package/dist/src/infrastructure/ui/views/summary/components/pricing/Pricing.js +16 -18
  32. package/dist/src/projection/customer/customer.d.ts +0 -1
  33. package/dist/src/projection/pricing/pricing.d.ts +6 -24
  34. package/dist/src/projection/pricing/pricing.js +1 -1
  35. package/dist/src/projection/pricing/viewPricingByCheckoutId.d.ts +2 -2
  36. package/dist/src/version.d.ts +2 -2
  37. package/dist/src/version.js +2 -2
  38. package/package.json +3 -3
  39. package/src/ExpoRoot.tsx +2 -3
  40. package/src/infrastructure/delivery/bootstrap.mock.ts +2 -2
  41. package/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.test.ts +3 -7
  42. package/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.ts +3 -8
  43. package/src/infrastructure/projection/pricing/pricing.mock.ts +11 -61
  44. package/src/infrastructure/projection/pricing/react/useViewPricingByCheckoutId.test.ts +3 -3
  45. package/src/infrastructure/projection/pricing/react/useViewPricingByCheckoutId.ts +2 -2
  46. package/src/infrastructure/tracking/useTrackCheckout.test.tsx +9 -9
  47. package/src/infrastructure/tracking/useTrackCheckout.ts +5 -5
  48. package/src/infrastructure/ui/components/atoms/price/Price.test.tsx +22 -4
  49. package/src/infrastructure/ui/components/atoms/price/Price.tsx +14 -9
  50. package/src/infrastructure/ui/hooks/useCheckoutFlow.test.tsx +2 -2
  51. package/src/infrastructure/ui/views/checkout/Checkout.test.tsx +4 -10
  52. package/src/infrastructure/ui/views/checkout/Checkout.tsx +2 -7
  53. package/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.tsx +1 -1
  54. package/src/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.tsx +1 -1
  55. package/src/infrastructure/ui/views/item/components/productVariantSlider/components/aspectRatioView/AspectRatioView.tsx +46 -0
  56. package/src/infrastructure/ui/views/return/components/price/Price.test.tsx +22 -4
  57. package/src/infrastructure/ui/views/return/components/price/Price.tsx +14 -9
  58. package/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.tsx +6 -1
  59. package/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.tsx +6 -1
  60. package/src/infrastructure/ui/views/summary/Summary.test.tsx +4 -10
  61. package/src/infrastructure/ui/views/summary/Summary.tsx +1 -5
  62. package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.test.tsx +10 -24
  63. package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.tsx +5 -15
  64. package/src/infrastructure/ui/views/summary/components/collapsiblePricing/__snapshots__/CollapsiblePricing.test.tsx.snap +2 -2
  65. package/src/infrastructure/ui/views/summary/components/pricing/Pricing.tsx +42 -38
  66. package/src/projection/customer/customer.ts +0 -1
  67. package/src/projection/pricing/pricing.ts +6 -26
  68. package/src/projection/pricing/viewPricingByCheckoutId.test.ts +4 -5
  69. package/src/projection/pricing/viewPricingByCheckoutId.ts +2 -2
  70. package/src/infrastructure/projection/pricing/pricing.ts +0 -32
@@ -5,7 +5,7 @@ import {
5
5
  QueryHandlerFunction,
6
6
  QueryHandlerFunctionArgs,
7
7
  } from "@lookiero/messaging";
8
- import { PricingProjection } from "./pricing";
8
+ import { CheckoutPricingProjection } from "./pricing";
9
9
 
10
10
  const VIEW_PRICING_BY_CHECKOUT_ID = "view_pricing_by_checkout_id";
11
11
 
@@ -24,7 +24,7 @@ const viewPricingByCheckoutId: ViewPricingByCheckoutIdFunction = (payload) => ({
24
24
  ...payload,
25
25
  });
26
26
 
27
- type ViewPricingByCheckoutIdResult = PricingProjection | null;
27
+ type ViewPricingByCheckoutIdResult = CheckoutPricingProjection | null;
28
28
 
29
29
  interface PricingByCheckoutIdViewArgs extends CancelableQueryViewArgs {
30
30
  readonly checkoutId: string;
@@ -1,32 +0,0 @@
1
- import { PriceProjection } from "../../../projection/price/price";
2
- import { PricingProjection, ServiceProjection } from "../../../projection/pricing/pricing";
3
-
4
- interface PricingDto {
5
- readonly balanceDiscount: PriceProjection;
6
- readonly discount: PriceProjection;
7
- readonly discountPercentage: number;
8
- readonly orderTotal: PriceProjection;
9
- readonly pendingToPay: PriceProjection;
10
- readonly service: ServiceProjection;
11
- readonly subtotal: PriceProjection;
12
- readonly paidWithPromocode?: boolean;
13
- }
14
-
15
- interface ToPricingProjectionFunction {
16
- (pricingDto: PricingDto): PricingProjection;
17
- }
18
-
19
- const toPricingProjection: ToPricingProjectionFunction = (pricingDto) => ({
20
- ...pricingDto,
21
- discount: {
22
- ...pricingDto.discount,
23
- amount: -Math.abs(pricingDto.discount.amount),
24
- },
25
- balanceDiscount: {
26
- ...pricingDto.balanceDiscount,
27
- amount: -Math.abs(pricingDto.balanceDiscount.amount),
28
- },
29
- });
30
-
31
- export type { PricingDto };
32
- export { toPricingProjection };