@mintplayer/ng-bootstrap 12.0.0 → 12.0.2
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/bundles/mintplayer-ng-bootstrap.umd.js +339 -34
- package/bundles/mintplayer-ng-bootstrap.umd.js.map +1 -1
- package/esm2015/lib/components/carousel/carousel/carousel.component.js +70 -0
- package/esm2015/lib/components/carousel/carousel/carousel.component.js.map +1 -0
- package/esm2015/lib/components/carousel/carousel-image/carousel-image.directive.js +14 -0
- package/esm2015/lib/components/carousel/carousel-image/carousel-image.directive.js.map +1 -0
- package/esm2015/lib/components/carousel/carousel.module.js +31 -0
- package/esm2015/lib/components/carousel/carousel.module.js.map +1 -0
- package/esm2015/lib/components/carousel/index.js +4 -0
- package/esm2015/lib/components/carousel/index.js.map +1 -0
- package/esm2015/lib/components/index.js +1 -0
- package/esm2015/lib/components/index.js.map +1 -1
- package/esm2015/lib/components/navbar/dropdown-toggle/dropdown-toggle.directive.js +38 -0
- package/esm2015/lib/components/navbar/dropdown-toggle/dropdown-toggle.directive.js.map +1 -0
- package/esm2015/lib/components/navbar/index.js +4 -0
- package/esm2015/lib/components/navbar/index.js.map +1 -1
- package/esm2015/lib/components/navbar/nav-link/nav-link.directive.js +29 -0
- package/esm2015/lib/components/navbar/nav-link/nav-link.directive.js.map +1 -0
- package/esm2015/lib/components/navbar/navbar/navbar.component.js +8 -6
- package/esm2015/lib/components/navbar/navbar/navbar.component.js.map +1 -1
- package/esm2015/lib/components/navbar/navbar-content/navbar-content.directive.js +33 -0
- package/esm2015/lib/components/navbar/navbar-content/navbar-content.directive.js.map +1 -0
- package/esm2015/lib/components/navbar/navbar-dropdown/navbar-dropdown.component.js +26 -5
- package/esm2015/lib/components/navbar/navbar-dropdown/navbar-dropdown.component.js.map +1 -1
- package/esm2015/lib/components/navbar/navbar-item/navbar-item.component.js +38 -5
- package/esm2015/lib/components/navbar/navbar-item/navbar-item.component.js.map +1 -1
- package/esm2015/lib/components/navbar/navbar-nav/navbar-nav.component.js +22 -6
- package/esm2015/lib/components/navbar/navbar-nav/navbar-nav.component.js.map +1 -1
- package/esm2015/lib/components/navbar/navbar.module.js +29 -6
- package/esm2015/lib/components/navbar/navbar.module.js.map +1 -1
- package/fesm2015/mintplayer-ng-bootstrap.js +308 -32
- package/fesm2015/mintplayer-ng-bootstrap.js.map +1 -1
- package/lib/components/carousel/carousel/carousel.component.d.ts +18 -0
- package/lib/components/carousel/carousel-image/carousel-image.directive.d.ts +6 -0
- package/lib/components/carousel/carousel.module.d.ts +9 -0
- package/lib/components/carousel/index.d.ts +3 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/navbar/dropdown-toggle/dropdown-toggle.directive.d.ts +13 -0
- package/lib/components/navbar/index.d.ts +3 -0
- package/lib/components/navbar/nav-link/nav-link.directive.d.ts +9 -0
- package/lib/components/navbar/navbar/navbar.component.d.ts +5 -4
- package/lib/components/navbar/navbar-content/navbar-content.directive.d.ts +14 -0
- package/lib/components/navbar/navbar-dropdown/navbar-dropdown.component.d.ts +10 -4
- package/lib/components/navbar/navbar-item/navbar-item.component.d.ts +12 -5
- package/lib/components/navbar/navbar-nav/navbar-nav.component.d.ts +7 -2
- package/lib/components/navbar/navbar.module.d.ts +7 -2
- package/package.json +5 -2
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ContentChildren, Directive, ElementRef, forwardRef, Inject, Optional } from '@angular/core';
|
|
2
|
+
import { BsNavbarItemComponent } from '../navbar-item/navbar-item.component';
|
|
3
|
+
import { BsNavbarDropdownComponent } from '../navbar-dropdown/navbar-dropdown.component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "../navbar-item/navbar-item.component";
|
|
6
|
+
import * as i2 from "../navbar-dropdown/navbar-dropdown.component";
|
|
7
|
+
export class DropdownToggleDirective {
|
|
8
|
+
constructor(elementRef, bsNavbarItem, parentDropdown) {
|
|
9
|
+
this.elementRef = elementRef;
|
|
10
|
+
this.bsNavbarItem = bsNavbarItem;
|
|
11
|
+
}
|
|
12
|
+
ngAfterContentInit() {
|
|
13
|
+
if (this.bsNavbarItem.dropdowns.length > 0) {
|
|
14
|
+
this.bsNavbarItem.hasDropdown = true;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
DropdownToggleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: DropdownToggleDirective, deps: [{ token: i0.ElementRef }, { token: forwardRef(() => BsNavbarItemComponent) }, { token: forwardRef(() => BsNavbarDropdownComponent), optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
19
|
+
DropdownToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.0", type: DropdownToggleDirective, selector: "bs-navbar-item", queries: [{ propertyName: "childDropdowns", predicate: BsNavbarDropdownComponent }], ngImport: i0 });
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: DropdownToggleDirective, decorators: [{
|
|
21
|
+
type: Directive,
|
|
22
|
+
args: [{
|
|
23
|
+
// selector: 'bs-navbar-item > a[routerLink]',
|
|
24
|
+
selector: 'bs-navbar-item',
|
|
25
|
+
queries: {
|
|
26
|
+
childDropdowns: new ContentChildren(BsNavbarDropdownComponent)
|
|
27
|
+
}
|
|
28
|
+
}]
|
|
29
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.BsNavbarItemComponent, decorators: [{
|
|
30
|
+
type: Inject,
|
|
31
|
+
args: [forwardRef(() => BsNavbarItemComponent)]
|
|
32
|
+
}] }, { type: i2.BsNavbarDropdownComponent, decorators: [{
|
|
33
|
+
type: Optional
|
|
34
|
+
}, {
|
|
35
|
+
type: Inject,
|
|
36
|
+
args: [forwardRef(() => BsNavbarDropdownComponent)]
|
|
37
|
+
}] }]; } });
|
|
38
|
+
//# sourceMappingURL=dropdown-toggle.directive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-toggle.directive.js","sourceRoot":"","sources":["../../../../../../../../libs/mintplayer-ng-bootstrap/src/lib/components/navbar/dropdown-toggle/dropdown-toggle.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,eAAe,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAa,MAAM,eAAe,CAAC;AAC7I,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;;;;AASzF,MAAM,OAAO,uBAAuB;IAElC,YACU,UAAyC,EACQ,YAAmC,EAC3B,cAAyC;QAFlG,eAAU,GAAV,UAAU,CAA+B;QACQ,iBAAY,GAAZ,YAAY,CAAuB;IAG9F,CAAC;IAID,kBAAkB;QAChB,IAAI,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE;YAC1C,IAAI,CAAC,YAAY,CAAC,WAAW,GAAG,IAAI,CAAC;SACtC;IACH,CAAC;;oHAfU,uBAAuB,4CAIxB,UAAU,CAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC,aAC3B,UAAU,CAAC,GAAG,EAAE,CAAC,yBAAyB,CAAC;wGALtD,uBAAuB,qFAHI,yBAAyB;2FAGpD,uBAAuB;kBAPnC,SAAS;mBAAC;oBACT,8CAA8C;oBAC9C,QAAQ,EAAE,gBAAgB;oBAC1B,OAAO,EAAE;wBACP,cAAc,EAAE,IAAI,eAAe,CAAC,yBAAyB,CAAC;qBAC/D;iBACF;;0BAKI,MAAM;2BAAC,UAAU,CAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC;;0BAC9C,QAAQ;;0BAAI,MAAM;2BAAC,UAAU,CAAC,GAAG,EAAE,CAAC,yBAAyB,CAAC","sourcesContent":["import { AfterContentInit, Component, ContentChildren, Directive, ElementRef, forwardRef, Inject, Optional, QueryList } from '@angular/core';\nimport { BsNavbarItemComponent } from '../navbar-item/navbar-item.component';\nimport { BsNavbarDropdownComponent } from '../navbar-dropdown/navbar-dropdown.component';\n\n@Directive({\n // selector: 'bs-navbar-item > a[routerLink]',\n selector: 'bs-navbar-item',\n queries: {\n childDropdowns: new ContentChildren(BsNavbarDropdownComponent)\n }\n})\nexport class DropdownToggleDirective implements AfterContentInit {\n\n constructor(\n private elementRef: ElementRef<HTMLAnchorElement>,\n @Inject(forwardRef(() => BsNavbarItemComponent)) private bsNavbarItem: BsNavbarItemComponent,\n @Optional() @Inject(forwardRef(() => BsNavbarDropdownComponent)) parentDropdown: BsNavbarDropdownComponent\n ) {\n }\n\n childDropdowns!: QueryList<BsNavbarDropdownComponent>;\n\n ngAfterContentInit() {\n if (this.bsNavbarItem.dropdowns.length > 0) {\n this.bsNavbarItem.hasDropdown = true;\n }\n }\n}"]}
|
|
@@ -3,4 +3,8 @@ export * from './navbar/navbar.component';
|
|
|
3
3
|
export * from './navbar-nav/navbar-nav.component';
|
|
4
4
|
export * from './navbar-dropdown/navbar-dropdown.component';
|
|
5
5
|
export * from './navbar-item/navbar-item.component';
|
|
6
|
+
export * from './navbar-content/navbar-content.directive';
|
|
7
|
+
// Not for end-use
|
|
8
|
+
export * from './dropdown-toggle/dropdown-toggle.directive';
|
|
9
|
+
export * from './nav-link/nav-link.directive';
|
|
6
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/mintplayer-ng-bootstrap/src/lib/components/navbar/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,qCAAqC,CAAC","sourcesContent":["export * from './navbar.module';\nexport * from './navbar/navbar.component';\nexport * from './navbar-nav/navbar-nav.component';\nexport * from './navbar-dropdown/navbar-dropdown.component';\nexport * from './navbar-item/navbar-item.component';"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/mintplayer-ng-bootstrap/src/lib/components/navbar/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,qCAAqC,CAAC;AACpD,cAAc,2CAA2C,CAAC;AAE1D,kBAAkB;AAClB,cAAc,6CAA6C,CAAC;AAC5D,cAAc,+BAA+B,CAAC","sourcesContent":["export * from './navbar.module';\nexport * from './navbar/navbar.component';\nexport * from './navbar-nav/navbar-nav.component';\nexport * from './navbar-dropdown/navbar-dropdown.component';\nexport * from './navbar-item/navbar-item.component';\nexport * from './navbar-content/navbar-content.directive';\n\n// Not for end-use\nexport * from './dropdown-toggle/dropdown-toggle.directive';\nexport * from './nav-link/nav-link.directive';"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Directive, ElementRef, forwardRef, Inject, Optional } from '@angular/core';
|
|
2
|
+
import { BsNavbarDropdownComponent } from '../navbar-dropdown/navbar-dropdown.component';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "../navbar-dropdown/navbar-dropdown.component";
|
|
5
|
+
export class NavLinkDirective {
|
|
6
|
+
constructor(elementRef, parentDropdown) {
|
|
7
|
+
this.elementRef = elementRef;
|
|
8
|
+
if (parentDropdown == null) {
|
|
9
|
+
this.elementRef.nativeElement.classList.add('nav-link');
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
this.elementRef.nativeElement.classList.add('dropdown-item');
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
NavLinkDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: NavLinkDirective, deps: [{ token: i0.ElementRef }, { token: forwardRef(() => BsNavbarDropdownComponent), optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
17
|
+
NavLinkDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.0", type: NavLinkDirective, selector: "bs-navbar-item > a[routerLink]", ngImport: i0 });
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: NavLinkDirective, decorators: [{
|
|
19
|
+
type: Directive,
|
|
20
|
+
args: [{
|
|
21
|
+
selector: 'bs-navbar-item > a[routerLink]'
|
|
22
|
+
}]
|
|
23
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.BsNavbarDropdownComponent, decorators: [{
|
|
24
|
+
type: Optional
|
|
25
|
+
}, {
|
|
26
|
+
type: Inject,
|
|
27
|
+
args: [forwardRef(() => BsNavbarDropdownComponent)]
|
|
28
|
+
}] }]; } });
|
|
29
|
+
//# sourceMappingURL=nav-link.directive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nav-link.directive.js","sourceRoot":"","sources":["../../../../../../../../libs/mintplayer-ng-bootstrap/src/lib/components/navbar/nav-link/nav-link.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC/F,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;;;AAKzF,MAAM,OAAO,gBAAgB;IAE3B,YACU,UAAyC,EACgB,cAAyC;QADlG,eAAU,GAAV,UAAU,CAA+B;QAGjD,IAAI,cAAc,IAAI,IAAI,EAAE;YAC1B,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;SACzD;aAAM;YACL,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;SAC9D;IACH,CAAC;;6GAXU,gBAAgB,4CAIL,UAAU,CAAC,GAAG,EAAE,CAAC,yBAAyB,CAAC;iGAJtD,gBAAgB;2FAAhB,gBAAgB;kBAH5B,SAAS;mBAAC;oBACT,QAAQ,EAAE,gCAAgC;iBAC3C;;0BAKI,QAAQ;;0BAAI,MAAM;2BAAC,UAAU,CAAC,GAAG,EAAE,CAAC,yBAAyB,CAAC","sourcesContent":["import { Component, Directive, ElementRef, forwardRef, Inject, Optional } from '@angular/core';\nimport { BsNavbarDropdownComponent } from '../navbar-dropdown/navbar-dropdown.component';\n\n@Directive({\n selector: 'bs-navbar-item > a[routerLink]'\n})\nexport class NavLinkDirective {\n\n constructor(\n private elementRef: ElementRef<HTMLAnchorElement>,\n @Optional() @Inject(forwardRef(() => BsNavbarDropdownComponent)) parentDropdown: BsNavbarDropdownComponent\n ) {\n if (parentDropdown == null) {\n this.elementRef.nativeElement.classList.add('nav-link');\n } else {\n this.elementRef.nativeElement.classList.add('dropdown-item');\n }\n }\n\n}"]}
|
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
import { SlideUpDownAnimation } from '@mintplayer/ng-animations';
|
|
1
|
+
import { Component, ElementRef, ViewChild } from '@angular/core';
|
|
3
2
|
import * as i0 from "@angular/core";
|
|
4
3
|
export class BsNavbarComponent {
|
|
5
4
|
constructor() {
|
|
6
5
|
this.isExpanded = false;
|
|
7
6
|
}
|
|
8
|
-
|
|
7
|
+
toggleExpanded() {
|
|
8
|
+
this.isExpanded = !this.isExpanded;
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
BsNavbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12
|
-
BsNavbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: BsNavbarComponent, selector: "bs-navbar", ngImport: i0, template: "<nav class=\"navbar navbar-expand-md position-fixed navbar-dark bg-dark\">\n <div class=\"container-fluid\">\n
|
|
12
|
+
BsNavbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: BsNavbarComponent, selector: "bs-navbar", viewQueries: [{ propertyName: "nav", first: true, predicate: ["nav"], descendants: true }], ngImport: i0, template: "<nav #nav class=\"navbar navbar-expand-md position-fixed navbar-dark bg-dark\">\n <div class=\"container-fluid\">\n <div class=\"d-flex w-100 w-md-auto\">\n <a class=\"navbar-brand mx-auto mx-md-unset\" href=\"#\">Navbar 2</a>\n <button (click)=\"toggleExpanded()\" class=\"navbar-toggler align-self-end\" type=\"button\" data-toggle=\"collapse\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n </div>\n <ng-content></ng-content>\n </div>\n</nav>", styles: [":host ::ng-deep+*{padding-top:56px}nav{left:0;top:0;right:0;z-index:1}@media (min-width: 768px){.mx-md-unset{margin-left:0!important;margin-right:0!important}.w-md-auto{width:auto!important}}\n"] });
|
|
13
13
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarComponent, decorators: [{
|
|
14
14
|
type: Component,
|
|
15
15
|
args: [{
|
|
16
16
|
selector: 'bs-navbar',
|
|
17
17
|
templateUrl: './navbar.component.html',
|
|
18
18
|
styleUrls: ['./navbar.component.scss'],
|
|
19
|
-
animations: [SlideUpDownAnimation]
|
|
20
19
|
}]
|
|
21
|
-
}], ctorParameters: function () { return []; }
|
|
20
|
+
}], ctorParameters: function () { return []; }, propDecorators: { nav: [{
|
|
21
|
+
type: ViewChild,
|
|
22
|
+
args: ['nav']
|
|
23
|
+
}] } });
|
|
22
24
|
//# sourceMappingURL=navbar.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navbar.component.js","sourceRoot":"","sources":["../../../../../../../../libs/mintplayer-ng-bootstrap/src/lib/components/navbar/navbar/navbar.component.ts","../../../../../../../../libs/mintplayer-ng-bootstrap/src/lib/components/navbar/navbar/navbar.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"navbar.component.js","sourceRoot":"","sources":["../../../../../../../../libs/mintplayer-ng-bootstrap/src/lib/components/navbar/navbar/navbar.component.ts","../../../../../../../../libs/mintplayer-ng-bootstrap/src/lib/components/navbar/navbar/navbar.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;;AAOjE,MAAM,OAAO,iBAAiB;IAE5B;QAGA,eAAU,GAAG,KAAK,CAAC;IAFnB,CAAC;IAGD,cAAc;QACZ,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC;IACrC,CAAC;;8GARU,iBAAiB;kGAAjB,iBAAiB,6ICP9B,whBAUM;2FDHO,iBAAiB;kBAL7B,SAAS;mBAAC;oBACT,QAAQ,EAAE,WAAW;oBACrB,WAAW,EAAE,yBAAyB;oBACtC,SAAS,EAAE,CAAC,yBAAyB,CAAC;iBACvC;0EAWmB,GAAG;sBAApB,SAAS;uBAAC,KAAK","sourcesContent":["import { Component, ElementRef, ViewChild } from '@angular/core';\n\n@Component({\n selector: 'bs-navbar',\n templateUrl: './navbar.component.html',\n styleUrls: ['./navbar.component.scss'],\n})\nexport class BsNavbarComponent {\n\n constructor() {\n }\n\n isExpanded = false;\n toggleExpanded() {\n this.isExpanded = !this.isExpanded;\n }\n\n @ViewChild('nav') nav!: ElementRef;\n}\n","<nav #nav class=\"navbar navbar-expand-md position-fixed navbar-dark bg-dark\">\n <div class=\"container-fluid\">\n <div class=\"d-flex w-100 w-md-auto\">\n <a class=\"navbar-brand mx-auto mx-md-unset\" href=\"#\">Navbar 2</a>\n <button (click)=\"toggleExpanded()\" class=\"navbar-toggler align-self-end\" type=\"button\" data-toggle=\"collapse\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n </div>\n <ng-content></ng-content>\n </div>\n</nav>"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Directive, ElementRef, Input } from '@angular/core';
|
|
2
|
+
import { BsNavbarComponent } from '../navbar/navbar.component';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class NavbarContentDirective {
|
|
5
|
+
constructor(element) {
|
|
6
|
+
this.element = element;
|
|
7
|
+
this.initialPadding = 0;
|
|
8
|
+
this.resizeObserver = new ResizeObserver((entries) => {
|
|
9
|
+
let height = entries[0].contentRect.height;
|
|
10
|
+
this.element.nativeElement.style.paddingTop = (this.initialPadding + height) + 'px';
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
ngAfterViewInit() {
|
|
14
|
+
let p = parseInt(this.element.nativeElement.style.paddingTop.replace(/px$/, ''));
|
|
15
|
+
this.initialPadding = isNaN(p) ? 0 : p;
|
|
16
|
+
this.resizeObserver.observe(this.navbar.nav.nativeElement);
|
|
17
|
+
}
|
|
18
|
+
ngOnDestroy() {
|
|
19
|
+
this.resizeObserver.unobserve(this.navbar.nav.nativeElement);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
NavbarContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: NavbarContentDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
23
|
+
NavbarContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.0", type: NavbarContentDirective, selector: "[navbarContent]", inputs: { navbar: ["navbarContent", "navbar"] }, ngImport: i0 });
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: NavbarContentDirective, decorators: [{
|
|
25
|
+
type: Directive,
|
|
26
|
+
args: [{
|
|
27
|
+
selector: '[navbarContent]'
|
|
28
|
+
}]
|
|
29
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { navbar: [{
|
|
30
|
+
type: Input,
|
|
31
|
+
args: ['navbarContent']
|
|
32
|
+
}] } });
|
|
33
|
+
//# sourceMappingURL=navbar-content.directive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navbar-content.directive.js","sourceRoot":"","sources":["../../../../../../../../libs/mintplayer-ng-bootstrap/src/lib/components/navbar/navbar-content/navbar-content.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,UAAU,EAAE,KAAK,EAAa,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;;AAK/D,MAAM,OAAO,sBAAsB;IAEjC,YAAoB,OAAmB;QAAnB,YAAO,GAAP,OAAO,CAAY;QAoBvC,mBAAc,GAAW,CAAC,CAAC;QAnBzB,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC,CAAC,OAAO,EAAE,EAAE;YACnD,IAAI,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC;YAC3C,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC;QACtF,CAAC,CAAC,CAAC;IACL,CAAC;IAID,eAAe;QACb,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;QACjF,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC7D,CAAC;IAED,WAAW;QACT,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC/D,CAAC;;mHAnBU,sBAAsB;uGAAtB,sBAAsB;2FAAtB,sBAAsB;kBAHlC,SAAS;mBAAC;oBACT,QAAQ,EAAE,iBAAiB;iBAC5B;iGAUyB,MAAM;sBAA7B,KAAK;uBAAC,eAAe","sourcesContent":["import { AfterViewInit, Directive, ElementRef, Input, OnDestroy } from '@angular/core';\nimport { BsNavbarComponent } from '../navbar/navbar.component';\n\n@Directive({\n selector: '[navbarContent]'\n})\nexport class NavbarContentDirective implements AfterViewInit, OnDestroy {\n\n constructor(private element: ElementRef) {\n this.resizeObserver = new ResizeObserver((entries) => {\n let height = entries[0].contentRect.height;\n this.element.nativeElement.style.paddingTop = (this.initialPadding + height) + 'px';\n });\n }\n\n @Input('navbarContent') navbar!: BsNavbarComponent;\n\n ngAfterViewInit() {\n let p = parseInt(this.element.nativeElement.style.paddingTop.replace(/px$/, ''));\n this.initialPadding = isNaN(p) ? 0 : p;\n this.resizeObserver.observe(this.navbar.nav.nativeElement);\n }\n\n ngOnDestroy() {\n this.resizeObserver.unobserve(this.navbar.nav.nativeElement);\n }\n\n resizeObserver: ResizeObserver;\n initialPadding: number = 0;\n}\n"]}
|
|
@@ -1,12 +1,22 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
1
|
+
import { Component, ContentChildren, Host, Optional, QueryList, SkipSelf } from '@angular/core';
|
|
2
|
+
import { BsNavbarItemComponent } from '../navbar-item/navbar-item.component';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "../navbar-item/navbar-item.component";
|
|
5
|
+
import * as i2 from "@mintplayer/ng-click-outside";
|
|
3
6
|
export class BsNavbarDropdownComponent {
|
|
4
|
-
constructor() {
|
|
7
|
+
constructor(parentDropdown, navbarItem) {
|
|
8
|
+
this.isVisible = false;
|
|
9
|
+
this.parentDropdown = parentDropdown;
|
|
10
|
+
this.navbarItem = navbarItem;
|
|
11
|
+
}
|
|
12
|
+
get elementsToExclude() {
|
|
13
|
+
return [this.navbarItem.anchorTag].filter((a) => a).map((a) => a);
|
|
14
|
+
}
|
|
5
15
|
ngOnInit() {
|
|
6
16
|
}
|
|
7
17
|
}
|
|
8
|
-
BsNavbarDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9
|
-
BsNavbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: BsNavbarDropdownComponent, selector: "bs-navbar-dropdown", ngImport: i0, template: "<
|
|
18
|
+
BsNavbarDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarDropdownComponent, deps: [{ token: BsNavbarDropdownComponent, host: true, optional: true, skipSelf: true }, { token: i1.BsNavbarItemComponent, host: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
19
|
+
BsNavbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: BsNavbarDropdownComponent, selector: "bs-navbar-dropdown", queries: [{ propertyName: "childDropdowns", predicate: BsNavbarDropdownComponent, descendants: true }], ngImport: i0, template: "<ul class=\"dropdown-menu\" [class.show]=\"isVisible\" [class.submenu]=\"!!parentDropdown\" (clickOutside)=\"isVisible = false\" [exclude]=\"elementsToExclude\" aria-labelledby=\"navbarDropdown\">\n <ng-content></ng-content>\n</ul>", styles: ["@media (max-width: 767px){.submenu{margin-left:.5rem;margin-right:.5rem}}@media (min-width: 768px){.submenu{position:absolute;left:100%;top:-1px}}\n"], directives: [{ type: i2.ClickOutsideDirective, selector: "[clickOutside]", inputs: ["clickOutsideEnabled", "attachOutsideOnClick", "delayClickOutsideInit", "emitOnBlur", "exclude", "excludeBeforeClick", "clickOutsideEvents"], outputs: ["clickOutside"] }] });
|
|
10
20
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarDropdownComponent, decorators: [{
|
|
11
21
|
type: Component,
|
|
12
22
|
args: [{
|
|
@@ -14,5 +24,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImpor
|
|
|
14
24
|
templateUrl: './navbar-dropdown.component.html',
|
|
15
25
|
styleUrls: ['./navbar-dropdown.component.scss']
|
|
16
26
|
}]
|
|
17
|
-
}], ctorParameters: function () { return [
|
|
27
|
+
}], ctorParameters: function () { return [{ type: BsNavbarDropdownComponent, decorators: [{
|
|
28
|
+
type: SkipSelf
|
|
29
|
+
}, {
|
|
30
|
+
type: Host
|
|
31
|
+
}, {
|
|
32
|
+
type: Optional
|
|
33
|
+
}] }, { type: i1.BsNavbarItemComponent, decorators: [{
|
|
34
|
+
type: Host
|
|
35
|
+
}] }]; }, propDecorators: { childDropdowns: [{
|
|
36
|
+
type: ContentChildren,
|
|
37
|
+
args: [BsNavbarDropdownComponent, { descendants: true }]
|
|
38
|
+
}] } });
|
|
18
39
|
//# sourceMappingURL=navbar-dropdown.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navbar-dropdown.component.js","sourceRoot":"","sources":["../../../../../../../../libs/mintplayer-ng-bootstrap/src/lib/components/navbar/navbar-dropdown/navbar-dropdown.component.ts","../../../../../../../../libs/mintplayer-ng-bootstrap/src/lib/components/navbar/navbar-dropdown/navbar-dropdown.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAU,MAAM,eAAe,CAAC
|
|
1
|
+
{"version":3,"file":"navbar-dropdown.component.js","sourceRoot":"","sources":["../../../../../../../../libs/mintplayer-ng-bootstrap/src/lib/components/navbar/navbar-dropdown/navbar-dropdown.component.ts","../../../../../../../../libs/mintplayer-ng-bootstrap/src/lib/components/navbar/navbar-dropdown/navbar-dropdown.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAc,IAAI,EAAU,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpH,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;;;;AAO7E,MAAM,OAAO,yBAAyB;IAEpC,YACkC,cAAyC,EACjE,UAAiC;QAM3C,cAAS,GAAY,KAAK,CAAC;QAJzB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAMD,IAAI,iBAAiB;QACnB,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAc,CAAC,CAAC,CAAC;IACjF,CAAC;IAED,QAAQ;IACR,CAAC;;sHAnBU,yBAAyB,kBAGc,yBAAyB;0GAHhE,yBAAyB,yFAqBnB,yBAAyB,gDC7B5C,4OAEK;2FDMQ,yBAAyB;kBALrC,SAAS;mBAAC;oBACT,QAAQ,EAAE,oBAAoB;oBAC9B,WAAW,EAAE,kCAAkC;oBAC/C,SAAS,EAAE,CAAC,kCAAkC,CAAC;iBAChD;0DAImD,yBAAyB;0BAAxE,QAAQ;;0BAAI,IAAI;;0BAAI,QAAQ;;0BAC5B,IAAI;4CAiB4D,cAAc;sBAAhF,eAAe;uBAAC,yBAAyB,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE","sourcesContent":["import { Component, ContentChildren, ElementRef, Host, OnInit, Optional, QueryList, SkipSelf } from '@angular/core';\nimport { BsNavbarItemComponent } from '../navbar-item/navbar-item.component';\n\n@Component({\n selector: 'bs-navbar-dropdown',\n templateUrl: './navbar-dropdown.component.html',\n styleUrls: ['./navbar-dropdown.component.scss']\n})\nexport class BsNavbarDropdownComponent implements OnInit {\n\n constructor(\n @SkipSelf() @Host() @Optional() parentDropdown: BsNavbarDropdownComponent,\n @Host() navbarItem: BsNavbarItemComponent\n ) {\n this.parentDropdown = parentDropdown;\n this.navbarItem = navbarItem;\n }\n\n isVisible: boolean = false;\n navbarItem: BsNavbarItemComponent;\n parentDropdown: BsNavbarDropdownComponent;\n\n get elementsToExclude() {\n return [this.navbarItem.anchorTag].filter((a) => a).map((a) => <HTMLElement>a);\n }\n\n ngOnInit(): void {\n }\n\n @ContentChildren(BsNavbarDropdownComponent, { descendants: true }) childDropdowns!: QueryList<BsNavbarDropdownComponent>;\n}\n","<ul class=\"dropdown-menu\" [class.show]=\"isVisible\" [class.submenu]=\"!!parentDropdown\" (clickOutside)=\"isVisible = false\" [exclude]=\"elementsToExclude\" aria-labelledby=\"navbarDropdown\">\n <ng-content></ng-content>\n</ul>"]}
|
|
@@ -1,12 +1,40 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
1
|
+
import { Component, ContentChildren, ElementRef, Optional, QueryList } from '@angular/core';
|
|
2
|
+
import { BsNavbarDropdownComponent } from '../navbar-dropdown/navbar-dropdown.component';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "../navbar-dropdown/navbar-dropdown.component";
|
|
3
5
|
export class BsNavbarItemComponent {
|
|
4
|
-
constructor() {
|
|
6
|
+
constructor(parentDropdown, element) {
|
|
7
|
+
this.element = element;
|
|
8
|
+
this.hasDropdown = false;
|
|
9
|
+
this.anchorTag = null;
|
|
10
|
+
this.parentDropdown = parentDropdown;
|
|
11
|
+
}
|
|
5
12
|
ngOnInit() {
|
|
6
13
|
}
|
|
14
|
+
ngAfterContentChecked() {
|
|
15
|
+
if (this.hasDropdown) {
|
|
16
|
+
window.element = this.element.nativeElement;
|
|
17
|
+
this.anchorTag = this.element.nativeElement.querySelector('li a');
|
|
18
|
+
(this.anchorTag) && this.anchorTag.classList.add('dropdown-toggle');
|
|
19
|
+
if (this.anchorTag && !this.anchorTag.onclick) {
|
|
20
|
+
this.anchorTag.onclick = (ev) => {
|
|
21
|
+
ev.preventDefault();
|
|
22
|
+
// Normally there should be only one dropdown in this list
|
|
23
|
+
this.dropdowns.forEach((dropdown) => {
|
|
24
|
+
if (!(dropdown.isVisible = !dropdown.isVisible)) {
|
|
25
|
+
dropdown.childDropdowns.forEach((child) => {
|
|
26
|
+
child.isVisible = false;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
return false;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
7
35
|
}
|
|
8
|
-
BsNavbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9
|
-
BsNavbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: BsNavbarItemComponent, selector: "bs-navbar-item", ngImport: i0, template: "<
|
|
36
|
+
BsNavbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarItemComponent, deps: [{ token: i1.BsNavbarDropdownComponent, optional: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
37
|
+
BsNavbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: BsNavbarItemComponent, selector: "bs-navbar-item", queries: [{ propertyName: "dropdowns", predicate: BsNavbarDropdownComponent }], ngImport: i0, template: "<li [class.nav-item]=\"parentDropdown === null\" [class.dropdown]=\"(dropdowns.length > 0) && (parentDropdown === null)\" [class.dropend]=\"(dropdowns.length > 0) && (parentDropdown !== null)\">\n <ng-content></ng-content>\n</li>", styles: ["li.dropend ::ng-deep a.dropdown-toggle{padding-right:1.5rem}li.dropend ::ng-deep a.dropdown-toggle:after{position:absolute;right:.5rem;top:.75rem}\n"] });
|
|
10
38
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarItemComponent, decorators: [{
|
|
11
39
|
type: Component,
|
|
12
40
|
args: [{
|
|
@@ -14,5 +42,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImpor
|
|
|
14
42
|
templateUrl: './navbar-item.component.html',
|
|
15
43
|
styleUrls: ['./navbar-item.component.scss']
|
|
16
44
|
}]
|
|
17
|
-
}], ctorParameters: function () { return [
|
|
45
|
+
}], ctorParameters: function () { return [{ type: i1.BsNavbarDropdownComponent, decorators: [{
|
|
46
|
+
type: Optional
|
|
47
|
+
}] }, { type: i0.ElementRef }]; }, propDecorators: { dropdowns: [{
|
|
48
|
+
type: ContentChildren,
|
|
49
|
+
args: [BsNavbarDropdownComponent]
|
|
50
|
+
}] } });
|
|
18
51
|
//# sourceMappingURL=navbar-item.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navbar-item.component.js","sourceRoot":"","sources":["../../../../../../../../libs/mintplayer-ng-bootstrap/src/lib/components/navbar/navbar-item/navbar-item.component.ts","../../../../../../../../libs/mintplayer-ng-bootstrap/src/lib/components/navbar/navbar-item/navbar-item.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"navbar-item.component.js","sourceRoot":"","sources":["../../../../../../../../libs/mintplayer-ng-bootstrap/src/lib/components/navbar/navbar-item/navbar-item.component.ts","../../../../../../../../libs/mintplayer-ng-bootstrap/src/lib/components/navbar/navbar-item/navbar-item.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAuB,SAAS,EAAE,eAAe,EAAE,UAAU,EAAiB,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAChI,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;;;AAOzF,MAAM,OAAO,qBAAqB;IAEhC,YAAwB,cAAyC,EAAU,OAAmB;QAAnB,YAAO,GAAP,OAAO,CAAY;QAK9F,gBAAW,GAAY,KAAK,CAAC;QAC7B,cAAS,GAA6B,IAAI,CAAC;QALzC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACvC,CAAC;IAMD,QAAQ;IACR,CAAC;IAED,qBAAqB;QACnB,IAAI,IAAI,CAAC,WAAW,EAAE;YACd,MAAO,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC;YACnD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;YAClE,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;YAEpE,IAAI,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE;gBAC7C,IAAI,CAAC,SAAS,CAAC,OAAO,GAAG,CAAC,EAAS,EAAE,EAAE;oBACrC,EAAE,CAAC,cAAc,EAAE,CAAC;oBACpB,0DAA0D;oBAC1D,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;wBAClC,IAAI,CAAC,CAAC,QAAQ,CAAC,SAAS,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;4BAC/C,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;gCACxC,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC;4BAC1B,CAAC,CAAC,CAAC;yBACJ;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,KAAK,CAAC;gBACf,CAAC,CAAA;aACF;SACF;IACH,CAAC;;kHAlCU,qBAAqB;sGAArB,qBAAqB,gFAoCf,yBAAyB,6BC5C5C,0OAEK;2FDMQ,qBAAqB;kBALjC,SAAS;mBAAC;oBACT,QAAQ,EAAE,gBAAgB;oBAC1B,WAAW,EAAE,8BAA8B;oBAC3C,SAAS,EAAE,CAAC,8BAA8B,CAAC;iBAC5C;;0BAGc,QAAQ;qEAkCuB,SAAS;sBAApD,eAAe;uBAAC,yBAAyB","sourcesContent":["import { AfterContentChecked, Component, ContentChildren, ElementRef, Input, OnInit, Optional, QueryList } from '@angular/core';\nimport { BsNavbarDropdownComponent } from '../navbar-dropdown/navbar-dropdown.component';\n\n@Component({\n selector: 'bs-navbar-item',\n templateUrl: './navbar-item.component.html',\n styleUrls: ['./navbar-item.component.scss']\n})\nexport class BsNavbarItemComponent implements OnInit, AfterContentChecked {\n\n constructor(@Optional() parentDropdown: BsNavbarDropdownComponent, private element: ElementRef) {\n this.parentDropdown = parentDropdown;\n }\n\n parentDropdown: BsNavbarDropdownComponent;\n hasDropdown: boolean = false;\n anchorTag: HTMLAnchorElement | null = null;\n\n ngOnInit(): void {\n }\n\n ngAfterContentChecked() {\n if (this.hasDropdown) {\n (<any>window).element = this.element.nativeElement;\n this.anchorTag = this.element.nativeElement.querySelector('li a');\n (this.anchorTag) && this.anchorTag.classList.add('dropdown-toggle');\n\n if (this.anchorTag && !this.anchorTag.onclick) {\n this.anchorTag.onclick = (ev: Event) => {\n ev.preventDefault();\n // Normally there should be only one dropdown in this list\n this.dropdowns.forEach((dropdown) => {\n if (!(dropdown.isVisible = !dropdown.isVisible)) {\n dropdown.childDropdowns.forEach((child) => {\n child.isVisible = false;\n });\n }\n });\n return false;\n }\n }\n }\n }\n\n @ContentChildren(BsNavbarDropdownComponent) dropdowns!: QueryList<BsNavbarDropdownComponent>;\n}\n","<li [class.nav-item]=\"parentDropdown === null\" [class.dropdown]=\"(dropdowns.length > 0) && (parentDropdown === null)\" [class.dropend]=\"(dropdowns.length > 0) && (parentDropdown !== null)\">\n <ng-content></ng-content>\n</li>"]}
|
|
@@ -1,18 +1,34 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { BsNavbarComponent } from '../navbar/navbar.component';
|
|
3
|
+
import { SlideUpDownAnimation } from '@mintplayer/ng-animations';
|
|
2
4
|
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "../navbar/navbar.component";
|
|
3
6
|
export class BsNavbarNavComponent {
|
|
4
|
-
constructor() {
|
|
7
|
+
constructor(bsNavbar) {
|
|
8
|
+
//#region collapse
|
|
9
|
+
this._collapse = true;
|
|
10
|
+
this.bsNavbar = bsNavbar;
|
|
11
|
+
}
|
|
5
12
|
ngOnInit() {
|
|
6
13
|
}
|
|
14
|
+
set collapse(value) {
|
|
15
|
+
this._collapse = value;
|
|
16
|
+
}
|
|
17
|
+
get collapse() {
|
|
18
|
+
return this._collapse;
|
|
19
|
+
}
|
|
7
20
|
}
|
|
8
|
-
BsNavbarNavComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarNavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9
|
-
BsNavbarNavComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: BsNavbarNavComponent, selector: "bs-navbar-nav", ngImport: i0, template: "<
|
|
21
|
+
BsNavbarNavComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarNavComponent, deps: [{ token: i1.BsNavbarComponent }], target: i0.ɵɵFactoryTarget.Component });
|
|
22
|
+
BsNavbarNavComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: BsNavbarNavComponent, selector: "bs-navbar-nav", inputs: { collapse: "collapse" }, ngImport: i0, template: "<div class=\"navbar-collapse collapse w-100 show\" [@slideUpDown]=\"bsNavbar.isExpanded ? 'down' : 'up'\">\n <ul class=\"navbar-nav mr-auto\">\n <ng-content></ng-content>\n </ul>\n</div>", styles: [":host{margin-right:auto}@media screen and (max-width: 767px){:host{width:100%!important}.navbar-collapse.collapse{overflow:hidden}}\n"], animations: [SlideUpDownAnimation] });
|
|
10
23
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarNavComponent, decorators: [{
|
|
11
24
|
type: Component,
|
|
12
25
|
args: [{
|
|
13
26
|
selector: 'bs-navbar-nav',
|
|
14
27
|
templateUrl: './navbar-nav.component.html',
|
|
15
|
-
styleUrls: ['./navbar-nav.component.scss']
|
|
28
|
+
styleUrls: ['./navbar-nav.component.scss'],
|
|
29
|
+
animations: [SlideUpDownAnimation]
|
|
16
30
|
}]
|
|
17
|
-
}], ctorParameters: function () { return []; }
|
|
31
|
+
}], ctorParameters: function () { return [{ type: i1.BsNavbarComponent }]; }, propDecorators: { collapse: [{
|
|
32
|
+
type: Input
|
|
33
|
+
}] } });
|
|
18
34
|
//# sourceMappingURL=navbar-nav.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navbar-nav.component.js","sourceRoot":"","sources":["../../../../../../../../libs/mintplayer-ng-bootstrap/src/lib/components/navbar/navbar-nav/navbar-nav.component.ts","../../../../../../../../libs/mintplayer-ng-bootstrap/src/lib/components/navbar/navbar-nav/navbar-nav.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAU,MAAM,eAAe,CAAC
|
|
1
|
+
{"version":3,"file":"navbar-nav.component.js","sourceRoot":"","sources":["../../../../../../../../libs/mintplayer-ng-bootstrap/src/lib/components/navbar/navbar-nav/navbar-nav.component.ts","../../../../../../../../libs/mintplayer-ng-bootstrap/src/lib/components/navbar/navbar-nav/navbar-nav.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;;;AAQjE,MAAM,OAAO,oBAAoB;IAE/B,YAAY,QAA2B;QASvC,kBAAkB;QACV,cAAS,GAAY,IAAI,CAAC;QAThC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,QAAQ;IACR,CAAC;IAMD,IAAoB,QAAQ,CAAC,KAAc;QACzC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IACzB,CAAC;IACD,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;;iHAlBU,oBAAoB;qGAApB,oBAAoB,uFCVjC,yMAIM,iKDIQ,CAAC,oBAAoB,CAAC;2FAEvB,oBAAoB;kBANhC,SAAS;mBAAC;oBACT,QAAQ,EAAE,eAAe;oBACzB,WAAW,EAAE,6BAA6B;oBAC1C,SAAS,EAAE,CAAC,6BAA6B,CAAC;oBAC1C,UAAU,EAAE,CAAC,oBAAoB,CAAC;iBACnC;wGAcqB,QAAQ;sBAA3B,KAAK","sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { BsNavbarComponent } from '../navbar/navbar.component';\nimport { SlideUpDownAnimation } from '@mintplayer/ng-animations';\n\n@Component({\n selector: 'bs-navbar-nav',\n templateUrl: './navbar-nav.component.html',\n styleUrls: ['./navbar-nav.component.scss'],\n animations: [SlideUpDownAnimation]\n})\nexport class BsNavbarNavComponent implements OnInit {\n\n constructor(bsNavbar: BsNavbarComponent) {\n this.bsNavbar = bsNavbar;\n }\n\n ngOnInit(): void {\n }\n\n bsNavbar: BsNavbarComponent;\n\n //#region collapse\n private _collapse: boolean = true;\n @Input() public set collapse(value: boolean) {\n this._collapse = value;\n }\n public get collapse() {\n return this._collapse;\n }\n //#endregion\n}\n","<div class=\"navbar-collapse collapse w-100 show\" [@slideUpDown]=\"bsNavbar.isExpanded ? 'down' : 'up'\">\n <ul class=\"navbar-nav mr-auto\">\n <ng-content></ng-content>\n </ul>\n</div>"]}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { NgModule } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { RouterModule } from '@angular/router';
|
|
4
|
+
import { ClickOutsideModule } from '@mintplayer/ng-click-outside';
|
|
3
5
|
import { BsNavbarComponent } from './navbar/navbar.component';
|
|
4
6
|
import { BsNavbarNavComponent } from './navbar-nav/navbar-nav.component';
|
|
5
7
|
import { BsNavbarDropdownComponent } from './navbar-dropdown/navbar-dropdown.component';
|
|
6
8
|
import { BsNavbarItemComponent } from './navbar-item/navbar-item.component';
|
|
9
|
+
import { DropdownToggleDirective } from './dropdown-toggle/dropdown-toggle.directive';
|
|
10
|
+
import { NavLinkDirective } from './nav-link/nav-link.directive';
|
|
11
|
+
import { NavbarContentDirective } from './navbar-content/navbar-content.directive';
|
|
7
12
|
import * as i0 from "@angular/core";
|
|
8
13
|
export class BsNavbarModule {
|
|
9
14
|
}
|
|
@@ -11,12 +16,22 @@ BsNavbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version:
|
|
|
11
16
|
BsNavbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarModule, declarations: [BsNavbarComponent,
|
|
12
17
|
BsNavbarNavComponent,
|
|
13
18
|
BsNavbarDropdownComponent,
|
|
14
|
-
BsNavbarItemComponent
|
|
19
|
+
BsNavbarItemComponent,
|
|
20
|
+
DropdownToggleDirective,
|
|
21
|
+
NavLinkDirective,
|
|
22
|
+
NavbarContentDirective], imports: [CommonModule,
|
|
23
|
+
RouterModule,
|
|
24
|
+
ClickOutsideModule], exports: [BsNavbarComponent,
|
|
15
25
|
BsNavbarNavComponent,
|
|
16
26
|
BsNavbarDropdownComponent,
|
|
17
|
-
BsNavbarItemComponent
|
|
27
|
+
BsNavbarItemComponent,
|
|
28
|
+
DropdownToggleDirective,
|
|
29
|
+
NavLinkDirective,
|
|
30
|
+
NavbarContentDirective] });
|
|
18
31
|
BsNavbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarModule, imports: [[
|
|
19
|
-
CommonModule
|
|
32
|
+
CommonModule,
|
|
33
|
+
RouterModule,
|
|
34
|
+
ClickOutsideModule
|
|
20
35
|
]] });
|
|
21
36
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarModule, decorators: [{
|
|
22
37
|
type: NgModule,
|
|
@@ -25,16 +40,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImpor
|
|
|
25
40
|
BsNavbarComponent,
|
|
26
41
|
BsNavbarNavComponent,
|
|
27
42
|
BsNavbarDropdownComponent,
|
|
28
|
-
BsNavbarItemComponent
|
|
43
|
+
BsNavbarItemComponent,
|
|
44
|
+
DropdownToggleDirective,
|
|
45
|
+
NavLinkDirective,
|
|
46
|
+
NavbarContentDirective
|
|
29
47
|
],
|
|
30
48
|
imports: [
|
|
31
|
-
CommonModule
|
|
49
|
+
CommonModule,
|
|
50
|
+
RouterModule,
|
|
51
|
+
ClickOutsideModule
|
|
32
52
|
],
|
|
33
53
|
exports: [
|
|
34
54
|
BsNavbarComponent,
|
|
35
55
|
BsNavbarNavComponent,
|
|
36
56
|
BsNavbarDropdownComponent,
|
|
37
|
-
BsNavbarItemComponent
|
|
57
|
+
BsNavbarItemComponent,
|
|
58
|
+
DropdownToggleDirective,
|
|
59
|
+
NavLinkDirective,
|
|
60
|
+
NavbarContentDirective
|
|
38
61
|
]
|
|
39
62
|
}]
|
|
40
63
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navbar.module.js","sourceRoot":"","sources":["../../../../../../../libs/mintplayer-ng-bootstrap/src/lib/components/navbar/navbar.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;;
|
|
1
|
+
{"version":3,"file":"navbar.module.js","sourceRoot":"","sources":["../../../../../../../libs/mintplayer-ng-bootstrap/src/lib/components/navbar/navbar.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;;AA6BnF,MAAM,OAAO,cAAc;;2GAAd,cAAc;4GAAd,cAAc,iBAzBvB,iBAAiB;QACjB,oBAAoB;QACpB,yBAAyB;QACzB,qBAAqB;QAErB,uBAAuB;QACvB,gBAAgB;QAChB,sBAAsB,aAGtB,YAAY;QACZ,YAAY;QACZ,kBAAkB,aAGlB,iBAAiB;QACjB,oBAAoB;QACpB,yBAAyB;QACzB,qBAAqB;QAErB,uBAAuB;QACvB,gBAAgB;QAChB,sBAAsB;4GAGb,cAAc,YAhBhB;YACP,YAAY;YACZ,YAAY;YACZ,kBAAkB;SACnB;2FAYU,cAAc;kBA3B1B,QAAQ;mBAAC;oBACR,YAAY,EAAE;wBACZ,iBAAiB;wBACjB,oBAAoB;wBACpB,yBAAyB;wBACzB,qBAAqB;wBAErB,uBAAuB;wBACvB,gBAAgB;wBAChB,sBAAsB;qBACvB;oBACD,OAAO,EAAE;wBACP,YAAY;wBACZ,YAAY;wBACZ,kBAAkB;qBACnB;oBACD,OAAO,EAAE;wBACP,iBAAiB;wBACjB,oBAAoB;wBACpB,yBAAyB;wBACzB,qBAAqB;wBAErB,uBAAuB;wBACvB,gBAAgB;wBAChB,sBAAsB;qBACvB;iBACF","sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule } from '@angular/router';\nimport { ClickOutsideModule } from '@mintplayer/ng-click-outside';\nimport { BsNavbarComponent } from './navbar/navbar.component';\nimport { BsNavbarNavComponent } from './navbar-nav/navbar-nav.component';\nimport { BsNavbarDropdownComponent } from './navbar-dropdown/navbar-dropdown.component';\nimport { BsNavbarItemComponent } from './navbar-item/navbar-item.component';\nimport { DropdownToggleDirective } from './dropdown-toggle/dropdown-toggle.directive';\nimport { NavLinkDirective } from './nav-link/nav-link.directive';\nimport { NavbarContentDirective } from './navbar-content/navbar-content.directive';\n\n@NgModule({\n declarations: [\n BsNavbarComponent,\n BsNavbarNavComponent,\n BsNavbarDropdownComponent,\n BsNavbarItemComponent,\n\n DropdownToggleDirective,\n NavLinkDirective,\n NavbarContentDirective\n ],\n imports: [\n CommonModule,\n RouterModule,\n ClickOutsideModule\n ],\n exports: [\n BsNavbarComponent,\n BsNavbarNavComponent,\n BsNavbarDropdownComponent,\n BsNavbarItemComponent,\n\n DropdownToggleDirective,\n NavLinkDirective,\n NavbarContentDirective\n ]\n})\nexport class BsNavbarModule { }\n"]}
|