@draftbit/core 47.2.13 → 47.2.14-5888e0.2

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 (59) hide show
  1. package/lib/src/components/SwipeableItem/SwipeableItem.d.ts +43 -0
  2. package/lib/src/components/SwipeableItem/SwipeableItem.js +114 -0
  3. package/lib/src/components/SwipeableItem/SwipeableItem.js.map +1 -0
  4. package/lib/src/components/SwipeableItem/SwipeableItemButton.d.ts +5 -0
  5. package/lib/src/components/SwipeableItem/SwipeableItemButton.js +6 -0
  6. package/lib/src/components/SwipeableItem/SwipeableItemButton.js.map +1 -0
  7. package/lib/src/components/SwipeableItem/SwipeableItemCommon.d.ts +30 -0
  8. package/lib/src/components/SwipeableItem/SwipeableItemCommon.js +44 -0
  9. package/lib/src/components/SwipeableItem/SwipeableItemCommon.js.map +1 -0
  10. package/lib/src/components/SwipeableItem/SwipeableList.d.ts +17 -0
  11. package/lib/src/components/SwipeableItem/SwipeableList.js +29 -0
  12. package/lib/src/components/SwipeableItem/SwipeableList.js.map +1 -0
  13. package/lib/src/components/SwipeableItem/index.d.ts +3 -0
  14. package/lib/src/components/SwipeableItem/index.js +4 -0
  15. package/lib/src/components/{SwipeableView → SwipeableItem}/index.js.map +1 -1
  16. package/lib/src/index.d.ts +1 -1
  17. package/lib/src/index.js +1 -1
  18. package/lib/src/index.js.map +1 -1
  19. package/lib/tsconfig.tsbuildinfo +1 -1
  20. package/package.json +3 -3
  21. package/src/components/SwipeableItem/SwipeableItem.js +114 -0
  22. package/src/components/SwipeableItem/SwipeableItem.js.map +1 -0
  23. package/src/components/{SwipeableView/SwipeableView.tsx → SwipeableItem/SwipeableItem.tsx} +100 -89
  24. package/src/components/SwipeableItem/SwipeableItemButton.js +6 -0
  25. package/src/components/SwipeableItem/SwipeableItemButton.js.map +1 -0
  26. package/src/components/SwipeableItem/SwipeableItemButton.tsx +11 -0
  27. package/src/components/SwipeableItem/SwipeableItemCommon.js +44 -0
  28. package/src/components/SwipeableItem/SwipeableItemCommon.js.map +1 -0
  29. package/src/components/SwipeableItem/SwipeableItemCommon.ts +80 -0
  30. package/src/components/SwipeableItem/SwipeableList.js +29 -0
  31. package/src/components/SwipeableItem/SwipeableList.js.map +1 -0
  32. package/src/components/SwipeableItem/SwipeableList.tsx +62 -0
  33. package/src/components/SwipeableItem/index.js +4 -0
  34. package/src/components/{SwipeableView → SwipeableItem}/index.js.map +1 -1
  35. package/src/components/SwipeableItem/index.tsx +3 -0
  36. package/src/index.js +1 -1
  37. package/src/index.js.map +1 -1
  38. package/src/index.tsx +4 -4
  39. package/lib/src/components/SwipeableView/SwipeableView.d.ts +0 -28
  40. package/lib/src/components/SwipeableView/SwipeableView.js +0 -119
  41. package/lib/src/components/SwipeableView/SwipeableView.js.map +0 -1
  42. package/lib/src/components/SwipeableView/SwipeableViewButton.d.ts +0 -12
  43. package/lib/src/components/SwipeableView/SwipeableViewButton.js +0 -6
  44. package/lib/src/components/SwipeableView/SwipeableViewButton.js.map +0 -1
  45. package/lib/src/components/SwipeableView/SwipeableViewSwipeHandler.d.ts +0 -12
  46. package/lib/src/components/SwipeableView/SwipeableViewSwipeHandler.js +0 -6
  47. package/lib/src/components/SwipeableView/SwipeableViewSwipeHandler.js.map +0 -1
  48. package/lib/src/components/SwipeableView/index.d.ts +0 -3
  49. package/lib/src/components/SwipeableView/index.js +0 -4
  50. package/src/components/SwipeableView/SwipeableView.js +0 -119
  51. package/src/components/SwipeableView/SwipeableView.js.map +0 -1
  52. package/src/components/SwipeableView/SwipeableViewButton.js +0 -6
  53. package/src/components/SwipeableView/SwipeableViewButton.js.map +0 -1
  54. package/src/components/SwipeableView/SwipeableViewButton.tsx +0 -18
  55. package/src/components/SwipeableView/SwipeableViewSwipeHandler.js +0 -6
  56. package/src/components/SwipeableView/SwipeableViewSwipeHandler.js.map +0 -1
  57. package/src/components/SwipeableView/SwipeableViewSwipeHandler.tsx +0 -20
  58. package/src/components/SwipeableView/index.js +0 -4
  59. package/src/components/SwipeableView/index.tsx +0 -3
@@ -0,0 +1,43 @@
1
+ import React from "react";
2
+ import { StyleProp, ViewStyle, TextStyle } from "react-native";
3
+ import { IconSlot } from "../../interfaces/Icon";
4
+ import type { Theme } from "../../styles/DefaultTheme";
5
+ import { RightSwipeProps, LeftSwipeProps } from "./SwipeableItemCommon";
6
+ /**
7
+ * Clarification Regarding left/right directions and what they mean in the context of this component
8
+ * ------------------------------------------------------------------------------------------------------------
9
+ * Swipe Left / Left Swipe = Swiping to the left (i.e. Swiping from the right)
10
+ * Swipe Right / Right Swipe = Swiping to the right (i.e. Swiping from the left)
11
+ *
12
+ * This is only applies in the context of swipes, and not anywhere where a direction is refernced.
13
+ * For example 'rightOpenValue' referes to the open value on the right side.
14
+ * While 'stopRightSwipe' refers to the stop value of the swipe from left to right, which is on the left side.
15
+ * This is because one refers to a swipe and one does not, so the word 'right' has different meanings.
16
+ *
17
+ * This component is built around this concept to avoid confusion
18
+ */
19
+ export interface SwipeableItemProps extends IconSlot {
20
+ closeOnPress?: boolean;
21
+ leftOpenValue?: number;
22
+ rightOpenValue?: number;
23
+ leftActivationValue?: number;
24
+ rightActivationValue?: number;
25
+ swipeActivationPercentage?: number;
26
+ stopLeftSwipe?: number;
27
+ stopRightSwipe?: number;
28
+ directionalDistanceChangeThreshold?: number;
29
+ friction?: number;
30
+ tension?: number;
31
+ disableLeftSwipe?: boolean;
32
+ disableRightSwipe?: boolean;
33
+ swipeToOpenVelocityContribution?: number;
34
+ swipeToOpenPercent?: number;
35
+ swipeToClosePercent?: number;
36
+ style?: StyleProp<ViewStyle | TextStyle>;
37
+ theme: Theme;
38
+ }
39
+ declare type Props = SwipeableItemProps & RightSwipeProps & LeftSwipeProps;
40
+ declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<React.PropsWithChildren<Props>, "theme"> & {
41
+ theme?: import("@draftbit/react-theme-provider").$DeepPartial<any> | undefined;
42
+ }> & import("@draftbit/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<React.PropsWithChildren<Props>> & React.FC<React.PropsWithChildren<Props>>, {}>;
43
+ export default _default;
@@ -0,0 +1,114 @@
1
+ import React from "react";
2
+ import { View, StyleSheet, Text, } from "react-native";
3
+ import Pressable from "../Pressable";
4
+ import { extractBorderAndMarginStyles, extractEffectStyles, extractFlexItemStyles, extractPositionStyles, extractSizeStyles, extractStyles, } from "../../utilities";
5
+ import { SwipeRow } from "react-native-swipe-list-view";
6
+ import { withTheme } from "../../theming";
7
+ import { SwipeableListContext } from "./SwipeableList";
8
+ import { leftSwipeToSwipeableItemBehindItem, rightSwipeToSwipeableItemBehindItem, extractLeftSwipeProps, extractRightSwipeProps, } from "./SwipeableItemCommon";
9
+ const SwipeableItem = ({ theme, style, children, Icon, closeOnPress, leftOpenValue, rightOpenValue, leftActivationValue, rightActivationValue, swipeActivationPercentage = 80, stopLeftSwipe, stopRightSwipe, friction = 20, ...rest }) => {
10
+ const instanceOfSwipeableItemButtonProps = (object) => {
11
+ return "title" in object && "revealSwipeDirection" in object;
12
+ };
13
+ const isEmptyObject = (object) => {
14
+ return Object.keys(object).length === 0;
15
+ };
16
+ const { onStartSwiping, onStopSwiping } = React.useContext(SwipeableListContext);
17
+ const { viewStyles, textStyles } = extractStyles(style);
18
+ const { borderStyles, marginStyles } = extractBorderAndMarginStyles(viewStyles);
19
+ const sizeStyles = extractSizeStyles(viewStyles);
20
+ const parentContainerStyles = StyleSheet.flatten([
21
+ borderStyles,
22
+ marginStyles,
23
+ extractFlexItemStyles(viewStyles),
24
+ extractPositionStyles(viewStyles),
25
+ extractEffectStyles(viewStyles),
26
+ sizeStyles,
27
+ ]);
28
+ //Remove styles already consumed from viewStyles
29
+ Object.keys(parentContainerStyles).forEach((key) => delete viewStyles[key]);
30
+ const surfaceContainerStyles = StyleSheet.flatten([
31
+ viewStyles,
32
+ sizeStyles /* Size styles needs to be readded to surface container due to inconsistencies on web */,
33
+ ]);
34
+ const [componentWidth, setComponentWidth] = React.useState(null);
35
+ const leftSwipeButtons = React.useMemo(() => React.Children.toArray(children).filter((child) => React.isValidElement(child) &&
36
+ instanceOfSwipeableItemButtonProps(child.props) &&
37
+ child.props.revealSwipeDirection === "left"), [children]);
38
+ const rightSwipeButtons = React.useMemo(() => React.Children.toArray(children).filter((child) => React.isValidElement(child) &&
39
+ instanceOfSwipeableItemButtonProps(child.props) &&
40
+ child.props.revealSwipeDirection === "right"), [children]);
41
+ const remainingChildren = React.useMemo(() => React.Children.toArray(children).filter((child) => React.isValidElement(child) &&
42
+ !instanceOfSwipeableItemButtonProps(child.props)), [children]);
43
+ const leftSwipe = extractLeftSwipeProps(rest);
44
+ const rightSwipe = extractRightSwipeProps(rest);
45
+ const isLeftSwipeHandled = !isEmptyObject(leftSwipe);
46
+ const isRightSwipeHandled = !isEmptyObject(rightSwipe);
47
+ if (leftSwipeButtons.length > 2 || rightSwipeButtons.length > 2) {
48
+ throw Error("Cannot have more than 2 SwipeableItemButton(s) per side");
49
+ }
50
+ if ((leftSwipeButtons.length && isLeftSwipeHandled) ||
51
+ (rightSwipeButtons.length && isRightSwipeHandled)) {
52
+ throw Error("Colliding configuration in SwipeableItem. You cannot have SwipeableItemButton(s) on the swipe direction where swipe handling is configured. Either reset swipe configuration or remove the button(s).");
53
+ }
54
+ //Renders a single 'behind' item. Used for both buttons and swipe handler
55
+ const renderBehindItem = (item, index) => (React.createElement(Pressable, { key: index.toString(), onPress: item.onPress, style: [
56
+ styles.buttonContainer,
57
+ { backgroundColor: item.backgroundColor || theme.colors.primary },
58
+ ] },
59
+ item.icon && (React.createElement(Icon, { name: item.icon, size: item.iconSize || 25, color: item.color || theme.colors.surface })),
60
+ item.title && (React.createElement(Text, { style: [textStyles, { color: item.color || theme.colors.surface }] }, item.title))));
61
+ const defaultLeftOpenValue = componentWidth ? componentWidth / 2 : 0;
62
+ const defaultRightOpenValue = componentWidth ? -componentWidth / 2 : 0;
63
+ return (React.createElement(View, { onLayout: (event) => {
64
+ setComponentWidth(event.nativeEvent.layout.width);
65
+ }, style: [styles.parentContainer, parentContainerStyles] },
66
+ React.createElement(SwipeRow, { leftOpenValue: isRightSwipeHandled ? 0 : leftOpenValue || defaultLeftOpenValue //If in swiping mode, don't keep open
67
+ , rightOpenValue: isLeftSwipeHandled ? 0 : rightOpenValue || defaultRightOpenValue, leftActivationValue: leftActivationValue || isRightSwipeHandled
68
+ ? defaultLeftOpenValue * (swipeActivationPercentage / 100) //When swipe passes activation percentage then it should be considered activated (call onSwipe)
69
+ : defaultLeftOpenValue, rightActivationValue: rightActivationValue || isLeftSwipeHandled
70
+ ? defaultRightOpenValue * (swipeActivationPercentage / 100)
71
+ : defaultRightOpenValue, stopLeftSwipe: stopRightSwipe || defaultLeftOpenValue, stopRightSwipe: stopLeftSwipe || defaultRightOpenValue, onLeftAction: isRightSwipeHandled ? () => { var _a; return (_a = rightSwipe.onSwipedRight) === null || _a === void 0 ? void 0 : _a.call(rightSwipe); } : undefined, onRightAction: isLeftSwipeHandled ? () => { var _a; return (_a = leftSwipe.onSwipedLeft) === null || _a === void 0 ? void 0 : _a.call(leftSwipe); } : undefined, swipeGestureBegan: onStartSwiping, swipeGestureEnded: onStopSwiping, closeOnRowPress: closeOnPress, friction: friction, ...rest },
72
+ React.createElement(View, { style: styles.behindContainer },
73
+ React.createElement(View, { style: styles.behindContainerItem }, isRightSwipeHandled
74
+ ? renderBehindItem(rightSwipeToSwipeableItemBehindItem(rightSwipe), 0)
75
+ : rightSwipeButtons.map((item, index) => renderBehindItem(item.props, index))),
76
+ React.createElement(View, { style: styles.behindContainerItem }, isLeftSwipeHandled
77
+ ? renderBehindItem(leftSwipeToSwipeableItemBehindItem(leftSwipe), 0)
78
+ : leftSwipeButtons.map((item, index) => renderBehindItem(item.props, index)))),
79
+ React.createElement(View, { style: [
80
+ styles.surfaceContainer,
81
+ {
82
+ backgroundColor: theme.colors.background,
83
+ },
84
+ surfaceContainerStyles,
85
+ ] }, remainingChildren))));
86
+ };
87
+ const styles = StyleSheet.create({
88
+ parentContainer: {
89
+ overflow: "hidden",
90
+ minHeight: 50,
91
+ },
92
+ behindContainer: {
93
+ flex: 1,
94
+ width: "100%",
95
+ height: "100%",
96
+ flexDirection: "row",
97
+ },
98
+ behindContainerItem: {
99
+ flex: 1,
100
+ flexDirection: "row",
101
+ },
102
+ buttonContainer: {
103
+ flex: 1,
104
+ alignItems: "center",
105
+ justifyContent: "center",
106
+ },
107
+ surfaceContainer: {
108
+ width: "100%",
109
+ minHeight: 50,
110
+ overflow: "hidden",
111
+ },
112
+ });
113
+ export default withTheme(SwipeableItem);
114
+ //# sourceMappingURL=SwipeableItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SwipeableItem.js","sourceRoot":"","sources":["../../../../src/components/SwipeableItem/SwipeableItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,IAAI,EAIJ,UAAU,EACV,IAAI,GACL,MAAM,cAAc,CAAC;AACtB,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EACL,4BAA4B,EAC5B,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,GACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAGxD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAIL,kCAAkC,EAClC,mCAAmC,EACnC,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAuC/B,MAAM,aAAa,GAA6C,CAAC,EAC/D,KAAK,EACL,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,yBAAyB,GAAG,EAAE,EAC9B,aAAa,EACb,cAAc,EACd,QAA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S,EAAE,EAAE;QACb,QAAQ,EAAE,QAAQ;KACnB;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC,aAAa,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import { SwipeableItemBehindItem } from "./SwipeableItemCommon";
3
+ export declare type SwipeableItemButtonProps = Omit<SwipeableItemBehindItem, "onSwipe">;
4
+ declare const SwipeableItemButton: React.FC<SwipeableItemButtonProps>;
5
+ export default SwipeableItemButton;
@@ -0,0 +1,6 @@
1
+ //Renders nothing, acts as a wrapper be used by SwipeableView
2
+ const SwipeableItemButton = () => {
3
+ return null;
4
+ };
5
+ export default SwipeableItemButton;
6
+ //# sourceMappingURL=SwipeableItemButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SwipeableItemButton.js","sourceRoot":"","sources":["../../../../src/components/SwipeableItem/SwipeableItemButton.tsx"],"names":[],"mappings":"AAKA,6DAA6D;AAC7D,MAAM,mBAAmB,GAAuC,GAAG,EAAE;IACnE,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,30 @@
1
+ export interface SwipeableItemBehindItem {
2
+ title: string;
3
+ revealSwipeDirection: "left" | "right";
4
+ onPress?: () => void;
5
+ onSwipe?: () => void;
6
+ icon?: string;
7
+ iconSize?: number;
8
+ backgroundColor?: string;
9
+ color?: string;
10
+ }
11
+ export interface RightSwipeProps {
12
+ onSwipedRight?: () => void;
13
+ rightSwipeTitle?: string;
14
+ rightSwipeIcon?: string;
15
+ rightSwipeIconSize?: number;
16
+ rightSwipeBackgroundColor?: string;
17
+ rightSwipeColor?: string;
18
+ }
19
+ export interface LeftSwipeProps {
20
+ onSwipedLeft?: () => void;
21
+ leftSwipeTitle?: string;
22
+ leftSwipeIcon?: string;
23
+ leftSwipeIconSize?: number;
24
+ leftSwipeBackgroundColor?: string;
25
+ leftSwipeColor?: string;
26
+ }
27
+ export declare function extractRightSwipeProps(object: object): RightSwipeProps;
28
+ export declare function extractLeftSwipeProps(object: object): LeftSwipeProps;
29
+ export declare function rightSwipeToSwipeableItemBehindItem(swipe: RightSwipeProps): Omit<SwipeableItemBehindItem, "onPress">;
30
+ export declare function leftSwipeToSwipeableItemBehindItem(swipe: LeftSwipeProps): Omit<SwipeableItemBehindItem, "onPress">;
@@ -0,0 +1,44 @@
1
+ import { pick } from "lodash";
2
+ export function extractRightSwipeProps(object) {
3
+ return pick(object, [
4
+ "onSwipedRight",
5
+ "rightSwipeTitle",
6
+ "rightSwipeIcon",
7
+ "rightSwipeIconSize",
8
+ "rightSwipeBackgroundColor",
9
+ "rightSwipeColor",
10
+ ]);
11
+ }
12
+ export function extractLeftSwipeProps(object) {
13
+ return pick(object, [
14
+ "onSwipedLeft",
15
+ "leftSwipeTitle",
16
+ "leftSwipeIcon",
17
+ "leftSwipeIconSize",
18
+ "leftSwipeBackgroundColor",
19
+ "leftSwipeColor",
20
+ ]);
21
+ }
22
+ export function rightSwipeToSwipeableItemBehindItem(swipe) {
23
+ return {
24
+ title: swipe.rightSwipeTitle || "",
25
+ revealSwipeDirection: "right",
26
+ onSwipe: swipe.onSwipedRight,
27
+ icon: swipe.rightSwipeIcon,
28
+ iconSize: swipe.rightSwipeIconSize,
29
+ backgroundColor: swipe.rightSwipeBackgroundColor,
30
+ color: swipe.rightSwipeColor,
31
+ };
32
+ }
33
+ export function leftSwipeToSwipeableItemBehindItem(swipe) {
34
+ return {
35
+ title: swipe.leftSwipeTitle || "",
36
+ revealSwipeDirection: "left",
37
+ onSwipe: swipe.onSwipedLeft,
38
+ icon: swipe.leftSwipeIcon,
39
+ iconSize: swipe.leftSwipeIconSize,
40
+ backgroundColor: swipe.leftSwipeBackgroundColor,
41
+ color: swipe.leftSwipeColor,
42
+ };
43
+ }
44
+ //# sourceMappingURL=SwipeableItemCommon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SwipeableItemCommon.js","sourceRoot":"","sources":["../../../../src/components/SwipeableItem/SwipeableItemCommon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AA+B9B,MAAM,UAAU,sBAAsB,CAAC,MAAc;IACnD,OAAO,IAAI,CAAC,MAAM,EAAE;QAClB,eAAe;QACf,iBAAiB;QACjB,gBAAgB;QAChB,oBAAoB;QACpB,2BAA2B;QAC3B,iBAAiB;KAClB,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,MAAc;IAClD,OAAO,IAAI,CAAC,MAAM,EAAE;QAClB,cAAc;QACd,gBAAgB;QAChB,eAAe;QACf,mBAAmB;QACnB,0BAA0B;QAC1B,gBAAgB;KACjB,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,mCAAmC,CACjD,KAAsB;IAEtB,OAAO;QACL,KAAK,EAAE,KAAK,CAAC,eAAe,IAAI,EAAE;QAClC,oBAAoB,EAAE,OAAO;QAC7B,OAAO,EAAE,KAAK,CAAC,aAAa;QAC5B,IAAI,EAAE,KAAK,CAAC,cAAc;QAC1B,QAAQ,EAAE,KAAK,CAAC,kBAAkB;QAClC,eAAe,EAAE,KAAK,CAAC,yBAAyB;QAChD,KAAK,EAAE,KAAK,CAAC,eAAe;KAC7B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kCAAkC,CAChD,KAAqB;IAErB,OAAO;QACL,KAAK,EAAE,KAAK,CAAC,cAAc,IAAI,EAAE;QACjC,oBAAoB,EAAE,MAAM;QAC5B,OAAO,EAAE,KAAK,CAAC,YAAY;QAC3B,IAAI,EAAE,KAAK,CAAC,aAAa;QACzB,QAAQ,EAAE,KAAK,CAAC,iBAAiB;QACjC,eAAe,EAAE,KAAK,CAAC,wBAAwB;QAC/C,KAAK,EAAE,KAAK,CAAC,cAAc;KAC5B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ import { FlashListProps } from "@shopify/flash-list";
3
+ import { FlatListProps } from "react-native";
4
+ declare type ListComponentType = "FlatList" | "FlashList";
5
+ interface AdditionalSwipeableListProps {
6
+ disableScrollWhenSwiping?: boolean;
7
+ listComponent?: ListComponentType;
8
+ }
9
+ declare type FlatListSwipeableListProps<T> = FlatListProps<T> & AdditionalSwipeableListProps;
10
+ declare type FlashListSwipeableListProps<T> = FlashListProps<T> & AdditionalSwipeableListProps;
11
+ declare type SwipeableListContextType = {
12
+ onStartSwiping: () => void;
13
+ onStopSwiping: () => void;
14
+ };
15
+ export declare const SwipeableListContext: React.Context<SwipeableListContextType>;
16
+ declare const SwipeableList: <T extends object>({ disableScrollWhenSwiping, listComponent, ...rest }: FlashListSwipeableListProps<T> | FlatListSwipeableListProps<T>) => JSX.Element;
17
+ export default SwipeableList;
@@ -0,0 +1,29 @@
1
+ import React from "react";
2
+ import { FlashList } from "@shopify/flash-list";
3
+ import { FlatList } from "react-native";
4
+ export const SwipeableListContext = React.createContext({
5
+ onStartSwiping: () => { },
6
+ onStopSwiping: () => { },
7
+ });
8
+ const SwipeableList = ({ disableScrollWhenSwiping = true, listComponent = "FlatList", ...rest }) => {
9
+ const [isSwiping, setIsSwiping] = React.useState(false);
10
+ const onStartSwiping = () => {
11
+ setIsSwiping(true);
12
+ };
13
+ const onStopSwiping = () => {
14
+ setIsSwiping(false);
15
+ };
16
+ rest.scrollEnabled = disableScrollWhenSwiping ? !isSwiping : true;
17
+ const renderListComponent = () => {
18
+ switch (listComponent) {
19
+ case "FlatList":
20
+ return React.createElement(FlatList, { ...rest });
21
+ case "FlashList":
22
+ return React.createElement(FlashList, { ...rest });
23
+ }
24
+ };
25
+ return (React.createElement(SwipeableListContext.Provider, { value: { onStartSwiping, onStopSwiping } },
26
+ React.createElement(React.Fragment, null, renderListComponent())));
27
+ };
28
+ export default SwipeableList;
29
+ //# sourceMappingURL=SwipeableList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SwipeableList.js","sourceRoot":"","sources":["../../../../src/components/SwipeableItem/SwipeableList.tsx"],"names":[],"mappings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,3 @@
1
+ export { default as SwipeableItem } from "./SwipeableItem";
2
+ export { default as SwipeableItemButton } from "./SwipeableItemButton";
3
+ export { default as SwipeableList } from "./SwipeableList";
@@ -0,0 +1,4 @@
1
+ export { default as SwipeableItem } from "./SwipeableItem";
2
+ export { default as SwipeableItemButton } from "./SwipeableItemButton";
3
+ export { default as SwipeableList } from "./SwipeableList";
4
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/SwipeableView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/SwipeableItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -38,7 +38,7 @@ export { default as Markdown } from "./components/Markdown";
38
38
  export { BottomSheet } from "./components/BottomSheet";
39
39
  export { YoutubePlayer } from "./components/YoutubePlayer";
40
40
  export { Table, TableRow, TableCell } from "./components/Table";
41
- export { SwipeableView, SwipeableViewButton, SwipeableViewSwipeHandler, } from "./components/SwipeableView";
41
+ export { SwipeableItem, SwipeableItemButton, SwipeableList, } from "./components/SwipeableItem";
42
42
  export { default as DatePicker } from "./components/DatePicker/DatePicker";
43
43
  export { default as Picker } from "./components/Picker/Picker";
44
44
  export { default as ProgressBar } from "./components/ProgressBar";
package/lib/src/index.js CHANGED
@@ -38,7 +38,7 @@ export { default as Markdown } from "./components/Markdown";
38
38
  export { BottomSheet } from "./components/BottomSheet";
39
39
  export { YoutubePlayer } from "./components/YoutubePlayer";
40
40
  export { Table, TableRow, TableCell } from "./components/Table";
41
- export { SwipeableView, SwipeableViewButton, SwipeableViewSwipeHandler, } from "./components/SwipeableView";
41
+ export { SwipeableItem, SwipeableItemButton, SwipeableList, } from "./components/SwipeableItem";
42
42
  /* Deprecated: Fix or Delete! */
43
43
  export { default as DatePicker } from "./components/DatePicker/DatePicker";
44
44
  export { default as Picker } from "./components/Picker/Picker";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC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