@lodev09/react-native-true-sheet 0.13.0 → 1.0.1
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/android/build.gradle +6 -1
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetDialog.kt +27 -4
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetView.kt +10 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetViewManager.kt +7 -0
- package/android/src/main/java/com/lodev09/truesheet/core/RootSheetView.kt +2 -26
- package/android/src/main/java/com/lodev09/truesheet/core/Utils.kt +11 -2
- package/android/src/main/java/com/lodev09/truesheet/events/ContainerSizeChangeEvent.kt +23 -0
- package/ios/TrueSheet-Bridging-Header.h +1 -0
- package/ios/TrueSheetView.swift +39 -40
- package/ios/TrueSheetViewManager.m +1 -0
- package/ios/TrueSheetViewManager.swift +6 -4
- package/lib/commonjs/TrueSheet.js +56 -36
- package/lib/commonjs/TrueSheet.js.map +1 -1
- package/lib/commonjs/TrueSheetFooter.js +2 -3
- package/lib/commonjs/TrueSheetFooter.js.map +1 -1
- package/lib/commonjs/TrueSheetGrabber.js +11 -11
- package/lib/commonjs/TrueSheetGrabber.js.map +1 -1
- package/lib/commonjs/TrueSheetModule.js.map +1 -1
- package/lib/commonjs/index.js +6 -6
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/TrueSheet.js +58 -34
- package/lib/module/TrueSheet.js.map +1 -1
- package/lib/module/TrueSheet.types.js +2 -0
- package/lib/module/TrueSheetFooter.js +4 -2
- package/lib/module/TrueSheetFooter.js.map +1 -1
- package/lib/module/TrueSheetGrabber.js +13 -10
- package/lib/module/TrueSheetGrabber.js.map +1 -1
- package/lib/module/TrueSheetModule.js +2 -0
- package/lib/module/TrueSheetModule.js.map +1 -1
- package/lib/module/index.js +5 -3
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/{src → commonjs/src}/TrueSheet.d.ts +3 -0
- package/lib/typescript/commonjs/src/TrueSheet.d.ts.map +1 -0
- package/lib/typescript/{src → commonjs/src}/TrueSheet.types.d.ts +7 -0
- package/lib/typescript/commonjs/src/TrueSheet.types.d.ts.map +1 -0
- package/lib/typescript/{src → commonjs/src}/TrueSheetFooter.d.ts +1 -2
- package/lib/typescript/commonjs/src/TrueSheetFooter.d.ts.map +1 -0
- package/lib/typescript/{src → commonjs/src}/TrueSheetGrabber.d.ts +1 -2
- package/lib/typescript/commonjs/src/TrueSheetGrabber.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/TrueSheetModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/TrueSheet.d.ts +62 -0
- package/lib/typescript/module/src/TrueSheet.d.ts.map +1 -0
- package/lib/typescript/module/src/TrueSheet.types.d.ts +212 -0
- package/lib/typescript/module/src/TrueSheet.types.d.ts.map +1 -0
- package/lib/typescript/module/src/TrueSheetFooter.d.ts +7 -0
- package/lib/typescript/module/src/TrueSheetFooter.d.ts.map +1 -0
- package/lib/typescript/module/src/TrueSheetGrabber.d.ts +39 -0
- package/lib/typescript/module/src/TrueSheetGrabber.d.ts.map +1 -0
- package/lib/typescript/module/src/TrueSheetModule.d.ts +2 -0
- package/lib/typescript/module/src/TrueSheetModule.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +4 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/package.json +77 -62
- package/{TrueSheet.podspec → react-native-true-sheet.podspec} +19 -18
- package/src/TrueSheet.tsx +29 -5
- package/src/TrueSheet.types.ts +8 -0
- package/src/TrueSheetFooter.tsx +0 -1
- package/src/TrueSheetGrabber.tsx +0 -1
- package/lib/commonjs/__mocks__/index.js +0 -37
- package/lib/commonjs/__mocks__/index.js.map +0 -1
- package/lib/module/__mocks__/index.js +0 -15
- package/lib/module/__mocks__/index.js.map +0 -1
- package/lib/typescript/src/TrueSheet.d.ts.map +0 -1
- package/lib/typescript/src/TrueSheet.types.d.ts.map +0 -1
- package/lib/typescript/src/TrueSheetFooter.d.ts.map +0 -1
- package/lib/typescript/src/TrueSheetGrabber.d.ts.map +0 -1
- package/lib/typescript/src/TrueSheetModule.d.ts.map +0 -1
- package/lib/typescript/src/index.d.ts.map +0 -1
- package/src/__mocks__/index.js +0 -18
- /package/lib/typescript/{src → commonjs/src}/TrueSheetModule.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/index.d.ts +0 -0
package/android/build.gradle
CHANGED
|
@@ -14,6 +14,11 @@ buildscript {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
def reactNativeArchitectures() {
|
|
18
|
+
def value = rootProject.getProperties().get("reactNativeArchitectures")
|
|
19
|
+
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
|
|
20
|
+
}
|
|
21
|
+
|
|
17
22
|
def isNewArchitectureEnabled() {
|
|
18
23
|
return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
|
|
19
24
|
}
|
|
@@ -90,6 +95,6 @@ dependencies {
|
|
|
90
95
|
//noinspection GradleDynamicVersion
|
|
91
96
|
implementation "com.facebook.react:react-native:+"
|
|
92
97
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
93
|
-
implementation
|
|
98
|
+
implementation 'com.google.android.material:material:1.12.0'
|
|
94
99
|
}
|
|
95
100
|
|
|
@@ -42,6 +42,12 @@ class TrueSheetDialog(private val reactContext: ThemedReactContext, private val
|
|
|
42
42
|
var footerHeight = 0
|
|
43
43
|
var maxSheetHeight: Int? = null
|
|
44
44
|
|
|
45
|
+
var edgeToEdge: Boolean = false
|
|
46
|
+
set(value) {
|
|
47
|
+
field = value
|
|
48
|
+
maxScreenHeight = Utils.screenHeight(reactContext, value)
|
|
49
|
+
}
|
|
50
|
+
|
|
45
51
|
var dismissible: Boolean = true
|
|
46
52
|
set(value) {
|
|
47
53
|
field = value
|
|
@@ -67,7 +73,24 @@ class TrueSheetDialog(private val reactContext: ThemedReactContext, private val
|
|
|
67
73
|
}
|
|
68
74
|
|
|
69
75
|
// Update the usable sheet height
|
|
70
|
-
maxScreenHeight = Utils.screenHeight(reactContext)
|
|
76
|
+
maxScreenHeight = Utils.screenHeight(reactContext, edgeToEdge)
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
override fun getEdgeToEdgeEnabled(): Boolean = edgeToEdge || super.getEdgeToEdgeEnabled()
|
|
80
|
+
|
|
81
|
+
override fun onStart() {
|
|
82
|
+
super.onStart()
|
|
83
|
+
|
|
84
|
+
if (edgeToEdge) {
|
|
85
|
+
window?.apply {
|
|
86
|
+
setFlags(
|
|
87
|
+
WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
|
|
88
|
+
WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
|
92
|
+
}
|
|
93
|
+
}
|
|
71
94
|
}
|
|
72
95
|
|
|
73
96
|
/**
|
|
@@ -226,7 +249,7 @@ class TrueSheetDialog(private val reactContext: ThemedReactContext, private val
|
|
|
226
249
|
override fun onKeyboardStateChange(isVisible: Boolean, visibleHeight: Int?) {
|
|
227
250
|
maxScreenHeight = when (isVisible) {
|
|
228
251
|
true -> visibleHeight ?: 0
|
|
229
|
-
else -> Utils.screenHeight(reactContext)
|
|
252
|
+
else -> Utils.screenHeight(reactContext, edgeToEdge)
|
|
230
253
|
}
|
|
231
254
|
|
|
232
255
|
positionFooter()
|
|
@@ -234,8 +257,8 @@ class TrueSheetDialog(private val reactContext: ThemedReactContext, private val
|
|
|
234
257
|
})
|
|
235
258
|
}
|
|
236
259
|
|
|
237
|
-
fun setOnSizeChangeListener(listener:
|
|
238
|
-
rootSheetView.
|
|
260
|
+
fun setOnSizeChangeListener(listener: (w: Int, h: Int) -> Unit) {
|
|
261
|
+
rootSheetView.sizeChangeListener = listener
|
|
239
262
|
}
|
|
240
263
|
|
|
241
264
|
/**
|
|
@@ -12,6 +12,8 @@ import com.facebook.react.uimanager.UIManagerHelper
|
|
|
12
12
|
import com.facebook.react.uimanager.events.EventDispatcher
|
|
13
13
|
import com.google.android.material.bottomsheet.BottomSheetBehavior
|
|
14
14
|
import com.lodev09.truesheet.core.RootSheetView
|
|
15
|
+
import com.lodev09.truesheet.core.Utils
|
|
16
|
+
import com.lodev09.truesheet.events.ContainerSizeChangeEvent
|
|
15
17
|
import com.lodev09.truesheet.events.DismissEvent
|
|
16
18
|
import com.lodev09.truesheet.events.MountEvent
|
|
17
19
|
import com.lodev09.truesheet.events.PresentEvent
|
|
@@ -67,6 +69,10 @@ class TrueSheetView(context: Context) :
|
|
|
67
69
|
|
|
68
70
|
// Configure Sheet Dialog
|
|
69
71
|
sheetDialog.apply {
|
|
72
|
+
setOnSizeChangeListener { w, h ->
|
|
73
|
+
eventDispatcher?.dispatchEvent(ContainerSizeChangeEvent(surfaceId, id, Utils.toDIP(w), Utils.toDIP(h)))
|
|
74
|
+
}
|
|
75
|
+
|
|
70
76
|
// Setup listener when the dialog has been presented.
|
|
71
77
|
setOnShowListener {
|
|
72
78
|
registerKeyboardManager()
|
|
@@ -240,6 +246,10 @@ class TrueSheetView(context: Context) :
|
|
|
240
246
|
}
|
|
241
247
|
}
|
|
242
248
|
|
|
249
|
+
fun setEdgeToEdge(edgeToEdge: Boolean) {
|
|
250
|
+
sheetDialog.edgeToEdge = edgeToEdge
|
|
251
|
+
}
|
|
252
|
+
|
|
243
253
|
fun setMaxHeight(height: Int) {
|
|
244
254
|
if (sheetDialog.maxSheetHeight == height) return
|
|
245
255
|
|
|
@@ -9,6 +9,7 @@ import com.facebook.react.uimanager.ThemedReactContext
|
|
|
9
9
|
import com.facebook.react.uimanager.ViewGroupManager
|
|
10
10
|
import com.facebook.react.uimanager.annotations.ReactProp
|
|
11
11
|
import com.lodev09.truesheet.core.Utils
|
|
12
|
+
import com.lodev09.truesheet.events.ContainerSizeChangeEvent
|
|
12
13
|
import com.lodev09.truesheet.events.DismissEvent
|
|
13
14
|
import com.lodev09.truesheet.events.MountEvent
|
|
14
15
|
import com.lodev09.truesheet.events.PresentEvent
|
|
@@ -30,8 +31,14 @@ class TrueSheetViewManager : ViewGroupManager<TrueSheetView>() {
|
|
|
30
31
|
.put(PresentEvent.EVENT_NAME, MapBuilder.of("registrationName", "onPresent"))
|
|
31
32
|
.put(DismissEvent.EVENT_NAME, MapBuilder.of("registrationName", "onDismiss"))
|
|
32
33
|
.put(SizeChangeEvent.EVENT_NAME, MapBuilder.of("registrationName", "onSizeChange"))
|
|
34
|
+
.put(ContainerSizeChangeEvent.EVENT_NAME, MapBuilder.of("registrationName", "onContainerSizeChange"))
|
|
33
35
|
.build()
|
|
34
36
|
|
|
37
|
+
@ReactProp(name = "edgeToEdge")
|
|
38
|
+
fun setEdgeToEdge(view: TrueSheetView, edgeToEdge: Boolean) {
|
|
39
|
+
view.setEdgeToEdge(edgeToEdge)
|
|
40
|
+
}
|
|
41
|
+
|
|
35
42
|
@ReactProp(name = "maxHeight")
|
|
36
43
|
fun setMaxHeight(view: TrueSheetView, height: Double) {
|
|
37
44
|
view.setMaxHeight(Utils.toPixel(height))
|
|
@@ -4,13 +4,11 @@ import android.annotation.SuppressLint
|
|
|
4
4
|
import android.content.Context
|
|
5
5
|
import android.view.MotionEvent
|
|
6
6
|
import android.view.View
|
|
7
|
-
import com.facebook.react.bridge.GuardedRunnable
|
|
8
7
|
import com.facebook.react.config.ReactFeatureFlags
|
|
9
8
|
import com.facebook.react.uimanager.JSPointerDispatcher
|
|
10
9
|
import com.facebook.react.uimanager.JSTouchDispatcher
|
|
11
10
|
import com.facebook.react.uimanager.RootView
|
|
12
11
|
import com.facebook.react.uimanager.ThemedReactContext
|
|
13
|
-
import com.facebook.react.uimanager.UIManagerModule
|
|
14
12
|
import com.facebook.react.uimanager.events.EventDispatcher
|
|
15
13
|
import com.facebook.react.views.view.ReactViewGroup
|
|
16
14
|
|
|
@@ -35,14 +33,10 @@ class RootSheetView(private val context: Context?) :
|
|
|
35
33
|
|
|
36
34
|
private val jSTouchDispatcher = JSTouchDispatcher(this)
|
|
37
35
|
private var jSPointerDispatcher: JSPointerDispatcher? = null
|
|
38
|
-
|
|
36
|
+
public var sizeChangeListener: ((w: Int, h: Int) -> Unit)? = null
|
|
39
37
|
|
|
40
38
|
var eventDispatcher: EventDispatcher? = null
|
|
41
39
|
|
|
42
|
-
interface OnSizeChangeListener {
|
|
43
|
-
fun onSizeChange(width: Int, height: Int)
|
|
44
|
-
}
|
|
45
|
-
|
|
46
40
|
init {
|
|
47
41
|
if (ReactFeatureFlags.dispatchPointerEvents) {
|
|
48
42
|
jSPointerDispatcher = JSPointerDispatcher(this)
|
|
@@ -55,30 +49,12 @@ class RootSheetView(private val context: Context?) :
|
|
|
55
49
|
viewWidth = w
|
|
56
50
|
viewHeight = h
|
|
57
51
|
updateFirstChildView()
|
|
58
|
-
|
|
59
|
-
sizeChangeListener?.onSizeChange(w, h)
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
fun setOnSizeChangeListener(listener: OnSizeChangeListener) {
|
|
63
|
-
sizeChangeListener = listener
|
|
64
52
|
}
|
|
65
53
|
|
|
66
54
|
private fun updateFirstChildView() {
|
|
67
55
|
if (childCount > 0) {
|
|
68
56
|
hasAdjustedSize = false
|
|
69
|
-
|
|
70
|
-
reactContext.runOnNativeModulesQueueThread(
|
|
71
|
-
object : GuardedRunnable(reactContext) {
|
|
72
|
-
override fun runGuarded() {
|
|
73
|
-
val uiManager: UIManagerModule =
|
|
74
|
-
reactContext
|
|
75
|
-
.reactApplicationContext
|
|
76
|
-
.getNativeModule(UIManagerModule::class.java) ?: return
|
|
77
|
-
|
|
78
|
-
uiManager.updateNodeSize(viewTag, viewWidth, viewHeight)
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
)
|
|
57
|
+
sizeChangeListener?.let { it(viewWidth, viewHeight) }
|
|
82
58
|
} else {
|
|
83
59
|
hasAdjustedSize = true
|
|
84
60
|
}
|
|
@@ -18,7 +18,7 @@ object Utils {
|
|
|
18
18
|
).takeIf { it > 0 } ?: 0
|
|
19
19
|
|
|
20
20
|
@SuppressLint("InternalInsetResource", "DiscouragedApi")
|
|
21
|
-
fun screenHeight(context: ReactContext): Int {
|
|
21
|
+
fun screenHeight(context: ReactContext, edgeToEdge: Boolean): Int {
|
|
22
22
|
val windowManager = context.getSystemService(Context.WINDOW_SERVICE) as WindowManager
|
|
23
23
|
val displayMetrics = DisplayMetrics()
|
|
24
24
|
|
|
@@ -45,7 +45,16 @@ object Utils {
|
|
|
45
45
|
0
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
return
|
|
48
|
+
return if (edgeToEdge) {
|
|
49
|
+
// getRealMetrics includes navigation bar height
|
|
50
|
+
// windowManager.defaultDisplay.getMetrics doesn't
|
|
51
|
+
when (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
|
52
|
+
true -> screenHeight
|
|
53
|
+
false -> screenHeight + navigationBarHeight
|
|
54
|
+
}
|
|
55
|
+
} else {
|
|
56
|
+
screenHeight - statusBarHeight - navigationBarHeight
|
|
57
|
+
}
|
|
49
58
|
}
|
|
50
59
|
|
|
51
60
|
fun toDIP(value: Int): Float = PixelUtil.toDIPFromPixel(value.toFloat())
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
package com.lodev09.truesheet.events
|
|
2
|
+
|
|
3
|
+
import com.facebook.react.bridge.Arguments
|
|
4
|
+
import com.facebook.react.bridge.WritableMap
|
|
5
|
+
import com.facebook.react.uimanager.events.Event
|
|
6
|
+
|
|
7
|
+
// onContainerSizeChange
|
|
8
|
+
class ContainerSizeChangeEvent(surfaceId: Int, viewId: Int, private val width: Float, private val height: Float) :
|
|
9
|
+
Event<ContainerSizeChangeEvent>(surfaceId, viewId) {
|
|
10
|
+
override fun getEventName() = EVENT_NAME
|
|
11
|
+
|
|
12
|
+
override fun getEventData(): WritableMap {
|
|
13
|
+
val data = Arguments.createMap()
|
|
14
|
+
data.putDouble("width", width.toDouble())
|
|
15
|
+
data.putDouble("height", height.toDouble())
|
|
16
|
+
|
|
17
|
+
return data
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
companion object {
|
|
21
|
+
const val EVENT_NAME = "containerSizeChange"
|
|
22
|
+
}
|
|
23
|
+
}
|
package/ios/TrueSheetView.swift
CHANGED
|
@@ -16,6 +16,7 @@ class TrueSheetView: UIView, RCTInvalidating, TrueSheetViewControllerDelegate {
|
|
|
16
16
|
@objc var onDismiss: RCTDirectEventBlock?
|
|
17
17
|
@objc var onPresent: RCTDirectEventBlock?
|
|
18
18
|
@objc var onSizeChange: RCTDirectEventBlock?
|
|
19
|
+
@objc var onContainerSizeChange: RCTDirectEventBlock?
|
|
19
20
|
|
|
20
21
|
// MARK: - React Properties
|
|
21
22
|
|
|
@@ -27,9 +28,12 @@ class TrueSheetView: UIView, RCTInvalidating, TrueSheetViewControllerDelegate {
|
|
|
27
28
|
private var isPresented = false
|
|
28
29
|
private var activeIndex: Int?
|
|
29
30
|
private var bridge: RCTBridge?
|
|
30
|
-
private var touchHandler: RCTTouchHandler
|
|
31
31
|
private var viewController: TrueSheetViewController
|
|
32
32
|
|
|
33
|
+
private var touchHandler: RCTTouchHandler
|
|
34
|
+
// New Arch
|
|
35
|
+
private var surfaceTouchHandler: RCTSurfaceTouchHandler
|
|
36
|
+
|
|
33
37
|
// MARK: - Content properties
|
|
34
38
|
|
|
35
39
|
private var containerView: UIView?
|
|
@@ -43,7 +47,7 @@ class TrueSheetView: UIView, RCTInvalidating, TrueSheetViewControllerDelegate {
|
|
|
43
47
|
// Reference height constraint during content updates
|
|
44
48
|
private var footerViewHeightConstraint: NSLayoutConstraint?
|
|
45
49
|
|
|
46
|
-
private var
|
|
50
|
+
private var scrollableTag: NSNumber?
|
|
47
51
|
|
|
48
52
|
private var uiManager: RCTUIManager? {
|
|
49
53
|
guard let uiManager = bridge?.uiManager else { return nil }
|
|
@@ -57,6 +61,7 @@ class TrueSheetView: UIView, RCTInvalidating, TrueSheetViewControllerDelegate {
|
|
|
57
61
|
|
|
58
62
|
viewController = TrueSheetViewController()
|
|
59
63
|
touchHandler = RCTTouchHandler(bridge: bridge)
|
|
64
|
+
surfaceTouchHandler = RCTSurfaceTouchHandler()
|
|
60
65
|
|
|
61
66
|
super.init(frame: .zero)
|
|
62
67
|
|
|
@@ -76,10 +81,11 @@ class TrueSheetView: UIView, RCTInvalidating, TrueSheetViewControllerDelegate {
|
|
|
76
81
|
return
|
|
77
82
|
}
|
|
78
83
|
|
|
79
|
-
viewController.view.addSubview(subview)
|
|
80
|
-
|
|
81
84
|
containerView = subview
|
|
82
|
-
|
|
85
|
+
|
|
86
|
+
viewController.view.addSubview(subview)
|
|
87
|
+
touchHandler.attach(to: subview)
|
|
88
|
+
surfaceTouchHandler.attach(to: subview)
|
|
83
89
|
}
|
|
84
90
|
|
|
85
91
|
override func removeReactSubview(_ subview: UIView!) {
|
|
@@ -91,6 +97,7 @@ class TrueSheetView: UIView, RCTInvalidating, TrueSheetViewControllerDelegate {
|
|
|
91
97
|
super.removeReactSubview(subview)
|
|
92
98
|
|
|
93
99
|
touchHandler.detach(from: subview)
|
|
100
|
+
surfaceTouchHandler.detach(from: subview)
|
|
94
101
|
|
|
95
102
|
containerView = nil
|
|
96
103
|
contentView = nil
|
|
@@ -110,15 +117,31 @@ class TrueSheetView: UIView, RCTInvalidating, TrueSheetViewControllerDelegate {
|
|
|
110
117
|
|
|
111
118
|
containerView.pinTo(view: viewController.view, constraints: nil)
|
|
112
119
|
|
|
120
|
+
if let contentView {
|
|
121
|
+
// Set initial content height
|
|
122
|
+
let contentHeight = contentView.bounds.height
|
|
123
|
+
setContentHeight(NSNumber(value: contentHeight))
|
|
124
|
+
}
|
|
125
|
+
|
|
113
126
|
// Set footer constraints
|
|
114
127
|
if let footerView {
|
|
115
128
|
footerView.pinTo(view: viewController.view, from: [.left, .right, .bottom], with: 0) { constraints in
|
|
116
129
|
self.footerViewBottomConstraint = constraints.bottom
|
|
117
130
|
self.footerViewHeightConstraint = constraints.height
|
|
118
131
|
}
|
|
132
|
+
|
|
133
|
+
// Set initial footer height
|
|
134
|
+
let footerHeight = footerView.bounds.height
|
|
135
|
+
setFooterHeight(NSNumber(value: footerHeight))
|
|
119
136
|
}
|
|
120
137
|
|
|
121
|
-
|
|
138
|
+
// Present sheet at initial index
|
|
139
|
+
let initialIndex = self.initialIndex.intValue
|
|
140
|
+
if initialIndex >= 0 {
|
|
141
|
+
present(at: initialIndex, promise: nil, animated: initialIndexAnimated)
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
onMount?(nil)
|
|
122
145
|
}
|
|
123
146
|
}
|
|
124
147
|
|
|
@@ -145,10 +168,8 @@ class TrueSheetView: UIView, RCTInvalidating, TrueSheetViewControllerDelegate {
|
|
|
145
168
|
}
|
|
146
169
|
|
|
147
170
|
func viewControllerDidChangeWidth(_ width: CGFloat) {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
let size = CGSize(width: width, height: containerView.bounds.height)
|
|
151
|
-
uiManager?.setSize(size, for: containerView)
|
|
171
|
+
// We only pass width to JS since height is handled by the constraints
|
|
172
|
+
onContainerSizeChange?(["width": width])
|
|
152
173
|
}
|
|
153
174
|
|
|
154
175
|
func viewControllerWillAppear() {
|
|
@@ -302,37 +323,11 @@ class TrueSheetView: UIView, RCTInvalidating, TrueSheetViewControllerDelegate {
|
|
|
302
323
|
|
|
303
324
|
@objc
|
|
304
325
|
func setScrollableHandle(_ tag: NSNumber?) {
|
|
305
|
-
|
|
306
|
-
rctScrollView = view
|
|
326
|
+
scrollableTag = tag
|
|
307
327
|
}
|
|
308
328
|
|
|
309
329
|
// MARK: - Methods
|
|
310
330
|
|
|
311
|
-
private func initializeContent() {
|
|
312
|
-
guard let contentView, let footerView else {
|
|
313
|
-
return
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
// Update content containers
|
|
317
|
-
setupScrollable()
|
|
318
|
-
|
|
319
|
-
// Set initial content height
|
|
320
|
-
let contentHeight = contentView.bounds.height
|
|
321
|
-
setContentHeight(NSNumber(value: contentHeight))
|
|
322
|
-
|
|
323
|
-
// Set initial footer height
|
|
324
|
-
let footerHeight = footerView.bounds.height
|
|
325
|
-
setFooterHeight(NSNumber(value: footerHeight))
|
|
326
|
-
|
|
327
|
-
// Present sheet at initial index
|
|
328
|
-
let initialIndex = self.initialIndex.intValue
|
|
329
|
-
if initialIndex >= 0 {
|
|
330
|
-
present(at: initialIndex, promise: nil, animated: initialIndexAnimated)
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
onMount?(nil)
|
|
334
|
-
}
|
|
335
|
-
|
|
336
331
|
private func sizeInfoData(from sizeInfo: SizeInfo?) -> [String: Any] {
|
|
337
332
|
guard let sizeInfo else {
|
|
338
333
|
return ["index": 0, "value": 0.0]
|
|
@@ -361,12 +356,16 @@ class TrueSheetView: UIView, RCTInvalidating, TrueSheetViewControllerDelegate {
|
|
|
361
356
|
}
|
|
362
357
|
|
|
363
358
|
func setupScrollable() {
|
|
364
|
-
guard let contentView, let containerView else {
|
|
359
|
+
guard let contentView, let containerView, let scrollableTag else {
|
|
360
|
+
return
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
let scrollView = uiManager?.view(forReactTag: scrollableTag)
|
|
365
364
|
|
|
366
365
|
// Add constraints to fix weirdness and support ScrollView
|
|
367
|
-
if let
|
|
366
|
+
if let scrollView {
|
|
368
367
|
contentView.pinTo(view: containerView, constraints: nil)
|
|
369
|
-
|
|
368
|
+
scrollView.pinTo(view: contentView, constraints: nil)
|
|
370
369
|
}
|
|
371
370
|
}
|
|
372
371
|
|
|
@@ -27,6 +27,7 @@ RCT_EXPORT_VIEW_PROPERTY(onMount, RCTDirectEventBlock)
|
|
|
27
27
|
RCT_EXPORT_VIEW_PROPERTY(onPresent, RCTDirectEventBlock)
|
|
28
28
|
RCT_EXPORT_VIEW_PROPERTY(onDismiss, RCTDirectEventBlock)
|
|
29
29
|
RCT_EXPORT_VIEW_PROPERTY(onSizeChange, RCTDirectEventBlock)
|
|
30
|
+
RCT_EXPORT_VIEW_PROPERTY(onContainerSizeChange, RCTDirectEventBlock)
|
|
30
31
|
|
|
31
32
|
// Properties
|
|
32
33
|
RCT_EXPORT_VIEW_PROPERTY(scrollableHandle, NSNumber)
|
|
@@ -24,9 +24,11 @@ class TrueSheetViewManager: RCTViewManager {
|
|
|
24
24
|
|
|
25
25
|
// MARK: - Private
|
|
26
26
|
|
|
27
|
-
private func getTrueSheetView(_ tag: NSNumber) -> TrueSheetView {
|
|
27
|
+
private func getTrueSheetView(_ tag: NSNumber) -> TrueSheetView? {
|
|
28
|
+
guard let uiManager = bridge?.uiManager else { return nil }
|
|
29
|
+
guard let viewForTag = uiManager.view(forReactTag: tag) else { return nil }
|
|
28
30
|
// swiftlint:disable force_cast
|
|
29
|
-
return
|
|
31
|
+
return viewForTag as! TrueSheetView
|
|
30
32
|
// swiftlint:enable force_cast
|
|
31
33
|
}
|
|
32
34
|
|
|
@@ -35,12 +37,12 @@ class TrueSheetViewManager: RCTViewManager {
|
|
|
35
37
|
@objc
|
|
36
38
|
func present(_ tag: NSNumber, index: Int, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
|
|
37
39
|
let trueSheetView = getTrueSheetView(tag)
|
|
38
|
-
trueSheetView
|
|
40
|
+
trueSheetView?.present(at: index, promise: Promise(resolver: resolve, rejecter: reject))
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
@objc
|
|
42
44
|
func dismiss(_ tag: NSNumber, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
|
|
43
45
|
let trueSheetView = getTrueSheetView(tag)
|
|
44
|
-
trueSheetView
|
|
46
|
+
trueSheetView?.dismiss(promise: Promise(resolver: resolve, rejecter: reject))
|
|
45
47
|
}
|
|
46
48
|
}
|
|
@@ -4,14 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.TrueSheet = void 0;
|
|
7
|
-
var _react =
|
|
7
|
+
var _react = require("react");
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
-
var _TrueSheetModule = require("./TrueSheetModule");
|
|
10
|
-
var _TrueSheetGrabber = require("./TrueSheetGrabber");
|
|
11
|
-
var _TrueSheetFooter = require("./TrueSheetFooter");
|
|
12
|
-
|
|
13
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
9
|
+
var _TrueSheetModule = require("./TrueSheetModule.js");
|
|
10
|
+
var _TrueSheetGrabber = require("./TrueSheetGrabber.js");
|
|
11
|
+
var _TrueSheetFooter = require("./TrueSheetFooter.js");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
13
|
const NATIVE_COMPONENT_NAME = 'TrueSheetView';
|
|
16
14
|
const LINKING_ERROR = `The package '@lodev09/react-native-true-sheet' doesn't seem to be linked. Make sure: \n\n` + _reactNative.Platform.select({
|
|
17
15
|
ios: "- You have run 'pod install'\n",
|
|
@@ -36,7 +34,10 @@ class TrueSheet extends _react.PureComponent {
|
|
|
36
34
|
this.onSizeChange = this.onSizeChange.bind(this);
|
|
37
35
|
this.onContentLayout = this.onContentLayout.bind(this);
|
|
38
36
|
this.onFooterLayout = this.onFooterLayout.bind(this);
|
|
37
|
+
this.onContainerSizeChange = this.onContainerSizeChange.bind(this);
|
|
39
38
|
this.state = {
|
|
39
|
+
containerWidth: undefined,
|
|
40
|
+
containerHeight: undefined,
|
|
40
41
|
contentHeight: undefined,
|
|
41
42
|
footerHeight: undefined,
|
|
42
43
|
scrollableHandle: null
|
|
@@ -97,6 +98,12 @@ class TrueSheet extends _react.PureComponent {
|
|
|
97
98
|
onSizeChange(event) {
|
|
98
99
|
this.props.onSizeChange?.(event.nativeEvent);
|
|
99
100
|
}
|
|
101
|
+
onContainerSizeChange(event) {
|
|
102
|
+
this.setState({
|
|
103
|
+
containerWidth: event.nativeEvent.width,
|
|
104
|
+
containerHeight: event.nativeEvent.height
|
|
105
|
+
});
|
|
106
|
+
}
|
|
100
107
|
onPresent(event) {
|
|
101
108
|
this.props.onPresent?.(event.nativeEvent);
|
|
102
109
|
}
|
|
@@ -156,6 +163,7 @@ class TrueSheet extends _react.PureComponent {
|
|
|
156
163
|
grabber = true,
|
|
157
164
|
dimmed = true,
|
|
158
165
|
initialIndexAnimated = true,
|
|
166
|
+
edgeToEdge = false,
|
|
159
167
|
keyboardMode = 'resize',
|
|
160
168
|
initialIndex,
|
|
161
169
|
dimmedIndex,
|
|
@@ -169,7 +177,7 @@ class TrueSheet extends _react.PureComponent {
|
|
|
169
177
|
children,
|
|
170
178
|
...rest
|
|
171
179
|
} = this.props;
|
|
172
|
-
return /*#__PURE__*/
|
|
180
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TrueSheetNativeView, {
|
|
173
181
|
ref: this.ref,
|
|
174
182
|
style: $nativeSheet,
|
|
175
183
|
scrollableHandle: this.state.scrollableHandle,
|
|
@@ -181,6 +189,7 @@ class TrueSheet extends _react.PureComponent {
|
|
|
181
189
|
grabber: grabber,
|
|
182
190
|
dimmed: dimmed,
|
|
183
191
|
dimmedIndex: dimmedIndex,
|
|
192
|
+
edgeToEdge: edgeToEdge,
|
|
184
193
|
initialIndex: initialIndex,
|
|
185
194
|
initialIndexAnimated: initialIndexAnimated,
|
|
186
195
|
keyboardMode: keyboardMode,
|
|
@@ -189,34 +198,45 @@ class TrueSheet extends _react.PureComponent {
|
|
|
189
198
|
onMount: this.onMount,
|
|
190
199
|
onPresent: this.onPresent,
|
|
191
200
|
onDismiss: this.onDismiss,
|
|
192
|
-
onSizeChange: this.onSizeChange
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
201
|
+
onSizeChange: this.onSizeChange,
|
|
202
|
+
onContainerSizeChange: this.onContainerSizeChange,
|
|
203
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
204
|
+
collapsable: false,
|
|
205
|
+
style: [{
|
|
206
|
+
overflow: _reactNative.Platform.select({
|
|
207
|
+
ios: undefined,
|
|
208
|
+
android: 'hidden'
|
|
209
|
+
}),
|
|
210
|
+
borderTopLeftRadius: cornerRadius,
|
|
211
|
+
borderTopRightRadius: cornerRadius,
|
|
212
|
+
// Update the width on JS side.
|
|
213
|
+
// New Arch interop does not support updating it in native :/
|
|
214
|
+
width: this.state.containerWidth,
|
|
215
|
+
height: this.state.containerHeight,
|
|
216
|
+
// Remove backgroundColor if `blurTint` is set on iOS
|
|
217
|
+
backgroundColor: _reactNative.Platform.select({
|
|
218
|
+
ios: blurTint ? undefined : backgroundColor,
|
|
219
|
+
android: backgroundColor
|
|
220
|
+
})
|
|
221
|
+
}, style],
|
|
222
|
+
...rest,
|
|
223
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
224
|
+
collapsable: false,
|
|
225
|
+
onLayout: this.onContentLayout,
|
|
226
|
+
style: contentContainerStyle,
|
|
227
|
+
children: children
|
|
228
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
229
|
+
collapsable: false,
|
|
230
|
+
onLayout: this.onFooterLayout,
|
|
231
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TrueSheetFooter.TrueSheetFooter, {
|
|
232
|
+
Component: FooterComponent
|
|
233
|
+
})
|
|
234
|
+
}), _reactNative.Platform.OS === 'android' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_TrueSheetGrabber.TrueSheetGrabber, {
|
|
235
|
+
visible: grabber,
|
|
236
|
+
...grabberProps
|
|
237
|
+
})]
|
|
238
|
+
})
|
|
239
|
+
});
|
|
220
240
|
}
|
|
221
241
|
}
|
|
222
242
|
exports.TrueSheet = TrueSheet;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_TrueSheetModule","_TrueSheetGrabber","_TrueSheetFooter","_jsxRuntime","NATIVE_COMPONENT_NAME","LINKING_ERROR","Platform","select","ios","default","TrueSheetNativeView","requireNativeComponent","Error","TrueSheet","PureComponent","displayName","handles","constructor","props","ref","createRef","onMount","bind","onDismiss","onPresent","onSizeChange","onContentLayout","onFooterLayout","onContainerSizeChange","state","containerWidth","undefined","containerHeight","contentHeight","footerHeight","scrollableHandle","getHandle","name","handle","console","warn","present","index","TrueSheetModule","dismiss","resize","nodeHandle","findNodeHandle","current","updateState","scrollRef","setState","event","nativeEvent","width","height","layout","componentDidMount","sizes","length","componentDidUpdate","render","backgroundColor","dismissible","grabber","dimmed","initialIndexAnimated","edgeToEdge","keyboardMode","initialIndex","dimmedIndex","grabberProps","blurTint","cornerRadius","maxHeight","FooterComponent","style","contentContainerStyle","children","rest","jsx","$nativeSheet","jsxs","View","collapsable","overflow","android","borderTopLeftRadius","borderTopRightRadius","onLayout","TrueSheetFooter","Component","OS","TrueSheetGrabber","visible","exports","position","left","zIndex"],"sourceRoot":"../../src","sources":["TrueSheet.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAYA,IAAAE,gBAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AAAmD,IAAAK,WAAA,GAAAL,OAAA;AAEnD,MAAMM,qBAAqB,GAAG,eAAe;AAC7C,MAAMC,aAAa,GACjB,2FAA2F,GAC3FC,qBAAQ,CAACC,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAwBjC,MAAMC,mBAAmB,GAAG,IAAAC,mCAAsB,EAA2BP,qBAAqB,CAAC;AAEnG,IAAI,CAACM,mBAAmB,EAAE;EACxB,MAAM,IAAIE,KAAK,CAACP,aAAa,CAAC;AAChC;AAEO,MAAMQ,SAAS,SAASC,oBAAa,CAAiC;EAC3EC,WAAW,GAAG,WAAW;EAIzB;AACF;AACA;EACE,OAAwBC,OAAO,GAA+B,CAAC,CAAC;EAEhEC,WAAWA,CAACC,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,CAAC;IAEZ,IAAI,CAACC,GAAG,gBAAG,IAAAC,gBAAS,EAAY,CAAC;IAEjC,IAAI,CAACC,OAAO,GAAG,IAAI,CAACA,OAAO,CAACC,IAAI,CAAC,IAAI,CAAC;IACtC,IAAI,CAACC,SAAS,GAAG,IAAI,CAACA,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