@wavemaker/app-rn-runtime 11.15.5-rc.259 → 11.15.6-1.647697

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 (71) hide show
  1. package/components/basic/bottomsheet/bottomsheet.component.js +10 -131
  2. package/components/basic/bottomsheet/bottomsheet.component.js.map +1 -1
  3. package/components/basic/bottomsheet/bottomsheet.styles.js +3 -0
  4. package/components/basic/bottomsheet/bottomsheet.styles.js.map +1 -1
  5. package/components/basic/button/button.component.js +4 -6
  6. package/components/basic/button/button.component.js.map +1 -1
  7. package/components/basic/progress-circle/progress-circle.component.js +1 -3
  8. package/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  9. package/components/container/container.component.js +1 -23
  10. package/components/container/container.component.js.map +1 -1
  11. package/components/container/container.props.js +0 -1
  12. package/components/container/container.props.js.map +1 -1
  13. package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js +1 -25
  14. package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js.map +1 -1
  15. package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.props.js +0 -1
  16. package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.props.js.map +1 -1
  17. package/components/data/form/form-field/form-field.component.js +0 -1
  18. package/components/data/form/form-field/form-field.component.js.map +1 -1
  19. package/components/data/form/form-field/form-field.props.js +0 -1
  20. package/components/data/form/form-field/form-field.props.js.map +1 -1
  21. package/components/input/baseinput/baseinput.component.js +0 -7
  22. package/components/input/baseinput/baseinput.component.js.map +1 -1
  23. package/components/input/calendar/calendar.component.js +0 -4
  24. package/components/input/calendar/calendar.component.js.map +1 -1
  25. package/components/input/calendar/views/month-view.js +1 -8
  26. package/components/input/calendar/views/month-view.js.map +1 -1
  27. package/components/input/checkboxset/checkboxset.component.js +2 -2
  28. package/components/input/checkboxset/checkboxset.component.js.map +1 -1
  29. package/components/input/checkboxset/checkboxset.props.js +0 -1
  30. package/components/input/checkboxset/checkboxset.props.js.map +1 -1
  31. package/components/input/checkboxset/checkboxset.styles.js +0 -6
  32. package/components/input/checkboxset/checkboxset.styles.js.map +1 -1
  33. package/components/input/chips/chips.component.js +1 -1
  34. package/components/input/chips/chips.component.js.map +1 -1
  35. package/components/input/chips/chips.props.js +0 -1
  36. package/components/input/chips/chips.props.js.map +1 -1
  37. package/components/input/currency/currency.component.js +0 -1
  38. package/components/input/currency/currency.component.js.map +1 -1
  39. package/components/input/number/number.component.js +0 -1
  40. package/components/input/number/number.component.js.map +1 -1
  41. package/components/input/radioset/radioset.component.js +2 -2
  42. package/components/input/radioset/radioset.component.js.map +1 -1
  43. package/components/input/radioset/radioset.props.js +0 -1
  44. package/components/input/radioset/radioset.props.js.map +1 -1
  45. package/components/input/radioset/radioset.styles.js +0 -6
  46. package/components/input/radioset/radioset.styles.js.map +1 -1
  47. package/components/input/text/text.component.js +0 -10
  48. package/components/input/text/text.component.js.map +1 -1
  49. package/components/input/text/text.props.js +0 -1
  50. package/components/input/text/text.props.js.map +1 -1
  51. package/components/input/text/text.styles.js +1 -7
  52. package/components/input/text/text.styles.js.map +1 -1
  53. package/components/input/textarea/textarea.component.js +0 -1
  54. package/components/input/textarea/textarea.component.js.map +1 -1
  55. package/core/AppConfig.js.map +1 -1
  56. package/core/components/textinput.component.js +3 -20
  57. package/core/components/textinput.component.js.map +1 -1
  58. package/core/tappable.component.js +15 -109
  59. package/core/tappable.component.js.map +1 -1
  60. package/npm-shrinkwrap.json +151 -132
  61. package/package-lock.json +151 -132
  62. package/package.json +2 -2
  63. package/runtime/navigator/drawer.navigator.js +0 -1
  64. package/runtime/navigator/drawer.navigator.js.map +1 -1
  65. package/runtime/navigator/stack.navigator.js +1 -13
  66. package/runtime/navigator/stack.navigator.js.map +1 -1
  67. package/runtime/services/device/scan-service.js +34 -12
  68. package/runtime/services/device/scan-service.js.map +1 -1
  69. package/styles/theme.js +10 -20
  70. package/styles/theme.js.map +1 -1
  71. package/styles/theme.variables.js.map +1 -1
@@ -5,7 +5,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
5
5
  import React, { createRef } from 'react';
6
6
  import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
7
7
  import { View, PanResponder, Dimensions, TouchableWithoutFeedback, Platform, StatusBar, BackHandler, KeyboardAvoidingView, Keyboard, Modal, Pressable } from 'react-native';
8
- import { Gesture, GestureDetector, GestureHandlerRootView, ScrollView } from 'react-native-gesture-handler';
8
+ import { ScrollView } from 'react-native-gesture-handler';
9
9
  import Animated, { useAnimatedStyle, withTiming, runOnJS, Easing, makeMutable, cancelAnimation } from 'react-native-reanimated';
10
10
  import * as Animatable from 'react-native-animatable';
11
11
  import WmBottomsheetProps from './bottomsheet.props';
@@ -77,32 +77,8 @@ const AnimatedBottomsheetContent = ({
77
77
  onBackdropPress,
78
78
  onDragHandlePress,
79
79
  getTestProps,
80
- enabledragsettle,
81
- scrollRef,
82
- containerScrollRef,
83
- configurePanGesture
80
+ enabledragsettle
84
81
  }) => {
85
- // Simple RNGH GestureDetector attached to the same view as the PanResponder (panHandlers).
86
- // No thresholds/validation: logs translationY directly during pan.
87
- const panGesture = React.useMemo(() => {
88
- // Create base Pan gesture
89
- const pan = Gesture.Pan().runOnJS(true);
90
-
91
- // Add external gestures for ScrollViews (container widget scrollview)
92
- if (scrollRef && containerScrollRef) {
93
- pan.simultaneousWithExternalGesture(scrollRef, containerScrollRef);
94
- } else if (scrollRef) {
95
- pan.simultaneousWithExternalGesture(scrollRef);
96
- } else if (containerScrollRef) {
97
- pan.simultaneousWithExternalGesture(containerScrollRef);
98
- }
99
-
100
- // Apply custom logic from parent BottomSheet class
101
- if (configurePanGesture) {
102
- configurePanGesture(pan);
103
- }
104
- return pan;
105
- }, [scrollRef, containerScrollRef, configurePanGesture]);
106
82
  const backdropAnimatedStyle = useAnimatedStyle(() => ({
107
83
  opacity: backdropOpacity.value
108
84
  }));
@@ -124,18 +100,15 @@ const AnimatedBottomsheetContent = ({
124
100
  onPress: onBackdropPress
125
101
  }, /*#__PURE__*/React.createElement(Animated.View, _extends({
126
102
  style: [styles.backdrop, backdropAnimatedStyle]
127
- }, getTestProps('backdrop'), getAccessibilityProps(AccessibilityWidgetType.BOTTOMSHEET, props)))), /*#__PURE__*/React.createElement(Animated.View, {
103
+ }, getTestProps('backdrop'), getAccessibilityProps(AccessibilityWidgetType.BOTTOMSHEET, props)))), /*#__PURE__*/React.createElement(Animated.View, _extends({
128
104
  style: [styles.container, containerAnimatedStyle]
129
- // {...panHandlers}
130
- }, /*#__PURE__*/React.createElement(View, _extends({
105
+ }, panHandlers), /*#__PURE__*/React.createElement(View, _extends({
131
106
  style: styles.dragHandleContainer
132
107
  }, dragHandlePanHandlers), /*#__PURE__*/React.createElement(Pressable, {
133
108
  onPress: onDragHandlePress
134
109
  }, /*#__PURE__*/React.createElement(View, _extends({
135
110
  style: styles.dragIconHandle
136
- }, getTestProps('draghandle'))))), /*#__PURE__*/React.createElement(GestureDetector, {
137
- gesture: panGesture
138
- }, children(contentStyle))));
111
+ }, getTestProps('draghandle'))))), children(contentStyle)));
139
112
  };
140
113
  export default class WmBottomsheet extends BaseComponent {
141
114
  // Helper method to calculate animation duration based on distance and velocity
@@ -204,9 +177,6 @@ export default class WmBottomsheet extends BaseComponent {
204
177
  _defineProperty(this, "isIosKeyboardHeightSet", false);
205
178
  _defineProperty(this, "sheetModalService", void 0);
206
179
  _defineProperty(this, "isDragHandleExpanding", false);
207
- //container widget scrollview ref and y offset value
208
- _defineProperty(this, "containerscrollViewRef", null);
209
- _defineProperty(this, "containerscrollYoffset", 0);
210
180
  // Reanimated shared values - created once and reused
211
181
  _defineProperty(this, "translateY", void 0);
212
182
  _defineProperty(this, "backdropOpacity", void 0);
@@ -361,20 +331,6 @@ export default class WmBottomsheet extends BaseComponent {
361
331
  if (this.state.isExpanded || this.props.disableswipedownclose) {
362
332
  if (gestureState.dy < this.expandedHeight / 4 || this.props.disableswipedownclose) {
363
333
  var _this$sheetHeight;
364
- //reseting bottom sheet scrollview offset value to fix scrollview automatic scroll issue while collpsing the bottom sheet
365
- setTimeout(() => {
366
- var _this$state$scrollVie;
367
- if ((_this$state$scrollVie = this.state.scrollViewRef) !== null && _this$state$scrollVie !== void 0 && _this$state$scrollVie.current) {
368
- this.state.scrollViewRef.current.scrollTo({
369
- x: 0,
370
- y: 0,
371
- animated: false
372
- });
373
- this.updateState({
374
- scrollOffset: 0
375
- });
376
- }
377
- }, this.animationDuration);
378
334
  let sheetMinimumHeight = this.props.bottomsheetminimumheight || 0.1;
379
335
  const targetHeight = this.props.disableswipedownclose ? sheetMinimumHeight * SCREEN_HEIGHT : this.calculatedHeight;
380
336
  const currentHeight = ((_this$sheetHeight = this.sheetHeight) === null || _this$sheetHeight === void 0 ? void 0 : _this$sheetHeight.value) || this.expandedHeight;
@@ -416,47 +372,6 @@ export default class WmBottomsheet extends BaseComponent {
416
372
  }
417
373
  }
418
374
  });
419
- _defineProperty(this, "configurePanGesture", pan => {
420
- pan.enabled(true).onUpdate(event => {
421
- // ← Add : any
422
- const gestureState = {
423
- dy: event.translationY,
424
- vy: event.velocityY,
425
- moveX: event.x,
426
- moveY: event.y,
427
- vx: event.velocityX
428
- };
429
- if (gestureState.dy > 0 && this.translateY && this.lastGestureDyShared && this.state.scrollOffset <= 0 && this.containerscrollYoffset <= 0) {
430
- const newTranslateY = Math.max(0, this.lastGestureDyShared.value + gestureState.dy);
431
- this.translateY.value = newTranslateY;
432
- // Reset expand flag if dragging down
433
- this.isDragHandleExpanding = false;
434
- } else if (gestureState.dy < 0 && this.props.expand && this.props.bottomsheetheightratio !== 1 && !this.isDragHandleExpanding && !this.state.isExpanded && this.props.disablescrollonrest) {
435
- // Only trigger expand once with threshold of -50px upward drag
436
- this.isDragHandleExpanding = true;
437
- this.expandBottomSheet();
438
- }
439
- // ... rest of logic
440
- }).onEnd(event => {
441
- // ← Add : any
442
- const gestureState = {
443
- dy: event.translationY,
444
- vy: event.velocityY,
445
- moveX: event.x,
446
- moveY: event.y,
447
- vx: event.velocityX
448
- };
449
- if (gestureState.dy > 0 && this.state.scrollOffset <= 0 && this.containerscrollYoffset <= 0) {
450
- this.handleSwipeGesture(gestureState);
451
- }
452
- }).onFinalize((event, success) => {
453
- // ← Add types
454
- if (!success) {
455
- this.openSheet();
456
- }
457
- });
458
- return pan;
459
- });
460
375
  // panResponder for bottom sheet scroll view
461
376
  _defineProperty(this, "panResponder", PanResponder.create({
462
377
  onStartShouldSetPanResponder: (_, gestureState) => {
@@ -578,11 +493,9 @@ export default class WmBottomsheet extends BaseComponent {
578
493
  this.updateState({
579
494
  isExpanded: false,
580
495
  localModalsOpened: [],
581
- scrollOffset: 0,
582
496
  contentAnimationId: 0,
583
497
  contentAnimatableProps: undefined
584
498
  });
585
- this.containerscrollYoffset = 0;
586
499
  this.handleClose();
587
500
  };
588
501
  if (this.translateY && this.backdropOpacity) {
@@ -658,14 +571,8 @@ export default class WmBottomsheet extends BaseComponent {
658
571
  this.topInset = topInset;
659
572
  });
660
573
  }
661
- const absoluteStyle = {
662
- top: 0,
663
- left: 0,
664
- right: 0
665
- };
666
- const rootStyle = props.modal ? [this.styles.root, absoluteStyle] : this.styles.root;
667
574
  return /*#__PURE__*/React.createElement(View, _extends({
668
- style: rootStyle
575
+ style: this.styles.root
669
576
  }, this.getTestProps('keyboardview')), this._background, /*#__PURE__*/React.createElement(AnimatedBottomsheetContent, {
670
577
  translateY: this.translateY,
671
578
  backdropOpacity: this.backdropOpacity,
@@ -678,21 +585,8 @@ export default class WmBottomsheet extends BaseComponent {
678
585
  onBackdropPress: this.handleBackdropPress,
679
586
  onDragHandlePress: this.handleDragHandlePress,
680
587
  getTestProps: this.getTestProps.bind(this),
681
- enabledragsettle: props.enabledragsettle,
682
- scrollRef: this.state.scrollViewRef,
683
- containerScrollRef: this.containerscrollViewRef,
684
- configurePanGesture: this.configurePanGesture
685
- }, contentStyle => props.issticky ? props.enablemodalsupport ? /*#__PURE__*/React.createElement(ModalProvider, {
686
- value: this.sheetModalService
687
- }, /*#__PURE__*/React.createElement(Animated.View, {
688
- style: [contentStyle, this.styles.sheetContentContainer, {
689
- overflow: 'hidden'
690
- }]
691
- }, props.children)) : /*#__PURE__*/React.createElement(Animated.View, {
692
- style: [contentStyle, this.styles.sheetContentContainer, {
693
- overflow: 'hidden'
694
- }]
695
- }, props.children) : /*#__PURE__*/React.createElement(ScrollView, _extends({
588
+ enabledragsettle: props.enabledragsettle
589
+ }, contentStyle => /*#__PURE__*/React.createElement(ScrollView, _extends({
696
590
  ref: this.state.scrollViewRef,
697
591
  style: this.styles.sheetContentContainer,
698
592
  contentContainerStyle: [this.styles.sheetScrollContent],
@@ -728,18 +622,7 @@ export default class WmBottomsheet extends BaseComponent {
728
622
  });
729
623
  });
730
624
  this.calculatedHeight = this.calculateSheetHeight(_props.bottomsheetheightratio);
731
- //container srollview ref
732
- this.subscribe('containerScrollViewReady', ref => {
733
- if (ref && ref.current && this.containerscrollViewRef !== ref) {
734
- this.containerscrollViewRef = ref;
735
- this.forceUpdate();
736
- }
737
- });
738
- //container scrollview y offset value
739
- this.subscribe('scroll', e => {
740
- const offsetY = e.nativeEvent.contentOffset.y;
741
- this.containerscrollYoffset = offsetY;
742
- });
625
+
743
626
  // Use bottomsheetexpandedheightratio if provided, otherwise use expandedDefaultHeight
744
627
  const expandedRatio = _props.bottomsheetexpandedheightratio || this.expandedDefaultHeight;
745
628
  const effectiveExpandedRatio = Math.max(this.minimumExpandedHeight, Math.min(expandedRatio, this.maxHeight));
@@ -894,17 +777,13 @@ export default class WmBottomsheet extends BaseComponent {
894
777
  }
895
778
  },
896
779
  statusBarTranslucent: false
897
- }, /*#__PURE__*/React.createElement(GestureHandlerRootView, {
898
- style: {
899
- flex: 1
900
- }
901
780
  }, wrapWithSafeArea(/*#__PURE__*/React.createElement(KeyboardAvoidingView, {
902
781
  style: {
903
782
  flex: 1
904
783
  },
905
784
  behavior: 'padding',
906
785
  keyboardVerticalOffset: Platform.OS === 'ios' ? 0 : undefined
907
- }, this.renderContent(props)))));
786
+ }, this.renderContent(props))));
908
787
  } else {
909
788
  return this.renderContent(props);
910
789
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","createRef","BaseComponent","BaseComponentState","View","PanResponder","Dimensions","TouchableWithoutFeedback","Platform","StatusBar","BackHandler","KeyboardAvoidingView","Keyboard","Modal","Pressable","Gesture","GestureDetector","GestureHandlerRootView","ScrollView","Animated","useAnimatedStyle","withTiming","runOnJS","Easing","makeMutable","cancelAnimation","Animatable","WmBottomsheetProps","DEFAULT_CLASS","createSkeleton","AccessibilityWidgetType","getAccessibilityProps","ModalProvider","SafeAreaInsetsContext","SafeAreaView","OS","RN","require","RNAnimated","__wmPatchedNoNativeDriver","wrap","name","original","value","config","patched","useNativeDriver","_","height","SCREEN_HEIGHT","get","WmBottomsheetState","constructor","args","_defineProperty","undefined","AnimatedBottomsheetContent","translateY","backdropOpacity","sheetHeight","lastGestureDy","styles","props","children","panHandlers","dragHandlePanHandlers","onBackdropPress","onDragHandlePress","getTestProps","enabledragsettle","scrollRef","containerScrollRef","configurePanGesture","panGesture","useMemo","pan","Pan","simultaneousWithExternalGesture","backdropAnimatedStyle","opacity","containerAnimatedStyle","transform","contentStyle","paddingBottom","createElement","Fragment","onPress","_extends","style","backdrop","BOTTOMSHEET","container","dragHandleContainer","dragIconHandle","gesture","WmBottomsheet","getAnimationDuration","distance","velocity","velocityFactor","Math","max","min","abs","calculatedDuration","calculateSheetHeight","bottomsheetheightratio","effectiveRatio","defaultHeight","maxHeightRatio","minimumHeight","maxHeight","screenHeight","calculatedHeight","defaultTopInset","statusBarHeight","open","state","isBottomsheetVisible","updateState","openSheet","close","closeSheet","animate","contentAnimationId","Date","now","contentAnimatableProps","currentHeight","isExpanded","targetHeight","expandedHeight","callback","invokeEventCallback","lastGestureDyShared","duration","animationDuration","easing","out","ease","finished","localModalsOpened","length","top","sheetModalService","hideModal","disableswipedownclose","autoclose","event","_event$endCoordinates","keyboardHeight","endCoordinates","isIosKeyboardHeightSet","_event$endCoordinates2","iosKeyboardHeight","availableHeight","bufferSpace","topInset","adjustedHeight","modal","keyboardAnimationDuration","gestureState","dy","_this$translateY","currentTranslateY","vy","_this$sheetHeight","setTimeout","_this$state$scrollVie","scrollViewRef","current","scrollTo","x","y","animated","scrollOffset","sheetMinimumHeight","bottomsheetminimumheight","enabled","onUpdate","translationY","velocityY","moveX","moveY","vx","velocityX","containerscrollYoffset","newTranslateY","isDragHandleExpanding","expand","disablescrollonrest","expandBottomSheet","onEnd","handleSwipeGesture","onFinalize","success","create","onStartShouldSetPanResponder","onMoveShouldSetPanResponder","onPanResponderGrant","onPanResponderMove","onPanResponderRelease","onPanResponderTerminate","offsetY","nativeEvent","contentOffset","isScrolling","handleClose","requestAnimationFrame","key","Consumer","insets","bottom","left","right","bottomInset","absoluteStyle","rootStyle","root","_background","panResponder","dragHandlePanResponder","handleBackdropPress","handleDragHandlePress","bind","containerscrollViewRef","issticky","enablemodalsupport","sheetContentContainer","overflow","ref","contentContainerStyle","sheetScrollContent","alwaysBounceVertical","alwaysBounceHorizontal","bounces","showsVerticalScrollIndicator","scrollEventThrottle","onScroll","handleScroll","nestedScrollEnabled","scrollEnabled","renderAnimatedSheetChildren","edges","map","o","i","onStartShouldSetResponder","onResponderEnd","isModal","modalOverlay","centered","centeredOverlay","zIndex","elevationIndex","elevation","modalStyle","e","stopPropagation","content","subscribe","forceUpdate","expandedRatio","bottomsheetexpandedheightratio","expandedDefaultHeight","effectiveExpandedRatio","minimumExpandedHeight","showonrender","refresh","showModal","options","exists","find","list","onOpen","idx","findIndex","onClose","splice","componentDidMount","backHandlerSubscription","addEventListener","handleBackPress","keyboardDidShowListener","addListener","onKeyboardShow","keyboardDidHideListener","onKeyboardHide","componentWillUnmount","remove","componentDidUpdate","prevProps","onPropertyChange","$new","$old","closeSheetImmediate","renderSkeleton","theme","skeleton","width","renderWidget","hasButtonNavigation","wrapWithSafeArea","flex","visible","transparent","animationType","onRequestClose","statusBarTranslucent","behavior","keyboardVerticalOffset","renderContent"],"sources":["bottomsheet.component.tsx"],"sourcesContent":["import React, { createRef } from 'react';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { View, PanResponder, Dimensions, TouchableWithoutFeedback, Platform, PanResponderGestureState, StatusBar, BackHandler, DimensionValue, KeyboardAvoidingView, Keyboard, EmitterSubscription, Modal, NativeEventSubscription, Pressable, ViewStyle } from 'react-native';\nimport { Gesture, GestureDetector, GestureHandlerRootView, ScrollView } from 'react-native-gesture-handler';\nimport Animated, {\n useAnimatedStyle,\n withTiming,\n runOnJS,\n Easing,\n SharedValue,\n makeMutable,\n cancelAnimation\n} from 'react-native-reanimated';\nimport { AnimatableProps } from 'react-native-animatable';\nimport * as Animatable from 'react-native-animatable';\nimport WmBottomsheetProps from './bottomsheet.props';\nimport { DEFAULT_CLASS, WmBottomsheetStyles } from './bottomsheet.styles';\nimport { createSkeleton } from '../skeleton/skeleton.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\nimport { ModalProvider, ModalService, ModalOptions } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport { SafeAreaInsetsContext, SafeAreaView } from 'react-native-safe-area-context';\n\n\n// Web-only: Runs all bottom sheet animations on the JS thread (sets useNativeDriver to false)\n// Prevents errors on web where native driver animations are not supported\n// Web - Animated api is used from animation\nif (Platform.OS === 'web') {\n try {\n const RN: any = require('react-native');\n const RNAnimated: any = RN && RN.Animated;\n if (RNAnimated && !RNAnimated.__wmPatchedNoNativeDriver) {\n const wrap = (name: string) => {\n const original = RNAnimated[name];\n if (typeof original === 'function') {\n RNAnimated[name] = (value: any, config: any) => {\n const patched = { ...(config || {}), useNativeDriver: false };\n return original(value, patched);\n };\n }\n };\n wrap('timing');\n wrap('spring');\n wrap('decay');\n RNAnimated.__wmPatchedNoNativeDriver = true;\n }\n } catch (_) {\n // noop\n }\n}\n\nconst { height: SCREEN_HEIGHT } = Dimensions.get('screen');\nexport class WmBottomsheetState extends BaseComponentState<WmBottomsheetProps> {\n scrollViewRef = createRef<ScrollView>();\n isScrolling = false;\n scrollOffset = 0;\n isExpanded = false;\n isBottomsheetVisible = false;\n keyboardHeight = 0;\n localModalsOpened: ModalOptions[] = [];\n lastGestureDy = 0;\n contentAnimationId?: number = 0;\n contentAnimatableProps?: AnimatableProps<ViewStyle> = undefined;\n}\n\n// Animated wrapper component that uses hooks\nconst AnimatedBottomsheetContent = ({\n translateY,\n backdropOpacity,\n sheetHeight,\n lastGestureDy,\n styles,\n props,\n children,\n panHandlers,\n dragHandlePanHandlers,\n onBackdropPress,\n onDragHandlePress,\n getTestProps,\n enabledragsettle,\n scrollRef,\n containerScrollRef,\n configurePanGesture\n\n}: any) => {\n\n\n // Simple RNGH GestureDetector attached to the same view as the PanResponder (panHandlers).\n // No thresholds/validation: logs translationY directly during pan.\n const panGesture = React.useMemo(() => {\n // Create base Pan gesture\n const pan = Gesture.Pan().runOnJS(true);\n\n // Add external gestures for ScrollViews (container widget scrollview)\n if (scrollRef && containerScrollRef) {\n pan.simultaneousWithExternalGesture(\n scrollRef as any,\n containerScrollRef as any\n );\n } else if (scrollRef) {\n pan.simultaneousWithExternalGesture(scrollRef as any);\n } else if (containerScrollRef) {\n pan.simultaneousWithExternalGesture(containerScrollRef as any);\n }\n\n // Apply custom logic from parent BottomSheet class\n if (configurePanGesture) {\n configurePanGesture(pan);\n }\n\n return pan;\n }, [scrollRef, containerScrollRef, configurePanGesture]);\n\n const backdropAnimatedStyle = useAnimatedStyle(() => ({\n opacity: backdropOpacity.value\n }));\n\n const containerAnimatedStyle = useAnimatedStyle(() => ({\n height: sheetHeight.value,\n transform: [{ translateY: translateY.value }]\n }));\n\n const contentStyle = useAnimatedStyle(() => {\n if (enabledragsettle && lastGestureDy.value > 0) {\n return {\n paddingBottom: lastGestureDy.value\n };\n }\n return {};\n });\n\n return (\n <>\n <TouchableWithoutFeedback onPress={onBackdropPress}>\n <Animated.View\n style={[styles.backdrop, backdropAnimatedStyle]}\n {...getTestProps('backdrop')}\n {...getAccessibilityProps(AccessibilityWidgetType.BOTTOMSHEET, props)}\n />\n </TouchableWithoutFeedback>\n\n <Animated.View\n style={[styles.container, containerAnimatedStyle]}\n // {...panHandlers}\n >\n <View style={styles.dragHandleContainer} {...dragHandlePanHandlers}>\n <Pressable onPress={onDragHandlePress}>\n <View style={styles.dragIconHandle} {...getTestProps('draghandle')} />\n </Pressable>\n </View>\n <GestureDetector gesture={panGesture}>\n {children(contentStyle)}\n </GestureDetector>\n </Animated.View>\n </>\n );\n};\n\nexport default class WmBottomsheet extends BaseComponent<WmBottomsheetProps, WmBottomsheetState, WmBottomsheetStyles> {\n private calculatedHeight: number;\n private expandedHeight: number;\n private defaultHeight: number = 0.5;\n private expandedDefaultHeight: number = 0.8;\n private minimumHeight: number = 0.01;\n private minimumExpandedHeight: number = 0.5;\n private maxHeight: number = 1.0;\n private animationDuration: number = 400;\n private keyboardAnimationDuration: number = Platform.OS === 'ios' ? 250 : 275;\n private statusBarHeight: number = StatusBar.currentHeight || 0;\n private defaultTopInset: number = 44;\n private maxHeightRatio: number = 0;\n private keyboardDidShowListener!: EmitterSubscription;\n private keyboardDidHideListener!: EmitterSubscription;\n private backHandlerSubscription: NativeEventSubscription | null = null;\n private topInset: number = 0;\n private iosKeyboardHeight: number = 0;\n private isIosKeyboardHeightSet: boolean = false;\n private sheetModalService: ModalService;\n private isDragHandleExpanding: boolean = false;\n //container widget scrollview ref and y offset value\n private containerscrollViewRef: any = null\n private containerscrollYoffset: number = 0\n\n\n // Reanimated shared values - created once and reused\n private translateY!: SharedValue<number>;\n private backdropOpacity!: SharedValue<number>;\n private sheetHeight!: SharedValue<number>;\n private lastGestureDyShared!: SharedValue<number>;\n\n // Helper method to calculate animation duration based on distance and velocity\n private getAnimationDuration(distance: number, velocity: number): number {\n // Base duration on distance, but cap it between 200-500ms\n // Higher velocity = shorter duration for snappier feel\n const velocityFactor = Math.max(0.3, Math.min(1, 1 - Math.abs(velocity) / 2));\n const calculatedDuration = Math.abs(distance) * velocityFactor;\n return Math.min(500, Math.max(200, calculatedDuration));\n }\n\n private calculateSheetHeight(bottomsheetheightratio: number): number {\n // Use default height if ratio not provided, but ensure it's not below minimum\n const effectiveRatio = bottomsheetheightratio || this.defaultHeight;\n this.maxHeightRatio = Math.max(\n this.minimumHeight,\n Math.min(effectiveRatio, this.maxHeight)\n );\n\n const screenHeight = Dimensions.get('screen').height;\n let calculatedHeight = screenHeight * this.maxHeightRatio;\n\n if (Platform.OS === 'ios') {\n // Subtract top inset bar height for ios only if bottomsheetheightratio is 0.9\n if (this.maxHeightRatio >= 0.9) {\n calculatedHeight -= this.defaultTopInset;\n }\n }\n else if (Platform.OS === 'android') {\n // Subtract status bar height for Android only if bottomsheetheightratio is 0.9\n if (this.maxHeightRatio >= 0.9) {\n calculatedHeight -= this.statusBarHeight;\n }\n }\n return calculatedHeight;\n }\n\n open() {\n if (!this.state.isBottomsheetVisible)\n this.updateState({\n isBottomsheetVisible: true\n } as WmBottomsheetState);\n this.openSheet();\n }\n\n close() {\n if (this.state.isBottomsheetVisible) {\n this.closeSheet();\n }\n }\n\n isSheetExpanded = () => {\n return this.state.isExpanded\n }\n\n expandBottomSheet = () => {\n const targetHeight = Math.min(this.expandedHeight, SCREEN_HEIGHT);\n const callback = () => {\n this.updateState({\n isExpanded: true,\n lastGestureDy: 0\n } as WmBottomsheetState);\n this.invokeEventCallback('onExpand', [null, this]);\n };\n\n // Reset drag settle value immediately on UI thread\n this.lastGestureDyShared.value = 0;\n\n if (this.props.enabledragsettle) {\n // Synchronize both animations to complete together\n this.sheetHeight.value = withTiming(targetHeight, {\n duration: this.animationDuration,\n easing: Easing.out(Easing.ease)\n });\n this.translateY.value = withTiming(0, {\n duration: this.animationDuration,\n easing: Easing.out(Easing.ease)\n }, (finished) => {\n if (finished) {\n runOnJS(callback)();\n }\n });\n } else {\n // Only animate height for non-drag-settle mode\n this.sheetHeight.value = withTiming(targetHeight, {\n duration: this.animationDuration,\n easing: Easing.out(Easing.ease)\n }, (finished) => {\n if (finished) {\n runOnJS(callback)();\n }\n });\n }\n }\n\n collapseBottomSheet = () => {\n const callback = () => {\n this.updateState({\n isExpanded: false,\n lastGestureDy: 0\n } as WmBottomsheetState);\n this.invokeEventCallback('onCollapse', [null, this]);\n };\n\n // Reset drag settle value immediately on UI thread\n this.lastGestureDyShared.value = 0;\n\n this.translateY.value = withTiming(0, {\n duration: this.animationDuration,\n easing: Easing.out(Easing.ease)\n });\n this.sheetHeight.value = withTiming(this.calculatedHeight, {\n duration: this.animationDuration,\n easing: Easing.out(Easing.ease)\n }, (finished) => {\n if (finished) {\n runOnJS(callback)();\n }\n });\n }\n\n public animate(props: AnimatableProps<ViewStyle>) {\n this.updateState({\n contentAnimationId: Date.now(),\n contentAnimatableProps: props\n } as WmBottomsheetState);\n }\n\n constructor(props: WmBottomsheetProps) {\n super(props, DEFAULT_CLASS, new WmBottomsheetProps(), new WmBottomsheetState());\n this.calculatedHeight = this.calculateSheetHeight(props.bottomsheetheightratio);\n //container srollview ref\n this.subscribe('containerScrollViewReady', (ref: React.RefObject<any>) => {\n if (ref && ref.current && this.containerscrollViewRef !== ref) {\n this.containerscrollViewRef = ref;\n this.forceUpdate();\n }\n });\n //container scrollview y offset value\n this.subscribe('scroll', (e: any) => {\n const offsetY = e.nativeEvent.contentOffset.y;\n this.containerscrollYoffset = offsetY\n });\n // Use bottomsheetexpandedheightratio if provided, otherwise use expandedDefaultHeight\n const expandedRatio = props.bottomsheetexpandedheightratio || this.expandedDefaultHeight;\n const effectiveExpandedRatio = Math.max(\n this.minimumExpandedHeight,\n Math.min(expandedRatio, this.maxHeight)\n );\n\n this.expandedHeight = SCREEN_HEIGHT * effectiveExpandedRatio;\n\n if (Platform.OS === 'android') {\n if (effectiveExpandedRatio >= 0.9) {\n this.expandedHeight -= this.statusBarHeight;\n }\n }\n if (Platform.OS === 'ios') {\n if (effectiveExpandedRatio >= 0.9) {\n this.expandedHeight -= this.defaultTopInset;\n }\n }\n\n // Initialize shared values in constructor using makeMutable (not hooks)\n // makeMutable can be called outside of React components\n this.translateY = makeMutable(SCREEN_HEIGHT);\n this.backdropOpacity = makeMutable(0);\n this.sheetHeight = makeMutable(this.calculatedHeight);\n this.lastGestureDyShared = makeMutable(0);\n\n this.updateState({\n isBottomsheetVisible: this.props.showonrender || false\n } as WmBottomsheetState);\n\n // Initialize values immediately to prevent flicker\n if (this.props.showonrender) {\n this.translateY.value = 0;\n this.backdropOpacity.value = 1;\n }\n\n // Local ModalService for content rendered inside Bottomsheet\n this.sheetModalService = {\n refresh: () => this.forceUpdate(),\n showModal: (options: ModalOptions) => {\n const exists = this.state.localModalsOpened.find(o => o === options);\n if (!exists) {\n // ensure high z-index within sheet\n (options as any).elevationIndex = 9999 + this.state.localModalsOpened.length + 1;\n const list = [...this.state.localModalsOpened, options];\n this.updateState({ localModalsOpened: list } as WmBottomsheetState, () => {\n setTimeout(() => options.onOpen && options.onOpen(), 0);\n });\n }\n },\n hideModal: (options?: ModalOptions) => {\n const list = [...this.state.localModalsOpened];\n const idx = options ? list.findIndex(o => o === options) : (list.length - 1);\n if (idx >= 0) {\n const o = list[idx];\n o && o.onClose && o.onClose();\n list.splice(idx, 1);\n this.updateState({ localModalsOpened: list } as WmBottomsheetState);\n }\n }\n };\n }\n\n componentDidMount() {\n super.componentDidMount();\n\n // Trigger animation after mount if showonrender is true\n if (this.state.isBottomsheetVisible) {\n // Use requestAnimationFrame to ensure animation happens after initial render\n requestAnimationFrame(() => {\n this.openSheet();\n });\n }\n\n if (Platform.OS === 'android') {\n this.backHandlerSubscription = BackHandler.addEventListener('hardwareBackPress', this.handleBackPress);\n }\n this.keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', this.onKeyboardShow);\n this.keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', this.onKeyboardHide);\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n if (this.backHandlerSubscription) {\n this.backHandlerSubscription.remove();\n this.backHandlerSubscription = null;\n }\n if (this.keyboardDidShowListener) {\n this.keyboardDidShowListener.remove();\n }\n if (this.keyboardDidHideListener) {\n this.keyboardDidHideListener.remove();\n }\n }\n\n private handleBackPress = () => {\n // Close top-most local modal first, if any\n if (this.state.localModalsOpened && this.state.localModalsOpened.length > 0) {\n const top = this.state.localModalsOpened[this.state.localModalsOpened.length - 1];\n this.sheetModalService.hideModal(top);\n return true;\n }\n if (this.state.isBottomsheetVisible) {\n if (!this.props.disableswipedownclose && this.props.autoclose !== 'disabled') {\n this.closeSheet();\n }\n return true; // Prevent default back action\n }\n return false;\n };\n\n private onKeyboardShow = (event: any) => {\n let keyboardHeight = event.endCoordinates?.height || 0;\n //only storing ios keyboard height once as first time keyboard open (to avoid scroll flickring issue in ios in text widget)\n if (!this.isIosKeyboardHeightSet) {\n this.iosKeyboardHeight = event.endCoordinates?.height + 40;\n this.isIosKeyboardHeightSet = true;\n }\n // Calculate available space after keyboard\n const availableHeight = SCREEN_HEIGHT - (Platform.OS == 'ios' ? this.iosKeyboardHeight : keyboardHeight);\n // Calculate adjusted sheet height to fit within available space\n // Leave some buffer space for the drag handle and safe area\n const bufferSpace = (Platform.OS === 'ios' ? this.topInset : this.statusBarHeight) + 20;\n const adjustedHeight = availableHeight - bufferSpace;\n\n if (this.sheetHeight && Platform.OS == 'android' && this.props.modal) {\n // Use platform-specific keyboard animation duration for smooth synchronization\n this.sheetHeight.value = withTiming(adjustedHeight, {\n duration: this.keyboardAnimationDuration,\n easing: Easing.out(Easing.ease)\n });\n }\n\n this.updateState({\n keyboardHeight: keyboardHeight,\n } as WmBottomsheetState);\n };\n\n private onKeyboardHide = () => {\n if (this.sheetHeight && Platform.OS == 'android' && this.props.modal) {\n // Use platform-specific keyboard animation duration for smooth synchronization\n this.sheetHeight.value = withTiming(\n this.state.isExpanded ? this.expandedHeight : this.calculatedHeight,\n {\n duration: this.keyboardAnimationDuration,\n easing: Easing.out(Easing.ease)\n }\n );\n }\n\n this.updateState({\n keyboardHeight: 0,\n } as WmBottomsheetState);\n };\n\n componentDidUpdate(prevProps: WmBottomsheetProps) {\n if (prevProps.bottomsheetheightratio !== this.props.bottomsheetheightratio) {\n this.calculatedHeight = this.calculateSheetHeight(this.props.bottomsheetheightratio);\n if (this.sheetHeight) {\n this.sheetHeight.value = this.calculatedHeight;\n }\n }\n }\n\n handleSwipeGesture = (gestureState: PanResponderGestureState) => {\n\n // Only reset lastGestureDy for traditional behavior, not for drag and settle\n if (!this.props.enabledragsettle) {\n this.updateState({\n lastGestureDy: 0\n } as WmBottomsheetState);\n if (this.lastGestureDyShared) {\n this.lastGestureDyShared.value = 0;\n }\n }\n\n if (this.props.enabledragsettle && gestureState.dy > 0) {\n const currentTranslateY = this.translateY?.value || 0;\n\n if (gestureState.vy > 0.5 && !this.props.disableswipedownclose) {\n this.closeSheet();\n return;\n }\n\n if (this.translateY && this.lastGestureDyShared) {\n this.translateY.value = currentTranslateY;\n this.lastGestureDyShared.value = currentTranslateY;\n }\n\n this.updateState({\n isExpanded: false,\n lastGestureDy: currentTranslateY\n } as WmBottomsheetState);\n return;\n }\n\n if (gestureState.dy > 0) {\n if (this.state.isExpanded || this.props.disableswipedownclose) {\n if (gestureState.dy < this.expandedHeight / 4 || this.props.disableswipedownclose) {\n //reseting bottom sheet scrollview offset value to fix scrollview automatic scroll issue while collpsing the bottom sheet\n setTimeout(() => {\n if (this.state.scrollViewRef?.current) {\n this.state.scrollViewRef.current.scrollTo({ x: 0, y: 0, animated: false });\n this.updateState({ scrollOffset: 0 } as WmBottomsheetState);\n }\n }, this.animationDuration);\n let sheetMinimumHeight = this.props.bottomsheetminimumheight || 0.1;\n const targetHeight = this.props.disableswipedownclose ? sheetMinimumHeight * SCREEN_HEIGHT : this.calculatedHeight;\n const currentHeight = this.sheetHeight?.value || this.expandedHeight;\n const distance = Math.abs(currentHeight - targetHeight);\n const duration = this.getAnimationDuration(distance, gestureState.vy);\n\n const callback = () => {\n this.updateState({\n isExpanded: false\n } as WmBottomsheetState);\n this.invokeEventCallback('onCollapse', [null, this]);\n };\n\n if (this.translateY && this.sheetHeight) {\n this.translateY.value = withTiming(0, {\n duration: duration,\n easing: Easing.out(Easing.ease)\n });\n this.sheetHeight.value = withTiming(\n targetHeight,\n {\n duration: duration,\n easing: Easing.out(Easing.ease)\n },\n (finished) => {\n if (finished) {\n runOnJS(callback)();\n }\n }\n );\n }\n } else if ((gestureState.dy > this.expandedHeight / 4 || gestureState.vy > 0.5) && !this.props.disableswipedownclose) {\n this.closeSheet();\n }\n } else {\n if (this.props.disableswipedownclose) {\n this.openSheet();\n return;\n }\n if ((gestureState.dy > 100 || gestureState.vy > 0.5) && !this.props.disableswipedownclose) {\n this.closeSheet();\n } else {\n this.openSheet();\n }\n }\n }\n }\n\n private configurePanGesture = (pan: any) => {\n pan\n .enabled(true)\n .onUpdate((event: any) => { // ← Add : any\n const gestureState = {\n dy: event.translationY,\n vy: event.velocityY,\n moveX: event.x,\n moveY: event.y,\n vx: event.velocityX\n };\n if (gestureState.dy > 0 && this.translateY && this.lastGestureDyShared && this.state.scrollOffset <= 0 && this.containerscrollYoffset <= 0) {\n const newTranslateY = Math.max(0, this.lastGestureDyShared.value + gestureState.dy);\n this.translateY.value = newTranslateY;\n // Reset expand flag if dragging down\n this.isDragHandleExpanding = false;\n }\n else if (gestureState.dy < 0 && this.props.expand && this.props.bottomsheetheightratio !== 1 && !this.isDragHandleExpanding && !this.state.isExpanded && this.props.disablescrollonrest) {\n // Only trigger expand once with threshold of -50px upward drag\n this.isDragHandleExpanding = true;\n this.expandBottomSheet();\n }\n // ... rest of logic\n })\n .onEnd((event: any) => { // ← Add : any\n const gestureState = {\n dy: event.translationY,\n vy: event.velocityY,\n moveX: event.x,\n moveY: event.y,\n vx: event.velocityX\n };\n if (gestureState.dy > 0 && this.state.scrollOffset <= 0 && this.containerscrollYoffset <= 0) {\n this.handleSwipeGesture(gestureState as any);\n }\n })\n .onFinalize((event: any, success: boolean) => { // ← Add types\n if (!success) {\n this.openSheet()\n }\n });\n\n return pan;\n };\n // panResponder for bottom sheet scroll view\n panResponder = PanResponder.create({\n onStartShouldSetPanResponder: (_, gestureState) => {\n if (this.props.disablescrollonrest && !this.state.isExpanded) {\n return true\n }\n // Only handle the gesture if we're at the top and swiping down\n return gestureState.dy > 0 && this.state.scrollOffset <= 0;\n\n },\n\n onMoveShouldSetPanResponder: (_, gestureState) => {\n if (this.props.disablescrollonrest && !this.state.isExpanded) {\n return Math.abs(gestureState.dy) > 2;\n }\n // Only handle the gesture if we're at the top and swiping down\n return gestureState.dy > 0 && this.state.scrollOffset <= 0;\n\n },\n\n onPanResponderGrant: () => {\n // Cancel any ongoing animations when user starts dragging\n if (this.translateY) {\n cancelAnimation(this.translateY);\n }\n },\n\n onPanResponderMove: (_, gestureState) => {\n\n if (gestureState.dy > 0 && this.translateY && this.lastGestureDyShared) {\n const newTranslateY = Math.max(0, this.lastGestureDyShared.value + gestureState.dy);\n this.translateY.value = newTranslateY;\n // Reset expand flag if dragging down\n this.isDragHandleExpanding = false;\n }\n else if (gestureState.dy < 0 && this.props.expand && this.props.bottomsheetheightratio !== 1 && !this.isDragHandleExpanding && !this.state.isExpanded) {\n // Only trigger expand once with threshold of -50px upward drag\n this.isDragHandleExpanding = true;\n this.expandBottomSheet();\n }\n },\n\n onPanResponderRelease: (_, gestureState) => {\n this.handleSwipeGesture(gestureState);\n },\n\n onPanResponderTerminate: () => {\n this.openSheet();\n },\n });\n\n //pan repsoneder for bottom sheet dragable container\n dragHandlePanResponder = PanResponder.create({\n onStartShouldSetPanResponder: () => true,\n onMoveShouldSetPanResponder: () => true,\n\n onPanResponderGrant: () => {\n // Cancel any ongoing animations when user starts dragging\n if (this.translateY) {\n cancelAnimation(this.translateY);\n }\n // Reset the expand flag\n this.isDragHandleExpanding = false;\n },\n\n onPanResponderMove: (_, gestureState) => {\n if (gestureState.dy > 0 && this.translateY && this.lastGestureDyShared) {\n const newTranslateY = Math.max(0, this.lastGestureDyShared.value + gestureState.dy);\n this.translateY.value = newTranslateY;\n // Reset expand flag if dragging down\n this.isDragHandleExpanding = false;\n } else if (gestureState.dy < -50 && this.props.expand && this.props.bottomsheetheightratio !== 1 && !this.isDragHandleExpanding && !this.state.isExpanded) {\n // Only trigger expand once with threshold of -50px upward drag\n this.isDragHandleExpanding = true;\n this.expandBottomSheet();\n }\n },\n onPanResponderRelease: (_, gestureState) => {\n this.isDragHandleExpanding = false;\n this.handleSwipeGesture(gestureState);\n },\n });\n\n handleScroll = (event: any): any => {\n if (this.state.keyboardHeight > 0) return null;\n const offsetY = event.nativeEvent.contentOffset.y;\n this.updateState({\n isScrolling: offsetY > 0,\n scrollOffset: offsetY\n } as WmBottomsheetState);\n };\n\n openSheet = () => {\n const callback = () => {\n this.updateState({\n lastGestureDy: 0,\n } as WmBottomsheetState);\n this.invokeEventCallback('onOpened', [null, this]);\n };\n\n // Reset drag settle value immediately on UI thread\n if (this.lastGestureDyShared) {\n this.lastGestureDyShared.value = 0;\n }\n\n if (this.translateY && this.backdropOpacity) {\n this.translateY.value = withTiming(0, {\n duration: this.animationDuration,\n easing: Easing.out(Easing.ease)\n }, (finished) => {\n if (finished) {\n runOnJS(callback)();\n }\n });\n // Backdrop animation synchronized with sheet animation\n this.backdropOpacity.value = withTiming(1, {\n duration: this.animationDuration,\n easing: Easing.out(Easing.ease)\n });\n }\n };\n\n private handleClose = () => {\n this.updateState({\n isBottomsheetVisible: false\n } as WmBottomsheetState);\n this.invokeEventCallback('onClose', [null, this]);\n };\n\n closeSheet = () => {\n \n\n const callback = () => {\n // Reset sheet height after close\n if (this.sheetHeight) {\n this.sheetHeight.value = this.calculatedHeight;\n }\n this.updateState({\n isExpanded: false,\n localModalsOpened: [] as ModalOptions[],\n scrollOffset: 0,\n contentAnimationId: 0, \n contentAnimatableProps: undefined \n } as WmBottomsheetState);\n this.containerscrollYoffset = 0\n this.handleClose();\n };\n\n if (this.translateY && this.backdropOpacity) {\n this.translateY.value = withTiming(SCREEN_HEIGHT, {\n duration: this.animationDuration,\n easing: Easing.out(Easing.ease)\n }, (finished) => {\n if (finished) {\n runOnJS(callback)();\n }\n });\n // Backdrop animation synchronized with sheet animation\n this.backdropOpacity.value = withTiming(0, {\n duration: this.animationDuration,\n easing: Easing.out(Easing.ease)\n });\n }\n };\n\n closeSheetImmediate = () => {\n if (this.translateY && this.backdropOpacity && this.lastGestureDyShared) {\n this.translateY.value = SCREEN_HEIGHT;\n this.backdropOpacity.value = 0;\n this.lastGestureDyShared.value = 0;\n }\n\n this.updateState({\n lastGestureDy: 0,\n isExpanded: false,\n isBottomsheetVisible: false,\n localModalsOpened: [] as ModalOptions[],\n contentAnimationId: 0,\n contentAnimatableProps: undefined\n } as WmBottomsheetState);\n\n requestAnimationFrame(() => {\n if (this.sheetHeight) {\n this.sheetHeight.value = this.calculatedHeight;\n }\n });\n };\n\n public onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch (name) {\n case \"showonrender\":\n if ($new) {\n this.updateState({\n isBottomsheetVisible: $new || false\n } as WmBottomsheetState);\n if (this.state.isBottomsheetVisible) {\n this.openSheet && this.openSheet();\n }\n } else {\n this.closeSheetImmediate && this.closeSheetImmediate();\n }\n break;\n }\n }\n\n public renderSkeleton(props: WmBottomsheetProps) {\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: this.styles.root.width as DimensionValue,\n height: this.styles.root.height as DimensionValue\n });\n }\n\n // Class methods to prevent recreation on every render\n private handleBackdropPress = () => {\n if (this.props.autoclose !== 'disabled') {\n this.closeSheet();\n }\n };\n\n private handleDragHandlePress = () => {\n this.invokeEventCallback('onDraghandleiconclick', [null, this]);\n };\n\n private renderAnimatedSheetChildren = (children: React.ReactNode) => {\n if (!this.state.contentAnimatableProps) {\n return children;\n }\n return (\n <Animatable.View\n key={this.state.contentAnimationId}\n {...this.state.contentAnimatableProps}\n >\n {children}\n </Animatable.View>\n );\n };\n\n private renderContent = (props: WmBottomsheetProps) => {\n // Don't render if shared values aren't initialized yet\n if (!this.translateY || !this.backdropOpacity || !this.sheetHeight || !this.lastGestureDyShared) {\n return null;\n }\n\n return (\n <SafeAreaInsetsContext.Consumer>\n {(insets = { top: 0, bottom: 0, left: 0, right: 0 }) => {\n // Store topInset for later use (avoid mutation during render)\n const topInset = insets?.top || 0;\n const bottomInset = insets?.bottom || 0;\n // Update the instance variable outside of render cycle\n if (this.topInset !== topInset) {\n requestAnimationFrame(() => {\n this.topInset = topInset;\n });\n }\n const absoluteStyle = {\n top: 0,\n left: 0,\n right: 0,\n }\n const rootStyle = props.modal\n ? [this.styles.root, absoluteStyle]\n : this.styles.root;\n return (\n <View style={rootStyle} {...this.getTestProps('keyboardview')}>\n {this._background}\n\n <AnimatedBottomsheetContent\n translateY={this.translateY}\n backdropOpacity={this.backdropOpacity}\n sheetHeight={this.sheetHeight}\n lastGestureDy={this.lastGestureDyShared}\n styles={this.styles}\n props={props}\n panHandlers={this.panResponder.panHandlers}\n dragHandlePanHandlers={this.dragHandlePanResponder.panHandlers}\n onBackdropPress={this.handleBackdropPress}\n onDragHandlePress={this.handleDragHandlePress}\n getTestProps={this.getTestProps.bind(this)}\n enabledragsettle={props.enabledragsettle}\n scrollRef={this.state.scrollViewRef}\n containerScrollRef={this.containerscrollViewRef}\n configurePanGesture={this.configurePanGesture}\n >\n {(contentStyle: any) => (\n props.issticky ? (\n props.enablemodalsupport ? (\n <ModalProvider value={this.sheetModalService}>\n <Animated.View style={[contentStyle, this.styles.sheetContentContainer, { overflow: 'hidden' }]}>\n {props.children}\n </Animated.View>\n </ModalProvider>\n ) : (\n <Animated.View style={[contentStyle, this.styles.sheetContentContainer, { overflow: 'hidden' }]}>\n {props.children}\n </Animated.View>\n )\n ) : <ScrollView\n ref={this.state.scrollViewRef}\n style={this.styles.sheetContentContainer}\n contentContainerStyle={[this.styles.sheetScrollContent]}\n alwaysBounceVertical={false}\n alwaysBounceHorizontal={false}\n bounces={false}\n showsVerticalScrollIndicator={false}\n scrollEventThrottle={16}\n onScroll={this.handleScroll}\n nestedScrollEnabled={true}\n scrollEnabled={!props.issticky && (!props.disablescrollonrest || this.state.isExpanded)}\n {...this.getTestProps('scorllview')}\n >\n {props.enablemodalsupport ? (\n <ModalProvider value={this.sheetModalService}>\n <Animated.View style={contentStyle}>\n {this.renderAnimatedSheetChildren(props.children)}\n </Animated.View>\n </ModalProvider>\n ) : (\n <Animated.View style={contentStyle}>\n {this.renderAnimatedSheetChildren(props.children)}\n </Animated.View>\n )}\n </ScrollView>\n )}\n </AnimatedBottomsheetContent>\n {/*Adding SafeAreaView to ensure the bottom sheet is rendered above the Android button navigation bar when modal prop is false */}\n {(Platform.OS === 'android' && !this.props.modal && bottomInset > 40) && <SafeAreaView edges={['bottom']} />}\n\n {props.enablemodalsupport && this.state.localModalsOpened && this.state.localModalsOpened.map((o, i) => (\n <View\n key={(o.name || '') + i}\n onStartShouldSetResponder={() => true}\n onResponderEnd={() => o.isModal && this.sheetModalService.hideModal(o)}\n style={[\n this.styles.modalOverlay,\n (o as any).centered ? this.styles.centeredOverlay : null,\n { zIndex: (o as any).elevationIndex || 9999, elevation: (o as any).elevationIndex || 9999 },\n (o.modalStyle || {})\n ]}\n >\n <View\n style={[(o.contentStyle || {})]}\n onStartShouldSetResponder={() => true}\n onResponderEnd={(e) => e.stopPropagation()}\n >\n {o.content}\n </View>\n </View>\n ))}\n </View>\n );\n }}\n </SafeAreaInsetsContext.Consumer>\n );\n };\n renderWidget(props: WmBottomsheetProps) {\n if (!this.state.isBottomsheetVisible) return null;\n\n return (\n <SafeAreaInsetsContext.Consumer>\n {(insets = { top: 0, bottom: 0, left: 0, right: 0 }) => {\n // Use SafeAreaView on Android with button navigation to render the bottom sheet above the nav bar (when modal props is true)\n // Button navigation is identified when bottom inset >= 40 \n const hasButtonNavigation = Platform.OS === 'android' && (insets?.bottom || 0) >= 40;\n\n const wrapWithSafeArea = (children: React.ReactNode) => {\n if (hasButtonNavigation) {\n return <SafeAreaView style={{ flex: 1 }}>{children}</SafeAreaView>;\n }\n return children;\n };\n\n if (props.modal) {\n return (\n <Modal\n visible={this.state.isBottomsheetVisible}\n transparent={true}\n animationType=\"none\"\n onRequestClose={() => {\n if (!this.props.disableswipedownclose && this.props.autoclose !== 'disabled') {\n this.closeSheet();\n }\n }}\n statusBarTranslucent={false}\n >\n <GestureHandlerRootView style={{ flex: 1 }}>\n {wrapWithSafeArea(\n <KeyboardAvoidingView\n style={{ flex: 1 }}\n behavior={'padding'}\n keyboardVerticalOffset={Platform.OS === 'ios' ? 0 : undefined}\n >\n {this.renderContent(props)}\n </KeyboardAvoidingView>\n )}\n </GestureHandlerRootView>\n </Modal>\n );\n } else {\n return this.renderContent(props);\n }\n }}\n </SafeAreaInsetsContext.Consumer>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAASC,IAAI,EAAEC,YAAY,EAAEC,UAAU,EAAEC,wBAAwB,EAAEC,QAAQ,EAA4BC,SAAS,EAAEC,WAAW,EAAkBC,oBAAoB,EAAEC,QAAQ,EAAuBC,KAAK,EAA2BC,SAAS,QAAmB,cAAc;AAC9Q,SAASC,OAAO,EAAEC,eAAe,EAAEC,sBAAsB,EAAEC,UAAU,QAAQ,8BAA8B;AAC3G,OAAOC,QAAQ,IACbC,gBAAgB,EAChBC,UAAU,EACVC,OAAO,EACPC,MAAM,EAENC,WAAW,EACXC,eAAe,QACV,yBAAyB;AAEhC,OAAO,KAAKC,UAAU,MAAM,yBAAyB;AACrD,OAAOC,kBAAkB,MAAM,qBAAqB;AACpD,SAASC,aAAa,QAA6B,sBAAsB;AACzE,SAASC,cAAc,QAAQ,gCAAgC;AAC/D,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAC7G,SAASC,aAAa,QAAoC,8CAA8C;AACxG,SAASC,qBAAqB,EA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C8B,CAAC;EAErC;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","createRef","BaseComponent","BaseComponentState","View","PanResponder","Dimensions","TouchableWithoutFeedback","Platform","StatusBar","BackHandler","KeyboardAvoidingView","Keyboard","Modal","Pressable","ScrollView","Animated","useAnimatedStyle","withTiming","runOnJS","Easing","makeMutable","cancelAnimation","Animatable","WmBottomsheetProps","DEFAULT_CLASS","createSkeleton","AccessibilityWidgetType","getAccessibilityProps","ModalProvider","SafeAreaInsetsContext","SafeAreaView","OS","RN","require","RNAnimated","__wmPatchedNoNativeDriver","wrap","name","original","value","config","patched","useNativeDriver","_","height","SCREEN_HEIGHT","get","WmBottomsheetState","constructor","args","_defineProperty","undefined","AnimatedBottomsheetContent","translateY","backdropOpacity","sheetHeight","lastGestureDy","styles","props","children","panHandlers","dragHandlePanHandlers","onBackdropPress","onDragHandlePress","getTestProps","enabledragsettle","backdropAnimatedStyle","opacity","containerAnimatedStyle","transform","contentStyle","paddingBottom","createElement","Fragment","onPress","_extends","style","backdrop","BOTTOMSHEET","container","dragHandleContainer","dragIconHandle","WmBottomsheet","getAnimationDuration","distance","velocity","velocityFactor","Math","max","min","abs","calculatedDuration","calculateSheetHeight","bottomsheetheightratio","effectiveRatio","defaultHeight","maxHeightRatio","minimumHeight","maxHeight","screenHeight","calculatedHeight","defaultTopInset","statusBarHeight","open","state","isBottomsheetVisible","updateState","openSheet","close","closeSheet","animate","contentAnimationId","Date","now","contentAnimatableProps","currentHeight","isExpanded","targetHeight","expandedHeight","callback","invokeEventCallback","lastGestureDyShared","duration","animationDuration","easing","out","ease","finished","localModalsOpened","length","top","sheetModalService","hideModal","disableswipedownclose","autoclose","event","_event$endCoordinates","keyboardHeight","endCoordinates","isIosKeyboardHeightSet","_event$endCoordinates2","iosKeyboardHeight","availableHeight","bufferSpace","topInset","adjustedHeight","modal","keyboardAnimationDuration","gestureState","dy","_this$translateY","currentTranslateY","vy","_this$sheetHeight","sheetMinimumHeight","bottomsheetminimumheight","create","onStartShouldSetPanResponder","disablescrollonrest","scrollOffset","onMoveShouldSetPanResponder","onPanResponderGrant","onPanResponderMove","newTranslateY","isDragHandleExpanding","expand","expandBottomSheet","onPanResponderRelease","handleSwipeGesture","onPanResponderTerminate","offsetY","nativeEvent","contentOffset","y","isScrolling","handleClose","requestAnimationFrame","key","Consumer","insets","bottom","left","right","bottomInset","root","_background","panResponder","dragHandlePanResponder","handleBackdropPress","handleDragHandlePress","bind","ref","scrollViewRef","sheetContentContainer","contentContainerStyle","sheetScrollContent","alwaysBounceVertical","alwaysBounceHorizontal","bounces","showsVerticalScrollIndicator","scrollEventThrottle","onScroll","handleScroll","nestedScrollEnabled","scrollEnabled","issticky","enablemodalsupport","renderAnimatedSheetChildren","edges","map","o","i","onStartShouldSetResponder","onResponderEnd","isModal","modalOverlay","centered","centeredOverlay","zIndex","elevationIndex","elevation","modalStyle","e","stopPropagation","content","expandedRatio","bottomsheetexpandedheightratio","expandedDefaultHeight","effectiveExpandedRatio","minimumExpandedHeight","showonrender","refresh","forceUpdate","showModal","options","exists","find","list","setTimeout","onOpen","idx","findIndex","onClose","splice","componentDidMount","backHandlerSubscription","addEventListener","handleBackPress","keyboardDidShowListener","addListener","onKeyboardShow","keyboardDidHideListener","onKeyboardHide","componentWillUnmount","remove","componentDidUpdate","prevProps","onPropertyChange","$new","$old","closeSheetImmediate","renderSkeleton","theme","skeleton","width","renderWidget","hasButtonNavigation","wrapWithSafeArea","flex","visible","transparent","animationType","onRequestClose","statusBarTranslucent","behavior","keyboardVerticalOffset","renderContent"],"sources":["bottomsheet.component.tsx"],"sourcesContent":["import React, { createRef } from 'react';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { View, PanResponder, Dimensions, TouchableWithoutFeedback, Platform, PanResponderGestureState, StatusBar, BackHandler, DimensionValue, KeyboardAvoidingView, Keyboard, EmitterSubscription, Modal, NativeEventSubscription, Pressable, ViewStyle } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\nimport Animated, {\n useAnimatedStyle,\n withTiming,\n runOnJS,\n Easing,\n SharedValue,\n makeMutable,\n cancelAnimation\n} from 'react-native-reanimated';\nimport { AnimatableProps } from 'react-native-animatable';\nimport * as Animatable from 'react-native-animatable';\nimport WmBottomsheetProps from './bottomsheet.props';\nimport { DEFAULT_CLASS, WmBottomsheetStyles } from './bottomsheet.styles';\nimport { createSkeleton } from '../skeleton/skeleton.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\nimport { ModalProvider, ModalService, ModalOptions } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport { SafeAreaInsetsContext, SafeAreaView } from 'react-native-safe-area-context';\n\n\n// Web-only: Runs all bottom sheet animations on the JS thread (sets useNativeDriver to false)\n// Prevents errors on web where native driver animations are not supported\n// Web - Animated api is used from animation\nif (Platform.OS === 'web') {\n try {\n const RN: any = require('react-native');\n const RNAnimated: any = RN && RN.Animated;\n if (RNAnimated && !RNAnimated.__wmPatchedNoNativeDriver) {\n const wrap = (name: string) => {\n const original = RNAnimated[name];\n if (typeof original === 'function') {\n RNAnimated[name] = (value: any, config: any) => {\n const patched = { ...(config || {}), useNativeDriver: false };\n return original(value, patched);\n };\n }\n };\n wrap('timing');\n wrap('spring');\n wrap('decay');\n RNAnimated.__wmPatchedNoNativeDriver = true;\n }\n } catch (_) {\n // noop\n }\n}\n\nconst { height: SCREEN_HEIGHT } = Dimensions.get('screen');\nexport class WmBottomsheetState extends BaseComponentState<WmBottomsheetProps> {\n scrollViewRef = createRef<ScrollView>();\n isScrolling = false;\n scrollOffset = 0;\n isExpanded = false;\n isBottomsheetVisible = false;\n keyboardHeight = 0;\n localModalsOpened: ModalOptions[] = [];\n lastGestureDy = 0;\n contentAnimationId?: number = 0;\n contentAnimatableProps?: AnimatableProps<ViewStyle> = undefined;\n}\n\n// Animated wrapper component that uses hooks\nconst AnimatedBottomsheetContent = ({\n translateY,\n backdropOpacity,\n sheetHeight,\n lastGestureDy,\n styles,\n props,\n children,\n panHandlers,\n dragHandlePanHandlers,\n onBackdropPress,\n onDragHandlePress,\n getTestProps,\n enabledragsettle\n}: any) => {\n const backdropAnimatedStyle = useAnimatedStyle(() => ({\n opacity: backdropOpacity.value\n }));\n\n const containerAnimatedStyle = useAnimatedStyle(() => ({\n height: sheetHeight.value,\n transform: [{ translateY: translateY.value }]\n }));\n\n const contentStyle = useAnimatedStyle(() => {\n if (enabledragsettle && lastGestureDy.value > 0) {\n return {\n paddingBottom: lastGestureDy.value\n };\n }\n return {};\n });\n\n return (\n <>\n <TouchableWithoutFeedback onPress={onBackdropPress}>\n <Animated.View\n style={[styles.backdrop, backdropAnimatedStyle]}\n {...getTestProps('backdrop')}\n {...getAccessibilityProps(AccessibilityWidgetType.BOTTOMSHEET, props)}\n />\n </TouchableWithoutFeedback>\n\n <Animated.View\n style={[styles.container, containerAnimatedStyle]}\n {...panHandlers}\n >\n <View style={styles.dragHandleContainer} {...dragHandlePanHandlers}>\n <Pressable onPress={onDragHandlePress}>\n <View style={styles.dragIconHandle} {...getTestProps('draghandle')} />\n </Pressable>\n </View>\n {children(contentStyle)}\n </Animated.View>\n </>\n );\n};\n\nexport default class WmBottomsheet extends BaseComponent<WmBottomsheetProps, WmBottomsheetState, WmBottomsheetStyles> {\n private calculatedHeight: number;\n private expandedHeight: number;\n private defaultHeight: number = 0.5;\n private expandedDefaultHeight: number = 0.8;\n private minimumHeight: number = 0.01;\n private minimumExpandedHeight: number = 0.5;\n private maxHeight: number = 1.0;\n private animationDuration: number = 400;\n private keyboardAnimationDuration: number = Platform.OS === 'ios' ? 250 : 275;\n private statusBarHeight: number = StatusBar.currentHeight || 0;\n private defaultTopInset: number = 44;\n private maxHeightRatio: number = 0;\n private keyboardDidShowListener!: EmitterSubscription;\n private keyboardDidHideListener!: EmitterSubscription;\n private backHandlerSubscription: NativeEventSubscription | null = null;\n private topInset: number = 0;\n private iosKeyboardHeight: number = 0;\n private isIosKeyboardHeightSet: boolean = false;\n private sheetModalService: ModalService;\n private isDragHandleExpanding: boolean = false;\n\n // Reanimated shared values - created once and reused\n private translateY!: SharedValue<number>;\n private backdropOpacity!: SharedValue<number>;\n private sheetHeight!: SharedValue<number>;\n private lastGestureDyShared!: SharedValue<number>;\n\n // Helper method to calculate animation duration based on distance and velocity\n private getAnimationDuration(distance: number, velocity: number): number {\n // Base duration on distance, but cap it between 200-500ms\n // Higher velocity = shorter duration for snappier feel\n const velocityFactor = Math.max(0.3, Math.min(1, 1 - Math.abs(velocity) / 2));\n const calculatedDuration = Math.abs(distance) * velocityFactor;\n return Math.min(500, Math.max(200, calculatedDuration));\n }\n\n private calculateSheetHeight(bottomsheetheightratio: number): number {\n // Use default height if ratio not provided, but ensure it's not below minimum\n const effectiveRatio = bottomsheetheightratio || this.defaultHeight;\n this.maxHeightRatio = Math.max(\n this.minimumHeight,\n Math.min(effectiveRatio, this.maxHeight)\n );\n\n const screenHeight = Dimensions.get('screen').height;\n let calculatedHeight = screenHeight * this.maxHeightRatio;\n\n if (Platform.OS === 'ios') {\n // Subtract top inset bar height for ios only if bottomsheetheightratio is 0.9\n if (this.maxHeightRatio >= 0.9) {\n calculatedHeight -= this.defaultTopInset;\n }\n }\n else if (Platform.OS === 'android') {\n // Subtract status bar height for Android only if bottomsheetheightratio is 0.9\n if (this.maxHeightRatio >= 0.9) {\n calculatedHeight -= this.statusBarHeight;\n }\n }\n return calculatedHeight;\n }\n\n open() {\n if (!this.state.isBottomsheetVisible)\n this.updateState({\n isBottomsheetVisible: true\n } as WmBottomsheetState);\n this.openSheet();\n }\n\n close() {\n if (this.state.isBottomsheetVisible) {\n this.closeSheet();\n }\n }\n\n isSheetExpanded = () => {\n return this.state.isExpanded\n }\n\n expandBottomSheet = () => {\n const targetHeight = Math.min(this.expandedHeight, SCREEN_HEIGHT);\n const callback = () => {\n this.updateState({\n isExpanded: true,\n lastGestureDy: 0\n } as WmBottomsheetState);\n this.invokeEventCallback('onExpand', [null, this]);\n };\n\n // Reset drag settle value immediately on UI thread\n this.lastGestureDyShared.value = 0;\n\n if (this.props.enabledragsettle) {\n // Synchronize both animations to complete together\n this.sheetHeight.value = withTiming(targetHeight, {\n duration: this.animationDuration,\n easing: Easing.out(Easing.ease)\n });\n this.translateY.value = withTiming(0, {\n duration: this.animationDuration,\n easing: Easing.out(Easing.ease)\n }, (finished) => {\n if (finished) {\n runOnJS(callback)();\n }\n });\n } else {\n // Only animate height for non-drag-settle mode\n this.sheetHeight.value = withTiming(targetHeight, {\n duration: this.animationDuration,\n easing: Easing.out(Easing.ease)\n }, (finished) => {\n if (finished) {\n runOnJS(callback)();\n }\n });\n }\n }\n\n collapseBottomSheet = () => {\n const callback = () => {\n this.updateState({\n isExpanded: false,\n lastGestureDy: 0\n } as WmBottomsheetState);\n this.invokeEventCallback('onCollapse', [null, this]);\n };\n\n // Reset drag settle value immediately on UI thread\n this.lastGestureDyShared.value = 0;\n\n this.translateY.value = withTiming(0, {\n duration: this.animationDuration,\n easing: Easing.out(Easing.ease)\n });\n this.sheetHeight.value = withTiming(this.calculatedHeight, {\n duration: this.animationDuration,\n easing: Easing.out(Easing.ease)\n }, (finished) => {\n if (finished) {\n runOnJS(callback)();\n }\n });\n }\n\n public animate(props: AnimatableProps<ViewStyle>) {\n this.updateState({\n contentAnimationId: Date.now(),\n contentAnimatableProps: props\n } as WmBottomsheetState);\n }\n\n constructor(props: WmBottomsheetProps) {\n super(props, DEFAULT_CLASS, new WmBottomsheetProps(), new WmBottomsheetState());\n this.calculatedHeight = this.calculateSheetHeight(props.bottomsheetheightratio);\n\n // Use bottomsheetexpandedheightratio if provided, otherwise use expandedDefaultHeight\n const expandedRatio = props.bottomsheetexpandedheightratio || this.expandedDefaultHeight;\n const effectiveExpandedRatio = Math.max(\n this.minimumExpandedHeight,\n Math.min(expandedRatio, this.maxHeight)\n );\n\n this.expandedHeight = SCREEN_HEIGHT * effectiveExpandedRatio;\n\n if (Platform.OS === 'android') {\n if (effectiveExpandedRatio >= 0.9) {\n this.expandedHeight -= this.statusBarHeight;\n }\n }\n if (Platform.OS === 'ios') {\n if (effectiveExpandedRatio >= 0.9) {\n this.expandedHeight -= this.defaultTopInset;\n }\n }\n\n // Initialize shared values in constructor using makeMutable (not hooks)\n // makeMutable can be called outside of React components\n this.translateY = makeMutable(SCREEN_HEIGHT);\n this.backdropOpacity = makeMutable(0);\n this.sheetHeight = makeMutable(this.calculatedHeight);\n this.lastGestureDyShared = makeMutable(0);\n\n this.updateState({\n isBottomsheetVisible: this.props.showonrender || false\n } as WmBottomsheetState);\n\n // Initialize values immediately to prevent flicker\n if (this.props.showonrender) {\n this.translateY.value = 0;\n this.backdropOpacity.value = 1;\n }\n\n // Local ModalService for content rendered inside Bottomsheet\n this.sheetModalService = {\n refresh: () => this.forceUpdate(),\n showModal: (options: ModalOptions) => {\n const exists = this.state.localModalsOpened.find(o => o === options);\n if (!exists) {\n // ensure high z-index within sheet\n (options as any).elevationIndex = 9999 + this.state.localModalsOpened.length + 1;\n const list = [...this.state.localModalsOpened, options];\n this.updateState({ localModalsOpened: list } as WmBottomsheetState, () => {\n setTimeout(() => options.onOpen && options.onOpen(), 0);\n });\n }\n },\n hideModal: (options?: ModalOptions) => {\n const list = [...this.state.localModalsOpened];\n const idx = options ? list.findIndex(o => o === options) : (list.length - 1);\n if (idx >= 0) {\n const o = list[idx];\n o && o.onClose && o.onClose();\n list.splice(idx, 1);\n this.updateState({ localModalsOpened: list } as WmBottomsheetState);\n }\n }\n };\n }\n\n componentDidMount() {\n super.componentDidMount();\n\n // Trigger animation after mount if showonrender is true\n if (this.state.isBottomsheetVisible) {\n // Use requestAnimationFrame to ensure animation happens after initial render\n requestAnimationFrame(() => {\n this.openSheet();\n });\n }\n\n if (Platform.OS === 'android') {\n this.backHandlerSubscription = BackHandler.addEventListener('hardwareBackPress', this.handleBackPress);\n }\n this.keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', this.onKeyboardShow);\n this.keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', this.onKeyboardHide);\n }\n\n componentWillUnmount() {\n super.componentWillUnmount();\n if (this.backHandlerSubscription) {\n this.backHandlerSubscription.remove();\n this.backHandlerSubscription = null;\n }\n if (this.keyboardDidShowListener) {\n this.keyboardDidShowListener.remove();\n }\n if (this.keyboardDidHideListener) {\n this.keyboardDidHideListener.remove();\n }\n }\n\n private handleBackPress = () => {\n // Close top-most local modal first, if any\n if (this.state.localModalsOpened && this.state.localModalsOpened.length > 0) {\n const top = this.state.localModalsOpened[this.state.localModalsOpened.length - 1];\n this.sheetModalService.hideModal(top);\n return true;\n }\n if (this.state.isBottomsheetVisible) {\n if (!this.props.disableswipedownclose && this.props.autoclose !== 'disabled') {\n this.closeSheet();\n }\n return true; // Prevent default back action\n }\n return false;\n };\n\n private onKeyboardShow = (event: any) => {\n let keyboardHeight = event.endCoordinates?.height || 0;\n //only storing ios keyboard height once as first time keyboard open (to avoid scroll flickring issue in ios in text widget)\n if (!this.isIosKeyboardHeightSet) {\n this.iosKeyboardHeight = event.endCoordinates?.height + 40;\n this.isIosKeyboardHeightSet = true;\n }\n // Calculate available space after keyboard\n const availableHeight = SCREEN_HEIGHT - (Platform.OS == 'ios' ? this.iosKeyboardHeight : keyboardHeight);\n // Calculate adjusted sheet height to fit within available space\n // Leave some buffer space for the drag handle and safe area\n const bufferSpace = (Platform.OS === 'ios' ? this.topInset : this.statusBarHeight) + 20;\n const adjustedHeight = availableHeight - bufferSpace;\n\n if (this.sheetHeight && Platform.OS == 'android' && this.props.modal) {\n // Use platform-specific keyboard animation duration for smooth synchronization\n this.sheetHeight.value = withTiming(adjustedHeight, {\n duration: this.keyboardAnimationDuration,\n easing: Easing.out(Easing.ease)\n });\n }\n\n this.updateState({\n keyboardHeight: keyboardHeight,\n } as WmBottomsheetState);\n };\n\n private onKeyboardHide = () => {\n if (this.sheetHeight && Platform.OS == 'android' && this.props.modal) {\n // Use platform-specific keyboard animation duration for smooth synchronization\n this.sheetHeight.value = withTiming(\n this.state.isExpanded ? this.expandedHeight : this.calculatedHeight,\n {\n duration: this.keyboardAnimationDuration,\n easing: Easing.out(Easing.ease)\n }\n );\n }\n\n this.updateState({\n keyboardHeight: 0,\n } as WmBottomsheetState);\n };\n\n componentDidUpdate(prevProps: WmBottomsheetProps) {\n if (prevProps.bottomsheetheightratio !== this.props.bottomsheetheightratio) {\n this.calculatedHeight = this.calculateSheetHeight(this.props.bottomsheetheightratio);\n if (this.sheetHeight) {\n this.sheetHeight.value = this.calculatedHeight;\n }\n }\n }\n\n handleSwipeGesture = (gestureState: PanResponderGestureState) => {\n\n // Only reset lastGestureDy for traditional behavior, not for drag and settle\n if (!this.props.enabledragsettle) {\n this.updateState({\n lastGestureDy: 0\n } as WmBottomsheetState);\n if (this.lastGestureDyShared) {\n this.lastGestureDyShared.value = 0;\n }\n }\n\n if (this.props.enabledragsettle && gestureState.dy > 0) {\n const currentTranslateY = this.translateY?.value || 0;\n\n if (gestureState.vy > 0.5 && !this.props.disableswipedownclose) {\n this.closeSheet();\n return;\n }\n\n if (this.translateY && this.lastGestureDyShared) {\n this.translateY.value = currentTranslateY;\n this.lastGestureDyShared.value = currentTranslateY;\n }\n\n this.updateState({\n isExpanded: false,\n lastGestureDy: currentTranslateY\n } as WmBottomsheetState);\n return;\n }\n\n if (gestureState.dy > 0) {\n if (this.state.isExpanded || this.props.disableswipedownclose) {\n if (gestureState.dy < this.expandedHeight / 4 || this.props.disableswipedownclose) {\n let sheetMinimumHeight = this.props.bottomsheetminimumheight || 0.1;\n const targetHeight = this.props.disableswipedownclose ? sheetMinimumHeight * SCREEN_HEIGHT : this.calculatedHeight;\n const currentHeight = this.sheetHeight?.value || this.expandedHeight;\n const distance = Math.abs(currentHeight - targetHeight);\n const duration = this.getAnimationDuration(distance, gestureState.vy);\n\n const callback = () => {\n this.updateState({\n isExpanded: false\n } as WmBottomsheetState);\n this.invokeEventCallback('onCollapse', [null, this]);\n };\n\n if (this.translateY && this.sheetHeight) {\n this.translateY.value = withTiming(0, {\n duration: duration,\n easing: Easing.out(Easing.ease)\n });\n this.sheetHeight.value = withTiming(\n targetHeight,\n {\n duration: duration,\n easing: Easing.out(Easing.ease)\n },\n (finished) => {\n if (finished) {\n runOnJS(callback)();\n }\n }\n );\n }\n } else if ((gestureState.dy > this.expandedHeight / 4 || gestureState.vy > 0.5) && !this.props.disableswipedownclose) {\n this.closeSheet();\n }\n } else {\n if (this.props.disableswipedownclose) {\n this.openSheet();\n return;\n }\n if ((gestureState.dy > 100 || gestureState.vy > 0.5) && !this.props.disableswipedownclose) {\n this.closeSheet();\n } else {\n this.openSheet();\n }\n }\n }\n }\n // panResponder for bottom sheet scroll view\n panResponder = PanResponder.create({\n onStartShouldSetPanResponder: (_, gestureState) => {\n if (this.props.disablescrollonrest && !this.state.isExpanded) {\n return true\n }\n // Only handle the gesture if we're at the top and swiping down\n return gestureState.dy > 0 && this.state.scrollOffset <= 0;\n\n },\n\n onMoveShouldSetPanResponder: (_, gestureState) => {\n if (this.props.disablescrollonrest && !this.state.isExpanded) {\n return Math.abs(gestureState.dy) > 2;\n }\n // Only handle the gesture if we're at the top and swiping down\n return gestureState.dy > 0 && this.state.scrollOffset <= 0;\n\n },\n\n onPanResponderGrant: () => {\n // Cancel any ongoing animations when user starts dragging\n if (this.translateY) {\n cancelAnimation(this.translateY);\n }\n },\n\n onPanResponderMove: (_, gestureState) => {\n\n if (gestureState.dy > 0 && this.translateY && this.lastGestureDyShared) {\n const newTranslateY = Math.max(0, this.lastGestureDyShared.value + gestureState.dy);\n this.translateY.value = newTranslateY;\n // Reset expand flag if dragging down\n this.isDragHandleExpanding = false;\n }\n else if (gestureState.dy < 0 && this.props.expand && this.props.bottomsheetheightratio !== 1 && !this.isDragHandleExpanding && !this.state.isExpanded) {\n // Only trigger expand once with threshold of -50px upward drag\n this.isDragHandleExpanding = true;\n this.expandBottomSheet();\n }\n },\n\n onPanResponderRelease: (_, gestureState) => {\n this.handleSwipeGesture(gestureState);\n },\n\n onPanResponderTerminate: () => {\n this.openSheet();\n },\n });\n\n //pan repsoneder for bottom sheet dragable container\n dragHandlePanResponder = PanResponder.create({\n onStartShouldSetPanResponder: () => true,\n onMoveShouldSetPanResponder: () => true,\n\n onPanResponderGrant: () => {\n // Cancel any ongoing animations when user starts dragging\n if (this.translateY) {\n cancelAnimation(this.translateY);\n }\n // Reset the expand flag\n this.isDragHandleExpanding = false;\n },\n\n onPanResponderMove: (_, gestureState) => {\n if (gestureState.dy > 0 && this.translateY && this.lastGestureDyShared) {\n const newTranslateY = Math.max(0, this.lastGestureDyShared.value + gestureState.dy);\n this.translateY.value = newTranslateY;\n // Reset expand flag if dragging down\n this.isDragHandleExpanding = false;\n } else if (gestureState.dy < -50 && this.props.expand && this.props.bottomsheetheightratio !== 1 && !this.isDragHandleExpanding && !this.state.isExpanded) {\n // Only trigger expand once with threshold of -50px upward drag\n this.isDragHandleExpanding = true;\n this.expandBottomSheet();\n }\n },\n onPanResponderRelease: (_, gestureState) => {\n this.isDragHandleExpanding = false;\n this.handleSwipeGesture(gestureState);\n },\n });\n\n handleScroll = (event: any): any => {\n if (this.state.keyboardHeight > 0) return null;\n const offsetY = event.nativeEvent.contentOffset.y;\n this.updateState({\n isScrolling: offsetY > 0,\n scrollOffset: offsetY\n } as WmBottomsheetState);\n };\n\n openSheet = () => {\n const callback = () => {\n this.updateState({\n lastGestureDy: 0,\n } as WmBottomsheetState);\n this.invokeEventCallback('onOpened', [null, this]);\n };\n\n // Reset drag settle value immediately on UI thread\n if (this.lastGestureDyShared) {\n this.lastGestureDyShared.value = 0;\n }\n\n if (this.translateY && this.backdropOpacity) {\n this.translateY.value = withTiming(0, {\n duration: this.animationDuration,\n easing: Easing.out(Easing.ease)\n }, (finished) => {\n if (finished) {\n runOnJS(callback)();\n }\n });\n // Backdrop animation synchronized with sheet animation\n this.backdropOpacity.value = withTiming(1, {\n duration: this.animationDuration,\n easing: Easing.out(Easing.ease)\n });\n }\n };\n\n private handleClose = () => {\n this.updateState({\n isBottomsheetVisible: false\n } as WmBottomsheetState);\n this.invokeEventCallback('onClose', [null, this]);\n };\n\n closeSheet = () => {\n \n\n const callback = () => {\n // Reset sheet height after close\n if (this.sheetHeight) {\n this.sheetHeight.value = this.calculatedHeight;\n }\n this.updateState({\n isExpanded: false,\n localModalsOpened: [] as ModalOptions[],\n contentAnimationId: 0, \n contentAnimatableProps: undefined \n } as WmBottomsheetState);\n this.handleClose();\n };\n\n if (this.translateY && this.backdropOpacity) {\n this.translateY.value = withTiming(SCREEN_HEIGHT, {\n duration: this.animationDuration,\n easing: Easing.out(Easing.ease)\n }, (finished) => {\n if (finished) {\n runOnJS(callback)();\n }\n });\n // Backdrop animation synchronized with sheet animation\n this.backdropOpacity.value = withTiming(0, {\n duration: this.animationDuration,\n easing: Easing.out(Easing.ease)\n });\n }\n };\n\n closeSheetImmediate = () => {\n if (this.translateY && this.backdropOpacity && this.lastGestureDyShared) {\n this.translateY.value = SCREEN_HEIGHT;\n this.backdropOpacity.value = 0;\n this.lastGestureDyShared.value = 0;\n }\n\n this.updateState({\n lastGestureDy: 0,\n isExpanded: false,\n isBottomsheetVisible: false,\n localModalsOpened: [] as ModalOptions[],\n contentAnimationId: 0,\n contentAnimatableProps: undefined\n } as WmBottomsheetState);\n\n requestAnimationFrame(() => {\n if (this.sheetHeight) {\n this.sheetHeight.value = this.calculatedHeight;\n }\n });\n };\n\n public onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch (name) {\n case \"showonrender\":\n if ($new) {\n this.updateState({\n isBottomsheetVisible: $new || false\n } as WmBottomsheetState);\n if (this.state.isBottomsheetVisible) {\n this.openSheet && this.openSheet();\n }\n } else {\n this.closeSheetImmediate && this.closeSheetImmediate();\n }\n break;\n }\n }\n\n public renderSkeleton(props: WmBottomsheetProps) {\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: this.styles.root.width as DimensionValue,\n height: this.styles.root.height as DimensionValue\n });\n }\n\n // Class methods to prevent recreation on every render\n private handleBackdropPress = () => {\n if (this.props.autoclose !== 'disabled') {\n this.closeSheet();\n }\n };\n\n private handleDragHandlePress = () => {\n this.invokeEventCallback('onDraghandleiconclick', [null, this]);\n };\n\n private renderAnimatedSheetChildren = (children: React.ReactNode) => {\n if (!this.state.contentAnimatableProps) {\n return children;\n }\n return (\n <Animatable.View\n key={this.state.contentAnimationId}\n {...this.state.contentAnimatableProps}\n >\n {children}\n </Animatable.View>\n );\n };\n\n private renderContent = (props: WmBottomsheetProps) => {\n // Don't render if shared values aren't initialized yet\n if (!this.translateY || !this.backdropOpacity || !this.sheetHeight || !this.lastGestureDyShared) {\n return null;\n }\n\n return (\n <SafeAreaInsetsContext.Consumer>\n {(insets = { top: 0, bottom: 0, left: 0, right: 0 }) => {\n // Store topInset for later use (avoid mutation during render)\n const topInset = insets?.top || 0;\n const bottomInset = insets?.bottom || 0;\n // Update the instance variable outside of render cycle\n if (this.topInset !== topInset) {\n requestAnimationFrame(() => {\n this.topInset = topInset;\n });\n }\n return (\n <View style={this.styles.root} {...this.getTestProps('keyboardview')}>\n {this._background}\n\n <AnimatedBottomsheetContent\n translateY={this.translateY}\n backdropOpacity={this.backdropOpacity}\n sheetHeight={this.sheetHeight}\n lastGestureDy={this.lastGestureDyShared}\n styles={this.styles}\n props={props}\n panHandlers={this.panResponder.panHandlers}\n dragHandlePanHandlers={this.dragHandlePanResponder.panHandlers}\n onBackdropPress={this.handleBackdropPress}\n onDragHandlePress={this.handleDragHandlePress}\n getTestProps={this.getTestProps.bind(this)}\n enabledragsettle={props.enabledragsettle}\n >\n {(contentStyle: any) => (\n <ScrollView\n ref={this.state.scrollViewRef}\n style={this.styles.sheetContentContainer}\n contentContainerStyle={[this.styles.sheetScrollContent]}\n alwaysBounceVertical={false}\n alwaysBounceHorizontal={false}\n bounces={false}\n showsVerticalScrollIndicator={false}\n scrollEventThrottle={16}\n onScroll={this.handleScroll}\n nestedScrollEnabled={true}\n scrollEnabled={!props.issticky && (!props.disablescrollonrest || this.state.isExpanded)}\n {...this.getTestProps('scorllview')}\n >\n {props.enablemodalsupport ? (\n <ModalProvider value={this.sheetModalService}>\n <Animated.View style={contentStyle}>\n {this.renderAnimatedSheetChildren(props.children)}\n </Animated.View>\n </ModalProvider>\n ) : (\n <Animated.View style={contentStyle}>\n {this.renderAnimatedSheetChildren(props.children)}\n </Animated.View>\n )}\n </ScrollView>\n )}\n </AnimatedBottomsheetContent>\n {/*Adding SafeAreaView to ensure the bottom sheet is rendered above the Android button navigation bar when modal prop is false */}\n {(Platform.OS === 'android' && !this.props.modal && bottomInset > 40) && <SafeAreaView edges={['bottom']} />}\n\n {props.enablemodalsupport && this.state.localModalsOpened && this.state.localModalsOpened.map((o, i) => (\n <View\n key={(o.name || '') + i}\n onStartShouldSetResponder={() => true}\n onResponderEnd={() => o.isModal && this.sheetModalService.hideModal(o)}\n style={[\n this.styles.modalOverlay,\n (o as any).centered ? this.styles.centeredOverlay : null,\n { zIndex: (o as any).elevationIndex || 9999, elevation: (o as any).elevationIndex || 9999 },\n (o.modalStyle || {})\n ]}\n >\n <View\n style={[(o.contentStyle || {})]}\n onStartShouldSetResponder={() => true}\n onResponderEnd={(e) => e.stopPropagation()}\n >\n {o.content}\n </View>\n </View>\n ))}\n </View>\n );\n }}\n </SafeAreaInsetsContext.Consumer>\n );\n };\n\n renderWidget(props: WmBottomsheetProps) {\n if (!this.state.isBottomsheetVisible) return null;\n\n return (\n <SafeAreaInsetsContext.Consumer>\n {(insets = { top: 0, bottom: 0, left: 0, right: 0 }) => {\n // Use SafeAreaView on Android with button navigation to render the bottom sheet above the nav bar (when modal props is true)\n // Button navigation is identified when bottom inset >= 40 \n const hasButtonNavigation = Platform.OS === 'android' && (insets?.bottom || 0) >= 40;\n\n const wrapWithSafeArea = (children: React.ReactNode) => {\n if (hasButtonNavigation) {\n return <SafeAreaView style={{ flex: 1 }}>{children}</SafeAreaView>;\n }\n return children;\n };\n\n if (props.modal) {\n return (\n <Modal\n visible={this.state.isBottomsheetVisible}\n transparent={true}\n animationType=\"none\"\n onRequestClose={() => {\n if (!this.props.disableswipedownclose && this.props.autoclose !== 'disabled') {\n this.closeSheet();\n }\n }}\n statusBarTranslucent={false}\n >\n {wrapWithSafeArea(\n <KeyboardAvoidingView\n style={{ flex: 1 }}\n behavior={'padding'}\n keyboardVerticalOffset={Platform.OS === 'ios' ? 0 : undefined}\n >\n {this.renderContent(props)}\n </KeyboardAvoidingView>\n )}\n </Modal>\n );\n } else {\n return this.renderContent(props);\n }\n }}\n </SafeAreaInsetsContext.Consumer>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAASC,IAAI,EAAEC,YAAY,EAAEC,UAAU,EAAEC,wBAAwB,EAAEC,QAAQ,EAA4BC,SAAS,EAAEC,WAAW,EAAkBC,oBAAoB,EAAEC,QAAQ,EAAuBC,KAAK,EAA2BC,SAAS,QAAmB,cAAc;AAC9Q,SAASC,UAAU,QAAQ,8BAA8B;AACzD,OAAOC,QAAQ,IACbC,gBAAgB,EAChBC,UAAU,EACVC,OAAO,EACPC,MAAM,EAENC,WAAW,EACXC,eAAe,QACV,yBAAyB;AAEhC,OAAO,KAAKC,UAAU,MAAM,yBAAyB;AACrD,OAAOC,kBAAkB,MAAM,qBAAqB;AACpD,SAASC,aAAa,QAA6B,sBAAsB;AACzE,SAASC,cAAc,QAAQ,gCAAgC;AAC/D,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAC7G,SAASC,aAAa,QAAoC,8CAA8C;AACxG,SAASC,qBAAqB,EAAEC,YAAY,QAAQ,gCAAgC;;AAGpF;AACA;AACA;AACA,IAAIvB,QAAQ,CAACwB,EAAE,KAAK,KAAK,EAAE;EACzB,IAAI;IACF,MAAMC,EAAO,GAAGC,OAAO,CAAC,cAAc,CAAC;IACvC,MAAMC,UAAe,GAAGF,E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AU,GAE7D,IAAI,CAACiO,aAAa,CAAC1N,KAAK,CACL,CACxB,CACK,CAAC;MAEZ,CAAC,MAAM;QACL,OAAO,IAAI,CAAC0N,aAAa,CAAC1N,KAAK,CAAC;MAClC;IACF,CAC8B,CAAC;EAErC;AACF","ignoreList":[]}
@@ -6,6 +6,9 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
6
6
  const defaultStyles = defineStyles({
7
7
  root: {
8
8
  position: 'absolute',
9
+ top: 0,
10
+ left: 0,
11
+ right: 0,
9
12
  bottom: 0,
10
13
  zIndex: 9999,
11
14
  elevation: 9999,
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","ThemeVariables","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","position","bottom","zIndex","elevation","width","height","justifyContent","text","backdrop","top","left","right","backgroundColor","INSTANCE","bottomSheetBgColor","container","borderTopLeftRadius","borderTopRightRadius","shadowColor","shadowOffset","shadowOpacity","shadowRadius","borderTopWidth","borderColor","maxHeight","dragHandleContainer","paddingVertical","alignItems","borderBottomWidth","borderBottomColor","dragIconHandle","bottomSheetDragIconcolor","borderRadius","sheetContentContainer","flex","sheetScrollContent","paddingHorizontal","paddingBottom","flexGrow","modalOverlay","centeredOverlay","skeleton"],"sources":["bottomsheet.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { TextStyle, ViewStyle } from 'react-native';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\nexport type WmBottomsheetStyles = BaseStyles & {\n root: ViewStyle;\n backdrop: ViewStyle;\n container: ViewStyle;\n dragHandleContainer: ViewStyle;\n dragIconHandle: ViewStyle;\n sheetContentContainer: ViewStyle;\n sheetScrollContent: ViewStyle;\n modalOverlay: ViewStyle;\n centeredOverlay: ViewStyle;\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-bottomsheet';\n\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles = defineStyles<WmBottomsheetStyles>({\n root: {\n position: 'absolute',\n bottom: 0,\n zIndex: 9999,\n elevation: 9999,\n width: '100%',\n height: '100%',\n justifyContent: 'flex-end', // This pushes content to bottom\n },\n text: {},\n backdrop: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n width: '100%',\n height: '100%',\n backgroundColor: ThemeVariables.INSTANCE.bottomSheetBgColor\n },\n container: {\n backgroundColor: '#fff',\n borderTopLeftRadius: 28,\n borderTopRightRadius: 28,\n shadowColor: '#000',\n shadowOffset: { width: 0, height: -2 },\n shadowOpacity: 0.05,\n shadowRadius: 3,\n elevation: 5,\n borderTopWidth: 0.5,\n borderColor: ThemeVariables.INSTANCE.bottomSheetBgColor,\n width: '100%',\n maxHeight: '100%', // Allow full screen height\n },\n dragHandleContainer: {\n paddingVertical: 16,\n alignItems: 'center',\n borderBottomWidth: 1,\n borderBottomColor: ThemeVariables.INSTANCE.bottomSheetBgColor,\n backgroundColor: '#fff',\n borderTopLeftRadius: 28,\n borderTopRightRadius: 28,\n },\n dragIconHandle: {\n width: 36,\n height: 4,\n backgroundColor: ThemeVariables.INSTANCE.bottomSheetDragIconcolor,\n borderRadius: 2,\n },\n sheetContentContainer: {\n flex: 1,\n maxHeight: '100%', // Ensure it doesn't exceed container\n },\n sheetScrollContent: {\n paddingHorizontal: 20,\n paddingBottom: 20,\n flexGrow: 1,\n },\n modalOverlay: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0\n },\n centeredOverlay: {\n justifyContent: 'center',\n alignItems: 'center'\n },\n skeleton: {\n root: {\n \n }\n } as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,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EpC,cAAc,CAACoB,QAAQ,CAACC,kBAAkB;MAC7DF,eAAe,EAAE,MAAM;MACvBI,mBAAmB,EAAE,EAAE;MACvBC,oBAAoB,EAAE;IAC1B,CAAC;IACDa,cAAc,EAAE;MACZ1B,KAAK,EAAE,EAAE;MACTC,MAAM,EAAE,CAAC;MACTO,eAAe,EAAEnB,cAAc,CAACoB,QAAQ,CAACkB,wBAAwB;MACjEC,YAAY,EAAE;IAClB,CAAC;IACDC,qBAAqB,EAAE;MACnBC,IAAI,EAAE,CAAC;MACPV,SAAS,EAAE,MAAM,CAAE;IACvB,CAAC;IACDW,kBAAkB,EAAE;MAChBC,iBAAiB,EAAE,EAAE;MACrBC,aAAa,EAAE,EAAE;MACjBC,QAAQ,EAAE;IACd,CAAC;IACDC,YAAY,EAAE;MACVvC,QAAQ,EAAE,UAAU;MACpBS,GAAG,EAAE,CAAC;MACNC,IAAI,EAAE,CAAC;MACPC,KAAK,EAAE,CAAC;MACRV,MAAM,EAAE;IACZ,CAAC;IACDuC,eAAe,EAAE;MACblC,cAAc,EAAE,QAAQ;MACxBqB,UAAU,EAAE;IAChB,CAAC;IACDc,QAAQ,EAAE;MACV1C,IAAI,EAAE,CAEN;IACF;EACF,CAAC,CAAC;EAEFF,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","ThemeVariables","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","position","top","left","right","bottom","zIndex","elevation","width","height","justifyContent","text","backdrop","backgroundColor","INSTANCE","bottomSheetBgColor","container","borderTopLeftRadius","borderTopRightRadius","shadowColor","shadowOffset","shadowOpacity","shadowRadius","borderTopWidth","borderColor","maxHeight","dragHandleContainer","paddingVertical","alignItems","borderBottomWidth","borderBottomColor","dragIconHandle","bottomSheetDragIconcolor","borderRadius","sheetContentContainer","flex","sheetScrollContent","paddingHorizontal","paddingBottom","flexGrow","modalOverlay","centeredOverlay","skeleton"],"sources":["bottomsheet.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { TextStyle, ViewStyle } from 'react-native';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\nexport type WmBottomsheetStyles = BaseStyles & {\n root: ViewStyle;\n backdrop: ViewStyle;\n container: ViewStyle;\n dragHandleContainer: ViewStyle;\n dragIconHandle: ViewStyle;\n sheetContentContainer: ViewStyle;\n sheetScrollContent: ViewStyle;\n modalOverlay: ViewStyle;\n centeredOverlay: ViewStyle;\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-bottomsheet';\n\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles = defineStyles<WmBottomsheetStyles>({\n root: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n zIndex: 9999,\n elevation: 9999,\n width: '100%',\n height: '100%',\n justifyContent: 'flex-end', // This pushes content to bottom\n },\n text: {},\n backdrop: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n width: '100%',\n height: '100%',\n backgroundColor: ThemeVariables.INSTANCE.bottomSheetBgColor\n },\n container: {\n backgroundColor: '#fff',\n borderTopLeftRadius: 28,\n borderTopRightRadius: 28,\n shadowColor: '#000',\n shadowOffset: { width: 0, height: -2 },\n shadowOpacity: 0.05,\n shadowRadius: 3,\n elevation: 5,\n borderTopWidth: 0.5,\n borderColor: ThemeVariables.INSTANCE.bottomSheetBgColor,\n width: '100%',\n maxHeight: '100%', // Allow full screen height\n },\n dragHandleContainer: {\n paddingVertical: 16,\n alignItems: 'center',\n borderBottomWidth: 1,\n borderBottomColor: ThemeVariables.INSTANCE.bottomSheetBgColor,\n backgroundColor: '#fff',\n borderTopLeftRadius: 28,\n borderTopRightRadius: 28,\n },\n dragIconHandle: {\n width: 36,\n height: 4,\n backgroundColor: ThemeVariables.INSTANCE.bottomSheetDragIconcolor,\n borderRadius: 2,\n },\n sheetContentContainer: {\n flex: 1,\n maxHeight: '100%', // Ensure it doesn't exceed container\n },\n sheetScrollContent: {\n paddingHorizontal: 20,\n paddingBottom: 20,\n flexGrow: 1,\n },\n modalOverlay: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0\n },\n centeredOverlay: {\n justifyContent: 'center',\n alignItems: 'center'\n },\n skeleton: {\n root: {\n \n }\n } as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAGxF,OAAOC,cAAc,MAAM,kDAAkD;AAc7E,OAAO,MAAMC,aAAa,GAAG,iBAAiB;AAE9CH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAa,GAAGN,YAAY,CAAsB;IACpDO,IAAI,EAAE;MACFC,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,CAAC;MACNC,IAAI,EAAE,CAAC;MACPC,KAAK,EAAE,CAAC;MACRC,MAAM,EAAE,CAAC;MACTC,MAAM,EAAE,IAAI;MACZC,SAAS,EAAE,IAAI;MACfC,KAAK,EAAE,MAAM;MACbC,MAAM,EAAE,MAAM;MACdC,cAAc,EAAE,UAAU,CAAE;IAChC,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,QAAQ,EAAE;MACNX,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,CAAC;MACNC,IAAI,EAAE,CAAC;MACPC,KAAK,EAAE,CAAC;MACRC,MAAM,EAAE,CAAC;MACTG,KAAK,EAAE,MAAM;MACbC,MAAM,EAAE,MAAM;MACdI,eAAe,EAAEnB,cAAc,CAACoB,QAAQ,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