@wavemaker/app-rn-runtime 11.12.1-rc.6244 → 11.13.0-rc.222
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/basic/bottomsheet/bottomsheet.component.js +159 -29
- package/components/basic/bottomsheet/bottomsheet.component.js.map +1 -1
- package/components/basic/bottomsheet/bottomsheet.props.js +5 -0
- package/components/basic/bottomsheet/bottomsheet.props.js.map +1 -1
- package/components/basic/bottomsheet/bottomsheet.styles.js +12 -3
- package/components/basic/bottomsheet/bottomsheet.styles.js.map +1 -1
- package/components/input/chips/chips.component.js +10 -20
- package/components/input/chips/chips.component.js.map +1 -1
- package/components/input/chips/chips.styles.js +32 -32
- package/components/input/chips/chips.styles.js.map +1 -1
- package/components/page/page.component.js +3 -1
- package/components/page/page.component.js.map +1 -1
- package/core/AppConfig.js.map +1 -1
- package/core/responsive.utils.js +2 -2
- package/core/responsive.utils.js.map +1 -1
- package/core/screen-capture-protection.service.js +5 -0
- package/core/screen-capture-protection.service.js.map +1 -0
- package/core/secure-storage.service.js +55 -0
- package/core/secure-storage.service.js.map +1 -0
- package/core/storage.service.js.map +1 -1
- package/gestures/carousel-swipe.animation.js +6 -6
- package/gestures/carousel-swipe.animation.js.map +1 -1
- package/gestures/swipe.animation.js +6 -6
- package/gestures/swipe.animation.js.map +1 -1
- package/npm-shrinkwrap.json +198 -159
- package/package-lock.json +198 -159
- package/package.json +5 -3
- package/runtime/App.js +32 -2
- package/runtime/App.js.map +1 -1
- package/runtime/base-page.component.js +17 -1
- package/runtime/base-page.component.js.map +1 -1
|
@@ -4,12 +4,13 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
4
4
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
5
|
import React, { createRef } from 'react';
|
|
6
6
|
import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
|
|
7
|
-
import { View, Animated, PanResponder, Dimensions, TouchableWithoutFeedback, Platform, StatusBar, BackHandler, KeyboardAvoidingView, Keyboard, Modal } from 'react-native';
|
|
7
|
+
import { View, Animated, PanResponder, Dimensions, TouchableWithoutFeedback, Platform, StatusBar, BackHandler, KeyboardAvoidingView, Keyboard, Modal, Pressable } from 'react-native';
|
|
8
8
|
import { ScrollView } from 'react-native-gesture-handler';
|
|
9
9
|
import WmBottomsheetProps from './bottomsheet.props';
|
|
10
10
|
import { DEFAULT_CLASS } from './bottomsheet.styles';
|
|
11
11
|
import { createSkeleton } from '../skeleton/skeleton.component';
|
|
12
12
|
import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
|
|
13
|
+
import { ModalProvider } from '@wavemaker/app-rn-runtime/core/modal.service';
|
|
13
14
|
import { SafeAreaInsetsContext } from 'react-native-safe-area-context';
|
|
14
15
|
const {
|
|
15
16
|
height: SCREEN_HEIGHT
|
|
@@ -27,6 +28,7 @@ export class WmBottomsheetState extends BaseComponentState {
|
|
|
27
28
|
_defineProperty(this, "isExpanded", false);
|
|
28
29
|
_defineProperty(this, "isBottomsheetVisible", false);
|
|
29
30
|
_defineProperty(this, "keyboardHeight", 0);
|
|
31
|
+
_defineProperty(this, "localModalsOpened", []);
|
|
30
32
|
}
|
|
31
33
|
}
|
|
32
34
|
export default class WmBottomsheet extends BaseComponent {
|
|
@@ -67,7 +69,7 @@ export default class WmBottomsheet extends BaseComponent {
|
|
|
67
69
|
_defineProperty(this, "expandedHeight", void 0);
|
|
68
70
|
_defineProperty(this, "defaultHeight", 0.5);
|
|
69
71
|
_defineProperty(this, "expandedDefaultHeight", 0.8);
|
|
70
|
-
_defineProperty(this, "minimumHeight", 0.
|
|
72
|
+
_defineProperty(this, "minimumHeight", 0.01);
|
|
71
73
|
_defineProperty(this, "minimumExpandedHeight", 0.5);
|
|
72
74
|
_defineProperty(this, "maxHeight", 1.0);
|
|
73
75
|
// Allow full screen height
|
|
@@ -80,9 +82,65 @@ export default class WmBottomsheet extends BaseComponent {
|
|
|
80
82
|
_defineProperty(this, "topInset", 0);
|
|
81
83
|
_defineProperty(this, "iosKeyboardHeight", 0);
|
|
82
84
|
_defineProperty(this, "isIosKeyboardHeightSet", false);
|
|
85
|
+
_defineProperty(this, "sheetModalService", void 0);
|
|
86
|
+
_defineProperty(this, "isSheetExpanded", () => {
|
|
87
|
+
return this.state.isExpanded;
|
|
88
|
+
});
|
|
89
|
+
_defineProperty(this, "expandBottomSheet", () => {
|
|
90
|
+
const targetHeight = Math.min(this.expandedHeight, SCREEN_HEIGHT);
|
|
91
|
+
|
|
92
|
+
// For drag and settle behavior, we need to reset translateY to 0 when expanding
|
|
93
|
+
if (this.props.enabledragsettle) {
|
|
94
|
+
Animated.parallel([Animated.timing(this.state.sheetHeight, {
|
|
95
|
+
toValue: targetHeight,
|
|
96
|
+
duration: this.animationDuration,
|
|
97
|
+
useNativeDriver: false
|
|
98
|
+
}), Animated.timing(this.state.translateY, {
|
|
99
|
+
toValue: 0,
|
|
100
|
+
duration: this.animationDuration,
|
|
101
|
+
useNativeDriver: false
|
|
102
|
+
})]).start();
|
|
103
|
+
} else {
|
|
104
|
+
// Original behavior for non drag-and-settle mode
|
|
105
|
+
Animated.timing(this.state.sheetHeight, {
|
|
106
|
+
toValue: targetHeight,
|
|
107
|
+
duration: this.animationDuration,
|
|
108
|
+
useNativeDriver: false
|
|
109
|
+
}).start();
|
|
110
|
+
}
|
|
111
|
+
this.updateState({
|
|
112
|
+
isExpanded: true,
|
|
113
|
+
lastGestureDy: 0 // Reset to start from top when expanded
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
_defineProperty(this, "collapseBottomSheet", () => {
|
|
117
|
+
Animated.parallel([Animated.timing(this.state.translateY, {
|
|
118
|
+
toValue: 0,
|
|
119
|
+
// Keep sheet open
|
|
120
|
+
duration: this.animationDuration,
|
|
121
|
+
useNativeDriver: false
|
|
122
|
+
}), Animated.timing(this.state.sheetHeight, {
|
|
123
|
+
//use bottom sheet minimum height if disableswipedownclose is set to true or use calcluated height
|
|
124
|
+
toValue: this.calculatedHeight,
|
|
125
|
+
duration: this.animationDuration,
|
|
126
|
+
useNativeDriver: false
|
|
127
|
+
})]).start();
|
|
128
|
+
this.updateState({
|
|
129
|
+
isExpanded: false,
|
|
130
|
+
lastGestureDy: 0 // Reset to start from original position when collapsed
|
|
131
|
+
});
|
|
132
|
+
});
|
|
83
133
|
_defineProperty(this, "handleBackPress", () => {
|
|
134
|
+
// Close top-most local modal first, if any
|
|
135
|
+
if (this.state.localModalsOpened && this.state.localModalsOpened.length > 0) {
|
|
136
|
+
const top = this.state.localModalsOpened[this.state.localModalsOpened.length - 1];
|
|
137
|
+
this.sheetModalService.hideModal(top);
|
|
138
|
+
return true;
|
|
139
|
+
}
|
|
84
140
|
if (this.state.isBottomsheetVisible) {
|
|
85
|
-
this.
|
|
141
|
+
if (!this.props.disableswipedownclose && this.props.autoclose !== 'disabled') {
|
|
142
|
+
this.closeSheet();
|
|
143
|
+
}
|
|
86
144
|
return true; // Prevent default back action
|
|
87
145
|
}
|
|
88
146
|
return false;
|
|
@@ -124,33 +182,61 @@ export default class WmBottomsheet extends BaseComponent {
|
|
|
124
182
|
});
|
|
125
183
|
});
|
|
126
184
|
_defineProperty(this, "handleSwipeGesture", gestureState => {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
185
|
+
// Only reset lastGestureDy for traditional behavior, not for drag and settle
|
|
186
|
+
if (!this.props.enabledragsettle) {
|
|
187
|
+
this.updateState({
|
|
188
|
+
lastGestureDy: 0
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// New drag and settle behavior
|
|
193
|
+
if (this.props.enabledragsettle && gestureState.dy > 0) {
|
|
194
|
+
// Get current translateY value and settle the sheet at this position
|
|
195
|
+
const currentTranslateY = this.state.translateY._value || 0;
|
|
196
|
+
// If dragged too far down, close the sheet
|
|
197
|
+
if (gestureState.vy > 0.5 && !this.props.disableswipedownclose) {
|
|
198
|
+
this.closeSheet();
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
// Settle at the current position without changing the sheet height
|
|
202
|
+
// The sheet height should remain constant to maintain proper positioning
|
|
203
|
+
this.state.translateY.setValue(currentTranslateY);
|
|
204
|
+
// This ensures subsequent drags start from the current position
|
|
205
|
+
this.updateState({
|
|
206
|
+
isExpanded: false,
|
|
207
|
+
lastGestureDy: currentTranslateY
|
|
208
|
+
});
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
130
211
|
if (gestureState.dy > 0) {
|
|
131
|
-
if (this.state.isExpanded) {
|
|
212
|
+
if (this.state.isExpanded || this.props.disableswipedownclose) {
|
|
132
213
|
// Expand the bottom sheet threshold is 25% of the fully expanded height
|
|
133
214
|
// If the user swipe distance is below the threshold, revert to the original sheet height
|
|
134
|
-
if (gestureState.dy < this.expandedHeight / 4) {
|
|
215
|
+
if (gestureState.dy < this.expandedHeight / 4 || this.props.disableswipedownclose) {
|
|
216
|
+
let sheetMinimumHeight = this.props.bottomsheetminimumheight || 0.1;
|
|
135
217
|
Animated.parallel([Animated.timing(this.state.translateY, {
|
|
136
218
|
toValue: 0,
|
|
137
219
|
// Keep sheet open
|
|
138
220
|
duration: this.animationDuration,
|
|
139
221
|
useNativeDriver: false
|
|
140
222
|
}), Animated.timing(this.state.sheetHeight, {
|
|
141
|
-
|
|
142
|
-
|
|
223
|
+
//use bottom sheet minimum height if disableswipedownclose is set to true or use calcluated height
|
|
224
|
+
toValue: this.props.disableswipedownclose ? sheetMinimumHeight * SCREEN_HEIGHT : this.calculatedHeight,
|
|
143
225
|
duration: this.animationDuration,
|
|
144
226
|
useNativeDriver: false
|
|
145
227
|
})]).start();
|
|
146
228
|
this.updateState({
|
|
147
229
|
isExpanded: false
|
|
148
230
|
});
|
|
149
|
-
} else if (gestureState.dy > this.expandedHeight / 4 || gestureState.vy > 0.5) {
|
|
231
|
+
} else if ((gestureState.dy > this.expandedHeight / 4 || gestureState.vy > 0.5) && !this.props.disableswipedownclose) {
|
|
150
232
|
this.closeSheet();
|
|
151
233
|
}
|
|
152
234
|
} else {
|
|
153
|
-
if (
|
|
235
|
+
if (this.props.disableswipedownclose) {
|
|
236
|
+
this.openSheet();
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
if ((gestureState.dy > 100 || gestureState.vy > 0.5) && !this.props.disableswipedownclose) {
|
|
154
240
|
this.closeSheet();
|
|
155
241
|
} else {
|
|
156
242
|
this.openSheet();
|
|
@@ -193,15 +279,7 @@ export default class WmBottomsheet extends BaseComponent {
|
|
|
193
279
|
} else if (gestureState.dy < 0 && this.props.expand && this.props.bottomsheetheightratio !== 1) {
|
|
194
280
|
// Handle upward drag - expand to full height
|
|
195
281
|
// Allow expansion to full screen height
|
|
196
|
-
|
|
197
|
-
Animated.timing(this.state.sheetHeight, {
|
|
198
|
-
toValue: targetHeight,
|
|
199
|
-
duration: this.animationDuration,
|
|
200
|
-
useNativeDriver: false
|
|
201
|
-
}).start();
|
|
202
|
-
this.updateState({
|
|
203
|
-
isExpanded: true
|
|
204
|
-
});
|
|
282
|
+
this.expandBottomSheet();
|
|
205
283
|
}
|
|
206
284
|
},
|
|
207
285
|
onPanResponderRelease: (_, gestureState) => {
|
|
@@ -251,7 +329,8 @@ export default class WmBottomsheet extends BaseComponent {
|
|
|
251
329
|
requestAnimationFrame(() => {
|
|
252
330
|
this.state.sheetHeight.setValue(this.calculatedHeight);
|
|
253
331
|
this.updateState({
|
|
254
|
-
isExpanded: false
|
|
332
|
+
isExpanded: false,
|
|
333
|
+
localModalsOpened: []
|
|
255
334
|
});
|
|
256
335
|
this.handleClose();
|
|
257
336
|
});
|
|
@@ -263,7 +342,8 @@ export default class WmBottomsheet extends BaseComponent {
|
|
|
263
342
|
this.updateState({
|
|
264
343
|
lastGestureDy: 0,
|
|
265
344
|
isExpanded: false,
|
|
266
|
-
isBottomsheetVisible: false
|
|
345
|
+
isBottomsheetVisible: false,
|
|
346
|
+
localModalsOpened: []
|
|
267
347
|
});
|
|
268
348
|
requestAnimationFrame(() => {
|
|
269
349
|
this.state.sheetHeight.setValue(this.calculatedHeight);
|
|
@@ -280,7 +360,7 @@ export default class WmBottomsheet extends BaseComponent {
|
|
|
280
360
|
return /*#__PURE__*/React.createElement(View, _extends({
|
|
281
361
|
style: this.styles.root
|
|
282
362
|
}, this.getTestProps('keyboardview')), this._background, /*#__PURE__*/React.createElement(TouchableWithoutFeedback, {
|
|
283
|
-
onPress: this.closeSheet
|
|
363
|
+
onPress: () => props.autoclose !== 'disabled' ? this.closeSheet() : null
|
|
284
364
|
}, /*#__PURE__*/React.createElement(Animated.View, _extends({
|
|
285
365
|
style: [this.styles.backdrop, {
|
|
286
366
|
opacity: this.state.backdropOpacity
|
|
@@ -294,14 +374,16 @@ export default class WmBottomsheet extends BaseComponent {
|
|
|
294
374
|
}]
|
|
295
375
|
}, this.panResponder.panHandlers), /*#__PURE__*/React.createElement(View, _extends({
|
|
296
376
|
style: this.styles.dragHandleContainer
|
|
297
|
-
}, this.dragHandlePanResponder.panHandlers), /*#__PURE__*/React.createElement(
|
|
298
|
-
onPress: this.
|
|
377
|
+
}, this.dragHandlePanResponder.panHandlers), /*#__PURE__*/React.createElement(Pressable, {
|
|
378
|
+
onPress: () => this.invokeEventCallback('onDraghandleiconclick', [null, this])
|
|
299
379
|
}, /*#__PURE__*/React.createElement(View, _extends({
|
|
300
380
|
style: this.styles.dragIconHandle
|
|
301
381
|
}, this.getTestProps('draghandle'))))), /*#__PURE__*/React.createElement(ScrollView, _extends({
|
|
302
382
|
ref: this.state.scrollViewRef,
|
|
303
383
|
style: this.styles.sheetContentContainer,
|
|
304
|
-
contentContainerStyle: this.styles.sheetScrollContent,
|
|
384
|
+
contentContainerStyle: [this.styles.sheetScrollContent, props.enabledragsettle && this.state.lastGestureDy > 0 && {
|
|
385
|
+
paddingBottom: this.state.lastGestureDy
|
|
386
|
+
}],
|
|
305
387
|
alwaysBounceVertical: false,
|
|
306
388
|
alwaysBounceHorizontal: false,
|
|
307
389
|
bounces: false,
|
|
@@ -310,7 +392,21 @@ export default class WmBottomsheet extends BaseComponent {
|
|
|
310
392
|
onScroll: this.handleScroll,
|
|
311
393
|
nestedScrollEnabled: true,
|
|
312
394
|
scrollEnabled: true
|
|
313
|
-
}, this.getTestProps('scorllview')), props.
|
|
395
|
+
}, this.getTestProps('scorllview')), props.enablemodalsupport ? /*#__PURE__*/React.createElement(ModalProvider, {
|
|
396
|
+
value: this.sheetModalService
|
|
397
|
+
}, props.children) : props.children)), props.enablemodalsupport && this.state.localModalsOpened && this.state.localModalsOpened.map((o, i) => /*#__PURE__*/React.createElement(View, {
|
|
398
|
+
key: (o.name || '') + i,
|
|
399
|
+
onStartShouldSetResponder: () => true,
|
|
400
|
+
onResponderEnd: () => o.isModal && this.sheetModalService.hideModal(o),
|
|
401
|
+
style: [this.styles.modalOverlay, o.centered ? this.styles.centeredOverlay : null, {
|
|
402
|
+
zIndex: o.elevationIndex || 9999,
|
|
403
|
+
elevation: o.elevationIndex || 9999
|
|
404
|
+
}, o.modalStyle || {}]
|
|
405
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
406
|
+
style: [o.contentStyle || {}],
|
|
407
|
+
onStartShouldSetResponder: () => true,
|
|
408
|
+
onResponderEnd: e => e.stopPropagation()
|
|
409
|
+
}, o.content))));
|
|
314
410
|
});
|
|
315
411
|
});
|
|
316
412
|
this.calculatedHeight = this.calculateSheetHeight(_props.bottomsheetheightratio);
|
|
@@ -338,6 +434,36 @@ export default class WmBottomsheet extends BaseComponent {
|
|
|
338
434
|
} else {
|
|
339
435
|
this.closeSheetImmediate();
|
|
340
436
|
}
|
|
437
|
+
|
|
438
|
+
// Local ModalService for content rendered inside Bottomsheet
|
|
439
|
+
this.sheetModalService = {
|
|
440
|
+
refresh: () => this.forceUpdate(),
|
|
441
|
+
showModal: options => {
|
|
442
|
+
const exists = this.state.localModalsOpened.find(o => o === options);
|
|
443
|
+
if (!exists) {
|
|
444
|
+
// ensure high z-index within sheet
|
|
445
|
+
options.elevationIndex = 9999 + this.state.localModalsOpened.length + 1;
|
|
446
|
+
const list = [...this.state.localModalsOpened, options];
|
|
447
|
+
this.updateState({
|
|
448
|
+
localModalsOpened: list
|
|
449
|
+
}, () => {
|
|
450
|
+
setTimeout(() => options.onOpen && options.onOpen(), 0);
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
hideModal: options => {
|
|
455
|
+
const list = [...this.state.localModalsOpened];
|
|
456
|
+
const idx = options ? list.findIndex(o => o === options) : list.length - 1;
|
|
457
|
+
if (idx >= 0) {
|
|
458
|
+
const o = list[idx];
|
|
459
|
+
o && o.onClose && o.onClose();
|
|
460
|
+
list.splice(idx, 1);
|
|
461
|
+
this.updateState({
|
|
462
|
+
localModalsOpened: list
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
};
|
|
341
467
|
}
|
|
342
468
|
componentDidMount() {
|
|
343
469
|
super.componentDidMount();
|
|
@@ -392,7 +518,11 @@ export default class WmBottomsheet extends BaseComponent {
|
|
|
392
518
|
visible: this.state.isBottomsheetVisible,
|
|
393
519
|
transparent: true,
|
|
394
520
|
animationType: "none",
|
|
395
|
-
onRequestClose:
|
|
521
|
+
onRequestClose: () => {
|
|
522
|
+
if (!this.props.disableswipedownclose && this.props.autoclose !== 'disabled') {
|
|
523
|
+
this.closeSheet();
|
|
524
|
+
}
|
|
525
|
+
},
|
|
396
526
|
statusBarTranslucent: true
|
|
397
527
|
}, /*#__PURE__*/React.createElement(KeyboardAvoidingView, {
|
|
398
528
|
style: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","createRef","BaseComponent","BaseComponentState","View","Animated","PanResponder","Dimensions","TouchableWithoutFeedback","Platform","StatusBar","BackHandler","KeyboardAvoidingView","Keyboard","Modal","ScrollView","WmBottomsheetProps","DEFAULT_CLASS","createSkeleton","AccessibilityWidgetType","getAccessibilityProps","SafeAreaInsetsContext","height","SCREEN_HEIGHT","get","WmBottomsheetState","constructor","args","_defineProperty","Value","WmBottomsheet","calculateSheetHeight","bottomsheetheightratio","effectiveRatio","defaultHeight","maxHeightRatio","Math","max","minimumHeight","min","maxHeight","screenHeight","windowHeight","calculatedHeight","OS","defaultTopInset","statusBarHeight","open","state","isBottomsheetVisible","updateState","openSheet","close","closeSheet","props","currentHeight","event","_event$endCoordinates","keyboardHeight","endCoordinates","isIosKeyboardHeightSet","_event$endCoordinates2","iosKeyboardHeight","availableHeight","bufferSpace","topInset","adjustedHeight","timing","sheetHeight","toValue","duration","useNativeDriver","start","isExpanded","expandedHeight","gestureState","lastGestureDy","dy","parallel","translateY","animationDuration","vy","create","onStartShouldSetPanResponder","_","scrollOffset","onMoveShouldSetPanResponder","onPanResponderMove","newTranslateY","setValue","onPanResponderRelease","handleSwipeGesture","onPanResponderTerminate","expand","targetHeight","offsetY","nativeEvent","contentOffset","y","isScrolling","backdropOpacity","invokeEventCallback","requestAnimationFrame","handleClose","createElement","Consumer","insets","top","bottom","left","right","_extends","style","styles","root","getTestProps","_background","onPress","backdrop","opacity","BOTTOMSHEET","container","transform","panResponder","panHandlers","dragHandleContainer","dragHandlePanResponder","dragIconHandle","ref","scrollViewRef","sheetContentContainer","contentContainerStyle","sheetScrollContent","alwaysBounceVertical","alwaysBounceHorizontal","bounces","showsVerticalScrollIndicator","scrollEventThrottle","onScroll","handleScroll","nestedScrollEnabled","scrollEnabled","children","expandedRatio","bottomsheetexpandedheightratio","expandedDefaultHeight","effectiveExpandedRatio","minimumExpandedHeight","showonrender","closeSheetImmediate","componentDidMount","addEventListener","handleBackPress","keyboardDidShowListener","addListener","onKeyboardShow","keyboardDidHideListener","onKeyboardHide","componentWillUnmount","removeEventListener","remove","componentDidUpdate","prevProps","onPropertyChange","name","$new","$old","renderSkeleton","theme","skeleton","width","renderWidget","modal","visible","transparent","animationType","onRequestClose","statusBarTranslucent","flex","behavior","undefined","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, Animated, PanResponder, Dimensions, TouchableWithoutFeedback, Platform, PanResponderGestureState, StatusBar, BackHandler, DimensionValue, KeyboardAvoidingView, Keyboard, EmitterSubscription, Modal } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\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 { SafeAreaInsetsContext } from 'react-native-safe-area-context';\n\nconst { height: SCREEN_HEIGHT } = Dimensions.get('screen');\nexport class WmBottomsheetState extends BaseComponentState<WmBottomsheetProps> {\n translateY = new Animated.Value(SCREEN_HEIGHT);\n backdropOpacity = new Animated.Value(0);\n sheetHeight = new Animated.Value(0);\n lastGestureDy = 0;\n scrollViewRef = createRef<ScrollView>();\n isScrolling = false;\n scrollOffset = 0;\n isExpanded = false;\n isBottomsheetVisible = false;\n keyboardHeight = 0;\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.2;\n private minimumExpandedHeight: number = 0.5;\n private maxHeight: number = 1.0; // Allow full screen height\n private animationDuration: number = 400\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 topInset: number = 0;\n private iosKeyboardHeight: number = 0;\n private isIosKeyboardHeightSet: boolean = false\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 const windowHeight = Dimensions.get('window').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 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 this.state.sheetHeight.setValue(this.calculatedHeight);\n\n this.updateState({\n isBottomsheetVisible: this.props.showonrender || false\n } as WmBottomsheetState);\n\n if (this.state.isBottomsheetVisible) {\n this.openSheet();\n } else {\n this.closeSheetImmediate();\n }\n }\n\n componentDidMount() {\n super.componentDidMount();\n if (Platform.OS === 'android') {\n 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 (Platform.OS === 'android') {\n BackHandler.removeEventListener('hardwareBackPress', this.handleBackPress);\n }\n this.keyboardDidShowListener.remove();\n this.keyboardDidHideListener.remove();\n }\n\n private handleBackPress = () => {\n if (this.state.isBottomsheetVisible) {\n this.closeSheet();\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 // Animate the sheet height adjustment\n Animated.timing(this.state.sheetHeight, {\n toValue: adjustedHeight,\n duration: 100,\n useNativeDriver: false,\n }).start();\n this.updateState({\n keyboardHeight: keyboardHeight,\n } as WmBottomsheetState);\n };\n\n private onKeyboardHide = () => {\n // Restore the original sheet height when keyboard hides\n Animated.timing(this.state.sheetHeight, {\n toValue: this.state.isExpanded ? this.expandedHeight : this.calculatedHeight,\n duration: 100,\n useNativeDriver: false,\n }).start();\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 this.state.sheetHeight.setValue(this.calculatedHeight);\n }\n }\n\n handleSwipeGesture = (gestureState: PanResponderGestureState) => {\n this.updateState({\n lastGestureDy: 0\n } as WmBottomsheetState);\n if (gestureState.dy > 0) {\n if (this.state.isExpanded) {\n // Expand the bottom sheet threshold is 25% of the fully expanded height\n // If the user swipe distance is below the threshold, revert to the original sheet height\n if (gestureState.dy < this.expandedHeight / 4) {\n Animated.parallel([\n Animated.timing(this.state.translateY, {\n toValue: 0, // Keep sheet open\n duration: this.animationDuration,\n useNativeDriver: false,\n }),\n Animated.timing(this.state.sheetHeight, {\n toValue: this.calculatedHeight, // Back to original height\n duration: this.animationDuration,\n useNativeDriver: false,\n })\n ]).start();\n this.updateState({\n isExpanded: false\n } as WmBottomsheetState);\n }\n else if (gestureState.dy > this.expandedHeight / 4 || gestureState.vy > 0.5) {\n this.closeSheet();\n }\n }\n else {\n if (gestureState.dy > 100 || gestureState.vy > 0.5) {\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 // 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 onMoveShouldSetPanResponder: (_, gestureState) => {\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 onPanResponderMove: (_, gestureState) => {\n if (gestureState.dy > 0) {\n const newTranslateY = Math.max(0, this.state.lastGestureDy + gestureState.dy);\n this.state.translateY.setValue(newTranslateY);\n\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 onPanResponderMove: (_, gestureState) => {\n\n if (gestureState.dy > 0) { // Handle downward drag\n const newTranslateY = Math.max(0, this.state.lastGestureDy + gestureState.dy);\n this.state.translateY.setValue(newTranslateY);\n } else if (gestureState.dy < 0 && this.props.expand && this.props.bottomsheetheightratio !== 1) {\n // Handle upward drag - expand to full height\n // Allow expansion to full screen height\n const targetHeight = Math.min(this.expandedHeight, SCREEN_HEIGHT);\n Animated.timing(this.state.sheetHeight, {\n toValue: targetHeight,\n duration: this.animationDuration,\n useNativeDriver: false,\n }).start();\n this.updateState({\n isExpanded: true\n } as WmBottomsheetState);\n }\n },\n onPanResponderRelease: (_, gestureState) => {\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 this.updateState({\n lastGestureDy: 0,\n } as WmBottomsheetState);\n\n Animated.parallel([\n Animated.timing(this.state.translateY, {\n toValue: 0,\n duration: this.animationDuration,\n useNativeDriver: false,\n }),\n Animated.timing(this.state.backdropOpacity, {\n toValue: 1,\n duration: this.animationDuration,\n useNativeDriver: false,\n }),\n ]).start(() => {\n this.invokeEventCallback('onOpened', [null, this]);\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 Animated.parallel([\n Animated.timing(this.state.translateY, {\n toValue: SCREEN_HEIGHT,\n duration: this.animationDuration,\n useNativeDriver: false,\n }),\n Animated.timing(this.state.backdropOpacity, {\n toValue: 0,\n duration: this.animationDuration,\n useNativeDriver: false,\n }),\n ]).start(() => {\n requestAnimationFrame(() => {\n this.state.sheetHeight.setValue(this.calculatedHeight);\n this.updateState({\n isExpanded: false\n } as WmBottomsheetState);\n this.handleClose();\n });\n });\n };\n\n closeSheetImmediate = () => {\n this.state.translateY.setValue(SCREEN_HEIGHT);\n this.state.backdropOpacity.setValue(0);\n this.updateState({\n lastGestureDy: 0,\n isExpanded: false,\n isBottomsheetVisible: false\n } as WmBottomsheetState);\n requestAnimationFrame(() => {\n this.state.sheetHeight.setValue(this.calculatedHeight);\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 private renderContent = (props: WmBottomsheetProps) => {\n\n return (\n <SafeAreaInsetsContext.Consumer >\n {(insets = { top: 0, bottom: 0, left: 0, right: 0 }) => {\n this.topInset = insets?.top || 0;\n return (\n <View style={this.styles.root}\n {...this.getTestProps('keyboardview')}>\n\n {this._background}\n <TouchableWithoutFeedback onPress={this.closeSheet}>\n <Animated.View style={[this.styles.backdrop, { opacity: this.state.backdropOpacity }]}\n {...this.getTestProps('backdrop')}\n {...getAccessibilityProps(AccessibilityWidgetType.BOTTOMSHEET, props)}\n />\n </TouchableWithoutFeedback>\n\n <Animated.View\n style={[\n this.styles.container,\n\n {\n height: this.state.sheetHeight,\n transform: [{ translateY: this.state.translateY }],\n },\n ]}\n {...this.panResponder.panHandlers}\n\n\n >\n <View style={this.styles.dragHandleContainer} {...this.dragHandlePanResponder.panHandlers}>\n <TouchableWithoutFeedback onPress={this.closeSheet}>\n <View style={this.styles.dragIconHandle}\n {...this.getTestProps('draghandle')} />\n </TouchableWithoutFeedback>\n </View>\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={true}\n {...this.getTestProps('scorllview')}\n >\n {props.children}\n </ScrollView>\n\n </Animated.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 if (props.modal) {\n return (\n <Modal\n visible={this.state.isBottomsheetVisible}\n transparent={true}\n animationType=\"none\"\n onRequestClose={this.closeSheet}\n statusBarTranslucent={true}\n >\n <KeyboardAvoidingView\n style={{ flex: 1 }}\n behavior={Platform.OS === 'ios' ? 'padding' : undefined}\n keyboardVerticalOffset={Platform.OS === 'ios' ? 0 : undefined}\n >\n {this.renderContent(props)}\n </KeyboardAvoidingView>\n </Modal>\n );\n } else {\n return this.renderContent(props);\n }\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAASC,IAAI,EAAEC,QAAQ,EAAEC,YAAY,EAAEC,UAAU,EAAEC,wBAAwB,EAAEC,QAAQ,EAA4BC,SAAS,EAAEC,WAAW,EAAkBC,oBAAoB,EAAEC,QAAQ,EAAuBC,KAAK,QAAQ,cAAc;AACzO,SAASC,UAAU,QAAQ,8BAA8B;AACzD,OAAOC,kBAAkB,MAAM,qBAAqB;AACpD,SAASC,aAAa,QAA6B,sBAAsB;A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;IACtC,IAAI,CAAC,IAAI,CAACN,KAAK,CAACC,oBAAoB,EAAE,OAAO,IAAI;IAEjD,IAAIK,KAAK,CAACsH,KAAK,EAAE;MACf,oBACE5K,KAAA,CAAAwG,aAAA,CAAC1F,KAAK;QACJ+J,OAAO,EAAE,IAAI,CAAC7H,KAAK,CAACC,oBAAqB;QACzC6H,WAAW,EAAE,IAAK;QAClBC,aAAa,EAAC,MAAM;QACpBC,cAAc,EAAE,IAAI,CAAC3H,UAAW;QAChC4H,oBAAoB,EAAE;MAAK,gBAE3BjL,KAAA,CAAAwG,aAAA,CAAC5F,oBAAoB;QACnBoG,KAAK,EAAE;UAAEkE,IAAI,EAAE;QAAE,CAAE;QACnBC,QAAQ,EAAE1K,QAAQ,CAACmC,EAAE,KAAK,KAAK,GAAG,SAAS,GAAGwI,SAAU;QACxDC,sBAAsB,EAAE5K,QAAQ,CAACmC,EAAE,KAAK,KAAK,GAAG,CAAC,GAAGwI;MAAU,GAE7D,IAAI,CAACE,aAAa,CAAChI,KAAK,CACL,CACjB,CAAC;IAEZ,CAAC,MAAM;MACL,OAAO,IAAI,CAACgI,aAAa,CAAChI,KAAK,CAAC;IAClC;EACF;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","createRef","BaseComponent","BaseComponentState","View","Animated","PanResponder","Dimensions","TouchableWithoutFeedback","Platform","StatusBar","BackHandler","KeyboardAvoidingView","Keyboard","Modal","Pressable","ScrollView","WmBottomsheetProps","DEFAULT_CLASS","createSkeleton","AccessibilityWidgetType","getAccessibilityProps","ModalProvider","SafeAreaInsetsContext","height","SCREEN_HEIGHT","get","WmBottomsheetState","constructor","args","_defineProperty","Value","WmBottomsheet","calculateSheetHeight","bottomsheetheightratio","effectiveRatio","defaultHeight","maxHeightRatio","Math","max","minimumHeight","min","maxHeight","screenHeight","windowHeight","calculatedHeight","OS","defaultTopInset","statusBarHeight","open","state","isBottomsheetVisible","updateState","openSheet","close","closeSheet","props","currentHeight","isExpanded","targetHeight","expandedHeight","enabledragsettle","parallel","timing","sheetHeight","toValue","duration","animationDuration","useNativeDriver","translateY","start","lastGestureDy","localModalsOpened","length","top","sheetModalService","hideModal","disableswipedownclose","autoclose","event","_event$endCoordinates","keyboardHeight","endCoordinates","isIosKeyboardHeightSet","_event$endCoordinates2","iosKeyboardHeight","availableHeight","bufferSpace","topInset","adjustedHeight","gestureState","dy","currentTranslateY","_value","vy","setValue","sheetMinimumHeight","bottomsheetminimumheight","create","onStartShouldSetPanResponder","_","scrollOffset","onMoveShouldSetPanResponder","onPanResponderMove","newTranslateY","onPanResponderRelease","handleSwipeGesture","onPanResponderTerminate","expand","expandBottomSheet","offsetY","nativeEvent","contentOffset","y","isScrolling","backdropOpacity","invokeEventCallback","requestAnimationFrame","handleClose","createElement","Consumer","insets","bottom","left","right","_extends","style","styles","root","getTestProps","_background","onPress","backdrop","opacity","BOTTOMSHEET","container","transform","panResponder","panHandlers","dragHandleContainer","dragHandlePanResponder","dragIconHandle","ref","scrollViewRef","sheetContentContainer","contentContainerStyle","sheetScrollContent","paddingBottom","alwaysBounceVertical","alwaysBounceHorizontal","bounces","showsVerticalScrollIndicator","scrollEventThrottle","onScroll","handleScroll","nestedScrollEnabled","scrollEnabled","enablemodalsupport","value","children","map","o","i","key","name","onStartShouldSetResponder","onResponderEnd","isModal","modalOverlay","centered","centeredOverlay","zIndex","elevationIndex","elevation","modalStyle","contentStyle","e","stopPropagation","content","expandedRatio","bottomsheetexpandedheightratio","expandedDefaultHeight","effectiveExpandedRatio","minimumExpandedHeight","showonrender","closeSheetImmediate","refresh","forceUpdate","showModal","options","exists","find","list","setTimeout","onOpen","idx","findIndex","onClose","splice","componentDidMount","addEventListener","handleBackPress","keyboardDidShowListener","addListener","onKeyboardShow","keyboardDidHideListener","onKeyboardHide","componentWillUnmount","removeEventListener","remove","componentDidUpdate","prevProps","onPropertyChange","$new","$old","renderSkeleton","theme","skeleton","width","renderWidget","modal","visible","transparent","animationType","onRequestClose","statusBarTranslucent","flex","behavior","undefined","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, Animated, PanResponder, Dimensions, TouchableWithoutFeedback, Platform, PanResponderGestureState, StatusBar, BackHandler, DimensionValue, KeyboardAvoidingView, Keyboard, EmitterSubscription, Modal, Pressable } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\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 } from 'react-native-safe-area-context';\n\nconst { height: SCREEN_HEIGHT } = Dimensions.get('screen');\nexport class WmBottomsheetState extends BaseComponentState<WmBottomsheetProps> {\n translateY = new Animated.Value(SCREEN_HEIGHT);\n backdropOpacity = new Animated.Value(0);\n sheetHeight = new Animated.Value(0);\n lastGestureDy = 0;\n scrollViewRef = createRef<ScrollView>();\n isScrolling = false;\n scrollOffset = 0;\n isExpanded = false;\n isBottomsheetVisible = false;\n keyboardHeight = 0;\n localModalsOpened: ModalOptions[] = [];\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; // Allow full screen height\n private animationDuration: number = 400\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 topInset: number = 0;\n private iosKeyboardHeight: number = 0;\n private isIosKeyboardHeightSet: boolean = false\n private sheetModalService: ModalService;\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 const windowHeight = Dimensions.get('window').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\n // For drag and settle behavior, we need to reset translateY to 0 when expanding\n if (this.props.enabledragsettle) {\n Animated.parallel([\n Animated.timing(this.state.sheetHeight, {\n toValue: targetHeight,\n duration: this.animationDuration,\n useNativeDriver: false,\n }),\n Animated.timing(this.state.translateY, {\n toValue: 0,\n duration: this.animationDuration,\n useNativeDriver: false,\n })\n ]).start();\n } else {\n // Original behavior for non drag-and-settle mode\n Animated.timing(this.state.sheetHeight, {\n toValue: targetHeight,\n duration: this.animationDuration,\n useNativeDriver: false,\n }).start();\n }\n this.updateState({\n isExpanded: true,\n lastGestureDy: 0 // Reset to start from top when expanded\n } as WmBottomsheetState);\n }\n collapseBottomSheet = () => {\n Animated.parallel([\n Animated.timing(this.state.translateY, {\n toValue: 0, // Keep sheet open\n duration: this.animationDuration,\n useNativeDriver: false,\n }),\n Animated.timing(this.state.sheetHeight, {\n //use bottom sheet minimum height if disableswipedownclose is set to true or use calcluated height\n toValue: this.calculatedHeight,\n duration: this.animationDuration,\n useNativeDriver: false,\n })\n ]).start();\n this.updateState({\n isExpanded: false,\n lastGestureDy: 0 // Reset to start from original position when collapsed\n } as WmBottomsheetState);\n\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 this.state.sheetHeight.setValue(this.calculatedHeight);\n\n this.updateState({\n isBottomsheetVisible: this.props.showonrender || false\n } as WmBottomsheetState);\n\n if (this.state.isBottomsheetVisible) {\n this.openSheet();\n } else {\n this.closeSheetImmediate();\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 if (Platform.OS === 'android') {\n 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 (Platform.OS === 'android') {\n BackHandler.removeEventListener('hardwareBackPress', this.handleBackPress);\n }\n this.keyboardDidShowListener.remove();\n this.keyboardDidHideListener.remove();\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 // Animate the sheet height adjustment\n Animated.timing(this.state.sheetHeight, {\n toValue: adjustedHeight,\n duration: 100,\n useNativeDriver: false,\n }).start();\n this.updateState({\n keyboardHeight: keyboardHeight,\n } as WmBottomsheetState);\n };\n\n private onKeyboardHide = () => {\n // Restore the original sheet height when keyboard hides\n Animated.timing(this.state.sheetHeight, {\n toValue: this.state.isExpanded ? this.expandedHeight : this.calculatedHeight,\n duration: 100,\n useNativeDriver: false,\n }).start();\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 this.state.sheetHeight.setValue(this.calculatedHeight);\n }\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 }\n\n // New drag and settle behavior\n if (this.props.enabledragsettle && gestureState.dy > 0) {\n // Get current translateY value and settle the sheet at this position\n const currentTranslateY = (this.state.translateY as any)._value || 0;\n // If dragged too far down, close the sheet\n if (gestureState.vy > 0.5 && !this.props.disableswipedownclose) {\n this.closeSheet();\n return;\n }\n // Settle at the current position without changing the sheet height\n // The sheet height should remain constant to maintain proper positioning\n this.state.translateY.setValue(currentTranslateY);\n // This ensures subsequent drags start from the current position\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 // Expand the bottom sheet threshold is 25% of the fully expanded height\n // If the user swipe distance is below the threshold, revert to the original sheet height\n if (gestureState.dy < this.expandedHeight / 4 || this.props.disableswipedownclose) {\n let sheetMinimumHeight = this.props.bottomsheetminimumheight || 0.1\n Animated.parallel([\n Animated.timing(this.state.translateY, {\n toValue: 0, // Keep sheet open\n duration: this.animationDuration,\n useNativeDriver: false,\n }),\n Animated.timing(this.state.sheetHeight, {\n //use bottom sheet minimum height if disableswipedownclose is set to true or use calcluated height\n toValue: this.props.disableswipedownclose ? sheetMinimumHeight * SCREEN_HEIGHT : this.calculatedHeight,\n duration: this.animationDuration,\n useNativeDriver: false,\n })\n ]).start();\n this.updateState({\n isExpanded: false\n } as WmBottomsheetState);\n }\n else if ((gestureState.dy > this.expandedHeight / 4 || gestureState.vy > 0.5) && !this.props.disableswipedownclose) {\n this.closeSheet();\n }\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 // 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 onMoveShouldSetPanResponder: (_, gestureState) => {\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 onPanResponderMove: (_, gestureState) => {\n if (gestureState.dy > 0) {\n const newTranslateY = Math.max(0, this.state.lastGestureDy + gestureState.dy);\n this.state.translateY.setValue(newTranslateY);\n\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 onPanResponderMove: (_, gestureState) => {\n\n if (gestureState.dy > 0) { // Handle downward drag\n const newTranslateY = Math.max(0, this.state.lastGestureDy + gestureState.dy);\n this.state.translateY.setValue(newTranslateY);\n } else if (gestureState.dy < 0 && this.props.expand && this.props.bottomsheetheightratio !== 1) {\n // Handle upward drag - expand to full height\n // Allow expansion to full screen height\n this.expandBottomSheet()\n }\n },\n onPanResponderRelease: (_, gestureState) => {\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 this.updateState({\n lastGestureDy: 0,\n } as WmBottomsheetState);\n\n Animated.parallel([\n Animated.timing(this.state.translateY, {\n toValue: 0,\n duration: this.animationDuration,\n useNativeDriver: false,\n }),\n Animated.timing(this.state.backdropOpacity, {\n toValue: 1,\n duration: this.animationDuration,\n useNativeDriver: false,\n }),\n ]).start(() => {\n this.invokeEventCallback('onOpened', [null, this]);\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 Animated.parallel([\n Animated.timing(this.state.translateY, {\n toValue: SCREEN_HEIGHT,\n duration: this.animationDuration,\n useNativeDriver: false,\n }),\n Animated.timing(this.state.backdropOpacity, {\n toValue: 0,\n duration: this.animationDuration,\n useNativeDriver: false,\n }),\n ]).start(() => {\n requestAnimationFrame(() => {\n this.state.sheetHeight.setValue(this.calculatedHeight);\n this.updateState({\n isExpanded: false,\n localModalsOpened: [] as ModalOptions[]\n } as WmBottomsheetState);\n this.handleClose();\n });\n });\n };\n\n closeSheetImmediate = () => {\n this.state.translateY.setValue(SCREEN_HEIGHT);\n this.state.backdropOpacity.setValue(0);\n this.updateState({\n lastGestureDy: 0,\n isExpanded: false,\n isBottomsheetVisible: false,\n localModalsOpened: [] as ModalOptions[]\n } as WmBottomsheetState);\n requestAnimationFrame(() => {\n this.state.sheetHeight.setValue(this.calculatedHeight);\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 private renderContent = (props: WmBottomsheetProps) => {\n\n return (\n <SafeAreaInsetsContext.Consumer >\n {(insets = { top: 0, bottom: 0, left: 0, right: 0 }) => {\n this.topInset = insets?.top || 0;\n return (\n <View style={this.styles.root}\n {...this.getTestProps('keyboardview')}>\n\n {this._background}\n <TouchableWithoutFeedback onPress={() => props.autoclose !== 'disabled' ? this.closeSheet() : null}>\n <Animated.View style={[this.styles.backdrop, { opacity: this.state.backdropOpacity }]}\n {...this.getTestProps('backdrop')}\n {...getAccessibilityProps(AccessibilityWidgetType.BOTTOMSHEET, props)}\n />\n </TouchableWithoutFeedback>\n\n <Animated.View\n style={[\n this.styles.container,\n\n {\n height: this.state.sheetHeight,\n transform: [{ translateY: this.state.translateY }],\n },\n ]}\n {...this.panResponder.panHandlers}\n\n\n >\n <View style={this.styles.dragHandleContainer} {...this.dragHandlePanResponder.panHandlers}>\n <Pressable onPress={() => this.invokeEventCallback('onDraghandleiconclick', [null, this])}>\n <View style={this.styles.dragIconHandle}\n {...this.getTestProps('draghandle')} />\n </Pressable>\n </View>\n <ScrollView\n ref={this.state.scrollViewRef}\n style={this.styles.sheetContentContainer}\n contentContainerStyle={[this.styles.sheetScrollContent, props.enabledragsettle && this.state.lastGestureDy > 0 && {\n paddingBottom: this.state.lastGestureDy\n }]}\n alwaysBounceVertical={false}\n alwaysBounceHorizontal={false}\n bounces={false}\n showsVerticalScrollIndicator={false}\n scrollEventThrottle={16}\n onScroll={this.handleScroll}\n nestedScrollEnabled={true}\n scrollEnabled={true}\n {...this.getTestProps('scorllview')}\n >\n {/* Provide a local ModalProvider for dropdowns only when enabled */}\n {props.enablemodalsupport ? (\n <ModalProvider value={this.sheetModalService}>\n {props.children}\n </ModalProvider>\n ) : (\n props.children\n )}\n </ScrollView>\n\n </Animated.View>\n\n {/* Render locally opened modals above the sheet content when dropdowns are enabled */}\n {props.enablemodalsupport && this.state.localModalsOpened && this.state.localModalsOpened.map((o, i) => (\n <View 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 <View style={[ (o.contentStyle || {}) ]}\n onStartShouldSetResponder={() => true}\n onResponderEnd={(e) => e.stopPropagation()}>\n {o.content}\n </View>\n </View>\n ))}\n\n </View>\n )\n }}\n </SafeAreaInsetsContext.Consumer>\n );\n };\n\n renderWidget(props: WmBottomsheetProps) {\n if (!this.state.isBottomsheetVisible) return null;\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={true}\n >\n <KeyboardAvoidingView\n style={{ flex: 1 }}\n behavior={Platform.OS === 'ios' ? 'padding' : undefined}\n keyboardVerticalOffset={Platform.OS === 'ios' ? 0 : undefined}\n >\n {this.renderContent(props)}\n </KeyboardAvoidingView>\n </Modal>\n );\n } else {\n return this.renderContent(props);\n }\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C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,CAACC,oBAAqB;QACzC2K,WAAW,EAAE,IAAK;QAClBC,aAAa,EAAC,MAAM;QACpBC,cAAc,EAAEA,CAAA,KAAM;UACpB,IAAI,CAAC,IAAI,CAACxK,KAAK,CAACqB,qBAAqB,IAAI,IAAI,CAACrB,KAAK,CAACsB,SAAS,KAAK,UAAU,EAAE;YAC5E,IAAI,CAACvB,UAAU,CAAC,CAAC;UACnB;QACF,CAAE;QACF0K,oBAAoB,EAAE;MAAK,gBAE3BjO,KAAA,CAAAuH,aAAA,CAAC3G,oBAAoB;QACnBkH,KAAK,EAAE;UAAEoG,IAAI,EAAE;QAAE,CAAE;QACnBC,QAAQ,EAAE1N,QAAQ,CAACqC,EAAE,KAAK,KAAK,GAAG,SAAS,GAAGsL,SAAU;QACxDC,sBAAsB,EAAE5N,QAAQ,CAACqC,EAAE,KAAK,KAAK,GAAG,CAAC,GAAGsL;MAAU,GAE7D,IAAI,CAACE,aAAa,CAAC9K,KAAK,CACL,CACjB,CAAC;IAEZ,CAAC,MAAM;MACL,OAAO,IAAI,CAAC8K,aAAa,CAAC9K,KAAK,CAAC;IAClC;EACF;AACF","ignoreList":[]}
|
|
@@ -14,6 +14,11 @@ export default class WmBottomsheetProps extends BaseProps {
|
|
|
14
14
|
_defineProperty(this, "onOpened", null);
|
|
15
15
|
_defineProperty(this, "onClose", null);
|
|
16
16
|
_defineProperty(this, "modal", true);
|
|
17
|
+
_defineProperty(this, "enablemodalsupport", true);
|
|
18
|
+
_defineProperty(this, "autoclose", 'outsideClick');
|
|
19
|
+
_defineProperty(this, "disableswipedownclose", false);
|
|
20
|
+
_defineProperty(this, "bottomsheetminimumheight", 0.1);
|
|
21
|
+
_defineProperty(this, "enabledragsettle", false);
|
|
17
22
|
}
|
|
18
23
|
}
|
|
19
24
|
//# sourceMappingURL=bottomsheet.props.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseProps","WmBottomsheetProps","constructor","args","_defineProperty"],"sources":["bottomsheet.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmBottomsheetProps extends BaseProps {\n showonrender: boolean = false;\n bottomsheetheightratio:number = 0.3;\n children? = null as any;\n expand?:boolean = false;\n bottomsheetexpandedheightratio?:number = 0.5; \n keyboardverticaloffset: number = 100;\n onOpened?: Function = null as any;\n onClose?: Function = null as any;\n modal?: boolean = true;\n}"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,kBAAkB,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,uBAC9B,KAAK;IAAAA,eAAA,iCACG,GAAG;IAAAA,eAAA,mBACvB,IAAI;IAAAA,eAAA,iBACE,KAAK;IAAAA,eAAA,yCACkB,GAAG;IAAAA,eAAA,iCACX,GAAG;IAAAA,eAAA,mBACd,IAAI;IAAAA,eAAA,kBACL,IAAI;IAAAA,eAAA,gBACP,IAAI;EAAA;
|
|
1
|
+
{"version":3,"names":["BaseProps","WmBottomsheetProps","constructor","args","_defineProperty"],"sources":["bottomsheet.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmBottomsheetProps extends BaseProps {\n showonrender: boolean = false;\n bottomsheetheightratio:number = 0.3;\n children? = null as any;\n expand?:boolean = false;\n bottomsheetexpandedheightratio?:number = 0.5; \n keyboardverticaloffset: number = 100;\n onOpened?: Function = null as any;\n onClose?: Function = null as any;\n modal?: boolean = true;\n enablemodalsupport?: boolean = true;\n autoclose?: 'outsideClick' | 'disabled' = 'outsideClick';\n disableswipedownclose?:boolean = false;\n bottomsheetminimumheight?:number = 0.1;\n enabledragsettle?: boolean = false \n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,kBAAkB,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,uBAC9B,KAAK;IAAAA,eAAA,iCACG,GAAG;IAAAA,eAAA,mBACvB,IAAI;IAAAA,eAAA,iBACE,KAAK;IAAAA,eAAA,yCACkB,GAAG;IAAAA,eAAA,iCACX,GAAG;IAAAA,eAAA,mBACd,IAAI;IAAAA,eAAA,kBACL,IAAI;IAAAA,eAAA,gBACP,IAAI;IAAAA,eAAA,6BACS,IAAI;IAAAA,eAAA,oBACO,cAAc;IAAAA,eAAA,gCACvB,KAAK;IAAAA,eAAA,mCACF,GAAG;IAAAA,eAAA,2BACV,KAAK;EAAA;AACtC","ignoreList":[]}
|
|
@@ -42,9 +42,7 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
42
42
|
borderTopWidth: 0.5,
|
|
43
43
|
borderColor: ThemeVariables.INSTANCE.bottomSheetBgColor,
|
|
44
44
|
width: '100%',
|
|
45
|
-
maxHeight: '100%'
|
|
46
|
-
// Allow full screen height
|
|
47
|
-
minHeight: 100 // Minimum height to prevent too small sheets
|
|
45
|
+
maxHeight: '100%' // Allow full screen height
|
|
48
46
|
},
|
|
49
47
|
dragHandleContainer: {
|
|
50
48
|
paddingVertical: 16,
|
|
@@ -70,6 +68,17 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
70
68
|
paddingBottom: 20,
|
|
71
69
|
flexGrow: 1
|
|
72
70
|
},
|
|
71
|
+
modalOverlay: {
|
|
72
|
+
position: 'absolute',
|
|
73
|
+
top: 0,
|
|
74
|
+
left: 0,
|
|
75
|
+
right: 0,
|
|
76
|
+
bottom: 0
|
|
77
|
+
},
|
|
78
|
+
centeredOverlay: {
|
|
79
|
+
justifyContent: 'center',
|
|
80
|
+
alignItems: 'center'
|
|
81
|
+
},
|
|
73
82
|
skeleton: {
|
|
74
83
|
root: {}
|
|
75
84
|
}
|
|
@@ -1 +1 @@
|
|
|
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","
|
|
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,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