@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,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ScrollView } from "react-native";
|
|
3
|
+
import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context";
|
|
4
|
+
import { theme } from "../../theme/theme";
|
|
5
|
+
const { spaceXL } = theme();
|
|
6
|
+
const SafeAreaScrollView = ({ children, edges = ["top", "bottom", "left", "right"] }) => {
|
|
7
|
+
const { top: safeAreaInsetTop, bottom: safeAreaInsetBottom } = useSafeAreaInsets();
|
|
8
|
+
return (React.createElement(SafeAreaView, { edges: edges },
|
|
9
|
+
React.createElement(ScrollView, { contentContainerStyle: {
|
|
10
|
+
paddingTop: !safeAreaInsetTop ? spaceXL : 0,
|
|
11
|
+
paddingBottom: !safeAreaInsetBottom ? spaceXL : 0,
|
|
12
|
+
} }, children)));
|
|
13
|
+
};
|
|
14
|
+
export { SafeAreaScrollView };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
import { PixelRatio } from "react-native";
|
|
3
|
+
const DEFAULT_DPI = 1;
|
|
4
|
+
const HIGHDPI = 2;
|
|
5
|
+
const useMediaImage = () => {
|
|
6
|
+
const cdnImageUrl = useCallback(({ url, width, dpi = PixelRatio.get() }) => {
|
|
7
|
+
const imageDpi = dpi > DEFAULT_DPI ? HIGHDPI : DEFAULT_DPI;
|
|
8
|
+
return `${url}?w=${Math.ceil(width * imageDpi)}&f=auto`;
|
|
9
|
+
}, []);
|
|
10
|
+
return cdnImageUrl;
|
|
11
|
+
};
|
|
12
|
+
export { useMediaImage };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
declare const COLOR_I18N_PREFIX = "color.";
|
|
2
|
+
declare const RETURN_QUESTIONS_PREFIX = "return_questions.";
|
|
3
|
+
declare const RETURN_QUESTIONS_FEEDBACK_PREFIX = "return_questions_feedback.";
|
|
4
|
+
declare enum I18nMessages {
|
|
5
|
+
INTRO_TITLE = "intro.title",
|
|
6
|
+
INTRO_SUBTITLE = "intro.subtitle",
|
|
7
|
+
INTRO_DISCOUNT = "intro.discount",
|
|
8
|
+
INTRO_BULLET_ONE = "intro.bullet_one",
|
|
9
|
+
INTRO_BULLET_TWO = "intro.bullet_two",
|
|
10
|
+
INTRO_BULLET_THREE = "intro.bullet_three",
|
|
11
|
+
INTRO_BUTTON = "intro.button",
|
|
12
|
+
ITEM_SIZE = "item.size",
|
|
13
|
+
ITEM_COLOR = "item.color",
|
|
14
|
+
ITEM_UNIQUE = "item.unique",
|
|
15
|
+
ITEM_SIZES_LABEL = "item.sizes_label",
|
|
16
|
+
ITEM_KEEP_BUTTON = "item.keep_button",
|
|
17
|
+
ITEM_RETURN_BUTTON = "item.return_button",
|
|
18
|
+
ITEM_BANNER_CUSTOMER_KEPT_DECISSION = "item.banner_customer_kept_decission",
|
|
19
|
+
ITEM_BANNER_CUSTOMER_REPLACED_DECISSION = "item.banner_customer_replaced_decission",
|
|
20
|
+
ITEM_BANNER_CUSTOMER_RETURNED_DECISSION = "item.banner_customer_returned_decission",
|
|
21
|
+
ITEM_BANNER_BUTTON = "item.banner_button",
|
|
22
|
+
SIZE_CHANGE_MODAL_TITLE = "size_change_modal.title",
|
|
23
|
+
SIZE_CHANGE_MODAL_DESCRIPTION = "size_change_modal.description",
|
|
24
|
+
SIZE_CHANGE_MODAL_BUTTON = "size_change_modal.button",
|
|
25
|
+
SIZE_WITHOUT_STOCK_MODAL_TITLE = "size_without_stock_modal.title",
|
|
26
|
+
SIZE_WITHOUT_STOCK_MODAL_DESCRIPTION = "size_without_stock_modal.description",
|
|
27
|
+
SIZE_WITHOUT_STOCK_MODAL_BUTTON = "size_without_stock_modal.button",
|
|
28
|
+
GET_OUT_OF_CHECKOUT_MODAL_TITLE = "get_out_of_checkout_modal.title",
|
|
29
|
+
GET_OUT_OF_CHECKOUT_MODAL_DESCRIPTION = "get_out_of_checkout_modal.description",
|
|
30
|
+
GET_OUT_OF_CHECKOUT_MODAL_DISMISS_BUTTON = "get_out_of_checkout_modal.dismiss_button",
|
|
31
|
+
GET_OUT_OF_CHECKOUT_MODAL_CONFIRM_BUTTON = "get_out_of_checkout_modal.confirm_button",
|
|
32
|
+
FEEDBACK_TITLE = "feedback.title",
|
|
33
|
+
FEEDBACK_UNANSWERED = "feedback.unanswered",
|
|
34
|
+
RETURN_QUESTIONS_TITLE = "return_questions.title",
|
|
35
|
+
RETURN_QUESTIONS_SUBMIT_BUTTON = "return_questions.submit_button",
|
|
36
|
+
SUMMARY_KEEP_TAB = "summary.keep_tab",
|
|
37
|
+
SUMMARY_RETURN_TAB = "summary.return_tab"
|
|
38
|
+
}
|
|
39
|
+
export { I18nMessages, COLOR_I18N_PREFIX, RETURN_QUESTIONS_PREFIX, RETURN_QUESTIONS_FEEDBACK_PREFIX };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const COLOR_I18N_PREFIX = "color.";
|
|
2
|
+
const RETURN_QUESTIONS_PREFIX = "return_questions.";
|
|
3
|
+
const RETURN_QUESTIONS_FEEDBACK_PREFIX = "return_questions_feedback.";
|
|
4
|
+
var I18nMessages;
|
|
5
|
+
(function (I18nMessages) {
|
|
6
|
+
I18nMessages["INTRO_TITLE"] = "intro.title";
|
|
7
|
+
I18nMessages["INTRO_SUBTITLE"] = "intro.subtitle";
|
|
8
|
+
I18nMessages["INTRO_DISCOUNT"] = "intro.discount";
|
|
9
|
+
I18nMessages["INTRO_BULLET_ONE"] = "intro.bullet_one";
|
|
10
|
+
I18nMessages["INTRO_BULLET_TWO"] = "intro.bullet_two";
|
|
11
|
+
I18nMessages["INTRO_BULLET_THREE"] = "intro.bullet_three";
|
|
12
|
+
I18nMessages["INTRO_BUTTON"] = "intro.button";
|
|
13
|
+
I18nMessages["ITEM_SIZE"] = "item.size";
|
|
14
|
+
I18nMessages["ITEM_COLOR"] = "item.color";
|
|
15
|
+
I18nMessages["ITEM_UNIQUE"] = "item.unique";
|
|
16
|
+
I18nMessages["ITEM_SIZES_LABEL"] = "item.sizes_label";
|
|
17
|
+
I18nMessages["ITEM_KEEP_BUTTON"] = "item.keep_button";
|
|
18
|
+
I18nMessages["ITEM_RETURN_BUTTON"] = "item.return_button";
|
|
19
|
+
I18nMessages["ITEM_BANNER_CUSTOMER_KEPT_DECISSION"] = "item.banner_customer_kept_decission";
|
|
20
|
+
I18nMessages["ITEM_BANNER_CUSTOMER_REPLACED_DECISSION"] = "item.banner_customer_replaced_decission";
|
|
21
|
+
I18nMessages["ITEM_BANNER_CUSTOMER_RETURNED_DECISSION"] = "item.banner_customer_returned_decission";
|
|
22
|
+
I18nMessages["ITEM_BANNER_BUTTON"] = "item.banner_button";
|
|
23
|
+
I18nMessages["SIZE_CHANGE_MODAL_TITLE"] = "size_change_modal.title";
|
|
24
|
+
I18nMessages["SIZE_CHANGE_MODAL_DESCRIPTION"] = "size_change_modal.description";
|
|
25
|
+
I18nMessages["SIZE_CHANGE_MODAL_BUTTON"] = "size_change_modal.button";
|
|
26
|
+
I18nMessages["SIZE_WITHOUT_STOCK_MODAL_TITLE"] = "size_without_stock_modal.title";
|
|
27
|
+
I18nMessages["SIZE_WITHOUT_STOCK_MODAL_DESCRIPTION"] = "size_without_stock_modal.description";
|
|
28
|
+
I18nMessages["SIZE_WITHOUT_STOCK_MODAL_BUTTON"] = "size_without_stock_modal.button";
|
|
29
|
+
I18nMessages["GET_OUT_OF_CHECKOUT_MODAL_TITLE"] = "get_out_of_checkout_modal.title";
|
|
30
|
+
I18nMessages["GET_OUT_OF_CHECKOUT_MODAL_DESCRIPTION"] = "get_out_of_checkout_modal.description";
|
|
31
|
+
I18nMessages["GET_OUT_OF_CHECKOUT_MODAL_DISMISS_BUTTON"] = "get_out_of_checkout_modal.dismiss_button";
|
|
32
|
+
I18nMessages["GET_OUT_OF_CHECKOUT_MODAL_CONFIRM_BUTTON"] = "get_out_of_checkout_modal.confirm_button";
|
|
33
|
+
I18nMessages["FEEDBACK_TITLE"] = "feedback.title";
|
|
34
|
+
I18nMessages["FEEDBACK_UNANSWERED"] = "feedback.unanswered";
|
|
35
|
+
I18nMessages["RETURN_QUESTIONS_TITLE"] = "return_questions.title";
|
|
36
|
+
I18nMessages["RETURN_QUESTIONS_SUBMIT_BUTTON"] = "return_questions.submit_button";
|
|
37
|
+
I18nMessages["SUMMARY_KEEP_TAB"] = "summary.keep_tab";
|
|
38
|
+
I18nMessages["SUMMARY_RETURN_TAB"] = "summary.return_tab";
|
|
39
|
+
})(I18nMessages || (I18nMessages = {}));
|
|
40
|
+
export { I18nMessages, COLOR_I18N_PREFIX, RETURN_QUESTIONS_PREFIX, RETURN_QUESTIONS_FEEDBACK_PREFIX };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
interface CheckoutAccessibilityMiddlewareProps {
|
|
3
|
+
readonly customerId: string | undefined;
|
|
4
|
+
readonly onNotAccessible: () => void;
|
|
5
|
+
readonly loader?: JSX.Element;
|
|
6
|
+
readonly children: JSX.Element;
|
|
7
|
+
}
|
|
8
|
+
declare const CheckoutAccessibilityMiddleware: FC<CheckoutAccessibilityMiddlewareProps>;
|
|
9
|
+
export { CheckoutAccessibilityMiddleware };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { QueryStatus } from "@lookiero/messaging-react";
|
|
2
|
+
import React, { useEffect, useRef } from "react";
|
|
3
|
+
import { useViewIsCheckoutAccessibleByCustomerId } from "../../projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId";
|
|
4
|
+
import { Spinner } from "../shared/components/atoms/spinner/Spinner";
|
|
5
|
+
const CheckoutAccessibilityMiddleware = ({ customerId, onNotAccessible, loader = React.createElement(Spinner, null), children, }) => {
|
|
6
|
+
const [accessible, status] = useViewIsCheckoutAccessibleByCustomerId({ customerId });
|
|
7
|
+
const onNotAccessibleRef = useRef(onNotAccessible);
|
|
8
|
+
onNotAccessibleRef.current = onNotAccessible;
|
|
9
|
+
const notAccessible = accessible === false || status === QueryStatus.ERROR;
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
if (notAccessible) {
|
|
12
|
+
onNotAccessibleRef.current();
|
|
13
|
+
}
|
|
14
|
+
}, [notAccessible, onNotAccessible]);
|
|
15
|
+
return accessible === undefined && [QueryStatus.IDLE, QueryStatus.LOADING].includes(status)
|
|
16
|
+
? loader
|
|
17
|
+
: accessible
|
|
18
|
+
? children
|
|
19
|
+
: null;
|
|
20
|
+
};
|
|
21
|
+
export { CheckoutAccessibilityMiddleware };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
interface CheckoutMiddlewareProps {
|
|
3
|
+
readonly basePath: string;
|
|
4
|
+
readonly customerId: string;
|
|
5
|
+
readonly loader?: JSX.Element;
|
|
6
|
+
readonly children: JSX.Element;
|
|
7
|
+
}
|
|
8
|
+
declare const CheckoutMiddleware: FC<CheckoutMiddlewareProps>;
|
|
9
|
+
export { CheckoutMiddleware };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { QueryStatus } from "@lookiero/messaging-react";
|
|
2
|
+
import React, { useRef } from "react";
|
|
3
|
+
import { generatePath, Navigate, useMatch } from "react-router-native";
|
|
4
|
+
import { CheckoutItemStatus } from "../../../domain/checkoutItem/model/checkoutItem";
|
|
5
|
+
import { useViewFirstAvailableCheckoutByCustomerId } from "../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
|
|
6
|
+
import { useShouldIntroBeShown } from "../../projection/uiSetting/react/useShouldIntroBeShown";
|
|
7
|
+
import { Spinner } from "../shared/components/atoms/spinner/Spinner";
|
|
8
|
+
import { Routes } from "./routes";
|
|
9
|
+
const CheckoutMiddleware = ({ basePath, customerId, loader = React.createElement(Spinner, null), children }) => {
|
|
10
|
+
const introShown = useRef(false);
|
|
11
|
+
const [shouldIntroBeShown, shouldIntroBeShownStatus] = useShouldIntroBeShown();
|
|
12
|
+
const [checkout, checkoutStatus] = useViewFirstAvailableCheckoutByCustomerId({ customerId });
|
|
13
|
+
const firstItemWithoutCustomerDecision = checkout?.items.find((item) => [CheckoutItemStatus.EXPIRED, CheckoutItemStatus.INITIAL].includes(item.status));
|
|
14
|
+
const introRouteMatch = useMatch(`${basePath}/${Routes.INTRO}`);
|
|
15
|
+
const itemRouteMatch = useMatch(`${basePath}/${Routes.ITEM}`);
|
|
16
|
+
const summaryRouteMatch = useMatch(`${basePath}/${Routes.SUMMARY}`);
|
|
17
|
+
const dependenciesLoadedStatuses = [QueryStatus.ERROR, QueryStatus.SUCCESS];
|
|
18
|
+
const dependenciesLoaded = dependenciesLoadedStatuses.includes(shouldIntroBeShownStatus) &&
|
|
19
|
+
dependenciesLoadedStatuses.includes(checkoutStatus);
|
|
20
|
+
if (!dependenciesLoaded) {
|
|
21
|
+
return loader;
|
|
22
|
+
}
|
|
23
|
+
if (shouldIntroBeShown && !introShown.current) {
|
|
24
|
+
if (introRouteMatch) {
|
|
25
|
+
introShown.current = true;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
return React.createElement(Navigate, { to: `${basePath}/${Routes.INTRO}`, replace: true });
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
if (itemRouteMatch) {
|
|
33
|
+
const checkoutItem = checkout?.items.find((item) => item.id === itemRouteMatch.params.id);
|
|
34
|
+
if (!checkoutItem) {
|
|
35
|
+
return React.createElement(Navigate, { to: `${basePath}/${Routes.HOME}`, replace: true });
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
if (firstItemWithoutCustomerDecision && !itemRouteMatch) {
|
|
39
|
+
return (React.createElement(Navigate, { to: generatePath(`${basePath}/${Routes.ITEM}`, { id: firstItemWithoutCustomerDecision.id }), replace: true }));
|
|
40
|
+
}
|
|
41
|
+
if (firstItemWithoutCustomerDecision === undefined && !summaryRouteMatch) {
|
|
42
|
+
return React.createElement(Navigate, { to: `${basePath}/${Routes.SUMMARY}`, replace: true });
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return children;
|
|
46
|
+
};
|
|
47
|
+
export { CheckoutMiddleware };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { I18n } from "@lookiero/i18n-react";
|
|
2
|
+
import { FC } from "react";
|
|
3
|
+
interface RoutingProps {
|
|
4
|
+
readonly onNotAccessible: () => void;
|
|
5
|
+
readonly customerId: string | undefined;
|
|
6
|
+
readonly locale: string;
|
|
7
|
+
readonly I18n: I18n;
|
|
8
|
+
readonly basePath?: string;
|
|
9
|
+
readonly onI18nError?: (err: Error) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const Routing: FC<RoutingProps>;
|
|
12
|
+
export { Routing };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React, { lazy, Suspense } from "react";
|
|
2
|
+
import { Navigate, Outlet, useRoutes } from "react-router-native";
|
|
3
|
+
import { Spinner } from "../shared/components/atoms/spinner/Spinner";
|
|
4
|
+
import { App } from "../views/App";
|
|
5
|
+
import { CheckoutAccessibilityMiddleware } from "./CheckoutAccessibilityMiddleware";
|
|
6
|
+
import { CheckoutMiddleware } from "./CheckoutMiddleware";
|
|
7
|
+
import { Routes } from "./routes";
|
|
8
|
+
const Intro = lazy(() => import("../views/intro/Intro").then((module) => ({ default: module.Intro })));
|
|
9
|
+
const Item = lazy(() => import("../views/item/Item").then((module) => ({ default: module.Item })));
|
|
10
|
+
const Summary = lazy(() => import("../views/summary/Summary").then((module) => ({ default: module.Summary })));
|
|
11
|
+
const Routing = ({ basePath = "", onNotAccessible, customerId, locale, I18n, onI18nError }) => {
|
|
12
|
+
const routes = useRoutes([
|
|
13
|
+
{
|
|
14
|
+
path: "",
|
|
15
|
+
element: (React.createElement(CheckoutAccessibilityMiddleware, { customerId: customerId, onNotAccessible: onNotAccessible },
|
|
16
|
+
React.createElement(I18n, { loader: React.createElement(Spinner, null), locale: locale, onError: onI18nError },
|
|
17
|
+
React.createElement(CheckoutMiddleware, { basePath: basePath, customerId: customerId },
|
|
18
|
+
React.createElement(App, null,
|
|
19
|
+
React.createElement(Outlet, null)))))),
|
|
20
|
+
children: [
|
|
21
|
+
{
|
|
22
|
+
path: Routes.INTRO,
|
|
23
|
+
element: (React.createElement(Suspense, { fallback: React.createElement(Spinner, null) },
|
|
24
|
+
React.createElement(Intro, { customerId: customerId }))),
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
path: Routes.ITEM,
|
|
28
|
+
element: (React.createElement(Suspense, { fallback: React.createElement(Spinner, null) },
|
|
29
|
+
React.createElement(Item, { customerId: customerId }))),
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
path: Routes.SUMMARY,
|
|
33
|
+
element: (React.createElement(Suspense, { fallback: React.createElement(Spinner, null) },
|
|
34
|
+
React.createElement(Summary, { customerId: customerId }))),
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
path: "*",
|
|
38
|
+
element: React.createElement(Navigate, { to: `${Routes.HOME}`, replace: true }),
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
]);
|
|
43
|
+
return routes;
|
|
44
|
+
};
|
|
45
|
+
export { Routing };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BrowserRouter as Router } from "react-router-dom";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BrowserRouter as Router } from "react-router-dom";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NativeRouter as Router } from "react-router-native";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NativeRouter as Router } from "react-router-native";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { StyleProp, TextStyle } from "react-native";
|
|
3
|
+
declare type ErrorStyle = StyleProp<TextStyle>;
|
|
4
|
+
interface ErrorProps {
|
|
5
|
+
readonly error?: string | null;
|
|
6
|
+
readonly style?: ErrorStyle;
|
|
7
|
+
}
|
|
8
|
+
declare const Error: FC<ErrorProps>;
|
|
9
|
+
export type { ErrorStyle };
|
|
10
|
+
export { Error };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Text } from "@lookiero/aurora-next/build/components/primitives/Text/Text";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { style } from "./Error.style";
|
|
4
|
+
const Error = ({ error, style: customStyle }) => (React.createElement(Text, { level: 2, style: [style.error, customStyle], detail: true }, error));
|
|
5
|
+
export { Error };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
3
|
+
declare type FieldStyle = {
|
|
4
|
+
readonly field: StyleProp<ViewStyle>;
|
|
5
|
+
readonly fieldText: StyleProp<TextStyle>;
|
|
6
|
+
};
|
|
7
|
+
interface FieldProps {
|
|
8
|
+
readonly label: string;
|
|
9
|
+
readonly isFocused?: boolean;
|
|
10
|
+
readonly style?: FieldStyle;
|
|
11
|
+
}
|
|
12
|
+
declare const Field: FC<FieldProps>;
|
|
13
|
+
export type { FieldStyle };
|
|
14
|
+
export { Field };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Text } from "@lookiero/aurora-next/build/components/primitives/Text/Text";
|
|
2
|
+
import { animated, useSpring } from "@react-spring/native";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { View } from "react-native";
|
|
5
|
+
import { theme } from "../../../../theme/theme";
|
|
6
|
+
import { style } from "./Field.style";
|
|
7
|
+
const { spaceM } = theme();
|
|
8
|
+
const Field = ({ label, isFocused = false, style: customStyle }) => {
|
|
9
|
+
const springs = useSpring(isFocused ? { scale: 0.75, translateY: -14, translateX: 0 } : { scale: 1, translateY: spaceM, translateX: spaceM });
|
|
10
|
+
return (React.createElement(animated.View, { pointerEvents: "none", style: [
|
|
11
|
+
{
|
|
12
|
+
transform: [
|
|
13
|
+
{
|
|
14
|
+
scale: springs.scale,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
translateY: springs.translateY,
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
translateX: springs.translateX,
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
customStyle?.field,
|
|
25
|
+
] },
|
|
26
|
+
React.createElement(Text, { level: 1, style: [style.fieldText, customStyle?.fieldText], detail: true }, label),
|
|
27
|
+
React.createElement(View, { style: [style.fieldBackground, { opacity: isFocused ? 1 : 0 }] })));
|
|
28
|
+
};
|
|
29
|
+
export { Field };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { theme } from "../../../../theme/theme";
|
|
3
|
+
const { colorBase, spaceS } = theme();
|
|
4
|
+
const style = StyleSheet.create({
|
|
5
|
+
fieldBackground: {
|
|
6
|
+
backgroundColor: colorBase,
|
|
7
|
+
height: "100%",
|
|
8
|
+
position: "absolute",
|
|
9
|
+
width: "100%",
|
|
10
|
+
zIndex: 0,
|
|
11
|
+
},
|
|
12
|
+
fieldText: {
|
|
13
|
+
paddingHorizontal: spaceS,
|
|
14
|
+
zIndex: 1,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
export { style };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import glyphs from "@lookiero/aurora-iconfont/dist/glyphs.json";
|
|
2
|
+
import { FC } from "react";
|
|
3
|
+
import { StyleProp, TextStyle } from "react-native";
|
|
4
|
+
declare type IconStyle = StyleProp<TextStyle>;
|
|
5
|
+
declare type IconName = keyof typeof glyphs;
|
|
6
|
+
interface IconProps {
|
|
7
|
+
readonly name: IconName;
|
|
8
|
+
readonly style?: IconStyle;
|
|
9
|
+
}
|
|
10
|
+
declare const Icon: FC<IconProps>;
|
|
11
|
+
export type { IconName, IconStyle };
|
|
12
|
+
export { Icon };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Text } from "react-native";
|
|
3
|
+
import { theme } from "../../../../theme/theme";
|
|
4
|
+
import { style } from "./Icon.style";
|
|
5
|
+
const { iconGlyphs } = theme();
|
|
6
|
+
const Icon = ({ name, style: customStyle }) => (React.createElement(Text, { accessibilityElementsHidden: true, allowFontScaling: false, importantForAccessibility: "no", selectable: false, style: [style.icon, customStyle], testID: "icon" }, String.fromCharCode(iconGlyphs[name])));
|
|
7
|
+
export { Icon };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { theme } from "../../../../theme/theme";
|
|
3
|
+
const { iconFamily, iconSize } = theme();
|
|
4
|
+
const style = StyleSheet.create({
|
|
5
|
+
icon: {
|
|
6
|
+
fontFamily: iconFamily,
|
|
7
|
+
fontSize: iconSize,
|
|
8
|
+
fontStyle: "normal",
|
|
9
|
+
fontWeight: "normal",
|
|
10
|
+
height: iconSize,
|
|
11
|
+
minHeight: iconSize,
|
|
12
|
+
minWidth: iconSize,
|
|
13
|
+
width: iconSize,
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
export { style };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { StyleProp, TextInputProps, TextStyle } from "react-native";
|
|
3
|
+
declare type InputStyle = StyleProp<TextStyle>;
|
|
4
|
+
interface InputProps extends TextInputProps {
|
|
5
|
+
readonly minHeight?: number;
|
|
6
|
+
readonly maxHeight?: number;
|
|
7
|
+
readonly style?: InputStyle;
|
|
8
|
+
}
|
|
9
|
+
declare const Input: FC<InputProps>;
|
|
10
|
+
export type { InputProps, InputStyle };
|
|
11
|
+
export { Input };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React, { useCallback, useLayoutEffect, useRef, useState } from "react";
|
|
2
|
+
import { Platform, TextInput, } from "react-native";
|
|
3
|
+
import { theme } from "../../../../theme/theme";
|
|
4
|
+
import { style, borderSize, paddingVertical } from "./Input.style";
|
|
5
|
+
const MIN_HEIGHT = 56;
|
|
6
|
+
const MAX_HEIGHT = 242; // 10 lines
|
|
7
|
+
const { colorGrayscaleL } = theme();
|
|
8
|
+
const clamp = (min, max, value) => Math.min(Math.max(min, value), max);
|
|
9
|
+
const Input = ({ minHeight = MIN_HEIGHT, maxHeight = MAX_HEIGHT, style: customStyle, placeholderTextColor = colorGrayscaleL, onChange, onContentSizeChange, value, multiline, ...restOfProps }) => {
|
|
10
|
+
const [height, setHeight] = useState(minHeight);
|
|
11
|
+
// When content height has became smaller the onContentSizeChange does in fact triggered but the internal height is incorrect.
|
|
12
|
+
const handleOnContentSizeChange = useCallback((event) => {
|
|
13
|
+
onContentSizeChange?.(event);
|
|
14
|
+
if (!multiline || Platform.OS === "web") {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const nativePadding = Platform.OS === "ios" ? paddingVertical * 2 : 0;
|
|
18
|
+
setHeight(clamp(minHeight, maxHeight, event.nativeEvent.contentSize.height + borderSize * 2 + nativePadding));
|
|
19
|
+
}, [maxHeight, minHeight, multiline, onContentSizeChange]);
|
|
20
|
+
const handleOnContentSizeChangeWeb = useCallback(() => {
|
|
21
|
+
if (!multiline || Platform.OS !== "web") {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
window.requestAnimationFrame(() => {
|
|
25
|
+
const element = textInputRef.current;
|
|
26
|
+
if (!element) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
element.style.height = "0px";
|
|
30
|
+
element.style.height = `${clamp(minHeight, maxHeight, element.scrollHeight + borderSize * 2)}px`;
|
|
31
|
+
});
|
|
32
|
+
}, [maxHeight, minHeight, multiline]);
|
|
33
|
+
useLayoutEffect(handleOnContentSizeChangeWeb, [handleOnContentSizeChangeWeb, value]);
|
|
34
|
+
const textInputRef = useRef(null);
|
|
35
|
+
return (React.createElement(TextInput, { ...restOfProps, ref: textInputRef, multiline: multiline, placeholderTextColor: placeholderTextColor, style: [style.input, customStyle, { height }], testID: "input", textAlignVertical: "top", value: value, onChange: onChange, onContentSizeChange: handleOnContentSizeChange }));
|
|
36
|
+
};
|
|
37
|
+
export { Input };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const borderSize: number;
|
|
2
|
+
declare const paddingVertical: number;
|
|
3
|
+
declare const style: {
|
|
4
|
+
input: {
|
|
5
|
+
lineHeight?: number | undefined;
|
|
6
|
+
borderWidth: number;
|
|
7
|
+
color: string;
|
|
8
|
+
fontFamily: string;
|
|
9
|
+
fontSize: number;
|
|
10
|
+
letterSpacing: number;
|
|
11
|
+
outlineStyle: string;
|
|
12
|
+
paddingBottom: number;
|
|
13
|
+
paddingHorizontal: number;
|
|
14
|
+
paddingTop: number;
|
|
15
|
+
textOverflow: string;
|
|
16
|
+
whiteSpace: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export { style, borderSize, paddingVertical };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Platform, StyleSheet } from "react-native";
|
|
2
|
+
import { theme } from "../../../../theme/theme";
|
|
3
|
+
const { borderSize, colorContent, fontBodySize3, fontBodyHeight3, fontBodyLetterSpacing3, fontMap, spaceM } = theme();
|
|
4
|
+
const paddingVertical = spaceM;
|
|
5
|
+
// paddingVertical not working in iOS in multiline mode
|
|
6
|
+
const style = StyleSheet.create({
|
|
7
|
+
input: {
|
|
8
|
+
borderWidth: borderSize,
|
|
9
|
+
color: colorContent,
|
|
10
|
+
fontFamily: fontMap.Body,
|
|
11
|
+
fontSize: fontBodySize3,
|
|
12
|
+
letterSpacing: fontBodyLetterSpacing3,
|
|
13
|
+
outlineStyle: "none",
|
|
14
|
+
paddingBottom: paddingVertical,
|
|
15
|
+
paddingHorizontal: spaceM,
|
|
16
|
+
paddingTop: paddingVertical,
|
|
17
|
+
textOverflow: "ellipsis",
|
|
18
|
+
whiteSpace: "nowrap",
|
|
19
|
+
...Platform.select({
|
|
20
|
+
web: {
|
|
21
|
+
lineHeight: fontBodyHeight3,
|
|
22
|
+
},
|
|
23
|
+
}),
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
export { style, borderSize, paddingVertical };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ActivityIndicator, View } from "react-native";
|
|
3
|
+
import { theme } from "../../../../theme/theme";
|
|
4
|
+
import { style } from "./Spinner.style";
|
|
5
|
+
const { colorPrimary } = theme();
|
|
6
|
+
const Spinner = () => (React.createElement(View, { style: style.container },
|
|
7
|
+
React.createElement(ActivityIndicator, { color: colorPrimary, size: "large" })));
|
|
8
|
+
export { Spinner };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { ViewProps } from "react-native";
|
|
3
|
+
import { ScreenSize } from "../../../hooks/useScreenSize";
|
|
4
|
+
declare type ColumnSize = "1/4" | "1/3" | "1/2" | "2/3";
|
|
5
|
+
interface ColumnProps extends ViewProps {
|
|
6
|
+
readonly size?: Partial<Record<ScreenSize, ColumnSize>>;
|
|
7
|
+
}
|
|
8
|
+
declare const Column: FC<ColumnProps>;
|
|
9
|
+
export type { ColumnSize };
|
|
10
|
+
export { Column };
|