@lookiero/checkout 12.3.0 → 12.4.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.
Files changed (99) hide show
  1. package/cypress/integration/checkout.spec.ts +14 -9
  2. package/cypress/support/interceptViewCheckoutFeedbackDefinitionByCheckoutId.ts +6 -0
  3. package/dist/src/ExpoRoot.js +2 -2
  4. package/dist/src/infrastructure/delivery/baseBootstrap.d.ts +2 -2
  5. package/dist/src/infrastructure/delivery/baseBootstrap.js +4 -4
  6. package/dist/src/infrastructure/delivery/bootstrap.js +2 -2
  7. package/dist/src/infrastructure/delivery/bootstrap.mock.js +3 -3
  8. package/dist/src/infrastructure/projection/checkoutFeedback/checkoutFeedbackDefinition.mock.d.ts +3 -0
  9. package/dist/src/infrastructure/projection/checkoutFeedback/checkoutFeedbackDefinition.mock.js +107 -0
  10. package/dist/src/infrastructure/projection/checkoutFeedback/httpCheckoutFeedbackDefinitionByCheckoutIdView.d.ts +12 -0
  11. package/dist/src/infrastructure/projection/checkoutFeedback/httpCheckoutFeedbackDefinitionByCheckoutIdView.js +10 -0
  12. package/dist/src/infrastructure/projection/checkoutFeedback/react/useViewCheckoutFeedbackDefinitionByCheckoutId.d.ts +10 -0
  13. package/dist/src/infrastructure/projection/checkoutFeedback/react/useViewCheckoutFeedbackDefinitionByCheckoutId.js +9 -0
  14. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/CheckoutQuestion.d.ts +2 -2
  15. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/CheckoutQuestion.js +4 -2
  16. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/CheckoutQuestions.d.ts +2 -2
  17. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/behaviors/useCheckoutQuestionItem.d.ts +5 -5
  18. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/behaviors/useCheckoutQuestionItem.js +1 -1
  19. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/CheckoutQuestionItem.d.ts +5 -4
  20. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.d.ts +2 -1
  21. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.js +2 -1
  22. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostDefaultCheckoutQuestionItem/HostDefaultCheckoutQuestionItem.d.ts +2 -1
  23. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostDefaultCheckoutQuestionItem/HostDefaultCheckoutQuestionItem.js +2 -1
  24. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem.d.ts +2 -1
  25. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem.js +2 -1
  26. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem.d.ts +2 -3
  27. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem.js +5 -7
  28. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.d.ts +2 -1
  29. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.js +2 -1
  30. package/dist/src/infrastructure/ui/views/feedback/Feedback.js +10 -9
  31. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.d.ts +2 -3
  32. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.js +17 -9
  33. package/dist/src/projection/checkoutFeedback/checkoutFeedback.constants.d.ts +11 -0
  34. package/dist/src/projection/checkoutFeedback/checkoutFeedback.constants.js +10 -0
  35. package/dist/src/projection/checkoutFeedback/checkoutFeedback.d.ts +22 -2
  36. package/dist/src/projection/checkoutFeedback/checkoutFeedback.metadata.d.ts +21 -0
  37. package/dist/src/projection/checkoutFeedback/checkoutFeedback.metadata.js +1 -0
  38. package/dist/src/projection/checkoutFeedback/checkoutFeedback.typeguards.d.ts +3 -0
  39. package/dist/src/projection/checkoutFeedback/checkoutFeedback.typeguards.js +7 -0
  40. package/dist/src/projection/checkoutFeedback/viewCheckoutFeedbackDefinitionByCheckoutId.d.ts +25 -0
  41. package/dist/src/projection/checkoutFeedback/viewCheckoutFeedbackDefinitionByCheckoutId.js +8 -0
  42. package/dist/src/version.d.ts +1 -1
  43. package/dist/src/version.js +1 -1
  44. package/package.json +1 -1
  45. package/src/ExpoRoot.tsx +2 -2
  46. package/src/infrastructure/delivery/baseBootstrap.ts +9 -9
  47. package/src/infrastructure/delivery/bootstrap.mock.ts +5 -4
  48. package/src/infrastructure/delivery/bootstrap.ts +2 -2
  49. package/src/infrastructure/projection/checkoutFeedback/checkoutFeedbackDefinition.mock.ts +110 -0
  50. package/src/infrastructure/projection/checkoutFeedback/httpCheckoutFeedbackDefinitionByCheckoutIdView.test.ts +52 -0
  51. package/src/infrastructure/projection/checkoutFeedback/httpCheckoutFeedbackDefinitionByCheckoutIdView.ts +30 -0
  52. package/src/infrastructure/projection/checkoutFeedback/react/useViewCheckoutFeedbackDefinitionByCheckoutId.test.ts +58 -0
  53. package/src/infrastructure/projection/checkoutFeedback/react/useViewCheckoutFeedbackDefinitionByCheckoutId.ts +25 -0
  54. package/src/infrastructure/ui/components/organisms/checkoutQuestions/CheckoutQuestion.test.tsx +25 -30
  55. package/src/infrastructure/ui/components/organisms/checkoutQuestions/CheckoutQuestion.tsx +12 -13
  56. package/src/infrastructure/ui/components/organisms/checkoutQuestions/CheckoutQuestions.test.tsx +19 -26
  57. package/src/infrastructure/ui/components/organisms/checkoutQuestions/CheckoutQuestions.tsx +3 -3
  58. package/src/infrastructure/ui/components/organisms/checkoutQuestions/behaviors/useCheckoutQuestionItem.test.tsx +26 -26
  59. package/src/infrastructure/ui/components/organisms/checkoutQuestions/behaviors/useCheckoutQuestionItem.tsx +6 -6
  60. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/CheckoutQuestionItem.ts +5 -4
  61. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.test.tsx +7 -11
  62. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.tsx +6 -4
  63. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostDefaultCheckoutQuestionItem/HostDefaultCheckoutQuestionItem.tsx +6 -4
  64. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostDefaultCheckoutQuestionItem/HostDefaultReturnQuestionItem.test.tsx +16 -10
  65. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem.test.tsx +16 -22
  66. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem.tsx +6 -4
  67. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem.test.tsx +16 -14
  68. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem.tsx +13 -14
  69. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.test.tsx +9 -19
  70. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.tsx +7 -5
  71. package/src/infrastructure/ui/views/feedback/Feedback.test.tsx +11 -5
  72. package/src/infrastructure/ui/views/feedback/Feedback.tsx +10 -9
  73. package/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.test.tsx +2 -2
  74. package/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.tsx +20 -13
  75. package/src/projection/checkoutFeedback/checkoutFeedback.constants.ts +16 -0
  76. package/src/projection/checkoutFeedback/checkoutFeedback.metadata.ts +28 -0
  77. package/src/projection/checkoutFeedback/checkoutFeedback.ts +38 -2
  78. package/src/projection/checkoutFeedback/checkoutFeedback.typeguards.ts +13 -0
  79. package/src/projection/checkoutFeedback/viewCheckoutFeedbackDefinitionByCheckoutId.test.ts +52 -0
  80. package/src/projection/checkoutFeedback/viewCheckoutFeedbackDefinitionByCheckoutId.ts +61 -0
  81. package/cypress/support/interceptListCheckoutQuestionsByCheckoutId.ts +0 -9
  82. package/dist/src/infrastructure/projection/checkoutQuestion/checkoutQuestions.mock.d.ts +0 -3
  83. package/dist/src/infrastructure/projection/checkoutQuestion/checkoutQuestions.mock.js +0 -103
  84. package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.d.ts +0 -12
  85. package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.js +0 -10
  86. package/dist/src/infrastructure/projection/checkoutQuestion/react/useListCheckoutQuestionsByCheckoutId.d.ts +0 -10
  87. package/dist/src/infrastructure/projection/checkoutQuestion/react/useListCheckoutQuestionsByCheckoutId.js +0 -9
  88. package/dist/src/projection/checkoutQuestion/checkoutQuestion.d.ts +0 -18
  89. package/dist/src/projection/checkoutQuestion/checkoutQuestion.js +0 -10
  90. package/dist/src/projection/checkoutQuestion/listCheckoutQuestionsByCheckoutId.d.ts +0 -25
  91. package/dist/src/projection/checkoutQuestion/listCheckoutQuestionsByCheckoutId.js +0 -8
  92. package/src/infrastructure/projection/checkoutQuestion/checkoutQuestions.mock.ts +0 -108
  93. package/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.test.ts +0 -55
  94. package/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.ts +0 -34
  95. package/src/infrastructure/projection/checkoutQuestion/react/useListCheckoutQuestionsByCheckoutId.test.ts +0 -38
  96. package/src/infrastructure/projection/checkoutQuestion/react/useListCheckoutQuestionsByCheckoutId.ts +0 -21
  97. package/src/projection/checkoutQuestion/checkoutQuestion.ts +0 -20
  98. package/src/projection/checkoutQuestion/listCheckoutQuestionsByCheckoutId.test.ts +0 -31
  99. package/src/projection/checkoutQuestion/listCheckoutQuestionsByCheckoutId.ts +0 -61
@@ -1,61 +0,0 @@
1
- import {
2
- CancelableQueryViewArgs,
3
- query,
4
- Query,
5
- QueryHandlerFunction,
6
- QueryHandlerFunctionArgs,
7
- } from "@lookiero/messaging";
8
- import { CheckoutQuestionProjection } from "./checkoutQuestion";
9
-
10
- const LIST_CHECKOUT_QUESTIONS_BY_CHECKOUT_ID = "list_checkout_questions_by_checkout_id";
11
-
12
- interface ListCheckoutQuestionsByCheckoutIdPayload {
13
- readonly checkoutId: string;
14
- }
15
-
16
- interface ListCheckoutQuestionsByCheckoutId
17
- extends Query<typeof LIST_CHECKOUT_QUESTIONS_BY_CHECKOUT_ID>,
18
- ListCheckoutQuestionsByCheckoutIdPayload {}
19
-
20
- interface ListCheckoutQuestionsByCheckoutIdFunction {
21
- (payload: ListCheckoutQuestionsByCheckoutIdPayload): ListCheckoutQuestionsByCheckoutId;
22
- }
23
-
24
- const listCheckoutQuestionsByCheckoutId: ListCheckoutQuestionsByCheckoutIdFunction = (payload) => ({
25
- ...query({ name: LIST_CHECKOUT_QUESTIONS_BY_CHECKOUT_ID }),
26
- ...payload,
27
- });
28
-
29
- type ListCheckoutQuestionsByCheckoutIdResult = CheckoutQuestionProjection[] | null;
30
-
31
- interface CheckoutQuestionsByCheckoutIdViewArgs extends CancelableQueryViewArgs {
32
- readonly checkoutId: string;
33
- }
34
-
35
- interface CheckoutQuestionsByCheckoutIdView {
36
- (args: CheckoutQuestionsByCheckoutIdViewArgs): Promise<ListCheckoutQuestionsByCheckoutIdResult>;
37
- }
38
-
39
- interface ListCheckoutQuestionsByCheckoutIdHandlerFunctionArgs extends QueryHandlerFunctionArgs {
40
- readonly view: CheckoutQuestionsByCheckoutIdView;
41
- }
42
-
43
- const listCheckoutQuestionsByCheckoutIdHandler: QueryHandlerFunction<
44
- ListCheckoutQuestionsByCheckoutId,
45
- ListCheckoutQuestionsByCheckoutIdResult,
46
- ListCheckoutQuestionsByCheckoutIdHandlerFunctionArgs
47
- > =
48
- ({ view, signal }) =>
49
- async ({ checkoutId }) =>
50
- view({ checkoutId, signal });
51
-
52
- export type {
53
- ListCheckoutQuestionsByCheckoutId,
54
- CheckoutQuestionsByCheckoutIdView,
55
- ListCheckoutQuestionsByCheckoutIdResult,
56
- };
57
- export {
58
- LIST_CHECKOUT_QUESTIONS_BY_CHECKOUT_ID,
59
- listCheckoutQuestionsByCheckoutId,
60
- listCheckoutQuestionsByCheckoutIdHandler,
61
- };