@draftbit/core 46.11.5-d49547.2 → 46.11.6-74496c.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 (90) hide show
  1. package/lib/commonjs/components/BottomSheet/BottomSheet.js +18 -3
  2. package/lib/commonjs/components/BottomSheet/BottomSheet.js.map +1 -1
  3. package/lib/commonjs/components/Checkbox/CheckboxGroup.js +3 -16
  4. package/lib/commonjs/components/Checkbox/CheckboxGroup.js.map +1 -1
  5. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +5 -22
  6. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js.map +1 -1
  7. package/lib/commonjs/components/Checkbox/CheckboxRow.js +23 -6
  8. package/lib/commonjs/components/Checkbox/CheckboxRow.js.map +1 -1
  9. package/lib/commonjs/index.js +0 -19
  10. package/lib/commonjs/index.js.map +1 -1
  11. package/lib/commonjs/mappings/BottomSheet.js +37 -9
  12. package/lib/commonjs/mappings/BottomSheet.js.map +1 -1
  13. package/lib/commonjs/utilities.js +2 -27
  14. package/lib/commonjs/utilities.js.map +1 -1
  15. package/lib/module/components/ActionSheet/ActionSheetItem.js.map +1 -1
  16. package/lib/module/components/BottomSheet/BottomSheet.js +18 -3
  17. package/lib/module/components/BottomSheet/BottomSheet.js.map +1 -1
  18. package/lib/module/components/BottomSheet/index.js.map +1 -1
  19. package/lib/module/components/DatePicker/DatePicker.js +27 -13
  20. package/lib/module/components/DatePicker/DatePicker.js.map +1 -1
  21. package/lib/module/components/Divider.js +17 -1
  22. package/lib/module/components/Divider.js.map +1 -1
  23. package/lib/module/components/StarRating.js +4 -23
  24. package/lib/module/components/StarRating.js.map +1 -1
  25. package/lib/module/index.js +0 -1
  26. package/lib/module/index.js.map +1 -1
  27. package/lib/module/mappings/BottomSheet.js +38 -10
  28. package/lib/module/mappings/BottomSheet.js.map +1 -1
  29. package/lib/module/mappings/IconButton.js.map +1 -1
  30. package/lib/module/mappings/SafeAreaView.js.map +1 -1
  31. package/lib/module/theming.js.map +1 -1
  32. package/lib/module/utilities.js +0 -18
  33. package/lib/module/utilities.js.map +1 -1
  34. package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts +6 -1
  35. package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts.map +1 -1
  36. package/lib/typescript/src/index.d.ts +0 -1
  37. package/lib/typescript/src/index.d.ts.map +1 -1
  38. package/lib/typescript/src/mappings/BottomSheet.d.ts +48 -4
  39. package/lib/typescript/src/mappings/BottomSheet.d.ts.map +1 -1
  40. package/lib/typescript/src/utilities.d.ts +0 -6
  41. package/lib/typescript/src/utilities.d.ts.map +1 -1
  42. package/package.json +3 -4
  43. package/src/components/BottomSheet/BottomSheet.js +17 -2
  44. package/src/components/BottomSheet/BottomSheet.tsx +32 -4
  45. package/src/index.js +0 -1
  46. package/src/index.tsx +0 -6
  47. package/src/mappings/BottomSheet.js +37 -9
  48. package/src/mappings/BottomSheet.ts +43 -8
  49. package/src/utilities.js +0 -41
  50. package/src/utilities.ts +0 -71
  51. package/lib/commonjs/components/SwipeableView/SwipeableView.js +0 -155
  52. package/lib/commonjs/components/SwipeableView/SwipeableView.js.map +0 -1
  53. package/lib/commonjs/components/SwipeableView/SwipeableViewButton.js +0 -13
  54. package/lib/commonjs/components/SwipeableView/SwipeableViewButton.js.map +0 -1
  55. package/lib/commonjs/components/SwipeableView/SwipeableViewSwipeHandler.js +0 -13
  56. package/lib/commonjs/components/SwipeableView/SwipeableViewSwipeHandler.js.map +0 -1
  57. package/lib/commonjs/components/SwipeableView/index.js +0 -28
  58. package/lib/commonjs/components/SwipeableView/index.js.map +0 -1
  59. package/lib/commonjs/mappings/SwipeableView.js +0 -182
  60. package/lib/commonjs/mappings/SwipeableView.js.map +0 -1
  61. package/lib/module/components/SwipeableView/SwipeableView.js +0 -147
  62. package/lib/module/components/SwipeableView/SwipeableView.js.map +0 -1
  63. package/lib/module/components/SwipeableView/SwipeableViewButton.js +0 -6
  64. package/lib/module/components/SwipeableView/SwipeableViewButton.js.map +0 -1
  65. package/lib/module/components/SwipeableView/SwipeableViewSwipeHandler.js +0 -6
  66. package/lib/module/components/SwipeableView/SwipeableViewSwipeHandler.js.map +0 -1
  67. package/lib/module/components/SwipeableView/index.js +0 -4
  68. package/lib/module/components/SwipeableView/index.js.map +0 -1
  69. package/lib/module/mappings/SwipeableView.js +0 -175
  70. package/lib/module/mappings/SwipeableView.js.map +0 -1
  71. package/lib/typescript/src/components/SwipeableView/SwipeableView.d.ts +0 -29
  72. package/lib/typescript/src/components/SwipeableView/SwipeableView.d.ts.map +0 -1
  73. package/lib/typescript/src/components/SwipeableView/SwipeableViewButton.d.ts +0 -13
  74. package/lib/typescript/src/components/SwipeableView/SwipeableViewButton.d.ts.map +0 -1
  75. package/lib/typescript/src/components/SwipeableView/SwipeableViewSwipeHandler.d.ts +0 -13
  76. package/lib/typescript/src/components/SwipeableView/SwipeableViewSwipeHandler.d.ts.map +0 -1
  77. package/lib/typescript/src/components/SwipeableView/index.d.ts +0 -4
  78. package/lib/typescript/src/components/SwipeableView/index.d.ts.map +0 -1
  79. package/lib/typescript/src/mappings/SwipeableView.d.ts +0 -371
  80. package/lib/typescript/src/mappings/SwipeableView.d.ts.map +0 -1
  81. package/src/components/SwipeableView/SwipeableView.js +0 -117
  82. package/src/components/SwipeableView/SwipeableView.tsx +0 -299
  83. package/src/components/SwipeableView/SwipeableViewButton.js +0 -5
  84. package/src/components/SwipeableView/SwipeableViewButton.tsx +0 -18
  85. package/src/components/SwipeableView/SwipeableViewSwipeHandler.js +0 -5
  86. package/src/components/SwipeableView/SwipeableViewSwipeHandler.tsx +0 -20
  87. package/src/components/SwipeableView/index.js +0 -3
  88. package/src/components/SwipeableView/index.tsx +0 -3
  89. package/src/mappings/SwipeableView.js +0 -181
  90. package/src/mappings/SwipeableView.ts +0 -210
@@ -10,12 +10,6 @@ export declare function extractBorderAndMarginStyles(style: StyleProp<any>, addi
10
10
  borderStyles: import("lodash").Dictionary<any>;
11
11
  marginStyles: import("lodash").Dictionary<any>;
12
12
  };
13
- export declare const flexItemStyleNames: string[];
14
- export declare function extractFlexItemStyles(style: StyleProp<any>, additionalFlexItemStyles?: string[]): import("lodash").Dictionary<any>;
15
- export declare const positionStyleNames: string[];
16
- export declare function extractPositionStyles(style: StyleProp<any>, additionalPositionStyles?: string[]): import("lodash").Dictionary<any>;
17
- export declare const effectsStyleNames: string[];
18
- export declare function extractEffectStyles(style: StyleProp<any>, additionalEffectStyles?: string[]): import("lodash").Dictionary<any>;
19
13
  export declare const sizeStyleNames: string[];
20
14
  export declare function extractSizeStyles(style: StyleProp<any>, additionalSizeStyles?: string[]): import("lodash").Dictionary<any>;
21
15
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../../../src/utilities.ts"],"names":[],"mappings":";AAAA,OAAO,EAAc,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGhE,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC;;;EA+BlD;AAED,eAAO,MAAM,gBAAgB,UAwB5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,UAU5B,CAAC;AAEF,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC,EACrB,sBAAsB,CAAC,EAAE,MAAM,EAAE,EACjC,sBAAsB,CAAC,EAAE,MAAM,EAAE;;;EAqBlC;AAED,eAAO,MAAM,kBAAkB,UAM9B,CAAC;AAEF,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC,EACrB,wBAAwB,CAAC,EAAE,MAAM,EAAE,oCAapC;AAED,eAAO,MAAM,kBAAkB,UAQ9B,CAAC;AAEF,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC,EACrB,wBAAwB,CAAC,EAAE,MAAM,EAAE,oCAapC;AAED,eAAO,MAAM,iBAAiB,UAA2B,CAAC;AA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S,OAe1C;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,UAQ5D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.11.5-d49547.2+d495478",
3
+ "version": "46.11.6-74496c.2+74496ce",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -41,7 +41,7 @@
41
41
  "dependencies": {
42
42
  "@date-io/date-fns": "^1.3.13",
43
43
  "@draftbit/react-theme-provider": "^2.1.1",
44
- "@draftbit/types": "^46.11.5-d49547.2+d495478",
44
+ "@draftbit/types": "^46.11.6-74496c.2+74496ce",
45
45
  "@material-ui/core": "^4.11.0",
46
46
  "@material-ui/pickers": "^3.2.10",
47
47
  "@react-native-community/slider": "4.2.3",
@@ -61,7 +61,6 @@
61
61
  "react-native-reanimated": "~2.9.1",
62
62
  "react-native-shadow-2": "^7.0.6",
63
63
  "react-native-svg": "12.3.0",
64
- "react-native-swipe-list-view": "^3.2.9",
65
64
  "react-native-tab-view": "^3.4.0",
66
65
  "react-native-typography": "^1.4.1",
67
66
  "react-native-web-swiper": "^2.2.3",
@@ -94,5 +93,5 @@
94
93
  "node_modules/",
95
94
  "lib/"
96
95
  ],
97
- "gitHead": "d49547859c2c87ff13960d1e68410aa1ff69ce4a"
96
+ "gitHead": "74496ce7f63ca59fddea06aaf2ee2f19734f0de0"
98
97
  }
@@ -2,10 +2,25 @@ import React from "react";
2
2
  import { StyleSheet, View, } from "react-native";
3
3
  import BottomSheetComponent from "./BottomSheetComponent";
4
4
  import { withTheme } from "../../theming";
5
- const BottomSheet = ({ theme, snapPoints = ["10%", "50%", "80%"], initialSnapIndex = 0, showHandle = true, handleColor = theme.colors.divider, topBorderRadius = 20, borderWidth = 1, borderColor = theme.colors.divider, onSettle, style, children, ...rest }) => {
5
+ const BottomSheet = ({ theme, snapPoints: snapPointsProp, topSnapPosition = "10%", middleSnapPosition = "50%", bottomSnapPosition = "80%", initialSnapIndex, initialSnapPosition = "bottom", showHandle = true, handleColor = theme.colors.divider, topBorderRadius = 20, borderWidth = 1, borderColor = theme.colors.divider, onSettle, style, children, ...rest }) => {
6
6
  const backgroundColor = (style === null || style === void 0 ? void 0 : style.backgroundColor) || theme.colors.background;
7
+ const snapPoints = snapPointsProp || [
8
+ topSnapPosition,
9
+ middleSnapPosition,
10
+ bottomSnapPosition,
11
+ ];
12
+ const getSnapIndexFromPosition = (position) => {
13
+ switch (position) {
14
+ case "top":
15
+ return 0;
16
+ case "middle":
17
+ return 1;
18
+ case "bottom":
19
+ return 2;
20
+ }
21
+ };
7
22
  return (React.createElement(View, { style: styles.parentContainer, pointerEvents: "box-none" },
8
- React.createElement(BottomSheetComponent, { componentType: "ScrollView", snapPoints: snapPoints, initialSnapIndex: initialSnapIndex, renderHandle: () => (React.createElement(React.Fragment, null, showHandle && (React.createElement(View, { style: [
23
+ React.createElement(BottomSheetComponent, { componentType: "ScrollView", snapPoints: snapPoints, initialSnapIndex: initialSnapIndex !== null && initialSnapIndex !== void 0 ? initialSnapIndex : getSnapIndexFromPosition(initialSnapPosition), renderHandle: () => (React.createElement(React.Fragment, null, showHandle && (React.createElement(View, { style: [
9
24
  styles.handleContainer,
10
25
  {
11
26
  backgroundColor,
@@ -11,9 +11,14 @@ import BottomSheetComponent from "./BottomSheetComponent";
11
11
  import type { Theme } from "../../styles/DefaultTheme";
12
12
  import { withTheme } from "../../theming";
13
13
 
14
+ type SnapPosition = "top" | "middle" | "bottom";
14
15
  export interface BottomSheetProps extends ScrollViewProps {
15
- snapPoints?: (string | number)[];
16
+ topSnapPosition?: string | number;
17
+ middleSnapPosition?: string | number;
18
+ bottomSnapPosition?: string | number;
19
+ snapPoints: (string | number)[];
16
20
  initialSnapIndex?: number;
21
+ initialSnapPosition: SnapPosition;
17
22
  showHandle?: boolean;
18
23
  handleColor?: string;
19
24
  topBorderRadius?: number;
@@ -26,8 +31,12 @@ export interface BottomSheetProps extends ScrollViewProps {
26
31
 
27
32
  const BottomSheet: React.FC<React.PropsWithChildren<BottomSheetProps>> = ({
28
33
  theme,
29
- snapPoints = ["10%", "50%", "80%"],
30
- initialSnapIndex = 0,
34
+ snapPoints: snapPointsProp,
35
+ topSnapPosition = "10%",
36
+ middleSnapPosition = "50%",
37
+ bottomSnapPosition = "80%",
38
+ initialSnapIndex,
39
+ initialSnapPosition = "bottom",
31
40
  showHandle = true,
32
41
  handleColor = theme.colors.divider,
33
42
  topBorderRadius = 20,
@@ -41,12 +50,31 @@ const BottomSheet: React.FC<React.PropsWithChildren<BottomSheetProps>> = ({
41
50
  const backgroundColor =
42
51
  (style as ViewStyle)?.backgroundColor || theme.colors.background;
43
52
 
53
+ const snapPoints = snapPointsProp || [
54
+ topSnapPosition,
55
+ middleSnapPosition,
56
+ bottomSnapPosition,
57
+ ];
58
+
59
+ const getSnapIndexFromPosition = (position: SnapPosition) => {
60
+ switch (position) {
61
+ case "top":
62
+ return 0;
63
+ case "middle":
64
+ return 1;
65
+ case "bottom":
66
+ return 2;
67
+ }
68
+ };
69
+
44
70
  return (
45
71
  <View style={styles.parentContainer} pointerEvents="box-none">
46
72
  <BottomSheetComponent
47
73
  componentType="ScrollView"
48
74
  snapPoints={snapPoints}
49
- initialSnapIndex={initialSnapIndex}
75
+ initialSnapIndex={
76
+ initialSnapIndex ?? getSnapIndexFromPosition(initialSnapPosition)
77
+ }
50
78
  renderHandle={() => (
51
79
  <>
52
80
  {showHandle && (
package/src/index.js CHANGED
@@ -38,7 +38,6 @@ 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";
42
41
  /* Deprecated: Fix or Delete! */
43
42
  export { default as DatePicker } from "./components/DatePicker/DatePicker";
44
43
  export { default as Picker } from "./components/Picker/Picker";
package/src/index.tsx CHANGED
@@ -64,12 +64,6 @@ export { YoutubePlayer } from "./components/YoutubePlayer";
64
64
 
65
65
  export { Table, TableRow, TableCell } from "./components/Table";
66
66
 
67
- export {
68
- SwipeableView,
69
- SwipeableViewButton,
70
- SwipeableViewSwipeHandler,
71
- } from "./components/SwipeableView";
72
-
73
67
  /* Deprecated: Fix or Delete! */
74
68
  export { default as DatePicker } from "./components/DatePicker/DatePicker";
75
69
  export { default as Picker } from "./components/Picker/Picker";
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createColorProp, createStaticNumberProp, createArrayProp, } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createColorProp, createStaticNumberProp, createArrayProp, GROUPS, createTextEnumProp, FORM_TYPES, } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Bottom Sheet",
4
4
  tag: "BottomSheet",
@@ -11,16 +11,32 @@ export const SEED_DATA = {
11
11
  label: "On settle",
12
12
  description: "Action to execute when sheet settles on a snap point",
13
13
  }),
14
- snapPoints: createArrayProp({
15
- label: "Snap points",
16
- description: "An array of numerical values (that represent distance from the top) where bottom sheet can snap to place. Accepts numbers and percentages (minimum 2 snap points)",
17
- defaultValue: ["10%", "50%", "80%"],
14
+ topSnapPosition: createStaticNumberProp({
15
+ label: "Top snap position",
16
+ description: "Top most postion where bottom sheet can snap to. A numerical value that represents distance from the top",
17
+ defaultValue: "10%",
18
+ required: false,
19
+ formType: FORM_TYPES.numeric,
18
20
  }),
19
- initialSnapIndex: createStaticNumberProp({
20
- label: "Initial snap index",
21
- description: "Index of the snap point to be used as the initial point",
22
- defaultValue: 0,
21
+ middleSnapPosition: createStaticNumberProp({
22
+ label: "Middle snap position",
23
+ description: "Middle postion where bottom sheet can snap to. A numerical value that represents distance from the top",
24
+ defaultValue: "50%",
23
25
  required: false,
26
+ formType: FORM_TYPES.numeric,
27
+ }),
28
+ bottomSnapPosition: createStaticNumberProp({
29
+ label: "Bottom snap position",
30
+ description: "Bottom most postion where bottom sheet can snap to. A numerical value that represents distance from the top",
31
+ defaultValue: "80%",
32
+ required: false,
33
+ formType: FORM_TYPES.numeric,
34
+ }),
35
+ initialSnapPosition: createTextEnumProp({
36
+ label: "Initial snap position",
37
+ description: "Initial snap position that bottom sheet will snap to",
38
+ options: ["top", "middle", "bottom"],
39
+ defaultValue: "bottom",
24
40
  }),
25
41
  showHandle: createStaticBoolProp({
26
42
  label: "Show handle",
@@ -59,5 +75,17 @@ export const SEED_DATA = {
59
75
  description: "When true, the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction.",
60
76
  defaultValue: true,
61
77
  }),
78
+ snapPoints: createArrayProp({
79
+ label: "Custom Snap points",
80
+ description: "An array of numerical values (that represent distance from the top) where bottom sheet can snap to. Accepts numbers and percentages (minimum 2 snap points). Overrides snap position props",
81
+ defaultValue: null,
82
+ }),
83
+ initialSnapIndex: createStaticNumberProp({
84
+ label: "Initial snap index",
85
+ description: "Index of the snap point to be used as the initial point. Overrides initial snap position",
86
+ defaultValue: null,
87
+ required: false,
88
+ group: GROUPS.advanced,
89
+ }),
62
90
  },
63
91
  };
@@ -7,6 +7,9 @@ import {
7
7
  createColorProp,
8
8
  createStaticNumberProp,
9
9
  createArrayProp,
10
+ GROUPS,
11
+ createTextEnumProp,
12
+ FORM_TYPES,
10
13
  } from "@draftbit/types";
11
14
 
12
15
  export const SEED_DATA = {
@@ -22,17 +25,35 @@ export const SEED_DATA = {
22
25
  label: "On settle",
23
26
  description: "Action to execute when sheet settles on a snap point",
24
27
  }),
25
- snapPoints: createArrayProp({
26
- label: "Snap points",
28
+ topSnapPosition: createStaticNumberProp({
29
+ label: "Top snap position",
27
30
  description:
28
- "An array of numerical values (that represent distance from the top) where bottom sheet can snap to place. Accepts numbers and percentages (minimum 2 snap points)",
29
- defaultValue: ["10%", "50%", "80%"],
31
+ "Top most postion where bottom sheet can snap to. A numerical value that represents distance from the top",
32
+ defaultValue: "10%",
33
+ required: false,
34
+ formType: FORM_TYPES.numeric,
30
35
  }),
31
- initialSnapIndex: createStaticNumberProp({
32
- label: "Initial snap index",
33
- description: "Index of the snap point to be used as the initial point",
34
- defaultValue: 0,
36
+ middleSnapPosition: createStaticNumberProp({
37
+ label: "Middle snap position",
38
+ description:
39
+ "Middle postion where bottom sheet can snap to. A numerical value that represents distance from the top",
40
+ defaultValue: "50%",
35
41
  required: false,
42
+ formType: FORM_TYPES.numeric,
43
+ }),
44
+ bottomSnapPosition: createStaticNumberProp({
45
+ label: "Bottom snap position",
46
+ description:
47
+ "Bottom most postion where bottom sheet can snap to. A numerical value that represents distance from the top",
48
+ defaultValue: "80%",
49
+ required: false,
50
+ formType: FORM_TYPES.numeric,
51
+ }),
52
+ initialSnapPosition: createTextEnumProp({
53
+ label: "Initial snap position",
54
+ description: "Initial snap position that bottom sheet will snap to",
55
+ options: ["top", "middle", "bottom"],
56
+ defaultValue: "bottom",
36
57
  }),
37
58
  showHandle: createStaticBoolProp({
38
59
  label: "Show handle",
@@ -73,5 +94,19 @@ export const SEED_DATA = {
73
94
  "When true, the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction.",
74
95
  defaultValue: true,
75
96
  }),
97
+ snapPoints: createArrayProp({
98
+ label: "Custom Snap points",
99
+ description:
100
+ "An array of numerical values (that represent distance from the top) where bottom sheet can snap to. Accepts numbers and percentages (minimum 2 snap points). Overrides snap position props",
101
+ defaultValue: null,
102
+ }),
103
+ initialSnapIndex: createStaticNumberProp({
104
+ label: "Initial snap index",
105
+ description:
106
+ "Index of the snap point to be used as the initial point. Overrides initial snap position",
107
+ defaultValue: null,
108
+ required: false,
109
+ group: GROUPS.advanced,
110
+ }),
76
111
  },
77
112
  };
package/src/utilities.js CHANGED
@@ -65,47 +65,6 @@ export function extractBorderAndMarginStyles(style, additionalBorderStyles, addi
65
65
  ]), identity);
66
66
  return { borderStyles, marginStyles };
67
67
  }
68
- export const flexItemStyleNames = [
69
- "alignSelf",
70
- "flexBasis",
71
- "flexShrink",
72
- "flexGrow",
73
- "flex",
74
- ];
75
- export function extractFlexItemStyles(style, additionalFlexItemStyles) {
76
- const flatStyle = StyleSheet.flatten(style || {});
77
- const flexItemStyles = pickBy(pick(flatStyle, [
78
- ...flexItemStyleNames,
79
- ...(additionalFlexItemStyles ? additionalFlexItemStyles : []),
80
- ]), identity);
81
- return flexItemStyles;
82
- }
83
- export const positionStyleNames = [
84
- "position",
85
- "left",
86
- "right",
87
- "top",
88
- "bottom",
89
- "zIndex",
90
- "overflow",
91
- ];
92
- export function extractPositionStyles(style, additionalPositionStyles) {
93
- const flatStyle = StyleSheet.flatten(style || {});
94
- const positionStyles = pickBy(pick(flatStyle, [
95
- ...positionStyleNames,
96
- ...(additionalPositionStyles ? additionalPositionStyles : []),
97
- ]), identity);
98
- return positionStyles;
99
- }
100
- export const effectsStyleNames = ["opacity", "elevation"];
101
- export function extractEffectStyles(style, additionalEffectStyles) {
102
- const flatStyle = StyleSheet.flatten(style || {});
103
- const effectStyles = pickBy(pick(flatStyle, [
104
- ...effectsStyleNames,
105
- ...(additionalEffectStyles ? additionalEffectStyles : []),
106
- ]), identity);
107
- return effectStyles;
108
- }
109
68
  export const sizeStyleNames = ["width", "height"];
110
69
  export function extractSizeStyles(style, additionalSizeStyles) {
111
70
  const flatStyle = StyleSheet.flatten(style || {});
package/src/utilities.ts CHANGED
@@ -98,77 +98,6 @@ export function extractBorderAndMarginStyles(
98
98
  return { borderStyles, marginStyles };
99
99
  }
100
100
 
101
- export const flexItemStyleNames = [
102
- "alignSelf",
103
- "flexBasis",
104
- "flexShrink",
105
- "flexGrow",
106
- "flex",
107
- ];
108
-
109
- export function extractFlexItemStyles(
110
- style: StyleProp<any>,
111
- additionalFlexItemStyles?: string[]
112
- ) {
113
- const flatStyle = StyleSheet.flatten(style || {});
114
-
115
- const flexItemStyles = pickBy(
116
- pick(flatStyle, [
117
- ...flexItemStyleNames,
118
- ...(additionalFlexItemStyles ? additionalFlexItemStyles : []),
119
- ]),
120
- identity
121
- );
122
-
123
- return flexItemStyles;
124
- }
125
-
126
- export const positionStyleNames = [
127
- "position",
128
- "left",
129
- "right",
130
- "top",
131
- "bottom",
132
- "zIndex",
133
- "overflow",
134
- ];
135
-
136
- export function extractPositionStyles(
137
- style: StyleProp<any>,
138
- additionalPositionStyles?: string[]
139
- ) {
140
- const flatStyle = StyleSheet.flatten(style || {});
141
-
142
- const positionStyles = pickBy(
143
- pick(flatStyle, [
144
- ...positionStyleNames,
145
- ...(additionalPositionStyles ? additionalPositionStyles : []),
146
- ]),
147
- identity
148
- );
149
-
150
- return positionStyles;
151
- }
152
-
153
- export const effectsStyleNames = ["opacity", "elevation"];
154
-
155
- export function extractEffectStyles(
156
- style: StyleProp<any>,
157
- additionalEffectStyles?: string[]
158
- ) {
159
- const flatStyle = StyleSheet.flatten(style || {});
160
-
161
- const effectStyles = pickBy(
162
- pick(flatStyle, [
163
- ...effectsStyleNames,
164
- ...(additionalEffectStyles ? additionalEffectStyles : []),
165
- ]),
166
- identity
167
- );
168
-
169
- return effectStyles;
170
- }
171
-
172
101
  export const sizeStyleNames = ["width", "height"];
173
102
 
174
103
  export function extractSizeStyles(
@@ -1,155 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _reactNative = require("react-native");
9
- var _Pressable = _interopRequireDefault(require("../Pressable"));
10
- var _utilities = require("../../utilities");
11
- var _reactNativeSwipeListView = require("react-native-swipe-list-view");
12
- var _theming = require("../../theming");
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
15
- const SwipeableView = _ref => {
16
- let {
17
- theme,
18
- style,
19
- children,
20
- Icon,
21
- closeOnPress,
22
- leftOpenValue,
23
- rightOpenValue,
24
- leftActivationValue,
25
- rightActivationValue,
26
- swipeActivationPercentage = 80,
27
- stopLeftSwipe,
28
- stopRightSwipe,
29
- friction = 20,
30
- ...rest
31
- } = _ref;
32
- const instanceOfSwipeableViewButtonProps = object => {
33
- return "title" in object && "side" in object && "onPress" in object;
34
- };
35
- const instanceOfSwipeableViewSwipeHandlerProps = object => {
36
- return "title" in object && "side" in object && "onSwipe" in object;
37
- };
38
- const {
39
- viewStyles,
40
- textStyles
41
- } = (0, _utilities.extractStyles)(style);
42
- const {
43
- borderStyles,
44
- marginStyles
45
- } = (0, _utilities.extractBorderAndMarginStyles)(viewStyles);
46
- const parentContainerStyles = _reactNative.StyleSheet.flatten([borderStyles, marginStyles, (0, _utilities.extractFlexItemStyles)(viewStyles), (0, _utilities.extractPositionStyles)(viewStyles), (0, _utilities.extractEffectStyles)(viewStyles), (0, _utilities.extractSizeStyles)(viewStyles)]);
47
-
48
- //Remove styles already consumed from viewStyles
49
- Object.keys(parentContainerStyles).forEach(key => delete viewStyles[key]);
50
- const surfaceContainerStyles = viewStyles;
51
- const [componentWidth, setComponentWidth] = _react.default.useState(null);
52
- const leftButtons = _react.default.useMemo(() => _react.default.Children.toArray(children).filter(child => /*#__PURE__*/_react.default.isValidElement(child) && instanceOfSwipeableViewButtonProps(child.props) && child.props.side === "left"), [children]);
53
- const rightButtons = _react.default.useMemo(() => _react.default.Children.toArray(children).filter(child => /*#__PURE__*/_react.default.isValidElement(child) && instanceOfSwipeableViewButtonProps(child.props) && child.props.side === "right"), [children]);
54
- const leftSwipeHandlers = _react.default.useMemo(() => _react.default.Children.toArray(children).filter(child => /*#__PURE__*/_react.default.isValidElement(child) && instanceOfSwipeableViewSwipeHandlerProps(child.props) && child.props.side === "left"), [children]);
55
- const rightSwipeHandlers = _react.default.useMemo(() => _react.default.Children.toArray(children).filter(child => /*#__PURE__*/_react.default.isValidElement(child) && instanceOfSwipeableViewSwipeHandlerProps(child.props) && child.props.side === "right"), [children]);
56
- const remainingChildren = _react.default.useMemo(() => _react.default.Children.toArray(children).filter(child => /*#__PURE__*/_react.default.isValidElement(child) && !instanceOfSwipeableViewSwipeHandlerProps(child.props) && !instanceOfSwipeableViewButtonProps(child.props)), [children]);
57
- if (leftButtons.length > 2 || rightButtons.length > 2) {
58
- throw Error("Cannot have more than 2 buttons per side");
59
- }
60
- if (leftSwipeHandlers.length > 1 || rightSwipeHandlers.length > 1) {
61
- throw Error("Cannot have more than 1 swiper handler per side");
62
- }
63
- if (leftButtons.length && leftSwipeHandlers.length || rightButtons.length && rightSwipeHandlers.length) {
64
- throw Error("Cannot combine swiper handler and buttons on the same side");
65
- }
66
-
67
- //Renders a single button/item. Used for both buttons and swipe handler
68
- const renderBehindItem = (props, index) => /*#__PURE__*/_react.default.createElement(_Pressable.default, {
69
- key: index.toString(),
70
- onPress: props.onPress,
71
- style: [styles.buttonContainer, {
72
- backgroundColor: props.backgroundColor || theme.colors.primary
73
- }]
74
- }, props.icon && /*#__PURE__*/_react.default.createElement(Icon, {
75
- name: props.icon,
76
- size: props.iconSize || 25,
77
- color: props.color || theme.colors.surface
78
- }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
79
- style: [textStyles, {
80
- color: props.color || theme.colors.surface
81
- }]
82
- }, props.title));
83
- const isLeftSwipeHandler = !!leftSwipeHandlers.length;
84
- const isRightSwipeHandler = !!rightSwipeHandlers.length;
85
- const defaultLeftOpenValue = componentWidth ? componentWidth / 2 : 0;
86
- const defaultRightOpenValue = componentWidth ? -componentWidth / 2 : 0;
87
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
88
- onLayout: event => {
89
- setComponentWidth(event.nativeEvent.layout.width);
90
- },
91
- style: [styles.parentContainer, parentContainerStyles]
92
- }, /*#__PURE__*/_react.default.createElement(_reactNativeSwipeListView.SwipeRow, _extends({
93
- leftOpenValue: isLeftSwipeHandler ? 0 : leftOpenValue || defaultLeftOpenValue //If in swiping mode, don't keep open
94
- ,
95
-
96
- rightOpenValue: isRightSwipeHandler ? 0 : rightOpenValue || defaultRightOpenValue,
97
- leftActivationValue: leftActivationValue || isLeftSwipeHandler ? defaultLeftOpenValue * (swipeActivationPercentage / 100) //When swipe passes activation percentage then it should be considered activated (call onSwipe)
98
- : defaultLeftOpenValue,
99
- rightActivationValue: rightActivationValue || isRightSwipeHandler ? defaultRightOpenValue * (swipeActivationPercentage / 100) : defaultRightOpenValue,
100
- stopLeftSwipe: stopLeftSwipe || defaultLeftOpenValue,
101
- stopRightSwipe: stopRightSwipe || defaultRightOpenValue,
102
- onLeftAction: isLeftSwipeHandler ? () => {
103
- var _leftSwipeHandlers$0$, _leftSwipeHandlers$0$2;
104
- return (_leftSwipeHandlers$0$ = (_leftSwipeHandlers$0$2 = leftSwipeHandlers[0].props).onSwipe) === null || _leftSwipeHandlers$0$ === void 0 ? void 0 : _leftSwipeHandlers$0$.call(_leftSwipeHandlers$0$2);
105
- } : undefined,
106
- onRightAction: isRightSwipeHandler ? () => {
107
- var _rightSwipeHandlers$, _rightSwipeHandlers$2;
108
- return (_rightSwipeHandlers$ = (_rightSwipeHandlers$2 = rightSwipeHandlers[0].props).onSwipe) === null || _rightSwipeHandlers$ === void 0 ? void 0 : _rightSwipeHandlers$.call(_rightSwipeHandlers$2);
109
- } : undefined,
110
- closeOnRowPress: closeOnPress,
111
- friction: friction
112
- }, rest), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
113
- style: styles.behindContainer
114
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
115
- style: styles.behindContainerItem
116
- }, (isLeftSwipeHandler ? leftSwipeHandlers : leftButtons).map((item, index) => renderBehindItem(item.props, index))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
117
- style: styles.behindContainerItem
118
- }, (isRightSwipeHandler ? rightSwipeHandlers : rightButtons).map((item, index) => renderBehindItem(item.props, index)))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
119
- style: [styles.surfaceContainer, {
120
- backgroundColor: theme.colors.background
121
- }, surfaceContainerStyles]
122
- }, remainingChildren)));
123
- };
124
- const styles = _reactNative.StyleSheet.create({
125
- parentContainer: {
126
- overflow: "hidden",
127
- minHeight: 50
128
- },
129
- behindContainer: {
130
- flex: 1,
131
- width: "100%",
132
- height: "100%",
133
- flexDirection: "row"
134
- },
135
- behindContainerItem: {
136
- flex: 1,
137
- flexDirection: "row"
138
- },
139
- buttonContainer: {
140
- flex: 1,
141
- alignItems: "center",
142
- justifyContent: "center"
143
- },
144
- surfaceContainer: {
145
- flexDirection: "row",
146
- width: "100%",
147
- height: "100%",
148
- padding: 10,
149
- alignItems: "center",
150
- overflow: "hidden"
151
- }
152
- });
153
- var _default = (0, _theming.withTheme)(SwipeableView);
154
- exports.default = _default;
155
- //# sourceMappingURL=SwipeableView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["SwipeableView","theme","style","children","Icon","closeOnPress","leftOpenValue","rightOpenValue","leftActivationValue","rightActivationValue","swipeActivationPercentage","stopLeftSwipe","stopRightSwipe","friction","rest","instanceOfSwipeableViewButtonProps","object","instanceOfSwipeableViewSwipeHandlerProps","viewStyles","textStyles","extractStyles","borderStyles","marginStyles","extractBorderAndMarginStyles","parentContainerStyles","StyleSheet","flatten","extractFlexItemStyles","extractPositionStyles","extractEffectStyles","extractSizeStyles","Object","keys","forEach","key","surfaceContainerStyles","componentWidth","setComponentWidth","React","useState","leftButtons","useMemo","Children","toArray","filter","child","isValidElement","props","side","rightButtons","leftSwipeHandlers","rightSwipeHandlers","remainingChildren","length","Error","renderBehindItem","index","toString","onPress","styles","buttonContainer","backgroundColor","colors","primary","icon","iconSize","color","surface","title","isLeftSwipeHandler","isRightSwipeHandler","defaultLeftOpenValue","defaultRightOpenValue","event","nativeEvent","layout","width","parentContainer","onSwipe","undefined","behindContainer","behindContainerItem","map","item","surfaceContainer","background","create","overflow","minHeight","flex","height","flexDirection","alignItems","justifyContent","padding","withTheme"],"sourceRoot":"../../../../src","sources":["components/SwipeableView/SwipeableView.tsx"],"mappings":";;;;;;AAAA;AACA;AAQA;AACA;AAQA;AAGA;AAA0C;AAAA;AAyB1C,MAAMA,aAAoE,GAAG,QAevE;EAAA,IAfwE;IAC5EC,KAAK;IACLC,KAAK;IACLC,QAAQ;IACRC,IAAI;IACJC,YAAY;IACZC,aAAa;IACbC,cAAc;IACdC,mBAAmB;IACnBC,oBAAoB;IACpBC,yBAAyB,GAAG,EAAE;IAC9BC,aAAa;IACbC,cAAc;IACdC,QAAQ,GAAG,EAAE;IACb,GAAGC;EACL,CAAC;EACC,MAAMC,kCAAkC,GACtCC,MAAW,IAC4B;IACvC,OAAO,OAAO,IAAIA,MAAM,IAAI,MAAM,IAAIA,MAAM,IAAI,SAAS,IAAIA,MAAM;EACrE,CAAC;EAED,MAAMC,wCAAwC,GAC5CD,MAAW,IACkC;IAC7C,OAAO,OAAO,IAAIA,MAAM,IAAI,MAAM,IAAIA,MAAM,IAAI,SAAS,IAAIA,MAAM;EACrE,CAAC;EAED,MAAM;IAAEE,UAAU;IAAEC;EAAW,CAAC,GAAG,IAAAC,wBAAa,EAAClB,KAAK,CAAC;EAEvD,MAAM;IAAEmB,YAAY;IAAEC;EAAa,CAAC,GAClC,IAAAC,uCAA4B,EAACL,UAAU,CAAC;EAE1C,MAAMM,qBAAqB,GAAGC,uBAAU,CAACC,OAAO,CAAC,CAC/CL,YAAY,EACZC,YAAY,EACZ,IAAAK,gCAAqB,EAACT,UAAU,CAAC,EACjC,IAAAU,gCAAqB,EAACV,UAAU,CAAC,EACjC,IAAAW,8BAAmB,EAACX,UAAU,CAAC,EAC/B,IAAAY,4BAAiB,EAACZ,UAAU,CAAC,CAC9B,CAAC;;EAEF;EACAa,MAAM,CA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IACH,KAAK,EAAE,CACLG,MAAM,CAACyB,gBAAgB,EACvB;MACEvB,eAAe,EAAE5D,KAAK,CAAC6D,MAAM,CAACuB;IAChC,CAAC,EACDlD,sBAAsB;EACtB,GAEDiB,iBAAiB,CACb,CACE,CACN;AAEX,CAAC;AAED,MAAMO,MAAM,GAAGlC,uBAAU,CAAC6D,MAAM,CAAC;EAC/BT,eAAe,EAAE;IACfU,QAAQ,EAAE,QAAQ;IAClBC,SAAS,EAAE;EACb,CAAC;EACDR,eAAe,EAAE;IACfS,IAAI,EAAE,CAAC;IACPb,KAAK,EAAE,MAAM;IACbc,MAAM,EAAE,MAAM;IACdC,aAAa,EAAE;EACjB,CAAC;EACDV,mBAAmB,EAAE;IACnBQ,IAAI,EAAE,CAAC;IACPE,aAAa,EAAE;EACjB,CAAC;EACD/B,eAAe,EAAE;IACf6B,IAAI,EAAE,CAAC;IACPG,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDT,gBAAgB,EAAE;IAChBO,aAAa,EAAE,KAAK;IACpBf,KAAK,EAAE,MAAM;IACbc,MAAM,EAAE,MAAM;IACdI,OAAO,EAAE,EAAE;IACXF,UAAU,EAAE,QAAQ;IACpBL,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAAC,eAEY,IAAAQ,kBAAS,EAAC/F,aAAa,CAAC;AAAA"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- //Renders nothing, acts as a wrapper be used by SwipeableView
8
- const SwipeableViewButton = () => {
9
- return null;
10
- };
11
- var _default = SwipeableViewButton;
12
- exports.default = _default;
13
- //# sourceMappingURL=SwipeableViewButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["SwipeableViewButton"],"sourceRoot":"../../../../src","sources":["components/SwipeableView/SwipeableViewButton.tsx"],"mappings":";;;;;;AAYA;AACA,MAAMA,mBAAuD,GAAG,MAAM;EACpE,OAAO,IAAI;AACb,CAAC;AAAC,eAEaA,mBAAmB;AAAA"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- //Renders nothing, acts as a wrapper to be used by SwipeableView
8
- const SwipeableViewSwipeHandler = () => {
9
- return null;
10
- };
11
- var _default = SwipeableViewSwipeHandler;
12
- exports.default = _default;
13
- //# sourceMappingURL=SwipeableViewSwipeHandler.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["SwipeableViewSwipeHandler"],"sourceRoot":"../../../../src","sources":["components/SwipeableView/SwipeableViewSwipeHandler.tsx"],"mappings":";;;;;;AAYA;AACA,MAAMA,yBAEL,GAAG,MAAM;EACR,OAAO,IAAI;AACb,CAAC;AAAC,eAEaA,yBAAyB;AAAA"}