@nativescript-community/ui-bottomsheet 0.0.0-stage → 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/CHANGELOG.md +22 -0
- package/LICENSE +201 -0
- package/README.md +213 -2
- package/index-common.d.ts +93 -0
- package/index-common.js +140 -0
- package/index-common.js.map +1 -0
- package/index.android.d.ts +44 -0
- package/index.android.js +475 -0
- package/index.android.js.map +1 -0
- package/index.d.ts +100 -0
- package/index.ios.d.ts +114 -0
- package/index.ios.js +678 -0
- package/index.ios.js.map +1 -0
- package/ios-layout.d.ts +64 -0
- package/ios-layout.js +356 -0
- package/ios-layout.js.map +1 -0
- package/package.json +49 -5
- package/platforms/android/include.gradle +6 -0
- package/platforms/android/java/com/nativescript/ui/bottomsheet/BottomSheetDialog.java +38 -0
- package/platforms/android/java/com/nativescript/ui/bottomsheet/BottomSheetDialogFragment.java +73 -0
- package/platforms/android/native-api-usage.json +36 -0
- package/platforms/ios/native-api-usage.json +11 -0
- package/svelte/index.d.ts +24 -0
- package/svelte/index.js +48 -0
- package/svelte/index.js.map +1 -0
- package/tsconfig.tsbuildinfo +1 -0
package/index.ios.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.ios.js","sourceRoot":"","sources":["../../src/ui-bottomsheet/index.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAyC,sBAAsB,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAE1K,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAg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,IAAI,EAAE,CAAC,uBAAuB,EAAE,mBAAmB,CAAC,CAAC,CAAC;AACtE,CAAC;AACD,MAAM,UAAU,OAAO;IACnB,IAAI,CAAC,cAAc,EAAE,CAAC;QAClB,cAAc,GAAG,IAAI,CAAC;QACtB,mBAAmB,EAAE,CAAC;IAC1B,CAAC;AACL,CAAC"}
|
package/ios-layout.d.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { View } from '@nativescript/core';
|
|
2
|
+
import type { BottomSheetDetent } from './index-common';
|
|
3
|
+
/**
|
|
4
|
+
* Finds the view controller from which a new sheet/dialog can be presented:
|
|
5
|
+
* the top most presented controller, ignoring alert controllers.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getPresentingController(parent: View, rootView?: View): UIViewController;
|
|
8
|
+
/**
|
|
9
|
+
* Mac Catalyst: UIKit shows a sheet as a window modal one (no detents, no tap outside to close).
|
|
10
|
+
* The sheet is then a card at the bottom of the window, `detents` are its heights.
|
|
11
|
+
*/
|
|
12
|
+
export interface CatalystCard {
|
|
13
|
+
detents: BottomSheetDetent[];
|
|
14
|
+
index: number;
|
|
15
|
+
grabberArea?: UIView;
|
|
16
|
+
/** px, set while the card is dragged: replaces the height of the detent */
|
|
17
|
+
dragHeight?: number;
|
|
18
|
+
/** px, known after the layout */
|
|
19
|
+
maxHeight?: number;
|
|
20
|
+
contentHeight?: number;
|
|
21
|
+
/** px, the current height of the card */
|
|
22
|
+
height?: number;
|
|
23
|
+
/** the slide in was started */
|
|
24
|
+
entered?: boolean;
|
|
25
|
+
/** a detent animation runs */
|
|
26
|
+
animating?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/** px */
|
|
29
|
+
export declare function getCatalystDetentHeights(card: CatalystCard): number[];
|
|
30
|
+
/**
|
|
31
|
+
* The card is laid out at the height of its largest detent once: the other detents move it with a transform, no layout of the content
|
|
32
|
+
* @param visibleHeight px
|
|
33
|
+
*/
|
|
34
|
+
export declare function setCatalystVisibleHeight(card: CatalystCard, nativeView: UIView, visibleHeight: number): void;
|
|
35
|
+
export declare class IMDLayoutViewController extends UIViewController {
|
|
36
|
+
_trackingScrollView: UIScrollView;
|
|
37
|
+
static new(): IMDLayoutViewController;
|
|
38
|
+
static alloc(): IMDLayoutViewController;
|
|
39
|
+
owner: WeakRef<View>;
|
|
40
|
+
nsAnimated: boolean;
|
|
41
|
+
ignoreBottomSafeArea: boolean;
|
|
42
|
+
ignoreTopSafeArea: boolean;
|
|
43
|
+
onLayoutCallback?: () => void;
|
|
44
|
+
catalystCard?: CatalystCard;
|
|
45
|
+
}
|
|
46
|
+
export declare class MDLayoutViewController extends UIViewController {
|
|
47
|
+
owner: WeakRef<View>;
|
|
48
|
+
ignoreBottomSafeArea: boolean;
|
|
49
|
+
ignoreTopSafeArea: boolean;
|
|
50
|
+
nsAnimated: boolean;
|
|
51
|
+
_trackingScrollView: UIScrollView;
|
|
52
|
+
catalystCard?: CatalystCard;
|
|
53
|
+
/**
|
|
54
|
+
* called after each layout pass, once preferredContentSize was updated
|
|
55
|
+
*/
|
|
56
|
+
onLayoutCallback?: () => void;
|
|
57
|
+
static initWithOwner(owner: View): MDLayoutViewController;
|
|
58
|
+
viewDidLoad(): void;
|
|
59
|
+
viewWillLayoutSubviews(): void;
|
|
60
|
+
viewDidLayoutSubviews(): void;
|
|
61
|
+
viewWillAppear(animated: boolean): void;
|
|
62
|
+
viewDidDisappear(animated: boolean): void;
|
|
63
|
+
traitCollectionDidChange(previousTraitCollection: UITraitCollection): void;
|
|
64
|
+
}
|
package/ios-layout.js
ADDED
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
import { Application, IOSHelper, Screen, Trace, Utils, View } from '@nativescript/core';
|
|
2
|
+
const majorVersion = Utils.ios.MajorVersion;
|
|
3
|
+
/**
|
|
4
|
+
* Finds the view controller from which a new sheet/dialog can be presented:
|
|
5
|
+
* the top most presented controller, ignoring alert controllers.
|
|
6
|
+
*/
|
|
7
|
+
export function getPresentingController(parent, rootView = Application.getRootView()) {
|
|
8
|
+
if (rootView.parent) {
|
|
9
|
+
rootView = rootView.parent;
|
|
10
|
+
}
|
|
11
|
+
const currentView = parent.modal || parent;
|
|
12
|
+
let parentController = currentView.viewController;
|
|
13
|
+
if (!parentController.presentedViewController && rootView.viewController.presentedViewController) {
|
|
14
|
+
parentController = rootView.viewController.presentedViewController;
|
|
15
|
+
}
|
|
16
|
+
while (parentController.presentedViewController) {
|
|
17
|
+
while (parentController.presentedViewController instanceof UIAlertController ||
|
|
18
|
+
(parentController.presentedViewController['isAlertController'] && parentController.presentedViewController.presentedViewController)) {
|
|
19
|
+
parentController = parentController.presentedViewController;
|
|
20
|
+
}
|
|
21
|
+
if (parentController.presentedViewController instanceof UIAlertController || parentController.presentedViewController['isAlertController']) {
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
parentController = parentController.presentedViewController;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return parentController;
|
|
29
|
+
}
|
|
30
|
+
function initLayoutGuide(controller) {
|
|
31
|
+
const rootView = controller.view;
|
|
32
|
+
const layoutGuide = UILayoutGuide.alloc().init();
|
|
33
|
+
rootView.addLayoutGuide(layoutGuide);
|
|
34
|
+
NSLayoutConstraint.activateConstraints([
|
|
35
|
+
layoutGuide.topAnchor.constraintEqualToAnchor(controller.topLayoutGuide.bottomAnchor),
|
|
36
|
+
layoutGuide.bottomAnchor.constraintEqualToAnchor(controller.bottomLayoutGuide.topAnchor),
|
|
37
|
+
layoutGuide.leadingAnchor.constraintEqualToAnchor(rootView.leadingAnchor),
|
|
38
|
+
layoutGuide.trailingAnchor.constraintEqualToAnchor(rootView.trailingAnchor)
|
|
39
|
+
]);
|
|
40
|
+
return layoutGuide;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The size of the window the sheet is presented in: smaller than the screen on Mac Catalyst and iPad windows
|
|
44
|
+
*/
|
|
45
|
+
function getWindowSizePixels(controller) {
|
|
46
|
+
const window = controller.presentingViewController?.view?.window ?? controller.view?.window;
|
|
47
|
+
if (!window) {
|
|
48
|
+
return { width: Screen.mainScreen.widthPixels, height: Screen.mainScreen.heightPixels };
|
|
49
|
+
}
|
|
50
|
+
return { width: Utils.layout.toDevicePixels(window.bounds.size.width), height: Utils.layout.toDevicePixels(window.bounds.size.height) };
|
|
51
|
+
}
|
|
52
|
+
/** px */
|
|
53
|
+
export function getCatalystDetentHeights(card) {
|
|
54
|
+
return card.detents.map((detent) => resolveCatalystDetentHeight(detent, card.maxHeight, card.contentHeight));
|
|
55
|
+
}
|
|
56
|
+
function resolveCatalystDetentHeight(detent, maxHeight, contentHeight) {
|
|
57
|
+
let height;
|
|
58
|
+
if (detent === 'large') {
|
|
59
|
+
height = maxHeight;
|
|
60
|
+
}
|
|
61
|
+
else if (detent === 'medium') {
|
|
62
|
+
height = maxHeight / 2;
|
|
63
|
+
}
|
|
64
|
+
else if (detent === 'content') {
|
|
65
|
+
height = contentHeight;
|
|
66
|
+
}
|
|
67
|
+
else if (typeof detent === 'number') {
|
|
68
|
+
height = Utils.layout.toDevicePixels(detent);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
height = detent.fraction * maxHeight;
|
|
72
|
+
}
|
|
73
|
+
return Math.round(Math.min(height, maxHeight));
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* The card is laid out at the height of its largest detent once: the other detents move it with a transform, no layout of the content
|
|
77
|
+
* @param visibleHeight px
|
|
78
|
+
*/
|
|
79
|
+
export function setCatalystVisibleHeight(card, nativeView, visibleHeight) {
|
|
80
|
+
const offset = CGAffineTransformMakeTranslation(0, Utils.layout.toDeviceIndependentPixels(Math.max(0, card.height - visibleHeight)));
|
|
81
|
+
nativeView.transform = offset;
|
|
82
|
+
if (card.grabberArea) {
|
|
83
|
+
card.grabberArea.transform = offset;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function getCatalystVisibleHeight(card) {
|
|
87
|
+
return card.dragHeight ?? (getCatalystDetentHeights(card)[Math.min(card.index, card.detents.length - 1)] || card.height);
|
|
88
|
+
}
|
|
89
|
+
function layoutCatalystCard(controller, owner) {
|
|
90
|
+
const card = controller.catalystCard;
|
|
91
|
+
const { size } = controller.view.bounds;
|
|
92
|
+
const windowWidth = Utils.layout.toDevicePixels(size.width);
|
|
93
|
+
const windowHeight = Utils.layout.toDevicePixels(size.height);
|
|
94
|
+
const maxHeight = windowHeight - Utils.layout.toDevicePixels(controller.view.safeAreaInsets.top);
|
|
95
|
+
const width = windowWidth;
|
|
96
|
+
View.measureChild(null, owner, Utils.layout.makeMeasureSpec(width, Utils.layout.EXACTLY), Utils.layout.makeMeasureSpec(maxHeight, Utils.layout.AT_MOST));
|
|
97
|
+
const contentHeight = owner.getMeasuredHeight();
|
|
98
|
+
card.maxHeight = maxHeight;
|
|
99
|
+
card.contentHeight = contentHeight;
|
|
100
|
+
const height = Math.max(...getCatalystDetentHeights(card)) || contentHeight;
|
|
101
|
+
if (height !== contentHeight) {
|
|
102
|
+
View.measureChild(null, owner, Utils.layout.makeMeasureSpec(width, Utils.layout.EXACTLY), Utils.layout.makeMeasureSpec(height, Utils.layout.EXACTLY));
|
|
103
|
+
}
|
|
104
|
+
card.height = height;
|
|
105
|
+
const top = windowHeight - height;
|
|
106
|
+
View.layoutChild(null, owner, 0, top, width, top + height);
|
|
107
|
+
const nativeView = owner.nativeViewProtected;
|
|
108
|
+
if (card.grabberArea) {
|
|
109
|
+
const area = card.grabberArea;
|
|
110
|
+
area.center = CGPointMake(Utils.layout.toDeviceIndependentPixels(width) / 2, Utils.layout.toDeviceIndependentPixels(top) + area.bounds.size.height / 2);
|
|
111
|
+
}
|
|
112
|
+
if (!(nativeView instanceof UIView)) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
if (!card.entered) {
|
|
116
|
+
// slide in from the bottom of the window
|
|
117
|
+
card.entered = true;
|
|
118
|
+
setCatalystVisibleHeight(card, nativeView, -40);
|
|
119
|
+
UIView.animateWithDurationDelayOptionsAnimationsCompletion(0.3, 0, 131072 /* UIViewAnimationOptions.CurveEaseOut */, () => setCatalystVisibleHeight(card, nativeView, getCatalystVisibleHeight(card)), null);
|
|
120
|
+
}
|
|
121
|
+
else if (!card.animating) {
|
|
122
|
+
setCatalystVisibleHeight(card, nativeView, getCatalystVisibleHeight(card));
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
function layoutView(controller, owner) {
|
|
126
|
+
let layoutGuide = controller.view.safeAreaLayoutGuide;
|
|
127
|
+
if (!layoutGuide) {
|
|
128
|
+
Trace.write(`safeAreaLayoutGuide during layout of ${owner}. Creating fallback constraints, but layout might be wrong.`, Trace.categories.Layout, Trace.messageType.error);
|
|
129
|
+
layoutGuide = initLayoutGuide(controller);
|
|
130
|
+
}
|
|
131
|
+
const safeArea = layoutGuide.layoutFrame;
|
|
132
|
+
let position = IOSHelper.getPositionFromFrame(safeArea);
|
|
133
|
+
const safeAreaSize = safeArea.size;
|
|
134
|
+
const hasChildViewControllers = controller.childViewControllers.count > 0;
|
|
135
|
+
if (hasChildViewControllers) {
|
|
136
|
+
const fullscreen = controller.view.frame;
|
|
137
|
+
position = IOSHelper.getPositionFromFrame(fullscreen);
|
|
138
|
+
}
|
|
139
|
+
const safeAreaWidth = Utils.layout.round(Utils.layout.toDevicePixels(safeAreaSize.width));
|
|
140
|
+
const safeAreaHeight = Utils.layout.round(Utils.layout.toDevicePixels(safeAreaSize.height));
|
|
141
|
+
const widthSpec = Utils.layout.makeMeasureSpec(safeAreaWidth, Utils.layout.EXACTLY);
|
|
142
|
+
const windowSize = getWindowSizePixels(controller);
|
|
143
|
+
const heightSpec = Utils.layout.makeMeasureSpec(windowSize.height, Utils.layout.AT_MOST);
|
|
144
|
+
// reset _cachedFrame or it will wrongly move the view on subsequent layouts
|
|
145
|
+
// (owner as any)._cachedFrame = null;
|
|
146
|
+
View.measureChild(null, owner, widthSpec, heightSpec);
|
|
147
|
+
const marginTop = owner.effectiveMarginTop;
|
|
148
|
+
const marginBottom = owner.effectiveMarginBottom;
|
|
149
|
+
const marginLeft = owner.effectiveMarginLeft + position.left;
|
|
150
|
+
const marginRight = owner.effectiveMarginRight;
|
|
151
|
+
const top = marginTop + position.top;
|
|
152
|
+
const width = windowSize.width;
|
|
153
|
+
const height = owner.getMeasuredHeight();
|
|
154
|
+
View.layoutChild(null, owner, marginLeft, top, width - marginLeft - marginRight, position.top + height + marginBottom);
|
|
155
|
+
const effectiveWidth = width;
|
|
156
|
+
let effectiveHeight = height + top + marginBottom;
|
|
157
|
+
if (controller.ignoreTopSafeArea || controller.ignoreBottomSafeArea) {
|
|
158
|
+
const frame = CGRectMake(Utils.layout.toDeviceIndependentPixels(marginLeft), Utils.layout.toDeviceIndependentPixels(top), Utils.layout.toDeviceIndependentPixels(width), Utils.layout.toDeviceIndependentPixels(height));
|
|
159
|
+
const availableSpace = getAvailableSpaceFromParent(owner, frame);
|
|
160
|
+
if (!availableSpace.fullscreen) {
|
|
161
|
+
// can happen if we get there after the bottomsheet was removed...
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
const startPos = IOSHelper.getPositionFromFrame(frame);
|
|
165
|
+
const fullscreenPosition = IOSHelper.getPositionFromFrame(availableSpace.fullscreen);
|
|
166
|
+
const safeAreaPosition = IOSHelper.getPositionFromFrame(availableSpace.safeArea);
|
|
167
|
+
const adjustedPosition = startPos;
|
|
168
|
+
const orientation = UIDevice.currentDevice.orientation;
|
|
169
|
+
const isLandscape = Application.orientation() === 'landscape';
|
|
170
|
+
// there are still some issues in landscape Right but they seem to come from N
|
|
171
|
+
owner.iosIgnoreSafeArea = true;
|
|
172
|
+
if (controller.ignoreTopSafeArea) {
|
|
173
|
+
const key = 'top';
|
|
174
|
+
const oppositeKey = 'bottom';
|
|
175
|
+
// if (orientation === UIDeviceOrientation.LandscapeLeft) {
|
|
176
|
+
// key = 'left';
|
|
177
|
+
// oppositeKey = 'right';
|
|
178
|
+
// } else if (orientation === UIDeviceOrientation.LandscapeRight) {
|
|
179
|
+
// key = 'right';
|
|
180
|
+
// oppositeKey = 'left';
|
|
181
|
+
// } else if (orientation === UIDeviceOrientation.PortraitUpsideDown) {
|
|
182
|
+
// key = 'bottom';
|
|
183
|
+
// oppositeKey = 'top';
|
|
184
|
+
// }
|
|
185
|
+
const delta = safeAreaPosition[key] - fullscreenPosition[key];
|
|
186
|
+
effectiveHeight -= delta;
|
|
187
|
+
adjustedPosition[oppositeKey] -= delta;
|
|
188
|
+
adjustedPosition[key] -= delta;
|
|
189
|
+
}
|
|
190
|
+
if (controller.ignoreBottomSafeArea) {
|
|
191
|
+
const key = 'bottom';
|
|
192
|
+
// if (orientation === UIDeviceOrientation.LandscapeLeft) {
|
|
193
|
+
// key = 'right';
|
|
194
|
+
// } else if (orientation === UIDeviceOrientation.LandscapeRight) {
|
|
195
|
+
// key = 'left';
|
|
196
|
+
// } else if (orientation === UIDeviceOrientation.PortraitUpsideDown) {
|
|
197
|
+
// key = 'top';
|
|
198
|
+
// }
|
|
199
|
+
const delta = fullscreenPosition[key] - safeAreaPosition[key];
|
|
200
|
+
effectiveHeight -= delta;
|
|
201
|
+
adjustedPosition[key] += delta; // extend frame into bottom safe area so background covers home indicator
|
|
202
|
+
}
|
|
203
|
+
if (orientation === 4 /* UIDeviceOrientation.LandscapeRight */ || orientation === 3 /* UIDeviceOrientation.LandscapeLeft */) {
|
|
204
|
+
const key = 'left';
|
|
205
|
+
const oppositeKey = 'right';
|
|
206
|
+
const delta = fullscreenPosition[key] - safeAreaPosition[key];
|
|
207
|
+
adjustedPosition[oppositeKey] += Utils.layout.toDevicePixels(delta);
|
|
208
|
+
// adjustedPosition[key] += (delta);
|
|
209
|
+
// adjustedPosition[oppositeKey] += Utils.layout.toDevicePixels(delta);
|
|
210
|
+
// adjustedPosition[key] += Utils.layout.toDevicePixels(delta);
|
|
211
|
+
}
|
|
212
|
+
if (owner.nativeViewProtected) {
|
|
213
|
+
owner.nativeViewProtected.frame = CGRectMake(Utils.layout.toDeviceIndependentPixels(adjustedPosition.left), Utils.layout.toDeviceIndependentPixels(adjustedPosition.top), Utils.layout.toDeviceIndependentPixels(adjustedPosition.right), Utils.layout.toDeviceIndependentPixels(adjustedPosition.bottom));
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
controller.preferredContentSize = CGSizeMake(Utils.layout.toDeviceIndependentPixels(effectiveWidth), Utils.layout.toDeviceIndependentPixels(effectiveHeight));
|
|
217
|
+
if (owner.parent) {
|
|
218
|
+
owner.parent._layoutParent();
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
function getAvailableSpaceFromParent(view, frame) {
|
|
222
|
+
if (!view) {
|
|
223
|
+
return null;
|
|
224
|
+
}
|
|
225
|
+
let scrollView = null;
|
|
226
|
+
let viewControllerView = null;
|
|
227
|
+
if (view.viewController) {
|
|
228
|
+
viewControllerView = view.viewController.view;
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
let parent = view.parent;
|
|
232
|
+
while (parent && !parent.viewController && !(parent.nativeViewProtected instanceof UIScrollView)) {
|
|
233
|
+
parent = parent.parent;
|
|
234
|
+
}
|
|
235
|
+
if (parent) {
|
|
236
|
+
if (parent.nativeViewProtected instanceof UIScrollView) {
|
|
237
|
+
scrollView = parent.nativeViewProtected;
|
|
238
|
+
}
|
|
239
|
+
else if (parent.viewController) {
|
|
240
|
+
viewControllerView = parent.viewController.view;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
let fullscreen = null;
|
|
245
|
+
let safeArea = null;
|
|
246
|
+
if (viewControllerView) {
|
|
247
|
+
safeArea = viewControllerView.safeAreaLayoutGuide.layoutFrame;
|
|
248
|
+
fullscreen = viewControllerView.frame;
|
|
249
|
+
}
|
|
250
|
+
else if (scrollView) {
|
|
251
|
+
const insets = scrollView.safeAreaInsets;
|
|
252
|
+
safeArea = CGRectMake(insets.left, insets.top, scrollView.contentSize.width - insets.left - insets.right, scrollView.contentSize.height - insets.top - insets.bottom);
|
|
253
|
+
fullscreen = CGRectMake(0, 0, scrollView.contentSize.width, scrollView.contentSize.height);
|
|
254
|
+
}
|
|
255
|
+
// const locationInWindow = view.getLocationInWindow();
|
|
256
|
+
// let inWindowLeft = locationInWindow.x;
|
|
257
|
+
// let inWindowTop = locationInWindow.y;
|
|
258
|
+
// if (scrollView) {
|
|
259
|
+
// inWindowLeft += scrollView.contentOffset.x;
|
|
260
|
+
// inWindowTop += scrollView.contentOffset.y;
|
|
261
|
+
// }
|
|
262
|
+
// const inWindow = CGRectMake(inWindowLeft, inWindowTop, frame.size.width, frame.size.height);
|
|
263
|
+
return { safeArea, fullscreen };
|
|
264
|
+
}
|
|
265
|
+
var MDLayoutViewController = /** @class */ (function (_super) {
|
|
266
|
+
__extends(MDLayoutViewController, _super);
|
|
267
|
+
function MDLayoutViewController() {
|
|
268
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
269
|
+
}
|
|
270
|
+
MDLayoutViewController.initWithOwner = function (owner) {
|
|
271
|
+
var delegate = MDLayoutViewController.new();
|
|
272
|
+
delegate.owner = new WeakRef(owner);
|
|
273
|
+
return delegate;
|
|
274
|
+
};
|
|
275
|
+
MDLayoutViewController.prototype.viewDidLoad = function () {
|
|
276
|
+
var _a;
|
|
277
|
+
_super.prototype.viewDidLoad.call(this);
|
|
278
|
+
var owner = (_a = this.owner) === null || _a === void 0 ? void 0 : _a.get();
|
|
279
|
+
if (!owner) {
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
if (!owner.isLoaded) {
|
|
283
|
+
owner.callLoaded();
|
|
284
|
+
}
|
|
285
|
+
// Unify translucent and opaque bars layout
|
|
286
|
+
this.edgesForExtendedLayout = UIRectEdge.All;
|
|
287
|
+
this.extendedLayoutIncludesOpaqueBars = true;
|
|
288
|
+
};
|
|
289
|
+
MDLayoutViewController.prototype.viewWillLayoutSubviews = function () {
|
|
290
|
+
var _a;
|
|
291
|
+
_super.prototype.viewWillLayoutSubviews.call(this);
|
|
292
|
+
var owner = (_a = this.owner) === null || _a === void 0 ? void 0 : _a.get();
|
|
293
|
+
if (owner) {
|
|
294
|
+
owner.iosOverflowSafeArea = true;
|
|
295
|
+
IOSHelper.updateConstraints(this, owner);
|
|
296
|
+
}
|
|
297
|
+
};
|
|
298
|
+
MDLayoutViewController.prototype.viewDidLayoutSubviews = function () {
|
|
299
|
+
var _a, _b;
|
|
300
|
+
_super.prototype.viewDidLayoutSubviews.call(this);
|
|
301
|
+
var owner = (_a = this.owner) === null || _a === void 0 ? void 0 : _a.get();
|
|
302
|
+
if (owner) {
|
|
303
|
+
if (this.catalystCard) {
|
|
304
|
+
layoutCatalystCard(this, owner);
|
|
305
|
+
}
|
|
306
|
+
else {
|
|
307
|
+
layoutView(this, owner);
|
|
308
|
+
}
|
|
309
|
+
(_b = this.onLayoutCallback) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
310
|
+
}
|
|
311
|
+
// safeAreaInsetsDidChange inflates contentInset.bottom on this layout pass, floating
|
|
312
|
+
// the sheet above the home indicator; reset it so the sheet stays at preferredSheetHeight
|
|
313
|
+
var trackingScrollView = this._trackingScrollView;
|
|
314
|
+
if (trackingScrollView) {
|
|
315
|
+
var inset = trackingScrollView.contentInset;
|
|
316
|
+
if (inset.bottom > 0) {
|
|
317
|
+
//@ts-expect-error missing typing
|
|
318
|
+
trackingScrollView.contentInset = UIEdgeInsetsMake(inset.top, inset.left, 0, inset.right);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
};
|
|
322
|
+
MDLayoutViewController.prototype.viewWillAppear = function (animated) {
|
|
323
|
+
var _a;
|
|
324
|
+
_super.prototype.viewWillAppear.call(this, animated);
|
|
325
|
+
var owner = (_a = this.owner) === null || _a === void 0 ? void 0 : _a.get();
|
|
326
|
+
if (!owner) {
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
IOSHelper.updateAutoAdjustScrollInsets(this, owner);
|
|
330
|
+
// if (!owner.parent) {
|
|
331
|
+
// owner.callLoaded();
|
|
332
|
+
// }
|
|
333
|
+
};
|
|
334
|
+
MDLayoutViewController.prototype.viewDidDisappear = function (animated) {
|
|
335
|
+
_super.prototype.viewDidDisappear.call(this, animated);
|
|
336
|
+
// let s not call callUnloaded here in case
|
|
337
|
+
// another modal / sheet is shown on top
|
|
338
|
+
// will be called on dismiss
|
|
339
|
+
};
|
|
340
|
+
// Mind implementation for other controllers
|
|
341
|
+
MDLayoutViewController.prototype.traitCollectionDidChange = function (previousTraitCollection) {
|
|
342
|
+
var _a;
|
|
343
|
+
_super.prototype.traitCollectionDidChange.call(this, previousTraitCollection);
|
|
344
|
+
if (majorVersion >= 13) {
|
|
345
|
+
var owner = (_a = this.owner) === null || _a === void 0 ? void 0 : _a.get();
|
|
346
|
+
if (owner &&
|
|
347
|
+
this.traitCollection.hasDifferentColorAppearanceComparedToTraitCollection &&
|
|
348
|
+
this.traitCollection.hasDifferentColorAppearanceComparedToTraitCollection(previousTraitCollection)) {
|
|
349
|
+
owner.notify({ eventName: 'traitCollectionColorAppearanceChanged', object: owner });
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
return MDLayoutViewController;
|
|
354
|
+
}(UIViewController));
|
|
355
|
+
export { MDLayoutViewController };
|
|
356
|
+
//# sourceMappingURL=ios-layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ios-layout.js","sourceRoot":"","sources":["../../src/ui-bottomsheet/ios-layout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAGxF,MAAM,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC;AAE5C;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,MAAY,EAAE,WAAiB,WAAW,CAAC,WAAW,EAAE;IAC5F,IAAI,QAAQ,CAAC,MAAM,EA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,CAAC,KAAK,GAAG,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QACtK,UAAU,GAAG,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAC/F,CAAC;IAED,uDAAuD;IACvD,yCAAyC;IACzC,wCAAwC;IAExC,oBAAoB;IACpB,kDAAkD;IAClD,iDAAiD;IACjD,IAAI;IAEJ,+FAA+F;IAE/F,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;AACpC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,50 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@nativescript-community/ui-bottomsheet",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "BottomSheet: showBottomSheet()/closeBottomSheet() on every View. Material on Android, native UISheetPresentationController on iOS.",
|
|
5
|
+
"main": "./index",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"typings": "./index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"tsc": "cpy '**/*.d.ts' '../../packages/ui-bottomsheet' --parents --cwd=../../src/ui-bottomsheet && tsc --build",
|
|
10
|
+
"readme": "readme generate -c ../../tools/readme/blueprint.json",
|
|
11
|
+
"build": "npm run tsc && npm run readme",
|
|
12
|
+
"build.watch": "npm run tsc -- -w",
|
|
13
|
+
"build.all": "npm run build",
|
|
14
|
+
"clean": "bin/rimraf ./*.d.ts ./*.js ./*.js.map ./*.tsbuildinfo ./*.mjs ./*.mjs.map ./angular ./svelte ./vue* ./react"
|
|
15
|
+
},
|
|
16
|
+
"nativescript": {
|
|
17
|
+
"platforms": {
|
|
18
|
+
"android": "6.2.0",
|
|
19
|
+
"ios": "6.2.0"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"NativeScript",
|
|
24
|
+
"JavaScript",
|
|
25
|
+
"Android",
|
|
26
|
+
"iOS"
|
|
27
|
+
],
|
|
28
|
+
"author": {
|
|
29
|
+
"name": "Martin Guillon",
|
|
30
|
+
"email": "martin@akylas.fr"
|
|
31
|
+
},
|
|
32
|
+
"bugs": {
|
|
33
|
+
"url": "https://github.com/nativescript-community/ui-native-components/issues"
|
|
34
|
+
},
|
|
35
|
+
"license": "Apache-2.0",
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public"
|
|
38
|
+
},
|
|
39
|
+
"homepage": "https://github.com/nativescript-community/ui-native-components/tree/master/packages/ui-bottomsheet#readme",
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "https://github.com/nativescript-community/ui-native-components.git",
|
|
43
|
+
"directory": "packages/ui-bottomsheet"
|
|
44
|
+
},
|
|
45
|
+
"readmeFilename": "README.md",
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@nativescript-community/ui-core": "^1.0.1"
|
|
48
|
+
},
|
|
49
|
+
"gitHead": "6a7607e3cb227ab29fa533776e85b2717a800c8e"
|
|
50
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
package com.nativescript.ui.bottomsheet;
|
|
2
|
+
|
|
3
|
+
import android.content.Context;
|
|
4
|
+
import android.view.ViewGroup;
|
|
5
|
+
import android.view.View;
|
|
6
|
+
|
|
7
|
+
public class BottomSheetDialog extends com.google.android.material.bottomsheet.BottomSheetDialog {
|
|
8
|
+
public interface BottomSheetDialogListener {
|
|
9
|
+
boolean onBackPressed(BottomSheetDialog dialog);
|
|
10
|
+
|
|
11
|
+
void onDetachedFromWindow(BottomSheetDialog dialog);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
BottomSheetDialogListener listener;
|
|
15
|
+
|
|
16
|
+
public BottomSheetDialog(Context context, int themeResId) {
|
|
17
|
+
super(context, themeResId);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
public void setListener(BottomSheetDialogListener listener) {
|
|
21
|
+
this.listener = listener;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@Override
|
|
25
|
+
public void onBackPressed() {
|
|
26
|
+
if (listener == null || !listener.onBackPressed(this)) {
|
|
27
|
+
super.onBackPressed();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
public void onDetachedFromWindow() {
|
|
32
|
+
super.onDetachedFromWindow();
|
|
33
|
+
if (listener != null) {
|
|
34
|
+
listener.onDetachedFromWindow(this);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
}
|