@lookiero/checkout 2.0.1 → 2.2.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/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.style.js +3 -3
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.d.ts +1 -1
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.js +3 -3
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.style.d.ts +1 -1
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.style.js +2 -2
- package/dist/infrastructure/ui/views/item/Item.js +1 -1
- package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +0 -6
- package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +4 -6
- package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +3 -1
- package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +5 -3
- package/dist/shared/ui/components/molecules/selectField/SelectField.style.js +2 -2
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "../../../../../theme/theme";
|
|
3
|
-
const {
|
|
3
|
+
const { spaceS, spaceM } = theme();
|
|
4
4
|
const style = StyleSheet.create({
|
|
5
5
|
title: {
|
|
6
|
-
marginBottom:
|
|
7
|
-
marginTop:
|
|
6
|
+
marginBottom: spaceM,
|
|
7
|
+
marginTop: spaceS,
|
|
8
8
|
textAlign: "center",
|
|
9
9
|
},
|
|
10
10
|
});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "../../../../../theme/theme";
|
|
3
|
-
const { spaceM, spaceXL, colorGrayscaleS } = theme();
|
|
3
|
+
const { spaceM, spaceL, spaceXL, colorGrayscaleS } = theme();
|
|
4
4
|
const containerUnderlayColor = colorGrayscaleS;
|
|
5
5
|
const style = StyleSheet.create({
|
|
6
6
|
container: {
|
|
7
|
-
|
|
7
|
+
marginBottom: spaceM,
|
|
8
8
|
},
|
|
9
9
|
modalContent: {
|
|
10
|
-
paddingBottom:
|
|
10
|
+
paddingBottom: spaceL,
|
|
11
11
|
paddingHorizontal: spaceXL,
|
|
12
12
|
},
|
|
13
13
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "../../../../../theme/theme";
|
|
3
|
-
const { colorGrayscaleL, spaceM
|
|
3
|
+
const { colorGrayscaleL, spaceM } = theme();
|
|
4
4
|
const style = StyleSheet.create({
|
|
5
5
|
feedback: {
|
|
6
6
|
color: colorGrayscaleL,
|
|
@@ -8,7 +8,7 @@ const style = StyleSheet.create({
|
|
|
8
8
|
marginVertical: spaceM,
|
|
9
9
|
},
|
|
10
10
|
title: {
|
|
11
|
-
|
|
11
|
+
marginBottom: spaceM,
|
|
12
12
|
textAlign: "center",
|
|
13
13
|
},
|
|
14
14
|
});
|
|
@@ -104,6 +104,6 @@ const Item = ({ customerId, country }) => {
|
|
|
104
104
|
}
|
|
105
105
|
return (React.createElement(ReturnQuestionFeedbackProvider, { feedback: checkoutItem.feedbacks || {} },
|
|
106
106
|
checkoutItem.status === CheckoutItemStatus.INITIAL ? (React.createElement(ItemWithoutCustomerDecission, { bookedProductsVariants: bookedProductsVariants, checkoutId: checkout.id, checkoutItem: checkoutItem, country: country, currentProductVariant: currentProductVariant, onReturn: showReturnQuestions })) : (React.createElement(ItemWithCustomerDecission, { checkoutId: checkout.id, checkoutItem: checkoutItem, country: country, currentProductVariant: currentProductVariant, returnQuestions: returnQuestions, onEditFeedback: showReturnQuestions })),
|
|
107
|
-
React.createElement(ReturnQuestionsForm, {
|
|
107
|
+
React.createElement(ReturnQuestionsForm, { returnQuestions: returnQuestions, visible: returnQuestionsVisible, onClose: hideReturnQuestions, onSubmit: returnItem })));
|
|
108
108
|
};
|
|
109
109
|
export { Item };
|
package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.d.ts
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
|
-
import { CheckoutItemProductVariantProjection } from "../../../../../../projection/checkoutItem/checkoutItem";
|
|
3
2
|
import { FeedbackProjection } from "../../../../../../projection/feedback/feedback";
|
|
4
3
|
import { ReturnQuestionProjection } from "../../../../../../projection/returnQuestion/returnQuestion";
|
|
5
|
-
import { Country } from "../../../../../../projection/shared/country";
|
|
6
|
-
import { PriceProjection } from "../../../../../../projection/shared/price";
|
|
7
4
|
interface ReturnQuestionsFormProps {
|
|
8
5
|
readonly visible: boolean;
|
|
9
6
|
readonly returnQuestions: ReturnQuestionProjection[];
|
|
10
|
-
readonly checkoutItemPrice: PriceProjection;
|
|
11
|
-
readonly productVariant: CheckoutItemProductVariantProjection;
|
|
12
|
-
readonly country: Country;
|
|
13
7
|
readonly onSubmit: (feedback: FeedbackProjection) => void;
|
|
14
8
|
readonly onClose: () => void;
|
|
15
9
|
}
|
package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js
CHANGED
|
@@ -14,7 +14,6 @@ import { HostStackReturnQuestionItem } from "../../../../components/organisms/re
|
|
|
14
14
|
import { OptionReturnQuestionItem } from "../../../../components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem";
|
|
15
15
|
import { TextareaReturnQuestionItem } from "../../../../components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem";
|
|
16
16
|
import { I18nMessages } from "../../../../i18n/i18n";
|
|
17
|
-
import { ProductVariant } from "../../../shared/components/productVariant/ProductVariant";
|
|
18
17
|
import { style } from "./ReturnQuestionsForm.style";
|
|
19
18
|
const RETURN_QUESTION_FORM_PORTAL_HOST_NAME = "return-question-form-portal";
|
|
20
19
|
const returnQuestionItems = {
|
|
@@ -25,18 +24,17 @@ const returnQuestionItems = {
|
|
|
25
24
|
[ReturnQuestionType.TEXTAREA]: TextareaReturnQuestionItem,
|
|
26
25
|
[ReturnQuestionType.OPTION]: OptionReturnQuestionItem,
|
|
27
26
|
};
|
|
28
|
-
const ReturnQuestionsForm = ({ returnQuestions,
|
|
27
|
+
const ReturnQuestionsForm = ({ returnQuestions, visible, onSubmit, onClose }) => {
|
|
29
28
|
const titleText = useI18nMessage({ id: I18nMessages.RETURN_QUESTIONS_TITLE });
|
|
30
29
|
const submitButtonText = useI18nMessage({ id: I18nMessages.RETURN_QUESTIONS_SUBMIT_BUTTON });
|
|
31
|
-
const { media, brand, name, size, color } = productVariant;
|
|
32
30
|
const feedback = useReturnQuestionFeedback();
|
|
33
31
|
const handleOnSubmit = useCallback(() => onSubmit(feedback), [feedback, onSubmit]);
|
|
34
32
|
return (React.createElement(ReturnQuestionItemProvider, { returnQuestionItems: returnQuestionItems },
|
|
35
33
|
React.createElement(PortalHost, { name: RETURN_QUESTION_FORM_PORTAL_HOST_NAME }),
|
|
36
|
-
React.createElement(Modal, {
|
|
34
|
+
React.createElement(Modal, { portalHostName: RETURN_QUESTION_FORM_PORTAL_HOST_NAME, testID: "return-questions-form-modal", visible: visible, scroll: true, showCloseButton: true, onClose: onClose },
|
|
37
35
|
React.createElement(View, { style: style.returnQuestionsContainer },
|
|
38
36
|
React.createElement(Text, { level: 2, style: style.title }, titleText),
|
|
39
|
-
React.createElement(
|
|
40
|
-
React.createElement(
|
|
37
|
+
React.createElement(ReturnQuestions, { portalHostName: RETURN_QUESTION_FORM_PORTAL_HOST_NAME, returnQuestions: returnQuestions }),
|
|
38
|
+
React.createElement(Button, { style: style.submit, onPress: handleOnSubmit }, submitButtonText)))));
|
|
41
39
|
};
|
|
42
40
|
export { ReturnQuestionsForm };
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "../../../../theme/theme";
|
|
3
|
-
const { spaceXL } = theme();
|
|
3
|
+
const { spaceS, spaceXL } = theme();
|
|
4
4
|
const style = StyleSheet.create({
|
|
5
5
|
returnQuestionsContainer: {
|
|
6
|
-
paddingBottom: spaceXL,
|
|
7
6
|
paddingHorizontal: spaceXL,
|
|
8
7
|
},
|
|
8
|
+
submit: {
|
|
9
|
+
marginTop: spaceXL,
|
|
10
|
+
},
|
|
9
11
|
title: {
|
|
10
|
-
marginBottom:
|
|
12
|
+
marginBottom: spaceS,
|
|
11
13
|
textAlign: "center",
|
|
12
14
|
},
|
|
13
15
|
});
|
|
@@ -3,11 +3,11 @@ import { theme } from "../../../../../infrastructure/ui/theme/theme";
|
|
|
3
3
|
const { borderSize, colorGrayscaleS, spaceM, spaceL, spaceXL } = theme();
|
|
4
4
|
const style = StyleSheet.create({
|
|
5
5
|
modalContent: {
|
|
6
|
-
paddingBottom:
|
|
6
|
+
paddingBottom: spaceL,
|
|
7
7
|
paddingHorizontal: spaceXL,
|
|
8
8
|
},
|
|
9
9
|
modalTitle: {
|
|
10
|
-
marginBottom:
|
|
10
|
+
marginBottom: spaceM,
|
|
11
11
|
textAlign: "center",
|
|
12
12
|
},
|
|
13
13
|
option: {
|