@inspark/inspark-components 1.0.41 → 1.0.42

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.
@@ -2080,6 +2080,12 @@
2080
2080
  return _this.groupInfo[key] = { isExpanded: true };
2081
2081
  });
2082
2082
  this.sortByGroup();
2083
+ if (this.dt && this.dt.filteredValue) {
2084
+ this.sortByGroup(this.dt.filteredValue, this.dt._sortOrder);
2085
+ }
2086
+ else if (this.dt && this.dt._value && this.dt._sortOrder) {
2087
+ this.sortByGroup(this.dt._value, this.dt._sortOrder);
2088
+ }
2083
2089
  }
2084
2090
  };
2085
2091
  TableComponent.prototype.isShowGroup = function (key, rowIndex) {
@@ -2103,8 +2109,18 @@
2103
2109
  TableComponent.prototype.localSearch = function (dt, searchText) {
2104
2110
  dt.filterGlobal(searchText, 'contains');
2105
2111
  };
2106
- TableComponent.prototype.sortByGroup = function () {
2112
+ TableComponent.prototype.sortByGroup = function (values, sortOrder) {
2107
2113
  var g = this.groupMode;
2114
+ if (values) {
2115
+ return values.sort(function (row1, row2) {
2116
+ if (typeof (row1.groupOrder[g]) === 'number') {
2117
+ return sortOrder * (row1.groupOrder[g] - row2.groupOrder[g]);
2118
+ }
2119
+ else {
2120
+ return sortOrder * row1.groupOrder[g].localeCompare(row2.groupOrder[g], undefined, { numeric: true, sensitivity: 'base' });
2121
+ }
2122
+ });
2123
+ }
2108
2124
  this.values.sort(function (row1, row2) {
2109
2125
  if (typeof (row1.groupOrder[g]) === 'number') {
2110
2126
  return row1.groupOrder[g] - row2.groupOrder[g];
@@ -2516,7 +2532,7 @@
2516
2532
  template: "<div class=\"toolbar-wrapper\">\n <in-sticky top=\"60\">\n\n <div class=\"c-panel toolbar-container\">\n <div class=\"c-toolbar\">\n <div class=\"c-toolbar__side-left\">\n <div class=\"c-toolbar__title\">{{title}}</div>\n </div>\n <div class=\"c-toolbar__side-center\">\n\n </div>\n <div class=\"c-toolbar__side-right\">\n <ng-content></ng-content>\n </div>\n\n </div>\n </div>\n </in-sticky>\n</div>\n",
2517
2533
  changeDetection: core.ChangeDetectionStrategy.OnPush,
2518
2534
  entryComponents: [],
2519
- styles: [".toolbar-wrapper{padding-bottom:4px}.toolbar-container{padding:8px;position:relative}:host{position:-webkit-sticky;position:sticky;z-index:2}.c-toolbar{display:inline-flex;width:100%}.c-toolbar__side-left{flex:1;text-align:left}.c-toolbar__title{display:inline-flex;vertical-align:middle;font-size:22px}.c-toolbar__side-right{display:flex;text-align:right}.add-widget{position:fixed;right:16px;bottom:16px}.widget-container{position:absolute;left:0;top:40px;right:0;bottom:0;overflow:auto}.widget-block{position:absolute;left:5px;top:5px;right:5px;bottom:5px}.sidebar{background:var(--main-background);position:absolute;left:0;top:35px;bottom:0;height:100vh;z-index:100;width:300px;box-shadow:0 0 3px 8px rgba(0,0,0,.1);overflow:auto}.right-side{display:flex;align-items:center;justify-content:flex-end;flex:1}.right-side>*{margin-left:5px}.left-side{white-space:nowrap;display:flex;align-items:center;justify-content:flex-start}.left-side>*{margin-right:5px}.controls-panel{height:41px;border-radius:2px;padding:4px 0;margin:0 5px 5px;display:flex}.dashboard-list{position:relative}.title{font-size:22px}"]
2535
+ styles: [".toolbar-wrapper{padding-bottom:4px}.toolbar-container{padding:8px;position:relative}:host{position:sticky;z-index:2}.c-toolbar{display:inline-flex;width:100%}.c-toolbar__side-left{flex:1;text-align:left}.c-toolbar__title{display:inline-flex;vertical-align:middle;font-size:22px}.c-toolbar__side-right{display:flex;text-align:right}.add-widget{position:fixed;right:16px;bottom:16px}.widget-container{position:absolute;left:0;top:40px;right:0;bottom:0;overflow:auto}.widget-block{position:absolute;left:5px;top:5px;right:5px;bottom:5px}.sidebar{background:var(--main-background);position:absolute;left:0;top:35px;bottom:0;height:100vh;z-index:100;width:300px;box-shadow:0 0 3px 8px rgba(0,0,0,.1);overflow:auto}.right-side{display:flex;align-items:center;justify-content:flex-end;flex:1}.right-side>*{margin-left:5px}.left-side{white-space:nowrap;display:flex;align-items:center;justify-content:flex-start}.left-side>*{margin-right:5px}.controls-panel{height:41px;border-radius:2px;padding:4px 0;margin:0 5px 5px;display:flex}.dashboard-list{position:relative}.title{font-size:22px}"]
2520
2536
  }),
2521
2537
  __metadata("design:paramtypes", [core.ElementRef, core.ChangeDetectorRef, router.Router])
2522
2538
  ], ToolbarComponent);