slick-components 4.4.9 → 4.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -69,7 +69,7 @@
69
69
  };
70
70
  return SlickInitService;
71
71
  }());
72
- SlickInitService.version = "4.4.9";
72
+ SlickInitService.version = "4.4.13";
73
73
  SlickInitService.decorators = [
74
74
  { type: core.Injectable }
75
75
  ];
@@ -4372,6 +4372,7 @@
4372
4372
  this.showPhotoGallery = false;
4373
4373
  this.showCheckboxes = false;
4374
4374
  this.thumbnailSize = 90;
4375
+ this.confirmDelete = true;
4375
4376
  this.filesEmitter = new core.EventEmitter();
4376
4377
  this.onFileDeleteEmitter = new core.EventEmitter();
4377
4378
  this.onFileCheckChanged = new core.EventEmitter();
@@ -4389,6 +4390,8 @@
4389
4390
  this.showPhotoGallery = (changes.showPhotoGallery.currentValue.toString().toLowerCase() !== 'false');
4390
4391
  if (changes.showCheckboxes && changes.showCheckboxes.currentValue)
4391
4392
  this.showCheckboxes = (changes.showCheckboxes.currentValue.toString().toLowerCase() !== 'false');
4393
+ if (changes.deleteConfirmation && changes.deleteConfirmation.currentValue)
4394
+ this.confirmDelete = (this.confirmDelete.toString() === 'true') ? true : false;
4392
4395
  };
4393
4396
  SlickFileListComponent.prototype.fileClicked = function (file, idx) {
4394
4397
  if (this.showPhotoGallery === true) {
@@ -4402,10 +4405,15 @@
4402
4405
  this.filesEmitter.emit(this.files);
4403
4406
  };
4404
4407
  SlickFileListComponent.prototype.onFileDelete = function (file, idx) {
4405
- this.files.splice(idx, 1);
4406
- this.filesEmitter.emit(this.files);
4407
- if (this.onFileDeleteEmitter)
4408
- this.onFileDeleteEmitter.emit(file);
4408
+ return __awaiter(this, void 0, void 0, function () {
4409
+ return __generator(this, function (_a) {
4410
+ this.files.splice(idx, 1);
4411
+ this.filesEmitter.emit(this.files);
4412
+ if (this.onFileDeleteEmitter)
4413
+ this.onFileDeleteEmitter.emit(file);
4414
+ return [2 /*return*/];
4415
+ });
4416
+ });
4409
4417
  };
4410
4418
  SlickFileListComponent.prototype.onCheckChanged = function (e, fileIdx) {
4411
4419
  return __awaiter(this, void 0, void 0, function () {
@@ -4462,7 +4470,7 @@
4462
4470
  SlickFileListComponent.decorators = [
4463
4471
  { type: core.Component, args: [{
4464
4472
  selector: 'slick-file-list',
4465
- template: "<div #containerRef id=\"slick-file-list_{{uuid}}\" class=\"slick-file-list\">\r\n\t<slick-file-list-item *ngFor=\"let file of files; let idx = index\" [file]=\"file\" [allowDelete]=\"allowDelete\" [showPhotoGallery]=\"showPhotoGallery\" [showCheckbox]=\"showCheckboxes\" [thumbnailSize]=\"thumbnailSize\" (checkChanged)=\"onCheckChanged($event, idx)\" (fileClicked)=\"fileClicked($event, idx)\" (fileChanged)=\"onFileChange($event, idx)\" (fileDelete)=\"onFileDelete($event, idx)\"></slick-file-list-item>\r\n</div>\r\n\r\n<slick-photo-gallery #photoGalleryRef *ngIf=\"showPhotoGallery === true\" [files]=\"files\"></slick-photo-gallery>"
4473
+ template: "<div #containerRef id=\"slick-file-list_{{uuid}}\" class=\"slick-file-list\">\r\n\t<slick-file-list-item *ngFor=\"let file of files; let idx = index\" \r\n\t\t\t\t\t\t [file]=\"file\" \r\n\t\t\t\t\t\t [allowDelete]=\"allowDelete\" \r\n\t\t\t\t\t\t [showPhotoGallery]=\"showPhotoGallery\" \r\n\t\t\t\t\t\t [showCheckbox]=\"showCheckboxes\" \r\n\t\t\t\t\t\t [thumbnailSize]=\"thumbnailSize\" \r\n\t\t\t\t\t\t [confirmDelete]=\"confirmDelete\"\r\n\t\t\t\t\t\t (checkChanged)=\"onCheckChanged($event, idx)\" \r\n\t\t\t\t\t\t (fileClicked)=\"fileClicked($event, idx)\" \r\n\t\t\t\t\t\t (fileChanged)=\"onFileChange($event, idx)\" \r\n\t\t\t\t\t\t (fileDelete)=\"onFileDelete($event, idx)\"></slick-file-list-item>\r\n</div>\r\n\r\n<slick-photo-gallery #photoGalleryRef *ngIf=\"showPhotoGallery === true\" [files]=\"files\"></slick-photo-gallery>\r\n\r\n"
4466
4474
  },] }
4467
4475
  ];
4468
4476
  /** @nocollapse */
@@ -4473,6 +4481,7 @@
4473
4481
  showPhotoGallery: [{ type: core.Input, args: ["showPhotoGallery",] }],
4474
4482
  showCheckboxes: [{ type: core.Input, args: ["showCheckboxes",] }],
4475
4483
  thumbnailSize: [{ type: core.Input, args: ["thumbnailSize",] }],
4484
+ confirmDelete: [{ type: core.Input, args: ["confirmDelete",] }],
4476
4485
  filesEmitter: [{ type: core.Output, args: ["filesEmitter",] }],
4477
4486
  onFileDeleteEmitter: [{ type: core.Output, args: ["onFileDelete",] }],
4478
4487
  onFileCheckChanged: [{ type: core.Output, args: ["onFileCheckChanged",] }],
@@ -4490,6 +4499,7 @@
4490
4499
  this.allowDelete = true;
4491
4500
  this.showPhotoGallery = false;
4492
4501
  this.showCheckbox = false;
4502
+ this.confirmDelete = true;
4493
4503
  this.fileChangeEmitter = new core.EventEmitter();
4494
4504
  this.fileDeleteEmitter = new core.EventEmitter();
4495
4505
  this.fileClicked = new core.EventEmitter();
@@ -4513,6 +4523,7 @@
4513
4523
  this.showPhotoGallery = (changes.showPhotoGallery.currentValue.toString().toLowerCase() !== 'false');
4514
4524
  if (changes.showCheckbox && changes.showCheckbox.currentValue)
4515
4525
  this.showCheckbox = (changes.showCheckbox.currentValue.toString().toLowerCase() !== 'false');
4526
+ this.confirmDelete = (this.confirmDelete.toString() === 'true') ? true : false;
4516
4527
  if (this.file && this.file.name && !this.file.thumbnailBase64Image && !this.file.url) {
4517
4528
  if (this.file.isChecked === null)
4518
4529
  this.file.isChecked = false;
@@ -4542,8 +4553,27 @@
4542
4553
  if (this.fileClicked)
4543
4554
  this.fileClicked.emit(this.file);
4544
4555
  };
4545
- SlickFileListItemComponent.prototype.deleteFile = function () {
4546
- this.fileDeleteEmitter.emit(this.file);
4556
+ SlickFileListItemComponent.prototype.deleteFile = function (e) {
4557
+ return __awaiter(this, void 0, void 0, function () {
4558
+ var result;
4559
+ return __generator(this, function (_b) {
4560
+ switch (_b.label) {
4561
+ case 0:
4562
+ e.stopPropagation();
4563
+ e.preventDefault();
4564
+ if (!(this.confirmDelete === false)) return [3 /*break*/, 1];
4565
+ this.fileDeleteEmitter.emit(this.file);
4566
+ return [3 /*break*/, 3];
4567
+ case 1: return [4 /*yield*/, this.deleteConfirmRef.confirm()];
4568
+ case 2:
4569
+ result = _b.sent();
4570
+ if (result === exports.SlickConfirmDialogResults.Ok)
4571
+ this.fileDeleteEmitter.emit(this.file);
4572
+ _b.label = 3;
4573
+ case 3: return [2 /*return*/];
4574
+ }
4575
+ });
4576
+ });
4547
4577
  };
4548
4578
  SlickFileListItemComponent.prototype.editTitle = function () {
4549
4579
  return __awaiter(this, void 0, void 0, function () {
@@ -4616,7 +4646,7 @@
4616
4646
  SlickFileListItemComponent.decorators = [
4617
4647
  { type: core.Component, args: [{
4618
4648
  selector: 'slick-file-list-item',
4619
- template: "<div class=\"slick-file-list-item\" id=\"slick-file-list-item_{{uuid}}\">\r\n\t<div class=\"slick-file-list-item_img card\" (click)=\"onClick()\" [ngStyle]=\"{ 'cursor': (showPhotoGallery === true) ? 'pointer' : 'default' }\" [style.minHeight.px]=\"itemSize + 2\" [style.minWidth.px]=\"itemSize\">\r\n\t\t<img *ngIf=\"file.thumbnailBase64Image\" [src]=\"file.thumbnailBase64Image\" [style.maxWidth.px]=\"itemImgSize\" [style.maxHeight.px]=\"itemImgSize\" />\r\n\t\t<img *ngIf=\"!file.thumbnailBase64Image && file.base64Image\" [src]=\"file.base64Image\" [style.maxWidth.px]=\"itemImgSize\" [style.maxHeight.px]=\"itemImgSize\" />\r\n\t\t<img *ngIf=\"!file.thumbnailBase64Image && !file.base64Image && file.thumbnailUrl\" [src]=\"file.thumbnailUrl\" [style.maxWidth.px]=\"itemImgSize\" [style.maxHeight.px]=\"itemImgSize\" />\r\n\t\t<img *ngIf=\"!file.thumbnailBase64Image && !file.base64Image && !file.thumbnailUrl && file.url\" [src]=\"file.url\" [style.maxWidth.px]=\"itemImgSize\" [style.maxHeight.px]=\"itemImgSize\" />\r\n\t\t<i *ngIf=\"allowDelete\" class=\"fas fa-times-circle bg-white text-danger\" (click)=\"deleteFile()\"></i>\r\n\t</div>\r\n\t<div class=\"slick-file-list-item_title\" *ngIf=\"fileDateFormatted\" [style.minWidth.px]=\"itemSize\" [style.maxWidth.px]=\"itemSize\">\r\n\t\t<div class=\"slick-file-list-item_date\" *ngIf=\"fileDateFormatted\" [style.minWidth.px]=\"itemSize\">{{fileDateFormatted}}</div>\r\n\t</div>\r\n\t<div class=\"slick-file-list-item_title\" [style.minWidth.px]=\"itemSize\" [style.maxWidth.px]=\"itemSize\">\r\n\t\t<div class=\"slick-file-list-item_display-title\" #titleDivRef style=\"cursor: pointer\" *ngIf=\"!isEditing\" (click)=\"editTitle()\">{{file.title}}</div>\r\n\t\t<div #editTitleDivRef class=\"slick-file-list-item_edit-title\" *ngIf=\"isEditing\"><input #editTitleInputRef type=\"text\" class=\"form-control\" [(ngModel)]=\"tempTitle\" (keydown)=\"onKeyDown($event)\" [style.width.px]=\"itemSize\" /></div>\r\n\t</div>\r\n\r\n\t<!-- We want the user to be able to click just a little outside of the checkbox and still have it check -->\r\n\t<div *ngIf=\"showCheckbox === true\" class=\"slick-file-checkbox\" (click)=\"onCheckboxClicked($event)\">\r\n\t\t<input type=\"checkbox\" [ngModel]=\"file.isChecked\" />\r\n\t</div>\r\n</div>\r\n"
4649
+ template: "<div class=\"slick-file-list-item\" id=\"slick-file-list-item_{{uuid}}\">\r\n\t<div class=\"slick-file-list-item_img card\" (click)=\"onClick()\" [ngStyle]=\"{ 'cursor': (showPhotoGallery === true) ? 'pointer' : 'default' }\" [style.minHeight.px]=\"itemSize + 2\" [style.minWidth.px]=\"itemSize\">\r\n\t\t<img *ngIf=\"file.thumbnailBase64Image\" [src]=\"file.thumbnailBase64Image\" [style.maxWidth.px]=\"itemImgSize\" [style.maxHeight.px]=\"itemImgSize\" />\r\n\t\t<img *ngIf=\"!file.thumbnailBase64Image && file.base64Image\" [src]=\"file.base64Image\" [style.maxWidth.px]=\"itemImgSize\" [style.maxHeight.px]=\"itemImgSize\" />\r\n\t\t<img *ngIf=\"!file.thumbnailBase64Image && !file.base64Image && file.thumbnailUrl\" [src]=\"file.thumbnailUrl\" [style.maxWidth.px]=\"itemImgSize\" [style.maxHeight.px]=\"itemImgSize\" />\r\n\t\t<img *ngIf=\"!file.thumbnailBase64Image && !file.base64Image && !file.thumbnailUrl && file.url\" [src]=\"file.url\" [style.maxWidth.px]=\"itemImgSize\" [style.maxHeight.px]=\"itemImgSize\" />\r\n\t\t<i *ngIf=\"allowDelete\" class=\"fas fa-times-circle bg-white text-danger\" (click)=\"deleteFile($event)\"></i>\r\n\t</div>\r\n\t<div class=\"slick-file-list-item_title\" *ngIf=\"fileDateFormatted\" [style.minWidth.px]=\"itemSize\" [style.maxWidth.px]=\"itemSize\">\r\n\t\t<div class=\"slick-file-list-item_date\" *ngIf=\"fileDateFormatted\" [style.minWidth.px]=\"itemSize\">{{fileDateFormatted}}</div>\r\n\t</div>\r\n\t<div class=\"slick-file-list-item_title\" [style.minWidth.px]=\"itemSize\" [style.maxWidth.px]=\"itemSize\">\r\n\t\t<div class=\"slick-file-list-item_display-title\" #titleDivRef style=\"cursor: pointer\" *ngIf=\"!isEditing\" (click)=\"editTitle()\">{{file.title}}</div>\r\n\t\t<div #editTitleDivRef class=\"slick-file-list-item_edit-title\" *ngIf=\"isEditing\"><input #editTitleInputRef type=\"text\" class=\"form-control\" [(ngModel)]=\"tempTitle\" (keydown)=\"onKeyDown($event)\" [style.width.px]=\"itemSize\" /></div>\r\n\t</div>\r\n\r\n\t<!-- We want the user to be able to click just a little outside of the checkbox and still have it check -->\r\n\t<div *ngIf=\"showCheckbox === true\" class=\"slick-file-checkbox\" (click)=\"onCheckboxClicked($event)\">\r\n\t\t<input type=\"checkbox\" [ngModel]=\"file.isChecked\" />\r\n\t</div>\r\n</div>\r\n\r\n<slick-confirm-dialog #deleteConfirmRef>\r\n\t<h4 class=\"p-0 m-0 text-danger\">Are you sure you want to delete?</h4>\r\n</slick-confirm-dialog>"
4620
4650
  },] }
4621
4651
  ];
4622
4652
  /** @nocollapse */
@@ -4627,13 +4657,15 @@
4627
4657
  showPhotoGallery: [{ type: core.Input, args: ["showPhotoGallery",] }],
4628
4658
  showCheckbox: [{ type: core.Input, args: ["showCheckbox",] }],
4629
4659
  thumbnailSize: [{ type: core.Input, args: ["thumbnailSize",] }],
4660
+ confirmDelete: [{ type: core.Input, args: ["confirmDelete",] }],
4630
4661
  fileChangeEmitter: [{ type: core.Output, args: ["fileChange",] }],
4631
4662
  fileDeleteEmitter: [{ type: core.Output, args: ["fileDelete",] }],
4632
4663
  fileClicked: [{ type: core.Output, args: ["fileClicked",] }],
4633
4664
  checkChanged: [{ type: core.Output, args: ["checkChanged",] }],
4634
4665
  titleDivRef: [{ type: core.ViewChild, args: ["titleDivRef",] }],
4635
4666
  editTitleDivRef: [{ type: core.ViewChild, args: ["editTitleDivRef",] }],
4636
- editTitleInputRef: [{ type: core.ViewChild, args: ["editTitleInputRef",] }]
4667
+ editTitleInputRef: [{ type: core.ViewChild, args: ["editTitleInputRef",] }],
4668
+ deleteConfirmRef: [{ type: core.ViewChild, args: ["deleteConfirmRef",] }]
4637
4669
  };
4638
4670
 
4639
4671
  var SlickPhotoGalleryModel = /** @class */ (function () {
@@ -4772,7 +4804,7 @@
4772
4804
  }());
4773
4805
  SlickFileListModule.decorators = [
4774
4806
  { type: core.NgModule, args: [{
4775
- imports: [common.CommonModule, forms.FormsModule, SlickPhotoGalleryModule],
4807
+ imports: [common.CommonModule, forms.FormsModule, SlickConfirmDialogModule, SlickPhotoGalleryModule],
4776
4808
  declarations: [SlickFileListComponent, SlickFileListItemComponent],
4777
4809
  exports: [common.CommonModule, forms.FormsModule, SlickFileListComponent]
4778
4810
  },] }
@@ -5518,6 +5550,11 @@
5518
5550
  SlickGridColumnSortDirection[SlickGridColumnSortDirection["asc"] = 1] = "asc";
5519
5551
  SlickGridColumnSortDirection[SlickGridColumnSortDirection["desc"] = 2] = "desc";
5520
5552
  })(exports.SlickGridColumnSortDirection || (exports.SlickGridColumnSortDirection = {}));
5553
+ var SlickGridColumnTitleOrientation;
5554
+ (function (SlickGridColumnTitleOrientation) {
5555
+ SlickGridColumnTitleOrientation[SlickGridColumnTitleOrientation["Horizontal"] = 0] = "Horizontal";
5556
+ SlickGridColumnTitleOrientation[SlickGridColumnTitleOrientation["Vertical"] = 1] = "Vertical";
5557
+ })(SlickGridColumnTitleOrientation || (SlickGridColumnTitleOrientation = {}));
5521
5558
  var SlickGridColumnModel = /** @class */ (function () {
5522
5559
  function SlickGridColumnModel() {
5523
5560
  this.sortable = true;
@@ -5534,6 +5571,9 @@
5534
5571
  gridColumn.columnKey = params.columnKey;
5535
5572
  if (params.title)
5536
5573
  gridColumn.title = params.title;
5574
+ gridColumn.titleOrientation = params.titleOrientation || SlickGridColumnTitleOrientation.Horizontal;
5575
+ if (params.titleHeight)
5576
+ gridColumn.titleHeight = params.titleHeight;
5537
5577
  if (params.dataFieldName)
5538
5578
  gridColumn.dataFieldName = params.dataFieldName;
5539
5579
  if (params.displayOrder !== null && params.displayOrder !== undefined)
@@ -5699,6 +5739,7 @@
5699
5739
  this.bordered = true;
5700
5740
  this.striped = true;
5701
5741
  this.hover = true;
5742
+ this.showingAllRecords = false;
5702
5743
  this.onRowSelected = new core.EventEmitter();
5703
5744
  this.onRowDoubleClick = new core.EventEmitter();
5704
5745
  this.onRowContextMenu = new core.EventEmitter();
@@ -5732,6 +5773,7 @@
5732
5773
  return __generator(this, function (_a) {
5733
5774
  switch (_a.label) {
5734
5775
  case 0:
5776
+ this.currentPage = 1;
5735
5777
  this.requestModel.page = 1;
5736
5778
  return [4 /*yield*/, this.resizeGrid()];
5737
5779
  case 1:
@@ -5749,82 +5791,8 @@
5749
5791
  };
5750
5792
  SlickGridComponent.prototype.ngOnInit = function () {
5751
5793
  return __awaiter(this, void 0, void 0, function () {
5752
- var favoriteNames, suffix, gridColumnsJson, columns, displayOrder_1, favoritesJson, sortColumn;
5753
- var _this = this;
5754
5794
  return __generator(this, function (_a) {
5755
- if (this.gridOptions.gridKey) {
5756
- if (this.gridOptions.favorites) {
5757
- favoriteNames = this.gridOptions.favorites.map(function (f) { return f.favoriteName; });
5758
- localStorage.setItem("GRID_" + this.gridOptions.gridKey + "_FAVORITES", JSON.stringify(favoriteNames));
5759
- this.gridOptions.favorites.forEach(function (favorite) {
5760
- // Make sure we haven't added a new column that needs to be saved
5761
- _this.gridOptions.columns.forEach(function (c) {
5762
- var columnExists = favorite.columns.findIndex(function (x) { return x.dataFieldName === c.dataFieldName; });
5763
- if (columnExists < 0)
5764
- favorite.columns.push(c);
5765
- });
5766
- var gridColumnsJSON = JSON.stringify(favorite.columns);
5767
- if (_this.gridOptions.gridKey) {
5768
- var suffix_1 = favorite.favoriteName === 'Default' ? '' : ('_' + favorite.favoriteName);
5769
- localStorage.setItem("GRID_" + _this.gridOptions.gridKey + "_COLUMNS" + suffix_1, gridColumnsJSON);
5770
- }
5771
- });
5772
- if (favoriteNames.indexOf(this.selectedFavorite) < 0)
5773
- this.selectedFavorite = "Default";
5774
- }
5775
- this.selectedFavorite = localStorage.getItem("GRID_" + this.gridOptions.gridKey + "_SELECTED_FAVORITE") || 'Default';
5776
- // Check to make sure we don't have any duplicate column names
5777
- this.gridOptions.columns.forEach(function (c1) {
5778
- var dataFieldCount = (_this.gridOptions.columns.filter(function (x) { return x.dataFieldName === c1.dataFieldName; }) || []).length;
5779
- if (dataFieldCount > 1)
5780
- console.error("Grid " + _this.gridOptions.gridKey + " column " + c1.dataFieldName + " is defined " + dataFieldCount + " times");
5781
- });
5782
- suffix = this.selectedFavorite === 'Default' ? '' : ('_' + this.selectedFavorite);
5783
- gridColumnsJson = localStorage.getItem("GRID_" + this.gridOptions.gridKey + "_COLUMNS" + suffix);
5784
- if (gridColumnsJson) {
5785
- columns = JSON.parse(gridColumnsJson);
5786
- displayOrder_1 = 0;
5787
- columns.forEach(function (c) {
5788
- var column = _this.gridOptions.columns.find(function (gridColumn) { return gridColumn.dataFieldName === c.dataFieldName; });
5789
- if (column) {
5790
- column.visible = c.visible;
5791
- column.displayOrder = displayOrder_1;
5792
- column.width = c.width;
5793
- column.flexible = c.flexible;
5794
- column.sortDirection = c.sortDirection;
5795
- column.isLocked = c.isLocked;
5796
- //column.filterType = c.filterType;
5797
- if (column.isLocked && column.filterType !== exports.SlickGridColumnFilterTypes.none) {
5798
- column.isFiltering = true;
5799
- if (column.filterType === exports.SlickGridColumnFilterTypes.text)
5800
- column.filterText = c.filterText;
5801
- else if (column.filterType === exports.SlickGridColumnFilterTypes.dropdown)
5802
- column.filterDropdownValue = c.filterDropdownValue;
5803
- if (!column.filterText && !column.filterDropdownValue) {
5804
- column.isFiltering = false;
5805
- column.isLocked = false;
5806
- column.filterText = null;
5807
- column.filterDropdownValue = null;
5808
- }
5809
- }
5810
- }
5811
- displayOrder_1++;
5812
- });
5813
- }
5814
- this.recordsPerPageValue = localStorage.getItem("GRID_" + this.gridOptions.gridKey + "_RECORDS_PER_PAGE") || "Auto";
5815
- favoritesJson = localStorage.getItem("GRID_" + this.gridOptions.gridKey + "_FAVORITES") || "[\"Default\"]";
5816
- this.favorites = JSON.parse(favoritesJson).map(function (favorite) {
5817
- return new DropDownModel(favorite);
5818
- });
5819
- }
5820
- this.visibleColumns = this.gridOptions.columns.filter(function (c) { return c.visible === true; });
5821
- this.visibleColumns = this.visibleColumns.sort(function (a, b) { return (a.displayOrder > b.displayOrder) ? 1 : (a.displayOrder < b.displayOrder) ? -1 : 0; });
5822
- this.showSearchRow = this.visibleColumns.filter(function (c) { return c.filterType !== exports.SlickGridColumnFilterTypes.none; }).length > 0;
5823
- sortColumn = this.visibleColumns.find(function (c) { return c.sortable === true && c.sortDirection > 0; });
5824
- if (this.visibleColumns.length > 0 && sortColumn) {
5825
- this.requestModel.sortColumn = sortColumn.dataFieldName;
5826
- this.requestModel.sortDirection = sortColumn.sortDirection;
5827
- }
5795
+ this.setGridOptions(this.gridOptions);
5828
5796
  return [2 /*return*/];
5829
5797
  });
5830
5798
  });
@@ -5919,6 +5887,7 @@
5919
5887
  this.striped = this.gridOptions.striped;
5920
5888
  if (this.gridOptions.hover !== null)
5921
5889
  this.hover = this.gridOptions.hover;
5890
+ this.setGridOptions(this.gridOptions);
5922
5891
  }
5923
5892
  if (!changes.data) return [3 /*break*/, 5];
5924
5893
  // If we don't do this lock, the first change will have null data and crash. The second request will have the actual data
@@ -6056,6 +6025,7 @@
6056
6025
  return __generator(this, function (_a) {
6057
6026
  switch (_a.label) {
6058
6027
  case 0:
6028
+ this.currentPage = pageNumber;
6059
6029
  this.requestModel.page = pageNumber;
6060
6030
  return [4 /*yield*/, this.reload(this.requestModel)];
6061
6031
  case 1:
@@ -6117,6 +6087,8 @@
6117
6087
  case 2:
6118
6088
  _a.sent();
6119
6089
  this.requestModel = requestModel;
6090
+ this.currentPage = 1;
6091
+ this.requestModel.page = 1;
6120
6092
  return [4 /*yield*/, this.reload(this.requestModel)];
6121
6093
  case 3:
6122
6094
  responseModel = _a.sent();
@@ -6133,7 +6105,7 @@
6133
6105
  };
6134
6106
  SlickGridComponent.prototype.reload = function (requestModel) {
6135
6107
  return __awaiter(this, void 0, void 0, function () {
6136
- var sortColumn, responseModel, error_3;
6108
+ var responseModel, error_3;
6137
6109
  return __generator(this, function (_a) {
6138
6110
  switch (_a.label) {
6139
6111
  case 0:
@@ -6141,35 +6113,7 @@
6141
6113
  return [4 /*yield*/, this.functionLockService.lock("GRID_" + this.uuid + "_RELOAD")];
6142
6114
  case 1:
6143
6115
  _a.sent();
6144
- requestModel.columnSearchValues = [];
6145
- this.gridOptions.columns.forEach(function (c) {
6146
- if (c.visible) {
6147
- if (c.filterType === exports.SlickGridColumnFilterTypes.text && c.filterText) {
6148
- c.filterText = c.filterText;
6149
- requestModel.columnSearchValues.push({
6150
- columnName: c.dataFieldName,
6151
- searchValueId: null,
6152
- searchValueText: c.filterText
6153
- });
6154
- }
6155
- else if (c.filterType === exports.SlickGridColumnFilterTypes.dropdown && c.filterDropdownValue) {
6156
- c.filterDropdownValue = c.filterDropdownValue;
6157
- requestModel.columnSearchValues.push({
6158
- columnName: c.dataFieldName,
6159
- searchValueId: c.filterDropdownValue,
6160
- searchValueText: null
6161
- });
6162
- }
6163
- }
6164
- });
6165
- requestModel.sortColumn = null;
6166
- sortColumn = this.gridOptions.columns.find(function (x) { return x.sortDirection === exports.SlickGridColumnSortDirection.asc || x.sortDirection === exports.SlickGridColumnSortDirection.desc; });
6167
- if (sortColumn) {
6168
- requestModel.sortColumn = (sortColumn.sortDirection === 0) ? null : sortColumn.dataFieldName;
6169
- requestModel.sortDirection = sortColumn.sortDirection;
6170
- }
6171
- if (requestModel.recordsPerPage <= 0)
6172
- requestModel.recordsPerPage = 20;
6116
+ requestModel = this.getRequestModel(this.requestModel);
6173
6117
  responseModel = null;
6174
6118
  if (!requestModel.url) return [3 /*break*/, 3];
6175
6119
  return [4 /*yield*/, this.gridService.getDataFromServer(requestModel)];
@@ -6231,6 +6175,7 @@
6231
6175
  }
6232
6176
  }
6233
6177
  this.saveColumnsToLocalStorage();
6178
+ this.currentPage = 1;
6234
6179
  this.requestModel.page = 1;
6235
6180
  return [4 /*yield*/, this.reload(this.requestModel)];
6236
6181
  case 1:
@@ -6265,6 +6210,7 @@
6265
6210
  else {
6266
6211
  column.isLocked = false;
6267
6212
  }
6213
+ this.currentPage = 1;
6268
6214
  this.requestModel.page = 1;
6269
6215
  return [4 /*yield*/, this.reload(this.requestModel)];
6270
6216
  case 1:
@@ -6308,6 +6254,7 @@
6308
6254
  searchValueText: column.filterText
6309
6255
  });
6310
6256
  }
6257
+ this.currentPage = 1;
6311
6258
  this.requestModel.page = 1;
6312
6259
  return [4 /*yield*/, this.reload(this.requestModel)];
6313
6260
  case 1:
@@ -6339,6 +6286,7 @@
6339
6286
  column.filterDropdownValue = null;
6340
6287
  this.requestModel.columnSearchValues = this.requestModel.columnSearchValues.filter(function (x) { return x.columnName !== column.dataFieldName; });
6341
6288
  this.saveColumnsToLocalStorage();
6289
+ this.currentPage = 1;
6342
6290
  this.requestModel.page = 1;
6343
6291
  return [4 /*yield*/, this.reload(this.requestModel)];
6344
6292
  case 1:
@@ -6492,11 +6440,13 @@
6492
6440
  var gridColumnsJson = localStorage.getItem("GRID_" + this.gridOptions.gridKey + "_COLUMNS" + suffix);
6493
6441
  if (gridColumnsJson) {
6494
6442
  var columns = JSON.parse(gridColumnsJson);
6495
- var displayOrder_2 = 0;
6443
+ var displayOrder_1 = 0;
6496
6444
  columns.forEach(function (c) {
6497
6445
  var column = _this.gridOptions.columns.find(function (gridColumn) { return gridColumn.dataFieldName === c.dataFieldName; });
6498
6446
  if (column) {
6499
- c.displayOrder = displayOrder_2;
6447
+ c.displayOrder = displayOrder_1;
6448
+ c.titleOrientation = column.titleOrientation;
6449
+ c.titleHeight = column.titleHeight;
6500
6450
  c.width = column.width;
6501
6451
  c.filterDropdownValue = column.filterDropdownValue;
6502
6452
  c.filterText = column.filterText;
@@ -6504,7 +6454,7 @@
6504
6454
  c.isFiltering = column.isFiltering;
6505
6455
  c.sortDirection = column.sortDirection;
6506
6456
  }
6507
- displayOrder_2++;
6457
+ displayOrder_1++;
6508
6458
  });
6509
6459
  columns = columns.sort(function (a, b) { return (a.displayOrder > b.displayOrder) ? 1 : (a.displayOrder < b.displayOrder) ? -1 : 0; });
6510
6460
  gridColumnsJSON = JSON.stringify(columns);
@@ -6579,12 +6529,137 @@
6579
6529
  });
6580
6530
  });
6581
6531
  };
6532
+ SlickGridComponent.prototype.addColumn = function (column, idx) {
6533
+ if (idx === void 0) { idx = null; }
6534
+ if (idx === null)
6535
+ this.gridOptions.columns.push(column);
6536
+ else
6537
+ this.gridOptions.columns.splice(idx, 0, column);
6538
+ this.setGridOptions(this.gridOptions);
6539
+ };
6540
+ SlickGridComponent.prototype.getRequestModel = function (requestModel) {
6541
+ if (requestModel === void 0) { requestModel = null; }
6542
+ if (!requestModel)
6543
+ requestModel = this.requestModel;
6544
+ requestModel.columnSearchValues = [];
6545
+ this.gridOptions.columns.forEach(function (c) {
6546
+ if (c.visible) {
6547
+ if (c.filterType === exports.SlickGridColumnFilterTypes.text && c.filterText) {
6548
+ c.filterText = c.filterText;
6549
+ requestModel.columnSearchValues.push({
6550
+ columnName: c.dataFieldName,
6551
+ searchValueId: null,
6552
+ searchValueText: c.filterText
6553
+ });
6554
+ }
6555
+ else if (c.filterType === exports.SlickGridColumnFilterTypes.dropdown && c.filterDropdownValue) {
6556
+ c.filterDropdownValue = c.filterDropdownValue;
6557
+ requestModel.columnSearchValues.push({
6558
+ columnName: c.dataFieldName,
6559
+ searchValueId: c.filterDropdownValue,
6560
+ searchValueText: null
6561
+ });
6562
+ }
6563
+ }
6564
+ });
6565
+ requestModel.sortColumn = null;
6566
+ var sortColumn = this.gridOptions.columns.find(function (x) { return x.sortDirection === exports.SlickGridColumnSortDirection.asc || x.sortDirection === exports.SlickGridColumnSortDirection.desc; });
6567
+ if (sortColumn) {
6568
+ requestModel.sortColumn = (sortColumn.sortDirection === 0) ? null : sortColumn.dataFieldName;
6569
+ requestModel.sortDirection = sortColumn.sortDirection;
6570
+ }
6571
+ if (requestModel.recordsPerPage <= 0)
6572
+ requestModel.recordsPerPage = 20;
6573
+ return this.requestModel;
6574
+ };
6575
+ SlickGridComponent.prototype.setGridOptions = function (gridOptions) {
6576
+ var _this = this;
6577
+ this.gridOptions = gridOptions;
6578
+ if (this.gridOptions.gridKey) {
6579
+ if (this.gridOptions.favorites) {
6580
+ var favoriteNames = this.gridOptions.favorites.map(function (f) { return f.favoriteName; });
6581
+ localStorage.setItem("GRID_" + this.gridOptions.gridKey + "_FAVORITES", JSON.stringify(favoriteNames));
6582
+ this.gridOptions.favorites.forEach(function (favorite) {
6583
+ // Make sure we haven't added a new column that needs to be saved
6584
+ _this.gridOptions.columns.forEach(function (c) {
6585
+ var columnExists = favorite.columns.findIndex(function (x) { return x.dataFieldName === c.dataFieldName; });
6586
+ if (columnExists < 0)
6587
+ favorite.columns.push(c);
6588
+ });
6589
+ var gridColumnsJSON = JSON.stringify(favorite.columns);
6590
+ if (_this.gridOptions.gridKey) {
6591
+ var suffix_1 = favorite.favoriteName === 'Default' ? '' : ('_' + favorite.favoriteName);
6592
+ localStorage.setItem("GRID_" + _this.gridOptions.gridKey + "_COLUMNS" + suffix_1, gridColumnsJSON);
6593
+ }
6594
+ });
6595
+ if (favoriteNames.indexOf(this.selectedFavorite) < 0)
6596
+ this.selectedFavorite = "Default";
6597
+ }
6598
+ this.selectedFavorite = localStorage.getItem("GRID_" + this.gridOptions.gridKey + "_SELECTED_FAVORITE") || 'Default';
6599
+ // Check to make sure we don't have any duplicate column names
6600
+ this.gridOptions.columns.forEach(function (c1) {
6601
+ var dataFieldCount = (_this.gridOptions.columns.filter(function (x) { return x.dataFieldName === c1.dataFieldName; }) || []).length;
6602
+ if (dataFieldCount > 1)
6603
+ console.error("Grid " + _this.gridOptions.gridKey + " column " + c1.dataFieldName + " is defined " + dataFieldCount + " times");
6604
+ });
6605
+ var suffix = this.selectedFavorite === 'Default' ? '' : ('_' + this.selectedFavorite);
6606
+ var gridColumnsJson = localStorage.getItem("GRID_" + this.gridOptions.gridKey + "_COLUMNS" + suffix);
6607
+ if (gridColumnsJson) {
6608
+ var columns = JSON.parse(gridColumnsJson);
6609
+ var displayOrder_2 = 0;
6610
+ columns.forEach(function (c) {
6611
+ var column = _this.gridOptions.columns.find(function (gridColumn) { return gridColumn.dataFieldName === c.dataFieldName; });
6612
+ if (column) {
6613
+ column.visible = c.visible;
6614
+ column.displayOrder = displayOrder_2;
6615
+ column.titleOrientation = c.titleOrientation;
6616
+ column.titleHeight = c.titleHeight;
6617
+ column.width = c.width;
6618
+ column.flexible = c.flexible;
6619
+ column.sortDirection = c.sortDirection;
6620
+ column.isLocked = c.isLocked;
6621
+ //column.filterType = c.filterType;
6622
+ if (column.isLocked && column.filterType !== exports.SlickGridColumnFilterTypes.none) {
6623
+ column.isFiltering = true;
6624
+ if (column.filterType === exports.SlickGridColumnFilterTypes.text)
6625
+ column.filterText = c.filterText;
6626
+ else if (column.filterType === exports.SlickGridColumnFilterTypes.dropdown)
6627
+ column.filterDropdownValue = c.filterDropdownValue;
6628
+ if (!column.filterText && !column.filterDropdownValue) {
6629
+ column.isFiltering = false;
6630
+ column.isLocked = false;
6631
+ column.filterText = null;
6632
+ column.filterDropdownValue = null;
6633
+ }
6634
+ }
6635
+ }
6636
+ displayOrder_2++;
6637
+ });
6638
+ }
6639
+ if (this.gridOptions.defaultRecordsPerPage && !localStorage.getItem("GRID_" + this.gridOptions.gridKey + "_RECORDS_PER_PAGE"))
6640
+ this.recordsPerPageValue = this.gridOptions.defaultRecordsPerPage.toString();
6641
+ else
6642
+ this.recordsPerPageValue = localStorage.getItem("GRID_" + this.gridOptions.gridKey + "_RECORDS_PER_PAGE") || "Auto";
6643
+ var favoritesJson = localStorage.getItem("GRID_" + this.gridOptions.gridKey + "_FAVORITES") || "[\"Default\"]";
6644
+ this.favorites = JSON.parse(favoritesJson).map(function (favorite) {
6645
+ return new DropDownModel(favorite);
6646
+ });
6647
+ }
6648
+ this.visibleColumns = this.gridOptions.columns.filter(function (c) { return c.visible === true; });
6649
+ this.visibleColumns = this.visibleColumns.sort(function (a, b) { return (a.displayOrder > b.displayOrder) ? 1 : (a.displayOrder < b.displayOrder) ? -1 : 0; });
6650
+ this.showSearchRow = this.visibleColumns.filter(function (c) { return c.filterType !== exports.SlickGridColumnFilterTypes.none; }).length > 0;
6651
+ var sortColumn = this.visibleColumns.find(function (c) { return c.sortable === true && c.sortDirection > 0; });
6652
+ if (this.visibleColumns.length > 0 && sortColumn) {
6653
+ this.requestModel.sortColumn = sortColumn.dataFieldName;
6654
+ this.requestModel.sortDirection = sortColumn.sortDirection;
6655
+ }
6656
+ };
6582
6657
  return SlickGridComponent;
6583
6658
  }());
6584
6659
  SlickGridComponent.decorators = [
6585
6660
  { type: core.Component, args: [{
6586
6661
  selector: 'slick-grid',
6587
- template: "<div id=\"slick-grid_{{uuid}}\" class=\"slick-grid d-flex flex-column flex-fill\" style=\"position: absolute; left: 0; top: 0; right: 0; bottom: 0;\" #slickGrid>\r\n\t<div #tableContainer class=\"d-flex flex-fill\" style=\"overflow: auto\">\r\n\r\n\t\t<div>\r\n\t\t\t<table #tableRef class=\"table table-sm\" [class.table-bordered]=\"bordered\" [class.table-borderless]=\"!bordered\" [class.table-striped]=\"striped\" [class.table-hover]=\"hover\" [style.opacity]=\"gridOpacity\" style=\"margin: 0; padding: 0;\" (keydown)=\"tableKeydown($event)\" tabindex=\"0\">\r\n\t\t\t\t<thead>\r\n\t\t\t\t\t<tr #tableHeaderRow (mousemove)=\"onColResizeMousemove($event)\" [ngClass]=\"{ 'resizing': isResizing === true }\">\r\n\t\t\t\t\t\t<td *ngFor=\"let column of visibleColumns; let idx = index\" [style.width]=\"column.width\" [style.maxWidth]=\"column.width\">\r\n\t\t\t\t\t\t\t<div *ngIf=\"idx > 0 && idx < visibleColumns.length\" class=\"resize_column_left\" [class.table-bordered]=\"bordered\" (mousedown)=\"onColResizeMousedown($event, idx - 1)\" (dblclick)=\"onColResizeDoubleclick($event, idx - 1)\"></div>\r\n\t\t\t\t\t\t\t<span class=\"sortIcon\" *ngIf=\"column.sortable === true && column.sortDirection > 0\"><i class=\"far\" [ngClass]=\"{'fa-caret-up': column.sortDirection === 1, 'fa-caret-down': column.sortDirection === 2}\"></i>&nbsp;</span>\r\n\t\t\t\t\t\t\t<a href=\"javascript:void(0)\" *ngIf=\"column.sortable === true\" (click)=\"sortBy(column)\" draggable=\"false\">{{column.title}}</a>\r\n\t\t\t\t\t\t\t<div *ngIf=\"column.sortable === false\">{{column.title}}</div>\r\n\t\t\t\t\t\t\t<div class=\"resize_column_right\" (mousedown)=\"onColResizeMousedown($event, idx)\" (dblclick)=\"onColResizeDoubleclick($event, idx)\"></div>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr #tableHeaderSearchRow *ngIf=\"showSearchRow === true\">\r\n\t\t\t\t\t\t<td *ngFor=\"let column of visibleColumns\">\r\n\t\t\t\t\t\t\t<div class=\"slick-grid_search-column\">\r\n\t\t\t\t\t\t\t\t<i *ngIf=\"column.isFiltering\" class=\"fas fa-times-circle bg-white text-danger mr-1\" (click)=\"resetFilter(column)\"></i>\r\n\t\t\t\t\t\t\t\t<i *ngIf=\"column.isFiltering && column.isLocked\" class=\"far fa-lock mr-1\" (click)=\"toggleLock(column)\"></i>\r\n\t\t\t\t\t\t\t\t<i *ngIf=\"column.isFiltering && !column.isLocked\" class=\"far fa-lock-open mr-1\" (click)=\"toggleLock(column)\"></i>\r\n\t\t\t\t\t\t\t\t<div *ngIf=\"column.filterType === 1\" class=\"slick-grid_text-search\">\r\n\t\t\t\t\t\t\t\t\t<input autocomplete=\"nope\" type=\"text\" class=\"form-control\" [(ngModel)]=\"column.filterText\" name=\"searchText\" placeholder=\"Search...\" (keydown)=\"onSearch(column)\" />\r\n\t\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t\t<div *ngIf=\"column.filterType === 2\" class=\"input-group slick-grid_drop-down-search\">\r\n\t\t\t\t\t\t\t\t\t<slick-drop-down [items]=\"column.filterDropdownValues\" [(ngModel)]=\"column.filterDropdownValue\" listWidth=\"auto\" placeholder=\"Search...\" (onSelect)=\"onSearchSelect($event, column)\"></slick-drop-down>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</thead>\r\n\r\n\t\t\t\t<tbody>\r\n\t\t\t\t\t<tr *ngIf=\"loaded && visibleData.length === 0\"><td [colSpan]=\"visibleColumns.length\">No Data</td></tr>\r\n\t\t\t\t\t<tr *ngFor=\"let rowData of visibleData; let idx = index\" #tableBodyRows (click)=\"onRowClicked(rowData, idx)\" (dblclick)=\"onRowDoubleClicked(rowData, idx)\" (contextmenu)=\"onRowContextMenuClicked($event, rowData, idx)\" [class.table-success]=\"selectedIndex === idx\">\r\n\t\t\t\t\t\t<td *ngFor=\"let column of visibleColumns\">\r\n\t\t\t\t\t\t\t<div *ngIf=\"!column.columnKey\" class=\"slick-grid_column-content\" [style.width]=\"column.width\" [style.maxWidth]=\"column.width\" [innerHTML]=\"getColumnHTML(rowData, column.dataFieldName) | slickGridSanitizeHtml\"></div>\r\n\t\t\t\t\t\t\t<div *ngIf=\"column.columnKey\" class=\"slick-grid_column-content\" [style.width]=\"column.width\" [style.maxWidth]=\"column.width\">\r\n\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"templateRefs[column.columnKey], context: { $implicit: rowData }\">\r\n\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</tbody>\r\n\t\t\t</table>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\r\n\t<div class=\"slick-grid-footer mt-2 d-flex\">\r\n\t\t<div>\r\n\t\t\t<button type=\"button\" (click)=\"openColumnSelectDialog()\" class=\"btn btn-outline-primary\"><i class=\"far fa-columns\"></i></button>\r\n\t\t</div>\r\n\t\t<div *ngIf=\"favorites?.length > 1\">\r\n\t\t\t<button #favoriteSelectRef type=\"button\" class=\"btn btn-outline-primary ml-1\"><i class=\"far fa-star\"></i> {{this.selectedFavorite}}</button>\r\n\t\t\t<slick-popover [element]=\"favoriteSelectRef\" position=\"top\" showArrow=\"false\" [topOffsetPx]=\"0\" [leftOffsetPx]=\"0\" [showByClick]=\"true\">\r\n\t\t\t\t<table class=\"table-borderless table-sm table-hover\" style=\"min-width: 250px; cursor: default\">\r\n\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t<tr *ngFor=\"let favorite of favorites\" (click)=\"setFavorite(favorite.text)\">\r\n\t\t\t\t\t\t\t<td><i *ngIf=\"favorite.text === selectedFavorite\" class=\"far fa-star mr-1\"></i>{{favorite.text}}</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t</tbody>\r\n\t\t\t\t</table>\r\n\t\t\t</slick-popover>\r\n\t\t</div>\r\n\t\t<div>\r\n\t\t\t<slick-paging [(pageNumber)]=\"currentPage\" [totalRecords]=\"totalRecords\" [recordsPerPage]=\"recordsPerPage\" (onPageChange)=\"onPageChange($event)\"></slick-paging>\r\n\t\t</div>\r\n\t\t<div class=\"ml-1\">\r\n\t\t\t<button #recordsPerPageRef type=\"button\" class=\"btn btn-outline-primary\">{{recordsPerPageValue}}&nbsp;&nbsp;<i style=\"font-size: 12px\" class=\"far fa-chevron-down\"></i></button>\r\n\r\n\t\t\t<slick-popover [element]=\"recordsPerPageRef\" position=\"top\" showArrow=\"false\" [topOffsetPx]=\"0\" [leftOffsetPx]=\"0\" [showByClick]=\"true\">\r\n\t\t\t\t<table class=\"table-borderless table-sm table-hover\" style=\"min-width: 150px;\">\r\n\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t<tr (click)=\"onRecordsPerPageSelected('Auto')\"><td>Auto</td></tr>\r\n\t\t\t\t\t\t<tr (click)=\"onRecordsPerPageSelected('25')\"><td>25</td></tr>\r\n\t\t\t\t\t\t<tr (click)=\"onRecordsPerPageSelected('50')\"><td>50</td></tr>\r\n\t\t\t\t\t\t<tr (click)=\"onRecordsPerPageSelected('100')\"><td>100</td></tr>\r\n\t\t\t\t\t</tbody>\r\n\t\t\t\t</table>\r\n\t\t\t</slick-popover>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n\r\n<slick-dialog #columnSelectDialogRef header=\"Select Columns\">\r\n\t<div style=\"text-align: center; width: 475px;\" class=\"mx-5\">\r\n\t\t<div class=\"d-flex\">\r\n\t\t\t<div class=\"flex-fill\">\r\n\t\t\t\t<slick-drop-down [items]=\"favorites\"\r\n\t\t\t\t\t\t\t\t [ngModel]=\"selectedFavorite\"\r\n\t\t\t\t\t\t\t\t (onSelect)=\"loadFavorite($event)\"></slick-drop-down>\r\n\t\t\t</div>\r\n\t\t\t<div><button class=\"btn btn-outline-primary ml-1\" (click)=\"addNewFavorite()\"><i class=\"far fa-plus\"></i></button></div>\r\n\t\t</div>\r\n\t\t<div class=\"d-flex flex-column mt-1\" slick-drop-list (onSlickDropListReorder)=\"onColumnReorder($event)\">\r\n\t\t\t<div *ngFor=\"let column of columnSelectDialogColumns\" class=\"d-flex\" slick-drop-list-item>\r\n\t\t\t\t<div style=\"width: 20px\"><input type=\"checkbox\" style=\"position: relative; top: 2px;\" [(ngModel)]=\"column.visible\" /></div>\r\n\t\t\t\t<div class=\"py-0 flex-fill\" style=\"text-align: left; cursor: ns-resize\" slick-drop-list-grab>{{column.title}}</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<slick-dialog-footer>\r\n\t\t<div style=\"margin-top: 10px;\" class=\"col-12 text-center mb-2 mt-1\">\r\n\t\t\t<button type=\"button\" (click)=\"onSaveColumns()\" class=\"btn btn-outline-primary mr-1\"><i class=\"far fa-save\"></i>&nbsp;Save</button>&nbsp;\r\n\t\t\t<button type=\"button\" class=\"btn btn-outline-danger\" (click)=\"onCancelColumns()\">Cancel</button>\r\n\t\t</div>\r\n\t</slick-dialog-footer>\r\n</slick-dialog>\r\n\r\n\r\n<slick-confirm-dialog #addNewFavoriteDialogRef width=\"300\">\r\n\t<label>Enter new favorite name</label>\r\n\t<input type=\"text\" class=\"form-control mx-3\" style=\"width: 250px\" [(ngModel)]=\"newFavoriteText\" />\r\n</slick-confirm-dialog>",
6662
+ template: "<div id=\"slick-grid_{{uuid}}\" class=\"slick-grid d-flex flex-column flex-fill\" style=\"position: absolute; left: 0; top: 0; right: 0; bottom: 0;\" #slickGrid>\r\n\t<div #tableContainer class=\"d-flex flex-fill\" style=\"overflow: auto\">\r\n\r\n\t\t<div>\r\n\t\t\t<table #tableRef class=\"table table-sm\" [class.table-bordered]=\"bordered\" [class.table-borderless]=\"!bordered\" [class.table-striped]=\"striped\" [class.table-hover]=\"hover\" [style.opacity]=\"gridOpacity\" style=\"margin: 0; padding: 0;\" (keydown)=\"tableKeydown($event)\" tabindex=\"0\">\r\n\t\t\t\t<thead>\r\n\t\t\t\t\t<tr #tableHeaderRow (mousemove)=\"onColResizeMousemove($event)\" [ngClass]=\"{ 'resizing': isResizing === true }\">\r\n\t\t\t\t\t\t<td *ngFor=\"let column of visibleColumns; let idx = index\" [style.width]=\"column.width\" [style.maxWidth]=\"column.width\" [style.height]=\"column.titleHeight\">\r\n\t\t\t\t\t\t\t<div [ngClass]=\"{ 'slick-grid_title-vertical' : column.titleOrientation === 1 }\">\r\n\t\t\t\t\t\t\t\t<div *ngIf=\"idx > 0 && idx < visibleColumns.length\" class=\"resize_column_left\" [class.table-bordered]=\"bordered\" (mousedown)=\"onColResizeMousedown($event, idx - 1)\" (dblclick)=\"onColResizeDoubleclick($event, idx - 1)\"></div>\r\n\t\t\t\t\t\t\t\t<span class=\"sortIcon\" *ngIf=\"column.sortable === true && column.sortDirection > 0\"><i class=\"far\" [ngClass]=\"{'fa-caret-up': column.sortDirection === 1, 'fa-caret-down': column.sortDirection === 2}\"></i>&nbsp;</span>\r\n\t\t\t\t\t\t\t\t<a href=\"javascript:void(0)\" *ngIf=\"column.sortable === true\" (click)=\"sortBy(column)\" draggable=\"false\" title=\"{{column.title}}\">{{column.title}}</a>\r\n\t\t\t\t\t\t\t\t<div *ngIf=\"column.sortable === false\" title=\"{{column.title}}\">{{column.title}}</div>\r\n\t\t\t\t\t\t\t\t<div class=\"resize_column_right\" (mousedown)=\"onColResizeMousedown($event, idx)\" (dblclick)=\"onColResizeDoubleclick($event, idx)\"></div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr #tableHeaderSearchRow *ngIf=\"showSearchRow === true\">\r\n\t\t\t\t\t\t<td *ngFor=\"let column of visibleColumns\">\r\n\t\t\t\t\t\t\t<div class=\"slick-grid_search-column\">\r\n\t\t\t\t\t\t\t\t<i *ngIf=\"column.isFiltering\" class=\"fas fa-times-circle bg-white text-danger mr-1\" (click)=\"resetFilter(column)\"></i>\r\n\t\t\t\t\t\t\t\t<i *ngIf=\"column.isFiltering && column.isLocked\" class=\"far fa-lock mr-1\" (click)=\"toggleLock(column)\"></i>\r\n\t\t\t\t\t\t\t\t<i *ngIf=\"column.isFiltering && !column.isLocked\" class=\"far fa-lock-open mr-1\" (click)=\"toggleLock(column)\"></i>\r\n\t\t\t\t\t\t\t\t<div *ngIf=\"column.filterType === 1\" class=\"slick-grid_text-search\">\r\n\t\t\t\t\t\t\t\t\t<input autocomplete=\"nope\" type=\"text\" class=\"form-control\" [(ngModel)]=\"column.filterText\" name=\"searchText\" placeholder=\"Search...\" (keydown)=\"onSearch(column)\" />\r\n\t\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t\t<div *ngIf=\"column.filterType === 2\" class=\"input-group slick-grid_drop-down-search\">\r\n\t\t\t\t\t\t\t\t\t<slick-drop-down [items]=\"column.filterDropdownValues\" [(ngModel)]=\"column.filterDropdownValue\" listWidth=\"auto\" placeholder=\"Search...\" (onSelect)=\"onSearchSelect($event, column)\"></slick-drop-down>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</thead>\r\n\r\n\t\t\t\t<tbody>\r\n\t\t\t\t\t<tr *ngIf=\"loaded && visibleData.length === 0\"><td [colSpan]=\"visibleColumns.length\">No Data</td></tr>\r\n\t\t\t\t\t<tr *ngFor=\"let rowData of visibleData; let idx = index\" #tableBodyRows (click)=\"onRowClicked(rowData, idx)\" (dblclick)=\"onRowDoubleClicked(rowData, idx)\" (contextmenu)=\"onRowContextMenuClicked($event, rowData, idx)\" [class.table-success]=\"selectedIndex === idx\">\r\n\t\t\t\t\t\t<td *ngFor=\"let column of visibleColumns\">\r\n\t\t\t\t\t\t\t<div *ngIf=\"!column.columnKey\" class=\"slick-grid_column-content\" [style.width]=\"column.width\" [style.maxWidth]=\"column.width\" [innerHTML]=\"getColumnHTML(rowData, column.dataFieldName) | slickGridSanitizeHtml\"></div>\r\n\t\t\t\t\t\t\t<div *ngIf=\"column.columnKey\" class=\"slick-grid_column-content\" [style.width]=\"column.width\" [style.maxWidth]=\"column.width\">\r\n\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"templateRefs[column.columnKey], context: { $implicit: rowData }\">\r\n\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</tbody>\r\n\t\t\t</table>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\r\n\t<div class=\"slick-grid-footer mt-2 d-flex\">\r\n\t\t<div>\r\n\t\t\t<button type=\"button\" (click)=\"openColumnSelectDialog()\" class=\"btn btn-outline-primary\"><i class=\"far fa-columns\"></i></button>\r\n\t\t</div>\r\n\t\t<div *ngIf=\"favorites?.length > 1\">\r\n\t\t\t<button #favoriteSelectRef type=\"button\" class=\"btn btn-outline-primary ml-1\"><i class=\"far fa-star\"></i> {{this.selectedFavorite}}</button>\r\n\t\t\t<slick-popover [element]=\"favoriteSelectRef\" position=\"top\" showArrow=\"false\" [topOffsetPx]=\"0\" [leftOffsetPx]=\"0\" [showByClick]=\"true\">\r\n\t\t\t\t<table class=\"table-borderless table-sm table-hover\" style=\"min-width: 250px; cursor: default\">\r\n\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t<tr *ngFor=\"let favorite of favorites\" (click)=\"setFavorite(favorite.text)\">\r\n\t\t\t\t\t\t\t<td><i *ngIf=\"favorite.text === selectedFavorite\" class=\"far fa-star mr-1\"></i>{{favorite.text}}</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t</tbody>\r\n\t\t\t\t</table>\r\n\t\t\t</slick-popover>\r\n\t\t</div>\r\n\t\t<div *ngIf=\"showingAllRecords == false\">\r\n\t\t\t<slick-paging [(pageNumber)]=\"currentPage\" [totalRecords]=\"totalRecords\" [recordsPerPage]=\"recordsPerPage\" (onPageChange)=\"onPageChange($event)\"></slick-paging>\r\n\t\t</div>\r\n\t\t<div *ngIf=\"showingAllRecords == false\" class=\"ml-1\">\r\n\t\t\t<button #recordsPerPageRef type=\"button\" class=\"btn btn-outline-primary\">{{recordsPerPageValue}}&nbsp;&nbsp;<i style=\"font-size: 12px\" class=\"far fa-chevron-down\"></i></button>\r\n\r\n\t\t\t<slick-popover [element]=\"recordsPerPageRef\" position=\"top\" showArrow=\"false\" [topOffsetPx]=\"0\" [leftOffsetPx]=\"0\" [showByClick]=\"true\">\r\n\t\t\t\t<table class=\"table-borderless table-sm table-hover\" style=\"min-width: 150px;\">\r\n\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t<tr (click)=\"onRecordsPerPageSelected('Auto')\"><td>Auto</td></tr>\r\n\t\t\t\t\t\t<tr (click)=\"onRecordsPerPageSelected('25')\"><td>25</td></tr>\r\n\t\t\t\t\t\t<tr (click)=\"onRecordsPerPageSelected('50')\"><td>50</td></tr>\r\n\t\t\t\t\t\t<tr (click)=\"onRecordsPerPageSelected('100')\"><td>100</td></tr>\r\n\t\t\t\t\t</tbody>\r\n\t\t\t\t</table>\r\n\t\t\t</slick-popover>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n\r\n<slick-dialog #columnSelectDialogRef header=\"Select Columns\">\r\n\t<div style=\"text-align: center; width: 475px;\" class=\"mx-5\">\r\n\t\t<div class=\"d-flex\">\r\n\t\t\t<div class=\"flex-fill\">\r\n\t\t\t\t<slick-drop-down [items]=\"favorites\"\r\n\t\t\t\t\t\t\t\t [ngModel]=\"selectedFavorite\"\r\n\t\t\t\t\t\t\t\t (onSelect)=\"loadFavorite($event)\"></slick-drop-down>\r\n\t\t\t</div>\r\n\t\t\t<div><button class=\"btn btn-outline-primary ml-1\" (click)=\"addNewFavorite()\"><i class=\"far fa-plus\"></i></button></div>\r\n\t\t</div>\r\n\t\t<div class=\"d-flex flex-column mt-1\" slick-drop-list (onSlickDropListReorder)=\"onColumnReorder($event)\">\r\n\t\t\t<div *ngFor=\"let column of columnSelectDialogColumns\" class=\"d-flex\" slick-drop-list-item>\r\n\t\t\t\t<div style=\"width: 20px\"><input type=\"checkbox\" style=\"position: relative; top: 2px;\" [(ngModel)]=\"column.visible\" /></div>\r\n\t\t\t\t<div class=\"py-0 flex-fill\" style=\"text-align: left; cursor: ns-resize\" slick-drop-list-grab>{{column.title}}</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<slick-dialog-footer>\r\n\t\t<div style=\"margin-top: 10px;\" class=\"col-12 text-center mb-2 mt-1\">\r\n\t\t\t<button type=\"button\" (click)=\"onSaveColumns()\" class=\"btn btn-outline-primary mr-1\"><i class=\"far fa-save\"></i>&nbsp;Save</button>&nbsp;\r\n\t\t\t<button type=\"button\" class=\"btn btn-outline-danger\" (click)=\"onCancelColumns()\">Cancel</button>\r\n\t\t</div>\r\n\t</slick-dialog-footer>\r\n</slick-dialog>\r\n\r\n\r\n<slick-confirm-dialog #addNewFavoriteDialogRef width=\"300\">\r\n\t<label>Enter new favorite name</label>\r\n\t<input type=\"text\" class=\"form-control mx-3\" style=\"width: 250px\" [(ngModel)]=\"newFavoriteText\" />\r\n</slick-confirm-dialog>",
6588
6663
  providers: [SlickGridService]
6589
6664
  },] }
6590
6665
  ];
@@ -6600,6 +6675,7 @@
6600
6675
  bordered: [{ type: core.Input }],
6601
6676
  striped: [{ type: core.Input }],
6602
6677
  hover: [{ type: core.Input }],
6678
+ showingAllRecords: [{ type: core.Input }],
6603
6679
  data: [{ type: core.Input }],
6604
6680
  onRowSelected: [{ type: core.Output }],
6605
6681
  onRowDoubleClick: [{ type: core.Output }],