@lookiero/checkout 15.3.0-beta.0 → 15.3.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/dist/src/version.d.ts +2 -2
- package/dist/src/version.js +2 -2
- package/package.json +1 -1
- package/dist/public/public/assets/adaptive-icon.png +0 -0
- package/dist/public/public/assets/favicon.png +0 -0
- package/dist/public/public/assets/icon.png +0 -0
- package/dist/public/public/assets/splash.png +0 -0
- package/dist/public/public/images/not-found.png +0 -0
- package/dist/src/infrastructure/projection/pricing/pricing.d.ts +0 -31
- package/dist/src/infrastructure/projection/pricing/pricing.js +0 -39
- /package/dist/public/{public/index.html → index.html} +0 -0
package/dist/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "15.3.0
|
|
2
|
-
export declare const RELEASE = "checkout@15.3.0
|
|
1
|
+
export declare const VERSION = "15.3.0";
|
|
2
|
+
export declare const RELEASE = "checkout@15.3.0";
|
package/dist/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = "15.3.0
|
|
2
|
-
export const RELEASE = "checkout@15.3.0
|
|
1
|
+
export const VERSION = "15.3.0";
|
|
2
|
+
export const RELEASE = "checkout@15.3.0";
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Tradename } from "@lookiero/sty-sp-tradename";
|
|
2
|
-
import { PriceProjection } from "../../../projection/price/price";
|
|
3
|
-
import { CheckoutPricingProjection } from "../../../projection/pricing/pricing";
|
|
4
|
-
interface ServiceDto {
|
|
5
|
-
readonly discount: PriceProjection;
|
|
6
|
-
readonly finalPrice: PriceProjection;
|
|
7
|
-
readonly originalPrice: PriceProjection;
|
|
8
|
-
readonly prepaid: boolean;
|
|
9
|
-
readonly reference: string;
|
|
10
|
-
readonly paidWithPromocode?: boolean;
|
|
11
|
-
}
|
|
12
|
-
interface PricingDto {
|
|
13
|
-
readonly balanceDiscount: PriceProjection;
|
|
14
|
-
readonly discount: PriceProjection;
|
|
15
|
-
readonly discountPercentage: number;
|
|
16
|
-
readonly orderTotal: PriceProjection;
|
|
17
|
-
readonly pendingToPay: PriceProjection;
|
|
18
|
-
readonly service: ServiceDto;
|
|
19
|
-
readonly subtotal: PriceProjection;
|
|
20
|
-
}
|
|
21
|
-
interface ToPricingProjectionFunctionArgs {
|
|
22
|
-
readonly pricing: PricingDto;
|
|
23
|
-
readonly tradename: Tradename;
|
|
24
|
-
readonly migrated: boolean;
|
|
25
|
-
}
|
|
26
|
-
interface ToPricingProjectionFunction {
|
|
27
|
-
(args: ToPricingProjectionFunctionArgs): CheckoutPricingProjection;
|
|
28
|
-
}
|
|
29
|
-
declare const toPricingProjection: ToPricingProjectionFunction;
|
|
30
|
-
export type { PricingDto };
|
|
31
|
-
export { toPricingProjection };
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Tradename } from "@lookiero/sty-sp-tradename";
|
|
2
|
-
import { CheckoutPricingContext, CheckoutPricingType, } from "../../../projection/pricing/pricing";
|
|
3
|
-
const toPricingProjection = ({ pricing, tradename, migrated, }) => {
|
|
4
|
-
const shouldDisplayPsFeeModifier = tradename === Tradename.LOOKIERO || (tradename === Tradename.OUTFITTERY && !migrated);
|
|
5
|
-
const modifiers = [
|
|
6
|
-
{
|
|
7
|
-
amount: pricing.discount.amount,
|
|
8
|
-
type: CheckoutPricingType.DISCOUNT,
|
|
9
|
-
context: CheckoutPricingContext.PROMOCODE,
|
|
10
|
-
translationKey: "summary.discount",
|
|
11
|
-
percentage: pricing.discountPercentage,
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
amount: pricing.balanceDiscount.amount,
|
|
15
|
-
type: CheckoutPricingType.DISCOUNT,
|
|
16
|
-
context: CheckoutPricingContext.BALANCE,
|
|
17
|
-
translationKey: "summary.credit",
|
|
18
|
-
},
|
|
19
|
-
...(shouldDisplayPsFeeModifier
|
|
20
|
-
? [
|
|
21
|
-
{
|
|
22
|
-
amount: pricing.service.finalPrice.amount,
|
|
23
|
-
type: CheckoutPricingType.DISCOUNT,
|
|
24
|
-
context: CheckoutPricingContext.PS_FEE,
|
|
25
|
-
translationKey: "summary.fee",
|
|
26
|
-
},
|
|
27
|
-
]
|
|
28
|
-
: []),
|
|
29
|
-
]
|
|
30
|
-
.map((modifier) => ({ ...modifier, amount: Math.abs(modifier.amount) }))
|
|
31
|
-
.filter(({ amount }) => amount !== 0);
|
|
32
|
-
return {
|
|
33
|
-
currency: pricing.pendingToPay.currency,
|
|
34
|
-
finalPrice: pricing.pendingToPay.amount,
|
|
35
|
-
originalPrice: pricing.subtotal.amount,
|
|
36
|
-
modifiers,
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
export { toPricingProjection };
|
|
File without changes
|