@nativescript-community/ui-bottomsheet 0.0.0-stage → 1.0.0
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 +16 -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 +57 -0
- package/index.ios.js +310 -0
- package/index.ios.js.map +1 -0
- package/ios-layout.d.ts +34 -0
- package/ios-layout.js +267 -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 +34 -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.d.ts
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { View } from '@nativescript/core';
|
|
2
|
+
import { BottomSheetOptions } from './index-common';
|
|
3
|
+
import { ViewWithBottomSheetBase } from './index-common';
|
|
4
|
+
export { ViewWithBottomSheetBase } from './index-common';
|
|
5
|
+
/**
|
|
6
|
+
* iOS: native UISheetPresentationController (iOS 15+, custom detents for iOS 16+).
|
|
7
|
+
* Supported: peekHeight, skipCollapsedState, dismissOnBackgroundTap/dismissOnDraggingDownSheet, canTouchBehind,
|
|
8
|
+
* disableDimBackground, transparent, backgroundOpacity, ignoreTopSafeArea/ignoreBottomSafeArea, onChangeState (COLLAPSED/EXPANDED/CLOSED).
|
|
9
|
+
* No-op: continuous DRAGGING state, ignoreKeyboardHeight, trackingScrollView (UIKit tracks the scrolling content by itself).
|
|
10
|
+
* UIKit does not allow to dismiss on background tap and on dragging independently: if one is disabled, both are.
|
|
11
|
+
*/
|
|
12
|
+
declare class SheetDelegateImpl extends NSObject {
|
|
13
|
+
static ObjCProtocols: {
|
|
14
|
+
prototype: UISheetPresentationControllerDelegate;
|
|
15
|
+
}[];
|
|
16
|
+
_owner: WeakRef<ViewWithBottomSheet>;
|
|
17
|
+
static initWithOwner(owner: ViewWithBottomSheet): SheetDelegateImpl;
|
|
18
|
+
sheetPresentationControllerDidChangeSelectedDetentIdentifier(sheet: UISheetPresentationController): void;
|
|
19
|
+
presentationControllerShouldDismiss(presentationController: UIPresentationController): boolean;
|
|
20
|
+
presentationControllerDidAttemptToDismiss(presentationController: UIPresentationController): void;
|
|
21
|
+
presentationControllerDidDismiss(presentationController: UIPresentationController): void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* With an undimmed detent UIKit has no dimming view, so there is no tap outside to dismiss the sheet: this recognizer replaces it
|
|
25
|
+
*/
|
|
26
|
+
declare class OutsideTapTarget extends NSObject {
|
|
27
|
+
_owner: WeakRef<ViewWithBottomSheet>;
|
|
28
|
+
static initWithOwner(owner: ViewWithBottomSheet): OutsideTapTarget;
|
|
29
|
+
outsideTapped(): void;
|
|
30
|
+
static ObjCExposedMethods: {
|
|
31
|
+
outsideTapped: {
|
|
32
|
+
returns: interop.Type<void>;
|
|
33
|
+
params: any[];
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export declare class ViewWithBottomSheet extends ViewWithBottomSheetBase {
|
|
38
|
+
bottomSheetDelegate: SheetDelegateImpl;
|
|
39
|
+
_detentIds: string[];
|
|
40
|
+
_onDetentChange: (index: number) => void;
|
|
41
|
+
_onWillDismiss: () => boolean | void;
|
|
42
|
+
_onDismissAttempt: () => void;
|
|
43
|
+
_outsideTapRecognizer: UITapGestureRecognizer;
|
|
44
|
+
_outsideTapTarget: OutsideTapTarget;
|
|
45
|
+
_outsideTapView: UIView;
|
|
46
|
+
_onOutsideTap(): void;
|
|
47
|
+
bottomSheetController: UIViewController;
|
|
48
|
+
protected _showNativeBottomSheet(parent: View, options: BottomSheetOptions): void;
|
|
49
|
+
private configureSheet;
|
|
50
|
+
setBottomSheetDetentIndex(index: number, animated?: boolean): void;
|
|
51
|
+
getBottomSheetDetentIndex(): number;
|
|
52
|
+
_bottomSheetClosed(): void;
|
|
53
|
+
protected _hideNativeBottomSheet(parent: View, whenClosedCallback: () => void): void;
|
|
54
|
+
_unloadBottomSheet(): void;
|
|
55
|
+
}
|
|
56
|
+
export declare function overrideBottomSheet(): void;
|
|
57
|
+
export declare function install(): void;
|
package/index.ios.js
ADDED
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
import { Application, Page, Trace, Utils, View, fromObject } from '@nativescript/core';
|
|
2
|
+
import { applyMixins } from '@nativescript-community/ui-core';
|
|
3
|
+
import { StateBottomSheet, ViewWithBottomSheetBase } from './index-common';
|
|
4
|
+
import { MDLayoutViewController, getPresentingController } from './ios-layout';
|
|
5
|
+
export { ViewWithBottomSheetBase } from './index-common';
|
|
6
|
+
const majorVersion = Utils.ios.MajorVersion;
|
|
7
|
+
const CONTENT_DETENT = 'content';
|
|
8
|
+
const PEEK_DETENT = 'peek';
|
|
9
|
+
const LARGE_DETENT = 'large';
|
|
10
|
+
var SheetDelegateImpl = /** @class */ (function (_super) {
|
|
11
|
+
__extends(SheetDelegateImpl, _super);
|
|
12
|
+
function SheetDelegateImpl() {
|
|
13
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
14
|
+
}
|
|
15
|
+
SheetDelegateImpl.initWithOwner = function (owner) {
|
|
16
|
+
var delegate = SheetDelegateImpl.new();
|
|
17
|
+
delegate._owner = new WeakRef(owner);
|
|
18
|
+
return delegate;
|
|
19
|
+
};
|
|
20
|
+
SheetDelegateImpl.prototype.sheetPresentationControllerDidChangeSelectedDetentIdentifier = function (sheet) {
|
|
21
|
+
var _a;
|
|
22
|
+
var owner = this._owner.get();
|
|
23
|
+
if (owner === null || owner === void 0 ? void 0 : owner._onChangeStateBottomSheetCallback) {
|
|
24
|
+
owner._onChangeStateBottomSheetCallback(sheet.selectedDetentIdentifier === LARGE_DETENT || sheet.selectedDetentIdentifier === CONTENT_DETENT ? StateBottomSheet.EXPANDED : StateBottomSheet.COLLAPSED);
|
|
25
|
+
}
|
|
26
|
+
(_a = owner === null || owner === void 0 ? void 0 : owner._onDetentChange) === null || _a === void 0 ? void 0 : _a.call(owner, owner.getBottomSheetDetentIndex());
|
|
27
|
+
};
|
|
28
|
+
SheetDelegateImpl.prototype.presentationControllerShouldDismiss = function (presentationController) {
|
|
29
|
+
var owner = this._owner.get();
|
|
30
|
+
return (owner === null || owner === void 0 ? void 0 : owner._onWillDismiss) ? owner._onWillDismiss() !== false : true;
|
|
31
|
+
};
|
|
32
|
+
SheetDelegateImpl.prototype.presentationControllerDidAttemptToDismiss = function (presentationController) {
|
|
33
|
+
var _a, _b;
|
|
34
|
+
(_b = (_a = this._owner.get()) === null || _a === void 0 ? void 0 : _a._onDismissAttempt) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
35
|
+
};
|
|
36
|
+
SheetDelegateImpl.prototype.presentationControllerDidDismiss = function (presentationController) {
|
|
37
|
+
var _a;
|
|
38
|
+
// called when dismissed by the user (dragging down or background tap)
|
|
39
|
+
var owner = this._owner.get();
|
|
40
|
+
if (owner) {
|
|
41
|
+
(_a = owner._onChangeStateBottomSheetCallback) === null || _a === void 0 ? void 0 : _a.call(owner, StateBottomSheet.CLOSED);
|
|
42
|
+
owner._unloadBottomSheet();
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
SheetDelegateImpl.ObjCProtocols = [UISheetPresentationControllerDelegate];
|
|
46
|
+
return SheetDelegateImpl;
|
|
47
|
+
}(NSObject));
|
|
48
|
+
var OutsideTapTarget = /** @class */ (function (_super) {
|
|
49
|
+
__extends(OutsideTapTarget, _super);
|
|
50
|
+
function OutsideTapTarget() {
|
|
51
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
52
|
+
}
|
|
53
|
+
OutsideTapTarget.initWithOwner = function (owner) {
|
|
54
|
+
var target = OutsideTapTarget.new();
|
|
55
|
+
target._owner = new WeakRef(owner);
|
|
56
|
+
return target;
|
|
57
|
+
};
|
|
58
|
+
OutsideTapTarget.prototype.outsideTapped = function () {
|
|
59
|
+
var _a;
|
|
60
|
+
(_a = this._owner.get()) === null || _a === void 0 ? void 0 : _a._onOutsideTap();
|
|
61
|
+
};
|
|
62
|
+
OutsideTapTarget.ObjCExposedMethods = {
|
|
63
|
+
outsideTapped: { returns: interop.types.void, params: [] }
|
|
64
|
+
};
|
|
65
|
+
return OutsideTapTarget;
|
|
66
|
+
}(NSObject));
|
|
67
|
+
export class ViewWithBottomSheet extends ViewWithBottomSheetBase {
|
|
68
|
+
constructor() {
|
|
69
|
+
super(...arguments);
|
|
70
|
+
this._detentIds = [];
|
|
71
|
+
}
|
|
72
|
+
_onOutsideTap() {
|
|
73
|
+
const sheet = this.bottomSheetController?.sheetPresentationController;
|
|
74
|
+
const undimmedId = sheet?.largestUndimmedDetentIdentifier;
|
|
75
|
+
// the system dimming view handles the taps at the larger detents
|
|
76
|
+
if (undimmedId && sheet.selectedDetentIdentifier !== undimmedId && this._detentIds.indexOf(sheet.selectedDetentIdentifier) > this._detentIds.indexOf(undimmedId)) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
if (this._onWillDismiss?.() === false) {
|
|
80
|
+
this._onDismissAttempt?.();
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
this.closeBottomSheet();
|
|
84
|
+
}
|
|
85
|
+
_showNativeBottomSheet(parent, options) {
|
|
86
|
+
options.context = options.context || {};
|
|
87
|
+
let rootView = Application.getRootView();
|
|
88
|
+
if (rootView.parent) {
|
|
89
|
+
rootView = rootView.parent;
|
|
90
|
+
}
|
|
91
|
+
let currentView = parent.page || rootView;
|
|
92
|
+
currentView = currentView.modal || currentView;
|
|
93
|
+
const parentController = getPresentingController(parent);
|
|
94
|
+
if (!parentController.view || !parentController.view.window) {
|
|
95
|
+
Trace.write('Parent page is not part of the window hierarchy.', Trace.categories.ViewHierarchy, Trace.messageType.error);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
this.parent = Application.getRootView();
|
|
99
|
+
// dirty trick for RADSideDrawer. as we set parent for css variables/classes, _setupAsRootView
|
|
100
|
+
// will call _addViewToNativeVisualTree which breaks the bottomSheet with RADSiderDrawer
|
|
101
|
+
// so we disable _addViewToNativeVisualTree for _setupAsRootView
|
|
102
|
+
const oldAddViewToNativeVisualTree = this.parent._addViewToNativeVisualTree;
|
|
103
|
+
this.parent._addViewToNativeVisualTree = () => false;
|
|
104
|
+
this._setupAsRootView({});
|
|
105
|
+
this.parent._addViewToNativeVisualTree = oldAddViewToNativeVisualTree;
|
|
106
|
+
this._commonShowNativeBottomSheet(currentView, options);
|
|
107
|
+
let controller = this.viewController;
|
|
108
|
+
if (!controller) {
|
|
109
|
+
const nativeView = this.ios || this.nativeViewProtected;
|
|
110
|
+
controller = MDLayoutViewController.initWithOwner(this);
|
|
111
|
+
controller.ignoreBottomSafeArea = options.ignoreBottomSafeArea !== undefined ? options.ignoreBottomSafeArea : false;
|
|
112
|
+
controller.ignoreTopSafeArea = options.ignoreTopSafeArea !== undefined ? options.ignoreTopSafeArea : true;
|
|
113
|
+
if (nativeView instanceof UIView) {
|
|
114
|
+
controller.view.addSubview(nativeView);
|
|
115
|
+
}
|
|
116
|
+
this.viewController = controller; // store the viewController so that safeArea overflow is applied correctly
|
|
117
|
+
}
|
|
118
|
+
this._raiseShowingBottomSheetEvent();
|
|
119
|
+
this.bottomSheetController = controller;
|
|
120
|
+
controller.modalPresentationStyle = 1 /* UIModalPresentationStyle.PageSheet */;
|
|
121
|
+
const sheet = controller.sheetPresentationController;
|
|
122
|
+
if (sheet) {
|
|
123
|
+
this.configureSheet(sheet, controller, options, parentController);
|
|
124
|
+
}
|
|
125
|
+
controller.nsAnimated = true;
|
|
126
|
+
parentController.presentViewControllerAnimatedCompletion(controller, true, null);
|
|
127
|
+
if (options.transparent === true) {
|
|
128
|
+
controller.view.backgroundColor = UIColor.clearColor;
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
if (!(this instanceof Page)) {
|
|
132
|
+
controller.view.backgroundColor = UIColor.systemBackgroundColor;
|
|
133
|
+
}
|
|
134
|
+
if (options.backgroundOpacity && controller.view.backgroundColor) {
|
|
135
|
+
controller.view.backgroundColor = controller.view.backgroundColor.colorWithAlphaComponent(options.backgroundOpacity);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
const transitionCoordinator = controller.transitionCoordinator;
|
|
139
|
+
if (transitionCoordinator) {
|
|
140
|
+
UIViewControllerTransitionCoordinator.prototype.animateAlongsideTransitionCompletion.call(transitionCoordinator, null, () => {
|
|
141
|
+
this.bindingContext = fromObject(options.context);
|
|
142
|
+
this._raiseShownBottomSheetEvent();
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
this.bindingContext = fromObject(options.context);
|
|
147
|
+
this._raiseShownBottomSheetEvent();
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
configureSheet(sheet, controller, options, parentController) {
|
|
151
|
+
const large = UISheetPresentationControllerDetent.largeDetent();
|
|
152
|
+
const detentIds = [];
|
|
153
|
+
this._onDetentChange = options.onDetentChange;
|
|
154
|
+
this._onWillDismiss = options.onWillDismiss;
|
|
155
|
+
this._onDismissAttempt = options.onDismissAttempt;
|
|
156
|
+
if (majorVersion >= 16) {
|
|
157
|
+
// the sheet follows the size of its content (measured in MDLayoutViewController)
|
|
158
|
+
const contentHeight = () => controller.preferredContentSize.height || Utils.layout.toDeviceIndependentPixels(0);
|
|
159
|
+
const detents = [];
|
|
160
|
+
const peekHeight = options.peekHeight;
|
|
161
|
+
if (options.detents?.length) {
|
|
162
|
+
options.detents.forEach((detent, index) => {
|
|
163
|
+
const id = `detent-${index}`;
|
|
164
|
+
detents.push(UISheetPresentationControllerDetent.customDetentWithIdentifierResolver(id, (context) => {
|
|
165
|
+
const max = context.maximumDetentValue;
|
|
166
|
+
let height;
|
|
167
|
+
if (detent === 'large') {
|
|
168
|
+
height = max;
|
|
169
|
+
}
|
|
170
|
+
else if (detent === 'medium') {
|
|
171
|
+
height = max / 2;
|
|
172
|
+
}
|
|
173
|
+
else if (detent === 'content') {
|
|
174
|
+
height = contentHeight() || max;
|
|
175
|
+
}
|
|
176
|
+
else if (typeof detent === 'number') {
|
|
177
|
+
height = detent;
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
height = detent.fraction * max;
|
|
181
|
+
}
|
|
182
|
+
return Math.min(height, max);
|
|
183
|
+
}));
|
|
184
|
+
detentIds.push(id);
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
else if (peekHeight && options.skipCollapsedState !== true) {
|
|
188
|
+
detents.push(UISheetPresentationControllerDetent.customDetentWithIdentifierResolver(PEEK_DETENT, (context) => Math.min(peekHeight, context.maximumDetentValue)));
|
|
189
|
+
detentIds.push(PEEK_DETENT);
|
|
190
|
+
}
|
|
191
|
+
if (!options.detents?.length) {
|
|
192
|
+
detents.push(UISheetPresentationControllerDetent.customDetentWithIdentifierResolver(CONTENT_DETENT, (context) => {
|
|
193
|
+
const height = contentHeight();
|
|
194
|
+
return height > 0 ? Math.min(height, context.maximumDetentValue) : context.maximumDetentValue;
|
|
195
|
+
}));
|
|
196
|
+
detentIds.push(CONTENT_DETENT);
|
|
197
|
+
}
|
|
198
|
+
sheet.detents = NSArray.arrayWithArray(detents);
|
|
199
|
+
if (options.detents?.length) {
|
|
200
|
+
sheet.selectedDetentIdentifier = detentIds[Math.min(options.initialDetentIndex || 0, detentIds.length - 1)];
|
|
201
|
+
}
|
|
202
|
+
// update the detent once the content is measured
|
|
203
|
+
controller.onLayoutCallback = () => {
|
|
204
|
+
sheet.invalidateDetents();
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
// iOS 15: only system detents
|
|
209
|
+
sheet.detents = NSArray.arrayWithArray([options.skipCollapsedState || !options.peekHeight ? large : UISheetPresentationControllerDetent.mediumDetent(), large]);
|
|
210
|
+
detentIds.push(LARGE_DETENT);
|
|
211
|
+
}
|
|
212
|
+
this._detentIds = detentIds;
|
|
213
|
+
sheet.prefersGrabberVisible = options.grabber !== false;
|
|
214
|
+
sheet.prefersScrollingExpandsWhenScrolledToEdge = options.scrollExpands !== false;
|
|
215
|
+
sheet.prefersEdgeAttachedInCompactHeight = options.edgeAttachedInCompactHeight === true;
|
|
216
|
+
sheet.widthFollowsPreferredContentSizeWhenEdgeAttached = true;
|
|
217
|
+
if (options.cornerRadius !== undefined) {
|
|
218
|
+
sheet.preferredCornerRadius = options.cornerRadius;
|
|
219
|
+
}
|
|
220
|
+
if (options.largestUndimmedDetentIndex !== undefined && detentIds[options.largestUndimmedDetentIndex]) {
|
|
221
|
+
sheet.largestUndimmedDetentIdentifier = detentIds[options.largestUndimmedDetentIndex];
|
|
222
|
+
if (options.canTouchBehind !== true && options.dismissOnBackgroundTap !== false) {
|
|
223
|
+
// tap outside dismisses, the touch is not given to the content behind
|
|
224
|
+
const view = parentController?.view;
|
|
225
|
+
if (view) {
|
|
226
|
+
this._outsideTapTarget = OutsideTapTarget.initWithOwner(this);
|
|
227
|
+
this._outsideTapRecognizer = UITapGestureRecognizer.alloc().initWithTargetAction(this._outsideTapTarget, 'outsideTapped');
|
|
228
|
+
this._outsideTapRecognizer.cancelsTouchesInView = true;
|
|
229
|
+
view.addGestureRecognizer(this._outsideTapRecognizer);
|
|
230
|
+
this._outsideTapView = view;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
else if (options.canTouchBehind === true || options.disableDimBackground === true) {
|
|
235
|
+
// no dimming at the biggest detent => touches go through to the content behind
|
|
236
|
+
sheet.largestUndimmedDetentIdentifier = detentIds[detentIds.length - 1];
|
|
237
|
+
}
|
|
238
|
+
if (options.dismissOnBackgroundTap === false || options.dismissOnDraggingDownSheet === false) {
|
|
239
|
+
controller.modalInPresentation = true;
|
|
240
|
+
}
|
|
241
|
+
this.bottomSheetDelegate = SheetDelegateImpl.initWithOwner(this);
|
|
242
|
+
sheet.delegate = this.bottomSheetDelegate;
|
|
243
|
+
}
|
|
244
|
+
setBottomSheetDetentIndex(index, animated = true) {
|
|
245
|
+
const sheet = this.bottomSheetController?.sheetPresentationController;
|
|
246
|
+
const id = this._detentIds[index];
|
|
247
|
+
if (!sheet || !id) {
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
const apply = () => {
|
|
251
|
+
sheet.selectedDetentIdentifier = id;
|
|
252
|
+
};
|
|
253
|
+
animated ? sheet.animateChanges(apply) : apply();
|
|
254
|
+
}
|
|
255
|
+
getBottomSheetDetentIndex() {
|
|
256
|
+
const sheet = this.bottomSheetController?.sheetPresentationController;
|
|
257
|
+
return sheet ? this._detentIds.indexOf(sheet.selectedDetentIdentifier) : -1;
|
|
258
|
+
}
|
|
259
|
+
_bottomSheetClosed() {
|
|
260
|
+
// super already called we are just a mixin
|
|
261
|
+
if (this.bottomSheetController) {
|
|
262
|
+
const sheet = this.bottomSheetController.sheetPresentationController;
|
|
263
|
+
if (sheet) {
|
|
264
|
+
sheet.delegate = null;
|
|
265
|
+
}
|
|
266
|
+
this.bottomSheetController.onLayoutCallback = null;
|
|
267
|
+
this.bottomSheetController = null;
|
|
268
|
+
}
|
|
269
|
+
this.bottomSheetDelegate = null;
|
|
270
|
+
if (this._outsideTapRecognizer) {
|
|
271
|
+
this._outsideTapView?.removeGestureRecognizer(this._outsideTapRecognizer);
|
|
272
|
+
this._outsideTapRecognizer = null;
|
|
273
|
+
this._outsideTapTarget = null;
|
|
274
|
+
this._outsideTapView = null;
|
|
275
|
+
}
|
|
276
|
+
this._onDetentChange = null;
|
|
277
|
+
this._onWillDismiss = null;
|
|
278
|
+
this._onDismissAttempt = null;
|
|
279
|
+
// it is very important to clear the viewController as N does not do it
|
|
280
|
+
// and the destroy of the view from svelte could trigger a layout pass on the viewController
|
|
281
|
+
this.viewController = null;
|
|
282
|
+
}
|
|
283
|
+
_hideNativeBottomSheet(parent, whenClosedCallback) {
|
|
284
|
+
if (!this.viewController) {
|
|
285
|
+
// when dismissed by the user there is nothing to dismiss
|
|
286
|
+
whenClosedCallback?.();
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
const parentController = getPresentingController(parent);
|
|
290
|
+
const animated = this.viewController.nsAnimated;
|
|
291
|
+
parentController.dismissViewControllerAnimatedCompletion(animated, whenClosedCallback);
|
|
292
|
+
}
|
|
293
|
+
_unloadBottomSheet() {
|
|
294
|
+
if (this.isLoaded) {
|
|
295
|
+
this.callUnloaded();
|
|
296
|
+
}
|
|
297
|
+
this._onDismissBottomSheetCallback && this._onDismissBottomSheetCallback();
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
let mixinInstalled = false;
|
|
301
|
+
export function overrideBottomSheet() {
|
|
302
|
+
applyMixins(View, [ViewWithBottomSheetBase, ViewWithBottomSheet]);
|
|
303
|
+
}
|
|
304
|
+
export function install() {
|
|
305
|
+
if (!mixinInstalled) {
|
|
306
|
+
mixinInstalled = true;
|
|
307
|
+
overrideBottomSheet();
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
//# sourceMappingURL=index.ios.js.map
|
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,gBA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,EAAE,CAAC;IAC/E,CAAC;CACJ;AAED,IAAI,cAAc,GAAG,KAAK,CAAC;AAC3B,MAAM,UAAU,mBAAmB;IAC/B,WAAW,CAAC,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,34 @@
|
|
|
1
|
+
import { View } from '@nativescript/core';
|
|
2
|
+
/**
|
|
3
|
+
* Finds the view controller from which a new sheet/dialog can be presented:
|
|
4
|
+
* the top most presented controller, ignoring alert controllers.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getPresentingController(parent: View, rootView?: View): UIViewController;
|
|
7
|
+
export declare class IMDLayoutViewController extends UIViewController {
|
|
8
|
+
_trackingScrollView: UIScrollView;
|
|
9
|
+
static new(): IMDLayoutViewController;
|
|
10
|
+
static alloc(): IMDLayoutViewController;
|
|
11
|
+
owner: WeakRef<View>;
|
|
12
|
+
nsAnimated: boolean;
|
|
13
|
+
ignoreBottomSafeArea: boolean;
|
|
14
|
+
ignoreTopSafeArea: boolean;
|
|
15
|
+
onLayoutCallback?: () => void;
|
|
16
|
+
}
|
|
17
|
+
export declare class MDLayoutViewController extends UIViewController {
|
|
18
|
+
owner: WeakRef<View>;
|
|
19
|
+
ignoreBottomSafeArea: boolean;
|
|
20
|
+
ignoreTopSafeArea: boolean;
|
|
21
|
+
nsAnimated: boolean;
|
|
22
|
+
_trackingScrollView: UIScrollView;
|
|
23
|
+
/**
|
|
24
|
+
* called after each layout pass, once preferredContentSize was updated
|
|
25
|
+
*/
|
|
26
|
+
onLayoutCallback?: () => void;
|
|
27
|
+
static initWithOwner(owner: View): MDLayoutViewController;
|
|
28
|
+
viewDidLoad(): void;
|
|
29
|
+
viewWillLayoutSubviews(): void;
|
|
30
|
+
viewDidLayoutSubviews(): void;
|
|
31
|
+
viewWillAppear(animated: boolean): void;
|
|
32
|
+
viewDidDisappear(animated: boolean): void;
|
|
33
|
+
traitCollectionDidChange(previousTraitCollection: UITraitCollection): void;
|
|
34
|
+
}
|