@bizdoc/core 1.10.2 → 1.10.3
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/admin/positions/positions.component.mjs +130 -61
- package/esm2020/lib/core/session.service.mjs +4 -1
- package/esm2020/lib/cube/accum/accum.component.mjs +67 -15
- package/esm2020/lib/cube/chart/chart.component.mjs +62 -13
- package/esm2020/lib/cube/cube-view.component.mjs +1 -2
- package/esm2020/lib/cube/cube.service.mjs +5 -4
- package/esm2020/lib/cube/declarations.mjs +1 -1
- package/esm2020/lib/cube/explore/explore-items.component.mjs +40 -9
- package/esm2020/lib/cube/grid/grid.component.mjs +3 -4
- package/esm2020/lib/cube/grid/spreadsheet.component.mjs +39 -20
- package/esm2020/lib/cube/matrix/table.component.mjs +4 -4
- package/esm2020/lib/cube/pivot/pivot.component.mjs +79 -13
- package/esm2020/lib/reports/cube/usage-args.component.mjs +1 -1
- package/esm2020/lib/reports/cube/usage-base.mjs +1 -1
- package/esm2020/lib/reports/cube/usage-chart.component.mjs +76 -10
- package/esm2020/lib/reports/cube/usage-pivot.component.mjs +1 -1
- package/esm2020/lib/reports/report-viewer.component.mjs +40 -14
- package/esm2020/lib/views/cube/chart.component.mjs +1 -1
- package/esm2020/lib/views/cube/pivot.component.mjs +1 -1
- package/fesm2015/bizdoc-core.mjs +522 -152
- package/fesm2015/bizdoc-core.mjs.map +1 -1
- package/fesm2020/bizdoc-core.mjs +521 -149
- package/fesm2020/bizdoc-core.mjs.map +1 -1
- package/lib/admin/positions/positions.component.d.ts +0 -1
- package/lib/core/session.service.d.ts +1 -0
- package/lib/cube/accum/accum.component.d.ts +4 -3
- package/lib/cube/chart/chart.component.d.ts +2 -1
- package/lib/cube/declarations.d.ts +0 -1
- package/lib/cube/explore/explore-items.component.d.ts +1 -1
- package/lib/cube/grid/grid.component.d.ts +1 -1
- package/lib/cube/grid/spreadsheet.component.d.ts +1 -2
- package/lib/cube/pivot/pivot.component.d.ts +1 -1
- package/lib/reports/cube/usage-args.component.d.ts +2 -2
- package/lib/reports/cube/usage-base.d.ts +8 -12
- package/lib/reports/cube/usage-chart.component.d.ts +1 -1
- package/lib/reports/report-viewer.component.d.ts +3 -1
- package/package.json +1 -1
package/fesm2015/bizdoc-core.mjs
CHANGED
@@ -18,7 +18,7 @@ import { MatIconModule } from '@angular/material/icon';
|
|
18
18
|
import * as i10 from '@angular/material/progress-spinner';
|
19
19
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
20
20
|
import * as i10$1 from '@angular/common';
|
21
|
-
import { CommonModule, getCurrencySymbol, formatNumber, formatPercent, formatCurrency } from '@angular/common';
|
21
|
+
import { CommonModule, getCurrencySymbol, getLocaleNumberFormat, NumberFormatStyle, formatNumber, formatPercent, formatCurrency } from '@angular/common';
|
22
22
|
import * as i6 from '@angular/flex-layout/flex';
|
23
23
|
import { ESCAPE, ENTER, COMMA, RIGHT_ARROW, LEFT_ARROW, UP_ARROW, DOWN_ARROW } from '@angular/cdk/keycodes';
|
24
24
|
import { HubConnectionBuilder, HubConnectionState } from '@microsoft/signalr';
|
@@ -116,7 +116,7 @@ import { SelectionModel } from '@angular/cdk/collections';
|
|
116
116
|
import * as i24 from '@angular/flex-layout/extended';
|
117
117
|
import * as i8$2 from '@syncfusion/ej2-angular-charts';
|
118
118
|
import { AccumulationChart, PyramidSeries, FunnelSeries, AccumulationDataLabel, AccumulationTooltip, AccumulationLegend, Export, PieSeries, Chart as Chart$1, Category, DateTime, Tooltip, Legend, BarSeries, AreaSeries, BubbleSeries, ColumnSeries, LineSeries, PolarSeries, RadarSeries, SplineSeries, SplineAreaSeries, ScatterSeries, StackingLineSeries, StackingAreaSeries, StackingColumnSeries, StackingBarSeries, StepAreaSeries, StepLineSeries, 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, ChartComponent } from '@syncfusion/ej2-angular-charts';
|
119
|
-
import
|
119
|
+
import { Workbook } from '@syncfusion/ej2-excel-export';
|
120
120
|
import { Chart } from '@syncfusion/ej2-charts';
|
121
121
|
import * as i6$5 from '@syncfusion/ej2-angular-grids';
|
122
122
|
import { Grid, Selection, Aggregate, Freeze, ExcelExport, Resize, GridModule, PagerModule, ExcelExportService, AggregateService, FreezeService, GroupService, PageService, ResizeService, SortService, SelectionService as SelectionService$1, GridComponent } from '@syncfusion/ej2-angular-grids';
|
@@ -1103,6 +1103,9 @@ class SessionService {
|
|
1103
1103
|
get userId() {
|
1104
1104
|
return this._profile.byId || this.profile.userId;
|
1105
1105
|
}
|
1106
|
+
get locale() {
|
1107
|
+
return this.language.split('-')[0];
|
1108
|
+
}
|
1106
1109
|
get language() {
|
1107
1110
|
if (!this._lang) {
|
1108
1111
|
this._lang = this._cookies.get('lang');
|
@@ -5495,11 +5498,12 @@ class CubeService {
|
|
5495
5498
|
return currencyCode || DEFAULT_CURRENCY;
|
5496
5499
|
}
|
5497
5500
|
get digitsInfo() {
|
5498
|
-
|
5501
|
+
const { fractionDigits } = this;
|
5502
|
+
return `1.${fractionDigits}-${fractionDigits}`;
|
5499
5503
|
}
|
5500
5504
|
get fractionDigits() {
|
5501
|
-
const { formats } = this._config
|
5502
|
-
return fractionDigits
|
5505
|
+
const { formats } = this._config, { fractionDigits } = formats || {};
|
5506
|
+
return fractionDigits !== undefined ? fractionDigits : 2;
|
5503
5507
|
}
|
5504
5508
|
/**
|
5505
5509
|
* query cube by axes, series and indices
|
@@ -8663,7 +8667,12 @@ class CubeAccumulationChartComponent {
|
|
8663
8667
|
this.palettes = _session.accentPalette;
|
8664
8668
|
});
|
8665
8669
|
}
|
8670
|
+
set xAxis(val) {
|
8671
|
+
this._xAxis = isArray(val) ? val : [val];
|
8672
|
+
}
|
8666
8673
|
ngOnInit() {
|
8674
|
+
this._cube = this._session.profile.cubes.find(c => c.name === this.cube) || this._session.profile.cubes[0];
|
8675
|
+
this.currencyCode = this._cube.currencyCode;
|
8667
8676
|
switch (this.chartType) {
|
8668
8677
|
case 'Doughnut':
|
8669
8678
|
this.innerRadius = '10%';
|
@@ -8695,8 +8704,8 @@ class CubeAccumulationChartComponent {
|
|
8695
8704
|
pointClick(evt) {
|
8696
8705
|
const axes = {};
|
8697
8706
|
const x = evt.series.dataSource[evt.pointIndex].x.split(AXES_CODE_DIVIDER);
|
8698
|
-
for (let i = 0; i < this.
|
8699
|
-
axes[this.
|
8707
|
+
for (let i = 0; i < this._xAxis.length; i++)
|
8708
|
+
axes[this._xAxis[i]] = x[i];
|
8700
8709
|
this.explore.emit({ axes });
|
8701
8710
|
}
|
8702
8711
|
/**
|
@@ -8713,7 +8722,7 @@ class CubeAccumulationChartComponent {
|
|
8713
8722
|
}
|
8714
8723
|
execute() {
|
8715
8724
|
this.loadingChange.emit(true);
|
8716
|
-
this._service.series(this.cube, this.
|
8725
|
+
this._service.series(this.cube, this._xAxis, {
|
8717
8726
|
filters: this.filters,
|
8718
8727
|
scope: this.scope
|
8719
8728
|
}).subscribe(r => {
|
@@ -8755,12 +8764,59 @@ class CubeAccumulationChartComponent {
|
|
8755
8764
|
}, this._elementRef.nativeElement);
|
8756
8765
|
}
|
8757
8766
|
exportToExcel(title) {
|
8758
|
-
const
|
8759
|
-
|
8760
|
-
|
8761
|
-
|
8762
|
-
|
8763
|
-
|
8767
|
+
const numberFormat = this._cube.currencyCode ?
|
8768
|
+
getCurrencySymbol(this._cube.currencyCode, 'narrow') +
|
8769
|
+
getLocaleNumberFormat(this._session.locale, NumberFormatStyle.Currency)
|
8770
|
+
: getLocaleNumberFormat(this._session.locale, NumberFormatStyle.Decimal), rows = [{
|
8771
|
+
index: 1,
|
8772
|
+
cells: this._xAxis.map((x, i) => ({
|
8773
|
+
index: i + 1,
|
8774
|
+
value: this._cube.axes.find(a => a.name === x).title,
|
8775
|
+
cellStyle: {
|
8776
|
+
bold: true
|
8777
|
+
}
|
8778
|
+
}))
|
8779
|
+
}];
|
8780
|
+
rows[0].cells.push({
|
8781
|
+
index: this._xAxis.length + 1,
|
8782
|
+
value: this._translate.get('Value'),
|
8783
|
+
cellStyle: {
|
8784
|
+
bold: true
|
8785
|
+
}
|
8786
|
+
});
|
8787
|
+
this.dataSource.forEach((p, i) => {
|
8788
|
+
const cells = this._xAxis.map((_, j) => {
|
8789
|
+
return {
|
8790
|
+
index: j + 1,
|
8791
|
+
value: p.name.split(AXES_LABEL_DIVIDER)[j]
|
8792
|
+
};
|
8793
|
+
});
|
8794
|
+
cells.push({
|
8795
|
+
type: 'number',
|
8796
|
+
index: this._xAxis.length + 1,
|
8797
|
+
cellStyle: {
|
8798
|
+
numberFormat,
|
8799
|
+
hAlign: 'right'
|
8800
|
+
},
|
8801
|
+
value: p.y
|
8802
|
+
});
|
8803
|
+
rows.push({
|
8804
|
+
index: i + 2,
|
8805
|
+
cells
|
8806
|
+
});
|
8807
|
+
});
|
8808
|
+
const book = new Workbook({
|
8809
|
+
worksheets: [
|
8810
|
+
{
|
8811
|
+
enableRtl: this._session.inverse,
|
8812
|
+
name: this._translate.get('SheetN', 1),
|
8813
|
+
columns: [...this._xAxis.map((_, i) => ({ index: i + 1, width: 250 })),
|
8814
|
+
{ index: this._xAxis.length + 1 },],
|
8815
|
+
rows
|
8816
|
+
}
|
8817
|
+
],
|
8818
|
+
}, 'xlsx');
|
8819
|
+
book.save(`${title}.xlsx`);
|
8764
8820
|
}
|
8765
8821
|
ngOnDestroy() {
|
8766
8822
|
this.accumchart && this.accumchart.destroy();
|
@@ -8770,7 +8826,7 @@ class CubeAccumulationChartComponent {
|
|
8770
8826
|
}
|
8771
8827
|
CubeAccumulationChartComponent.nextId = 0;
|
8772
8828
|
CubeAccumulationChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CubeAccumulationChartComponent, deps: [{ token: CubeService }, { token: PromptService }, { token: TranslateService }, { token: i0.ElementRef }, { token: SessionService }], target: i0.ɵɵFactoryTarget.Component });
|
8773
|
-
CubeAccumulationChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.0", type: CubeAccumulationChartComponent, selector: "bizdoc-cube-accum", inputs: { height: "height", width: "width", cube: "cube", xAxis: "xAxis",
|
8829
|
+
CubeAccumulationChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.0", type: CubeAccumulationChartComponent, selector: "bizdoc-cube-accum", inputs: { height: "height", width: "width", cube: "cube", xAxis: "xAxis", filters: "filters", chartType: "chartType", scope: "scope", loading: "loading" }, outputs: { loadingChange: "loadingChange", explore: "explore" }, host: { properties: { "id": "this.id" }, classAttribute: "cube-view" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true });
|
8774
8830
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CubeAccumulationChartComponent, decorators: [{
|
8775
8831
|
type: Component,
|
8776
8832
|
args: [{
|
@@ -8790,8 +8846,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
8790
8846
|
type: Input
|
8791
8847
|
}], xAxis: [{
|
8792
8848
|
type: Input
|
8793
|
-
}], indices: [{
|
8794
|
-
type: Input
|
8795
8849
|
}], filters: [{
|
8796
8850
|
type: Input
|
8797
8851
|
}], chartType: [{
|
@@ -8895,6 +8949,8 @@ class CubeChartComponent {
|
|
8895
8949
|
this._indices = null;
|
8896
8950
|
}
|
8897
8951
|
ngOnInit() {
|
8952
|
+
this._cube = this._session.profile.cubes.find(c => c.name === this.cube) || this._session.profile.cubes[0];
|
8953
|
+
this.currencyCode = this._cube.currencyCode;
|
8898
8954
|
if (this.chartType === 'Line' || this.chartType === 'Spline')
|
8899
8955
|
this.crosshair.enable = true;
|
8900
8956
|
this.primaryYAxis.labelFormat = this.currencyCode ? 'c0' : 'n0';
|
@@ -9006,14 +9062,62 @@ class CubeChartComponent {
|
|
9006
9062
|
this.explore.emit({ axes, index });
|
9007
9063
|
}
|
9008
9064
|
exportToExcel(title) {
|
9009
|
-
const
|
9010
|
-
|
9011
|
-
|
9012
|
-
|
9013
|
-
|
9014
|
-
|
9065
|
+
const numberFormat = this._cube.currencyCode ?
|
9066
|
+
getCurrencySymbol(this._cube.currencyCode, 'narrow') +
|
9067
|
+
getLocaleNumberFormat(this._session.locale, NumberFormatStyle.Currency)
|
9068
|
+
: getLocaleNumberFormat(this._session.locale, NumberFormatStyle.Decimal), worksheets = [];
|
9069
|
+
this._data.forEach(s => {
|
9070
|
+
const cells = this._xAxis.map((x, i) => ({
|
9071
|
+
index: i + 1,
|
9072
|
+
value: this._cube.axes.find(a => a.name === x).title,
|
9073
|
+
cellStyle: {
|
9074
|
+
bold: true
|
9075
|
+
}
|
9076
|
+
}));
|
9077
|
+
cells.push({
|
9078
|
+
index: this._xAxis.length + 1,
|
9079
|
+
value: this._translate.get('Value'),
|
9080
|
+
cellStyle: {
|
9081
|
+
bold: true
|
9082
|
+
}
|
9083
|
+
});
|
9084
|
+
const rows = [{
|
9085
|
+
index: 1,
|
9086
|
+
cells
|
9087
|
+
}];
|
9088
|
+
s.points.forEach((p, i) => {
|
9089
|
+
const cells = this._xAxis.map((_, j) => {
|
9090
|
+
return {
|
9091
|
+
index: j + 1,
|
9092
|
+
value: p.name.split(AXES_LABEL_DIVIDER)[j]
|
9093
|
+
};
|
9094
|
+
});
|
9095
|
+
cells.push({
|
9096
|
+
type: 'number',
|
9097
|
+
index: this._xAxis.length + 1,
|
9098
|
+
cellStyle: {
|
9099
|
+
numberFormat,
|
9100
|
+
hAlign: 'right'
|
9101
|
+
},
|
9102
|
+
value: p.y
|
9103
|
+
});
|
9104
|
+
rows.push({
|
9105
|
+
index: i + 2,
|
9106
|
+
cells
|
9107
|
+
});
|
9108
|
+
});
|
9109
|
+
worksheets.push({
|
9110
|
+
enableRtl: this.enableRtl,
|
9111
|
+
name: s.title,
|
9112
|
+
columns: [...this._xAxis.map((_, i) => ({ index: i + 1, width: 250 })),
|
9113
|
+
{ index: this._xAxis.length + 1 },],
|
9114
|
+
rows
|
9115
|
+
});
|
9015
9116
|
});
|
9016
|
-
|
9117
|
+
const book = new Workbook({
|
9118
|
+
worksheets,
|
9119
|
+
}, 'xlsx');
|
9120
|
+
book.save(`${title}.xlsx`);
|
9017
9121
|
}
|
9018
9122
|
ngOnDestroy() {
|
9019
9123
|
this.chart && this.chart.destroy();
|
@@ -9023,7 +9127,7 @@ class CubeChartComponent {
|
|
9023
9127
|
}
|
9024
9128
|
CubeChartComponent.nextId = 0;
|
9025
9129
|
CubeChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CubeChartComponent, deps: [{ token: CubeService }, { token: PromptService }, { token: TranslateService }, { token: SessionService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
9026
|
-
CubeChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.0", type: CubeChartComponent, selector: "bizdoc-cube-chart", inputs: { width: "width", height: "height", cube: "cube", xAxis: "xAxis", series: "series", indices: "indices", filters: "filters", yAxis: "yAxis", chartType: "chartType", indicesChartType: "indicesChartType", scope: "scope",
|
9130
|
+
CubeChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.0", type: CubeChartComponent, selector: "bizdoc-cube-chart", inputs: { width: "width", height: "height", cube: "cube", xAxis: "xAxis", series: "series", indices: "indices", filters: "filters", yAxis: "yAxis", chartType: "chartType", indicesChartType: "indicesChartType", scope: "scope", loading: "loading" }, outputs: { explore: "explore", loadingChange: "loadingChange" }, host: { attributes: { "dir": "ltr" }, properties: { "id": "this.id" }, classAttribute: "cube-view" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true });
|
9027
9131
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CubeChartComponent, decorators: [{
|
9028
9132
|
type: Component,
|
9029
9133
|
args: [{
|
@@ -9056,8 +9160,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
9056
9160
|
type: Input
|
9057
9161
|
}], scope: [{
|
9058
9162
|
type: Input
|
9059
|
-
}], currencyCode: [{
|
9060
|
-
type: Input
|
9061
9163
|
}], explore: [{
|
9062
9164
|
type: Output
|
9063
9165
|
}], loading: [{
|
@@ -9098,6 +9200,7 @@ class CubeGridComponent {
|
|
9098
9200
|
}
|
9099
9201
|
ngOnInit() {
|
9100
9202
|
this._cube = this.cube ? this._session.profile.cubes.find(c => c.name === this.cube) : this._session.profile.cubes[0];
|
9203
|
+
this.currencyCode = this._cube.currencyCode;
|
9101
9204
|
const x = this._cube.axes.find(a => a.name === this._xAxis[0]), y = this._cube.axes.find(a => a.name === this._series[0]);
|
9102
9205
|
const promises = [];
|
9103
9206
|
// aquire columns source
|
@@ -9244,7 +9347,7 @@ class CubeGridComponent {
|
|
9244
9347
|
}
|
9245
9348
|
CubeGridComponent.nextId = 0;
|
9246
9349
|
CubeGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CubeGridComponent, deps: [{ token: SessionService }, { token: PromptService }, { token: DatasourceService }, { token: CubeService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
9247
|
-
CubeGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.0", type: CubeGridComponent, selector: "bizdoc-cube-grid", inputs: { width: "width", height: "height", cube: "cube", xAxis: "xAxis", series: "series", indices: "indices", filters: "filters",
|
9350
|
+
CubeGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.0", type: CubeGridComponent, selector: "bizdoc-cube-grid", inputs: { width: "width", height: "height", cube: "cube", xAxis: "xAxis", series: "series", indices: "indices", filters: "filters", loading: "loading" }, outputs: { explore: "explore", loadingChange: "loadingChange" }, host: { properties: { "id": "this.id" }, classAttribute: "cube-view" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true, styles: [".nowrap{white-space:nowrap;word-wrap:normal}::ng-deep .e-rowcell:not(.e-headertext){cursor:pointer}::ng-deep .e-grid td.e-cellselectionbackground{background-color:none}\n"] });
|
9248
9351
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CubeGridComponent, decorators: [{
|
9249
9352
|
type: Component,
|
9250
9353
|
args: [{ selector: 'bizdoc-cube-grid', template: '', host: {
|
@@ -9264,8 +9367,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
9264
9367
|
type: Input
|
9265
9368
|
}], filters: [{
|
9266
9369
|
type: Input
|
9267
|
-
}], currencyCode: [{
|
9268
|
-
type: Input
|
9269
9370
|
}], explore: [{
|
9270
9371
|
type: Output
|
9271
9372
|
}], loading: [{
|
@@ -9339,6 +9440,7 @@ class CubePivotComponent {
|
|
9339
9440
|
}
|
9340
9441
|
ngOnInit() {
|
9341
9442
|
this._cube = this._session.profile.cubes.find(c => c.name === this.cube) || this._session.profile.cubes[0];
|
9443
|
+
this.currencyCode = this._cube.currencyCode;
|
9342
9444
|
this.dir = this.chartType ? 'ltr' : this._session.direction;
|
9343
9445
|
this.formatSettings[0].currency = this.currencyCode,
|
9344
9446
|
this.formatSettings[0].format = (this.currencyCode ? 'c' : 'n') + this._service.fractionDigits;
|
@@ -9581,18 +9683,84 @@ class CubePivotComponent {
|
|
9581
9683
|
this.explore.emit({ axes });
|
9582
9684
|
}
|
9583
9685
|
exportToExcel(title) {
|
9584
|
-
const fileName = `${title}.xlsx`;
|
9585
9686
|
const task = () => {
|
9586
9687
|
if (this.chartType) {
|
9587
|
-
const
|
9588
|
-
|
9589
|
-
|
9590
|
-
|
9591
|
-
|
9592
|
-
|
9688
|
+
const numberFormat = this._cube.currencyCode ?
|
9689
|
+
getCurrencySymbol(this._cube.currencyCode, 'narrow') +
|
9690
|
+
getLocaleNumberFormat(this._session.locale, NumberFormatStyle.Currency)
|
9691
|
+
: getLocaleNumberFormat(this._session.locale, NumberFormatStyle.Decimal), columns = this._cube.axes.filter(a => this._xAxis.indexOf(a.name) > -1 ||
|
9692
|
+
this._series.indexOf(a.name) > -1), rows = [{
|
9693
|
+
index: 1,
|
9694
|
+
cells: columns.map((c, i) => ({
|
9695
|
+
index: i + 1, value: c.title,
|
9696
|
+
cellStyle: {
|
9697
|
+
bold: true
|
9698
|
+
}
|
9699
|
+
}))
|
9700
|
+
}];
|
9701
|
+
rows[0].cells.push({
|
9702
|
+
index: columns.length + 1,
|
9703
|
+
value: this.yAxis ? this.yAxis.title :
|
9704
|
+
this._translate.get('Value'),
|
9705
|
+
cellStyle: {
|
9706
|
+
bold: true
|
9707
|
+
}
|
9708
|
+
});
|
9709
|
+
this._indices && this._indices.forEach((x, i) => rows[0].cells.push({
|
9710
|
+
index: columns.length + i + 2,
|
9711
|
+
value: this._getIndexTitle(x),
|
9712
|
+
cellStyle: {
|
9713
|
+
bold: true
|
9714
|
+
}
|
9715
|
+
}));
|
9716
|
+
this._data.forEach((r, i) => {
|
9717
|
+
const cells = columns.map((c, j) => {
|
9718
|
+
return {
|
9719
|
+
index: j + 1, value: r[c.name],
|
9720
|
+
cellStyle: {}
|
9721
|
+
};
|
9722
|
+
});
|
9723
|
+
cells.push({
|
9724
|
+
type: 'number',
|
9725
|
+
index: columns.length + 1,
|
9726
|
+
cellStyle: {
|
9727
|
+
numberFormat,
|
9728
|
+
hAlign: 'right'
|
9729
|
+
},
|
9730
|
+
value: r['value']
|
9731
|
+
});
|
9732
|
+
this._indices && this._indices.forEach((x, i) => cells.push({
|
9733
|
+
type: 'number',
|
9734
|
+
index: columns.length + i + 2,
|
9735
|
+
cellStyle: {
|
9736
|
+
numberFormat,
|
9737
|
+
hAlign: 'right'
|
9738
|
+
},
|
9739
|
+
value: r[x]
|
9740
|
+
}));
|
9741
|
+
rows.push({
|
9742
|
+
index: i + 2,
|
9743
|
+
cells
|
9744
|
+
});
|
9745
|
+
});
|
9746
|
+
const book = new Workbook({
|
9747
|
+
worksheets: [
|
9748
|
+
{
|
9749
|
+
enableRtl: this._session.inverse,
|
9750
|
+
name: this._translate.get('SheetN', 1),
|
9751
|
+
columns: [...columns.map((_, i) => ({ index: i + 1, width: 250 })),
|
9752
|
+
{ index: columns.length + 1 },
|
9753
|
+
...(this._indices ? this._indices.map((_, i) => ({
|
9754
|
+
index: columns.length + i + 2
|
9755
|
+
})) : [])],
|
9756
|
+
rows
|
9757
|
+
}
|
9758
|
+
],
|
9759
|
+
}, 'xlsx');
|
9760
|
+
book.save(`${title}.xlsx`);
|
9593
9761
|
}
|
9594
9762
|
else
|
9595
|
-
this.pivot.excelExport({ fileName
|
9763
|
+
this.pivot.excelExport({ fileName: `${title}.xlsx`, hierarchyExportMode: 'All', });
|
9596
9764
|
};
|
9597
9765
|
if (this.currencyCode && this.currencyCode !== DEFAULT_CURRENCY)
|
9598
9766
|
this._translate.cldr(this._session.language, CLDR_FILES).then(() => task());
|
@@ -9635,7 +9803,7 @@ class CubePivotComponent {
|
|
9635
9803
|
}
|
9636
9804
|
CubePivotComponent.nextId = 0;
|
9637
9805
|
CubePivotComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CubePivotComponent, deps: [{ token: CubeService }, { token: SessionService }, { token: TranslateService }, { token: PromptService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
9638
|
-
CubePivotComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.0", type: CubePivotComponent, selector: "bizdoc-cube-pivot", inputs: { width: "width", height: "height", cube: "cube", xAxis: "xAxis", yAxis: "yAxis", series: "series", indices: "indices", filters: "filters", chartType: "chartType", indicesChartType: "indicesChartType",
|
9806
|
+
CubePivotComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.0", type: CubePivotComponent, selector: "bizdoc-cube-pivot", inputs: { width: "width", height: "height", cube: "cube", xAxis: "xAxis", yAxis: "yAxis", series: "series", indices: "indices", filters: "filters", chartType: "chartType", indicesChartType: "indicesChartType", loading: "loading" }, outputs: { explore: "explore", loadingChange: "loadingChange" }, host: { properties: { "style.direction": "dir", "id": "this.id" }, classAttribute: "cube-view" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true, styles: ["::ng-deep .e-cellvalue{cursor:pointer}\n"] });
|
9639
9807
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CubePivotComponent, decorators: [{
|
9640
9808
|
type: Component,
|
9641
9809
|
args: [{
|
@@ -9667,8 +9835,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
9667
9835
|
type: Input
|
9668
9836
|
}], indicesChartType: [{
|
9669
9837
|
type: Input
|
9670
|
-
}], currencyCode: [{
|
9671
|
-
type: Input
|
9672
9838
|
}], explore: [{
|
9673
9839
|
type: Output
|
9674
9840
|
}], loading: [{
|
@@ -9709,14 +9875,14 @@ class CubeSpreadsheetComponent {
|
|
9709
9875
|
this._indices = isArray(val) ? val : [val];
|
9710
9876
|
}
|
9711
9877
|
ngOnInit() {
|
9878
|
+
this._cube = this.cube ? this._session.profile.cubes.find(c => c.name === this.cube) : this._session.profile.cubes[0];
|
9712
9879
|
this._numberFormat = this._intl.getNumberPattern({
|
9713
|
-
currency: this.currencyCode,
|
9714
|
-
format: this.currencyCode ? 'c' : 'n',
|
9880
|
+
currency: this._cube.currencyCode,
|
9881
|
+
format: this._cube.currencyCode ? 'c' : 'n',
|
9715
9882
|
useGrouping: true,
|
9716
9883
|
maximumFractionDigits: this._service.fractionDigits,
|
9717
9884
|
minimumFractionDigits: this._service.fractionDigits
|
9718
9885
|
});
|
9719
|
-
this._cube = this.cube ? this._session.profile.cubes.find(c => c.name === this.cube) : this._session.profile.cubes[0];
|
9720
9886
|
if (!this._series) {
|
9721
9887
|
this._axes = this._xAxis.map(c => this._cube.axes.find(a => a.name == c));
|
9722
9888
|
if (this._indices)
|
@@ -9815,12 +9981,12 @@ class CubeSpreadsheetComponent {
|
|
9815
9981
|
this._indices && this._indices.forEach(i => cells.push({
|
9816
9982
|
style: this.numberStyle,
|
9817
9983
|
format: this._numberFormat,
|
9818
|
-
value: (d[i] || 0)
|
9984
|
+
value: (d[i] || 0),
|
9819
9985
|
}));
|
9820
9986
|
cells.push({
|
9821
9987
|
style: this.numberStyle,
|
9822
9988
|
format: this._numberFormat,
|
9823
|
-
value: (d.value || 0)
|
9989
|
+
value: (d.value || 0),
|
9824
9990
|
});
|
9825
9991
|
this.dataSource.push({ cells, source: d, height: 25 });
|
9826
9992
|
});
|
@@ -9836,7 +10002,7 @@ class CubeSpreadsheetComponent {
|
|
9836
10002
|
if (serie) {
|
9837
10003
|
serie.points.forEach(p => map[p.x] = p.y);
|
9838
10004
|
this._xcolumns.forEach(c => cells.push({
|
9839
|
-
value: (map[c.key] || 0)
|
10005
|
+
value: (map[c.key] || 0),
|
9840
10006
|
format: this._numberFormat,
|
9841
10007
|
style: this.numberStyle
|
9842
10008
|
}));
|
@@ -9848,13 +10014,13 @@ class CubeSpreadsheetComponent {
|
|
9848
10014
|
if (serie) {
|
9849
10015
|
serie.points.forEach(p => map[p.x] = p.y);
|
9850
10016
|
this._xcolumns.forEach(c => cells.push({
|
9851
|
-
value: (map[c.key] || 0)
|
10017
|
+
value: (map[c.key] || 0),
|
9852
10018
|
format: this._numberFormat,
|
9853
10019
|
style: this.numberStyle
|
9854
10020
|
}));
|
9855
10021
|
}
|
9856
10022
|
else
|
9857
|
-
this._xcolumns.forEach(_ => cells.push({ value:
|
10023
|
+
this._xcolumns.forEach(_ => cells.push({ value: 0 }));
|
9858
10024
|
this.dataSource.push({ cells, height: 25 });
|
9859
10025
|
});
|
9860
10026
|
}
|
@@ -9969,13 +10135,33 @@ class CubeSpreadsheetComponent {
|
|
9969
10135
|
}
|
9970
10136
|
}
|
9971
10137
|
exportToExcel(title) {
|
9972
|
-
const
|
9973
|
-
|
9974
|
-
|
9975
|
-
|
9976
|
-
|
9977
|
-
|
9978
|
-
|
10138
|
+
const { rows } = this.spreadsheet.sheets[0], numberFormat = this._cube.currencyCode ?
|
10139
|
+
getCurrencySymbol(this._cube.currencyCode, 'narrow') +
|
10140
|
+
getLocaleNumberFormat(this._session.locale, NumberFormatStyle.Currency)
|
10141
|
+
: getLocaleNumberFormat(this._session.locale, NumberFormatStyle.Decimal), book = new Workbook({
|
10142
|
+
worksheets: [
|
10143
|
+
{
|
10144
|
+
name: this._translate.get('SheetN', 1),
|
10145
|
+
columns: rows[0].cells.map((_, i) => ({ index: i + 1, width: 150 })),
|
10146
|
+
rows: rows.map((r, i) => ({
|
10147
|
+
index: i + 1,
|
10148
|
+
cells: r.cells.map((c, j) => {
|
10149
|
+
const header = i === 0 || (this.series && j === 0);
|
10150
|
+
return {
|
10151
|
+
type: header ? 'text' : 'number',
|
10152
|
+
index: j + 1, value: c.value,
|
10153
|
+
cellStyle: {
|
10154
|
+
numberFormat,
|
10155
|
+
hAlign: header ? 'right' : 'center ',
|
10156
|
+
bold: header
|
10157
|
+
}
|
10158
|
+
};
|
10159
|
+
})
|
10160
|
+
})),
|
10161
|
+
},
|
10162
|
+
],
|
10163
|
+
}, 'xlsx');
|
10164
|
+
book.save(`${title}.xlsx`);
|
9979
10165
|
}
|
9980
10166
|
ngOnDestroy() {
|
9981
10167
|
this.spreadsheet && this.spreadsheet.destroy();
|
@@ -9983,7 +10169,7 @@ class CubeSpreadsheetComponent {
|
|
9983
10169
|
}
|
9984
10170
|
CubeSpreadsheetComponent.nextId = 0;
|
9985
10171
|
CubeSpreadsheetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CubeSpreadsheetComponent, deps: [{ token: SessionService }, { token: PromptService }, { token: CubeService }, { token: TranslateService }, { token: DatasourceService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
9986
|
-
CubeSpreadsheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.0", type: CubeSpreadsheetComponent, selector: "bizdoc-cube-spreadsheet", inputs: { width: "width", height: "height", cube: "cube", xAxis: "xAxis", yAxis: "yAxis", series: "series", indices: "indices", filters: "filters",
|
10172
|
+
CubeSpreadsheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.0", type: CubeSpreadsheetComponent, selector: "bizdoc-cube-spreadsheet", inputs: { width: "width", height: "height", cube: "cube", xAxis: "xAxis", yAxis: "yAxis", series: "series", indices: "indices", filters: "filters", loading: "loading" }, outputs: { explore: "explore", loadingChange: "loadingChange" }, host: { properties: { "id": "this.id" }, classAttribute: "cube-view" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true });
|
9987
10173
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CubeSpreadsheetComponent, decorators: [{
|
9988
10174
|
type: Component,
|
9989
10175
|
args: [{
|
@@ -10009,8 +10195,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
10009
10195
|
type: Input
|
10010
10196
|
}], filters: [{
|
10011
10197
|
type: Input
|
10012
|
-
}], currencyCode: [{
|
10013
|
-
type: Input
|
10014
10198
|
}], explore: [{
|
10015
10199
|
type: Output
|
10016
10200
|
}], loading: [{
|
@@ -10135,7 +10319,6 @@ class CubeViewComponent {
|
|
10135
10319
|
});
|
10136
10320
|
instance.cube = this.cube.name;
|
10137
10321
|
instance.xAxis = this.view.xAxis;
|
10138
|
-
instance.currencyCode = this.cube.currencyCode;
|
10139
10322
|
instance.filters = Object.assign(Object.assign({}, this.view.filters), this.filters);
|
10140
10323
|
instance.loadingChange.pipe(takeUntil(this._viewDestroy), debounceTime(150)).subscribe(e => this.loadingChange.emit(this.loading = e));
|
10141
10324
|
return instance;
|
@@ -11429,7 +11612,7 @@ class ExploreItemsComponent {
|
|
11429
11612
|
this._loading$.unsubscribe();
|
11430
11613
|
}
|
11431
11614
|
refresh() { this.ngOnChanges(null); }
|
11432
|
-
ngOnChanges(
|
11615
|
+
ngOnChanges(_) {
|
11433
11616
|
this._cube = this._session.profile.cubes.find(c => c.name === this.cube);
|
11434
11617
|
this.currencyCode = this._cube.currencyCode;
|
11435
11618
|
if (this.index)
|
@@ -11494,13 +11677,43 @@ class ExploreItemsComponent {
|
|
11494
11677
|
this.explore.emit({ keys, template: this._template });
|
11495
11678
|
}
|
11496
11679
|
exportExcel() {
|
11497
|
-
const
|
11498
|
-
|
11499
|
-
|
11500
|
-
|
11501
|
-
|
11680
|
+
const numberFormat = this._cube.currencyCode ?
|
11681
|
+
getCurrencySymbol(this._cube.currencyCode, 'narrow') +
|
11682
|
+
getLocaleNumberFormat(this._session.locale, NumberFormatStyle.Currency)
|
11683
|
+
: getLocaleNumberFormat(this._session.locale, NumberFormatStyle.Decimal), rows = [{
|
11684
|
+
index: 1,
|
11685
|
+
cells: this.columns.map((c, i) => ({
|
11686
|
+
index: i + 1, value: c.label,
|
11687
|
+
cellStyle: {
|
11688
|
+
bold: true
|
11689
|
+
}
|
11690
|
+
}))
|
11691
|
+
}];
|
11692
|
+
this.dataSource.data.forEach((r, i) => rows.push({
|
11693
|
+
index: i + 2,
|
11694
|
+
cells: this.columns.map((c, j) => {
|
11695
|
+
const isnumber = c.type === 'Currency' || c.type === 'Number';
|
11696
|
+
return {
|
11697
|
+
type: isnumber ? 'text' : 'number',
|
11698
|
+
index: j + 1, value: r[c.name],
|
11699
|
+
cellStyle: {
|
11700
|
+
numberFormat,
|
11701
|
+
hAlign: isnumber ? 'right' : 'general'
|
11702
|
+
}
|
11703
|
+
};
|
11704
|
+
})
|
11705
|
+
}));
|
11706
|
+
const book = new Workbook({
|
11707
|
+
worksheets: [
|
11708
|
+
{
|
11709
|
+
name: this._translate.get('SheetN', 1),
|
11710
|
+
columns: this.columns.map((_, i) => ({ index: i + 1, width: 250 })),
|
11711
|
+
rows
|
11712
|
+
}
|
11713
|
+
],
|
11714
|
+
}, 'xlsx');
|
11502
11715
|
this._service.nameOf(this.axes, this.cube).
|
11503
|
-
subscribe(o =>
|
11716
|
+
subscribe(o => book.save(`${this._cube.title} ${o}.xlsx`));
|
11504
11717
|
}
|
11505
11718
|
}
|
11506
11719
|
ExploreItemsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ExploreItemsComponent, deps: [{ token: CubeService }, { token: PromptService }, { token: SessionService }, { token: TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
@@ -11659,12 +11872,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
11659
11872
|
/** reportviewer component*/
|
11660
11873
|
class ReportViewerComponent {
|
11661
11874
|
/** reportviewer ctor */
|
11662
|
-
constructor(_http, _sb, _injector, _hub, _translate, _factoryResolver) {
|
11875
|
+
constructor(_http, _sb, _injector, _hub, _translate, _session, _factoryResolver) {
|
11663
11876
|
this._http = _http;
|
11664
11877
|
this._sb = _sb;
|
11665
11878
|
this._injector = _injector;
|
11666
11879
|
this._hub = _hub;
|
11667
11880
|
this._translate = _translate;
|
11881
|
+
this._session = _session;
|
11668
11882
|
this._factoryResolver = _factoryResolver;
|
11669
11883
|
this.progress = 0;
|
11670
11884
|
this._processing = false;
|
@@ -11737,12 +11951,36 @@ class ReportViewerComponent {
|
|
11737
11951
|
this._reportRef._exporting.next(args);
|
11738
11952
|
if (args.cancel)
|
11739
11953
|
return;
|
11740
|
-
const
|
11741
|
-
|
11742
|
-
|
11743
|
-
|
11744
|
-
|
11745
|
-
|
11954
|
+
const rows = [{
|
11955
|
+
index: 1,
|
11956
|
+
cells: this.report.columns.map((c, j) => ({
|
11957
|
+
index: j + 1, value: c.label,
|
11958
|
+
cellStyle: {
|
11959
|
+
bold: true,
|
11960
|
+
hAlign: c.type === 'Number' || c.type === 'Currency' ? 'right' : 'general'
|
11961
|
+
}
|
11962
|
+
}))
|
11963
|
+
}];
|
11964
|
+
args.data.forEach((r, i) => rows.push({
|
11965
|
+
index: i + 2,
|
11966
|
+
cells: this.report.columns.map((c, j) => ({
|
11967
|
+
index: j + 1, value: r[c.name],
|
11968
|
+
cellStyle: {
|
11969
|
+
hAlign: c.type === 'Number' || c.type === 'Currency' ? 'right' : 'general'
|
11970
|
+
}
|
11971
|
+
}))
|
11972
|
+
}));
|
11973
|
+
const book = new Workbook({
|
11974
|
+
worksheets: [
|
11975
|
+
{
|
11976
|
+
enableRtl: this._session.inverse,
|
11977
|
+
name: this._translate.get('SheetN', 1),
|
11978
|
+
columns: this.report.columns.map((_, i) => ({ index: i + 1, width: 250 })),
|
11979
|
+
rows
|
11980
|
+
}
|
11981
|
+
],
|
11982
|
+
}, 'xlsx');
|
11983
|
+
book.save(`${this.report.title}.xlsx`);
|
11746
11984
|
}
|
11747
11985
|
ngOnDestroy() {
|
11748
11986
|
this._reportRef._destroy();
|
@@ -11751,12 +11989,12 @@ class ReportViewerComponent {
|
|
11751
11989
|
this._destroy.complete();
|
11752
11990
|
}
|
11753
11991
|
}
|
11754
|
-
ReportViewerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ReportViewerComponent, deps: [{ token: i1.HttpClient }, { token: PromptService }, { token: i0.Injector }, { token: HubService }, { token: TranslateService }, { token: BizDocComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Component });
|
11992
|
+
ReportViewerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ReportViewerComponent, deps: [{ token: i1.HttpClient }, { token: PromptService }, { token: i0.Injector }, { token: HubService }, { token: TranslateService }, { token: SessionService }, { token: BizDocComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Component });
|
11755
11993
|
ReportViewerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.0", type: ReportViewerComponent, selector: "bizdoc-report-viewer", inputs: { report: "report", args: "args" }, host: { listeners: { "window:resize": "resize()" } }, viewQueries: [{ propertyName: "viewContainer", first: true, predicate: ["vc"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "table", first: true, predicate: TableViewComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<mat-progress-bar mode=\"buffer\" [value]=progress [bufferValue]=0 [style.visibility]=\"progress > 0 && progress < 100 ? 'visible':'hidden'\"></mat-progress-bar>\r\n<ng-container #vc></ng-container>\r\n", styles: [":host{display:flex;flex-direction:column}:host :last-child{flex:1 auto}\n"], components: [{ type: i11$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }] });
|
11756
11994
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ReportViewerComponent, decorators: [{
|
11757
11995
|
type: Component,
|
11758
11996
|
args: [{ selector: 'bizdoc-report-viewer', template: "<mat-progress-bar mode=\"buffer\" [value]=progress [bufferValue]=0 [style.visibility]=\"progress > 0 && progress < 100 ? 'visible':'hidden'\"></mat-progress-bar>\r\n<ng-container #vc></ng-container>\r\n", styles: [":host{display:flex;flex-direction:column}:host :last-child{flex:1 auto}\n"] }]
|
11759
|
-
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: PromptService }, { type: i0.Injector }, { type: HubService }, { type: TranslateService }, { type: BizDocComponentFactoryResolver }]; }, propDecorators: { report: [{
|
11997
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: PromptService }, { type: i0.Injector }, { type: HubService }, { type: TranslateService }, { type: SessionService }, { type: BizDocComponentFactoryResolver }]; }, propDecorators: { report: [{
|
11760
11998
|
type: Input
|
11761
11999
|
}], args: [{
|
11762
12000
|
type: Input
|
@@ -14106,13 +14344,13 @@ class CubeMatrixComponent {
|
|
14106
14344
|
else if (sum.calculate)
|
14107
14345
|
switch (sum.calculate) {
|
14108
14346
|
case 'month':
|
14109
|
-
value = 'M' + ('0' + new Date().getMonth().toString()).slice(-2);
|
14347
|
+
value = 'M' + ('0' + (new Date().getMonth() + 1).toString()).slice(-2);
|
14110
14348
|
break;
|
14111
14349
|
case 'year':
|
14112
14350
|
value = new Date().getFullYear().toString();
|
14113
14351
|
break;
|
14114
14352
|
case 'quarter':
|
14115
|
-
value = Math.ceil(new Date().getMonth() / 3).toString();
|
14353
|
+
value = Math.ceil((new Date().getMonth() + 1) / 3).toString();
|
14116
14354
|
break;
|
14117
14355
|
}
|
14118
14356
|
return Object.assign(Object.assign({}, sum), { value });
|
@@ -14155,7 +14393,7 @@ class CubeMatrixComponent {
|
|
14155
14393
|
value: s.title,
|
14156
14394
|
explorable: !isFunction(s.calculate),
|
14157
14395
|
accumulate: s.accumulate,
|
14158
|
-
precision: s.precision,
|
14396
|
+
precision: s.precision || this.PRECISION,
|
14159
14397
|
format: s.format,
|
14160
14398
|
index: i
|
14161
14399
|
};
|
@@ -21814,14 +22052,79 @@ let UsageChartComponent = class UsageChartComponent extends UsageReportBase {
|
|
21814
22052
|
this.pivot.chart.chartResize();
|
21815
22053
|
}
|
21816
22054
|
}
|
21817
|
-
onExport(
|
21818
|
-
|
21819
|
-
|
21820
|
-
|
21821
|
-
|
21822
|
-
|
21823
|
-
|
21824
|
-
|
22055
|
+
onExport(title) {
|
22056
|
+
const numberFormat = this._cube.currencyCode ?
|
22057
|
+
getCurrencySymbol(this._cube.currencyCode, 'narrow') +
|
22058
|
+
getLocaleNumberFormat(this._session.locale, NumberFormatStyle.Currency)
|
22059
|
+
: getLocaleNumberFormat(this._session.locale, NumberFormatStyle.Decimal), columns = this._cube.axes.filter(a => this._options.series.indexOf(a.name) > -1), rows = [{
|
22060
|
+
index: 1,
|
22061
|
+
cells: columns.map((c, i) => ({
|
22062
|
+
index: i + 1, value: c.title,
|
22063
|
+
cellStyle: {
|
22064
|
+
bold: true
|
22065
|
+
}
|
22066
|
+
}))
|
22067
|
+
}];
|
22068
|
+
rows[0].cells.push({
|
22069
|
+
index: columns.length + 1,
|
22070
|
+
value: this._cube.yAxis ? this._cube.yAxis.title :
|
22071
|
+
this._translate.get('Value'),
|
22072
|
+
cellStyle: {
|
22073
|
+
bold: true
|
22074
|
+
}
|
22075
|
+
});
|
22076
|
+
this._indices && this._indices.forEach((x, i) => rows[0].cells.push({
|
22077
|
+
index: columns.length + i + 2,
|
22078
|
+
value: x.title,
|
22079
|
+
cellStyle: {
|
22080
|
+
bold: true
|
22081
|
+
}
|
22082
|
+
}));
|
22083
|
+
this._data.forEach((r, i) => {
|
22084
|
+
const cells = columns.map((c, j) => {
|
22085
|
+
return {
|
22086
|
+
index: j + 1, value: r[c.name],
|
22087
|
+
cellStyle: {}
|
22088
|
+
};
|
22089
|
+
});
|
22090
|
+
cells.push({
|
22091
|
+
type: 'number',
|
22092
|
+
index: columns.length + 1,
|
22093
|
+
cellStyle: {
|
22094
|
+
numberFormat,
|
22095
|
+
hAlign: 'right'
|
22096
|
+
},
|
22097
|
+
value: r['value']
|
22098
|
+
});
|
22099
|
+
this._indices && this._indices.forEach((x, i) => cells.push({
|
22100
|
+
type: 'number',
|
22101
|
+
index: columns.length + i + 2,
|
22102
|
+
cellStyle: {
|
22103
|
+
numberFormat,
|
22104
|
+
hAlign: 'right'
|
22105
|
+
},
|
22106
|
+
value: r[x.name]
|
22107
|
+
}));
|
22108
|
+
rows.push({
|
22109
|
+
index: i + 2,
|
22110
|
+
cells
|
22111
|
+
});
|
22112
|
+
});
|
22113
|
+
const book = new Workbook({
|
22114
|
+
worksheets: [
|
22115
|
+
{
|
22116
|
+
enableRtl: this._session.inverse,
|
22117
|
+
name: this._translate.get('SheetN', 1),
|
22118
|
+
columns: [...columns.map((_, i) => ({ index: i + 1, width: 250 })),
|
22119
|
+
{ index: columns.length + 1 },
|
22120
|
+
...(this._indices ? this._indices.map((_, i) => ({
|
22121
|
+
index: columns.length + i + 2
|
22122
|
+
})) : [])],
|
22123
|
+
rows
|
22124
|
+
}
|
22125
|
+
],
|
22126
|
+
}, 'xlsx');
|
22127
|
+
book.save(`${title}.xlsx`);
|
21825
22128
|
}
|
21826
22129
|
/**
|
21827
22130
|
* adds data source description to item keys, and normalizes indices.
|
@@ -24444,7 +24747,7 @@ let CubePivotViewComponent = class CubePivotViewComponent extends CubeBase {
|
|
24444
24747
|
}
|
24445
24748
|
};
|
24446
24749
|
CubePivotViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CubePivotViewComponent, deps: [{ token: SessionService }, { token: DocumentViewRef }, { token: CubeService }, { token: RouterImpl }], target: i0.ɵɵFactoryTarget.Component });
|
24447
|
-
CubePivotViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.0", type: CubePivotViewComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<bizdoc-cube-pivot [xAxis]=\"xAxis\"\r\n [series]=\"series\"\r\n [cube]=\"cube.name\" *ngIf=\"hasdata\"\r\n [filters]=\"axes\"\r\n [chartType]=\"chartType\"\r\n [width]=\"width\"\r\n (explore)=\"explore($event)\"></bizdoc-cube-pivot>\r\n", components: [{ type: CubePivotComponent, selector: "bizdoc-cube-pivot", inputs: ["width", "height", "cube", "xAxis", "yAxis", "series", "indices", "filters", "chartType", "indicesChartType", "
|
24750
|
+
CubePivotViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.0", type: CubePivotViewComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<bizdoc-cube-pivot [xAxis]=\"xAxis\"\r\n [series]=\"series\"\r\n [cube]=\"cube.name\" *ngIf=\"hasdata\"\r\n [filters]=\"axes\"\r\n [chartType]=\"chartType\"\r\n [width]=\"width\"\r\n (explore)=\"explore($event)\"></bizdoc-cube-pivot>\r\n", components: [{ type: CubePivotComponent, selector: "bizdoc-cube-pivot", inputs: ["width", "height", "cube", "xAxis", "yAxis", "series", "indices", "filters", "chartType", "indicesChartType", "loading"], outputs: ["explore", "loadingChange"] }], directives: [{ type: i10$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
24448
24751
|
CubePivotViewComponent = __decorate([
|
24449
24752
|
BizDoc({
|
24450
24753
|
selector: 'bizdoc-pivot-view'
|
@@ -24962,7 +25265,7 @@ let CubeChartViewComponent = class CubeChartViewComponent extends CubeBase {
|
|
24962
25265
|
}
|
24963
25266
|
};
|
24964
25267
|
CubeChartViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CubeChartViewComponent, deps: [{ token: SessionService }, { token: DocumentViewRef }, { token: CubeService }, { token: RouterImpl }], target: i0.ɵɵFactoryTarget.Component });
|
24965
|
-
CubeChartViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.0", type: CubeChartViewComponent, selector: "ng-component", host: { classAttribute: "view" }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"hasdata; \">\r\n <!--else none-->\r\n <ng-container [ngSwitch]=\"isAccum\">\r\n <bizdoc-cube-accum *ngSwitchCase=\"true\" [chartType]=\"chartType\" [width]=\"width\" [scope]=\"scope\"\r\n (explore)=\"explore($event)\"\r\n [cube]=\"cube.name\"\r\n [filters]=\"filters\"\r\n [xAxis]=\"xAxis\"></bizdoc-cube-accum>\r\n <bizdoc-cube-chart *ngSwitchDefault\r\n [cube]=\"cube.name\"\r\n [xAxis]=\"xAxis\"\r\n [series]=\"series\"\r\n [indices]=\"indices\"\r\n [filters]=\"filters\"\r\n [chartType]=\"chartType\"\r\n [indicesChartType]=\"indicesChartType\"\r\n [width]=\"width\"\r\n [scope]=\"scope\"\r\n (explore)=\"explore($event)\"></bizdoc-cube-chart>\r\n </ng-container>\r\n</ng-container>\r\n<ng-template #none>\r\n <bizdoc-none icon=\"insert_chart_outlined\" subtitle=\"NothingHere\"></bizdoc-none>\r\n</ng-template>\r\n", components: [{ type: CubeAccumulationChartComponent, selector: "bizdoc-cube-accum", inputs: ["height", "width", "cube", "xAxis", "
|
25268
|
+
CubeChartViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.0", type: CubeChartViewComponent, selector: "ng-component", host: { classAttribute: "view" }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"hasdata; \">\r\n <!--else none-->\r\n <ng-container [ngSwitch]=\"isAccum\">\r\n <bizdoc-cube-accum *ngSwitchCase=\"true\" [chartType]=\"chartType\" [width]=\"width\" [scope]=\"scope\"\r\n (explore)=\"explore($event)\"\r\n [cube]=\"cube.name\"\r\n [filters]=\"filters\"\r\n [xAxis]=\"xAxis\"></bizdoc-cube-accum>\r\n <bizdoc-cube-chart *ngSwitchDefault\r\n [cube]=\"cube.name\"\r\n [xAxis]=\"xAxis\"\r\n [series]=\"series\"\r\n [indices]=\"indices\"\r\n [filters]=\"filters\"\r\n [chartType]=\"chartType\"\r\n [indicesChartType]=\"indicesChartType\"\r\n [width]=\"width\"\r\n [scope]=\"scope\"\r\n (explore)=\"explore($event)\"></bizdoc-cube-chart>\r\n </ng-container>\r\n</ng-container>\r\n<ng-template #none>\r\n <bizdoc-none icon=\"insert_chart_outlined\" subtitle=\"NothingHere\"></bizdoc-none>\r\n</ng-template>\r\n", components: [{ type: CubeAccumulationChartComponent, selector: "bizdoc-cube-accum", inputs: ["height", "width", "cube", "xAxis", "filters", "chartType", "scope", "loading"], outputs: ["loadingChange", "explore"] }, { type: CubeChartComponent, selector: "bizdoc-cube-chart", inputs: ["width", "height", "cube", "xAxis", "series", "indices", "filters", "yAxis", "chartType", "indicesChartType", "scope", "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: i10$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i10$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i10$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }] });
|
24966
25269
|
CubeChartViewComponent = __decorate([
|
24967
25270
|
BizDoc({
|
24968
25271
|
selector: 'bizdoc-chart-view'
|
@@ -27470,8 +27773,7 @@ let PositionsComponent = class PositionsComponent {
|
|
27470
27773
|
}
|
27471
27774
|
download() {
|
27472
27775
|
return __awaiter(this, void 0, void 0, function* () {
|
27473
|
-
const
|
27474
|
-
const wb = XLSX.utils.book_new();
|
27776
|
+
const { profiles } = this, worksheets = [];
|
27475
27777
|
for (let i = 0; i < this.types.length; i++) {
|
27476
27778
|
let type = this.types[i];
|
27477
27779
|
const model = this._everything[type.name];
|
@@ -27479,97 +27781,165 @@ let PositionsComponent = class PositionsComponent {
|
|
27479
27781
|
if (!positions || !Object.keys(positions).length)
|
27480
27782
|
continue;
|
27481
27783
|
const roles = this._session.profile.roles.filter(r => r.dataType === type.name && positions[r.name]);
|
27784
|
+
const cells = [{
|
27785
|
+
index: 1,
|
27786
|
+
value: this._translate.get('Type'),
|
27787
|
+
cellStyle: {
|
27788
|
+
bold: true
|
27789
|
+
}
|
27790
|
+
}, {
|
27791
|
+
index: 2,
|
27792
|
+
value: this._translate.get('Value'),
|
27793
|
+
cellStyle: {
|
27794
|
+
bold: true
|
27795
|
+
}
|
27796
|
+
}, {
|
27797
|
+
index: 3,
|
27798
|
+
value: ''
|
27799
|
+
}];
|
27800
|
+
if (type.columns)
|
27801
|
+
type.columns.slice(2).forEach((c, i) => cells.push({
|
27802
|
+
index: i + 4,
|
27803
|
+
value: ''
|
27804
|
+
}));
|
27805
|
+
roles.forEach(r => cells.push({
|
27806
|
+
index: cells.length + 1,
|
27807
|
+
value: r.title,
|
27808
|
+
cellStyle: {
|
27809
|
+
bold: true
|
27810
|
+
}
|
27811
|
+
}));
|
27482
27812
|
const rows = [];
|
27483
|
-
rows.push(
|
27813
|
+
rows.push({
|
27814
|
+
index: 1,
|
27815
|
+
cells
|
27816
|
+
});
|
27484
27817
|
model.patterns && model.patterns.forEach(p => {
|
27485
|
-
const row =
|
27486
|
-
|
27487
|
-
|
27818
|
+
const row = {
|
27819
|
+
index: rows.length + 1,
|
27820
|
+
cells: [{
|
27821
|
+
index: 1,
|
27822
|
+
value: this._translate.get('Pattern')
|
27823
|
+
}, {
|
27824
|
+
index: 2,
|
27825
|
+
value: p.expression
|
27826
|
+
}, {
|
27827
|
+
index: 3,
|
27828
|
+
value: p.title
|
27829
|
+
}]
|
27830
|
+
};
|
27831
|
+
addcolumns(p.name, row);
|
27488
27832
|
rows.push(row);
|
27489
27833
|
});
|
27490
27834
|
model.groups && model.groups.forEach(g => {
|
27491
|
-
const row =
|
27492
|
-
|
27493
|
-
|
27835
|
+
const row = {
|
27836
|
+
index: rows.length + 1,
|
27837
|
+
cells: [{
|
27838
|
+
index: 1,
|
27839
|
+
value: this._translate.get('Group')
|
27840
|
+
}, {
|
27841
|
+
index: 2,
|
27842
|
+
value: g.items.join(', ')
|
27843
|
+
}, {
|
27844
|
+
index: 3,
|
27845
|
+
value: g.title
|
27846
|
+
}]
|
27847
|
+
};
|
27848
|
+
addcolumns(g.name, row);
|
27494
27849
|
rows.push(row);
|
27495
27850
|
});
|
27496
27851
|
let datasource = yield this._datasources.all(type.name).toPromise();
|
27497
27852
|
datasource.forEach(d => {
|
27498
|
-
const row =
|
27853
|
+
const row = {
|
27854
|
+
index: rows.length + 1,
|
27855
|
+
cells: [{
|
27856
|
+
index: 1,
|
27857
|
+
value: this._translate.get('Key')
|
27858
|
+
}]
|
27859
|
+
};
|
27499
27860
|
if (type.columns)
|
27500
|
-
type.columns.forEach(c => row.push(
|
27861
|
+
type.columns.forEach((c, i) => row.cells.push({
|
27862
|
+
index: i + 2,
|
27863
|
+
value: d.value[c.name]
|
27864
|
+
}));
|
27501
27865
|
else
|
27502
|
-
row.push(d.value);
|
27503
|
-
|
27866
|
+
row.cells.push({ index: 2, value: d.value });
|
27867
|
+
addcolumns(d.key, row);
|
27504
27868
|
rows.push(row);
|
27505
27869
|
});
|
27506
|
-
const
|
27507
|
-
|
27508
|
-
|
27509
|
-
|
27510
|
-
|
27511
|
-
|
27870
|
+
const columns = [];
|
27871
|
+
type.columns && type.columns.forEach((_, i) => columns.push({ index: i + 1, width: 250 }));
|
27872
|
+
roles.forEach((_, i) => columns.push({ index: columns.length + i + 2 }));
|
27873
|
+
worksheets.push({
|
27874
|
+
name: type.title,
|
27875
|
+
columns,
|
27876
|
+
rows
|
27877
|
+
});
|
27878
|
+
function addcolumns(key, row) {
|
27512
27879
|
roles.forEach(r => {
|
27513
27880
|
const users = positions[r.name][key];
|
27514
|
-
row.push(
|
27881
|
+
row.cells.push({
|
27882
|
+
index: row.cells.length + 1,
|
27883
|
+
value: users ? users.map(u => profiles[u] ? profiles[u].name : u).join(', ') : ''
|
27884
|
+
});
|
27515
27885
|
});
|
27516
27886
|
}
|
27517
27887
|
}
|
27518
|
-
|
27519
|
-
|
27520
|
-
|
27521
|
-
|
27522
|
-
|
27523
|
-
|
27524
|
-
|
27525
|
-
|
27526
|
-
|
27527
|
-
|
27528
|
-
|
27529
|
-
|
27530
|
-
|
27531
|
-
|
27532
|
-
|
27533
|
-
|
27534
|
-
|
27535
|
-
|
27536
|
-
|
27537
|
-
|
27538
|
-
|
27539
|
-
|
27540
|
-
|
27541
|
-
|
27542
|
-
|
27543
|
-
|
27544
|
-
|
27545
|
-
|
27546
|
-
|
27547
|
-
|
27548
|
-
|
27549
|
-
|
27550
|
-
|
27551
|
-
|
27552
|
-
|
27553
|
-
|
27554
|
-
|
27555
|
-
|
27556
|
-
|
27557
|
-
|
27558
|
-
}
|
27888
|
+
const book = new Workbook({
|
27889
|
+
worksheets,
|
27890
|
+
}, 'xlsx');
|
27891
|
+
book.save(`${this._translate.get('Positions')}.xlsx`);
|
27892
|
+
});
|
27893
|
+
}
|
27894
|
+
// async upload(evt: InputEvent) {
|
27895
|
+
// const { files } = evt.srcElement as HTMLInputElement;
|
27896
|
+
// if (files && files.length) {
|
27897
|
+
// const file = files.item(0);
|
27898
|
+
// var reader = new FileReader();
|
27899
|
+
// reader.onload = e => { };
|
27900
|
+
// const text = await file.text();
|
27901
|
+
// //reader.readAs(text);
|
27902
|
+
// const wb = XLSX.readFile(file.name, {});
|
27903
|
+
// for (let i = 0; i < wb.SheetNames.length; i++) {
|
27904
|
+
// let title = wb.SheetNames[i], ws = wb.Sheets[title];
|
27905
|
+
// let type = this.types.find(t => t.title === title);
|
27906
|
+
// if (!type) throw '';
|
27907
|
+
// let roles = this._session.profile.roles.filter(r => r.dataType === type.name);
|
27908
|
+
// let row = ws['!rows'][0];
|
27909
|
+
// for (let c = 0; c < ws['!cols'].length; c++) {
|
27910
|
+
// let col = ws['!cols'][c];
|
27911
|
+
// //let role = roles.find(r => r.title === ws.);
|
27912
|
+
// // if (!role) {
|
27913
|
+
// // this._everything[type.name].roles.push({name: '', title: ''});
|
27914
|
+
// // }
|
27915
|
+
// }
|
27916
|
+
// for (let r = 0; r < ws['!rows'].length; r++) {
|
27917
|
+
// let row = ws['!rows'][r];
|
27918
|
+
// for (let c = 0; c < ws['!cols'].length; c++) {
|
27919
|
+
// let col = ws['!cols'][c], content = '';
|
27920
|
+
// if (content) {
|
27921
|
+
// //let users = content.split(', ').map(name=> this.profiles.find(u=> u.name === name));
|
27922
|
+
// }
|
27923
|
+
// else { }
|
27924
|
+
// }
|
27925
|
+
// }
|
27926
|
+
// }
|
27927
|
+
// }
|
27928
|
+
//}
|
27559
27929
|
ngOnDestroy() {
|
27560
27930
|
this._destroy.next();
|
27561
27931
|
this._destroy.complete();
|
27562
27932
|
}
|
27563
27933
|
};
|
27564
27934
|
PositionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: PositionsComponent, deps: [{ token: SessionService }, { token: UtilityRef }, { token: DatasourceService }, { token: PromptService }, { token: AccountService }, { token: WindowTitleService }, { token: TranslateService }, { token: Popup }, { token: i3$2.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
|
27565
|
-
PositionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.0", type: PositionsComponent, selector: "ng-component", viewQueries: [{ propertyName: "_fileElement", first: true, predicate: ["file"], descendants: true, static: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }, { propertyName: "noRoleTpl", first: true, predicate: ["noRoleTpl"], descendants: true, static: true }, { propertyName: "roleTpl", first: true, predicate: ["roleTpl"], descendants: true, static: true }, { propertyName: "patternTpl", first: true, predicate: ["patternTpl"], descendants: true, static: true }, { propertyName: "newGroupTpl", first: true, predicate: ["groupTpl"], descendants: true, static: true }], ngImport: i0, template: "<mat-toolbar>\r\n <button mat-button (click)=\"save()\" color=\"primary\" [disabled]=\"!dirty\">{{'SaveChanges'|translate}}</button>\r\n <span class=\"divider\"></span>\r\n <bizdoc-search-input (valueChange)=\"search($event)\"></bizdoc-search-input>\r\n <button mat-button [matMenuTriggerFor]=\"typeMenu\">{{type?.title}} <mat-icon>arrow_drop_down</mat-icon></button>\r\n <mat-menu #typeMenu>\r\n <button mat-menu-item *ngFor=\"let t of types\" (click)=\"change(t.name)\">{{t.title}}</button>\r\n </mat-menu>\r\n <button mat-icon-button [matMenuTriggerFor]=\"newMenu\" [bizdocTooltip]=\"'Add'|translate\"><mat-icon>add</mat-icon></button>\r\n <mat-menu #newMenu>\r\n <button mat-menu-item (click)=\"newRole()\">{{'Role'|translate}}</button>\r\n <button mat-menu-item (click)=\"newPattern()\">{{'Pattern'|translate}}</button>\r\n <button mat-menu-item (click)=\"newGroup()\">{{'Group'|translate}} </button>\r\n </mat-menu>\r\n <button mat-icon-button [bizdocTooltip]=\"'Download' | translate\" (click)=\"download()\" [disabled]=\"dirty\"><mat-icon>save_alt</mat-icon></button>\r\n</mat-toolbar>\r\n<mat-progress-bar [mode]=\"loading\" [style.visibility]=\"loading ? 'visible':'hidden'\"></mat-progress-bar>\r\n<table mat-table matSort [dataSource]=\"dataSource\" [style.display]=\"dataSource ? '': 'none'\">\r\n <ng-container *ngFor=\"let column of (type?.columns ||[])\" [matColumnDef]=\"column.name\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>{{column.label}}</th>\r\n <td mat-cell *matCellDef=\"let element\"> {{element[column.name]}} </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"key\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>{{''}}</th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n <span [ngSwitch]=\"element.type\">\r\n <ng-container *ngSwitchCase=\"'group'\">({{'Group'|translate}})</ng-container>\r\n <ng-container *ngSwitchCase=\"'pattern'\">({{'Pattern'|translate}})</ng-container>\r\n <ng-container *ngSwitchDefault>\r\n {{element.key}}\r\n </ng-container>\r\n </span>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"value\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>{{''}}</th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n {{element.value}}\r\n </td>\r\n </ng-container>\r\n <ng-container *ngFor=\"let role of roles\" [matColumnDef]=\"role.name\">\r\n <th mat-header-cell *matHeaderCellDef>{{role.title}}</th>\r\n <td mat-cell *matCellDef=\"let element\" [attr.data-role]=\"role.name\">\r\n <ng-container *ngIf=\"positions[role.name][element.key]\">\r\n <ng-container *ngFor=\"let u of positions[role.name][element.key]; let first = first\">\r\n <ng-container *ngIf=\"!first\">, </ng-container>\r\n {{profiles[u]?.name}}\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"options\">\r\n <th mat-header-cell *matHeaderCellDef></th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n <button mat-icon-button [matMenuTriggerFor]=\"options\" *ngIf=\"element.type === 'pattern' || element.type === 'group'\"><mat-icon>more_vert</mat-icon></button>\r\n <mat-menu #options>\r\n <ng-container *ngIf=\"element.type === 'pattern'\">\r\n <button mat-menu-item (click)=\"editPattern(element.key)\">{{'Edit'|translate}}</button>\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item (click)=\"deletePattern(element.key)\">{{'Remove'|translate}} </button>\r\n </ng-container>\r\n <ng-container *ngIf=\"element.type === 'group'\">\r\n <button mat-menu-item (click)=\"editGroup(element.key)\">{{'Edit'|translate}}</button>\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item (click)=\"deleteGroup(element.key)\">{{'Remove'|translate}} </button>\r\n </ng-container>\r\n </mat-menu>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\r\n <tr mat-row *matRowDef=\"let element; columns: displayedColumns\" (click)=\"edit(element.key, $event)\"></tr>\r\n</table>\r\n<!-- role template -->\r\n<ng-template #roleTpl>\r\n <h2 mat-dialog-title>{{'Role' | translate }}</h2>\r\n <mat-dialog-content>\r\n <form [formGroup]=\"role\" fxLayout=\"column\">\r\n <mat-form-field>\r\n <input matInput formControlName=\"title\" [placeholder]=\"'Title'| translate\" required autocomplete=\"off\" />\r\n </mat-form-field>\r\n </form>\r\n </mat-dialog-content>\r\n <mat-dialog-actions>\r\n <button mat-button [mat-dialog-close]=\"role.value\" color=\"primary\" [disabled]=\"!role.valid\">{{'OK' | translate}}</button>\r\n <button mat-button mat-dialog-close>{{'Cancel' | translate}}</button>\r\n </mat-dialog-actions>\r\n</ng-template>\r\n<!-- pattern template -->\r\n<ng-template #patternTpl>\r\n <h2 mat-dialog-title>{{'Pattern' | translate }}</h2>\r\n <mat-dialog-content>\r\n <form [formGroup]=\"pattern\" fxLayout=\"column\">\r\n <mat-form-field>\r\n <input matInput formControlName=\"title\" [placeholder]=\"'Title'| translate\" required autocomplete=\"off\" />\r\n </mat-form-field>\r\n <mat-form-field>\r\n <input matInput formControlName=\"expression\" [placeholder]=\"'Regex'| translate\" required autocomplete=\"off\" />\r\n <mat-hint><span [innerHTML]=\"'RegexHint' | translate : 'https://regex101.com/'| sanitizeHtml\"></span></mat-hint>\r\n </mat-form-field>\r\n </form>\r\n </mat-dialog-content>\r\n <mat-dialog-actions>\r\n <button mat-button [mat-dialog-close]=\"pattern.value\" color=\"primary\" [disabled]=\"!pattern.valid\">{{'OK' | translate}}</button>\r\n <button mat-button mat-dialog-close>{{'Cancel' | translate}}</button>\r\n </mat-dialog-actions>\r\n</ng-template>\r\n<!-- group -->\r\n<ng-template #groupTpl>\r\n <h2 mat-dialog-title>{{'Group' | translate }}</h2>\r\n <mat-dialog-content>\r\n <form [formGroup]=\"group\" fxLayout=\"column\">\r\n <mat-form-field>\r\n <input matInput formControlName=\"title\" [placeholder]=\"'Title'| translate\" required autocomplete=\"off\" />\r\n </mat-form-field>\r\n <mat-form-field>\r\n <mat-select [placeholder]=\"'Items'|translate\" multiple formControlName=\"items\" required>\r\n <mat-select-trigger>\r\n {{group.value.items ? group.value.items[0] : ''}}\r\n <span *ngIf=\"group.value.items?.length > 1\" class=\"additional-selection\">\r\n (+{{group.value.items.length - 1}} {{(group.value.items?.length === 2 ? 'Other' : 'Others')|translate}})\r\n </span>\r\n </mat-select-trigger>\r\n <mat-option *ngFor=\"let v of source\" [value]=\"v.key\">\r\n <span *ngIf=\"!type.columns\">{{v.value}}</span>\r\n <span *ngIf=\"type.columns\"><span *ngFor=\"let c of type.columns\">{{v.value[c.name]}}</span></span>\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </form>\r\n </mat-dialog-content>\r\n <mat-dialog-actions>\r\n <button mat-button [mat-dialog-close]=\"group.value\" color=\"primary\" [disabled]=\"!group.valid\">{{'OK' | translate}}</button>\r\n <button mat-button mat-dialog-close>{{'Cancel' | translate}}</button>\r\n </mat-dialog-actions>\r\n</ng-template>\r\n<ng-template #noRoleTpl>\r\n <mat-dialog-content>\r\n {{'NoRoles'|translate : type?.title}}\r\n </mat-dialog-content>\r\n <mat-dialog-actions>\r\n <button mat-button [mat-dialog-close]=\"true\" color=\"primary\">{{'CreateRole' | translate}}</button>\r\n <button mat-button mat-dialog-close>{{'Cancel' | translate}}</button>\r\n </mat-dialog-actions>\r\n</ng-template>\r\n<form style=\"display:none\">\r\n <input type=\"file\" name=\"file\" (onchange)=\"upload($event)\" #file/>\r\n</form>\r\n", styles: ["table{width:100%}.form{padding:8px}table :ng-deep .mat-cell{cursor:pointer;border-left-width:1px;border-left-style:outset;padding:0 4px!important}\n"], components: [{ type: i7$4.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { 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: SearchInput, selector: "bizdoc-search-input", outputs: ["valueChange"] }, { 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: i11$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { type: i5$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { type: i6$2.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { type: i12.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { type: i5$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { type: i5$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i6$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ 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"] }, { type: i6$2.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { type: i5$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { type: i5$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { type: i5$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { type: i5$1.MatCellDef, selector: "[matCellDef]" }, { type: i5$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { type: i10$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i10$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i10$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i10$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { type: i5$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { type: i3$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i3$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1$4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i1$4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i1$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i3$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i3$2.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { type: i1$3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i4.MatSelectTrigger, selector: "mat-select-trigger" }], pipes: { "translate": TranslatePipe, "sanitizeHtml": SanitizeHtmlPipe } });
|
27935
|
+
PositionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.0", type: PositionsComponent, selector: "ng-component", viewQueries: [{ propertyName: "_fileElement", first: true, predicate: ["file"], descendants: true, static: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }, { propertyName: "noRoleTpl", first: true, predicate: ["noRoleTpl"], descendants: true, static: true }, { propertyName: "roleTpl", first: true, predicate: ["roleTpl"], descendants: true, static: true }, { propertyName: "patternTpl", first: true, predicate: ["patternTpl"], descendants: true, static: true }, { propertyName: "newGroupTpl", first: true, predicate: ["groupTpl"], descendants: true, static: true }], ngImport: i0, template: "<mat-toolbar>\r\n <button mat-button (click)=\"save()\" color=\"primary\" [disabled]=\"!dirty\">{{'SaveChanges'|translate}}</button>\r\n <span class=\"divider\"></span>\r\n <bizdoc-search-input (valueChange)=\"search($event)\"></bizdoc-search-input>\r\n <button mat-button [matMenuTriggerFor]=\"typeMenu\">{{type?.title}} <mat-icon>arrow_drop_down</mat-icon></button>\r\n <mat-menu #typeMenu>\r\n <button mat-menu-item *ngFor=\"let t of types\" (click)=\"change(t.name)\">{{t.title}}</button>\r\n </mat-menu>\r\n <button mat-icon-button [matMenuTriggerFor]=\"newMenu\" [bizdocTooltip]=\"'Add'|translate\"><mat-icon>add</mat-icon></button>\r\n <mat-menu #newMenu>\r\n <button mat-menu-item (click)=\"newRole()\">{{'Role'|translate}}</button>\r\n <button mat-menu-item (click)=\"newPattern()\">{{'Pattern'|translate}}</button>\r\n <button mat-menu-item (click)=\"newGroup()\">{{'Group'|translate}} </button>\r\n </mat-menu>\r\n <button mat-icon-button [bizdocTooltip]=\"'Download' | translate\" (click)=\"download()\" [disabled]=\"dirty\"><mat-icon>save_alt</mat-icon></button>\r\n</mat-toolbar>\r\n<mat-progress-bar [mode]=\"loading\" [style.visibility]=\"loading ? 'visible':'hidden'\"></mat-progress-bar>\r\n<table mat-table matSort [dataSource]=\"dataSource\" [style.display]=\"dataSource ? '': 'none'\">\r\n <ng-container *ngFor=\"let column of (type?.columns ||[])\" [matColumnDef]=\"column.name\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>{{column.label}}</th>\r\n <td mat-cell *matCellDef=\"let element\"> {{element[column.name]}} </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"key\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>{{''}}</th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n <span [ngSwitch]=\"element.type\">\r\n <ng-container *ngSwitchCase=\"'group'\">({{'Group'|translate}})</ng-container>\r\n <ng-container *ngSwitchCase=\"'pattern'\">({{'Pattern'|translate}})</ng-container>\r\n <ng-container *ngSwitchDefault>\r\n {{element.key}}\r\n </ng-container>\r\n </span>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"value\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>{{''}}</th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n {{element.value}}\r\n </td>\r\n </ng-container>\r\n <ng-container *ngFor=\"let role of roles\" [matColumnDef]=\"role.name\">\r\n <th mat-header-cell *matHeaderCellDef>{{role.title}}</th>\r\n <td mat-cell *matCellDef=\"let element\" [attr.data-role]=\"role.name\">\r\n <ng-container *ngIf=\"positions[role.name][element.key]\">\r\n <ng-container *ngFor=\"let u of positions[role.name][element.key]; let first = first\">\r\n <ng-container *ngIf=\"!first\">, </ng-container>\r\n {{profiles[u]?.name}}\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"options\">\r\n <th mat-header-cell *matHeaderCellDef></th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n <button mat-icon-button [matMenuTriggerFor]=\"options\" *ngIf=\"element.type === 'pattern' || element.type === 'group'\"><mat-icon>more_vert</mat-icon></button>\r\n <mat-menu #options>\r\n <ng-container *ngIf=\"element.type === 'pattern'\">\r\n <button mat-menu-item (click)=\"editPattern(element.key)\">{{'Edit'|translate}}</button>\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item (click)=\"deletePattern(element.key)\">{{'Remove'|translate}} </button>\r\n </ng-container>\r\n <ng-container *ngIf=\"element.type === 'group'\">\r\n <button mat-menu-item (click)=\"editGroup(element.key)\">{{'Edit'|translate}}</button>\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item (click)=\"deleteGroup(element.key)\">{{'Remove'|translate}} </button>\r\n </ng-container>\r\n </mat-menu>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\r\n <tr mat-row *matRowDef=\"let element; columns: displayedColumns\" (click)=\"edit(element.key, $event)\"></tr>\r\n</table>\r\n<!-- role template -->\r\n<ng-template #roleTpl>\r\n <h2 mat-dialog-title>{{'Role' | translate }}</h2>\r\n <mat-dialog-content>\r\n <form [formGroup]=\"role\" fxLayout=\"column\">\r\n <mat-form-field>\r\n <input matInput formControlName=\"title\" [placeholder]=\"'Title'| translate\" required autocomplete=\"off\" />\r\n </mat-form-field>\r\n </form>\r\n </mat-dialog-content>\r\n <mat-dialog-actions>\r\n <button mat-button [mat-dialog-close]=\"role.value\" color=\"primary\" [disabled]=\"!role.valid\">{{'OK' | translate}}</button>\r\n <button mat-button mat-dialog-close>{{'Cancel' | translate}}</button>\r\n </mat-dialog-actions>\r\n</ng-template>\r\n<!-- pattern template -->\r\n<ng-template #patternTpl>\r\n <h2 mat-dialog-title>{{'Pattern' | translate }}</h2>\r\n <mat-dialog-content>\r\n <form [formGroup]=\"pattern\" fxLayout=\"column\">\r\n <mat-form-field>\r\n <input matInput formControlName=\"title\" [placeholder]=\"'Title'| translate\" required autocomplete=\"off\" />\r\n </mat-form-field>\r\n <mat-form-field>\r\n <input matInput formControlName=\"expression\" [placeholder]=\"'Regex'| translate\" required autocomplete=\"off\" />\r\n <mat-hint><span [innerHTML]=\"'RegexHint' | translate : 'https://regex101.com/'| sanitizeHtml\"></span></mat-hint>\r\n </mat-form-field>\r\n </form>\r\n </mat-dialog-content>\r\n <mat-dialog-actions>\r\n <button mat-button [mat-dialog-close]=\"pattern.value\" color=\"primary\" [disabled]=\"!pattern.valid\">{{'OK' | translate}}</button>\r\n <button mat-button mat-dialog-close>{{'Cancel' | translate}}</button>\r\n </mat-dialog-actions>\r\n</ng-template>\r\n<!-- group -->\r\n<ng-template #groupTpl>\r\n <h2 mat-dialog-title>{{'Group' | translate }}</h2>\r\n <mat-dialog-content>\r\n <form [formGroup]=\"group\" fxLayout=\"column\">\r\n <mat-form-field>\r\n <input matInput formControlName=\"title\" [placeholder]=\"'Title'| translate\" required autocomplete=\"off\" />\r\n </mat-form-field>\r\n <mat-form-field>\r\n <mat-select [placeholder]=\"'Items'|translate\" multiple formControlName=\"items\" required>\r\n <mat-select-trigger>\r\n {{group.value.items ? group.value.items[0] : ''}}\r\n <span *ngIf=\"group.value.items?.length > 1\" class=\"additional-selection\">\r\n (+{{group.value.items.length - 1}} {{(group.value.items?.length === 2 ? 'Other' : 'Others')|translate}})\r\n </span>\r\n </mat-select-trigger>\r\n <mat-option *ngFor=\"let v of source\" [value]=\"v.key\">\r\n <span *ngIf=\"!type.columns\">{{v.value}}</span>\r\n <span *ngIf=\"type.columns\"><span *ngFor=\"let c of type.columns\">{{v.value[c.name]}}</span></span>\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </form>\r\n </mat-dialog-content>\r\n <mat-dialog-actions>\r\n <button mat-button [mat-dialog-close]=\"group.value\" color=\"primary\" [disabled]=\"!group.valid\">{{'OK' | translate}}</button>\r\n <button mat-button mat-dialog-close>{{'Cancel' | translate}}</button>\r\n </mat-dialog-actions>\r\n</ng-template>\r\n<ng-template #noRoleTpl>\r\n <mat-dialog-content>\r\n {{'NoRoles'|translate : type?.title}}\r\n </mat-dialog-content>\r\n <mat-dialog-actions>\r\n <button mat-button [mat-dialog-close]=\"true\" color=\"primary\">{{'CreateRole' | translate}}</button>\r\n <button mat-button mat-dialog-close>{{'Cancel' | translate}}</button>\r\n </mat-dialog-actions>\r\n</ng-template>\r\n<!--<form style=\"display:none\">\r\n <input type=\"file\" name=\"file\" (onchange)=\"upload($event)\" #file/>\r\n</form>-->\r\n", styles: ["table{width:100%}.form{padding:8px}table :ng-deep .mat-cell{cursor:pointer;border-left-width:1px;border-left-style:outset;padding:0 4px!important}\n"], components: [{ type: i7$4.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { 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: SearchInput, selector: "bizdoc-search-input", outputs: ["valueChange"] }, { 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: i11$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { type: i5$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { type: i6$2.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { type: i12.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { type: i5$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { type: i5$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i6$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ 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"] }, { type: i6$2.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { type: i5$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { type: i5$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { type: i5$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { type: i5$1.MatCellDef, selector: "[matCellDef]" }, { type: i5$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { type: i10$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i10$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i10$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i10$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { type: i5$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { type: i3$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i3$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1$4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i1$4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i1$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i3$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i3$2.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { type: i1$3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i4.MatSelectTrigger, selector: "mat-select-trigger" }], pipes: { "translate": TranslatePipe, "sanitizeHtml": SanitizeHtmlPipe } });
|
27566
27936
|
PositionsComponent = __decorate([
|
27567
27937
|
BizDoc({ selector: 'bizdoc-positions' })
|
27568
27938
|
/** positions component*/
|
27569
27939
|
], PositionsComponent);
|
27570
27940
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: PositionsComponent, decorators: [{
|
27571
27941
|
type: Component,
|
27572
|
-
args: [{ template: "<mat-toolbar>\r\n <button mat-button (click)=\"save()\" color=\"primary\" [disabled]=\"!dirty\">{{'SaveChanges'|translate}}</button>\r\n <span class=\"divider\"></span>\r\n <bizdoc-search-input (valueChange)=\"search($event)\"></bizdoc-search-input>\r\n <button mat-button [matMenuTriggerFor]=\"typeMenu\">{{type?.title}} <mat-icon>arrow_drop_down</mat-icon></button>\r\n <mat-menu #typeMenu>\r\n <button mat-menu-item *ngFor=\"let t of types\" (click)=\"change(t.name)\">{{t.title}}</button>\r\n </mat-menu>\r\n <button mat-icon-button [matMenuTriggerFor]=\"newMenu\" [bizdocTooltip]=\"'Add'|translate\"><mat-icon>add</mat-icon></button>\r\n <mat-menu #newMenu>\r\n <button mat-menu-item (click)=\"newRole()\">{{'Role'|translate}}</button>\r\n <button mat-menu-item (click)=\"newPattern()\">{{'Pattern'|translate}}</button>\r\n <button mat-menu-item (click)=\"newGroup()\">{{'Group'|translate}} </button>\r\n </mat-menu>\r\n <button mat-icon-button [bizdocTooltip]=\"'Download' | translate\" (click)=\"download()\" [disabled]=\"dirty\"><mat-icon>save_alt</mat-icon></button>\r\n</mat-toolbar>\r\n<mat-progress-bar [mode]=\"loading\" [style.visibility]=\"loading ? 'visible':'hidden'\"></mat-progress-bar>\r\n<table mat-table matSort [dataSource]=\"dataSource\" [style.display]=\"dataSource ? '': 'none'\">\r\n <ng-container *ngFor=\"let column of (type?.columns ||[])\" [matColumnDef]=\"column.name\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>{{column.label}}</th>\r\n <td mat-cell *matCellDef=\"let element\"> {{element[column.name]}} </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"key\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>{{''}}</th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n <span [ngSwitch]=\"element.type\">\r\n <ng-container *ngSwitchCase=\"'group'\">({{'Group'|translate}})</ng-container>\r\n <ng-container *ngSwitchCase=\"'pattern'\">({{'Pattern'|translate}})</ng-container>\r\n <ng-container *ngSwitchDefault>\r\n {{element.key}}\r\n </ng-container>\r\n </span>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"value\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>{{''}}</th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n {{element.value}}\r\n </td>\r\n </ng-container>\r\n <ng-container *ngFor=\"let role of roles\" [matColumnDef]=\"role.name\">\r\n <th mat-header-cell *matHeaderCellDef>{{role.title}}</th>\r\n <td mat-cell *matCellDef=\"let element\" [attr.data-role]=\"role.name\">\r\n <ng-container *ngIf=\"positions[role.name][element.key]\">\r\n <ng-container *ngFor=\"let u of positions[role.name][element.key]; let first = first\">\r\n <ng-container *ngIf=\"!first\">, </ng-container>\r\n {{profiles[u]?.name}}\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"options\">\r\n <th mat-header-cell *matHeaderCellDef></th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n <button mat-icon-button [matMenuTriggerFor]=\"options\" *ngIf=\"element.type === 'pattern' || element.type === 'group'\"><mat-icon>more_vert</mat-icon></button>\r\n <mat-menu #options>\r\n <ng-container *ngIf=\"element.type === 'pattern'\">\r\n <button mat-menu-item (click)=\"editPattern(element.key)\">{{'Edit'|translate}}</button>\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item (click)=\"deletePattern(element.key)\">{{'Remove'|translate}} </button>\r\n </ng-container>\r\n <ng-container *ngIf=\"element.type === 'group'\">\r\n <button mat-menu-item (click)=\"editGroup(element.key)\">{{'Edit'|translate}}</button>\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item (click)=\"deleteGroup(element.key)\">{{'Remove'|translate}} </button>\r\n </ng-container>\r\n </mat-menu>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\r\n <tr mat-row *matRowDef=\"let element; columns: displayedColumns\" (click)=\"edit(element.key, $event)\"></tr>\r\n</table>\r\n<!-- role template -->\r\n<ng-template #roleTpl>\r\n <h2 mat-dialog-title>{{'Role' | translate }}</h2>\r\n <mat-dialog-content>\r\n <form [formGroup]=\"role\" fxLayout=\"column\">\r\n <mat-form-field>\r\n <input matInput formControlName=\"title\" [placeholder]=\"'Title'| translate\" required autocomplete=\"off\" />\r\n </mat-form-field>\r\n </form>\r\n </mat-dialog-content>\r\n <mat-dialog-actions>\r\n <button mat-button [mat-dialog-close]=\"role.value\" color=\"primary\" [disabled]=\"!role.valid\">{{'OK' | translate}}</button>\r\n <button mat-button mat-dialog-close>{{'Cancel' | translate}}</button>\r\n </mat-dialog-actions>\r\n</ng-template>\r\n<!-- pattern template -->\r\n<ng-template #patternTpl>\r\n <h2 mat-dialog-title>{{'Pattern' | translate }}</h2>\r\n <mat-dialog-content>\r\n <form [formGroup]=\"pattern\" fxLayout=\"column\">\r\n <mat-form-field>\r\n <input matInput formControlName=\"title\" [placeholder]=\"'Title'| translate\" required autocomplete=\"off\" />\r\n </mat-form-field>\r\n <mat-form-field>\r\n <input matInput formControlName=\"expression\" [placeholder]=\"'Regex'| translate\" required autocomplete=\"off\" />\r\n <mat-hint><span [innerHTML]=\"'RegexHint' | translate : 'https://regex101.com/'| sanitizeHtml\"></span></mat-hint>\r\n </mat-form-field>\r\n </form>\r\n </mat-dialog-content>\r\n <mat-dialog-actions>\r\n <button mat-button [mat-dialog-close]=\"pattern.value\" color=\"primary\" [disabled]=\"!pattern.valid\">{{'OK' | translate}}</button>\r\n <button mat-button mat-dialog-close>{{'Cancel' | translate}}</button>\r\n </mat-dialog-actions>\r\n</ng-template>\r\n<!-- group -->\r\n<ng-template #groupTpl>\r\n <h2 mat-dialog-title>{{'Group' | translate }}</h2>\r\n <mat-dialog-content>\r\n <form [formGroup]=\"group\" fxLayout=\"column\">\r\n <mat-form-field>\r\n <input matInput formControlName=\"title\" [placeholder]=\"'Title'| translate\" required autocomplete=\"off\" />\r\n </mat-form-field>\r\n <mat-form-field>\r\n <mat-select [placeholder]=\"'Items'|translate\" multiple formControlName=\"items\" required>\r\n <mat-select-trigger>\r\n {{group.value.items ? group.value.items[0] : ''}}\r\n <span *ngIf=\"group.value.items?.length > 1\" class=\"additional-selection\">\r\n (+{{group.value.items.length - 1}} {{(group.value.items?.length === 2 ? 'Other' : 'Others')|translate}})\r\n </span>\r\n </mat-select-trigger>\r\n <mat-option *ngFor=\"let v of source\" [value]=\"v.key\">\r\n <span *ngIf=\"!type.columns\">{{v.value}}</span>\r\n <span *ngIf=\"type.columns\"><span *ngFor=\"let c of type.columns\">{{v.value[c.name]}}</span></span>\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </form>\r\n </mat-dialog-content>\r\n <mat-dialog-actions>\r\n <button mat-button [mat-dialog-close]=\"group.value\" color=\"primary\" [disabled]=\"!group.valid\">{{'OK' | translate}}</button>\r\n <button mat-button mat-dialog-close>{{'Cancel' | translate}}</button>\r\n </mat-dialog-actions>\r\n</ng-template>\r\n<ng-template #noRoleTpl>\r\n <mat-dialog-content>\r\n {{'NoRoles'|translate : type?.title}}\r\n </mat-dialog-content>\r\n <mat-dialog-actions>\r\n <button mat-button [mat-dialog-close]=\"true\" color=\"primary\">{{'CreateRole' | translate}}</button>\r\n <button mat-button mat-dialog-close>{{'Cancel' | translate}}</button>\r\n </mat-dialog-actions>\r\n</ng-template>\r\n
|
27942
|
+
args: [{ template: "<mat-toolbar>\r\n <button mat-button (click)=\"save()\" color=\"primary\" [disabled]=\"!dirty\">{{'SaveChanges'|translate}}</button>\r\n <span class=\"divider\"></span>\r\n <bizdoc-search-input (valueChange)=\"search($event)\"></bizdoc-search-input>\r\n <button mat-button [matMenuTriggerFor]=\"typeMenu\">{{type?.title}} <mat-icon>arrow_drop_down</mat-icon></button>\r\n <mat-menu #typeMenu>\r\n <button mat-menu-item *ngFor=\"let t of types\" (click)=\"change(t.name)\">{{t.title}}</button>\r\n </mat-menu>\r\n <button mat-icon-button [matMenuTriggerFor]=\"newMenu\" [bizdocTooltip]=\"'Add'|translate\"><mat-icon>add</mat-icon></button>\r\n <mat-menu #newMenu>\r\n <button mat-menu-item (click)=\"newRole()\">{{'Role'|translate}}</button>\r\n <button mat-menu-item (click)=\"newPattern()\">{{'Pattern'|translate}}</button>\r\n <button mat-menu-item (click)=\"newGroup()\">{{'Group'|translate}} </button>\r\n </mat-menu>\r\n <button mat-icon-button [bizdocTooltip]=\"'Download' | translate\" (click)=\"download()\" [disabled]=\"dirty\"><mat-icon>save_alt</mat-icon></button>\r\n</mat-toolbar>\r\n<mat-progress-bar [mode]=\"loading\" [style.visibility]=\"loading ? 'visible':'hidden'\"></mat-progress-bar>\r\n<table mat-table matSort [dataSource]=\"dataSource\" [style.display]=\"dataSource ? '': 'none'\">\r\n <ng-container *ngFor=\"let column of (type?.columns ||[])\" [matColumnDef]=\"column.name\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>{{column.label}}</th>\r\n <td mat-cell *matCellDef=\"let element\"> {{element[column.name]}} </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"key\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>{{''}}</th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n <span [ngSwitch]=\"element.type\">\r\n <ng-container *ngSwitchCase=\"'group'\">({{'Group'|translate}})</ng-container>\r\n <ng-container *ngSwitchCase=\"'pattern'\">({{'Pattern'|translate}})</ng-container>\r\n <ng-container *ngSwitchDefault>\r\n {{element.key}}\r\n </ng-container>\r\n </span>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"value\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header>{{''}}</th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n {{element.value}}\r\n </td>\r\n </ng-container>\r\n <ng-container *ngFor=\"let role of roles\" [matColumnDef]=\"role.name\">\r\n <th mat-header-cell *matHeaderCellDef>{{role.title}}</th>\r\n <td mat-cell *matCellDef=\"let element\" [attr.data-role]=\"role.name\">\r\n <ng-container *ngIf=\"positions[role.name][element.key]\">\r\n <ng-container *ngFor=\"let u of positions[role.name][element.key]; let first = first\">\r\n <ng-container *ngIf=\"!first\">, </ng-container>\r\n {{profiles[u]?.name}}\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"options\">\r\n <th mat-header-cell *matHeaderCellDef></th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n <button mat-icon-button [matMenuTriggerFor]=\"options\" *ngIf=\"element.type === 'pattern' || element.type === 'group'\"><mat-icon>more_vert</mat-icon></button>\r\n <mat-menu #options>\r\n <ng-container *ngIf=\"element.type === 'pattern'\">\r\n <button mat-menu-item (click)=\"editPattern(element.key)\">{{'Edit'|translate}}</button>\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item (click)=\"deletePattern(element.key)\">{{'Remove'|translate}} </button>\r\n </ng-container>\r\n <ng-container *ngIf=\"element.type === 'group'\">\r\n <button mat-menu-item (click)=\"editGroup(element.key)\">{{'Edit'|translate}}</button>\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item (click)=\"deleteGroup(element.key)\">{{'Remove'|translate}} </button>\r\n </ng-container>\r\n </mat-menu>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\r\n <tr mat-row *matRowDef=\"let element; columns: displayedColumns\" (click)=\"edit(element.key, $event)\"></tr>\r\n</table>\r\n<!-- role template -->\r\n<ng-template #roleTpl>\r\n <h2 mat-dialog-title>{{'Role' | translate }}</h2>\r\n <mat-dialog-content>\r\n <form [formGroup]=\"role\" fxLayout=\"column\">\r\n <mat-form-field>\r\n <input matInput formControlName=\"title\" [placeholder]=\"'Title'| translate\" required autocomplete=\"off\" />\r\n </mat-form-field>\r\n </form>\r\n </mat-dialog-content>\r\n <mat-dialog-actions>\r\n <button mat-button [mat-dialog-close]=\"role.value\" color=\"primary\" [disabled]=\"!role.valid\">{{'OK' | translate}}</button>\r\n <button mat-button mat-dialog-close>{{'Cancel' | translate}}</button>\r\n </mat-dialog-actions>\r\n</ng-template>\r\n<!-- pattern template -->\r\n<ng-template #patternTpl>\r\n <h2 mat-dialog-title>{{'Pattern' | translate }}</h2>\r\n <mat-dialog-content>\r\n <form [formGroup]=\"pattern\" fxLayout=\"column\">\r\n <mat-form-field>\r\n <input matInput formControlName=\"title\" [placeholder]=\"'Title'| translate\" required autocomplete=\"off\" />\r\n </mat-form-field>\r\n <mat-form-field>\r\n <input matInput formControlName=\"expression\" [placeholder]=\"'Regex'| translate\" required autocomplete=\"off\" />\r\n <mat-hint><span [innerHTML]=\"'RegexHint' | translate : 'https://regex101.com/'| sanitizeHtml\"></span></mat-hint>\r\n </mat-form-field>\r\n </form>\r\n </mat-dialog-content>\r\n <mat-dialog-actions>\r\n <button mat-button [mat-dialog-close]=\"pattern.value\" color=\"primary\" [disabled]=\"!pattern.valid\">{{'OK' | translate}}</button>\r\n <button mat-button mat-dialog-close>{{'Cancel' | translate}}</button>\r\n </mat-dialog-actions>\r\n</ng-template>\r\n<!-- group -->\r\n<ng-template #groupTpl>\r\n <h2 mat-dialog-title>{{'Group' | translate }}</h2>\r\n <mat-dialog-content>\r\n <form [formGroup]=\"group\" fxLayout=\"column\">\r\n <mat-form-field>\r\n <input matInput formControlName=\"title\" [placeholder]=\"'Title'| translate\" required autocomplete=\"off\" />\r\n </mat-form-field>\r\n <mat-form-field>\r\n <mat-select [placeholder]=\"'Items'|translate\" multiple formControlName=\"items\" required>\r\n <mat-select-trigger>\r\n {{group.value.items ? group.value.items[0] : ''}}\r\n <span *ngIf=\"group.value.items?.length > 1\" class=\"additional-selection\">\r\n (+{{group.value.items.length - 1}} {{(group.value.items?.length === 2 ? 'Other' : 'Others')|translate}})\r\n </span>\r\n </mat-select-trigger>\r\n <mat-option *ngFor=\"let v of source\" [value]=\"v.key\">\r\n <span *ngIf=\"!type.columns\">{{v.value}}</span>\r\n <span *ngIf=\"type.columns\"><span *ngFor=\"let c of type.columns\">{{v.value[c.name]}}</span></span>\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </form>\r\n </mat-dialog-content>\r\n <mat-dialog-actions>\r\n <button mat-button [mat-dialog-close]=\"group.value\" color=\"primary\" [disabled]=\"!group.valid\">{{'OK' | translate}}</button>\r\n <button mat-button mat-dialog-close>{{'Cancel' | translate}}</button>\r\n </mat-dialog-actions>\r\n</ng-template>\r\n<ng-template #noRoleTpl>\r\n <mat-dialog-content>\r\n {{'NoRoles'|translate : type?.title}}\r\n </mat-dialog-content>\r\n <mat-dialog-actions>\r\n <button mat-button [mat-dialog-close]=\"true\" color=\"primary\">{{'CreateRole' | translate}}</button>\r\n <button mat-button mat-dialog-close>{{'Cancel' | translate}}</button>\r\n </mat-dialog-actions>\r\n</ng-template>\r\n<!--<form style=\"display:none\">\r\n <input type=\"file\" name=\"file\" (onchange)=\"upload($event)\" #file/>\r\n</form>-->\r\n", styles: ["table{width:100%}.form{padding:8px}table :ng-deep .mat-cell{cursor:pointer;border-left-width:1px;border-left-style:outset;padding:0 4px!important}\n"] }]
|
27573
27943
|
}], ctorParameters: function () {
|
27574
27944
|
return [{ type: SessionService }, { type: UtilityRef, decorators: [{
|
27575
27945
|
type: Inject,
|