@lookiero/checkout 0.3.17 → 0.3.18

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.
Files changed (36) hide show
  1. package/dist/package.json +1 -1
  2. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/CheckoutQuestion.d.ts +8 -0
  3. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/CheckoutQuestion.js +8 -0
  4. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/CheckoutQuestions.d.ts +7 -0
  5. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/CheckoutQuestions.js +4 -0
  6. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/behaviors/useCheckoutQuestionItem.d.ts +18 -0
  7. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/behaviors/useCheckoutQuestionItem.js +12 -0
  8. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/{CheckoutQuestionItem.d.ts → components/CheckoutQuestionItem.d.ts} +1 -1
  9. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.d.ts +1 -1
  10. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.style.d.ts +1 -0
  11. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.style.js +1 -0
  12. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostDefaultCheckoutQuestionItem/HostDefaultCheckoutQuestionItem.d.ts +3 -0
  13. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostDefaultCheckoutQuestionItem/HostDefaultCheckoutQuestionItem.js +12 -0
  14. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostDefaultCheckoutQuestionItem/HostDefaultCheckoutQuestionItem.style.d.ts +8 -0
  15. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostDefaultCheckoutQuestionItem/HostDefaultCheckoutQuestionItem.style.js +11 -0
  16. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem.d.ts +3 -0
  17. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem.js +13 -0
  18. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem.style.d.ts +13 -0
  19. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem.style.js +16 -0
  20. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem.d.ts +2 -2
  21. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem.js +8 -4
  22. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem.style.d.ts +6 -0
  23. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem.style.js +7 -0
  24. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.d.ts +3 -0
  25. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.js +15 -0
  26. package/dist/src/infrastructure/ui/i18n/i18n.d.ts +2 -1
  27. package/dist/src/infrastructure/ui/i18n/i18n.js +1 -0
  28. package/dist/src/infrastructure/ui/views/feedback/Feedback.js +33 -6
  29. package/dist/src/infrastructure/ui/views/feedback/Feedback.style.d.ts +9 -0
  30. package/dist/src/infrastructure/ui/views/feedback/Feedback.style.js +12 -0
  31. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.d.ts +7 -0
  32. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.js +20 -0
  33. package/dist/src/projection/checkoutQuestion/checkoutQuestion.d.ts +0 -2
  34. package/dist/src/projection/checkoutQuestion/checkoutQuestion.js +0 -2
  35. package/package.json +1 -1
  36. /package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/{CheckoutQuestionItem.js → components/CheckoutQuestionItem.js} +0 -0
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lookiero/checkout",
3
- "version": "0.3.17",
3
+ "version": "0.3.18",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { CheckoutQuestionProjection } from "../../../../../projection/checkoutQuestion/checkoutQuestion";
3
+ interface CheckoutQuestionProps {
4
+ readonly checkoutQuestionParentId: string;
5
+ readonly checkoutQuestion: CheckoutQuestionProjection;
6
+ }
7
+ declare const _default: React.NamedExoticComponent<CheckoutQuestionProps>;
8
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import React, { memo } from "react";
2
+ import { useCheckoutQuestionItem } from "./behaviors/useCheckoutQuestionItem";
3
+ const CheckoutQuestion = ({ checkoutQuestion, checkoutQuestionParentId, }) => {
4
+ const Item = useCheckoutQuestionItem({ type: checkoutQuestion.type });
5
+ return (React.createElement(Item, { checkoutQuestion: checkoutQuestion, checkoutQuestionParentId: checkoutQuestionParentId },
6
+ React.createElement(React.Fragment, null, checkoutQuestion.children?.map((childCheckoutQuestion) => (React.createElement(CheckoutQuestion, { key: childCheckoutQuestion.id, checkoutQuestion: childCheckoutQuestion, checkoutQuestionParentId: checkoutQuestion.id }))))));
7
+ };
8
+ export default memo(CheckoutQuestion);
@@ -0,0 +1,7 @@
1
+ import { FC } from "react";
2
+ import { CheckoutQuestionProjection } from "../../../../../projection/checkoutQuestion/checkoutQuestion";
3
+ interface CheckoutQuestionsProps {
4
+ readonly checkoutQuestions: CheckoutQuestionProjection[];
5
+ }
6
+ declare const CheckoutQuestions: FC<CheckoutQuestionsProps>;
7
+ export { CheckoutQuestions };
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import CheckoutQuestion from "./CheckoutQuestion";
3
+ const CheckoutQuestions = ({ checkoutQuestions }) => (React.createElement(React.Fragment, null, checkoutQuestions.map((checkoutQuestion) => (React.createElement(CheckoutQuestion, { key: checkoutQuestion.id, checkoutQuestion: checkoutQuestion, checkoutQuestionParentId: "" })))));
4
+ export { CheckoutQuestions };
@@ -0,0 +1,18 @@
1
+ import { FC, ReactNode } from "react";
2
+ import { CheckoutQuestionType } from "../../../../../../projection/checkoutQuestion/checkoutQuestion";
3
+ import { CheckoutQuestionItem } from "../components/CheckoutQuestionItem";
4
+ type CheckoutQuestionItems = Record<CheckoutQuestionType, CheckoutQuestionItem>;
5
+ interface CheckoutQuestionItemContextProviderProps {
6
+ readonly checkoutQuestionItems: CheckoutQuestionItems;
7
+ readonly children: ReactNode;
8
+ }
9
+ declare const CheckoutQuestionItemProvider: FC<CheckoutQuestionItemContextProviderProps>;
10
+ interface UseCheckoutQuestionItemFunctionArgs {
11
+ readonly type: CheckoutQuestionType;
12
+ }
13
+ interface UseCheckoutQuestionItemFunction {
14
+ (args: UseCheckoutQuestionItemFunctionArgs): CheckoutQuestionItem;
15
+ }
16
+ declare const useCheckoutQuestionItem: UseCheckoutQuestionItemFunction;
17
+ export type { CheckoutQuestionItems };
18
+ export { useCheckoutQuestionItem, CheckoutQuestionItemProvider };
@@ -0,0 +1,12 @@
1
+ import React, { createContext, useContext, useMemo } from "react";
2
+ import invariant from "tiny-invariant";
3
+ const CheckoutQuestionItemContext = createContext({});
4
+ const CheckoutQuestionItemProvider = ({ checkoutQuestionItems, children, }) => (React.createElement(CheckoutQuestionItemContext.Provider, { value: checkoutQuestionItems }, children));
5
+ const useCheckoutQuestionItem = ({ type }) => {
6
+ const items = useContext(CheckoutQuestionItemContext);
7
+ const item = useMemo(() => items[type], [items, type]);
8
+ invariant(items, "Your are trying to use the useCheckoutQuestionItem hook without wrapping your app with the <CheckoutQuestionItemProvider>.");
9
+ invariant(item, `The provided CheckoutQuestionType (${type}) is NOT SUPPORTED`);
10
+ return item;
11
+ };
12
+ export { useCheckoutQuestionItem, CheckoutQuestionItemProvider };
@@ -1,5 +1,5 @@
1
1
  import { FC, ReactNode } from "react";
2
- import { CheckoutQuestionProjection } from "../../../../../projection/checkoutQuestion/checkoutQuestion";
2
+ import { CheckoutQuestionProjection } from "../../../../../../projection/checkoutQuestion/checkoutQuestion";
3
3
  interface CheckoutQuestionItemProps {
4
4
  readonly checkoutQuestion: CheckoutQuestionProjection;
5
5
  readonly checkoutQuestionParentId: string;
@@ -1,3 +1,3 @@
1
- import { CheckoutQuestionItem } from "../../CheckoutQuestionItem";
1
+ import { CheckoutQuestionItem } from "../CheckoutQuestionItem";
2
2
  declare const ButtonCheckoutQuestionItem: CheckoutQuestionItem;
3
3
  export { ButtonCheckoutQuestionItem };
@@ -1,6 +1,7 @@
1
1
  declare const style: {
2
2
  button: {
3
3
  borderRadius: number;
4
+ marginHorizontal: number;
4
5
  };
5
6
  };
6
7
  export { style };
@@ -4,6 +4,7 @@ const { inputSize } = theme();
4
4
  const style = StyleSheet.create({
5
5
  button: {
6
6
  borderRadius: inputSize / 2,
7
+ marginHorizontal: 12,
7
8
  },
8
9
  });
9
10
  export { style };
@@ -0,0 +1,3 @@
1
+ import { CheckoutQuestionItem } from "../CheckoutQuestionItem";
2
+ declare const HostDefaultCheckoutQuestionItem: CheckoutQuestionItem;
3
+ export { HostDefaultCheckoutQuestionItem };
@@ -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 "./HostDefaultCheckoutQuestionItem.style";
6
+ const HostDefaultCheckoutQuestionItem = ({ checkoutQuestion, children, }) => {
7
+ const titleText = useI18nMessage({ id: checkoutQuestion.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 { HostDefaultCheckoutQuestionItem };
@@ -0,0 +1,8 @@
1
+ declare const style: {
2
+ title: {
3
+ marginBottom: number;
4
+ marginTop: number;
5
+ textAlign: "center";
6
+ };
7
+ };
8
+ export { style };
@@ -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,3 @@
1
+ import { CheckoutQuestionItem } from "../CheckoutQuestionItem";
2
+ declare const HostSelectCheckoutQuestionItem: CheckoutQuestionItem;
3
+ export { HostSelectCheckoutQuestionItem };
@@ -0,0 +1,13 @@
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 { View } from "react-native";
5
+ import { CHECKOUT_QUESTIONS_PREFIX } from "../../../../../i18n/i18n";
6
+ import { style } from "./HostSelectCheckoutQuestionItem.style";
7
+ const HostSelectCheckoutQuestionItem = ({ checkoutQuestion, children, }) => {
8
+ const titleText = useI18nMessage({ id: checkoutQuestion.name, prefix: CHECKOUT_QUESTIONS_PREFIX });
9
+ return (React.createElement(React.Fragment, null,
10
+ React.createElement(Text, { level: 3, style: style.title }, titleText),
11
+ React.createElement(View, { style: style.content }, children)));
12
+ };
13
+ export { HostSelectCheckoutQuestionItem };
@@ -0,0 +1,13 @@
1
+ declare const containerUnderlayColor: string;
2
+ declare const style: {
3
+ content: {
4
+ flexDirection: "row";
5
+ justifyContent: "center";
6
+ };
7
+ title: {
8
+ marginBottom: number;
9
+ marginTop: number;
10
+ textAlign: "center";
11
+ };
12
+ };
13
+ export { style, containerUnderlayColor };
@@ -0,0 +1,16 @@
1
+ import { StyleSheet } from "react-native";
2
+ import { theme } from "../../../../../theme/theme";
3
+ const { spaceL, spaceXXXL, colorGrayscaleS } = theme();
4
+ const containerUnderlayColor = colorGrayscaleS;
5
+ const style = StyleSheet.create({
6
+ content: {
7
+ flexDirection: "row",
8
+ justifyContent: "center",
9
+ },
10
+ title: {
11
+ marginBottom: spaceL,
12
+ marginTop: spaceXXXL,
13
+ textAlign: "center",
14
+ },
15
+ });
16
+ export { style, containerUnderlayColor };
@@ -1,5 +1,5 @@
1
- import { CheckoutQuestionItem } from "../../CheckoutQuestionItem";
2
- type IconName = "icon_bad" | "icon_regular" | "icon_good";
1
+ import { CheckoutQuestionItem } from "../CheckoutQuestionItem";
2
+ type IconName = "checkout.checkout_question.icon.bad" | "checkout.checkout_question.icon.regular" | "checkout.checkout_question.icon.good";
3
3
  declare const IconCheckoutQuestionItem: CheckoutQuestionItem;
4
4
  export type { IconName };
5
5
  export { IconCheckoutQuestionItem };
@@ -1,19 +1,23 @@
1
1
  import React, { useCallback } from "react";
2
2
  import { Pressable } from "react-native";
3
3
  import invariant from "tiny-invariant";
4
+ import { style } from "./IconCheckoutQuestionItem.style";
4
5
  import { Happy } from "./icons/Happy";
5
6
  import { Normal } from "./icons/Normal";
6
7
  import { Sad } from "./icons/Sad";
7
8
  const ICON = {
8
- icon_bad: Sad,
9
- icon_regular: Normal,
10
- icon_good: Happy,
9
+ // eslint-disable-next-line @typescript-eslint/naming-convention
10
+ "checkout.checkout_question.icon.bad": Sad,
11
+ // eslint-disable-next-line @typescript-eslint/naming-convention
12
+ "checkout.checkout_question.icon.regular": Normal,
13
+ // eslint-disable-next-line @typescript-eslint/naming-convention
14
+ "checkout.checkout_question.icon.good": Happy,
11
15
  };
12
16
  const IconCheckoutQuestionItem = ({ checkoutQuestion }) => {
13
17
  const Icon = ICON[checkoutQuestion.name];
14
18
  const handleOnPress = useCallback(() => void 0, []);
15
19
  invariant(Icon, "CheckoutQuestion icon does not exist");
16
20
  return (React.createElement(Pressable, { onPress: handleOnPress },
17
- React.createElement(Icon, { testID: checkoutQuestion.name })));
21
+ React.createElement(Icon, { style: style.icon, testID: checkoutQuestion.name })));
18
22
  };
19
23
  export { IconCheckoutQuestionItem };
@@ -0,0 +1,6 @@
1
+ declare const style: {
2
+ icon: {
3
+ marginHorizontal: number;
4
+ };
5
+ };
6
+ export { style };
@@ -0,0 +1,7 @@
1
+ import { StyleSheet } from "react-native";
2
+ const style = StyleSheet.create({
3
+ icon: {
4
+ marginHorizontal: 12,
5
+ },
6
+ });
7
+ export { style };
@@ -0,0 +1,3 @@
1
+ import { CheckoutQuestionItem } from "../CheckoutQuestionItem";
2
+ declare const TextareaCheckoutQuestionItem: CheckoutQuestionItem;
3
+ export { TextareaCheckoutQuestionItem };
@@ -0,0 +1,15 @@
1
+ import { useI18nMessage } from "@lookiero/i18n-react";
2
+ import React, { useCallback, useState } from "react";
3
+ import { InputField } from "../../../../../../../shared/ui/components/molecules/inputField/InputField";
4
+ import { RETURN_QUESTIONS_PREFIX } from "../../../../../i18n/i18n";
5
+ const TEXTAREA_MIN_HEIGHT = 96;
6
+ const TextareaCheckoutQuestionItem = ({ checkoutQuestion }) => {
7
+ const placeholderText = useI18nMessage({
8
+ id: checkoutQuestion.placeholder,
9
+ prefix: RETURN_QUESTIONS_PREFIX,
10
+ });
11
+ const [value, setValue] = useState("");
12
+ const handleOnChange = useCallback((value) => setValue(value), []);
13
+ return (React.createElement(InputField, { label: placeholderText, minHeight: TEXTAREA_MIN_HEIGHT, placeholder: placeholderText, value: value, multiline: true, onChange: handleOnChange }));
14
+ };
15
+ export { TextareaCheckoutQuestionItem };
@@ -59,6 +59,7 @@ declare enum I18nMessages {
59
59
  CHECKOUT_SUCCESS_MODAL_BUTTON = "checkout.success_modal_button",
60
60
  CHECKOUT_DELIVERY_BANNER = "checkout.delivery_banner",
61
61
  HEADER_CHECKOUT_TITLE = "header.checkout_title",
62
- HEADER_COMPLETE_CHECKOUT_TITLE = "header.complete_checkout_title"
62
+ HEADER_COMPLETE_CHECKOUT_TITLE = "header.complete_checkout_title",
63
+ FEEDBACK_BUTTON = "feedback.button"
63
64
  }
64
65
  export { I18nMessages, COLOR_I18N_PREFIX, RETURN_QUESTIONS_PREFIX, RETURN_QUESTIONS_FEEDBACK_PREFIX, CHECKOUT_QUESTIONS_PREFIX, };
@@ -61,5 +61,6 @@ var I18nMessages;
61
61
  I18nMessages["CHECKOUT_DELIVERY_BANNER"] = "checkout.delivery_banner";
62
62
  I18nMessages["HEADER_CHECKOUT_TITLE"] = "header.checkout_title";
63
63
  I18nMessages["HEADER_COMPLETE_CHECKOUT_TITLE"] = "header.complete_checkout_title";
64
+ I18nMessages["FEEDBACK_BUTTON"] = "feedback.button";
64
65
  })(I18nMessages || (I18nMessages = {}));
65
66
  export { I18nMessages, COLOR_I18N_PREFIX, RETURN_QUESTIONS_PREFIX, RETURN_QUESTIONS_FEEDBACK_PREFIX, CHECKOUT_QUESTIONS_PREFIX, };
@@ -1,8 +1,35 @@
1
- import { Text } from "@lookiero/aurora-next/build/components/primitives/Text/Text";
2
- import React from "react";
3
- import { View } from "react-native";
4
- const Feedback = () => {
5
- return (React.createElement(View, null,
6
- React.createElement(Text, null, "Feedback view")));
1
+ import { Button } from "@lookiero/aurora-next/build/components/atoms/Button/Button";
2
+ import { useI18nMessage } from "@lookiero/i18n-react";
3
+ import { QueryStatus } from "@lookiero/messaging-react";
4
+ import React, { useCallback } from "react";
5
+ import { Spinner } from "../../../../shared/ui/components/atoms/spinner/Spinner";
6
+ import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
7
+ import { useListCheckoutQuestionsByCheckoutId } from "../../../projection/checkoutQuestion/react/useListCheckoutQuestionsByCheckoutId";
8
+ import { Body } from "../../components/layouts/body/Body";
9
+ import { SafeAreaScrollView } from "../../components/templates/SafeAreaScrollView";
10
+ import { I18nMessages } from "../../i18n/i18n";
11
+ import { style } from "./Feedback.style";
12
+ import { CheckoutQuestionsForm } from "./components/checkoutQuestionsForm/CheckoutQuestionsForm";
13
+ const Feedback = ({ customerId }) => {
14
+ const buttonText = useI18nMessage({ id: I18nMessages.FEEDBACK_BUTTON });
15
+ const [checkout, checkoutStatus] = useViewFirstAvailableCheckoutByCustomerId({ customerId });
16
+ const [checkoutQuestions, checkoutQuestionsStatus] = useListCheckoutQuestionsByCheckoutId({
17
+ checkoutId: checkout?.id,
18
+ });
19
+ const handlePress = useCallback(() => void 0, []);
20
+ const dependenciesLoadedStatuses = [QueryStatus.ERROR, QueryStatus.SUCCESS];
21
+ const dependenciesLoaded = dependenciesLoadedStatuses.includes(checkoutStatus) && dependenciesLoadedStatuses.includes(checkoutQuestionsStatus);
22
+ if (!dependenciesLoaded)
23
+ return React.createElement(Spinner, null);
24
+ return (React.createElement(SafeAreaScrollView, null,
25
+ React.createElement(Body, { style: { column: style.bodyColumn } },
26
+ React.createElement(CheckoutQuestionsForm, { checkoutQuestions: checkoutQuestions || [] }),
27
+ React.createElement(Button
28
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
29
+ // @ts-ignore
30
+ , {
31
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
32
+ // @ts-ignore
33
+ style: style.button, onPress: handlePress }, buttonText))));
7
34
  };
8
35
  export { Feedback };
@@ -0,0 +1,9 @@
1
+ declare const style: {
2
+ bodyColumn: {
3
+ paddingHorizontal: number;
4
+ };
5
+ button: {
6
+ marginTop: number;
7
+ };
8
+ };
9
+ export { style };
@@ -0,0 +1,12 @@
1
+ import { StyleSheet } from "react-native";
2
+ import { theme } from "../../theme/theme";
3
+ const { spaceXL } = theme();
4
+ const style = StyleSheet.create({
5
+ bodyColumn: {
6
+ paddingHorizontal: spaceXL,
7
+ },
8
+ button: {
9
+ marginTop: 65,
10
+ },
11
+ });
12
+ export { style };
@@ -0,0 +1,7 @@
1
+ import { FC } from "react";
2
+ import { CheckoutQuestionProjection } from "../../../../../../projection/checkoutQuestion/checkoutQuestion";
3
+ interface CheckoutQuestionsFormProps {
4
+ readonly checkoutQuestions: CheckoutQuestionProjection[];
5
+ }
6
+ declare const CheckoutQuestionsForm: FC<CheckoutQuestionsFormProps>;
7
+ export { CheckoutQuestionsForm };
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ import { CheckoutQuestionType, } from "../../../../../../projection/checkoutQuestion/checkoutQuestion";
3
+ import { CheckoutQuestions } from "../../../../components/organisms/checkoutQuestions/CheckoutQuestions";
4
+ import { CheckoutQuestionItemProvider, } from "../../../../components/organisms/checkoutQuestions/behaviors/useCheckoutQuestionItem";
5
+ import { ButtonCheckoutQuestionItem } from "../../../../components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem";
6
+ import { HostDefaultCheckoutQuestionItem } from "../../../../components/organisms/checkoutQuestions/components/hostDefaultCheckoutQuestionItem/HostDefaultCheckoutQuestionItem";
7
+ import { HostSelectCheckoutQuestionItem } from "../../../../components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem";
8
+ import { IconCheckoutQuestionItem } from "../../../../components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem";
9
+ import { TextareaCheckoutQuestionItem } from "../../../../components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem";
10
+ const checkoutQuestionItems = {
11
+ [CheckoutQuestionType.HOST_DEFAULT]: HostDefaultCheckoutQuestionItem,
12
+ [CheckoutQuestionType.HOST_TEXTAREA]: HostDefaultCheckoutQuestionItem,
13
+ [CheckoutQuestionType.HOST_SELECT]: HostSelectCheckoutQuestionItem,
14
+ [CheckoutQuestionType.TEXTAREA]: TextareaCheckoutQuestionItem,
15
+ [CheckoutQuestionType.ICON]: IconCheckoutQuestionItem,
16
+ [CheckoutQuestionType.BUTTON]: ButtonCheckoutQuestionItem,
17
+ };
18
+ const CheckoutQuestionsForm = ({ checkoutQuestions }) => (React.createElement(CheckoutQuestionItemProvider, { checkoutQuestionItems: checkoutQuestionItems },
19
+ React.createElement(CheckoutQuestions, { checkoutQuestions: checkoutQuestions })));
20
+ export { CheckoutQuestionsForm };
@@ -2,9 +2,7 @@ declare enum CheckoutQuestionType {
2
2
  HOST_DEFAULT = "HOST_DEFAULT",
3
3
  HOST_TEXTAREA = "HOST_TEXTAREA",
4
4
  HOST_SELECT = "HOST_SELECT",
5
- HOST_STACK = "HOST_STACK",
6
5
  TEXTAREA = "TEXTAREA",
7
- OPTION = "OPTION",
8
6
  ICON = "ICON",
9
7
  BUTTON = "BUTTON"
10
8
  }
@@ -3,9 +3,7 @@ var CheckoutQuestionType;
3
3
  CheckoutQuestionType["HOST_DEFAULT"] = "HOST_DEFAULT";
4
4
  CheckoutQuestionType["HOST_TEXTAREA"] = "HOST_TEXTAREA";
5
5
  CheckoutQuestionType["HOST_SELECT"] = "HOST_SELECT";
6
- CheckoutQuestionType["HOST_STACK"] = "HOST_STACK";
7
6
  CheckoutQuestionType["TEXTAREA"] = "TEXTAREA";
8
- CheckoutQuestionType["OPTION"] = "OPTION";
9
7
  CheckoutQuestionType["ICON"] = "ICON";
10
8
  CheckoutQuestionType["BUTTON"] = "BUTTON";
11
9
  })(CheckoutQuestionType || (CheckoutQuestionType = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lookiero/checkout",
3
- "version": "0.3.17",
3
+ "version": "0.3.18",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [