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

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.
Files changed (35) hide show
  1. package/assets/bizdoc-schema.json +6 -0
  2. package/esm2020/lib/browse/browse-items.component.mjs +3 -3
  3. package/esm2020/lib/core/controls/combination-picker-body.mjs +5 -2
  4. package/esm2020/lib/core/functions.mjs +4 -1
  5. package/esm2020/lib/core/mailbox.service.mjs +20 -23
  6. package/esm2020/lib/core/models.mjs +1 -1
  7. package/esm2020/lib/cube/cube-info.service.mjs +5 -5
  8. package/esm2020/lib/cube/grid/spreadsheet.component.mjs +1 -1
  9. package/esm2020/lib/cube/matrix/matrix.base.mjs +1 -1
  10. package/esm2020/lib/cube/matrix/matrix.component.mjs +8 -8
  11. package/esm2020/lib/cube/matrix/table.component.mjs +194 -138
  12. package/esm2020/lib/dashboard/cube/cube-analysis.base.mjs +1 -1
  13. package/esm2020/lib/dashboard/cube/cube-analysis.widget.mjs +3 -1
  14. package/esm2020/lib/dashboard/cube/documents.widget.mjs +1 -1
  15. package/esm2020/lib/dashboard/cube/filter/filter.component.mjs +10 -6
  16. package/esm2020/lib/modules/chart.module.mjs +4 -4
  17. package/esm2020/lib/shared.module.mjs +4 -4
  18. package/esm2020/lib/views/cube/matrix.component.mjs +1 -1
  19. package/esm2020/public-api.mjs +1 -1
  20. package/fesm2015/bizdoc-core.mjs +239 -180
  21. package/fesm2015/bizdoc-core.mjs.map +1 -1
  22. package/fesm2020/bizdoc-core.mjs +246 -181
  23. package/fesm2020/bizdoc-core.mjs.map +1 -1
  24. package/lib/core/controls/combination-picker-body.d.ts +4 -6
  25. package/lib/core/functions.d.ts +1 -0
  26. package/lib/core/mailbox.service.d.ts +4 -8
  27. package/lib/core/models.d.ts +1 -1
  28. package/lib/cube/cube-info.service.d.ts +3 -6
  29. package/lib/cube/matrix/matrix.base.d.ts +2 -6
  30. package/lib/cube/matrix/matrix.component.d.ts +3 -3
  31. package/lib/cube/matrix/table.component.d.ts +18 -28
  32. package/lib/shared.module.d.ts +1 -1
  33. package/lib/views/cube/matrix.component.d.ts +3 -11
  34. package/package.json +2 -2
  35. package/public-api.d.ts +1 -1
@@ -117,7 +117,7 @@ import * as i24 from '@angular/flex-layout/extended';
117
117
  import * as i4$1 from '@ctrl/ngx-emoji-mart';
118
118
  import { PickerModule } from '@ctrl/ngx-emoji-mart';
119
119
  import * as i8$2 from '@syncfusion/ej2-angular-charts';
120
- import { AccumulationChart, FunnelSeries, AccumulationDataLabel, AccumulationTooltip, AccumulationLegend, Export, PieSeries, ChartModule, AccumulationChartAllModule, SparklineAllModule, LineSeriesService, ScatterSeriesService, ColumnSeriesService, SplineSeriesService, SplineAreaSeriesService, StripLineService, AreaSeriesService, ScrollBarService, StepLineSeriesService, StepAreaSeriesService, StackingColumnSeriesService, StackingLineSeriesService, StackingAreaSeriesService, BarSeriesService, StackingBarSeriesService, RangeColumnSeriesService, BubbleSeriesService, TooltipService, CrosshairService, CategoryService, DateTimeService, LogarithmicService, LegendService, ZoomService, DataLabelService, SelectionService, ChartAnnotationService, WaterfallSeriesService, RangeAreaSeriesService, PolarSeriesService, RadarSeriesService, DateTimeCategoryService, MultiLevelLabelService, ParetoSeriesService, TooltipRenderService, ExportService, AccumulationAnnotationService, AccumulationDataLabelService, AccumulationLegendService, AccumulationSelectionService, AccumulationTooltipService, AccumulationChartComponent, Chart as Chart$1, DateTime as DateTime$1, BarSeries as BarSeries$1, AreaSeries as AreaSeries$1, BubbleSeries as BubbleSeries$1, ColumnSeries as ColumnSeries$1, LineSeries as LineSeries$1, PolarSeries as PolarSeries$1, RadarSeries as RadarSeries$1, SplineSeries as SplineSeries$1, SplineAreaSeries as SplineAreaSeries$1, ScatterSeries as ScatterSeries$1, StackingLineSeries as StackingLineSeries$1, StackingAreaSeries as StackingAreaSeries$1, StackingColumnSeries as StackingColumnSeries$1, StackingBarSeries as StackingBarSeries$1, StepAreaSeries as StepAreaSeries$1, StepLineSeries as StepLineSeries$1, ChartComponent } from '@syncfusion/ej2-angular-charts';
120
+ import { AccumulationChart, FunnelSeries, AccumulationDataLabel, AccumulationTooltip, AccumulationLegend, Export, PieSeries, ChartModule, AccumulationChartAllModule, SparklineAllModule, AccumulationDistributionIndicatorService, FunnelSeriesService, StackingStepAreaSeriesService, PieSeriesService, PyramidSeriesService, LineSeriesService, ScatterSeriesService, ColumnSeriesService, SplineSeriesService, SplineAreaSeriesService, StripLineService, AreaSeriesService, ScrollBarService, StepLineSeriesService, StepAreaSeriesService, StackingColumnSeriesService, StackingLineSeriesService, StackingAreaSeriesService, BarSeriesService, StackingBarSeriesService, RangeColumnSeriesService, BubbleSeriesService, TooltipService, CrosshairService, CategoryService, DateTimeService, LogarithmicService, LegendService, ZoomService, DataLabelService, SelectionService, ChartAnnotationService, WaterfallSeriesService, RangeAreaSeriesService, PolarSeriesService, RadarSeriesService, DateTimeCategoryService, MultiLevelLabelService, ParetoSeriesService, TooltipRenderService, ExportService, AccumulationAnnotationService, AccumulationDataLabelService, AccumulationLegendService, AccumulationSelectionService, AccumulationTooltipService, AccumulationChartComponent, Chart as Chart$1, DateTime as DateTime$1, BarSeries as BarSeries$1, AreaSeries as AreaSeries$1, BubbleSeries as BubbleSeries$1, ColumnSeries as ColumnSeries$1, LineSeries as LineSeries$1, PolarSeries as PolarSeries$1, RadarSeries as RadarSeries$1, SplineSeries as SplineSeries$1, SplineAreaSeries as SplineAreaSeries$1, ScatterSeries as ScatterSeries$1, StackingLineSeries as StackingLineSeries$1, StackingAreaSeries as StackingAreaSeries$1, StackingColumnSeries as StackingColumnSeries$1, StackingBarSeries as StackingBarSeries$1, StepAreaSeries as StepAreaSeries$1, StepLineSeries as StepLineSeries$1, ChartComponent } from '@syncfusion/ej2-angular-charts';
121
121
  import * as XLSX from 'xlsx';
122
122
  import { Chart, Category, DateTime, Tooltip, Export as Export$1, BarSeries, AreaSeries, StackingStepAreaSeries, BubbleSeries, ColumnSeries, LineSeries, Legend, PolarSeries, RadarSeries, SplineSeries, SplineAreaSeries, ScatterSeries, StackingLineSeries, StackingAreaSeries, StackingColumnSeries, StackingBarSeries, StepAreaSeries, StepLineSeries } from '@syncfusion/ej2-charts';
123
123
  import * as i6$5 from '@syncfusion/ej2-angular-grids';
@@ -636,6 +636,9 @@ const IS_MOBILE = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini
636
636
  function isMobile() {
637
637
  return IS_MOBILE /*|| document.cookie.indexOf('aria=1') > -1*/;
638
638
  }
639
+ function isFunction(val) {
640
+ return typeof val === 'function';
641
+ }
639
642
  function isBoolean(val) {
640
643
  return typeof val === 'boolean';
641
644
  }
@@ -2870,15 +2873,6 @@ class MailboxService {
2870
2873
  // _session.profile.inbox.push(m.model);
2871
2874
  });
2872
2875
  }
2873
- /**
2874
- *
2875
- * @param date
2876
- */
2877
- _isAboveWatermark(date) {
2878
- return !this._session.isImpersonating &&
2879
- this._session.profile.options.inboxView &&
2880
- this._session.profile.options.inboxView < date;
2881
- }
2882
2876
  download(documentId, fileId) {
2883
2877
  return this._http.get(AttachmentInfo.formatUrl(documentId, fileId), {
2884
2878
  responseType: 'arraybuffer'
@@ -2887,8 +2881,8 @@ class MailboxService {
2887
2881
  removeattachment(id, fileId) {
2888
2882
  return this._http.delete(`/api/mailbox/attachment/${id}`, { params: { fileId: fileId.toString() } });
2889
2883
  }
2890
- read(id, read) {
2891
- return this._http.put(`/api/mailbox/read/${id}`, undefined, { params: { read } });
2884
+ read(id, read, folderId, received) {
2885
+ return this._http.put(`/api/mailbox/read/${id}`, undefined, { params: { read } }).pipe(tap(() => folderId && this._updateunreadcounter(received, folderId, read ? 1 : -1)));
2892
2886
  }
2893
2887
  comments(id, before) {
2894
2888
  return this._http.get(`/api/comments/${id}`, { params: { before: new Date(before).toJSON() } });
@@ -3025,14 +3019,20 @@ class MailboxService {
3025
3019
  })), this._notify());
3026
3020
  }
3027
3021
  get(id, read) {
3028
- return this._http.get(`/api/mail/${id}`).pipe(tap(m => {
3029
- if (read !== undefined && m.read !== read) {
3030
- if (this._isAboveWatermark(m.received))
3031
- this._session.profile.inboxCount -= read ? -1 : 1;
3032
- const folder = this._session.profile.folders.find(f => f.name === m.folderId);
3033
- folder.count -= read ? -1 : 1;
3034
- }
3035
- }));
3022
+ return this._http.get(`/api/mail/${id}`).pipe(tap(m => read === false && m.read === true &&
3023
+ this._updateunreadcounter(m.received, m.folderId, -1)));
3024
+ }
3025
+ _updateunreadcounter(date, folderId, val) {
3026
+ if (
3027
+ // date is above watermark
3028
+ !this._session.isImpersonating &&
3029
+ this._session.profile.options.inboxView &&
3030
+ this._session.profile.options.inboxView < date)
3031
+ this._session.profile.inboxCount -= val;
3032
+ // decrease
3033
+ const folder = this._session.profile.folders.
3034
+ find(f => f.name === folderId);
3035
+ folder.count -= val;
3036
3036
  }
3037
3037
  save(id, version, form, model) {
3038
3038
  return this._withGeoLocation(form).pipe(switchMap(params => this._http.put(`/api/mail/${id}?version=${version}`, model, { params })), this._notify());
@@ -3043,11 +3043,11 @@ class MailboxService {
3043
3043
  removecomment(id) {
3044
3044
  return this._http.delete(`/api/comments/${id}`).pipe(tap(() => { }));
3045
3045
  }
3046
- submit(id, version, form, model) {
3046
+ submit(id, version, form, model, read, folderId, received) {
3047
3047
  return this._withGeoLocation(form).pipe(switchMap(params => this._http.put(`/api/mail/${id}?version=${version}&go=true`, model, { params }))).pipe(this._notify());
3048
3048
  }
3049
- send(id, version, form, model, action, actionArgs) {
3050
- return this._withGeoLocation(form).pipe(switchMap(params => this._http.put(`/api/mail/${id}?version=${version}&action=${action}`, model, { params: Object.assign(params, actionArgs) }))).pipe(this._notify());
3049
+ send(id, version, form, model, action, actionArgs, read, folderId, received) {
3050
+ return this._withGeoLocation(form).pipe(switchMap(params => this._http.put(`/api/mail/${id}?version=${version}&action=${action}`, model, { params: Object.assign(params, actionArgs) }))).pipe(tap(() => read === false && this._updateunreadcounter(received, folderId, -1)), this._notify());
3051
3051
  }
3052
3052
  events(starting, ending, contains) {
3053
3053
  return this._http.get(`/api/events`, {
@@ -7060,7 +7060,7 @@ class BrowseItemsComponent {
7060
7060
  dragStarted(event) {
7061
7061
  }
7062
7062
  toggleRead(item) {
7063
- this._mailbox.read(item.id, !item.read).
7063
+ this._mailbox.read(item.id, !item.read, item.folderId, item.received).
7064
7064
  subscribe(() => item.read = !item.read);
7065
7065
  }
7066
7066
  select(id) {
@@ -7305,7 +7305,7 @@ class BrowseItemsComponent {
7305
7305
  }
7306
7306
  sendAll(action, args) {
7307
7307
  const params = queryParams(args);
7308
- this._forEach(i => this._mailbox.send(i.id, i.version, i.formId, null, action, params).
7308
+ this._forEach(i => this._mailbox.send(i.id, i.version, i.formId, null, action, params, i.read, i.folderId, i.received).
7309
7309
  pipe(tap(() => {
7310
7310
  if (i.folderId !== this.folderId)
7311
7311
  this.dataSource.data.remove(i);
@@ -14127,32 +14127,27 @@ class CubeMatrixComponent {
14127
14127
  this.onExplore = new EventEmitter();
14128
14128
  this.loadingChange = new EventEmitter();
14129
14129
  }
14130
- get indices() {
14131
- return this._indices;
14132
- }
14133
- set indices(value) {
14134
- if (value)
14135
- this._indices = isArray(value) ? value : [value];
14136
- }
14137
14130
  set sum(val) {
14138
- function translate(axis) {
14139
- switch (axis) {
14140
- case '$month':
14141
- return 'M' + ('0' + new Date().getMonth().toString()).slice(-2);
14142
- case '$year':
14143
- return new Date().getFullYear().toString();
14144
- case '$quarter':
14145
- return Math.ceil(new Date().getMonth() / 3).toString();
14146
- default:
14147
- return axis ? axis.toString() : null;
14148
- }
14149
- }
14150
- this._sum = {
14151
- //fn: val.fn,
14152
- title: val.title,
14153
- xAxis: translate(val.xAxis),
14154
- series: translate(val.series)
14155
- };
14131
+ if (val)
14132
+ this._sum = (isArray(val) ? val : [val]).
14133
+ map(sum => {
14134
+ let value;
14135
+ if (sum.value)
14136
+ value = sum.value.toString();
14137
+ else if (sum.calculate)
14138
+ switch (sum.calculate) {
14139
+ case 'month':
14140
+ value = 'M' + ('0' + new Date().getMonth().toString()).slice(-2);
14141
+ break;
14142
+ case 'year':
14143
+ value = new Date().getFullYear().toString();
14144
+ break;
14145
+ case 'quarter':
14146
+ value = Math.ceil(new Date().getMonth() / 3).toString();
14147
+ break;
14148
+ }
14149
+ return Object.assign({ value }, sum);
14150
+ });
14156
14151
  }
14157
14152
  get interactive() {
14158
14153
  return this._interactive;
@@ -14162,70 +14157,69 @@ class CubeMatrixComponent {
14162
14157
  }
14163
14158
  ngOnChanges(changes) {
14164
14159
  if (changes['_cube']) {
14165
- this.cube = this.cube ? this._session.profile.cubes.find(c => c.name === this._cube) :
14166
- this._session.profile.cubes[0];
14160
+ this.cube = this._session.profile.cubes.find(c => c.name === this._cube);
14167
14161
  this.CURRENCY = this.cube.currencyCode /*|| this._service.currencyCode*/;
14168
14162
  }
14169
- if (this._indices)
14170
- this.indexes = this.cube.indices.filter(i => this._indices.indexOf(i.name) > -1);
14171
- else {
14172
- this.indexes = this.cube.indices;
14173
- this._indices = this.indexes.map(i => i.name);
14163
+ if (!this.cube) {
14164
+ this.cube = this._session.profile.cubes[0];
14165
+ this.CURRENCY = this.cube.currencyCode /*|| this._service.currencyCode*/;
14174
14166
  }
14167
+ if (changes['_indices'])
14168
+ this.indices = this.cube.indices.filter(i => isArray(this._indices) ? this._indices.indexOf(i.name) > -1 : this._indices === i.name);
14175
14169
  if (changes['_xAxis'] || changes['_series']) {
14176
- this.xAxis = this.cube.axes.find(a => a.name === this._xAxis) || this.cube.axes[0];
14177
- this.series = this.cube.axes.find(a => a.name === this._series) || this.cube.axes[1];
14170
+ this.xAxis = this.cube.axes.find(a => a.name === this._xAxis);
14171
+ this.series = this.cube.axes.find(a => a.name === this._series);
14178
14172
  this._prepare = forkJoin(this._ds.all(this.series.dataType).pipe(tap(r => this.rows = r)), this._ds.all(this.xAxis.dataType).pipe(tap(c => this.columns = c))).toPromise().then(() => this._sum &&
14179
14173
  this._addsum());
14180
14174
  }
14181
14175
  if (changes['filters'])
14182
14176
  this.refresh();
14183
14177
  }
14184
- /** */
14185
14178
  _addsum() {
14186
- let { xAxis, series } = this._sum;
14187
- if (xAxis) {
14188
- let i = 0;
14189
- while (i < this.columns.length - 1) {
14190
- if (this.columns[i].key === xAxis.toString()) {
14191
- this.columns.splice(i + 1, 0, {
14192
- key: '_sum',
14193
- value: this._sum.title
14194
- });
14195
- break;
14179
+ this._sum.forEach((s, i) => {
14180
+ let { value, axis } = s;
14181
+ const element = {
14182
+ key: '_sum_' + i,
14183
+ value: s.title
14184
+ };
14185
+ let j = 0;
14186
+ if (axis === 'xAxis') {
14187
+ while (j < this.columns.length) {
14188
+ if (this.columns[j].key === value) {
14189
+ this.columns.splice(j + 1, 0, element);
14190
+ break;
14191
+ }
14192
+ j++;
14196
14193
  }
14197
- i++;
14194
+ if (j === this.columns.length)
14195
+ this.columns.push(element);
14198
14196
  }
14199
- }
14200
- if (series) {
14201
- let i = 0;
14202
- const row = {
14203
- key: '_sum',
14204
- value: this._sum.title
14205
- };
14206
- while (i < this.rows.length - 1) {
14207
- if (this.rows[i].key === series.toString()) {
14208
- this.rows.splice(i + 1, 0, row);
14209
- break;
14197
+ else {
14198
+ while (j < this.rows.length) {
14199
+ if (this.rows[j].key === value) {
14200
+ this.rows.splice(j + 1, 0, element);
14201
+ break;
14202
+ }
14203
+ j++;
14210
14204
  }
14211
- i++;
14205
+ if (j === this.rows.length)
14206
+ this.rows.push(element);
14212
14207
  }
14213
- if (i === this.rows.length - 1)
14214
- this.rows.push(row);
14215
- }
14208
+ });
14216
14209
  }
14217
14210
  refresh() {
14218
14211
  const progressTask = setTimeout(() => this.loadingChange.next(this.loading = true), LOADING_DELAY);
14219
- this._prepare.then(() => this._service.series(this.cube.name, this.xAxis.name, {
14220
- series: this.series.name,
14212
+ this._prepare.then(() => this._service.series(this.cube.name, this._xAxis, {
14213
+ series: this._series,
14221
14214
  indices: this._indices,
14222
14215
  filters: this.filters,
14223
14216
  scope: this.scope
14224
- }).pipe(modelize(), first$1(), tap(d => {
14225
- this._totals(d);
14217
+ }).pipe(modelize(), first$1()).subscribe(d => {
14226
14218
  this._sum &&
14227
14219
  this._calculatesum(d);
14228
- })).subscribe(d => this.data = d, (e) => {
14220
+ this._totals(d);
14221
+ this.data = d;
14222
+ }, (e) => {
14229
14223
  this._sb.error(e.status === 401 ? 'Unauthorized' : null);
14230
14224
  }, () => {
14231
14225
  clearTimeout(progressTask);
@@ -14233,8 +14227,9 @@ class CubeMatrixComponent {
14233
14227
  }));
14234
14228
  }
14235
14229
  _totals(data) {
14230
+ this.totals = {};
14236
14231
  let grand = 0;
14237
- this.indexes.forEach(i => {
14232
+ this.indices && this.indices.forEach(i => {
14238
14233
  const index = data[i.name];
14239
14234
  if (!index)
14240
14235
  data[i.name] = {};
@@ -14257,8 +14252,7 @@ class CubeMatrixComponent {
14257
14252
  data[r.key]['_total'] = sum;
14258
14253
  grand -= sum;
14259
14254
  });
14260
- this.totals = {};
14261
- this.columns.forEach(c => {
14255
+ this._indices && this.columns.forEach(c => {
14262
14256
  let sum = 0, key;
14263
14257
  for (key in data) {
14264
14258
  const val = data[key][c.key];
@@ -14270,74 +14264,136 @@ class CubeMatrixComponent {
14270
14264
  this.totals['_total'] = grand;
14271
14265
  }
14272
14266
  _calculatesum(data) {
14273
- let { xAxis, series } = this._sum;
14274
- if (xAxis) {
14275
- let total = 0;
14276
- this.rows.forEach(r => {
14277
- const row = data[r.key];
14278
- if (!row)
14279
- return;
14280
- let sum = 0, i = 0;
14281
- while (i < this.columns.length) {
14282
- let key = this.columns[i].key, val = row[key];
14283
- if (val !== undefined)
14284
- sum += val;
14285
- if (key === xAxis)
14286
- break;
14287
- i++;
14288
- }
14289
- data[r.key]['_sum'] = sum;
14290
- total += sum;
14291
- });
14292
- this.totals['_sum'] = total;
14293
- }
14294
- if (series) {
14295
- let total = 0;
14296
- this.columns.forEach(c => {
14297
- let sum = 0, i = 0;
14298
- while (i < this.rows.length) {
14299
- let key = this.rows[i].key, row = data[key];
14300
- if (row) {
14301
- let val = row[c.key];
14302
- if (val !== undefined)
14303
- sum += val;
14304
- if (key === series)
14305
- break;
14267
+ this._sum.forEach((s, i) => {
14268
+ const { axis, value, calculate } = s, name = '_sum_' + i;
14269
+ if (axis === 'xAxis') {
14270
+ let total = 0;
14271
+ this.rows.forEach(r => {
14272
+ const row = data[r.key];
14273
+ if (!row)
14274
+ return;
14275
+ let sum = 0, j = 0;
14276
+ while (j < this.columns.length) {
14277
+ let key = this.columns[j].key;
14278
+ if (isFunction(calculate)) {
14279
+ let val = calculate(key, this.data);
14280
+ if (val !== undefined)
14281
+ sum += val;
14282
+ }
14283
+ else {
14284
+ let val = row[key];
14285
+ if (val !== undefined)
14286
+ sum += val;
14287
+ if (key === value)
14288
+ break;
14289
+ }
14290
+ j++;
14306
14291
  }
14307
- i++;
14308
- }
14309
- data['_sum'][c.key] = sum;
14310
- total += sum;
14311
- });
14312
- data['_sum']['_total'] = total;
14313
- }
14292
+ row[name] = sum;
14293
+ total += sum;
14294
+ });
14295
+ this.indices && this.indices.forEach(i => {
14296
+ const row = data[i.name];
14297
+ if (!row)
14298
+ return;
14299
+ let sum = 0, j = 0;
14300
+ while (j < this.columns.length) {
14301
+ let key = this.columns[j].key;
14302
+ if (isFunction(calculate)) {
14303
+ let val = calculate(key, this.data);
14304
+ if (val !== undefined)
14305
+ sum += val;
14306
+ }
14307
+ else {
14308
+ let val = row[key];
14309
+ if (val !== undefined)
14310
+ sum += val;
14311
+ if (key === value)
14312
+ break;
14313
+ }
14314
+ j++;
14315
+ }
14316
+ row[name] = sum;
14317
+ });
14318
+ this.totals[name] = total;
14319
+ }
14320
+ else {
14321
+ let total = 0;
14322
+ this.columns.forEach(c => {
14323
+ let sum = 0, j = 0;
14324
+ while (j < this.rows.length) {
14325
+ let key = this.rows[j].key;
14326
+ if (isFunction(calculate)) {
14327
+ let val = calculate(key, this.data);
14328
+ if (val !== undefined)
14329
+ sum += val;
14330
+ }
14331
+ else {
14332
+ let row = data[key];
14333
+ if (row) {
14334
+ let val = row[c.key];
14335
+ if (val !== undefined)
14336
+ sum += val;
14337
+ if (key === value)
14338
+ break;
14339
+ }
14340
+ }
14341
+ j++;
14342
+ }
14343
+ data[name][c.key] = sum;
14344
+ total += sum;
14345
+ });
14346
+ data[name]['_total'] = total;
14347
+ }
14348
+ });
14314
14349
  }
14315
- explore(x, serie) {
14350
+ explore(x, series) {
14316
14351
  if (!this.interactive)
14317
14352
  return;
14318
- if (this.sum) {
14319
- if (x === '_sum') {
14320
- x = [];
14321
- for (let i = 0; i < this.columns.length; i++) {
14322
- let key = this.columns[i].key;
14323
- x.push(key);
14324
- if (key === this._sum.xAxis)
14325
- break;
14353
+ const axes = Object.assign({}, this.filters);
14354
+ if (this._sum) {
14355
+ let i = 0;
14356
+ while (i < this._sum.length) {
14357
+ let { value, calculate } = this._sum[i], name = '_sum_' + i;
14358
+ if (x === name) {
14359
+ x = [];
14360
+ for (let i = 0; i < this.columns.length; i++) {
14361
+ let key = this.columns[i].key;
14362
+ if (isFunction(calculate)) {
14363
+ let val = calculate(key, this.data);
14364
+ if (val !== undefined)
14365
+ x.push(key);
14366
+ }
14367
+ else {
14368
+ x.push(key);
14369
+ if (key === value)
14370
+ break;
14371
+ }
14372
+ }
14373
+ break;
14326
14374
  }
14327
- }
14328
- if (serie === '_sum') {
14329
- serie = [];
14330
- for (let i = 0; i < this.rows.length; i++) {
14331
- let key = this.rows[i].key;
14332
- serie.push(key);
14333
- if (key === this._sum.series)
14334
- break;
14375
+ else if (series === name) {
14376
+ series = [];
14377
+ for (let i = 0; i < this.rows.length; i++) {
14378
+ let key = this.rows[i].key;
14379
+ if (isFunction(calculate)) {
14380
+ let val = calculate(key, this.data);
14381
+ if (val !== undefined)
14382
+ series.push(key);
14383
+ }
14384
+ else {
14385
+ series.push(key);
14386
+ if (key === value)
14387
+ break;
14388
+ }
14389
+ }
14390
+ break;
14335
14391
  }
14392
+ i++;
14336
14393
  }
14337
14394
  }
14338
- const axes = Object.assign({}, this.filters);
14339
14395
  axes[this.xAxis.name] = x;
14340
- axes[this.series.name] = serie;
14396
+ axes[this.series.name] = series;
14341
14397
  this.onExplore.emit(axes);
14342
14398
  }
14343
14399
  move(x, y) {
@@ -14371,10 +14427,10 @@ class CubeMatrixComponent {
14371
14427
  }
14372
14428
  }
14373
14429
  CubeMatrixComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CubeMatrixComponent, deps: [{ token: PromptService }, { token: CubeService }, { token: SessionService }, { token: DatasourceService }], target: i0.ɵɵFactoryTarget.Component });
14374
- CubeMatrixComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: CubeMatrixComponent, selector: "bizdoc-cube-matrix", inputs: { _cube: ["cube", "_cube"], _xAxis: ["xAxis", "_xAxis"], _series: ["series", "_series"], indices: "indices", scope: "scope", sum: "sum", filters: "filters", loading: "loading", interactive: "interactive" }, outputs: { onExplore: "explore", loadingChange: "loadingChange" }, viewQueries: [{ propertyName: "tableElement", first: true, predicate: ["table"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<table #table class=\"mat-table cube-table\" (mouseleave)=\"move(-1, -1)\" *ngIf=\"data\">\r\n <thead>\r\n <!-- headers -->\r\n <tr class=\"mat-row\">\r\n <th></th>\r\n <th *ngFor=\"let column of columns; let x = index\" (mouseenter)=\"move(x + 1, -2)\" class=\"mat-header-cell\">\r\n {{ column.value }}\r\n </th>\r\n <th></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <!-- indices -->\r\n <tr class=\"mat-row cube-index\" *ngFor=\"let index of indexes; let y = index\">\r\n <th class=\"mat-header-cell\" (mouseenter)=\"move(0, y)\">{{index.title}}</th>\r\n <td *ngFor=\"let column of columns; let x = index\" class=\"mat-cell figure\" (mouseenter)=\"move(x + 1, y)\">\r\n <span *ngIf=\"data[index.name] && data[index.name][column.key]; else zero\">{{ data[index.name][column.key] | number : PRECISION }}</span>\r\n </td>\r\n <th class=\"mat-cell figure\" (mouseenter)=\"move(0, y)\" [ngSwitch]=\"!CURRENCY\">\r\n <ng-container *ngSwitchCase=\"true\">\r\n {{ data[index.name]['_total'] | number : PRECISION }}\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n {{ data[index.name]['_total'] | currency : CURRENCY: 'symbol' : PRECISION }}\r\n </ng-container>\r\n </th>\r\n </tr>\r\n </tbody>\r\n <tbody>\r\n <!-- rows -->\r\n <tr *ngFor=\"let row of rows; let y = index\" class=\"mat-row\">\r\n <th class=\"mat-header-cell\" (mouseenter)=\"move(-2, y + indices.length)\">{{ row.value }}</th>\r\n <td *ngFor=\"let column of columns; let x = index\" class=\"mat-cell figure\" (mouseenter)=\"move(x + 1, y + indices.length)\">\r\n <ng-container *ngIf=\"data[row.key] && data[row.key][column.key] !== undefined; else zero\">\r\n <span [class.clickable]=\"interactive\" (click)=\"explore(column.key, row.key)\">\r\n {{data[row.key][column.key] | number : PRECISION }}\r\n </span>\r\n </ng-container>\r\n </td>\r\n <th class=\"mat-cell figure\" (mouseenter)=\"move(-1, y + indices.length)\" [ngSwitch]=\"!CURRENCY\">\r\n <ng-container *ngSwitchCase=\"true\">\r\n {{ data[row.key]['_total'] | number : PRECISION }}\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n {{ data[row.key]['_total'] | currency : CURRENCY: 'symbol' : PRECISION }}\r\n </ng-container>\r\n </th>\r\n </tr>\r\n </tbody>\r\n <tfoot>\r\n <!-- available -->\r\n <tr>\r\n <th></th>\r\n <td *ngFor=\"let column of columns; let x = index\" class=\"mat-cell figure\" (mouseenter)=\"move(x + 1, -2)\"\r\n [class.negative-figure]=\"totals[column.key] < 0\">\r\n {{totals[column.key] | currency : CURRENCY: 'symbol' : PRECISION }}\r\n </td>\r\n <th class=\"mat-cell figure\">{{totals['_total'] | currency : CURRENCY: 'symbol' : PRECISION }}</th>\r\n </tr>\r\n </tfoot>\r\n</table>\r\n<ng-template #zero>\r\n 0\r\n</ng-template>\r\n", styles: [".clickable{cursor:pointer}.cube-table{width:100%;display:inline-table;border-collapse:collapse}.cube-table th{cursor:default}.cube-table th.figure{font-weight:500}.cube-table td{padding-right:4px}\n"], directives: [{ type: i10$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i10$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i10$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }], pipes: { "number": i10$1.DecimalPipe, "currency": i10$1.CurrencyPipe }, animations: [matrixAnimation] });
14430
+ CubeMatrixComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: CubeMatrixComponent, selector: "bizdoc-cube-matrix", inputs: { _cube: ["cube", "_cube"], _xAxis: ["xAxis", "_xAxis"], _series: ["series", "_series"], _indices: ["indices", "_indices"], scope: "scope", sum: "sum", filters: "filters", loading: "loading", interactive: "interactive" }, outputs: { onExplore: "explore", loadingChange: "loadingChange" }, viewQueries: [{ propertyName: "tableElement", first: true, predicate: ["table"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<table #table class=\"mat-table cube-table\" (mouseleave)=\"move(-1, -1)\" *ngIf=\"data\">\r\n <thead>\r\n <!-- headers -->\r\n <tr class=\"mat-row\">\r\n <th></th>\r\n <th *ngFor=\"let column of columns; let x = index\" (mouseenter)=\"move(x + 1, -2)\" class=\"mat-header-cell\">\r\n {{ column.value }}\r\n </th>\r\n <th></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <!-- indices -->\r\n <tr class=\"mat-row cube-index\" *ngFor=\"let index of indices; let y = index\">\r\n <th class=\"mat-header-cell\" (mouseenter)=\"move(0, y)\">{{index.title}}</th>\r\n <td *ngFor=\"let column of columns; let x = index\" class=\"mat-cell figure\" (mouseenter)=\"move(x + 1, y)\">\r\n <span *ngIf=\"data[index.name] && data[index.name][column.key]; else zero\">{{ data[index.name][column.key] | number : PRECISION }}</span>\r\n </td>\r\n <th class=\"mat-cell figure\" (mouseenter)=\"move(0, y)\" [ngSwitch]=\"!CURRENCY\">\r\n <ng-container *ngSwitchCase=\"true\">\r\n {{ data[index.name]['_total'] | number : PRECISION }}\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n {{ data[index.name]['_total'] | currency : CURRENCY: 'symbol' : PRECISION }}\r\n </ng-container>\r\n </th>\r\n </tr>\r\n </tbody>\r\n <tbody>\r\n <!-- rows -->\r\n <tr *ngFor=\"let row of rows; let y = index\" class=\"mat-row\">\r\n <th class=\"mat-header-cell\" (mouseenter)=\"move(-2, y + indices.length)\">{{ row.value }}</th>\r\n <td *ngFor=\"let column of columns; let x = index\" class=\"mat-cell figure\" (mouseenter)=\"move(x + 1, y + indices.length)\">\r\n <ng-container *ngIf=\"data[row.key] && data[row.key][column.key] !== undefined; else zero\">\r\n <span [class.clickable]=\"interactive\" (click)=\"explore(column.key, row.key)\">\r\n {{data[row.key][column.key] | number : PRECISION }}\r\n </span>\r\n </ng-container>\r\n </td>\r\n <th class=\"mat-cell figure\" (mouseenter)=\"move(-1, y + indices.length)\" [ngSwitch]=\"!CURRENCY\">\r\n <ng-container *ngSwitchCase=\"true\">\r\n {{ data[row.key]['_total'] | number : PRECISION }}\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n {{ data[row.key]['_total'] | currency : CURRENCY: 'symbol' : PRECISION }}\r\n </ng-container>\r\n </th>\r\n </tr>\r\n </tbody>\r\n <tfoot>\r\n <!-- available -->\r\n <tr>\r\n <th></th>\r\n <td *ngFor=\"let column of columns; let x = index\" class=\"mat-cell figure\" (mouseenter)=\"move(x + 1, -2)\"\r\n [class.negative-figure]=\"totals[column.key] < 0\">\r\n {{totals[column.key] | currency : CURRENCY: 'symbol' : PRECISION }}\r\n </td>\r\n <th class=\"mat-cell figure\">{{totals['_total'] | currency : CURRENCY: 'symbol' : PRECISION }}</th>\r\n </tr>\r\n </tfoot>\r\n</table>\r\n<ng-template #zero>\r\n 0\r\n</ng-template>\r\n", styles: [".clickable{cursor:pointer}.cube-table{width:100%;display:inline-table;border-collapse:collapse}.cube-table th{cursor:default}.cube-table th.figure{font-weight:500}.cube-table td{padding-right:4px}\n"], directives: [{ type: i10$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i10$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i10$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }], pipes: { "number": i10$1.DecimalPipe, "currency": i10$1.CurrencyPipe }, animations: [matrixAnimation] });
14375
14431
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CubeMatrixComponent, decorators: [{
14376
14432
  type: Component,
14377
- args: [{ selector: 'bizdoc-cube-matrix', animations: [matrixAnimation], template: "<table #table class=\"mat-table cube-table\" (mouseleave)=\"move(-1, -1)\" *ngIf=\"data\">\r\n <thead>\r\n <!-- headers -->\r\n <tr class=\"mat-row\">\r\n <th></th>\r\n <th *ngFor=\"let column of columns; let x = index\" (mouseenter)=\"move(x + 1, -2)\" class=\"mat-header-cell\">\r\n {{ column.value }}\r\n </th>\r\n <th></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <!-- indices -->\r\n <tr class=\"mat-row cube-index\" *ngFor=\"let index of indexes; let y = index\">\r\n <th class=\"mat-header-cell\" (mouseenter)=\"move(0, y)\">{{index.title}}</th>\r\n <td *ngFor=\"let column of columns; let x = index\" class=\"mat-cell figure\" (mouseenter)=\"move(x + 1, y)\">\r\n <span *ngIf=\"data[index.name] && data[index.name][column.key]; else zero\">{{ data[index.name][column.key] | number : PRECISION }}</span>\r\n </td>\r\n <th class=\"mat-cell figure\" (mouseenter)=\"move(0, y)\" [ngSwitch]=\"!CURRENCY\">\r\n <ng-container *ngSwitchCase=\"true\">\r\n {{ data[index.name]['_total'] | number : PRECISION }}\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n {{ data[index.name]['_total'] | currency : CURRENCY: 'symbol' : PRECISION }}\r\n </ng-container>\r\n </th>\r\n </tr>\r\n </tbody>\r\n <tbody>\r\n <!-- rows -->\r\n <tr *ngFor=\"let row of rows; let y = index\" class=\"mat-row\">\r\n <th class=\"mat-header-cell\" (mouseenter)=\"move(-2, y + indices.length)\">{{ row.value }}</th>\r\n <td *ngFor=\"let column of columns; let x = index\" class=\"mat-cell figure\" (mouseenter)=\"move(x + 1, y + indices.length)\">\r\n <ng-container *ngIf=\"data[row.key] && data[row.key][column.key] !== undefined; else zero\">\r\n <span [class.clickable]=\"interactive\" (click)=\"explore(column.key, row.key)\">\r\n {{data[row.key][column.key] | number : PRECISION }}\r\n </span>\r\n </ng-container>\r\n </td>\r\n <th class=\"mat-cell figure\" (mouseenter)=\"move(-1, y + indices.length)\" [ngSwitch]=\"!CURRENCY\">\r\n <ng-container *ngSwitchCase=\"true\">\r\n {{ data[row.key]['_total'] | number : PRECISION }}\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n {{ data[row.key]['_total'] | currency : CURRENCY: 'symbol' : PRECISION }}\r\n </ng-container>\r\n </th>\r\n </tr>\r\n </tbody>\r\n <tfoot>\r\n <!-- available -->\r\n <tr>\r\n <th></th>\r\n <td *ngFor=\"let column of columns; let x = index\" class=\"mat-cell figure\" (mouseenter)=\"move(x + 1, -2)\"\r\n [class.negative-figure]=\"totals[column.key] < 0\">\r\n {{totals[column.key] | currency : CURRENCY: 'symbol' : PRECISION }}\r\n </td>\r\n <th class=\"mat-cell figure\">{{totals['_total'] | currency : CURRENCY: 'symbol' : PRECISION }}</th>\r\n </tr>\r\n </tfoot>\r\n</table>\r\n<ng-template #zero>\r\n 0\r\n</ng-template>\r\n", styles: [".clickable{cursor:pointer}.cube-table{width:100%;display:inline-table;border-collapse:collapse}.cube-table th{cursor:default}.cube-table th.figure{font-weight:500}.cube-table td{padding-right:4px}\n"] }]
14433
+ args: [{ selector: 'bizdoc-cube-matrix', animations: [matrixAnimation], template: "<table #table class=\"mat-table cube-table\" (mouseleave)=\"move(-1, -1)\" *ngIf=\"data\">\r\n <thead>\r\n <!-- headers -->\r\n <tr class=\"mat-row\">\r\n <th></th>\r\n <th *ngFor=\"let column of columns; let x = index\" (mouseenter)=\"move(x + 1, -2)\" class=\"mat-header-cell\">\r\n {{ column.value }}\r\n </th>\r\n <th></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <!-- indices -->\r\n <tr class=\"mat-row cube-index\" *ngFor=\"let index of indices; let y = index\">\r\n <th class=\"mat-header-cell\" (mouseenter)=\"move(0, y)\">{{index.title}}</th>\r\n <td *ngFor=\"let column of columns; let x = index\" class=\"mat-cell figure\" (mouseenter)=\"move(x + 1, y)\">\r\n <span *ngIf=\"data[index.name] && data[index.name][column.key]; else zero\">{{ data[index.name][column.key] | number : PRECISION }}</span>\r\n </td>\r\n <th class=\"mat-cell figure\" (mouseenter)=\"move(0, y)\" [ngSwitch]=\"!CURRENCY\">\r\n <ng-container *ngSwitchCase=\"true\">\r\n {{ data[index.name]['_total'] | number : PRECISION }}\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n {{ data[index.name]['_total'] | currency : CURRENCY: 'symbol' : PRECISION }}\r\n </ng-container>\r\n </th>\r\n </tr>\r\n </tbody>\r\n <tbody>\r\n <!-- rows -->\r\n <tr *ngFor=\"let row of rows; let y = index\" class=\"mat-row\">\r\n <th class=\"mat-header-cell\" (mouseenter)=\"move(-2, y + indices.length)\">{{ row.value }}</th>\r\n <td *ngFor=\"let column of columns; let x = index\" class=\"mat-cell figure\" (mouseenter)=\"move(x + 1, y + indices.length)\">\r\n <ng-container *ngIf=\"data[row.key] && data[row.key][column.key] !== undefined; else zero\">\r\n <span [class.clickable]=\"interactive\" (click)=\"explore(column.key, row.key)\">\r\n {{data[row.key][column.key] | number : PRECISION }}\r\n </span>\r\n </ng-container>\r\n </td>\r\n <th class=\"mat-cell figure\" (mouseenter)=\"move(-1, y + indices.length)\" [ngSwitch]=\"!CURRENCY\">\r\n <ng-container *ngSwitchCase=\"true\">\r\n {{ data[row.key]['_total'] | number : PRECISION }}\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n {{ data[row.key]['_total'] | currency : CURRENCY: 'symbol' : PRECISION }}\r\n </ng-container>\r\n </th>\r\n </tr>\r\n </tbody>\r\n <tfoot>\r\n <!-- available -->\r\n <tr>\r\n <th></th>\r\n <td *ngFor=\"let column of columns; let x = index\" class=\"mat-cell figure\" (mouseenter)=\"move(x + 1, -2)\"\r\n [class.negative-figure]=\"totals[column.key] < 0\">\r\n {{totals[column.key] | currency : CURRENCY: 'symbol' : PRECISION }}\r\n </td>\r\n <th class=\"mat-cell figure\">{{totals['_total'] | currency : CURRENCY: 'symbol' : PRECISION }}</th>\r\n </tr>\r\n </tfoot>\r\n</table>\r\n<ng-template #zero>\r\n 0\r\n</ng-template>\r\n", styles: [".clickable{cursor:pointer}.cube-table{width:100%;display:inline-table;border-collapse:collapse}.cube-table th{cursor:default}.cube-table th.figure{font-weight:500}.cube-table td{padding-right:4px}\n"] }]
14378
14434
  }], ctorParameters: function () { return [{ type: PromptService }, { type: CubeService }, { type: SessionService }, { type: DatasourceService }]; }, propDecorators: { tableElement: [{
14379
14435
  type: ViewChild,
14380
14436
  args: ['table']
@@ -14387,8 +14443,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
14387
14443
  }], _series: [{
14388
14444
  type: Input,
14389
14445
  args: ['series']
14390
- }], indices: [{
14391
- type: Input
14446
+ }], _indices: [{
14447
+ type: Input,
14448
+ args: ['indices']
14392
14449
  }], scope: [{
14393
14450
  type: Input
14394
14451
  }], sum: [{
@@ -14404,11 +14461,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
14404
14461
  args: ['explore']
14405
14462
  }], loadingChange: [{
14406
14463
  type: Output
14407
- }] } });
14408
- class CubeInfoCellArgs {
14409
- get value() { return this._value; }
14410
- get summary() { return this._summary; }
14411
- }
14464
+ }] } });
14412
14465
 
14413
14466
  class CubeMatrixBase {
14414
14467
  constructor(_service, _ds, _session) {
@@ -19252,7 +19305,7 @@ class SyncfusionChartModule {
19252
19305
  }
19253
19306
  SyncfusionChartModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SyncfusionChartModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
19254
19307
  SyncfusionChartModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SyncfusionChartModule, imports: [ChartModule, AccumulationChartAllModule, SparklineAllModule], exports: [ChartModule, AccumulationChartAllModule, SparklineAllModule] });
19255
- SyncfusionChartModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SyncfusionChartModule, providers: [LineSeriesService, ScatterSeriesService, ColumnSeriesService, SplineSeriesService,
19308
+ SyncfusionChartModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: SyncfusionChartModule, providers: [AccumulationDistributionIndicatorService, FunnelSeriesService, StackingStepAreaSeriesService, PieSeriesService, PyramidSeriesService, LineSeriesService, ScatterSeriesService, ColumnSeriesService, SplineSeriesService,
19256
19309
  SplineAreaSeriesService, StripLineService, AreaSeriesService, ScrollBarService, StepLineSeriesService,
19257
19310
  StepAreaSeriesService, StackingColumnSeriesService, StackingLineSeriesService, StackingAreaSeriesService,
19258
19311
  BarSeriesService, StackingBarSeriesService, RangeColumnSeriesService, BubbleSeriesService, TooltipService,
@@ -19267,7 +19320,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
19267
19320
  args: [{
19268
19321
  imports: [ChartModule, AccumulationChartAllModule, SparklineAllModule],
19269
19322
  exports: [ChartModule, AccumulationChartAllModule, SparklineAllModule],
19270
- providers: [LineSeriesService, ScatterSeriesService, ColumnSeriesService, SplineSeriesService,
19323
+ providers: [AccumulationDistributionIndicatorService, FunnelSeriesService, StackingStepAreaSeriesService, PieSeriesService, PyramidSeriesService, LineSeriesService, ScatterSeriesService, ColumnSeriesService, SplineSeriesService,
19271
19324
  SplineAreaSeriesService, StripLineService, AreaSeriesService, ScrollBarService, StepLineSeriesService,
19272
19325
  StepAreaSeriesService, StackingColumnSeriesService, StackingLineSeriesService, StackingAreaSeriesService,
19273
19326
  BarSeriesService, StackingBarSeriesService, RangeColumnSeriesService, BubbleSeriesService, TooltipService,
@@ -19688,7 +19741,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
19688
19741
  }] } });
19689
19742
 
19690
19743
  /** cube matrix component*/
19691
- class CubeMatrixPageComponent extends CubeMatrixBase {
19744
+ class CubeMatrixPopupComponent extends CubeMatrixBase {
19692
19745
  /** filters */
19693
19746
  /** cube-info ctor */
19694
19747
  constructor(_ref, data, service, ds, session, _sb) {
@@ -19698,9 +19751,9 @@ class CubeMatrixPageComponent extends CubeMatrixBase {
19698
19751
  this.preloading = true;
19699
19752
  if (!data.options)
19700
19753
  throw 'no data options';
19701
- const { axes: base, options: { indices, xAxis, serie, filters, cube, sum } } = data;
19754
+ const { axes: base, options: { indices, xAxis, series, filters, cube, sum } } = data;
19702
19755
  this.cube = cube;
19703
- this.series = serie;
19756
+ this.series = series;
19704
19757
  this.xAxis = xAxis;
19705
19758
  this.sum = sum;
19706
19759
  this.indices = indices;
@@ -19716,9 +19769,9 @@ class CubeMatrixPageComponent extends CubeMatrixBase {
19716
19769
  });
19717
19770
  }
19718
19771
  }
19719
- CubeMatrixPageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CubeMatrixPageComponent, deps: [{ token: PopupRef }, { token: POPUP_DATA }, { token: CubeService }, { token: DatasourceService }, { token: SessionService }, { token: PromptService }], target: i0.ɵɵFactoryTarget.Component });
19720
- CubeMatrixPageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: CubeMatrixPageComponent, selector: "ng-component", viewQueries: [{ propertyName: "table", first: true, predicate: CubeMatrixComponent, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<mat-progress-bar mode=\"query\" [style.visibility]=\"loading ? 'visible':'hidden'\"></mat-progress-bar>\r\n<div class=\"container\">\r\n <div class=\"row\" *ngIf=\"!preloading\">\r\n <span class=\"divider\"></span>\r\n <!-- title -->\r\n <button mat-icon-button [matMenuTriggerFor]=\"options\" *ngIf=\"patterns && patterns.length\"><mat-icon [class.filled]=\"pattern\">filter_alt</mat-icon></button>\r\n <mat-menu #options xPosition=\"before\">\r\n <!-- patterns -->\r\n <button mat-menu-item *ngFor=\"let p of patterns\" (click)=\"aggregate(p)\">{{p.title}}</button>\r\n </mat-menu>\r\n <button mat-icon-button (click)=\"reset()\" [disabled]=\"!pattern\" [bizdocTooltip]=\"'Clear' | translate\">\r\n <mat-icon>clear_all</mat-icon>\r\n </button>\r\n <!-- filters -->\r\n <ng-container *ngFor=\"let f of filters\">\r\n <button mat-button [matMenuTriggerFor]=\"fmenu\">{{values[f.name]| typeValue : f.dataType | async}} <mat-icon>arrow_drop_down</mat-icon></button>\r\n <mat-menu #fmenu xPosition=\"before\">\r\n <button mat-menu-item *ngFor=\"let kv of sources[f.name] | async\"\r\n (click)=\"filter(f.name, kv.key, kv.value)\">\r\n {{kv.value}}\r\n </button>\r\n </mat-menu>\r\n </ng-container>\r\n </div>\r\n <bizdoc-cube-matrix [cube]=\"cube\" [xAxis]=\"xAxis\" [series]=\"series\" [indices]=\"indices\" [sum]=sum [interactive]=\"false\"\r\n [filters]=\"axes\" [(loading)]=\"loading\"></bizdoc-cube-matrix>\r\n</div>\r\n", styles: [".container{padding:8px}\n"], components: [{ type: i11$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { 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: CubeMatrixComponent, selector: "bizdoc-cube-matrix", inputs: ["cube", "xAxis", "series", "indices", "scope", "sum", "filters", "loading", "interactive"], outputs: ["explore", "loadingChange"] }], directives: [{ type: i10$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i10$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: TooltipDirective, selector: "[bizdocTooltip]", inputs: ["bizdocTooltip", "bizdocTooltipTemplate", "bizdocTooltipContext", "bizdocTooltipPosition", "bizdocTooltipDuration", "bizdocTooltipDisabled"] }], pipes: { "translate": TranslatePipe, "async": i10$1.AsyncPipe, "typeValue": TypeValuePipe } });
19721
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CubeMatrixPageComponent, decorators: [{
19772
+ CubeMatrixPopupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CubeMatrixPopupComponent, deps: [{ token: PopupRef }, { token: POPUP_DATA }, { token: CubeService }, { token: DatasourceService }, { token: SessionService }, { token: PromptService }], target: i0.ɵɵFactoryTarget.Component });
19773
+ CubeMatrixPopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: CubeMatrixPopupComponent, selector: "ng-component", viewQueries: [{ propertyName: "table", first: true, predicate: CubeMatrixComponent, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<mat-progress-bar mode=\"query\" [style.visibility]=\"loading ? 'visible':'hidden'\"></mat-progress-bar>\r\n<div class=\"container\">\r\n <div class=\"row\" *ngIf=\"!preloading\">\r\n <span class=\"divider\"></span>\r\n <!-- title -->\r\n <button mat-icon-button [matMenuTriggerFor]=\"options\" *ngIf=\"patterns && patterns.length\"><mat-icon [class.filled]=\"pattern\">filter_alt</mat-icon></button>\r\n <mat-menu #options xPosition=\"before\">\r\n <!-- patterns -->\r\n <button mat-menu-item *ngFor=\"let p of patterns\" (click)=\"aggregate(p)\">{{p.title}}</button>\r\n </mat-menu>\r\n <button mat-icon-button (click)=\"reset()\" [disabled]=\"!pattern\" [bizdocTooltip]=\"'Clear' | translate\">\r\n <mat-icon>clear_all</mat-icon>\r\n </button>\r\n <!-- filters -->\r\n <ng-container *ngFor=\"let f of filters\">\r\n <button mat-button [matMenuTriggerFor]=\"fmenu\">{{values[f.name]| typeValue : f.dataType | async}} <mat-icon>arrow_drop_down</mat-icon></button>\r\n <mat-menu #fmenu xPosition=\"before\">\r\n <button mat-menu-item *ngFor=\"let kv of sources[f.name] | async\"\r\n (click)=\"filter(f.name, kv.key, kv.value)\">\r\n {{kv.value}}\r\n </button>\r\n </mat-menu>\r\n </ng-container>\r\n </div>\r\n <bizdoc-cube-matrix [cube]=\"cube\" [xAxis]=\"xAxis\" [series]=\"series\" [indices]=\"indices\" [sum]=sum [interactive]=\"false\"\r\n [filters]=\"axes\" [(loading)]=\"loading\"></bizdoc-cube-matrix>\r\n</div>\r\n", styles: [".container{padding:8px}\n"], components: [{ type: i11$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { 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: CubeMatrixComponent, selector: "bizdoc-cube-matrix", inputs: ["cube", "xAxis", "series", "indices", "scope", "sum", "filters", "loading", "interactive"], outputs: ["explore", "loadingChange"] }], directives: [{ type: i10$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i10$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: TooltipDirective, selector: "[bizdocTooltip]", inputs: ["bizdocTooltip", "bizdocTooltipTemplate", "bizdocTooltipContext", "bizdocTooltipPosition", "bizdocTooltipDuration", "bizdocTooltipDisabled"] }], pipes: { "translate": TranslatePipe, "async": i10$1.AsyncPipe, "typeValue": TypeValuePipe } });
19774
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CubeMatrixPopupComponent, decorators: [{
19722
19775
  type: Component,
19723
19776
  args: [{ template: "<mat-progress-bar mode=\"query\" [style.visibility]=\"loading ? 'visible':'hidden'\"></mat-progress-bar>\r\n<div class=\"container\">\r\n <div class=\"row\" *ngIf=\"!preloading\">\r\n <span class=\"divider\"></span>\r\n <!-- title -->\r\n <button mat-icon-button [matMenuTriggerFor]=\"options\" *ngIf=\"patterns && patterns.length\"><mat-icon [class.filled]=\"pattern\">filter_alt</mat-icon></button>\r\n <mat-menu #options xPosition=\"before\">\r\n <!-- patterns -->\r\n <button mat-menu-item *ngFor=\"let p of patterns\" (click)=\"aggregate(p)\">{{p.title}}</button>\r\n </mat-menu>\r\n <button mat-icon-button (click)=\"reset()\" [disabled]=\"!pattern\" [bizdocTooltip]=\"'Clear' | translate\">\r\n <mat-icon>clear_all</mat-icon>\r\n </button>\r\n <!-- filters -->\r\n <ng-container *ngFor=\"let f of filters\">\r\n <button mat-button [matMenuTriggerFor]=\"fmenu\">{{values[f.name]| typeValue : f.dataType | async}} <mat-icon>arrow_drop_down</mat-icon></button>\r\n <mat-menu #fmenu xPosition=\"before\">\r\n <button mat-menu-item *ngFor=\"let kv of sources[f.name] | async\"\r\n (click)=\"filter(f.name, kv.key, kv.value)\">\r\n {{kv.value}}\r\n </button>\r\n </mat-menu>\r\n </ng-container>\r\n </div>\r\n <bizdoc-cube-matrix [cube]=\"cube\" [xAxis]=\"xAxis\" [series]=\"series\" [indices]=\"indices\" [sum]=sum [interactive]=\"false\"\r\n [filters]=\"axes\" [(loading)]=\"loading\"></bizdoc-cube-matrix>\r\n</div>\r\n", styles: [".container{padding:8px}\n"] }]
19724
19777
  }], ctorParameters: function () {
@@ -19860,7 +19913,7 @@ class CubeInfo {
19860
19913
  this._cf = _cf;
19861
19914
  }
19862
19915
  navigate(axes, options) {
19863
- const { cube, view, serie, xAxis, filters, aggregate, indices, sum } = options || {};
19916
+ const { cube, view, series, xAxis, filters, aggregate, indices, sum } = options || {};
19864
19917
  const ccube = cube ? this._session.profile.cubes.find(c => c.name === cube) : this._session.profile.cubes[0];
19865
19918
  if (isArray(axes))
19866
19919
  axes = this._mapAxes(ccube, axes);
@@ -19869,7 +19922,7 @@ class CubeInfo {
19869
19922
  queryParams: axes
19870
19923
  });
19871
19924
  else {
19872
- this._router.navigate(['cube', ccube.name, 'i', xAxis, serie], {
19925
+ this._router.navigate(['cube', ccube.name, 'i', xAxis, series], {
19873
19926
  queryParams: axes,
19874
19927
  state: { indices, aggregate, filters, sum }
19875
19928
  });
@@ -19895,7 +19948,7 @@ class CubeInfo {
19895
19948
  else {
19896
19949
  if (!options)
19897
19950
  throw 'no options';
19898
- this._open(CubeMatrixPageComponent, element, {
19951
+ this._open(CubeMatrixPopupComponent, element, {
19899
19952
  axes,
19900
19953
  options
19901
19954
  });
@@ -20301,6 +20354,8 @@ let CubeAnalysisWidget = class CubeAnalysisWidget {
20301
20354
  case 'Doughnut':
20302
20355
  case 'HalfDoughnut':
20303
20356
  case 'Pie':
20357
+ case 'Funnel':
20358
+ case 'Pyramid':
20304
20359
  comp = CubeAccumAnalysisWidget;
20305
20360
  break;
20306
20361
  default:
@@ -20385,13 +20440,17 @@ let CubeWidgetFilterComponent = class CubeWidgetFilterComponent {
20385
20440
  this._session = _session;
20386
20441
  this._fb = _fb;
20387
20442
  this.exclude = [];
20388
- const { xAxis, exclude, cube: name } = this._widgetRef.options;
20443
+ const { xAxis, series, exclude, cube: name } = this._widgetRef.options;
20389
20444
  this.cube = name;
20390
- if (xAxis) {
20391
- if (isArray(xAxis))
20392
- this.exclude = [...xAxis];
20445
+ if (isArray(xAxis))
20446
+ this.exclude = [...xAxis];
20447
+ else
20448
+ this.exclude.push(xAxis);
20449
+ if (series) {
20450
+ if (isArray(series))
20451
+ this.exclude = this.exclude.concat(series);
20393
20452
  else
20394
- this.exclude.push(xAxis);
20453
+ this.exclude.push(series);
20395
20454
  }
20396
20455
  if (exclude) {
20397
20456
  if (isArray(exclude))
@@ -25266,7 +25325,7 @@ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
25266
25325
  DashboardComponent, WidgetItemComponent, CubeWidgetFilterComponent, CubeAccumAnalysisWidget, CubeAnalysisWidget, CubeChartAnalysisWidget, ActionsWidget, RecentsWidget,
25267
25326
  AskDialog, AboutDialog, ActionDialog,
25268
25327
  ImpersonateDialog,
25269
- ConversationComponent, CubeMatrixPageComponent,
25328
+ ConversationComponent, CubeMatrixPopupComponent,
25270
25329
  VersionCompareComponent, ExploreDocumentComponent, TasksComponent,
25271
25330
  PendingResultsWidget, CompareDepartmentsWidget, CubeDocumentsComponent, CubeDocumentsWidget,
25272
25331
  PersonalScoreWidget, PersonalActivityWidget, PeersPerformanceWidget, UsagePivotComponent, UsageChartComponent, UsageReportArgs,
@@ -25403,7 +25462,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
25403
25462
  DashboardComponent, WidgetItemComponent, CubeWidgetFilterComponent, CubeAccumAnalysisWidget, CubeAnalysisWidget, CubeChartAnalysisWidget, ActionsWidget, RecentsWidget,
25404
25463
  AskDialog, AboutDialog, ActionDialog,
25405
25464
  ImpersonateDialog,
25406
- ConversationComponent, CubeMatrixPageComponent,
25465
+ ConversationComponent, CubeMatrixPopupComponent,
25407
25466
  VersionCompareComponent, ExploreDocumentComponent, TasksComponent,
25408
25467
  PendingResultsWidget, CompareDepartmentsWidget, CubeDocumentsComponent, CubeDocumentsWidget,
25409
25468
  PersonalScoreWidget, PersonalActivityWidget, PeersPerformanceWidget, UsagePivotComponent, UsageChartComponent, UsageReportArgs,