@mintplayer/ng-bootstrap 13.1.11 → 13.1.13

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.
Files changed (33) hide show
  1. package/esm2020/lib/components/context-menu/context-menu.directive.mjs +23 -9
  2. package/esm2020/lib/components/dropdown/dropdown-menu/dropdown-menu.directive.mjs +3 -1
  3. package/esm2020/lib/components/file-upload/component/file-upload.component.mjs +85 -0
  4. package/esm2020/lib/components/file-upload/directive/file-upload-template.directive.mjs +18 -0
  5. package/esm2020/lib/components/file-upload/file-upload.mjs +2 -0
  6. package/esm2020/lib/components/file-upload/file-upload.module.mjs +43 -0
  7. package/esm2020/lib/components/file-upload/index.mjs +5 -0
  8. package/esm2020/lib/components/for/for.directive.mjs +32 -0
  9. package/esm2020/lib/components/for/for.module.mjs +26 -0
  10. package/esm2020/lib/components/for/index.mjs +3 -0
  11. package/esm2020/lib/components/index.mjs +3 -1
  12. package/esm2020/lib/pipes/format-bytes/format-bytes.module.mjs +26 -0
  13. package/esm2020/lib/pipes/format-bytes/format-bytes.pipe.mjs +23 -0
  14. package/esm2020/lib/pipes/index.mjs +1 -1
  15. package/fesm2015/mintplayer-ng-bootstrap.mjs +414 -176
  16. package/fesm2015/mintplayer-ng-bootstrap.mjs.map +1 -1
  17. package/fesm2020/mintplayer-ng-bootstrap.mjs +414 -176
  18. package/fesm2020/mintplayer-ng-bootstrap.mjs.map +1 -1
  19. package/lib/components/context-menu/context-menu.directive.d.ts +1 -0
  20. package/lib/components/file-upload/component/file-upload.component.d.ts +19 -0
  21. package/lib/components/file-upload/directive/file-upload-template.directive.d.ts +8 -0
  22. package/lib/components/file-upload/file-upload.d.ts +4 -0
  23. package/lib/components/file-upload/file-upload.module.d.ts +12 -0
  24. package/lib/components/file-upload/index.d.ts +4 -0
  25. package/lib/components/for/for.directive.d.ts +7 -0
  26. package/lib/components/for/for.module.d.ts +8 -0
  27. package/lib/components/for/index.d.ts +2 -0
  28. package/lib/components/index.d.ts +2 -0
  29. package/lib/pipes/format-bytes/format-bytes.module.d.ts +8 -0
  30. package/lib/pipes/format-bytes/format-bytes.pipe.d.ts +7 -0
  31. package/package.json +1 -1
  32. package/src/assets/ic-upload-file.svg +7 -0
  33. package/src/styles/utilities/cursor.scss +14 -0
@@ -693,21 +693,35 @@ 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
- scrollStrategy: this.overlay.scrollStrategies.noop(),
698
+ hasBackdrop: false,
699
+ scrollStrategy: this.overlay.scrollStrategies.reposition(),
698
700
  positionStrategy: this.overlay.position()
699
- .global()
700
- .left(ev.x + 'px')
701
- .bottom((window.innerHeight - ev.y) + 'px')
702
- .top(ev.y + 'px')
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
  }
722
+ onBlur() {
723
+ this.close();
724
+ }
711
725
  close() {
712
726
  if (this.overlayRef) {
713
727
  this.overlayRef.detach();
@@ -722,7 +736,7 @@ class BsContextMenuDirective {
722
736
  }
723
737
  }
724
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 });
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 });
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 });
726
740
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsContextMenuDirective, decorators: [{
727
741
  type: Directive,
728
742
  args: [{
@@ -735,7 +749,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
735
749
  }] }]; }, propDecorators: { clickAnywhere: [{
736
750
  type: HostListener,
737
751
  args: ['document:click', ['$event']]
738
- }], close: [{
752
+ }], onBlur: [{
739
753
  type: HostListener,
740
754
  args: ['window:blur']
741
755
  }] } });
@@ -1096,7 +1110,9 @@ class BsDropdownMenuDirective extends ClickOutsideDirective {
1096
1110
  positionStrategy: this.overlay.position()
1097
1111
  .flexibleConnectedTo(!this.dropdown.toggle ? dropdown.elementRef : this.dropdown.toggle.toggleButton)
1098
1112
  .withPositions([
1113
+ // element: BottomLeft - dropdown: TopLeft
1099
1114
  { originX: "start", originY: "bottom", overlayX: "start", overlayY: "top", offsetY: 0 },
1115
+ // element: TopLeft - dropdown: BottomLeft
1100
1116
  { originX: "start", originY: "top", overlayX: "start", overlayY: "bottom", offsetY: 0 },
1101
1117
  ]),
1102
1118
  });
@@ -1308,6 +1324,395 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
1308
1324
  }]
1309
1325
  }] });
1310
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
+
1311
1716
  class BsListGroupItemComponent {
1312
1717
  constructor() {
1313
1718
  }
@@ -1712,173 +2117,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
1712
2117
  }]
1713
2118
  }] });
1714
2119
 
1715
- class BsProgressComponent {
1716
- constructor() {
1717
- this.progressClass = true;
1718
- this.height = null;
1719
- this.isIndeterminate = false;
1720
- }
1721
- }
1722
- BsProgressComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1723
- 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"] }] });
1724
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressComponent, decorators: [{
1725
- type: Component,
1726
- 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"] }]
1727
- }], propDecorators: { progressClass: [{
1728
- type: HostBinding,
1729
- args: ['class.progress']
1730
- }], height: [{
1731
- type: Input
1732
- }, {
1733
- type: HostBinding,
1734
- args: ['style.height.px']
1735
- }], isIndeterminate: [{
1736
- type: Input
1737
- }] } });
1738
-
1739
- class BsProgressBarComponent {
1740
- constructor() {
1741
- this.destroyed$ = new Subject();
1742
- this.minimum$ = new BehaviorSubject(0);
1743
- this.maximum$ = new BehaviorSubject(100);
1744
- this.value$ = new BehaviorSubject(50);
1745
- this.color$ = new BehaviorSubject(Color.primary);
1746
- this.striped = false;
1747
- this.animated = false;
1748
- this.progressBar = true;
1749
- this.colorClass = 'bg-primary';
1750
- this.widthStyle = '0';
1751
- this.role = 'progressbar';
1752
- this.valueNow = 50;
1753
- this.valueMin = 0;
1754
- this.valueMax = 100;
1755
- this.percentage$ = combineLatest([this.minimum$, this.maximum$, this.value$])
1756
- .pipe(map(([minimum, maximum, value]) => {
1757
- return (value - minimum) / (maximum - minimum) * 100;
1758
- }));
1759
- this.width$ = this.percentage$
1760
- .pipe(map((width) => {
1761
- return String(width) + '%';
1762
- }));
1763
- this.colorClass$ = this.color$
1764
- .pipe(map((color) => {
1765
- const name = Color[color];
1766
- return `bg-${name}`;
1767
- }));
1768
- this.colorClass$
1769
- .pipe(takeUntil(this.destroyed$))
1770
- .subscribe((color) => {
1771
- this.colorClass = color;
1772
- });
1773
- this.width$
1774
- .pipe(takeUntil(this.destroyed$))
1775
- .subscribe((width) => {
1776
- this.widthStyle = width;
1777
- });
1778
- this.value$
1779
- .pipe(takeUntil(this.destroyed$))
1780
- .subscribe((value) => {
1781
- this.valueNow = value;
1782
- });
1783
- this.minimum$
1784
- .pipe(takeUntil(this.destroyed$))
1785
- .subscribe((value) => {
1786
- this.valueMin = value;
1787
- });
1788
- this.maximum$
1789
- .pipe(takeUntil(this.destroyed$))
1790
- .subscribe((value) => {
1791
- this.valueMax = value;
1792
- });
1793
- }
1794
- set minimum(value) {
1795
- this.minimum$.next(value);
1796
- }
1797
- set maximum(value) {
1798
- this.maximum$.next(value);
1799
- }
1800
- set value(value) {
1801
- this.value$.next(value);
1802
- }
1803
- set color(value) {
1804
- this.color$.next(value);
1805
- }
1806
- ngOnDestroy() {
1807
- this.destroyed$.next(true);
1808
- }
1809
- }
1810
- BsProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1811
- 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: [""] });
1812
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarComponent, decorators: [{
1813
- type: Component,
1814
- args: [{ selector: 'bs-progress-bar', template: "", styles: [""] }]
1815
- }], ctorParameters: function () { return []; }, propDecorators: { minimum: [{
1816
- type: Input
1817
- }], maximum: [{
1818
- type: Input
1819
- }], value: [{
1820
- type: Input
1821
- }], color: [{
1822
- type: Input
1823
- }], striped: [{
1824
- type: Input
1825
- }, {
1826
- type: HostBinding,
1827
- args: ['class.progress-bar-striped']
1828
- }], animated: [{
1829
- type: Input
1830
- }, {
1831
- type: HostBinding,
1832
- args: ['class.progress-bar-animated']
1833
- }], progressBar: [{
1834
- type: HostBinding,
1835
- args: ['class.progress-bar']
1836
- }], colorClass: [{
1837
- type: HostBinding,
1838
- args: ['class']
1839
- }], widthStyle: [{
1840
- type: HostBinding,
1841
- args: ['style.width']
1842
- }], role: [{
1843
- type: HostBinding,
1844
- args: ['attr.role']
1845
- }], valueNow: [{
1846
- type: HostBinding,
1847
- args: ['attr.aria-valuenow']
1848
- }], valueMin: [{
1849
- type: HostBinding,
1850
- args: ['attr.aria-valuemin']
1851
- }], valueMax: [{
1852
- type: HostBinding,
1853
- args: ['attr.aria-valuemax']
1854
- }] } });
1855
-
1856
- class BsProgressBarModule {
1857
- }
1858
- BsProgressBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1859
- BsProgressBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, declarations: [BsProgressBarComponent,
1860
- BsProgressComponent], imports: [CommonModule], exports: [BsProgressBarComponent,
1861
- BsProgressComponent] });
1862
- BsProgressBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, imports: [[
1863
- CommonModule
1864
- ]] });
1865
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, decorators: [{
1866
- type: NgModule,
1867
- args: [{
1868
- declarations: [
1869
- BsProgressBarComponent,
1870
- BsProgressComponent
1871
- ],
1872
- imports: [
1873
- CommonModule
1874
- ],
1875
- exports: [
1876
- BsProgressBarComponent,
1877
- BsProgressComponent
1878
- ]
1879
- }]
1880
- }] });
1881
-
1882
2120
  class BsScrollOffsetService {
1883
2121
  constructor(routerConfig) {
1884
2122
  this.routerConfig = routerConfig;
@@ -2769,5 +3007,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
2769
3007
  * Generated bundle index. Do not edit.
2770
3008
  */
2771
3009
 
2772
- 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 };
2773
3011
  //# sourceMappingURL=mintplayer-ng-bootstrap.mjs.map