@inspark/inspark-components 1.0.40 → 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.
@@ -1886,6 +1886,12 @@ var TableComponent = /** @class */ (function () {
1886
1886
  return _this.groupInfo[key] = { isExpanded: true };
1887
1887
  });
1888
1888
  this.sortByGroup();
1889
+ if (this.dt && this.dt.filteredValue) {
1890
+ this.sortByGroup(this.dt.filteredValue, this.dt._sortOrder);
1891
+ }
1892
+ else if (this.dt && this.dt._value && this.dt._sortOrder) {
1893
+ this.sortByGroup(this.dt._value, this.dt._sortOrder);
1894
+ }
1889
1895
  }
1890
1896
  };
1891
1897
  TableComponent.prototype.isShowGroup = function (key, rowIndex) {
@@ -1909,8 +1915,18 @@ var TableComponent = /** @class */ (function () {
1909
1915
  TableComponent.prototype.localSearch = function (dt, searchText) {
1910
1916
  dt.filterGlobal(searchText, 'contains');
1911
1917
  };
1912
- TableComponent.prototype.sortByGroup = function () {
1918
+ TableComponent.prototype.sortByGroup = function (values, sortOrder) {
1913
1919
  var g = this.groupMode;
1920
+ if (values) {
1921
+ return values.sort(function (row1, row2) {
1922
+ if (typeof (row1.groupOrder[g]) === 'number') {
1923
+ return sortOrder * (row1.groupOrder[g] - row2.groupOrder[g]);
1924
+ }
1925
+ else {
1926
+ return sortOrder * row1.groupOrder[g].localeCompare(row2.groupOrder[g], undefined, { numeric: true, sensitivity: 'base' });
1927
+ }
1928
+ });
1929
+ }
1914
1930
  this.values.sort(function (row1, row2) {
1915
1931
  if (typeof (row1.groupOrder[g]) === 'number') {
1916
1932
  return row1.groupOrder[g] - row2.groupOrder[g];
@@ -2322,7 +2338,7 @@ var ToolbarComponent = /** @class */ (function () {
2322
2338
  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",
2323
2339
  changeDetection: ChangeDetectionStrategy.OnPush,
2324
2340
  entryComponents: [],
2325
- 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}"]
2341
+ 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}"]
2326
2342
  }),
2327
2343
  __metadata("design:paramtypes", [ElementRef, ChangeDetectorRef, Router])
2328
2344
  ], ToolbarComponent);
@@ -3533,14 +3549,12 @@ var ContentToggleComponent = /** @class */ (function () {
3533
3549
  }
3534
3550
  ContentToggleComponent.prototype.ngOnInit = function () {
3535
3551
  this.isOpen = this.defaultOpen;
3536
- console.log('defaultOpen', this.defaultOpen);
3537
- console.log('isOpen', this.isOpen);
3538
3552
  };
3539
3553
  ContentToggleComponent.prototype.toggleOpen = function (e) {
3540
3554
  // Получаем родительский элемент div
3541
3555
  var parentElement = this.elementButtons.nativeElement;
3542
3556
  // Проверяем, входит ли цель события в родительский элемент
3543
- if (!parentElement.contains(e.target)) {
3557
+ if (!parentElement.contains(e.target) || e.target === parentElement) {
3544
3558
  this.isOpen = !this.isOpen;
3545
3559
  this.toggle.emit(this.isOpen);
3546
3560
  this.cdr.detectChanges();
@@ -3581,7 +3595,7 @@ var ContentToggleComponent = /** @class */ (function () {
3581
3595
  Component({
3582
3596
  selector: 'in-content-toggle',
3583
3597
  template: "<div class=\"block\" (click)=\"toggleOpen($event)\" tabIndex=\"1\">\n <span [ngClass]=\"{arrow: true, close: !isOpen}\">\n <in-svg *ngIf=\"manualArrow\" [src]=\"'arrow-down.svg'\" width=\"48px\" height=\"48px\"></in-svg>\n <ng-content select=\"[arrow]\"></ng-content>\n </span>\n <span class=\"label\">\n <in-svg *ngIf=\"icon\" class=\"label-icon\" [src]=\"icon\"></in-svg>\n {{label}}\n </span>\n <span class=\"counter\">\n <ng-content select=\"[header]\"></ng-content>\n </span>\n <div class=\"buttons\" #buttons>\n <ng-content select=\"[buttons]\"></ng-content>\n </div>\n</div>\n<div class=\"container\" *ngIf=\"isOpen\">\n <ng-content select=\"[body]\"></ng-content>\n</div>\n",
3584
- styles: ["@charset \"UTF-8\";.block{font-size:12px;text-transform:uppercase;cursor:pointer;display:flex;white-space:nowrap}.block .buttons{flex:1;display:flex;justify-content:flex-end}.block:hover{background:var(--colorBgLevel2)}.block>span{display:inline-block;margin-right:4px}.block .label{margin-right:8px;display:flex;align-items:center;overflow:hidden;text-overflow:ellipsis}.block .counter{display:flex;align-items:center;padding-right:8px}.block .arrow{margin-right:0}.block .arrow.close{transform:rotate(-90deg)}.label-icon{margin-right:4px;width:16px;height:16px}"]
3598
+ styles: ["@charset \"UTF-8\";.block{font-size:12px;text-transform:uppercase;cursor:pointer;display:flex;white-space:nowrap}.block .buttons{flex:1;display:flex;justify-content:flex-end;align-items:center;-webkit-user-select:none;-moz-user-select:none;user-select:none}.block:hover{background:var(--colorBgLevel2)}.block>span{display:inline-block;margin-right:4px}.block .label{margin-right:8px;display:flex;align-items:center;overflow:hidden;text-overflow:ellipsis}.block .counter{display:flex;align-items:center;padding-right:8px}.block .arrow{margin-right:0}.block .arrow.close{transform:rotate(-90deg)}.label-icon{margin-right:4px;width:16px;height:16px}"]
3585
3599
  }),
3586
3600
  __metadata("design:paramtypes", [ChangeDetectorRef])
3587
3601
  ], ContentToggleComponent);