@draftbit/core 46.12.1-07ad46.2 → 46.12.1-62afc7.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 (193) hide show
  1. package/lib/commonjs/components/ActionSheet/index.js.map +1 -1
  2. package/lib/commonjs/components/AspectRatio.js +2 -16
  3. package/lib/commonjs/components/AspectRatio.js.map +1 -1
  4. package/lib/commonjs/components/AvatarEdit.js +4 -15
  5. package/lib/commonjs/components/AvatarEdit.js.map +1 -1
  6. package/lib/commonjs/components/Banner.js +4 -23
  7. package/lib/commonjs/components/Banner.js.map +1 -1
  8. package/lib/commonjs/components/BottomSheet/BottomSheet.js +18 -3
  9. package/lib/commonjs/components/BottomSheet/BottomSheet.js.map +1 -1
  10. package/lib/commonjs/components/BottomSheet/BottomSheetComponent.js +73 -120
  11. package/lib/commonjs/components/BottomSheet/BottomSheetComponent.js.map +1 -1
  12. package/lib/commonjs/components/Button.js +10 -32
  13. package/lib/commonjs/components/Button.js.map +1 -1
  14. package/lib/commonjs/components/Card.js.map +1 -1
  15. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +22 -5
  16. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js.map +1 -1
  17. package/lib/commonjs/components/Checkbox/CheckboxRow.js +6 -23
  18. package/lib/commonjs/components/Checkbox/CheckboxRow.js.map +1 -1
  19. package/lib/commonjs/components/Checkbox/index.js.map +1 -1
  20. package/lib/commonjs/components/Container.js +4 -15
  21. package/lib/commonjs/components/Container.js.map +1 -1
  22. package/lib/commonjs/components/DatePicker/DatePickerComponent.web.js.map +1 -1
  23. package/lib/commonjs/components/DatePicker/DatePickerComponentType.js.map +1 -1
  24. package/lib/commonjs/components/DeckSwiper/DeckSwiperCard.js.map +1 -1
  25. package/lib/commonjs/components/DeckSwiper/index.js.map +1 -1
  26. package/lib/commonjs/components/Divider.js +1 -12
  27. package/lib/commonjs/components/Divider.js.map +1 -1
  28. package/lib/commonjs/components/Elevation.js +2 -13
  29. package/lib/commonjs/components/Elevation.js.map +1 -1
  30. package/lib/commonjs/components/FAB.js +4 -19
  31. package/lib/commonjs/components/FAB.js.map +1 -1
  32. package/lib/commonjs/components/FieldSearchBarFull.js +2 -1
  33. package/lib/commonjs/components/FieldSearchBarFull.js.map +1 -1
  34. package/lib/commonjs/components/FormRow.js +3 -17
  35. package/lib/commonjs/components/FormRow.js.map +1 -1
  36. package/lib/commonjs/components/Image.js +2 -16
  37. package/lib/commonjs/components/Image.js.map +1 -1
  38. package/lib/commonjs/components/Justification.js +1 -2
  39. package/lib/commonjs/components/Justification.js.map +1 -1
  40. package/lib/commonjs/components/Layout.js +19 -39
  41. package/lib/commonjs/components/Layout.js.map +1 -1
  42. package/lib/commonjs/components/Markdown.js.map +1 -1
  43. package/lib/commonjs/components/NumberInput.js +3 -11
  44. package/lib/commonjs/components/NumberInput.js.map +1 -1
  45. package/lib/commonjs/components/Picker/PickerTypes.js.map +1 -1
  46. package/lib/commonjs/components/Portal/PortalConsumer.js +2 -1
  47. package/lib/commonjs/components/Portal/PortalConsumer.js.map +1 -1
  48. package/lib/commonjs/components/Portal/PortalHost.js +14 -43
  49. package/lib/commonjs/components/Portal/PortalHost.js.map +1 -1
  50. package/lib/commonjs/components/Portal/PortalManager.js +8 -34
  51. package/lib/commonjs/components/Portal/PortalManager.js.map +1 -1
  52. package/lib/commonjs/components/Pressable.js +2 -15
  53. package/lib/commonjs/components/Pressable.js.map +1 -1
  54. package/lib/commonjs/components/ProgressBar.js +7 -36
  55. package/lib/commonjs/components/ProgressBar.js.map +1 -1
  56. package/lib/commonjs/components/ProgressIndicator.js.map +1 -1
  57. package/lib/commonjs/components/RadioButton/RadioButton.js +2 -14
  58. package/lib/commonjs/components/RadioButton/RadioButton.js.map +1 -1
  59. package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js +1 -10
  60. package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js.map +1 -1
  61. package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +4 -16
  62. package/lib/commonjs/components/RadioButton/RadioButtonGroup.js.map +1 -1
  63. package/lib/commonjs/components/RadioButton/RadioButtonRow.js +5 -23
  64. package/lib/commonjs/components/RadioButton/RadioButtonRow.js.map +1 -1
  65. package/lib/commonjs/components/ResizeMode.js +1 -2
  66. package/lib/commonjs/components/ResizeMode.js.map +1 -1
  67. package/lib/commonjs/components/Row.js.map +1 -1
  68. package/lib/commonjs/components/RowBodyIcon.js.map +1 -1
  69. package/lib/commonjs/components/RowHeadlineImageIcon.js.map +1 -1
  70. package/lib/commonjs/components/SVG.js.map +1 -1
  71. package/lib/commonjs/components/ScreenContainer.js +6 -23
  72. package/lib/commonjs/components/ScreenContainer.js.map +1 -1
  73. package/lib/commonjs/components/Slider.js +4 -21
  74. package/lib/commonjs/components/Slider.js.map +1 -1
  75. package/lib/commonjs/components/StarRating.js +4 -22
  76. package/lib/commonjs/components/StarRating.js.map +1 -1
  77. package/lib/commonjs/components/StepIndicator.js +18 -57
  78. package/lib/commonjs/components/StepIndicator.js.map +1 -1
  79. package/lib/commonjs/components/SwipeableView/SwipeableView.js +155 -0
  80. package/lib/commonjs/components/SwipeableView/SwipeableView.js.map +1 -0
  81. package/lib/commonjs/components/SwipeableView/SwipeableViewButton.js +13 -0
  82. package/lib/commonjs/components/SwipeableView/SwipeableViewButton.js.map +1 -0
  83. package/lib/commonjs/components/SwipeableView/SwipeableViewSwipeHandler.js +13 -0
  84. package/lib/commonjs/components/SwipeableView/SwipeableViewSwipeHandler.js.map +1 -0
  85. package/lib/commonjs/components/SwipeableView/index.js +28 -0
  86. package/lib/commonjs/components/SwipeableView/index.js.map +1 -0
  87. package/lib/commonjs/components/Swiper/Swiper.js.map +1 -1
  88. package/lib/commonjs/components/Swiper/SwiperItem.js.map +1 -1
  89. package/lib/commonjs/components/Switch.js +10 -19
  90. package/lib/commonjs/components/Switch.js.map +1 -1
  91. package/lib/commonjs/components/TabView/TabView.js +7 -14
  92. package/lib/commonjs/components/TabView/TabView.js.map +1 -1
  93. package/lib/commonjs/components/TabView/TabViewItem.js.map +1 -1
  94. package/lib/commonjs/components/Table/Table.js +5 -6
  95. package/lib/commonjs/components/Table/Table.js.map +1 -1
  96. package/lib/commonjs/components/Table/TableCommon.js.map +1 -1
  97. package/lib/commonjs/components/Table/TableRow.js +2 -1
  98. package/lib/commonjs/components/Table/TableRow.js.map +1 -1
  99. package/lib/commonjs/components/Text.js +4 -50
  100. package/lib/commonjs/components/Text.js.map +1 -1
  101. package/lib/commonjs/components/TextField.js +28 -76
  102. package/lib/commonjs/components/TextField.js.map +1 -1
  103. package/lib/commonjs/components/ToggleButton.js +2 -14
  104. package/lib/commonjs/components/ToggleButton.js.map +1 -1
  105. package/lib/commonjs/components/Touchable.js +2 -15
  106. package/lib/commonjs/components/Touchable.js.map +1 -1
  107. package/lib/commonjs/components/Touchable.web.js.map +1 -1
  108. package/lib/commonjs/components/Typography.js.map +1 -1
  109. package/lib/commonjs/components/YoutubePlayer/YoutubePlayer.native.js.map +1 -1
  110. package/lib/commonjs/components/YoutubePlayer/YoutubePlayerProps.js.map +1 -1
  111. package/lib/commonjs/components/useAuthState.js.map +1 -1
  112. package/lib/commonjs/index.js +19 -0
  113. package/lib/commonjs/index.js.map +1 -1
  114. package/lib/commonjs/mappings/BottomSheet.js +37 -9
  115. package/lib/commonjs/mappings/BottomSheet.js.map +1 -1
  116. package/lib/commonjs/mappings/MapMarker.js +15 -0
  117. package/lib/commonjs/mappings/MapMarker.js.map +1 -1
  118. package/lib/commonjs/mappings/MapView.js +5 -0
  119. package/lib/commonjs/mappings/MapView.js.map +1 -1
  120. package/lib/commonjs/mappings/SwipeableView.js +183 -0
  121. package/lib/commonjs/mappings/SwipeableView.js.map +1 -0
  122. package/lib/commonjs/utilities.js +27 -2
  123. package/lib/commonjs/utilities.js.map +1 -1
  124. package/lib/module/components/BottomSheet/BottomSheet.js +18 -3
  125. package/lib/module/components/BottomSheet/BottomSheet.js.map +1 -1
  126. package/lib/module/components/Divider.js +17 -1
  127. package/lib/module/components/Picker/PickerComponent.ios.js +36 -11
  128. package/lib/module/components/Picker/PickerComponent.ios.js.map +1 -1
  129. package/lib/module/components/SwipeableView/SwipeableView.js +147 -0
  130. package/lib/module/components/SwipeableView/SwipeableView.js.map +1 -0
  131. package/lib/module/components/SwipeableView/SwipeableViewButton.js +6 -0
  132. package/lib/module/components/SwipeableView/SwipeableViewButton.js.map +1 -0
  133. package/lib/module/components/SwipeableView/SwipeableViewSwipeHandler.js +6 -0
  134. package/lib/module/components/SwipeableView/SwipeableViewSwipeHandler.js.map +1 -0
  135. package/lib/module/components/SwipeableView/index.js +4 -0
  136. package/lib/module/components/SwipeableView/index.js.map +1 -0
  137. package/lib/module/index.js +1 -0
  138. package/lib/module/index.js.map +1 -1
  139. package/lib/module/mappings/BottomSheet.js +38 -10
  140. package/lib/module/mappings/BottomSheet.js.map +1 -1
  141. package/lib/module/mappings/MapMarker.js +16 -1
  142. package/lib/module/mappings/MapMarker.js.map +1 -1
  143. package/lib/module/mappings/MapView.js +6 -1
  144. package/lib/module/mappings/MapView.js.map +1 -1
  145. package/lib/module/mappings/SwipeableView.js +175 -0
  146. package/lib/module/mappings/SwipeableView.js.map +1 -0
  147. package/lib/module/utilities.js +18 -0
  148. package/lib/module/utilities.js.map +1 -1
  149. package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts +6 -1
  150. package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts.map +1 -1
  151. package/lib/typescript/src/components/SwipeableView/SwipeableView.d.ts +29 -0
  152. package/lib/typescript/src/components/SwipeableView/SwipeableView.d.ts.map +1 -0
  153. package/lib/typescript/src/components/SwipeableView/SwipeableViewButton.d.ts +13 -0
  154. package/lib/typescript/src/components/SwipeableView/SwipeableViewButton.d.ts.map +1 -0
  155. package/lib/typescript/src/components/SwipeableView/SwipeableViewSwipeHandler.d.ts +13 -0
  156. package/lib/typescript/src/components/SwipeableView/SwipeableViewSwipeHandler.d.ts.map +1 -0
  157. package/lib/typescript/src/components/SwipeableView/index.d.ts +4 -0
  158. package/lib/typescript/src/components/SwipeableView/index.d.ts.map +1 -0
  159. package/lib/typescript/src/index.d.ts +1 -0
  160. package/lib/typescript/src/index.d.ts.map +1 -1
  161. package/lib/typescript/src/mappings/BottomSheet.d.ts +48 -4
  162. package/lib/typescript/src/mappings/BottomSheet.d.ts.map +1 -1
  163. package/lib/typescript/src/mappings/MapMarker.d.ts +32 -0
  164. package/lib/typescript/src/mappings/MapMarker.d.ts.map +1 -1
  165. package/lib/typescript/src/mappings/MapView.d.ts +11 -0
  166. package/lib/typescript/src/mappings/MapView.d.ts.map +1 -1
  167. package/lib/typescript/src/mappings/SwipeableView.d.ts +426 -0
  168. package/lib/typescript/src/mappings/SwipeableView.d.ts.map +1 -0
  169. package/lib/typescript/src/utilities.d.ts +6 -0
  170. package/lib/typescript/src/utilities.d.ts.map +1 -1
  171. package/package.json +4 -3
  172. package/src/components/BottomSheet/BottomSheet.js +17 -2
  173. package/src/components/BottomSheet/BottomSheet.tsx +32 -4
  174. package/src/components/SwipeableView/SwipeableView.js +117 -0
  175. package/src/components/SwipeableView/SwipeableView.tsx +299 -0
  176. package/src/components/SwipeableView/SwipeableViewButton.js +5 -0
  177. package/src/components/SwipeableView/SwipeableViewButton.tsx +18 -0
  178. package/src/components/SwipeableView/SwipeableViewSwipeHandler.js +5 -0
  179. package/src/components/SwipeableView/SwipeableViewSwipeHandler.tsx +20 -0
  180. package/src/components/SwipeableView/index.js +3 -0
  181. package/src/components/SwipeableView/index.tsx +3 -0
  182. package/src/index.js +1 -0
  183. package/src/index.tsx +6 -0
  184. package/src/mappings/BottomSheet.js +37 -9
  185. package/src/mappings/BottomSheet.ts +43 -8
  186. package/src/mappings/MapMarker.js +16 -1
  187. package/src/mappings/MapMarker.ts +20 -0
  188. package/src/mappings/MapView.js +6 -1
  189. package/src/mappings/MapView.ts +8 -0
  190. package/src/mappings/SwipeableView.js +181 -0
  191. package/src/mappings/SwipeableView.ts +210 -0
  192. package/src/utilities.js +41 -0
  193. package/src/utilities.ts +71 -0
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/ActionSheet/index.js"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AAAmE"}
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/ActionSheet/index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AAAmE"}
@@ -7,6 +7,7 @@ exports.default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _reactNative = require("react-native");
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ 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); }
10
11
  const AspectRatio = props => {
11
12
  const [layout, setLayout] = _react.default.useState(null);
12
13
  const {
@@ -33,22 +34,7 @@ const AspectRatio = props => {
33
34
  });
34
35
  }
35
36
  }
36
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
37
- ...props,
38
- style: style,
39
- onLayout: _ref => {
40
- let {
41
- nativeEvent: {
42
- layout: l
43
- }
44
- } = _ref;
45
- return setLayout(l);
46
- }
47
- }, props.children);
48
- };
49
- var _default = AspectRatio;
50
- exports.default = _default;
51
- //# sourceMappingURL=AspectRatio.js.map_react.default.createElement(_reactNative.View, _extends({}, props, {
37
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, props, {
52
38
  style: style,
53
39
  onLayout: _ref => {
54
40
  let {
@@ -1 +1 @@
1
- {"version":3,"names":["AspectRatio","props","layout","setLayout","React","useState","aspectRatio","inputStyle","StyleSheet","flatten","style","width","height","push","createElement","View","onLayout","nativeEvent","l","children"],"sourceRoot":"../../../src","sources":["components/AspectRatio.js"],"mappings":";;;;;;AAAA;AACA;AAAiD;AACjD,MAAMA,WAAW,GAAIC,KAAK,IAAK;EAC3B,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGC,cAAK,CAACC,QAAQ,CAAC,IAAI,CAAC;EAChD,MAAM;IAAEC,WAAW,GAAG,CAAC;IAAE,GAAGC;EAAW,CAAC,GAAGC,uBAAU,CAACC,OAAO,CAACR,KAAK,CAACS,KAAK,CAAC,IAAI,CAAC,CAAC;EAChF,MAAMA,KAAK,GAAG,CAACH,UAAU,EAAE;IAAED;EAAY,CAAC,CAAC;EAC3C,IAAIJ,MAAM,EAAE;IACR,MAAM;MAAES,KAAK,GAAG,CAAC;MAAEC,MAAM,GAAG;IAAE,CAAC,GAAGV,MAAM;IACxC,IAAIS,KAAK,KAAK,CAAC,EAAE;MACbD,KAAK,CAACG,IAAI,CAAC;QAAEF,KAAK,EAAEC,MAAM,IAAI,CAAC,GAAGN,WAAW,CAAC;QAAEM;MAAO,CAAC,CAAC;IAC7D,CAAC,MACI;MACDF,KAAK,CAACG,IAAI,CAAC;QAAEF,KAAK;QAAEC,MAAM,EAAED,KAAK,IAAI,CAAC,GAAGL,WAAW;MAAE,CAAC,CAAC;IAC5D;EACJ;EACA,oBAAQF,cAAK,CAACU,aAAa,CAACC,iBAAI,EAAE;IAAE,GAAGd,KAAK;IAAES,KAAK,EAAEA,KAAK;IAAEM,QAAQ,EAAE;MAAA,IAAC;QAAEC,WAAW,EAAE;UAAEf,MAAM,EAAEgB;QAAE;MAAE,CAAC;MAAA,OAAKf,SAAS,CAACe,CAAC,CAAC;IAAA;EAAC,CAAC,EAAEjB,KAAK,CAACkB,QAAQ,CAAC;AAC7I,CAAC;AAAC,eACanB,WAAW;AAAA"}
1
+ {"version":3,"names":["AspectRatio","props","layout","setLayout","React","useState","aspectRatio","inputStyle","StyleSheet","flatten","style","width","height","push","nativeEvent","l","children"],"sourceRoot":"../../../src","sources":["components/AspectRatio.tsx"],"mappings":";;;;;;AAAA;AACA;AAMsB;AAAA;AAOtB,MAAMA,WAAqD,GAAIC,KAAK,IAAK;EACvE,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGC,cAAK,CAACC,QAAQ,CAAyB,IAAI,CAAC;EACxE,MAAM;IAAEC,WAAW,GAAG,CAAC;IAAE,GAAGC;EAAW,CAAC,GACtCC,uBAAU,CAACC,OAAO,CAACR,KAAK,CAACS,KAAK,CAAC,IAAI,CAAC,CAAC;EACvC,MAAMA,KAAK,GAAG,CAACH,UAAU,EAAE;IAAED;EAAY,CAAC,CAAC;EAE3C,IAAIJ,MAAM,EAAE;IACV,MAAM;MAAES,KAAK,GAAG,CAAC;MAAEC,MAAM,GAAG;IAAE,CAAC,GAAGV,MAAM;IACxC,IAAIS,KAAK,KAAK,CAAC,EAAE;MACfD,KAAK,CAACG,IAAI,CAAC;QAAEF,KAAK,EAAEC,MAAM,IAAI,CAAC,GAAGN,WAAW,CAAC;QAAEM;MAAO,CAAC,CAAC;IAC3D,CAAC,MAAM;MACLF,KAAK,CAACG,IAAI,CAAC;QAAEF,KAAK;QAAEC,MAAM,EAAED,KAAK,IAAI,CAAC,GAAGL,WAAW;MAAE,CAAC,CAAC;IAC1D;EACF;EACA,oBACE,6BAAC,iBAAI,eACCL,KAAK;IACT,KAAK,EAAES,KAAM;IACb,QAAQ,EAAE;MAAA,IAAC;QAAEI,WAAW,EAAE;UAAEZ,MAAM,EAAEa;QAAE;MAAE,CAAC;MAAA,OAAKZ,SAAS,CAACY,CAAC,CAAC;IAAA;EAAC,IAE1Dd,KAAK,CAACe,QAAQ,CACV;AAEX,CAAC;AAAC,eAEahB,WAAW;AAAA"}
@@ -12,6 +12,7 @@ var _theming = require("../theming");
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
14
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
+ 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
16
  const AvatarEdit = _ref => {
16
17
  let {
17
18
  Icon,
@@ -31,10 +32,9 @@ const AvatarEdit = _ref => {
31
32
  width: size,
32
33
  height: size
33
34
  };
34
- return /*#__PURE__*/React.createElement(_reactNative.View, {
35
- style: [style, dimensions],
36
- ...rest
37
- }, /*#__PURE__*/React.createElement(_Touchable.default, {
35
+ return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
36
+ style: [style, dimensions]
37
+ }, rest), /*#__PURE__*/React.createElement(_Touchable.default, {
38
38
  onPress: onPress
39
39
  }, /*#__PURE__*/React.createElement(_CircleImage.default, {
40
40
  source: image,
@@ -57,15 +57,4 @@ const AvatarEdit = _ref => {
57
57
  };
58
58
  var _default = (0, _theming.withTheme)(AvatarEdit);
59
59
  exports.default = _default;
60
- //# sourceMappingURL=AvatarEdit.js.map borderRadius: size * (3 / 16),
61
- padding: size * (3 / 32)
62
- }
63
- }, /*#__PURE__*/React.createElement(Icon, {
64
- name: "MaterialIcons/edit",
65
- color: colorStyles.editIconColor,
66
- size: size * (3 / 16)
67
- }))));
68
- };
69
- var _default = (0, _theming.withTheme)(AvatarEdit);
70
- exports.default = _default;
71
60
  //# sourceMappingURL=AvatarEdit.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["AvatarEdit","Icon","image","size","onPress","style","theme","rest","colorStyles","editBackgroundColor","colors","primary","editIconColor","surface","editBorderColor","dimensions","width","height","React","createElement","View","Touchable","CircleImage","source","position","top","right","borderColor","backgroundColor","borderRadius","padding","name","color","withTheme"],"sourceRoot":"../../../src","sources":["components/AvatarEdit.js"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AAAuC;AAAA;AAAA;AACvC,MAAMA,UAAU,GAAG,QAA4E;EAAA,IAA3E;IAAEC,IAAI;IAAEC,KAAK;IAAEC,IAAI,GAAG,EAAE;IAAEC,OAAO,GAAG,MAAM,CAAE,CAAC;IAAEC,KAAK;IAAEC,KAAK;IAAE,GAAGC;EAAK,CAAC;EACtF,MAAMC,WAAW,GAAG;IAChBC,mBAAmB,EAAEH,KAAK,CAACI,MAAM,CAACC,OAAO;IACzCC,aAAa,EAAEN,KAAK,CAACI,MAAM,CAACG,OAAO;IACnCC,eAAe,EAAER,KAAK,CAACI,MAAM,CAACG;EAClC,CAAC;EACD,MAAME,UAAU,GAAG;IACfC,KAAK,EAAEb,IAAI;IACXc,MAAM,EAAEd;EACZ,CAAC;EACD,oBAAQe,KAAK,CAACC,aAAa,CAACC,iBAAI,EAAE;IAAEf,KAAK,EAAE,CAACA,KAAK,EAAEU,UAAU,CAAC;IAAE,GAAGR;EAAK,CAAC,eACrEW,KAAK,CAACC,aAAa,CAACE,kBAAS,EAAE;IAAEjB,OAAO,EAAEA;EAAQ,CAAC,eAC/Cc,KAAK,CAACC,aAAa,CAACG,oBAAW,EAAE;IAAEC,MAAM,EAAErB,KAAK;IAAEC,IAAI,EAAEA;EAAK,CAAC,CAAC,eAC/De,KAAK,CAACC,aAAa,CAACC,iBAAI,EAAE;IAAEf,KAAK,EAAE;MAC3BmB,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,CAAC,CAAC;MACPC,KAAK,EAAE,CAAC,CAAC;MACTC,WAAW,EAAEnB,WAAW,CAACM,eAAe;MACxCc,eAAe,EAAEpB,WAAW,CAACC,mBAAmB;MAChDoB,YAAY,EAAE1B,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;MAC7B2B,OAAO,EAAE3B,IAAI,IAAI,CAAC,GAAG,EAAE;IAC3B;EAAE,CAAC,eACHe,KAAK,CAACC,aAAa,CAAClB,IAAI,EAAE;IAAE8B,IAAI,EAAE,oBAAoB;IAAEC,KAAK,EAAExB,WAAW,CAACI,aAAa;IAAET,IAAI,EAAEA,IAAI,IAAI,CAAC,GAAG,EAAE;EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AACrI,CAAC;AAAC,eACa,IAAA8B,kBAAS,EAACjC,UAAU,CAAC;AAAA"}
1
+ {"version":3,"names":["AvatarEdit","Icon","image","size","onPress","style","theme","rest","colorStyles","editBackgroundColor","colors","primary","editIconColor","surface","editBorderColor","dimensions","width","height","position","top","right","borderColor","backgroundColor","borderRadius","padding","withTheme"],"sourceRoot":"../../../src","sources":["components/AvatarEdit.tsx"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AAAuC;AAAA;AAAA;AAAA;AAavC,MAAMA,UAAoD,GAAG,QAQvD;EAAA,IARwD;IAC5DC,IAAI;IACJC,KAAK;IACLC,IAAI,GAAG,EAAE;IACTC,OAAO,GAAG,MAAM,CAAC,CAAC;IAClBC,KAAK;IACLC,KAAK;IACL,GAAGC;EACL,CAAC;EACC,MAAMC,WAAW,GAAG;IAClBC,mBAAmB,EAAEH,KAAK,CAACI,MAAM,CAACC,OAAO;IACzCC,aAAa,EAAEN,KAAK,CAACI,MAAM,CAACG,OAAO;IACnCC,eAAe,EAAER,KAAK,CAACI,MAAM,CAACG;EAChC,CAAC;EAED,MAAME,UAAU,GAAG;IACjBC,KAAK,EAAEb,IAAI;IACXc,MAAM,EAAEd;EACV,CAAC;EAED,oBACE,oBAAC,iBAAI;IAAC,KAAK,EAAE,CAACE,KAAK,EAAEU,UAAU;EAAE,GAAKR,IAAI,gBACxC,oBAAC,kBAAS;IAAC,OAAO,EAAEH;EAAQ,gBAC1B,oBAAC,oBAAW;IAAC,MAAM,EAAEF,KAAM;IAAC,IAAI,EAAEC;EAAK,EAAG,eAC1C,oBAAC,iBAAI;IACH,KAAK,EAAE;MACLe,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,CAAC,CAAC;MACPC,KAAK,EAAE,CAAC,CAAC;MACTC,WAAW,EAAEb,WAAW,CAACM,eAAe;MACxCQ,eAAe,EAAEd,WAAW,CAACC,mBAAmB;MAChDc,YAAY,EAAEpB,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;MAC7BqB,OAAO,EAAErB,IAAI,IAAI,CAAC,GAAG,EAAE;IACzB;EAAE,gBAEF,oBAAC,IAAI;IACH,IAAI,EAAC,oBAAoB;IACzB,KAAK,EAAEK,WAAW,CAACI,aAAc;IACjC,IAAI,EAAET,IAAI,IAAI,CAAC,GAAG,EAAE;EAAE,EACtB,CACG,CACG,CACP;AAEX,CAAC;AAAC,eAEa,IAAAsB,kBAAS,EAACzB,UAAU,CAAC;AAAA"}
@@ -12,6 +12,7 @@ var _theming = require("../theming");
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
14
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
+ 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
16
  const ELEVATION = 1;
16
17
  const DEFAULT_MAX_WIDTH = 960;
17
18
  const Banner = _ref => {
@@ -69,6 +70,7 @@ const Banner = _ref => {
69
70
  measured: true
70
71
  });
71
72
  };
73
+
72
74
  // The banner animation has 2 parts:
73
75
  // 1. Blank spacer element which animates its height to move the content
74
76
  // 2. Actual banner which animates its translateY
@@ -78,10 +80,9 @@ const Banner = _ref => {
78
80
  // However we can't animated banner's height directly as it'll also resize the content inside
79
81
  const height = _reactNative.Animated.multiply(position, layout.height);
80
82
  const translateY = _reactNative.Animated.multiply(_reactNative.Animated.add(position, -1), layout.height);
81
- return /*#__PURE__*/React.createElement(_Surface.default, {
82
- ...rest,
83
+ return /*#__PURE__*/React.createElement(_Surface.default, _extends({}, rest, {
83
84
  style: [styles.container, (0, _shadow.default)(ELEVATION), style]
84
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
85
+ }), /*#__PURE__*/React.createElement(_reactNative.View, {
85
86
  style: [styles.wrapper, contentStyle]
86
87
  }, /*#__PURE__*/React.createElement(_reactNative.Animated.View, {
87
88
  style: {
@@ -164,24 +165,4 @@ const styles = _reactNative.StyleSheet.create({
164
165
  });
165
166
  var _default = (0, _theming.withTheme)(Banner);
166
167
  exports.default = _default;
167
- //# sourceMappingURL=Banner.js.map,
168
- marginHorizontal: 8,
169
- marginTop: 16,
170
- marginBottom: 0
171
- },
172
- icon: {
173
- margin: 8
174
- },
175
- message: {
176
- flex: 1,
177
- margin: 8
178
- },
179
- actions: {
180
- flexDirection: "row",
181
- justifyContent: "flex-end",
182
- margin: 8
183
- }
184
- });
185
- var _default = (0, _theming.withTheme)(Banner);
186
- exports.default = _default;
187
168
  //# sourceMappingURL=Banner.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["ELEVATION","DEFAULT_MAX_WIDTH","Banner","initiallyVisible","dismissable","icon","buttonColor","content","contentStyle","style","theme","Icon","rest","visible","setVisible","React","useState","useEffect","current","position","useRef","Animated","Value","layout","setLayout","height","measured","timing","duration","toValue","useNativeDriver","start","handleLayout","nativeEvent","multiply","translateY","add","createElement","Surface","styles","container","shadow","View","wrapper","onLayout","absolute","transform","opacity","marginBottom","name","size","Text","message","color","colors","text","accessibilityLiveRegion","accessibilityRole","actions","Button","primary","title","onPress","StyleSheet","create","elevation","overflow","alignSelf","width","maxWidth","top","flexDirection","justifyContent","marginHorizontal","marginTop","margin","flex","withTheme"],"sourceRoot":"../../../src","sources":["components/Banner.js"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AAAuC;AAAA;AAAA;AACvC,MAAMA,SAAS,GAAG,CAAC;AACnB,MAAMC,iBAAiB,GAAG,GAAG;AAC7B,MAAMC,MAAM,GAAG,QAA4H;EAAA,IAA3H;IAAEC,gBAAgB,GAAG,IAAI;IAAEC,WAAW,GAAG,IAAI;IAAEC,IAAI;IAAEC,WAAW;IAAEC,OAAO;IAAEC,YAAY;IAAEC,KAAK;IAAEC,KAAK;IAAEC,IAAI;IAAE,GAAGC;EAAK,CAAC;EAClI,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGC,KAAK,CAACC,QAAQ,CAACb,gBAAgB,CAAC;EAC9DY,KAAK,CAACE,SAAS,CAAC,MA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;EAClB,CAAC;EACD3C,IAAI,EAAE;IACFsE,MAAM,EAAE;EACZ,CAAC;EACDvB,OAAO,EAAE;IACLwB,IAAI,EAAE,CAAC;IACPD,MAAM,EAAE;EACZ,CAAC;EACDjB,OAAO,EAAE;IACLa,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,UAAU;IAC1BG,MAAM,EAAE;EACZ;AACJ,CAAC,CAAC;AAAC,eACY,IAAAE,kBAAS,EAAC3E,MAAM,CAAC;AAAA"}
1
+ {"version":3,"names":["ELEVATION","DEFAULT_MAX_WIDTH","Banner","initiallyVisible","dismissable","icon","buttonColor","content","contentStyle","style","theme","Icon","rest","visible","setVisible","React","useState","useEffect","current","position","useRef","Animated","Value","layout","setLayout","height","measured","timing","duration","toValue","useNativeDriver","start","handleLayout","nativeEvent","multiply","translateY","add","styles","container","shadow","wrapper","absolute","transform","opacity","marginBottom","message","color","colors","text","actions","primary","StyleSheet","create","elevation","overflow","alignSelf","width","maxWidth","top","flexDirection","justifyContent","marginHorizontal","marginTop","margin","flex","withTheme"],"sourceRoot":"../../../src","sources":["components/Banner.tsx"],"mappings":";;;;;;AAAA;AACA;AASA;AAEA;AACA;AAAuC;AAAA;AAAA;AAAA;AAGvC,MAAMA,SAAS,GAAG,CAAC;AACnB,MAAMC,iBAAiB,GAAG,GAAG;AA4B7B,MAAMC,MAAgD,GAAG,QAWnD;EAAA,IAXoD;IACxDC,gBAAgB,GAAG,IAAI;IACvBC,WAAW,GAAG,IAAI;IAClBC,IAAI;IACJC,WAAW;IACXC,OAAO;IACPC,YAAY;IACZC,KAAK;IACLC,KAAK;IACLC,IAAI;IACJ,GAAGC;EACL,CAAC;EACC,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGC,KAAK,CAACC,QAAQ,CAACb,gBAAgB,CAAC;EAE9DY,KAAK,CAACE,SAAS,CAAC,MAAM;IACpB,IAAId,gBAAgB,EAAE;MACpBW,UAAU,CAAC,IAAI,CAAC;IAClB;EACF,CAAC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CACF,EACNH,WAAW,gBACV,oBAAC,iBAAI;IAAC,KAAK,EAAEiC,MAAM,CAACY;EAAQ,gBAC1B,oBAAC,mBAAM;IACL,KAAK,EAAE3C,WAAW,IAAII,KAAK,CAACqC,MAAM,CAACG,OAAQ;IAC3C,KAAK,EAAC,OAAO;IACb,OAAO,EAAE,MAAMpC,UAAU,CAAC,KAAK;EAAE,EACjC,CACG,GACL,IAAI,CACM,CACX,CACC;AAEd,CAAC;AAED,MAAMuB,MAAM,GAAGc,uBAAU,CAACC,MAAM,CAAC;EAC/Bd,SAAS,EAAE;IACTe,SAAS,EAAErD;EACb,CAAC;EACDwC,OAAO,EAAE;IACPc,QAAQ,EAAE,QAAQ;IAClBC,SAAS,EAAE,QAAQ;IACnBC,KAAK,EAAE,MAAM;IACbC,QAAQ,EAAExD;EACZ,CAAC;EACDwC,QAAQ,EAAE;IACRtB,QAAQ,EAAE,UAAU;IACpBuC,GAAG,EAAE,CAAC;IACNF,KAAK,EAAE;EACT,CAAC;EACDjD,OAAO,EAAE;IACPoD,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,YAAY;IAC5BC,gBAAgB,EAAE,CAAC;IACnBC,SAAS,EAAE,EAAE;IACblB,YAAY,EAAE;EAChB,CAAC;EACDvC,IAAI,EAAE;IACJ0D,MAAM,EAAE;EACV,CAAC;EACDlB,OAAO,EAAE;IACPmB,IAAI,EAAE,CAAC;IACPD,MAAM,EAAE;EACV,CAAC;EACDd,OAAO,EAAE;IACPU,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,UAAU;IAC1BG,MAAM,EAAE;EACV;AACF,CAAC,CAAC;AAAC,eAEY,IAAAE,kBAAS,EAAC/D,MAAM,CAAC;AAAA"}
@@ -13,8 +13,12 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
13
13
  const BottomSheet = _ref => {
14
14
  let {
15
15
  theme,
16
- snapPoints = ["10%", "50%", "80%"],
17
- initialSnapIndex = 0,
16
+ snapPoints: snapPointsProp,
17
+ topSnapPosition = "10%",
18
+ middleSnapPosition = "50%",
19
+ bottomSnapPosition = "80%",
20
+ initialSnapIndex,
21
+ initialSnapPosition = "bottom",
18
22
  showHandle = true,
19
23
  handleColor = theme.colors.divider,
20
24
  topBorderRadius = 20,
@@ -26,13 +30,24 @@ const BottomSheet = _ref => {
26
30
  ...rest
27
31
  } = _ref;
28
32
  const backgroundColor = (style === null || style === void 0 ? void 0 : style.backgroundColor) || theme.colors.background;
33
+ const snapPoints = snapPointsProp || [topSnapPosition, middleSnapPosition, bottomSnapPosition];
34
+ const getSnapIndexFromPosition = position => {
35
+ switch (position) {
36
+ case "top":
37
+ return 0;
38
+ case "middle":
39
+ return 1;
40
+ case "bottom":
41
+ return 2;
42
+ }
43
+ };
29
44
  return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
30
45
  style: styles.parentContainer,
31
46
  pointerEvents: "box-none"
32
47
  }, /*#__PURE__*/_react.default.createElement(_BottomSheetComponent.default, _extends({
33
48
  componentType: "ScrollView",
34
49
  snapPoints: snapPoints,
35
- initialSnapIndex: initialSnapIndex,
50
+ initialSnapIndex: initialSnapIndex !== null && initialSnapIndex !== void 0 ? initialSnapIndex : getSnapIndexFromPosition(initialSnapPosition),
36
51
  renderHandle: () => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, showHandle && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
37
52
  style: [styles.handleContainer, {
38
53
  backgroundColor,
@@ -1 +1 @@
1
- {"version":3,"names":["BottomSheet","theme","snapPoints","initialSnapIndex","showHandle","handleColor","colors","divider","topBorderRadius","borderWidth","borderColor","onSettle","style","children","rest","backgroundColor","background","styles","parentContainer","handleContainer","borderTopLeftRadius","borderTopRightRadius","handle","contentContainerStyle","StyleSheet","flatten","containerStyle","create","position","left","right","top","bottom","zIndex","overflow","paddingHorizontal","paddingVertical","flex","alignItems","width","height","borderRadius","withTheme"],"sourceRoot":"../../../../src","sources":["components/BottomSheet/BottomSheet.tsx"],"mappings":";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ACpCa,oBAAoB,EAAEb,eAAe;MACrCC,WAAW;MACXC;IACF,CAAC,CACF,CAAE;IACH,QAAQ,EAAEC;EAAS,GACfG,IAAI,GAEPD,QAAQ,CACY,CAClB;AAEX,CAAC;AAED,MAAMI,MAAM,GAAGO,uBAAU,CAACG,MAAM,CAAC;EAC/B;EACAT,eAAe,EAAE;IACfU,QAAQ,EAAE,UAAU;IACpBC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE,CAAC;IACTC,MAAM,EAAE,EAAE;IACVC,QAAQ,EAAE;EACZ,CAAC;EACDX,qBAAqB,EAAE;IACrBY,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE;EACnB,CAAC;EACDV,cAAc,EAAE;IACdW,IAAI,EAAE,CAAC;IACPH,QAAQ,EAAE;EACZ,CAAC;EACDf,eAAe,EAAE;IACfmB,UAAU,EAAE,QAAQ;IACpBF,eAAe,EAAE;EACnB,CAAC;EACDd,MAAM,EAAE;IACNiB,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,CAAC;IACTC,YAAY,EAAE;EAChB;AACF,CAAC,CAAC;AAAC,eAEY,IAAAC,kBAAS,EAAC1C,WAAW,CAAC;AAAA"}
1
+ {"version":3,"names":["BottomSheet","theme","snapPoints","snapPointsProp","topSnapPosition","middleSnapPosition","bottomSnapPosition","initialSnapIndex","initialSnapPosition","showHandle","handleColor","colors","divider","topBorderRadius","borderWidth","borderColor","onSettle","style","children","rest","backgroundColor","background","getSnapIndexFromPosition","position","styles","parentContainer","handleContainer","borderTopLeftRadius","borderTopRightRadius","handle","contentContainerStyle","StyleSheet","flatten","containerStyle","create","left","right","top","bottom","zIndex","overflow","paddingHorizontal","paddingVertical","flex","alignItems","width","height","borderRadius","withTheme"],"sourceRoot":"../../../../src","sources":["components/BottomSheet/BottomSheet.tsx"],"mappings":";;;;;;AAAA;AACA;AAQA;AAEA;AAA0C;AAAA;AAoB1C,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AAEd,eAAe;QACpCe,oBAAoB,EAAEf;MACxB,CAAC;IACD,gBAEF,6BAAC,iBAAI;MACH,KAAK,EAAE,CAACW,MAAM,CAACK,MAAM,EAAE;QAAET,eAAe,EAAEV;MAAY,CAAC;IAAE,EACzD,CAEL,CAEH;IACF,qBAAqB,EAAE,CAACc,MAAM,CAACM,qBAAqB,EAAEb,KAAK,CAAE;IAC7D,cAAc,EAAEc,uBAAU,CAACC,OAAO,CAAC,CACjCR,MAAM,CAACS,cAAc,EACrB;MACEb,eAAe;MACfO,mBAAmB,EAAEd,eAAe;MACpCe,oBAAoB,EAAEf,eAAe;MACrCC,WAAW;MACXC;IACF,CAAC,CACF,CAAE;IACH,QAAQ,EAAEC;EAAS,GACfG,IAAI,GAEPD,QAAQ,CACY,CAClB;AAEX,CAAC;AAED,MAAMM,MAAM,GAAGO,uBAAU,CAACG,MAAM,CAAC;EAC/B;EACAT,eAAe,EAAE;IACfF,QAAQ,EAAE,UAAU;IACpBY,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE,CAAC;IACTC,MAAM,EAAE,EAAE;IACVC,QAAQ,EAAE;EACZ,CAAC;EACDV,qBAAqB,EAAE;IACrBW,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE;EACnB,CAAC;EACDT,cAAc,EAAE;IACdU,IAAI,EAAE,CAAC;IACPH,QAAQ,EAAE;EACZ,CAAC;EACDd,eAAe,EAAE;IACfkB,UAAU,EAAE,QAAQ;IACpBF,eAAe,EAAE;EACnB,CAAC;EACDb,MAAM,EAAE;IACNgB,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,CAAC;IACTC,YAAY,EAAE;EAChB;AACF,CAAC,CAAC;AAAC,eAEY,IAAAC,kBAAS,EAAChD,WAAW,CAAC;AAAA"}
@@ -10,19 +10,10 @@ var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reani
10
10
  var _reactNativeGestureHandler = require("react-native-gesture-handler");
11
11
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
12
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
- /**
14
- * Slightly modfied version as taken from https://github.com/rgommezz/react-native-scroll-bottom-sheet
15
- * Main previously breaking change:
16
- * const node = this.props.innerRef.current?.getNode() ==> const node = this.props.innerRef.current as any
17
- */
18
- /**
19
- * Copyright (c) 2020 Raul Gomez Acuna
20
- *
21
- * This source code is licensed under the MIT license found in the
22
- * LICENSE file in the root directory of this source tree.
23
- *
24
- */
25
-
13
+ 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); }
14
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
16
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
26
17
  const {
27
18
  //@ts-ignore
28
19
  interpolate: interpolateDeprecated,
@@ -82,42 +73,44 @@ const imperativeScrollOptions = {
82
73
  }
83
74
  };
84
75
  class ScrollBottomSheet extends _react.Component {
76
+ /**
77
+ * Gesture Handler references
78
+ */
79
+
80
+ /**
81
+ * Flag to indicate imperative snapping
82
+ */
83
+
84
+ /**
85
+ * Manual snapping amount
86
+ */
87
+
85
88
  constructor(props) {
86
- var _this;
87
- var _a;
89
+ var _props$animationConfi, _this;
88
90
  super(props);
89
91
  _this = this;
90
- /**
91
- * Gesture Handler references
92
- */
93
- this.masterDrawer = /*#__PURE__*/_react.default.createRef();
94
- this.drawerHandleRef = /*#__PURE__*/_react.default.createRef();
95
- this.drawerContentRef = /*#__PURE__*/_react.default.createRef();
96
- this.scrollComponentRef = /*#__PURE__*/_react.default.createRef();
97
- /**
98
- * Flag to indicate imperative snapping
99
- */
100
- this.isManuallySetValue = new _reactNativeReanimated.Value(0);
101
- /**
102
- * Manual snapping amount
103
- */
104
- this.manualYOffset = new _reactNativeReanimated.Value(0);
105
- this.prevSnapIndex = -1;
106
- this.dragY = new _reactNativeReanimated.Value(0);
107
- this.prevDragY = new _reactNativeReanimated.Value(0);
108
- this.tempDestSnapPoint = new _reactNativeReanimated.Value(0);
109
- this.isAndroid = new _reactNativeReanimated.Value(Number(_reactNative.Platform.OS === "android"));
110
- this.animationClock = new _reactNativeReanimated.Clock();
111
- this.animationPosition = new _reactNativeReanimated.Value(0);
112
- this.animationFinished = new _reactNativeReanimated.Value(0);
113
- this.animationFrameTime = new _reactNativeReanimated.Value(0);
114
- this.velocityY = new _reactNativeReanimated.Value(0);
115
- this.lastStartScrollY = new _reactNativeReanimated.Value(0);
116
- this.destSnapPoint = new _reactNativeReanimated.Value(0);
117
- this.dragWithHandle = new _reactNativeReanimated.Value(0);
118
- this.scrollUpAndPullDown = new _reactNativeReanimated.Value(0);
119
- this.convertPercentageToDp = str => Number(str.split("%")[0]) * (windowHeight - this.props.topInset) / 100;
120
- this.getNormalisedSnapPoints = () => {
92
+ _defineProperty(this, "masterDrawer", /*#__PURE__*/_react.default.createRef());
93
+ _defineProperty(this, "drawerHandleRef", /*#__PURE__*/_react.default.createRef());
94
+ _defineProperty(this, "drawerContentRef", /*#__PURE__*/_react.default.createRef());
95
+ _defineProperty(this, "scrollComponentRef", /*#__PURE__*/_react.default.createRef());
96
+ _defineProperty(this, "isManuallySetValue", new _reactNativeReanimated.Value(0));
97
+ _defineProperty(this, "manualYOffset", new _reactNativeReanimated.Value(0));
98
+ _defineProperty(this, "prevSnapIndex", -1);
99
+ _defineProperty(this, "dragY", new _reactNativeReanimated.Value(0));
100
+ _defineProperty(this, "prevDragY", new _reactNativeReanimated.Value(0));
101
+ _defineProperty(this, "tempDestSnapPoint", new _reactNativeReanimated.Value(0));
102
+ _defineProperty(this, "isAndroid", new _reactNativeReanimated.Value(Number(_reactNative.Platform.OS === "android")));
103
+ _defineProperty(this, "animationClock", new _reactNativeReanimated.Clock());
104
+ _defineProperty(this, "animationPosition", new _reactNativeReanimated.Value(0));
105
+ _defineProperty(this, "animationFinished", new _reactNativeReanimated.Value(0));
106
+ _defineProperty(this, "animationFrameTime", new _reactNativeReanimated.Value(0));
107
+ _defineProperty(this, "velocityY", new _reactNativeReanimated.Value(0));
108
+ _defineProperty(this, "lastStartScrollY", new _reactNativeReanimated.Value(0));
109
+ _defineProperty(this, "destSnapPoint", new _reactNativeReanimated.Value(0));
110
+ _defineProperty(this, "dragWithHandle", new _reactNativeReanimated.Value(0));
111
+ _defineProperty(this, "scrollUpAndPullDown", new _reactNativeReanimated.Value(0));
112
+ _defineProperty(this, "convertPercentageToDp", str => Number(str.split("%")[0]) * (windowHeight - this.props.topInset) / 100);
113
+ _defineProperty(this, "getNormalisedSnapPoints", () => {
121
114
  return this.props.snapPoints.map(p => {
122
115
  if (typeof p === "string") {
123
116
  return this.convertPercentageToDp(p);
@@ -126,8 +119,8 @@ class ScrollBottomSheet extends _react.Component {
126
119
  }
127
120
  throw new Error("Invalid type for value ".concat(p, ": ").concat(typeof p, ". It should be either a percentage string or a number"));
128
121
  });
129
- };
130
- this.getScrollComponent = () => {
122
+ });
123
+ _defineProperty(this, "getScrollComponent", () => {
131
124
  switch (this.props.componentType) {
132
125
  case "FlatList":
133
126
  return _reactNative.FlatList;
@@ -138,32 +131,33 @@ class ScrollBottomSheet extends _react.Component {
138
131
  default:
139
132
  throw new Error("Component type not supported: it should be one of `FlatList`, `ScrollView` or `SectionList`");
140
133
  }
141
- };
142
- this.snapTo = index => {
134
+ });
135
+ _defineProperty(this, "snapTo", index => {
143
136
  const snapPoints = this.getNormalisedSnapPoints();
144
137
  this.isManuallySetValue.setValue(1);
145
138
  this.manualYOffset.setValue(snapPoints[index]);
146
139
  this.nextSnapIndex.setValue(index);
147
- };
140
+ });
148
141
  const {
149
142
  initialSnapIndex,
150
143
  animationType
151
144
  } = props;
152
145
  const animationDriver = animationType === "timing" ? 0 : 1;
153
- const animationDuration = props.animationType === "timing" && ((_a = props.animationConfig) === null || _a === void 0 ? void 0 : _a.duration) || DEFAULT_ANIMATION_DURATION;
146
+ const animationDuration = props.animationType === "timing" && ((_props$animationConfi = props.animationConfig) === null || _props$animationConfi === void 0 ? void 0 : _props$animationConfi.duration) || DEFAULT_ANIMATION_DURATION;
154
147
  const ScrollComponent = this.getScrollComponent();
155
148
  // @ts-ignore
156
149
  this.scrollComponent = _reactNativeReanimated.default.createAnimatedComponent(ScrollComponent);
157
- const snapPoints = this.getNormalisedSnapPoints();
158
- const openPosition = snapPoints[0];
159
- const closedPosition = this.props.enableOverScroll ? windowHeight : snapPoints[snapPoints.length - 1];
160
- const initialSnap = snapPoints[initialSnapIndex];
150
+ const _snapPoints = this.getNormalisedSnapPoints();
151
+ const openPosition = _snapPoints[0];
152
+ const closedPosition = this.props.enableOverScroll ? windowHeight : _snapPoints[_snapPoints.length - 1];
153
+ const initialSnap = _snapPoints[initialSnapIndex];
161
154
  this.nextSnapIndex = new _reactNativeReanimated.Value(initialSnapIndex);
162
155
  const initialDecelerationRate = _reactNative.Platform.select({
163
156
  android: props.initialSnapIndex === 0 ? ANDROID_NORMAL_DECELERATION_RATE : 0,
164
157
  ios: IOS_NORMAL_DECELERATION_RATE
165
158
  });
166
159
  this.decelerationRate = new _reactNativeReanimated.Value(initialDecelerationRate);
160
+
167
161
  //@ts-ignore
168
162
  const handleGestureState = new _reactNativeReanimated.Value(-1);
169
163
  //@ts-ignore
@@ -202,27 +196,29 @@ class ScrollBottomSheet extends _react.Component {
202
196
  const didHandleGestureBegin = (0, _reactNativeReanimated.eq)(handleGestureState, _reactNativeGestureHandler.State.ACTIVE);
203
197
  const isAnimationInterrupted = (0, _reactNativeReanimated.and)((0, _reactNativeReanimated.or)((0, _reactNativeReanimated.eq)(handleGestureState, _reactNativeGestureHandler.State.BEGAN), (0, _reactNativeReanimated.eq)(drawerGestureState, _reactNativeGestureHandler.State.BEGAN), (0, _reactNativeReanimated.and)((0, _reactNativeReanimated.eq)(this.isAndroid, 0), (0, _reactNativeReanimated.eq)(animationDriver, 1), (0, _reactNativeReanimated.or)((0, _reactNativeReanimated.eq)(drawerGestureState, _reactNativeGestureHandler.State.ACTIVE), (0, _reactNativeReanimated.eq)(handleGestureState, _reactNativeGestureHandler.State.ACTIVE)))), (0, _reactNativeReanimated.clockRunning)(this.animationClock));
204
198
  this.didGestureFinish = (0, _reactNativeReanimated.or)((0, _reactNativeReanimated.and)((0, _reactNativeReanimated.eq)(handleOldGestureState, _reactNativeGestureHandler.State.ACTIVE), (0, _reactNativeReanimated.eq)(handleGestureState, _reactNativeGestureHandler.State.END)), (0, _reactNativeReanimated.and)((0, _reactNativeReanimated.eq)(drawerOldGestureState, _reactNativeGestureHandler.State.ACTIVE), (0, _reactNativeReanimated.eq)(drawerGestureState, _reactNativeGestureHandler.State.END)));
199
+
205
200
  // Function that determines if the last snap point is in the range {snapPoints}
206
201
  // In the case of interruptions in the middle of an animation, we'll get
207
202
  // lastSnap values outside the range
208
203
  const isLastSnapPointInRange = function () {
209
204
  let i = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
210
- return i === snapPoints.length ? lastSnapInRange : (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(_this.lastSnap, snapPoints[i]), [(0, _reactNativeReanimated.set)(lastSnapInRange, 1)], isLastSnapPointInRange(i + 1));
205
+ return i === _snapPoints.length ? lastSnapInRange : (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(_this.lastSnap, _snapPoints[i]), [(0, _reactNativeReanimated.set)(lastSnapInRange, 1)], isLastSnapPointInRange(i + 1));
211
206
  };
212
- const scrollY = [(0, _reactNativeReanimated.set)(lastSnapInRange, 0), isLastSnapPointInRange(), (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.or)(didHandleGestureBegin, (0, _reactNativeReanimated.and)(this.isManuallySetValue, (0, _reactNativeReanimated.not)((0, _reactNativeReanimated.eq)(this.manualYOffset, snapPoints[0])))), [(0, _reactNativeReanimated.set)(this.dragWithHandle, 1), 0]), (0, _reactNativeReanimated.cond)(
207
+ const scrollY = [(0, _reactNativeReanimated.set)(lastSnapInRange, 0), isLastSnapPointInRange(), (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.or)(didHandleGestureBegin, (0, _reactNativeReanimated.and)(this.isManuallySetValue, (0, _reactNativeReanimated.not)((0, _reactNativeReanimated.eq)(this.manualYOffset, _snapPoints[0])))), [(0, _reactNativeReanimated.set)(this.dragWithHandle, 1), 0]), (0, _reactNativeReanimated.cond)(
213
208
  // This is to account for a continuous scroll on the drawer from a snap point
214
209
  // Different than top, bringing the drawer to the top position, so that if we
215
210
  // change scroll direction without releasing the gesture, it doesn't pull down the drawer again
216
- (0, _reactNativeReanimated.and)((0, _reactNativeReanimated.eq)(this.dragWithHandle, 1), (0, _reactNativeReanimated.greaterThan)(snapPoints[0], (0, _reactNativeReanimated.add)(this.lastSnap, this.dragY)), (0, _reactNativeReanimated.and)((0, _reactNativeReanimated.not)((0, _reactNativeReanimated.eq)(this.lastSnap, snapPoints[0])), lastSnapInRange)), [(0, _reactNativeReanimated.set)(this.lastSnap, snapPoints[0]), (0, _reactNativeReanimated.set)(this.dragWithHandle, 0), this.lastStartScrollY], (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.dragWithHandle, 1), 0, this.lastStartScrollY))];
211
+ (0, _reactNativeReanimated.and)((0, _reactNativeReanimated.eq)(this.dragWithHandle, 1), (0, _reactNativeReanimated.greaterThan)(_snapPoints[0], (0, _reactNativeReanimated.add)(this.lastSnap, this.dragY)), (0, _reactNativeReanimated.and)((0, _reactNativeReanimated.not)((0, _reactNativeReanimated.eq)(this.lastSnap, _snapPoints[0])), lastSnapInRange)), [(0, _reactNativeReanimated.set)(this.lastSnap, _snapPoints[0]), (0, _reactNativeReanimated.set)(this.dragWithHandle, 0), this.lastStartScrollY], (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.dragWithHandle, 1), 0, this.lastStartScrollY))];
217
212
  this.didScrollUpAndPullDown = (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.and)((0, _reactNativeReanimated.greaterOrEq)(this.dragY, this.lastStartScrollY), (0, _reactNativeReanimated.greaterThan)(this.lastStartScrollY, 0)), (0, _reactNativeReanimated.set)(this.scrollUpAndPullDown, 1));
218
213
  this.setTranslationY = (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.and)((0, _reactNativeReanimated.not)(this.dragWithHandle), (0, _reactNativeReanimated.not)((0, _reactNativeReanimated.greaterOrEq)(this.dragY, this.lastStartScrollY))), (0, _reactNativeReanimated.set)(this.translationY, (0, _reactNativeReanimated.sub)(this.dragY, this.lastStartScrollY)), (0, _reactNativeReanimated.set)(this.translationY, this.dragY));
219
214
  this.extraOffset = (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.scrollUpAndPullDown, 1), this.lastStartScrollY, 0);
220
215
  const endOffsetY = (0, _reactNativeReanimated.add)(this.lastSnap, this.translationY, (0, _reactNativeReanimated.multiply)(1 - props.friction, this.velocityY));
221
216
  this.calculateNextSnapPoint = function () {
222
217
  let i = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
223
- return i === snapPoints.length ? _this.tempDestSnapPoint : (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.greaterThan)((0, _reactNativeReanimated.abs)((0, _reactNativeReanimated.sub)(_this.tempDestSnapPoint, endOffsetY)), (0, _reactNativeReanimated.abs)((0, _reactNativeReanimated.sub)((0, _reactNativeReanimated.add)(snapPoints[i], _this.extraOffset), endOffsetY))), [(0, _reactNativeReanimated.set)(_this.tempDestSnapPoint, (0, _reactNativeReanimated.add)(snapPoints[i], _this.extraOffset)), (0, _reactNativeReanimated.set)(_this.nextSnapIndex, i), _this.calculateNextSnapPoint(i + 1)], _this.calculateNextSnapPoint(i + 1));
218
+ return i === _snapPoints.length ? _this.tempDestSnapPoint : (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.greaterThan)((0, _reactNativeReanimated.abs)((0, _reactNativeReanimated.sub)(_this.tempDestSnapPoint, endOffsetY)), (0, _reactNativeReanimated.abs)((0, _reactNativeReanimated.sub)((0, _reactNativeReanimated.add)(_snapPoints[i], _this.extraOffset), endOffsetY))), [(0, _reactNativeReanimated.set)(_this.tempDestSnapPoint, (0, _reactNativeReanimated.add)(_snapPoints[i], _this.extraOffset)), (0, _reactNativeReanimated.set)(_this.nextSnapIndex, i), _this.calculateNextSnapPoint(i + 1)], _this.calculateNextSnapPoint(i + 1));
224
219
  };
225
220
  const runAnimation = _ref => {
221
+ var _props$animationConfi2;
226
222
  let {
227
223
  clock,
228
224
  from,
@@ -232,7 +228,6 @@ class ScrollBottomSheet extends _react.Component {
232
228
  velocity,
233
229
  frameTime
234
230
  } = _ref;
235
- var _a;
236
231
  const state = {
237
232
  finished,
238
233
  velocity: new _reactNativeReanimated.Value(0),
@@ -242,7 +237,7 @@ class ScrollBottomSheet extends _react.Component {
242
237
  };
243
238
  const timingConfig = {
244
239
  duration: animationDuration,
245
- easing: props.animationType === "timing" && ((_a = props.animationConfig) === null || _a === void 0 ? void 0 : _a.easing) || DEFAULT_EASING,
240
+ easing: props.animationType === "timing" && ((_props$animationConfi2 = props.animationConfig) === null || _props$animationConfi2 === void 0 ? void 0 : _props$animationConfi2.easing) || DEFAULT_EASING,
246
241
  toValue: new _reactNativeReanimated.Value(0)
247
242
  };
248
243
  const springConfig = {
@@ -258,14 +253,14 @@ class ScrollBottomSheet extends _react.Component {
258
253
  //@ts-ignore
259
254
  (0, _reactNativeReanimated.timing)(clock, state, timingConfig), (0, _reactNativeReanimated.spring)(clock, state, springConfig)), (0, _reactNativeReanimated.cond)(state.finished, [(0, _reactNativeReanimated.call)([this.nextSnapIndex], _ref2 => {
260
255
  let [value] = _ref2;
261
- var _a, _b;
262
256
  if (value !== this.prevSnapIndex) {
263
- (_b = (_a = this.props).onSettle) === null || _b === void 0 ? void 0 : _b.call(_a, value);
257
+ var _this$props$onSettle, _this$props;
258
+ (_this$props$onSettle = (_this$props = this.props).onSettle) === null || _this$props$onSettle === void 0 ? void 0 : _this$props$onSettle.call(_this$props, value);
264
259
  }
265
260
  this.prevSnapIndex = value;
266
261
  }),
267
262
  // Resetting appropriate values
268
- (0, _reactNativeReanimated.set)(drawerOldGestureState, _reactNativeGestureHandler.State.END), (0, _reactNativeReanimated.set)(handleOldGestureState, _reactNativeGestureHandler.State.END), (0, _reactNativeReanimated.set)(this.prevTranslateYOffset, state.position), (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.scrollUpAndPullDown, 1), [(0, _reactNativeReanimated.set)(this.prevTranslateYOffset, (0, _reactNativeReanimated.sub)(this.prevTranslateYOffset, this.lastStartScrollY)), (0, _reactNativeReanimated.set)(this.lastStartScrollY, 0), (0, _reactNativeReanimated.set)(this.scrollUpAndPullDown, 0)]), (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.destSnapPoint, snapPoints[0]), [(0, _reactNativeReanimated.set)(this.dragWithHandle, 0)]), (0, _reactNativeReanimated.set)(this.isManuallySetValue, 0), (0, _reactNativeReanimated.set)(this.manualYOffset, 0), (0, _reactNativeReanimated.stopClock)(clock), this.prevTranslateYOffset],
263
+ (0, _reactNativeReanimated.set)(drawerOldGestureState, _reactNativeGestureHandler.State.END), (0, _reactNativeReanimated.set)(handleOldGestureState, _reactNativeGestureHandler.State.END), (0, _reactNativeReanimated.set)(this.prevTranslateYOffset, state.position), (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.scrollUpAndPullDown, 1), [(0, _reactNativeReanimated.set)(this.prevTranslateYOffset, (0, _reactNativeReanimated.sub)(this.prevTranslateYOffset, this.lastStartScrollY)), (0, _reactNativeReanimated.set)(this.lastStartScrollY, 0), (0, _reactNativeReanimated.set)(this.scrollUpAndPullDown, 0)]), (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.destSnapPoint, _snapPoints[0]), [(0, _reactNativeReanimated.set)(this.dragWithHandle, 0)]), (0, _reactNativeReanimated.set)(this.isManuallySetValue, 0), (0, _reactNativeReanimated.set)(this.manualYOffset, 0), (0, _reactNativeReanimated.stopClock)(clock), this.prevTranslateYOffset],
269
264
  // We made the block return the updated position,
270
265
  state.position)];
271
266
  };
@@ -294,7 +289,7 @@ class ScrollBottomSheet extends _react.Component {
294
289
  extrapolate: _reactNativeReanimated.Extrapolate.CLAMP
295
290
  });
296
291
  this.position = interpolate(this.translateY, {
297
- inputRange: [openPosition, snapPoints[snapPoints.length - 1]],
292
+ inputRange: [openPosition, _snapPoints[_snapPoints.length - 1]],
298
293
  outputRange: [1, 0],
299
294
  extrapolate: _reactNativeReanimated.Extrapolate.CLAMP
300
295
  });
@@ -335,25 +330,26 @@ class ScrollBottomSheet extends _react.Component {
335
330
  ref: this.scrollComponentRef,
336
331
  waitFor: this.masterDrawer,
337
332
  simultaneousHandlers: this.drawerContentRef
338
- }, /*#__PURE__*/_react.default.createElement(AnimatedScrollableComponent, {
333
+ }, /*#__PURE__*/_react.default.createElement(AnimatedScrollableComponent, _extends({
339
334
  overScrollMode: "never",
340
- bounces: false,
341
- ...rest,
342
- ref: this.props.innerRef,
335
+ bounces: false
336
+ }, rest, {
337
+ ref: this.props.innerRef
343
338
  // @ts-ignore
339
+ ,
344
340
  decelerationRate: this.decelerationRate,
345
341
  onScrollBeginDrag: this.onScrollBeginDrag,
346
342
  scrollEventThrottle: 1,
347
343
  contentContainerStyle: [rest.contentContainerStyle, {
348
344
  paddingBottom: this.getNormalisedSnapPoints()[0]
349
345
  }]
350
- })))), this.props.animatedPosition && /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.Code, {
346
+ }))))), this.props.animatedPosition && /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.Code, {
351
347
  exec: (0, _reactNativeReanimated.onChange)(this.position, (0, _reactNativeReanimated.set)(this.props.animatedPosition, this.position))
352
348
  }), /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.Code, {
353
349
  exec: (0, _reactNativeReanimated.onChange)(this.dragY, (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.not)((0, _reactNativeReanimated.eq)(this.dragY, 0)), (0, _reactNativeReanimated.set)(this.prevDragY, this.dragY)))
354
350
  }), /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.Code, {
355
351
  exec: (0, _reactNativeReanimated.onChange)(this.didGestureFinish, (0, _reactNativeReanimated.cond)(this.didGestureFinish, [this.didScrollUpAndPullDown, this.setTranslationY, (0, _reactNativeReanimated.set)(this.tempDestSnapPoint, (0, _reactNativeReanimated.add)(normalisedSnapPoints[0], this.extraOffset)), (0, _reactNativeReanimated.set)(this.nextSnapIndex, 0), (0, _reactNativeReanimated.set)(this.destSnapPoint, this.calculateNextSnapPoint()), (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.and)((0, _reactNativeReanimated.greaterThan)(this.dragY, this.lastStartScrollY), this.isAndroid, (0, _reactNativeReanimated.not)(this.dragWithHandle)), (0, _reactNativeReanimated.call)([], () => {
356
- var _a, _b;
352
+ var _this$props2, _this$props2$data;
357
353
  // This prevents the scroll glide from happening on Android when pulling down with inertia.
358
354
  // It's not perfect, but does the job for now
359
355
  const {
@@ -362,68 +358,25 @@ class ScrollBottomSheet extends _react.Component {
362
358
  } = imperativeScrollOptions[this.props.componentType];
363
359
  // @ts-ignore
364
360
  const node = this.props.innerRef.current;
365
- if (node && node[method] && (this.props.componentType === "FlatList" && (((_b = (_a = this.props) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.length) || 0) > 0 || this.props.componentType === "SectionList" && this.props.sections.length > 0 || this.props.componentType === "ScrollView")) {
361
+ if (node && node[method] && (this.props.componentType === "FlatList" && (((_this$props2 = this.props) === null || _this$props2 === void 0 ? void 0 : (_this$props2$data = _this$props2.data) === null || _this$props2$data === void 0 ? void 0 : _this$props2$data.length) || 0) > 0 || this.props.componentType === "SectionList" && this.props.sections.length > 0 || this.props.componentType === "ScrollView")) {
366
362
  node[method](args);
367
363
  }
368
364
  })), (0, _reactNativeReanimated.set)(this.dragY, 0), (0, _reactNativeReanimated.set)(this.velocityY, 0), (0, _reactNativeReanimated.set)(this.lastSnap, (0, _reactNativeReanimated.sub)(this.destSnapPoint, (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.scrollUpAndPullDown, 1), this.lastStartScrollY, 0))), (0, _reactNativeReanimated.call)([this.lastSnap], _ref3 => {
365
+ var _this$masterDrawer, _this$masterDrawer$cu;
369
366
  let [value] = _ref3;
370
- var _a, _b;
371
367
  // This is the TapGHandler trick
372
368
  // @ts-ignore
373
- (_b = (_a = this.masterDrawer) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.setNativeProps({
369
+ (_this$masterDrawer = this.masterDrawer) === null || _this$masterDrawer === void 0 ? void 0 : (_this$masterDrawer$cu = _this$masterDrawer.current) === null || _this$masterDrawer$cu === void 0 ? void 0 : _this$masterDrawer$cu.setNativeProps({
374
370
  maxDeltaY: value - this.getNormalisedSnapPoints()[0]
375
371
  });
376
372
  }), (0, _reactNativeReanimated.set)(this.decelerationRate, (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.isAndroid, 1), (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.lastSnap, normalisedSnapPoints[0]), ANDROID_NORMAL_DECELERATION_RATE, 0), IOS_NORMAL_DECELERATION_RATE))]))
377
373
  }), /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.Code, {
378
374
  exec: (0, _reactNativeReanimated.onChange)(this.isManuallySetValue, [(0, _reactNativeReanimated.cond)(this.isManuallySetValue, [(0, _reactNativeReanimated.set)(this.destSnapPoint, this.manualYOffset), (0, _reactNativeReanimated.set)(this.animationFinished, 0), (0, _reactNativeReanimated.set)(this.lastSnap, this.manualYOffset), (0, _reactNativeReanimated.call)([this.lastSnap], _ref4 => {
375
+ var _this$masterDrawer2, _this$masterDrawer2$c;
379
376
  let [value] = _ref4;
380
- var _a, _b;
381
377
  // This is the TapGHandler trick
382
378
  // @ts-ignore
383
- (_b = (_a = this.masterDrawer) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.setNativeProps({
384
- maxDeltaY: value - this.getNormalisedSnapPoints()[0]
385
- });
386
- })], [(0, _reactNativeReanimated.set)(this.nextSnapIndex, 0)])])
387
- }));
388
- // On Android, having an intermediary view with pointerEvents="box-none", breaks the
389
- // waitFor logic
390
- if (_reactNative.Platform.OS === "android") {
391
- return /*#__PURE__*/_react.default.createElement(_reactNativeGestureHandler.TapGestureHandler, {
392
- maxDurationMs: 100000,
393
- ref: this.masterDrawer,
394
- maxDeltaY: initialSnap - this.getNormalisedSnapPoints()[0],
395
- shouldCancelWhenOutside: false
396
- }, Content);
397
- }
398
- // On iOS, We need to wrap the content on a view with PointerEvents box-none
399
- // So that we can start scrolling automatically when reaching the top without
400
- // Stopping the gesture
401
- return /*#__PURE__*/_react.default.createElement(_reactNativeGestureHandler.TapGestureHandler, {
402
- maxDurationMs: 100000,
403
- ref: this.masterDrawer,
404
- maxDeltaY: initialSnap - this.getNormalisedSnapPoints()[0]
405
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
406
- style: _reactNative.StyleSheet.absoluteFillObject,
407
- pointerEvents: "box-none"
408
- }, Content));
409
- }
410
- }
411
- exports.ScrollBottomSheet = ScrollBottomSheet;
412
- ScrollBottomSheet.defaultProps = {
413
- topInset: 0,
414
- friction: 0.95,
415
- animationType: "timing",
416
- innerRef: /*#__PURE__*/_react.default.createRef(),
417
- enableOverScroll: false
418
- };
419
- var _default = ScrollBottomSheet;
420
- exports.default = _default;
421
- const styles = _reactNative.StyleSheet.create({
422
- container: {
423
- flex: 1
424
- }
425
- });
426
- //# sourceMappingURL=BottomSheetComponent.js.map _this$masterDrawer2.current) === null || _this$masterDrawer2$c === void 0 ? void 0 : _this$masterDrawer2$c.setNativeProps({
379
+ (_this$masterDrawer2 = this.masterDrawer) === null || _this$masterDrawer2 === void 0 ? void 0 : (_this$masterDrawer2$c = _this$masterDrawer2.current) === null || _this$masterDrawer2$c === void 0 ? void 0 : _this$masterDrawer2$c.setNativeProps({
427
380
  maxDeltaY: value - this.getNormalisedSnapPoints()[0]
428
381
  });
429
382
  })], [(0, _reactNativeReanimated.set)(this.nextSnapIndex, 0)])])