@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/fesm2020/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';
|
@@ -115,7 +115,7 @@ import { SelectionModel } from '@angular/cdk/collections';
|
|
115
115
|
import * as i24 from '@angular/flex-layout/extended';
|
116
116
|
import * as i8$2 from '@syncfusion/ej2-angular-charts';
|
117
117
|
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';
|
118
|
-
import
|
118
|
+
import { Workbook } from '@syncfusion/ej2-excel-export';
|
119
119
|
import { Chart } from '@syncfusion/ej2-charts';
|
120
120
|
import * as i6$5 from '@syncfusion/ej2-angular-grids';
|
121
121
|
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';
|
@@ -1095,6 +1095,9 @@ class SessionService {
|
|
1095
1095
|
get userId() {
|
1096
1096
|
return this._profile.byId || this.profile.userId;
|
1097
1097
|
}
|
1098
|
+
get locale() {
|
1099
|
+
return this.language.split('-')[0];
|
1100
|
+
}
|
1098
1101
|
get language() {
|
1099
1102
|
if (!this._lang) {
|
1100
1103
|
this._lang = this._cookies.get('lang');
|
@@ -5468,11 +5471,12 @@ class CubeService {
|
|
5468
5471
|
return currencyCode || DEFAULT_CURRENCY;
|
5469
5472
|
}
|
5470
5473
|
get digitsInfo() {
|
5471
|
-
|
5474
|
+
const { fractionDigits } = this;
|
5475
|
+
return `1.${fractionDigits}-${fractionDigits}`;
|
5472
5476
|
}
|
5473
5477
|
get fractionDigits() {
|
5474
|
-
const { formats } = this._config
|
5475
|
-
return fractionDigits
|
5478
|
+
const { formats } = this._config, { fractionDigits } = formats || {};
|
5479
|
+
return fractionDigits !== undefined ? fractionDigits : 2;
|
5476
5480
|
}
|
5477
5481
|
/**
|
5478
5482
|
* query cube by axes, series and indices
|
@@ -8618,7 +8622,12 @@ class CubeAccumulationChartComponent {
|
|
8618
8622
|
this.palettes = _session.accentPalette;
|
8619
8623
|
});
|
8620
8624
|
}
|
8625
|
+
set xAxis(val) {
|
8626
|
+
this._xAxis = isArray(val) ? val : [val];
|
8627
|
+
}
|
8621
8628
|
ngOnInit() {
|
8629
|
+
this._cube = this._session.profile.cubes.find(c => c.name === this.cube) || this._session.profile.cubes[0];
|
8630
|
+
this.currencyCode = this._cube.currencyCode;
|
8622
8631
|
switch (this.chartType) {
|
8623
8632
|
case 'Doughnut':
|
8624
8633
|
this.innerRadius = '10%';
|
@@ -8650,8 +8659,8 @@ class CubeAccumulationChartComponent {
|
|
8650
8659
|
pointClick(evt) {
|
8651
8660
|
const axes = {};
|
8652
8661
|
const x = evt.series.dataSource[evt.pointIndex].x.split(AXES_CODE_DIVIDER);
|
8653
|
-
for (let i = 0; i < this.
|
8654
|
-
axes[this.
|
8662
|
+
for (let i = 0; i < this._xAxis.length; i++)
|
8663
|
+
axes[this._xAxis[i]] = x[i];
|
8655
8664
|
this.explore.emit({ axes });
|
8656
8665
|
}
|
8657
8666
|
/**
|
@@ -8668,7 +8677,7 @@ class CubeAccumulationChartComponent {
|
|
8668
8677
|
}
|
8669
8678
|
execute() {
|
8670
8679
|
this.loadingChange.emit(true);
|
8671
|
-
this._service.series(this.cube, this.
|
8680
|
+
this._service.series(this.cube, this._xAxis, {
|
8672
8681
|
filters: this.filters,
|
8673
8682
|
scope: this.scope
|
8674
8683
|
}).subscribe(r => {
|
@@ -8710,12 +8719,59 @@ class CubeAccumulationChartComponent {
|
|
8710
8719
|
}, this._elementRef.nativeElement);
|
8711
8720
|
}
|
8712
8721
|
exportToExcel(title) {
|
8713
|
-
const
|
8714
|
-
|
8715
|
-
|
8716
|
-
|
8717
|
-
|
8718
|
-
|
8722
|
+
const numberFormat = this._cube.currencyCode ?
|
8723
|
+
getCurrencySymbol(this._cube.currencyCode, 'narrow') +
|
8724
|
+
getLocaleNumberFormat(this._session.locale, NumberFormatStyle.Currency)
|
8725
|
+
: getLocaleNumberFormat(this._session.locale, NumberFormatStyle.Decimal), rows = [{
|
8726
|
+
index: 1,
|
8727
|
+
cells: this._xAxis.map((x, i) => ({
|
8728
|
+
index: i + 1,
|
8729
|
+
value: this._cube.axes.find(a => a.name === x).title,
|
8730
|
+
cellStyle: {
|
8731
|
+
bold: true
|
8732
|
+
}
|
8733
|
+
}))
|
8734
|
+
}];
|
8735
|
+
rows[0].cells.push({
|
8736
|
+
index: this._xAxis.length + 1,
|
8737
|
+
value: this._translate.get('Value'),
|
8738
|
+
cellStyle: {
|
8739
|
+
bold: true
|
8740
|
+
}
|
8741
|
+
});
|
8742
|
+
this.dataSource.forEach((p, i) => {
|
8743
|
+
const cells = this._xAxis.map((_, j) => {
|
8744
|
+
return {
|
8745
|
+
index: j + 1,
|
8746
|
+
value: p.name.split(AXES_LABEL_DIVIDER)[j]
|
8747
|
+
};
|
8748
|
+
});
|
8749
|
+
cells.push({
|
8750
|
+
type: 'number',
|
8751
|
+
index: this._xAxis.length + 1,
|
8752
|
+
cellStyle: {
|
8753
|
+
numberFormat,
|
8754
|
+
hAlign: 'right'
|
8755
|
+
},
|
8756
|
+
value: p.y
|
8757
|
+
});
|
8758
|
+
rows.push({
|
8759
|
+
index: i + 2,
|
8760
|
+
cells
|
8761
|
+
});
|
8762
|
+
});
|
8763
|
+
const book = new Workbook({
|
8764
|
+
worksheets: [
|
8765
|
+
{
|
8766
|
+
enableRtl: this._session.inverse,
|
8767
|
+
name: this._translate.get('SheetN', 1),
|
8768
|
+
columns: [...this._xAxis.map((_, i) => ({ index: i + 1, width: 250 })),
|
8769
|
+
{ index: this._xAxis.length + 1 },],
|
8770
|
+
rows
|
8771
|
+
}
|
8772
|
+
],
|
8773
|
+
}, 'xlsx');
|
8774
|
+
book.save(`${title}.xlsx`);
|
8719
8775
|
}
|
8720
8776
|
ngOnDestroy() {
|
8721
8777
|
this.accumchart && this.accumchart.destroy();
|
@@ -8725,7 +8781,7 @@ class CubeAccumulationChartComponent {
|
|
8725
8781
|
}
|
8726
8782
|
CubeAccumulationChartComponent.nextId = 0;
|
8727
8783
|
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 });
|
8728
|
-
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",
|
8784
|
+
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 });
|
8729
8785
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CubeAccumulationChartComponent, decorators: [{
|
8730
8786
|
type: Component,
|
8731
8787
|
args: [{
|
@@ -8745,8 +8801,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
8745
8801
|
type: Input
|
8746
8802
|
}], xAxis: [{
|
8747
8803
|
type: Input
|
8748
|
-
}], indices: [{
|
8749
|
-
type: Input
|
8750
8804
|
}], filters: [{
|
8751
8805
|
type: Input
|
8752
8806
|
}], chartType: [{
|
@@ -8850,6 +8904,8 @@ class CubeChartComponent {
|
|
8850
8904
|
this._indices = null;
|
8851
8905
|
}
|
8852
8906
|
ngOnInit() {
|
8907
|
+
this._cube = this._session.profile.cubes.find(c => c.name === this.cube) || this._session.profile.cubes[0];
|
8908
|
+
this.currencyCode = this._cube.currencyCode;
|
8853
8909
|
if (this.chartType === 'Line' || this.chartType === 'Spline')
|
8854
8910
|
this.crosshair.enable = true;
|
8855
8911
|
this.primaryYAxis.labelFormat = this.currencyCode ? 'c0' : 'n0';
|
@@ -8961,14 +9017,62 @@ class CubeChartComponent {
|
|
8961
9017
|
this.explore.emit({ axes, index });
|
8962
9018
|
}
|
8963
9019
|
exportToExcel(title) {
|
8964
|
-
const
|
8965
|
-
|
8966
|
-
|
8967
|
-
|
8968
|
-
|
8969
|
-
|
9020
|
+
const numberFormat = this._cube.currencyCode ?
|
9021
|
+
getCurrencySymbol(this._cube.currencyCode, 'narrow') +
|
9022
|
+
getLocaleNumberFormat(this._session.locale, NumberFormatStyle.Currency)
|
9023
|
+
: getLocaleNumberFormat(this._session.locale, NumberFormatStyle.Decimal), worksheets = [];
|
9024
|
+
this._data.forEach(s => {
|
9025
|
+
const cells = this._xAxis.map((x, i) => ({
|
9026
|
+
index: i + 1,
|
9027
|
+
value: this._cube.axes.find(a => a.name === x).title,
|
9028
|
+
cellStyle: {
|
9029
|
+
bold: true
|
9030
|
+
}
|
9031
|
+
}));
|
9032
|
+
cells.push({
|
9033
|
+
index: this._xAxis.length + 1,
|
9034
|
+
value: this._translate.get('Value'),
|
9035
|
+
cellStyle: {
|
9036
|
+
bold: true
|
9037
|
+
}
|
9038
|
+
});
|
9039
|
+
const rows = [{
|
9040
|
+
index: 1,
|
9041
|
+
cells
|
9042
|
+
}];
|
9043
|
+
s.points.forEach((p, i) => {
|
9044
|
+
const cells = this._xAxis.map((_, j) => {
|
9045
|
+
return {
|
9046
|
+
index: j + 1,
|
9047
|
+
value: p.name.split(AXES_LABEL_DIVIDER)[j]
|
9048
|
+
};
|
9049
|
+
});
|
9050
|
+
cells.push({
|
9051
|
+
type: 'number',
|
9052
|
+
index: this._xAxis.length + 1,
|
9053
|
+
cellStyle: {
|
9054
|
+
numberFormat,
|
9055
|
+
hAlign: 'right'
|
9056
|
+
},
|
9057
|
+
value: p.y
|
9058
|
+
});
|
9059
|
+
rows.push({
|
9060
|
+
index: i + 2,
|
9061
|
+
cells
|
9062
|
+
});
|
9063
|
+
});
|
9064
|
+
worksheets.push({
|
9065
|
+
enableRtl: this.enableRtl,
|
9066
|
+
name: s.title,
|
9067
|
+
columns: [...this._xAxis.map((_, i) => ({ index: i + 1, width: 250 })),
|
9068
|
+
{ index: this._xAxis.length + 1 },],
|
9069
|
+
rows
|
9070
|
+
});
|
8970
9071
|
});
|
8971
|
-
|
9072
|
+
const book = new Workbook({
|
9073
|
+
worksheets,
|
9074
|
+
}, 'xlsx');
|
9075
|
+
book.save(`${title}.xlsx`);
|
8972
9076
|
}
|
8973
9077
|
ngOnDestroy() {
|
8974
9078
|
this.chart && this.chart.destroy();
|
@@ -8978,7 +9082,7 @@ class CubeChartComponent {
|
|
8978
9082
|
}
|
8979
9083
|
CubeChartComponent.nextId = 0;
|
8980
9084
|
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 });
|
8981
|
-
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",
|
9085
|
+
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 });
|
8982
9086
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CubeChartComponent, decorators: [{
|
8983
9087
|
type: Component,
|
8984
9088
|
args: [{
|
@@ -9011,8 +9115,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
9011
9115
|
type: Input
|
9012
9116
|
}], scope: [{
|
9013
9117
|
type: Input
|
9014
|
-
}], currencyCode: [{
|
9015
|
-
type: Input
|
9016
9118
|
}], explore: [{
|
9017
9119
|
type: Output
|
9018
9120
|
}], loading: [{
|
@@ -9053,6 +9155,7 @@ class CubeGridComponent {
|
|
9053
9155
|
}
|
9054
9156
|
ngOnInit() {
|
9055
9157
|
this._cube = this.cube ? this._session.profile.cubes.find(c => c.name === this.cube) : this._session.profile.cubes[0];
|
9158
|
+
this.currencyCode = this._cube.currencyCode;
|
9056
9159
|
const x = this._cube.axes.find(a => a.name === this._xAxis[0]), y = this._cube.axes.find(a => a.name === this._series[0]);
|
9057
9160
|
const promises = [];
|
9058
9161
|
// aquire columns source
|
@@ -9199,7 +9302,7 @@ class CubeGridComponent {
|
|
9199
9302
|
}
|
9200
9303
|
CubeGridComponent.nextId = 0;
|
9201
9304
|
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 });
|
9202
|
-
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",
|
9305
|
+
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"] });
|
9203
9306
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CubeGridComponent, decorators: [{
|
9204
9307
|
type: Component,
|
9205
9308
|
args: [{ selector: 'bizdoc-cube-grid', template: '', host: {
|
@@ -9219,8 +9322,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
9219
9322
|
type: Input
|
9220
9323
|
}], filters: [{
|
9221
9324
|
type: Input
|
9222
|
-
}], currencyCode: [{
|
9223
|
-
type: Input
|
9224
9325
|
}], explore: [{
|
9225
9326
|
type: Output
|
9226
9327
|
}], loading: [{
|
@@ -9294,6 +9395,7 @@ class CubePivotComponent {
|
|
9294
9395
|
}
|
9295
9396
|
ngOnInit() {
|
9296
9397
|
this._cube = this._session.profile.cubes.find(c => c.name === this.cube) || this._session.profile.cubes[0];
|
9398
|
+
this.currencyCode = this._cube.currencyCode;
|
9297
9399
|
this.dir = this.chartType ? 'ltr' : this._session.direction;
|
9298
9400
|
this.formatSettings[0].currency = this.currencyCode,
|
9299
9401
|
this.formatSettings[0].format = (this.currencyCode ? 'c' : 'n') + this._service.fractionDigits;
|
@@ -9536,18 +9638,84 @@ class CubePivotComponent {
|
|
9536
9638
|
this.explore.emit({ axes });
|
9537
9639
|
}
|
9538
9640
|
exportToExcel(title) {
|
9539
|
-
const fileName = `${title}.xlsx`;
|
9540
9641
|
const task = () => {
|
9541
9642
|
if (this.chartType) {
|
9542
|
-
const
|
9543
|
-
|
9544
|
-
|
9545
|
-
|
9546
|
-
|
9547
|
-
|
9643
|
+
const numberFormat = this._cube.currencyCode ?
|
9644
|
+
getCurrencySymbol(this._cube.currencyCode, 'narrow') +
|
9645
|
+
getLocaleNumberFormat(this._session.locale, NumberFormatStyle.Currency)
|
9646
|
+
: getLocaleNumberFormat(this._session.locale, NumberFormatStyle.Decimal), columns = this._cube.axes.filter(a => this._xAxis.indexOf(a.name) > -1 ||
|
9647
|
+
this._series.indexOf(a.name) > -1), rows = [{
|
9648
|
+
index: 1,
|
9649
|
+
cells: columns.map((c, i) => ({
|
9650
|
+
index: i + 1, value: c.title,
|
9651
|
+
cellStyle: {
|
9652
|
+
bold: true
|
9653
|
+
}
|
9654
|
+
}))
|
9655
|
+
}];
|
9656
|
+
rows[0].cells.push({
|
9657
|
+
index: columns.length + 1,
|
9658
|
+
value: this.yAxis ? this.yAxis.title :
|
9659
|
+
this._translate.get('Value'),
|
9660
|
+
cellStyle: {
|
9661
|
+
bold: true
|
9662
|
+
}
|
9663
|
+
});
|
9664
|
+
this._indices && this._indices.forEach((x, i) => rows[0].cells.push({
|
9665
|
+
index: columns.length + i + 2,
|
9666
|
+
value: this._getIndexTitle(x),
|
9667
|
+
cellStyle: {
|
9668
|
+
bold: true
|
9669
|
+
}
|
9670
|
+
}));
|
9671
|
+
this._data.forEach((r, i) => {
|
9672
|
+
const cells = columns.map((c, j) => {
|
9673
|
+
return {
|
9674
|
+
index: j + 1, value: r[c.name],
|
9675
|
+
cellStyle: {}
|
9676
|
+
};
|
9677
|
+
});
|
9678
|
+
cells.push({
|
9679
|
+
type: 'number',
|
9680
|
+
index: columns.length + 1,
|
9681
|
+
cellStyle: {
|
9682
|
+
numberFormat,
|
9683
|
+
hAlign: 'right'
|
9684
|
+
},
|
9685
|
+
value: r['value']
|
9686
|
+
});
|
9687
|
+
this._indices && this._indices.forEach((x, i) => cells.push({
|
9688
|
+
type: 'number',
|
9689
|
+
index: columns.length + i + 2,
|
9690
|
+
cellStyle: {
|
9691
|
+
numberFormat,
|
9692
|
+
hAlign: 'right'
|
9693
|
+
},
|
9694
|
+
value: r[x]
|
9695
|
+
}));
|
9696
|
+
rows.push({
|
9697
|
+
index: i + 2,
|
9698
|
+
cells
|
9699
|
+
});
|
9700
|
+
});
|
9701
|
+
const book = new Workbook({
|
9702
|
+
worksheets: [
|
9703
|
+
{
|
9704
|
+
enableRtl: this._session.inverse,
|
9705
|
+
name: this._translate.get('SheetN', 1),
|
9706
|
+
columns: [...columns.map((_, i) => ({ index: i + 1, width: 250 })),
|
9707
|
+
{ index: columns.length + 1 },
|
9708
|
+
...(this._indices ? this._indices.map((_, i) => ({
|
9709
|
+
index: columns.length + i + 2
|
9710
|
+
})) : [])],
|
9711
|
+
rows
|
9712
|
+
}
|
9713
|
+
],
|
9714
|
+
}, 'xlsx');
|
9715
|
+
book.save(`${title}.xlsx`);
|
9548
9716
|
}
|
9549
9717
|
else
|
9550
|
-
this.pivot.excelExport({ fileName
|
9718
|
+
this.pivot.excelExport({ fileName: `${title}.xlsx`, hierarchyExportMode: 'All', });
|
9551
9719
|
};
|
9552
9720
|
if (this.currencyCode && this.currencyCode !== DEFAULT_CURRENCY)
|
9553
9721
|
this._translate.cldr(this._session.language, CLDR_FILES).then(() => task());
|
@@ -9590,7 +9758,7 @@ class CubePivotComponent {
|
|
9590
9758
|
}
|
9591
9759
|
CubePivotComponent.nextId = 0;
|
9592
9760
|
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 });
|
9593
|
-
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",
|
9761
|
+
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"] });
|
9594
9762
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CubePivotComponent, decorators: [{
|
9595
9763
|
type: Component,
|
9596
9764
|
args: [{
|
@@ -9622,8 +9790,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
9622
9790
|
type: Input
|
9623
9791
|
}], indicesChartType: [{
|
9624
9792
|
type: Input
|
9625
|
-
}], currencyCode: [{
|
9626
|
-
type: Input
|
9627
9793
|
}], explore: [{
|
9628
9794
|
type: Output
|
9629
9795
|
}], loading: [{
|
@@ -9664,14 +9830,14 @@ class CubeSpreadsheetComponent {
|
|
9664
9830
|
this._indices = isArray(val) ? val : [val];
|
9665
9831
|
}
|
9666
9832
|
ngOnInit() {
|
9833
|
+
this._cube = this.cube ? this._session.profile.cubes.find(c => c.name === this.cube) : this._session.profile.cubes[0];
|
9667
9834
|
this._numberFormat = this._intl.getNumberPattern({
|
9668
|
-
currency: this.currencyCode,
|
9669
|
-
format: this.currencyCode ? 'c' : 'n',
|
9835
|
+
currency: this._cube.currencyCode,
|
9836
|
+
format: this._cube.currencyCode ? 'c' : 'n',
|
9670
9837
|
useGrouping: true,
|
9671
9838
|
maximumFractionDigits: this._service.fractionDigits,
|
9672
9839
|
minimumFractionDigits: this._service.fractionDigits
|
9673
9840
|
});
|
9674
|
-
this._cube = this.cube ? this._session.profile.cubes.find(c => c.name === this.cube) : this._session.profile.cubes[0];
|
9675
9841
|
if (!this._series) {
|
9676
9842
|
this._axes = this._xAxis.map(c => this._cube.axes.find(a => a.name == c));
|
9677
9843
|
if (this._indices)
|
@@ -9770,12 +9936,12 @@ class CubeSpreadsheetComponent {
|
|
9770
9936
|
this._indices && this._indices.forEach(i => cells.push({
|
9771
9937
|
style: this.numberStyle,
|
9772
9938
|
format: this._numberFormat,
|
9773
|
-
value: (d[i] || 0)
|
9939
|
+
value: (d[i] || 0),
|
9774
9940
|
}));
|
9775
9941
|
cells.push({
|
9776
9942
|
style: this.numberStyle,
|
9777
9943
|
format: this._numberFormat,
|
9778
|
-
value: (d.value || 0)
|
9944
|
+
value: (d.value || 0),
|
9779
9945
|
});
|
9780
9946
|
this.dataSource.push({ cells, source: d, height: 25 });
|
9781
9947
|
});
|
@@ -9791,7 +9957,7 @@ class CubeSpreadsheetComponent {
|
|
9791
9957
|
if (serie) {
|
9792
9958
|
serie.points.forEach(p => map[p.x] = p.y);
|
9793
9959
|
this._xcolumns.forEach(c => cells.push({
|
9794
|
-
value: (map[c.key] || 0)
|
9960
|
+
value: (map[c.key] || 0),
|
9795
9961
|
format: this._numberFormat,
|
9796
9962
|
style: this.numberStyle
|
9797
9963
|
}));
|
@@ -9803,13 +9969,13 @@ class CubeSpreadsheetComponent {
|
|
9803
9969
|
if (serie) {
|
9804
9970
|
serie.points.forEach(p => map[p.x] = p.y);
|
9805
9971
|
this._xcolumns.forEach(c => cells.push({
|
9806
|
-
value: (map[c.key] || 0)
|
9972
|
+
value: (map[c.key] || 0),
|
9807
9973
|
format: this._numberFormat,
|
9808
9974
|
style: this.numberStyle
|
9809
9975
|
}));
|
9810
9976
|
}
|
9811
9977
|
else
|
9812
|
-
this._xcolumns.forEach(_ => cells.push({ value:
|
9978
|
+
this._xcolumns.forEach(_ => cells.push({ value: 0 }));
|
9813
9979
|
this.dataSource.push({ cells, height: 25 });
|
9814
9980
|
});
|
9815
9981
|
}
|
@@ -9924,13 +10090,33 @@ class CubeSpreadsheetComponent {
|
|
9924
10090
|
}
|
9925
10091
|
}
|
9926
10092
|
exportToExcel(title) {
|
9927
|
-
const
|
9928
|
-
|
9929
|
-
|
9930
|
-
|
9931
|
-
|
9932
|
-
|
9933
|
-
|
10093
|
+
const { rows } = this.spreadsheet.sheets[0], numberFormat = this._cube.currencyCode ?
|
10094
|
+
getCurrencySymbol(this._cube.currencyCode, 'narrow') +
|
10095
|
+
getLocaleNumberFormat(this._session.locale, NumberFormatStyle.Currency)
|
10096
|
+
: getLocaleNumberFormat(this._session.locale, NumberFormatStyle.Decimal), book = new Workbook({
|
10097
|
+
worksheets: [
|
10098
|
+
{
|
10099
|
+
name: this._translate.get('SheetN', 1),
|
10100
|
+
columns: rows[0].cells.map((_, i) => ({ index: i + 1, width: 150 })),
|
10101
|
+
rows: rows.map((r, i) => ({
|
10102
|
+
index: i + 1,
|
10103
|
+
cells: r.cells.map((c, j) => {
|
10104
|
+
const header = i === 0 || (this.series && j === 0);
|
10105
|
+
return {
|
10106
|
+
type: header ? 'text' : 'number',
|
10107
|
+
index: j + 1, value: c.value,
|
10108
|
+
cellStyle: {
|
10109
|
+
numberFormat,
|
10110
|
+
hAlign: header ? 'right' : 'center ',
|
10111
|
+
bold: header
|
10112
|
+
}
|
10113
|
+
};
|
10114
|
+
})
|
10115
|
+
})),
|
10116
|
+
},
|
10117
|
+
],
|
10118
|
+
}, 'xlsx');
|
10119
|
+
book.save(`${title}.xlsx`);
|
9934
10120
|
}
|
9935
10121
|
ngOnDestroy() {
|
9936
10122
|
this.spreadsheet && this.spreadsheet.destroy();
|
@@ -9938,7 +10124,7 @@ class CubeSpreadsheetComponent {
|
|
9938
10124
|
}
|
9939
10125
|
CubeSpreadsheetComponent.nextId = 0;
|
9940
10126
|
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 });
|
9941
|
-
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",
|
10127
|
+
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 });
|
9942
10128
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CubeSpreadsheetComponent, decorators: [{
|
9943
10129
|
type: Component,
|
9944
10130
|
args: [{
|
@@ -9964,8 +10150,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
9964
10150
|
type: Input
|
9965
10151
|
}], filters: [{
|
9966
10152
|
type: Input
|
9967
|
-
}], currencyCode: [{
|
9968
|
-
type: Input
|
9969
10153
|
}], explore: [{
|
9970
10154
|
type: Output
|
9971
10155
|
}], loading: [{
|
@@ -10094,7 +10278,6 @@ class CubeViewComponent {
|
|
10094
10278
|
});
|
10095
10279
|
instance.cube = this.cube.name;
|
10096
10280
|
instance.xAxis = this.view.xAxis;
|
10097
|
-
instance.currencyCode = this.cube.currencyCode;
|
10098
10281
|
instance.filters = { ...this.view.filters, ...this.filters };
|
10099
10282
|
instance.loadingChange.pipe(takeUntil(this._viewDestroy), debounceTime(150)).subscribe(e => this.loadingChange.emit(this.loading = e));
|
10100
10283
|
return instance;
|
@@ -11378,7 +11561,7 @@ class ExploreItemsComponent {
|
|
11378
11561
|
this._loading$.unsubscribe();
|
11379
11562
|
}
|
11380
11563
|
refresh() { this.ngOnChanges(null); }
|
11381
|
-
ngOnChanges(
|
11564
|
+
ngOnChanges(_) {
|
11382
11565
|
this._cube = this._session.profile.cubes.find(c => c.name === this.cube);
|
11383
11566
|
this.currencyCode = this._cube.currencyCode;
|
11384
11567
|
if (this.index)
|
@@ -11443,13 +11626,43 @@ class ExploreItemsComponent {
|
|
11443
11626
|
this.explore.emit({ keys, template: this._template });
|
11444
11627
|
}
|
11445
11628
|
exportExcel() {
|
11446
|
-
const
|
11447
|
-
|
11448
|
-
|
11449
|
-
|
11450
|
-
|
11629
|
+
const numberFormat = this._cube.currencyCode ?
|
11630
|
+
getCurrencySymbol(this._cube.currencyCode, 'narrow') +
|
11631
|
+
getLocaleNumberFormat(this._session.locale, NumberFormatStyle.Currency)
|
11632
|
+
: getLocaleNumberFormat(this._session.locale, NumberFormatStyle.Decimal), rows = [{
|
11633
|
+
index: 1,
|
11634
|
+
cells: this.columns.map((c, i) => ({
|
11635
|
+
index: i + 1, value: c.label,
|
11636
|
+
cellStyle: {
|
11637
|
+
bold: true
|
11638
|
+
}
|
11639
|
+
}))
|
11640
|
+
}];
|
11641
|
+
this.dataSource.data.forEach((r, i) => rows.push({
|
11642
|
+
index: i + 2,
|
11643
|
+
cells: this.columns.map((c, j) => {
|
11644
|
+
const isnumber = c.type === 'Currency' || c.type === 'Number';
|
11645
|
+
return {
|
11646
|
+
type: isnumber ? 'text' : 'number',
|
11647
|
+
index: j + 1, value: r[c.name],
|
11648
|
+
cellStyle: {
|
11649
|
+
numberFormat,
|
11650
|
+
hAlign: isnumber ? 'right' : 'general'
|
11651
|
+
}
|
11652
|
+
};
|
11653
|
+
})
|
11654
|
+
}));
|
11655
|
+
const book = new Workbook({
|
11656
|
+
worksheets: [
|
11657
|
+
{
|
11658
|
+
name: this._translate.get('SheetN', 1),
|
11659
|
+
columns: this.columns.map((_, i) => ({ index: i + 1, width: 250 })),
|
11660
|
+
rows
|
11661
|
+
}
|
11662
|
+
],
|
11663
|
+
}, 'xlsx');
|
11451
11664
|
this._service.nameOf(this.axes, this.cube).
|
11452
|
-
subscribe(o =>
|
11665
|
+
subscribe(o => book.save(`${this._cube.title} ${o}.xlsx`));
|
11453
11666
|
}
|
11454
11667
|
}
|
11455
11668
|
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 });
|
@@ -11608,12 +11821,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
11608
11821
|
/** reportviewer component*/
|
11609
11822
|
class ReportViewerComponent {
|
11610
11823
|
/** reportviewer ctor */
|
11611
|
-
constructor(_http, _sb, _injector, _hub, _translate, _factoryResolver) {
|
11824
|
+
constructor(_http, _sb, _injector, _hub, _translate, _session, _factoryResolver) {
|
11612
11825
|
this._http = _http;
|
11613
11826
|
this._sb = _sb;
|
11614
11827
|
this._injector = _injector;
|
11615
11828
|
this._hub = _hub;
|
11616
11829
|
this._translate = _translate;
|
11830
|
+
this._session = _session;
|
11617
11831
|
this._factoryResolver = _factoryResolver;
|
11618
11832
|
this.progress = 0;
|
11619
11833
|
this._processing = false;
|
@@ -11686,12 +11900,36 @@ class ReportViewerComponent {
|
|
11686
11900
|
this._reportRef._exporting.next(args);
|
11687
11901
|
if (args.cancel)
|
11688
11902
|
return;
|
11689
|
-
const
|
11690
|
-
|
11691
|
-
|
11692
|
-
|
11693
|
-
|
11694
|
-
|
11903
|
+
const rows = [{
|
11904
|
+
index: 1,
|
11905
|
+
cells: this.report.columns.map((c, j) => ({
|
11906
|
+
index: j + 1, value: c.label,
|
11907
|
+
cellStyle: {
|
11908
|
+
bold: true,
|
11909
|
+
hAlign: c.type === 'Number' || c.type === 'Currency' ? 'right' : 'general'
|
11910
|
+
}
|
11911
|
+
}))
|
11912
|
+
}];
|
11913
|
+
args.data.forEach((r, i) => rows.push({
|
11914
|
+
index: i + 2,
|
11915
|
+
cells: this.report.columns.map((c, j) => ({
|
11916
|
+
index: j + 1, value: r[c.name],
|
11917
|
+
cellStyle: {
|
11918
|
+
hAlign: c.type === 'Number' || c.type === 'Currency' ? 'right' : 'general'
|
11919
|
+
}
|
11920
|
+
}))
|
11921
|
+
}));
|
11922
|
+
const book = new Workbook({
|
11923
|
+
worksheets: [
|
11924
|
+
{
|
11925
|
+
enableRtl: this._session.inverse,
|
11926
|
+
name: this._translate.get('SheetN', 1),
|
11927
|
+
columns: this.report.columns.map((_, i) => ({ index: i + 1, width: 250 })),
|
11928
|
+
rows
|
11929
|
+
}
|
11930
|
+
],
|
11931
|
+
}, 'xlsx');
|
11932
|
+
book.save(`${this.report.title}.xlsx`);
|
11695
11933
|
}
|
11696
11934
|
ngOnDestroy() {
|
11697
11935
|
this._reportRef._destroy();
|
@@ -11700,12 +11938,12 @@ class ReportViewerComponent {
|
|
11700
11938
|
this._destroy.complete();
|
11701
11939
|
}
|
11702
11940
|
}
|
11703
|
-
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 });
|
11941
|
+
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 });
|
11704
11942
|
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"] }] });
|
11705
11943
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ReportViewerComponent, decorators: [{
|
11706
11944
|
type: Component,
|
11707
11945
|
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"] }]
|
11708
|
-
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: PromptService }, { type: i0.Injector }, { type: HubService }, { type: TranslateService }, { type: BizDocComponentFactoryResolver }]; }, propDecorators: { report: [{
|
11946
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: PromptService }, { type: i0.Injector }, { type: HubService }, { type: TranslateService }, { type: SessionService }, { type: BizDocComponentFactoryResolver }]; }, propDecorators: { report: [{
|
11709
11947
|
type: Input
|
11710
11948
|
}], args: [{
|
11711
11949
|
type: Input
|
@@ -14045,13 +14283,13 @@ class CubeMatrixComponent {
|
|
14045
14283
|
else if (sum.calculate)
|
14046
14284
|
switch (sum.calculate) {
|
14047
14285
|
case 'month':
|
14048
|
-
value = 'M' + ('0' + new Date().getMonth().toString()).slice(-2);
|
14286
|
+
value = 'M' + ('0' + (new Date().getMonth() + 1).toString()).slice(-2);
|
14049
14287
|
break;
|
14050
14288
|
case 'year':
|
14051
14289
|
value = new Date().getFullYear().toString();
|
14052
14290
|
break;
|
14053
14291
|
case 'quarter':
|
14054
|
-
value = Math.ceil(new Date().getMonth() / 3).toString();
|
14292
|
+
value = Math.ceil((new Date().getMonth() + 1) / 3).toString();
|
14055
14293
|
break;
|
14056
14294
|
}
|
14057
14295
|
return {
|
@@ -14097,7 +14335,7 @@ class CubeMatrixComponent {
|
|
14097
14335
|
value: s.title,
|
14098
14336
|
explorable: !isFunction(s.calculate),
|
14099
14337
|
accumulate: s.accumulate,
|
14100
|
-
precision: s.precision,
|
14338
|
+
precision: s.precision || this.PRECISION,
|
14101
14339
|
format: s.format,
|
14102
14340
|
index: i
|
14103
14341
|
};
|
@@ -21685,14 +21923,79 @@ let UsageChartComponent = class UsageChartComponent extends UsageReportBase {
|
|
21685
21923
|
this.pivot.chart.chartResize();
|
21686
21924
|
}
|
21687
21925
|
}
|
21688
|
-
onExport(
|
21689
|
-
|
21690
|
-
|
21691
|
-
|
21692
|
-
|
21693
|
-
|
21694
|
-
|
21695
|
-
|
21926
|
+
onExport(title) {
|
21927
|
+
const numberFormat = this._cube.currencyCode ?
|
21928
|
+
getCurrencySymbol(this._cube.currencyCode, 'narrow') +
|
21929
|
+
getLocaleNumberFormat(this._session.locale, NumberFormatStyle.Currency)
|
21930
|
+
: getLocaleNumberFormat(this._session.locale, NumberFormatStyle.Decimal), columns = this._cube.axes.filter(a => this._options.series.indexOf(a.name) > -1), rows = [{
|
21931
|
+
index: 1,
|
21932
|
+
cells: columns.map((c, i) => ({
|
21933
|
+
index: i + 1, value: c.title,
|
21934
|
+
cellStyle: {
|
21935
|
+
bold: true
|
21936
|
+
}
|
21937
|
+
}))
|
21938
|
+
}];
|
21939
|
+
rows[0].cells.push({
|
21940
|
+
index: columns.length + 1,
|
21941
|
+
value: this._cube.yAxis ? this._cube.yAxis.title :
|
21942
|
+
this._translate.get('Value'),
|
21943
|
+
cellStyle: {
|
21944
|
+
bold: true
|
21945
|
+
}
|
21946
|
+
});
|
21947
|
+
this._indices && this._indices.forEach((x, i) => rows[0].cells.push({
|
21948
|
+
index: columns.length + i + 2,
|
21949
|
+
value: x.title,
|
21950
|
+
cellStyle: {
|
21951
|
+
bold: true
|
21952
|
+
}
|
21953
|
+
}));
|
21954
|
+
this._data.forEach((r, i) => {
|
21955
|
+
const cells = columns.map((c, j) => {
|
21956
|
+
return {
|
21957
|
+
index: j + 1, value: r[c.name],
|
21958
|
+
cellStyle: {}
|
21959
|
+
};
|
21960
|
+
});
|
21961
|
+
cells.push({
|
21962
|
+
type: 'number',
|
21963
|
+
index: columns.length + 1,
|
21964
|
+
cellStyle: {
|
21965
|
+
numberFormat,
|
21966
|
+
hAlign: 'right'
|
21967
|
+
},
|
21968
|
+
value: r['value']
|
21969
|
+
});
|
21970
|
+
this._indices && this._indices.forEach((x, i) => cells.push({
|
21971
|
+
type: 'number',
|
21972
|
+
index: columns.length + i + 2,
|
21973
|
+
cellStyle: {
|
21974
|
+
numberFormat,
|
21975
|
+
hAlign: 'right'
|
21976
|
+
},
|
21977
|
+
value: r[x.name]
|
21978
|
+
}));
|
21979
|
+
rows.push({
|
21980
|
+
index: i + 2,
|
21981
|
+
cells
|
21982
|
+
});
|
21983
|
+
});
|
21984
|
+
const book = new Workbook({
|
21985
|
+
worksheets: [
|
21986
|
+
{
|
21987
|
+
enableRtl: this._session.inverse,
|
21988
|
+
name: this._translate.get('SheetN', 1),
|
21989
|
+
columns: [...columns.map((_, i) => ({ index: i + 1, width: 250 })),
|
21990
|
+
{ index: columns.length + 1 },
|
21991
|
+
...(this._indices ? this._indices.map((_, i) => ({
|
21992
|
+
index: columns.length + i + 2
|
21993
|
+
})) : [])],
|
21994
|
+
rows
|
21995
|
+
}
|
21996
|
+
],
|
21997
|
+
}, 'xlsx');
|
21998
|
+
book.save(`${title}.xlsx`);
|
21696
21999
|
}
|
21697
22000
|
/**
|
21698
22001
|
* adds data source description to item keys, and normalizes indices.
|
@@ -24296,7 +24599,7 @@ let CubePivotViewComponent = class CubePivotViewComponent extends CubeBase {
|
|
24296
24599
|
}
|
24297
24600
|
};
|
24298
24601
|
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 });
|
24299
|
-
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", "
|
24602
|
+
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"] }] });
|
24300
24603
|
CubePivotViewComponent = __decorate([
|
24301
24604
|
BizDoc({
|
24302
24605
|
selector: 'bizdoc-pivot-view'
|
@@ -24795,7 +25098,7 @@ let CubeChartViewComponent = class CubeChartViewComponent extends CubeBase {
|
|
24795
25098
|
}
|
24796
25099
|
};
|
24797
25100
|
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 });
|
24798
|
-
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", "
|
25101
|
+
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]" }] });
|
24799
25102
|
CubeChartViewComponent = __decorate([
|
24800
25103
|
BizDoc({
|
24801
25104
|
selector: 'bizdoc-chart-view'
|
@@ -27286,8 +27589,7 @@ let PositionsComponent = class PositionsComponent {
|
|
27286
27589
|
});
|
27287
27590
|
}
|
27288
27591
|
async download() {
|
27289
|
-
const
|
27290
|
-
const wb = XLSX.utils.book_new();
|
27592
|
+
const { profiles } = this, worksheets = [];
|
27291
27593
|
for (let i = 0; i < this.types.length; i++) {
|
27292
27594
|
let type = this.types[i];
|
27293
27595
|
const model = this._everything[type.name];
|
@@ -27295,94 +27597,164 @@ let PositionsComponent = class PositionsComponent {
|
|
27295
27597
|
if (!positions || !Object.keys(positions).length)
|
27296
27598
|
continue;
|
27297
27599
|
const roles = this._session.profile.roles.filter(r => r.dataType === type.name && positions[r.name]);
|
27600
|
+
const cells = [{
|
27601
|
+
index: 1,
|
27602
|
+
value: this._translate.get('Type'),
|
27603
|
+
cellStyle: {
|
27604
|
+
bold: true
|
27605
|
+
}
|
27606
|
+
}, {
|
27607
|
+
index: 2,
|
27608
|
+
value: this._translate.get('Value'),
|
27609
|
+
cellStyle: {
|
27610
|
+
bold: true
|
27611
|
+
}
|
27612
|
+
}, {
|
27613
|
+
index: 3,
|
27614
|
+
value: ''
|
27615
|
+
}];
|
27616
|
+
if (type.columns)
|
27617
|
+
type.columns.slice(2).forEach((c, i) => cells.push({
|
27618
|
+
index: i + 4,
|
27619
|
+
value: ''
|
27620
|
+
}));
|
27621
|
+
roles.forEach(r => cells.push({
|
27622
|
+
index: cells.length + 1,
|
27623
|
+
value: r.title,
|
27624
|
+
cellStyle: {
|
27625
|
+
bold: true
|
27626
|
+
}
|
27627
|
+
}));
|
27298
27628
|
const rows = [];
|
27299
|
-
rows.push(
|
27629
|
+
rows.push({
|
27630
|
+
index: 1,
|
27631
|
+
cells
|
27632
|
+
});
|
27300
27633
|
model.patterns && model.patterns.forEach(p => {
|
27301
|
-
const row =
|
27302
|
-
|
27303
|
-
|
27634
|
+
const row = {
|
27635
|
+
index: rows.length + 1,
|
27636
|
+
cells: [{
|
27637
|
+
index: 1,
|
27638
|
+
value: this._translate.get('Pattern')
|
27639
|
+
}, {
|
27640
|
+
index: 2,
|
27641
|
+
value: p.expression
|
27642
|
+
}, {
|
27643
|
+
index: 3,
|
27644
|
+
value: p.title
|
27645
|
+
}]
|
27646
|
+
};
|
27647
|
+
addcolumns(p.name, row);
|
27304
27648
|
rows.push(row);
|
27305
27649
|
});
|
27306
27650
|
model.groups && model.groups.forEach(g => {
|
27307
|
-
const row =
|
27308
|
-
|
27309
|
-
|
27651
|
+
const row = {
|
27652
|
+
index: rows.length + 1,
|
27653
|
+
cells: [{
|
27654
|
+
index: 1,
|
27655
|
+
value: this._translate.get('Group')
|
27656
|
+
}, {
|
27657
|
+
index: 2,
|
27658
|
+
value: g.items.join(', ')
|
27659
|
+
}, {
|
27660
|
+
index: 3,
|
27661
|
+
value: g.title
|
27662
|
+
}]
|
27663
|
+
};
|
27664
|
+
addcolumns(g.name, row);
|
27310
27665
|
rows.push(row);
|
27311
27666
|
});
|
27312
27667
|
let datasource = await this._datasources.all(type.name).toPromise();
|
27313
27668
|
datasource.forEach(d => {
|
27314
|
-
const row =
|
27669
|
+
const row = {
|
27670
|
+
index: rows.length + 1,
|
27671
|
+
cells: [{
|
27672
|
+
index: 1,
|
27673
|
+
value: this._translate.get('Key')
|
27674
|
+
}]
|
27675
|
+
};
|
27315
27676
|
if (type.columns)
|
27316
|
-
type.columns.forEach(c => row.push(
|
27677
|
+
type.columns.forEach((c, i) => row.cells.push({
|
27678
|
+
index: i + 2,
|
27679
|
+
value: d.value[c.name]
|
27680
|
+
}));
|
27317
27681
|
else
|
27318
|
-
row.push(d.value);
|
27319
|
-
|
27682
|
+
row.cells.push({ index: 2, value: d.value });
|
27683
|
+
addcolumns(d.key, row);
|
27320
27684
|
rows.push(row);
|
27321
27685
|
});
|
27322
|
-
const
|
27323
|
-
|
27324
|
-
|
27325
|
-
|
27326
|
-
|
27327
|
-
|
27686
|
+
const columns = [];
|
27687
|
+
type.columns && type.columns.forEach((_, i) => columns.push({ index: i + 1, width: 250 }));
|
27688
|
+
roles.forEach((_, i) => columns.push({ index: columns.length + i + 2 }));
|
27689
|
+
worksheets.push({
|
27690
|
+
name: type.title,
|
27691
|
+
columns,
|
27692
|
+
rows
|
27693
|
+
});
|
27694
|
+
function addcolumns(key, row) {
|
27328
27695
|
roles.forEach(r => {
|
27329
27696
|
const users = positions[r.name][key];
|
27330
|
-
row.push(
|
27697
|
+
row.cells.push({
|
27698
|
+
index: row.cells.length + 1,
|
27699
|
+
value: users ? users.map(u => profiles[u] ? profiles[u].name : u).join(', ') : ''
|
27700
|
+
});
|
27331
27701
|
});
|
27332
27702
|
}
|
27333
27703
|
}
|
27334
|
-
|
27335
|
-
|
27336
|
-
|
27337
|
-
|
27338
|
-
|
27339
|
-
|
27340
|
-
|
27341
|
-
|
27342
|
-
|
27343
|
-
|
27344
|
-
|
27345
|
-
|
27346
|
-
|
27347
|
-
|
27348
|
-
|
27349
|
-
|
27350
|
-
|
27351
|
-
|
27352
|
-
|
27353
|
-
|
27354
|
-
|
27355
|
-
|
27356
|
-
|
27357
|
-
|
27358
|
-
|
27359
|
-
|
27360
|
-
|
27361
|
-
|
27362
|
-
|
27363
|
-
|
27364
|
-
|
27365
|
-
|
27366
|
-
|
27367
|
-
|
27368
|
-
|
27369
|
-
|
27370
|
-
|
27371
|
-
}
|
27704
|
+
const book = new Workbook({
|
27705
|
+
worksheets,
|
27706
|
+
}, 'xlsx');
|
27707
|
+
book.save(`${this._translate.get('Positions')}.xlsx`);
|
27708
|
+
}
|
27709
|
+
// async upload(evt: InputEvent) {
|
27710
|
+
// const { files } = evt.srcElement as HTMLInputElement;
|
27711
|
+
// if (files && files.length) {
|
27712
|
+
// const file = files.item(0);
|
27713
|
+
// var reader = new FileReader();
|
27714
|
+
// reader.onload = e => { };
|
27715
|
+
// const text = await file.text();
|
27716
|
+
// //reader.readAs(text);
|
27717
|
+
// const wb = XLSX.readFile(file.name, {});
|
27718
|
+
// for (let i = 0; i < wb.SheetNames.length; i++) {
|
27719
|
+
// let title = wb.SheetNames[i], ws = wb.Sheets[title];
|
27720
|
+
// let type = this.types.find(t => t.title === title);
|
27721
|
+
// if (!type) throw '';
|
27722
|
+
// let roles = this._session.profile.roles.filter(r => r.dataType === type.name);
|
27723
|
+
// let row = ws['!rows'][0];
|
27724
|
+
// for (let c = 0; c < ws['!cols'].length; c++) {
|
27725
|
+
// let col = ws['!cols'][c];
|
27726
|
+
// //let role = roles.find(r => r.title === ws.);
|
27727
|
+
// // if (!role) {
|
27728
|
+
// // this._everything[type.name].roles.push({name: '', title: ''});
|
27729
|
+
// // }
|
27730
|
+
// }
|
27731
|
+
// for (let r = 0; r < ws['!rows'].length; r++) {
|
27732
|
+
// let row = ws['!rows'][r];
|
27733
|
+
// for (let c = 0; c < ws['!cols'].length; c++) {
|
27734
|
+
// let col = ws['!cols'][c], content = '';
|
27735
|
+
// if (content) {
|
27736
|
+
// //let users = content.split(', ').map(name=> this.profiles.find(u=> u.name === name));
|
27737
|
+
// }
|
27738
|
+
// else { }
|
27739
|
+
// }
|
27740
|
+
// }
|
27741
|
+
// }
|
27742
|
+
// }
|
27743
|
+
//}
|
27372
27744
|
ngOnDestroy() {
|
27373
27745
|
this._destroy.next();
|
27374
27746
|
this._destroy.complete();
|
27375
27747
|
}
|
27376
27748
|
};
|
27377
27749
|
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 });
|
27378
|
-
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 } });
|
27750
|
+
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 } });
|
27379
27751
|
PositionsComponent = __decorate([
|
27380
27752
|
BizDoc({ selector: 'bizdoc-positions' })
|
27381
27753
|
/** positions component*/
|
27382
27754
|
], PositionsComponent);
|
27383
27755
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: PositionsComponent, decorators: [{
|
27384
27756
|
type: Component,
|
27385
|
-
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
|
27757
|
+
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"] }]
|
27386
27758
|
}], ctorParameters: function () { return [{ type: SessionService }, { type: UtilityRef, decorators: [{
|
27387
27759
|
type: Inject,
|
27388
27760
|
args: [UtilityRef]
|