@lookiero/checkout 3.6.0-beta.6 → 3.6.0-beta.8
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/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +2 -2
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.js +1 -1
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.js +1 -1
- package/dist/shared/ui/components/atoms/input/Input.js +1 -1
- package/dist/shared/ui/components/layouts/modal/Modal.d.ts +0 -1
- package/dist/shared/ui/components/layouts/modal/Modal.js +2 -2
- package/package.json +1 -1
|
@@ -31,10 +31,10 @@ const HostSelectReturnQuestionItem = ({ returnQuestion, children, portalHostName
|
|
|
31
31
|
// deepestReturnQuestionWithFeedback needs to be as a dependency in order to be re-evaluated whenever it changes
|
|
32
32
|
}, [handleOnModalClose, deepestReturnQuestionWithFeedback, isLeaf]);
|
|
33
33
|
return (React.createElement(React.Fragment, null,
|
|
34
|
-
React.createElement(TouchableHighlight, { style: style.container, testID:
|
|
34
|
+
React.createElement(TouchableHighlight, { style: style.container, testID: returnQuestion.name, underlayColor: containerUnderlayColor, onPress: handleOnPress },
|
|
35
35
|
React.createElement(View, { pointerEvents: "none" },
|
|
36
36
|
React.createElement(InputField, { editable: false, icon: "arrow-down", label: placeholderText, value: inputValue }))),
|
|
37
|
-
React.createElement(Modal, {
|
|
37
|
+
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 },
|
|
38
38
|
React.createElement(View, { style: style.modalContent }, children))));
|
|
39
39
|
};
|
|
40
40
|
export { HostSelectReturnQuestionItem };
|
|
@@ -8,7 +8,7 @@ const OptionReturnQuestionItem = ({ returnQuestion, returnQuestionParentId, }) =
|
|
|
8
8
|
const { onChange } = useReturnQuestionFeedbackForId({ id: returnQuestionParentId });
|
|
9
9
|
const optionText = useI18nMessage({ id: returnQuestion.name });
|
|
10
10
|
const handleOnPress = useCallback(() => onChange({ returnQuestionId: returnQuestionParentId, returnQuestionFeedback: returnQuestion.id }), [onChange, returnQuestion.id, returnQuestionParentId]);
|
|
11
|
-
return (React.createElement(TouchableHighlight, { style: style.container, testID:
|
|
11
|
+
return (React.createElement(TouchableHighlight, { style: style.container, testID: returnQuestion.name, underlayColor: containerUnderlayColor, onPress: handleOnPress },
|
|
12
12
|
React.createElement(Text, { level: 3, style: style.text }, optionText)));
|
|
13
13
|
};
|
|
14
14
|
export { OptionReturnQuestionItem };
|
|
@@ -8,6 +8,6 @@ const TextareaReturnQuestionItem = ({ returnQuestion, returnQuestionParentId, })
|
|
|
8
8
|
const placeholderText = useMemo(() => (returnQuestion.placeholder ? formatMessage({ id: returnQuestion.placeholder }) : ""), [formatMessage, returnQuestion.placeholder]);
|
|
9
9
|
const { feedback, onChange } = useReturnQuestionFeedbackForId({ id: returnQuestionParentId });
|
|
10
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, testID:
|
|
11
|
+
return (React.createElement(InputField, { label: placeholderText, minHeight: TEXTAREA_MIN_HEIGHT, placeholder: placeholderText, testID: returnQuestion.name, value: feedback, multiline: true, onChange: handleOnChange }));
|
|
12
12
|
};
|
|
13
13
|
export { TextareaReturnQuestionItem };
|
|
@@ -32,6 +32,6 @@ const Input = ({ minHeight = MIN_HEIGHT, maxHeight = MAX_HEIGHT, style: customSt
|
|
|
32
32
|
}, [maxHeight, minHeight, multiline]);
|
|
33
33
|
useLayoutEffect(handleOnContentSizeChangeWeb, [handleOnContentSizeChangeWeb, value]);
|
|
34
34
|
const textInputRef = useRef(null);
|
|
35
|
-
return (React.createElement(TextInput, {
|
|
35
|
+
return (React.createElement(TextInput, { ref: textInputRef, multiline: multiline, numberOfLines: !!multiline ? undefined : 1, placeholderTextColor: placeholderTextColor, style: [style.input, customStyle, { height }], testID: "input", textAlignVertical: "top", value: value, onChange: onChange, onContentSizeChange: handleOnContentSizeChange, ...restOfProps }));
|
|
36
36
|
};
|
|
37
37
|
export { Input };
|
|
@@ -15,7 +15,6 @@ interface ModalProps {
|
|
|
15
15
|
readonly size?: Partial<Record<ScreenSize, ColumnSize>>;
|
|
16
16
|
readonly style?: Partial<Record<ModalStyle, StyleProp<ViewStyle>>>;
|
|
17
17
|
readonly testID?: string;
|
|
18
|
-
readonly closeButtonTestId?: string;
|
|
19
18
|
}
|
|
20
19
|
declare const Modal: FC<ModalProps>;
|
|
21
20
|
export type { ColumnSize };
|
|
@@ -15,7 +15,7 @@ const { spaceXL, spaceXXL } = theme();
|
|
|
15
15
|
const TRANSITION_MODAL_SCALE = 0.9;
|
|
16
16
|
const DEFAULT_SAFEAREA_INSET_TOP = spaceXXL;
|
|
17
17
|
const MODAL_DESKTOP_VERTICAL_PADDING = spaceXXL;
|
|
18
|
-
const Modal = ({ children, visible, header, footer, portalHostName, onClose, showCloseButton = false, size = { M: "2/3", L: "1/3" }, style: customStyle, scroll = false, testID = "modal",
|
|
18
|
+
const Modal = ({ children, visible, header, footer, portalHostName, onClose, showCloseButton = false, size = { M: "2/3", L: "1/3" }, style: customStyle, scroll = false, testID = "modal", }) => {
|
|
19
19
|
const { height: screenHeight } = Dimensions.get(Platform.OS === "web" ? "window" : "screen");
|
|
20
20
|
const { top: safeAreaInsetTop, bottom: safeAreaInsetBottom } = useSafeAreaInsets();
|
|
21
21
|
const screenSize = useScreenSize();
|
|
@@ -74,7 +74,7 @@ const Modal = ({ children, visible, header, footer, portalHostName, onClose, sho
|
|
|
74
74
|
], onLayout: handleOnModalLayout },
|
|
75
75
|
(header || showCloseButton) && (React.createElement(View, { style: [style.header, customStyle?.header] },
|
|
76
76
|
React.createElement(View, null, header),
|
|
77
|
-
showCloseButton && (React.createElement(ButtonIcon, { name: "close", style: { button: customStyle?.closeButton },
|
|
77
|
+
showCloseButton && (React.createElement(ButtonIcon, { name: "close", style: { button: customStyle?.closeButton }, onPress: onClose })))),
|
|
78
78
|
React.createElement(ModalContentView, null,
|
|
79
79
|
React.createElement(View, { style: {
|
|
80
80
|
paddingBottom: safeAreaInsetBottom +
|