@nativescript-community/ui-material-bottomsheet 7.1.2 → 7.1.4

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.
@@ -0,0 +1,10 @@
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
+ }
@@ -0,0 +1,28 @@
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 declare 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
+ }
@@ -0,0 +1,2 @@
1
+ export * from './bottomsheet.module';
2
+ export * from './bottomsheet.service';
@@ -0,0 +1,58 @@
1
+ import { EventData, View, ViewBase } 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 declare 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 | ViewBase;
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
+ _bottomSheetClosed(): void;
52
+ protected abstract _showNativeBottomSheet(parent: View, options: BottomSheetOptions): any;
53
+ protected _commonShowNativeBottomSheet(parent: View, options: BottomSheetOptions): void;
54
+ protected _raiseShowingBottomSheetEvent(): void;
55
+ _raiseClosedBottomSheetEvent(): void;
56
+ closeBottomSheet(...args: any[]): void;
57
+ showBottomSheet(options: BottomSheetOptions): ViewBase;
58
+ }
package/bottomsheet.d.ts CHANGED
@@ -84,10 +84,3 @@ declare module '@nativescript/core/ui/core/view' {
84
84
  showBottomSheet(options: BottomSheetOptions): ViewBase;
85
85
  }
86
86
  }
87
-
88
- declare module '@nativescript/core' {
89
- interface View {
90
- closeBottomSheet(...args: any): void;
91
- showBottomSheet(options: BottomSheetOptions): ViewBase;
92
- }
93
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nativescript-community/ui-material-bottomsheet",
3
- "version": "7.1.2",
3
+ "version": "7.1.4",
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.1.2"
49
+ "@nativescript-community/ui-material-core": "^7.1.4"
50
50
  },
51
- "gitHead": "227429afb7fd24e09466bd1b400f91312df6fa9e"
51
+ "gitHead": "8052d595674b39c5d2369b44c29823ad09eb8a83"
52
52
  }
package/vue3/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { App, createApp } from 'nativescript-vue';
1
+ import { createApp } from 'nativescript-vue';
2
2
  import { Frame, View, ViewBase } from '@nativescript/core';
3
3
  const modalStack = [];
4
4
  const useBottomSheet = () => {
package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