@mintplayer/ng-bootstrap 13.1.9 → 13.1.14
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/_bootstrap.scss +7 -0
- package/esm2020/lib/components/context-menu/context-menu.directive.mjs +34 -14
- package/esm2020/lib/components/dropdown/dropdown/dropdown.directive.mjs +10 -3
- package/esm2020/lib/components/dropdown/dropdown-menu/dropdown-menu.directive.mjs +3 -1
- package/esm2020/lib/components/file-upload/component/file-upload.component.mjs +85 -0
- package/esm2020/lib/components/file-upload/directive/file-upload-template.directive.mjs +18 -0
- package/esm2020/lib/components/file-upload/file-upload.mjs +2 -0
- package/esm2020/lib/components/file-upload/file-upload.module.mjs +43 -0
- package/esm2020/lib/components/file-upload/index.mjs +5 -0
- package/esm2020/lib/components/for/for.directive.mjs +32 -0
- package/esm2020/lib/components/for/for.module.mjs +26 -0
- package/esm2020/lib/components/for/index.mjs +3 -0
- package/esm2020/lib/components/index.mjs +3 -1
- package/esm2020/lib/components/navbar/navbar/navbar.component.mjs +9 -6
- package/esm2020/lib/components/navbar/navbar-nav/navbar-nav.component.mjs +46 -9
- 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/esm2020/lib/pipes/format-bytes/format-bytes.module.mjs +26 -0
- package/esm2020/lib/pipes/format-bytes/format-bytes.pipe.mjs +23 -0
- package/esm2020/lib/pipes/index.mjs +1 -1
- package/fesm2015/mintplayer-ng-bootstrap.mjs +519 -203
- package/fesm2015/mintplayer-ng-bootstrap.mjs.map +1 -1
- package/fesm2020/mintplayer-ng-bootstrap.mjs +519 -203
- package/fesm2020/mintplayer-ng-bootstrap.mjs.map +1 -1
- package/lib/components/context-menu/context-menu.directive.d.ts +2 -0
- package/lib/components/dropdown/dropdown/dropdown.directive.d.ts +1 -0
- package/lib/components/file-upload/component/file-upload.component.d.ts +19 -0
- package/lib/components/file-upload/directive/file-upload-template.directive.d.ts +8 -0
- package/lib/components/file-upload/file-upload.d.ts +4 -0
- package/lib/components/file-upload/file-upload.module.d.ts +12 -0
- package/lib/components/file-upload/index.d.ts +4 -0
- package/lib/components/for/for.directive.d.ts +7 -0
- package/lib/components/for/for.module.d.ts +8 -0
- package/lib/components/for/index.d.ts +2 -0
- package/lib/components/index.d.ts +2 -0
- package/lib/components/navbar/navbar/navbar.component.d.ts +3 -3
- package/lib/components/navbar/navbar-nav/navbar-nav.component.d.ts +10 -4
- 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/lib/pipes/format-bytes/format-bytes.module.d.ts +8 -0
- package/lib/pipes/format-bytes/format-bytes.pipe.d.ts +7 -0
- package/package.json +1 -1
- package/src/assets/ic-upload-file.svg +7 -0
- package/src/styles/utilities/cursor.scss +14 -0
|
@@ -4,7 +4,7 @@ import * as i1 from '@angular/common';
|
|
|
4
4
|
import { CommonModule, DOCUMENT } from '@angular/common';
|
|
5
5
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
6
6
|
import { SlideUpDownAnimation, FadeInOutAnimation, CarouselSlideAnimation, ColorTransitionAnimation } from '@mintplayer/ng-animations';
|
|
7
|
-
import { Subject, BehaviorSubject, map, takeUntil, filter, take, Observable, combineLatest } from 'rxjs';
|
|
7
|
+
import { Subject, BehaviorSubject, map, takeUntil, filter, take, Observable, combineLatest, debounceTime } from 'rxjs';
|
|
8
8
|
import { map as map$1, takeUntil as takeUntil$1, take as take$1 } from 'rxjs/operators';
|
|
9
9
|
import * as i1$1 from '@angular/cdk/overlay';
|
|
10
10
|
import { OverlayModule } from '@angular/cdk/overlay';
|
|
@@ -693,33 +693,50 @@ class BsContextMenuDirective {
|
|
|
693
693
|
this.element.nativeElement.oncontextmenu = (ev) => {
|
|
694
694
|
ev.preventDefault();
|
|
695
695
|
this.checkAndCloseExisting(ev);
|
|
696
|
+
console.log('d', element.nativeElement);
|
|
696
697
|
this.overlayRef = this.overlay.create({
|
|
697
|
-
|
|
698
|
+
hasBackdrop: false,
|
|
699
|
+
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
698
700
|
positionStrategy: this.overlay.position()
|
|
699
|
-
.
|
|
700
|
-
.
|
|
701
|
-
.
|
|
702
|
-
|
|
701
|
+
// .flexibleConnectedTo({ x: ev.x, y: ev.y })
|
|
702
|
+
.flexibleConnectedTo(this.element)
|
|
703
|
+
.withPositions([
|
|
704
|
+
// element: TopLeft - dropdown: TopLeft
|
|
705
|
+
{ originX: "start", originY: "top", overlayX: "start", overlayY: "top", offsetX: ev.offsetX, offsetY: ev.offsetY },
|
|
706
|
+
// // element: TopLeft - dropdown: BottomLeft
|
|
707
|
+
// { originX: "start", originY: "top", overlayX: "start", overlayY: "bottom", offsetX: ev.offsetX, offsetY: ev.offsetY },
|
|
708
|
+
// // element: TopLeft - dropdown: TopRight
|
|
709
|
+
// { originX: "start", originY: "top", overlayX: "end", overlayY: "top", offsetX: ev.offsetX, offsetY: ev.offsetY },
|
|
710
|
+
// // element: TopLeft - dropdown: BottomRight
|
|
711
|
+
// { originX: "start", originY: "top", overlayX: "end", overlayY: "bottom", offsetX: ev.offsetX, offsetY: ev.offsetY },
|
|
712
|
+
])
|
|
703
713
|
});
|
|
704
714
|
this.templatePortal = new TemplatePortal(this.templateRef, this.viewContainerRef);
|
|
705
|
-
this.overlayRef.attach(this.templatePortal);
|
|
715
|
+
const view = this.overlayRef.attach(this.templatePortal);
|
|
716
|
+
view.rootNodes.forEach(node => node.classList.add('position-static'));
|
|
706
717
|
};
|
|
707
718
|
}
|
|
708
719
|
clickAnywhere(ev) {
|
|
709
720
|
this.checkAndCloseExisting(ev);
|
|
710
721
|
}
|
|
711
|
-
|
|
722
|
+
onBlur() {
|
|
723
|
+
this.close();
|
|
724
|
+
}
|
|
725
|
+
close() {
|
|
712
726
|
if (this.overlayRef) {
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
727
|
+
this.overlayRef.detach();
|
|
728
|
+
this.overlayRef.dispose();
|
|
729
|
+
this.overlayRef = null;
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
checkAndCloseExisting(ev) {
|
|
733
|
+
if (this.overlayRef && !this.overlayRef.overlayElement.contains(ev.target)) {
|
|
734
|
+
this.close();
|
|
718
735
|
}
|
|
719
736
|
}
|
|
720
737
|
}
|
|
721
738
|
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 });
|
|
739
|
+
BsContextMenuDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsContextMenuDirective, selector: "[bsContextMenu]", host: { listeners: { "document:click": "clickAnywhere($event)", "window:blur": "onBlur()" } }, ngImport: i0 });
|
|
723
740
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsContextMenuDirective, decorators: [{
|
|
724
741
|
type: Directive,
|
|
725
742
|
args: [{
|
|
@@ -732,6 +749,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
732
749
|
}] }]; }, propDecorators: { clickAnywhere: [{
|
|
733
750
|
type: HostListener,
|
|
734
751
|
args: ['document:click', ['$event']]
|
|
752
|
+
}], onBlur: [{
|
|
753
|
+
type: HostListener,
|
|
754
|
+
args: ['window:blur']
|
|
735
755
|
}] } });
|
|
736
756
|
|
|
737
757
|
class BsContextMenuModule {
|
|
@@ -1090,7 +1110,9 @@ class BsDropdownMenuDirective extends ClickOutsideDirective {
|
|
|
1090
1110
|
positionStrategy: this.overlay.position()
|
|
1091
1111
|
.flexibleConnectedTo(!this.dropdown.toggle ? dropdown.elementRef : this.dropdown.toggle.toggleButton)
|
|
1092
1112
|
.withPositions([
|
|
1113
|
+
// element: BottomLeft - dropdown: TopLeft
|
|
1093
1114
|
{ originX: "start", originY: "bottom", overlayX: "start", overlayY: "top", offsetY: 0 },
|
|
1115
|
+
// element: TopLeft - dropdown: BottomLeft
|
|
1094
1116
|
{ originX: "start", originY: "top", overlayX: "start", overlayY: "bottom", offsetY: 0 },
|
|
1095
1117
|
]),
|
|
1096
1118
|
});
|
|
@@ -1190,9 +1212,13 @@ class BsDropdownDirective {
|
|
|
1190
1212
|
this.isOpenChange.emit(value);
|
|
1191
1213
|
}
|
|
1192
1214
|
}
|
|
1215
|
+
//#endregion
|
|
1216
|
+
onBlur() {
|
|
1217
|
+
this.isOpen = false;
|
|
1218
|
+
}
|
|
1193
1219
|
}
|
|
1194
1220
|
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 });
|
|
1221
|
+
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
1222
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownDirective, decorators: [{
|
|
1197
1223
|
type: Directive,
|
|
1198
1224
|
args: [{
|
|
@@ -1214,6 +1240,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1214
1240
|
type: Output
|
|
1215
1241
|
}], isOpen: [{
|
|
1216
1242
|
type: Input
|
|
1243
|
+
}], onBlur: [{
|
|
1244
|
+
type: HostListener,
|
|
1245
|
+
args: ['window:blur']
|
|
1217
1246
|
}] } });
|
|
1218
1247
|
|
|
1219
1248
|
class BsDatepickerComponent {
|
|
@@ -1295,6 +1324,395 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1295
1324
|
}]
|
|
1296
1325
|
}] });
|
|
1297
1326
|
|
|
1327
|
+
class BsProgressComponent {
|
|
1328
|
+
constructor() {
|
|
1329
|
+
this.progressClass = true;
|
|
1330
|
+
this.height = null;
|
|
1331
|
+
this.isIndeterminate = false;
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
BsProgressComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1335
|
+
BsProgressComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsProgressComponent, selector: "bs-progress", inputs: { height: "height", isIndeterminate: "isIndeterminate" }, host: { properties: { "class.progress": "this.progressClass", "style.height.px": "this.height" } }, ngImport: i0, template: "<ng-content *ngIf=\"!isIndeterminate\"></ng-content>\n<div *ngIf=\"isIndeterminate\" class=\"progress-bar progress-bar-infinite\" role=\"progressbar\" aria-valuenow=\"infinite\"></div>", styles: ["@keyframes progress-infinite{0%{width:10%;margin-left:0%}25%{width:70%;margin-left:15%}50%{width:10%;margin-left:90%}75%{width:70%;margin-left:15%}to{width:10%;margin-left:0%}}.progress-bar-infinite{animation:progress-infinite 1.5s infinite}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1336
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressComponent, decorators: [{
|
|
1337
|
+
type: Component,
|
|
1338
|
+
args: [{ selector: 'bs-progress', template: "<ng-content *ngIf=\"!isIndeterminate\"></ng-content>\n<div *ngIf=\"isIndeterminate\" class=\"progress-bar progress-bar-infinite\" role=\"progressbar\" aria-valuenow=\"infinite\"></div>", styles: ["@keyframes progress-infinite{0%{width:10%;margin-left:0%}25%{width:70%;margin-left:15%}50%{width:10%;margin-left:90%}75%{width:70%;margin-left:15%}to{width:10%;margin-left:0%}}.progress-bar-infinite{animation:progress-infinite 1.5s infinite}\n"] }]
|
|
1339
|
+
}], propDecorators: { progressClass: [{
|
|
1340
|
+
type: HostBinding,
|
|
1341
|
+
args: ['class.progress']
|
|
1342
|
+
}], height: [{
|
|
1343
|
+
type: Input
|
|
1344
|
+
}, {
|
|
1345
|
+
type: HostBinding,
|
|
1346
|
+
args: ['style.height.px']
|
|
1347
|
+
}], isIndeterminate: [{
|
|
1348
|
+
type: Input
|
|
1349
|
+
}] } });
|
|
1350
|
+
|
|
1351
|
+
class BsProgressBarComponent {
|
|
1352
|
+
constructor() {
|
|
1353
|
+
this.destroyed$ = new Subject();
|
|
1354
|
+
this.minimum$ = new BehaviorSubject(0);
|
|
1355
|
+
this.maximum$ = new BehaviorSubject(100);
|
|
1356
|
+
this.value$ = new BehaviorSubject(50);
|
|
1357
|
+
this.color$ = new BehaviorSubject(Color.primary);
|
|
1358
|
+
this.striped = false;
|
|
1359
|
+
this.animated = false;
|
|
1360
|
+
this.progressBar = true;
|
|
1361
|
+
this.colorClass = 'bg-primary';
|
|
1362
|
+
this.widthStyle = '0';
|
|
1363
|
+
this.role = 'progressbar';
|
|
1364
|
+
this.valueNow = 50;
|
|
1365
|
+
this.valueMin = 0;
|
|
1366
|
+
this.valueMax = 100;
|
|
1367
|
+
this.percentage$ = combineLatest([this.minimum$, this.maximum$, this.value$])
|
|
1368
|
+
.pipe(map(([minimum, maximum, value]) => {
|
|
1369
|
+
return (value - minimum) / (maximum - minimum) * 100;
|
|
1370
|
+
}));
|
|
1371
|
+
this.width$ = this.percentage$
|
|
1372
|
+
.pipe(map((width) => {
|
|
1373
|
+
return String(width) + '%';
|
|
1374
|
+
}));
|
|
1375
|
+
this.colorClass$ = this.color$
|
|
1376
|
+
.pipe(map((color) => {
|
|
1377
|
+
const name = Color[color];
|
|
1378
|
+
return `bg-${name}`;
|
|
1379
|
+
}));
|
|
1380
|
+
this.colorClass$
|
|
1381
|
+
.pipe(takeUntil(this.destroyed$))
|
|
1382
|
+
.subscribe((color) => {
|
|
1383
|
+
this.colorClass = color;
|
|
1384
|
+
});
|
|
1385
|
+
this.width$
|
|
1386
|
+
.pipe(takeUntil(this.destroyed$))
|
|
1387
|
+
.subscribe((width) => {
|
|
1388
|
+
this.widthStyle = width;
|
|
1389
|
+
});
|
|
1390
|
+
this.value$
|
|
1391
|
+
.pipe(takeUntil(this.destroyed$))
|
|
1392
|
+
.subscribe((value) => {
|
|
1393
|
+
this.valueNow = value;
|
|
1394
|
+
});
|
|
1395
|
+
this.minimum$
|
|
1396
|
+
.pipe(takeUntil(this.destroyed$))
|
|
1397
|
+
.subscribe((value) => {
|
|
1398
|
+
this.valueMin = value;
|
|
1399
|
+
});
|
|
1400
|
+
this.maximum$
|
|
1401
|
+
.pipe(takeUntil(this.destroyed$))
|
|
1402
|
+
.subscribe((value) => {
|
|
1403
|
+
this.valueMax = value;
|
|
1404
|
+
});
|
|
1405
|
+
}
|
|
1406
|
+
set minimum(value) {
|
|
1407
|
+
this.minimum$.next(value);
|
|
1408
|
+
}
|
|
1409
|
+
set maximum(value) {
|
|
1410
|
+
this.maximum$.next(value);
|
|
1411
|
+
}
|
|
1412
|
+
set value(value) {
|
|
1413
|
+
this.value$.next(value);
|
|
1414
|
+
}
|
|
1415
|
+
set color(value) {
|
|
1416
|
+
this.color$.next(value);
|
|
1417
|
+
}
|
|
1418
|
+
ngOnDestroy() {
|
|
1419
|
+
this.destroyed$.next(true);
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
BsProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1423
|
+
BsProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsProgressBarComponent, selector: "bs-progress-bar", inputs: { minimum: "minimum", maximum: "maximum", value: "value", color: "color", striped: "striped", animated: "animated" }, host: { properties: { "class.progress-bar-striped": "this.striped", "class.progress-bar-animated": "this.animated", "class.progress-bar": "this.progressBar", "class": "this.colorClass", "style.width": "this.widthStyle", "attr.role": "this.role", "attr.aria-valuenow": "this.valueNow", "attr.aria-valuemin": "this.valueMin", "attr.aria-valuemax": "this.valueMax" } }, ngImport: i0, template: "", styles: [""] });
|
|
1424
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarComponent, decorators: [{
|
|
1425
|
+
type: Component,
|
|
1426
|
+
args: [{ selector: 'bs-progress-bar', template: "", styles: [""] }]
|
|
1427
|
+
}], ctorParameters: function () { return []; }, propDecorators: { minimum: [{
|
|
1428
|
+
type: Input
|
|
1429
|
+
}], maximum: [{
|
|
1430
|
+
type: Input
|
|
1431
|
+
}], value: [{
|
|
1432
|
+
type: Input
|
|
1433
|
+
}], color: [{
|
|
1434
|
+
type: Input
|
|
1435
|
+
}], striped: [{
|
|
1436
|
+
type: Input
|
|
1437
|
+
}, {
|
|
1438
|
+
type: HostBinding,
|
|
1439
|
+
args: ['class.progress-bar-striped']
|
|
1440
|
+
}], animated: [{
|
|
1441
|
+
type: Input
|
|
1442
|
+
}, {
|
|
1443
|
+
type: HostBinding,
|
|
1444
|
+
args: ['class.progress-bar-animated']
|
|
1445
|
+
}], progressBar: [{
|
|
1446
|
+
type: HostBinding,
|
|
1447
|
+
args: ['class.progress-bar']
|
|
1448
|
+
}], colorClass: [{
|
|
1449
|
+
type: HostBinding,
|
|
1450
|
+
args: ['class']
|
|
1451
|
+
}], widthStyle: [{
|
|
1452
|
+
type: HostBinding,
|
|
1453
|
+
args: ['style.width']
|
|
1454
|
+
}], role: [{
|
|
1455
|
+
type: HostBinding,
|
|
1456
|
+
args: ['attr.role']
|
|
1457
|
+
}], valueNow: [{
|
|
1458
|
+
type: HostBinding,
|
|
1459
|
+
args: ['attr.aria-valuenow']
|
|
1460
|
+
}], valueMin: [{
|
|
1461
|
+
type: HostBinding,
|
|
1462
|
+
args: ['attr.aria-valuemin']
|
|
1463
|
+
}], valueMax: [{
|
|
1464
|
+
type: HostBinding,
|
|
1465
|
+
args: ['attr.aria-valuemax']
|
|
1466
|
+
}] } });
|
|
1467
|
+
|
|
1468
|
+
class BsForDirective {
|
|
1469
|
+
onMouseClick() {
|
|
1470
|
+
if (!('tagName' in this.bsFor)) {
|
|
1471
|
+
this.bsFor.focus();
|
|
1472
|
+
}
|
|
1473
|
+
else if (this.bsFor.tagName.toLowerCase() !== 'input') {
|
|
1474
|
+
this.bsFor.focus();
|
|
1475
|
+
}
|
|
1476
|
+
else if (this.bsFor.type.toLowerCase() === 'file') {
|
|
1477
|
+
this.bsFor.click();
|
|
1478
|
+
}
|
|
1479
|
+
else {
|
|
1480
|
+
this.bsFor.focus();
|
|
1481
|
+
}
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
BsForDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsForDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1485
|
+
BsForDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsForDirective, selector: "[bsFor]", inputs: { bsFor: "bsFor" }, host: { listeners: { "click": "onMouseClick()" } }, ngImport: i0 });
|
|
1486
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsForDirective, decorators: [{
|
|
1487
|
+
type: Directive,
|
|
1488
|
+
args: [{
|
|
1489
|
+
selector: '[bsFor]'
|
|
1490
|
+
}]
|
|
1491
|
+
}], propDecorators: { bsFor: [{
|
|
1492
|
+
type: Input
|
|
1493
|
+
}], onMouseClick: [{
|
|
1494
|
+
type: HostListener,
|
|
1495
|
+
args: ['click']
|
|
1496
|
+
}] } });
|
|
1497
|
+
|
|
1498
|
+
class BsFormatBytesPipe {
|
|
1499
|
+
transform(value, decimals = 2) {
|
|
1500
|
+
if (value === 0) {
|
|
1501
|
+
return "0 Bytes";
|
|
1502
|
+
}
|
|
1503
|
+
const k = 1024;
|
|
1504
|
+
const dm = decimals <= 0 ? 0 : decimals;
|
|
1505
|
+
const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
|
|
1506
|
+
const i = Math.floor(Math.log(value) / Math.log(k));
|
|
1507
|
+
return parseFloat((value / Math.pow(k, i)).toFixed(dm)) + " " + sizes[i];
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
BsFormatBytesPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1511
|
+
BsFormatBytesPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesPipe, name: "bsFormatBytes" });
|
|
1512
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesPipe, decorators: [{
|
|
1513
|
+
type: Pipe,
|
|
1514
|
+
args: [{
|
|
1515
|
+
name: 'bsFormatBytes'
|
|
1516
|
+
}]
|
|
1517
|
+
}] });
|
|
1518
|
+
|
|
1519
|
+
class BsFileUploadComponent {
|
|
1520
|
+
constructor() {
|
|
1521
|
+
this.dropFilesCaption = 'Drop your files here';
|
|
1522
|
+
this.browseFilesCaption = 'Browse for files';
|
|
1523
|
+
this.placeholder = 'Drop files to upload';
|
|
1524
|
+
this.isDraggingFile = false;
|
|
1525
|
+
this.files = [];
|
|
1526
|
+
this.filesDropped = new EventEmitter();
|
|
1527
|
+
}
|
|
1528
|
+
onChange(event) {
|
|
1529
|
+
console.log('event', event);
|
|
1530
|
+
if (!event.target)
|
|
1531
|
+
return;
|
|
1532
|
+
if (!('files' in event.target))
|
|
1533
|
+
return;
|
|
1534
|
+
if (!event.target['files'])
|
|
1535
|
+
return;
|
|
1536
|
+
const files = event.target.files;
|
|
1537
|
+
if (!files)
|
|
1538
|
+
return;
|
|
1539
|
+
this.processDroppedFiles(files);
|
|
1540
|
+
}
|
|
1541
|
+
onDragOver(event) {
|
|
1542
|
+
event.preventDefault();
|
|
1543
|
+
event.stopPropagation();
|
|
1544
|
+
if (event.dataTransfer) {
|
|
1545
|
+
this.isDraggingFile = true;
|
|
1546
|
+
event.dataTransfer.effectAllowed = "copy";
|
|
1547
|
+
}
|
|
1548
|
+
}
|
|
1549
|
+
onDragLeave(event) {
|
|
1550
|
+
event.preventDefault();
|
|
1551
|
+
event.stopPropagation();
|
|
1552
|
+
this.isDraggingFile = false;
|
|
1553
|
+
}
|
|
1554
|
+
onDrop(event) {
|
|
1555
|
+
event.preventDefault();
|
|
1556
|
+
event.stopPropagation();
|
|
1557
|
+
this.isDraggingFile = false;
|
|
1558
|
+
if (event.dataTransfer && event.dataTransfer.files) {
|
|
1559
|
+
this.processDroppedFiles(event.dataTransfer.files);
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
processDroppedFiles(fileList) {
|
|
1563
|
+
const newFiles = [...Array(fileList.length).keys()]
|
|
1564
|
+
.map(i => fileList.item(i))
|
|
1565
|
+
.filter(f => !!f)
|
|
1566
|
+
.map(f => ({ file: f, progress: 0 }));
|
|
1567
|
+
this.files.push(...newFiles);
|
|
1568
|
+
this.filesDropped.emit(newFiles);
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
BsFileUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1572
|
+
BsFileUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsFileUploadComponent, selector: "bs-file-upload", inputs: { dropFilesCaption: "dropFilesCaption", browseFilesCaption: "browseFilesCaption", placeholder: "placeholder", files: "files" }, outputs: { filesDropped: "filesDropped" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDrop($event)" } }, ngImport: i0, template: "<div class=\"dropzone border position-relative p-5\" [class.dragging]=\"isDraggingFile\">\n <input type=\"file\" multiple #fileUpload (change)=\"onChange($event)\" [title]=\"placeholder\" [placeholder]=\"placeholder\" class=\"position-absolute w-100 h-100\">\n <!-- <img src=\"/assets/ic-file-upload.svg\" [alt]=\"placeholder\"> -->\n <span class=\"h3 d-block\">{{ dropFilesCaption }}</span>\n <label class=\"btn btn-primary position-relative\" [bsFor]=\"fileUpload\">{{ browseFilesCaption }}</label>\n</div>\n<ul class=\"list-group files-list\">\n <li class=\"list-group-item\" *ngFor=\"let upload of files\">\n <ng-container *ngTemplateOutlet=\"fileTemplate ?? defaultFileTemplate; context: { $implicit: upload }\"></ng-container>\n </li>\n</ul>\n\n<ng-template #defaultFileTemplate let-upload>\n <div class=\"d-flex flex-row mx-auto\">\n <div class=\"file-img\"></div>\n <div class=\"flex-grow-1 text-start px-2\">\n <span class=\"d-block text-truncate text-secondary\">{{ upload.file.name }}</span>\n <span class=\"d-block text-grey mb-0\">{{ upload.file.size | bsFormatBytes }}</span>\n <bs-progress [height]=\"4\">\n <bs-progress-bar [minimum]=\"0\" [maximum]=\"upload.file.size\" [value]=\"upload.progress\"></bs-progress-bar>\n </bs-progress>\n </div>\n </div>\n</ng-template>", styles: [".dropzone{z-index:1}.dropzone.dragging{border:4px solid #CB1535!important;background:#DC88A8;margin:-3px -3px -4px}.dropzone input{opacity:0;z-index:2;top:0;left:0}.dropzone .btn{z-index:5}.files-list{margin-top:-1px}.files-list .d-flex{max-width:400px}.text-grey{color:#999}.list-group span{margin:-5px auto}\n"], components: [{ type: BsProgressComponent, selector: "bs-progress", inputs: ["height", "isIndeterminate"] }, { type: BsProgressBarComponent, selector: "bs-progress-bar", inputs: ["minimum", "maximum", "value", "color", "striped", "animated"] }], directives: [{ type: BsForDirective, selector: "[bsFor]", inputs: ["bsFor"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "bsFormatBytes": BsFormatBytesPipe } });
|
|
1573
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadComponent, decorators: [{
|
|
1574
|
+
type: Component,
|
|
1575
|
+
args: [{ selector: 'bs-file-upload', template: "<div class=\"dropzone border position-relative p-5\" [class.dragging]=\"isDraggingFile\">\n <input type=\"file\" multiple #fileUpload (change)=\"onChange($event)\" [title]=\"placeholder\" [placeholder]=\"placeholder\" class=\"position-absolute w-100 h-100\">\n <!-- <img src=\"/assets/ic-file-upload.svg\" [alt]=\"placeholder\"> -->\n <span class=\"h3 d-block\">{{ dropFilesCaption }}</span>\n <label class=\"btn btn-primary position-relative\" [bsFor]=\"fileUpload\">{{ browseFilesCaption }}</label>\n</div>\n<ul class=\"list-group files-list\">\n <li class=\"list-group-item\" *ngFor=\"let upload of files\">\n <ng-container *ngTemplateOutlet=\"fileTemplate ?? defaultFileTemplate; context: { $implicit: upload }\"></ng-container>\n </li>\n</ul>\n\n<ng-template #defaultFileTemplate let-upload>\n <div class=\"d-flex flex-row mx-auto\">\n <div class=\"file-img\"></div>\n <div class=\"flex-grow-1 text-start px-2\">\n <span class=\"d-block text-truncate text-secondary\">{{ upload.file.name }}</span>\n <span class=\"d-block text-grey mb-0\">{{ upload.file.size | bsFormatBytes }}</span>\n <bs-progress [height]=\"4\">\n <bs-progress-bar [minimum]=\"0\" [maximum]=\"upload.file.size\" [value]=\"upload.progress\"></bs-progress-bar>\n </bs-progress>\n </div>\n </div>\n</ng-template>", styles: [".dropzone{z-index:1}.dropzone.dragging{border:4px solid #CB1535!important;background:#DC88A8;margin:-3px -3px -4px}.dropzone input{opacity:0;z-index:2;top:0;left:0}.dropzone .btn{z-index:5}.files-list{margin-top:-1px}.files-list .d-flex{max-width:400px}.text-grey{color:#999}.list-group span{margin:-5px auto}\n"] }]
|
|
1576
|
+
}], propDecorators: { dropFilesCaption: [{
|
|
1577
|
+
type: Input
|
|
1578
|
+
}], browseFilesCaption: [{
|
|
1579
|
+
type: Input
|
|
1580
|
+
}], placeholder: [{
|
|
1581
|
+
type: Input
|
|
1582
|
+
}], files: [{
|
|
1583
|
+
type: Input
|
|
1584
|
+
}], filesDropped: [{
|
|
1585
|
+
type: Output
|
|
1586
|
+
}], onDragOver: [{
|
|
1587
|
+
type: HostListener,
|
|
1588
|
+
args: ['dragover', ['$event']]
|
|
1589
|
+
}], onDragLeave: [{
|
|
1590
|
+
type: HostListener,
|
|
1591
|
+
args: ['dragleave', ['$event']]
|
|
1592
|
+
}], onDrop: [{
|
|
1593
|
+
type: HostListener,
|
|
1594
|
+
args: ['drop', ['$event']]
|
|
1595
|
+
}] } });
|
|
1596
|
+
|
|
1597
|
+
class BsFileUploadTemplateDirective {
|
|
1598
|
+
constructor(fileUploadComponent, templateRef) {
|
|
1599
|
+
fileUploadComponent.fileTemplate = templateRef;
|
|
1600
|
+
}
|
|
1601
|
+
}
|
|
1602
|
+
BsFileUploadTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadTemplateDirective, deps: [{ token: BsFileUploadComponent }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1603
|
+
BsFileUploadTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsFileUploadTemplateDirective, selector: "[bsFileUploadTemplate]", ngImport: i0 });
|
|
1604
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadTemplateDirective, decorators: [{
|
|
1605
|
+
type: Directive,
|
|
1606
|
+
args: [{
|
|
1607
|
+
selector: '[bsFileUploadTemplate]'
|
|
1608
|
+
}]
|
|
1609
|
+
}], ctorParameters: function () { return [{ type: BsFileUploadComponent }, { type: i0.TemplateRef }]; } });
|
|
1610
|
+
|
|
1611
|
+
class BsForModule {
|
|
1612
|
+
}
|
|
1613
|
+
BsForModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsForModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1614
|
+
BsForModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsForModule, declarations: [BsForDirective], imports: [CommonModule], exports: [BsForDirective] });
|
|
1615
|
+
BsForModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsForModule, imports: [[
|
|
1616
|
+
CommonModule
|
|
1617
|
+
]] });
|
|
1618
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsForModule, decorators: [{
|
|
1619
|
+
type: NgModule,
|
|
1620
|
+
args: [{
|
|
1621
|
+
declarations: [
|
|
1622
|
+
BsForDirective
|
|
1623
|
+
],
|
|
1624
|
+
imports: [
|
|
1625
|
+
CommonModule
|
|
1626
|
+
],
|
|
1627
|
+
exports: [
|
|
1628
|
+
BsForDirective
|
|
1629
|
+
]
|
|
1630
|
+
}]
|
|
1631
|
+
}] });
|
|
1632
|
+
|
|
1633
|
+
class BsProgressBarModule {
|
|
1634
|
+
}
|
|
1635
|
+
BsProgressBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1636
|
+
BsProgressBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, declarations: [BsProgressBarComponent,
|
|
1637
|
+
BsProgressComponent], imports: [CommonModule], exports: [BsProgressBarComponent,
|
|
1638
|
+
BsProgressComponent] });
|
|
1639
|
+
BsProgressBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, imports: [[
|
|
1640
|
+
CommonModule
|
|
1641
|
+
]] });
|
|
1642
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, decorators: [{
|
|
1643
|
+
type: NgModule,
|
|
1644
|
+
args: [{
|
|
1645
|
+
declarations: [
|
|
1646
|
+
BsProgressBarComponent,
|
|
1647
|
+
BsProgressComponent
|
|
1648
|
+
],
|
|
1649
|
+
imports: [
|
|
1650
|
+
CommonModule
|
|
1651
|
+
],
|
|
1652
|
+
exports: [
|
|
1653
|
+
BsProgressBarComponent,
|
|
1654
|
+
BsProgressComponent
|
|
1655
|
+
]
|
|
1656
|
+
}]
|
|
1657
|
+
}] });
|
|
1658
|
+
|
|
1659
|
+
class BsFormatBytesModule {
|
|
1660
|
+
}
|
|
1661
|
+
BsFormatBytesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1662
|
+
BsFormatBytesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesModule, declarations: [BsFormatBytesPipe], imports: [CommonModule], exports: [BsFormatBytesPipe] });
|
|
1663
|
+
BsFormatBytesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesModule, imports: [[
|
|
1664
|
+
CommonModule
|
|
1665
|
+
]] });
|
|
1666
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesModule, decorators: [{
|
|
1667
|
+
type: NgModule,
|
|
1668
|
+
args: [{
|
|
1669
|
+
declarations: [
|
|
1670
|
+
BsFormatBytesPipe
|
|
1671
|
+
],
|
|
1672
|
+
imports: [
|
|
1673
|
+
CommonModule
|
|
1674
|
+
],
|
|
1675
|
+
exports: [
|
|
1676
|
+
BsFormatBytesPipe
|
|
1677
|
+
]
|
|
1678
|
+
}]
|
|
1679
|
+
}] });
|
|
1680
|
+
|
|
1681
|
+
class BsFileUploadModule {
|
|
1682
|
+
}
|
|
1683
|
+
BsFileUploadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1684
|
+
BsFileUploadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadModule, declarations: [BsFileUploadComponent,
|
|
1685
|
+
BsFileUploadTemplateDirective], imports: [CommonModule,
|
|
1686
|
+
BsForModule,
|
|
1687
|
+
BsFormatBytesModule,
|
|
1688
|
+
BsProgressBarModule], exports: [BsFileUploadComponent,
|
|
1689
|
+
BsFileUploadTemplateDirective] });
|
|
1690
|
+
BsFileUploadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadModule, imports: [[
|
|
1691
|
+
CommonModule,
|
|
1692
|
+
BsForModule,
|
|
1693
|
+
BsFormatBytesModule,
|
|
1694
|
+
BsProgressBarModule
|
|
1695
|
+
]] });
|
|
1696
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadModule, decorators: [{
|
|
1697
|
+
type: NgModule,
|
|
1698
|
+
args: [{
|
|
1699
|
+
declarations: [
|
|
1700
|
+
BsFileUploadComponent,
|
|
1701
|
+
BsFileUploadTemplateDirective
|
|
1702
|
+
],
|
|
1703
|
+
imports: [
|
|
1704
|
+
CommonModule,
|
|
1705
|
+
BsForModule,
|
|
1706
|
+
BsFormatBytesModule,
|
|
1707
|
+
BsProgressBarModule
|
|
1708
|
+
],
|
|
1709
|
+
exports: [
|
|
1710
|
+
BsFileUploadComponent,
|
|
1711
|
+
BsFileUploadTemplateDirective
|
|
1712
|
+
]
|
|
1713
|
+
}]
|
|
1714
|
+
}] });
|
|
1715
|
+
|
|
1298
1716
|
class BsListGroupItemComponent {
|
|
1299
1717
|
constructor() {
|
|
1300
1718
|
}
|
|
@@ -1406,44 +1824,82 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1406
1824
|
|
|
1407
1825
|
class BsNavbarComponent {
|
|
1408
1826
|
constructor() {
|
|
1409
|
-
this.isExpanded = false;
|
|
1827
|
+
this.isExpanded$ = new BehaviorSubject(false);
|
|
1410
1828
|
}
|
|
1411
1829
|
toggleExpanded() {
|
|
1412
|
-
this.isExpanded
|
|
1830
|
+
this.isExpanded$.pipe(take(1)).subscribe((isExpanded) => {
|
|
1831
|
+
this.isExpanded$.next(!isExpanded);
|
|
1832
|
+
});
|
|
1413
1833
|
}
|
|
1414
1834
|
}
|
|
1415
1835
|
BsNavbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1416
|
-
BsNavbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", 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\"
|
|
1836
|
+
BsNavbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", 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\">\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:10}@media (min-width: 768px){.mx-md-unset{margin-left:0!important;margin-right:0!important}.w-md-auto{width:auto!important}}\n"] });
|
|
1417
1837
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarComponent, decorators: [{
|
|
1418
1838
|
type: Component,
|
|
1419
|
-
args: [{ selector: 'bs-navbar', 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\"
|
|
1420
|
-
}],
|
|
1839
|
+
args: [{ selector: 'bs-navbar', 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\">\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:10}@media (min-width: 768px){.mx-md-unset{margin-left:0!important;margin-right:0!important}.w-md-auto{width:auto!important}}\n"] }]
|
|
1840
|
+
}], propDecorators: { nav: [{
|
|
1421
1841
|
type: ViewChild,
|
|
1422
1842
|
args: ['nav']
|
|
1423
1843
|
}] } });
|
|
1424
1844
|
|
|
1425
1845
|
class BsNavbarNavComponent {
|
|
1426
1846
|
constructor(bsNavbar) {
|
|
1427
|
-
|
|
1428
|
-
this.
|
|
1847
|
+
this.collapse$ = new BehaviorSubject(true);
|
|
1848
|
+
this.windowWidth$ = new BehaviorSubject(null);
|
|
1849
|
+
this.isResizing$ = new BehaviorSubject(false);
|
|
1850
|
+
this.destroyed$ = new Subject();
|
|
1429
1851
|
this.bsNavbar = bsNavbar;
|
|
1852
|
+
this.showNavs$ = combineLatest([this.bsNavbar.isExpanded$, this.windowWidth$])
|
|
1853
|
+
.pipe(filter(([isExpanded, windowWidth]) => {
|
|
1854
|
+
return windowWidth !== null;
|
|
1855
|
+
}))
|
|
1856
|
+
.pipe(map(([isExpanded, windowWidth]) => {
|
|
1857
|
+
if (windowWidth === null) {
|
|
1858
|
+
throw 'windowWidth should not be null here';
|
|
1859
|
+
}
|
|
1860
|
+
else if (windowWidth >= 768) {
|
|
1861
|
+
return true;
|
|
1862
|
+
}
|
|
1863
|
+
else if (isExpanded) {
|
|
1864
|
+
return true;
|
|
1865
|
+
}
|
|
1866
|
+
else {
|
|
1867
|
+
return false;
|
|
1868
|
+
}
|
|
1869
|
+
}));
|
|
1870
|
+
this.windowWidth$
|
|
1871
|
+
.pipe(debounceTime(300), takeUntil(this.destroyed$))
|
|
1872
|
+
.subscribe(() => {
|
|
1873
|
+
this.isResizing$.next(false);
|
|
1874
|
+
});
|
|
1875
|
+
this.onWindowResize();
|
|
1430
1876
|
}
|
|
1431
|
-
|
|
1877
|
+
ngOnDestroy() {
|
|
1878
|
+
this.destroyed$.next(true);
|
|
1432
1879
|
}
|
|
1880
|
+
//#region collapse
|
|
1433
1881
|
set collapse(value) {
|
|
1434
|
-
this.
|
|
1882
|
+
this.collapse$.next(value);
|
|
1435
1883
|
}
|
|
1436
1884
|
get collapse() {
|
|
1437
|
-
return this.
|
|
1885
|
+
return this.collapse$.value;
|
|
1886
|
+
}
|
|
1887
|
+
//#endregion
|
|
1888
|
+
onWindowResize() {
|
|
1889
|
+
this.isResizing$.next(true);
|
|
1890
|
+
this.windowWidth$.next(window.innerWidth);
|
|
1438
1891
|
}
|
|
1439
1892
|
}
|
|
1440
1893
|
BsNavbarNavComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarNavComponent, deps: [{ token: BsNavbarComponent }], target: i0.ɵɵFactoryTarget.Component });
|
|
1441
|
-
BsNavbarNavComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsNavbarNavComponent, selector: "bs-navbar-nav", inputs: { collapse: "collapse" }, ngImport: i0, template: "<div class=\"navbar-collapse
|
|
1894
|
+
BsNavbarNavComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsNavbarNavComponent, selector: "bs-navbar-nav", inputs: { collapse: "collapse" }, host: { listeners: { "window:resize": "onWindowResize()" } }, ngImport: i0, template: "<div class=\"navbar-collapse w-100 show\" [class.collapse]=\"collapse$ | async\" *ngIf=\"showNavs$ | async\" [@slideUpDown] [@.disabled]=\"isResizing$ | async\">\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"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i1.AsyncPipe }, animations: [SlideUpDownAnimation] });
|
|
1442
1895
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarNavComponent, decorators: [{
|
|
1443
1896
|
type: Component,
|
|
1444
|
-
args: [{ selector: 'bs-navbar-nav', animations: [SlideUpDownAnimation], template: "<div class=\"navbar-collapse
|
|
1897
|
+
args: [{ selector: 'bs-navbar-nav', animations: [SlideUpDownAnimation], template: "<div class=\"navbar-collapse w-100 show\" [class.collapse]=\"collapse$ | async\" *ngIf=\"showNavs$ | async\" [@slideUpDown] [@.disabled]=\"isResizing$ | async\">\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"] }]
|
|
1445
1898
|
}], ctorParameters: function () { return [{ type: BsNavbarComponent }]; }, propDecorators: { collapse: [{
|
|
1446
1899
|
type: Input
|
|
1900
|
+
}], onWindowResize: [{
|
|
1901
|
+
type: HostListener,
|
|
1902
|
+
args: ['window:resize']
|
|
1447
1903
|
}] } });
|
|
1448
1904
|
|
|
1449
1905
|
class BsNavbarItemComponent {
|
|
@@ -1661,173 +2117,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1661
2117
|
}]
|
|
1662
2118
|
}] });
|
|
1663
2119
|
|
|
1664
|
-
class BsProgressComponent {
|
|
1665
|
-
constructor() {
|
|
1666
|
-
this.progressClass = true;
|
|
1667
|
-
this.height = null;
|
|
1668
|
-
this.isIndeterminate = false;
|
|
1669
|
-
}
|
|
1670
|
-
}
|
|
1671
|
-
BsProgressComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1672
|
-
BsProgressComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsProgressComponent, selector: "bs-progress", inputs: { height: "height", isIndeterminate: "isIndeterminate" }, host: { properties: { "class.progress": "this.progressClass", "style.height.px": "this.height" } }, ngImport: i0, template: "<ng-content *ngIf=\"!isIndeterminate\"></ng-content>\n<div *ngIf=\"isIndeterminate\" class=\"progress-bar progress-bar-infinite\" role=\"progressbar\" aria-valuenow=\"infinite\"></div>", styles: ["@keyframes progress-infinite{0%{width:10%;margin-left:0%}25%{width:70%;margin-left:15%}50%{width:10%;margin-left:90%}75%{width:70%;margin-left:15%}to{width:10%;margin-left:0%}}.progress-bar-infinite{animation:progress-infinite 1.5s infinite}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1673
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressComponent, decorators: [{
|
|
1674
|
-
type: Component,
|
|
1675
|
-
args: [{ selector: 'bs-progress', template: "<ng-content *ngIf=\"!isIndeterminate\"></ng-content>\n<div *ngIf=\"isIndeterminate\" class=\"progress-bar progress-bar-infinite\" role=\"progressbar\" aria-valuenow=\"infinite\"></div>", styles: ["@keyframes progress-infinite{0%{width:10%;margin-left:0%}25%{width:70%;margin-left:15%}50%{width:10%;margin-left:90%}75%{width:70%;margin-left:15%}to{width:10%;margin-left:0%}}.progress-bar-infinite{animation:progress-infinite 1.5s infinite}\n"] }]
|
|
1676
|
-
}], propDecorators: { progressClass: [{
|
|
1677
|
-
type: HostBinding,
|
|
1678
|
-
args: ['class.progress']
|
|
1679
|
-
}], height: [{
|
|
1680
|
-
type: Input
|
|
1681
|
-
}, {
|
|
1682
|
-
type: HostBinding,
|
|
1683
|
-
args: ['style.height.px']
|
|
1684
|
-
}], isIndeterminate: [{
|
|
1685
|
-
type: Input
|
|
1686
|
-
}] } });
|
|
1687
|
-
|
|
1688
|
-
class BsProgressBarComponent {
|
|
1689
|
-
constructor() {
|
|
1690
|
-
this.destroyed$ = new Subject();
|
|
1691
|
-
this.minimum$ = new BehaviorSubject(0);
|
|
1692
|
-
this.maximum$ = new BehaviorSubject(100);
|
|
1693
|
-
this.value$ = new BehaviorSubject(50);
|
|
1694
|
-
this.color$ = new BehaviorSubject(Color.primary);
|
|
1695
|
-
this.striped = false;
|
|
1696
|
-
this.animated = false;
|
|
1697
|
-
this.progressBar = true;
|
|
1698
|
-
this.colorClass = 'bg-primary';
|
|
1699
|
-
this.widthStyle = '0';
|
|
1700
|
-
this.role = 'progressbar';
|
|
1701
|
-
this.valueNow = 50;
|
|
1702
|
-
this.valueMin = 0;
|
|
1703
|
-
this.valueMax = 100;
|
|
1704
|
-
this.percentage$ = combineLatest([this.minimum$, this.maximum$, this.value$])
|
|
1705
|
-
.pipe(map(([minimum, maximum, value]) => {
|
|
1706
|
-
return (value - minimum) / (maximum - minimum) * 100;
|
|
1707
|
-
}));
|
|
1708
|
-
this.width$ = this.percentage$
|
|
1709
|
-
.pipe(map((width) => {
|
|
1710
|
-
return String(width) + '%';
|
|
1711
|
-
}));
|
|
1712
|
-
this.colorClass$ = this.color$
|
|
1713
|
-
.pipe(map((color) => {
|
|
1714
|
-
const name = Color[color];
|
|
1715
|
-
return `bg-${name}`;
|
|
1716
|
-
}));
|
|
1717
|
-
this.colorClass$
|
|
1718
|
-
.pipe(takeUntil(this.destroyed$))
|
|
1719
|
-
.subscribe((color) => {
|
|
1720
|
-
this.colorClass = color;
|
|
1721
|
-
});
|
|
1722
|
-
this.width$
|
|
1723
|
-
.pipe(takeUntil(this.destroyed$))
|
|
1724
|
-
.subscribe((width) => {
|
|
1725
|
-
this.widthStyle = width;
|
|
1726
|
-
});
|
|
1727
|
-
this.value$
|
|
1728
|
-
.pipe(takeUntil(this.destroyed$))
|
|
1729
|
-
.subscribe((value) => {
|
|
1730
|
-
this.valueNow = value;
|
|
1731
|
-
});
|
|
1732
|
-
this.minimum$
|
|
1733
|
-
.pipe(takeUntil(this.destroyed$))
|
|
1734
|
-
.subscribe((value) => {
|
|
1735
|
-
this.valueMin = value;
|
|
1736
|
-
});
|
|
1737
|
-
this.maximum$
|
|
1738
|
-
.pipe(takeUntil(this.destroyed$))
|
|
1739
|
-
.subscribe((value) => {
|
|
1740
|
-
this.valueMax = value;
|
|
1741
|
-
});
|
|
1742
|
-
}
|
|
1743
|
-
set minimum(value) {
|
|
1744
|
-
this.minimum$.next(value);
|
|
1745
|
-
}
|
|
1746
|
-
set maximum(value) {
|
|
1747
|
-
this.maximum$.next(value);
|
|
1748
|
-
}
|
|
1749
|
-
set value(value) {
|
|
1750
|
-
this.value$.next(value);
|
|
1751
|
-
}
|
|
1752
|
-
set color(value) {
|
|
1753
|
-
this.color$.next(value);
|
|
1754
|
-
}
|
|
1755
|
-
ngOnDestroy() {
|
|
1756
|
-
this.destroyed$.next(true);
|
|
1757
|
-
}
|
|
1758
|
-
}
|
|
1759
|
-
BsProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1760
|
-
BsProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsProgressBarComponent, selector: "bs-progress-bar", inputs: { minimum: "minimum", maximum: "maximum", value: "value", color: "color", striped: "striped", animated: "animated" }, host: { properties: { "class.progress-bar-striped": "this.striped", "class.progress-bar-animated": "this.animated", "class.progress-bar": "this.progressBar", "class": "this.colorClass", "style.width": "this.widthStyle", "attr.role": "this.role", "attr.aria-valuenow": "this.valueNow", "attr.aria-valuemin": "this.valueMin", "attr.aria-valuemax": "this.valueMax" } }, ngImport: i0, template: "", styles: [""] });
|
|
1761
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarComponent, decorators: [{
|
|
1762
|
-
type: Component,
|
|
1763
|
-
args: [{ selector: 'bs-progress-bar', template: "", styles: [""] }]
|
|
1764
|
-
}], ctorParameters: function () { return []; }, propDecorators: { minimum: [{
|
|
1765
|
-
type: Input
|
|
1766
|
-
}], maximum: [{
|
|
1767
|
-
type: Input
|
|
1768
|
-
}], value: [{
|
|
1769
|
-
type: Input
|
|
1770
|
-
}], color: [{
|
|
1771
|
-
type: Input
|
|
1772
|
-
}], striped: [{
|
|
1773
|
-
type: Input
|
|
1774
|
-
}, {
|
|
1775
|
-
type: HostBinding,
|
|
1776
|
-
args: ['class.progress-bar-striped']
|
|
1777
|
-
}], animated: [{
|
|
1778
|
-
type: Input
|
|
1779
|
-
}, {
|
|
1780
|
-
type: HostBinding,
|
|
1781
|
-
args: ['class.progress-bar-animated']
|
|
1782
|
-
}], progressBar: [{
|
|
1783
|
-
type: HostBinding,
|
|
1784
|
-
args: ['class.progress-bar']
|
|
1785
|
-
}], colorClass: [{
|
|
1786
|
-
type: HostBinding,
|
|
1787
|
-
args: ['class']
|
|
1788
|
-
}], widthStyle: [{
|
|
1789
|
-
type: HostBinding,
|
|
1790
|
-
args: ['style.width']
|
|
1791
|
-
}], role: [{
|
|
1792
|
-
type: HostBinding,
|
|
1793
|
-
args: ['attr.role']
|
|
1794
|
-
}], valueNow: [{
|
|
1795
|
-
type: HostBinding,
|
|
1796
|
-
args: ['attr.aria-valuenow']
|
|
1797
|
-
}], valueMin: [{
|
|
1798
|
-
type: HostBinding,
|
|
1799
|
-
args: ['attr.aria-valuemin']
|
|
1800
|
-
}], valueMax: [{
|
|
1801
|
-
type: HostBinding,
|
|
1802
|
-
args: ['attr.aria-valuemax']
|
|
1803
|
-
}] } });
|
|
1804
|
-
|
|
1805
|
-
class BsProgressBarModule {
|
|
1806
|
-
}
|
|
1807
|
-
BsProgressBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1808
|
-
BsProgressBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, declarations: [BsProgressBarComponent,
|
|
1809
|
-
BsProgressComponent], imports: [CommonModule], exports: [BsProgressBarComponent,
|
|
1810
|
-
BsProgressComponent] });
|
|
1811
|
-
BsProgressBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, imports: [[
|
|
1812
|
-
CommonModule
|
|
1813
|
-
]] });
|
|
1814
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, decorators: [{
|
|
1815
|
-
type: NgModule,
|
|
1816
|
-
args: [{
|
|
1817
|
-
declarations: [
|
|
1818
|
-
BsProgressBarComponent,
|
|
1819
|
-
BsProgressComponent
|
|
1820
|
-
],
|
|
1821
|
-
imports: [
|
|
1822
|
-
CommonModule
|
|
1823
|
-
],
|
|
1824
|
-
exports: [
|
|
1825
|
-
BsProgressBarComponent,
|
|
1826
|
-
BsProgressComponent
|
|
1827
|
-
]
|
|
1828
|
-
}]
|
|
1829
|
-
}] });
|
|
1830
|
-
|
|
1831
2120
|
class BsScrollOffsetService {
|
|
1832
2121
|
constructor(routerConfig) {
|
|
1833
2122
|
this.routerConfig = routerConfig;
|
|
@@ -1871,15 +2160,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1871
2160
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
|
1872
2161
|
|
|
1873
2162
|
class BsScrollspyComponent {
|
|
1874
|
-
constructor(scrollOffsetService, document) {
|
|
2163
|
+
constructor(scrollOffsetService, document, zone) {
|
|
1875
2164
|
this.scrollOffsetService = scrollOffsetService;
|
|
2165
|
+
this.zone = zone;
|
|
2166
|
+
this.destroyed$ = new Subject();
|
|
2167
|
+
this.viewInit$ = new BehaviorSubject(false);
|
|
2168
|
+
this.contentInit$ = new BehaviorSubject(false);
|
|
1876
2169
|
this.activeDirective = null;
|
|
1877
2170
|
this.doc = document;
|
|
2171
|
+
combineLatest([this.viewInit$, this.contentInit$])
|
|
2172
|
+
.pipe(filter(([viewInit, contentInit]) => viewInit && contentInit), take(1))
|
|
2173
|
+
.pipe(takeUntil(this.destroyed$))
|
|
2174
|
+
.subscribe(() => {
|
|
2175
|
+
// this.setActiveDirective();
|
|
2176
|
+
this.scrollToCurrentInSpy();
|
|
2177
|
+
});
|
|
1878
2178
|
}
|
|
1879
2179
|
ngAfterViewInit() {
|
|
1880
|
-
this.
|
|
2180
|
+
this.viewInit$.next(true);
|
|
2181
|
+
}
|
|
2182
|
+
ngAfterContentInit() {
|
|
2183
|
+
this.contentInit$.next(true);
|
|
2184
|
+
}
|
|
2185
|
+
ngOnDestroy() {
|
|
2186
|
+
this.destroyed$.next(true);
|
|
1881
2187
|
}
|
|
1882
2188
|
onWindowScroll() {
|
|
2189
|
+
this.setActiveDirective();
|
|
2190
|
+
this.scrollToCurrentInSpy();
|
|
2191
|
+
}
|
|
2192
|
+
setActiveDirective() {
|
|
1883
2193
|
const offsetY = this.scrollOffsetService.getScrollOffset()[1];
|
|
1884
2194
|
const dirs = this.directives.filter((d) => d.element.nativeElement.getBoundingClientRect().y < offsetY);
|
|
1885
2195
|
if (this.directives.length === 0) {
|
|
@@ -1891,6 +2201,8 @@ class BsScrollspyComponent {
|
|
|
1891
2201
|
else {
|
|
1892
2202
|
this.activeDirective = dirs[dirs.length - 1];
|
|
1893
2203
|
}
|
|
2204
|
+
}
|
|
2205
|
+
scrollToCurrentInSpy() {
|
|
1894
2206
|
if (window && (window.innerWidth >= 768)) {
|
|
1895
2207
|
if (this.activeDirective) {
|
|
1896
2208
|
const index = this.directives.toArray().findIndex((v, i) => v === this.activeDirective);
|
|
@@ -1908,7 +2220,7 @@ class BsScrollspyComponent {
|
|
|
1908
2220
|
window.scrollTo({ top: y, behavior: 'smooth' });
|
|
1909
2221
|
}
|
|
1910
2222
|
}
|
|
1911
|
-
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 });
|
|
2223
|
+
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 });
|
|
1912
2224
|
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"] }] });
|
|
1913
2225
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyComponent, decorators: [{
|
|
1914
2226
|
type: Component,
|
|
@@ -1916,7 +2228,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1916
2228
|
}], ctorParameters: function () { return [{ type: BsScrollOffsetService }, { type: undefined, decorators: [{
|
|
1917
2229
|
type: Inject,
|
|
1918
2230
|
args: [DOCUMENT]
|
|
1919
|
-
}] }]; }, propDecorators: { directives: [{
|
|
2231
|
+
}] }, { type: i0.NgZone }]; }, propDecorators: { directives: [{
|
|
1920
2232
|
type: ContentChildren,
|
|
1921
2233
|
args: [BsScrollspyDirective, { descendants: true }]
|
|
1922
2234
|
}], anchors: [{
|
|
@@ -2058,7 +2370,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
2058
2370
|
class BsItemTemplateDirective {
|
|
2059
2371
|
constructor(select2component, templateRef) {
|
|
2060
2372
|
this.select2component = select2component;
|
|
2061
|
-
console.log('template', templateRef);
|
|
2062
2373
|
this.select2component.itemTemplate = templateRef;
|
|
2063
2374
|
}
|
|
2064
2375
|
}
|
|
@@ -2179,7 +2490,6 @@ class BsSnackbarService {
|
|
|
2179
2490
|
width: '100%'
|
|
2180
2491
|
});
|
|
2181
2492
|
const componentInstance = overlayRef.attach(portal);
|
|
2182
|
-
// componentInstance.
|
|
2183
2493
|
componentInstance.instance['instance'] = {
|
|
2184
2494
|
component: componentInstance,
|
|
2185
2495
|
overlay: overlayRef
|
|
@@ -2428,6 +2738,9 @@ class BsTooltipDirective {
|
|
|
2428
2738
|
this.hideTooltip();
|
|
2429
2739
|
};
|
|
2430
2740
|
}
|
|
2741
|
+
onBlur() {
|
|
2742
|
+
this.hideTooltip();
|
|
2743
|
+
}
|
|
2431
2744
|
showTooltip() {
|
|
2432
2745
|
const positions = [];
|
|
2433
2746
|
switch (this.bsTooltip) {
|
|
@@ -2490,7 +2803,7 @@ class BsTooltipDirective {
|
|
|
2490
2803
|
}
|
|
2491
2804
|
}
|
|
2492
2805
|
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 });
|
|
2493
|
-
BsTooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsTooltipDirective, selector: "*[bsTooltip]", inputs: { bsTooltip: "bsTooltip" }, ngImport: i0 });
|
|
2806
|
+
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 });
|
|
2494
2807
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipDirective, decorators: [{
|
|
2495
2808
|
type: Directive,
|
|
2496
2809
|
args: [{
|
|
@@ -2500,7 +2813,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
2500
2813
|
type: Host
|
|
2501
2814
|
}, {
|
|
2502
2815
|
type: SkipSelf
|
|
2503
|
-
}] }]; }, propDecorators: {
|
|
2816
|
+
}] }]; }, propDecorators: { onBlur: [{
|
|
2817
|
+
type: HostListener,
|
|
2818
|
+
args: ['window:blur']
|
|
2819
|
+
}], bsTooltip: [{
|
|
2504
2820
|
type: Input
|
|
2505
2821
|
}] } });
|
|
2506
2822
|
|
|
@@ -2691,5 +3007,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
2691
3007
|
* Generated bundle index. Do not edit.
|
|
2692
3008
|
*/
|
|
2693
3009
|
|
|
2694
|
-
export { BsAccordionComponent, BsAccordionModule, BsAccordionTabComponent, BsAccordionTabHeaderComponent, BsAlertCloseComponent, BsAlertComponent, BsAlertModule, BsCalendarComponent, BsCalendarModule, BsCardComponent, BsCardHeaderComponent, BsCardModule, BsCarouselComponent, BsCarouselImageDirective, BsCarouselModule, BsContextMenuDirective, BsContextMenuModule, BsDatatableColumnDirective, BsDatatableComponent, BsDatatableModule, BsDatepickerComponent, BsDatepickerModule, BsDropdownDirective, BsDropdownMenuDirective, BsDropdownModule, BsDropdownToggleDirective, BsFontColorPipe, BsFontColorPipeModule, BsItemTemplateDirective, BsListGroupComponent, BsListGroupItemComponent, BsListGroupModule, BsMultiselectComponent, BsMultiselectModule, BsNavbarComponent, BsNavbarDropdownComponent, BsNavbarItemComponent, BsNavbarModule, BsNavbarNavComponent, BsPaginationComponent, BsPaginationModule, BsProgressBarComponent, BsProgressBarModule, BsProgressComponent, BsRowTemplateDirective, BsScrollspyComponent, BsScrollspyDirective, BsScrollspyModule, BsSelect2Component, BsSelect2Module, BsSnackbarCloseDirective, BsSnackbarComponent, BsSnackbarModule, BsSnackbarService, BsTabControlComponent, BsTabControlModule, BsTabPageComponent, BsToggleButtonComponent, BsToggleButtonModule, BsTooltipDirective, BsTooltipModule, BsTypeaheadComponent, BsTypeaheadModule, Color, DatatableSettings, DropdownToggleDirective, NavLinkDirective, NavbarContentDirective, Position };
|
|
3010
|
+
export { BsAccordionComponent, BsAccordionModule, BsAccordionTabComponent, BsAccordionTabHeaderComponent, BsAlertCloseComponent, BsAlertComponent, BsAlertModule, BsCalendarComponent, BsCalendarModule, BsCardComponent, BsCardHeaderComponent, BsCardModule, BsCarouselComponent, BsCarouselImageDirective, BsCarouselModule, BsContextMenuDirective, BsContextMenuModule, BsDatatableColumnDirective, BsDatatableComponent, BsDatatableModule, BsDatepickerComponent, BsDatepickerModule, BsDropdownDirective, BsDropdownMenuDirective, BsDropdownModule, BsDropdownToggleDirective, BsFileUploadComponent, BsFileUploadModule, BsFileUploadTemplateDirective, BsFontColorPipe, BsFontColorPipeModule, BsForDirective, BsForModule, BsItemTemplateDirective, BsListGroupComponent, BsListGroupItemComponent, BsListGroupModule, BsMultiselectComponent, BsMultiselectModule, BsNavbarComponent, BsNavbarDropdownComponent, BsNavbarItemComponent, BsNavbarModule, BsNavbarNavComponent, BsPaginationComponent, BsPaginationModule, BsProgressBarComponent, BsProgressBarModule, BsProgressComponent, BsRowTemplateDirective, BsScrollspyComponent, BsScrollspyDirective, BsScrollspyModule, BsSelect2Component, BsSelect2Module, BsSnackbarCloseDirective, BsSnackbarComponent, BsSnackbarModule, BsSnackbarService, BsTabControlComponent, BsTabControlModule, BsTabPageComponent, BsToggleButtonComponent, BsToggleButtonModule, BsTooltipDirective, BsTooltipModule, BsTypeaheadComponent, BsTypeaheadModule, Color, DatatableSettings, DropdownToggleDirective, NavLinkDirective, NavbarContentDirective, Position };
|
|
2695
3011
|
//# sourceMappingURL=mintplayer-ng-bootstrap.mjs.map
|