@firestitch/list 12.18.6 → 12.19.0

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.
@@ -1,8 +1,8 @@
1
1
  import { ActivatedRoute, Router } from '@angular/router';
2
2
  import { PaginationController } from '../classes/pagination-controller';
3
3
  import { SortingController } from '../classes/sorting-controller';
4
- import { PersistanceController } from './persistance-controller';
5
4
  import { FsListSortConfig } from '../interfaces';
5
+ import { PersistanceController } from './persistance-controller';
6
6
  export declare class ExternalParamsController {
7
7
  private _router;
8
8
  private _route;
@@ -1,11 +1,7 @@
1
1
  import { Observable } from 'rxjs';
2
+ import { FsListSortConfig, SortingChangeEvent } from '../interfaces';
2
3
  import { Column } from '../models/column.model';
3
4
  import { List } from './list-controller';
4
- import { FsListSortConfig } from '../interfaces';
5
- export interface SortingChangeEvent {
6
- sortBy: string;
7
- sortDirection: string;
8
- }
9
5
  export declare class SortingController {
10
6
  config: List;
11
7
  sortingColumns: Column[];
@@ -25,26 +21,31 @@ export declare class SortingController {
25
21
  clearSortableColumns(): void;
26
22
  /**
27
23
  * Set Sortable Direction
24
+ *
28
25
  * @param direction
29
26
  */
30
27
  sortDirection(direction: any): void;
31
28
  /**
32
29
  * Sort By
30
+ *
33
31
  * @param column
34
32
  */
35
33
  sortBy(column: Column): void;
36
34
  /**
37
35
  * Same as sortBy, but need only column name as parameter for sort
36
+ *
38
37
  * @param name
39
38
  */
40
39
  sortByColumnWithName(name: string): void;
41
40
  /**
42
41
  * Init fake columns for sorting
42
+ *
43
43
  * @param columns
44
44
  */
45
45
  initFakeColumns(columns: any): void;
46
46
  /**
47
47
  * Set initial sorting
48
+ *
48
49
  * @param sort
49
50
  */
50
51
  initialSortBy(sort: FsListSortConfig): void;
@@ -1,3 +1,4 @@
1
1
  export * from './cellconfig.interface';
2
2
  export * from './listconfig.interface';
3
3
  export * from './pagination.interface';
4
+ export * from './sorting-change-event.interface';
@@ -0,0 +1,4 @@
1
+ export interface SortingChangeEvent {
2
+ sortBy: string;
3
+ sortDirection: string;
4
+ }
@@ -3799,7 +3799,7 @@
3799
3799
  DataController.prototype._updateVisibleRows = function () {
3800
3800
  this.visibleRows = this._rowsStack
3801
3801
  .filter(function (row, index) {
3802
- return (!row.isGroupChild && !row.isGroupFooter) || row.visible;
3802
+ return (!row.isChild && !row.isGroupFooter) || row.visible;
3803
3803
  });
3804
3804
  };
3805
3805
  DataController.prototype.updateRow = function (targetRow, trackBy) {
@@ -4029,14 +4029,15 @@
4029
4029
  // FIXME
4030
4030
  setTimeout(function () {
4031
4031
  _this._router.navigate([], {
4032
+ skipLocationChange: true,
4032
4033
  replaceUrl: true,
4033
4034
  relativeTo: _this._route,
4034
4035
  queryParams: {
4035
4036
  sortName: name,
4036
4037
  sortDirection: direction,
4037
4038
  },
4038
- queryParamsHandling: 'merge'
4039
- }).then(function () { });
4039
+ queryParamsHandling: 'merge',
4040
+ }).then();
4040
4041
  });
4041
4042
  }
4042
4043
  if (this._persistance.enabled) {
@@ -4053,11 +4054,12 @@
4053
4054
  if (this._queryParamsEnabled) {
4054
4055
  setTimeout(function () {
4055
4056
  _this._router.navigate([], {
4057
+ skipLocationChange: true,
4056
4058
  replaceUrl: true,
4057
4059
  relativeTo: _this._route,
4058
4060
  queryParams: params,
4059
- queryParamsHandling: 'merge'
4060
- }).then(function () { });
4061
+ queryParamsHandling: 'merge',
4062
+ }).then();
4061
4063
  });
4062
4064
  }
4063
4065
  if (this._persistance.enabled) {
@@ -4933,9 +4935,7 @@
4933
4935
  direction: this.sortingColumn.direction,
4934
4936
  };
4935
4937
  }
4936
- else {
4937
- return void 0;
4938
- }
4938
+ return undefined;
4939
4939
  },
4940
4940
  enumerable: false,
4941
4941
  configurable: true
@@ -4969,6 +4969,7 @@
4969
4969
  };
4970
4970
  /**
4971
4971
  * Set Sortable Direction
4972
+ *
4972
4973
  * @param direction
4973
4974
  */
4974
4975
  SortingController.prototype.sortDirection = function (direction) {
@@ -4979,6 +4980,7 @@
4979
4980
  };
4980
4981
  /**
4981
4982
  * Sort By
4983
+ *
4982
4984
  * @param column
4983
4985
  */
4984
4986
  SortingController.prototype.sortBy = function (column) {
@@ -4989,6 +4991,7 @@
4989
4991
  };
4990
4992
  /**
4991
4993
  * Same as sortBy, but need only column name as parameter for sort
4994
+ *
4992
4995
  * @param name
4993
4996
  */
4994
4997
  SortingController.prototype.sortByColumnWithName = function (name) {
@@ -5001,6 +5004,7 @@
5001
5004
  };
5002
5005
  /**
5003
5006
  * Init fake columns for sorting
5007
+ *
5004
5008
  * @param columns
5005
5009
  */
5006
5010
  SortingController.prototype.initFakeColumns = function (columns) {
@@ -5020,6 +5024,7 @@
5020
5024
  };
5021
5025
  /**
5022
5026
  * Set initial sorting
5027
+ *
5023
5028
  * @param sort
5024
5029
  */
5025
5030
  SortingController.prototype.initialSortBy = function (sort) {
@@ -5038,7 +5043,7 @@
5038
5043
  }
5039
5044
  else {
5040
5045
  this.sortByColumnWithName(sort.value);
5041
- var direction = (sort.direction === void 0 || sort.direction === 'asc')
5046
+ var direction = (sort.direction === undefined || sort.direction === 'asc')
5042
5047
  ? exports.SortingDirection.asc
5043
5048
  : exports.SortingDirection.desc;
5044
5049
  this._setSortingDirection(direction);
@@ -5091,7 +5096,7 @@
5091
5096
  }
5092
5097
  this._sortingChanged$.next({
5093
5098
  sortBy: this.sortingColumn.name,
5094
- sortDirection: this.sortingColumn.direction
5099
+ sortDirection: this.sortingColumn.direction,
5095
5100
  });
5096
5101
  };
5097
5102
  SortingController.prototype._trySortByDefaultSortableColumn = function () {