@lookiero/checkout 0.4.10 → 0.5.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.
- package/dist/domain/checkout/command/markCheckoutAsPaid.d.ts +13 -0
- package/dist/domain/checkout/command/markCheckoutAsPaid.js +4 -0
- package/dist/domain/checkout/model/checkoutPaid.d.ts +13 -0
- package/dist/domain/checkout/model/checkoutPaid.js +4 -0
- package/dist/infrastructure/domain/checkout/model/httpCheckoutsMarkAsPaid.d.ts +5 -0
- package/dist/infrastructure/domain/checkout/model/httpCheckoutsMarkAsPaid.js +13 -0
- package/dist/infrastructure/domain/checkout/react/useMarkCheckoutAsPaid.d.ts +13 -0
- package/dist/infrastructure/domain/checkout/react/useMarkCheckoutAsPaid.js +16 -0
- package/dist/infrastructure/domain/checkoutBooking/react/useBookCheckouBookingForCheckoutItem.d.ts +13 -0
- package/dist/infrastructure/domain/checkoutBooking/react/useBookCheckouBookingForCheckoutItem.js +14 -0
- package/dist/infrastructure/projection/bookedSizeChangeProductsVariants/httpBookedSizeChangeProductsVariantsForCheckoutItemView.d.ts +12 -0
- package/dist/infrastructure/projection/bookedSizeChangeProductsVariants/httpBookedSizeChangeProductsVariantsForCheckoutItemView.js +9 -0
- package/dist/infrastructure/projection/bookedSizeChangeProductsVariants/react/useViewBookedSizeChangeProductsVariantsForCheckoutItem.d.ts +10 -0
- package/dist/infrastructure/projection/bookedSizeChangeProductsVariants/react/useViewBookedSizeChangeProductsVariantsForCheckoutItem.js +12 -0
- package/dist/infrastructure/projection/checkoutFeedback/httpCheckoutFeedbackByCheckoutIdView.d.ts +12 -0
- package/dist/infrastructure/projection/checkoutFeedback/httpCheckoutFeedbackByCheckoutIdView.js +9 -0
- package/dist/infrastructure/ui/Root.d.ts +3 -3
- package/dist/infrastructure/ui/Root.js +2 -2
- package/dist/infrastructure/ui/routing/Routing.d.ts +4 -4
- package/dist/infrastructure/ui/routing/Routing.js +11 -11
- package/dist/infrastructure/ui/views/App.d.ts +2 -1
- package/dist/infrastructure/ui/views/App.js +4 -5
- package/dist/infrastructure/ui/views/checkout/Checkout.d.ts +0 -2
- package/dist/infrastructure/ui/views/checkout/Checkout.js +4 -4
- package/dist/infrastructure/ui/views/checkout/Checkout.style.d.ts +3 -0
- package/dist/infrastructure/ui/views/checkout/Checkout.style.js +3 -0
- package/dist/infrastructure/ui/views/feedback/Feedback.js +2 -2
- package/dist/infrastructure/ui/views/feedback/Feedback.style.d.ts +3 -0
- package/dist/infrastructure/ui/views/feedback/Feedback.style.js +3 -0
- package/dist/infrastructure/ui/views/header/Header.js +3 -4
- package/dist/infrastructure/ui/views/header/Header.style.d.ts +1 -1
- package/dist/infrastructure/ui/views/header/Header.style.js +1 -1
- package/dist/infrastructure/ui/views/intro/Intro.js +3 -3
- package/dist/infrastructure/ui/views/intro/Intro.style.d.ts +4 -1
- package/dist/infrastructure/ui/views/intro/Intro.style.js +4 -1
- package/dist/infrastructure/ui/views/item/Item.d.ts +0 -2
- package/dist/infrastructure/ui/views/item/Item.js +5 -5
- package/dist/infrastructure/ui/views/item/Item.style.d.ts +1 -0
- package/dist/infrastructure/ui/views/item/Item.style.js +1 -0
- package/dist/infrastructure/ui/views/item/components/itemActions/ItemActions.d.ts +0 -2
- package/dist/infrastructure/ui/views/item/components/itemActions/ItemActions.js +2 -6
- package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.d.ts +0 -2
- package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.js +2 -3
- package/dist/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.d.ts +0 -2
- package/dist/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.js +3 -5
- package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +0 -2
- package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +2 -2
- package/dist/infrastructure/ui/views/navigation/Navigation.d.ts +20 -0
- package/dist/infrastructure/ui/views/navigation/Navigation.js +16 -0
- package/dist/infrastructure/ui/views/navigation/Navigation.style.d.ts +5 -0
- package/dist/infrastructure/ui/views/navigation/Navigation.style.js +30 -0
- package/dist/infrastructure/ui/views/navigation/components/header/Header.d.ts +13 -0
- package/dist/infrastructure/ui/views/navigation/components/header/Header.js +88 -0
- package/dist/infrastructure/ui/views/navigation/components/header/Header.style.d.ts +35 -0
- package/dist/infrastructure/ui/views/navigation/components/header/Header.style.js +38 -0
- package/dist/infrastructure/ui/views/navigation/components/header/Logo.d.ts +7 -0
- package/dist/infrastructure/ui/views/navigation/components/header/Logo.js +11 -0
- package/dist/infrastructure/ui/views/navigation/components/header/Logo.style.d.ts +7 -0
- package/dist/infrastructure/ui/views/navigation/components/header/Logo.style.js +8 -0
- package/dist/infrastructure/ui/views/summary/Summary.d.ts +0 -2
- package/dist/infrastructure/ui/views/summary/Summary.js +3 -3
- package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.d.ts +0 -2
- package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.js +5 -5
- package/dist/projection/bookedSizeChangeProductsVariants/bookedSizeChangeProductsVariants.d.ts +10 -0
- package/dist/projection/bookedSizeChangeProductsVariants/viewBookedSizeChangeProductVariantsForCheckoutItem.d.ts +25 -0
- package/dist/projection/bookedSizeChangeProductsVariants/viewBookedSizeChangeProductVariantsForCheckoutItem.js +8 -0
- package/dist/projection/checkoutFeedback/viewCheckoutFeedbackByCheckoutId.d.ts +25 -0
- package/dist/projection/checkoutFeedback/viewCheckoutFeedbackByCheckoutId.js +8 -0
- package/dist/projection/shared/size.d.ts +0 -10
- package/dist/projection/shared/size.js +1 -3
- package/package.json +1 -1
- package/dist/projection/shared/country.d.ts +0 -13
- package/dist/projection/shared/country.js +0 -14
- package/dist/projection/shared/customer.d.ts +0 -6
- /package/dist/projection/{shared/customer.js → bookedSizeChangeProductsVariants/bookedSizeChangeProductsVariants.js} +0 -0
package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.js
CHANGED
|
@@ -7,18 +7,18 @@ import { Tabs } from "../../../../components/layouts/tabs/Tabs";
|
|
|
7
7
|
import { I18nMessages } from "../../../../i18n/i18n";
|
|
8
8
|
import { ProductVariant } from "../../../item/components/productVariant/ProductVariant";
|
|
9
9
|
import { style } from "./CheckoutItemsTabs.style";
|
|
10
|
-
const CheckoutItem = ({ checkoutItemStatus, checkoutItemProductVariant, checkoutItemPrice,
|
|
11
|
-
React.createElement(ProductVariant, { brand: checkoutItemProductVariant.brand, color: checkoutItemProductVariant.color,
|
|
12
|
-
const CheckoutItemsTabs = ({ checkoutItemsKept, checkoutItemsReturned,
|
|
10
|
+
const CheckoutItem = ({ checkoutItemStatus, checkoutItemProductVariant, checkoutItemPrice, discarded = false, testID, style: customStyle, onPress, }) => (React.createElement(View, { style: style.checkoutItem, testID: testID },
|
|
11
|
+
React.createElement(ProductVariant, { brand: checkoutItemProductVariant.brand, color: checkoutItemProductVariant.color, discarded: discarded, media: checkoutItemProductVariant.media, name: checkoutItemProductVariant.name, price: checkoutItemPrice, size: checkoutItemProductVariant.size, status: checkoutItemStatus, style: customStyle, onPress: onPress })));
|
|
12
|
+
const CheckoutItemsTabs = ({ checkoutItemsKept, checkoutItemsReturned, onPressItem }) => {
|
|
13
13
|
const keepTabText = useI18nMessage({ id: I18nMessages.SUMMARY_KEEP_TAB });
|
|
14
14
|
const returnTabText = useI18nMessage({ id: I18nMessages.SUMMARY_RETURN_TAB });
|
|
15
15
|
const keepEmptyText = useI18nMessage({ id: I18nMessages.SUMMARY_KEEP_EMPTY });
|
|
16
16
|
const returnEmptyText = useI18nMessage({ id: I18nMessages.SUMMARY_RETURN_EMPTY });
|
|
17
17
|
const handleOnPressItem = useCallback((checkoutItemId) => onPressItem(checkoutItemId), [onPressItem]);
|
|
18
18
|
return (React.createElement(Tabs, { style: { sliderContainer: style.sliderContainer }, tabLabels: [`${keepTabText} (${checkoutItemsKept.length})`, `${returnTabText} (${checkoutItemsReturned.length})`] },
|
|
19
|
-
React.createElement(React.Fragment, null, checkoutItemsKept.length === 0 ? (React.createElement(Text, { style: style.emptyText }, keepEmptyText)) : (checkoutItemsKept.map((checkoutItem) => (React.createElement(CheckoutItem, { key: checkoutItem.id, checkoutItemPrice: checkoutItem.price, checkoutItemStatus: checkoutItem.status,
|
|
19
|
+
React.createElement(React.Fragment, null, checkoutItemsKept.length === 0 ? (React.createElement(Text, { style: style.emptyText }, keepEmptyText)) : (checkoutItemsKept.map((checkoutItem) => (React.createElement(CheckoutItem, { key: checkoutItem.id, checkoutItemPrice: checkoutItem.price, checkoutItemStatus: checkoutItem.status, testID: "keep-checkout-item", checkoutItemProductVariant: checkoutItem.status === CheckoutItemStatus.REPLACED && checkoutItem.replacedFor
|
|
20
20
|
? checkoutItem.replacedFor
|
|
21
21
|
: checkoutItem.productVariant, onPress: () => handleOnPressItem(checkoutItem.id) }))))),
|
|
22
|
-
React.createElement(React.Fragment, null, checkoutItemsReturned.length === 0 ? (React.createElement(Text, { style: style.emptyText }, returnEmptyText)) : (checkoutItemsReturned.map((checkoutItem) => (React.createElement(CheckoutItem, { key: checkoutItem.id, checkoutItemPrice: checkoutItem.price, checkoutItemProductVariant: checkoutItem.productVariant, checkoutItemStatus: checkoutItem.status,
|
|
22
|
+
React.createElement(React.Fragment, null, checkoutItemsReturned.length === 0 ? (React.createElement(Text, { style: style.emptyText }, returnEmptyText)) : (checkoutItemsReturned.map((checkoutItem) => (React.createElement(CheckoutItem, { key: checkoutItem.id, checkoutItemPrice: checkoutItem.price, checkoutItemProductVariant: checkoutItem.productVariant, checkoutItemStatus: checkoutItem.status, style: { image: style.returnCheckoutItem }, testID: "return-checkout-item", discarded: true, onPress: () => handleOnPressItem(checkoutItem.id) })))))));
|
|
23
23
|
};
|
|
24
24
|
export { CheckoutItemsTabs };
|
package/dist/projection/bookedSizeChangeProductsVariants/bookedSizeChangeProductsVariants.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SizeProjection } from "../shared/size";
|
|
2
|
+
interface ProductVariantProjection {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly size: SizeProjection;
|
|
5
|
+
}
|
|
6
|
+
interface BookedSizeChangeProductsVariantsProjection {
|
|
7
|
+
readonly bookingId: string;
|
|
8
|
+
readonly productVariants: ProductVariantProjection[];
|
|
9
|
+
}
|
|
10
|
+
export type { BookedSizeChangeProductsVariantsProjection, ProductVariantProjection };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CancelableQueryViewArgs, Query, QueryHandlerFunction, QueryHandlerFunctionArgs } from "@lookiero/messaging";
|
|
2
|
+
import { BookedSizeChangeProductsVariantsProjection } from "./bookedSizeChangeProductsVariants";
|
|
3
|
+
declare const VIEW_BOOKED_SIZE_CHANGE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM = "view_booked_size_change_product_variants_for_checkout_item";
|
|
4
|
+
interface ViewBookedSizeChangeProductsVariantsForCheckoutItemPayload {
|
|
5
|
+
readonly checkoutItemId: string;
|
|
6
|
+
}
|
|
7
|
+
interface ViewBookedSizeChangeProductsVariantsForCheckoutItem extends Query<typeof VIEW_BOOKED_SIZE_CHANGE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM>, ViewBookedSizeChangeProductsVariantsForCheckoutItemPayload {
|
|
8
|
+
}
|
|
9
|
+
interface ViewBookedSizeChangeProductsVariantsForCheckoutItemFunction {
|
|
10
|
+
(payload: ViewBookedSizeChangeProductsVariantsForCheckoutItemPayload): ViewBookedSizeChangeProductsVariantsForCheckoutItem;
|
|
11
|
+
}
|
|
12
|
+
declare const viewBookedSizeChangeProductsVariantsForCheckoutItem: ViewBookedSizeChangeProductsVariantsForCheckoutItemFunction;
|
|
13
|
+
type ViewBookedSizeChangeProductsVariantsForCheckoutItemResult = BookedSizeChangeProductsVariantsProjection | null;
|
|
14
|
+
interface BookedSizeChangeProductsVariantsForCheckoutItemViewArgs extends CancelableQueryViewArgs {
|
|
15
|
+
readonly checkoutItemId: string;
|
|
16
|
+
}
|
|
17
|
+
interface BookedSizeChangeProductsVariantsForCheckoutItemView {
|
|
18
|
+
(args: BookedSizeChangeProductsVariantsForCheckoutItemViewArgs): Promise<ViewBookedSizeChangeProductsVariantsForCheckoutItemResult>;
|
|
19
|
+
}
|
|
20
|
+
interface ViewBookedSizeChangeProductsVariantsForCheckoutItemHandlerFunctionArgs extends QueryHandlerFunctionArgs {
|
|
21
|
+
readonly view: BookedSizeChangeProductsVariantsForCheckoutItemView;
|
|
22
|
+
}
|
|
23
|
+
declare const viewBookedSizeChangeProductsVariantsForCheckoutItemHandler: QueryHandlerFunction<ViewBookedSizeChangeProductsVariantsForCheckoutItem, ViewBookedSizeChangeProductsVariantsForCheckoutItemResult, ViewBookedSizeChangeProductsVariantsForCheckoutItemHandlerFunctionArgs>;
|
|
24
|
+
export type { ViewBookedSizeChangeProductsVariantsForCheckoutItem, BookedSizeChangeProductsVariantsForCheckoutItemView, ViewBookedSizeChangeProductsVariantsForCheckoutItemResult, };
|
|
25
|
+
export { VIEW_BOOKED_SIZE_CHANGE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM, viewBookedSizeChangeProductsVariantsForCheckoutItem, viewBookedSizeChangeProductsVariantsForCheckoutItemHandler, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { query, } from "@lookiero/messaging";
|
|
2
|
+
const VIEW_BOOKED_SIZE_CHANGE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM = "view_booked_size_change_product_variants_for_checkout_item";
|
|
3
|
+
const viewBookedSizeChangeProductsVariantsForCheckoutItem = (payload) => ({
|
|
4
|
+
...query({ name: VIEW_BOOKED_SIZE_CHANGE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM }),
|
|
5
|
+
...payload,
|
|
6
|
+
});
|
|
7
|
+
const viewBookedSizeChangeProductsVariantsForCheckoutItemHandler = ({ view, signal }) => async ({ checkoutItemId }) => view({ checkoutItemId, signal });
|
|
8
|
+
export { VIEW_BOOKED_SIZE_CHANGE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM, viewBookedSizeChangeProductsVariantsForCheckoutItem, viewBookedSizeChangeProductsVariantsForCheckoutItemHandler, };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CancelableQueryViewArgs, Query, QueryHandlerFunction, QueryHandlerFunctionArgs } from "@lookiero/messaging";
|
|
2
|
+
import { CheckoutFeedbackProjection } from "./checkoutFeedback";
|
|
3
|
+
declare const VIEW_CHECKOUT_FEEDBACK_BY_CHECKOUT_ID = "view_checkout_feedback_by_checkout_id";
|
|
4
|
+
interface ViewCheckoutFeedbackByCheckoutIdPayload {
|
|
5
|
+
readonly checkoutId: string;
|
|
6
|
+
}
|
|
7
|
+
interface ViewCheckoutFeedbackByCheckoutId extends Query<typeof VIEW_CHECKOUT_FEEDBACK_BY_CHECKOUT_ID>, ViewCheckoutFeedbackByCheckoutIdPayload {
|
|
8
|
+
}
|
|
9
|
+
interface ViewCheckoutFeedbackByCheckoutIdFunction {
|
|
10
|
+
(payload: ViewCheckoutFeedbackByCheckoutIdPayload): ViewCheckoutFeedbackByCheckoutId;
|
|
11
|
+
}
|
|
12
|
+
declare const viewCheckoutFeedbackByCheckoutId: ViewCheckoutFeedbackByCheckoutIdFunction;
|
|
13
|
+
type ViewCheckoutFeedbackByCheckoutIdResult = CheckoutFeedbackProjection | null;
|
|
14
|
+
interface CheckoutFeedbackByCheckoutIdViewArgs extends CancelableQueryViewArgs {
|
|
15
|
+
readonly checkoutId: string;
|
|
16
|
+
}
|
|
17
|
+
interface CheckoutFeedbackByCheckoutIdView {
|
|
18
|
+
(args: CheckoutFeedbackByCheckoutIdViewArgs): Promise<ViewCheckoutFeedbackByCheckoutIdResult>;
|
|
19
|
+
}
|
|
20
|
+
interface ViewCheckoutFeedbackByCheckoutIdHandlerFunctionArgs extends QueryHandlerFunctionArgs {
|
|
21
|
+
readonly view: CheckoutFeedbackByCheckoutIdView;
|
|
22
|
+
}
|
|
23
|
+
declare const viewCheckoutFeedbackByCheckoutIdHandler: QueryHandlerFunction<ViewCheckoutFeedbackByCheckoutId, ViewCheckoutFeedbackByCheckoutIdResult, ViewCheckoutFeedbackByCheckoutIdHandlerFunctionArgs>;
|
|
24
|
+
export type { ViewCheckoutFeedbackByCheckoutId, CheckoutFeedbackByCheckoutIdView, ViewCheckoutFeedbackByCheckoutIdResult, };
|
|
25
|
+
export { VIEW_CHECKOUT_FEEDBACK_BY_CHECKOUT_ID, viewCheckoutFeedbackByCheckoutId, viewCheckoutFeedbackByCheckoutIdHandler, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { query, } from "@lookiero/messaging";
|
|
2
|
+
const VIEW_CHECKOUT_FEEDBACK_BY_CHECKOUT_ID = "view_checkout_feedback_by_checkout_id";
|
|
3
|
+
const viewCheckoutFeedbackByCheckoutId = (payload) => ({
|
|
4
|
+
...query({ name: VIEW_CHECKOUT_FEEDBACK_BY_CHECKOUT_ID }),
|
|
5
|
+
...payload,
|
|
6
|
+
});
|
|
7
|
+
const viewCheckoutFeedbackByCheckoutIdHandler = ({ view, signal }) => async ({ checkoutId }) => view({ checkoutId, signal });
|
|
8
|
+
export { VIEW_CHECKOUT_FEEDBACK_BY_CHECKOUT_ID, viewCheckoutFeedbackByCheckoutId, viewCheckoutFeedbackByCheckoutIdHandler, };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Country } from "./country";
|
|
2
1
|
interface SizeProjection {
|
|
3
2
|
readonly id: string;
|
|
4
3
|
readonly lookiero: string;
|
|
@@ -8,13 +7,4 @@ interface SizeProjection {
|
|
|
8
7
|
readonly unique: boolean;
|
|
9
8
|
readonly visualOrder?: number;
|
|
10
9
|
}
|
|
11
|
-
interface SizeFunctionArgs {
|
|
12
|
-
readonly size: SizeProjection;
|
|
13
|
-
readonly country: Country;
|
|
14
|
-
}
|
|
15
|
-
interface SizeFunction {
|
|
16
|
-
(args: SizeFunctionArgs): string;
|
|
17
|
-
}
|
|
18
|
-
declare const size: SizeFunction;
|
|
19
10
|
export type { SizeProjection };
|
|
20
|
-
export { size };
|
package/package.json
CHANGED
|
@@ -1,14 +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 || (Country = {}));
|
|
14
|
-
export { Country };
|
|
File without changes
|