@bravobit/bb-foundation 0.15.0 → 0.15.1

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 (23) hide show
  1. package/bundles/bravobit-bb-foundation-collections.umd.js +100 -100
  2. package/bundles/bravobit-bb-foundation-collections.umd.js.map +1 -1
  3. package/collections/lib/collections.module.d.ts +10 -0
  4. package/collections/lib/components/{collection-pager/collection-pager.component.d.ts → collections-pager/collections-pager.component.d.ts} +3 -3
  5. package/collections/lib/components/collections-viewer/collections-viewer.component.d.ts +12 -0
  6. package/collections/lib/components/collections.directive.d.ts +17 -0
  7. package/collections/public_api.d.ts +4 -4
  8. package/esm2015/collections/lib/collections.module.js +54 -0
  9. package/esm2015/collections/lib/components/collections-pager/collections-pager.component.js +136 -0
  10. package/esm2015/collections/lib/components/collections-viewer/collections-viewer.component.js +39 -0
  11. package/esm2015/collections/lib/components/collections.directive.js +43 -0
  12. package/esm2015/collections/lib/providers/api-collection.provider.js +2 -2
  13. package/esm2015/collections/public_api.js +5 -5
  14. package/fesm2015/bravobit-bb-foundation-collections.js +71 -71
  15. package/fesm2015/bravobit-bb-foundation-collections.js.map +1 -1
  16. package/package.json +1 -1
  17. package/collections/lib/collection.module.d.ts +0 -10
  18. package/collections/lib/components/collection-viewer/collection-viewer.component.d.ts +0 -12
  19. package/collections/lib/components/collection.directive.d.ts +0 -17
  20. package/esm2015/collections/lib/collection.module.js +0 -54
  21. package/esm2015/collections/lib/components/collection-pager/collection-pager.component.js +0 -136
  22. package/esm2015/collections/lib/components/collection-viewer/collection-viewer.component.js +0 -39
  23. package/esm2015/collections/lib/components/collection.directive.js +0 -43
@@ -395,7 +395,7 @@
395
395
  var _this = this;
396
396
  var endpoint$ = rxjs.isObservable(this._endpoint) ? this._endpoint : rxjs.of(this._endpoint);
397
397
  var params = this.getBackendFormat(request);
398
- var extraParams$ = this.getExtraParams(params);
398
+ var extraParams$ = this.getExtraParams(this._extraParams);
399
399
  return rxjs.combineLatest([endpoint$, extraParams$]).pipe(operators.switchMap(function (_h) {
400
400
  var _j = __read(_h, 2), endpoint = _j[0], extraParams = _j[1];
401
401
  return _this._httpClient.get(endpoint, {
@@ -449,97 +449,97 @@
449
449
  return LocalCollectionProvider;
450
450
  }(CollectionProvider));
451
451
 
452
- var BbCollectionData = /** @class */ (function () {
453
- function BbCollectionData() {
452
+ var BbCollectionsData = /** @class */ (function () {
453
+ function BbCollectionsData() {
454
454
  }
455
- return BbCollectionData;
455
+ return BbCollectionsData;
456
456
  }());
457
- BbCollectionData.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbCollectionData, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
458
- BbCollectionData.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.10", type: BbCollectionData, selector: "[bbCollectionData]", ngImport: i0__namespace });
459
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbCollectionData, decorators: [{
457
+ BbCollectionsData.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbCollectionsData, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
458
+ BbCollectionsData.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.10", type: BbCollectionsData, selector: "[bbCollectionsData]", ngImport: i0__namespace });
459
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbCollectionsData, decorators: [{
460
460
  type: i0.Directive,
461
461
  args: [{
462
- selector: '[bbCollectionData]'
462
+ selector: '[bbCollectionsData]'
463
463
  }]
464
464
  }] });
465
- var BbCollectionEmpty = /** @class */ (function () {
466
- function BbCollectionEmpty() {
465
+ var BbCollectionsEmpty = /** @class */ (function () {
466
+ function BbCollectionsEmpty() {
467
467
  }
468
- return BbCollectionEmpty;
468
+ return BbCollectionsEmpty;
469
469
  }());
470
- BbCollectionEmpty.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbCollectionEmpty, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
471
- BbCollectionEmpty.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.10", type: BbCollectionEmpty, selector: "[bbCollectionEmpty]", ngImport: i0__namespace });
472
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbCollectionEmpty, decorators: [{
470
+ BbCollectionsEmpty.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbCollectionsEmpty, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
471
+ BbCollectionsEmpty.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.10", type: BbCollectionsEmpty, selector: "[bbCollectionsEmpty]", ngImport: i0__namespace });
472
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbCollectionsEmpty, decorators: [{
473
473
  type: i0.Directive,
474
474
  args: [{
475
- selector: '[bbCollectionEmpty]'
475
+ selector: '[bbCollectionsEmpty]'
476
476
  }]
477
477
  }] });
478
- var BbCollectionError = /** @class */ (function () {
479
- function BbCollectionError() {
478
+ var BbCollectionsError = /** @class */ (function () {
479
+ function BbCollectionsError() {
480
480
  }
481
- return BbCollectionError;
481
+ return BbCollectionsError;
482
482
  }());
483
- BbCollectionError.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbCollectionError, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
484
- BbCollectionError.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.10", type: BbCollectionError, selector: "[bbCollectionError]", ngImport: i0__namespace });
485
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbCollectionError, decorators: [{
483
+ BbCollectionsError.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbCollectionsError, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
484
+ BbCollectionsError.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.10", type: BbCollectionsError, selector: "[bbCollectionsError]", ngImport: i0__namespace });
485
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbCollectionsError, decorators: [{
486
486
  type: i0.Directive,
487
487
  args: [{
488
- selector: '[bbCollectionError]'
488
+ selector: '[bbCollectionsError]'
489
489
  }]
490
490
  }] });
491
- var BbCollectionInitial = /** @class */ (function () {
492
- function BbCollectionInitial() {
491
+ var BbCollectionsInitial = /** @class */ (function () {
492
+ function BbCollectionsInitial() {
493
493
  }
494
- return BbCollectionInitial;
494
+ return BbCollectionsInitial;
495
495
  }());
496
- BbCollectionInitial.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbCollectionInitial, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
497
- BbCollectionInitial.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.10", type: BbCollectionInitial, selector: "[bbCollectionInitial]", ngImport: i0__namespace });
498
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbCollectionInitial, decorators: [{
496
+ BbCollectionsInitial.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbCollectionsInitial, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
497
+ BbCollectionsInitial.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.10", type: BbCollectionsInitial, selector: "[bbCollectionsInitial]", ngImport: i0__namespace });
498
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbCollectionsInitial, decorators: [{
499
499
  type: i0.Directive,
500
500
  args: [{
501
- selector: '[bbCollectionInitial]'
501
+ selector: '[bbCollectionsInitial]'
502
502
  }]
503
503
  }] });
504
504
 
505
- var BbCollectionViewer = /** @class */ (function () {
506
- function BbCollectionViewer() {
505
+ var BbCollectionsViewer = /** @class */ (function () {
506
+ function BbCollectionsViewer() {
507
507
  // Inputs.
508
508
  this.collection = null;
509
509
  }
510
- return BbCollectionViewer;
510
+ return BbCollectionsViewer;
511
511
  }());
512
- BbCollectionViewer.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbCollectionViewer, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
513
- BbCollectionViewer.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.10", type: BbCollectionViewer, selector: "[bb-collection-viewer]", inputs: { collection: "collection" }, host: { classAttribute: "bb-collection-viewer" }, queries: [{ propertyName: "dataTemplate", first: true, predicate: BbCollectionData, descendants: true, read: i0.TemplateRef }, { propertyName: "emptyTemplate", first: true, predicate: BbCollectionEmpty, descendants: true, read: i0.TemplateRef }, { propertyName: "errorTemplate", first: true, predicate: BbCollectionError, descendants: true, read: i0.TemplateRef }, { propertyName: "initialTemplate", first: true, predicate: BbCollectionInitial, descendants: true, read: i0.TemplateRef }], ngImport: i0__namespace, template: "<ng-container *ngIf=\"collection?.data$ | async as data\"\n [ngSwitch]=\"data?.state\">\n <ng-container *ngSwitchDefault>\n <ng-container *ngTemplateOutlet=\"dataTemplate; context: {items: data?.response?.data}\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'initial'\">\n <ng-container *ngTemplateOutlet=\"initialTemplate\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'empty'\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate; context: {query: data?.request?.query}\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'error'\">\n <ng-container *ngTemplateOutlet=\"errorTemplate; context: {error: data?.error}\"></ng-container>\n </ng-container>\n</ng-container>\n", styles: [".bb-collection-viewer{display:block}\n"], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i1__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], pipes: { "async": i1__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
514
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbCollectionViewer, decorators: [{
512
+ BbCollectionsViewer.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbCollectionsViewer, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
513
+ BbCollectionsViewer.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.10", type: BbCollectionsViewer, selector: "[bb-collections-viewer]", inputs: { collection: "collection" }, host: { classAttribute: "bb-collections-viewer" }, queries: [{ propertyName: "dataTemplate", first: true, predicate: BbCollectionsData, descendants: true, read: i0.TemplateRef }, { propertyName: "emptyTemplate", first: true, predicate: BbCollectionsEmpty, descendants: true, read: i0.TemplateRef }, { propertyName: "errorTemplate", first: true, predicate: BbCollectionsError, descendants: true, read: i0.TemplateRef }, { propertyName: "initialTemplate", first: true, predicate: BbCollectionsInitial, descendants: true, read: i0.TemplateRef }], ngImport: i0__namespace, template: "<ng-container *ngIf=\"collection?.data$ | async as data\"\n [ngSwitch]=\"data?.state\">\n <ng-container *ngSwitchDefault>\n <ng-container *ngTemplateOutlet=\"dataTemplate; context: {items: data?.response?.data}\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'initial'\">\n <ng-container *ngTemplateOutlet=\"initialTemplate\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'empty'\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate; context: {query: data?.request?.query}\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'error'\">\n <ng-container *ngTemplateOutlet=\"errorTemplate; context: {error: data?.error}\"></ng-container>\n </ng-container>\n</ng-container>\n", styles: [".bb-collections-viewer{display:block}\n"], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i1__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], pipes: { "async": i1__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
514
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbCollectionsViewer, decorators: [{
515
515
  type: i0.Component,
516
516
  args: [{
517
- selector: '[bb-collection-viewer]',
518
- templateUrl: './collection-viewer.component.html',
519
- styleUrls: ['./collection-viewer.component.scss'],
517
+ selector: '[bb-collections-viewer]',
518
+ templateUrl: './collections-viewer.component.html',
519
+ styleUrls: ['./collections-viewer.component.scss'],
520
520
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
521
521
  encapsulation: i0.ViewEncapsulation.None,
522
- host: { 'class': 'bb-collection-viewer' },
522
+ host: { 'class': 'bb-collections-viewer' },
523
523
  preserveWhitespaces: false
524
524
  }]
525
525
  }], propDecorators: { dataTemplate: [{
526
526
  type: i0.ContentChild,
527
- args: [BbCollectionData, { read: i0.TemplateRef, static: false }]
527
+ args: [BbCollectionsData, { read: i0.TemplateRef, static: false }]
528
528
  }], emptyTemplate: [{
529
529
  type: i0.ContentChild,
530
- args: [BbCollectionEmpty, { read: i0.TemplateRef, static: false }]
530
+ args: [BbCollectionsEmpty, { read: i0.TemplateRef, static: false }]
531
531
  }], errorTemplate: [{
532
532
  type: i0.ContentChild,
533
- args: [BbCollectionError, { read: i0.TemplateRef, static: false }]
533
+ args: [BbCollectionsError, { read: i0.TemplateRef, static: false }]
534
534
  }], initialTemplate: [{
535
535
  type: i0.ContentChild,
536
- args: [BbCollectionInitial, { read: i0.TemplateRef, static: false }]
536
+ args: [BbCollectionsInitial, { read: i0.TemplateRef, static: false }]
537
537
  }], collection: [{
538
538
  type: i0.Input
539
539
  }] } });
540
540
 
541
- var BbCollectionPager = /** @class */ (function () {
542
- function BbCollectionPager() {
541
+ var BbCollectionsPager = /** @class */ (function () {
542
+ function BbCollectionsPager() {
543
543
  // Readonly data.
544
544
  this.maxAmountOfButtons = 5;
545
545
  this.cache$ = new rxjs.BehaviorSubject({});
@@ -548,7 +548,7 @@
548
548
  this._collection = null;
549
549
  this._subscription = null;
550
550
  }
551
- Object.defineProperty(BbCollectionPager.prototype, "label", {
551
+ Object.defineProperty(BbCollectionsPager.prototype, "label", {
552
552
  // Inputs.
553
553
  set: function (value) {
554
554
  this._label = value;
@@ -557,7 +557,7 @@
557
557
  enumerable: false,
558
558
  configurable: true
559
559
  });
560
- Object.defineProperty(BbCollectionPager.prototype, "collection", {
560
+ Object.defineProperty(BbCollectionsPager.prototype, "collection", {
561
561
  set: function (collection) {
562
562
  this._collection = collection;
563
563
  this.observeCollectionChanges();
@@ -565,7 +565,7 @@
565
565
  enumerable: false,
566
566
  configurable: true
567
567
  });
568
- BbCollectionPager.prototype.ngOnInit = function () {
568
+ BbCollectionsPager.prototype.ngOnInit = function () {
569
569
  var _this = this;
570
570
  this.data$ = this.cache$.pipe(operators.map(function (cache) {
571
571
  var _a, _b, _c, _d;
@@ -588,11 +588,11 @@
588
588
  };
589
589
  }));
590
590
  };
591
- BbCollectionPager.prototype.ngOnDestroy = function () {
591
+ BbCollectionsPager.prototype.ngOnDestroy = function () {
592
592
  var _a;
593
593
  (_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
594
594
  };
595
- BbCollectionPager.prototype.setPage = function (pageNumber, totalPages) {
595
+ BbCollectionsPager.prototype.setPage = function (pageNumber, totalPages) {
596
596
  var _a, _b, _c, _d;
597
597
  // Calculate the new value.
598
598
  var newValue = Math.min(totalPages, Math.max(1, pageNumber));
@@ -603,7 +603,7 @@
603
603
  }
604
604
  (_d = (_c = this._collection) === null || _c === void 0 ? void 0 : _c.pageNumberControl) === null || _d === void 0 ? void 0 : _d.setValue(pageNumber);
605
605
  };
606
- BbCollectionPager.prototype.observeCollectionChanges = function () {
606
+ BbCollectionsPager.prototype.observeCollectionChanges = function () {
607
607
  var _this = this;
608
608
  var _a, _b, _c, _d, _e;
609
609
  if (!this._collection) {
@@ -621,7 +621,7 @@
621
621
  }
622
622
  });
623
623
  };
624
- BbCollectionPager.prototype.calculateLabel = function (start, end, total) {
624
+ BbCollectionsPager.prototype.calculateLabel = function (start, end, total) {
625
625
  var _a;
626
626
  var startPoint = '[start]';
627
627
  var endPoint = '[end]';
@@ -632,7 +632,7 @@
632
632
  .replace(endPoint, "<strong>" + end + "</strong>")
633
633
  .replace(totalPoint, "<strong>" + total + "</strong>");
634
634
  };
635
- BbCollectionPager.prototype.calculatePages = function (pageNumber, totalPages) {
635
+ BbCollectionsPager.prototype.calculatePages = function (pageNumber, totalPages) {
636
636
  var min = 1;
637
637
  var max = totalPages;
638
638
  var amount = Math.max(1, this.maxAmountOfButtons);
@@ -654,24 +654,24 @@
654
654
  // Just return the default data.
655
655
  return data;
656
656
  };
657
- BbCollectionPager.prototype.filterActivePages = function (pageNumber, totalPages) {
657
+ BbCollectionsPager.prototype.filterActivePages = function (pageNumber, totalPages) {
658
658
  return this.calculatePages(pageNumber, totalPages)
659
659
  .filter(function (page) { return page > 0 && page <= totalPages; })
660
660
  .map(function (page) { return ({ page: page, active: pageNumber === page }); });
661
661
  };
662
- return BbCollectionPager;
662
+ return BbCollectionsPager;
663
663
  }());
664
- BbCollectionPager.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbCollectionPager, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
665
- BbCollectionPager.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.10", type: BbCollectionPager, selector: "bb-collection-pager", inputs: { label: "label", collection: "collection" }, host: { classAttribute: "bb-collection-pager" }, ngImport: i0__namespace, template: "<ng-container *ngIf=\"data$ | async as data\">\n <div [innerHTML]=\"data?.label\"\n class=\"bb-collection-pager-text\">\n </div>\n\n <div class=\"bb-collection-pager-container\">\n <ul class=\"bb-collection-pager-list\">\n <li class=\"bb-collection-pager-item\"\n title=\"Previous page\">\n <button [disabled]=\"!data?.allowPrevious\"\n (click)=\"setPage(data?.pageNumber - 1, data?.totalPages)\"\n class=\"bb-collection-pager-button arrow first\"\n type=\"button\">\n &#8592;\n </button>\n </li>\n <li *ngFor=\"let item of data?.pages\"\n [title]=\"'Page ' + item?.page\"\n class=\"bb-collection-pager-item\">\n <button [class.active]=\"item?.active\"\n (click)=\"setPage(item?.page, data?.totalPages)\"\n class=\"bb-collection-pager-button\"\n type=\"button\">\n {{ item?.page }}\n </button>\n </li>\n <li class=\"bb-collection-pager-item\"\n title=\"Next page\">\n <button [disabled]=\"!data?.allowNext\"\n (click)=\"setPage(data?.pageNumber + 1, data?.totalPages)\"\n class=\"bb-collection-pager-button arrow last\"\n type=\"button\">\n &#8594;\n </button>\n </li>\n </ul>\n </div>\n</ng-container>\n", styles: [".bb-collection-pager{display:flex;align-items:center;flex-direction:column-reverse}.bb-collection-pager-text{display:block;margin-top:10px}.bb-collection-pager-text>strong{font-weight:500}.bb-collection-pager-container{width:100%;display:flex;overflow-x:auto;align-items:center;justify-content:center}.bb-collection-pager-list{display:flex;border-radius:6px;align-items:center;background-color:#fff;border:1px solid rgba(67,90,111,.3);box-shadow:#435a6f24 0 1px 2px inset}.bb-collection-pager-item:not(:last-child){border-right:1px solid #cccccc}.bb-collection-pager-button{height:34px;border:none;display:flex;padding:0 4px;min-width:40px;-webkit-appearance:none;-moz-appearance:none;appearance:none;min-height:34px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;align-items:center;justify-content:center;background-color:transparent}.bb-collection-pager-button:hover,.bb-collection-pager-button:focus,.bb-collection-pager-button:active,.bb-collection-pager-button.active{color:#1565c0;font-weight:500}.bb-collection-pager-button:hover,.bb-collection-pager-button:focus{background-color:#1565c00d}.bb-collection-pager-button:active,.bb-collection-pager-button.active{background-color:#1565c033}.bb-collection-pager-button:not(.arrow):hover,.bb-collection-pager-button:not(.arrow):focus{outline:1px solid rgba(21,101,192,.5)}.bb-collection-pager-button:not(.arrow):focus,.bb-collection-pager-button:not(.arrow):active{outline:1px solid #1565c0;box-shadow:#1565c066 0 0 0 3px}.bb-collection-pager-button:not(.arrow).active{outline:1px solid #1565c0}.bb-collection-pager-button.arrow{font-weight:500}.bb-collection-pager-button.arrow.first{border-top-left-radius:2px;border-bottom-left-radius:2px}.bb-collection-pager-button.arrow.last{border-top-right-radius:2px;border-bottom-right-radius:2px}.bb-collection-pager-button:disabled{color:#000;outline:none;opacity:.25;cursor:default;pointer-events:none;background-color:transparent}@media only screen and (min-width: 768px){.bb-collection-pager{flex-wrap:wrap;align-items:center;flex-direction:row;justify-content:space-between}.bb-collection-pager-text{margin-top:0}.bb-collection-pager-container{width:auto;overflow-x:unset}}\n"], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i1__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
666
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbCollectionPager, decorators: [{
664
+ BbCollectionsPager.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbCollectionsPager, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
665
+ BbCollectionsPager.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.10", type: BbCollectionsPager, selector: "bb-collections-pager", inputs: { label: "label", collection: "collection" }, host: { classAttribute: "bb-collections-pager" }, ngImport: i0__namespace, template: "<ng-container *ngIf=\"data$ | async as data\">\n <div [innerHTML]=\"data?.label\"\n class=\"bb-collections-pager-text\">\n </div>\n\n <div class=\"bb-collections-pager-container\">\n <ul class=\"bb-collections-pager-list\">\n <li class=\"bb-collections-pager-item\"\n title=\"Previous page\">\n <button [disabled]=\"!data?.allowPrevious\"\n (click)=\"setPage(data?.pageNumber - 1, data?.totalPages)\"\n class=\"bb-collections-pager-button arrow first\"\n type=\"button\">\n &#8592;\n </button>\n </li>\n <li *ngFor=\"let item of data?.pages\"\n [title]=\"'Page ' + item?.page\"\n class=\"bb-collections-pager-item\">\n <button [class.active]=\"item?.active\"\n (click)=\"setPage(item?.page, data?.totalPages)\"\n class=\"bb-collections-pager-button\"\n type=\"button\">\n {{ item?.page }}\n </button>\n </li>\n <li class=\"bb-collections-pager-item\"\n title=\"Next page\">\n <button [disabled]=\"!data?.allowNext\"\n (click)=\"setPage(data?.pageNumber + 1, data?.totalPages)\"\n class=\"bb-collections-pager-button arrow last\"\n type=\"button\">\n &#8594;\n </button>\n </li>\n </ul>\n </div>\n</ng-container>\n", styles: [".bb-collections-pager{display:flex;align-items:center;flex-direction:column-reverse}.bb-collections-pager-text{display:block;margin-top:10px}.bb-collections-pager-text>strong{font-weight:500}.bb-collections-pager-container{width:100%;display:flex;overflow-x:auto;align-items:center;justify-content:center}.bb-collections-pager-list{display:flex;border-radius:6px;align-items:center;background-color:#fff;border:1px solid rgba(67,90,111,.3);box-shadow:#435a6f24 0 1px 2px inset}.bb-collections-pager-item:not(:last-child){border-right:1px solid #cccccc}.bb-collections-pager-button{height:34px;border:none;display:flex;padding:0 4px;min-width:40px;-webkit-appearance:none;-moz-appearance:none;appearance:none;min-height:34px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;align-items:center;justify-content:center;background-color:transparent}.bb-collections-pager-button:hover,.bb-collections-pager-button:focus,.bb-collections-pager-button:active,.bb-collections-pager-button.active{color:#1565c0;font-weight:500}.bb-collections-pager-button:hover,.bb-collections-pager-button:focus{background-color:#1565c00d}.bb-collections-pager-button:active,.bb-collections-pager-button.active{background-color:#1565c033}.bb-collections-pager-button:not(.arrow):hover,.bb-collections-pager-button:not(.arrow):focus{outline:1px solid rgba(21,101,192,.5)}.bb-collections-pager-button:not(.arrow):focus,.bb-collections-pager-button:not(.arrow):active{outline:1px solid #1565c0;box-shadow:#1565c066 0 0 0 3px}.bb-collections-pager-button:not(.arrow).active{outline:1px solid #1565c0}.bb-collections-pager-button.arrow{font-weight:500}.bb-collections-pager-button.arrow.first{border-top-left-radius:2px;border-bottom-left-radius:2px}.bb-collections-pager-button.arrow.last{border-top-right-radius:2px;border-bottom-right-radius:2px}.bb-collections-pager-button:disabled{color:#000;outline:none;opacity:.25;cursor:default;pointer-events:none;background-color:transparent}@media only screen and (min-width: 768px){.bb-collections-pager{flex-wrap:wrap;align-items:center;flex-direction:row;justify-content:space-between}.bb-collections-pager-text{margin-top:0}.bb-collections-pager-container{width:auto;overflow-x:unset}}\n"], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i1__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
666
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: BbCollectionsPager, decorators: [{
667
667
  type: i0.Component,
668
668
  args: [{
669
- selector: 'bb-collection-pager',
670
- templateUrl: './collection-pager.component.html',
671
- styleUrls: ['./collection-pager.component.scss'],
669
+ selector: 'bb-collections-pager',
670
+ templateUrl: './collections-pager.component.html',
671
+ styleUrls: ['./collections-pager.component.scss'],
672
672
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
673
673
  encapsulation: i0.ViewEncapsulation.None,
674
- host: { 'class': 'bb-collection-pager' },
674
+ host: { 'class': 'bb-collections-pager' },
675
675
  preserveWhitespaces: false
676
676
  }]
677
677
  }], propDecorators: { label: [{
@@ -776,55 +776,55 @@
776
776
  return Collection;
777
777
  }());
778
778
 
779
- var CollectionModule = /** @class */ (function () {
780
- function CollectionModule() {
779
+ var CollectionsModule = /** @class */ (function () {
780
+ function CollectionsModule() {
781
781
  }
782
- return CollectionModule;
782
+ return CollectionsModule;
783
783
  }());
784
- CollectionModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: CollectionModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
785
- CollectionModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: CollectionModule, declarations: [
784
+ CollectionsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: CollectionsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
785
+ CollectionsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: CollectionsModule, declarations: [
786
786
  // Components.
787
- BbCollectionViewer,
788
- BbCollectionPager,
787
+ BbCollectionsViewer,
788
+ BbCollectionsPager,
789
789
  // Directives.
790
- BbCollectionData,
791
- BbCollectionEmpty,
792
- BbCollectionError,
793
- BbCollectionInitial
790
+ BbCollectionsData,
791
+ BbCollectionsEmpty,
792
+ BbCollectionsError,
793
+ BbCollectionsInitial
794
794
  ], imports: [i1.CommonModule], exports: [
795
795
  // Components.
796
- BbCollectionViewer,
797
- BbCollectionPager,
796
+ BbCollectionsViewer,
797
+ BbCollectionsPager,
798
798
  // Directives.
799
- BbCollectionData,
800
- BbCollectionEmpty,
801
- BbCollectionError,
802
- BbCollectionInitial
799
+ BbCollectionsData,
800
+ BbCollectionsEmpty,
801
+ BbCollectionsError,
802
+ BbCollectionsInitial
803
803
  ] });
804
- CollectionModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: CollectionModule, imports: [[i1.CommonModule]] });
805
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: CollectionModule, decorators: [{
804
+ CollectionsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: CollectionsModule, imports: [[i1.CommonModule]] });
805
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: CollectionsModule, decorators: [{
806
806
  type: i0.NgModule,
807
807
  args: [{
808
808
  imports: [i1.CommonModule],
809
809
  declarations: [
810
810
  // Components.
811
- BbCollectionViewer,
812
- BbCollectionPager,
811
+ BbCollectionsViewer,
812
+ BbCollectionsPager,
813
813
  // Directives.
814
- BbCollectionData,
815
- BbCollectionEmpty,
816
- BbCollectionError,
817
- BbCollectionInitial
814
+ BbCollectionsData,
815
+ BbCollectionsEmpty,
816
+ BbCollectionsError,
817
+ BbCollectionsInitial
818
818
  ],
819
819
  exports: [
820
820
  // Components.
821
- BbCollectionViewer,
822
- BbCollectionPager,
821
+ BbCollectionsViewer,
822
+ BbCollectionsPager,
823
823
  // Directives.
824
- BbCollectionData,
825
- BbCollectionEmpty,
826
- BbCollectionError,
827
- BbCollectionInitial
824
+ BbCollectionsData,
825
+ BbCollectionsEmpty,
826
+ BbCollectionsError,
827
+ BbCollectionsInitial
828
828
  ]
829
829
  }]
830
830
  }] });
@@ -834,15 +834,15 @@
834
834
  */
835
835
 
836
836
  exports.ApiCollectionProvider = ApiCollectionProvider;
837
- exports.BbCollectionData = BbCollectionData;
838
- exports.BbCollectionEmpty = BbCollectionEmpty;
839
- exports.BbCollectionError = BbCollectionError;
840
- exports.BbCollectionInitial = BbCollectionInitial;
841
- exports.BbCollectionPager = BbCollectionPager;
842
- exports.BbCollectionViewer = BbCollectionViewer;
837
+ exports.BbCollectionsData = BbCollectionsData;
838
+ exports.BbCollectionsEmpty = BbCollectionsEmpty;
839
+ exports.BbCollectionsError = BbCollectionsError;
840
+ exports.BbCollectionsInitial = BbCollectionsInitial;
841
+ exports.BbCollectionsPager = BbCollectionsPager;
842
+ exports.BbCollectionsViewer = BbCollectionsViewer;
843
843
  exports.Collection = Collection;
844
- exports.CollectionModule = CollectionModule;
845
844
  exports.CollectionProvider = CollectionProvider;
845
+ exports.CollectionsModule = CollectionsModule;
846
846
  exports.LocalCollectionProvider = LocalCollectionProvider;
847
847
 
848
848
  Object.defineProperty(exports, '__esModule', { value: true });