@lookiero/checkout 0.1.1 → 0.2.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 (165) hide show
  1. package/dist/domain/checkoutBooking/command/bookSizeReplaceableProductVariantsForCheckoutItem.d.ts +4 -4
  2. package/dist/domain/checkoutBooking/command/bookSizeReplaceableProductVariantsForCheckoutItem.js +3 -2
  3. package/dist/domain/checkoutBooking/model/checkoutBooking.d.ts +3 -2
  4. package/dist/domain/checkoutBooking/model/checkoutBooking.js +2 -1
  5. package/dist/domain/checkoutBooking/model/checkoutBookingBooked.d.ts +4 -4
  6. package/dist/domain/checkoutBooking/model/checkoutBookingBooked.js +3 -2
  7. package/dist/domain/checkoutBooking/model/checkoutBookings.d.ts +3 -2
  8. package/dist/domain/uiSetting/command/updateUiSetting.d.ts +4 -4
  9. package/dist/domain/uiSetting/command/updateUiSetting.js +3 -2
  10. package/dist/domain/uiSetting/model/uiSetting.d.ts +3 -2
  11. package/dist/domain/uiSetting/model/uiSetting.js +2 -1
  12. package/dist/domain/uiSetting/model/uiSettingUpdated.d.ts +4 -4
  13. package/dist/domain/uiSetting/model/uiSettingUpdated.js +3 -2
  14. package/dist/domain/uiSetting/model/uiSettings.d.ts +3 -2
  15. package/dist/infrastructure/delivery/_mock/bootstrap.mock.js +2 -1
  16. package/dist/infrastructure/delivery/bootstrap.d.ts +2 -1
  17. package/dist/infrastructure/delivery/bootstrap.js +3 -2
  18. package/dist/infrastructure/domain/checkoutBooking/model/httpCheckoutBookings.d.ts +2 -2
  19. package/dist/infrastructure/domain/checkoutBooking/model/httpCheckoutBookings.js +2 -1
  20. package/dist/infrastructure/domain/react/useBookSizeReplaceableProductVariantsForCheckoutItem.d.ts +2 -2
  21. package/dist/infrastructure/domain/react/useBookSizeReplaceableProductVariantsForCheckoutItem.js +2 -1
  22. package/dist/infrastructure/domain/react/useSetCheckoutIntroShown.d.ts +13 -0
  23. package/dist/infrastructure/domain/react/useSetCheckoutIntroShown.js +9 -0
  24. package/dist/infrastructure/domain/react/useUpdateUiSetting.d.ts +2 -2
  25. package/dist/infrastructure/domain/react/useUpdateUiSetting.js +2 -1
  26. package/dist/infrastructure/domain/uiSetting/model/storageUiSettings.d.ts +3 -3
  27. package/dist/infrastructure/domain/uiSetting/model/storageUiSettings.js +3 -2
  28. package/dist/infrastructure/persistence/asyncStorageStorage.d.ts +3 -2
  29. package/dist/infrastructure/persistence/asyncStorageStorage.js +3 -2
  30. package/dist/infrastructure/persistence/storage.d.ts +3 -2
  31. package/dist/infrastructure/persistence/uiSettingData.d.ts +2 -1
  32. package/dist/infrastructure/projection/react/useViewBookedSizeReplaceableProductVariantsForCheckoutItem.js +2 -1
  33. package/dist/infrastructure/projection/react/useViewCheckoutIntroShown.d.ts +2 -0
  34. package/dist/infrastructure/projection/react/useViewCheckoutIntroShown.js +6 -0
  35. package/dist/infrastructure/projection/react/useViewFirstAvailableCheckoutByCustomerId.js +2 -1
  36. package/dist/infrastructure/projection/react/useViewIsCheckoutAccessibleByCustomerId.js +2 -1
  37. package/dist/infrastructure/projection/react/useViewUiSettingByKey.d.ts +3 -3
  38. package/dist/infrastructure/projection/react/useViewUiSettingByKey.js +9 -5
  39. package/dist/infrastructure/projection/storageUiSettingByKeyView.d.ts +2 -2
  40. package/dist/infrastructure/projection/storageUiSettingByKeyView.js +2 -1
  41. package/dist/infrastructure/ui/Root.js +8 -10
  42. package/dist/infrastructure/ui/components/atoms/spinner/Spinner.js +9 -0
  43. package/dist/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.js +4 -4
  44. package/dist/infrastructure/ui/routing/CheckoutMiddleware.js +13 -10
  45. package/dist/infrastructure/ui/routing/Routing.js +11 -14
  46. package/dist/infrastructure/ui/settings/UISettings.d.ts +4 -0
  47. package/dist/infrastructure/ui/settings/UISettings.js +5 -0
  48. package/dist/infrastructure/ui/views/intro/Intro.js +5 -7
  49. package/dist/infrastructure/ui/views/item/Item.js +6 -8
  50. package/dist/infrastructure/ui/views/summary/Summary.js +5 -7
  51. package/dist/projection/uiSetting/viewUiSettingByKey.d.ts +6 -6
  52. package/dist/projection/uiSetting/viewUiSettingByKey.js +4 -3
  53. package/package.json +6 -3
  54. package/.eslintignore +0 -7
  55. package/.eslintrc +0 -72
  56. package/.expo-shared/assets.json +0 -4
  57. package/.github/CODEOWNERS +0 -1
  58. package/.github/actions/version/action.yaml +0 -32
  59. package/.github/dependabot.yaml +0 -10
  60. package/.github/workflows/build.yaml +0 -71
  61. package/.github/workflows/publish.yaml +0 -52
  62. package/.husky/pre-commit +0 -4
  63. package/.husky/prepare-commit-msg +0 -26
  64. package/.husky/prepush +0 -12
  65. package/.lintstagedrc.json +0 -4
  66. package/.nvmrc +0 -1
  67. package/.prettierignore +0 -2
  68. package/.prettierrc.json +0 -6
  69. package/@types/aurora-next.d.ts +0 -1
  70. package/app.config.js +0 -4
  71. package/app.json +0 -31
  72. package/assets/adaptive-icon.png +0 -0
  73. package/assets/favicon.png +0 -0
  74. package/assets/icon.png +0 -0
  75. package/assets/splash.png +0 -0
  76. package/babel.config.js +0 -6
  77. package/dist/infrastructure/projection/react/useViewIsCheckoutIntroVisible.d.ts +0 -3
  78. package/dist/infrastructure/projection/react/useViewIsCheckoutIntroVisible.js +0 -3
  79. package/dist/infrastructure/ui/components/atoms/spiner/Spinner.js +0 -11
  80. package/dist/infrastructure/ui/test/render.d.ts +0 -19
  81. package/dist/infrastructure/ui/test/render.js +0 -14
  82. package/jest.config.js +0 -9
  83. package/jest.setup.js +0 -3
  84. package/src/Expo.tsx +0 -59
  85. package/src/domain/checkoutBooking/command/bookSizeReplaceableProductVariantsForCheckoutItem.test.ts +0 -26
  86. package/src/domain/checkoutBooking/command/bookSizeReplaceableProductVariantsForCheckoutItem.ts +0 -27
  87. package/src/domain/checkoutBooking/model/checkoutBooking.test.ts +0 -30
  88. package/src/domain/checkoutBooking/model/checkoutBooking.ts +0 -31
  89. package/src/domain/checkoutBooking/model/checkoutBookingBooked.test.ts +0 -23
  90. package/src/domain/checkoutBooking/model/checkoutBookingBooked.ts +0 -23
  91. package/src/domain/checkoutBooking/model/checkoutBookings.ts +0 -6
  92. package/src/domain/uiSetting/command/updateUiSetting.test.ts +0 -19
  93. package/src/domain/uiSetting/command/updateUiSetting.ts +0 -23
  94. package/src/domain/uiSetting/model/uiSetting.test.ts +0 -26
  95. package/src/domain/uiSetting/model/uiSetting.ts +0 -22
  96. package/src/domain/uiSetting/model/uiSettingUpdated.test.ts +0 -17
  97. package/src/domain/uiSetting/model/uiSettingUpdated.ts +0 -19
  98. package/src/domain/uiSetting/model/uiSettings.ts +0 -6
  99. package/src/index.ts +0 -44
  100. package/src/infrastructure/delivery/_mock/bootstrap.mock.ts +0 -38
  101. package/src/infrastructure/delivery/_mock/checkout.mock.ts +0 -81
  102. package/src/infrastructure/delivery/bootstrap.ts +0 -42
  103. package/src/infrastructure/delivery/http/fetchHttpClient.test.ts +0 -51
  104. package/src/infrastructure/delivery/http/fetchHttpClient.ts +0 -41
  105. package/src/infrastructure/delivery/http/httpClient.ts +0 -18
  106. package/src/infrastructure/domain/checkoutBooking/model/httpCheckoutBookings.test.ts +0 -45
  107. package/src/infrastructure/domain/checkoutBooking/model/httpCheckoutBookings.ts +0 -32
  108. package/src/infrastructure/domain/react/useBookSizeReplaceableProductVariantsForCheckoutItem.test.ts +0 -38
  109. package/src/infrastructure/domain/react/useBookSizeReplaceableProductVariantsForCheckoutItem.ts +0 -44
  110. package/src/infrastructure/domain/react/useUpdateUiSetting.test.ts +0 -31
  111. package/src/infrastructure/domain/react/useUpdateUiSetting.ts +0 -43
  112. package/src/infrastructure/domain/uiSetting/model/storageUiSettings.test.ts +0 -50
  113. package/src/infrastructure/domain/uiSetting/model/storageUiSettings.ts +0 -50
  114. package/src/infrastructure/persistence/asyncStorageStorage.ts +0 -12
  115. package/src/infrastructure/persistence/storage.ts +0 -7
  116. package/src/infrastructure/persistence/uiSettingData.ts +0 -5
  117. package/src/infrastructure/projection/httpBookedSizeReplaceableProductVariantsForCheckoutItemView.test.ts +0 -65
  118. package/src/infrastructure/projection/httpBookedSizeReplaceableProductVariantsForCheckoutItemView.ts +0 -102
  119. package/src/infrastructure/projection/httpFirstAvailableCheckoutByCustomerIdView.test.ts +0 -99
  120. package/src/infrastructure/projection/httpFirstAvailableCheckoutByCustomerIdView.ts +0 -128
  121. package/src/infrastructure/projection/httpIsCheckoutEnabledByCustomerIdView.test.ts +0 -32
  122. package/src/infrastructure/projection/httpIsCheckoutEnabledByCustomerIdView.ts +0 -27
  123. package/src/infrastructure/projection/react/useViewBookedSizeReplaceableProductVariantsForCheckoutItem.test.ts +0 -51
  124. package/src/infrastructure/projection/react/useViewBookedSizeReplaceableProductVariantsForCheckoutItem.ts +0 -25
  125. package/src/infrastructure/projection/react/useViewFirstAvailableCheckoutByCustomerId.test.ts +0 -28
  126. package/src/infrastructure/projection/react/useViewFirstAvailableCheckoutByCustomerId.ts +0 -22
  127. package/src/infrastructure/projection/react/useViewIsCheckoutAccessibleByCustomerId.test.ts +0 -44
  128. package/src/infrastructure/projection/react/useViewIsCheckoutAccessibleByCustomerId.ts +0 -24
  129. package/src/infrastructure/projection/react/useViewIsCheckoutIntroVisible.ts +0 -5
  130. package/src/infrastructure/projection/react/useViewUiSettingByKey.test.ts +0 -30
  131. package/src/infrastructure/projection/react/useViewUiSettingByKey.ts +0 -18
  132. package/src/infrastructure/projection/storageUiSettingByKeyView.test.ts +0 -32
  133. package/src/infrastructure/projection/storageUiSettingByKeyView.ts +0 -35
  134. package/src/infrastructure/ui/Root.tsx +0 -53
  135. package/src/infrastructure/ui/components/atoms/spiner/Spinner.style.ts +0 -12
  136. package/src/infrastructure/ui/components/atoms/spiner/Spinner.tsx +0 -35
  137. package/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.test.tsx +0 -70
  138. package/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.tsx +0 -31
  139. package/src/infrastructure/ui/routing/CheckoutMiddleware.test.tsx +0 -100
  140. package/src/infrastructure/ui/routing/CheckoutMiddleware.tsx +0 -52
  141. package/src/infrastructure/ui/routing/Routing.tsx +0 -64
  142. package/src/infrastructure/ui/routing/router/Router.native.ts +0 -1
  143. package/src/infrastructure/ui/routing/router/Router.ts +0 -1
  144. package/src/infrastructure/ui/routing/routes.ts +0 -6
  145. package/src/infrastructure/ui/test/render.tsx +0 -47
  146. package/src/infrastructure/ui/views/intro/Intro.test.tsx +0 -15
  147. package/src/infrastructure/ui/views/intro/Intro.tsx +0 -27
  148. package/src/infrastructure/ui/views/item/Item.tsx +0 -31
  149. package/src/infrastructure/ui/views/summary/Summary.tsx +0 -27
  150. package/src/projection/bookedSizeReplaceableProductVariants/viewBookedSizeReplaceableProductVariantsForCheckoutItem.test.ts +0 -40
  151. package/src/projection/bookedSizeReplaceableProductVariants/viewBookedSizeReplaceableProductVariantsForCheckoutItem.ts +0 -85
  152. package/src/projection/checkout/viewFirstAvailableCheckoutByCustomerId.test.ts +0 -22
  153. package/src/projection/checkout/viewFirstAvailableCheckoutByCustomerId.ts +0 -149
  154. package/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.test.ts +0 -54
  155. package/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.ts +0 -46
  156. package/src/projection/checkout/viewIsCheckoutEnabledByCustomerId.test.ts +0 -20
  157. package/src/projection/checkout/viewIsCheckoutEnabledByCustomerId.ts +0 -51
  158. package/src/projection/uiSetting/viewUiSettingByKey.test.ts +0 -22
  159. package/src/projection/uiSetting/viewUiSettingByKey.ts +0 -47
  160. package/tsconfig.build.json +0 -16
  161. package/tsconfig.json +0 -19
  162. package/webpack.config.js +0 -17
  163. /package/dist/infrastructure/ui/components/atoms/{spiner → spinner}/Spinner.d.ts +0 -0
  164. /package/dist/infrastructure/ui/components/atoms/{spiner → spinner}/Spinner.style.d.ts +0 -0
  165. /package/dist/infrastructure/ui/components/atoms/{spiner → spinner}/Spinner.style.js +0 -0
@@ -1,15 +1,15 @@
1
1
  import { Command } from "@lookiero/messaging";
2
- export declare const BOOK_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM = "book_size_replaceable_product_variants_for_checkout_item";
2
+ declare const BOOK_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM = "book_size_replaceable_product_variants_for_checkout_item";
3
3
  interface BookSizeReplaceableProductVariantsForCheckoutItemPayload {
4
4
  readonly aggregateId: string;
5
5
  readonly checkoutId: string;
6
6
  readonly checkoutItemId: string;
7
7
  readonly checkoutBookingId: string;
8
8
  }
9
- export interface BookSizeReplaceableProductVariantsForCheckoutItem extends Command<typeof BOOK_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM>, BookSizeReplaceableProductVariantsForCheckoutItemPayload {
9
+ interface BookSizeReplaceableProductVariantsForCheckoutItem extends Command<typeof BOOK_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM>, BookSizeReplaceableProductVariantsForCheckoutItemPayload {
10
10
  }
11
11
  interface BookSizeReplaceableProductVariantsForCheckoutItemFunction {
12
12
  (payload: BookSizeReplaceableProductVariantsForCheckoutItemPayload): BookSizeReplaceableProductVariantsForCheckoutItem;
13
13
  }
14
- export declare const bookSizeReplaceableProductVariantsForCheckoutItem: BookSizeReplaceableProductVariantsForCheckoutItemFunction;
15
- export {};
14
+ declare const bookSizeReplaceableProductVariantsForCheckoutItem: BookSizeReplaceableProductVariantsForCheckoutItemFunction;
15
+ export { BOOK_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM, BookSizeReplaceableProductVariantsForCheckoutItem, bookSizeReplaceableProductVariantsForCheckoutItem, };
@@ -1,6 +1,7 @@
1
1
  import { command } from "@lookiero/messaging";
2
- export const BOOK_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM = "book_size_replaceable_product_variants_for_checkout_item";
3
- export const bookSizeReplaceableProductVariantsForCheckoutItem = ({ aggregateId, ...payload }) => ({
2
+ const BOOK_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM = "book_size_replaceable_product_variants_for_checkout_item";
3
+ const bookSizeReplaceableProductVariantsForCheckoutItem = ({ aggregateId, ...payload }) => ({
4
4
  ...command({ aggregateId, name: BOOK_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM }),
5
5
  ...payload,
6
6
  });
7
+ export { BOOK_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM, bookSizeReplaceableProductVariantsForCheckoutItem, };
@@ -1,8 +1,9 @@
1
1
  import { AggregateRoot, CommandHandlerFunction } from "@lookiero/messaging";
2
2
  import { BookSizeReplaceableProductVariantsForCheckoutItem } from "../command/bookSizeReplaceableProductVariantsForCheckoutItem";
3
- export interface CheckoutBooking extends AggregateRoot {
3
+ interface CheckoutBooking extends AggregateRoot {
4
4
  readonly checkoutId: string;
5
5
  readonly checkoutItemId: string;
6
6
  readonly checkoutBookingId: string;
7
7
  }
8
- export declare const bookSizeReplaceableProductVariantsForCheckoutItemHandler: CommandHandlerFunction<BookSizeReplaceableProductVariantsForCheckoutItem, CheckoutBooking>;
8
+ declare const bookSizeReplaceableProductVariantsForCheckoutItemHandler: CommandHandlerFunction<BookSizeReplaceableProductVariantsForCheckoutItem, CheckoutBooking>;
9
+ export { CheckoutBooking, bookSizeReplaceableProductVariantsForCheckoutItemHandler };
@@ -1,5 +1,5 @@
1
1
  import { checkoutBookingBooked } from "./checkoutBookingBooked";
2
- export const bookSizeReplaceableProductVariantsForCheckoutItemHandler = () => async ({ aggregateRoot, command }) => {
2
+ const bookSizeReplaceableProductVariantsForCheckoutItemHandler = () => async ({ aggregateRoot, command }) => {
3
3
  const { aggregateId, checkoutId, checkoutItemId, checkoutBookingId } = command;
4
4
  return {
5
5
  ...aggregateRoot,
@@ -14,3 +14,4 @@ export const bookSizeReplaceableProductVariantsForCheckoutItemHandler = () => as
14
14
  }),
15
15
  };
16
16
  };
17
+ export { bookSizeReplaceableProductVariantsForCheckoutItemHandler };
@@ -1,15 +1,15 @@
1
1
  import { DomainEvent } from "@lookiero/messaging";
2
- export declare const CHECKOUT_BOOKING_BOOKED = "checkout_booking_booked";
2
+ declare const CHECKOUT_BOOKING_BOOKED = "checkout_booking_booked";
3
3
  interface CheckoutBookingBookedPayload {
4
4
  readonly aggregateId: string;
5
5
  readonly checkoutId: string;
6
6
  readonly checkoutItemId: string;
7
7
  readonly checkoutBookingId: string;
8
8
  }
9
- export interface CheckoutBookingBooked extends DomainEvent<typeof CHECKOUT_BOOKING_BOOKED>, CheckoutBookingBookedPayload {
9
+ interface CheckoutBookingBooked extends DomainEvent<typeof CHECKOUT_BOOKING_BOOKED>, CheckoutBookingBookedPayload {
10
10
  }
11
11
  interface CheckoutBookingBookedFunction {
12
12
  (payload: CheckoutBookingBookedPayload): CheckoutBookingBooked;
13
13
  }
14
- export declare const checkoutBookingBooked: CheckoutBookingBookedFunction;
15
- export {};
14
+ declare const checkoutBookingBooked: CheckoutBookingBookedFunction;
15
+ export { CHECKOUT_BOOKING_BOOKED, CheckoutBookingBooked, checkoutBookingBooked };
@@ -1,6 +1,7 @@
1
1
  import { domainEvent } from "@lookiero/messaging";
2
- export const CHECKOUT_BOOKING_BOOKED = "checkout_booking_booked";
3
- export const checkoutBookingBooked = ({ aggregateId, ...payload }) => ({
2
+ const CHECKOUT_BOOKING_BOOKED = "checkout_booking_booked";
3
+ const checkoutBookingBooked = ({ aggregateId, ...payload }) => ({
4
4
  ...domainEvent({ aggregateId, name: CHECKOUT_BOOKING_BOOKED }),
5
5
  ...payload,
6
6
  });
7
+ export { CHECKOUT_BOOKING_BOOKED, checkoutBookingBooked };
@@ -1,6 +1,7 @@
1
1
  import { RepositoryGetFunction, RepositorySaveFunction } from "@lookiero/messaging";
2
2
  import { CheckoutBooking } from "./checkoutBooking";
3
- export interface CheckoutBookingsGetFunction extends RepositoryGetFunction<CheckoutBooking> {
3
+ interface CheckoutBookingsGetFunction extends RepositoryGetFunction<CheckoutBooking> {
4
4
  }
5
- export interface CheckoutBookingsSaveFunction extends RepositorySaveFunction<CheckoutBooking> {
5
+ interface CheckoutBookingsSaveFunction extends RepositorySaveFunction<CheckoutBooking> {
6
6
  }
7
+ export { CheckoutBookingsGetFunction, CheckoutBookingsSaveFunction };
@@ -1,14 +1,14 @@
1
1
  import { Command } from "@lookiero/messaging";
2
- export declare const UPDATE_UI_SETTING = "update_ui_setting";
2
+ declare const UPDATE_UI_SETTING = "update_ui_setting";
3
3
  interface UpdateUiSettingPayload {
4
4
  readonly aggregateId: string;
5
5
  readonly key: string;
6
6
  readonly value: unknown;
7
7
  }
8
- export interface UpdateUiSetting extends Command<typeof UPDATE_UI_SETTING>, UpdateUiSettingPayload {
8
+ interface UpdateUiSetting extends Command<typeof UPDATE_UI_SETTING>, UpdateUiSettingPayload {
9
9
  }
10
10
  interface UpdateUiSettingFunction {
11
11
  (payload: UpdateUiSettingPayload): UpdateUiSetting;
12
12
  }
13
- export declare const updateUiSetting: UpdateUiSettingFunction;
14
- export {};
13
+ declare const updateUiSetting: UpdateUiSettingFunction;
14
+ export { UPDATE_UI_SETTING, UpdateUiSetting, updateUiSetting };
@@ -1,9 +1,10 @@
1
1
  import { command } from "@lookiero/messaging";
2
- export const UPDATE_UI_SETTING = "update_ui_setting";
3
- export const updateUiSetting = ({ aggregateId, ...payload }) => ({
2
+ const UPDATE_UI_SETTING = "update_ui_setting";
3
+ const updateUiSetting = ({ aggregateId, ...payload }) => ({
4
4
  ...command({
5
5
  aggregateId,
6
6
  name: UPDATE_UI_SETTING,
7
7
  }),
8
8
  ...payload,
9
9
  });
10
+ export { UPDATE_UI_SETTING, updateUiSetting };
@@ -1,8 +1,9 @@
1
1
  import { AggregateRoot } from "@lookiero/messaging";
2
2
  import { CommandHandlerFunction } from "@lookiero/messaging/domain/model";
3
3
  import { UpdateUiSetting } from "../command/updateUiSetting";
4
- export interface UiSetting extends AggregateRoot {
4
+ interface UiSetting extends AggregateRoot {
5
5
  readonly key: string;
6
6
  readonly value: unknown;
7
7
  }
8
- export declare const updateUiSettingHandler: CommandHandlerFunction<UpdateUiSetting, UiSetting>;
8
+ declare const updateUiSettingHandler: CommandHandlerFunction<UpdateUiSetting, UiSetting>;
9
+ export { UiSetting, updateUiSettingHandler };
@@ -1,5 +1,5 @@
1
1
  import { uiSettingUpdated } from "./uiSettingUpdated";
2
- export const updateUiSettingHandler = () => async ({ aggregateRoot, command }) => {
2
+ const updateUiSettingHandler = () => async ({ aggregateRoot, command }) => {
3
3
  const { aggregateId, key, value } = command;
4
4
  return {
5
5
  ...aggregateRoot,
@@ -8,3 +8,4 @@ export const updateUiSettingHandler = () => async ({ aggregateRoot, command }) =
8
8
  domainEvents: uiSettingUpdated({ aggregateId, key }),
9
9
  };
10
10
  };
11
+ export { updateUiSettingHandler };
@@ -1,13 +1,13 @@
1
1
  import { DomainEvent } from "@lookiero/messaging";
2
- export declare const UI_SETTING_UPDATED = "ui_setting_updated";
2
+ declare const UI_SETTING_UPDATED = "ui_setting_updated";
3
3
  interface UiSettingUpdatedPayload {
4
4
  readonly aggregateId: string;
5
5
  readonly key: string;
6
6
  }
7
- export interface UiSettingUpdated extends DomainEvent<typeof UI_SETTING_UPDATED>, UiSettingUpdatedPayload {
7
+ interface UiSettingUpdated extends DomainEvent<typeof UI_SETTING_UPDATED>, UiSettingUpdatedPayload {
8
8
  }
9
9
  interface UiSettingUpdatedFunction {
10
10
  (payload: UiSettingUpdatedPayload): UiSettingUpdated;
11
11
  }
12
- export declare const uiSettingUpdated: UiSettingUpdatedFunction;
13
- export {};
12
+ declare const uiSettingUpdated: UiSettingUpdatedFunction;
13
+ export { UI_SETTING_UPDATED, UiSettingUpdated, uiSettingUpdated };
@@ -1,6 +1,7 @@
1
1
  import { domainEvent } from "@lookiero/messaging";
2
- export const UI_SETTING_UPDATED = "ui_setting_updated";
3
- export const uiSettingUpdated = ({ aggregateId, key }) => ({
2
+ const UI_SETTING_UPDATED = "ui_setting_updated";
3
+ const uiSettingUpdated = ({ aggregateId, key }) => ({
4
4
  ...domainEvent({ aggregateId, name: UI_SETTING_UPDATED }),
5
5
  key,
6
6
  });
7
+ export { UI_SETTING_UPDATED, uiSettingUpdated };
@@ -1,6 +1,7 @@
1
1
  import { RepositoryGetFunction, RepositorySaveFunction } from "@lookiero/messaging";
2
2
  import { UiSetting } from "./uiSetting";
3
- export interface UiSettingGetFunction extends RepositoryGetFunction<UiSetting> {
3
+ interface UiSettingGetFunction extends RepositoryGetFunction<UiSetting> {
4
4
  }
5
- export interface UiSettingSaveFunction extends RepositorySaveFunction<UiSetting> {
5
+ interface UiSettingSaveFunction extends RepositorySaveFunction<UiSetting> {
6
6
  }
7
+ export { UiSettingGetFunction, UiSettingSaveFunction };
@@ -2,10 +2,11 @@ import { bootstrap as messagingBootstrap } from "@lookiero/messaging-react";
2
2
  import { CheckoutItemStatus, viewFirstAvailableCheckoutByCustomerIdHandler, VIEW_FIRST_AVAILABLE_CHECKOUT_BY_CUSTOMER_ID, } from "../../../projection/checkout/viewFirstAvailableCheckoutByCustomerId";
3
3
  import { viewIsCheckoutAccessibleByCustomerIdHandler, VIEW_IS_CHECKOUT_ACCESSIBLE_BY_CUSTOMER_ID, } from "../../../projection/checkout/viewIsCheckoutAccessibleByCustomerId";
4
4
  import { viewIsCheckoutEnabledByCustomerIdHandler, VIEW_IS_CHECKOUT_ENABLED_BY_CUSTOMER_ID, } from "../../../projection/checkout/viewIsCheckoutEnabledByCustomerId";
5
+ import { CHECKOUT_MESSAGING_REACT_ID } from "../bootstrap";
5
6
  import { startedCheckoutWithItems } from "./checkout.mock";
6
7
  const firstAvailableCheckoutByCustomerIdView = async () => startedCheckoutWithItems({ status: [CheckoutItemStatus.KEPT, CheckoutItemStatus.INITIAL] });
7
8
  const isCheckoutEnabledByCustomerIdView = async () => true;
8
- const bootstrap = () => messagingBootstrap({ id: "Checkout" })
9
+ const bootstrap = () => messagingBootstrap({ id: CHECKOUT_MESSAGING_REACT_ID })
9
10
  .query(VIEW_FIRST_AVAILABLE_CHECKOUT_BY_CUSTOMER_ID, viewFirstAvailableCheckoutByCustomerIdHandler, {
10
11
  view: firstAvailableCheckoutByCustomerIdView,
11
12
  })
@@ -1,4 +1,5 @@
1
1
  import { BuildBootstrapFunctionReturn } from "@lookiero/messaging-react";
2
+ declare const CHECKOUT_MESSAGING_REACT_ID = "Checkout";
2
3
  interface BootstrapFunctionArgs {
3
4
  readonly getAuthToken: () => string;
4
5
  readonly apiUrl: string;
@@ -7,4 +8,4 @@ interface BootstrapFunction {
7
8
  (args: BootstrapFunctionArgs): BuildBootstrapFunctionReturn;
8
9
  }
9
10
  declare const bootstrap: BootstrapFunction;
10
- export { bootstrap };
11
+ export { bootstrap, CHECKOUT_MESSAGING_REACT_ID };
@@ -5,10 +5,11 @@ import { viewIsCheckoutEnabledByCustomerIdHandler, VIEW_IS_CHECKOUT_ENABLED_BY_C
5
5
  import { httpFirstAvailableCheckoutByCustomerIdView } from "../projection/httpFirstAvailableCheckoutByCustomerIdView";
6
6
  import { httpIsCheckoutEnabledByCustomerIdView } from "../projection/httpIsCheckoutEnabledByCustomerIdView";
7
7
  import { fetchHttpGet, fetchHttpPost } from "./http/fetchHttpClient";
8
+ const CHECKOUT_MESSAGING_REACT_ID = "Checkout";
8
9
  const bootstrap = ({ apiUrl, getAuthToken }) => {
9
10
  const httpGet = fetchHttpGet({ apiUrl, getAuthToken });
10
11
  const httpPost = fetchHttpPost({ apiUrl, getAuthToken });
11
- return messagingBootstrap({ id: "Checkout" })
12
+ return messagingBootstrap({ id: CHECKOUT_MESSAGING_REACT_ID })
12
13
  .query(VIEW_FIRST_AVAILABLE_CHECKOUT_BY_CUSTOMER_ID, viewFirstAvailableCheckoutByCustomerIdHandler, {
13
14
  view: httpFirstAvailableCheckoutByCustomerIdView({ httpPost }),
14
15
  })
@@ -18,4 +19,4 @@ const bootstrap = ({ apiUrl, getAuthToken }) => {
18
19
  .query(VIEW_IS_CHECKOUT_ACCESSIBLE_BY_CUSTOMER_ID, viewIsCheckoutAccessibleByCustomerIdHandler, {})
19
20
  .build();
20
21
  };
21
- export { bootstrap };
22
+ export { bootstrap, CHECKOUT_MESSAGING_REACT_ID };
@@ -6,5 +6,5 @@ interface HttpCheckoutBookingsSaveFunctionArgs {
6
6
  interface HttpCheckoutBookingsSaveFunction {
7
7
  (args: HttpCheckoutBookingsSaveFunctionArgs): CheckoutBookingsSaveFunction;
8
8
  }
9
- export declare const saveCheckoutBooking: HttpCheckoutBookingsSaveFunction;
10
- export {};
9
+ declare const saveCheckoutBooking: HttpCheckoutBookingsSaveFunction;
10
+ export { saveCheckoutBooking };
@@ -1,4 +1,4 @@
1
- export const saveCheckoutBooking = ({ httpPost }) => async ({ checkoutId, checkoutItemId, checkoutBookingId }) => {
1
+ const saveCheckoutBooking = ({ httpPost }) => async ({ checkoutId, checkoutItemId, checkoutBookingId }) => {
2
2
  try {
3
3
  const response = await httpPost({
4
4
  endpoint: "/book-size-replaceable-product-variants-for-checkout-item",
@@ -17,3 +17,4 @@ export const saveCheckoutBooking = ({ httpPost }) => async ({ checkoutId, checko
17
17
  throw new Error("Could not fetch BookSizeReplaceableProductVariantsForCheckoutItem");
18
18
  }
19
19
  };
20
+ export { saveCheckoutBooking };
@@ -11,5 +11,5 @@ interface UseBookSizeReplaceableProductVariantsForCheckoutItemFunctionArgs {
11
11
  interface UseBookSizeReplaceableProductVariantsForCheckoutItemFunction {
12
12
  (args: UseBookSizeReplaceableProductVariantsForCheckoutItemFunctionArgs): UseBookSizeReplaceableProductVariantsForCheckoutItem;
13
13
  }
14
- export declare const useBookSizeReplaceableProductVariantsForCheckoutItem: UseBookSizeReplaceableProductVariantsForCheckoutItemFunction;
15
- export {};
14
+ declare const useBookSizeReplaceableProductVariantsForCheckoutItem: UseBookSizeReplaceableProductVariantsForCheckoutItemFunction;
15
+ export { useBookSizeReplaceableProductVariantsForCheckoutItem };
@@ -2,7 +2,7 @@ import { useCommand } from "@lookiero/messaging-react";
2
2
  import { useCallback } from "react";
3
3
  import { v4 as uuid } from "uuid";
4
4
  import { bookSizeReplaceableProductVariantsForCheckoutItem } from "../../../domain/checkoutBooking/command/bookSizeReplaceableProductVariantsForCheckoutItem";
5
- export const useBookSizeReplaceableProductVariantsForCheckoutItem = ({ checkoutId, checkoutItemId, checkoutBookingId }) => {
5
+ const useBookSizeReplaceableProductVariantsForCheckoutItem = ({ checkoutId, checkoutItemId, checkoutBookingId }) => {
6
6
  const [commandBus, status] = useCommand();
7
7
  const book = useCallback(async () => await commandBus(bookSizeReplaceableProductVariantsForCheckoutItem({
8
8
  aggregateId: uuid(),
@@ -15,3 +15,4 @@ export const useBookSizeReplaceableProductVariantsForCheckoutItem = ({ checkoutI
15
15
  status,
16
16
  };
17
17
  };
18
+ export { useBookSizeReplaceableProductVariantsForCheckoutItem };
@@ -0,0 +1,13 @@
1
+ import { CommandStatus } from "@lookiero/messaging-react";
2
+ interface SetCheckoutIntroShownFunction {
3
+ (): Promise<void>;
4
+ }
5
+ interface UseSetCheckoutIntroShown {
6
+ readonly setCheckoutIntroShown: SetCheckoutIntroShownFunction;
7
+ readonly status: CommandStatus;
8
+ }
9
+ interface UseSetCheckoutIntroShownFunction {
10
+ (): UseSetCheckoutIntroShown;
11
+ }
12
+ declare const useSetCheckoutIntroShown: UseSetCheckoutIntroShownFunction;
13
+ export { useSetCheckoutIntroShown };
@@ -0,0 +1,9 @@
1
+ import { useCallback } from "react";
2
+ import { UISettings } from "../../ui/settings/UISettings";
3
+ import { useUpdateUiSetting } from "./useUpdateUiSetting";
4
+ const useSetCheckoutIntroShown = () => {
5
+ const { update, status } = useUpdateUiSetting();
6
+ const setCheckoutIntroShown = useCallback(() => update({ key: UISettings.CHECKOUT_INTRO_SHOWN, value: true }), [update]);
7
+ return { setCheckoutIntroShown, status };
8
+ };
9
+ export { useSetCheckoutIntroShown };
@@ -13,5 +13,5 @@ interface UseUpdateUiSetting {
13
13
  interface UseUpdateUiSettingFunction {
14
14
  (): UseUpdateUiSetting;
15
15
  }
16
- export declare const useUpdateUiSetting: UseUpdateUiSettingFunction;
17
- export {};
16
+ declare const useUpdateUiSetting: UseUpdateUiSettingFunction;
17
+ export { useUpdateUiSetting };
@@ -2,7 +2,7 @@ import { useCommand } from "@lookiero/messaging-react";
2
2
  import { useCallback } from "react";
3
3
  import { v4 as uuid } from "uuid";
4
4
  import { updateUiSetting } from "../../../domain/uiSetting/command/updateUiSetting";
5
- export const useUpdateUiSetting = () => {
5
+ const useUpdateUiSetting = () => {
6
6
  const [commandBus, status] = useCommand();
7
7
  const update = useCallback(async ({ key, value }) => await commandBus(updateUiSetting({
8
8
  aggregateId: uuid(),
@@ -14,3 +14,4 @@ export const useUpdateUiSetting = () => {
14
14
  status,
15
15
  };
16
16
  };
17
+ export { useUpdateUiSetting };
@@ -7,12 +7,12 @@ interface StorageUiSettingsGetFunctionArgs {
7
7
  interface StorageUiSettingsGetFunction {
8
8
  (args: StorageUiSettingsGetFunctionArgs): UiSettingGetFunction;
9
9
  }
10
- export declare const getUiSetting: StorageUiSettingsGetFunction;
10
+ declare const getUiSetting: StorageUiSettingsGetFunction;
11
11
  interface StorageUiSettingsSaveFunctionArgs {
12
12
  readonly write: WriteFunction<UiSettingDto>;
13
13
  }
14
14
  interface StorageUiSettingsSaveFunction {
15
15
  (args: StorageUiSettingsSaveFunctionArgs): UiSettingSaveFunction;
16
16
  }
17
- export declare const saveUiSetting: StorageUiSettingsSaveFunction;
18
- export {};
17
+ declare const saveUiSetting: StorageUiSettingsSaveFunction;
18
+ export { getUiSetting, saveUiSetting };
@@ -9,11 +9,12 @@ const fromDomain = (uiSetting) => ({
9
9
  key: uiSetting.key,
10
10
  value: uiSetting.value,
11
11
  });
12
- export const getUiSetting = ({ read }) => async (uiSettingKey) => {
12
+ const getUiSetting = ({ read }) => async (uiSettingKey) => {
13
13
  const uiSettingDto = await read(uiSettingKey);
14
14
  if (!uiSettingDto) {
15
15
  throw new Error(`UiSetting not found: ${uiSettingKey}`);
16
16
  }
17
17
  return toDomain(uiSettingDto);
18
18
  };
19
- export const saveUiSetting = ({ write }) => async (aggregateRoot) => await write(aggregateRoot.key, fromDomain(aggregateRoot));
19
+ const saveUiSetting = ({ write }) => async (aggregateRoot) => await write(aggregateRoot.key, fromDomain(aggregateRoot));
20
+ export { getUiSetting, saveUiSetting };
@@ -1,4 +1,5 @@
1
1
  import { ReadFunction, WriteFunction } from "./storage";
2
2
  import { UiSettingDto } from "./uiSettingData";
3
- export declare const read: ReadFunction<UiSettingDto>;
4
- export declare const write: WriteFunction<UiSettingDto>;
3
+ declare const read: ReadFunction<UiSettingDto>;
4
+ declare const write: WriteFunction<UiSettingDto>;
5
+ export { read, write };
@@ -1,6 +1,7 @@
1
1
  import AsyncStorage from "@react-native-async-storage/async-storage";
2
- export const read = async (key) => {
2
+ const read = async (key) => {
3
3
  const value = await AsyncStorage.getItem(key);
4
4
  return value ? JSON.parse(value) : undefined;
5
5
  };
6
- export const write = async (key, value) => AsyncStorage.setItem(key, JSON.stringify(value));
6
+ const write = async (key, value) => AsyncStorage.setItem(key, JSON.stringify(value));
7
+ export { read, write };
@@ -1,6 +1,7 @@
1
- export interface ReadFunction<T> {
1
+ interface ReadFunction<T> {
2
2
  (key: string): Promise<T | undefined>;
3
3
  }
4
- export interface WriteFunction<T> {
4
+ interface WriteFunction<T> {
5
5
  (key: string, value: T): Promise<void>;
6
6
  }
7
+ export { ReadFunction, WriteFunction };
@@ -1,5 +1,6 @@
1
- export interface UiSettingDto {
1
+ interface UiSettingDto {
2
2
  readonly id: string;
3
3
  readonly key: string;
4
4
  readonly value: unknown;
5
5
  }
6
+ export { UiSettingDto };
@@ -1,8 +1,9 @@
1
1
  import { useQuery } from "@lookiero/messaging-react";
2
2
  import { viewBookedSizeReplaceableProductVariantsForCheckoutItem, } from "../../../projection/bookedSizeReplaceableProductVariants/viewBookedSizeReplaceableProductVariantsForCheckoutItem";
3
+ import { CHECKOUT_MESSAGING_REACT_ID } from "../../delivery/bootstrap";
3
4
  const useViewBookedSizeReplaceableProductVariantsForCheckoutItem = ({ checkoutItemId }) => useQuery({
4
5
  query: viewBookedSizeReplaceableProductVariantsForCheckoutItem({ checkoutItemId }),
5
- contextId: "Checkout",
6
+ contextId: CHECKOUT_MESSAGING_REACT_ID,
6
7
  options: { staleTime: Infinity },
7
8
  });
8
9
  export { useViewBookedSizeReplaceableProductVariantsForCheckoutItem };
@@ -0,0 +1,2 @@
1
+ declare const useViewCheckoutIntroShown: () => import("@lookiero/messaging-react").UseQueryFunctionResult<import("../../../projection/uiSetting/viewUiSettingByKey").UiSettingProjection>;
2
+ export { useViewCheckoutIntroShown };
@@ -0,0 +1,6 @@
1
+ import { UISettings } from "../../ui/settings/UISettings";
2
+ import { useViewUiSettingByKey } from "./useViewUiSettingByKey";
3
+ const useViewCheckoutIntroShown = () => useViewUiSettingByKey({
4
+ key: UISettings.CHECKOUT_INTRO_SHOWN,
5
+ });
6
+ export { useViewCheckoutIntroShown };
@@ -1,8 +1,9 @@
1
1
  import { useQuery } from "@lookiero/messaging-react";
2
2
  import { viewFirstAvailableCheckoutByCustomerId, } from "../../../projection/checkout/viewFirstAvailableCheckoutByCustomerId";
3
+ import { CHECKOUT_MESSAGING_REACT_ID } from "../../delivery/bootstrap";
3
4
  const useViewFirstAvailableCheckoutByCustomerId = ({ customerId }) => useQuery({
4
5
  query: viewFirstAvailableCheckoutByCustomerId({ customerId }),
5
- contextId: "Checkout",
6
+ contextId: CHECKOUT_MESSAGING_REACT_ID,
6
7
  options: { staleTime: Infinity, retry: false },
7
8
  });
8
9
  export { useViewFirstAvailableCheckoutByCustomerId };
@@ -1,8 +1,9 @@
1
1
  import { useQuery } from "@lookiero/messaging-react";
2
2
  import { viewIsCheckoutAccessibleByCustomerId, } from "../../../projection/checkout/viewIsCheckoutAccessibleByCustomerId";
3
+ import { CHECKOUT_MESSAGING_REACT_ID } from "../../delivery/bootstrap";
3
4
  const useViewIsCheckoutAccessibleByCustomerId = ({ customerId }) => useQuery({
4
5
  query: viewIsCheckoutAccessibleByCustomerId({ customerId }),
5
- contextId: "Checkout",
6
+ contextId: CHECKOUT_MESSAGING_REACT_ID,
6
7
  options: { staleTime: Infinity },
7
8
  });
8
9
  export { useViewIsCheckoutAccessibleByCustomerId };
@@ -1,10 +1,10 @@
1
1
  import { UseQueryFunctionResult } from "@lookiero/messaging-react";
2
2
  import { UiSettingProjection } from "../../../projection/uiSetting/viewUiSettingByKey";
3
3
  interface UseViewUiSettingByKeyFunctionArgs {
4
- readonly uiSettingKey: string;
4
+ readonly key: string;
5
5
  }
6
6
  interface UseViewUiSettingByKeyFunction {
7
7
  (args: UseViewUiSettingByKeyFunctionArgs): UseQueryFunctionResult<UiSettingProjection>;
8
8
  }
9
- export declare const useViewUiSettingByKey: UseViewUiSettingByKeyFunction;
10
- export {};
9
+ declare const useViewUiSettingByKey: UseViewUiSettingByKeyFunction;
10
+ export { useViewUiSettingByKey };
@@ -1,8 +1,12 @@
1
1
  import { useQuery } from "@lookiero/messaging-react";
2
- import { uiSettingUpdated } from "../../../domain/uiSetting/model/uiSettingUpdated";
2
+ import { UI_SETTING_UPDATED } from "../../../domain/uiSetting/model/uiSettingUpdated";
3
3
  import { viewUiSettingByKey } from "../../../projection/uiSetting/viewUiSettingByKey";
4
- export const useViewUiSettingByKey = ({ uiSettingKey }) => useQuery({
5
- query: viewUiSettingByKey({ key: uiSettingKey }),
6
- invalidation: (event) => event instanceof uiSettingUpdated,
7
- options: { staleTime: Infinity },
4
+ import { CHECKOUT_MESSAGING_REACT_ID } from "../../delivery/bootstrap";
5
+ const isUiSettingUpdated = (event) => event.name === UI_SETTING_UPDATED;
6
+ const useViewUiSettingByKey = ({ key }) => useQuery({
7
+ query: viewUiSettingByKey({ key }),
8
+ contextId: CHECKOUT_MESSAGING_REACT_ID,
9
+ invalidation: isUiSettingUpdated,
10
+ options: { staleTime: Infinity, retry: false },
8
11
  });
12
+ export { useViewUiSettingByKey };
@@ -9,5 +9,5 @@ interface StorageUiSettingByKeyViewFunctionArgs {
9
9
  interface StorageUiSettingByKeyViewFunction {
10
10
  (args: StorageUiSettingByKeyViewFunctionArgs): StorageUiSettingByKeyView;
11
11
  }
12
- export declare const storageUiSettingByKeyView: StorageUiSettingByKeyViewFunction;
13
- export {};
12
+ declare const storageUiSettingByKeyView: StorageUiSettingByKeyViewFunction;
13
+ export { storageUiSettingByKeyView };
@@ -3,7 +3,7 @@ const toUiSettingProjection = (uiSettingDto) => ({
3
3
  key: uiSettingDto.key,
4
4
  value: uiSettingDto.value,
5
5
  });
6
- export const storageUiSettingByKeyView = ({ read }) => async ({ key }) => {
6
+ const storageUiSettingByKeyView = ({ read }) => async ({ key }) => {
7
7
  try {
8
8
  const uiSettingDto = await read(key);
9
9
  return uiSettingDto ? toUiSettingProjection(uiSettingDto) : undefined;
@@ -12,3 +12,4 @@ export const storageUiSettingByKeyView = ({ read }) => async ({ key }) => {
12
12
  throw new Error("Could not fetch the uiSetting");
13
13
  }
14
14
  };
15
+ export { storageUiSettingByKeyView };
@@ -1,8 +1,8 @@
1
1
  import { inMemoryFetchTranslation } from "@lookiero/i18n";
2
- import { ReactIntl } from "@lookiero/i18n-react";
3
- import { useCallback } from "react";
2
+ import { i18n } from "@lookiero/i18n-react";
3
+ import React, { useCallback } from "react";
4
4
  import { Platform } from "react-native";
5
- import { Spinner } from "./components/atoms/spiner/Spinner";
5
+ import { Spinner } from "./components/atoms/spinner/Spinner";
6
6
  import { Router } from "./routing/router/Router";
7
7
  import { Routing } from "./routing/Routing";
8
8
  const translationData = {
@@ -10,16 +10,14 @@ const translationData = {
10
10
  es: { intro: "Título de la vista Intro" },
11
11
  };
12
12
  const fetchTranslation = inMemoryFetchTranslation({ translationData });
13
+ const I18n = i18n({ fetchTranslation, contextId: "CheckoutI18n" });
13
14
  const root = ({ Messaging }) =>
14
15
  // eslint-disable-next-line react/display-name, react/prop-types
15
16
  ({ locale = "en", customerId, onNotAccessible }) => {
16
17
  const handleOnI18nError = useCallback(() => void 0, []);
17
- return (<ReactIntl.I18n locale={locale} fetchTranslation={fetchTranslation} loader={<Spinner />} onError={handleOnI18nError} contextId="CheckoutI18n">
18
- <Messaging includeReactQueryDevTools={Platform.OS === "web"}>
19
- <Router>
20
- <Routing customerId={customerId} onNotAccessible={onNotAccessible}/>
21
- </Router>
22
- </Messaging>
23
- </ReactIntl.I18n>);
18
+ return (React.createElement(I18n, { locale: locale, loader: React.createElement(Spinner, null), onError: handleOnI18nError },
19
+ React.createElement(Messaging, { includeReactQueryDevTools: Platform.OS === "web" },
20
+ React.createElement(Router, null,
21
+ React.createElement(Routing, { customerId: customerId, onNotAccessible: onNotAccessible })))));
24
22
  };
25
23
  export { root };
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { View } from "react-native";
3
+ import { style } from "./Spinner.style";
4
+ const Spinner = () => (React.createElement(View, { style: style.container },
5
+ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30px", height: "30px", viewBox: "0 0 100 100", preserveAspectRatio: "xMidYMid" },
6
+ React.createElement("circle", { cx: "50", cy: "50", r: "32", stroke: "#000000", strokeWidth: "6", strokeLinecap: "round", fill: "none" },
7
+ React.createElement("animateTransform", { attributeName: "transform", type: "rotate", repeatCount: "indefinite", dur: "1.5384615384615383s", values: "0 50 50;180 50 50;720 50 50", keyTimes: "0;0.5;1" }),
8
+ React.createElement("animate", { attributeName: "stroke-dasharray", repeatCount: "indefinite", dur: "1.5384615384615383s", values: "42.22300526424682 158.83892456549995;176.93449825017714 24.127431579569617;42.22300526424682 158.83892456549995", keyTimes: "0;0.5;1" })))));
9
+ export { Spinner };
@@ -1,8 +1,8 @@
1
- import { useEffect, useRef } from "react";
1
+ import React, { useEffect, useRef } from "react";
2
2
  import { Outlet } from "react-router-native";
3
3
  import { useViewIsCheckoutAccessibleByCustomerId } from "../../projection/react/useViewIsCheckoutAccessibleByCustomerId";
4
- import { Spinner } from "../components/atoms/spiner/Spinner";
5
- const CheckoutAccessibilityMiddleware = ({ customerId, onNotAccessible, loader = <Spinner />, }) => {
4
+ import { Spinner } from "../components/atoms/spinner/Spinner";
5
+ const CheckoutAccessibilityMiddleware = ({ customerId, onNotAccessible, loader = React.createElement(Spinner, null), }) => {
6
6
  const [accessible] = useViewIsCheckoutAccessibleByCustomerId({ customerId });
7
7
  const onNotAccessibleRef = useRef(onNotAccessible);
8
8
  onNotAccessibleRef.current = onNotAccessible;
@@ -11,6 +11,6 @@ const CheckoutAccessibilityMiddleware = ({ customerId, onNotAccessible, loader =
11
11
  onNotAccessibleRef.current();
12
12
  }
13
13
  }, [accessible, onNotAccessible]);
14
- return accessible === undefined ? loader : accessible ? <Outlet /> : null;
14
+ return accessible === undefined ? loader : accessible ? React.createElement(Outlet, null) : null;
15
15
  };
16
16
  export { CheckoutAccessibilityMiddleware };