@lookiero/checkout 4.0.0-beta.4 → 4.0.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 (89) hide show
  1. package/dist/infrastructure/ui/routing/Routing.js +1 -1
  2. package/dist/infrastructure/ui/views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal.d.ts +1 -1
  3. package/dist/infrastructure/ui/views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal.js +1 -0
  4. package/dist/projection/shared/order.d.ts +1 -1
  5. package/package.json +1 -1
  6. package/dist/domain/checkoutBooking/event/createNotificationWhenCheckoutBookingExpired.d.ts +0 -6
  7. package/dist/domain/checkoutBooking/event/createNotificationWhenCheckoutBookingExpired.js +0 -13
  8. package/dist/infrastructure/domain/uiSetting/react/useIncrementIntroShownCount.d.ts +0 -10
  9. package/dist/infrastructure/domain/uiSetting/react/useIncrementIntroShownCount.js +0 -11
  10. package/dist/infrastructure/projection/uiSetting/react/useShouldIntroBeShown.d.ts +0 -6
  11. package/dist/infrastructure/projection/uiSetting/react/useShouldIntroBeShown.js +0 -7
  12. package/dist/infrastructure/projection/uiSetting/react/useViewIntroShownCount.d.ts +0 -6
  13. package/dist/infrastructure/projection/uiSetting/react/useViewIntroShownCount.js +0 -9
  14. package/dist/infrastructure/ui/components/templates/SafeAreaScrollView.d.ts +0 -13
  15. package/dist/infrastructure/ui/components/templates/SafeAreaScrollView.js +0 -19
  16. package/dist/infrastructure/ui/components/templates/SafeAreaScrollView.style.ts.d.ts +0 -6
  17. package/dist/infrastructure/ui/components/templates/SafeAreaScrollView.style.ts.js +0 -7
  18. package/dist/infrastructure/ui/components/templates/header/header/Header.d.ts +0 -3
  19. package/dist/infrastructure/ui/components/templates/header/header/Header.js +0 -10
  20. package/dist/infrastructure/ui/components/templates/header/header/Header.style.d.ts +0 -9
  21. package/dist/infrastructure/ui/components/templates/header/header/Header.style.js +0 -12
  22. package/dist/infrastructure/ui/components/templates/safeAreaScrollView/SafeAreaScrollView.d.ts +0 -13
  23. package/dist/infrastructure/ui/components/templates/safeAreaScrollView/SafeAreaScrollView.js +0 -19
  24. package/dist/infrastructure/ui/components/templates/safeAreaScrollView/SafeAreaScrollView.style.ts.d.ts +0 -6
  25. package/dist/infrastructure/ui/components/templates/safeAreaScrollView/SafeAreaScrollView.style.ts.js +0 -7
  26. package/dist/infrastructure/ui/hooks/usePaymentInstrumentUpdateEvents.d.ts +0 -2
  27. package/dist/infrastructure/ui/hooks/usePaymentInstrumentUpdateEvents.js +0 -28
  28. package/dist/infrastructure/ui/hooks/useToast.d.ts +0 -11
  29. package/dist/infrastructure/ui/hooks/useToast.js +0 -49
  30. package/dist/infrastructure/ui/views/checkout/components/checkoutSuccessModal/CheckoutSuccessModal.d.ts +0 -7
  31. package/dist/infrastructure/ui/views/checkout/components/checkoutSuccessModal/CheckoutSuccessModal.js +0 -25
  32. package/dist/infrastructure/ui/views/checkout/components/checkoutSuccessModal/CheckoutSuccessModal.style.d.ts +0 -16
  33. package/dist/infrastructure/ui/views/checkout/components/checkoutSuccessModal/CheckoutSuccessModal.style.js +0 -19
  34. package/dist/infrastructure/ui/views/intro/Intro.d.ts +0 -6
  35. package/dist/infrastructure/ui/views/intro/Intro.js +0 -52
  36. package/dist/infrastructure/ui/views/intro/Intro.style.d.ts +0 -52
  37. package/dist/infrastructure/ui/views/intro/Intro.style.js +0 -55
  38. package/dist/infrastructure/ui/views/item/Item.style.d.ts +0 -15
  39. package/dist/infrastructure/ui/views/item/Item.style.js +0 -18
  40. package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.d.ts +0 -26
  41. package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.js +0 -44
  42. package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.style.d.ts +0 -45
  43. package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.style.js +0 -53
  44. package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.d.ts +0 -7
  45. package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.js +0 -25
  46. package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.style.d.ts +0 -16
  47. package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.style.js +0 -19
  48. package/dist/infrastructure/ui/views/navigation/Navigation.d.ts +0 -21
  49. package/dist/infrastructure/ui/views/navigation/Navigation.js +0 -45
  50. package/dist/infrastructure/ui/views/navigation/Navigation.style.d.ts +0 -5
  51. package/dist/infrastructure/ui/views/navigation/Navigation.style.js +0 -30
  52. package/dist/infrastructure/ui/views/navigation/components/header/Header.d.ts +0 -46
  53. package/dist/infrastructure/ui/views/navigation/components/header/Header.js +0 -120
  54. package/dist/infrastructure/ui/views/navigation/components/header/Header.style.d.ts +0 -31
  55. package/dist/infrastructure/ui/views/navigation/components/header/Header.style.js +0 -34
  56. package/dist/infrastructure/ui/views/navigation/components/header/Logo.d.ts +0 -7
  57. package/dist/infrastructure/ui/views/navigation/components/header/Logo.js +0 -11
  58. package/dist/infrastructure/ui/views/navigation/components/header/Logo.style.d.ts +0 -7
  59. package/dist/infrastructure/ui/views/navigation/components/header/Logo.style.js +0 -8
  60. package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.d.ts +0 -12
  61. package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.js +0 -24
  62. package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.style.d.ts +0 -15
  63. package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.style.js +0 -18
  64. package/dist/shared/notifications/domain/notification/command/createNotification.d.ts +0 -17
  65. package/dist/shared/notifications/domain/notification/command/createNotification.js +0 -7
  66. package/dist/shared/notifications/infrastructure/domain/notification/react/useCreateNotification.d.ts +0 -21
  67. package/dist/shared/notifications/infrastructure/domain/notification/react/useCreateNotification.js +0 -22
  68. package/dist/shared/notifications/infrastructure/ui/components/NotificationItem.d.ts +0 -12
  69. package/dist/shared/notifications/infrastructure/ui/components/NotificationItem.js +0 -24
  70. package/dist/shared/notifications/infrastructure/ui/components/Notifications.d.ts +0 -9
  71. package/dist/shared/notifications/infrastructure/ui/components/Notifications.js +0 -20
  72. package/dist/shared/notifications/infrastructure/ui/components/Notifications.style.d.ts +0 -36
  73. package/dist/shared/notifications/infrastructure/ui/components/Notifications.style.js +0 -31
  74. package/dist/shared/tracking/infrastructure/usePageView.d.ts +0 -13
  75. package/dist/shared/tracking/infrastructure/usePageView.js +0 -27
  76. package/dist/shared/ui/components/atoms/error/Error.style.d.ts +0 -6
  77. package/dist/shared/ui/components/atoms/error/Error.style.js +0 -9
  78. package/dist/shared/ui/components/layouts/slider/Bullets.d.ts +0 -10
  79. package/dist/shared/ui/components/layouts/slider/Bullets.js +0 -29
  80. package/dist/shared/ui/components/layouts/slider/Bullets.style.d.ts +0 -12
  81. package/dist/shared/ui/components/layouts/slider/Bullets.style.js +0 -15
  82. package/dist/shared/ui/components/layouts/slider/Pagination.d.ts +0 -14
  83. package/dist/shared/ui/components/layouts/slider/Pagination.js +0 -11
  84. package/dist/shared/ui/components/layouts/slider/Pagination.style.d.ts +0 -23
  85. package/dist/shared/ui/components/layouts/slider/Pagination.style.js +0 -27
  86. package/dist/shared/ui/components/layouts/slider/Slider.d.ts +0 -15
  87. package/dist/shared/ui/components/layouts/slider/Slider.js +0 -132
  88. package/dist/shared/ui/components/layouts/slider/Slider.style.d.ts +0 -11
  89. package/dist/shared/ui/components/layouts/slider/Slider.style.js +0 -12
@@ -1,132 +0,0 @@
1
- import React, { useCallback, useEffect, useRef, useState } from "react";
2
- import { Animated, I18nManager, PanResponder, StyleSheet, View } from "react-native";
3
- import { Bullets } from "./Bullets";
4
- import { style } from "./Slider.style";
5
- const DEFAULT_WIDTH = 200;
6
- const Slider = ({ children, active = 0, loop = false, minDistanceToCapture = 5, minDistanceForAction = 0.2, gesturesEnabled = true, paginationEnabled = true, onSliderStart, onSliderEnd, onChanged, }) => {
7
- const flatennedChildren = children.flat();
8
- const count = flatennedChildren.length;
9
- const [width, setWidth] = useState(0);
10
- const widthRef = useRef(width);
11
- const activeIndex = useRef(active);
12
- const animatedValueX = useRef(0);
13
- const animatedValueY = useRef(0);
14
- const pan = useRef(new Animated.ValueXY()).current;
15
- const started = useRef(false);
16
- const panResponder = useRef(PanResponder.create({
17
- onPanResponderTerminationRequest: () => false,
18
- onMoveShouldSetPanResponder: () => gesturesEnabled,
19
- // eslint-disable-next-line @typescript-eslint/naming-convention
20
- onMoveShouldSetPanResponderCapture: (_e, gestureState) => {
21
- if (!gesturesEnabled) {
22
- return false;
23
- }
24
- startAnimation();
25
- const allow = Math.abs(gestureState.dx) > minDistanceToCapture;
26
- return allow;
27
- },
28
- onPanResponderGrant: () => fixState(),
29
- onPanResponderMove: Animated.event([null, { dx: pan.x }], {
30
- useNativeDriver: false,
31
- }),
32
- // eslint-disable-next-line @typescript-eslint/naming-convention
33
- onPanResponderRelease: (_e, gesture) => {
34
- const correction = gesture.moveX - gesture.x0;
35
- if (Math.abs(correction) < widthRef.current * minDistanceForAction) {
36
- spring({ x: 0, y: 0 });
37
- }
38
- else {
39
- changeIndex(correction > 0 ? (I18nManager.isRTL ? 1 : -1) : I18nManager.isRTL ? -1 : 1);
40
- }
41
- },
42
- onPanResponderEnd: () => endAnimation(),
43
- })).current;
44
- const startAnimation = useCallback(() => {
45
- if (!started.current) {
46
- onSliderStart?.();
47
- started.current = true;
48
- }
49
- }, [onSliderStart]);
50
- const endAnimation = useCallback(() => {
51
- if (started.current) {
52
- onSliderEnd?.();
53
- started.current = false;
54
- }
55
- }, [onSliderEnd]);
56
- const fixState = useCallback(() => {
57
- animatedValueX.current = widthRef.current * activeIndex.current * (I18nManager.isRTL ? 1 : -1);
58
- animatedValueY.current = 0;
59
- pan.setOffset({
60
- x: animatedValueX.current,
61
- y: animatedValueY.current,
62
- });
63
- pan.setValue({ x: 0, y: 0 });
64
- }, [pan]);
65
- const spring = useCallback((toValue) => {
66
- Animated.spring(pan, {
67
- toValue,
68
- useNativeDriver: false,
69
- }).start();
70
- }, [pan]);
71
- const changeIndex = useCallback((delta = 1) => {
72
- const toValue = { x: 0, y: 0 };
73
- let skipChanges = !delta;
74
- let calcDelta = delta;
75
- if (activeIndex.current <= 0 && delta < 0) {
76
- skipChanges = !loop;
77
- calcDelta = count + delta;
78
- }
79
- else if (activeIndex.current + 1 >= count && delta > 0) {
80
- skipChanges = !loop;
81
- calcDelta = -1 * activeIndex.current + delta - 1;
82
- }
83
- if (skipChanges) {
84
- return spring(toValue);
85
- }
86
- const index = activeIndex.current + calcDelta;
87
- activeIndex.current = index;
88
- toValue.x = widthRef.current * (I18nManager.isRTL ? 1 : -1) * calcDelta;
89
- spring(toValue);
90
- onChanged?.(index);
91
- }, [count, loop, onChanged, spring]);
92
- const fixAndGo = useCallback((delta) => {
93
- fixState();
94
- startAnimation();
95
- changeIndex(delta);
96
- }, [changeIndex, fixState, startAnimation]);
97
- const goTo = useCallback((index = 0) => {
98
- const delta = index - activeIndex.current;
99
- if (delta) {
100
- fixAndGo(delta);
101
- }
102
- }, [fixAndGo]);
103
- const getActiveIndex = useCallback(() => activeIndex.current, []);
104
- useEffect(() => {
105
- pan.x.addListener(({ value }) => (animatedValueX.current = value));
106
- pan.y.addListener(({ value }) => (animatedValueY.current = value));
107
- return () => {
108
- pan.x.removeAllListeners();
109
- pan.y.removeAllListeners();
110
- };
111
- }, [pan.x, pan.y]);
112
- useEffect(() => {
113
- if (activeIndex.current !== active) {
114
- goTo(active);
115
- }
116
- }, [active, goTo]);
117
- const onLayoutWrapper = useCallback(({ nativeEvent: { layout: { width: wrapperWidth }, }, }) => {
118
- const width = wrapperWidth || DEFAULT_WIDTH;
119
- setWidth(width);
120
- widthRef.current = width;
121
- fixState();
122
- }, [fixState]);
123
- return (React.createElement(View, { style: style.container, testID: "slider", onLayout: onLayoutWrapper },
124
- React.createElement(Animated.View, { style: StyleSheet.flatten([
125
- {
126
- left: pan.x,
127
- },
128
- style.sliderAreaStyle,
129
- ]), ...panResponder.panHandlers }, flatennedChildren.map((child, index) => (React.createElement(View, { key: index, style: { width }, testID: "slider-child" }, child)))),
130
- paginationEnabled && (React.createElement(Bullets, { activeIndex: getActiveIndex(), count: count, testID: "slider-bullets", onChange: (index) => goTo(index) }))));
131
- };
132
- export { Slider };
@@ -1,11 +0,0 @@
1
- declare const style: {
2
- container: {
3
- flex: number;
4
- overflow: "hidden";
5
- };
6
- sliderAreaStyle: {
7
- flex: number;
8
- flexDirection: "row";
9
- };
10
- };
11
- export { style };
@@ -1,12 +0,0 @@
1
- import { StyleSheet } from "react-native";
2
- const style = StyleSheet.create({
3
- container: {
4
- flex: 1,
5
- overflow: "hidden",
6
- },
7
- sliderAreaStyle: {
8
- flex: 1,
9
- flexDirection: "row",
10
- },
11
- });
12
- export { style };