@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: [{
@@ -737,7 +751,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
737
751
  }, propDecorators: { clickAnywhere: [{
738
752
  type: HostListener,
739
753
  args: ['document:click', ['$event']]
740
- }], close: [{
754
+ }], onBlur: [{
741
755
  type: HostListener,
742
756
  args: ['window:blur']
743
757
  }] } });
@@ -1098,7 +1112,9 @@ class BsDropdownMenuDirective extends ClickOutsideDirective {
1098
1112
  positionStrategy: this.overlay.position()
1099
1113
  .flexibleConnectedTo(!this.dropdown.toggle ? dropdown.elementRef : this.dropdown.toggle.toggleButton)
1100
1114
  .withPositions([
1115
+ // element: BottomLeft - dropdown: TopLeft
1101
1116
  { originX: "start", originY: "bottom", overlayX: "start", overlayY: "top", offsetY: 0 },
1117
+ // element: TopLeft - dropdown: BottomLeft
1102
1118
  { originX: "start", originY: "top", overlayX: "start", overlayY: "bottom", offsetY: 0 },
1103
1119
  ]),
1104
1120
  });
@@ -1313,6 +1329,395 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
1313
1329
  }]
1314
1330
  }] });
1315
1331
 
1332
+ class BsProgressComponent {
1333
+ constructor() {
1334
+ this.progressClass = true;
1335
+ this.height = null;
1336
+ this.isIndeterminate = false;
1337
+ }
1338
+ }
1339
+ BsProgressComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1340
+ 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"] }] });
1341
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressComponent, decorators: [{
1342
+ type: Component,
1343
+ 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"] }]
1344
+ }], propDecorators: { progressClass: [{
1345
+ type: HostBinding,
1346
+ args: ['class.progress']
1347
+ }], height: [{
1348
+ type: Input
1349
+ }, {
1350
+ type: HostBinding,
1351
+ args: ['style.height.px']
1352
+ }], isIndeterminate: [{
1353
+ type: Input
1354
+ }] } });
1355
+
1356
+ class BsProgressBarComponent {
1357
+ constructor() {
1358
+ this.destroyed$ = new Subject();
1359
+ this.minimum$ = new BehaviorSubject(0);
1360
+ this.maximum$ = new BehaviorSubject(100);
1361
+ this.value$ = new BehaviorSubject(50);
1362
+ this.color$ = new BehaviorSubject(Color.primary);
1363
+ this.striped = false;
1364
+ this.animated = false;
1365
+ this.progressBar = true;
1366
+ this.colorClass = 'bg-primary';
1367
+ this.widthStyle = '0';
1368
+ this.role = 'progressbar';
1369
+ this.valueNow = 50;
1370
+ this.valueMin = 0;
1371
+ this.valueMax = 100;
1372
+ this.percentage$ = combineLatest([this.minimum$, this.maximum$, this.value$])
1373
+ .pipe(map(([minimum, maximum, value]) => {
1374
+ return (value - minimum) / (maximum - minimum) * 100;
1375
+ }));
1376
+ this.width$ = this.percentage$
1377
+ .pipe(map((width) => {
1378
+ return String(width) + '%';
1379
+ }));
1380
+ this.colorClass$ = this.color$
1381
+ .pipe(map((color) => {
1382
+ const name = Color[color];
1383
+ return `bg-${name}`;
1384
+ }));
1385
+ this.colorClass$
1386
+ .pipe(takeUntil(this.destroyed$))
1387
+ .subscribe((color) => {
1388
+ this.colorClass = color;
1389
+ });
1390
+ this.width$
1391
+ .pipe(takeUntil(this.destroyed$))
1392
+ .subscribe((width) => {
1393
+ this.widthStyle = width;
1394
+ });
1395
+ this.value$
1396
+ .pipe(takeUntil(this.destroyed$))
1397
+ .subscribe((value) => {
1398
+ this.valueNow = value;
1399
+ });
1400
+ this.minimum$
1401
+ .pipe(takeUntil(this.destroyed$))
1402
+ .subscribe((value) => {
1403
+ this.valueMin = value;
1404
+ });
1405
+ this.maximum$
1406
+ .pipe(takeUntil(this.destroyed$))
1407
+ .subscribe((value) => {
1408
+ this.valueMax = value;
1409
+ });
1410
+ }
1411
+ set minimum(value) {
1412
+ this.minimum$.next(value);
1413
+ }
1414
+ set maximum(value) {
1415
+ this.maximum$.next(value);
1416
+ }
1417
+ set value(value) {
1418
+ this.value$.next(value);
1419
+ }
1420
+ set color(value) {
1421
+ this.color$.next(value);
1422
+ }
1423
+ ngOnDestroy() {
1424
+ this.destroyed$.next(true);
1425
+ }
1426
+ }
1427
+ BsProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1428
+ 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: [""] });
1429
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarComponent, decorators: [{
1430
+ type: Component,
1431
+ args: [{ selector: 'bs-progress-bar', template: "", styles: [""] }]
1432
+ }], ctorParameters: function () { return []; }, propDecorators: { minimum: [{
1433
+ type: Input
1434
+ }], maximum: [{
1435
+ type: Input
1436
+ }], value: [{
1437
+ type: Input
1438
+ }], color: [{
1439
+ type: Input
1440
+ }], striped: [{
1441
+ type: Input
1442
+ }, {
1443
+ type: HostBinding,
1444
+ args: ['class.progress-bar-striped']
1445
+ }], animated: [{
1446
+ type: Input
1447
+ }, {
1448
+ type: HostBinding,
1449
+ args: ['class.progress-bar-animated']
1450
+ }], progressBar: [{
1451
+ type: HostBinding,
1452
+ args: ['class.progress-bar']
1453
+ }], colorClass: [{
1454
+ type: HostBinding,
1455
+ args: ['class']
1456
+ }], widthStyle: [{
1457
+ type: HostBinding,
1458
+ args: ['style.width']
1459
+ }], role: [{
1460
+ type: HostBinding,
1461
+ args: ['attr.role']
1462
+ }], valueNow: [{
1463
+ type: HostBinding,
1464
+ args: ['attr.aria-valuenow']
1465
+ }], valueMin: [{
1466
+ type: HostBinding,
1467
+ args: ['attr.aria-valuemin']
1468
+ }], valueMax: [{
1469
+ type: HostBinding,
1470
+ args: ['attr.aria-valuemax']
1471
+ }] } });
1472
+
1473
+ class BsForDirective {
1474
+ onMouseClick() {
1475
+ if (!('tagName' in this.bsFor)) {
1476
+ this.bsFor.focus();
1477
+ }
1478
+ else if (this.bsFor.tagName.toLowerCase() !== 'input') {
1479
+ this.bsFor.focus();
1480
+ }
1481
+ else if (this.bsFor.type.toLowerCase() === 'file') {
1482
+ this.bsFor.click();
1483
+ }
1484
+ else {
1485
+ this.bsFor.focus();
1486
+ }
1487
+ }
1488
+ }
1489
+ BsForDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsForDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1490
+ 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 });
1491
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsForDirective, decorators: [{
1492
+ type: Directive,
1493
+ args: [{
1494
+ selector: '[bsFor]'
1495
+ }]
1496
+ }], propDecorators: { bsFor: [{
1497
+ type: Input
1498
+ }], onMouseClick: [{
1499
+ type: HostListener,
1500
+ args: ['click']
1501
+ }] } });
1502
+
1503
+ class BsFormatBytesPipe {
1504
+ transform(value, decimals = 2) {
1505
+ if (value === 0) {
1506
+ return "0 Bytes";
1507
+ }
1508
+ const k = 1024;
1509
+ const dm = decimals <= 0 ? 0 : decimals;
1510
+ const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
1511
+ const i = Math.floor(Math.log(value) / Math.log(k));
1512
+ return parseFloat((value / Math.pow(k, i)).toFixed(dm)) + " " + sizes[i];
1513
+ }
1514
+ }
1515
+ BsFormatBytesPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1516
+ BsFormatBytesPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesPipe, name: "bsFormatBytes" });
1517
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesPipe, decorators: [{
1518
+ type: Pipe,
1519
+ args: [{
1520
+ name: 'bsFormatBytes'
1521
+ }]
1522
+ }] });
1523
+
1524
+ class BsFileUploadComponent {
1525
+ constructor() {
1526
+ this.dropFilesCaption = 'Drop your files here';
1527
+ this.browseFilesCaption = 'Browse for files';
1528
+ this.placeholder = 'Drop files to upload';
1529
+ this.isDraggingFile = false;
1530
+ this.files = [];
1531
+ this.filesDropped = new EventEmitter();
1532
+ }
1533
+ onChange(event) {
1534
+ console.log('event', event);
1535
+ if (!event.target)
1536
+ return;
1537
+ if (!('files' in event.target))
1538
+ return;
1539
+ if (!event.target['files'])
1540
+ return;
1541
+ const files = event.target.files;
1542
+ if (!files)
1543
+ return;
1544
+ this.processDroppedFiles(files);
1545
+ }
1546
+ onDragOver(event) {
1547
+ event.preventDefault();
1548
+ event.stopPropagation();
1549
+ if (event.dataTransfer) {
1550
+ this.isDraggingFile = true;
1551
+ event.dataTransfer.effectAllowed = "copy";
1552
+ }
1553
+ }
1554
+ onDragLeave(event) {
1555
+ event.preventDefault();
1556
+ event.stopPropagation();
1557
+ this.isDraggingFile = false;
1558
+ }
1559
+ onDrop(event) {
1560
+ event.preventDefault();
1561
+ event.stopPropagation();
1562
+ this.isDraggingFile = false;
1563
+ if (event.dataTransfer && event.dataTransfer.files) {
1564
+ this.processDroppedFiles(event.dataTransfer.files);
1565
+ }
1566
+ }
1567
+ processDroppedFiles(fileList) {
1568
+ const newFiles = [...Array(fileList.length).keys()]
1569
+ .map(i => fileList.item(i))
1570
+ .filter(f => !!f)
1571
+ .map(f => ({ file: f, progress: 0 }));
1572
+ this.files.push(...newFiles);
1573
+ this.filesDropped.emit(newFiles);
1574
+ }
1575
+ }
1576
+ BsFileUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1577
+ 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 } });
1578
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadComponent, decorators: [{
1579
+ type: Component,
1580
+ 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"] }]
1581
+ }], propDecorators: { dropFilesCaption: [{
1582
+ type: Input
1583
+ }], browseFilesCaption: [{
1584
+ type: Input
1585
+ }], placeholder: [{
1586
+ type: Input
1587
+ }], files: [{
1588
+ type: Input
1589
+ }], filesDropped: [{
1590
+ type: Output
1591
+ }], onDragOver: [{
1592
+ type: HostListener,
1593
+ args: ['dragover', ['$event']]
1594
+ }], onDragLeave: [{
1595
+ type: HostListener,
1596
+ args: ['dragleave', ['$event']]
1597
+ }], onDrop: [{
1598
+ type: HostListener,
1599
+ args: ['drop', ['$event']]
1600
+ }] } });
1601
+
1602
+ class BsFileUploadTemplateDirective {
1603
+ constructor(fileUploadComponent, templateRef) {
1604
+ fileUploadComponent.fileTemplate = templateRef;
1605
+ }
1606
+ }
1607
+ 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 });
1608
+ BsFileUploadTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsFileUploadTemplateDirective, selector: "[bsFileUploadTemplate]", ngImport: i0 });
1609
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadTemplateDirective, decorators: [{
1610
+ type: Directive,
1611
+ args: [{
1612
+ selector: '[bsFileUploadTemplate]'
1613
+ }]
1614
+ }], ctorParameters: function () { return [{ type: BsFileUploadComponent }, { type: i0.TemplateRef }]; } });
1615
+
1616
+ class BsForModule {
1617
+ }
1618
+ BsForModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsForModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1619
+ BsForModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsForModule, declarations: [BsForDirective], imports: [CommonModule], exports: [BsForDirective] });
1620
+ BsForModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsForModule, imports: [[
1621
+ CommonModule
1622
+ ]] });
1623
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsForModule, decorators: [{
1624
+ type: NgModule,
1625
+ args: [{
1626
+ declarations: [
1627
+ BsForDirective
1628
+ ],
1629
+ imports: [
1630
+ CommonModule
1631
+ ],
1632
+ exports: [
1633
+ BsForDirective
1634
+ ]
1635
+ }]
1636
+ }] });
1637
+
1638
+ class BsProgressBarModule {
1639
+ }
1640
+ BsProgressBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1641
+ BsProgressBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, declarations: [BsProgressBarComponent,
1642
+ BsProgressComponent], imports: [CommonModule], exports: [BsProgressBarComponent,
1643
+ BsProgressComponent] });
1644
+ BsProgressBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, imports: [[
1645
+ CommonModule
1646
+ ]] });
1647
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, decorators: [{
1648
+ type: NgModule,
1649
+ args: [{
1650
+ declarations: [
1651
+ BsProgressBarComponent,
1652
+ BsProgressComponent
1653
+ ],
1654
+ imports: [
1655
+ CommonModule
1656
+ ],
1657
+ exports: [
1658
+ BsProgressBarComponent,
1659
+ BsProgressComponent
1660
+ ]
1661
+ }]
1662
+ }] });
1663
+
1664
+ class BsFormatBytesModule {
1665
+ }
1666
+ BsFormatBytesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1667
+ BsFormatBytesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesModule, declarations: [BsFormatBytesPipe], imports: [CommonModule], exports: [BsFormatBytesPipe] });
1668
+ BsFormatBytesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesModule, imports: [[
1669
+ CommonModule
1670
+ ]] });
1671
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesModule, decorators: [{
1672
+ type: NgModule,
1673
+ args: [{
1674
+ declarations: [
1675
+ BsFormatBytesPipe
1676
+ ],
1677
+ imports: [
1678
+ CommonModule
1679
+ ],
1680
+ exports: [
1681
+ BsFormatBytesPipe
1682
+ ]
1683
+ }]
1684
+ }] });
1685
+
1686
+ class BsFileUploadModule {
1687
+ }
1688
+ BsFileUploadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1689
+ BsFileUploadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadModule, declarations: [BsFileUploadComponent,
1690
+ BsFileUploadTemplateDirective], imports: [CommonModule,
1691
+ BsForModule,
1692
+ BsFormatBytesModule,
1693
+ BsProgressBarModule], exports: [BsFileUploadComponent,
1694
+ BsFileUploadTemplateDirective] });
1695
+ BsFileUploadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadModule, imports: [[
1696
+ CommonModule,
1697
+ BsForModule,
1698
+ BsFormatBytesModule,
1699
+ BsProgressBarModule
1700
+ ]] });
1701
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadModule, decorators: [{
1702
+ type: NgModule,
1703
+ args: [{
1704
+ declarations: [
1705
+ BsFileUploadComponent,
1706
+ BsFileUploadTemplateDirective
1707
+ ],
1708
+ imports: [
1709
+ CommonModule,
1710
+ BsForModule,
1711
+ BsFormatBytesModule,
1712
+ BsProgressBarModule
1713
+ ],
1714
+ exports: [
1715
+ BsFileUploadComponent,
1716
+ BsFileUploadTemplateDirective
1717
+ ]
1718
+ }]
1719
+ }] });
1720
+
1316
1721
  class BsListGroupItemComponent {
1317
1722
  constructor() {
1318
1723
  }
@@ -1725,173 +2130,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
1725
2130
  }]
1726
2131
  }] });
1727
2132
 
1728
- class BsProgressComponent {
1729
- constructor() {
1730
- this.progressClass = true;
1731
- this.height = null;
1732
- this.isIndeterminate = false;
1733
- }
1734
- }
1735
- BsProgressComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1736
- 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"] }] });
1737
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressComponent, decorators: [{
1738
- type: Component,
1739
- 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"] }]
1740
- }], propDecorators: { progressClass: [{
1741
- type: HostBinding,
1742
- args: ['class.progress']
1743
- }], height: [{
1744
- type: Input
1745
- }, {
1746
- type: HostBinding,
1747
- args: ['style.height.px']
1748
- }], isIndeterminate: [{
1749
- type: Input
1750
- }] } });
1751
-
1752
- class BsProgressBarComponent {
1753
- constructor() {
1754
- this.destroyed$ = new Subject();
1755
- this.minimum$ = new BehaviorSubject(0);
1756
- this.maximum$ = new BehaviorSubject(100);
1757
- this.value$ = new BehaviorSubject(50);
1758
- this.color$ = new BehaviorSubject(Color.primary);
1759
- this.striped = false;
1760
- this.animated = false;
1761
- this.progressBar = true;
1762
- this.colorClass = 'bg-primary';
1763
- this.widthStyle = '0';
1764
- this.role = 'progressbar';
1765
- this.valueNow = 50;
1766
- this.valueMin = 0;
1767
- this.valueMax = 100;
1768
- this.percentage$ = combineLatest([this.minimum$, this.maximum$, this.value$])
1769
- .pipe(map(([minimum, maximum, value]) => {
1770
- return (value - minimum) / (maximum - minimum) * 100;
1771
- }));
1772
- this.width$ = this.percentage$
1773
- .pipe(map((width) => {
1774
- return String(width) + '%';
1775
- }));
1776
- this.colorClass$ = this.color$
1777
- .pipe(map((color) => {
1778
- const name = Color[color];
1779
- return `bg-${name}`;
1780
- }));
1781
- this.colorClass$
1782
- .pipe(takeUntil(this.destroyed$))
1783
- .subscribe((color) => {
1784
- this.colorClass = color;
1785
- });
1786
- this.width$
1787
- .pipe(takeUntil(this.destroyed$))
1788
- .subscribe((width) => {
1789
- this.widthStyle = width;
1790
- });
1791
- this.value$
1792
- .pipe(takeUntil(this.destroyed$))
1793
- .subscribe((value) => {
1794
- this.valueNow = value;
1795
- });
1796
- this.minimum$
1797
- .pipe(takeUntil(this.destroyed$))
1798
- .subscribe((value) => {
1799
- this.valueMin = value;
1800
- });
1801
- this.maximum$
1802
- .pipe(takeUntil(this.destroyed$))
1803
- .subscribe((value) => {
1804
- this.valueMax = value;
1805
- });
1806
- }
1807
- set minimum(value) {
1808
- this.minimum$.next(value);
1809
- }
1810
- set maximum(value) {
1811
- this.maximum$.next(value);
1812
- }
1813
- set value(value) {
1814
- this.value$.next(value);
1815
- }
1816
- set color(value) {
1817
- this.color$.next(value);
1818
- }
1819
- ngOnDestroy() {
1820
- this.destroyed$.next(true);
1821
- }
1822
- }
1823
- BsProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1824
- 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: [""] });
1825
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarComponent, decorators: [{
1826
- type: Component,
1827
- args: [{ selector: 'bs-progress-bar', template: "", styles: [""] }]
1828
- }], ctorParameters: function () { return []; }, propDecorators: { minimum: [{
1829
- type: Input
1830
- }], maximum: [{
1831
- type: Input
1832
- }], value: [{
1833
- type: Input
1834
- }], color: [{
1835
- type: Input
1836
- }], striped: [{
1837
- type: Input
1838
- }, {
1839
- type: HostBinding,
1840
- args: ['class.progress-bar-striped']
1841
- }], animated: [{
1842
- type: Input
1843
- }, {
1844
- type: HostBinding,
1845
- args: ['class.progress-bar-animated']
1846
- }], progressBar: [{
1847
- type: HostBinding,
1848
- args: ['class.progress-bar']
1849
- }], colorClass: [{
1850
- type: HostBinding,
1851
- args: ['class']
1852
- }], widthStyle: [{
1853
- type: HostBinding,
1854
- args: ['style.width']
1855
- }], role: [{
1856
- type: HostBinding,
1857
- args: ['attr.role']
1858
- }], valueNow: [{
1859
- type: HostBinding,
1860
- args: ['attr.aria-valuenow']
1861
- }], valueMin: [{
1862
- type: HostBinding,
1863
- args: ['attr.aria-valuemin']
1864
- }], valueMax: [{
1865
- type: HostBinding,
1866
- args: ['attr.aria-valuemax']
1867
- }] } });
1868
-
1869
- class BsProgressBarModule {
1870
- }
1871
- BsProgressBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1872
- BsProgressBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, declarations: [BsProgressBarComponent,
1873
- BsProgressComponent], imports: [CommonModule], exports: [BsProgressBarComponent,
1874
- BsProgressComponent] });
1875
- BsProgressBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, imports: [[
1876
- CommonModule
1877
- ]] });
1878
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, decorators: [{
1879
- type: NgModule,
1880
- args: [{
1881
- declarations: [
1882
- BsProgressBarComponent,
1883
- BsProgressComponent
1884
- ],
1885
- imports: [
1886
- CommonModule
1887
- ],
1888
- exports: [
1889
- BsProgressBarComponent,
1890
- BsProgressComponent
1891
- ]
1892
- }]
1893
- }] });
1894
-
1895
2133
  class BsScrollspyDirective {
1896
2134
  constructor(element) {
1897
2135
  this.element = element;
@@ -2794,5 +3032,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
2794
3032
  * Generated bundle index. Do not edit.
2795
3033
  */
2796
3034
 
2797
- 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 };
3035
+ 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 };
2798
3036
  //# sourceMappingURL=mintplayer-ng-bootstrap.mjs.map