@nativescript-community/ui-material-bottomsheet 7.2.16 → 7.2.18
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/package.json +3 -3
- package/angular/bottomsheet.module.d.ts +0 -10
- package/angular/bottomsheet.service.d.ts +0 -28
- package/angular/index.d.ts +0 -2
- package/bottomsheet-common.d.ts +0 -59
- package/bottomsheet-common.js +0 -138
- package/bottomsheet-common.js.map +0 -1
- package/bottomsheet.android.d.ts +0 -10
- package/bottomsheet.android.js +0 -215
- package/bottomsheet.android.js.map +0 -1
- package/bottomsheet.d.ts +0 -86
- package/bottomsheet.ios.d.ts +0 -18
- package/bottomsheet.ios.js +0 -426
- package/bottomsheet.ios.js.map +0 -1
- package/svelte/index.d.ts +0 -24
- package/svelte/index.js +0 -48
- package/svelte/index.js.map +0 -1
- package/vue/index.d.ts +0 -17
- package/vue/index.js +0 -57
- package/vue/index.js.map +0 -1
- package/vue3/index.d.ts +0 -21
- package/vue3/index.js +0 -53
- package/vue3/index.js.map +0 -1
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.18",
|
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.18"
|
50
50
|
},
|
51
|
-
"gitHead": "
|
51
|
+
"gitHead": "9b56850d982d8ed164c2f9c1681d7c948f2c9bcf"
|
52
52
|
}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
2
|
-
import * as i0 from "@angular/core";
|
3
|
-
export declare class NativeScriptMaterialBottomSheetModule {
|
4
|
-
private static initialized;
|
5
|
-
static forRoot(): ModuleWithProviders<NativeScriptMaterialBottomSheetModule>;
|
6
|
-
constructor();
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NativeScriptMaterialBottomSheetModule, never>;
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NativeScriptMaterialBottomSheetModule, never, never, never>;
|
9
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<NativeScriptMaterialBottomSheetModule>;
|
10
|
-
}
|
@@ -1,28 +0,0 @@
|
|
1
|
-
import { Type, ViewContainerRef } from '@angular/core';
|
2
|
-
import type { BottomSheetOptions as MaterialBottomSheetOptions } from '@nativescript-community/ui-material-bottomsheet';
|
3
|
-
import { Observable } from 'rxjs';
|
4
|
-
import * as i0 from "@angular/core";
|
5
|
-
export type BaseShowBottomSheetOptions = Omit<MaterialBottomSheetOptions, 'closeCallback' | 'view'>;
|
6
|
-
export interface BottomSheetOptions extends BaseShowBottomSheetOptions {
|
7
|
-
viewContainerRef?: ViewContainerRef;
|
8
|
-
}
|
9
|
-
export declare class BottomSheetParams {
|
10
|
-
readonly context: any;
|
11
|
-
readonly closeCallback: (...args: any[]) => void;
|
12
|
-
constructor(context: any, closeCallback: (...args: any[]) => void);
|
13
|
-
}
|
14
|
-
export declare class BottomSheetService {
|
15
|
-
show<TResult = any>(type: Type<any>, options: BottomSheetOptions): Observable<TResult>;
|
16
|
-
showWithCloseCallback<TResult = any>(type: Type<any>, options: BottomSheetOptions): {
|
17
|
-
observable: Observable<TResult>;
|
18
|
-
closeCallback: () => void;
|
19
|
-
};
|
20
|
-
private getParentView;
|
21
|
-
private getFactoryResolver;
|
22
|
-
private createChildInjector;
|
23
|
-
private getBottomSheetParams;
|
24
|
-
private createDetachedLoader;
|
25
|
-
private loadComponent;
|
26
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BottomSheetService, never>;
|
27
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<BottomSheetService>;
|
28
|
-
}
|
package/angular/index.d.ts
DELETED
package/bottomsheet-common.d.ts
DELETED
@@ -1,59 +0,0 @@
|
|
1
|
-
import { EventData, View } from '@nativescript/core';
|
2
|
-
export interface ShownBottomSheetData extends EventData {
|
3
|
-
/**
|
4
|
-
* The context (optional, may be undefined) passed to the view when shown modally.
|
5
|
-
*/
|
6
|
-
context?: any;
|
7
|
-
/**
|
8
|
-
* A callback to call when you want to close the modally shown view.
|
9
|
-
* Pass in any kind of arguments and you will receive when the callback parameter
|
10
|
-
* of View.showModal is executed.
|
11
|
-
*/
|
12
|
-
closeCallback?: Function;
|
13
|
-
}
|
14
|
-
export declare enum StateBottomSheet {
|
15
|
-
CLOSED = -1,
|
16
|
-
COLLAPSED = 0,
|
17
|
-
EXPANDED = 1,
|
18
|
-
DRAGGING = 2
|
19
|
-
}
|
20
|
-
export type onChangeStateBottomSheet = (stateBottomSheet: StateBottomSheet, slideOffset?: number) => void;
|
21
|
-
export declare const shownInBottomSheetEvent = "shownInBottomSheet";
|
22
|
-
export declare const showingInBottomSheetEvent = "showingInBottomSheet";
|
23
|
-
export declare const closedSheetEvent = "closedBottomSheet";
|
24
|
-
export interface BottomSheetOptions {
|
25
|
-
view: string | View;
|
26
|
-
context?: any;
|
27
|
-
animated?: boolean;
|
28
|
-
dismissOnBackgroundTap?: boolean;
|
29
|
-
dismissOnDraggingDownSheet?: boolean;
|
30
|
-
dismissOnBackButton?: boolean;
|
31
|
-
closeCallback?: Function;
|
32
|
-
trackingScrollView?: string;
|
33
|
-
transparent?: boolean;
|
34
|
-
ignoreTopSafeArea?: boolean;
|
35
|
-
ignoreBottomSafeArea?: boolean;
|
36
|
-
disableDimBackground?: boolean;
|
37
|
-
skipCollapsedState?: boolean;
|
38
|
-
peekHeight?: number;
|
39
|
-
ignoreKeyboardHeight?: boolean;
|
40
|
-
onChangeState?: onChangeStateBottomSheet;
|
41
|
-
canTouchBehind?: boolean;
|
42
|
-
}
|
43
|
-
export declare abstract class ViewWithBottomSheetBase extends View {
|
44
|
-
protected _closeBottomSheetCallback: Function;
|
45
|
-
_onDismissBottomSheetCallback: Function;
|
46
|
-
_onChangeStateBottomSheetCallback: onChangeStateBottomSheet;
|
47
|
-
_bottomSheetFragment: any;
|
48
|
-
protected abstract _hideNativeBottomSheet(parent: any, whenClosedCallback: any): any;
|
49
|
-
protected _bottomSheetContext: any;
|
50
|
-
_raiseShownBottomSheetEvent(): void;
|
51
|
-
_bottomSheetCloseIgnore: boolean;
|
52
|
-
_bottomSheetClosed(): void;
|
53
|
-
protected abstract _showNativeBottomSheet(parent: View, options: BottomSheetOptions): any;
|
54
|
-
protected _commonShowNativeBottomSheet(parent: View, options: BottomSheetOptions): void;
|
55
|
-
protected _raiseShowingBottomSheetEvent(): void;
|
56
|
-
_raiseClosedBottomSheetEvent(): void;
|
57
|
-
closeBottomSheet(...args: any[]): void;
|
58
|
-
showBottomSheet(options: BottomSheetOptions): View;
|
59
|
-
}
|
package/bottomsheet-common.js
DELETED
@@ -1,138 +0,0 @@
|
|
1
|
-
import { Builder, CSSUtils, View, ViewBase } from '@nativescript/core';
|
2
|
-
export var StateBottomSheet;
|
3
|
-
(function (StateBottomSheet) {
|
4
|
-
StateBottomSheet[StateBottomSheet["CLOSED"] = -1] = "CLOSED";
|
5
|
-
StateBottomSheet[StateBottomSheet["COLLAPSED"] = 0] = "COLLAPSED";
|
6
|
-
StateBottomSheet[StateBottomSheet["EXPANDED"] = 1] = "EXPANDED";
|
7
|
-
StateBottomSheet[StateBottomSheet["DRAGGING"] = 2] = "DRAGGING";
|
8
|
-
})(StateBottomSheet || (StateBottomSheet = {}));
|
9
|
-
export const shownInBottomSheetEvent = 'shownInBottomSheet';
|
10
|
-
export const showingInBottomSheetEvent = 'showingInBottomSheet';
|
11
|
-
export const closedSheetEvent = 'closedBottomSheet';
|
12
|
-
export class ViewWithBottomSheetBase extends View {
|
13
|
-
constructor() {
|
14
|
-
super(...arguments);
|
15
|
-
this._bottomSheetCloseIgnore = false;
|
16
|
-
}
|
17
|
-
_raiseShownBottomSheetEvent() {
|
18
|
-
const args = {
|
19
|
-
eventName: shownInBottomSheetEvent,
|
20
|
-
object: this,
|
21
|
-
context: this._bottomSheetContext,
|
22
|
-
closeCallback: this._closeBottomSheetCallback
|
23
|
-
};
|
24
|
-
this.notify(args);
|
25
|
-
}
|
26
|
-
_bottomSheetClosed() {
|
27
|
-
if (this._bottomSheetCloseIgnore) {
|
28
|
-
return;
|
29
|
-
}
|
30
|
-
const _rootModalViews = this._getRootModalViews();
|
31
|
-
const modalIndex = _rootModalViews.indexOf(this);
|
32
|
-
_rootModalViews.splice(modalIndex);
|
33
|
-
this._isAddedToNativeVisualTree = false;
|
34
|
-
this._tearDownUI(true);
|
35
|
-
this.parent = null;
|
36
|
-
// if a frame _removeFromFrameStack will be called from _tearDownUI
|
37
|
-
// if (this instanceof Frame) {
|
38
|
-
// this._removeFromFrameStack();
|
39
|
-
// }
|
40
|
-
// eachDescendant(this, (child: ViewWithBottomSheetBase) => {
|
41
|
-
// child._bottomSheetClosed();
|
42
|
-
// return true;
|
43
|
-
// });
|
44
|
-
}
|
45
|
-
_commonShowNativeBottomSheet(parent, options) {
|
46
|
-
this._getRootModalViews().push(this);
|
47
|
-
this.cssClasses.add(CSSUtils.MODAL_ROOT_VIEW_CSS_CLASS);
|
48
|
-
const modalRootViewCssClasses = CSSUtils.getSystemCssClasses();
|
49
|
-
modalRootViewCssClasses.forEach((c) => this.cssClasses.add(c));
|
50
|
-
// (parent as any)._modal = this;
|
51
|
-
options.context = options.context || {};
|
52
|
-
this._bottomSheetContext = options.context;
|
53
|
-
this._onDismissBottomSheetCallback = (...originalArgs) => {
|
54
|
-
if (!this._onDismissBottomSheetCallback) {
|
55
|
-
return;
|
56
|
-
}
|
57
|
-
this._raiseClosedBottomSheetEvent();
|
58
|
-
this._onDismissBottomSheetCallback = null;
|
59
|
-
console.log('_onDismissBottomSheetCallback', this);
|
60
|
-
this._bottomSheetClosed();
|
61
|
-
if (this._bottomSheetContext.closeCallback) {
|
62
|
-
this._bottomSheetContext.closeCallback();
|
63
|
-
// only called if not already called by _closeBottomSheetCallback
|
64
|
-
// if (typeof options.closeCallback === 'function') {
|
65
|
-
// options.closeCallback.apply(undefined, originalArgs);
|
66
|
-
// }
|
67
|
-
}
|
68
|
-
this._closeBottomSheetCallback = null;
|
69
|
-
this._bottomSheetContext = null;
|
70
|
-
};
|
71
|
-
this._closeBottomSheetCallback = (...originalArgs) => {
|
72
|
-
if (!this._closeBottomSheetCallback) {
|
73
|
-
return;
|
74
|
-
}
|
75
|
-
// const callback = this._closeBottomSheetCallback;
|
76
|
-
this._closeBottomSheetCallback = null;
|
77
|
-
if (this._bottomSheetContext) {
|
78
|
-
this._bottomSheetContext.closeCallback = null;
|
79
|
-
}
|
80
|
-
const whenClosedCallback = () => {
|
81
|
-
if (typeof options.closeCallback === 'function') {
|
82
|
-
options.closeCallback.apply(undefined, originalArgs);
|
83
|
-
}
|
84
|
-
};
|
85
|
-
this._hideNativeBottomSheet(parent, whenClosedCallback);
|
86
|
-
};
|
87
|
-
if (options.onChangeState && typeof options.onChangeState === 'function') {
|
88
|
-
this._onChangeStateBottomSheetCallback = (stateBottomSheet, slideOffset) => {
|
89
|
-
options.onChangeState(stateBottomSheet, slideOffset ?? stateBottomSheet);
|
90
|
-
};
|
91
|
-
}
|
92
|
-
this._bottomSheetContext.closeCallback = this._closeBottomSheetCallback;
|
93
|
-
}
|
94
|
-
_raiseShowingBottomSheetEvent() {
|
95
|
-
const args = {
|
96
|
-
eventName: showingInBottomSheetEvent,
|
97
|
-
object: this,
|
98
|
-
context: this._bottomSheetContext,
|
99
|
-
closeCallback: this._closeBottomSheetCallback
|
100
|
-
};
|
101
|
-
this.notify(args);
|
102
|
-
}
|
103
|
-
_raiseClosedBottomSheetEvent() {
|
104
|
-
const args = {
|
105
|
-
eventName: closedSheetEvent,
|
106
|
-
object: this,
|
107
|
-
context: this._bottomSheetContext
|
108
|
-
};
|
109
|
-
this.notify(args);
|
110
|
-
}
|
111
|
-
closeBottomSheet(...args) {
|
112
|
-
const closeCallback = this._closeBottomSheetCallback;
|
113
|
-
if (closeCallback) {
|
114
|
-
closeCallback.apply(undefined, args);
|
115
|
-
}
|
116
|
-
else {
|
117
|
-
const parent = this.parent;
|
118
|
-
if (parent) {
|
119
|
-
parent.closeBottomSheet(...args);
|
120
|
-
}
|
121
|
-
}
|
122
|
-
}
|
123
|
-
showBottomSheet(options) {
|
124
|
-
if (arguments.length === 0) {
|
125
|
-
throw new Error('showModal without parameters is deprecated. Please call showModal on a view instance instead.');
|
126
|
-
}
|
127
|
-
else {
|
128
|
-
const view = options.view instanceof View
|
129
|
-
? options.view
|
130
|
-
: Builder.createViewFromEntry({
|
131
|
-
moduleName: options.view
|
132
|
-
});
|
133
|
-
view._showNativeBottomSheet(this, options);
|
134
|
-
return view;
|
135
|
-
}
|
136
|
-
}
|
137
|
-
}
|
138
|
-
//# sourceMappingURL=bottomsheet-common.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"bottomsheet-common.js","sourceRoot":"../src/","sources":["bottomsheet-common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAa,IAAI,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAgBlF,MAAM,CAAN,IAAY,gBAKX;AALD,WAAY,gBAAgB;IACxB,4DAAW,CAAA;IACX,iEAAa,CAAA;IACb,+DAAY,CAAA;IACZ,+DAAY,CAAA;AAChB,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,QAK3B;AAID,MAAM,CAAC,MAAM,uBAAuB,GAAG,oBAAoB,CAAC;AAC5D,MAAM,CAAC,MAAM,yBAAyB,GAAG,sBAAsB,CAAC;AAChE,MAAM,CAAC,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;AAsBpD,MAAM,OAAgB,uBAAwB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ACpH;aAAM;YACH,MAAM,IAAI,GACN,OAAO,CAAC,IAAI,YAAY,IAAI;gBACxB,CAAC,CAAE,OAAO,CAAC,IAAuC;gBAClD,CAAC,CAAE,OAAO,CAAC,mBAAmB,CAAC;oBACzB,UAAU,EAAE,OAAO,CAAC,IAAI;iBAC3B,CAA6B,CAAC;YACzC,IAAI,CAAC,sBAAsB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAC3C,OAAO,IAAI,CAAC;SACf;IACL,CAAC;CACJ"}
|
package/bottomsheet.android.d.ts
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
import { View } from '@nativescript/core';
|
2
|
-
import { BottomSheetOptions, ViewWithBottomSheetBase } from './bottomsheet-common';
|
3
|
-
export { ViewWithBottomSheetBase } from './bottomsheet-common';
|
4
|
-
export declare class ViewWithBottomSheet extends ViewWithBottomSheetBase {
|
5
|
-
_bottomSheetFragment: com.nativescript.material.bottomsheet.BottomSheetDialogFragment;
|
6
|
-
protected _hideNativeBottomSheet(parent: View, whenClosedCallback: () => void): void;
|
7
|
-
protected _showNativeBottomSheet(parent: View, options: BottomSheetOptions): void;
|
8
|
-
}
|
9
|
-
export declare function overrideBottomSheet(): void;
|
10
|
-
export declare function install(): void;
|
package/bottomsheet.android.js
DELETED
@@ -1,215 +0,0 @@
|
|
1
|
-
import { applyMixins } from '@nativescript-community/ui-material-core';
|
2
|
-
import { Application, Utils, View, fromObject } from '@nativescript/core';
|
3
|
-
import { StateBottomSheet, ViewWithBottomSheetBase } from './bottomsheet-common';
|
4
|
-
export { ViewWithBottomSheetBase } from './bottomsheet-common';
|
5
|
-
function getId(id) {
|
6
|
-
const context = Application.android.context;
|
7
|
-
return context.getResources().getIdentifier(id, 'id', context.getPackageName());
|
8
|
-
}
|
9
|
-
var ChangeStateBottomSheet = /** @class */ (function (_super) {
|
10
|
-
__extends(ChangeStateBottomSheet, _super);
|
11
|
-
function ChangeStateBottomSheet(owner) {
|
12
|
-
var _this = _super.call(this) || this;
|
13
|
-
_this.owner = owner;
|
14
|
-
return global.__native(_this);
|
15
|
-
}
|
16
|
-
ChangeStateBottomSheet.prototype.onSlide = function (bottomSheet, slideOffset) {
|
17
|
-
if (this.checkActiveCallback()) {
|
18
|
-
this.owner._onChangeStateBottomSheetCallback(StateBottomSheet.DRAGGING, slideOffset);
|
19
|
-
}
|
20
|
-
};
|
21
|
-
ChangeStateBottomSheet.prototype.onStateChanged = function (bottomSheet, newState) {
|
22
|
-
if (this.checkActiveCallback()) {
|
23
|
-
var status = this.getStateBottomSheetFromBottomSheetBehavior(newState);
|
24
|
-
if (status !== undefined) {
|
25
|
-
this.owner._onChangeStateBottomSheetCallback(status);
|
26
|
-
}
|
27
|
-
}
|
28
|
-
};
|
29
|
-
ChangeStateBottomSheet.prototype.checkActiveCallback = function () {
|
30
|
-
return this.owner && this.owner._onChangeStateBottomSheetCallback;
|
31
|
-
};
|
32
|
-
ChangeStateBottomSheet.prototype.getStateBottomSheetFromBottomSheetBehavior = function (state) {
|
33
|
-
switch (state) {
|
34
|
-
case com.google.android.material.bottomsheet.BottomSheetBehavior.STATE_HIDDEN:
|
35
|
-
return StateBottomSheet.CLOSED;
|
36
|
-
case com.google.android.material.bottomsheet.BottomSheetBehavior.STATE_EXPANDED:
|
37
|
-
return StateBottomSheet.EXPANDED;
|
38
|
-
case com.google.android.material.bottomsheet.BottomSheetBehavior.STATE_COLLAPSED:
|
39
|
-
return StateBottomSheet.COLLAPSED;
|
40
|
-
case com.google.android.material.bottomsheet.BottomSheetBehavior.STATE_DRAGGING:
|
41
|
-
return StateBottomSheet.DRAGGING;
|
42
|
-
default:
|
43
|
-
// @ts-ignore
|
44
|
-
return;
|
45
|
-
}
|
46
|
-
};
|
47
|
-
return ChangeStateBottomSheet;
|
48
|
-
}(com.google.android.material.bottomsheet.BottomSheetBehavior.BottomSheetCallback));
|
49
|
-
export class ViewWithBottomSheet extends ViewWithBottomSheetBase {
|
50
|
-
_hideNativeBottomSheet(parent, whenClosedCallback) {
|
51
|
-
// call whenClosedCallback first because dismiss will call another one (without result)
|
52
|
-
whenClosedCallback();
|
53
|
-
const manager = this._bottomSheetFragment.getFragmentManager();
|
54
|
-
if (manager) {
|
55
|
-
this._bottomSheetFragment.dismissAllowingStateLoss();
|
56
|
-
}
|
57
|
-
this._bottomSheetFragment = null;
|
58
|
-
}
|
59
|
-
_showNativeBottomSheet(parent, options) {
|
60
|
-
this._commonShowNativeBottomSheet(parent, options);
|
61
|
-
const owner = this;
|
62
|
-
const domId = this._domId;
|
63
|
-
const bottomSheetOptions = {
|
64
|
-
owner: this,
|
65
|
-
options,
|
66
|
-
shownCallback: () => {
|
67
|
-
this.bindingContext = fromObject(options.context);
|
68
|
-
this._raiseShownBottomSheetEvent();
|
69
|
-
},
|
70
|
-
dismissCallback: () => this._onDismissBottomSheetCallback()
|
71
|
-
};
|
72
|
-
const dfListener = new com.nativescript.material.bottomsheet.BottomSheetDialogFragment.BottomSheetDialogFragmentListener({
|
73
|
-
onCreateDialog(fragment, savedInstanceState) {
|
74
|
-
const theme = fragment.getTheme();
|
75
|
-
const dialogListener = new com.nativescript.material.bottomsheet.BottomSheetDialog.BottomSheetDialogListener({
|
76
|
-
onDetachedFromWindow(dialog) {
|
77
|
-
dialog.nListener = null;
|
78
|
-
},
|
79
|
-
onBackPressed(dialog) {
|
80
|
-
if (bottomSheetOptions.options && bottomSheetOptions.options.dismissOnBackButton === false) {
|
81
|
-
return true;
|
82
|
-
}
|
83
|
-
if (!owner) {
|
84
|
-
return false;
|
85
|
-
}
|
86
|
-
const args = {
|
87
|
-
eventName: 'activityBackPressed',
|
88
|
-
object: owner,
|
89
|
-
activity: owner._context,
|
90
|
-
cancel: false
|
91
|
-
};
|
92
|
-
// Fist fire application.android global event
|
93
|
-
Application.android.notify(args);
|
94
|
-
if (args.cancel) {
|
95
|
-
return true;
|
96
|
-
}
|
97
|
-
owner.notify(args);
|
98
|
-
if (!args.cancel) {
|
99
|
-
args.cancel = owner.onBackPressed();
|
100
|
-
}
|
101
|
-
return args.cancel;
|
102
|
-
}
|
103
|
-
});
|
104
|
-
const dialog = new com.nativescript.material.bottomsheet.BottomSheetDialog(fragment.getActivity(), theme);
|
105
|
-
dialog.setListener(dialogListener);
|
106
|
-
dialog.nListener = dialogListener;
|
107
|
-
if (bottomSheetOptions.options) {
|
108
|
-
const creationOptions = bottomSheetOptions.options;
|
109
|
-
if (creationOptions.dismissOnBackgroundTap !== undefined) {
|
110
|
-
dialog.setCanceledOnTouchOutside(creationOptions.dismissOnBackgroundTap);
|
111
|
-
}
|
112
|
-
if (creationOptions.disableDimBackground === true) {
|
113
|
-
dialog.getWindow().clearFlags(android.view.WindowManager.LayoutParams.FLAG_DIM_BEHIND);
|
114
|
-
}
|
115
|
-
}
|
116
|
-
return dialog;
|
117
|
-
},
|
118
|
-
onCreateView(fragment, inflater, container, savedInstanceState) {
|
119
|
-
owner._setupAsRootView(fragment.getActivity());
|
120
|
-
owner.parent = Application.getRootView();
|
121
|
-
owner._isAddedToNativeVisualTree = true;
|
122
|
-
return owner.nativeViewProtected;
|
123
|
-
},
|
124
|
-
onStart(fragment) {
|
125
|
-
const color = owner.backgroundColor;
|
126
|
-
const contentViewId = getId('design_bottom_sheet');
|
127
|
-
const view = fragment.getDialog().findViewById(contentViewId);
|
128
|
-
const transparent = bottomSheetOptions.options?.transparent === true;
|
129
|
-
if (transparent) {
|
130
|
-
// we need delay it just a bit or it wont work
|
131
|
-
setTimeout(() => {
|
132
|
-
view.setBackground(null);
|
133
|
-
}, 0);
|
134
|
-
}
|
135
|
-
const behavior = com.google.android.material.bottomsheet.BottomSheetBehavior.from(view);
|
136
|
-
// prevent hiding the bottom sheet by
|
137
|
-
const dismissOnDraggingDownSheet = bottomSheetOptions.options?.dismissOnDraggingDownSheet !== false;
|
138
|
-
behavior.setHideable(dismissOnDraggingDownSheet);
|
139
|
-
const peekHeight = bottomSheetOptions.options?.peekHeight;
|
140
|
-
if (peekHeight) {
|
141
|
-
behavior.setState(com.google.android.material.bottomsheet.BottomSheetBehavior.STATE_COLLAPSED);
|
142
|
-
behavior.setPeekHeight(Utils.layout.toDevicePixels(peekHeight));
|
143
|
-
}
|
144
|
-
if (!dismissOnDraggingDownSheet) {
|
145
|
-
// directly expand the bottom sheet after start
|
146
|
-
behavior.setState(com.google.android.material.bottomsheet.BottomSheetBehavior.STATE_EXPANDED);
|
147
|
-
// set to maximum possible value to prevent dragging the sheet between peek and expanded height
|
148
|
-
behavior.setPeekHeight(java.lang.Integer.MAX_VALUE);
|
149
|
-
}
|
150
|
-
const skipCollapsedState = bottomSheetOptions.options?.skipCollapsedState === true;
|
151
|
-
if (skipCollapsedState) {
|
152
|
-
// directly expand the bottom sheet after start
|
153
|
-
behavior.setState(com.google.android.material.bottomsheet.BottomSheetBehavior.STATE_EXPANDED);
|
154
|
-
// disable peek/collapsed state
|
155
|
-
behavior.setSkipCollapsed(true);
|
156
|
-
}
|
157
|
-
const onChangeState = bottomSheetOptions.options?.onChangeState;
|
158
|
-
if (onChangeState) {
|
159
|
-
const changeStateBottomSheet = new ChangeStateBottomSheet(owner);
|
160
|
-
behavior.addBottomSheetCallback(changeStateBottomSheet);
|
161
|
-
owner._onChangeStateBottomSheetCallback(changeStateBottomSheet.getStateBottomSheetFromBottomSheetBehavior(behavior.getState()));
|
162
|
-
}
|
163
|
-
if (owner && !owner.isLoaded) {
|
164
|
-
owner.callLoaded();
|
165
|
-
}
|
166
|
-
if (bottomSheetOptions.options.canTouchBehind) {
|
167
|
-
// necessary for smooth movement of the back page
|
168
|
-
fragment.getDialog().getWindow().setFlags(android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE);
|
169
|
-
const coordinator = view.getParent();
|
170
|
-
if (coordinator instanceof android.view.View) {
|
171
|
-
coordinator.findViewById(getId('touch_outside')).setOnTouchListener(new android.view.View.OnTouchListener({
|
172
|
-
onTouch(view, event) {
|
173
|
-
fragment.getActivity().dispatchTouchEvent(event);
|
174
|
-
return false;
|
175
|
-
}
|
176
|
-
}));
|
177
|
-
}
|
178
|
-
}
|
179
|
-
bottomSheetOptions.shownCallback();
|
180
|
-
},
|
181
|
-
onDismiss(fragment, dialog) {
|
182
|
-
if (owner) {
|
183
|
-
owner._bottomSheetCloseIgnore = true;
|
184
|
-
}
|
185
|
-
bottomSheetOptions.dismissCallback();
|
186
|
-
},
|
187
|
-
onDestroy(fragment) {
|
188
|
-
df.nListener = null;
|
189
|
-
if (owner) {
|
190
|
-
owner._bottomSheetCloseIgnore = false;
|
191
|
-
owner._bottomSheetClosed();
|
192
|
-
}
|
193
|
-
}
|
194
|
-
});
|
195
|
-
const df = new com.nativescript.material.bottomsheet.BottomSheetDialogFragment();
|
196
|
-
df.setListener(dfListener);
|
197
|
-
df.nListener = dfListener;
|
198
|
-
this._bottomSheetFragment = df;
|
199
|
-
this._raiseShowingBottomSheetEvent();
|
200
|
-
//@ts-ignore
|
201
|
-
df.show(parent._getRootFragmentManager(), domId.toString());
|
202
|
-
}
|
203
|
-
}
|
204
|
-
let mixinInstalled = false;
|
205
|
-
export function overrideBottomSheet() {
|
206
|
-
applyMixins(View, [ViewWithBottomSheetBase, ViewWithBottomSheet]);
|
207
|
-
}
|
208
|
-
export function install() {
|
209
|
-
if (!mixinInstalled) {
|
210
|
-
mixinInstalled = true;
|
211
|
-
// overridePage();
|
212
|
-
overrideBottomSheet();
|
213
|
-
}
|
214
|
-
}
|
215
|
-
//# sourceMappingURL=bottomsheet.android.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"bottomsheet.android.js","sourceRoot":"../src/","sources":["bottomsheet.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAuC,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC/G,OAAO,EAAsB,gBAAgB,EAAE,uBAAuB,EAAE,M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uC;gBACxH,IAAI,KAAK,EAAE;oBACP,KAAK,CAAC,uBAAuB,GAAG,IAAI,CAAC;iBACxC;gBACD,kBAAkB,CAAC,eAAe,EAAE,CAAC;YACzC,CAAC;YAED,SAAS,CAAC,QAAyE;gBAC9E,EAAU,CAAC,SAAS,GAAG,IAAI,CAAC;gBAC7B,IAAI,KAAK,EAAE;oBACP,KAAK,CAAC,uBAAuB,GAAG,KAAK,CAAC;oBACtC,KAAK,CAAC,kBAAkB,EAAE,CAAC;iBAC9B;YACL,CAAC;SACJ,CAAC,CAAC;QACH,MAAM,EAAE,GAAG,IAAI,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,yBAAyB,EAAE,CAAC;QACjF,EAAE,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAC1B,EAAU,CAAC,SAAS,GAAG,UAAU,CAAC;QACnC,IAAI,CAAC,oBAAoB,GAAG,EAAE,CAAC;QAC/B,IAAI,CAAC,6BAA6B,EAAE,CAAC;QACrC,YAAY;QACZ,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,uBAAuB,EAAE,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IAChE,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;QACjB,cAAc,GAAG,IAAI,CAAC;QACtB,kBAAkB;QAClB,mBAAmB,EAAE,CAAC;KACzB;AACL,CAAC"}
|
package/bottomsheet.d.ts
DELETED
@@ -1,86 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Material BottomSheet component
|
3
|
-
* @module @nativescript-community/ui-material-bottomsheet
|
4
|
-
*/
|
5
|
-
|
6
|
-
import { View, ViewBase } from '@nativescript/core';
|
7
|
-
import { BottomSheetOptions } from './bottomsheet-common';
|
8
|
-
|
9
|
-
export { BottomSheetOptions };
|
10
|
-
|
11
|
-
export declare abstract class ViewWithBottomSheetBase extends View {
|
12
|
-
// used when triggering the closing of the bottomsheet
|
13
|
-
/**
|
14
|
-
* @hidden
|
15
|
-
*/
|
16
|
-
protected _closeBottomSheetCallback: Function;
|
17
|
-
|
18
|
-
// used when the bottomSheet is dismissed
|
19
|
-
/**
|
20
|
-
* @hidden
|
21
|
-
*/
|
22
|
-
public _onDismissBottomSheetCallback: Function;
|
23
|
-
|
24
|
-
/**
|
25
|
-
* @hidden
|
26
|
-
*/
|
27
|
-
_bottomSheetFragment: any; // com.google.android.material.bottomsheet.BottomSheetDialogFragment
|
28
|
-
|
29
|
-
/**
|
30
|
-
* @hidden
|
31
|
-
*/
|
32
|
-
protected abstract _hideNativeBottomSheet(parent: any, whenClosedCallback: any): void;
|
33
|
-
|
34
|
-
/**
|
35
|
-
* @hidden
|
36
|
-
*/
|
37
|
-
protected _bottomSheetContext: any;
|
38
|
-
|
39
|
-
/**
|
40
|
-
* @hidden
|
41
|
-
*/
|
42
|
-
_raiseShownBottomSheetEvent(): void;
|
43
|
-
|
44
|
-
/**
|
45
|
-
* @hidden
|
46
|
-
*/
|
47
|
-
public _bottomSheetClosed(): void;
|
48
|
-
|
49
|
-
/**
|
50
|
-
* @hidden
|
51
|
-
*/
|
52
|
-
protected abstract _showNativeBottomSheet(parent: View, options: BottomSheetOptions): void;
|
53
|
-
|
54
|
-
/**
|
55
|
-
* @hidden
|
56
|
-
*/
|
57
|
-
protected _commonShowNativeBottomSheet(parent: View, options: BottomSheetOptions): void;
|
58
|
-
|
59
|
-
/**
|
60
|
-
* @hidden
|
61
|
-
*/
|
62
|
-
protected _raiseShowingBottomSheetEvent(): void;
|
63
|
-
|
64
|
-
/**
|
65
|
-
* closes the current BottomSheet
|
66
|
-
*
|
67
|
-
* @param args anything you want as a result of the `showBottomSheet` Promise
|
68
|
-
*/
|
69
|
-
public closeBottomSheet(...args: any): void;
|
70
|
-
|
71
|
-
/**
|
72
|
-
* shows a modal BottomSheet
|
73
|
-
*
|
74
|
-
* @param {BottomSheetOptions} options
|
75
|
-
* @returns {View} view - the view shown in the BottomSheet
|
76
|
-
*/
|
77
|
-
public showBottomSheet(options: BottomSheetOptions): ViewBase;
|
78
|
-
}
|
79
|
-
export function install(): void;
|
80
|
-
|
81
|
-
declare module '@nativescript/core/ui/core/view' {
|
82
|
-
interface View {
|
83
|
-
closeBottomSheet(...args: any): void;
|
84
|
-
showBottomSheet(options: BottomSheetOptions): ViewBase;
|
85
|
-
}
|
86
|
-
}
|
package/bottomsheet.ios.d.ts
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
import { View } from '@nativescript/core';
|
2
|
-
import { BottomSheetOptions } from './bottomsheet';
|
3
|
-
import { ViewWithBottomSheetBase } from './bottomsheet-common';
|
4
|
-
export { ViewWithBottomSheetBase } from './bottomsheet-common';
|
5
|
-
declare class IMDCBottomSheetControllerDelegateImpl extends NSObject implements MDCBottomSheetControllerDelegate {
|
6
|
-
static new(): IMDCBottomSheetControllerDelegateImpl;
|
7
|
-
_owner: WeakRef<ViewWithBottomSheet>;
|
8
|
-
}
|
9
|
-
export declare class ViewWithBottomSheet extends ViewWithBottomSheetBase {
|
10
|
-
bottomSheetControllerDelegate: IMDCBottomSheetControllerDelegateImpl;
|
11
|
-
bottomSheetController: MDCBottomSheetController;
|
12
|
-
protected _showNativeBottomSheet(parent: View, options: BottomSheetOptions): void;
|
13
|
-
_bottomSheetClosed(): void;
|
14
|
-
protected _hideNativeBottomSheet(parent: View, whenClosedCallback: () => void): void;
|
15
|
-
_unloadBottomSheet(): void;
|
16
|
-
}
|
17
|
-
export declare function overrideBottomSheet(): void;
|
18
|
-
export declare function install(): void;
|