@lookiero/checkout 0.2.7 → 0.2.9
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/startCheckout.d.ts +12 -0
- package/dist/domain/checkout/command/startCheckout.js +4 -0
- package/dist/domain/checkout/model/checkout.d.ts +17 -0
- package/dist/domain/checkout/model/checkout.js +20 -0
- package/dist/domain/checkout/model/checkoutStarted.d.ts +13 -0
- package/dist/domain/checkout/model/checkoutStarted.js +4 -0
- package/dist/domain/checkout/model/checkouts.d.ts +7 -0
- package/dist/domain/checkout/model/checkouts.js +1 -0
- package/dist/domain/checkoutBooking/command/bookSizeReplaceableProductVariantsForCheckoutItem.d.ts +0 -1
- package/dist/domain/checkoutBooking/model/checkoutBooking.d.ts +0 -1
- package/dist/domain/checkoutBooking/model/checkoutBooking.js +1 -3
- package/dist/domain/checkoutBooking/model/checkoutBookingBooked.d.ts +0 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/infrastructure/delivery/bootstrap.js +13 -4
- package/dist/infrastructure/delivery/{_mock/bootstrap.mock.js → bootstrap.mock.js} +14 -13
- package/dist/infrastructure/domain/checkout/model/httpCheckouts.d.ts +16 -0
- package/dist/infrastructure/domain/checkout/model/httpCheckouts.js +21 -0
- package/dist/infrastructure/domain/checkout/model/httpCheckoutsStart.d.ts +5 -0
- package/dist/infrastructure/domain/checkout/model/httpCheckoutsStart.js +14 -0
- package/dist/infrastructure/domain/checkout/react/useStartCheckout.d.ts +13 -0
- package/dist/infrastructure/domain/checkout/react/useStartCheckout.js +10 -0
- package/dist/infrastructure/domain/checkoutBooking/model/httpCheckoutBookings.js +2 -2
- package/dist/infrastructure/domain/{react → checkoutBooking/react}/useBookSizeReplaceableProductVariantsForCheckoutItem.js +2 -3
- package/dist/infrastructure/domain/{react → uiSetting/react}/useSetCheckoutIntroShown.js +1 -1
- package/dist/infrastructure/domain/{react → uiSetting/react}/useUpdateUiSetting.js +2 -2
- package/dist/infrastructure/projection/{httpBookedSizeReplaceableProductVariantsForCheckoutItemView.d.ts → bookedSizeReplaceableProductVariants/httpBookedSizeReplaceableProductVariantsForCheckoutItemView.d.ts} +2 -2
- package/dist/infrastructure/projection/{react → bookedSizeReplaceableProductVariants/react}/useViewBookedSizeReplaceableProductVariantsForCheckoutItem.d.ts +1 -1
- package/dist/infrastructure/projection/{react → bookedSizeReplaceableProductVariants/react}/useViewBookedSizeReplaceableProductVariantsForCheckoutItem.js +2 -2
- package/dist/infrastructure/projection/checkout/checkout.d.ts +53 -0
- package/dist/infrastructure/projection/{httpFirstAvailableCheckoutByCustomerIdView.js → checkout/checkout.js} +1 -8
- package/dist/infrastructure/projection/checkout/checkout.mock.d.ts +17 -0
- package/dist/infrastructure/{delivery/_mock → projection/checkout}/checkout.mock.js +13 -10
- package/dist/infrastructure/projection/checkout/httpCheckoutByIdView.d.ts +12 -0
- package/dist/infrastructure/projection/checkout/httpCheckoutByIdView.js +9 -0
- package/dist/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.d.ts +12 -0
- package/dist/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.js +9 -0
- package/dist/infrastructure/projection/{httpFiveItemsDiscountByCustomerIdView.d.ts → checkout/httpFiveItemsDiscountByCustomerIdView.d.ts} +2 -2
- package/dist/infrastructure/projection/{httpIsCheckoutEnabledByCustomerIdView.d.ts → checkout/httpIsCheckoutEnabledByCustomerIdView.d.ts} +2 -2
- package/dist/infrastructure/projection/{react → checkout/react}/useViewFirstAvailableCheckoutByCustomerId.d.ts +1 -1
- package/dist/infrastructure/projection/{react → checkout/react}/useViewFirstAvailableCheckoutByCustomerId.js +2 -2
- package/dist/infrastructure/projection/{react → checkout/react}/useViewFiveItemsDiscountByCustomerId.d.ts +1 -1
- package/dist/infrastructure/projection/{react → checkout/react}/useViewFiveItemsDiscountByCustomerId.js +2 -2
- package/dist/infrastructure/projection/{react → checkout/react}/useViewIsCheckoutAccessibleByCustomerId.d.ts +1 -1
- package/dist/infrastructure/projection/{react → checkout/react}/useViewIsCheckoutAccessibleByCustomerId.js +2 -2
- package/dist/infrastructure/projection/uiSetting/react/useViewCheckoutIntroShown.d.ts +2 -0
- package/dist/infrastructure/projection/{react → uiSetting/react}/useViewCheckoutIntroShown.js +1 -1
- package/dist/infrastructure/projection/{react → uiSetting/react}/useViewUiSettingByKey.d.ts +1 -1
- package/dist/infrastructure/projection/{react → uiSetting/react}/useViewUiSettingByKey.js +3 -3
- package/dist/infrastructure/projection/{storageUiSettingByKeyView.d.ts → uiSetting/storageUiSettingByKeyView.d.ts} +3 -3
- package/dist/infrastructure/ui/Root.js +1 -1
- package/dist/infrastructure/ui/components/atoms/price/Price.d.ts +1 -1
- package/dist/infrastructure/ui/components/atoms/price/Price.js +2 -2
- package/dist/infrastructure/ui/i18n/i18n.d.ts +8 -1
- package/dist/infrastructure/ui/i18n/i18n.js +7 -0
- package/dist/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.d.ts +0 -1
- package/dist/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.js +2 -3
- package/dist/infrastructure/ui/routing/CheckoutMiddleware.js +3 -3
- package/dist/infrastructure/ui/views/intro/Intro.js +6 -6
- package/dist/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.d.ts +9 -0
- package/dist/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.js +21 -0
- package/dist/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.style.d.ts +17 -0
- package/dist/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.style.js +20 -0
- package/dist/infrastructure/ui/views/item/components/productVariantActions/ProductVariantActions.d.ts +11 -0
- package/dist/infrastructure/ui/views/item/components/productVariantActions/ProductVariantActions.js +23 -0
- package/dist/infrastructure/ui/views/item/components/productVariantActions/ProductVariantActions.style.d.ts +19 -0
- package/dist/infrastructure/ui/views/item/components/productVariantActions/ProductVariantActions.style.js +22 -0
- package/dist/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.d.ts +1 -1
- package/dist/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.js +3 -3
- package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.d.ts +1 -1
- package/dist/projection/checkout/checkout.d.ts +78 -0
- package/dist/projection/checkout/checkout.js +29 -0
- package/dist/projection/checkout/viewCheckoutById.d.ts +25 -0
- package/dist/projection/checkout/viewCheckoutById.js +8 -0
- package/dist/projection/checkout/viewFirstAvailableCheckoutByCustomerId.d.ts +3 -83
- package/dist/projection/checkout/viewFirstAvailableCheckoutByCustomerId.js +1 -36
- package/package.json +6 -2
- package/dist/infrastructure/delivery/_mock/checkout.mock.d.ts +0 -9
- package/dist/infrastructure/projection/httpFirstAvailableCheckoutByCustomerIdView.d.ts +0 -60
- package/dist/infrastructure/projection/react/useViewCheckoutIntroShown.d.ts +0 -2
- /package/dist/infrastructure/delivery/{_mock/bootstrap.mock.d.ts → bootstrap.mock.d.ts} +0 -0
- /package/dist/infrastructure/domain/{react → checkoutBooking/react}/useBookSizeReplaceableProductVariantsForCheckoutItem.d.ts +0 -0
- /package/dist/infrastructure/domain/{react → uiSetting/react}/useSetCheckoutIntroShown.d.ts +0 -0
- /package/dist/infrastructure/domain/{react → uiSetting/react}/useUpdateUiSetting.d.ts +0 -0
- /package/dist/infrastructure/projection/{httpBookedSizeReplaceableProductVariantsForCheckoutItemView.js → bookedSizeReplaceableProductVariants/httpBookedSizeReplaceableProductVariantsForCheckoutItemView.js} +0 -0
- /package/dist/infrastructure/projection/{httpFiveItemsDiscountByCustomerIdView.js → checkout/httpFiveItemsDiscountByCustomerIdView.js} +0 -0
- /package/dist/infrastructure/projection/{httpIsCheckoutEnabledByCustomerIdView.js → checkout/httpIsCheckoutEnabledByCustomerIdView.js} +0 -0
- /package/dist/infrastructure/projection/{storageUiSettingByKeyView.js → uiSetting/storageUiSettingByKeyView.js} +0 -0
|
@@ -1,43 +1,8 @@
|
|
|
1
1
|
import { query } from "@lookiero/messaging";
|
|
2
|
-
var MediaPerspective;
|
|
3
|
-
(function (MediaPerspective) {
|
|
4
|
-
MediaPerspective["BACK"] = "BACK";
|
|
5
|
-
MediaPerspective["BOTTOM_UP"] = "BOTTOM_UP";
|
|
6
|
-
MediaPerspective["COLLAGE"] = "COLLAGE";
|
|
7
|
-
MediaPerspective["DETAIL"] = "DETAIL";
|
|
8
|
-
MediaPerspective["FLAT_BACK"] = "FLAT_BACK";
|
|
9
|
-
MediaPerspective["FRONT"] = "FRONT";
|
|
10
|
-
MediaPerspective["FRONT_FAR"] = "FRONT_FAR";
|
|
11
|
-
MediaPerspective["LABEL"] = "LABEL";
|
|
12
|
-
MediaPerspective["MAIN"] = "MAIN";
|
|
13
|
-
MediaPerspective["MAIN_TRANSPARENT"] = "MAIN_TRANSPARENT";
|
|
14
|
-
MediaPerspective["OTHER"] = "OTHER";
|
|
15
|
-
MediaPerspective["SIDE"] = "SIDE";
|
|
16
|
-
})(MediaPerspective || (MediaPerspective = {}));
|
|
17
|
-
var Currency;
|
|
18
|
-
(function (Currency) {
|
|
19
|
-
Currency["EUR"] = "EUR";
|
|
20
|
-
Currency["GBP"] = "GBP";
|
|
21
|
-
})(Currency || (Currency = {}));
|
|
22
|
-
var CheckoutItemStatus;
|
|
23
|
-
(function (CheckoutItemStatus) {
|
|
24
|
-
CheckoutItemStatus["INITIAL"] = "INITIAL";
|
|
25
|
-
CheckoutItemStatus["KEPT"] = "KEPT";
|
|
26
|
-
CheckoutItemStatus["RETURNED"] = "RETURNED";
|
|
27
|
-
CheckoutItemStatus["REPLACED"] = "REPLACED";
|
|
28
|
-
CheckoutItemStatus["EXPIRED"] = "EXPIRED";
|
|
29
|
-
})(CheckoutItemStatus || (CheckoutItemStatus = {}));
|
|
30
|
-
var CheckoutStatus;
|
|
31
|
-
(function (CheckoutStatus) {
|
|
32
|
-
CheckoutStatus["AVAILABLE"] = "AVAILABLE";
|
|
33
|
-
CheckoutStatus["NOTIFIED"] = "NOTIFIED";
|
|
34
|
-
CheckoutStatus["STARTED"] = "STARTED";
|
|
35
|
-
CheckoutStatus["COMPLETED"] = "COMPLETED";
|
|
36
|
-
})(CheckoutStatus || (CheckoutStatus = {}));
|
|
37
2
|
const VIEW_FIRST_AVAILABLE_CHECKOUT_BY_CUSTOMER_ID = "view_first_available_checkout_by_customer_id";
|
|
38
3
|
const viewFirstAvailableCheckoutByCustomerId = (payload) => ({
|
|
39
4
|
...query({ name: VIEW_FIRST_AVAILABLE_CHECKOUT_BY_CUSTOMER_ID }),
|
|
40
5
|
...payload,
|
|
41
6
|
});
|
|
42
7
|
const viewFirstAvailableCheckoutByCustomerIdHandler = ({ view }) => async ({ customerId }) => view({ customerId });
|
|
43
|
-
export {
|
|
8
|
+
export { VIEW_FIRST_AVAILABLE_CHECKOUT_BY_CUSTOMER_ID, viewFirstAvailableCheckoutByCustomerId, viewFirstAvailableCheckoutByCustomerIdHandler, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lookiero/checkout",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"android": "expo start --android",
|
|
15
15
|
"ios": "expo start --ios",
|
|
16
16
|
"web": "expo start --web",
|
|
17
|
+
"export-analyze-web": "expo export:web",
|
|
17
18
|
"build": "tsc -b tsconfig.build.json",
|
|
18
19
|
"lint": "eslint --fix --cache --cache-location ./node_modules/.cache/.eslintcache --ext ts,tsx .",
|
|
19
20
|
"format": "prettier --write \"**/*.+(json|css|ts|tsx|md)\"",
|
|
@@ -28,6 +29,7 @@
|
|
|
28
29
|
"react-native-get-random-values": "^1.8.0",
|
|
29
30
|
"react-router-dom": "^6.3.0",
|
|
30
31
|
"react-router-native": "^6.3.0",
|
|
32
|
+
"tiny-invariant": "^1.2.0",
|
|
31
33
|
"uuid": "^9.0.0"
|
|
32
34
|
},
|
|
33
35
|
"peerDependencies": {
|
|
@@ -46,6 +48,7 @@
|
|
|
46
48
|
"@testing-library/react": "^13.3.0",
|
|
47
49
|
"@testing-library/react-hooks": "^8.0.1",
|
|
48
50
|
"@testing-library/react-native": "^11.0.0",
|
|
51
|
+
"@trivago/prettier-plugin-sort-imports": "^3.3.0",
|
|
49
52
|
"@types/jest": "^28.1.7",
|
|
50
53
|
"@types/react": "~18.0.0",
|
|
51
54
|
"@types/react-dom": "~18.0.0",
|
|
@@ -73,6 +76,7 @@
|
|
|
73
76
|
"react-native": "^0.69.4",
|
|
74
77
|
"react-native-web": "^0.18.7",
|
|
75
78
|
"react-test-renderer": "^18.0.0",
|
|
76
|
-
"typescript": "^4.6.3"
|
|
79
|
+
"typescript": "^4.6.3",
|
|
80
|
+
"webpack-bundle-analyzer": "^4.6.1"
|
|
77
81
|
}
|
|
78
82
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { CheckoutItemStatus, CheckoutProjection } from "../../../projection/checkout/viewFirstAvailableCheckoutByCustomerId";
|
|
2
|
-
interface StartedCheckoutWithStatusFunctionArgs {
|
|
3
|
-
readonly status: CheckoutItemStatus[];
|
|
4
|
-
}
|
|
5
|
-
interface StartedCheckoutWithStatusFunction {
|
|
6
|
-
(args: StartedCheckoutWithStatusFunctionArgs): CheckoutProjection;
|
|
7
|
-
}
|
|
8
|
-
declare const startedCheckoutWithItems: StartedCheckoutWithStatusFunction;
|
|
9
|
-
export { startedCheckoutWithItems };
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { CheckoutItemStatus, CheckoutProjection, CheckoutStatus, Currency, FirstAvailableCheckoutByCustomerIdView, MediaPerspective } from "../../projection/checkout/viewFirstAvailableCheckoutByCustomerId";
|
|
2
|
-
import { HttpPostFunction } from "../delivery/http/httpClient";
|
|
3
|
-
interface CheckoutDto {
|
|
4
|
-
readonly id: string;
|
|
5
|
-
readonly customer_id: string;
|
|
6
|
-
readonly box_id: string;
|
|
7
|
-
readonly booking_id: string;
|
|
8
|
-
readonly status: CheckoutStatus;
|
|
9
|
-
readonly expires_on: string;
|
|
10
|
-
readonly items: {
|
|
11
|
-
readonly id: string;
|
|
12
|
-
readonly status: CheckoutItemStatus;
|
|
13
|
-
readonly product_variant: {
|
|
14
|
-
readonly id: string;
|
|
15
|
-
readonly media: {
|
|
16
|
-
readonly id: string;
|
|
17
|
-
readonly url: string;
|
|
18
|
-
readonly perspective: MediaPerspective;
|
|
19
|
-
}[];
|
|
20
|
-
readonly brand: string;
|
|
21
|
-
readonly name: string;
|
|
22
|
-
readonly price: {
|
|
23
|
-
readonly amount: number;
|
|
24
|
-
readonly currency: Currency;
|
|
25
|
-
readonly discounted_price?: {
|
|
26
|
-
readonly amount: number;
|
|
27
|
-
readonly percentage: number;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
readonly size: {
|
|
31
|
-
readonly id: string;
|
|
32
|
-
readonly lookiero: string;
|
|
33
|
-
readonly uk: string;
|
|
34
|
-
readonly it: string;
|
|
35
|
-
readonly europe: string;
|
|
36
|
-
readonly unique: boolean;
|
|
37
|
-
readonly visual_order?: number;
|
|
38
|
-
};
|
|
39
|
-
readonly color: {
|
|
40
|
-
readonly id: string;
|
|
41
|
-
readonly label: string;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
readonly replaced_for?: string;
|
|
45
|
-
}[];
|
|
46
|
-
}
|
|
47
|
-
interface ToCheckoutProjectionFunction {
|
|
48
|
-
(checkoutDto: CheckoutDto): CheckoutProjection;
|
|
49
|
-
}
|
|
50
|
-
declare const toCheckoutProjection: ToCheckoutProjectionFunction;
|
|
51
|
-
interface HttpFirstAvailableCheckoutByCustomerIdView extends FirstAvailableCheckoutByCustomerIdView {
|
|
52
|
-
}
|
|
53
|
-
interface HttpFirstAvailableCheckoutByCustomerIdViewFunctionArgs {
|
|
54
|
-
readonly httpPost: HttpPostFunction;
|
|
55
|
-
}
|
|
56
|
-
interface HttpFirstAvailableCheckoutByCustomerIdViewFunction {
|
|
57
|
-
(args: HttpFirstAvailableCheckoutByCustomerIdViewFunctionArgs): HttpFirstAvailableCheckoutByCustomerIdView;
|
|
58
|
-
}
|
|
59
|
-
declare const httpFirstAvailableCheckoutByCustomerIdView: HttpFirstAvailableCheckoutByCustomerIdViewFunction;
|
|
60
|
-
export { CheckoutDto, toCheckoutProjection, httpFirstAvailableCheckoutByCustomerIdView };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|