@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,33 @@
|
|
|
1
|
+
import { Platform, StyleSheet } from "react-native";
|
|
2
|
+
import { theme } from "../../../../theme/theme";
|
|
3
|
+
const { colorBase, elevationLayerL, elevationRadius, spaceL } = theme();
|
|
4
|
+
const style = StyleSheet.create({
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
sticky: {
|
|
8
|
+
backgroundColor: colorBase,
|
|
9
|
+
bottom: 0,
|
|
10
|
+
elevation: elevationLayerL,
|
|
11
|
+
paddingTop: spaceL,
|
|
12
|
+
shadowColor: colorBase,
|
|
13
|
+
shadowOffset: {
|
|
14
|
+
height: -40,
|
|
15
|
+
width: 0,
|
|
16
|
+
},
|
|
17
|
+
shadowOpacity: 1,
|
|
18
|
+
shadowRadius: elevationRadius,
|
|
19
|
+
width: "100%",
|
|
20
|
+
...Platform.select({
|
|
21
|
+
web: {
|
|
22
|
+
position: "sticky",
|
|
23
|
+
},
|
|
24
|
+
ios: {
|
|
25
|
+
position: "absolute",
|
|
26
|
+
},
|
|
27
|
+
android: {
|
|
28
|
+
position: "absolute",
|
|
29
|
+
},
|
|
30
|
+
}),
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
export { style };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { StyleProp, TouchableHighlightProps, ViewStyle } from "react-native";
|
|
3
|
+
import { IconName, IconStyle } from "../../atoms/icon/Icon";
|
|
4
|
+
interface ButtonIconStyle {
|
|
5
|
+
readonly button: StyleProp<ViewStyle>;
|
|
6
|
+
readonly icon: IconStyle;
|
|
7
|
+
}
|
|
8
|
+
interface ButtonIconBaseProps {
|
|
9
|
+
readonly name: IconName;
|
|
10
|
+
readonly testID?: string;
|
|
11
|
+
readonly style?: Partial<ButtonIconStyle>;
|
|
12
|
+
}
|
|
13
|
+
interface ButtonIconProps extends Omit<TouchableHighlightProps, keyof ButtonIconBaseProps>, ButtonIconBaseProps {
|
|
14
|
+
}
|
|
15
|
+
declare const ButtonIcon: FC<ButtonIconProps>;
|
|
16
|
+
export { ButtonIcon };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TouchableHighlight } from "react-native";
|
|
3
|
+
import { Icon } from "../../atoms/icon/Icon";
|
|
4
|
+
import { buttonIconUnderlayColor, style } from "./ButtonIcon.style";
|
|
5
|
+
const ButtonIcon = ({ name, style: customStyle, testID = "button-icon", onPress, ...restProps }) => (React.createElement(TouchableHighlight, { style: [style.buttonIcon, customStyle?.button], testID: testID, underlayColor: buttonIconUnderlayColor, onPress: onPress, ...restProps },
|
|
6
|
+
React.createElement(Icon, { name: name, style: customStyle?.icon })));
|
|
7
|
+
export { ButtonIcon };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { theme } from "../../../../theme/theme";
|
|
3
|
+
const { spaceS, colorGrayscaleS } = theme();
|
|
4
|
+
const buttonIconUnderlayColor = colorGrayscaleS;
|
|
5
|
+
const style = StyleSheet.create({
|
|
6
|
+
buttonIcon: {
|
|
7
|
+
padding: spaceS,
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
export { style, buttonIconUnderlayColor };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
+
import { ErrorStyle } from "../../atoms/error/Error";
|
|
4
|
+
import { FieldStyle } from "../../atoms/field/Field";
|
|
5
|
+
import { IconName, IconStyle } from "../../atoms/icon/Icon";
|
|
6
|
+
import { InputProps, InputStyle } from "../../atoms/input/Input";
|
|
7
|
+
declare type InputFieldStyle = FieldStyle & {
|
|
8
|
+
readonly inputField: StyleProp<ViewStyle>;
|
|
9
|
+
readonly input: InputStyle;
|
|
10
|
+
readonly error: ErrorStyle;
|
|
11
|
+
readonly icon: IconStyle;
|
|
12
|
+
};
|
|
13
|
+
interface InputFieldBaseProps {
|
|
14
|
+
readonly label: string;
|
|
15
|
+
readonly multiline?: boolean;
|
|
16
|
+
readonly error?: string | null;
|
|
17
|
+
readonly style?: Partial<InputFieldStyle>;
|
|
18
|
+
readonly onChange?: (value: string) => void;
|
|
19
|
+
readonly icon?: IconName;
|
|
20
|
+
}
|
|
21
|
+
interface InputFieldProps extends Omit<InputProps, keyof InputFieldBaseProps>, InputFieldBaseProps {
|
|
22
|
+
}
|
|
23
|
+
declare const InputField: FC<InputFieldProps>;
|
|
24
|
+
export type { InputFieldStyle };
|
|
25
|
+
export { InputField };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React, { useCallback, useState } from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
3
|
+
import { theme } from "../../../../theme/theme";
|
|
4
|
+
import { Error } from "../../atoms/error/Error";
|
|
5
|
+
import { Field } from "../../atoms/field/Field";
|
|
6
|
+
import { Icon } from "../../atoms/icon/Icon";
|
|
7
|
+
import { Input } from "../../atoms/input/Input";
|
|
8
|
+
import { style } from "./InputField.style";
|
|
9
|
+
const { colorBase, colorContent, colorGrayscaleL, colorPrimary, spaceM, iconSize } = theme();
|
|
10
|
+
const inputPaddingRightWithIcon = iconSize + spaceM * 2;
|
|
11
|
+
const InputField = ({ label, placeholder, value, multiline = false, minHeight, error, style: customStyle, onChange = () => void 0, icon, ...inputRestProps }) => {
|
|
12
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
13
|
+
const handleOnChange = useCallback((text) => onChange(text), [onChange]);
|
|
14
|
+
const handleOnBlur = useCallback(() => setIsFocused(false), []);
|
|
15
|
+
const handleOnFocus = useCallback(() => setIsFocused(true), []);
|
|
16
|
+
const color = error ? colorPrimary : isFocused ? colorContent : colorGrayscaleL;
|
|
17
|
+
return (React.createElement(View, { style: customStyle?.inputField, testID: "input-field" },
|
|
18
|
+
React.createElement(Field, { isFocused: isFocused || !!value, label: label, style: {
|
|
19
|
+
field: [style.field, customStyle?.field],
|
|
20
|
+
fieldText: [{ color }, customStyle?.fieldText],
|
|
21
|
+
} }),
|
|
22
|
+
React.createElement(Input, { minHeight: minHeight, multiline: multiline, placeholder: placeholder, placeholderTextColor: isFocused ? colorGrayscaleL : colorBase, style: [!!icon && { paddingRight: inputPaddingRightWithIcon }, { borderColor: color }, customStyle?.input], value: value, onBlur: handleOnBlur, onChangeText: handleOnChange, onFocus: handleOnFocus, ...inputRestProps }),
|
|
23
|
+
!!icon && React.createElement(Icon, { name: icon, style: [style.icon, { color }, customStyle?.icon] }),
|
|
24
|
+
!!error && React.createElement(Error, { error: error, style: [style.error, customStyle?.error] })));
|
|
25
|
+
};
|
|
26
|
+
export { InputField };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const style: {
|
|
2
|
+
error: {
|
|
3
|
+
marginLeft: number;
|
|
4
|
+
marginTop: number;
|
|
5
|
+
};
|
|
6
|
+
field: {
|
|
7
|
+
position: "absolute";
|
|
8
|
+
zIndex: number;
|
|
9
|
+
};
|
|
10
|
+
icon: {
|
|
11
|
+
position: "absolute";
|
|
12
|
+
right: number;
|
|
13
|
+
top: number;
|
|
14
|
+
zIndex: number;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export { style };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { theme } from "../../../../theme/theme";
|
|
3
|
+
const { spaceXS, spaceS, spaceM, spaceL } = theme();
|
|
4
|
+
const style = StyleSheet.create({
|
|
5
|
+
error: {
|
|
6
|
+
marginLeft: spaceL,
|
|
7
|
+
marginTop: spaceXS,
|
|
8
|
+
},
|
|
9
|
+
field: {
|
|
10
|
+
position: "absolute",
|
|
11
|
+
zIndex: 4,
|
|
12
|
+
},
|
|
13
|
+
icon: {
|
|
14
|
+
position: "absolute",
|
|
15
|
+
right: spaceS,
|
|
16
|
+
top: spaceM,
|
|
17
|
+
zIndex: 4,
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
export { style };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { StyleProp, TextStyle, TouchableHighlightProps, ViewStyle } from "react-native";
|
|
3
|
+
import { InputFieldStyle } from "../inputField/InputField";
|
|
4
|
+
interface SelectFieldStyle {
|
|
5
|
+
readonly selectField: StyleProp<ViewStyle>;
|
|
6
|
+
readonly modalContent: StyleProp<ViewStyle>;
|
|
7
|
+
readonly option: StyleProp<ViewStyle>;
|
|
8
|
+
readonly optionText: StyleProp<TextStyle>;
|
|
9
|
+
readonly inputField: Partial<InputFieldStyle>;
|
|
10
|
+
}
|
|
11
|
+
interface Option {
|
|
12
|
+
readonly label: string;
|
|
13
|
+
readonly value: string;
|
|
14
|
+
}
|
|
15
|
+
interface SelectFieldBaseProps {
|
|
16
|
+
readonly placeholder: string;
|
|
17
|
+
readonly value: string | undefined;
|
|
18
|
+
readonly options: Option[];
|
|
19
|
+
readonly style?: Partial<SelectFieldStyle>;
|
|
20
|
+
readonly onChange?: (value: string) => void;
|
|
21
|
+
}
|
|
22
|
+
interface SelectFieldProps extends Omit<TouchableHighlightProps, keyof SelectFieldBaseProps>, SelectFieldBaseProps {
|
|
23
|
+
}
|
|
24
|
+
declare const SelectField: FC<SelectFieldProps>;
|
|
25
|
+
export type { Option };
|
|
26
|
+
export { SelectField };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Text } from "@lookiero/aurora-next/build/components/primitives/Text/Text";
|
|
2
|
+
import React, { useCallback, useMemo, useState } from "react";
|
|
3
|
+
import { TouchableHighlight, View } from "react-native";
|
|
4
|
+
import { theme } from "../../../../theme/theme";
|
|
5
|
+
import { Modal } from "../../layouts/modal/Modal";
|
|
6
|
+
import { InputField } from "../inputField/InputField";
|
|
7
|
+
import { style } from "./SelectField.style";
|
|
8
|
+
const { colorGrayscaleS } = theme();
|
|
9
|
+
const SelectField = ({ placeholder, value, options, style: customStyle, onChange = () => void 0, ...touchableRestProps }) => {
|
|
10
|
+
const [modalVisible, setModalVisible] = useState(false);
|
|
11
|
+
const handleOnPressSelectField = useCallback(() => setModalVisible(true), []);
|
|
12
|
+
const handleOnModalClose = useCallback(() => setModalVisible(false), []);
|
|
13
|
+
const handleOnPressOption = useCallback((value) => {
|
|
14
|
+
onChange(value);
|
|
15
|
+
handleOnModalClose();
|
|
16
|
+
}, [handleOnModalClose, onChange]);
|
|
17
|
+
const selectedValue = useMemo(() => options.find((option) => option.value === value), [options, value]);
|
|
18
|
+
return (React.createElement(React.Fragment, null,
|
|
19
|
+
React.createElement(TouchableHighlight, { style: customStyle?.selectField, underlayColor: colorGrayscaleS, onPress: handleOnPressSelectField, ...touchableRestProps },
|
|
20
|
+
React.createElement(View, { pointerEvents: "none" },
|
|
21
|
+
React.createElement(InputField, { editable: false, icon: "arrow-down", label: placeholder, style: customStyle?.inputField, value: selectedValue?.label }))),
|
|
22
|
+
React.createElement(Modal, { visible: modalVisible, scroll: true, onClose: handleOnModalClose },
|
|
23
|
+
React.createElement(View, { style: [style.modalContent, customStyle?.modalContent] }, options.map(({ label, value }) => (React.createElement(TouchableHighlight, { key: value, style: [style.option, customStyle?.option], underlayColor: colorGrayscaleS, onPress: () => handleOnPressOption(value) },
|
|
24
|
+
React.createElement(Text, { level: 3, style: [style.optionText, customStyle?.optionText] }, label))))))));
|
|
25
|
+
};
|
|
26
|
+
export { SelectField };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const style: {
|
|
2
|
+
modalContent: {
|
|
3
|
+
paddingBottom: number;
|
|
4
|
+
paddingHorizontal: number;
|
|
5
|
+
};
|
|
6
|
+
option: {
|
|
7
|
+
borderBottomColor: string;
|
|
8
|
+
borderBottomWidth: number;
|
|
9
|
+
paddingVertical: number;
|
|
10
|
+
};
|
|
11
|
+
optionText: {
|
|
12
|
+
lineHeight: number;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export { style };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { theme } from "../../../../theme/theme";
|
|
3
|
+
const { borderSize, colorGrayscaleS, spaceM, spaceXL } = theme();
|
|
4
|
+
const style = StyleSheet.create({
|
|
5
|
+
modalContent: {
|
|
6
|
+
paddingBottom: spaceXL,
|
|
7
|
+
paddingHorizontal: spaceXL,
|
|
8
|
+
},
|
|
9
|
+
option: {
|
|
10
|
+
borderBottomColor: colorGrayscaleS,
|
|
11
|
+
borderBottomWidth: borderSize,
|
|
12
|
+
paddingVertical: spaceM,
|
|
13
|
+
},
|
|
14
|
+
optionText: {
|
|
15
|
+
lineHeight: 24,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
export { style };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { useDevice } from "@lookiero/aurora-next/build/hooks/useDevice/useDevice";
|
|
2
|
+
const useScreenSize = () => {
|
|
3
|
+
const { screen } = useDevice();
|
|
4
|
+
const screenSize = Object.entries(screen)
|
|
5
|
+
.filter(([key]) => ["S", "M", "L"].includes(key))
|
|
6
|
+
.find(([, value]) => value);
|
|
7
|
+
return screenSize?.[0];
|
|
8
|
+
};
|
|
9
|
+
export { useScreenSize };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DefaultTheme } from "@lookiero/aurora-next/build/theming/theme.default";
|
|
2
|
+
declare type Remove$PrefixFromKeys<T> = {
|
|
3
|
+
[K in keyof T as K extends `$${infer F}` ? F : K]: T[K];
|
|
4
|
+
};
|
|
5
|
+
declare type AuroraTheme = Remove$PrefixFromKeys<typeof DefaultTheme>;
|
|
6
|
+
interface ThemeFunction {
|
|
7
|
+
(): AuroraTheme;
|
|
8
|
+
}
|
|
9
|
+
declare const theme: ThemeFunction;
|
|
10
|
+
export { theme };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PortalProvider } from "@gorhom/portal";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { SafeAreaProvider } from "react-native-safe-area-context";
|
|
4
|
+
const App = ({ children }) => (React.createElement(SafeAreaProvider, null,
|
|
5
|
+
React.createElement(PortalProvider, null, children)));
|
|
6
|
+
export { App };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Button } from "@lookiero/aurora-next/build/components/atoms/Button/Button";
|
|
2
|
+
import { Icon } from "@lookiero/aurora-next/build/components/primitives/Icon/Icon";
|
|
3
|
+
import { Text } from "@lookiero/aurora-next/build/components/primitives/Text/Text";
|
|
4
|
+
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
|
+
import { CommandStatus, QueryStatus } from "@lookiero/messaging-react";
|
|
6
|
+
import React from "react";
|
|
7
|
+
import { View } from "react-native";
|
|
8
|
+
import { useIncrementIntroShownCount } from "../../../domain/uiSetting/react/useIncrementIntroShownCount";
|
|
9
|
+
import { useViewFiveItemsDiscountByCustomerId } from "../../../projection/checkout/react/useViewFiveItemsDiscountByCustomerId";
|
|
10
|
+
import { Body } from "../../components/layouts/body/Body";
|
|
11
|
+
import { SafeAreaScrollView } from "../../components/templates/SafeAreaScrollView";
|
|
12
|
+
import { I18nMessages } from "../../i18n/i18n";
|
|
13
|
+
import { Spinner } from "../../shared/components/atoms/spinner/Spinner";
|
|
14
|
+
import { style } from "./Intro.style";
|
|
15
|
+
const Bullet = ({ text }) => (React.createElement(View, { style: style.bullet },
|
|
16
|
+
React.createElement(Icon, { name: "rounded-tick", style: style.tickIcon }),
|
|
17
|
+
React.createElement(Text, { level: 2, detail: true }, text)));
|
|
18
|
+
const Intro = ({ customerId }) => {
|
|
19
|
+
const titleText = useI18nMessage({ id: I18nMessages.INTRO_TITLE });
|
|
20
|
+
const subTitleText = useI18nMessage({ id: I18nMessages.INTRO_SUBTITLE });
|
|
21
|
+
const discountText = useI18nMessage({ id: I18nMessages.INTRO_DISCOUNT });
|
|
22
|
+
const bulletOneText = useI18nMessage({ id: I18nMessages.INTRO_BULLET_ONE });
|
|
23
|
+
const bulletTwoText = useI18nMessage({ id: I18nMessages.INTRO_BULLET_TWO });
|
|
24
|
+
const bulletThreeText = useI18nMessage({ id: I18nMessages.INTRO_BULLET_THREE });
|
|
25
|
+
const buttonText = useI18nMessage({ id: I18nMessages.INTRO_BUTTON });
|
|
26
|
+
const [fiveItemsDiscount, fiveItemsDiscountStatus] = useViewFiveItemsDiscountByCustomerId({
|
|
27
|
+
customerId,
|
|
28
|
+
});
|
|
29
|
+
const [incrementIntroShownCount, incrementIntroShownCountStatus] = useIncrementIntroShownCount();
|
|
30
|
+
if (fiveItemsDiscountStatus === QueryStatus.LOADING)
|
|
31
|
+
return React.createElement(Spinner, null);
|
|
32
|
+
return (React.createElement(SafeAreaScrollView, null,
|
|
33
|
+
React.createElement(Body, { style: { column: style.bodyColumn } },
|
|
34
|
+
React.createElement(View, { style: style.container },
|
|
35
|
+
React.createElement(View, { style: style.content },
|
|
36
|
+
React.createElement(Text, { level: 3, style: style.title, heading: true }, titleText),
|
|
37
|
+
React.createElement(Text, { level: 3, style: style.subtitle, body: true }, subTitleText),
|
|
38
|
+
fiveItemsDiscount !== 0 && (React.createElement(View, { style: style.discountContainer },
|
|
39
|
+
React.createElement(View, { style: style.discount },
|
|
40
|
+
React.createElement(Text, { level: 2, heading: true },
|
|
41
|
+
"- ",
|
|
42
|
+
fiveItemsDiscount),
|
|
43
|
+
React.createElement(Text, { level: 3, style: style.percentage, heading: true }, "%")),
|
|
44
|
+
React.createElement(Text, { level: 3, body: true }, discountText))),
|
|
45
|
+
React.createElement(View, { style: style.description },
|
|
46
|
+
React.createElement(Bullet, { text: bulletOneText }),
|
|
47
|
+
React.createElement(Bullet, { text: bulletTwoText }),
|
|
48
|
+
React.createElement(Bullet, { text: bulletThreeText }))),
|
|
49
|
+
React.createElement(Button, { disabled: incrementIntroShownCountStatus === CommandStatus.LOADING, onPress: incrementIntroShownCount }, buttonText)))));
|
|
50
|
+
};
|
|
51
|
+
export { Intro };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
declare const style: {
|
|
2
|
+
bodyColumn: {
|
|
3
|
+
paddingHorizontal: number;
|
|
4
|
+
};
|
|
5
|
+
bullet: {
|
|
6
|
+
alignItems: "center";
|
|
7
|
+
flexDirection: "row";
|
|
8
|
+
marginVertical: number;
|
|
9
|
+
};
|
|
10
|
+
container: {
|
|
11
|
+
flex: number;
|
|
12
|
+
justifyContent: "space-between";
|
|
13
|
+
};
|
|
14
|
+
content: {
|
|
15
|
+
alignItems: "center";
|
|
16
|
+
};
|
|
17
|
+
description: {
|
|
18
|
+
borderWidth: number;
|
|
19
|
+
marginBottom: number;
|
|
20
|
+
padding: number;
|
|
21
|
+
width: string;
|
|
22
|
+
};
|
|
23
|
+
discount: {
|
|
24
|
+
alignItems: "flex-end";
|
|
25
|
+
flexDirection: "row";
|
|
26
|
+
justifyContent: "center";
|
|
27
|
+
marginBottom: number;
|
|
28
|
+
};
|
|
29
|
+
discountContainer: {
|
|
30
|
+
alignItems: "center";
|
|
31
|
+
backgroundColor: string;
|
|
32
|
+
marginBottom: number;
|
|
33
|
+
padding: number;
|
|
34
|
+
textAlign: "center";
|
|
35
|
+
width: string;
|
|
36
|
+
};
|
|
37
|
+
percentage: {
|
|
38
|
+
marginLeft: number;
|
|
39
|
+
};
|
|
40
|
+
subtitle: {
|
|
41
|
+
marginBottom: number;
|
|
42
|
+
textAlign: "center";
|
|
43
|
+
};
|
|
44
|
+
tickIcon: {
|
|
45
|
+
marginRight: number;
|
|
46
|
+
};
|
|
47
|
+
title: {
|
|
48
|
+
marginBottom: number;
|
|
49
|
+
textAlign: "center";
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export { style };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { theme } from "../../theme/theme";
|
|
3
|
+
const { borderSize, colorAccent, spaceXS, spaceS, spaceM, spaceL, spaceXL } = theme();
|
|
4
|
+
const style = StyleSheet.create({
|
|
5
|
+
bodyColumn: {
|
|
6
|
+
paddingHorizontal: spaceXL,
|
|
7
|
+
},
|
|
8
|
+
bullet: {
|
|
9
|
+
alignItems: "center",
|
|
10
|
+
flexDirection: "row",
|
|
11
|
+
marginVertical: spaceS,
|
|
12
|
+
},
|
|
13
|
+
container: {
|
|
14
|
+
flex: 1,
|
|
15
|
+
justifyContent: "space-between",
|
|
16
|
+
},
|
|
17
|
+
content: {
|
|
18
|
+
alignItems: "center",
|
|
19
|
+
},
|
|
20
|
+
description: {
|
|
21
|
+
borderWidth: borderSize,
|
|
22
|
+
marginBottom: spaceXL,
|
|
23
|
+
padding: spaceM,
|
|
24
|
+
width: "100%",
|
|
25
|
+
},
|
|
26
|
+
discount: {
|
|
27
|
+
alignItems: "flex-end",
|
|
28
|
+
flexDirection: "row",
|
|
29
|
+
justifyContent: "center",
|
|
30
|
+
marginBottom: spaceS,
|
|
31
|
+
},
|
|
32
|
+
discountContainer: {
|
|
33
|
+
alignItems: "center",
|
|
34
|
+
backgroundColor: colorAccent,
|
|
35
|
+
marginBottom: spaceL,
|
|
36
|
+
padding: spaceM,
|
|
37
|
+
textAlign: "center",
|
|
38
|
+
width: "100%",
|
|
39
|
+
},
|
|
40
|
+
percentage: {
|
|
41
|
+
marginLeft: spaceXS,
|
|
42
|
+
},
|
|
43
|
+
subtitle: {
|
|
44
|
+
marginBottom: spaceXL,
|
|
45
|
+
textAlign: "center",
|
|
46
|
+
},
|
|
47
|
+
tickIcon: {
|
|
48
|
+
marginRight: spaceS,
|
|
49
|
+
},
|
|
50
|
+
title: {
|
|
51
|
+
marginBottom: spaceM,
|
|
52
|
+
textAlign: "center",
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
export { style };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { CommandStatus, QueryStatus } from "@lookiero/messaging-react";
|
|
2
|
+
import React, { useCallback, useEffect, useState } from "react";
|
|
3
|
+
import { View } from "react-native";
|
|
4
|
+
import { useParams } from "react-router-native";
|
|
5
|
+
import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
|
|
6
|
+
import "../../../../projection/checkout/viewFirstAvailableCheckoutByCustomerId";
|
|
7
|
+
import { useBookCheckouBookingForCheckoutItem } from "../../../domain/checkoutBooking/react/useBookCheckouBookingForCheckoutItem";
|
|
8
|
+
import { useKeepCheckoutItem } from "../../../domain/checkoutItem/react/useKeepCheckoutItem";
|
|
9
|
+
import { useReplaceCheckoutItem } from "../../../domain/checkoutItem/react/useReplaceCheckoutItem";
|
|
10
|
+
import { useReturnCheckoutItem } from "../../../domain/checkoutItem/react/useReturnCheckoutItem";
|
|
11
|
+
import { useViewBookedSizeChangeProductsVariantsForCheckoutItem } from "../../../projection/bookedSizeChangeProductsVariants/react/useViewBookedSizeChangeProductsVariantsForCheckoutItem";
|
|
12
|
+
import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
|
|
13
|
+
import { useListReturnQuestionsByCheckoutItemId } from "../../../projection/returnQuestion/react/useListReturnQuestionsByCheckoutItemId";
|
|
14
|
+
import { Body } from "../../components/layouts/body/Body";
|
|
15
|
+
import { SafeAreaScrollView } from "../../components/templates/SafeAreaScrollView";
|
|
16
|
+
import { Spinner } from "../../shared/components/atoms/spinner/Spinner";
|
|
17
|
+
import { style } from "./Item.style";
|
|
18
|
+
import { CustomerDecissionBanner } from "./components/banner/CustomerDecissionBanner";
|
|
19
|
+
import { ItemActions } from "./components/itemActions/ItemActions";
|
|
20
|
+
import { ProductVariantDescription } from "./components/productVariantDescription/ProductVariantDescription";
|
|
21
|
+
import { ProductVariantSlider } from "./components/productVariantSlider/ProductVariantSlider";
|
|
22
|
+
import { ReturnQuestionsFeedback } from "./components/returnQuestionsFeedback/ReturnQuestionsFeedback";
|
|
23
|
+
import { ReturnQuestionsForm } from "./components/returnQuestionsForm/ReturnQuestionsForm";
|
|
24
|
+
import { SizeChangeModal } from "./components/sizeChangeModal/SizeChangeModal";
|
|
25
|
+
import { SizeWithoutStockModal } from "./components/sizeWithoutStockModal/SizeWithoutStockModal";
|
|
26
|
+
const Item = ({ customerId }) => {
|
|
27
|
+
const { id } = useParams();
|
|
28
|
+
const [checkout, checkoutStatus] = useViewFirstAvailableCheckoutByCustomerId({ customerId });
|
|
29
|
+
const checkoutItem = checkout?.items.find((checkoutItem) => checkoutItem.id === id);
|
|
30
|
+
const [customerDecissionMade, setCustomerDecissionMade] = useState(() => checkoutItem.status === CheckoutItemStatus.INITIAL || checkoutItem.status === CheckoutItemStatus.EXPIRED);
|
|
31
|
+
const handleOnBannerPress = useCallback(() => setCustomerDecissionMade(!customerDecissionMade), [customerDecissionMade]);
|
|
32
|
+
const [sizeWithoutStockModalVisible, setSizeWithoutStockModalVisible] = useState(false);
|
|
33
|
+
const handleOnShowSizeWithoutStockModal = useCallback(() => setSizeWithoutStockModalVisible(true), []);
|
|
34
|
+
const handleOnHideSizeWithoutStockModal = useCallback(() => setSizeWithoutStockModalVisible(false), []);
|
|
35
|
+
const [sizeChangeModalVisible, setSizeChangeModalVisible] = useState(false);
|
|
36
|
+
const handleOnShowSizeChangeModal = useCallback(() => setSizeChangeModalVisible(true), []);
|
|
37
|
+
const handleOnHideSizeChangeModal = useCallback(() => setSizeChangeModalVisible(false), []);
|
|
38
|
+
const [bookedSizeChangeProductsVariants, bookedSizeChangeProductsVariantsStatus] = useViewBookedSizeChangeProductsVariantsForCheckoutItem({
|
|
39
|
+
checkoutItemId: checkoutItem.id,
|
|
40
|
+
});
|
|
41
|
+
const [bookCheckouBooking] = useBookCheckouBookingForCheckoutItem({
|
|
42
|
+
checkoutBookingId: bookedSizeChangeProductsVariants?.id,
|
|
43
|
+
checkoutId: checkout?.id,
|
|
44
|
+
checkoutItemId: checkoutItem.id,
|
|
45
|
+
});
|
|
46
|
+
const [returnQuestions, returnQuestionsStatus] = useListReturnQuestionsByCheckoutItemId({
|
|
47
|
+
checkoutItemId: checkoutItem.id,
|
|
48
|
+
});
|
|
49
|
+
const [keepCheckoutItem, keepCheckoutItemStatus] = useKeepCheckoutItem({ checkoutItemId: checkoutItem.id });
|
|
50
|
+
const [returnCheckoutItem, returnCheckoutItemStatus] = useReturnCheckoutItem({
|
|
51
|
+
checkoutItemId: checkoutItem.id,
|
|
52
|
+
});
|
|
53
|
+
const [replaceCheckoutItem, replaceCheckoutItemStatus] = useReplaceCheckoutItem({
|
|
54
|
+
checkoutItemId: checkoutItem.id,
|
|
55
|
+
});
|
|
56
|
+
const [stickyHeight, setStickyHeight] = useState(0);
|
|
57
|
+
const handleOnStickyLayout = useCallback(({ height }) => setStickyHeight(height), []);
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
checkout?.bookingId === undefined && bookCheckouBooking();
|
|
60
|
+
}, [bookCheckouBooking, checkout?.bookingId]);
|
|
61
|
+
const [returnQuestionsVisible, setReturnQuestionsVisible] = useState(false);
|
|
62
|
+
const handleOnShowReturnQuestions = useCallback(() => setReturnQuestionsVisible(true), []);
|
|
63
|
+
const handleOnHideReturnQuestions = useCallback(() => setReturnQuestionsVisible(false), []);
|
|
64
|
+
const handleOnEditFeedback = useCallback(() => handleOnShowReturnQuestions(), [handleOnShowReturnQuestions]);
|
|
65
|
+
const handleOnSubmit = useCallback((feedback) => {
|
|
66
|
+
handleOnHideReturnQuestions();
|
|
67
|
+
returnCheckoutItem({ feedbacks: feedback });
|
|
68
|
+
}, [handleOnHideReturnQuestions, returnCheckoutItem]);
|
|
69
|
+
const handleOnReplace = useCallback((replacedFor) => {
|
|
70
|
+
handleOnShowSizeChangeModal();
|
|
71
|
+
replaceCheckoutItem({ replacedFor });
|
|
72
|
+
}, [handleOnShowSizeChangeModal, replaceCheckoutItem]);
|
|
73
|
+
const handleOnReturn = useCallback(() => handleOnShowReturnQuestions(), [handleOnShowReturnQuestions]);
|
|
74
|
+
const dependenciesLoadedStatuses = [QueryStatus.ERROR, QueryStatus.SUCCESS];
|
|
75
|
+
const dependenciesLoaded = dependenciesLoadedStatuses.includes(returnQuestionsStatus) &&
|
|
76
|
+
dependenciesLoadedStatuses.includes(checkoutStatus) &&
|
|
77
|
+
dependenciesLoadedStatuses.includes(bookedSizeChangeProductsVariantsStatus);
|
|
78
|
+
if (!dependenciesLoaded)
|
|
79
|
+
return React.createElement(Spinner, null);
|
|
80
|
+
const { price } = checkoutItem;
|
|
81
|
+
const { media, brand, name, size, color } = checkoutItem.productVariant;
|
|
82
|
+
return (React.createElement(React.Fragment, null,
|
|
83
|
+
React.createElement(SizeWithoutStockModal, { visible: sizeWithoutStockModalVisible, onDismiss: handleOnHideSizeWithoutStockModal }),
|
|
84
|
+
React.createElement(SizeChangeModal, { visible: sizeChangeModalVisible, onDismiss: handleOnHideSizeChangeModal }),
|
|
85
|
+
React.createElement(SafeAreaScrollView, null,
|
|
86
|
+
React.createElement(Body, null,
|
|
87
|
+
!customerDecissionMade && (React.createElement(CustomerDecissionBanner, { checkoutItemStatus: checkoutItem.status, onPress: handleOnBannerPress })),
|
|
88
|
+
React.createElement(View, { style: [style.container, { paddingBottom: stickyHeight }] },
|
|
89
|
+
React.createElement(View, { style: style.sliderContainer },
|
|
90
|
+
React.createElement(ProductVariantSlider, { producVariantMedia: media })),
|
|
91
|
+
React.createElement(ProductVariantDescription, { brand: brand, color: color, name: name, price: price, size: size }),
|
|
92
|
+
checkoutItem.feedback && (React.createElement(View, { style: style.feedbackContainer },
|
|
93
|
+
React.createElement(ReturnQuestionsFeedback, { feedback: checkoutItem.feedback || {}, returnQuestions: returnQuestions || [], onEditFeedback: handleOnEditFeedback })))))),
|
|
94
|
+
customerDecissionMade && (React.createElement(ItemActions, { keepButtonLoading: keepCheckoutItemStatus === CommandStatus.LOADING, productVariantSelected: checkoutItem.productVariant, productVariants: bookedSizeChangeProductsVariants?.productVariants || [], returnButtonLoading: returnCheckoutItemStatus === CommandStatus.LOADING, sizeSelectorDisabled: replaceCheckoutItemStatus === CommandStatus.LOADING, onKeep: keepCheckoutItem, onLayout: handleOnStickyLayout, onReplace: handleOnReplace, onReturn: handleOnReturn, onSizeSelectorPress: handleOnShowSizeWithoutStockModal })),
|
|
95
|
+
React.createElement(ReturnQuestionsForm, { checkoutItemPrice: checkoutItem.price, feedback: checkoutItem.feedback || {}, productVariant: checkoutItem.productVariant, returnQuestions: returnQuestions || [], visible: returnQuestionsVisible, onClose: handleOnHideReturnQuestions, onSubmit: handleOnSubmit })));
|
|
96
|
+
};
|
|
97
|
+
export { Item };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const style: {
|
|
2
|
+
container: {
|
|
3
|
+
paddingHorizontal: number;
|
|
4
|
+
};
|
|
5
|
+
feedbackContainer: {
|
|
6
|
+
borderTopColor: string;
|
|
7
|
+
borderTopWidth: number;
|
|
8
|
+
marginVertical: number;
|
|
9
|
+
};
|
|
10
|
+
sliderContainer: {
|
|
11
|
+
marginBottom: number;
|
|
12
|
+
minHeight: number;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export { style };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { theme } from "../../theme/theme";
|
|
3
|
+
const { borderSize, colorGrayscaleM, spaceXL } = theme();
|
|
4
|
+
const style = StyleSheet.create({
|
|
5
|
+
container: {
|
|
6
|
+
paddingHorizontal: spaceXL,
|
|
7
|
+
},
|
|
8
|
+
feedbackContainer: {
|
|
9
|
+
borderTopColor: colorGrayscaleM,
|
|
10
|
+
borderTopWidth: borderSize,
|
|
11
|
+
marginVertical: spaceXL,
|
|
12
|
+
},
|
|
13
|
+
sliderContainer: {
|
|
14
|
+
marginBottom: spaceXL,
|
|
15
|
+
minHeight: 500,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
export { style };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
|
|
3
|
+
declare type CustomerDecissionBannerStatus = Exclude<CheckoutItemStatus, CheckoutItemStatus.INITIAL | CheckoutItemStatus.EXPIRED>;
|
|
4
|
+
interface CustomerDecissionBannerProps {
|
|
5
|
+
readonly checkoutItemStatus: CustomerDecissionBannerStatus;
|
|
6
|
+
readonly onPress: () => void;
|
|
7
|
+
}
|
|
8
|
+
declare const CustomerDecissionBanner: FC<CustomerDecissionBannerProps>;
|
|
9
|
+
export type { CustomerDecissionBannerStatus };
|
|
10
|
+
export { CustomerDecissionBanner };
|