@lookiero/checkout 8.14.0-beta.2 → 8.14.0-beta.3

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 (125) hide show
  1. package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.d.ts +10 -0
  2. package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.js +17 -0
  3. package/dist/src/infrastructure/ui/Root.d.ts +2 -3
  4. package/dist/src/infrastructure/ui/Root.js +4 -2
  5. package/dist/src/infrastructure/ui/components/layouts/layout/Layout.d.ts +21 -0
  6. package/dist/src/infrastructure/ui/components/layouts/layout/Layout.js +1 -0
  7. package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.d.ts +6 -0
  8. package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.js +4 -0
  9. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.d.ts +6 -0
  10. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.js +5 -0
  11. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.d.ts +4 -0
  12. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.js +19 -0
  13. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.d.ts +3 -0
  14. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.js +18 -0
  15. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.d.ts +12 -0
  16. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.js +13 -0
  17. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.d.ts +0 -5
  18. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.js +3 -3
  19. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.d.ts +0 -5
  20. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.js +1 -1
  21. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.d.ts +0 -5
  22. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +4 -3
  23. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/form/HostStackReturnQuestionItem.js +1 -1
  24. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.js +2 -2
  25. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.d.ts +1 -3
  26. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.js +5 -4
  27. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.js +4 -4
  28. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.d.ts +6 -0
  29. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.js +11 -0
  30. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.d.ts +8 -0
  31. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.js +11 -0
  32. package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.d.ts +11 -0
  33. package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.js +49 -0
  34. package/dist/src/infrastructure/ui/i18n/fetchTranslations.d.ts +9 -0
  35. package/dist/src/infrastructure/ui/i18n/fetchTranslations.js +9 -0
  36. package/dist/src/infrastructure/ui/i18n/translationEndpoint.d.ts +19 -0
  37. package/dist/src/infrastructure/ui/i18n/translationEndpoint.js +21 -0
  38. package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.d.ts +9 -0
  39. package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.js +21 -0
  40. package/dist/src/infrastructure/ui/routing/Routing.d.ts +0 -7
  41. package/dist/src/infrastructure/ui/routing/Routing.js +5 -5
  42. package/dist/src/infrastructure/ui/test/render.js +3 -1
  43. package/dist/src/infrastructure/ui/views/App.d.ts +0 -8
  44. package/dist/src/infrastructure/ui/views/App.js +10 -7
  45. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.d.ts +7 -0
  46. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.js +10 -0
  47. package/dist/src/infrastructure/ui/views/item/Item.d.ts +0 -5
  48. package/dist/src/infrastructure/ui/views/item/Item.js +3 -3
  49. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.d.ts +0 -2
  50. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +4 -3
  51. package/dist/src/infrastructure/ui/views/item/components/itemActions/ItemActions.d.ts +1 -5
  52. package/dist/src/infrastructure/ui/views/item/components/itemActions/ItemActions.js +2 -2
  53. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.d.ts +0 -5
  54. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.js +2 -2
  55. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +11 -0
  56. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +40 -0
  57. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +12 -0
  58. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +15 -0
  59. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.d.ts +0 -7
  60. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.js +6 -5
  61. package/dist/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.d.ts +0 -2
  62. package/dist/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.js +4 -3
  63. package/dist/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.d.ts +0 -5
  64. package/dist/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.js +2 -2
  65. package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.d.ts +0 -5
  66. package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.js +2 -2
  67. package/dist/src/infrastructure/ui/views/return/Return.d.ts +0 -5
  68. package/dist/src/infrastructure/ui/views/return/Return.js +2 -2
  69. package/dist/src/infrastructure/ui/views/return/Return.style.d.ts +40 -0
  70. package/dist/src/infrastructure/ui/views/return/Return.style.js +43 -0
  71. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +0 -5
  72. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.js +11 -10
  73. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +6 -2
  74. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.js +6 -2
  75. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.d.ts +13 -0
  76. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.js +9 -0
  77. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.d.ts +7 -0
  78. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.js +10 -0
  79. package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.d.ts +17 -0
  80. package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.js +13 -0
  81. package/dist/src/projection/shared/country.d.ts +14 -0
  82. package/dist/src/projection/shared/country.js +15 -0
  83. package/dist/src/projection/shared/customer.d.ts +8 -0
  84. package/dist/src/projection/shared/customer.js +1 -0
  85. package/dist/src/projection/shared/locale.d.ts +12 -0
  86. package/dist/src/projection/shared/locale.js +13 -0
  87. package/dist/src/projection/shared/order.d.ts +6 -0
  88. package/dist/src/projection/shared/order.js +1 -0
  89. package/dist/src/projection/shared/price.d.ts +10 -0
  90. package/dist/src/projection/shared/price.js +1 -0
  91. package/dist/src/projection/shared/size.d.ts +20 -0
  92. package/dist/src/projection/shared/size.js +3 -0
  93. package/dist/src/projection/shared/subscription.d.ts +2 -0
  94. package/dist/src/projection/shared/subscription.js +1 -0
  95. package/dist/src/shared/ui/components/atoms/error/Error.d.ts +10 -0
  96. package/dist/src/shared/ui/components/atoms/error/Error.js +4 -0
  97. package/dist/src/version.d.ts +1 -1
  98. package/dist/src/version.js +1 -1
  99. package/package.json +2 -2
  100. package/src/infrastructure/ui/Root.tsx +22 -21
  101. package/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.tsx +1 -14
  102. package/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.tsx +1 -8
  103. package/src/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.ts +0 -6
  104. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.tsx +3 -3
  105. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/form/HostStackReturnQuestionItem.tsx +0 -2
  106. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.tsx +0 -2
  107. package/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.tsx +4 -6
  108. package/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.tsx +2 -3
  109. package/src/infrastructure/ui/routing/Routing.tsx +5 -13
  110. package/src/infrastructure/ui/test/render.tsx +4 -1
  111. package/src/infrastructure/ui/views/App.tsx +23 -26
  112. package/src/infrastructure/ui/views/item/Item.tsx +2 -8
  113. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.tsx +5 -10
  114. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/__snapshots__/GetOutOfCheckoutModal.test.tsx.snap +6 -3
  115. package/src/infrastructure/ui/views/item/components/itemActions/ItemActions.tsx +2 -8
  116. package/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.tsx +3 -12
  117. package/src/infrastructure/ui/views/item/components/selectModal/SelectModal.tsx +6 -17
  118. package/src/infrastructure/ui/views/item/components/selectModal/__snapshots__/SelecModal.test.tsx.snap +5 -8
  119. package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.tsx +6 -5
  120. package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/__snapshots__/SizeWithoutStockModal.test.tsx.snap +6 -3
  121. package/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.tsx +2 -12
  122. package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.tsx +2 -12
  123. package/src/infrastructure/ui/views/return/Return.tsx +1 -8
  124. package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.ts +6 -2
  125. package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +30 -31
@@ -1,5 +1,5 @@
1
1
  import React, { FC, useCallback, useState } from "react";
2
- import { LayoutRectangle, Platform, ScrollView, StyleProp, ViewStyle } from "react-native";
2
+ import { LayoutRectangle, Platform, ScrollView } from "react-native";
3
3
  import { Spinner } from "@lookiero/aurora";
4
4
  import { CommandStatus } from "@lookiero/messaging-react";
5
5
  import { useLogger } from "@lookiero/sty-psp-logging";
@@ -25,10 +25,6 @@ import { style } from "./ItemWithoutCustomerDecission.style";
25
25
 
26
26
  const { space6 } = theme();
27
27
 
28
- interface ItemWithoutCustomerDecissionStyle {
29
- readonly modal: StyleProp<ViewStyle>;
30
- }
31
-
32
28
  interface CheckoutItemWithoutCustomerDecission extends CheckoutItemProjection {
33
29
  readonly status: CheckoutItemStatus.INITIAL;
34
30
  }
@@ -38,7 +34,6 @@ interface ItemWithoutCustomerDecissionProps {
38
34
  readonly checkoutItem: CheckoutItemWithoutCustomerDecission;
39
35
  readonly bookedProductsVariants: BookedProductsVariantsProjection;
40
36
  readonly currentProductVariant: ProductVariantProjection;
41
- readonly style?: Partial<ItemWithoutCustomerDecissionStyle>;
42
37
  readonly onReturn: () => void;
43
38
  }
44
39
 
@@ -47,7 +42,6 @@ const ItemWithoutCustomerDecission: FC<ItemWithoutCustomerDecissionProps> = ({
47
42
  checkoutItem,
48
43
  bookedProductsVariants,
49
44
  currentProductVariant,
50
- style: customStyle,
51
45
  onReturn,
52
46
  }) => {
53
47
  const logger = useLogger();
@@ -108,11 +102,7 @@ const ItemWithoutCustomerDecission: FC<ItemWithoutCustomerDecissionProps> = ({
108
102
 
109
103
  return (
110
104
  <>
111
- <SizeWithoutStockModal
112
- style={customStyle?.modal}
113
- visible={sizeWithoutStockModalVisible}
114
- onDismiss={handleOnHideSizeWithoutStockModal}
115
- />
105
+ <SizeWithoutStockModal visible={sizeWithoutStockModalVisible} onDismiss={handleOnHideSizeWithoutStockModal} />
116
106
 
117
107
  <ScrollView showsVerticalScrollIndicator={false}>
118
108
  <Body style={{ row: style.container }}>
@@ -1,5 +1,4 @@
1
1
  import React, { FC } from "react";
2
- import { StyleProp, ViewStyle } from "react-native";
3
2
  import { useParams } from "react-router-native";
4
3
  import { Spinner } from "@lookiero/aurora";
5
4
  import { QueryStatus } from "@lookiero/messaging-react";
@@ -10,16 +9,11 @@ import { ReturnQuestionFeedbackProvider } from "../../components/organisms/retur
10
9
  import { useStaticInfo } from "../../hooks/useStaticInfo";
11
10
  import { ReturnQuestionsForm } from "./components/returnQuestionsForm/ReturnQuestionsForm";
12
11
 
13
- interface ReturnStyle {
14
- readonly modal: StyleProp<ViewStyle>;
15
- }
16
-
17
12
  interface ReturnProps {
18
13
  readonly layout: UiLayout;
19
- readonly style?: Partial<ReturnStyle>;
20
14
  }
21
15
 
22
- const Return: FC<ReturnProps> = ({ layout, style: customStyle }) => {
16
+ const Return: FC<ReturnProps> = ({ layout }) => {
23
17
  const { id } = useParams();
24
18
  const {
25
19
  customer: { customerId, country, segment },
@@ -43,7 +37,6 @@ const Return: FC<ReturnProps> = ({ layout, style: customStyle }) => {
43
37
  country={country}
44
38
  layout={layout}
45
39
  segment={segment}
46
- style={customStyle}
47
40
  />
48
41
  </ReturnQuestionFeedbackProvider>
49
42
  );
@@ -5,6 +5,9 @@ import { HEADER_HEIGHT } from "../../../../components/templates/header/Header.st
5
5
  const { borderRadius5, colorBgPrimaryLight, colorBgBase, colorTextMedium, space4, space6, space8 } = theme();
6
6
 
7
7
  const style = StyleSheet.create({
8
+ background: {
9
+ backgroundColor: colorBgPrimaryLight,
10
+ },
8
11
  description: {
9
12
  color: colorTextMedium,
10
13
  },
@@ -33,7 +36,6 @@ const style = StyleSheet.create({
33
36
  justifyContent: "center",
34
37
  },
35
38
  safeAreaView: {
36
- backgroundColor: colorBgPrimaryLight,
37
39
  flex: 1,
38
40
  },
39
41
  scrollView: {
@@ -41,9 +43,11 @@ const style = StyleSheet.create({
41
43
  },
42
44
  submit: {
43
45
  backgroundColor: colorBgBase,
46
+ padding: space6,
47
+ },
48
+ submitDesktop: {
44
49
  borderBottomLeftRadius: borderRadius5,
45
50
  borderBottomRightRadius: borderRadius5,
46
- padding: space6,
47
51
  },
48
52
  });
49
53
 
@@ -1,6 +1,6 @@
1
1
  import { PortalHost } from "@gorhom/portal";
2
2
  import React, { FC, useCallback, useMemo } from "react";
3
- import { ScrollView, StyleProp, ViewStyle } from "react-native";
3
+ import { ScrollView } from "react-native";
4
4
  import { generatePath, useNavigate } from "react-router-native";
5
5
  import { Box, Button, Layout as AuroraLayout, Spinner, Text, View, useDevice } from "@lookiero/aurora";
6
6
  import { useI18nMessage } from "@lookiero/i18n-react";
@@ -48,17 +48,12 @@ const returnQuestionItems: ReturnQuestionItems = {
48
48
  [ReturnQuestionType.OPTION]: RadioReturnQuestionItem,
49
49
  };
50
50
 
51
- interface ReturnQuestionsFormStyle {
52
- readonly modal: StyleProp<ViewStyle>;
53
- }
54
-
55
51
  interface ReturnQuestionsFormProps {
56
52
  readonly checkout: CheckoutProjection;
57
53
  readonly checkoutItem: CheckoutItemProjection;
58
54
  readonly country: Country;
59
55
  readonly layout: UiLayout;
60
56
  readonly segment: Segment;
61
- readonly style?: Partial<ReturnQuestionsFormStyle>;
62
57
  }
63
58
 
64
59
  const ReturnQuestionsForm: FC<ReturnQuestionsFormProps> = ({
@@ -67,7 +62,6 @@ const ReturnQuestionsForm: FC<ReturnQuestionsFormProps> = ({
67
62
  country,
68
63
  layout: Layout,
69
64
  segment,
70
- style: customStyle,
71
65
  }) => {
72
66
  const navigate = useNavigate();
73
67
  const basePath = useBasePath();
@@ -148,6 +142,7 @@ const ReturnQuestionsForm: FC<ReturnQuestionsFormProps> = ({
148
142
  <PortalHost name={RETURN_QUESTION_FORM_PORTAL_HOST_NAME} />
149
143
 
150
144
  <Layout
145
+ footer={null}
151
146
  header={header}
152
147
  scrollEnabled={false}
153
148
  style={{
@@ -159,30 +154,34 @@ const ReturnQuestionsForm: FC<ReturnQuestionsFormProps> = ({
159
154
  <ProductVariantPreview country={country} item={checkoutItem} />
160
155
 
161
156
  <ScrollView showsVerticalScrollIndicator={false} testID="return-questions-form">
162
- <AuroraLayout fullWidth={!screen.L} style={[style.layout, screen.L ? style.desktopLayoutSpacing : undefined]}>
163
- <Box size={{ L: "2/3" }}>
164
- <View style={[style.info, !screen.S && style.desktopInfo]}>
165
- <Text level={3} heading>
166
- {titleText}
167
- </Text>
168
- <Text level={1} style={style.description} detail>
169
- {descriptionText}
170
- </Text>
171
- </View>
172
-
173
- <ReturnQuestions
174
- portalHostName={RETURN_QUESTION_FORM_PORTAL_HOST_NAME}
175
- returnQuestions={returnQuestions}
176
- style={customStyle}
177
- />
178
-
179
- <View style={style.submit}>
180
- <Button testID="return-questions-button" onPress={handleOnSubmit}>
181
- {submitButtonText}
182
- </Button>
183
- </View>
184
- </Box>
185
- </AuroraLayout>
157
+ <View style={style.background}>
158
+ <AuroraLayout
159
+ fullWidth={!screen.L}
160
+ style={[style.layout, screen.L ? style.desktopLayoutSpacing : undefined]}
161
+ >
162
+ <Box size={{ L: "2/3" }}>
163
+ <View style={[style.info, !screen.S && style.desktopInfo]}>
164
+ <Text level={3} heading>
165
+ {titleText}
166
+ </Text>
167
+ <Text level={1} style={style.description} detail>
168
+ {descriptionText}
169
+ </Text>
170
+ </View>
171
+
172
+ <ReturnQuestions
173
+ portalHostName={RETURN_QUESTION_FORM_PORTAL_HOST_NAME}
174
+ returnQuestions={returnQuestions}
175
+ />
176
+
177
+ <View style={[style.submit, !screen.S && style.submitDesktop]}>
178
+ <Button testID="return-questions-button" onPress={handleOnSubmit}>
179
+ {submitButtonText}
180
+ </Button>
181
+ </View>
182
+ </Box>
183
+ </AuroraLayout>
184
+ </View>
186
185
  </ScrollView>
187
186
  </Layout>
188
187
  </ReturnQuestionItemProvider>