@lookiero/checkout 0.3.26 → 0.4.0-beta.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/domain/checkout/command/startCheckout.d.ts +13 -0
- package/dist/domain/checkout/command/startCheckout.js +4 -0
- package/dist/domain/checkout/model/checkout.d.ts +18 -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/bookCheckoutBookingForCheckoutItem.d.ts +15 -0
- package/dist/domain/checkoutBooking/command/bookCheckoutBookingForCheckoutItem.js +7 -0
- package/dist/domain/checkoutBooking/command/bookSizeReplaceableProductVariantsForCheckoutItem.d.ts +15 -0
- package/dist/domain/checkoutBooking/command/bookSizeReplaceableProductVariantsForCheckoutItem.js +7 -0
- package/dist/domain/checkoutBooking/model/checkoutBooking.d.ts +9 -0
- package/dist/domain/checkoutBooking/model/checkoutBooking.js +9 -0
- package/dist/domain/checkoutBooking/model/checkoutBookingBooked.d.ts +14 -0
- package/dist/domain/checkoutBooking/model/checkoutBookingBooked.js +7 -0
- package/dist/domain/checkoutBooking/model/checkoutBookings.d.ts +7 -0
- package/dist/domain/checkoutBooking/model/checkoutBookings.js +1 -0
- package/dist/domain/checkoutItem/command/keepCheckoutItem.d.ts +13 -0
- package/dist/domain/checkoutItem/command/keepCheckoutItem.js +4 -0
- package/dist/domain/checkoutItem/command/replaceCheckoutItem.d.ts +14 -0
- package/dist/domain/checkoutItem/command/replaceCheckoutItem.js +7 -0
- package/dist/domain/checkoutItem/command/returnCheckoutItem.d.ts +15 -0
- package/dist/domain/checkoutItem/command/returnCheckoutItem.js +7 -0
- package/dist/domain/checkoutItem/model/checkoutItem.d.ts +24 -0
- package/dist/domain/checkoutItem/model/checkoutItem.js +40 -0
- package/dist/domain/checkoutItem/model/checkoutItemKept.d.ts +13 -0
- package/dist/domain/checkoutItem/model/checkoutItemKept.js +4 -0
- package/dist/domain/checkoutItem/model/checkoutItemReplaced.d.ts +13 -0
- package/dist/domain/checkoutItem/model/checkoutItemReplaced.js +4 -0
- package/dist/domain/checkoutItem/model/checkoutItemReturned.d.ts +13 -0
- package/dist/domain/checkoutItem/model/checkoutItemReturned.js +4 -0
- package/dist/domain/checkoutItem/model/checkoutItems.d.ts +7 -0
- package/dist/domain/checkoutItem/model/checkoutItems.js +1 -0
- package/dist/domain/checkoutItem/model/currency.d.ts +5 -0
- package/dist/domain/checkoutItem/model/currency.js +6 -0
- package/dist/domain/checkoutItem/model/feedbacks.d.ts +3 -0
- package/dist/domain/checkoutItem/model/feedbacks.js +1 -0
- package/dist/domain/checkoutItem/model/price.d.ts +10 -0
- package/dist/domain/checkoutItem/model/price.js +1 -0
- package/dist/domain/uiSetting/command/updateUiSetting.d.ts +15 -0
- package/dist/domain/uiSetting/command/updateUiSetting.js +10 -0
- package/dist/domain/uiSetting/model/uiSetting.d.ts +9 -0
- package/dist/domain/uiSetting/model/uiSetting.js +11 -0
- package/dist/domain/uiSetting/model/uiSettingUpdated.d.ts +14 -0
- package/dist/domain/uiSetting/model/uiSettingUpdated.js +7 -0
- package/dist/domain/uiSetting/model/uiSettings.d.ts +7 -0
- package/dist/domain/uiSetting/model/uiSettings.js +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +19 -0
- package/dist/infrastructure/delivery/baseBootstrap.d.ts +56 -0
- package/dist/infrastructure/delivery/baseBootstrap.js +55 -0
- package/dist/infrastructure/delivery/bootstrap.d.ts +10 -0
- package/dist/infrastructure/delivery/bootstrap.js +44 -0
- package/dist/infrastructure/delivery/http/fetchHttpClient.d.ts +14 -0
- package/dist/infrastructure/delivery/http/fetchHttpClient.js +20 -0
- package/dist/infrastructure/delivery/http/httpClient.d.ts +16 -0
- package/dist/infrastructure/delivery/http/httpClient.js +1 -0
- package/dist/infrastructure/delivery/mock/checkoutBookingDataSource.d.ts +14 -0
- package/dist/infrastructure/delivery/mock/checkoutBookingDataSource.js +12 -0
- package/dist/infrastructure/delivery/mock/checkoutDataSource.d.ts +17 -0
- package/dist/infrastructure/delivery/mock/checkoutDataSource.js +18 -0
- package/dist/infrastructure/delivery/mock/dataSourceCheckoutBookings.d.ts +14 -0
- package/dist/infrastructure/delivery/mock/dataSourceCheckoutBookings.js +21 -0
- package/dist/infrastructure/delivery/mock/dataSourceCheckoutItems.d.ts +14 -0
- package/dist/infrastructure/delivery/mock/dataSourceCheckoutItems.js +25 -0
- package/dist/infrastructure/delivery/mock/dataSourceCheckouts.d.ts +11 -0
- package/dist/infrastructure/delivery/mock/dataSourceCheckouts.js +27 -0
- package/dist/infrastructure/domain/checkout/model/httpCheckouts.d.ts +16 -0
- package/dist/infrastructure/domain/checkout/model/httpCheckouts.js +19 -0
- package/dist/infrastructure/domain/checkout/model/httpCheckoutsStart.d.ts +5 -0
- package/dist/infrastructure/domain/checkout/model/httpCheckoutsStart.js +13 -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.d.ts +16 -0
- package/dist/infrastructure/domain/checkoutBooking/model/httpCheckoutBookings.js +15 -0
- package/dist/infrastructure/domain/checkoutBooking/model/httpCheckoutBookingsBook.d.ts +5 -0
- package/dist/infrastructure/domain/checkoutBooking/model/httpCheckoutBookingsBook.js +18 -0
- package/dist/infrastructure/domain/checkoutBooking/react/useBookCheckouBookingForCheckoutItem.d.ts +15 -0
- package/dist/infrastructure/domain/checkoutBooking/react/useBookCheckouBookingForCheckoutItem.js +15 -0
- package/dist/infrastructure/domain/checkoutBooking/react/useBookSizeReplaceableProductVariantsForCheckoutItem.d.ts +15 -0
- package/dist/infrastructure/domain/checkoutBooking/react/useBookSizeReplaceableProductVariantsForCheckoutItem.js +14 -0
- package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItems.d.ts +16 -0
- package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItems.js +26 -0
- package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItemsKeep.d.ts +5 -0
- package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItemsKeep.js +13 -0
- package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItemsReplace.d.ts +5 -0
- package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItemsReplace.js +13 -0
- package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItemsReturn.d.ts +5 -0
- package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItemsReturn.js +13 -0
- package/dist/infrastructure/domain/checkoutItem/react/useKeepCheckoutItem.d.ts +13 -0
- package/dist/infrastructure/domain/checkoutItem/react/useKeepCheckoutItem.js +12 -0
- package/dist/infrastructure/domain/checkoutItem/react/useReplaceCheckoutItem.d.ts +16 -0
- package/dist/infrastructure/domain/checkoutItem/react/useReplaceCheckoutItem.js +13 -0
- package/dist/infrastructure/domain/checkoutItem/react/useReturnCheckoutItem.d.ts +17 -0
- package/dist/infrastructure/domain/checkoutItem/react/useReturnCheckoutItem.js +13 -0
- package/dist/infrastructure/domain/uiSetting/model/storageUiSettings.d.ts +17 -0
- package/dist/infrastructure/domain/uiSetting/model/storageUiSettings.js +20 -0
- package/dist/infrastructure/domain/uiSetting/react/useIncrementIntroShownCount.d.ts +10 -0
- package/dist/infrastructure/domain/uiSetting/react/useIncrementIntroShownCount.js +11 -0
- package/dist/infrastructure/domain/uiSetting/react/useUpdateUiSetting.d.ts +14 -0
- package/dist/infrastructure/domain/uiSetting/react/useUpdateUiSetting.js +15 -0
- package/dist/infrastructure/persistence/asyncStorageStorage.d.ts +5 -0
- package/dist/infrastructure/persistence/asyncStorageStorage.js +7 -0
- package/dist/infrastructure/persistence/storage.d.ts +7 -0
- package/dist/infrastructure/persistence/storage.js +1 -0
- package/dist/infrastructure/persistence/uiSettingData.d.ts +6 -0
- package/dist/infrastructure/persistence/uiSettingData.js +1 -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 +9 -0
- package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/bookedSizeReplaceableProductVariants.mock.d.ts +3 -0
- package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/bookedSizeReplaceableProductVariants.mock.js +17 -0
- package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/httpBookedSizeReplaceableProductVariantsForCheckoutItemView.d.ts +34 -0
- package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/httpBookedSizeReplaceableProductVariantsForCheckoutItemView.js +26 -0
- package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/react/useViewBookedSizeReplaceableProductVariantsForCheckoutItem.d.ts +10 -0
- package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/react/useViewBookedSizeReplaceableProductVariantsForCheckoutItem.js +9 -0
- package/dist/infrastructure/projection/checkout/checkout.d.ts +18 -0
- package/dist/infrastructure/projection/checkout/checkout.js +5 -0
- package/dist/infrastructure/projection/checkout/httpCheckoutByIdView.d.ts +12 -0
- package/dist/infrastructure/projection/checkout/httpCheckoutByIdView.js +10 -0
- package/dist/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.d.ts +12 -0
- package/dist/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.js +10 -0
- package/dist/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.d.ts +12 -0
- package/dist/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.js +8 -0
- package/dist/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.d.ts +12 -0
- package/dist/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.js +8 -0
- package/dist/infrastructure/projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId.d.ts +10 -0
- package/dist/infrastructure/projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId.js +14 -0
- package/dist/infrastructure/projection/checkout/react/useViewFiveItemsDiscountByCustomerId.d.ts +10 -0
- package/dist/infrastructure/projection/checkout/react/useViewFiveItemsDiscountByCustomerId.js +9 -0
- package/dist/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.d.ts +10 -0
- package/dist/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.js +9 -0
- package/dist/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.d.ts +12 -0
- package/dist/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.js +9 -0
- package/dist/infrastructure/projection/checkoutItem/checkoutItem.d.ts +45 -0
- package/dist/infrastructure/projection/checkoutItem/checkoutItem.js +40 -0
- package/dist/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.d.ts +12 -0
- package/dist/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.js +9 -0
- package/dist/infrastructure/projection/feedback/feedback.mock.d.ts +3 -0
- package/dist/infrastructure/projection/feedback/feedback.mock.js +6 -0
- package/dist/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.d.ts +12 -0
- package/dist/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.js +9 -0
- package/dist/infrastructure/projection/returnQuestion/react/useListReturnQuestionsByCheckoutItemId.d.ts +10 -0
- package/dist/infrastructure/projection/returnQuestion/react/useListReturnQuestionsByCheckoutItemId.js +9 -0
- package/dist/infrastructure/projection/returnQuestion/returnQuestion.d.ts +14 -0
- package/dist/infrastructure/projection/returnQuestion/returnQuestion.js +9 -0
- package/dist/infrastructure/projection/uiSetting/react/useShouldIntroBeShown.d.ts +6 -0
- package/dist/infrastructure/projection/uiSetting/react/useShouldIntroBeShown.js +7 -0
- package/dist/infrastructure/projection/uiSetting/react/useViewIntroShownCount.d.ts +6 -0
- package/dist/infrastructure/projection/uiSetting/react/useViewIntroShownCount.js +9 -0
- package/dist/infrastructure/projection/uiSetting/react/useViewUiSettingByKey.d.ts +10 -0
- package/dist/infrastructure/projection/uiSetting/react/useViewUiSettingByKey.js +12 -0
- package/dist/infrastructure/projection/uiSetting/storageUiSettingByKeyView.d.ts +13 -0
- package/dist/infrastructure/projection/uiSetting/storageUiSettingByKeyView.js +15 -0
- package/dist/infrastructure/ui/Root.d.ts +20 -0
- package/dist/infrastructure/ui/Root.js +11 -0
- package/dist/infrastructure/ui/components/atoms/price/Price.d.ts +12 -0
- package/dist/infrastructure/ui/components/atoms/price/Price.js +28 -0
- package/dist/infrastructure/ui/components/atoms/price/Price.style.d.ts +13 -0
- package/dist/infrastructure/ui/components/atoms/price/Price.style.js +16 -0
- package/dist/infrastructure/ui/components/layouts/body/Body.d.ts +9 -0
- package/dist/infrastructure/ui/components/layouts/body/Body.js +7 -0
- package/dist/infrastructure/ui/components/layouts/body/Body.style.d.ts +7 -0
- package/dist/infrastructure/ui/components/layouts/body/Body.style.js +8 -0
- package/dist/infrastructure/ui/components/layouts/tabs/Tabs.d.ts +26 -0
- package/dist/infrastructure/ui/components/layouts/tabs/Tabs.js +47 -0
- package/dist/infrastructure/ui/components/layouts/tabs/Tabs.style.d.ts +32 -0
- package/dist/infrastructure/ui/components/layouts/tabs/Tabs.style.js +35 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.d.ts +9 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.js +8 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.d.ts +8 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.js +4 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionFeedback.d.ts +29 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionFeedback.js +27 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionItem.d.ts +18 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionItem.js +12 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.d.ts +10 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.js +1 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionFeedbackItem/HostDefaultReturnQuestionFeedbackItem.d.ts +3 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionFeedbackItem/HostDefaultReturnQuestionFeedbackItem.js +3 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.d.ts +3 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.js +12 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.style.d.ts +8 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.style.js +11 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.d.ts +3 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +34 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.d.ts +11 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.js +14 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.d.ts +3 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.js +27 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.style.d.ts +12 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.style.js +15 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.d.ts +3 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.js +15 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.style.d.ts +12 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.style.js +15 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.d.ts +3 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.js +26 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.style.d.ts +10 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.style.js +13 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.d.ts +3 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.js +13 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/util/returnQuestionFeedback.d.ts +22 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/util/returnQuestionFeedback.js +58 -0
- package/dist/infrastructure/ui/components/templates/SafeAreaScrollView.d.ts +8 -0
- package/dist/infrastructure/ui/components/templates/SafeAreaScrollView.js +14 -0
- package/dist/infrastructure/ui/hooks/useMediaImage.d.ts +7 -0
- package/dist/infrastructure/ui/hooks/useMediaImage.js +12 -0
- package/dist/infrastructure/ui/i18n/i18n.d.ts +39 -0
- package/dist/infrastructure/ui/i18n/i18n.js +40 -0
- package/dist/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.d.ts +9 -0
- package/dist/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.js +21 -0
- package/dist/infrastructure/ui/routing/CheckoutMiddleware.d.ts +9 -0
- package/dist/infrastructure/ui/routing/CheckoutMiddleware.js +47 -0
- package/dist/infrastructure/ui/routing/Routing.d.ts +12 -0
- package/dist/infrastructure/ui/routing/Routing.js +45 -0
- package/dist/infrastructure/ui/routing/router/Router.d.ts +1 -0
- package/dist/infrastructure/ui/routing/router/Router.js +1 -0
- package/dist/infrastructure/ui/routing/router/Router.native.d.ts +1 -0
- package/dist/infrastructure/ui/routing/router/Router.native.js +1 -0
- package/dist/infrastructure/ui/routing/routes.d.ts +6 -0
- package/dist/infrastructure/ui/routing/routes.js +7 -0
- package/dist/infrastructure/ui/settings/UISettings.d.ts +4 -0
- package/dist/infrastructure/ui/settings/UISettings.js +5 -0
- package/dist/infrastructure/ui/shared/components/atoms/error/Error.d.ts +10 -0
- package/dist/infrastructure/ui/shared/components/atoms/error/Error.js +5 -0
- package/dist/infrastructure/ui/shared/components/atoms/error/Error.style.d.ts +6 -0
- package/dist/infrastructure/ui/shared/components/atoms/error/Error.style.js +9 -0
- package/dist/infrastructure/ui/shared/components/atoms/field/Field.d.ts +14 -0
- package/dist/infrastructure/ui/shared/components/atoms/field/Field.js +29 -0
- package/dist/infrastructure/ui/shared/components/atoms/field/Field.style.d.ts +14 -0
- package/dist/infrastructure/ui/shared/components/atoms/field/Field.style.js +17 -0
- package/dist/infrastructure/ui/shared/components/atoms/icon/Icon.d.ts +12 -0
- package/dist/infrastructure/ui/shared/components/atoms/icon/Icon.js +7 -0
- package/dist/infrastructure/ui/shared/components/atoms/icon/Icon.style.d.ts +13 -0
- package/dist/infrastructure/ui/shared/components/atoms/icon/Icon.style.js +16 -0
- package/dist/infrastructure/ui/shared/components/atoms/input/Input.d.ts +11 -0
- package/dist/infrastructure/ui/shared/components/atoms/input/Input.js +37 -0
- package/dist/infrastructure/ui/shared/components/atoms/input/Input.style.d.ts +19 -0
- package/dist/infrastructure/ui/shared/components/atoms/input/Input.style.js +26 -0
- package/dist/infrastructure/ui/shared/components/atoms/spinner/Spinner.d.ts +3 -0
- package/dist/infrastructure/ui/shared/components/atoms/spinner/Spinner.js +8 -0
- package/dist/infrastructure/ui/shared/components/atoms/spinner/Spinner.style.d.ts +9 -0
- package/dist/infrastructure/ui/shared/components/atoms/spinner/Spinner.style.js +10 -0
- package/dist/infrastructure/ui/shared/components/layouts/column/Column.d.ts +10 -0
- package/dist/infrastructure/ui/shared/components/layouts/column/Column.js +10 -0
- package/dist/infrastructure/ui/shared/components/layouts/column/Column.style.d.ts +12 -0
- package/dist/infrastructure/ui/shared/components/layouts/column/Column.style.js +23 -0
- package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.d.ts +20 -0
- package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.js +79 -0
- package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.style.d.ts +58 -0
- package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.style.js +70 -0
- package/dist/infrastructure/ui/shared/components/layouts/row/Row.d.ts +6 -0
- package/dist/infrastructure/ui/shared/components/layouts/row/Row.js +10 -0
- package/dist/infrastructure/ui/shared/components/layouts/row/Row.style.d.ts +13 -0
- package/dist/infrastructure/ui/shared/components/layouts/row/Row.style.js +17 -0
- package/dist/infrastructure/ui/shared/components/layouts/slider/Pagination.d.ts +14 -0
- package/dist/infrastructure/ui/shared/components/layouts/slider/Pagination.js +11 -0
- package/dist/infrastructure/ui/shared/components/layouts/slider/Pagination.style.d.ts +23 -0
- package/dist/infrastructure/ui/shared/components/layouts/slider/Pagination.style.js +27 -0
- package/dist/infrastructure/ui/shared/components/layouts/slider/Slider.d.ts +20 -0
- package/dist/infrastructure/ui/shared/components/layouts/slider/Slider.js +132 -0
- package/dist/infrastructure/ui/shared/components/layouts/slider/Slider.style.d.ts +11 -0
- package/dist/infrastructure/ui/shared/components/layouts/slider/Slider.style.js +12 -0
- package/dist/infrastructure/ui/shared/components/layouts/sticky/Sticky.d.ts +14 -0
- package/dist/infrastructure/ui/shared/components/layouts/sticky/Sticky.js +12 -0
- package/dist/infrastructure/ui/shared/components/layouts/sticky/Sticky.style.d.ts +46 -0
- package/dist/infrastructure/ui/shared/components/layouts/sticky/Sticky.style.js +33 -0
- package/dist/infrastructure/ui/shared/components/molecules/buttonIcon/ButtonIcon.d.ts +16 -0
- package/dist/infrastructure/ui/shared/components/molecules/buttonIcon/ButtonIcon.js +7 -0
- package/dist/infrastructure/ui/shared/components/molecules/buttonIcon/ButtonIcon.style.d.ts +7 -0
- package/dist/infrastructure/ui/shared/components/molecules/buttonIcon/ButtonIcon.style.js +10 -0
- package/dist/infrastructure/ui/shared/components/molecules/inputField/InputField.d.ts +25 -0
- package/dist/infrastructure/ui/shared/components/molecules/inputField/InputField.js +26 -0
- package/dist/infrastructure/ui/shared/components/molecules/inputField/InputField.style.d.ts +17 -0
- package/dist/infrastructure/ui/shared/components/molecules/inputField/InputField.style.js +20 -0
- package/dist/infrastructure/ui/shared/components/molecules/selectField/SelectField.d.ts +26 -0
- package/dist/infrastructure/ui/shared/components/molecules/selectField/SelectField.js +26 -0
- package/dist/infrastructure/ui/shared/components/molecules/selectField/SelectField.style.d.ts +15 -0
- package/dist/infrastructure/ui/shared/components/molecules/selectField/SelectField.style.js +18 -0
- package/dist/infrastructure/ui/shared/hooks/useScreenSize.d.ts +4 -0
- package/dist/infrastructure/ui/shared/hooks/useScreenSize.js +9 -0
- package/dist/infrastructure/ui/theme/theme.d.ts +10 -0
- package/dist/infrastructure/ui/theme/theme.js +5 -0
- package/dist/infrastructure/ui/views/App.d.ts +6 -0
- package/dist/infrastructure/ui/views/App.js +6 -0
- package/dist/infrastructure/ui/views/intro/Intro.d.ts +6 -0
- package/dist/infrastructure/ui/views/intro/Intro.js +51 -0
- package/dist/infrastructure/ui/views/intro/Intro.style.d.ts +52 -0
- package/dist/infrastructure/ui/views/intro/Intro.style.js +55 -0
- package/dist/infrastructure/ui/views/item/Item.d.ts +7 -0
- package/dist/infrastructure/ui/views/item/Item.js +97 -0
- package/dist/infrastructure/ui/views/item/Item.style.d.ts +15 -0
- package/dist/infrastructure/ui/views/item/Item.style.js +18 -0
- package/dist/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.d.ts +10 -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/getOutOfCheckoutModal/GetOutOfCheckoutModal.d.ts +8 -0
- package/dist/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +34 -0
- package/dist/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.d.ts +19 -0
- package/dist/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.js +22 -0
- package/dist/infrastructure/ui/views/item/components/itemActions/ItemActions.d.ts +18 -0
- package/dist/infrastructure/ui/views/item/components/itemActions/ItemActions.js +33 -0
- package/dist/infrastructure/ui/views/item/components/itemActions/ItemActions.style.d.ts +21 -0
- package/dist/infrastructure/ui/views/item/components/itemActions/ItemActions.style.js +24 -0
- package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.d.ts +13 -0
- package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.js +30 -0
- package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.style.d.ts +23 -0
- package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.style.js +27 -0
- package/dist/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.d.ts +12 -0
- package/dist/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.js +26 -0
- package/dist/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.d.ts +19 -0
- package/dist/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.js +22 -0
- package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.d.ts +7 -0
- package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.js +22 -0
- package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.style.d.ts +25 -0
- package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.style.js +29 -0
- package/dist/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.d.ts +10 -0
- package/dist/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.js +32 -0
- package/dist/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.style.d.ts +12 -0
- package/dist/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.style.js +15 -0
- package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +15 -0
- package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +46 -0
- package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +11 -0
- package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +14 -0
- package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.d.ts +7 -0
- package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.js +25 -0
- package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.style.d.ts +16 -0
- package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.style.js +19 -0
- package/dist/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.d.ts +7 -0
- package/dist/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.js +25 -0
- package/dist/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.style.d.ts +16 -0
- package/dist/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.style.js +19 -0
- package/dist/infrastructure/ui/views/summary/Summary.d.ts +6 -0
- package/dist/infrastructure/ui/views/summary/Summary.js +18 -0
- package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.d.ts +7 -0
- package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.js +20 -0
- package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.style.d.ts +9 -0
- package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.style.js +12 -0
- package/dist/package.json +1 -1
- package/dist/projection/bookedSizeChangeProductsVariants/bookedSizeChangeProductsVariants.d.ts +13 -0
- package/dist/projection/bookedSizeChangeProductsVariants/bookedSizeChangeProductsVariants.js +1 -0
- package/dist/projection/bookedSizeChangeProductsVariants/viewBookedSizeChangeProductVariantsForCheckoutItem.d.ts +25 -0
- package/dist/projection/bookedSizeChangeProductsVariants/viewBookedSizeChangeProductVariantsForCheckoutItem.js +8 -0
- package/dist/projection/bookedSizeReplaceableProductVariants/viewBookedSizeReplaceableProductVariantsForCheckoutItem.d.ts +33 -0
- package/dist/projection/bookedSizeReplaceableProductVariants/viewBookedSizeReplaceableProductVariantsForCheckoutItem.js +8 -0
- package/dist/projection/checkout/checkout.d.ts +12 -0
- package/dist/projection/checkout/checkout.js +1 -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 +25 -0
- package/dist/projection/checkout/viewFirstAvailableCheckoutByCustomerId.js +8 -0
- package/dist/projection/checkout/viewFiveItemsDiscountByCustomerId.d.ts +24 -0
- package/dist/projection/checkout/viewFiveItemsDiscountByCustomerId.js +8 -0
- package/dist/projection/checkout/viewIsCheckoutAccessibleByCustomerId.d.ts +17 -0
- package/dist/projection/checkout/viewIsCheckoutAccessibleByCustomerId.js +13 -0
- package/dist/projection/checkout/viewIsCheckoutEnabledByCustomerId.d.ts +24 -0
- package/dist/projection/checkout/viewIsCheckoutEnabledByCustomerId.js +8 -0
- package/dist/projection/checkoutBooking/checkoutBooking.d.ts +6 -0
- package/dist/projection/checkoutBooking/checkoutBooking.js +1 -0
- package/dist/projection/checkoutBooking/viewCheckoutBookingById.d.ts +25 -0
- package/dist/projection/checkoutBooking/viewCheckoutBookingById.js +8 -0
- package/dist/projection/checkoutItem/checkoutItem.d.ts +53 -0
- package/dist/projection/checkoutItem/checkoutItem.js +17 -0
- package/dist/projection/checkoutItem/viewCheckoutItemById.d.ts +25 -0
- package/dist/projection/checkoutItem/viewCheckoutItemById.js +8 -0
- package/dist/projection/feedback/feedback.d.ts +3 -0
- package/dist/projection/feedback/feedback.js +1 -0
- package/dist/projection/returnQuestion/listReturnQuestionsByCheckoutItemId.d.ts +25 -0
- package/dist/projection/returnQuestion/listReturnQuestionsByCheckoutItemId.js +8 -0
- package/dist/projection/returnQuestion/returnQuestion.d.ts +17 -0
- package/dist/projection/returnQuestion/returnQuestion.js +11 -0
- package/dist/projection/shared/size.d.ts +10 -0
- package/dist/projection/shared/size.js +1 -0
- package/dist/projection/uiSetting/viewUiSettingByKey.d.ts +29 -0
- package/dist/projection/uiSetting/viewUiSettingByKey.js +8 -0
- package/dist/src/ExpoRoot.js +10 -2
- package/dist/src/domain/checkout/model/checkout.d.ts +2 -3
- package/dist/src/domain/checkout/model/checkout.js +0 -1
- package/dist/src/domain/checkoutBooking/model/checkoutBooking.d.ts +1 -5
- package/dist/src/domain/checkoutBooking/model/checkoutBooking.js +1 -17
- package/dist/src/domain/checkoutItem/command/replaceCheckoutItem.d.ts +1 -1
- package/dist/src/domain/checkoutItem/model/checkoutItem.d.ts +1 -1
- package/dist/src/domain/checkoutItem/model/checkoutItem.js +2 -2
- package/dist/src/infrastructure/delivery/baseBootstrap.d.ts +0 -2
- package/dist/src/infrastructure/delivery/baseBootstrap.js +2 -8
- package/dist/src/infrastructure/delivery/bootstrap.js +0 -2
- package/dist/src/infrastructure/delivery/mock/dataSourceCheckoutBookings.js +1 -5
- package/dist/src/infrastructure/delivery/mock/dataSourceCheckoutItems.js +0 -2
- package/dist/src/infrastructure/delivery/mock/dataSourceCheckouts.js +2 -2
- package/dist/src/infrastructure/domain/checkout/model/httpCheckouts.js +1 -1
- package/dist/src/infrastructure/domain/checkoutBooking/model/httpCheckoutBookings.js +2 -9
- package/dist/src/infrastructure/domain/checkoutBooking/react/useBookCheckouBookingForCheckoutItem.d.ts +13 -0
- package/dist/src/infrastructure/domain/checkoutBooking/react/{useBookCheckoutBookingForCheckoutItem.js → useBookCheckouBookingForCheckoutItem.js} +2 -2
- package/dist/src/infrastructure/domain/checkoutItem/model/httpCheckoutItems.js +1 -1
- package/dist/src/infrastructure/domain/checkoutItem/model/httpCheckoutItemsReplace.js +2 -2
- package/dist/src/infrastructure/domain/checkoutItem/react/useReplaceCheckoutItem.d.ts +1 -1
- package/dist/src/infrastructure/domain/checkoutItem/react/useReplaceCheckoutItem.js +2 -2
- package/dist/src/infrastructure/projection/bookedSizeChangeProductsVariants/httpBookedSizeChangeProductsVariantsForCheckoutItemView.js +1 -1
- package/dist/src/infrastructure/projection/checkout/checkout.d.ts +1 -1
- package/dist/src/infrastructure/projection/pricing/react/useViewPricingByCheckoutId.js +1 -9
- package/dist/src/infrastructure/ui/Root.d.ts +2 -0
- package/dist/src/infrastructure/ui/Root.js +2 -2
- package/dist/src/infrastructure/ui/routing/CheckoutMiddleware.js +9 -7
- package/dist/src/infrastructure/ui/routing/Routing.d.ts +2 -0
- package/dist/src/infrastructure/ui/routing/Routing.js +2 -2
- package/dist/src/infrastructure/ui/views/App.d.ts +2 -0
- package/dist/src/infrastructure/ui/views/App.js +2 -2
- package/dist/src/infrastructure/ui/views/header/Header.d.ts +7 -0
- package/dist/src/infrastructure/ui/views/header/Header.js +8 -6
- package/dist/src/infrastructure/ui/views/item/Item.js +25 -49
- package/dist/src/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.js +4 -7
- package/dist/src/infrastructure/ui/views/summary/components/pricing/Pricing.js +2 -2
- package/dist/src/projection/bookedSizeChangeProductsVariants/bookedSizeChangeProductsVariants.d.ts +1 -0
- package/dist/src/projection/checkout/checkout.d.ts +1 -1
- package/dist/src/projection/checkoutBooking/checkoutBooking.d.ts +0 -2
- package/dist/src/projection/checkoutItem/checkoutItem.d.ts +1 -1
- package/dist/src/projection/pricing/pricing.d.ts +3 -3
- package/package.json +1 -1
- package/dist/src/domain/checkoutBooking/command/blockCheckoutBooking.d.ts +0 -13
- package/dist/src/domain/checkoutBooking/command/blockCheckoutBooking.js +0 -4
- package/dist/src/domain/checkoutBooking/model/checkoutBookingBlocked.d.ts +0 -13
- package/dist/src/domain/checkoutBooking/model/checkoutBookingBlocked.js +0 -4
- package/dist/src/domain/checkoutBooking/model/checkoutBookingExpired.d.ts +0 -13
- package/dist/src/domain/checkoutBooking/model/checkoutBookingExpired.js +0 -4
- package/dist/src/infrastructure/domain/checkoutBooking/model/httpCheckoutBookingsBlock.d.ts +0 -5
- package/dist/src/infrastructure/domain/checkoutBooking/model/httpCheckoutBookingsBlock.js +0 -15
- package/dist/src/infrastructure/domain/checkoutBooking/react/useBlockCheckoutBooking.d.ts +0 -13
- package/dist/src/infrastructure/domain/checkoutBooking/react/useBlockCheckoutBooking.js +0 -12
- package/dist/src/infrastructure/domain/checkoutBooking/react/useBookCheckoutBookingForCheckoutItem.d.ts +0 -13
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IsCheckoutEnabledByCustomerIdView } from "../../../projection/checkout/viewIsCheckoutEnabledByCustomerId";
|
|
2
|
+
import { HttpGetFunction } from "../../delivery/http/httpClient";
|
|
3
|
+
interface HttpIsCheckoutEnabledByCustomerIdView extends IsCheckoutEnabledByCustomerIdView {
|
|
4
|
+
}
|
|
5
|
+
interface HttpIsCheckoutEnabledByCustomerIdViewFunctionArgs {
|
|
6
|
+
readonly httpGet: HttpGetFunction;
|
|
7
|
+
}
|
|
8
|
+
interface HttpIsCheckoutEnabledByCustomerIdViewFunction {
|
|
9
|
+
(args: HttpIsCheckoutEnabledByCustomerIdViewFunctionArgs): HttpIsCheckoutEnabledByCustomerIdView;
|
|
10
|
+
}
|
|
11
|
+
declare const httpIsCheckoutEnabledByCustomerIdView: HttpIsCheckoutEnabledByCustomerIdViewFunction;
|
|
12
|
+
export { httpIsCheckoutEnabledByCustomerIdView };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const httpIsCheckoutEnabledByCustomerIdView = ({ httpGet }) => async ({ customerId, signal }) => {
|
|
2
|
+
const response = await httpGet({
|
|
3
|
+
endpoint: `/is-new-checkout-enabled/${customerId}`,
|
|
4
|
+
signal,
|
|
5
|
+
});
|
|
6
|
+
return !response.ok ? false : await response.json();
|
|
7
|
+
};
|
|
8
|
+
export { httpIsCheckoutEnabledByCustomerIdView };
|
package/dist/infrastructure/projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UseQueryFunctionResult } from "@lookiero/messaging-react";
|
|
2
|
+
import { CheckoutProjection } from "../../../../projection/checkout/checkout";
|
|
3
|
+
interface UseViewFirstAvailableCheckoutByCustomerIdFunctionArgs {
|
|
4
|
+
readonly customerId: string;
|
|
5
|
+
}
|
|
6
|
+
interface UseViewFirstAvailableCheckoutByCustomerIdFunction {
|
|
7
|
+
(args: UseViewFirstAvailableCheckoutByCustomerIdFunctionArgs): UseQueryFunctionResult<CheckoutProjection>;
|
|
8
|
+
}
|
|
9
|
+
declare const useViewFirstAvailableCheckoutByCustomerId: UseViewFirstAvailableCheckoutByCustomerIdFunction;
|
|
10
|
+
export { useViewFirstAvailableCheckoutByCustomerId };
|
package/dist/infrastructure/projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useQuery } from "@lookiero/messaging-react";
|
|
2
|
+
import { CHECKOUT_ITEM_KEPT } from "../../../../domain/checkoutItem/model/checkoutItemKept";
|
|
3
|
+
import { CHECKOUT_ITEM_RETURNED, } from "../../../../domain/checkoutItem/model/checkoutItemReturned";
|
|
4
|
+
import { viewFirstAvailableCheckoutByCustomerId } from "../../../../projection/checkout/viewFirstAvailableCheckoutByCustomerId";
|
|
5
|
+
import { MESSAGING_CONTEXT_ID } from "../../../delivery/baseBootstrap";
|
|
6
|
+
const isCheckoutItemKept = (event) => event.name === CHECKOUT_ITEM_KEPT;
|
|
7
|
+
const isCheckoutItemReturned = (event) => event.name === CHECKOUT_ITEM_RETURNED;
|
|
8
|
+
const useViewFirstAvailableCheckoutByCustomerId = ({ customerId }) => useQuery({
|
|
9
|
+
query: viewFirstAvailableCheckoutByCustomerId({ customerId }),
|
|
10
|
+
contextId: MESSAGING_CONTEXT_ID,
|
|
11
|
+
invalidation: isCheckoutItemKept || isCheckoutItemReturned,
|
|
12
|
+
options: { staleTime: Infinity, retry: false, refetchOnWindowFocus: false },
|
|
13
|
+
});
|
|
14
|
+
export { useViewFirstAvailableCheckoutByCustomerId };
|
package/dist/infrastructure/projection/checkout/react/useViewFiveItemsDiscountByCustomerId.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UseQueryFunctionResult } from "@lookiero/messaging-react";
|
|
2
|
+
import { FiveItemsDiscountByCustomerIdProjection } from "../../../../projection/checkout/viewFiveItemsDiscountByCustomerId";
|
|
3
|
+
interface UseViewFiveItemsDiscountByCustomerIdFunctionArgs {
|
|
4
|
+
readonly customerId: string;
|
|
5
|
+
}
|
|
6
|
+
interface UseViewFiveItemsDiscountByCustomerIdFunction {
|
|
7
|
+
(args: UseViewFiveItemsDiscountByCustomerIdFunctionArgs): UseQueryFunctionResult<FiveItemsDiscountByCustomerIdProjection>;
|
|
8
|
+
}
|
|
9
|
+
declare const useViewFiveItemsDiscountByCustomerId: UseViewFiveItemsDiscountByCustomerIdFunction;
|
|
10
|
+
export { useViewFiveItemsDiscountByCustomerId };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { useQuery } from "@lookiero/messaging-react";
|
|
2
|
+
import { viewFiveItemsDiscountByCustomerId, } from "../../../../projection/checkout/viewFiveItemsDiscountByCustomerId";
|
|
3
|
+
import { MESSAGING_CONTEXT_ID } from "../../../delivery/baseBootstrap";
|
|
4
|
+
const useViewFiveItemsDiscountByCustomerId = ({ customerId }) => useQuery({
|
|
5
|
+
query: viewFiveItemsDiscountByCustomerId({ customerId }),
|
|
6
|
+
contextId: MESSAGING_CONTEXT_ID,
|
|
7
|
+
options: { staleTime: Infinity },
|
|
8
|
+
});
|
|
9
|
+
export { useViewFiveItemsDiscountByCustomerId };
|
package/dist/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UseQueryFunctionResult } from "@lookiero/messaging-react";
|
|
2
|
+
import { IsCheckoutAccessibleByCustomerIdProjection } from "../../../../projection/checkout/viewIsCheckoutAccessibleByCustomerId";
|
|
3
|
+
interface UseViewIsCheckoutAccessibleByCustomerIdFunctionArgs {
|
|
4
|
+
readonly customerId: string | undefined;
|
|
5
|
+
}
|
|
6
|
+
interface UseViewIsCheckoutAccessibleByCustomerIdFunction {
|
|
7
|
+
(args: UseViewIsCheckoutAccessibleByCustomerIdFunctionArgs): UseQueryFunctionResult<IsCheckoutAccessibleByCustomerIdProjection>;
|
|
8
|
+
}
|
|
9
|
+
declare const useViewIsCheckoutAccessibleByCustomerId: UseViewIsCheckoutAccessibleByCustomerIdFunction;
|
|
10
|
+
export { useViewIsCheckoutAccessibleByCustomerId };
|
package/dist/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { useQuery } from "@lookiero/messaging-react";
|
|
2
|
+
import { viewIsCheckoutAccessibleByCustomerId, } from "../../../../projection/checkout/viewIsCheckoutAccessibleByCustomerId";
|
|
3
|
+
import { MESSAGING_CONTEXT_ID } from "../../../delivery/baseBootstrap";
|
|
4
|
+
const useViewIsCheckoutAccessibleByCustomerId = ({ customerId }) => useQuery({
|
|
5
|
+
query: viewIsCheckoutAccessibleByCustomerId({ customerId }),
|
|
6
|
+
contextId: MESSAGING_CONTEXT_ID,
|
|
7
|
+
options: { staleTime: Infinity, retry: false, refetchOnWindowFocus: false },
|
|
8
|
+
});
|
|
9
|
+
export { useViewIsCheckoutAccessibleByCustomerId };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CheckoutBookingByIdView } from "../../../projection/checkoutBooking/viewCheckoutBookingById";
|
|
2
|
+
import { HttpPostFunction } from "../../delivery/http/httpClient";
|
|
3
|
+
interface HttpCheckoutBookingByIdView extends CheckoutBookingByIdView {
|
|
4
|
+
}
|
|
5
|
+
interface HttpCheckoutBookingByIdViewFunctionArgs {
|
|
6
|
+
readonly httpPost: HttpPostFunction;
|
|
7
|
+
}
|
|
8
|
+
interface HttpCheckoutBookingByIdViewFunction {
|
|
9
|
+
(args: HttpCheckoutBookingByIdViewFunctionArgs): HttpCheckoutBookingByIdView;
|
|
10
|
+
}
|
|
11
|
+
declare const httpCheckoutBookingByIdView: HttpCheckoutBookingByIdViewFunction;
|
|
12
|
+
export { httpCheckoutBookingByIdView };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const httpCheckoutBookingByIdView = ({ httpPost }) => async ({ checkoutBookingId, signal }) => {
|
|
2
|
+
const response = await httpPost({
|
|
3
|
+
endpoint: "/view-checkout-booking-by-id",
|
|
4
|
+
body: { checkoutBookingId },
|
|
5
|
+
signal,
|
|
6
|
+
});
|
|
7
|
+
return !response.ok || response.status === 404 ? null : (await response.json()).result;
|
|
8
|
+
};
|
|
9
|
+
export { httpCheckoutBookingByIdView };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { CheckoutItemStatus } from "../../../domain/checkoutItem/model/checkoutItem";
|
|
2
|
+
import { CheckoutItemProjection, Currency, MediaPerspective } from "../../../projection/checkoutItem/checkoutItem";
|
|
3
|
+
interface CheckoutItemDto {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly status: CheckoutItemStatus;
|
|
6
|
+
readonly price: {
|
|
7
|
+
readonly amount: number;
|
|
8
|
+
readonly currency: Currency;
|
|
9
|
+
readonly discounted_price?: {
|
|
10
|
+
readonly amount: number;
|
|
11
|
+
readonly percentage: number;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
readonly replaced_for?: string;
|
|
15
|
+
readonly feedback: Record<string, string>;
|
|
16
|
+
readonly product_variant: {
|
|
17
|
+
readonly id: string;
|
|
18
|
+
readonly media: {
|
|
19
|
+
readonly id: string;
|
|
20
|
+
readonly url: string;
|
|
21
|
+
readonly perspective: MediaPerspective;
|
|
22
|
+
}[];
|
|
23
|
+
readonly brand: string;
|
|
24
|
+
readonly name: string;
|
|
25
|
+
readonly size: {
|
|
26
|
+
readonly id: string;
|
|
27
|
+
readonly lookiero: string;
|
|
28
|
+
readonly uk: string;
|
|
29
|
+
readonly it: string;
|
|
30
|
+
readonly europe: string;
|
|
31
|
+
readonly unique: boolean;
|
|
32
|
+
readonly visual_order?: number;
|
|
33
|
+
};
|
|
34
|
+
readonly color: {
|
|
35
|
+
readonly id: string;
|
|
36
|
+
readonly label: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
interface ToCheckoutItemProjectionFunction {
|
|
41
|
+
(checkoutItemDto: CheckoutItemDto): CheckoutItemProjection;
|
|
42
|
+
}
|
|
43
|
+
declare const toCheckoutItemProjection: ToCheckoutItemProjectionFunction;
|
|
44
|
+
export type { CheckoutItemDto };
|
|
45
|
+
export { toCheckoutItemProjection };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const toCheckoutItemProjection = (checkoutItemDto) => ({
|
|
2
|
+
id: checkoutItemDto.id,
|
|
3
|
+
status: checkoutItemDto.status,
|
|
4
|
+
price: {
|
|
5
|
+
amount: checkoutItemDto.price.amount,
|
|
6
|
+
currency: checkoutItemDto.price.currency,
|
|
7
|
+
discountedPrice: checkoutItemDto.price.discounted_price
|
|
8
|
+
? {
|
|
9
|
+
amount: checkoutItemDto.price.discounted_price.amount,
|
|
10
|
+
percentage: checkoutItemDto.price.discounted_price.percentage,
|
|
11
|
+
}
|
|
12
|
+
: undefined,
|
|
13
|
+
},
|
|
14
|
+
replacedFor: checkoutItemDto.replaced_for,
|
|
15
|
+
feedback: checkoutItemDto.feedback,
|
|
16
|
+
productVariant: {
|
|
17
|
+
id: checkoutItemDto.product_variant.id,
|
|
18
|
+
media: checkoutItemDto.product_variant.media.map((media) => ({
|
|
19
|
+
id: media.id,
|
|
20
|
+
url: media.url,
|
|
21
|
+
perspective: media.perspective,
|
|
22
|
+
})),
|
|
23
|
+
brand: checkoutItemDto.product_variant.brand,
|
|
24
|
+
name: checkoutItemDto.product_variant.name,
|
|
25
|
+
size: {
|
|
26
|
+
id: checkoutItemDto.product_variant.size.id,
|
|
27
|
+
lookiero: checkoutItemDto.product_variant.size.lookiero,
|
|
28
|
+
uk: checkoutItemDto.product_variant.size.uk,
|
|
29
|
+
it: checkoutItemDto.product_variant.size.it,
|
|
30
|
+
europe: checkoutItemDto.product_variant.size.europe,
|
|
31
|
+
unique: checkoutItemDto.product_variant.size.unique,
|
|
32
|
+
visualOrder: checkoutItemDto.product_variant.size.visual_order,
|
|
33
|
+
},
|
|
34
|
+
color: {
|
|
35
|
+
id: checkoutItemDto.product_variant.color.id,
|
|
36
|
+
label: checkoutItemDto.product_variant.color.label,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
export { toCheckoutItemProjection };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CheckoutItemByIdView } from "../../../projection/checkoutItem/viewCheckoutItemById";
|
|
2
|
+
import { HttpPostFunction } from "../../delivery/http/httpClient";
|
|
3
|
+
interface HttpCheckoutItemByIdView extends CheckoutItemByIdView {
|
|
4
|
+
}
|
|
5
|
+
interface HttpCheckoutItemByIdViewFunctionArgs {
|
|
6
|
+
readonly httpPost: HttpPostFunction;
|
|
7
|
+
}
|
|
8
|
+
interface HttpCheckoutItemByIdViewFunction {
|
|
9
|
+
(args: HttpCheckoutItemByIdViewFunctionArgs): HttpCheckoutItemByIdView;
|
|
10
|
+
}
|
|
11
|
+
declare const httpCheckoutItemByIdView: HttpCheckoutItemByIdViewFunction;
|
|
12
|
+
export { httpCheckoutItemByIdView };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const httpCheckoutItemByIdView = ({ httpPost }) => async ({ checkoutItemId, signal }) => {
|
|
2
|
+
const response = await httpPost({
|
|
3
|
+
endpoint: "/view-checkout-item-by-id",
|
|
4
|
+
body: { checkoutItemId },
|
|
5
|
+
signal,
|
|
6
|
+
});
|
|
7
|
+
return !response.ok || response.status === 404 ? null : (await response.json()).result;
|
|
8
|
+
};
|
|
9
|
+
export { httpCheckoutItemByIdView };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const feedback = {
|
|
2
|
+
["0ad1dba8-b02c-4121-a1e3-981f1c30800d"]: "9251dc2c-d76a-484d-9299-346929af932f",
|
|
3
|
+
["542c4d24-e1da-484f-8c3a-7d89ee135adc"]: "68c0bb98-b00a-4b86-af43-528fe903cb69",
|
|
4
|
+
["1123a37d-bc00-43a4-9d28-cee1dfaf356c"]: "Free text comment",
|
|
5
|
+
};
|
|
6
|
+
export { feedback };
|
package/dist/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReturnQuestionsByCheckoutItemIdView } from "../../../projection/returnQuestion/listReturnQuestionsByCheckoutItemId";
|
|
2
|
+
import { HttpPostFunction } from "../../delivery/http/httpClient";
|
|
3
|
+
interface HttpReturnQuestionsByCheckoutItemIdView extends ReturnQuestionsByCheckoutItemIdView {
|
|
4
|
+
}
|
|
5
|
+
interface HttpReturnQuestionsByCheckoutItemIdViewFunctionArgs {
|
|
6
|
+
readonly httpPost: HttpPostFunction;
|
|
7
|
+
}
|
|
8
|
+
interface HttpReturnQuestionsByCheckoutItemIdViewFunction {
|
|
9
|
+
(args: HttpReturnQuestionsByCheckoutItemIdViewFunctionArgs): HttpReturnQuestionsByCheckoutItemIdView;
|
|
10
|
+
}
|
|
11
|
+
declare const httpReturnQuestionsByCheckoutItemIdView: HttpReturnQuestionsByCheckoutItemIdViewFunction;
|
|
12
|
+
export { httpReturnQuestionsByCheckoutItemIdView };
|
package/dist/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const httpReturnQuestionsByCheckoutItemIdView = ({ httpPost }) => async ({ checkoutItemId, signal }) => {
|
|
2
|
+
const response = await httpPost({
|
|
3
|
+
endpoint: "/list-return-questions-by-checkout-item-id",
|
|
4
|
+
body: { checkoutItemId },
|
|
5
|
+
signal,
|
|
6
|
+
});
|
|
7
|
+
return !response.ok || response.status === 404 ? null : (await response.json()).result;
|
|
8
|
+
};
|
|
9
|
+
export { httpReturnQuestionsByCheckoutItemIdView };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UseQueryFunctionResult } from "@lookiero/messaging-react";
|
|
2
|
+
import { ReturnQuestionProjection } from "../../../../projection/returnQuestion/returnQuestion";
|
|
3
|
+
interface UseListReturnQuestionsByCheckoutItemIdFunctionArgs {
|
|
4
|
+
readonly checkoutItemId: string;
|
|
5
|
+
}
|
|
6
|
+
interface UseListReturnQuestionsByCheckoutItemIdFunction {
|
|
7
|
+
(args: UseListReturnQuestionsByCheckoutItemIdFunctionArgs): UseQueryFunctionResult<ReturnQuestionProjection[]>;
|
|
8
|
+
}
|
|
9
|
+
declare const useListReturnQuestionsByCheckoutItemId: UseListReturnQuestionsByCheckoutItemIdFunction;
|
|
10
|
+
export { useListReturnQuestionsByCheckoutItemId };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { useQuery } from "@lookiero/messaging-react";
|
|
2
|
+
import { listReturnQuestionsByCheckoutItemId } from "../../../../projection/returnQuestion/listReturnQuestionsByCheckoutItemId";
|
|
3
|
+
import { MESSAGING_CONTEXT_ID } from "../../../delivery/baseBootstrap";
|
|
4
|
+
const useListReturnQuestionsByCheckoutItemId = ({ checkoutItemId }) => useQuery({
|
|
5
|
+
query: listReturnQuestionsByCheckoutItemId({ checkoutItemId }),
|
|
6
|
+
contextId: MESSAGING_CONTEXT_ID,
|
|
7
|
+
options: { staleTime: Infinity, retry: false, refetchOnWindowFocus: false },
|
|
8
|
+
});
|
|
9
|
+
export { useListReturnQuestionsByCheckoutItemId };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReturnQuestionProjection, ReturnQuestionType } from "../../../projection/returnQuestion/returnQuestion";
|
|
2
|
+
interface ReturnQuestionDto {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly placeholder?: string;
|
|
6
|
+
readonly type: ReturnQuestionType;
|
|
7
|
+
readonly children?: ReturnQuestionDto[];
|
|
8
|
+
}
|
|
9
|
+
interface ToReturnQuestionsProjectionFunction {
|
|
10
|
+
(returnQuestionsDto: ReturnQuestionDto[]): ReturnQuestionProjection[];
|
|
11
|
+
}
|
|
12
|
+
declare const toReturnQuestionsProjection: ToReturnQuestionsProjectionFunction;
|
|
13
|
+
export type { ReturnQuestionDto };
|
|
14
|
+
export { toReturnQuestionsProjection };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const toReturnQuestionProjection = (returnQuestionDto) => ({
|
|
2
|
+
id: returnQuestionDto.id,
|
|
3
|
+
name: returnQuestionDto.name,
|
|
4
|
+
placeholder: returnQuestionDto.placeholder,
|
|
5
|
+
type: returnQuestionDto.type,
|
|
6
|
+
children: returnQuestionDto.children ? toReturnQuestionsProjection(returnQuestionDto.children) : undefined,
|
|
7
|
+
});
|
|
8
|
+
const toReturnQuestionsProjection = (returnQuestionsDto) => returnQuestionsDto.map(toReturnQuestionProjection);
|
|
9
|
+
export { toReturnQuestionsProjection };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { useViewIntroShownCount } from "./useViewIntroShownCount";
|
|
2
|
+
const MAX_INTRO_SHOWN_COUNT = 2;
|
|
3
|
+
const useShouldIntroBeShown = () => {
|
|
4
|
+
const [introShownCount, introShownCountStatus] = useViewIntroShownCount();
|
|
5
|
+
return [introShownCount < MAX_INTRO_SHOWN_COUNT, introShownCountStatus];
|
|
6
|
+
};
|
|
7
|
+
export { useShouldIntroBeShown };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UISettings } from "../../../ui/settings/UISettings";
|
|
2
|
+
import { useViewUiSettingByKey } from "./useViewUiSettingByKey";
|
|
3
|
+
const useViewIntroShownCount = () => {
|
|
4
|
+
const [introShownCount, introShownCountStatus] = useViewUiSettingByKey({
|
|
5
|
+
key: UISettings.INTRO_SHOWN_COUNT,
|
|
6
|
+
});
|
|
7
|
+
return [introShownCount?.value || 0, introShownCountStatus];
|
|
8
|
+
};
|
|
9
|
+
export { useViewIntroShownCount };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UseQueryFunctionResult } from "@lookiero/messaging-react";
|
|
2
|
+
import { UiSettingProjection } from "../../../../projection/uiSetting/viewUiSettingByKey";
|
|
3
|
+
interface UseViewUiSettingByKeyFunctionArgs {
|
|
4
|
+
readonly key: string;
|
|
5
|
+
}
|
|
6
|
+
interface UseViewUiSettingByKeyFunction {
|
|
7
|
+
(args: UseViewUiSettingByKeyFunctionArgs): UseQueryFunctionResult<UiSettingProjection>;
|
|
8
|
+
}
|
|
9
|
+
declare const useViewUiSettingByKey: UseViewUiSettingByKeyFunction;
|
|
10
|
+
export { useViewUiSettingByKey };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useQuery } from "@lookiero/messaging-react";
|
|
2
|
+
import { UI_SETTING_UPDATED } from "../../../../domain/uiSetting/model/uiSettingUpdated";
|
|
3
|
+
import { viewUiSettingByKey } from "../../../../projection/uiSetting/viewUiSettingByKey";
|
|
4
|
+
import { MESSAGING_CONTEXT_ID } from "../../../delivery/baseBootstrap";
|
|
5
|
+
const isUiSettingUpdated = (event) => event.name === UI_SETTING_UPDATED;
|
|
6
|
+
const useViewUiSettingByKey = ({ key }) => useQuery({
|
|
7
|
+
query: viewUiSettingByKey({ key }),
|
|
8
|
+
contextId: MESSAGING_CONTEXT_ID,
|
|
9
|
+
invalidation: isUiSettingUpdated,
|
|
10
|
+
options: { staleTime: Infinity, retry: false, refetchOnWindowFocus: false },
|
|
11
|
+
});
|
|
12
|
+
export { useViewUiSettingByKey };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { UiSettingByKeyView } from "../../../projection/uiSetting/viewUiSettingByKey";
|
|
2
|
+
import { ReadFunction } from "../../persistence/storage";
|
|
3
|
+
import { UiSettingDto } from "../../persistence/uiSettingData";
|
|
4
|
+
interface StorageUiSettingByKeyView extends UiSettingByKeyView {
|
|
5
|
+
}
|
|
6
|
+
interface StorageUiSettingByKeyViewFunctionArgs {
|
|
7
|
+
readonly read: ReadFunction<UiSettingDto>;
|
|
8
|
+
}
|
|
9
|
+
interface StorageUiSettingByKeyViewFunction {
|
|
10
|
+
(args: StorageUiSettingByKeyViewFunctionArgs): StorageUiSettingByKeyView;
|
|
11
|
+
}
|
|
12
|
+
declare const storageUiSettingByKeyView: StorageUiSettingByKeyViewFunction;
|
|
13
|
+
export { storageUiSettingByKeyView };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const toUiSettingProjection = (uiSettingDto) => ({
|
|
2
|
+
id: uiSettingDto.id,
|
|
3
|
+
key: uiSettingDto.key,
|
|
4
|
+
value: uiSettingDto.value,
|
|
5
|
+
});
|
|
6
|
+
const storageUiSettingByKeyView = ({ read }) => async ({ key }) => {
|
|
7
|
+
try {
|
|
8
|
+
const uiSettingDto = await read(key);
|
|
9
|
+
return uiSettingDto ? toUiSettingProjection(uiSettingDto) : null;
|
|
10
|
+
}
|
|
11
|
+
catch (ignored) {
|
|
12
|
+
throw new Error("Could not fetch the uiSetting");
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
export { storageUiSettingByKeyView };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { I18n } from "@lookiero/i18n-react";
|
|
2
|
+
import { MessagingRoot } from "@lookiero/messaging-react/bootstrap";
|
|
3
|
+
import { FC } from "react";
|
|
4
|
+
interface RootFunctionArgs {
|
|
5
|
+
readonly Messaging: MessagingRoot;
|
|
6
|
+
readonly I18n: I18n;
|
|
7
|
+
readonly development?: boolean;
|
|
8
|
+
}
|
|
9
|
+
interface RootFunction {
|
|
10
|
+
(args: RootFunctionArgs): FC<RootProps>;
|
|
11
|
+
}
|
|
12
|
+
interface RootProps {
|
|
13
|
+
readonly basePath: string;
|
|
14
|
+
readonly locale?: string;
|
|
15
|
+
readonly customerId: string | undefined;
|
|
16
|
+
readonly onNotAccessible: () => void;
|
|
17
|
+
}
|
|
18
|
+
declare const root: RootFunction;
|
|
19
|
+
export type { RootProps };
|
|
20
|
+
export { root };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React, { useCallback } from "react";
|
|
2
|
+
import { Platform } from "react-native";
|
|
3
|
+
import { Routing } from "./routing/Routing";
|
|
4
|
+
const root = ({ Messaging, I18n, development }) =>
|
|
5
|
+
// eslint-disable-next-line react/display-name, react/prop-types
|
|
6
|
+
({ basePath, locale = "en", customerId, onNotAccessible }) => {
|
|
7
|
+
const handleOnI18nError = useCallback(() => void 0, []);
|
|
8
|
+
return (React.createElement(Messaging, { includeReactQueryDevTools: Platform.OS === "web" },
|
|
9
|
+
React.createElement(Routing, { I18n: I18n, basePath: basePath, customerId: customerId, locale: locale, onI18nError: development ? undefined : handleOnI18nError, onNotAccessible: onNotAccessible })));
|
|
10
|
+
};
|
|
11
|
+
export { root };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { TextProps } from "react-native";
|
|
3
|
+
import { PriceProjection } from "../../../../../projection/checkoutItem/checkoutItem";
|
|
4
|
+
declare type PriceStyle = "priceText" | "discountedText";
|
|
5
|
+
declare type PriceVariant = "default" | "detail" | "subtotal" | "total";
|
|
6
|
+
interface PriceProps {
|
|
7
|
+
readonly price: PriceProjection;
|
|
8
|
+
readonly variant?: PriceVariant;
|
|
9
|
+
readonly style?: Partial<Record<PriceStyle, TextProps>>;
|
|
10
|
+
}
|
|
11
|
+
declare const Price: FC<PriceProps>;
|
|
12
|
+
export { Price };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Text } from "@lookiero/aurora-next/build/components/primitives/Text/Text";
|
|
2
|
+
import { useI18nNumber } from "@lookiero/i18n-react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { View } from "react-native";
|
|
5
|
+
import { style } from "./Price.style";
|
|
6
|
+
const PRICE_VARIANT = {
|
|
7
|
+
default: { body: true, level: 3 },
|
|
8
|
+
detail: { detail: true, level: 2 },
|
|
9
|
+
subtotal: { action: true, level: 3 },
|
|
10
|
+
total: { action: true, level: 2 },
|
|
11
|
+
};
|
|
12
|
+
const Price = ({ price, variant = "default", style: customStyle }) => {
|
|
13
|
+
const isDiscounted = price.discountedPrice && price.discountedPrice.percentage !== 0;
|
|
14
|
+
const productPrice = useI18nNumber({
|
|
15
|
+
value: price.amount / 100,
|
|
16
|
+
style: "currency",
|
|
17
|
+
currency: price.currency,
|
|
18
|
+
});
|
|
19
|
+
const productDiscountedPrice = useI18nNumber({
|
|
20
|
+
value: (price.discountedPrice?.amount || 0) / 100,
|
|
21
|
+
style: "currency",
|
|
22
|
+
currency: price.currency,
|
|
23
|
+
});
|
|
24
|
+
return (React.createElement(View, { style: style.price, testID: "price" },
|
|
25
|
+
React.createElement(Text, { ...PRICE_VARIANT[variant], style: [isDiscounted && style.priceTextDiscounted, customStyle?.priceText], testID: "price-text" }, productPrice),
|
|
26
|
+
isDiscounted && (React.createElement(Text, { ...PRICE_VARIANT[variant], style: [style.discountedPriceText, customStyle?.discountedText], testID: "discounted-price-text" }, productDiscountedPrice))));
|
|
27
|
+
};
|
|
28
|
+
export { Price };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { theme } from "../../../theme/theme";
|
|
3
|
+
const { colorPrimary, spaceS } = theme();
|
|
4
|
+
const style = StyleSheet.create({
|
|
5
|
+
discountedPriceText: {
|
|
6
|
+
color: colorPrimary,
|
|
7
|
+
marginLeft: spaceS,
|
|
8
|
+
},
|
|
9
|
+
price: {
|
|
10
|
+
flexDirection: "row",
|
|
11
|
+
},
|
|
12
|
+
priceTextDiscounted: {
|
|
13
|
+
textDecorationLine: "line-through",
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
export { style };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC, ReactNode } from "react";
|
|
2
|
+
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
+
declare type BodyStyle = "row" | "column";
|
|
4
|
+
interface BodyProps {
|
|
5
|
+
readonly children: ReactNode;
|
|
6
|
+
readonly style?: Partial<Record<BodyStyle, StyleProp<ViewStyle>>>;
|
|
7
|
+
}
|
|
8
|
+
declare const Body: FC<BodyProps>;
|
|
9
|
+
export { Body };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Column } from "../../../shared/components/layouts/column/Column";
|
|
3
|
+
import { Row } from "../../../shared/components/layouts/row/Row";
|
|
4
|
+
import { style } from "./Body.style";
|
|
5
|
+
const Body = ({ children, style: customStyle }) => (React.createElement(Row, { style: [style.row, customStyle?.row] },
|
|
6
|
+
React.createElement(Column, { style: customStyle?.column }, children)));
|
|
7
|
+
export { Body };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FC, ReactNode } from "react";
|
|
2
|
+
import { StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
3
|
+
interface TabStyle {
|
|
4
|
+
readonly tab: StyleProp<ViewStyle>;
|
|
5
|
+
readonly tabText: StyleProp<TextStyle>;
|
|
6
|
+
}
|
|
7
|
+
interface TabListStyle {
|
|
8
|
+
readonly tabList: StyleProp<ViewStyle>;
|
|
9
|
+
readonly indicator: StyleProp<ViewStyle>;
|
|
10
|
+
readonly tab: Partial<TabStyle>;
|
|
11
|
+
}
|
|
12
|
+
interface TabsStyle {
|
|
13
|
+
readonly tabContainer: StyleProp<ViewStyle>;
|
|
14
|
+
readonly sliderContainer: StyleProp<ViewStyle>;
|
|
15
|
+
readonly tabList: Partial<TabListStyle>;
|
|
16
|
+
}
|
|
17
|
+
interface TabsProps {
|
|
18
|
+
readonly children: JSX.Element[];
|
|
19
|
+
readonly defaultIndex?: number;
|
|
20
|
+
readonly tabLabels: string[];
|
|
21
|
+
readonly style?: Partial<TabsStyle>;
|
|
22
|
+
readonly onChanged?: (index: number) => void;
|
|
23
|
+
readonly tabLabelsWrapper?: (children: ReactNode) => ReactNode;
|
|
24
|
+
}
|
|
25
|
+
declare const Tabs: FC<TabsProps>;
|
|
26
|
+
export { Tabs };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Text } from "@lookiero/aurora-next/build/components/primitives/Text/Text";
|
|
2
|
+
import { animated, useSpring } from "@react-spring/native";
|
|
3
|
+
import React, { Children, useCallback, useState } from "react";
|
|
4
|
+
import { Pressable, View } from "react-native";
|
|
5
|
+
import invariant from "tiny-invariant";
|
|
6
|
+
import { Slider } from "../../../shared/components/layouts/slider/Slider";
|
|
7
|
+
import { style } from "./Tabs.style";
|
|
8
|
+
const Tab = ({ children, active, disabled = false, style: customStyle, onPress, onLayout }) => (React.createElement(Pressable, { disabled: disabled, style: [style.tab, customStyle?.tab], testID: "tab", onLayout: onLayout, onPress: onPress },
|
|
9
|
+
React.createElement(Text, { level: 2, style: [style.tabText, active && style.tabActiveText, customStyle?.tabText], detail: true }, children)));
|
|
10
|
+
const TabList = ({ labels = [], tabIndex = 0, style: customStyle, onSelect }) => {
|
|
11
|
+
const [tabItemPositions, setTabItemPositions] = useState([]);
|
|
12
|
+
const handleOnLayout = useCallback(({ nativeEvent: { layout: { width, x }, }, }, index) => setTabItemPositions((prevState) => [
|
|
13
|
+
...prevState.slice(0, index),
|
|
14
|
+
{
|
|
15
|
+
position: x,
|
|
16
|
+
width,
|
|
17
|
+
},
|
|
18
|
+
...prevState.slice(index),
|
|
19
|
+
]), []);
|
|
20
|
+
const springs = useSpring({
|
|
21
|
+
width: tabItemPositions[tabIndex]?.width,
|
|
22
|
+
left: tabItemPositions[tabIndex]?.position,
|
|
23
|
+
});
|
|
24
|
+
return (React.createElement(View, { style: [style.tabs, customStyle?.tabList], testID: "tab-list" },
|
|
25
|
+
labels.map((item, index) => (React.createElement(Tab, { key: index, active: tabIndex === index, style: customStyle?.tab, onLayout: (event) => handleOnLayout(event, index), onPress: () => onSelect?.(index) }, item))),
|
|
26
|
+
React.createElement(animated.View, { style: [
|
|
27
|
+
style.indicator,
|
|
28
|
+
{
|
|
29
|
+
width: springs.width,
|
|
30
|
+
left: springs.left,
|
|
31
|
+
},
|
|
32
|
+
customStyle?.indicator,
|
|
33
|
+
] })));
|
|
34
|
+
};
|
|
35
|
+
const Tabs = ({ children, defaultIndex = 0, tabLabels, style: customStyle, onChanged, tabLabelsWrapper = (children) => children, }) => {
|
|
36
|
+
invariant(Children.count(children) === tabLabels.length, "Children and tab labels must be the same length");
|
|
37
|
+
const [active, setActive] = useState(defaultIndex);
|
|
38
|
+
const handleOnActiveChanged = useCallback((activeIndex) => {
|
|
39
|
+
setActive(activeIndex);
|
|
40
|
+
onChanged?.(activeIndex);
|
|
41
|
+
}, [onChanged]);
|
|
42
|
+
return (React.createElement(View, { style: [style.container, customStyle?.tabContainer], testID: "tabs" },
|
|
43
|
+
tabLabelsWrapper(React.createElement(TabList, { labels: tabLabels, style: customStyle?.tabList, tabIndex: active, onSelect: handleOnActiveChanged })),
|
|
44
|
+
React.createElement(View, { style: customStyle?.sliderContainer },
|
|
45
|
+
React.createElement(Slider, { active: active, gesturesEnabled: false, paginationEnabled: false, onChanged: handleOnActiveChanged }, children))));
|
|
46
|
+
};
|
|
47
|
+
export { Tabs };
|