@lookiero/checkout 8.19.0 → 8.21.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 (62) hide show
  1. package/.detoxrc.js +55 -0
  2. package/app.json +15 -3
  3. package/babel.config.js +20 -0
  4. package/dist/fake-dependencies/@lookiero/payments-front/index.d.ts +21 -0
  5. package/dist/fake-dependencies/@lookiero/payments-front/index.js +20 -0
  6. package/dist/src/Expo.d.ts +1 -1
  7. package/dist/src/Expo.js +1 -0
  8. package/dist/src/ExpoRoot.js +13 -31
  9. package/dist/src/infrastructure/delivery/bootstrap.mock.d.ts +3 -0
  10. package/dist/src/infrastructure/delivery/bootstrap.mock.js +91 -0
  11. package/dist/src/infrastructure/projection/bookedProductsVariants/bookedProductsVariants.mock.d.ts +3 -0
  12. package/dist/src/infrastructure/projection/bookedProductsVariants/bookedProductsVariants.mock.js +27 -0
  13. package/dist/src/infrastructure/projection/checkout/checkout.mock.d.ts +19 -0
  14. package/dist/src/infrastructure/projection/checkout/checkout.mock.js +21 -0
  15. package/dist/src/infrastructure/projection/checkoutBooking/checkoutBooking.mock.d.ts +3 -0
  16. package/dist/src/infrastructure/projection/checkoutBooking/checkoutBooking.mock.js +6 -0
  17. package/dist/src/infrastructure/projection/checkoutFeedback/checkoutFeedback.mock.d.ts +3 -0
  18. package/dist/src/infrastructure/projection/checkoutFeedback/checkoutFeedback.mock.js +5 -0
  19. package/dist/src/infrastructure/projection/checkoutItem/checkoutItem.mock.d.ts +15 -0
  20. package/dist/src/infrastructure/projection/checkoutItem/checkoutItem.mock.js +43 -0
  21. package/dist/src/infrastructure/projection/checkoutQuestion/checkoutQuestions.mock.d.ts +3 -0
  22. package/dist/src/infrastructure/projection/checkoutQuestion/checkoutQuestions.mock.js +103 -0
  23. package/dist/src/infrastructure/projection/feedback/feedback.mock.d.ts +3 -0
  24. package/dist/src/infrastructure/projection/feedback/feedback.mock.js +6 -0
  25. package/dist/src/infrastructure/projection/payment/paymentFlowPayload.mock.d.ts +6 -0
  26. package/dist/src/infrastructure/projection/payment/paymentFlowPayload.mock.js +183 -0
  27. package/dist/src/infrastructure/projection/pricing/pricing.mock.d.ts +9 -0
  28. package/dist/src/infrastructure/projection/pricing/pricing.mock.js +42 -0
  29. package/dist/src/infrastructure/projection/returnQuestion/returnQuestions.mock.d.ts +3 -0
  30. package/dist/src/infrastructure/projection/returnQuestion/returnQuestions.mock.js +354 -0
  31. package/dist/src/infrastructure/ui/hooks/useSubmitCheckout.js +11 -1
  32. package/dist/src/infrastructure/ui/views/checkout/Checkout.js +1 -1
  33. package/dist/src/infrastructure/ui/views/checkout/components/paymentInstrument/PaymentInstrument.js +2 -2
  34. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.js +2 -1
  35. package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.js +1 -1
  36. package/dist/src/infrastructure/ui/views/summary/Summary.js +1 -1
  37. package/dist/src/version.d.ts +1 -1
  38. package/dist/src/version.js +1 -1
  39. package/e2e/checkout.test.ts +160 -0
  40. package/e2e/jest.config.js +13 -0
  41. package/e2e/tsconfig.json +4 -0
  42. package/eas-hooks/eas-build-on-success.sh +45 -0
  43. package/eas-hooks/eas-build-pre-install.sh +39 -0
  44. package/eas.json +23 -0
  45. package/fake-dependencies/@lookiero/payments-front/index.tsx +40 -0
  46. package/fake-dependencies/@lookiero/user-tracking-front/index.js +3 -0
  47. package/metro.config.js +22 -0
  48. package/package.json +13 -2
  49. package/src/Expo.tsx +1 -0
  50. package/src/ExpoRoot.tsx +14 -31
  51. package/src/infrastructure/projection/bookedProductsVariants/bookedProductsVariants.mock.ts +2 -2
  52. package/src/infrastructure/ui/hooks/useSubmitCheckout.ts +20 -2
  53. package/src/infrastructure/ui/views/checkout/Checkout.tsx +1 -1
  54. package/src/infrastructure/ui/views/checkout/components/paymentInstrument/PaymentInstrument.tsx +1 -2
  55. package/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.tsx +3 -2
  56. package/src/infrastructure/ui/views/item/components/productVariantSlider/__snapshots__/ProductVariantSlider.test.tsx.snap +212 -254
  57. package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.tsx +1 -1
  58. package/src/infrastructure/ui/views/item/views/productVariant/__snapshots__/ProductVariant.test.tsx.snap +636 -762
  59. package/src/infrastructure/ui/views/summary/Summary.tsx +1 -1
  60. package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/__snapshots__/CheckoutItemsTabs.test.tsx.snap +1169 -1211
  61. package/tsconfig.json +8 -1
  62. package/webpack.config.js +8 -1
package/tsconfig.json CHANGED
@@ -1,6 +1,13 @@
1
1
  {
2
2
  "extends": "@lookiero/sty-psp-typescript/tsconfig.expo.json",
3
- "include": ["@types", "index.ts", "src/**/*.ts", "src/**/*.tsx"],
3
+ "include": [
4
+ "@types",
5
+ "index.ts",
6
+ "src/**/*.ts",
7
+ "src/**/*.tsx",
8
+ "fake-dependencies/**/*.ts",
9
+ "fake-dependencies/**/*.tsx"
10
+ ],
4
11
  "compilerOptions": {
5
12
  "outDir": "./dist"
6
13
  }
package/webpack.config.js CHANGED
@@ -55,13 +55,20 @@ module.exports = async function (env, argv) {
55
55
  };
56
56
  }
57
57
 
58
+ // Add in missing process.env.EXPO_PUBLIC_<...> variables to the DefinePlugin
59
+ const expoPublicEnvVars = Object.fromEntries(
60
+ Object.entries(process.env)
61
+ .filter(([key]) => key.startsWith("EXPO_PUBLIC_"))
62
+ .map(([key, value]) => [key, JSON.stringify(value)]),
63
+ );
64
+
58
65
  /**
59
66
  * This is required in order to resolve an Aurora introduced issue.
60
67
  * Without this config, expo won't start.
61
68
  */
62
69
  config.plugins = [
63
70
  ...(config.plugins || []),
64
- new webpack.DefinePlugin({ process: { env: {} } }),
71
+ new webpack.DefinePlugin({ process: { env: expoPublicEnvVars } }),
65
72
  // new BundleAnalyzerPlugin({ path: 'web-report' })
66
73
  /**
67
74
  * https://github.com/webpack/changelog-v5/issues/10#issuecomment-615877593