@lookiero/checkout 3.9.0-beta.1 → 3.9.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.
- package/dist/infrastructure/domain/checkout/react/useStartCheckout.js +1 -1
- package/dist/infrastructure/projection/checkout/checkout.js +0 -14
- package/dist/infrastructure/projection/payment/react/useViewPaymentFlowPayloadByCheckoutId.js +1 -1
- package/dist/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.js +5 -7
- package/dist/infrastructure/ui/components/organisms/checkoutQuestions/CheckoutQuestion.js +1 -1
- package/dist/infrastructure/ui/components/organisms/checkoutQuestions/components/CheckoutQuestionItem.d.ts +1 -0
- package/dist/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.js +2 -2
- package/dist/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem.js +3 -3
- package/dist/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.js +2 -2
- package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.js +1 -1
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.d.ts +1 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +2 -2
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.js +2 -2
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.js +2 -2
- package/dist/infrastructure/ui/components/templates/header/Header.style.d.ts +0 -1
- package/dist/infrastructure/ui/components/templates/header/Header.style.js +1 -3
- package/dist/infrastructure/ui/hooks/useSubmitCheckout.js +0 -5
- package/dist/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.js +1 -1
- package/dist/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +6 -4
- package/dist/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.d.ts +10 -3
- package/dist/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.js +10 -3
- package/dist/infrastructure/ui/views/item/components/itemActions/ItemActions.js +4 -3
- package/dist/infrastructure/ui/views/item/components/itemActions/ItemActions.style.d.ts +3 -0
- package/dist/infrastructure/ui/views/item/components/itemActions/ItemActions.style.js +6 -3
- package/dist/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.d.ts +1 -2
- package/dist/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.js +3 -4
- package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.js +19 -16
- package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.style.d.ts +0 -3
- package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.style.js +1 -4
- package/dist/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.style.d.ts +1 -0
- package/dist/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.style.js +1 -0
- package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +3 -2
- package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +3 -0
- package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +3 -0
- package/dist/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.js +4 -3
- package/dist/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.style.d.ts +10 -3
- package/dist/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.style.js +10 -3
- package/dist/infrastructure/ui/views/item/views/productVariant/ProductVariant.js +5 -5
- package/dist/infrastructure/ui/views/item/views/productVariant/ProductVariant.style.d.ts +4 -0
- package/dist/infrastructure/ui/views/item/views/productVariant/ProductVariant.style.js +4 -0
- package/dist/infrastructure/ui/views/summary/components/pricing/Pricing.js +8 -7
- package/dist/infrastructure/ui/views/summary/components/pricing/Pricing.style.d.ts +6 -0
- package/dist/infrastructure/ui/views/summary/components/pricing/Pricing.style.js +6 -0
- package/dist/shared/notifications/infrastructure/ui/components/modalNotifications/ModalNotificationItem.js +4 -3
- package/dist/shared/notifications/infrastructure/ui/components/modalNotifications/ModalNotificationItem.style.d.ts +10 -3
- package/dist/shared/notifications/infrastructure/ui/components/modalNotifications/ModalNotificationItem.style.js +10 -3
- package/dist/shared/ui/components/atoms/input/Input.js +2 -2
- package/dist/shared/ui/components/layouts/modal/Modal.js +1 -1
- package/dist/shared/ui/components/layouts/slider/Slider.d.ts +5 -0
- package/dist/shared/ui/components/layouts/slider/Slider.js +4 -4
- package/dist/shared/ui/components/layouts/sticky/Sticky.js +3 -1
- package/dist/shared/ui/components/layouts/sticky/Sticky.style.d.ts +0 -3
- package/dist/shared/ui/components/layouts/sticky/Sticky.style.js +2 -3
- package/dist/shared/ui/components/molecules/selectField/SelectField.js +3 -3
- package/package.json +4 -10
- package/dist/infrastructure/ui/components/layouts/layout/dummyLayout/useScrollViewRef.d.ts +0 -15
- package/dist/infrastructure/ui/components/layouts/layout/dummyLayout/useScrollViewRef.js +0 -14
- package/dist/shared/ui/components/layouts/carousel/Carousel.d.ts +0 -11
- package/dist/shared/ui/components/layouts/carousel/Carousel.js +0 -31
- package/dist/shared/ui/components/layouts/carousel/Carousel.style.d.ts +0 -24
- package/dist/shared/ui/components/layouts/carousel/Carousel.style.js +0 -25
- package/dist/shared/ui/components/layouts/carousel/Carousel2.d.ts +0 -30
- package/dist/shared/ui/components/layouts/carousel/Carousel2.js +0 -79
- package/dist/shared/ui/components/layouts/carousel/DragComponent.d.ts +0 -3
- package/dist/shared/ui/components/layouts/carousel/DragComponent.js +0 -48
- package/dist/shared/ui/components/layouts/slider/Bullets.d.ts +0 -10
- package/dist/shared/ui/components/layouts/slider/Bullets.js +0 -28
- package/dist/shared/ui/components/layouts/slider/Bullets.style.d.ts +0 -12
- package/dist/shared/ui/components/layouts/slider/Bullets.style.js +0 -15
- package/dist/shared/ui/components/layouts/slider/Bullets2.d.ts +0 -10
- package/dist/shared/ui/components/layouts/slider/Bullets2.js +0 -30
- package/dist/shared/ui/components/layouts/slider/SliderDots.d.ts +0 -8
- package/dist/shared/ui/components/layouts/slider/SliderDots.js +0 -16
- package/dist/shared/ui/components/layouts/slider/SliderDots.style.d.ts +0 -12
- package/dist/shared/ui/components/layouts/slider/SliderDots.style.js +0 -15
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { View } from "react-native";
|
|
4
|
-
import { Gesture, GestureDetector } from "react-native-gesture-handler";
|
|
5
|
-
import { useSharedValue } from "react-native-reanimated";
|
|
6
|
-
import { useScrollViewRef } from "../../../../../infrastructure/ui/components/layouts/layout/dummyLayout/useScrollViewRef";
|
|
7
|
-
const TOUCH_SLOP = 5;
|
|
8
|
-
const TIME_TO_ACTIVATE_PAN = 400;
|
|
9
|
-
// @ts-ignore
|
|
10
|
-
const DragComponent = (props) => {
|
|
11
|
-
const { scrollViewRef, panGestureRef } = useScrollViewRef();
|
|
12
|
-
const touchStart = useSharedValue({ x: 0, y: 0, time: 0 });
|
|
13
|
-
const gesture = Gesture.Pan()
|
|
14
|
-
.manualActivation(true)
|
|
15
|
-
.onTouchesDown((e) => {
|
|
16
|
-
touchStart.value = {
|
|
17
|
-
// @ts-ignore
|
|
18
|
-
x: e.changedTouches[0].x,
|
|
19
|
-
// @ts-ignore
|
|
20
|
-
y: e.changedTouches[0].y,
|
|
21
|
-
time: Date.now(),
|
|
22
|
-
};
|
|
23
|
-
})
|
|
24
|
-
.onTouchesMove((e, state) => {
|
|
25
|
-
if (Date.now() - touchStart.value.time > TIME_TO_ACTIVATE_PAN) {
|
|
26
|
-
state.activate();
|
|
27
|
-
console.log("activate");
|
|
28
|
-
}
|
|
29
|
-
else if (
|
|
30
|
-
// @ts-ignore
|
|
31
|
-
Math.abs(touchStart.value.x - e.changedTouches[0].x) > TOUCH_SLOP ||
|
|
32
|
-
// @ts-ignore
|
|
33
|
-
Math.abs(touchStart.value.y - e.changedTouches[0].y) > TOUCH_SLOP) {
|
|
34
|
-
state.fail();
|
|
35
|
-
console.log("fail");
|
|
36
|
-
}
|
|
37
|
-
})
|
|
38
|
-
.onUpdate(() => {
|
|
39
|
-
console.log("pan update");
|
|
40
|
-
})
|
|
41
|
-
// @ts-ignore
|
|
42
|
-
.simultaneousWithExternalGesture(scrollViewRef)
|
|
43
|
-
// @ts-ignore
|
|
44
|
-
.withRef(panGestureRef);
|
|
45
|
-
return (React.createElement(GestureDetector, { gesture: gesture },
|
|
46
|
-
React.createElement(View, null, props.children)));
|
|
47
|
-
};
|
|
48
|
-
export { DragComponent };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
interface BulletsProps {
|
|
3
|
-
readonly activeIndex: number;
|
|
4
|
-
readonly onChange: (index: number) => void;
|
|
5
|
-
readonly count: number;
|
|
6
|
-
readonly maxBullets?: number;
|
|
7
|
-
readonly testID?: string;
|
|
8
|
-
}
|
|
9
|
-
declare const Bullets: FC<BulletsProps>;
|
|
10
|
-
export { Bullets };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { animated, useSpring } from "@react-spring/native";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { View, Pressable } from "react-native";
|
|
4
|
-
import { theme } from "../../../../../infrastructure/ui/theme/theme";
|
|
5
|
-
import { style } from "./Bullets.style";
|
|
6
|
-
const { colorContent, colorGrayscaleM } = theme();
|
|
7
|
-
const MAX = 5;
|
|
8
|
-
const DIAMETER_MAX = 8;
|
|
9
|
-
const DIAMETER_MIN = 2;
|
|
10
|
-
const Bullet = ({ index, activeIndex, maxBullets, onChange }) => {
|
|
11
|
-
const pivot = Math.floor(maxBullets / 2) + 1;
|
|
12
|
-
const delta = Math.abs(index - activeIndex);
|
|
13
|
-
const diameter = delta > 1 ? DIAMETER_MAX - delta * DIAMETER_MIN : DIAMETER_MAX;
|
|
14
|
-
const color = delta === 0 ? colorContent : colorGrayscaleM;
|
|
15
|
-
const springs = useSpring({ diameter, color });
|
|
16
|
-
return delta >= pivot ? null : (React.createElement(Pressable, { onPress: () => onChange(index) },
|
|
17
|
-
React.createElement(animated.View, { accessibilityState: { selected: delta === 0 }, testID: "bullet", style: [
|
|
18
|
-
style.bullet,
|
|
19
|
-
{
|
|
20
|
-
width: springs.diameter,
|
|
21
|
-
height: springs.diameter,
|
|
22
|
-
backgroundColor: springs.color,
|
|
23
|
-
borderRadius: springs.diameter,
|
|
24
|
-
},
|
|
25
|
-
] })));
|
|
26
|
-
};
|
|
27
|
-
const Bullets = ({ activeIndex, count, maxBullets = MAX, onChange, testID = "bullets" }) => (React.createElement(View, { style: style.bullets, testID: testID }, [...Array(count).keys()].map((index) => (React.createElement(Bullet, { key: index, activeIndex: activeIndex, index: index, maxBullets: maxBullets, onChange: onChange })))));
|
|
28
|
-
export { Bullets };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { StyleSheet } from "react-native";
|
|
2
|
-
import { theme } from "../../../../../infrastructure/ui/theme/theme";
|
|
3
|
-
const { spaceM } = theme();
|
|
4
|
-
const style = StyleSheet.create({
|
|
5
|
-
bullet: {
|
|
6
|
-
marginHorizontal: 3,
|
|
7
|
-
},
|
|
8
|
-
bullets: {
|
|
9
|
-
alignItems: "center",
|
|
10
|
-
flexDirection: "row",
|
|
11
|
-
justifyContent: "center",
|
|
12
|
-
paddingVertical: spaceM,
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
export { style };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
interface BulletsProps {
|
|
3
|
-
readonly activeIndex: number;
|
|
4
|
-
readonly onChange: (index: number) => void;
|
|
5
|
-
readonly count: number;
|
|
6
|
-
readonly maxBullets?: number;
|
|
7
|
-
readonly testID?: string;
|
|
8
|
-
}
|
|
9
|
-
declare const Bullets: FC<BulletsProps>;
|
|
10
|
-
export { Bullets };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React, { useEffect } from "react";
|
|
2
|
-
import { View, Pressable } from "react-native";
|
|
3
|
-
import Animated, { useAnimatedStyle, useDerivedValue, useSharedValue } from "react-native-reanimated";
|
|
4
|
-
import { withSpring } from "react-native-reanimated";
|
|
5
|
-
import { theme } from "../../../../../infrastructure/ui/theme/theme";
|
|
6
|
-
import { style } from "./Bullets.style";
|
|
7
|
-
const { colorContent, colorGrayscaleM } = theme();
|
|
8
|
-
const MAX = 5;
|
|
9
|
-
const DIAMETER_MAX = 8;
|
|
10
|
-
const DIAMETER_MIN = 2;
|
|
11
|
-
const Bullet = ({ index, activeIndex, maxBullets, onChange }) => {
|
|
12
|
-
const pivot = Math.floor(maxBullets / 2) + 1;
|
|
13
|
-
// const delta = Math.abs(index - activeIndex);
|
|
14
|
-
const delta = useSharedValue(0);
|
|
15
|
-
useEffect(() => {
|
|
16
|
-
delta.value = Math.abs(index - activeIndex);
|
|
17
|
-
}, [activeIndex, delta, index]);
|
|
18
|
-
const diameter = useDerivedValue(() => withSpring(delta.value > 1 ? DIAMETER_MAX - delta.value * DIAMETER_MIN : DIAMETER_MAX), [delta]);
|
|
19
|
-
const color = useDerivedValue(() => withSpring(delta.value === 0 ? colorContent : colorGrayscaleM), [delta]);
|
|
20
|
-
const animatedStyle = useAnimatedStyle(() => ({
|
|
21
|
-
width: diameter.value,
|
|
22
|
-
height: diameter.value,
|
|
23
|
-
backgroundColor: color.value,
|
|
24
|
-
borderRadius: diameter.value,
|
|
25
|
-
}), [diameter, color]);
|
|
26
|
-
return delta.value >= pivot ? null : (React.createElement(Pressable, { onPress: () => onChange(index) },
|
|
27
|
-
React.createElement(Animated.View, { accessibilityState: { selected: delta.value === 0 }, style: [style.bullet, animatedStyle], testID: "bullet" })));
|
|
28
|
-
};
|
|
29
|
-
const Bullets = ({ activeIndex, count, maxBullets = MAX, onChange, testID = "bullets" }) => (React.createElement(View, { style: style.bullets, testID: testID }, [...Array(count).keys()].map((index) => (React.createElement(Bullet, { key: index, activeIndex: activeIndex, index: index, maxBullets: maxBullets, onChange: onChange })))));
|
|
30
|
-
export { Bullets };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { TouchableWithoutFeedback, View } from "react-native";
|
|
3
|
-
import { theme } from "../../../../../infrastructure/ui/theme/theme";
|
|
4
|
-
import { style } from "./SliderDots.style";
|
|
5
|
-
const { colorContent } = theme();
|
|
6
|
-
const SliderDot = ({ diameter, color }) => (React.createElement(View, { style: [style.sliderDot, { width: diameter, height: diameter, backgroundColor: color, borderRadius: diameter }] }));
|
|
7
|
-
const SliderDots = () => {
|
|
8
|
-
return (React.createElement(View, { style: style.sliderDots },
|
|
9
|
-
React.createElement(TouchableWithoutFeedback, null,
|
|
10
|
-
React.createElement(SliderDot, { color: colorContent, diameter: 8 })),
|
|
11
|
-
React.createElement(TouchableWithoutFeedback, null,
|
|
12
|
-
React.createElement(SliderDot, { color: colorContent, diameter: 8 })),
|
|
13
|
-
React.createElement(TouchableWithoutFeedback, null,
|
|
14
|
-
React.createElement(SliderDot, { color: colorContent, diameter: 8 }))));
|
|
15
|
-
};
|
|
16
|
-
export { SliderDots };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { StyleSheet } from "react-native";
|
|
2
|
-
import { theme } from "../../../../../infrastructure/ui/theme/theme";
|
|
3
|
-
const { spaceM } = theme();
|
|
4
|
-
const style = StyleSheet.create({
|
|
5
|
-
sliderDot: {
|
|
6
|
-
marginHorizontal: 3,
|
|
7
|
-
},
|
|
8
|
-
sliderDots: {
|
|
9
|
-
alignItems: "center",
|
|
10
|
-
flexDirection: "row",
|
|
11
|
-
justifyContent: "center",
|
|
12
|
-
paddingVertical: spaceM,
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
export { style };
|