@lookiero/checkout 14.7.0 → 14.8.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.
- package/cypress/support/interceptViewPricingByCheckoutId.ts +3 -3
- package/dist/src/ExpoRoot.js +2 -3
- package/dist/src/infrastructure/delivery/bootstrap.mock.js +2 -2
- package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.js +2 -3
- package/dist/src/infrastructure/projection/pricing/pricing.mock.d.ts +3 -9
- package/dist/src/infrastructure/projection/pricing/pricing.mock.js +11 -50
- package/dist/src/infrastructure/projection/pricing/react/useViewPricingByCheckoutId.d.ts +2 -2
- package/dist/src/infrastructure/tracking/useTrackCheckout.d.ts +2 -2
- package/dist/src/infrastructure/tracking/useTrackCheckout.js +3 -3
- package/dist/src/infrastructure/ui/components/atoms/price/Price.d.ts +7 -2
- package/dist/src/infrastructure/ui/components/atoms/price/Price.js +7 -7
- package/dist/src/infrastructure/ui/views/checkout/Checkout.js +2 -2
- package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.js +1 -1
- package/dist/src/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.js +2 -1
- package/dist/src/infrastructure/ui/views/item/components/productVariantSlider/components/aspectRatioView/AspectRatioView.d.ts +15 -0
- package/dist/src/infrastructure/ui/views/item/components/productVariantSlider/components/aspectRatioView/AspectRatioView.js +16 -0
- package/dist/src/infrastructure/ui/views/return/components/price/Price.d.ts +7 -2
- package/dist/src/infrastructure/ui/views/return/components/price/Price.js +7 -7
- package/dist/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.js +1 -1
- package/dist/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.js +1 -1
- package/dist/src/infrastructure/ui/views/summary/Summary.js +3 -3
- package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.d.ts +2 -5
- package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.js +4 -4
- package/dist/src/infrastructure/ui/views/summary/components/pricing/Pricing.d.ts +2 -5
- package/dist/src/infrastructure/ui/views/summary/components/pricing/Pricing.js +16 -18
- package/dist/src/projection/customer/customer.d.ts +0 -1
- package/dist/src/projection/pricing/pricing.d.ts +6 -24
- package/dist/src/projection/pricing/pricing.js +1 -1
- package/dist/src/projection/pricing/viewPricingByCheckoutId.d.ts +2 -2
- package/dist/src/version.d.ts +2 -2
- package/dist/src/version.js +2 -2
- package/package.json +1 -1
- package/src/ExpoRoot.tsx +2 -3
- package/src/infrastructure/delivery/bootstrap.mock.ts +2 -2
- package/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.test.ts +3 -7
- package/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.ts +3 -8
- package/src/infrastructure/projection/pricing/pricing.mock.ts +13 -61
- package/src/infrastructure/projection/pricing/react/useViewPricingByCheckoutId.test.ts +3 -3
- package/src/infrastructure/projection/pricing/react/useViewPricingByCheckoutId.ts +2 -2
- package/src/infrastructure/tracking/useTrackCheckout.test.tsx +9 -9
- package/src/infrastructure/tracking/useTrackCheckout.ts +5 -5
- package/src/infrastructure/ui/components/atoms/price/Price.test.tsx +22 -4
- package/src/infrastructure/ui/components/atoms/price/Price.tsx +14 -9
- package/src/infrastructure/ui/hooks/useCheckoutFlow.test.tsx +2 -2
- package/src/infrastructure/ui/views/checkout/Checkout.test.tsx +4 -10
- package/src/infrastructure/ui/views/checkout/Checkout.tsx +2 -7
- package/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.tsx +1 -1
- package/src/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.tsx +1 -1
- package/src/infrastructure/ui/views/item/components/productVariantSlider/__snapshots__/ProductVariantSlider.test.tsx.snap +198 -192
- package/src/infrastructure/ui/views/item/components/productVariantSlider/components/aspectRatioView/AspectRatioView.tsx +46 -0
- package/src/infrastructure/ui/views/item/views/productVariant/__snapshots__/ProductVariant.test.tsx.snap +594 -576
- package/src/infrastructure/ui/views/return/components/price/Price.test.tsx +22 -4
- package/src/infrastructure/ui/views/return/components/price/Price.tsx +14 -9
- package/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.tsx +6 -1
- package/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.tsx +6 -1
- package/src/infrastructure/ui/views/summary/Summary.test.tsx +4 -10
- package/src/infrastructure/ui/views/summary/Summary.tsx +1 -5
- package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.test.tsx +10 -24
- package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.tsx +5 -15
- package/src/infrastructure/ui/views/summary/components/collapsiblePricing/__snapshots__/CollapsiblePricing.test.tsx.snap +2 -2
- package/src/infrastructure/ui/views/summary/components/pricing/Pricing.tsx +42 -38
- package/src/projection/customer/customer.ts +0 -1
- package/src/projection/pricing/pricing.ts +6 -26
- package/src/projection/pricing/viewPricingByCheckoutId.test.ts +4 -5
- package/src/projection/pricing/viewPricingByCheckoutId.ts +2 -2
- package/dist/src/infrastructure/projection/pricing/pricing.d.ts +0 -18
- package/dist/src/infrastructure/projection/pricing/pricing.js +0 -12
- package/src/infrastructure/projection/pricing/pricing.ts +0 -32
|
@@ -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 };
|