@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.
- package/esm2020/lib/cube/matrix/table.component.mjs +32 -26
- package/esm2020/lib/views/cube/view.component.mjs +3 -3
- package/fesm2015/bizdoc-core.mjs +33 -27
- package/fesm2015/bizdoc-core.mjs.map +1 -1
- package/fesm2020/bizdoc-core.mjs +33 -27
- package/fesm2020/bizdoc-core.mjs.map +1 -1
- package/lib/cube/matrix/table.component.d.ts +2 -1
- package/package.json +1 -1
package/fesm2020/bizdoc-core.mjs
CHANGED
@@ -14092,7 +14092,7 @@ class CubeMatrixComponent {
|
|
14092
14092
|
//fn: val.fn,
|
14093
14093
|
title: val.title,
|
14094
14094
|
xAxis: translate(val.xAxis),
|
14095
|
-
|
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,
|
14127
|
+
let { xAxis, series } = this._sum;
|
14127
14128
|
if (xAxis) {
|
14128
|
-
|
14129
|
-
this.columns.
|
14130
|
-
columns.
|
14131
|
-
|
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
|
-
|
14136
|
+
break;
|
14137
|
+
}
|
14138
|
+
i++;
|
14139
|
+
}
|
14138
14140
|
}
|
14139
|
-
if (
|
14140
|
-
|
14141
|
-
|
14142
|
-
|
14143
|
-
|
14144
|
-
|
14145
|
-
|
14146
|
-
|
14147
|
-
|
14148
|
-
|
14149
|
-
|
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.
|
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,
|
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 (
|
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 ===
|
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.
|
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 [
|
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 [
|
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]
|