@bizdoc/core 1.10.0-next.5 → 1.10.0-next.6

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.
@@ -14092,7 +14092,7 @@ class CubeMatrixComponent {
14092
14092
  //fn: val.fn,
14093
14093
  title: val.title,
14094
14094
  xAxis: translate(val.xAxis),
14095
- serie: translate(val.serie)
14095
+ series: translate(val.series)
14096
14096
  };
14097
14097
  }
14098
14098
  get interactive() {
@@ -14122,31 +14122,37 @@ class CubeMatrixComponent {
14122
14122
  if (changes['filters'])
14123
14123
  this.refresh();
14124
14124
  }
14125
+ /** */
14125
14126
  _addsum() {
14126
- let { xAxis, serie } = this._sum;
14127
+ let { xAxis, series } = this._sum;
14127
14128
  if (xAxis) {
14128
- const columns = [];
14129
- this.columns.forEach(c => {
14130
- columns.push(c);
14131
- if (xAxis.toString() === c.key)
14132
- columns.push({
14129
+ let i = 0;
14130
+ while (i < this.columns.length - 1) {
14131
+ if (this.columns[i].key === xAxis.toString()) {
14132
+ this.columns.splice(i + 1, 0, {
14133
14133
  key: '_sum',
14134
14134
  value: this._sum.title
14135
14135
  });
14136
- });
14137
- this.columns = columns;
14136
+ break;
14137
+ }
14138
+ i++;
14139
+ }
14138
14140
  }
14139
- if (serie) {
14140
- const rows = [];
14141
- this.rows.forEach(r => {
14142
- rows.push(r);
14143
- if (serie.toString() === r.key)
14144
- rows.push({
14145
- key: '_sum',
14146
- value: this._sum.title
14147
- });
14148
- });
14149
- this.rows = rows;
14141
+ if (series) {
14142
+ let i = 0;
14143
+ const row = {
14144
+ key: '_sum',
14145
+ value: this._sum.title
14146
+ };
14147
+ while (i < this.rows.length - 1) {
14148
+ if (this.rows[i].key === series.toString()) {
14149
+ this.rows.splice(i + 1, 0, row);
14150
+ break;
14151
+ }
14152
+ i++;
14153
+ }
14154
+ if (i === this.rows.length - 1)
14155
+ this.rows.push(row);
14150
14156
  }
14151
14157
  }
14152
14158
  refresh() {
@@ -14158,7 +14164,7 @@ class CubeMatrixComponent {
14158
14164
  scope: this.scope
14159
14165
  }).pipe(modelize(), first$1(), tap(d => {
14160
14166
  this._totals(d);
14161
- this.sum &&
14167
+ this._sum &&
14162
14168
  this._calculatesum(d);
14163
14169
  })).subscribe(d => this.data = d, (e) => {
14164
14170
  this._sb.error(e.status === 401 ? 'Unauthorized' : null);
@@ -14205,7 +14211,7 @@ class CubeMatrixComponent {
14205
14211
  this.totals['_total'] = grand;
14206
14212
  }
14207
14213
  _calculatesum(data) {
14208
- let { xAxis, serie /*, fn*/ } = this._sum;
14214
+ let { xAxis, series } = this._sum;
14209
14215
  if (xAxis) {
14210
14216
  let total = 0;
14211
14217
  this.rows.forEach(r => {
@@ -14226,7 +14232,7 @@ class CubeMatrixComponent {
14226
14232
  });
14227
14233
  this.totals['_sum'] = total;
14228
14234
  }
14229
- if (serie) {
14235
+ if (series) {
14230
14236
  let total = 0;
14231
14237
  this.columns.forEach(c => {
14232
14238
  let sum = 0, i = 0;
@@ -14236,7 +14242,7 @@ class CubeMatrixComponent {
14236
14242
  let val = row[c.key];
14237
14243
  if (val !== undefined)
14238
14244
  sum += val;
14239
- if (key === serie)
14245
+ if (key === series)
14240
14246
  break;
14241
14247
  }
14242
14248
  i++;
@@ -14265,7 +14271,7 @@ class CubeMatrixComponent {
14265
14271
  for (let i = 0; i < this.rows.length; i++) {
14266
14272
  let key = this.rows[i].key;
14267
14273
  serie.push(key);
14268
- if (key === this._sum.serie)
14274
+ if (key === this._sum.series)
14269
14275
  break;
14270
14276
  }
14271
14277
  }
@@ -23833,7 +23839,7 @@ let CubeDocumentViewComponent = class CubeDocumentViewComponent extends CubeBase
23833
23839
  }
23834
23840
  };
23835
23841
  CubeDocumentViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CubeDocumentViewComponent, deps: [{ token: SessionService }, { token: DocumentViewRef }, { token: CubeService }, { token: Popup }, { token: RouterImpl }, { token: GuideService }], target: i0.ɵɵFactoryTarget.Component });
23836
- CubeDocumentViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: CubeDocumentViewComponent, selector: "ng-component", host: { classAttribute: "view" }, viewQueries: [{ propertyName: "viewPane", first: true, predicate: CubeViewComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"hasdata; else none\">\r\n <div class=\"nav-toolbar\">\r\n <button mat-icon-button (click)=\"guide()\" [bizdocTooltip]=\"'Help' | translate\" *ngIf=\"view.guide\"><mat-icon>help_outline</mat-icon></button>\r\n <ng-container *ngIf=\"alternate\">\r\n <button mat-button [matMenuTriggerFor]=\"cmenu\">{{cube.title}} <mat-icon>arrow_drop_down</mat-icon></button>\r\n <mat-menu #cmenu>\r\n <button mat-menu-item *ngFor=\"let a of alternate\"\r\n (click)=\"switchTo(a)\">\r\n {{a.title}}\r\n </button>\r\n </mat-menu>\r\n </ng-container>\r\n <span class=\"divider\"></span>\r\n <button mat-icon-button [matMenuTriggerFor]=\"pmenu\" [bizdocTooltip]=\"'Patterns' | translate\" [disabled]=\"!patterns?.length\" data-help=\"pattern\"><mat-icon [class.filled]=\"pattern\">filter_alt</mat-icon></button>\r\n <mat-menu #pmenu>\r\n <button mat-menu-item *ngFor=\"let p of patterns\" (click)=\"patternChange(p)\">\r\n {{p.title}}\r\n </button>\r\n </mat-menu>\r\n <button mat-icon-button (click)=\"clearFilter()\" [bizdocTooltip]=\"'Clear' | translate\" [disabled]=\"!anyFilters\"><mat-icon>clear_all</mat-icon></button>\r\n <button mat-icon-button (click)=\"filterToggle($event)\" [bizdocTooltip]=\"'Filter' | translate\" [disabled]=\"!anyAxes\" data-help=\"filter\"><mat-icon>filter_list</mat-icon></button>\r\n </div>\r\n <div class=\"loading-view\" *ngIf=\"loading\">\r\n <mat-spinner color=\"accent\"></mat-spinner>\r\n </div>\r\n <bizdoc-cube-view [axes]=\"axes\" #vp\r\n (explore)=\"explore($event)\"\r\n [cube]=\"cube\"\r\n [view]=\"view\"\r\n (loading)=\"loading = $event\"></bizdoc-cube-view>\r\n</ng-container>\r\n<ng-template #none>\r\n <bizdoc-none icon=\"equalizer\" subtitle=\"NothingHere\"></bizdoc-none>\r\n</ng-template>\r\n", styles: [":host{display:flex;flex-direction:column;height:100%;min-height:220px}:host ::ng-deep .cube-view{flex:1 auto}\n"], components: [{ type: i7$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i7$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i8$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i8$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { type: i10.MatSpinner, selector: "mat-spinner", inputs: ["color"] }, { type: CubeViewComponent, selector: "bizdoc-cube-view", inputs: ["filters", "cube", "view", "loading"], outputs: ["explore", "loadingChange"] }, { type: NoneComponent, selector: "bizdoc-none", inputs: ["title", "subtitle", "icon"] }], directives: [{ type: i10$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: TooltipDirective, selector: "[bizdocTooltip]", inputs: ["bizdocTooltip", "bizdocTooltipTemplate", "bizdocTooltipContext", "bizdocTooltipPosition", "bizdocTooltipDuration", "bizdocTooltipDisabled"] }, { type: i8$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i10$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": TranslatePipe } });
23842
+ CubeDocumentViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: CubeDocumentViewComponent, selector: "ng-component", host: { classAttribute: "view" }, viewQueries: [{ propertyName: "viewPane", first: true, predicate: CubeViewComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"hasdata; else none\">\r\n <div class=\"nav-toolbar\">\r\n <button mat-icon-button (click)=\"guide()\" [bizdocTooltip]=\"'Help' | translate\" *ngIf=\"view.guide\"><mat-icon>help_outline</mat-icon></button>\r\n <ng-container *ngIf=\"alternate\">\r\n <button mat-button [matMenuTriggerFor]=\"cmenu\">{{cube.title}} <mat-icon>arrow_drop_down</mat-icon></button>\r\n <mat-menu #cmenu>\r\n <button mat-menu-item *ngFor=\"let a of alternate\"\r\n (click)=\"switchTo(a)\">\r\n {{a.title}}\r\n </button>\r\n </mat-menu>\r\n </ng-container>\r\n <span class=\"divider\"></span>\r\n <button mat-icon-button [matMenuTriggerFor]=\"pmenu\" [bizdocTooltip]=\"'Patterns' | translate\" [disabled]=\"!patterns?.length\" data-help=\"pattern\"><mat-icon [class.filled]=\"pattern\">filter_alt</mat-icon></button>\r\n <mat-menu #pmenu>\r\n <button mat-menu-item *ngFor=\"let p of patterns\" (click)=\"patternChange(p)\">\r\n {{p.title}}\r\n </button>\r\n </mat-menu>\r\n <button mat-icon-button (click)=\"clearFilter()\" [bizdocTooltip]=\"'Clear' | translate\" [disabled]=\"!anyFilters\"><mat-icon>clear_all</mat-icon></button>\r\n <button mat-icon-button (click)=\"filterToggle($event)\" [bizdocTooltip]=\"'Filter' | translate\" [disabled]=\"!anyAxes\" data-help=\"filter\"><mat-icon>filter_list</mat-icon></button>\r\n </div>\r\n <div class=\"loading-view\" *ngIf=\"loading\">\r\n <mat-spinner color=\"accent\"></mat-spinner>\r\n </div>\r\n <bizdoc-cube-view [filters]=\"axes\" #vp\r\n (explore)=\"explore($event)\"\r\n [cube]=\"cube\"\r\n [view]=\"view\"\r\n (loading)=\"loading = $event\"></bizdoc-cube-view>\r\n</ng-container>\r\n<ng-template #none>\r\n <bizdoc-none icon=\"equalizer\" subtitle=\"NothingHere\"></bizdoc-none>\r\n</ng-template>\r\n", styles: [":host{display:flex;flex-direction:column;height:100%;min-height:220px}:host ::ng-deep .cube-view{flex:1 auto}\n"], components: [{ type: i7$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i7$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i8$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i8$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { type: i10.MatSpinner, selector: "mat-spinner", inputs: ["color"] }, { type: CubeViewComponent, selector: "bizdoc-cube-view", inputs: ["filters", "cube", "view", "loading"], outputs: ["explore", "loadingChange"] }, { type: NoneComponent, selector: "bizdoc-none", inputs: ["title", "subtitle", "icon"] }], directives: [{ type: i10$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: TooltipDirective, selector: "[bizdocTooltip]", inputs: ["bizdocTooltip", "bizdocTooltipTemplate", "bizdocTooltipContext", "bizdocTooltipPosition", "bizdocTooltipDuration", "bizdocTooltipDisabled"] }, { type: i8$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i10$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": TranslatePipe } });
23837
23843
  CubeDocumentViewComponent = __decorate([
23838
23844
  BizDoc({
23839
23845
  selector: 'bizdoc-cube-view'
@@ -23841,7 +23847,7 @@ CubeDocumentViewComponent = __decorate([
23841
23847
  ], CubeDocumentViewComponent);
23842
23848
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CubeDocumentViewComponent, decorators: [{
23843
23849
  type: Component,
23844
- args: [{ host: { class: 'view' }, template: "<ng-container *ngIf=\"hasdata; else none\">\r\n <div class=\"nav-toolbar\">\r\n <button mat-icon-button (click)=\"guide()\" [bizdocTooltip]=\"'Help' | translate\" *ngIf=\"view.guide\"><mat-icon>help_outline</mat-icon></button>\r\n <ng-container *ngIf=\"alternate\">\r\n <button mat-button [matMenuTriggerFor]=\"cmenu\">{{cube.title}} <mat-icon>arrow_drop_down</mat-icon></button>\r\n <mat-menu #cmenu>\r\n <button mat-menu-item *ngFor=\"let a of alternate\"\r\n (click)=\"switchTo(a)\">\r\n {{a.title}}\r\n </button>\r\n </mat-menu>\r\n </ng-container>\r\n <span class=\"divider\"></span>\r\n <button mat-icon-button [matMenuTriggerFor]=\"pmenu\" [bizdocTooltip]=\"'Patterns' | translate\" [disabled]=\"!patterns?.length\" data-help=\"pattern\"><mat-icon [class.filled]=\"pattern\">filter_alt</mat-icon></button>\r\n <mat-menu #pmenu>\r\n <button mat-menu-item *ngFor=\"let p of patterns\" (click)=\"patternChange(p)\">\r\n {{p.title}}\r\n </button>\r\n </mat-menu>\r\n <button mat-icon-button (click)=\"clearFilter()\" [bizdocTooltip]=\"'Clear' | translate\" [disabled]=\"!anyFilters\"><mat-icon>clear_all</mat-icon></button>\r\n <button mat-icon-button (click)=\"filterToggle($event)\" [bizdocTooltip]=\"'Filter' | translate\" [disabled]=\"!anyAxes\" data-help=\"filter\"><mat-icon>filter_list</mat-icon></button>\r\n </div>\r\n <div class=\"loading-view\" *ngIf=\"loading\">\r\n <mat-spinner color=\"accent\"></mat-spinner>\r\n </div>\r\n <bizdoc-cube-view [axes]=\"axes\" #vp\r\n (explore)=\"explore($event)\"\r\n [cube]=\"cube\"\r\n [view]=\"view\"\r\n (loading)=\"loading = $event\"></bizdoc-cube-view>\r\n</ng-container>\r\n<ng-template #none>\r\n <bizdoc-none icon=\"equalizer\" subtitle=\"NothingHere\"></bizdoc-none>\r\n</ng-template>\r\n", styles: [":host{display:flex;flex-direction:column;height:100%;min-height:220px}:host ::ng-deep .cube-view{flex:1 auto}\n"] }]
23850
+ args: [{ host: { class: 'view' }, template: "<ng-container *ngIf=\"hasdata; else none\">\r\n <div class=\"nav-toolbar\">\r\n <button mat-icon-button (click)=\"guide()\" [bizdocTooltip]=\"'Help' | translate\" *ngIf=\"view.guide\"><mat-icon>help_outline</mat-icon></button>\r\n <ng-container *ngIf=\"alternate\">\r\n <button mat-button [matMenuTriggerFor]=\"cmenu\">{{cube.title}} <mat-icon>arrow_drop_down</mat-icon></button>\r\n <mat-menu #cmenu>\r\n <button mat-menu-item *ngFor=\"let a of alternate\"\r\n (click)=\"switchTo(a)\">\r\n {{a.title}}\r\n </button>\r\n </mat-menu>\r\n </ng-container>\r\n <span class=\"divider\"></span>\r\n <button mat-icon-button [matMenuTriggerFor]=\"pmenu\" [bizdocTooltip]=\"'Patterns' | translate\" [disabled]=\"!patterns?.length\" data-help=\"pattern\"><mat-icon [class.filled]=\"pattern\">filter_alt</mat-icon></button>\r\n <mat-menu #pmenu>\r\n <button mat-menu-item *ngFor=\"let p of patterns\" (click)=\"patternChange(p)\">\r\n {{p.title}}\r\n </button>\r\n </mat-menu>\r\n <button mat-icon-button (click)=\"clearFilter()\" [bizdocTooltip]=\"'Clear' | translate\" [disabled]=\"!anyFilters\"><mat-icon>clear_all</mat-icon></button>\r\n <button mat-icon-button (click)=\"filterToggle($event)\" [bizdocTooltip]=\"'Filter' | translate\" [disabled]=\"!anyAxes\" data-help=\"filter\"><mat-icon>filter_list</mat-icon></button>\r\n </div>\r\n <div class=\"loading-view\" *ngIf=\"loading\">\r\n <mat-spinner color=\"accent\"></mat-spinner>\r\n </div>\r\n <bizdoc-cube-view [filters]=\"axes\" #vp\r\n (explore)=\"explore($event)\"\r\n [cube]=\"cube\"\r\n [view]=\"view\"\r\n (loading)=\"loading = $event\"></bizdoc-cube-view>\r\n</ng-container>\r\n<ng-template #none>\r\n <bizdoc-none icon=\"equalizer\" subtitle=\"NothingHere\"></bizdoc-none>\r\n</ng-template>\r\n", styles: [":host{display:flex;flex-direction:column;height:100%;min-height:220px}:host ::ng-deep .cube-view{flex:1 auto}\n"] }]
23845
23851
  }], ctorParameters: function () { return [{ type: SessionService }, { type: DocumentViewRef }, { type: CubeService }, { type: Popup }, { type: RouterImpl }, { type: GuideService }]; }, propDecorators: { viewPane: [{
23846
23852
  type: ViewChild,
23847
23853
  args: [CubeViewComponent]