@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,32 @@
|
|
|
1
|
+
declare const style: {
|
|
2
|
+
container: {
|
|
3
|
+
width: string;
|
|
4
|
+
};
|
|
5
|
+
indicator: {
|
|
6
|
+
backgroundColor: string;
|
|
7
|
+
bottom: number;
|
|
8
|
+
display: "flex";
|
|
9
|
+
height: number;
|
|
10
|
+
position: "absolute";
|
|
11
|
+
};
|
|
12
|
+
tab: {
|
|
13
|
+
marginHorizontal: number;
|
|
14
|
+
paddingVertical: number;
|
|
15
|
+
};
|
|
16
|
+
tabActiveText: {
|
|
17
|
+
color: string;
|
|
18
|
+
};
|
|
19
|
+
tabText: {
|
|
20
|
+
color: string;
|
|
21
|
+
};
|
|
22
|
+
tabs: {
|
|
23
|
+
alignItems: "center";
|
|
24
|
+
backgroundColor: string;
|
|
25
|
+
borderBottomColor: string;
|
|
26
|
+
borderBottomWidth: number;
|
|
27
|
+
flexDirection: "row";
|
|
28
|
+
justifyContent: "center";
|
|
29
|
+
marginBottom: number;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export { style };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { theme } from "../../../theme/theme";
|
|
3
|
+
const { colorBase, colorContent, colorGrayscaleS, colorGrayscaleL, spaceM, spaceXL } = theme();
|
|
4
|
+
const style = StyleSheet.create({
|
|
5
|
+
container: {
|
|
6
|
+
width: "100%",
|
|
7
|
+
},
|
|
8
|
+
indicator: {
|
|
9
|
+
backgroundColor: colorContent,
|
|
10
|
+
bottom: -1,
|
|
11
|
+
display: "flex",
|
|
12
|
+
height: 1,
|
|
13
|
+
position: "absolute",
|
|
14
|
+
},
|
|
15
|
+
tab: {
|
|
16
|
+
marginHorizontal: spaceM,
|
|
17
|
+
paddingVertical: spaceM,
|
|
18
|
+
},
|
|
19
|
+
tabActiveText: {
|
|
20
|
+
color: colorContent,
|
|
21
|
+
},
|
|
22
|
+
tabText: {
|
|
23
|
+
color: colorGrayscaleL,
|
|
24
|
+
},
|
|
25
|
+
tabs: {
|
|
26
|
+
alignItems: "center",
|
|
27
|
+
backgroundColor: colorBase,
|
|
28
|
+
borderBottomColor: colorGrayscaleS,
|
|
29
|
+
borderBottomWidth: 1,
|
|
30
|
+
flexDirection: "row",
|
|
31
|
+
justifyContent: "center",
|
|
32
|
+
marginBottom: spaceXL,
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
export { style };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReturnQuestionProjection } from "../../../../../projection/returnQuestion/returnQuestion";
|
|
3
|
+
interface ReturnQuestionProps {
|
|
4
|
+
readonly returnQuestionParentId: string;
|
|
5
|
+
readonly returnQuestion: ReturnQuestionProjection;
|
|
6
|
+
readonly portalHostName?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: React.NamedExoticComponent<ReturnQuestionProps>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { memo } from "react";
|
|
2
|
+
import { useReturnQuestionItem } from "./behaviors/useReturnQuestionItem";
|
|
3
|
+
const ReturnQuestion = ({ returnQuestion, returnQuestionParentId, portalHostName, }) => {
|
|
4
|
+
const Item = useReturnQuestionItem({ type: returnQuestion.type });
|
|
5
|
+
return (React.createElement(Item, { portalHostName: portalHostName, returnQuestion: returnQuestion, returnQuestionParentId: returnQuestionParentId },
|
|
6
|
+
React.createElement(React.Fragment, null, returnQuestion.children?.map((childReturnQuestion) => (React.createElement(ReturnQuestion, { key: childReturnQuestion.id, portalHostName: portalHostName, returnQuestion: childReturnQuestion, returnQuestionParentId: returnQuestion.id }))))));
|
|
7
|
+
};
|
|
8
|
+
export default memo(ReturnQuestion);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { ReturnQuestionProjection } from "../../../../../projection/returnQuestion/returnQuestion";
|
|
3
|
+
interface ReturnQuestionsProps {
|
|
4
|
+
readonly returnQuestions: ReturnQuestionProjection[];
|
|
5
|
+
readonly portalHostName?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const ReturnQuestions: FC<ReturnQuestionsProps>;
|
|
8
|
+
export { ReturnQuestions };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import ReturnQuestion from "./ReturnQuestion";
|
|
3
|
+
const ReturnQuestions = ({ returnQuestions, portalHostName }) => (React.createElement(React.Fragment, null, returnQuestions.map((returnQuestion) => (React.createElement(ReturnQuestion, { key: returnQuestion.id, portalHostName: portalHostName, returnQuestion: returnQuestion, returnQuestionParentId: "" })))));
|
|
4
|
+
export { ReturnQuestions };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { FC, ReactNode } from "react";
|
|
2
|
+
import { FeedbackProjection } from "../../../../../../projection/feedback/feedback";
|
|
3
|
+
interface OnChangeReturnQuestionFeedbackFunctionArgs {
|
|
4
|
+
readonly returnQuestionId: string;
|
|
5
|
+
readonly returnQuestionFeedback: string | undefined;
|
|
6
|
+
}
|
|
7
|
+
interface OnChangeReturnQuestionFeedbackFunction {
|
|
8
|
+
(args: OnChangeReturnQuestionFeedbackFunctionArgs): void;
|
|
9
|
+
}
|
|
10
|
+
interface ReturnQuestionFeedbackContextProviderProps {
|
|
11
|
+
readonly feedback: FeedbackProjection | undefined;
|
|
12
|
+
readonly children: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
declare const ReturnQuestionFeedbackProvider: FC<ReturnQuestionFeedbackContextProviderProps>;
|
|
15
|
+
interface UseReturnQuestionFeedbackForIdFunctionArgs {
|
|
16
|
+
readonly id: string;
|
|
17
|
+
}
|
|
18
|
+
interface UseReturnQuestionFeedbackForIdFunction {
|
|
19
|
+
(args: UseReturnQuestionFeedbackForIdFunctionArgs): {
|
|
20
|
+
readonly feedback: string | undefined;
|
|
21
|
+
readonly onChange: OnChangeReturnQuestionFeedbackFunction;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
declare const useReturnQuestionFeedbackForId: UseReturnQuestionFeedbackForIdFunction;
|
|
25
|
+
interface UseReturnQuestionFeedbackFunction {
|
|
26
|
+
(): FeedbackProjection;
|
|
27
|
+
}
|
|
28
|
+
declare const useReturnQuestionFeedback: UseReturnQuestionFeedbackFunction;
|
|
29
|
+
export { useReturnQuestionFeedbackForId, useReturnQuestionFeedback, ReturnQuestionFeedbackProvider };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React, { createContext, useCallback, useContext, useMemo, useState } from "react";
|
|
2
|
+
import invariant from "tiny-invariant";
|
|
3
|
+
const ReturnQuestionFeedbackContext = createContext(null);
|
|
4
|
+
const ReturnQuestionFeedbackProvider = ({ feedback = {}, children, }) => {
|
|
5
|
+
const [contextFeedback, setContextFeedback] = useState(feedback);
|
|
6
|
+
const onChange = useCallback(({ returnQuestionId, returnQuestionFeedback }) => setContextFeedback((feedback) => returnQuestionFeedback
|
|
7
|
+
? { ...feedback, [returnQuestionId]: returnQuestionFeedback }
|
|
8
|
+
: Object.entries(feedback).reduce((acc, [id, feedback]) => (id !== returnQuestionId ? { ...acc, [id]: feedback } : acc), {})), []);
|
|
9
|
+
const value = useMemo(() => ({
|
|
10
|
+
feedback: contextFeedback,
|
|
11
|
+
onChange,
|
|
12
|
+
}), [contextFeedback, onChange]);
|
|
13
|
+
return React.createElement(ReturnQuestionFeedbackContext.Provider, { value: value }, children);
|
|
14
|
+
};
|
|
15
|
+
const useReturnQuestionFeedbackForId = ({ id }) => {
|
|
16
|
+
const returnQuestionFeedbackContext = useContext(ReturnQuestionFeedbackContext);
|
|
17
|
+
invariant(returnQuestionFeedbackContext, "Your are trying to use the useReturnQuestionFeedbackForId hook without wrapping your app with the <ReturnQuestionFeedbackProvider>.");
|
|
18
|
+
const { feedback, onChange } = returnQuestionFeedbackContext;
|
|
19
|
+
return { feedback: feedback[id], onChange };
|
|
20
|
+
};
|
|
21
|
+
const useReturnQuestionFeedback = () => {
|
|
22
|
+
const returnQuestionFeedbackContext = useContext(ReturnQuestionFeedbackContext);
|
|
23
|
+
invariant(returnQuestionFeedbackContext, "Your are trying to use the useReturnQuestionFeedback hook without wrapping your app with the <ReturnQuestionFeedbackProvider>.");
|
|
24
|
+
const { feedback } = returnQuestionFeedbackContext;
|
|
25
|
+
return feedback;
|
|
26
|
+
};
|
|
27
|
+
export { useReturnQuestionFeedbackForId, useReturnQuestionFeedback, ReturnQuestionFeedbackProvider };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FC, ReactNode } from "react";
|
|
2
|
+
import { ReturnQuestionType } from "../../../../../../projection/returnQuestion/returnQuestion";
|
|
3
|
+
import { ReturnQuestionItem } from "../components/ReturnQuestionItem";
|
|
4
|
+
declare type ReturnQuestionItems = Record<ReturnQuestionType, ReturnQuestionItem>;
|
|
5
|
+
interface ReturnQuestionItemContextProviderProps {
|
|
6
|
+
readonly returnQuestionItems: ReturnQuestionItems;
|
|
7
|
+
readonly children: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare const ReturnQuestionItemProvider: FC<ReturnQuestionItemContextProviderProps>;
|
|
10
|
+
interface UseReturnQuestionItemFunctionArgs {
|
|
11
|
+
readonly type: ReturnQuestionType;
|
|
12
|
+
}
|
|
13
|
+
interface UseReturnQuestionItemFunction {
|
|
14
|
+
(args: UseReturnQuestionItemFunctionArgs): ReturnQuestionItem;
|
|
15
|
+
}
|
|
16
|
+
declare const useReturnQuestionItem: UseReturnQuestionItemFunction;
|
|
17
|
+
export type { ReturnQuestionItems };
|
|
18
|
+
export { useReturnQuestionItem, ReturnQuestionItemProvider };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { createContext, useContext, useMemo } from "react";
|
|
2
|
+
import invariant from "tiny-invariant";
|
|
3
|
+
const ReturnQuestionItemContext = createContext({});
|
|
4
|
+
const ReturnQuestionItemProvider = ({ returnQuestionItems, children }) => (React.createElement(ReturnQuestionItemContext.Provider, { value: returnQuestionItems }, children));
|
|
5
|
+
const useReturnQuestionItem = ({ type }) => {
|
|
6
|
+
const items = useContext(ReturnQuestionItemContext);
|
|
7
|
+
const item = useMemo(() => items[type], [items, type]);
|
|
8
|
+
invariant(items, "Your are trying to use the useReturnQuestionItem hook without wrapping your app with the <ReturnQuestionItemProvider>.");
|
|
9
|
+
invariant(item, `The provided ReturnQuestionType (${type}) is NOT SUPPORTED`);
|
|
10
|
+
return item;
|
|
11
|
+
};
|
|
12
|
+
export { useReturnQuestionItem, ReturnQuestionItemProvider };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC, ReactNode } from "react";
|
|
2
|
+
import { ReturnQuestionProjection } from "../../../../../../projection/returnQuestion/returnQuestion";
|
|
3
|
+
interface ReturnQuestionItemProps {
|
|
4
|
+
readonly returnQuestion: ReturnQuestionProjection;
|
|
5
|
+
readonly returnQuestionParentId: string;
|
|
6
|
+
readonly children?: ReactNode;
|
|
7
|
+
readonly portalHostName?: string;
|
|
8
|
+
}
|
|
9
|
+
declare type ReturnQuestionItem = FC<ReturnQuestionItemProps>;
|
|
10
|
+
export type { ReturnQuestionItem, ReturnQuestionItemProps };
|
package/dist/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Text } from "@lookiero/aurora-next/build/components/primitives/Text/Text";
|
|
2
|
+
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { RETURN_QUESTIONS_PREFIX } from "../../../../../i18n/i18n";
|
|
5
|
+
import { style } from "./HostDefaultReturnQuestionItem.style";
|
|
6
|
+
const HostDefaultReturnQuestionItem = ({ returnQuestion, children }) => {
|
|
7
|
+
const titleText = useI18nMessage({ id: returnQuestion.name, prefix: RETURN_QUESTIONS_PREFIX });
|
|
8
|
+
return (React.createElement(React.Fragment, null,
|
|
9
|
+
React.createElement(Text, { level: 3, style: style.title }, titleText),
|
|
10
|
+
children));
|
|
11
|
+
};
|
|
12
|
+
export { HostDefaultReturnQuestionItem };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { theme } from "../../../../../theme/theme";
|
|
3
|
+
const { spaceL, spaceXXXL } = theme();
|
|
4
|
+
const style = StyleSheet.create({
|
|
5
|
+
title: {
|
|
6
|
+
marginBottom: spaceL,
|
|
7
|
+
marginTop: spaceXXXL,
|
|
8
|
+
textAlign: "center",
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
export { style };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { useI18nMessage, useIntl } from "@lookiero/i18n-react";
|
|
2
|
+
import React, { useCallback, useState } from "react";
|
|
3
|
+
import { TouchableHighlight, View } from "react-native";
|
|
4
|
+
import { RETURN_QUESTIONS_PREFIX } from "../../../../../i18n/i18n";
|
|
5
|
+
import { Modal } from "../../../../../shared/components/layouts/modal/Modal";
|
|
6
|
+
import { ButtonIcon } from "../../../../../shared/components/molecules/buttonIcon/ButtonIcon";
|
|
7
|
+
import { InputField } from "../../../../../shared/components/molecules/inputField/InputField";
|
|
8
|
+
import { useReturnQuestionFeedback, useReturnQuestionFeedbackForId } from "../../behaviors/useReturnQuestionFeedback";
|
|
9
|
+
import { deepestReturnQuestionWithFeedbackForReturnQuestion, feedbackForReturnQuestion, } from "../../util/returnQuestionFeedback";
|
|
10
|
+
import { style, containerUnderlayColor } from "./HostSelectReturnQuestionItem.style";
|
|
11
|
+
const HostSelectReturnQuestionItem = ({ returnQuestion, children, portalHostName, }) => {
|
|
12
|
+
const placeholderText = useI18nMessage({ id: returnQuestion.placeholder, prefix: RETURN_QUESTIONS_PREFIX });
|
|
13
|
+
const [modalVisible, setModalVisible] = useState(false);
|
|
14
|
+
const handleOnPress = useCallback(() => setModalVisible(true), []);
|
|
15
|
+
const handleOnModalClose = useCallback(() => setModalVisible(false), []);
|
|
16
|
+
const feedback = useReturnQuestionFeedback();
|
|
17
|
+
const { onChange } = useReturnQuestionFeedbackForId({ id: returnQuestion.id });
|
|
18
|
+
const intl = useIntl();
|
|
19
|
+
const translate = useCallback((returnQuestionName) => intl.formatMessage({ id: `${RETURN_QUESTIONS_PREFIX}${returnQuestionName}`, defaultMessage: returnQuestionName }), [intl]);
|
|
20
|
+
const inputValue = feedbackForReturnQuestion({ feedback, returnQuestion, translate }).join(" / ");
|
|
21
|
+
const deepestReturnQuestionWithFeedback = deepestReturnQuestionWithFeedbackForReturnQuestion({
|
|
22
|
+
feedback,
|
|
23
|
+
returnQuestion,
|
|
24
|
+
});
|
|
25
|
+
const handleOnBackButtonPress = useCallback(() => deepestReturnQuestionWithFeedback &&
|
|
26
|
+
onChange({ returnQuestionId: deepestReturnQuestionWithFeedback.id, returnQuestionFeedback: undefined }), [deepestReturnQuestionWithFeedback, onChange]);
|
|
27
|
+
return (React.createElement(React.Fragment, null,
|
|
28
|
+
React.createElement(TouchableHighlight, { style: style.container, underlayColor: containerUnderlayColor, onPress: handleOnPress },
|
|
29
|
+
React.createElement(View, { pointerEvents: "none" },
|
|
30
|
+
React.createElement(InputField, { editable: false, icon: "arrow-down", label: placeholderText || "", value: inputValue }))),
|
|
31
|
+
React.createElement(Modal, { portalHostName: portalHostName, visible: modalVisible, header: deepestReturnQuestionWithFeedback && (React.createElement(ButtonIcon, { name: "arrow-left", testID: "modal-back-button", onPress: handleOnBackButtonPress })), scroll: true, showCloseButton: true, onClose: handleOnModalClose },
|
|
32
|
+
React.createElement(View, { style: style.modalContent }, children))));
|
|
33
|
+
};
|
|
34
|
+
export { HostSelectReturnQuestionItem };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { theme } from "../../../../../theme/theme";
|
|
3
|
+
const { spaceM, spaceXL, colorGrayscaleS } = theme();
|
|
4
|
+
const containerUnderlayColor = colorGrayscaleS;
|
|
5
|
+
const style = StyleSheet.create({
|
|
6
|
+
container: {
|
|
7
|
+
marginVertical: spaceM,
|
|
8
|
+
},
|
|
9
|
+
modalContent: {
|
|
10
|
+
paddingBottom: spaceXL,
|
|
11
|
+
paddingHorizontal: spaceXL,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
export { style, containerUnderlayColor };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Text } from "@lookiero/aurora-next/build/components/primitives/Text/Text";
|
|
2
|
+
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
3
|
+
import { animated, useSpring } from "@react-spring/native";
|
|
4
|
+
import React, { useCallback, useState } from "react";
|
|
5
|
+
import { View } from "react-native";
|
|
6
|
+
import { RETURN_QUESTIONS_PREFIX } from "../../../../../i18n/i18n";
|
|
7
|
+
import ReturnQuestion from "../../ReturnQuestion";
|
|
8
|
+
import { useReturnQuestionFeedbackForId } from "../../behaviors/useReturnQuestionFeedback";
|
|
9
|
+
import { style } from "./HostStackReturnQuestionItem.style";
|
|
10
|
+
const HostStackReturnQuestionItem = ({ returnQuestion, children, portalHostName, }) => {
|
|
11
|
+
const titleText = useI18nMessage({ id: returnQuestion.name, prefix: RETURN_QUESTIONS_PREFIX });
|
|
12
|
+
const { feedback } = useReturnQuestionFeedbackForId({ id: returnQuestion.id });
|
|
13
|
+
const feedbackReturnQuestion = feedback
|
|
14
|
+
? returnQuestion.children?.find((returnQuestion) => returnQuestion.id === feedback)
|
|
15
|
+
: undefined;
|
|
16
|
+
const feedbackText = useI18nMessage({ id: feedbackReturnQuestion?.name, prefix: RETURN_QUESTIONS_PREFIX });
|
|
17
|
+
const [stackHeight, setStackHeight] = useState();
|
|
18
|
+
const handleOnLayout = useCallback(({ nativeEvent: { layout: { height }, }, }) => setStackHeight(height), []);
|
|
19
|
+
const stackSyle = useSpring({ height: stackHeight });
|
|
20
|
+
return (React.createElement(animated.View, { style: stackSyle },
|
|
21
|
+
React.createElement(View, { onLayout: handleOnLayout },
|
|
22
|
+
titleText && (React.createElement(Text, { level: 2, style: style.title }, titleText)),
|
|
23
|
+
feedbackReturnQuestion ? (React.createElement(React.Fragment, null,
|
|
24
|
+
React.createElement(Text, { level: 3, style: style.feedback }, feedbackText),
|
|
25
|
+
feedbackReturnQuestion.children?.map((childReturnQuestion) => (React.createElement(ReturnQuestion, { key: childReturnQuestion.id, portalHostName: portalHostName, returnQuestion: childReturnQuestion, returnQuestionParentId: feedbackReturnQuestion.id }))))) : (children))));
|
|
26
|
+
};
|
|
27
|
+
export { HostStackReturnQuestionItem };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { theme } from "../../../../../theme/theme";
|
|
3
|
+
const { colorGrayscaleL, spaceM, spaceL } = theme();
|
|
4
|
+
const style = StyleSheet.create({
|
|
5
|
+
feedback: {
|
|
6
|
+
color: colorGrayscaleL,
|
|
7
|
+
lineHeight: 24,
|
|
8
|
+
marginVertical: spaceM,
|
|
9
|
+
},
|
|
10
|
+
title: {
|
|
11
|
+
marginVertical: spaceL,
|
|
12
|
+
textAlign: "center",
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
export { style };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Text } from "@lookiero/aurora-next/build/components/primitives/Text/Text";
|
|
2
|
+
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
3
|
+
import React, { useCallback } from "react";
|
|
4
|
+
import { TouchableHighlight } from "react-native";
|
|
5
|
+
import { RETURN_QUESTIONS_PREFIX } from "../../../../../i18n/i18n";
|
|
6
|
+
import { useReturnQuestionFeedbackForId } from "../../behaviors/useReturnQuestionFeedback";
|
|
7
|
+
import { containerUnderlayColor, style } from "./OptionReturnQuestionItem.style";
|
|
8
|
+
const OptionReturnQuestionItem = ({ returnQuestion, returnQuestionParentId, }) => {
|
|
9
|
+
const { onChange } = useReturnQuestionFeedbackForId({ id: returnQuestionParentId });
|
|
10
|
+
const optionText = useI18nMessage({ id: returnQuestion.name, prefix: RETURN_QUESTIONS_PREFIX });
|
|
11
|
+
const handleOnPress = useCallback(() => onChange({ returnQuestionId: returnQuestionParentId, returnQuestionFeedback: returnQuestion.id }), [onChange, returnQuestion.id, returnQuestionParentId]);
|
|
12
|
+
return (React.createElement(TouchableHighlight, { style: style.container, underlayColor: containerUnderlayColor, onPress: handleOnPress },
|
|
13
|
+
React.createElement(Text, { level: 3, style: style.text }, optionText)));
|
|
14
|
+
};
|
|
15
|
+
export { OptionReturnQuestionItem };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const containerUnderlayColor: string;
|
|
2
|
+
declare const style: {
|
|
3
|
+
container: {
|
|
4
|
+
borderBottomColor: string;
|
|
5
|
+
borderBottomWidth: number;
|
|
6
|
+
paddingVertical: number;
|
|
7
|
+
};
|
|
8
|
+
text: {
|
|
9
|
+
lineHeight: number;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export { style, containerUnderlayColor };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { theme } from "../../../../../theme/theme";
|
|
3
|
+
const { spaceM, colorGrayscaleS } = theme();
|
|
4
|
+
const containerUnderlayColor = colorGrayscaleS;
|
|
5
|
+
const style = StyleSheet.create({
|
|
6
|
+
container: {
|
|
7
|
+
borderBottomColor: colorGrayscaleS,
|
|
8
|
+
borderBottomWidth: 1,
|
|
9
|
+
paddingVertical: spaceM,
|
|
10
|
+
},
|
|
11
|
+
text: {
|
|
12
|
+
lineHeight: 24,
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
export { style, containerUnderlayColor };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Text } from "@lookiero/aurora-next/build/components/primitives/Text/Text";
|
|
2
|
+
import { useI18nMessage, useIntl } from "@lookiero/i18n-react";
|
|
3
|
+
import React, { useCallback } from "react";
|
|
4
|
+
import { View } from "react-native";
|
|
5
|
+
import { I18nMessages, RETURN_QUESTIONS_FEEDBACK_PREFIX, RETURN_QUESTIONS_PREFIX } from "../../../../../i18n/i18n";
|
|
6
|
+
import { useReturnQuestionFeedback } from "../../behaviors/useReturnQuestionFeedback";
|
|
7
|
+
import { feedbackForReturnQuestion } from "../../util/returnQuestionFeedback";
|
|
8
|
+
import { style } from "./ReturnQuestionFeedbackItem.style";
|
|
9
|
+
const ReturnQuestionFeedbackItem = ({ returnQuestion }) => {
|
|
10
|
+
const titleText = useI18nMessage({ id: returnQuestion.name, prefix: RETURN_QUESTIONS_FEEDBACK_PREFIX });
|
|
11
|
+
const unansweredText = useI18nMessage({
|
|
12
|
+
id: I18nMessages.FEEDBACK_UNANSWERED,
|
|
13
|
+
prefix: RETURN_QUESTIONS_FEEDBACK_PREFIX,
|
|
14
|
+
});
|
|
15
|
+
const returnQuestionFeedback = useReturnQuestionFeedback();
|
|
16
|
+
const intl = useIntl();
|
|
17
|
+
const translate = useCallback((returnQuestionName) => intl.formatMessage({
|
|
18
|
+
id: `${RETURN_QUESTIONS_PREFIX}${returnQuestionName}`,
|
|
19
|
+
defaultMessage: returnQuestionName,
|
|
20
|
+
}), [intl]);
|
|
21
|
+
const feedback = feedbackForReturnQuestion({ feedback: returnQuestionFeedback, returnQuestion, translate }).join(" / ");
|
|
22
|
+
return (React.createElement(View, { style: style.container },
|
|
23
|
+
React.createElement(Text, { level: 2, style: style.title, detail: true }, titleText),
|
|
24
|
+
React.createElement(Text, { level: 3 }, feedback || unansweredText)));
|
|
25
|
+
};
|
|
26
|
+
export { ReturnQuestionFeedbackItem };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { theme } from "../../../../../theme/theme";
|
|
3
|
+
const { colorGrayscaleL, spaceM, spaceXL } = theme();
|
|
4
|
+
const style = StyleSheet.create({
|
|
5
|
+
container: {
|
|
6
|
+
marginBottom: spaceXL,
|
|
7
|
+
},
|
|
8
|
+
title: {
|
|
9
|
+
color: colorGrayscaleL,
|
|
10
|
+
marginBottom: spaceM,
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
export { style };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
2
|
+
import React, { useCallback } from "react";
|
|
3
|
+
import { RETURN_QUESTIONS_PREFIX } from "../../../../../i18n/i18n";
|
|
4
|
+
import { InputField } from "../../../../../shared/components/molecules/inputField/InputField";
|
|
5
|
+
import { useReturnQuestionFeedbackForId } from "../../behaviors/useReturnQuestionFeedback";
|
|
6
|
+
const TEXTAREA_MIN_HEIGHT = 96;
|
|
7
|
+
const TextareaReturnQuestionItem = ({ returnQuestion, returnQuestionParentId, }) => {
|
|
8
|
+
const placeholderText = useI18nMessage({ id: returnQuestion.placeholder, prefix: RETURN_QUESTIONS_PREFIX });
|
|
9
|
+
const { feedback, onChange } = useReturnQuestionFeedbackForId({ id: returnQuestionParentId });
|
|
10
|
+
const handleOnChange = useCallback((value) => onChange({ returnQuestionId: returnQuestionParentId, returnQuestionFeedback: value }), [onChange, returnQuestionParentId]);
|
|
11
|
+
return (React.createElement(InputField, { label: placeholderText, minHeight: TEXTAREA_MIN_HEIGHT, placeholder: placeholderText, value: feedback, multiline: true, onChange: handleOnChange }));
|
|
12
|
+
};
|
|
13
|
+
export { TextareaReturnQuestionItem };
|
package/dist/infrastructure/ui/components/organisms/returnQuestions/util/returnQuestionFeedback.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FeedbackProjection } from "../../../../../../projection/feedback/feedback";
|
|
2
|
+
import { ReturnQuestionProjection } from "../../../../../../projection/returnQuestion/returnQuestion";
|
|
3
|
+
interface RecursiveFeedbackForReturnQuestionFunctionArgs {
|
|
4
|
+
readonly feedback: FeedbackProjection | undefined;
|
|
5
|
+
readonly returnQuestion: ReturnQuestionProjection;
|
|
6
|
+
readonly translate: (i18nString: string) => string;
|
|
7
|
+
readonly acc?: string[];
|
|
8
|
+
}
|
|
9
|
+
interface RecursiveFeedbackForReturnQuestionFunction {
|
|
10
|
+
(args: RecursiveFeedbackForReturnQuestionFunctionArgs): string[];
|
|
11
|
+
}
|
|
12
|
+
declare const feedbackForReturnQuestion: RecursiveFeedbackForReturnQuestionFunction;
|
|
13
|
+
interface RecursiveDeepestReturnQuestionWithFeedbackFunctionArgs {
|
|
14
|
+
readonly feedback: FeedbackProjection | undefined;
|
|
15
|
+
readonly returnQuestion: ReturnQuestionProjection;
|
|
16
|
+
readonly deepestReturnQuestion?: ReturnQuestionProjection;
|
|
17
|
+
}
|
|
18
|
+
interface RecursiveDeepestReturnQuestionWithFeedbackFunction {
|
|
19
|
+
(args: RecursiveDeepestReturnQuestionWithFeedbackFunctionArgs): ReturnQuestionProjection | undefined;
|
|
20
|
+
}
|
|
21
|
+
declare const deepestReturnQuestionWithFeedbackForReturnQuestion: RecursiveDeepestReturnQuestionWithFeedbackFunction;
|
|
22
|
+
export { feedbackForReturnQuestion, deepestReturnQuestionWithFeedbackForReturnQuestion };
|
package/dist/infrastructure/ui/components/organisms/returnQuestions/util/returnQuestionFeedback.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { validate } from "uuid";
|
|
2
|
+
const isUuid = (value) => validate(value);
|
|
3
|
+
const feedbackForReturnQuestion = ({ feedback, returnQuestion, translate, acc = [], }) => {
|
|
4
|
+
if (!feedback) {
|
|
5
|
+
return [];
|
|
6
|
+
}
|
|
7
|
+
const returnQuestionId = Object.keys(feedback).find((id) => id === returnQuestion.id);
|
|
8
|
+
if (returnQuestionId) {
|
|
9
|
+
const returnQuestionFeedback = feedback[returnQuestionId];
|
|
10
|
+
if (isUuid(returnQuestionFeedback)) {
|
|
11
|
+
const feebackReturnQuestionChild = returnQuestion.children?.find((childReturnQuestion) => childReturnQuestion.id === returnQuestionFeedback);
|
|
12
|
+
if (feebackReturnQuestionChild) {
|
|
13
|
+
return [
|
|
14
|
+
...acc,
|
|
15
|
+
translate(feebackReturnQuestionChild?.name),
|
|
16
|
+
...feedbackForReturnQuestion({ feedback, returnQuestion: feebackReturnQuestionChild, translate, acc }),
|
|
17
|
+
];
|
|
18
|
+
}
|
|
19
|
+
return acc;
|
|
20
|
+
}
|
|
21
|
+
return [...acc, returnQuestionFeedback];
|
|
22
|
+
}
|
|
23
|
+
return (returnQuestion.children?.reduce((acc, childReturnQuestion) => [
|
|
24
|
+
...acc,
|
|
25
|
+
...feedbackForReturnQuestion({ feedback, returnQuestion: childReturnQuestion, translate, acc }),
|
|
26
|
+
], []) || []);
|
|
27
|
+
};
|
|
28
|
+
const deepestReturnQuestionWithFeedbackForReturnQuestion = ({ feedback, returnQuestion, deepestReturnQuestion, }) => {
|
|
29
|
+
if (!feedback) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const returnQuestionId = Object.keys(feedback).find((id) => id === returnQuestion.id);
|
|
33
|
+
if (returnQuestionId) {
|
|
34
|
+
const returnQuestionFeedback = feedback[returnQuestionId];
|
|
35
|
+
if (isUuid(returnQuestionFeedback)) {
|
|
36
|
+
const feebackReturnQuestionChild = returnQuestion.children?.find((childReturnQuestion) => childReturnQuestion.id === returnQuestionFeedback);
|
|
37
|
+
if (feebackReturnQuestionChild) {
|
|
38
|
+
return deepestReturnQuestionWithFeedbackForReturnQuestion({
|
|
39
|
+
feedback,
|
|
40
|
+
returnQuestion: feebackReturnQuestionChild,
|
|
41
|
+
deepestReturnQuestion: returnQuestion,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
return returnQuestion;
|
|
45
|
+
}
|
|
46
|
+
return returnQuestion;
|
|
47
|
+
}
|
|
48
|
+
const feebackReturnQuestionChild = returnQuestion.children?.find((childReturnQuestion) => Object.keys(feedback).find((id) => id === childReturnQuestion.id));
|
|
49
|
+
if (feebackReturnQuestionChild) {
|
|
50
|
+
return deepestReturnQuestionWithFeedbackForReturnQuestion({
|
|
51
|
+
feedback,
|
|
52
|
+
returnQuestion: feebackReturnQuestionChild,
|
|
53
|
+
deepestReturnQuestion: feebackReturnQuestionChild,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
return deepestReturnQuestion;
|
|
57
|
+
};
|
|
58
|
+
export { feedbackForReturnQuestion, deepestReturnQuestionWithFeedbackForReturnQuestion };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC, ReactNode } from "react";
|
|
2
|
+
import { Edge } from "react-native-safe-area-context";
|
|
3
|
+
interface SafeAreaScrollViewProps {
|
|
4
|
+
readonly children: ReactNode;
|
|
5
|
+
readonly edges?: Edge[];
|
|
6
|
+
}
|
|
7
|
+
declare const SafeAreaScrollView: FC<SafeAreaScrollViewProps>;
|
|
8
|
+
export { SafeAreaScrollView };
|