@mintplayer/ng-bootstrap 13.1.10 → 13.1.11
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/lib/components/context-menu/context-menu.directive.mjs +14 -8
- package/esm2020/lib/components/dropdown/dropdown/dropdown.directive.mjs +10 -3
- package/esm2020/lib/components/scrollspy/component/scrollspy.component.mjs +30 -6
- package/esm2020/lib/components/select2/directive/item-template.directive.mjs +1 -2
- package/esm2020/lib/components/snackbar/component/snackbar.component.mjs +1 -1
- package/esm2020/lib/components/snackbar/service/snackbar.service.mjs +1 -2
- package/esm2020/lib/components/tooltip/directive/tooltip.directive.mjs +10 -4
- package/fesm2015/mintplayer-ng-bootstrap.mjs +56 -16
- package/fesm2015/mintplayer-ng-bootstrap.mjs.map +1 -1
- package/fesm2020/mintplayer-ng-bootstrap.mjs +56 -16
- package/fesm2020/mintplayer-ng-bootstrap.mjs.map +1 -1
- package/lib/components/context-menu/context-menu.directive.d.ts +1 -0
- package/lib/components/dropdown/dropdown/dropdown.directive.d.ts +1 -0
- package/lib/components/scrollspy/component/scrollspy.component.d.ts +11 -3
- package/lib/components/snackbar/component/snackbar.component.d.ts +1 -2
- package/lib/components/tooltip/directive/tooltip.directive.d.ts +1 -0
- package/package.json +1 -1
|
@@ -708,18 +708,21 @@ class BsContextMenuDirective {
|
|
|
708
708
|
clickAnywhere(ev) {
|
|
709
709
|
this.checkAndCloseExisting(ev);
|
|
710
710
|
}
|
|
711
|
-
|
|
711
|
+
close() {
|
|
712
712
|
if (this.overlayRef) {
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
713
|
+
this.overlayRef.detach();
|
|
714
|
+
this.overlayRef.dispose();
|
|
715
|
+
this.overlayRef = null;
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
checkAndCloseExisting(ev) {
|
|
719
|
+
if (this.overlayRef && !this.overlayRef.overlayElement.contains(ev.target)) {
|
|
720
|
+
this.close();
|
|
718
721
|
}
|
|
719
722
|
}
|
|
720
723
|
}
|
|
721
724
|
BsContextMenuDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsContextMenuDirective, deps: [{ token: i1$1.Overlay }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: i0.ElementRef, host: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
722
|
-
BsContextMenuDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsContextMenuDirective, selector: "[bsContextMenu]", host: { listeners: { "document:click": "clickAnywhere($event)" } }, ngImport: i0 });
|
|
725
|
+
BsContextMenuDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsContextMenuDirective, selector: "[bsContextMenu]", host: { listeners: { "document:click": "clickAnywhere($event)", "window:blur": "close()" } }, ngImport: i0 });
|
|
723
726
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsContextMenuDirective, decorators: [{
|
|
724
727
|
type: Directive,
|
|
725
728
|
args: [{
|
|
@@ -732,6 +735,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
732
735
|
}] }]; }, propDecorators: { clickAnywhere: [{
|
|
733
736
|
type: HostListener,
|
|
734
737
|
args: ['document:click', ['$event']]
|
|
738
|
+
}], close: [{
|
|
739
|
+
type: HostListener,
|
|
740
|
+
args: ['window:blur']
|
|
735
741
|
}] } });
|
|
736
742
|
|
|
737
743
|
class BsContextMenuModule {
|
|
@@ -1190,9 +1196,13 @@ class BsDropdownDirective {
|
|
|
1190
1196
|
this.isOpenChange.emit(value);
|
|
1191
1197
|
}
|
|
1192
1198
|
}
|
|
1199
|
+
//#endregion
|
|
1200
|
+
onBlur() {
|
|
1201
|
+
this.isOpen = false;
|
|
1202
|
+
}
|
|
1193
1203
|
}
|
|
1194
1204
|
BsDropdownDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1195
|
-
BsDropdownDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsDropdownDirective, selector: "[bsDropdown]", inputs: { hasBackdrop: "hasBackdrop", sameWidth: "sameWidth", closeOnClickOutside: "closeOnClickOutside", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, queries: [{ propertyName: "menu", first: true, predicate: BsDropdownMenuDirective, descendants: true }, { propertyName: "toggle", first: true, predicate: BsDropdownToggleDirective, descendants: true }], ngImport: i0 });
|
|
1205
|
+
BsDropdownDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsDropdownDirective, selector: "[bsDropdown]", inputs: { hasBackdrop: "hasBackdrop", sameWidth: "sameWidth", closeOnClickOutside: "closeOnClickOutside", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, host: { listeners: { "window:blur": "onBlur()" } }, queries: [{ propertyName: "menu", first: true, predicate: BsDropdownMenuDirective, descendants: true }, { propertyName: "toggle", first: true, predicate: BsDropdownToggleDirective, descendants: true }], ngImport: i0 });
|
|
1196
1206
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownDirective, decorators: [{
|
|
1197
1207
|
type: Directive,
|
|
1198
1208
|
args: [{
|
|
@@ -1214,6 +1224,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1214
1224
|
type: Output
|
|
1215
1225
|
}], isOpen: [{
|
|
1216
1226
|
type: Input
|
|
1227
|
+
}], onBlur: [{
|
|
1228
|
+
type: HostListener,
|
|
1229
|
+
args: ['window:blur']
|
|
1217
1230
|
}] } });
|
|
1218
1231
|
|
|
1219
1232
|
class BsDatepickerComponent {
|
|
@@ -1909,15 +1922,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1909
1922
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
|
1910
1923
|
|
|
1911
1924
|
class BsScrollspyComponent {
|
|
1912
|
-
constructor(scrollOffsetService, document) {
|
|
1925
|
+
constructor(scrollOffsetService, document, zone) {
|
|
1913
1926
|
this.scrollOffsetService = scrollOffsetService;
|
|
1927
|
+
this.zone = zone;
|
|
1928
|
+
this.destroyed$ = new Subject();
|
|
1929
|
+
this.viewInit$ = new BehaviorSubject(false);
|
|
1930
|
+
this.contentInit$ = new BehaviorSubject(false);
|
|
1914
1931
|
this.activeDirective = null;
|
|
1915
1932
|
this.doc = document;
|
|
1933
|
+
combineLatest([this.viewInit$, this.contentInit$])
|
|
1934
|
+
.pipe(filter(([viewInit, contentInit]) => viewInit && contentInit), take(1))
|
|
1935
|
+
.pipe(takeUntil(this.destroyed$))
|
|
1936
|
+
.subscribe(() => {
|
|
1937
|
+
// this.setActiveDirective();
|
|
1938
|
+
this.scrollToCurrentInSpy();
|
|
1939
|
+
});
|
|
1916
1940
|
}
|
|
1917
1941
|
ngAfterViewInit() {
|
|
1918
|
-
this.
|
|
1942
|
+
this.viewInit$.next(true);
|
|
1943
|
+
}
|
|
1944
|
+
ngAfterContentInit() {
|
|
1945
|
+
this.contentInit$.next(true);
|
|
1946
|
+
}
|
|
1947
|
+
ngOnDestroy() {
|
|
1948
|
+
this.destroyed$.next(true);
|
|
1919
1949
|
}
|
|
1920
1950
|
onWindowScroll() {
|
|
1951
|
+
this.setActiveDirective();
|
|
1952
|
+
this.scrollToCurrentInSpy();
|
|
1953
|
+
}
|
|
1954
|
+
setActiveDirective() {
|
|
1921
1955
|
const offsetY = this.scrollOffsetService.getScrollOffset()[1];
|
|
1922
1956
|
const dirs = this.directives.filter((d) => d.element.nativeElement.getBoundingClientRect().y < offsetY);
|
|
1923
1957
|
if (this.directives.length === 0) {
|
|
@@ -1929,6 +1963,8 @@ class BsScrollspyComponent {
|
|
|
1929
1963
|
else {
|
|
1930
1964
|
this.activeDirective = dirs[dirs.length - 1];
|
|
1931
1965
|
}
|
|
1966
|
+
}
|
|
1967
|
+
scrollToCurrentInSpy() {
|
|
1932
1968
|
if (window && (window.innerWidth >= 768)) {
|
|
1933
1969
|
if (this.activeDirective) {
|
|
1934
1970
|
const index = this.directives.toArray().findIndex((v, i) => v === this.activeDirective);
|
|
@@ -1946,7 +1982,7 @@ class BsScrollspyComponent {
|
|
|
1946
1982
|
window.scrollTo({ top: y, behavior: 'smooth' });
|
|
1947
1983
|
}
|
|
1948
1984
|
}
|
|
1949
|
-
BsScrollspyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyComponent, deps: [{ token: BsScrollOffsetService }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
|
|
1985
|
+
BsScrollspyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyComponent, deps: [{ token: BsScrollOffsetService }, { token: DOCUMENT }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
1950
1986
|
BsScrollspyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsScrollspyComponent, selector: "bs-scrollspy", host: { listeners: { "window:scroll": "onWindowScroll($event)" } }, queries: [{ propertyName: "directives", predicate: BsScrollspyDirective, descendants: true }], viewQueries: [{ propertyName: "anchors", predicate: ["anchor"], descendants: true }], ngImport: i0, template: "<div class=\"spy\">\n <ul class=\"text-muted\">\n <li *ngFor=\"let dir of directives; let i = index\">\n <span [attr.data-index]=\"i\" class=\"cursor-pointer\" [ngClass]=\"'nav' + dir.element.nativeElement.tagName\" [class.fw-bold]=\"activeDirective?.element === dir.element\" (click)=\"scrollToHeader(dir)\" [title]=\"dir.element.nativeElement.textContent\" #anchor>\n {{ dir.element.nativeElement.textContent }}\n </span>\n </li>\n </ul>\n</div>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>", styles: [":host{display:block}.spy>ul{list-style-type:none;padding-left:0}.spy>ul>li:hover{color:rgba(var(--bs-dark-rgb),var(--bs-text-opacity))!important}.spy>ul>li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 768px){:host{display:grid;grid-template-areas:\"content toc\";grid-template-columns:auto 200px;grid-template-rows:auto;grid-gap:inherit;gap:inherit;grid-area:main}.spy{position:sticky;top:5rem;right:0;z-index:2;height:calc(100vh - 7rem);overflow-y:auto;grid-area:toc}.spy>ul{padding-left:2rem}}.navH2{margin-left:20px}.navH3{margin-left:40px}.navH4{margin-left:60px}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
1951
1987
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyComponent, decorators: [{
|
|
1952
1988
|
type: Component,
|
|
@@ -1954,7 +1990,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1954
1990
|
}], ctorParameters: function () { return [{ type: BsScrollOffsetService }, { type: undefined, decorators: [{
|
|
1955
1991
|
type: Inject,
|
|
1956
1992
|
args: [DOCUMENT]
|
|
1957
|
-
}] }]; }, propDecorators: { directives: [{
|
|
1993
|
+
}] }, { type: i0.NgZone }]; }, propDecorators: { directives: [{
|
|
1958
1994
|
type: ContentChildren,
|
|
1959
1995
|
args: [BsScrollspyDirective, { descendants: true }]
|
|
1960
1996
|
}], anchors: [{
|
|
@@ -2096,7 +2132,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
2096
2132
|
class BsItemTemplateDirective {
|
|
2097
2133
|
constructor(select2component, templateRef) {
|
|
2098
2134
|
this.select2component = select2component;
|
|
2099
|
-
console.log('template', templateRef);
|
|
2100
2135
|
this.select2component.itemTemplate = templateRef;
|
|
2101
2136
|
}
|
|
2102
2137
|
}
|
|
@@ -2217,7 +2252,6 @@ class BsSnackbarService {
|
|
|
2217
2252
|
width: '100%'
|
|
2218
2253
|
});
|
|
2219
2254
|
const componentInstance = overlayRef.attach(portal);
|
|
2220
|
-
// componentInstance.
|
|
2221
2255
|
componentInstance.instance['instance'] = {
|
|
2222
2256
|
component: componentInstance,
|
|
2223
2257
|
overlay: overlayRef
|
|
@@ -2466,6 +2500,9 @@ class BsTooltipDirective {
|
|
|
2466
2500
|
this.hideTooltip();
|
|
2467
2501
|
};
|
|
2468
2502
|
}
|
|
2503
|
+
onBlur() {
|
|
2504
|
+
this.hideTooltip();
|
|
2505
|
+
}
|
|
2469
2506
|
showTooltip() {
|
|
2470
2507
|
const positions = [];
|
|
2471
2508
|
switch (this.bsTooltip) {
|
|
@@ -2528,7 +2565,7 @@ class BsTooltipDirective {
|
|
|
2528
2565
|
}
|
|
2529
2566
|
}
|
|
2530
2567
|
BsTooltipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipDirective, deps: [{ token: i1$1.Overlay }, { token: i0.TemplateRef }, { token: i0.ComponentFactoryResolver }, { token: i0.Injector }, { token: i0.ElementRef, host: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2531
|
-
BsTooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsTooltipDirective, selector: "*[bsTooltip]", inputs: { bsTooltip: "bsTooltip" }, ngImport: i0 });
|
|
2568
|
+
BsTooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsTooltipDirective, selector: "*[bsTooltip]", inputs: { bsTooltip: "bsTooltip" }, host: { listeners: { "window:blur": "onBlur()" } }, ngImport: i0 });
|
|
2532
2569
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipDirective, decorators: [{
|
|
2533
2570
|
type: Directive,
|
|
2534
2571
|
args: [{
|
|
@@ -2538,7 +2575,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
2538
2575
|
type: Host
|
|
2539
2576
|
}, {
|
|
2540
2577
|
type: SkipSelf
|
|
2541
|
-
}] }]; }, propDecorators: {
|
|
2578
|
+
}] }]; }, propDecorators: { onBlur: [{
|
|
2579
|
+
type: HostListener,
|
|
2580
|
+
args: ['window:blur']
|
|
2581
|
+
}], bsTooltip: [{
|
|
2542
2582
|
type: Input
|
|
2543
2583
|
}] } });
|
|
2544
2584
|
|