@colijnit/corecomponents_v12 12.0.49 → 12.0.52

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 (35) hide show
  1. package/bundles/colijnit-corecomponents_v12.umd.js +1083 -985
  2. package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
  3. package/colijnit-corecomponents_v12.d.ts +7 -7
  4. package/colijnit-corecomponents_v12.metadata.json +1 -1
  5. package/esm2015/colijnit-corecomponents_v12.js +8 -8
  6. package/esm2015/lib/components/base/base-input.component.js +2 -2
  7. package/esm2015/lib/components/input-combo-box/input-combo-box.component.js +2 -1
  8. package/esm2015/lib/components/input-date-range-picker/input-date-range-picker.component.js +1 -2
  9. package/esm2015/lib/components/input-search/input-search.component.js +3 -1
  10. package/esm2015/lib/components/pagination/pagination.component.js +17 -69
  11. package/esm2015/lib/components/pagination/pagination.module.js +6 -4
  12. package/esm2015/lib/components/pagination/pagination.service.js +1 -1
  13. package/esm2015/lib/components/pagination-bar/pagination-bar.component.js +131 -0
  14. package/esm2015/lib/components/pagination-bar/pagination-bar.module.js +19 -0
  15. package/esm2015/lib/components/simple-grid/simple-grid.component.js +10 -2
  16. package/esm2015/lib/components/simple-grid/simple-grid.module.js +4 -2
  17. package/esm2015/public-api.js +3 -1
  18. package/fesm2015/colijnit-corecomponents_v12.js +1099 -993
  19. package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
  20. package/lib/components/input-search/input-search.component.d.ts +1 -0
  21. package/lib/components/pagination/pagination.component.d.ts +3 -8
  22. package/lib/components/pagination/style/_layout.scss +0 -70
  23. package/lib/components/pagination/style/material.scss +1 -0
  24. package/lib/components/pagination-bar/pagination-bar.component.d.ts +29 -0
  25. package/lib/components/pagination-bar/pagination-bar.module.d.ts +2 -0
  26. package/lib/components/pagination-bar/style/_layout.scss +67 -0
  27. package/lib/components/pagination-bar/style/_material-definition.scss +3 -0
  28. package/lib/components/pagination-bar/style/_theme.scss +24 -0
  29. package/lib/components/pagination-bar/style/material.scss +3 -0
  30. package/lib/components/simple-grid/simple-grid.component.d.ts +3 -0
  31. package/lib/components/simple-grid/style/_material-definition.scss +2 -0
  32. package/lib/components/simple-grid/style/_theme.scss +4 -0
  33. package/lib/components/simple-grid/style/material.scss +1 -0
  34. package/package.json +1 -1
  35. package/public-api.d.ts +2 -0
@@ -4900,7 +4900,7 @@
4900
4900
  break;
4901
4901
  }
4902
4902
  else if (node.children.length > 0) {
4903
- return this._findInputNode(node.children);
4903
+ this._findInputNode(node.children);
4904
4904
  }
4905
4905
  }
4906
4906
  };
@@ -6246,7 +6246,7 @@
6246
6246
  InputComboBoxComponent.decorators = [
6247
6247
  { type: core.Component, args: [{
6248
6248
  selector: "co-input-combo-box",
6249
- template: "\n <ejs-combobox #combo [dataSource]=\"collection\"\n [fields]=\"fields\"\n [placeholder]=\"placeholder\"\n [autofill]=\"true\"\n [ngModel]=\"model\"\n (ngModelChange)=\"modelChange.emit($event)\"\n (valueChange)=\"valueChange.emit($event)\"\n (focus)=\"onFocus()\"\n showClearButton=\"true\"\n floatLabelType=\"Auto\"\n >\n </ejs-combobox>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
6249
+ template: "\n <ejs-combobox #combo [dataSource]=\"collection\"\n [fields]=\"fields\"\n [disabled]=\"readonly\"\n [placeholder]=\"placeholder\"\n [autofill]=\"true\"\n [ngModel]=\"model\"\n (ngModelChange)=\"modelChange.emit($event)\"\n (valueChange)=\"valueChange.emit($event)\"\n (focus)=\"onFocus()\"\n showClearButton=\"true\"\n floatLabelType=\"Auto\"\n >\n </ejs-combobox>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
6250
6250
  providers: [{
6251
6251
  provide: COMPONENT_INTERFACE_NAME,
6252
6252
  useExisting: core.forwardRef(function () { return InputComboBoxComponent; })
@@ -6434,7 +6434,7 @@
6434
6434
  InputDateRangePickerComponent.decorators = [
6435
6435
  { type: core.Component, args: [{
6436
6436
  selector: "co-input-date-range",
6437
- template: "\n <ejs-daterangepicker\n floatLabelType=\"Auto\"\n [format]=\"dateFormat\"\n [placeholder]=\"placeholder\"\n [ngModel]=\"model\"\n (ngModelChange)=\"rangeChange()\"\n (close)=\"close.next($event)\"\n (select)=\"select.next($event)\"\n (cleared)=\"cleared.next($event)\"\n [(startDate)]=\"startDate\"\n [(endDate)]=\"endDate\"\n ></ejs-daterangepicker>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
6437
+ template: "\n <ejs-daterangepicker\n [format]=\"dateFormat\"\n [placeholder]=\"placeholder\"\n [ngModel]=\"model\"\n (ngModelChange)=\"rangeChange()\"\n (close)=\"close.next($event)\"\n (select)=\"select.next($event)\"\n (cleared)=\"cleared.next($event)\"\n [(startDate)]=\"startDate\"\n [(endDate)]=\"endDate\"\n ></ejs-daterangepicker>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
6438
6438
  encapsulation: core.ViewEncapsulation.None
6439
6439
  },] }
6440
6440
  ];
@@ -7554,6 +7554,7 @@
7554
7554
  _this.search = new core.EventEmitter();
7555
7555
  _this.useLeftIcon = false;
7556
7556
  _this.useRightIcon = false;
7557
+ _this.noIcon = false;
7557
7558
  return _this;
7558
7559
  }
7559
7560
  InputSearchComponent.prototype.showClass = function () {
@@ -7582,6 +7583,7 @@
7582
7583
  search: [{ type: core.Output }],
7583
7584
  useLeftIcon: [{ type: core.Input }],
7584
7585
  useRightIcon: [{ type: core.Input }],
7586
+ noIcon: [{ type: core.HostBinding, args: ['class.no-icon',] }, { type: core.Input }],
7585
7587
  showClass: [{ type: core.HostBinding, args: ['class.co-input-search',] }]
7586
7588
  };
7587
7589
  __decorate([
@@ -9501,10 +9503,12 @@
9501
9503
  _this.showAdd = false;
9502
9504
  _this.showDelete = false;
9503
9505
  _this.rightToolbar = false;
9506
+ _this.rowsPerPage = 1000;
9504
9507
  _this.editing = false;
9505
9508
  _this.editRowIndex = -1;
9506
9509
  _this.editCellIndex = -1;
9507
9510
  _this.selectedRowIndex = -1;
9511
+ _this.currentPage = 1;
9508
9512
  _this._doubleClicked = false;
9509
9513
  _this._newRow = false;
9510
9514
  return _this;
@@ -9771,6 +9775,10 @@
9771
9775
  }
9772
9776
  this._detectChanges();
9773
9777
  };
9778
+ SimpleGridComponent.prototype.pageChange = function (page) {
9779
+ this.currentPage = page;
9780
+ //this.gridBody.nativeElement.scrollTop = 0;
9781
+ };
9774
9782
  SimpleGridComponent.prototype._detectChanges = function () {
9775
9783
  this._changeDetection.detectChanges();
9776
9784
  };
@@ -9779,7 +9787,7 @@
9779
9787
  SimpleGridComponent.decorators = [
9780
9788
  { type: core.Component, args: [{
9781
9789
  selector: 'co-simple-grid',
9782
- template: "\n <co-grid-toolbar *ngIf=\"showToolbar\" [class.right]=\"rightToolbar\"\n [showEdit]=\"inlineEdit\"\n [showAdd]=\"showAdd\"\n [showDelete]=\"showDelete\"\n [deleteEnabled]=\"selectedRowIndex > -1\"\n (addClick)=\"addNewRow()\"\n (editClick)=\"editRow($event)\"\n (saveClick)=\"validateAndSave()\"\n (cancelClick)=\"cancelEditRow()\"\n (deleteClick)=\"removeRow()\"\n ></co-grid-toolbar>\n <table class=\"simple-grid-table\">\n <colgroup>\n <col *ngFor=\"let column of headerColumns; let index = index\"\n [class.simple-grid-column-auto-fit]=\"column.autoFit\"\n [style.width.px]=\"column.width\"\n [style.min-width.px]=\"MIN_COLUMN_WIDTH\">\n </colgroup>\n <thead>\n <tr>\n <th scope=\"col\" #headerCell class=\"simple-grid-column-header\" *ngFor=\"let column of headerColumns; let index = index\">\n <div class=\"simple-grid-column-header-wrapper\" [class.resizable]=\"resizable\"\n [ngClass]=\"column.textAlign ? column.textAlign : defaultTextAlign\">\n <ng-container *ngIf=\"column.headerTemplate; else noHeaderTemplate\">\n <ng-container [ngTemplateOutlet]=\"column.headerTemplate\"></ng-container>\n </ng-container>\n <ng-template #noHeaderTemplate>\n <div class=\"simple-grid-column-header-label\" [ngClass]=\"column.textAlign ? column.textAlign : defaultTextAlign\"\n [textContent]=\"column.headerText || '&nbsp;'\"\n ></div>\n </ng-template>\n <div *ngIf=\"resizable && column.resizable\" class=\"simple-grid-column-sizer\"\n (mousedown)=\"handleSizerMouseDown($event, column)\"\n ></div>\n </div>\n </th>\n </tr>\n </thead>\n <tbody #dropList cdkDropList cdkDropListOrientation=\"vertical\"\n class=\"simple-grid-drag-drop-list\"\n [cdkDropListDisabled]=\"!dragDropEnabled\"\n [cdkDropListData]=\"data\"\n [cdkDropListEnterPredicate]=\"handleCanDragDrop\"\n (cdkDropListDropped)=\"handleDrop($event)\">\n <tr class=\"simple-grid-row\" [class.selected]=\"rowIndex === selectedRowIndex && !editing\" observeVisibility\n [class.editing]=\"rowIndex === editRowIndex\" *ngFor=\"let row of data; let rowIndex = index\" cdkDrag\n (click)=\"handleClickRow($event, rowIndex)\" (dblclick)=\"handleDblClickRow($event, rowIndex)\" (visible)=\"rowVisible.next(row)\">\n <co-form class=\"simple-grid-row-form\">\n <ng-container *ngIf=\"isSingleColumnRow(row)\">\n <td class=\"simple-grid-single-column-cell\" [attr.colspan]=\"headerColumns.length\">\n <co-simple-grid-cell\n [column]=\"columns[singleColumnIndex(row)]\"\n [row]=\"row\"\n [editMode]=\"false\"\n ></co-simple-grid-cell>\n </td>\n </ng-container>\n <ng-container *ngIf=\"!isSingleColumnRow(row)\">\n <ng-container *ngFor=\"let column of headerColumns; let columnIndex = index\">\n <td class=\"simple-grid-column-cell\" *ngIf=\"columnIndex !== singleColumnIndex(row)\">\n <co-simple-grid-cell\n [column]=\"column\"\n [row]=\"row\"\n [editMode]=\"inlineEdit && editing && rowIndex === editRowIndex\"\n [fieldEditMode]=\"editCellIndex === columnIndex\"\n (cellClick)=\"handleCellClick(columnIndex)\"\n ></co-simple-grid-cell>\n <div *ngIf=\"column.resizable\" class=\"simple-grid-column-sizer-placeholder\"></div>\n </td>\n </ng-container>\n </ng-container>\n </co-form>\n </tr>\n </tbody>\n </table>\n ",
9790
+ template: "\n <co-grid-toolbar *ngIf=\"showToolbar\" [class.right]=\"rightToolbar\"\n [showEdit]=\"inlineEdit\"\n [showAdd]=\"showAdd\"\n [showDelete]=\"showDelete\"\n [deleteEnabled]=\"selectedRowIndex > -1\"\n (addClick)=\"addNewRow()\"\n (editClick)=\"editRow($event)\"\n (saveClick)=\"validateAndSave()\"\n (cancelClick)=\"cancelEditRow()\"\n (deleteClick)=\"removeRow()\"\n ></co-grid-toolbar>\n <table class=\"simple-grid-table\">\n <colgroup>\n <col *ngFor=\"let column of headerColumns; let index = index\"\n [class.simple-grid-column-auto-fit]=\"column.autoFit\"\n [style.width.px]=\"column.width\"\n [style.min-width.px]=\"MIN_COLUMN_WIDTH\">\n </colgroup>\n <thead>\n <tr>\n <th scope=\"col\" #headerCell class=\"simple-grid-column-header\" *ngFor=\"let column of headerColumns; let index = index\">\n <div class=\"simple-grid-column-header-wrapper\" [class.resizable]=\"resizable\"\n [ngClass]=\"column.textAlign ? column.textAlign : defaultTextAlign\">\n <ng-container *ngIf=\"column.headerTemplate; else noHeaderTemplate\">\n <ng-container [ngTemplateOutlet]=\"column.headerTemplate\"></ng-container>\n </ng-container>\n <ng-template #noHeaderTemplate>\n <div class=\"simple-grid-column-header-label\" [ngClass]=\"column.textAlign ? column.textAlign : defaultTextAlign\"\n [textContent]=\"column.headerText || '&nbsp;'\"\n ></div>\n </ng-template>\n <div *ngIf=\"resizable && column.resizable\" class=\"simple-grid-column-sizer\"\n (mousedown)=\"handleSizerMouseDown($event, column)\"\n ></div>\n </div>\n </th>\n </tr>\n </thead>\n <tbody #dropList cdkDropList cdkDropListOrientation=\"vertical\"\n class=\"simple-grid-drag-drop-list\"\n [cdkDropListDisabled]=\"!dragDropEnabled\"\n [cdkDropListData]=\"data\"\n [cdkDropListEnterPredicate]=\"handleCanDragDrop\"\n (cdkDropListDropped)=\"handleDrop($event)\">\n <tr class=\"simple-grid-row\" [class.selected]=\"rowIndex === selectedRowIndex && !editing\" observeVisibility\n [class.editing]=\"rowIndex === editRowIndex\" *ngFor=\"let row of (!!rowsPerPage ? (data | paginate: {itemsPerPage: rowsPerPage, currentPage: currentPage}) : data); last as last; let rowIndex = index\" cdkDrag\n (click)=\"handleClickRow($event, rowIndex)\" (dblclick)=\"handleDblClickRow($event, rowIndex)\" (visible)=\"rowVisible.next(row)\">\n <co-form class=\"simple-grid-row-form\">\n <ng-container *ngIf=\"isSingleColumnRow(row)\">\n <td class=\"simple-grid-single-column-cell\" [attr.colspan]=\"headerColumns.length\">\n <co-simple-grid-cell\n [column]=\"columns[singleColumnIndex(row)]\"\n [row]=\"row\"\n [editMode]=\"false\"\n ></co-simple-grid-cell>\n </td>\n </ng-container>\n <ng-container *ngIf=\"!isSingleColumnRow(row)\">\n <ng-container *ngFor=\"let column of headerColumns; let columnIndex = index\">\n <td class=\"simple-grid-column-cell\" *ngIf=\"columnIndex !== singleColumnIndex(row)\">\n <co-simple-grid-cell\n [column]=\"column\"\n [row]=\"row\"\n [editMode]=\"inlineEdit && editing && rowIndex === editRowIndex\"\n [fieldEditMode]=\"editCellIndex === columnIndex\"\n (cellClick)=\"handleCellClick(columnIndex)\"\n ></co-simple-grid-cell>\n <div *ngIf=\"column.resizable\" class=\"simple-grid-column-sizer-placeholder\"></div>\n </td>\n </ng-container>\n </ng-container>\n </co-form>\n </tr>\n </tbody>\n </table>\n <co-pagination *ngIf=\"data?.length > rowsPerPage\" [autoHide]=\"true\" (pageChange)=\"pageChange($event)\"></co-pagination>\n ",
9783
9791
  providers: [
9784
9792
  FormMasterService
9785
9793
  ],
@@ -9796,1128 +9804,1216 @@
9796
9804
  showAdd: [{ type: core.Input }],
9797
9805
  showDelete: [{ type: core.Input }],
9798
9806
  rightToolbar: [{ type: core.Input }],
9807
+ rowsPerPage: [{ type: core.Input }],
9799
9808
  showClass: [{ type: core.HostBinding, args: ['class.co-simple-grid',] }],
9800
9809
  handleKeyDown: [{ type: core.HostListener, args: ['keydown', ['$event'],] }]
9801
9810
  };
9802
9811
 
9803
- var SimpleGridCellComponent = /** @class */ (function () {
9804
- function SimpleGridCellComponent(_changeDetector) {
9805
- this._changeDetector = _changeDetector;
9806
- this.defaultTextAlign = exports.ColumnAlign.Left;
9807
- this.editMode = false;
9808
- this.cellClick = new core.EventEmitter();
9809
- this._fieldEditMode = false;
9810
- this._focused = false;
9812
+ var PaginationBarComponent = /** @class */ (function () {
9813
+ function PaginationBarComponent() {
9814
+ this.directionLinks = true;
9815
+ this.previousLabel = 'Vorige pagina';
9816
+ this.nextLabel = 'Volgende pagina';
9817
+ this.currentPage = 1;
9818
+ this.itemsPerPage = 20;
9819
+ this.totalItems = 1;
9820
+ this.paginationRange = 8;
9821
+ this.previousClick = new core.EventEmitter();
9822
+ this.nextClick = new core.EventEmitter();
9823
+ this.pageClick = new core.EventEmitter();
9824
+ this.pages = [];
9811
9825
  }
9812
- Object.defineProperty(SimpleGridCellComponent.prototype, "editTemplateContent", {
9813
- set: function (template) {
9814
- if (template) {
9815
- this._editTemplate = template;
9816
- this._setFocusComponent();
9817
- }
9818
- },
9819
- enumerable: false,
9820
- configurable: true
9821
- });
9822
- Object.defineProperty(SimpleGridCellComponent.prototype, "noEditTemplateContent", {
9823
- set: function (template) {
9824
- if (template) {
9825
- this._template = template;
9826
- this._setFocusComponent();
9827
- }
9828
- },
9829
- enumerable: false,
9830
- configurable: true
9831
- });
9832
- Object.defineProperty(SimpleGridCellComponent.prototype, "noTemplateContent", {
9833
- set: function (template) {
9834
- if (template) {
9835
- this._inputTemplate = template;
9836
- this._setFocusComponent();
9837
- }
9838
- },
9839
- enumerable: false,
9840
- configurable: true
9841
- });
9842
- Object.defineProperty(SimpleGridCellComponent.prototype, "fieldEditMode", {
9843
- get: function () {
9844
- return this._fieldEditMode;
9845
- },
9846
- set: function (value) {
9847
- this._fieldEditMode = value;
9848
- this._setFocusComponent();
9849
- },
9850
- enumerable: false,
9851
- configurable: true
9852
- });
9853
- SimpleGridCellComponent.prototype.showClass = function () {
9826
+ PaginationBarComponent.prototype.showClass = function () {
9854
9827
  return true;
9855
9828
  };
9856
- SimpleGridCellComponent.prototype.handleClick = function (event) {
9857
- if (this.column && !this.column.readonly) {
9858
- this.cellClick.next();
9859
- }
9829
+ PaginationBarComponent.prototype.ngOnInit = function () {
9830
+ this.totalPages = Math.ceil(this.totalItems / this.itemsPerPage);
9831
+ this.pages = this._createPageArray();
9860
9832
  };
9861
- SimpleGridCellComponent.prototype._setFocusComponent = function () {
9862
- if (this.editMode && this.fieldEditMode) {
9863
- var element = this._getElement();
9864
- if (element) {
9865
- var focusEvent = this._createNewEvent(element, 'focus');
9866
- element.focus();
9867
- element.dispatchEvent(focusEvent);
9868
- this._focused = true;
9869
- }
9870
- }
9871
- else {
9872
- if (this._focused) {
9873
- var element = this._getElement();
9874
- if (element) {
9875
- var blurEvent = this._createNewEvent(element, 'blur');
9876
- element.blur();
9877
- element.dispatchEvent(blurEvent);
9878
- }
9879
- this._focused = false;
9880
- }
9833
+ PaginationBarComponent.prototype.ngOnChanges = function (changes) {
9834
+ if (changes['currentPage'].currentValue !== changes['currentPage'].previousValue) {
9835
+ this.pages = this._createPageArray();
9881
9836
  }
9882
- this._detectChanges();
9883
9837
  };
9884
- SimpleGridCellComponent.prototype._getFirstFormInput = function (parent) {
9885
- if (parent) {
9886
- var collection_1 = Array.from(parent.getElementsByTagName('input'));
9887
- var otherCollection = Array.from(parent.getElementsByTagName('textarea'));
9888
- otherCollection.map(function (o) { return collection_1.push(o); });
9889
- if (collection_1.length > 0) {
9890
- return collection_1[0];
9838
+ PaginationBarComponent.prototype.isOnFirstPage = function () {
9839
+ return this.currentPage === 1;
9840
+ };
9841
+ PaginationBarComponent.prototype.isOnLastPage = function () {
9842
+ return this.pages.length === this.currentPage;
9843
+ };
9844
+ PaginationBarComponent.prototype.onPreviousClick = function () {
9845
+ this.previousClick.emit();
9846
+ };
9847
+ PaginationBarComponent.prototype.onNextClick = function () {
9848
+ this.nextClick.emit();
9849
+ };
9850
+ PaginationBarComponent.prototype.onPageClick = function (value) {
9851
+ this.currentPage = value;
9852
+ this.pageClick.emit(value);
9853
+ };
9854
+ // Returns an array of IPage objects to use in the pagination controls.
9855
+ PaginationBarComponent.prototype._createPageArray = function () {
9856
+ // paginationRange could be a string if passed from attribute, so cast to number.
9857
+ this.paginationRange = +this.paginationRange;
9858
+ var pages = [];
9859
+ var halfWay = Math.ceil(this.paginationRange / 2);
9860
+ var isStart = this.currentPage <= halfWay;
9861
+ var isEnd = this.totalPages - halfWay < this.currentPage;
9862
+ var isMiddle = !isStart && !isEnd;
9863
+ var ellipsesNeeded = this.paginationRange < this.totalPages;
9864
+ var i = 1;
9865
+ while (i <= this.totalPages && i <= this.paginationRange) {
9866
+ var label = void 0;
9867
+ var pageNumber = this._calculatePageNumber(i);
9868
+ var openingEllipsesNeeded = (i === 2 && (isMiddle || isEnd));
9869
+ var closingEllipsesNeeded = (i === this.paginationRange - 1 && (isMiddle || isStart));
9870
+ if (ellipsesNeeded && (openingEllipsesNeeded || closingEllipsesNeeded)) {
9871
+ label = '...';
9872
+ }
9873
+ else {
9874
+ label = '' + pageNumber;
9891
9875
  }
9876
+ pages.push({
9877
+ label: label,
9878
+ value: pageNumber
9879
+ });
9880
+ i++;
9892
9881
  }
9882
+ return pages;
9893
9883
  };
9894
- SimpleGridCellComponent.prototype._createNewEvent = function (element, eventType) {
9895
- var event;
9896
- if ("createEvent" in document) {
9897
- event = document.createEvent("Event");
9898
- event.initEvent(eventType, true, true);
9899
- }
9900
- else if ("Event" in window) {
9901
- event = new Event(eventType, { bubbles: true, cancelable: true });
9884
+ // Given the position in the sequence of pagination links [i], figure out what page number corresponds to that position.
9885
+ PaginationBarComponent.prototype._calculatePageNumber = function (i) {
9886
+ var halfWay = Math.ceil(this.paginationRange / 2);
9887
+ if (i === this.paginationRange) {
9888
+ return this.totalPages;
9902
9889
  }
9903
- return event;
9904
- };
9905
- SimpleGridCellComponent.prototype._getElement = function () {
9906
- var templ;
9907
- if (this._editTemplate) {
9908
- templ = this._editTemplate;
9890
+ else if (i === 1) {
9891
+ return i;
9909
9892
  }
9910
- else if (this._template) {
9911
- templ = this._template;
9893
+ else if (this.paginationRange < this.totalPages) {
9894
+ if (this.totalPages - halfWay < this.currentPage) {
9895
+ return this.totalPages - this.paginationRange + i;
9896
+ }
9897
+ else if (halfWay < this.currentPage) {
9898
+ return this.currentPage - halfWay + i;
9899
+ }
9900
+ else {
9901
+ return i;
9902
+ }
9912
9903
  }
9913
9904
  else {
9914
- templ = this._inputTemplate;
9915
- }
9916
- if (templ) {
9917
- if (templ && templ.elementRef) {
9918
- var inputElement = this._getFirstFormInput(templ.elementRef.nativeElement.parentElement);
9919
- if (inputElement) {
9920
- return inputElement;
9921
- }
9922
- }
9905
+ return i;
9923
9906
  }
9924
9907
  };
9925
- SimpleGridCellComponent.prototype._detectChanges = function () {
9926
- this._changeDetector.detectChanges();
9927
- };
9928
- return SimpleGridCellComponent;
9908
+ return PaginationBarComponent;
9929
9909
  }());
9930
- SimpleGridCellComponent.decorators = [
9910
+ PaginationBarComponent.decorators = [
9931
9911
  { type: core.Component, args: [{
9932
- selector: "co-simple-grid-cell",
9933
- template: "\n <div class=\"simple-grid-column-cell-value\" [ngClass]=\"column.textAlign ? column.textAlign : defaultTextAlign\">\n <ng-container *ngIf=\"editMode; else noInlineEdit\">\n <ng-container #editTemplate *ngIf=\"column.editTemplate; else noEditTemplate\"\n [ngTemplateOutlet]=\"column.editTemplate\"\n [ngTemplateOutletContext]=\"{value: row[column.field], row: row}\"></ng-container>\n <ng-template #noEditTemplate>\n <ng-container *ngIf=\"column.template; else noTemplate\">\n <ng-container [ngTemplateOutlet]=\"column.template\"\n [ngTemplateOutletContext]=\"{value: row[column.field], row: row}\"></ng-container>\n </ng-container>\n <ng-template #noTemplate>\n <co-input-text [(model)]=\"row[column.field]\" [required]=\"column.required\"></co-input-text>\n </ng-template>\n </ng-template>\n </ng-container>\n <ng-template #noInlineEdit>\n <ng-container *ngIf=\"column.template; else noTemplate\">\n <ng-container [ngTemplateOutlet]=\"column.template\"\n [ngTemplateOutletContext]=\"{value: row[column.field], row: row}\"></ng-container>\n </ng-container>\n <ng-template #noTemplate>\n <span [textContent]=\"column.getFieldValue(row[column.field])\"></span>\n </ng-template>\n </ng-template>\n </div>\n ",
9912
+ selector: "co-pagination-bar",
9913
+ template: "\n <ul class=\"pagination\">\n <li *ngIf=\"directionLinks\" class=\"pagination-previous\">\n <a (click)=\"onPreviousClick()\" [class.disabled]=\"isOnFirstPage()\">{{ previousLabel }}</a>\n </li>\n <li *ngFor=\"let page of pages\" [class.current]=\"currentPage === page.value\" (click)=\"onPageClick(page.value)\">\n <span>{{page.label}}</span>\n </li>\n <li *ngIf=\"directionLinks\" class=\"pagination-next\">\n <a (click)=\"onNextClick()\" [class.disabled]=\"isOnLastPage()\">{{ nextLabel }}</a>\n </li>\n </ul>\n ",
9934
9914
  encapsulation: core.ViewEncapsulation.None
9935
9915
  },] }
9936
9916
  ];
9937
- SimpleGridCellComponent.ctorParameters = function () { return [
9938
- { type: core.ChangeDetectorRef }
9939
- ]; };
9940
- SimpleGridCellComponent.propDecorators = {
9941
- editTemplateContent: [{ type: core.ViewChild, args: ["editTemplate", { read: BaseInputComponent },] }],
9942
- noEditTemplateContent: [{ type: core.ViewChild, args: ["noEditTemplate",] }],
9943
- noTemplateContent: [{ type: core.ViewChild, args: ["noTemplate",] }],
9944
- column: [{ type: core.Input }],
9945
- row: [{ type: core.Input }],
9946
- editMode: [{ type: core.Input }],
9947
- fieldEditMode: [{ type: core.Input }],
9948
- cellClick: [{ type: core.Output }],
9949
- showClass: [{ type: core.HostBinding, args: ["class.co-simple-grid-cell",] }],
9950
- handleClick: [{ type: core.HostListener, args: ['click', ['$event'],] }]
9917
+ PaginationBarComponent.propDecorators = {
9918
+ directionLinks: [{ type: core.Input }],
9919
+ previousLabel: [{ type: core.Input }],
9920
+ nextLabel: [{ type: core.Input }],
9921
+ currentPage: [{ type: core.Input }],
9922
+ itemsPerPage: [{ type: core.Input }],
9923
+ totalItems: [{ type: core.Input }],
9924
+ paginationRange: [{ type: core.Input }],
9925
+ previousClick: [{ type: core.Output }],
9926
+ nextClick: [{ type: core.Output }],
9927
+ pageClick: [{ type: core.Output }],
9928
+ showClass: [{ type: core.HostBinding, args: ["class.co-pagination-bar",] }]
9951
9929
  };
9952
9930
 
9953
- var ObserveVisibilityDirective = /** @class */ (function () {
9954
- function ObserveVisibilityDirective(_element) {
9955
- this._element = _element;
9956
- this.debounceTime = 0;
9957
- this.threshold = 0;
9958
- this.visible = new core.EventEmitter();
9959
- this._subject = new rxjs.Subject();
9931
+ var PaginationBarModule = /** @class */ (function () {
9932
+ function PaginationBarModule() {
9960
9933
  }
9961
- ObserveVisibilityDirective.prototype.ngOnInit = function () {
9962
- this._createObserver();
9934
+ return PaginationBarModule;
9935
+ }());
9936
+ PaginationBarModule.decorators = [
9937
+ { type: core.NgModule, args: [{
9938
+ imports: [
9939
+ common.CommonModule
9940
+ ],
9941
+ declarations: [
9942
+ PaginationBarComponent
9943
+ ],
9944
+ exports: [
9945
+ PaginationBarComponent
9946
+ ]
9947
+ },] }
9948
+ ];
9949
+
9950
+ var PaginationService = /** @class */ (function () {
9951
+ function PaginationService() {
9952
+ this.change = new rxjs.Subject();
9953
+ this.instances = {};
9954
+ }
9955
+ Object.defineProperty(PaginationService.prototype, "DEFAULT_ID", {
9956
+ get: function () {
9957
+ return PaginationService.DEFAULT_ID;
9958
+ },
9959
+ enumerable: false,
9960
+ configurable: true
9961
+ });
9962
+ PaginationService.prototype.register = function (instance) {
9963
+ if (!instance.id) {
9964
+ instance.id = PaginationService.DEFAULT_ID;
9965
+ }
9966
+ if (!this.instances[instance.id]) {
9967
+ this.instances[instance.id] = instance;
9968
+ this.change.next(instance.id);
9969
+ }
9970
+ else {
9971
+ var changed = this.updateInstance(instance);
9972
+ if (changed) {
9973
+ this.change.next(instance.id);
9974
+ }
9975
+ }
9963
9976
  };
9964
- ObserveVisibilityDirective.prototype.ngAfterViewInit = function () {
9965
- this._startObservingElements();
9977
+ // Returns the current page number.
9978
+ PaginationService.prototype.getCurrentPage = function (id) {
9979
+ if (this.instances[id]) {
9980
+ return this.instances[id].currentPage;
9981
+ }
9966
9982
  };
9967
- ObserveVisibilityDirective.prototype.ngOnDestroy = function () {
9968
- if (this._observer) {
9969
- this._observer.disconnect();
9970
- this._observer = undefined;
9983
+ // Sets the current page number.
9984
+ PaginationService.prototype.setCurrentPage = function (id, page) {
9985
+ if (this.instances[id]) {
9986
+ var instance = this.instances[id];
9987
+ var maxPage = Math.ceil(instance.totalItems / instance.itemsPerPage);
9988
+ if (page <= maxPage && 1 <= page) {
9989
+ this.instances[id].currentPage = page;
9990
+ this.change.next(id);
9991
+ }
9971
9992
  }
9972
- this._subject.next();
9973
- this._subject.complete();
9974
9993
  };
9975
- ObserveVisibilityDirective.prototype._isVisible = function (element) {
9976
- var _this = this;
9977
- return new Promise(function (resolve) {
9978
- var observer = new IntersectionObserver(function (_a) {
9979
- var _b = __read(_a, 1), entry = _b[0];
9980
- resolve(entry.isIntersecting && entry.intersectionRatio >= _this.threshold);
9981
- observer.disconnect();
9982
- });
9983
- observer.observe(element);
9984
- });
9994
+ // Sets the value of instance.totalItems
9995
+ PaginationService.prototype.setTotalItems = function (id, totalItems) {
9996
+ if (this.instances[id] && 0 <= totalItems) {
9997
+ this.instances[id].totalItems = totalItems;
9998
+ this.change.next(id);
9999
+ }
9985
10000
  };
9986
- ObserveVisibilityDirective.prototype._createObserver = function () {
9987
- var _this = this;
9988
- var options = {
9989
- rootMargin: '0px',
9990
- threshold: this.threshold,
9991
- };
9992
- var isIntersecting = function (entry) { return entry.isIntersecting || entry.intersectionRatio > 0; };
9993
- this._observer = new IntersectionObserver(function (entries, observer) {
9994
- entries.forEach(function (entry) {
9995
- if (isIntersecting(entry)) {
9996
- _this._subject.next({ entry: entry, observer: observer });
9997
- }
9998
- });
9999
- }, options);
10001
+ // Sets the value of instance.itemsPerPage.
10002
+ PaginationService.prototype.setItemsPerPage = function (id, itemsPerPage) {
10003
+ if (this.instances[id]) {
10004
+ this.instances[id].itemsPerPage = itemsPerPage;
10005
+ this.change.next(id);
10006
+ }
10000
10007
  };
10001
- ObserveVisibilityDirective.prototype._startObservingElements = function () {
10002
- var _this = this;
10003
- if (!this._observer) {
10004
- return;
10008
+ /**
10009
+ * Returns a clone of the pagination instance object matching the id. If no
10010
+ * id specified, returns the instance corresponding to the default id.
10011
+ */
10012
+ PaginationService.prototype.getInstance = function (id) {
10013
+ if (id === void 0) { id = PaginationService.DEFAULT_ID; }
10014
+ if (this.instances[id]) {
10015
+ return ObjectUtils.GetShallowClone(this.instances[id]);
10005
10016
  }
10006
- this._observer.observe(this._element.nativeElement);
10007
- this._subject
10008
- .pipe(operators.delay(this.debounceTime), operators.filter(Boolean))
10009
- .subscribe(function (_a) {
10010
- var entry = _a.entry, observer = _a.observer;
10011
- return __awaiter(_this, void 0, void 0, function () {
10012
- var target, isStillVisible;
10013
- return __generator(this, function (_a) {
10014
- switch (_a.label) {
10015
- case 0:
10016
- target = entry.target;
10017
- return [4 /*yield*/, this._isVisible(target)];
10018
- case 1:
10019
- isStillVisible = _a.sent();
10020
- if (isStillVisible) {
10021
- this.visible.emit(target);
10022
- observer.unobserve(target);
10023
- }
10024
- return [2 /*return*/];
10025
- }
10026
- });
10027
- });
10028
- });
10017
+ return {};
10029
10018
  };
10030
- return ObserveVisibilityDirective;
10019
+ /**
10020
+ * Check each property of the instance and update any that have changed. Return
10021
+ * true if any changes were made, else return false.
10022
+ */
10023
+ PaginationService.prototype.updateInstance = function (instance) {
10024
+ var changed = false;
10025
+ for (var prop in this.instances[instance.id]) {
10026
+ if (instance[prop] !== this.instances[instance.id][prop]) {
10027
+ this.instances[instance.id][prop] = instance[prop];
10028
+ changed = true;
10029
+ }
10030
+ }
10031
+ return changed;
10032
+ };
10033
+ return PaginationService;
10031
10034
  }());
10032
- ObserveVisibilityDirective.decorators = [
10033
- { type: core.Directive, args: [{
10034
- selector: '[observeVisibility]',
10035
- },] }
10035
+ PaginationService.DEFAULT_ID = "DEFAULT_PAGINATION_ID";
10036
+ PaginationService.decorators = [
10037
+ { type: core.Injectable }
10036
10038
  ];
10037
- ObserveVisibilityDirective.ctorParameters = function () { return [
10038
- { type: core.ElementRef }
10039
- ]; };
10040
- ObserveVisibilityDirective.propDecorators = {
10041
- debounceTime: [{ type: core.Input }],
10042
- threshold: [{ type: core.Input }],
10043
- visible: [{ type: core.Output }]
10044
- };
10045
-
10046
- var ObserveVisibilityModule = /** @class */ (function () {
10047
- function ObserveVisibilityModule() {
10048
- }
10049
- return ObserveVisibilityModule;
10050
- }());
10051
- ObserveVisibilityModule.decorators = [
10052
- { type: core.NgModule, args: [{
10053
- declarations: [
10054
- ObserveVisibilityDirective
10055
- ],
10056
- exports: [
10057
- ObserveVisibilityDirective
10058
- ]
10059
- },] }
10060
- ];
10061
-
10062
- var SimpleGridModule = /** @class */ (function () {
10063
- function SimpleGridModule() {
10064
- }
10065
- return SimpleGridModule;
10066
- }());
10067
- SimpleGridModule.decorators = [
10068
- { type: core.NgModule, args: [{
10069
- imports: [
10070
- common.CommonModule,
10071
- dragDrop.DragDropModule,
10072
- GridToolbarModule,
10073
- InputTextModule,
10074
- FormModule,
10075
- ObserveVisibilityModule
10076
- ],
10077
- declarations: [
10078
- SimpleGridComponent,
10079
- SimpleGridCellComponent,
10080
- SimpleGridColumnDirective
10081
- ],
10082
- exports: [
10083
- SimpleGridComponent,
10084
- SimpleGridCellComponent,
10085
- SimpleGridColumnDirective
10086
- ]
10087
- },] }
10088
- ];
10039
+ PaginationService.ctorParameters = function () { return []; };
10089
10040
 
10090
- var FilterItemComponent = /** @class */ (function () {
10091
- function FilterItemComponent(iconService) {
10092
- this.iconService = iconService;
10093
- this.icons = exports.CoreComponentsIcon;
10094
- this.initialLimit = 10;
10095
- this.expanded = false;
10096
- // Set to false to use filter item with a multi selectable collection. Set to true to specify custom content
10097
- this.customContent = false;
10098
- // Set to true to show all results. Set to false to get 'show more' and 'show less' buttons to expand and contract.
10099
- this.showAllResults = false;
10100
- this.singleSelect = false;
10101
- this.searchPlaceholder = 'Search...';
10102
- this.showMoreLabel = 'Show more';
10103
- this.showLessLabel = 'Show less';
10104
- this.noResultsLabel = "No results";
10105
- this.collectionChange = new core.EventEmitter();
10106
- this.filteredCollection = [];
10107
- this.limitTo = 10;
10108
- this.filterText = "";
10109
- this._collection = [];
10041
+ var LARGE_NUMBER = 999999999;
10042
+ var PaginatePipe = /** @class */ (function () {
10043
+ function PaginatePipe(paginateService) {
10044
+ this.paginateService = paginateService;
10045
+ // store the values from the last time the pipe
10046
+ this.state = {};
10110
10047
  }
10111
- Object.defineProperty(FilterItemComponent.prototype, "collection", {
10112
- get: function () {
10113
- return this._collection;
10114
- },
10115
- set: function (value) {
10116
- var _a;
10117
- this._collection = value;
10118
- this.filteredCollection = (_a = this._collection) === null || _a === void 0 ? void 0 : _a.slice();
10119
- },
10120
- enumerable: false,
10121
- configurable: true
10122
- });
10123
- FilterItemComponent.prototype.showClass = function () {
10124
- return true;
10048
+ PaginatePipe.prototype.transform = function (collection, args) {
10049
+ // When an observable is passed through the AsyncPipe, it will output
10050
+ // `null` until the subscription resolves. In this case, we want to
10051
+ // use the cached data from the `state` object to prevent the NgFor
10052
+ // from flashing empty until the real values arrive.
10053
+ if (!(collection instanceof Array)) {
10054
+ var _id = args.id || this.paginateService.DEFAULT_ID;
10055
+ if (this.state[_id]) {
10056
+ return this.state[_id].slice;
10057
+ }
10058
+ else {
10059
+ return collection;
10060
+ }
10061
+ }
10062
+ var serverSideMode = args.totalItems !== undefined;
10063
+ var instance = this._createInstance(collection, args);
10064
+ var id = instance.id;
10065
+ var start;
10066
+ var end;
10067
+ var perPage = instance.itemsPerPage;
10068
+ this.paginateService.register(instance);
10069
+ if (!serverSideMode && collection instanceof Array) {
10070
+ perPage = perPage || LARGE_NUMBER;
10071
+ start = (instance.currentPage - 1) * perPage;
10072
+ end = start + perPage;
10073
+ var isIdentical = this._stateIsIdentical(id, collection, start, end);
10074
+ if (isIdentical) {
10075
+ return this.state[id].slice;
10076
+ }
10077
+ else {
10078
+ var slice = collection.slice(start, end);
10079
+ this._saveState(id, collection, slice, start, end);
10080
+ this.paginateService.change.next(id);
10081
+ return slice;
10082
+ }
10083
+ }
10084
+ // save the state for server-side collection to avoid null
10085
+ // flash as new data loads.
10086
+ this._saveState(id, collection, collection, start, end);
10087
+ return collection;
10125
10088
  };
10126
- FilterItemComponent.prototype.ngOnInit = function () {
10127
- this.setToInitialLimit();
10089
+ // Create an IPaginationInstance object, using defaults for any optional properties not supplied.
10090
+ PaginatePipe.prototype._createInstance = function (collection, args) {
10091
+ var config = args;
10092
+ this._checkConfig(config);
10093
+ return {
10094
+ id: config.id || this.paginateService.DEFAULT_ID,
10095
+ itemsPerPage: config.itemsPerPage || 0,
10096
+ currentPage: config.currentPage || 1,
10097
+ totalItems: config.totalItems || collection.length
10098
+ };
10128
10099
  };
10129
- FilterItemComponent.prototype.setToInitialLimit = function () {
10130
- this.limitTo = this.initialLimit;
10100
+ // Ensure the argument passed to the filter contains the required properties.
10101
+ PaginatePipe.prototype._checkConfig = function (config) {
10102
+ var required = ["itemsPerPage", "currentPage"];
10103
+ var missing = required.filter(function (prop) { return !config.hasOwnProperty(prop); });
10104
+ if (0 < missing.length) {
10105
+ throw new Error("PaginatePipe: Argument is missing the following required properties: " + missing.join(", "));
10106
+ }
10131
10107
  };
10132
- FilterItemComponent.prototype.increaseLimit = function () {
10133
- this.limitTo += 10;
10108
+ /**
10109
+ * To avoid returning a brand new array each time the pipe is run, we store the state of the sliced
10110
+ * array for a given id. This means that the next time the pipe is run on this collection & id, we just
10111
+ * need to check that the collection, start and end points are all identical, and if so, return the
10112
+ * last sliced array.
10113
+ */
10114
+ PaginatePipe.prototype._saveState = function (id, collection, slice, start, end) {
10115
+ this.state[id] = {
10116
+ collection: collection,
10117
+ size: collection.length,
10118
+ slice: slice,
10119
+ start: start,
10120
+ end: end
10121
+ };
10134
10122
  };
10135
- FilterItemComponent.prototype.moreToShow = function () {
10136
- var _a;
10137
- if (this.showAllResults) {
10123
+ // For a given id, returns true if the collection, size, start and end values are identical.
10124
+ PaginatePipe.prototype._stateIsIdentical = function (id, collection, start, end) {
10125
+ var state = this.state[id];
10126
+ if (!state) {
10138
10127
  return false;
10139
10128
  }
10140
- return ((_a = this.filteredCollection) === null || _a === void 0 ? void 0 : _a.length) > this.limitTo;
10141
- };
10142
- FilterItemComponent.prototype.lessToShow = function () {
10143
- var _a, _b;
10144
- if (this.showAllResults) {
10129
+ return state.collection === collection &&
10130
+ state.size === collection.length &&
10131
+ state.start === start &&
10132
+ state.end === end;
10133
+ };
10134
+ return PaginatePipe;
10135
+ }());
10136
+ PaginatePipe.decorators = [
10137
+ { type: core.Pipe, args: [{
10138
+ name: 'paginate',
10139
+ pure: false
10140
+ },] }
10141
+ ];
10142
+ PaginatePipe.ctorParameters = function () { return [
10143
+ { type: PaginationService }
10144
+ ]; };
10145
+
10146
+ var PaginationComponent = /** @class */ (function () {
10147
+ function PaginationComponent(_paginationService) {
10148
+ var _this = this;
10149
+ this._paginationService = _paginationService;
10150
+ this.maxSize = 7;
10151
+ this.directionLinks = true;
10152
+ this.previousLabel = 'Vorige pagina';
10153
+ this.nextLabel = 'Volgende pagina';
10154
+ this.autoHide = false;
10155
+ // Emits the new page number.
10156
+ this.pageChange = new core.EventEmitter();
10157
+ this.showClass = true;
10158
+ this.totalItems = 1;
10159
+ this.itemsPerPage = 20;
10160
+ this.changeSub = this._paginationService.change.subscribe(function (id) {
10161
+ if (_this.id === id) {
10162
+ _this._updatePageLinks();
10163
+ }
10164
+ });
10165
+ }
10166
+ PaginationComponent.prototype.ngOnInit = function () {
10167
+ if (!this.id) {
10168
+ this.id = this._paginationService.DEFAULT_ID;
10169
+ }
10170
+ this._updatePageLinks();
10171
+ };
10172
+ PaginationComponent.prototype.ngOnChanges = function () {
10173
+ this._updatePageLinks();
10174
+ };
10175
+ PaginationComponent.prototype.ngOnDestroy = function () {
10176
+ this.changeSub.unsubscribe();
10177
+ };
10178
+ PaginationComponent.prototype.goToFirstPage = function () {
10179
+ if (!this.isOnFirstPage()) {
10180
+ this.setCurrentPage(1);
10181
+ }
10182
+ };
10183
+ PaginationComponent.prototype.goToPreviousPage = function () {
10184
+ if (!this.isOnFirstPage()) {
10185
+ this.setCurrentPage(this.getCurrentPage() - 1);
10186
+ }
10187
+ };
10188
+ PaginationComponent.prototype.goToNextPage = function () {
10189
+ if (!this.isOnLastPage()) {
10190
+ this.setCurrentPage(this.getCurrentPage() + 1);
10191
+ }
10192
+ };
10193
+ PaginationComponent.prototype.setCurrentPage = function (page) {
10194
+ this.pageChange.emit(page);
10195
+ };
10196
+ PaginationComponent.prototype.isOnFirstPage = function () {
10197
+ return this.getCurrentPage() === 1;
10198
+ };
10199
+ PaginationComponent.prototype.isOnLastPage = function () {
10200
+ return this.getLastPage() === this.getCurrentPage();
10201
+ };
10202
+ PaginationComponent.prototype.shouldBeHidden = function () {
10203
+ if (!this.autoHide) {
10145
10204
  return false;
10146
10205
  }
10147
- return ((_a = this.filteredCollection) === null || _a === void 0 ? void 0 : _a.length) <= this.limitTo && ((_b = this.filteredCollection) === null || _b === void 0 ? void 0 : _b.length) > this.initialLimit;
10206
+ else {
10207
+ var instance = this._paginationService.getInstance();
10208
+ return (instance.totalItems <= instance.itemsPerPage);
10209
+ }
10148
10210
  };
10149
- FilterItemComponent.prototype.handleModelChange = function (model) {
10150
- if (this.singleSelect) {
10151
- this.collection.forEach(function (m) {
10152
- if (m.code !== model.code && m.description !== model.description) {
10153
- m.checked = false;
10154
- }
10155
- });
10211
+ /**
10212
+ * Updates the page links and checks that the current page is valid. Should run whenever the
10213
+ * PaginationService.change stream emits a value matching the current ID, or when any of the
10214
+ * input values changes.
10215
+ */
10216
+ PaginationComponent.prototype._updatePageLinks = function () {
10217
+ var paginationInstance = this._paginationService.getInstance(this.id);
10218
+ var correctedCurrentPage = this.outOfBoundCorrection(paginationInstance);
10219
+ if (correctedCurrentPage !== paginationInstance.currentPage) {
10220
+ this.setCurrentPage(correctedCurrentPage);
10156
10221
  }
10157
- model.checked = !model.checked;
10158
- this.collectionChange.emit(this.collection);
10222
+ this.totalItems = paginationInstance.totalItems;
10223
+ this.itemsPerPage = paginationInstance.itemsPerPage;
10159
10224
  };
10160
- // Applies filter to the collection.
10161
- FilterItemComponent.prototype.applyFilter = function (text) {
10162
- var _a, _b;
10163
- return __awaiter(this, void 0, void 0, function () {
10164
- var _c, filterText, filteredItemCount;
10165
- return __generator(this, function (_d) {
10166
- switch (_d.label) {
10167
- case 0:
10168
- if (!(!isNaN(this.minSearchCharsToLoadCollection) && this.collectionLoadFn)) return [3 /*break*/, 3];
10169
- if (!(text.length === this.minSearchCharsToLoadCollection && text.length > this.filterText.length)) return [3 /*break*/, 2];
10170
- _c = this;
10171
- return [4 /*yield*/, this.collectionLoadFn(text)];
10172
- case 1:
10173
- _c.collection = _d.sent();
10174
- return [3 /*break*/, 3];
10175
- case 2:
10176
- if (text.length < this.minSearchCharsToLoadCollection) {
10177
- this.collection = undefined;
10178
- }
10179
- _d.label = 3;
10180
- case 3:
10181
- this.filterText = text;
10182
- if (!this.collection) {
10183
- return [2 /*return*/, []];
10184
- }
10185
- filterText = (_a = this.filterText) === null || _a === void 0 ? void 0 : _a.toString().toLowerCase();
10186
- filteredItemCount = 0;
10187
- this.filteredCollection = (_b = this.collection) === null || _b === void 0 ? void 0 : _b.filter(function (item) {
10188
- var _a;
10189
- var labelText = (_a = item.description) === null || _a === void 0 ? void 0 : _a.toString().toLowerCase();
10190
- var isHiddenByFilter = ((labelText === null || labelText === void 0 ? void 0 : labelText.indexOf(filterText)) === -1);
10191
- if (isHiddenByFilter) {
10192
- return false;
10193
- }
10194
- else {
10195
- filteredItemCount++;
10196
- return true;
10197
- }
10198
- });
10199
- return [2 /*return*/];
10200
- }
10201
- });
10202
- });
10225
+ PaginationComponent.prototype.getCurrentPage = function () {
10226
+ return this._paginationService.getCurrentPage(this.id);
10203
10227
  };
10204
- return FilterItemComponent;
10228
+ PaginationComponent.prototype.getLastPage = function () {
10229
+ var instance = this._paginationService.getInstance(this.id);
10230
+ return Math.ceil(instance.totalItems / instance.itemsPerPage);
10231
+ };
10232
+ /**
10233
+ * Checks that the instance.currentPage property is within bounds for the current page range.
10234
+ * If not, return a correct value for currentPage, or the current value if OK.
10235
+ */
10236
+ PaginationComponent.prototype.outOfBoundCorrection = function (instance) {
10237
+ var totalPages = Math.ceil(instance.totalItems / instance.itemsPerPage);
10238
+ if (totalPages < instance.currentPage && 0 < totalPages) {
10239
+ return totalPages;
10240
+ }
10241
+ else if (instance.currentPage < 1) {
10242
+ return 1;
10243
+ }
10244
+ return instance.currentPage;
10245
+ };
10246
+ return PaginationComponent;
10205
10247
  }());
10206
- FilterItemComponent.decorators = [
10248
+ PaginationComponent.decorators = [
10207
10249
  { type: core.Component, args: [{
10208
- selector: "co-filter-item",
10209
- template: "\n <div class=\"co-filter-item-header\">\n <co-collapsible\n [headerTitle]=\"placeholder\"\n [expandButtonLast]=\"true\"\n [iconData]=\"iconService.getIcon(icons.ArrowPointDown)\"\n [expanded]=\"expanded\"\n >\n <div class=\"co-filter-item-collapsable-content\">\n <div class=\"co-filter-item-custom-content\" *ngIf=\"customContent; else collectionContent\">\n <ng-content></ng-content>\n </div>\n <ng-template #collectionContent>\n <div class=\"co-filter-item-collection-content\">\n <co-input-text\n *ngIf=\"collection?.length > 10 || minSearchCharsToLoadCollection\"\n [placeholder]=\"searchPlaceholder\"\n [model]=\"filterText\"\n (modelChange)=\"applyFilter($event)\"\n >\n </co-input-text>\n <div class=\"no-results\" *ngIf=\"filteredCollection?.length === 0\">\n <span [textContent]=\"noResultsLabel\"></span>\n </div>\n <div class=\"co-filter-item-collection-results\">\n <ng-container\n *ngFor=\"let option of filteredCollection; let index = index\">\n <div class=\"co-filter-item-collection-result-item\" *ngIf=\"index < limitTo || showAllResults\">\n <co-input-checkbox *ngIf=\"!singleSelect\"\n [label]=\"option.description\"\n [model]=\"option.checked\"\n (modelChange)=\"handleModelChange(option)\"\n ></co-input-checkbox>\n <co-input-radio-button *ngIf=\"singleSelect\"\n [name]=\"'radiogroup'\"\n [label]=\"option.description\"\n [model]=\"option.checked\"\n (modelChange)=\"handleModelChange(option)\"\n ></co-input-radio-button>\n <div class=\"co-filter-item-amount\" *ngIf=\"option.count\"\n [textContent]=\"option.count.toString() | append: ')' | prepend: ' ('\"\n ></div>\n </div>\n\n </ng-container>\n </div>\n <div class=\"co-filter-show-more-or-less\" *ngIf=\"!showAllResults\">\n <div class=\"co-filter-show-more clickable\"\n *ngIf=\"moreToShow()\">\n <a (click)=\"increaseLimit()\">\n <co-icon [iconData]=\"iconService.getIcon(icons.ArrowPointDown)\"></co-icon>\n <span [textContent]=\"showMoreLabel\"></span>\n </a>\n </div>\n <div class=\"co-filter-show-less clickable\"\n *ngIf=\"lessToShow()\">\n <a (click)=\"setToInitialLimit()\">\n <co-icon [iconData]=\"iconService.getIcon(icons.ArrowPointUp)\"></co-icon>\n <span [textContent]=\"showLessLabel\"></span>\n </a>\n </div>\n </div>\n </div>\n </ng-template>\n </div>\n </co-collapsible>\n </div>\n\n ",
10250
+ selector: 'co-pagination',
10251
+ template: "\n <div class=\"pagination-component-main-wrapper\" *ngIf=\"!shouldBeHidden()\">\n <div>\n <ng-content></ng-content>\n </div>\n\n <co-pagination-bar\n [currentPage]=\"getCurrentPage()\"\n [totalItems]=\"totalItems\"\n [itemsPerPage]=\"itemsPerPage\"\n [directionLinks]=\"directionLinks\"\n [previousLabel]=\"previousLabel\"\n [nextLabel]=\"nextLabel\"\n (previousClick)=\"goToPreviousPage()\"\n (nextClick)=\"goToNextPage()\"\n (pageClick)=\"setCurrentPage($event)\"\n ></co-pagination-bar>\n </div>\n ",
10210
10252
  encapsulation: core.ViewEncapsulation.None
10211
10253
  },] }
10212
10254
  ];
10213
- FilterItemComponent.ctorParameters = function () { return [
10214
- { type: IconCacheService }
10255
+ PaginationComponent.ctorParameters = function () { return [
10256
+ { type: PaginationService }
10215
10257
  ]; };
10216
- FilterItemComponent.propDecorators = {
10217
- collection: [{ type: core.Input }],
10218
- placeholder: [{ type: core.Input }],
10219
- initialLimit: [{ type: core.Input }],
10220
- expanded: [{ type: core.Input }],
10221
- minSearchCharsToLoadCollection: [{ type: core.Input }],
10222
- collectionLoadFn: [{ type: core.Input }],
10223
- customContent: [{ type: core.Input }],
10224
- showAllResults: [{ type: core.Input }],
10225
- singleSelect: [{ type: core.Input }],
10226
- searchPlaceholder: [{ type: core.Input }],
10227
- showMoreLabel: [{ type: core.Input }],
10228
- showLessLabel: [{ type: core.Input }],
10229
- noResultsLabel: [{ type: core.Input }],
10230
- collectionChange: [{ type: core.Output }],
10231
- showClass: [{ type: core.HostBinding, args: ["class.co-filter-item",] }]
10258
+ PaginationComponent.propDecorators = {
10259
+ template: [{ type: core.ViewChild, args: ['template',] }],
10260
+ id: [{ type: core.Input }],
10261
+ maxSize: [{ type: core.Input }],
10262
+ directionLinks: [{ type: core.Input }],
10263
+ previousLabel: [{ type: core.Input }],
10264
+ nextLabel: [{ type: core.Input }],
10265
+ autoHide: [{ type: core.Input }],
10266
+ pageChange: [{ type: core.Output }],
10267
+ showClass: [{ type: core.HostBinding, args: ['class.co-pagination',] }]
10232
10268
  };
10233
10269
 
10234
- // A pipe for prepending strings to other strings in view templates.
10235
- var PrependPipe = /** @class */ (function () {
10236
- function PrependPipe() {
10237
- }
10238
- PrependPipe.prototype.transform = function (value, prepend) {
10239
- if (!value) {
10240
- return "";
10241
- }
10242
- if (!prepend) {
10243
- return value;
10244
- }
10245
- return prepend + value;
10246
- };
10247
- return PrependPipe;
10248
- }());
10249
- PrependPipe.decorators = [
10250
- { type: core.Pipe, args: [{ name: "prepend" },] }
10251
- ];
10252
-
10253
- var PrependPipeModule = /** @class */ (function () {
10254
- function PrependPipeModule() {
10270
+ var PaginationModule = /** @class */ (function () {
10271
+ function PaginationModule() {
10255
10272
  }
10256
- return PrependPipeModule;
10273
+ return PaginationModule;
10257
10274
  }());
10258
- PrependPipeModule.decorators = [
10275
+ PaginationModule.decorators = [
10259
10276
  { type: core.NgModule, args: [{
10277
+ imports: [
10278
+ common.CommonModule,
10279
+ PaginationBarModule
10280
+ ],
10281
+ providers: [
10282
+ PaginationService
10283
+ ],
10260
10284
  declarations: [
10261
- PrependPipe
10285
+ PaginationComponent,
10286
+ PaginatePipe
10262
10287
  ],
10263
10288
  exports: [
10264
- PrependPipe
10289
+ PaginationComponent,
10290
+ PaginatePipe
10265
10291
  ]
10266
10292
  },] }
10267
10293
  ];
10268
10294
 
10269
- var FilterItemModule = /** @class */ (function () {
10270
- function FilterItemModule() {
10295
+ var SimpleGridCellComponent = /** @class */ (function () {
10296
+ function SimpleGridCellComponent(_changeDetector) {
10297
+ this._changeDetector = _changeDetector;
10298
+ this.defaultTextAlign = exports.ColumnAlign.Left;
10299
+ this.editMode = false;
10300
+ this.cellClick = new core.EventEmitter();
10301
+ this._fieldEditMode = false;
10302
+ this._focused = false;
10271
10303
  }
10272
- return FilterItemModule;
10273
- }());
10274
- FilterItemModule.decorators = [
10275
- { type: core.NgModule, args: [{
10276
- imports: [
10277
- common.CommonModule,
10278
- CollapsibleModule,
10279
- InputTextModule,
10280
- InputCheckboxMultiSelectModule,
10281
- InputCheckboxModule,
10282
- IconModule,
10283
- scrolling.ScrollingModule,
10284
- AppendPipeModule,
10285
- PrependPipeModule,
10286
- InputTextModule,
10287
- InputRadioButtonModule
10288
- ],
10289
- declarations: [
10290
- FilterItemComponent
10291
- ],
10292
- exports: [
10293
- FilterItemComponent
10294
- ]
10295
- },] }
10296
- ];
10297
-
10298
- // Human-readable JS keyboard codes, as in KeyboardEvent.key string values.
10299
- var KeyboardKey;
10300
- (function (KeyboardKey) {
10301
- KeyboardKey["Down"] = "ArrowDown";
10302
- KeyboardKey["Up"] = "ArrowUp";
10303
- KeyboardKey["Left"] = "ArrowLeft";
10304
- KeyboardKey["Right"] = "ArrowRight";
10305
- KeyboardKey["Tab"] = "Tab";
10306
- KeyboardKey["Escape"] = "Escape";
10307
- KeyboardKey["Enter"] = "Enter";
10308
- KeyboardKey["Home"] = "Home";
10309
- KeyboardKey["End"] = "End";
10310
- KeyboardKey["Delete"] = "Delete";
10311
- KeyboardKey["Insert"] = "Insert";
10312
- KeyboardKey["ShiftLeft"] = "ShiftLeft";
10313
- KeyboardKey["ShiftRight"] = "ShiftRight";
10314
- KeyboardKey["Backspace"] = "Backspace";
10315
- KeyboardKey["SpaceBar"] = "Space";
10316
- KeyboardKey["Period"] = "Period";
10317
- KeyboardKey["DecimalPoint"] = "NumpadDecimal";
10318
- KeyboardKey["SemiColon"] = "Semicolon";
10319
- KeyboardKey["ControlRight"] = "ControlRight";
10320
- KeyboardKey["ControlLeft"] = "ControlLeft";
10321
- KeyboardKey["Comma"] = "Comma";
10322
- ////Minus,
10323
- ////MinusFireFox,
10324
- ////Substract,
10325
- KeyboardKey["Zero"] = "Digit0";
10326
- KeyboardKey["One"] = "Digit1";
10327
- KeyboardKey["Two"] = "Digit2";
10328
- KeyboardKey["Three"] = "Digit3";
10329
- KeyboardKey["Four"] = "Digit4";
10330
- KeyboardKey["Five"] = "Digit5";
10331
- KeyboardKey["Six"] = "Digit6";
10332
- KeyboardKey["Seven"] = "Digit7";
10333
- KeyboardKey["Eight"] = "Digit8";
10334
- KeyboardKey["Nine"] = "Digit9";
10335
- KeyboardKey["NumpadZero"] = "Numpad0";
10336
- KeyboardKey["NumpadOne"] = "Numpad1";
10337
- KeyboardKey["NumpadTwo"] = "Numpad2";
10338
- KeyboardKey["NumpadThree"] = "Numpad3";
10339
- KeyboardKey["NumpadFour"] = "Numpad4";
10340
- KeyboardKey["NumpadFive"] = "Numpad5";
10341
- KeyboardKey["NumpadSix"] = "Numpad6";
10342
- KeyboardKey["NumpadSeven"] = "Numpad7";
10343
- KeyboardKey["NumpadEight"] = "Numpad8";
10344
- KeyboardKey["NumpadNine"] = "Numpad9";
10345
- KeyboardKey["A"] = "KeyA";
10346
- KeyboardKey["B"] = "KeyB";
10347
- KeyboardKey["C"] = "KeyC";
10348
- KeyboardKey["D"] = "KeyD";
10349
- KeyboardKey["E"] = "KeyE";
10350
- KeyboardKey["F"] = "KeyF";
10351
- KeyboardKey["G"] = "KeyG";
10352
- KeyboardKey["H"] = "KeyH";
10353
- KeyboardKey["I"] = "KeyI";
10354
- KeyboardKey["J"] = "KeyJ";
10355
- KeyboardKey["K"] = "KeyK";
10356
- KeyboardKey["L"] = "KeyL";
10357
- KeyboardKey["M"] = "KeyM";
10358
- KeyboardKey["N"] = "KeyN";
10359
- KeyboardKey["O"] = "KeyO";
10360
- KeyboardKey["P"] = "KeyP";
10361
- KeyboardKey["Q"] = "KeyQ";
10362
- KeyboardKey["R"] = "KeyR";
10363
- KeyboardKey["S"] = "KeyS";
10364
- KeyboardKey["T"] = "KeyT";
10365
- KeyboardKey["U"] = "KeyU";
10366
- KeyboardKey["V"] = "KeyV";
10367
- KeyboardKey["W"] = "KeyW";
10368
- KeyboardKey["X"] = "KeyX";
10369
- KeyboardKey["Y"] = "KeyY";
10370
- KeyboardKey["Z"] = "KeyZ";
10371
- })(KeyboardKey || (KeyboardKey = {}));
10372
-
10373
- var ClickOutsideMasterService = /** @class */ (function () {
10374
- function ClickOutsideMasterService(_ngZone) {
10375
- var _this = this;
10376
- this._ngZone = _ngZone;
10377
- this._clickOutsideRefs = [];
10378
- this.onClick = function (event) {
10379
- _this._currentClick = event;
10380
- var first = _this._clickOutsideRefs[0];
10381
- var targets = _this._clickOutsideRefs.filter(function (co) { return co.alwaysTrigger; });
10382
- if (first) {
10383
- targets.push(first);
10384
- }
10385
- setTimeout(function () {
10386
- targets.forEach(function (clickOutside) { return _this.checkEmit(clickOutside, event); });
10387
- });
10388
- };
10389
- this.onKeyDown = function (event) {
10390
- if (event.key === KeyboardKey.Escape) {
10391
- var first = _this._clickOutsideRefs[0];
10392
- if (first) {
10393
- _this.checkEmit(first, event, true);
10394
- }
10304
+ Object.defineProperty(SimpleGridCellComponent.prototype, "editTemplateContent", {
10305
+ set: function (template) {
10306
+ if (template) {
10307
+ this._editTemplate = template;
10308
+ this._setFocusComponent();
10395
10309
  }
10396
- };
10397
- document.addEventListener('click', this.onClick, true);
10398
- window.addEventListener('keydown', this.onKeyDown, EventUtils.passiveBubble);
10399
- }
10400
- Object.defineProperty(ClickOutsideMasterService.prototype, "currentClick", {
10401
- get: function () {
10402
- return this._currentClick;
10403
10310
  },
10404
10311
  enumerable: false,
10405
10312
  configurable: true
10406
10313
  });
10407
- ClickOutsideMasterService.prototype.ngOnDestroy = function () {
10408
- document.removeEventListener('click', this.onClick, true);
10409
- window.removeEventListener('keydown', this.onKeyDown, EventUtils.passiveBubble);
10410
- };
10411
- ClickOutsideMasterService.prototype.checkEmit = function (clickOutside, event, force) {
10412
- if (clickOutside && (clickOutside.currentClick !== this.currentClick || force) && this._clickOutsideRefs.indexOf(clickOutside) !== -1) {
10413
- this._ngZone.run(function () { return clickOutside.clickOutside.emit(event); });
10414
- }
10415
- };
10416
- ClickOutsideMasterService.prototype.addClickOutside = function (clickOutside) {
10417
- this.removeClickOutside(clickOutside);
10418
- this._clickOutsideRefs.unshift(clickOutside);
10419
- };
10420
- ClickOutsideMasterService.prototype.removeClickOutside = function (clickOutside) {
10421
- ArrayUtils.RemoveElement(clickOutside, this._clickOutsideRefs);
10422
- };
10423
- return ClickOutsideMasterService;
10424
- }());
10425
- ClickOutsideMasterService.decorators = [
10426
- { type: core.Injectable }
10427
- ];
10428
- ClickOutsideMasterService.ctorParameters = function () { return [
10429
- { type: core.NgZone }
10430
- ]; };
10431
-
10432
- var ClickOutsideDirective = /** @class */ (function () {
10433
- function ClickOutsideDirective(elementRef, _ngZone, _master) {
10434
- var _this = this;
10435
- this.elementRef = elementRef;
10436
- this._ngZone = _ngZone;
10437
- this._master = _master;
10438
- this.clickOutside = new core.EventEmitter();
10439
- this._enabled = true;
10440
- this._initialized = false;
10441
- this.onClick = function (event) {
10442
- if (_this._enabled) {
10443
- _this._currentClick = event;
10314
+ Object.defineProperty(SimpleGridCellComponent.prototype, "noEditTemplateContent", {
10315
+ set: function (template) {
10316
+ if (template) {
10317
+ this._template = template;
10318
+ this._setFocusComponent();
10444
10319
  }
10445
- };
10446
- }
10447
- Object.defineProperty(ClickOutsideDirective.prototype, "currentClick", {
10448
- get: function () {
10449
- return this._currentClick;
10450
10320
  },
10451
10321
  enumerable: false,
10452
10322
  configurable: true
10453
10323
  });
10454
- Object.defineProperty(ClickOutsideDirective.prototype, "enabled", {
10455
- set: function (enabled) {
10456
- enabled = enabled === undefined || enabled;
10457
- // noinspection SuspiciousTypeOfGuard
10458
- if (typeof enabled === 'boolean' && this._enabled !== enabled) {
10459
- this._enabled = enabled;
10460
- if (this._initialized) {
10461
- this._enabled ? this._master.addClickOutside(this) : this._master.removeClickOutside(this);
10462
- }
10324
+ Object.defineProperty(SimpleGridCellComponent.prototype, "noTemplateContent", {
10325
+ set: function (template) {
10326
+ if (template) {
10327
+ this._inputTemplate = template;
10328
+ this._setFocusComponent();
10463
10329
  }
10464
10330
  },
10465
10331
  enumerable: false,
10466
10332
  configurable: true
10467
10333
  });
10468
- ClickOutsideDirective.prototype.ngAfterViewInit = function () {
10469
- var _this = this;
10470
- setTimeout(function () {
10471
- _this._ngZone.runOutsideAngular(function () {
10472
- if (_this.elementRef && _this.elementRef.nativeElement) {
10473
- _this.elementRef.nativeElement.addEventListener('click', _this.onClick, EventUtils.passiveCapture);
10474
- if (_this._enabled) {
10475
- _this._master.addClickOutside(_this);
10476
- }
10477
- _this._initialized = true;
10334
+ Object.defineProperty(SimpleGridCellComponent.prototype, "fieldEditMode", {
10335
+ get: function () {
10336
+ return this._fieldEditMode;
10337
+ },
10338
+ set: function (value) {
10339
+ this._fieldEditMode = value;
10340
+ this._setFocusComponent();
10341
+ },
10342
+ enumerable: false,
10343
+ configurable: true
10344
+ });
10345
+ SimpleGridCellComponent.prototype.showClass = function () {
10346
+ return true;
10347
+ };
10348
+ SimpleGridCellComponent.prototype.handleClick = function (event) {
10349
+ if (this.column && !this.column.readonly) {
10350
+ this.cellClick.next();
10351
+ }
10352
+ };
10353
+ SimpleGridCellComponent.prototype._setFocusComponent = function () {
10354
+ if (this.editMode && this.fieldEditMode) {
10355
+ var element = this._getElement();
10356
+ if (element) {
10357
+ var focusEvent = this._createNewEvent(element, 'focus');
10358
+ element.focus();
10359
+ element.dispatchEvent(focusEvent);
10360
+ this._focused = true;
10361
+ }
10362
+ }
10363
+ else {
10364
+ if (this._focused) {
10365
+ var element = this._getElement();
10366
+ if (element) {
10367
+ var blurEvent = this._createNewEvent(element, 'blur');
10368
+ element.blur();
10369
+ element.dispatchEvent(blurEvent);
10478
10370
  }
10479
- });
10480
- });
10371
+ this._focused = false;
10372
+ }
10373
+ }
10374
+ this._detectChanges();
10481
10375
  };
10482
- ClickOutsideDirective.prototype.ngOnDestroy = function () {
10483
- this._master.removeClickOutside(this);
10484
- this.elementRef.nativeElement.removeEventListener('click', this.onClick, EventUtils.passiveCapture);
10485
- this.elementRef = undefined;
10376
+ SimpleGridCellComponent.prototype._getFirstFormInput = function (parent) {
10377
+ if (parent) {
10378
+ var collection_1 = Array.from(parent.getElementsByTagName('input'));
10379
+ var otherCollection = Array.from(parent.getElementsByTagName('textarea'));
10380
+ otherCollection.map(function (o) { return collection_1.push(o); });
10381
+ if (collection_1.length > 0) {
10382
+ return collection_1[0];
10383
+ }
10384
+ }
10486
10385
  };
10487
- return ClickOutsideDirective;
10488
- }());
10489
- ClickOutsideDirective.decorators = [
10490
- { type: core.Directive, args: [{
10491
- selector: "[clickOutside]",
10492
- exportAs: 'clickOutside'
10386
+ SimpleGridCellComponent.prototype._createNewEvent = function (element, eventType) {
10387
+ var event;
10388
+ if ("createEvent" in document) {
10389
+ event = document.createEvent("Event");
10390
+ event.initEvent(eventType, true, true);
10391
+ }
10392
+ else if ("Event" in window) {
10393
+ event = new Event(eventType, { bubbles: true, cancelable: true });
10394
+ }
10395
+ return event;
10396
+ };
10397
+ SimpleGridCellComponent.prototype._getElement = function () {
10398
+ var templ;
10399
+ if (this._editTemplate) {
10400
+ templ = this._editTemplate;
10401
+ }
10402
+ else if (this._template) {
10403
+ templ = this._template;
10404
+ }
10405
+ else {
10406
+ templ = this._inputTemplate;
10407
+ }
10408
+ if (templ) {
10409
+ if (templ && templ.elementRef) {
10410
+ var inputElement = this._getFirstFormInput(templ.elementRef.nativeElement.parentElement);
10411
+ if (inputElement) {
10412
+ return inputElement;
10413
+ }
10414
+ }
10415
+ }
10416
+ };
10417
+ SimpleGridCellComponent.prototype._detectChanges = function () {
10418
+ this._changeDetector.detectChanges();
10419
+ };
10420
+ return SimpleGridCellComponent;
10421
+ }());
10422
+ SimpleGridCellComponent.decorators = [
10423
+ { type: core.Component, args: [{
10424
+ selector: "co-simple-grid-cell",
10425
+ template: "\n <div class=\"simple-grid-column-cell-value\" [ngClass]=\"column.textAlign ? column.textAlign : defaultTextAlign\">\n <ng-container *ngIf=\"editMode; else noInlineEdit\">\n <ng-container #editTemplate *ngIf=\"column.editTemplate; else noEditTemplate\"\n [ngTemplateOutlet]=\"column.editTemplate\"\n [ngTemplateOutletContext]=\"{value: row[column.field], row: row}\"></ng-container>\n <ng-template #noEditTemplate>\n <ng-container *ngIf=\"column.template; else noTemplate\">\n <ng-container [ngTemplateOutlet]=\"column.template\"\n [ngTemplateOutletContext]=\"{value: row[column.field], row: row}\"></ng-container>\n </ng-container>\n <ng-template #noTemplate>\n <co-input-text [(model)]=\"row[column.field]\" [required]=\"column.required\"></co-input-text>\n </ng-template>\n </ng-template>\n </ng-container>\n <ng-template #noInlineEdit>\n <ng-container *ngIf=\"column.template; else noTemplate\">\n <ng-container [ngTemplateOutlet]=\"column.template\"\n [ngTemplateOutletContext]=\"{value: row[column.field], row: row}\"></ng-container>\n </ng-container>\n <ng-template #noTemplate>\n <span [textContent]=\"column.getFieldValue(row[column.field])\"></span>\n </ng-template>\n </ng-template>\n </div>\n ",
10426
+ encapsulation: core.ViewEncapsulation.None
10493
10427
  },] }
10494
10428
  ];
10495
- ClickOutsideDirective.ctorParameters = function () { return [
10496
- { type: core.ElementRef },
10497
- { type: core.NgZone },
10498
- { type: ClickOutsideMasterService }
10429
+ SimpleGridCellComponent.ctorParameters = function () { return [
10430
+ { type: core.ChangeDetectorRef }
10499
10431
  ]; };
10500
- ClickOutsideDirective.propDecorators = {
10501
- enabled: [{ type: core.Input, args: ["clickOutside",] }],
10502
- alwaysTrigger: [{ type: core.Input }],
10503
- clickOutside: [{ type: core.Output }]
10504
- };
10505
- __decorate([
10506
- InputBoolean()
10507
- ], ClickOutsideDirective.prototype, "alwaysTrigger", void 0);
10432
+ SimpleGridCellComponent.propDecorators = {
10433
+ editTemplateContent: [{ type: core.ViewChild, args: ["editTemplate", { read: BaseInputComponent },] }],
10434
+ noEditTemplateContent: [{ type: core.ViewChild, args: ["noEditTemplate",] }],
10435
+ noTemplateContent: [{ type: core.ViewChild, args: ["noTemplate",] }],
10436
+ column: [{ type: core.Input }],
10437
+ row: [{ type: core.Input }],
10438
+ editMode: [{ type: core.Input }],
10439
+ fieldEditMode: [{ type: core.Input }],
10440
+ cellClick: [{ type: core.Output }],
10441
+ showClass: [{ type: core.HostBinding, args: ["class.co-simple-grid-cell",] }],
10442
+ handleClick: [{ type: core.HostListener, args: ['click', ['$event'],] }]
10443
+ };
10508
10444
 
10509
- var ClickoutsideModule = /** @class */ (function () {
10510
- function ClickoutsideModule() {
10445
+ var ObserveVisibilityDirective = /** @class */ (function () {
10446
+ function ObserveVisibilityDirective(_element) {
10447
+ this._element = _element;
10448
+ this.debounceTime = 0;
10449
+ this.threshold = 0;
10450
+ this.visible = new core.EventEmitter();
10451
+ this._subject = new rxjs.Subject();
10511
10452
  }
10512
- return ClickoutsideModule;
10453
+ ObserveVisibilityDirective.prototype.ngOnInit = function () {
10454
+ this._createObserver();
10455
+ };
10456
+ ObserveVisibilityDirective.prototype.ngAfterViewInit = function () {
10457
+ this._startObservingElements();
10458
+ };
10459
+ ObserveVisibilityDirective.prototype.ngOnDestroy = function () {
10460
+ if (this._observer) {
10461
+ this._observer.disconnect();
10462
+ this._observer = undefined;
10463
+ }
10464
+ this._subject.next();
10465
+ this._subject.complete();
10466
+ };
10467
+ ObserveVisibilityDirective.prototype._isVisible = function (element) {
10468
+ var _this = this;
10469
+ return new Promise(function (resolve) {
10470
+ var observer = new IntersectionObserver(function (_a) {
10471
+ var _b = __read(_a, 1), entry = _b[0];
10472
+ resolve(entry.isIntersecting && entry.intersectionRatio >= _this.threshold);
10473
+ observer.disconnect();
10474
+ });
10475
+ observer.observe(element);
10476
+ });
10477
+ };
10478
+ ObserveVisibilityDirective.prototype._createObserver = function () {
10479
+ var _this = this;
10480
+ var options = {
10481
+ rootMargin: '0px',
10482
+ threshold: this.threshold,
10483
+ };
10484
+ var isIntersecting = function (entry) { return entry.isIntersecting || entry.intersectionRatio > 0; };
10485
+ this._observer = new IntersectionObserver(function (entries, observer) {
10486
+ entries.forEach(function (entry) {
10487
+ if (isIntersecting(entry)) {
10488
+ _this._subject.next({ entry: entry, observer: observer });
10489
+ }
10490
+ });
10491
+ }, options);
10492
+ };
10493
+ ObserveVisibilityDirective.prototype._startObservingElements = function () {
10494
+ var _this = this;
10495
+ if (!this._observer) {
10496
+ return;
10497
+ }
10498
+ this._observer.observe(this._element.nativeElement);
10499
+ this._subject
10500
+ .pipe(operators.delay(this.debounceTime), operators.filter(Boolean))
10501
+ .subscribe(function (_a) {
10502
+ var entry = _a.entry, observer = _a.observer;
10503
+ return __awaiter(_this, void 0, void 0, function () {
10504
+ var target, isStillVisible;
10505
+ return __generator(this, function (_a) {
10506
+ switch (_a.label) {
10507
+ case 0:
10508
+ target = entry.target;
10509
+ return [4 /*yield*/, this._isVisible(target)];
10510
+ case 1:
10511
+ isStillVisible = _a.sent();
10512
+ if (isStillVisible) {
10513
+ this.visible.emit(target);
10514
+ observer.unobserve(target);
10515
+ }
10516
+ return [2 /*return*/];
10517
+ }
10518
+ });
10519
+ });
10520
+ });
10521
+ };
10522
+ return ObserveVisibilityDirective;
10513
10523
  }());
10514
- ClickoutsideModule.decorators = [
10524
+ ObserveVisibilityDirective.decorators = [
10525
+ { type: core.Directive, args: [{
10526
+ selector: '[observeVisibility]',
10527
+ },] }
10528
+ ];
10529
+ ObserveVisibilityDirective.ctorParameters = function () { return [
10530
+ { type: core.ElementRef }
10531
+ ]; };
10532
+ ObserveVisibilityDirective.propDecorators = {
10533
+ debounceTime: [{ type: core.Input }],
10534
+ threshold: [{ type: core.Input }],
10535
+ visible: [{ type: core.Output }]
10536
+ };
10537
+
10538
+ var ObserveVisibilityModule = /** @class */ (function () {
10539
+ function ObserveVisibilityModule() {
10540
+ }
10541
+ return ObserveVisibilityModule;
10542
+ }());
10543
+ ObserveVisibilityModule.decorators = [
10515
10544
  { type: core.NgModule, args: [{
10516
10545
  declarations: [
10517
- ClickOutsideDirective
10546
+ ObserveVisibilityDirective
10518
10547
  ],
10519
- providers: [
10520
- ClickOutsideMasterService
10548
+ exports: [
10549
+ ObserveVisibilityDirective
10550
+ ]
10551
+ },] }
10552
+ ];
10553
+
10554
+ var SimpleGridModule = /** @class */ (function () {
10555
+ function SimpleGridModule() {
10556
+ }
10557
+ return SimpleGridModule;
10558
+ }());
10559
+ SimpleGridModule.decorators = [
10560
+ { type: core.NgModule, args: [{
10561
+ imports: [
10562
+ common.CommonModule,
10563
+ dragDrop.DragDropModule,
10564
+ GridToolbarModule,
10565
+ InputTextModule,
10566
+ FormModule,
10567
+ ObserveVisibilityModule,
10568
+ PaginationModule
10569
+ ],
10570
+ declarations: [
10571
+ SimpleGridComponent,
10572
+ SimpleGridCellComponent,
10573
+ SimpleGridColumnDirective
10521
10574
  ],
10522
10575
  exports: [
10523
- ClickOutsideDirective
10576
+ SimpleGridComponent,
10577
+ SimpleGridCellComponent,
10578
+ SimpleGridColumnDirective
10524
10579
  ]
10525
10580
  },] }
10526
10581
  ];
10527
10582
 
10528
- var PaginationService = /** @class */ (function () {
10529
- function PaginationService() {
10530
- this.change = new rxjs.Subject();
10531
- this.instances = {};
10583
+ var FilterItemComponent = /** @class */ (function () {
10584
+ function FilterItemComponent(iconService) {
10585
+ this.iconService = iconService;
10586
+ this.icons = exports.CoreComponentsIcon;
10587
+ this.initialLimit = 10;
10588
+ this.expanded = false;
10589
+ // Set to false to use filter item with a multi selectable collection. Set to true to specify custom content
10590
+ this.customContent = false;
10591
+ // Set to true to show all results. Set to false to get 'show more' and 'show less' buttons to expand and contract.
10592
+ this.showAllResults = false;
10593
+ this.singleSelect = false;
10594
+ this.searchPlaceholder = 'Search...';
10595
+ this.showMoreLabel = 'Show more';
10596
+ this.showLessLabel = 'Show less';
10597
+ this.noResultsLabel = "No results";
10598
+ this.collectionChange = new core.EventEmitter();
10599
+ this.filteredCollection = [];
10600
+ this.limitTo = 10;
10601
+ this.filterText = "";
10602
+ this._collection = [];
10532
10603
  }
10533
- Object.defineProperty(PaginationService.prototype, "DEFAULT_ID", {
10604
+ Object.defineProperty(FilterItemComponent.prototype, "collection", {
10534
10605
  get: function () {
10535
- return PaginationService.DEFAULT_ID;
10606
+ return this._collection;
10607
+ },
10608
+ set: function (value) {
10609
+ var _a;
10610
+ this._collection = value;
10611
+ this.filteredCollection = (_a = this._collection) === null || _a === void 0 ? void 0 : _a.slice();
10536
10612
  },
10537
10613
  enumerable: false,
10538
10614
  configurable: true
10539
10615
  });
10540
- PaginationService.prototype.register = function (instance) {
10541
- if (!instance.id) {
10542
- instance.id = PaginationService.DEFAULT_ID;
10543
- }
10544
- if (!this.instances[instance.id]) {
10545
- this.instances[instance.id] = instance;
10546
- this.change.next(instance.id);
10547
- }
10548
- else {
10549
- var changed = this.updateInstance(instance);
10550
- if (changed) {
10551
- this.change.next(instance.id);
10552
- }
10553
- }
10616
+ FilterItemComponent.prototype.showClass = function () {
10617
+ return true;
10554
10618
  };
10555
- // Returns the current page number.
10556
- PaginationService.prototype.getCurrentPage = function (id) {
10557
- if (this.instances[id]) {
10558
- return this.instances[id].currentPage;
10559
- }
10619
+ FilterItemComponent.prototype.ngOnInit = function () {
10620
+ this.setToInitialLimit();
10560
10621
  };
10561
- // Sets the current page number.
10562
- PaginationService.prototype.setCurrentPage = function (id, page) {
10563
- if (this.instances[id]) {
10564
- var instance = this.instances[id];
10565
- var maxPage = Math.ceil(instance.totalItems / instance.itemsPerPage);
10566
- if (page <= maxPage && 1 <= page) {
10567
- this.instances[id].currentPage = page;
10568
- this.change.next(id);
10569
- }
10570
- }
10622
+ FilterItemComponent.prototype.setToInitialLimit = function () {
10623
+ this.limitTo = this.initialLimit;
10571
10624
  };
10572
- // Sets the value of instance.totalItems
10573
- PaginationService.prototype.setTotalItems = function (id, totalItems) {
10574
- if (this.instances[id] && 0 <= totalItems) {
10575
- this.instances[id].totalItems = totalItems;
10576
- this.change.next(id);
10577
- }
10625
+ FilterItemComponent.prototype.increaseLimit = function () {
10626
+ this.limitTo += 10;
10578
10627
  };
10579
- // Sets the value of instance.itemsPerPage.
10580
- PaginationService.prototype.setItemsPerPage = function (id, itemsPerPage) {
10581
- if (this.instances[id]) {
10582
- this.instances[id].itemsPerPage = itemsPerPage;
10583
- this.change.next(id);
10628
+ FilterItemComponent.prototype.moreToShow = function () {
10629
+ var _a;
10630
+ if (this.showAllResults) {
10631
+ return false;
10584
10632
  }
10633
+ return ((_a = this.filteredCollection) === null || _a === void 0 ? void 0 : _a.length) > this.limitTo;
10585
10634
  };
10586
- /**
10587
- * Returns a clone of the pagination instance object matching the id. If no
10588
- * id specified, returns the instance corresponding to the default id.
10589
- */
10590
- PaginationService.prototype.getInstance = function (id) {
10591
- if (id === void 0) { id = PaginationService.DEFAULT_ID; }
10592
- if (this.instances[id]) {
10593
- return ObjectUtils.GetShallowClone(this.instances[id]);
10635
+ FilterItemComponent.prototype.lessToShow = function () {
10636
+ var _a, _b;
10637
+ if (this.showAllResults) {
10638
+ return false;
10594
10639
  }
10595
- return {};
10640
+ return ((_a = this.filteredCollection) === null || _a === void 0 ? void 0 : _a.length) <= this.limitTo && ((_b = this.filteredCollection) === null || _b === void 0 ? void 0 : _b.length) > this.initialLimit;
10596
10641
  };
10597
- /**
10598
- * Check each property of the instance and update any that have changed. Return
10599
- * true if any changes were made, else return false.
10600
- */
10601
- PaginationService.prototype.updateInstance = function (instance) {
10602
- var changed = false;
10603
- for (var prop in this.instances[instance.id]) {
10604
- if (instance[prop] !== this.instances[instance.id][prop]) {
10605
- this.instances[instance.id][prop] = instance[prop];
10606
- changed = true;
10607
- }
10642
+ FilterItemComponent.prototype.handleModelChange = function (model) {
10643
+ if (this.singleSelect) {
10644
+ this.collection.forEach(function (m) {
10645
+ if (m.code !== model.code && m.description !== model.description) {
10646
+ m.checked = false;
10647
+ }
10648
+ });
10608
10649
  }
10609
- return changed;
10650
+ model.checked = !model.checked;
10651
+ this.collectionChange.emit(this.collection);
10610
10652
  };
10611
- return PaginationService;
10653
+ // Applies filter to the collection.
10654
+ FilterItemComponent.prototype.applyFilter = function (text) {
10655
+ var _a, _b;
10656
+ return __awaiter(this, void 0, void 0, function () {
10657
+ var _c, filterText, filteredItemCount;
10658
+ return __generator(this, function (_d) {
10659
+ switch (_d.label) {
10660
+ case 0:
10661
+ if (!(!isNaN(this.minSearchCharsToLoadCollection) && this.collectionLoadFn)) return [3 /*break*/, 3];
10662
+ if (!(text.length === this.minSearchCharsToLoadCollection && text.length > this.filterText.length)) return [3 /*break*/, 2];
10663
+ _c = this;
10664
+ return [4 /*yield*/, this.collectionLoadFn(text)];
10665
+ case 1:
10666
+ _c.collection = _d.sent();
10667
+ return [3 /*break*/, 3];
10668
+ case 2:
10669
+ if (text.length < this.minSearchCharsToLoadCollection) {
10670
+ this.collection = undefined;
10671
+ }
10672
+ _d.label = 3;
10673
+ case 3:
10674
+ this.filterText = text;
10675
+ if (!this.collection) {
10676
+ return [2 /*return*/, []];
10677
+ }
10678
+ filterText = (_a = this.filterText) === null || _a === void 0 ? void 0 : _a.toString().toLowerCase();
10679
+ filteredItemCount = 0;
10680
+ this.filteredCollection = (_b = this.collection) === null || _b === void 0 ? void 0 : _b.filter(function (item) {
10681
+ var _a;
10682
+ var labelText = (_a = item.description) === null || _a === void 0 ? void 0 : _a.toString().toLowerCase();
10683
+ var isHiddenByFilter = ((labelText === null || labelText === void 0 ? void 0 : labelText.indexOf(filterText)) === -1);
10684
+ if (isHiddenByFilter) {
10685
+ return false;
10686
+ }
10687
+ else {
10688
+ filteredItemCount++;
10689
+ return true;
10690
+ }
10691
+ });
10692
+ return [2 /*return*/];
10693
+ }
10694
+ });
10695
+ });
10696
+ };
10697
+ return FilterItemComponent;
10612
10698
  }());
10613
- PaginationService.DEFAULT_ID = "DEFAULT_PAGINATION_ID";
10614
- PaginationService.decorators = [
10615
- { type: core.Injectable }
10699
+ FilterItemComponent.decorators = [
10700
+ { type: core.Component, args: [{
10701
+ selector: "co-filter-item",
10702
+ template: "\n <div class=\"co-filter-item-header\">\n <co-collapsible\n [headerTitle]=\"placeholder\"\n [expandButtonLast]=\"true\"\n [iconData]=\"iconService.getIcon(icons.ArrowPointDown)\"\n [expanded]=\"expanded\"\n >\n <div class=\"co-filter-item-collapsable-content\">\n <div class=\"co-filter-item-custom-content\" *ngIf=\"customContent; else collectionContent\">\n <ng-content></ng-content>\n </div>\n <ng-template #collectionContent>\n <div class=\"co-filter-item-collection-content\">\n <co-input-text\n *ngIf=\"collection?.length > 10 || minSearchCharsToLoadCollection\"\n [placeholder]=\"searchPlaceholder\"\n [model]=\"filterText\"\n (modelChange)=\"applyFilter($event)\"\n >\n </co-input-text>\n <div class=\"no-results\" *ngIf=\"filteredCollection?.length === 0\">\n <span [textContent]=\"noResultsLabel\"></span>\n </div>\n <div class=\"co-filter-item-collection-results\">\n <ng-container\n *ngFor=\"let option of filteredCollection; let index = index\">\n <div class=\"co-filter-item-collection-result-item\" *ngIf=\"index < limitTo || showAllResults\">\n <co-input-checkbox *ngIf=\"!singleSelect\"\n [label]=\"option.description\"\n [model]=\"option.checked\"\n (modelChange)=\"handleModelChange(option)\"\n ></co-input-checkbox>\n <co-input-radio-button *ngIf=\"singleSelect\"\n [name]=\"'radiogroup'\"\n [label]=\"option.description\"\n [model]=\"option.checked\"\n (modelChange)=\"handleModelChange(option)\"\n ></co-input-radio-button>\n <div class=\"co-filter-item-amount\" *ngIf=\"option.count\"\n [textContent]=\"option.count.toString() | append: ')' | prepend: ' ('\"\n ></div>\n </div>\n\n </ng-container>\n </div>\n <div class=\"co-filter-show-more-or-less\" *ngIf=\"!showAllResults\">\n <div class=\"co-filter-show-more clickable\"\n *ngIf=\"moreToShow()\">\n <a (click)=\"increaseLimit()\">\n <co-icon [iconData]=\"iconService.getIcon(icons.ArrowPointDown)\"></co-icon>\n <span [textContent]=\"showMoreLabel\"></span>\n </a>\n </div>\n <div class=\"co-filter-show-less clickable\"\n *ngIf=\"lessToShow()\">\n <a (click)=\"setToInitialLimit()\">\n <co-icon [iconData]=\"iconService.getIcon(icons.ArrowPointUp)\"></co-icon>\n <span [textContent]=\"showLessLabel\"></span>\n </a>\n </div>\n </div>\n </div>\n </ng-template>\n </div>\n </co-collapsible>\n </div>\n\n ",
10703
+ encapsulation: core.ViewEncapsulation.None
10704
+ },] }
10616
10705
  ];
10617
- PaginationService.ctorParameters = function () { return []; };
10706
+ FilterItemComponent.ctorParameters = function () { return [
10707
+ { type: IconCacheService }
10708
+ ]; };
10709
+ FilterItemComponent.propDecorators = {
10710
+ collection: [{ type: core.Input }],
10711
+ placeholder: [{ type: core.Input }],
10712
+ initialLimit: [{ type: core.Input }],
10713
+ expanded: [{ type: core.Input }],
10714
+ minSearchCharsToLoadCollection: [{ type: core.Input }],
10715
+ collectionLoadFn: [{ type: core.Input }],
10716
+ customContent: [{ type: core.Input }],
10717
+ showAllResults: [{ type: core.Input }],
10718
+ singleSelect: [{ type: core.Input }],
10719
+ searchPlaceholder: [{ type: core.Input }],
10720
+ showMoreLabel: [{ type: core.Input }],
10721
+ showLessLabel: [{ type: core.Input }],
10722
+ noResultsLabel: [{ type: core.Input }],
10723
+ collectionChange: [{ type: core.Output }],
10724
+ showClass: [{ type: core.HostBinding, args: ["class.co-filter-item",] }]
10725
+ };
10618
10726
 
10619
- var PaginationComponent = /** @class */ (function () {
10620
- function PaginationComponent(_paginationService) {
10621
- var _this = this;
10622
- this._paginationService = _paginationService;
10623
- this.maxSize = 7;
10624
- this.directionLinks = true;
10625
- this.previousLabel = 'Vorige pagina';
10626
- this.nextLabel = 'Volgende pagina';
10627
- this.autoHide = false;
10628
- // Emits the new page number.
10629
- this.pageChange = new core.EventEmitter();
10630
- this.showClass = true;
10631
- this.pages = [];
10632
- this.changeSub = this._paginationService.change.subscribe(function (id) {
10633
- if (_this.id === id) {
10634
- _this._updatePageLinks();
10635
- }
10636
- });
10727
+ // A pipe for prepending strings to other strings in view templates.
10728
+ var PrependPipe = /** @class */ (function () {
10729
+ function PrependPipe() {
10637
10730
  }
10638
- PaginationComponent.prototype.ngOnInit = function () {
10639
- if (!this.id) {
10640
- this.id = this._paginationService.DEFAULT_ID;
10641
- }
10642
- this._updatePageLinks();
10643
- };
10644
- PaginationComponent.prototype.ngOnChanges = function () {
10645
- this._updatePageLinks();
10646
- };
10647
- PaginationComponent.prototype.ngOnDestroy = function () {
10648
- this.changeSub.unsubscribe();
10649
- };
10650
- PaginationComponent.prototype.goToFirstPage = function () {
10651
- if (!this.isOnFirstPage()) {
10652
- this.setCurrentPage(1);
10653
- }
10654
- };
10655
- PaginationComponent.prototype.goToPreviousPage = function () {
10656
- if (!this.isOnFirstPage()) {
10657
- this.setCurrentPage(this.getCurrentPage() - 1);
10658
- }
10659
- };
10660
- PaginationComponent.prototype.goToNextPage = function () {
10661
- if (!this.isOnLastPage()) {
10662
- this.setCurrentPage(this.getCurrentPage() + 1);
10663
- }
10664
- };
10665
- PaginationComponent.prototype.setCurrentPage = function (page) {
10666
- this.pageChange.emit(page);
10667
- };
10668
- PaginationComponent.prototype.isOnFirstPage = function () {
10669
- return this.getCurrentPage() === 1;
10670
- };
10671
- PaginationComponent.prototype.isOnLastPage = function () {
10672
- return this.getLastPage() === this.getCurrentPage();
10673
- };
10674
- PaginationComponent.prototype.shouldBeHidden = function () {
10675
- if (!this.autoHide) {
10676
- return false;
10677
- }
10678
- else {
10679
- var instance = this._paginationService.getInstance();
10680
- return (instance.totalItems <= instance.itemsPerPage);
10681
- }
10682
- };
10683
- /**
10684
- * Updates the page links and checks that the current page is valid. Should run whenever the
10685
- * PaginationService.change stream emits a value matching the current ID, or when any of the
10686
- * input values changes.
10687
- */
10688
- PaginationComponent.prototype._updatePageLinks = function () {
10689
- var paginationInstance = this._paginationService.getInstance(this.id);
10690
- this.pages = this.createPageArray(paginationInstance.currentPage, paginationInstance.itemsPerPage, paginationInstance.totalItems, this.maxSize);
10691
- var correctedCurrentPage = this.outOfBoundCorrection(paginationInstance);
10692
- if (correctedCurrentPage !== paginationInstance.currentPage) {
10693
- this.setCurrentPage(correctedCurrentPage);
10694
- }
10695
- };
10696
- PaginationComponent.prototype.getCurrentPage = function () {
10697
- return this._paginationService.getCurrentPage(this.id);
10698
- };
10699
- PaginationComponent.prototype.getLastPage = function () {
10700
- var instance = this._paginationService.getInstance(this.id);
10701
- return Math.ceil(instance.totalItems / instance.itemsPerPage);
10702
- };
10703
- /**
10704
- * Checks that the instance.currentPage property is within bounds for the current page range.
10705
- * If not, return a correct value for currentPage, or the current value if OK.
10706
- */
10707
- PaginationComponent.prototype.outOfBoundCorrection = function (instance) {
10708
- var totalPages = Math.ceil(instance.totalItems / instance.itemsPerPage);
10709
- if (totalPages < instance.currentPage && 0 < totalPages) {
10710
- return totalPages;
10711
- }
10712
- else if (instance.currentPage < 1) {
10713
- return 1;
10731
+ PrependPipe.prototype.transform = function (value, prepend) {
10732
+ if (!value) {
10733
+ return "";
10714
10734
  }
10715
- return instance.currentPage;
10716
- };
10717
- // Returns an array of IPage objects to use in the pagination controls.
10718
- PaginationComponent.prototype.createPageArray = function (currentPage, itemsPerPage, totalItems, paginationRange) {
10719
- // paginationRange could be a string if passed from attribute, so cast to number.
10720
- paginationRange = +paginationRange;
10721
- var pages = [];
10722
- var totalPages = Math.ceil(totalItems / itemsPerPage);
10723
- var halfWay = Math.ceil(paginationRange / 2);
10724
- var isStart = currentPage <= halfWay;
10725
- var isEnd = totalPages - halfWay < currentPage;
10726
- var isMiddle = !isStart && !isEnd;
10727
- var ellipsesNeeded = paginationRange < totalPages;
10728
- var i = 1;
10729
- while (i <= totalPages && i <= paginationRange) {
10730
- var label = void 0;
10731
- var pageNumber = this.calculatePageNumber(i, currentPage, paginationRange, totalPages);
10732
- var openingEllipsesNeeded = (i === 2 && (isMiddle || isEnd));
10733
- var closingEllipsesNeeded = (i === paginationRange - 1 && (isMiddle || isStart));
10734
- if (ellipsesNeeded && (openingEllipsesNeeded || closingEllipsesNeeded)) {
10735
- label = '...';
10736
- }
10737
- else {
10738
- label = '' + pageNumber;
10739
- }
10740
- pages.push({
10741
- label: label,
10742
- value: pageNumber
10743
- });
10744
- i++;
10735
+ if (!prepend) {
10736
+ return value;
10745
10737
  }
10746
- return pages;
10738
+ return prepend + value;
10747
10739
  };
10748
- // Given the position in the sequence of pagination links [i], figure out what page number corresponds to that position.
10749
- PaginationComponent.prototype.calculatePageNumber = function (i, currentPage, paginationRange, totalPages) {
10750
- var halfWay = Math.ceil(paginationRange / 2);
10751
- if (i === paginationRange) {
10752
- return totalPages;
10753
- }
10754
- else if (i === 1) {
10755
- return i;
10756
- }
10757
- else if (paginationRange < totalPages) {
10758
- if (totalPages - halfWay < currentPage) {
10759
- return totalPages - paginationRange + i;
10760
- }
10761
- else if (halfWay < currentPage) {
10762
- return currentPage - halfWay + i;
10740
+ return PrependPipe;
10741
+ }());
10742
+ PrependPipe.decorators = [
10743
+ { type: core.Pipe, args: [{ name: "prepend" },] }
10744
+ ];
10745
+
10746
+ var PrependPipeModule = /** @class */ (function () {
10747
+ function PrependPipeModule() {
10748
+ }
10749
+ return PrependPipeModule;
10750
+ }());
10751
+ PrependPipeModule.decorators = [
10752
+ { type: core.NgModule, args: [{
10753
+ declarations: [
10754
+ PrependPipe
10755
+ ],
10756
+ exports: [
10757
+ PrependPipe
10758
+ ]
10759
+ },] }
10760
+ ];
10761
+
10762
+ var FilterItemModule = /** @class */ (function () {
10763
+ function FilterItemModule() {
10764
+ }
10765
+ return FilterItemModule;
10766
+ }());
10767
+ FilterItemModule.decorators = [
10768
+ { type: core.NgModule, args: [{
10769
+ imports: [
10770
+ common.CommonModule,
10771
+ CollapsibleModule,
10772
+ InputTextModule,
10773
+ InputCheckboxMultiSelectModule,
10774
+ InputCheckboxModule,
10775
+ IconModule,
10776
+ scrolling.ScrollingModule,
10777
+ AppendPipeModule,
10778
+ PrependPipeModule,
10779
+ InputTextModule,
10780
+ InputRadioButtonModule
10781
+ ],
10782
+ declarations: [
10783
+ FilterItemComponent
10784
+ ],
10785
+ exports: [
10786
+ FilterItemComponent
10787
+ ]
10788
+ },] }
10789
+ ];
10790
+
10791
+ // Human-readable JS keyboard codes, as in KeyboardEvent.key string values.
10792
+ var KeyboardKey;
10793
+ (function (KeyboardKey) {
10794
+ KeyboardKey["Down"] = "ArrowDown";
10795
+ KeyboardKey["Up"] = "ArrowUp";
10796
+ KeyboardKey["Left"] = "ArrowLeft";
10797
+ KeyboardKey["Right"] = "ArrowRight";
10798
+ KeyboardKey["Tab"] = "Tab";
10799
+ KeyboardKey["Escape"] = "Escape";
10800
+ KeyboardKey["Enter"] = "Enter";
10801
+ KeyboardKey["Home"] = "Home";
10802
+ KeyboardKey["End"] = "End";
10803
+ KeyboardKey["Delete"] = "Delete";
10804
+ KeyboardKey["Insert"] = "Insert";
10805
+ KeyboardKey["ShiftLeft"] = "ShiftLeft";
10806
+ KeyboardKey["ShiftRight"] = "ShiftRight";
10807
+ KeyboardKey["Backspace"] = "Backspace";
10808
+ KeyboardKey["SpaceBar"] = "Space";
10809
+ KeyboardKey["Period"] = "Period";
10810
+ KeyboardKey["DecimalPoint"] = "NumpadDecimal";
10811
+ KeyboardKey["SemiColon"] = "Semicolon";
10812
+ KeyboardKey["ControlRight"] = "ControlRight";
10813
+ KeyboardKey["ControlLeft"] = "ControlLeft";
10814
+ KeyboardKey["Comma"] = "Comma";
10815
+ ////Minus,
10816
+ ////MinusFireFox,
10817
+ ////Substract,
10818
+ KeyboardKey["Zero"] = "Digit0";
10819
+ KeyboardKey["One"] = "Digit1";
10820
+ KeyboardKey["Two"] = "Digit2";
10821
+ KeyboardKey["Three"] = "Digit3";
10822
+ KeyboardKey["Four"] = "Digit4";
10823
+ KeyboardKey["Five"] = "Digit5";
10824
+ KeyboardKey["Six"] = "Digit6";
10825
+ KeyboardKey["Seven"] = "Digit7";
10826
+ KeyboardKey["Eight"] = "Digit8";
10827
+ KeyboardKey["Nine"] = "Digit9";
10828
+ KeyboardKey["NumpadZero"] = "Numpad0";
10829
+ KeyboardKey["NumpadOne"] = "Numpad1";
10830
+ KeyboardKey["NumpadTwo"] = "Numpad2";
10831
+ KeyboardKey["NumpadThree"] = "Numpad3";
10832
+ KeyboardKey["NumpadFour"] = "Numpad4";
10833
+ KeyboardKey["NumpadFive"] = "Numpad5";
10834
+ KeyboardKey["NumpadSix"] = "Numpad6";
10835
+ KeyboardKey["NumpadSeven"] = "Numpad7";
10836
+ KeyboardKey["NumpadEight"] = "Numpad8";
10837
+ KeyboardKey["NumpadNine"] = "Numpad9";
10838
+ KeyboardKey["A"] = "KeyA";
10839
+ KeyboardKey["B"] = "KeyB";
10840
+ KeyboardKey["C"] = "KeyC";
10841
+ KeyboardKey["D"] = "KeyD";
10842
+ KeyboardKey["E"] = "KeyE";
10843
+ KeyboardKey["F"] = "KeyF";
10844
+ KeyboardKey["G"] = "KeyG";
10845
+ KeyboardKey["H"] = "KeyH";
10846
+ KeyboardKey["I"] = "KeyI";
10847
+ KeyboardKey["J"] = "KeyJ";
10848
+ KeyboardKey["K"] = "KeyK";
10849
+ KeyboardKey["L"] = "KeyL";
10850
+ KeyboardKey["M"] = "KeyM";
10851
+ KeyboardKey["N"] = "KeyN";
10852
+ KeyboardKey["O"] = "KeyO";
10853
+ KeyboardKey["P"] = "KeyP";
10854
+ KeyboardKey["Q"] = "KeyQ";
10855
+ KeyboardKey["R"] = "KeyR";
10856
+ KeyboardKey["S"] = "KeyS";
10857
+ KeyboardKey["T"] = "KeyT";
10858
+ KeyboardKey["U"] = "KeyU";
10859
+ KeyboardKey["V"] = "KeyV";
10860
+ KeyboardKey["W"] = "KeyW";
10861
+ KeyboardKey["X"] = "KeyX";
10862
+ KeyboardKey["Y"] = "KeyY";
10863
+ KeyboardKey["Z"] = "KeyZ";
10864
+ })(KeyboardKey || (KeyboardKey = {}));
10865
+
10866
+ var ClickOutsideMasterService = /** @class */ (function () {
10867
+ function ClickOutsideMasterService(_ngZone) {
10868
+ var _this = this;
10869
+ this._ngZone = _ngZone;
10870
+ this._clickOutsideRefs = [];
10871
+ this.onClick = function (event) {
10872
+ _this._currentClick = event;
10873
+ var first = _this._clickOutsideRefs[0];
10874
+ var targets = _this._clickOutsideRefs.filter(function (co) { return co.alwaysTrigger; });
10875
+ if (first) {
10876
+ targets.push(first);
10763
10877
  }
10764
- else {
10765
- return i;
10878
+ setTimeout(function () {
10879
+ targets.forEach(function (clickOutside) { return _this.checkEmit(clickOutside, event); });
10880
+ });
10881
+ };
10882
+ this.onKeyDown = function (event) {
10883
+ if (event.key === KeyboardKey.Escape) {
10884
+ var first = _this._clickOutsideRefs[0];
10885
+ if (first) {
10886
+ _this.checkEmit(first, event, true);
10887
+ }
10766
10888
  }
10767
- }
10768
- else {
10769
- return i;
10889
+ };
10890
+ document.addEventListener('click', this.onClick, true);
10891
+ window.addEventListener('keydown', this.onKeyDown, EventUtils.passiveBubble);
10892
+ }
10893
+ Object.defineProperty(ClickOutsideMasterService.prototype, "currentClick", {
10894
+ get: function () {
10895
+ return this._currentClick;
10896
+ },
10897
+ enumerable: false,
10898
+ configurable: true
10899
+ });
10900
+ ClickOutsideMasterService.prototype.ngOnDestroy = function () {
10901
+ document.removeEventListener('click', this.onClick, true);
10902
+ window.removeEventListener('keydown', this.onKeyDown, EventUtils.passiveBubble);
10903
+ };
10904
+ ClickOutsideMasterService.prototype.checkEmit = function (clickOutside, event, force) {
10905
+ if (clickOutside && (clickOutside.currentClick !== this.currentClick || force) && this._clickOutsideRefs.indexOf(clickOutside) !== -1) {
10906
+ this._ngZone.run(function () { return clickOutside.clickOutside.emit(event); });
10770
10907
  }
10771
10908
  };
10772
- return PaginationComponent;
10909
+ ClickOutsideMasterService.prototype.addClickOutside = function (clickOutside) {
10910
+ this.removeClickOutside(clickOutside);
10911
+ this._clickOutsideRefs.unshift(clickOutside);
10912
+ };
10913
+ ClickOutsideMasterService.prototype.removeClickOutside = function (clickOutside) {
10914
+ ArrayUtils.RemoveElement(clickOutside, this._clickOutsideRefs);
10915
+ };
10916
+ return ClickOutsideMasterService;
10773
10917
  }());
10774
- PaginationComponent.decorators = [
10775
- { type: core.Component, args: [{
10776
- selector: 'co-pagination',
10777
- template: "\n <div class=\"pagination-component-main-wrapper\" *ngIf=\"!shouldBeHidden()\">\n <div>\n <ng-content></ng-content>\n </div>\n <ul class=\"pagination\">\n <li *ngIf=\"directionLinks\" class=\"pagination-previous\">\n <a (click)=\"goToPreviousPage()\" [class.disabled]=\"isOnFirstPage()\">{{ previousLabel }}</a>\n </li>\n <li *ngFor=\"let page of pages\" [class.current]=\"getCurrentPage() === page.value\" (click)=\"setCurrentPage(page.value)\">\n <span>{{page.label}}</span>\n </li>\n <li *ngIf=\"directionLinks\" class=\"pagination-next\">\n <a (click)=\"goToNextPage()\" [class.disabled]=\"isOnLastPage()\">{{ nextLabel }}</a>\n </li>\n </ul>\n </div>\n ",
10778
- encapsulation: core.ViewEncapsulation.None
10779
- },] }
10918
+ ClickOutsideMasterService.decorators = [
10919
+ { type: core.Injectable }
10780
10920
  ];
10781
- PaginationComponent.ctorParameters = function () { return [
10782
- { type: PaginationService }
10783
- ]; };
10784
- PaginationComponent.propDecorators = {
10785
- template: [{ type: core.ViewChild, args: ['template',] }],
10786
- id: [{ type: core.Input }],
10787
- maxSize: [{ type: core.Input }],
10788
- directionLinks: [{ type: core.Input }],
10789
- previousLabel: [{ type: core.Input }],
10790
- nextLabel: [{ type: core.Input }],
10791
- autoHide: [{ type: core.Input }],
10792
- pageChange: [{ type: core.Output }],
10793
- showClass: [{ type: core.HostBinding, args: ['class.co-pagination',] }]
10794
- };
10921
+ ClickOutsideMasterService.ctorParameters = function () { return [
10922
+ { type: core.NgZone }
10923
+ ]; };
10795
10924
 
10796
- var LARGE_NUMBER = 999999999;
10797
- var PaginatePipe = /** @class */ (function () {
10798
- function PaginatePipe(paginateService) {
10799
- this.paginateService = paginateService;
10800
- // store the values from the last time the pipe
10801
- this.state = {};
10802
- }
10803
- PaginatePipe.prototype.transform = function (collection, args) {
10804
- // When an observable is passed through the AsyncPipe, it will output
10805
- // `null` until the subscription resolves. In this case, we want to
10806
- // use the cached data from the `state` object to prevent the NgFor
10807
- // from flashing empty until the real values arrive.
10808
- if (!(collection instanceof Array)) {
10809
- var _id = args.id || this.paginateService.DEFAULT_ID;
10810
- if (this.state[_id]) {
10811
- return this.state[_id].slice;
10812
- }
10813
- else {
10814
- return collection;
10815
- }
10816
- }
10817
- var serverSideMode = args.totalItems !== undefined;
10818
- var instance = this._createInstance(collection, args);
10819
- var id = instance.id;
10820
- var start;
10821
- var end;
10822
- var perPage = instance.itemsPerPage;
10823
- this.paginateService.register(instance);
10824
- if (!serverSideMode && collection instanceof Array) {
10825
- perPage = perPage || LARGE_NUMBER;
10826
- start = (instance.currentPage - 1) * perPage;
10827
- end = start + perPage;
10828
- var isIdentical = this._stateIsIdentical(id, collection, start, end);
10829
- if (isIdentical) {
10830
- return this.state[id].slice;
10831
- }
10832
- else {
10833
- var slice = collection.slice(start, end);
10834
- this._saveState(id, collection, slice, start, end);
10835
- this.paginateService.change.next(id);
10836
- return slice;
10925
+ var ClickOutsideDirective = /** @class */ (function () {
10926
+ function ClickOutsideDirective(elementRef, _ngZone, _master) {
10927
+ var _this = this;
10928
+ this.elementRef = elementRef;
10929
+ this._ngZone = _ngZone;
10930
+ this._master = _master;
10931
+ this.clickOutside = new core.EventEmitter();
10932
+ this._enabled = true;
10933
+ this._initialized = false;
10934
+ this.onClick = function (event) {
10935
+ if (_this._enabled) {
10936
+ _this._currentClick = event;
10837
10937
  }
10838
- }
10839
- // save the state for server-side collection to avoid null
10840
- // flash as new data loads.
10841
- this._saveState(id, collection, collection, start, end);
10842
- return collection;
10843
- };
10844
- // Create an IPaginationInstance object, using defaults for any optional properties not supplied.
10845
- PaginatePipe.prototype._createInstance = function (collection, args) {
10846
- var config = args;
10847
- this._checkConfig(config);
10848
- return {
10849
- id: config.id || this.paginateService.DEFAULT_ID,
10850
- itemsPerPage: config.itemsPerPage || 0,
10851
- currentPage: config.currentPage || 1,
10852
- totalItems: config.totalItems || collection.length
10853
- };
10854
- };
10855
- // Ensure the argument passed to the filter contains the required properties.
10856
- PaginatePipe.prototype._checkConfig = function (config) {
10857
- var required = ["itemsPerPage", "currentPage"];
10858
- var missing = required.filter(function (prop) { return !config.hasOwnProperty(prop); });
10859
- if (0 < missing.length) {
10860
- throw new Error("PaginatePipe: Argument is missing the following required properties: " + missing.join(", "));
10861
- }
10862
- };
10863
- /**
10864
- * To avoid returning a brand new array each time the pipe is run, we store the state of the sliced
10865
- * array for a given id. This means that the next time the pipe is run on this collection & id, we just
10866
- * need to check that the collection, start and end points are all identical, and if so, return the
10867
- * last sliced array.
10868
- */
10869
- PaginatePipe.prototype._saveState = function (id, collection, slice, start, end) {
10870
- this.state[id] = {
10871
- collection: collection,
10872
- size: collection.length,
10873
- slice: slice,
10874
- start: start,
10875
- end: end
10876
10938
  };
10939
+ }
10940
+ Object.defineProperty(ClickOutsideDirective.prototype, "currentClick", {
10941
+ get: function () {
10942
+ return this._currentClick;
10943
+ },
10944
+ enumerable: false,
10945
+ configurable: true
10946
+ });
10947
+ Object.defineProperty(ClickOutsideDirective.prototype, "enabled", {
10948
+ set: function (enabled) {
10949
+ enabled = enabled === undefined || enabled;
10950
+ // noinspection SuspiciousTypeOfGuard
10951
+ if (typeof enabled === 'boolean' && this._enabled !== enabled) {
10952
+ this._enabled = enabled;
10953
+ if (this._initialized) {
10954
+ this._enabled ? this._master.addClickOutside(this) : this._master.removeClickOutside(this);
10955
+ }
10956
+ }
10957
+ },
10958
+ enumerable: false,
10959
+ configurable: true
10960
+ });
10961
+ ClickOutsideDirective.prototype.ngAfterViewInit = function () {
10962
+ var _this = this;
10963
+ setTimeout(function () {
10964
+ _this._ngZone.runOutsideAngular(function () {
10965
+ if (_this.elementRef && _this.elementRef.nativeElement) {
10966
+ _this.elementRef.nativeElement.addEventListener('click', _this.onClick, EventUtils.passiveCapture);
10967
+ if (_this._enabled) {
10968
+ _this._master.addClickOutside(_this);
10969
+ }
10970
+ _this._initialized = true;
10971
+ }
10972
+ });
10973
+ });
10877
10974
  };
10878
- // For a given id, returns true if the collection, size, start and end values are identical.
10879
- PaginatePipe.prototype._stateIsIdentical = function (id, collection, start, end) {
10880
- var state = this.state[id];
10881
- if (!state) {
10882
- return false;
10883
- }
10884
- return state.collection === collection &&
10885
- state.size === collection.length &&
10886
- state.start === start &&
10887
- state.end === end;
10975
+ ClickOutsideDirective.prototype.ngOnDestroy = function () {
10976
+ this._master.removeClickOutside(this);
10977
+ this.elementRef.nativeElement.removeEventListener('click', this.onClick, EventUtils.passiveCapture);
10978
+ this.elementRef = undefined;
10888
10979
  };
10889
- return PaginatePipe;
10980
+ return ClickOutsideDirective;
10890
10981
  }());
10891
- PaginatePipe.decorators = [
10892
- { type: core.Pipe, args: [{
10893
- name: 'paginate',
10894
- pure: false
10982
+ ClickOutsideDirective.decorators = [
10983
+ { type: core.Directive, args: [{
10984
+ selector: "[clickOutside]",
10985
+ exportAs: 'clickOutside'
10895
10986
  },] }
10896
10987
  ];
10897
- PaginatePipe.ctorParameters = function () { return [
10898
- { type: PaginationService }
10899
- ]; };
10988
+ ClickOutsideDirective.ctorParameters = function () { return [
10989
+ { type: core.ElementRef },
10990
+ { type: core.NgZone },
10991
+ { type: ClickOutsideMasterService }
10992
+ ]; };
10993
+ ClickOutsideDirective.propDecorators = {
10994
+ enabled: [{ type: core.Input, args: ["clickOutside",] }],
10995
+ alwaysTrigger: [{ type: core.Input }],
10996
+ clickOutside: [{ type: core.Output }]
10997
+ };
10998
+ __decorate([
10999
+ InputBoolean()
11000
+ ], ClickOutsideDirective.prototype, "alwaysTrigger", void 0);
10900
11001
 
10901
- var PaginationModule = /** @class */ (function () {
10902
- function PaginationModule() {
11002
+ var ClickoutsideModule = /** @class */ (function () {
11003
+ function ClickoutsideModule() {
10903
11004
  }
10904
- return PaginationModule;
11005
+ return ClickoutsideModule;
10905
11006
  }());
10906
- PaginationModule.decorators = [
11007
+ ClickoutsideModule.decorators = [
10907
11008
  { type: core.NgModule, args: [{
10908
- imports: [
10909
- common.CommonModule
11009
+ declarations: [
11010
+ ClickOutsideDirective
10910
11011
  ],
10911
11012
  providers: [
10912
- PaginationService
10913
- ],
10914
- declarations: [
10915
- PaginationComponent,
10916
- PaginatePipe
11013
+ ClickOutsideMasterService
10917
11014
  ],
10918
11015
  exports: [
10919
- PaginationComponent,
10920
- PaginatePipe
11016
+ ClickOutsideDirective
10921
11017
  ]
10922
11018
  },] }
10923
11019
  ];
@@ -11007,6 +11103,8 @@
11007
11103
  exports.MultiSelectListComponent = MultiSelectListComponent;
11008
11104
  exports.MultiSelectListModule = MultiSelectListModule;
11009
11105
  exports.ObserveVisibilityModule = ObserveVisibilityModule;
11106
+ exports.PaginationBarComponent = PaginationBarComponent;
11107
+ exports.PaginationBarModule = PaginationBarModule;
11010
11108
  exports.PaginationComponent = PaginationComponent;
11011
11109
  exports.PaginationModule = PaginationModule;
11012
11110
  exports.PopupButtonsComponent = PopupButtonsComponent;
@@ -11024,13 +11122,13 @@
11024
11122
  exports.TileModule = TileModule;
11025
11123
  exports["ɵa"] = RippleModule;
11026
11124
  exports["ɵb"] = MD_RIPPLE_GLOBAL_OPTIONS;
11027
- exports["ɵba"] = SimpleGridCellComponent;
11028
- exports["ɵbb"] = PrependPipeModule;
11029
- exports["ɵbc"] = PrependPipe;
11030
- exports["ɵbd"] = ClickOutsideDirective;
11031
- exports["ɵbe"] = ClickOutsideMasterService;
11032
- exports["ɵbf"] = PaginationService;
11033
- exports["ɵbg"] = PaginatePipe;
11125
+ exports["ɵba"] = PaginationService;
11126
+ exports["ɵbb"] = PaginatePipe;
11127
+ exports["ɵbc"] = SimpleGridCellComponent;
11128
+ exports["ɵbd"] = PrependPipeModule;
11129
+ exports["ɵbe"] = PrependPipe;
11130
+ exports["ɵbf"] = ClickOutsideDirective;
11131
+ exports["ɵbg"] = ClickOutsideMasterService;
11034
11132
  exports["ɵc"] = CoRippleDirective;
11035
11133
  exports["ɵd"] = CoViewportRulerService;
11036
11134
  exports["ɵe"] = CoScrollDispatcherService;