@nativescript-community/ui-material-bottomsheet 7.2.18 → 7.2.19
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/angular/bottomsheet.module.d.ts +10 -0
- package/angular/bottomsheet.service.d.ts +28 -0
- package/angular/index.d.ts +2 -0
- package/bottomsheet-common.d.ts +59 -0
- package/bottomsheet-common.js +138 -0
- package/bottomsheet-common.js.map +1 -0
- package/bottomsheet.android.d.ts +10 -0
- package/bottomsheet.android.js +215 -0
- package/bottomsheet.android.js.map +1 -0
- package/bottomsheet.d.ts +86 -0
- package/bottomsheet.ios.d.ts +18 -0
- package/bottomsheet.ios.js +425 -0
- package/bottomsheet.ios.js.map +1 -0
- package/package.json +3 -3
- package/svelte/index.d.ts +24 -0
- package/svelte/index.js +48 -0
- package/svelte/index.js.map +1 -0
- package/vue/index.d.ts +17 -0
- package/vue/index.js +57 -0
- package/vue/index.js.map +1 -0
- package/vue3/index.d.ts +21 -0
- package/vue3/index.js +53 -0
- package/vue3/index.js.map +1 -0
@@ -0,0 +1,425 @@
|
|
1
|
+
import { Application, IOSHelper, Page, Screen, Trace, Utils, View, fromObject } from '@nativescript/core';
|
2
|
+
import { applyMixins } from '@nativescript-community/ui-material-core';
|
3
|
+
import { StateBottomSheet, ViewWithBottomSheetBase } from './bottomsheet-common';
|
4
|
+
export { ViewWithBottomSheetBase } from './bottomsheet-common';
|
5
|
+
const majorVersion = Utils.ios.MajorVersion;
|
6
|
+
var MDCBottomSheetControllerDelegateImpl = /** @class */ (function (_super) {
|
7
|
+
__extends(MDCBottomSheetControllerDelegateImpl, _super);
|
8
|
+
function MDCBottomSheetControllerDelegateImpl() {
|
9
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
10
|
+
}
|
11
|
+
MDCBottomSheetControllerDelegateImpl.initWithOwner = function (owner) {
|
12
|
+
var delegate = MDCBottomSheetControllerDelegateImpl.new();
|
13
|
+
delegate._owner = new WeakRef(owner);
|
14
|
+
return delegate;
|
15
|
+
};
|
16
|
+
MDCBottomSheetControllerDelegateImpl.prototype.bottomSheetControllerDidChangeYOffsetYOffset = function (controller, yOffset) {
|
17
|
+
var owner = this._owner.get();
|
18
|
+
if (owner === null || owner === void 0 ? void 0 : owner._onChangeStateBottomSheetCallback) {
|
19
|
+
var presentationController = controller.presentationController;
|
20
|
+
var heightScreen = Screen.mainScreen.heightDIPs;
|
21
|
+
var heightCollapsedSheet = presentationController.preferredSheetHeight || controller.preferredContentSize.height;
|
22
|
+
var window = UIApplication.sharedApplication.windows.firstObject;
|
23
|
+
var topPadding = window.safeAreaInsets.top;
|
24
|
+
var bottomPadding = window.safeAreaInsets.bottom;
|
25
|
+
var isCollapsed = heightScreen - yOffset - bottomPadding === heightCollapsedSheet;
|
26
|
+
var isExpanded = yOffset === topPadding;
|
27
|
+
if (!isCollapsed && !isExpanded) {
|
28
|
+
//normalized = (value - min) / (max - min);
|
29
|
+
var normalized = 0;
|
30
|
+
if (yOffset + bottomPadding > heightScreen - heightCollapsedSheet) {
|
31
|
+
normalized = (heightScreen - yOffset - bottomPadding - 0) / (heightCollapsedSheet - 0) - 1;
|
32
|
+
}
|
33
|
+
else {
|
34
|
+
normalized = (heightScreen - yOffset - heightCollapsedSheet) / (heightScreen - heightCollapsedSheet);
|
35
|
+
}
|
36
|
+
owner._onChangeStateBottomSheetCallback(StateBottomSheet.DRAGGING, normalized);
|
37
|
+
}
|
38
|
+
else {
|
39
|
+
owner._onChangeStateBottomSheetCallback(isCollapsed ? StateBottomSheet.COLLAPSED : StateBottomSheet.EXPANDED);
|
40
|
+
}
|
41
|
+
}
|
42
|
+
};
|
43
|
+
MDCBottomSheetControllerDelegateImpl.prototype.bottomSheetControllerDidDismissBottomSheet = function (controller) {
|
44
|
+
var _this = this;
|
45
|
+
// called when clicked on background
|
46
|
+
// this is called too soon to "dispose" the view. But we dont have a way
|
47
|
+
// to know when the animation is finished.
|
48
|
+
//Consequently with background tap we see the view disappear
|
49
|
+
// so we timeout a bit
|
50
|
+
setTimeout(function () {
|
51
|
+
var owner = _this._owner.get();
|
52
|
+
owner && owner._unloadBottomSheet();
|
53
|
+
}, 200);
|
54
|
+
};
|
55
|
+
MDCBottomSheetControllerDelegateImpl.prototype.bottomSheetControllerStateChangedState = function (controller, state) {
|
56
|
+
// called when swiped
|
57
|
+
var owner = this._owner.get();
|
58
|
+
if (state === MDCSheetState.Closed) {
|
59
|
+
if (owner) {
|
60
|
+
owner._onChangeStateBottomSheetCallback && owner._onChangeStateBottomSheetCallback(StateBottomSheet.CLOSED);
|
61
|
+
owner && owner._unloadBottomSheet();
|
62
|
+
}
|
63
|
+
}
|
64
|
+
else {
|
65
|
+
if (owner && owner._onChangeStateBottomSheetCallback) {
|
66
|
+
owner._onChangeStateBottomSheetCallback(state === MDCSheetState.Extended ? StateBottomSheet.EXPANDED : StateBottomSheet.EXPANDED);
|
67
|
+
}
|
68
|
+
}
|
69
|
+
};
|
70
|
+
MDCBottomSheetControllerDelegateImpl.ObjCProtocols = [MDCBottomSheetControllerDelegate];
|
71
|
+
return MDCBottomSheetControllerDelegateImpl;
|
72
|
+
}(NSObject));
|
73
|
+
function initLayoutGuide(controller) {
|
74
|
+
const rootView = controller.view;
|
75
|
+
const layoutGuide = UILayoutGuide.alloc().init();
|
76
|
+
rootView.addLayoutGuide(layoutGuide);
|
77
|
+
NSLayoutConstraint.activateConstraints([
|
78
|
+
layoutGuide.topAnchor.constraintEqualToAnchor(controller.topLayoutGuide.bottomAnchor),
|
79
|
+
layoutGuide.bottomAnchor.constraintEqualToAnchor(controller.bottomLayoutGuide.topAnchor),
|
80
|
+
layoutGuide.leadingAnchor.constraintEqualToAnchor(rootView.leadingAnchor),
|
81
|
+
layoutGuide.trailingAnchor.constraintEqualToAnchor(rootView.trailingAnchor)
|
82
|
+
]);
|
83
|
+
return layoutGuide;
|
84
|
+
}
|
85
|
+
function layoutView(controller, owner) {
|
86
|
+
let layoutGuide = controller.view.safeAreaLayoutGuide;
|
87
|
+
if (!layoutGuide) {
|
88
|
+
Trace.write(`safeAreaLayoutGuide during layout of ${owner}. Creating fallback constraints, but layout might be wrong.`, Trace.categories.Layout, Trace.messageType.error);
|
89
|
+
layoutGuide = initLayoutGuide(controller);
|
90
|
+
}
|
91
|
+
const safeArea = layoutGuide.layoutFrame;
|
92
|
+
let position = IOSHelper.getPositionFromFrame(safeArea);
|
93
|
+
const safeAreaSize = safeArea.size;
|
94
|
+
const hasChildViewControllers = controller.childViewControllers.count > 0;
|
95
|
+
if (hasChildViewControllers) {
|
96
|
+
const fullscreen = controller.view.frame;
|
97
|
+
position = IOSHelper.getPositionFromFrame(fullscreen);
|
98
|
+
}
|
99
|
+
const safeAreaWidth = Utils.layout.round(Utils.layout.toDevicePixels(safeAreaSize.width));
|
100
|
+
const safeAreaHeight = Utils.layout.round(Utils.layout.toDevicePixels(safeAreaSize.height));
|
101
|
+
const widthSpec = Utils.layout.makeMeasureSpec(safeAreaWidth, Utils.layout.EXACTLY);
|
102
|
+
const heightSpec = Utils.layout.makeMeasureSpec(safeAreaHeight, Utils.layout.UNSPECIFIED);
|
103
|
+
// reset _cachedFrame or it will wrongly move the view on subsequent layouts
|
104
|
+
// (owner as any)._cachedFrame = null;
|
105
|
+
View.measureChild(null, owner, widthSpec, heightSpec);
|
106
|
+
const marginTop = owner.effectiveMarginTop;
|
107
|
+
const marginBottom = owner.effectiveMarginBottom;
|
108
|
+
const marginLeft = owner.effectiveMarginLeft + position.left;
|
109
|
+
const marginRight = owner.effectiveMarginRight;
|
110
|
+
const top = marginTop + position.top;
|
111
|
+
const width = Screen.mainScreen.widthPixels;
|
112
|
+
const height = owner.getMeasuredHeight();
|
113
|
+
View.layoutChild(null, owner, marginLeft, top, width - marginLeft - marginRight, position.top + height + marginBottom);
|
114
|
+
const effectiveWidth = width;
|
115
|
+
let effectiveHeight = height + top + marginBottom;
|
116
|
+
if (controller.ignoreTopSafeArea || controller.ignoreBottomSafeArea) {
|
117
|
+
const frame = CGRectMake(Utils.layout.toDeviceIndependentPixels(marginLeft), Utils.layout.toDeviceIndependentPixels(top), Utils.layout.toDeviceIndependentPixels(width), Utils.layout.toDeviceIndependentPixels(height));
|
118
|
+
const availableSpace = getAvailableSpaceFromParent(owner, frame);
|
119
|
+
if (!availableSpace.fullscreen) {
|
120
|
+
// can happen if we get there after the bottomsheet was removed...
|
121
|
+
return;
|
122
|
+
}
|
123
|
+
const startPos = IOSHelper.getPositionFromFrame(frame);
|
124
|
+
const fullscreenPosition = IOSHelper.getPositionFromFrame(availableSpace.fullscreen);
|
125
|
+
const safeAreaPosition = IOSHelper.getPositionFromFrame(availableSpace.safeArea);
|
126
|
+
const adjustedPosition = startPos;
|
127
|
+
const orientation = UIDevice.currentDevice.orientation;
|
128
|
+
const isLandscape = Application.orientation() === 'landscape';
|
129
|
+
// there are still some issues in landscape Right but they seem to come from N
|
130
|
+
owner.iosIgnoreSafeArea = true;
|
131
|
+
if (controller.ignoreTopSafeArea) {
|
132
|
+
const key = 'top';
|
133
|
+
const oppositeKey = 'bottom';
|
134
|
+
// if (orientation === UIDeviceOrientation.LandscapeLeft) {
|
135
|
+
// key = 'left';
|
136
|
+
// oppositeKey = 'right';
|
137
|
+
// } else if (orientation === UIDeviceOrientation.LandscapeRight) {
|
138
|
+
// key = 'right';
|
139
|
+
// oppositeKey = 'left';
|
140
|
+
// } else if (orientation === UIDeviceOrientation.PortraitUpsideDown) {
|
141
|
+
// key = 'bottom';
|
142
|
+
// oppositeKey = 'top';
|
143
|
+
// }
|
144
|
+
const delta = safeAreaPosition[key] - fullscreenPosition[key];
|
145
|
+
effectiveHeight -= delta;
|
146
|
+
adjustedPosition[oppositeKey] -= delta;
|
147
|
+
adjustedPosition[key] -= delta;
|
148
|
+
}
|
149
|
+
if (controller.ignoreBottomSafeArea) {
|
150
|
+
const key = 'bottom';
|
151
|
+
// if (orientation === UIDeviceOrientation.LandscapeLeft) {
|
152
|
+
// key = 'right';
|
153
|
+
// } else if (orientation === UIDeviceOrientation.LandscapeRight) {
|
154
|
+
// key = 'left';
|
155
|
+
// } else if (orientation === UIDeviceOrientation.PortraitUpsideDown) {
|
156
|
+
// key = 'top';
|
157
|
+
// }
|
158
|
+
const delta = fullscreenPosition[key] - safeAreaPosition[key];
|
159
|
+
effectiveHeight -= delta;
|
160
|
+
}
|
161
|
+
if (orientation === 4 /* UIDeviceOrientation.LandscapeRight */ || orientation === 3 /* UIDeviceOrientation.LandscapeLeft */) {
|
162
|
+
const key = 'left';
|
163
|
+
const oppositeKey = 'right';
|
164
|
+
const delta = fullscreenPosition[key] - safeAreaPosition[key];
|
165
|
+
adjustedPosition[oppositeKey] += Utils.layout.toDevicePixels(delta);
|
166
|
+
// adjustedPosition[key] += (delta);
|
167
|
+
// adjustedPosition[oppositeKey] += Utils.layout.toDevicePixels(delta);
|
168
|
+
// adjustedPosition[key] += Utils.layout.toDevicePixels(delta);
|
169
|
+
}
|
170
|
+
if (owner.nativeViewProtected) {
|
171
|
+
owner.nativeViewProtected.frame = CGRectMake(Utils.layout.toDeviceIndependentPixels(adjustedPosition.left), Utils.layout.toDeviceIndependentPixels(adjustedPosition.top), Utils.layout.toDeviceIndependentPixels(adjustedPosition.right), Utils.layout.toDeviceIndependentPixels(adjustedPosition.bottom));
|
172
|
+
}
|
173
|
+
}
|
174
|
+
controller.preferredContentSize = CGSizeMake(Utils.layout.toDeviceIndependentPixels(effectiveWidth), Utils.layout.toDeviceIndependentPixels(effectiveHeight));
|
175
|
+
if (owner.parent) {
|
176
|
+
owner.parent._layoutParent();
|
177
|
+
}
|
178
|
+
}
|
179
|
+
function getAvailableSpaceFromParent(view, frame) {
|
180
|
+
if (!view) {
|
181
|
+
return null;
|
182
|
+
}
|
183
|
+
let scrollView = null;
|
184
|
+
let viewControllerView = null;
|
185
|
+
if (view.viewController) {
|
186
|
+
viewControllerView = view.viewController.view;
|
187
|
+
}
|
188
|
+
else {
|
189
|
+
let parent = view.parent;
|
190
|
+
while (parent && !parent.viewController && !(parent.nativeViewProtected instanceof UIScrollView)) {
|
191
|
+
parent = parent.parent;
|
192
|
+
}
|
193
|
+
if (parent) {
|
194
|
+
if (parent.nativeViewProtected instanceof UIScrollView) {
|
195
|
+
scrollView = parent.nativeViewProtected;
|
196
|
+
}
|
197
|
+
else if (parent.viewController) {
|
198
|
+
viewControllerView = parent.viewController.view;
|
199
|
+
}
|
200
|
+
}
|
201
|
+
}
|
202
|
+
let fullscreen = null;
|
203
|
+
let safeArea = null;
|
204
|
+
if (viewControllerView) {
|
205
|
+
safeArea = viewControllerView.safeAreaLayoutGuide.layoutFrame;
|
206
|
+
fullscreen = viewControllerView.frame;
|
207
|
+
}
|
208
|
+
else if (scrollView) {
|
209
|
+
const insets = scrollView.safeAreaInsets;
|
210
|
+
safeArea = CGRectMake(insets.left, insets.top, scrollView.contentSize.width - insets.left - insets.right, scrollView.contentSize.height - insets.top - insets.bottom);
|
211
|
+
fullscreen = CGRectMake(0, 0, scrollView.contentSize.width, scrollView.contentSize.height);
|
212
|
+
}
|
213
|
+
// const locationInWindow = view.getLocationInWindow();
|
214
|
+
// let inWindowLeft = locationInWindow.x;
|
215
|
+
// let inWindowTop = locationInWindow.y;
|
216
|
+
// if (scrollView) {
|
217
|
+
// inWindowLeft += scrollView.contentOffset.x;
|
218
|
+
// inWindowTop += scrollView.contentOffset.y;
|
219
|
+
// }
|
220
|
+
// const inWindow = CGRectMake(inWindowLeft, inWindowTop, frame.size.width, frame.size.height);
|
221
|
+
return { safeArea, fullscreen };
|
222
|
+
}
|
223
|
+
var MDLayoutViewController = /** @class */ (function (_super) {
|
224
|
+
__extends(MDLayoutViewController, _super);
|
225
|
+
function MDLayoutViewController() {
|
226
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
227
|
+
}
|
228
|
+
MDLayoutViewController.initWithOwner = function (owner) {
|
229
|
+
var delegate = MDLayoutViewController.new();
|
230
|
+
delegate.owner = new WeakRef(owner);
|
231
|
+
return delegate;
|
232
|
+
};
|
233
|
+
MDLayoutViewController.prototype.viewDidLoad = function () {
|
234
|
+
_super.prototype.viewDidLoad.call(this);
|
235
|
+
var owner = this.owner.get();
|
236
|
+
if (!owner) {
|
237
|
+
return;
|
238
|
+
}
|
239
|
+
if (!owner.parent) {
|
240
|
+
owner.callLoaded();
|
241
|
+
}
|
242
|
+
// Unify translucent and opaque bars layout
|
243
|
+
this.edgesForExtendedLayout = UIRectEdge.All;
|
244
|
+
this.extendedLayoutIncludesOpaqueBars = true;
|
245
|
+
};
|
246
|
+
MDLayoutViewController.prototype.viewWillLayoutSubviews = function () {
|
247
|
+
_super.prototype.viewWillLayoutSubviews.call(this);
|
248
|
+
var owner = this.owner.get();
|
249
|
+
if (owner) {
|
250
|
+
owner.iosOverflowSafeArea = true;
|
251
|
+
IOSHelper.updateConstraints(this, owner);
|
252
|
+
}
|
253
|
+
};
|
254
|
+
MDLayoutViewController.prototype.viewDidLayoutSubviews = function () {
|
255
|
+
_super.prototype.viewDidLayoutSubviews.call(this);
|
256
|
+
var owner = this.owner.get();
|
257
|
+
if (owner) {
|
258
|
+
layoutView(this, owner);
|
259
|
+
}
|
260
|
+
};
|
261
|
+
MDLayoutViewController.prototype.viewWillAppear = function (animated) {
|
262
|
+
_super.prototype.viewWillAppear.call(this, animated);
|
263
|
+
var owner = this.owner.get();
|
264
|
+
if (!owner) {
|
265
|
+
return;
|
266
|
+
}
|
267
|
+
IOSHelper.updateAutoAdjustScrollInsets(this, owner);
|
268
|
+
// if (!owner.parent) {
|
269
|
+
// owner.callLoaded();
|
270
|
+
// }
|
271
|
+
};
|
272
|
+
MDLayoutViewController.prototype.viewDidDisappear = function (animated) {
|
273
|
+
_super.prototype.viewDidDisappear.call(this, animated);
|
274
|
+
// let s not call callUnloaded here in case
|
275
|
+
// another modal / sheet is shown on top
|
276
|
+
// will be called on dismiss
|
277
|
+
};
|
278
|
+
// Mind implementation for other controllers
|
279
|
+
MDLayoutViewController.prototype.traitCollectionDidChange = function (previousTraitCollection) {
|
280
|
+
_super.prototype.traitCollectionDidChange.call(this, previousTraitCollection);
|
281
|
+
if (majorVersion >= 13) {
|
282
|
+
var owner = this.owner.get();
|
283
|
+
if (owner &&
|
284
|
+
this.traitCollection.hasDifferentColorAppearanceComparedToTraitCollection &&
|
285
|
+
this.traitCollection.hasDifferentColorAppearanceComparedToTraitCollection(previousTraitCollection)) {
|
286
|
+
owner.notify({ eventName: 'traitCollectionColorAppearanceChanged', object: owner });
|
287
|
+
}
|
288
|
+
}
|
289
|
+
};
|
290
|
+
return MDLayoutViewController;
|
291
|
+
}(UIViewController));
|
292
|
+
export class ViewWithBottomSheet extends ViewWithBottomSheetBase {
|
293
|
+
_showNativeBottomSheet(parent, options) {
|
294
|
+
options.context = options.context || {};
|
295
|
+
const parentWithController = IOSHelper.getParentWithViewController(parent);
|
296
|
+
if (!parentWithController) {
|
297
|
+
Trace.write(`Could not find parent with viewController for ${parent} while showing bottom sheet view.`, Trace.categories.ViewHierarchy, Trace.messageType.error);
|
298
|
+
return;
|
299
|
+
}
|
300
|
+
const parentController = parentWithController.viewController;
|
301
|
+
if (parentController.presentedViewController) {
|
302
|
+
Trace.write('Parent is already presenting view controller. Close the current bottom sheet page before showing another one!', Trace.categories.ViewHierarchy, Trace.messageType.error);
|
303
|
+
return;
|
304
|
+
}
|
305
|
+
if (!parentController.view || !parentController.view.window) {
|
306
|
+
Trace.write('Parent page is not part of the window hierarchy.', Trace.categories.ViewHierarchy, Trace.messageType.error);
|
307
|
+
return;
|
308
|
+
}
|
309
|
+
this._setupAsRootView({});
|
310
|
+
this._commonShowNativeBottomSheet(parentWithController, options);
|
311
|
+
let controller = this.viewController;
|
312
|
+
if (!controller) {
|
313
|
+
const nativeView = this.ios || this.nativeViewProtected;
|
314
|
+
controller = MDLayoutViewController.initWithOwner(this);
|
315
|
+
// newController = IOSHelper.MDLayoutViewController.initWithOwner(new WeakRef(item.content)) as UIViewController;
|
316
|
+
if (options.ignoreBottomSafeArea !== undefined) {
|
317
|
+
controller.ignoreBottomSafeArea = options.ignoreBottomSafeArea;
|
318
|
+
}
|
319
|
+
else {
|
320
|
+
controller.ignoreBottomSafeArea = false;
|
321
|
+
}
|
322
|
+
if (options.ignoreTopSafeArea !== undefined) {
|
323
|
+
controller.ignoreTopSafeArea = options.ignoreTopSafeArea;
|
324
|
+
}
|
325
|
+
else {
|
326
|
+
controller.ignoreTopSafeArea = true;
|
327
|
+
}
|
328
|
+
if (nativeView instanceof UIView) {
|
329
|
+
controller.view.addSubview(nativeView);
|
330
|
+
}
|
331
|
+
this.viewController = controller; // store the viewController so that safeArea overflow is applied correctly
|
332
|
+
}
|
333
|
+
// calling this before the controller set makes it fail. Would have to investigate this
|
334
|
+
this.parent = Application.getRootView();
|
335
|
+
this._raiseShowingBottomSheetEvent();
|
336
|
+
const bottomSheet = (this.bottomSheetController = MDCBottomSheetController.alloc().initWithContentViewController(controller));
|
337
|
+
this.bottomSheetControllerDelegate = bottomSheet.delegate = MDCBottomSheetControllerDelegateImpl.initWithOwner(this);
|
338
|
+
bottomSheet.isScrimAccessibilityElement = true;
|
339
|
+
bottomSheet.scrimAccessibilityLabel = 'close';
|
340
|
+
bottomSheet.dismissOnBackgroundTap = options.dismissOnBackgroundTap !== false;
|
341
|
+
bottomSheet.dismissOnDraggingDownSheet = options.dismissOnDraggingDownSheet !== false;
|
342
|
+
const presentationController = bottomSheet.presentationController;
|
343
|
+
const peekHeight = options.peekHeight;
|
344
|
+
if (peekHeight) {
|
345
|
+
presentationController.preferredSheetHeight = peekHeight;
|
346
|
+
}
|
347
|
+
presentationController.ignoreKeyboardHeight = options.ignoreKeyboardHeight !== false;
|
348
|
+
const skipCollapsedState = options?.skipCollapsedState === true;
|
349
|
+
if (options.trackingScrollView) {
|
350
|
+
const scrollView = this.getViewById(options.trackingScrollView);
|
351
|
+
if (scrollView && scrollView.nativeViewProtected instanceof UIScrollView) {
|
352
|
+
presentationController.trackingScrollView = scrollView.nativeViewProtected;
|
353
|
+
}
|
354
|
+
}
|
355
|
+
controller.nsAnimated = true;
|
356
|
+
parentController.presentViewControllerAnimatedCompletion(bottomSheet, true, null);
|
357
|
+
if (options.transparent === true) {
|
358
|
+
controller.view.backgroundColor = UIColor.clearColor;
|
359
|
+
// for it to be prettier let s disable elevation
|
360
|
+
controller.view['elevation'] = 0;
|
361
|
+
}
|
362
|
+
else if (!(this instanceof Page)) {
|
363
|
+
controller.view.backgroundColor = majorVersion <= 12 && !UIColor.systemBackgroundColor ? UIColor.whiteColor : UIColor.systemBackgroundColor;
|
364
|
+
}
|
365
|
+
const transitionCoordinator = bottomSheet.transitionCoordinator;
|
366
|
+
if (transitionCoordinator) {
|
367
|
+
UIViewControllerTransitionCoordinator.prototype.animateAlongsideTransitionCompletion.call(transitionCoordinator, null, () => {
|
368
|
+
this.bindingContext = fromObject(options.context);
|
369
|
+
this._raiseShownBottomSheetEvent();
|
370
|
+
});
|
371
|
+
}
|
372
|
+
else {
|
373
|
+
// Apparently iOS 9+ stops all transitions and animations upon application suspend and transitionCoordinator becomes null here in this case.
|
374
|
+
// Since we are not waiting for any transition to complete, i.e. transitionCoordinator is null, we can directly raise our shownInBottomSheet event.
|
375
|
+
// Take a look at https://github.com/NativeScript/NativeScript/issues/2173 for more info and a sample project.
|
376
|
+
this.bindingContext = fromObject(options.context);
|
377
|
+
this._raiseShownBottomSheetEvent();
|
378
|
+
}
|
379
|
+
}
|
380
|
+
_bottomSheetClosed() {
|
381
|
+
console.log('_bottomSheetClosed');
|
382
|
+
super._bottomSheetClosed();
|
383
|
+
if (this.bottomSheetController) {
|
384
|
+
this.bottomSheetController.delegate = null;
|
385
|
+
this.bottomSheetController = null;
|
386
|
+
}
|
387
|
+
this.bottomSheetControllerDelegate = null;
|
388
|
+
// it is very important to clear the viewController as N does not do it
|
389
|
+
// and the destroy of the view from svelte could trigger a layout pass on the viewController
|
390
|
+
this.viewController = null;
|
391
|
+
}
|
392
|
+
_hideNativeBottomSheet(parent, whenClosedCallback) {
|
393
|
+
if (!this.viewController) {
|
394
|
+
// when clicking on background we dont need to dismiss, already done
|
395
|
+
whenClosedCallback?.();
|
396
|
+
return;
|
397
|
+
}
|
398
|
+
const parentWithController = IOSHelper.getParentWithViewController(parent);
|
399
|
+
if (!parent || !parentWithController) {
|
400
|
+
Trace.error('Trying to hide bottom-sheet view but no parent with viewController specified.');
|
401
|
+
return;
|
402
|
+
}
|
403
|
+
const parentController = parentWithController.viewController;
|
404
|
+
const animated = this.viewController.nsAnimated;
|
405
|
+
parentController.dismissViewControllerAnimatedCompletion(animated, whenClosedCallback);
|
406
|
+
}
|
407
|
+
_unloadBottomSheet() {
|
408
|
+
console.log('_unloadBottomSheet');
|
409
|
+
if (this.isLoaded) {
|
410
|
+
this.callUnloaded();
|
411
|
+
}
|
412
|
+
this._onDismissBottomSheetCallback && this._onDismissBottomSheetCallback();
|
413
|
+
}
|
414
|
+
}
|
415
|
+
let mixinInstalled = false;
|
416
|
+
export function overrideBottomSheet() {
|
417
|
+
applyMixins(View, [ViewWithBottomSheetBase, ViewWithBottomSheet]);
|
418
|
+
}
|
419
|
+
export function install() {
|
420
|
+
if (!mixinInstalled) {
|
421
|
+
mixinInstalled = true;
|
422
|
+
overrideBottomSheet();
|
423
|
+
}
|
424
|
+
}
|
425
|
+
//# sourceMappingURL=bottomsheet.ios.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"bottomsheet.ios.js","sourceRoot":"../src/","sources":["bottomsheet.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC1G,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAEvE,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEjF,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,YAAY,GAAG,KAAK,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AAC,uBAAuB,EAAE,mBAAmB,CAAC,CAAC,CAAC;AACtE,CAAC;AACD,MAAM,UAAU,OAAO;IACnB,IAAI,CAAC,cAAc,EAAE;QACjB,cAAc,GAAG,IAAI,CAAC;QACtB,mBAAmB,EAAE,CAAC;KACzB;AACL,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nativescript-community/ui-material-bottomsheet",
|
3
|
-
"version": "7.2.
|
3
|
+
"version": "7.2.19",
|
4
4
|
"description": "Material Design Bottom Sheets slide up from the bottom of the screen to reveal more content. Bottom sheets integrate with the app to display supporting content or present deep-linked content from other apps.",
|
5
5
|
"main": "./bottomsheet",
|
6
6
|
"sideEffects": false,
|
@@ -46,7 +46,7 @@
|
|
46
46
|
},
|
47
47
|
"readmeFilename": "README.md",
|
48
48
|
"dependencies": {
|
49
|
-
"@nativescript-community/ui-material-core": "^7.2.
|
49
|
+
"@nativescript-community/ui-material-core": "^7.2.19"
|
50
50
|
},
|
51
|
-
"gitHead": "
|
51
|
+
"gitHead": "ad632905c09ad7f94f264d4ab200970df5e8e291"
|
52
52
|
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { BottomSheetOptions } from '../bottomsheet';
|
2
|
+
import { View } from '@nativescript/core';
|
3
|
+
import { NativeViewElementNode } from 'svelte-native/dom';
|
4
|
+
import { PageSpec } from 'svelte-native/dom/navigation';
|
5
|
+
declare module '@nativescript/core/ui/core/view' {
|
6
|
+
interface View {
|
7
|
+
closeBottomSheet(...args: any): void;
|
8
|
+
showBottomSheet(options: BottomSheetOptions): View;
|
9
|
+
}
|
10
|
+
}
|
11
|
+
export interface SvelteShowBottomSheetOptions<U> extends Omit<BottomSheetOptions, 'view'> {
|
12
|
+
view: PageSpec<U>;
|
13
|
+
parent?: NativeViewElementNode<View> | View;
|
14
|
+
props?: U;
|
15
|
+
}
|
16
|
+
interface ComponentInstanceInfo {
|
17
|
+
element: NativeViewElementNode<View>;
|
18
|
+
viewInstance: SvelteComponent;
|
19
|
+
}
|
20
|
+
export declare function resolveComponentElement<T>(viewSpec: typeof SvelteComponent<T>, props?: any): ComponentInstanceInfo;
|
21
|
+
export declare function showBottomSheet<T = any, U = any>(modalOptions: SvelteShowBottomSheetOptions<U>): Promise<T>;
|
22
|
+
export declare function closeBottomSheet(result?: any): void;
|
23
|
+
export declare function isBottomSheetOpened(): boolean;
|
24
|
+
export {};
|
package/svelte/index.js
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
import { Frame, View } from '@nativescript/core';
|
2
|
+
import { NativeViewElementNode, createElement } from 'svelte-native/dom';
|
3
|
+
const modalStack = [];
|
4
|
+
export function resolveComponentElement(viewSpec, props) {
|
5
|
+
const dummy = createElement('fragment', window.document);
|
6
|
+
const viewInstance = new viewSpec({ target: dummy, props });
|
7
|
+
const element = dummy.firstElement();
|
8
|
+
return { element, viewInstance };
|
9
|
+
}
|
10
|
+
export function showBottomSheet(modalOptions) {
|
11
|
+
const { view, parent, props = {}, ...options } = modalOptions;
|
12
|
+
// Get this before any potential new frames are created by component below
|
13
|
+
const modalLauncher = (parent && (parent instanceof View ? parent : parent.nativeView)) || Frame.topmost().currentPage;
|
14
|
+
const componentInstanceInfo = resolveComponentElement(view, props);
|
15
|
+
let modalView = componentInstanceInfo.element.nativeView;
|
16
|
+
return new Promise(async (resolve, reject) => {
|
17
|
+
let resolved = false;
|
18
|
+
const closeCallback = (result) => {
|
19
|
+
if (resolved)
|
20
|
+
return;
|
21
|
+
resolved = true;
|
22
|
+
if (options.closeCallback) {
|
23
|
+
options.closeCallback(result, componentInstanceInfo.viewInstance);
|
24
|
+
}
|
25
|
+
modalStack.pop();
|
26
|
+
resolve(result);
|
27
|
+
modalView._tearDownUI();
|
28
|
+
componentInstanceInfo.viewInstance.$destroy(); // don't let an exception in destroy kill the promise callback
|
29
|
+
};
|
30
|
+
try {
|
31
|
+
modalLauncher.showBottomSheet({ view: modalView, ...options, context: {}, closeCallback });
|
32
|
+
modalStack.push(componentInstanceInfo);
|
33
|
+
}
|
34
|
+
catch (err) {
|
35
|
+
reject(err);
|
36
|
+
}
|
37
|
+
});
|
38
|
+
}
|
39
|
+
export function closeBottomSheet(result) {
|
40
|
+
const modalPageInstanceInfo = modalStack[modalStack.length - 1];
|
41
|
+
if (modalPageInstanceInfo) {
|
42
|
+
modalPageInstanceInfo.element.nativeView.closeBottomSheet(result);
|
43
|
+
}
|
44
|
+
}
|
45
|
+
export function isBottomSheetOpened() {
|
46
|
+
return modalStack.length > 0;
|
47
|
+
}
|
48
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["svelte/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAoBzE,MAAM,UAAU,GAA4B,EAAE,CAAC;AAE/C,MAAM,UAAU,uBAAuB,CAAI,QAAmC,EAAE,KAAW;IACvF,MAAM,KAAK,GAAG,aAAa,CAAC,UAAU,EAAE,MAAM,CAAC,QAAe,CAAC,CAAC;IAChE,MAAM,YAAY,GAAG,IAAI,QAAQ,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IAC5D,MAAM,OAAO,GAAG,KAAK,CAAC,YAAY,EAAiC,CAAC;IACpE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;AACrC,CAAC;AAED,MAAM,UAAU,eAAe,CAAmB,YAA6C;IAC3F,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,GAAG,EAAE,EAAE,GAAG,OAAO,EAAE,GAAG,YAAY,CAAC;IAC9D,0EAA0E;IAC1E,MAAM,aAAa,GAAS,CAAC,MAAM,IAAI,CAAC,MAAM,YAAY,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,C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CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;KAC9E;AACL,CAAC;AACD,MAAM,UAAU,mBAAmB;IAC/B,OAAO,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;AACjC,CAAC"}
|
package/vue/index.d.ts
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
import Vue from 'vue';
|
2
|
+
import { BottomSheetOptions } from '../bottomsheet';
|
3
|
+
import { View } from '@nativescript/core';
|
4
|
+
export interface VueBottomSheetOptions extends Omit<BottomSheetOptions, 'view'> {
|
5
|
+
props?: any;
|
6
|
+
on?: Record<string, (...args: any[]) => any>;
|
7
|
+
}
|
8
|
+
declare module 'nativescript-vue' {
|
9
|
+
interface NativeScriptVue<V = View> extends Vue {
|
10
|
+
$showBottomSheet(component: typeof Vue, options?: VueBottomSheetOptions): Promise<any>;
|
11
|
+
$closeBottomSheet(...args: any[]): any;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
declare const BottomSheetPlugin: {
|
15
|
+
install(Vue: any): void;
|
16
|
+
};
|
17
|
+
export default BottomSheetPlugin;
|
package/vue/index.js
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
import { NativeScriptVue } from 'nativescript-vue';
|
2
|
+
import Vue from 'vue';
|
3
|
+
import { View } from '@nativescript/core';
|
4
|
+
let sequentialCounter = 0;
|
5
|
+
function serializeModalOptions(options) {
|
6
|
+
if (process.env.NODE_ENV === 'production') {
|
7
|
+
return null;
|
8
|
+
}
|
9
|
+
const allowed = ['fullscreen'];
|
10
|
+
return (Object.keys(options)
|
11
|
+
.filter((key) => allowed.includes(key))
|
12
|
+
.map((key) => `${key}: ${options[key]}`)
|
13
|
+
.concat(`uid: ${++sequentialCounter}`)
|
14
|
+
.join(', ') + '_bottomsheet');
|
15
|
+
}
|
16
|
+
const BottomSheetPlugin = {
|
17
|
+
install(Vue) {
|
18
|
+
Vue.prototype.$showBottomSheet = function (component, options) {
|
19
|
+
return new Promise((resolve) => {
|
20
|
+
let resolved = false;
|
21
|
+
let navEntryInstance = new Vue({
|
22
|
+
name: 'BottomSheetEntry',
|
23
|
+
parent: this.$root,
|
24
|
+
render: (h) => h(component, {
|
25
|
+
props: options.props,
|
26
|
+
on: options.on,
|
27
|
+
key: serializeModalOptions(options)
|
28
|
+
})
|
29
|
+
});
|
30
|
+
navEntryInstance.$mount();
|
31
|
+
this.nativeView.showBottomSheet(Object.assign({}, options, {
|
32
|
+
view: navEntryInstance.nativeView,
|
33
|
+
closeCallback: (result) => {
|
34
|
+
if (resolved) {
|
35
|
+
return;
|
36
|
+
}
|
37
|
+
resolved = true;
|
38
|
+
if (options.closeCallback) {
|
39
|
+
options.closeCallback(result, navEntryInstance);
|
40
|
+
}
|
41
|
+
resolve(result);
|
42
|
+
if (navEntryInstance && navEntryInstance.nativeView) {
|
43
|
+
navEntryInstance.$emit('bottomsheet:close');
|
44
|
+
navEntryInstance.$destroy();
|
45
|
+
navEntryInstance = null;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}));
|
49
|
+
});
|
50
|
+
};
|
51
|
+
Vue.prototype.$closeBottomSheet = function (...args) {
|
52
|
+
this.nativeView.closeBottomSheet.apply(this.nativeView, args);
|
53
|
+
};
|
54
|
+
}
|
55
|
+
};
|
56
|
+
export default BottomSheetPlugin;
|
57
|
+
//# sourceMappingURL=index.js.map
|
package/vue/index.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["vue/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAc1C,IAAI,iBAAiB,GAAG,CAAC,CAAC;AAE1B,SAAS,qBAAqB,CAAC,OAAO;IAClC,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;QACvC,OAAO,IAAI,CAAC;KACf;I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G,IAAI,CAAC;wBAChB,IAAI,OAAO,CAAC,aAAa,EAAE;4BACvB,OAAO,CAAC,aAAa,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;yBACnD;wBACD,OAAO,CAAC,MAAM,CAAC,CAAC;wBAChB,IAAI,gBAAgB,IAAI,gBAAgB,CAAC,UAAU,EAAE;4BACjD,gBAAgB,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;4BAC5C,gBAAgB,CAAC,QAAQ,EAAE,CAAC;4BAC5B,gBAAgB,GAAG,IAAI,CAAC;yBAC3B;oBACL,CAAC;iBACJ,CAAC,CACL,CAAC;YACN,CAAC,CAAC,CAAC;QACP,CAAC,CAAC;QACF,GAAG,CAAC,SAAS,CAAC,iBAAiB,GAAG,UAAU,GAAG,IAAI;YAC/C,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QAClE,CAAC,CAAC;IACN,CAAC;CACJ,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
package/vue3/index.d.ts
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
import { View } from '@nativescript/core';
|
2
|
+
import { BottomSheetOptions } from '../bottomsheet';
|
3
|
+
declare module '@vue/runtime-core' {
|
4
|
+
interface ComponentCustomProperties {
|
5
|
+
$showBottomSheet(component: any, options: VueBottomSheetOptions): Promise<any>;
|
6
|
+
$closeBottomSheet(...args: any[]): any;
|
7
|
+
}
|
8
|
+
}
|
9
|
+
declare const useBottomSheet: () => {
|
10
|
+
showBottomSheet: (component: any, options: VueBottomSheetOptions) => Promise<unknown>;
|
11
|
+
closeBottomSheet: (...args: any[]) => void;
|
12
|
+
};
|
13
|
+
declare const BottomSheetPlugin: {
|
14
|
+
install(app: any): void;
|
15
|
+
};
|
16
|
+
interface VueBottomSheetOptions extends Partial<BottomSheetOptions> {
|
17
|
+
view?: string | View;
|
18
|
+
props?: any;
|
19
|
+
on?: Record<string, (...args: any[]) => any>;
|
20
|
+
}
|
21
|
+
export { BottomSheetPlugin, VueBottomSheetOptions, useBottomSheet };
|