@lookiero/checkout 0.2.17 → 0.2.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 (67) hide show
  1. package/dist/domain/checkoutItem/model/checkoutItem.d.ts +2 -0
  2. package/dist/domain/checkoutItem/model/currency.d.ts +5 -0
  3. package/dist/domain/checkoutItem/model/currency.js +6 -0
  4. package/dist/domain/checkoutItem/model/price.d.ts +10 -0
  5. package/dist/domain/checkoutItem/model/price.js +1 -0
  6. package/dist/infrastructure/delivery/mock/dataSourceCheckoutItems.js +3 -0
  7. package/dist/infrastructure/domain/checkoutItem/model/httpCheckoutItems.js +1 -0
  8. package/dist/infrastructure/projection/checkout/checkout.js +11 -10
  9. package/dist/infrastructure/projection/checkoutItem/checkoutItem.d.ts +10 -9
  10. package/dist/infrastructure/projection/checkoutItem/checkoutItem.js +11 -10
  11. package/dist/infrastructure/projection/checkoutItem/checkoutItem.mock.js +5 -4
  12. package/dist/infrastructure/projection/returnQuestion/returnQuestions.mock.d.ts +3 -0
  13. package/dist/infrastructure/projection/returnQuestion/returnQuestions.mock.js +348 -0
  14. package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.d.ts +8 -0
  15. package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.js +11 -0
  16. package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.d.ts +7 -0
  17. package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.js +4 -0
  18. package/dist/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionFeedback.d.ts +29 -0
  19. package/dist/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionFeedback.js +27 -0
  20. package/dist/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionItem.d.ts +18 -0
  21. package/dist/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionItem.js +12 -0
  22. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.d.ts +15 -0
  23. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.js +1 -0
  24. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.d.ts +3 -0
  25. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.js +12 -0
  26. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.style.d.ts +8 -0
  27. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.style.js +11 -0
  28. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.d.ts +3 -0
  29. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +30 -0
  30. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.d.ts +20 -0
  31. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.js +23 -0
  32. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.d.ts +3 -0
  33. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.js +33 -0
  34. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.style.d.ts +17 -0
  35. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.style.js +20 -0
  36. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.d.ts +3 -0
  37. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.js +13 -0
  38. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.style.d.ts +9 -0
  39. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.style.js +12 -0
  40. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.d.ts +3 -0
  41. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.js +12 -0
  42. package/dist/infrastructure/ui/components/organisms/returnQuestions/util/returnQuestionFeedback.d.ts +13 -0
  43. package/dist/infrastructure/ui/components/organisms/returnQuestions/util/returnQuestionFeedback.js +31 -0
  44. package/dist/infrastructure/ui/components/templates/SafeAreaScrollView.d.ts +6 -0
  45. package/dist/infrastructure/ui/components/templates/SafeAreaScrollView.js +6 -0
  46. package/dist/infrastructure/ui/components/templates/SafeAreaScrollView.style.d.ts +10 -0
  47. package/dist/infrastructure/ui/components/templates/SafeAreaScrollView.style.js +11 -0
  48. package/dist/infrastructure/ui/i18n/i18n.d.ts +2 -1
  49. package/dist/infrastructure/ui/i18n/i18n.js +2 -1
  50. package/dist/infrastructure/ui/views/intro/Intro.js +3 -2
  51. package/dist/infrastructure/ui/views/intro/Intro.style.d.ts +0 -3
  52. package/dist/infrastructure/ui/views/intro/Intro.style.js +0 -3
  53. package/dist/infrastructure/ui/views/item/Item.js +22 -7
  54. package/dist/infrastructure/ui/views/item/Item.style.d.ts +0 -7
  55. package/dist/infrastructure/ui/views/item/Item.style.js +0 -7
  56. package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +11 -0
  57. package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +29 -0
  58. package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +19 -0
  59. package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +22 -0
  60. package/dist/infrastructure/ui/views/summary/Summary.js +4 -2
  61. package/dist/projection/checkoutItem/checkoutItem.d.ts +4 -5
  62. package/dist/projection/checkoutItem/checkoutItem.js +1 -5
  63. package/dist/projection/feedback/feedback.d.ts +3 -0
  64. package/dist/projection/feedback/feedback.js +1 -0
  65. package/dist/projection/returnQuestion/returnQuestion.d.ts +16 -0
  66. package/dist/projection/returnQuestion/returnQuestion.js +10 -0
  67. package/package.json +1 -1
@@ -0,0 +1,22 @@
1
+ import { StyleSheet } from "react-native";
2
+ import { theme } from "../../../../theme/theme";
3
+ const { spaceM, spaceXL } = theme();
4
+ const style = StyleSheet.create({
5
+ scrollContainer: {
6
+ flex: 1,
7
+ flexGrow: 1,
8
+ },
9
+ modal: {
10
+ zIndex: 1,
11
+ },
12
+ backButton: {
13
+ top: -spaceXL,
14
+ right: -spaceM,
15
+ alignSelf: "flex-end",
16
+ zIndex: 20,
17
+ },
18
+ returnQuestionsContainer: {
19
+ paddingBottom: spaceXL,
20
+ },
21
+ });
22
+ export { style };
@@ -2,10 +2,12 @@ import { Text } from "@lookiero/aurora-next/build/components/primitives/Text/Tex
2
2
  import { useI18nMessage } from "@lookiero/i18n-react";
3
3
  import React from "react";
4
4
  import { StyleSheet, View } from "react-native";
5
+ import { SafeAreaScrollView } from "../../components/templates/SafeAreaScrollView";
5
6
  const Summary = () => {
6
7
  const summaryText = useI18nMessage({ id: "summary" });
7
- return (React.createElement(View, { style: styles.container },
8
- React.createElement(Text, { heading: true, level: 3 }, summaryText)));
8
+ return (React.createElement(SafeAreaScrollView, null,
9
+ React.createElement(View, { style: styles.container },
10
+ React.createElement(Text, { heading: true, level: 3 }, summaryText))));
9
11
  };
10
12
  const styles = StyleSheet.create({
11
13
  container: {
@@ -1,4 +1,6 @@
1
1
  import { CheckoutItemStatus } from "../../domain/checkoutItem/model/checkoutItem";
2
+ import { Currency } from "../../domain/checkoutItem/model/currency";
3
+ import { FeedbackProjection } from "../feedback/feedback";
2
4
  declare enum MediaPerspective {
3
5
  BACK = "BACK",
4
6
  BOTTOM_UP = "BOTTOM_UP",
@@ -18,10 +20,6 @@ interface MediaProjection {
18
20
  readonly url: string;
19
21
  readonly perspective: MediaPerspective;
20
22
  }
21
- declare enum Currency {
22
- EUR = "EUR",
23
- GBP = "GBP"
24
- }
25
23
  interface PriceProjection {
26
24
  readonly amount: number;
27
25
  readonly currency: Currency;
@@ -48,15 +46,16 @@ interface CheckoutItemProductVariantProjection {
48
46
  readonly media: MediaProjection[];
49
47
  readonly brand: string;
50
48
  readonly name: string;
51
- readonly price: PriceProjection;
52
49
  readonly size: SizeProjection;
53
50
  readonly color: ColorProjection;
54
51
  }
55
52
  interface CheckoutItemProjection {
56
53
  readonly id: string;
57
54
  readonly status: CheckoutItemStatus;
55
+ readonly price: PriceProjection;
58
56
  readonly replacedFor?: string;
59
57
  readonly productVariant: CheckoutItemProductVariantProjection;
58
+ readonly feedback: FeedbackProjection | undefined;
60
59
  }
61
60
  export type { CheckoutItemProjection, CheckoutItemProductVariantProjection, ColorProjection, MediaProjection, PriceProjection, SizeProjection, };
62
61
  export { Currency, MediaPerspective };
@@ -1,3 +1,4 @@
1
+ import { Currency } from "../../domain/checkoutItem/model/currency";
1
2
  var MediaPerspective;
2
3
  (function (MediaPerspective) {
3
4
  MediaPerspective["BACK"] = "BACK";
@@ -13,9 +14,4 @@ var MediaPerspective;
13
14
  MediaPerspective["OTHER"] = "OTHER";
14
15
  MediaPerspective["SIDE"] = "SIDE";
15
16
  })(MediaPerspective || (MediaPerspective = {}));
16
- var Currency;
17
- (function (Currency) {
18
- Currency["EUR"] = "EUR";
19
- Currency["GBP"] = "GBP";
20
- })(Currency || (Currency = {}));
21
17
  export { Currency, MediaPerspective };
@@ -0,0 +1,3 @@
1
+ declare type ReturnQuestionId = string;
2
+ declare type FeedbackProjection = Record<ReturnQuestionId, ReturnQuestionId | string>;
3
+ export type { FeedbackProjection };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ declare enum ReturnQuestionType {
2
+ HOST_DEFAULT = "HOST_DEFAULT",
3
+ HOST_SELECT = "HOST_SELECT",
4
+ HOST_STACK = "HOST_STACK",
5
+ TEXTAREA = "TEXTAREA",
6
+ OPTION = "OPTION"
7
+ }
8
+ interface ReturnQuestionProjection {
9
+ id: string;
10
+ name: string;
11
+ placeholder?: string;
12
+ type: ReturnQuestionType;
13
+ children?: ReturnQuestionProjection[];
14
+ }
15
+ export { ReturnQuestionType };
16
+ export type { ReturnQuestionProjection };
@@ -0,0 +1,10 @@
1
+ var ReturnQuestionType;
2
+ (function (ReturnQuestionType) {
3
+ ReturnQuestionType["HOST_DEFAULT"] = "HOST_DEFAULT";
4
+ ReturnQuestionType["HOST_SELECT"] = "HOST_SELECT";
5
+ ReturnQuestionType["HOST_STACK"] = "HOST_STACK";
6
+ ReturnQuestionType["TEXTAREA"] = "TEXTAREA";
7
+ ReturnQuestionType["OPTION"] = "OPTION";
8
+ // ICON = "ICON",
9
+ })(ReturnQuestionType || (ReturnQuestionType = {}));
10
+ export { ReturnQuestionType };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lookiero/checkout",
3
- "version": "0.2.17",
3
+ "version": "0.2.18",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [