@mintplayer/ng-bootstrap 15.12.0 → 15.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/navbar/src/nav-link/nav-link.directive.mjs +10 -5
- package/esm2020/navbar/src/navbar-nav/navbar-nav.component.mjs +8 -5
- package/esm2020/navigation-lock/index.mjs +2 -0
- package/esm2020/navigation-lock/mintplayer-ng-bootstrap-navigation-lock.mjs +5 -0
- package/esm2020/navigation-lock/src/directive/navigation-lock.directive.mjs +94 -0
- package/esm2020/navigation-lock/src/guard/navigation-lock.guard.mjs +22 -0
- package/esm2020/navigation-lock/src/index.mjs +5 -0
- package/esm2020/navigation-lock/src/interface/has-navigation-lock.mjs +2 -0
- package/esm2020/navigation-lock/src/navigation-lock.module.mjs +28 -0
- package/esm2020/offcanvas/src/directives/offcanvas-push/offcanvas-push.directive.mjs +1 -2
- package/fesm2015/mintplayer-ng-bootstrap-navbar.mjs +16 -8
- package/fesm2015/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
- package/fesm2015/mintplayer-ng-bootstrap-navigation-lock.mjs +148 -0
- package/fesm2015/mintplayer-ng-bootstrap-navigation-lock.mjs.map +1 -0
- package/fesm2015/mintplayer-ng-bootstrap-offcanvas.mjs +0 -1
- package/fesm2015/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
- package/fesm2020/mintplayer-ng-bootstrap-navbar.mjs +16 -8
- package/fesm2020/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
- package/fesm2020/mintplayer-ng-bootstrap-navigation-lock.mjs +145 -0
- package/fesm2020/mintplayer-ng-bootstrap-navigation-lock.mjs.map +1 -0
- package/fesm2020/mintplayer-ng-bootstrap-offcanvas.mjs +0 -1
- package/fesm2020/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
- package/navbar/src/nav-link/nav-link.directive.d.ts +2 -1
- package/navigation-lock/index.d.ts +1 -0
- package/navigation-lock/src/directive/navigation-lock.directive.d.ts +34 -0
- package/navigation-lock/src/guard/navigation-lock.guard.d.ts +8 -0
- package/navigation-lock/src/index.d.ts +4 -0
- package/navigation-lock/src/interface/has-navigation-lock.d.ts +15 -0
- package/navigation-lock/src/navigation-lock.module.d.ts +9 -0
- package/package.json +9 -1
|
@@ -4,6 +4,7 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
export declare class NavLinkDirective {
|
|
5
5
|
private elementRef;
|
|
6
6
|
constructor(elementRef: ElementRef<HTMLAnchorElement>, parentDropdown: BsNavbarDropdownComponent);
|
|
7
|
+
cursorPointer: boolean;
|
|
7
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<NavLinkDirective, [null, { optional: true; }]>;
|
|
8
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NavLinkDirective, "bs-navbar-item > a
|
|
9
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NavLinkDirective, "bs-navbar-item:first-child > a", never, {}, {}, never, never, false, never>;
|
|
9
10
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
|
+
import { Subject, Observable } from 'rxjs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Places a navigation lock on this page.
|
|
7
|
+
*
|
|
8
|
+
* Don't forget to add the following to your route:
|
|
9
|
+
*
|
|
10
|
+
* ```ts
|
|
11
|
+
* canDeactivate: [BsNavigationLockGuard]
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* and implement the `BsHasNavigationLock` on the page:
|
|
15
|
+
*
|
|
16
|
+
* ```ts
|
|
17
|
+
* ViewChild('navigationLock') navigationLock!: BsNavigationLockDirective;
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
**/
|
|
21
|
+
export declare class BsNavigationLockDirective implements OnDestroy {
|
|
22
|
+
private router;
|
|
23
|
+
private route;
|
|
24
|
+
constructor(router: Router, route: ActivatedRoute);
|
|
25
|
+
canExit?: boolean | (() => boolean) | Observable<boolean>;
|
|
26
|
+
exitMessage?: string;
|
|
27
|
+
requestCanExit(): Promise<boolean>;
|
|
28
|
+
onBeforeUnload(ev: BeforeUnloadEvent): Promise<string | undefined>;
|
|
29
|
+
onUnload(ev: Event): void;
|
|
30
|
+
ngOnDestroy(): void;
|
|
31
|
+
destroyed$: Subject<unknown>;
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BsNavigationLockDirective, never>;
|
|
33
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BsNavigationLockDirective, "[bsNavigationLock]", ["bsNavigationLock"], { "canExit": "canExit"; "exitMessage": "exitMessage"; }, {}, never, never, false, never>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ActivatedRouteSnapshot, CanDeactivate, RouterStateSnapshot, UrlTree } from '@angular/router';
|
|
2
|
+
import { BsHasNavigationLock } from '../interface/has-navigation-lock';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class BsNavigationLockGuard implements CanDeactivate<BsHasNavigationLock> {
|
|
5
|
+
canDeactivate(component: BsHasNavigationLock, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState?: RouterStateSnapshot): Promise<boolean | UrlTree>;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BsNavigationLockGuard, never>;
|
|
7
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BsNavigationLockGuard>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BsNavigationLockDirective } from "../directive/navigation-lock.directive";
|
|
2
|
+
/**
|
|
3
|
+
* Implement this interface on pages that use the `<... bsNavigationLock>` directive:
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
*
|
|
7
|
+
* ```ts
|
|
8
|
+
* ViewChild('navigationLock') navigationLock!: BsNavigationLockDirective;
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* Don't forget to add the `canDeactivate: [BsNavigationLockGuard]` guard to your page route.
|
|
12
|
+
*/
|
|
13
|
+
export interface BsHasNavigationLock {
|
|
14
|
+
navigationLock: BsNavigationLockDirective;
|
|
15
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./directive/navigation-lock.directive";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@angular/router";
|
|
5
|
+
export declare class BsNavigationLockModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BsNavigationLockModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<BsNavigationLockModule, [typeof i1.BsNavigationLockDirective], [typeof i2.CommonModule, typeof i3.RouterModule], [typeof i1.BsNavigationLockDirective]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<BsNavigationLockModule>;
|
|
9
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintplayer/ng-bootstrap",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "15.
|
|
4
|
+
"version": "15.13.1",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/MintPlayer/mintplayer-ng-bootstrap",
|
|
@@ -316,6 +316,14 @@
|
|
|
316
316
|
"node": "./fesm2015/mintplayer-ng-bootstrap-navbar.mjs",
|
|
317
317
|
"default": "./fesm2020/mintplayer-ng-bootstrap-navbar.mjs"
|
|
318
318
|
},
|
|
319
|
+
"./navigation-lock": {
|
|
320
|
+
"types": "./navigation-lock/index.d.ts",
|
|
321
|
+
"esm2020": "./esm2020/navigation-lock/mintplayer-ng-bootstrap-navigation-lock.mjs",
|
|
322
|
+
"es2020": "./fesm2020/mintplayer-ng-bootstrap-navigation-lock.mjs",
|
|
323
|
+
"es2015": "./fesm2015/mintplayer-ng-bootstrap-navigation-lock.mjs",
|
|
324
|
+
"node": "./fesm2015/mintplayer-ng-bootstrap-navigation-lock.mjs",
|
|
325
|
+
"default": "./fesm2020/mintplayer-ng-bootstrap-navigation-lock.mjs"
|
|
326
|
+
},
|
|
319
327
|
"./offcanvas": {
|
|
320
328
|
"types": "./offcanvas/index.d.ts",
|
|
321
329
|
"esm2020": "./esm2020/offcanvas/mintplayer-ng-bootstrap-offcanvas.mjs",
|