@colijnit/extendedcomponents 12.0.6 → 12.0.8
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/bundles/colijnit-extendedcomponents.umd.js +269 -271
- package/bundles/colijnit-extendedcomponents.umd.js.map +1 -1
- package/esm2015/lib/components/stacked-line-chart/co-stacked-line-chart.component.js +7 -24
- package/esm2015/lib/components/summary-grid/components/recursive-list/recursive-list.component.js +32 -16
- package/esm2015/lib/components/summary-grid/components/recursive-list/recursive-list.module.js +6 -2
- package/esm2015/lib/components/summary-grid/summary-grid.component.js +13 -4
- package/esm2015/lib/model/icon-svg.js +3 -3
- package/esm2015/lib/translation/extended-components-translation.module.js +4 -3
- package/esm2015/public-api.js +2 -1
- package/fesm2015/colijnit-extendedcomponents.js +156 -145
- package/fesm2015/colijnit-extendedcomponents.js.map +1 -1
- package/lib/components/stacked-line-chart/co-stacked-line-chart.component.d.ts +2 -6
- package/lib/components/summary-grid/components/recursive-list/recursive-list.component.d.ts +4 -2
- package/lib/components/summary-grid/components/recursive-list/recursive-list.module.d.ts +2 -1
- package/lib/components/summary-grid/components/recursive-list/style/_layout.scss +14 -10
- package/lib/components/summary-grid/summary-grid.component.d.ts +3 -1
- package/lib/translation/extended-components-translation.module.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -14,7 +14,7 @@ export class ExtendedComponentsTranslationModule {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
ExtendedComponentsTranslationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ExtendedComponentsTranslationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
17
|
-
ExtendedComponentsTranslationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ExtendedComponentsTranslationModule, declarations: [LocalizePipe] });
|
|
17
|
+
ExtendedComponentsTranslationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ExtendedComponentsTranslationModule, declarations: [LocalizePipe], exports: [LocalizePipe] });
|
|
18
18
|
ExtendedComponentsTranslationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ExtendedComponentsTranslationModule, providers: [
|
|
19
19
|
ExtendedComponentsTranslationService,
|
|
20
20
|
DictionaryService
|
|
@@ -30,8 +30,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
30
30
|
DictionaryService
|
|
31
31
|
],
|
|
32
32
|
exports: [
|
|
33
|
-
|
|
33
|
+
LocalizePipe,
|
|
34
|
+
// LocalizePipe
|
|
34
35
|
]
|
|
35
36
|
}]
|
|
36
37
|
}] });
|
|
37
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
38
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXh0ZW5kZWQtY29tcG9uZW50cy10cmFuc2xhdGlvbi5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9leHRlbmRlZGNvbXBvbmVudHMvc3JjL2xpYi90cmFuc2xhdGlvbi9leHRlbmRlZC1jb21wb25lbnRzLXRyYW5zbGF0aW9uLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQXNCLFFBQVEsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUM1RCxPQUFPLEVBQUMsb0NBQW9DLEVBQUMsTUFBTSwyQ0FBMkMsQ0FBQztBQUMvRixPQUFPLEVBQUMsaUJBQWlCLEVBQUMsTUFBTSxzQkFBc0IsQ0FBQztBQUN2RCxPQUFPLEVBQUMsWUFBWSxFQUFDLE1BQU0saUJBQWlCLENBQUM7O0FBZTdDLE1BQU0sT0FBTyxtQ0FBbUM7SUFDNUMsTUFBTSxDQUFDLE9BQU87UUFDVixPQUFPO1lBQ0gsUUFBUSxFQUFFLG1DQUFtQztZQUM3QyxTQUFTLEVBQUU7Z0JBQ1Asb0NBQW9DO2FBQ3ZDO1NBQ0osQ0FBQztJQUNOLENBQUM7O2lJQVJRLG1DQUFtQztrSUFBbkMsbUNBQW1DLGlCQVh4QyxZQUFZLGFBT1osWUFBWTtrSUFJUCxtQ0FBbUMsYUFUakM7UUFDUCxvQ0FBb0M7UUFDcEMsaUJBQWlCO0tBQ3BCOzRGQU1RLG1DQUFtQztrQkFiL0MsUUFBUTttQkFBQztvQkFDTixZQUFZLEVBQUU7d0JBQ1YsWUFBWTtxQkFDZjtvQkFDRCxTQUFTLEVBQUU7d0JBQ1Asb0NBQW9DO3dCQUNwQyxpQkFBaUI7cUJBQ3BCO29CQUNELE9BQU8sRUFBRTt3QkFDTCxZQUFZO3dCQUNaLGVBQWU7cUJBQ2xCO2lCQUNKIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtNb2R1bGVXaXRoUHJvdmlkZXJzLCBOZ01vZHVsZX0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XHJcbmltcG9ydCB7RXh0ZW5kZWRDb21wb25lbnRzVHJhbnNsYXRpb25TZXJ2aWNlfSBmcm9tICcuL2V4dGVuZGVkLWNvbXBvbmVudHMtdHJhbnNsYXRpb24uc2VydmljZSc7XHJcbmltcG9ydCB7RGljdGlvbmFyeVNlcnZpY2V9IGZyb20gJy4vZGljdGlvbmFyeS5zZXJ2aWNlJztcclxuaW1wb3J0IHtMb2NhbGl6ZVBpcGV9IGZyb20gJy4vbG9jYWxpemUucGlwZSc7XHJcblxyXG5ATmdNb2R1bGUoe1xyXG4gICAgZGVjbGFyYXRpb25zOiBbXHJcbiAgICAgICAgTG9jYWxpemVQaXBlXHJcbiAgICBdLFxyXG4gICAgcHJvdmlkZXJzOiBbXHJcbiAgICAgICAgRXh0ZW5kZWRDb21wb25lbnRzVHJhbnNsYXRpb25TZXJ2aWNlLFxyXG4gICAgICAgIERpY3Rpb25hcnlTZXJ2aWNlXHJcbiAgICBdLFxyXG4gICAgZXhwb3J0czogW1xyXG4gICAgICAgIExvY2FsaXplUGlwZSxcclxuICAgICAgICAvLyBMb2NhbGl6ZVBpcGVcclxuICAgIF1cclxufSlcclxuZXhwb3J0IGNsYXNzIEV4dGVuZGVkQ29tcG9uZW50c1RyYW5zbGF0aW9uTW9kdWxlIHtcclxuICAgIHN0YXRpYyBmb3JSb290KCk6IE1vZHVsZVdpdGhQcm92aWRlcnM8RXh0ZW5kZWRDb21wb25lbnRzVHJhbnNsYXRpb25Nb2R1bGU+IHtcclxuICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICBuZ01vZHVsZTogRXh0ZW5kZWRDb21wb25lbnRzVHJhbnNsYXRpb25Nb2R1bGUsXHJcbiAgICAgICAgICAgIHByb3ZpZGVyczogW1xyXG4gICAgICAgICAgICAgICAgRXh0ZW5kZWRDb21wb25lbnRzVHJhbnNsYXRpb25TZXJ2aWNlXHJcbiAgICAgICAgICAgIF1cclxuICAgICAgICB9O1xyXG4gICAgfVxyXG59XHJcbiJdfQ==
|
package/esm2015/public-api.js
CHANGED
|
@@ -7,4 +7,5 @@ export * from './lib/components/summary-grid/summary-grid.module';
|
|
|
7
7
|
export * from './lib/components/summary-grid/summary-grid.component';
|
|
8
8
|
export * from './lib/translation/extended-components-translation.module';
|
|
9
9
|
export * from './lib/translation/extended-components-translation.service';
|
|
10
|
-
|
|
10
|
+
export * from './lib/translation/localize.pipe';
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2V4dGVuZGVkY29tcG9uZW50cy9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsa0VBQWtFLENBQUM7QUFDakYsY0FBYyxxRUFBcUUsQ0FBQztBQUVwRixjQUFjLG1EQUFtRCxDQUFDO0FBQ2xFLGNBQWMsc0RBQXNELENBQUM7QUFFckUsY0FBYywwREFBMEQsQ0FBQztBQUN6RSxjQUFjLDJEQUEyRCxDQUFDO0FBQzFFLGNBQWMsaUNBQWlDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxyXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2YgZXh0ZW5kZWRjb21wb25lbnRzXHJcbiAqL1xyXG5cclxuZXhwb3J0ICogZnJvbSAnLi9saWIvY29tcG9uZW50cy9zdGFja2VkLWxpbmUtY2hhcnQvY28tc3RhY2tlZC1saW5lLWNoYXJ0Lm1vZHVsZSc7XHJcbmV4cG9ydCAqIGZyb20gJy4vbGliL2NvbXBvbmVudHMvc3RhY2tlZC1saW5lLWNoYXJ0L2NvLXN0YWNrZWQtbGluZS1jaGFydC5jb21wb25lbnQnO1xyXG5cclxuZXhwb3J0ICogZnJvbSAnLi9saWIvY29tcG9uZW50cy9zdW1tYXJ5LWdyaWQvc3VtbWFyeS1ncmlkLm1vZHVsZSc7XHJcbmV4cG9ydCAqIGZyb20gJy4vbGliL2NvbXBvbmVudHMvc3VtbWFyeS1ncmlkL3N1bW1hcnktZ3JpZC5jb21wb25lbnQnO1xyXG5cclxuZXhwb3J0ICogZnJvbSAnLi9saWIvdHJhbnNsYXRpb24vZXh0ZW5kZWQtY29tcG9uZW50cy10cmFuc2xhdGlvbi5tb2R1bGUnO1xyXG5leHBvcnQgKiBmcm9tICcuL2xpYi90cmFuc2xhdGlvbi9leHRlbmRlZC1jb21wb25lbnRzLXRyYW5zbGF0aW9uLnNlcnZpY2UnO1xyXG5leHBvcnQgKiBmcm9tICcuL2xpYi90cmFuc2xhdGlvbi9sb2NhbGl6ZS5waXBlJztcclxuIl19
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Component, ViewEncapsulation, HostBinding, Input, NgModule, Injectable, Pipe } from '@angular/core';
|
|
3
3
|
import * as i3 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i1 from 'ngx-echarts';
|
|
@@ -18,13 +18,7 @@ class StackedLineChartComponent {
|
|
|
18
18
|
this.chartOptions = {
|
|
19
19
|
title: {},
|
|
20
20
|
tooltip: {
|
|
21
|
-
trigger: 'axis'
|
|
22
|
-
axisPointer: {
|
|
23
|
-
type: 'cross',
|
|
24
|
-
label: {
|
|
25
|
-
backgroundColor: '#6a7985'
|
|
26
|
-
}
|
|
27
|
-
}
|
|
21
|
+
trigger: 'axis'
|
|
28
22
|
},
|
|
29
23
|
legend: {},
|
|
30
24
|
grid: {
|
|
@@ -38,17 +32,12 @@ class StackedLineChartComponent {
|
|
|
38
32
|
saveAsImage: {}
|
|
39
33
|
}
|
|
40
34
|
},
|
|
41
|
-
xAxis: {
|
|
42
|
-
type: 'category',
|
|
43
|
-
boundaryGap: false,
|
|
44
|
-
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
|
45
|
-
},
|
|
35
|
+
xAxis: {},
|
|
46
36
|
yAxis: {
|
|
47
37
|
type: 'value'
|
|
48
38
|
},
|
|
49
39
|
series: {}
|
|
50
40
|
};
|
|
51
|
-
this.chartEventEmitter = new EventEmitter();
|
|
52
41
|
}
|
|
53
42
|
showClass() {
|
|
54
43
|
return true;
|
|
@@ -63,17 +52,13 @@ class StackedLineChartComponent {
|
|
|
63
52
|
};
|
|
64
53
|
this.chartOptions.legend['data'] = this.chartLegend;
|
|
65
54
|
}
|
|
66
|
-
onChartEvent(event, type) {
|
|
67
|
-
console.log('chart event:', type, event);
|
|
68
|
-
this.chartEventEmitter.emit(event);
|
|
69
|
-
}
|
|
70
55
|
}
|
|
71
56
|
StackedLineChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: StackedLineChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
72
|
-
StackedLineChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: StackedLineChartComponent, selector: "co-stacked-line-chart", inputs: { chartName: "chartName", chartData: "chartData", chartLegend: "chartLegend", chartXAxis: "chartXAxis", chartHeight: "chartHeight", chartWidth: "chartWidth", chartOptions: "chartOptions" },
|
|
57
|
+
StackedLineChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: StackedLineChartComponent, selector: "co-stacked-line-chart", inputs: { chartName: "chartName", chartData: "chartData", chartLegend: "chartLegend", chartXAxis: "chartXAxis", chartHeight: "chartHeight", chartWidth: "chartWidth", chartOptions: "chartOptions" }, host: { properties: { "class.co-co-stacked-line-chart": "this.showClass" } }, ngImport: i0, template: `
|
|
73
58
|
|
|
74
59
|
<div echarts [options]="chartOptions" [initOpts]="{
|
|
75
60
|
width: chartWidth,
|
|
76
|
-
height: chartHeight}"
|
|
61
|
+
height: chartHeight}" class="chart"></div>
|
|
77
62
|
|
|
78
63
|
`, isInline: true, directives: [{ type: i1.NgxEchartsDirective, selector: "echarts, [echarts]", inputs: ["autoResize", "loadingType", "options", "theme", "loading", "initOpts", "merge", "loadingOpts"], outputs: ["chartInit", "optionsError", "chartClick", "chartDblClick", "chartMouseDown", "chartMouseMove", "chartMouseUp", "chartMouseOver", "chartMouseOut", "chartGlobalOut", "chartContextMenu", "chartLegendSelectChanged", "chartLegendSelected", "chartLegendUnselected", "chartLegendScroll", "chartDataZoom", "chartDataRangeSelected", "chartTimelineChanged", "chartTimelinePlayChanged", "chartRestore", "chartDataViewChanged", "chartMagicTypeChanged", "chartPieSelectChanged", "chartPieSelected", "chartPieUnselected", "chartMapSelectChanged", "chartMapSelected", "chartMapUnselected", "chartAxisAreaSelected", "chartFocusNodeAdjacency", "chartUnfocusNodeAdjacency", "chartBrush", "chartBrushEnd", "chartBrushSelected", "chartRendered", "chartFinished"], exportAs: ["echarts"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
79
64
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: StackedLineChartComponent, decorators: [{
|
|
@@ -84,7 +69,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
84
69
|
|
|
85
70
|
<div echarts [options]="chartOptions" [initOpts]="{
|
|
86
71
|
width: chartWidth,
|
|
87
|
-
height: chartHeight}"
|
|
72
|
+
height: chartHeight}" class="chart"></div>
|
|
88
73
|
|
|
89
74
|
`,
|
|
90
75
|
encapsulation: ViewEncapsulation.None
|
|
@@ -106,8 +91,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
106
91
|
type: Input
|
|
107
92
|
}], chartOptions: [{
|
|
108
93
|
type: Input
|
|
109
|
-
}], chartEventEmitter: [{
|
|
110
|
-
type: Output
|
|
111
94
|
}] } });
|
|
112
95
|
|
|
113
96
|
class StackedLineChartModule {
|
|
@@ -448,9 +431,9 @@ const IconSvg = {
|
|
|
448
431
|
"arrow_fat_right": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><polygon points=\"37.5 25 25.2 12.7 25.2 20.35 12.5 20.35 12.5 29.66 25.2 29.66 25.2 37.3 37.5 25\" fill=\"#484f60\"/></svg>",
|
|
449
432
|
"arrow_left": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><polygon points=\"23.63 33.63 15 25 23.63 16.37 24.6 17.34 16.95 25 24.6 32.66 23.63 33.63\" fill=\"#484f60\" opacity=\"0.98\"/><rect x=\"23.49\" y=\"24.31\" width=\"11.51\" height=\"1.38\" fill=\"#484f60\" opacity=\"0.98\"/></svg>",
|
|
450
433
|
"arrow_left_round_open": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M25,11.17a14,14,0,1,1-14,14,14,14,0,0,1,14-14m0-1a15,15,0,1,0,15,15,15,15,0,0,0-15-15Z\" fill=\"#484f60\"/><polygon points=\"23.65 31.43 17.39 25.17 23.65 18.9 24.36 19.61 18.8 25.17 24.36 30.72 23.65 31.43\" fill=\"#484f60\" opacity=\"0.98\"/><rect x=\"23.55\" y=\"24.67\" width=\"8.36\" height=\"1\" fill=\"#484f60\" opacity=\"0.98\"/></svg>",
|
|
451
|
-
"arrow_point_down": "<svg
|
|
434
|
+
"arrow_point_down": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z\"/></svg>",
|
|
452
435
|
"arrow_point_left": "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"0 0 51 51\" enable-background=\"new 0 0 51 51\" ><path fill=\"#484F5F\" d=\"M31.9,36.7l-14.7-9.6C17.1,27,17,26.9,17,26.7v-2.4c0-0.2,0.1-0.3,0.2-0.4l14.7-9.6c0.2-0.2,0.5-0.1,0.7,0.1l1.4,2.1c0.2,0.2,0.1,0.5-0.1,0.7l-12,7.8c-0.3,0.2-0.3,0.6,0,0.8l12,7.8c0.2,0.2,0.3,0.5,0.1,0.7l-1.4,2.1C32.4,36.8,32.1,36.8,31.9,36.7z\"/></svg>",
|
|
453
|
-
"arrow_point_right": "<svg
|
|
436
|
+
"arrow_point_right": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\"><path d=\"M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z\"/></svg>",
|
|
454
437
|
"arrow_point_up": "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"-280 371 51 51\" enable-background=\"new -280 371 51 51\" ><path fill=\"#29363E\" d=\"M-260.7,400.8c-0.3,0-0.6-0.1-0.8-0.3c-0.5-0.5-0.5-1.2,0-1.6l6.2-6.2c0.2-0.2,0.5-0.3,0.8-0.3c0.3,0,0.6,0.1,0.8,0.3l6.2,6.2c0.2,0.2,0.3,0.5,0.3,0.8c0,0.3-0.1,0.6-0.3,0.8c-0.2,0.2-0.5,0.3-0.8,0.3c-0.3,0-0.6-0.1-0.8-0.3l-5.4-5.4l-5.4,5.4C-260.1,400.6-260.4,400.8-260.7,400.8z\"/></svg>",
|
|
455
438
|
"arrow_right_round_open": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M25,11.17a14,14,0,1,1-14,14,14,14,0,0,1,14-14m0-1a15,15,0,1,0,15,15,15,15,0,0,0-15-15Z\" fill=\"#484f60\"/><polygon points=\"26.35 31.43 25.64 30.72 31.2 25.17 25.64 19.61 26.35 18.9 32.61 25.17 26.35 31.43\" fill=\"#484f60\" opacity=\"0.98\"/><rect x=\"18.09\" y=\"24.67\" width=\"8.36\" height=\"1\" fill=\"#484f60\" opacity=\"0.98\"/></svg>",
|
|
456
439
|
"arrow_scroll_down": "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"0 0 50 50\" enable-background=\"new 0 0 50 50\" ><polygon fill=\"#29363E\" points=\"5,19.4 8.5,15.8 25,27.3 41.5,15.8 45,19.4 25,34.2 \"/></svg>",
|
|
@@ -780,15 +763,70 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
780
763
|
}]
|
|
781
764
|
}], ctorParameters: function () { return [{ type: i1$1.DomSanitizer }]; } });
|
|
782
765
|
|
|
766
|
+
// The localization service, providing peers with text translation functionality.
|
|
767
|
+
class DictionaryService {
|
|
768
|
+
constructor() {
|
|
769
|
+
// Some dictionary values have one or more '|~' texts in them, meant to be replaced with client-side given texts.
|
|
770
|
+
this._placeholder = "|~";
|
|
771
|
+
}
|
|
772
|
+
/**
|
|
773
|
+
* Returns the localized text for the given dictionary key.
|
|
774
|
+
* @param {string} key
|
|
775
|
+
* @param {boolean} [upperCaseFirst = true] False for first letter lowercase, true for first letter uppercase for returned dict val
|
|
776
|
+
* @param {string[]} replacementTexts Rest params for replacement of '|~' in returned dict value
|
|
777
|
+
* @returns {string} The translated text for given dictionary key
|
|
778
|
+
*/
|
|
779
|
+
get(key, upperCaseFirst = true, ...replacementTexts) {
|
|
780
|
+
let text = key;
|
|
781
|
+
if (this.translation && this.translation.hasOwnProperty(key)) {
|
|
782
|
+
text = this.translation[key].toLowerCase();
|
|
783
|
+
if (upperCaseFirst) {
|
|
784
|
+
text = text.charAt(0).toUpperCase() + text.slice(1);
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
return text;
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
DictionaryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DictionaryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
791
|
+
DictionaryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DictionaryService });
|
|
792
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DictionaryService, decorators: [{
|
|
793
|
+
type: Injectable
|
|
794
|
+
}] });
|
|
795
|
+
|
|
796
|
+
class LocalizePipe {
|
|
797
|
+
constructor(_dictionaryService) {
|
|
798
|
+
this._dictionaryService = _dictionaryService;
|
|
799
|
+
}
|
|
800
|
+
transform(value, upperCaseFirst = true, replace = []) {
|
|
801
|
+
if (!value) {
|
|
802
|
+
return "";
|
|
803
|
+
}
|
|
804
|
+
replace = (replace !== undefined && replace !== null) ? replace : [];
|
|
805
|
+
if (!Array.isArray(replace)) {
|
|
806
|
+
replace = [replace];
|
|
807
|
+
}
|
|
808
|
+
return this._dictionaryService.get(value, upperCaseFirst, ...replace);
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
LocalizePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: LocalizePipe, deps: [{ token: DictionaryService }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
812
|
+
LocalizePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: LocalizePipe, name: "localize" });
|
|
813
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: LocalizePipe, decorators: [{
|
|
814
|
+
type: Pipe,
|
|
815
|
+
args: [{
|
|
816
|
+
name: "localize"
|
|
817
|
+
}]
|
|
818
|
+
}], ctorParameters: function () { return [{ type: DictionaryService }]; } });
|
|
819
|
+
|
|
783
820
|
// recursive-list.component.ts
|
|
784
821
|
class RecursiveListComponent {
|
|
785
822
|
constructor(iconCacheService) {
|
|
786
823
|
this.iconCacheService = iconCacheService;
|
|
787
824
|
this.icons = Icon;
|
|
788
825
|
this.columns = [];
|
|
826
|
+
this.subColumns = [];
|
|
789
827
|
this.tableLegend = "";
|
|
790
828
|
this.depth = 0;
|
|
791
|
-
this.indentation =
|
|
829
|
+
this.indentation = 10;
|
|
792
830
|
this.dataPipe = null;
|
|
793
831
|
}
|
|
794
832
|
toggleCollapse(event, item) {
|
|
@@ -800,10 +838,10 @@ class RecursiveListComponent {
|
|
|
800
838
|
getCurrentIcon(item) {
|
|
801
839
|
return item.expanded ? this.icons.ArrowPointDown : this.icons.ArrowPointRight;
|
|
802
840
|
}
|
|
803
|
-
formatDataValue(dataValue) {
|
|
841
|
+
formatDataValue(dataValue, params) {
|
|
804
842
|
if (this.dataPipe && typeof dataValue === 'number') {
|
|
805
843
|
// Apply data formatting pipe here
|
|
806
|
-
return this.dataPipe.transform(dataValue);
|
|
844
|
+
return this.dataPipe.transform(dataValue, params);
|
|
807
845
|
}
|
|
808
846
|
else {
|
|
809
847
|
return dataValue.toString(); // No formatting needed
|
|
@@ -811,16 +849,21 @@ class RecursiveListComponent {
|
|
|
811
849
|
}
|
|
812
850
|
}
|
|
813
851
|
RecursiveListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: RecursiveListComponent, deps: [{ token: IconCacheService }], target: i0.ɵɵFactoryTarget.Component });
|
|
814
|
-
RecursiveListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: RecursiveListComponent, selector: "co-recursive-list", inputs: { collection: "collection", columns: "columns", tableLegend: "tableLegend", depth: "depth", indentation: "indentation", dataPipe: "dataPipe" }, ngImport: i0, template: `
|
|
852
|
+
RecursiveListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: RecursiveListComponent, selector: "co-recursive-list", inputs: { collection: "collection", columns: "columns", subColumns: "subColumns", tableLegend: "tableLegend", depth: "depth", indentation: "indentation", dataPipe: "dataPipe", params: "params" }, ngImport: i0, template: `
|
|
815
853
|
<div class="co-recursive-list">
|
|
816
854
|
<div class="table-header-row">
|
|
817
855
|
<div class="table-legend" *ngIf="tableLegend.length > 1">
|
|
818
|
-
<span [textContent]="tableLegend"></span>
|
|
856
|
+
<span [textContent]="tableLegend | localize"></span>
|
|
819
857
|
</div>
|
|
820
858
|
<div class="table-header" *ngIf="columns && columns.length > 0">
|
|
821
859
|
<div class="table-row">
|
|
822
860
|
<div class="table-cell" *ngFor="let column of columns">
|
|
823
|
-
<span [textContent]="column"></span>
|
|
861
|
+
<span [textContent]="formatDataValue(column) | localize"></span>
|
|
862
|
+
</div>
|
|
863
|
+
</div>
|
|
864
|
+
<div class="table-row" *ngIf="subColumns && subColumns.length > 0">
|
|
865
|
+
<div class="table-cell" *ngFor="let column of subColumns">
|
|
866
|
+
<span [textContent]="formatDataValue(column)"></span>
|
|
824
867
|
</div>
|
|
825
868
|
</div>
|
|
826
869
|
</div>
|
|
@@ -828,21 +871,21 @@ RecursiveListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
828
871
|
<div class="tree-node" [class.background]="depth === 0" *ngFor="let item of collection" (click)="toggleCollapse($event, item)">
|
|
829
872
|
<div class="table-row">
|
|
830
873
|
<div class="table-cell node-text-icon" [ngStyle]="{'padding-left.px' : indentation}">
|
|
831
|
-
<co-icon [iconData]="iconCacheService.getIcon(getCurrentIcon(item))"></co-icon>
|
|
874
|
+
<co-icon *ngIf="item.children && item.children.length > 0" [iconData]="iconCacheService.getIcon(getCurrentIcon(item))"></co-icon>
|
|
832
875
|
<span [textContent]="item.name"></span>
|
|
833
876
|
</div>
|
|
834
877
|
<div class="table-cell data-points">
|
|
835
878
|
<div *ngFor="let dataPoint of item.data" class="custom-property">
|
|
836
|
-
<span [textContent]="formatDataValue(dataPoint)"></span>
|
|
879
|
+
<span [textContent]="formatDataValue(dataPoint, params)"></span>
|
|
837
880
|
</div>
|
|
838
881
|
</div>
|
|
839
882
|
</div>
|
|
840
883
|
<ng-container *ngIf="item.children && item.children.length > 0 && item.expanded">
|
|
841
|
-
<co-recursive-list [dataPipe]="dataPipe" [collection]="item.children" [depth]="depth + 1" [indentation]="indentation + 20"></co-recursive-list>
|
|
884
|
+
<co-recursive-list [dataPipe]="dataPipe" [collection]="item.children" [depth]="depth + 1" [indentation]="indentation + 20" [params]="params"></co-recursive-list>
|
|
842
885
|
</ng-container>
|
|
843
886
|
</div>
|
|
844
887
|
</div>
|
|
845
|
-
`, isInline: true, components: [{ type: i2.IconComponent, selector: "co-icon", inputs: ["icon", "iconData"] }, { type: RecursiveListComponent, selector: "co-recursive-list", inputs: ["collection", "columns", "tableLegend", "depth", "indentation", "dataPipe"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
888
|
+
`, isInline: true, components: [{ type: i2.IconComponent, selector: "co-icon", inputs: ["icon", "iconData"] }, { type: RecursiveListComponent, selector: "co-recursive-list", inputs: ["collection", "columns", "subColumns", "tableLegend", "depth", "indentation", "dataPipe", "params"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "localize": LocalizePipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
846
889
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: RecursiveListComponent, decorators: [{
|
|
847
890
|
type: Component,
|
|
848
891
|
args: [{
|
|
@@ -851,12 +894,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
851
894
|
<div class="co-recursive-list">
|
|
852
895
|
<div class="table-header-row">
|
|
853
896
|
<div class="table-legend" *ngIf="tableLegend.length > 1">
|
|
854
|
-
<span [textContent]="tableLegend"></span>
|
|
897
|
+
<span [textContent]="tableLegend | localize"></span>
|
|
855
898
|
</div>
|
|
856
899
|
<div class="table-header" *ngIf="columns && columns.length > 0">
|
|
857
900
|
<div class="table-row">
|
|
858
901
|
<div class="table-cell" *ngFor="let column of columns">
|
|
859
|
-
<span [textContent]="column"></span>
|
|
902
|
+
<span [textContent]="formatDataValue(column) | localize"></span>
|
|
903
|
+
</div>
|
|
904
|
+
</div>
|
|
905
|
+
<div class="table-row" *ngIf="subColumns && subColumns.length > 0">
|
|
906
|
+
<div class="table-cell" *ngFor="let column of subColumns">
|
|
907
|
+
<span [textContent]="formatDataValue(column)"></span>
|
|
860
908
|
</div>
|
|
861
909
|
</div>
|
|
862
910
|
</div>
|
|
@@ -864,17 +912,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
864
912
|
<div class="tree-node" [class.background]="depth === 0" *ngFor="let item of collection" (click)="toggleCollapse($event, item)">
|
|
865
913
|
<div class="table-row">
|
|
866
914
|
<div class="table-cell node-text-icon" [ngStyle]="{'padding-left.px' : indentation}">
|
|
867
|
-
<co-icon [iconData]="iconCacheService.getIcon(getCurrentIcon(item))"></co-icon>
|
|
915
|
+
<co-icon *ngIf="item.children && item.children.length > 0" [iconData]="iconCacheService.getIcon(getCurrentIcon(item))"></co-icon>
|
|
868
916
|
<span [textContent]="item.name"></span>
|
|
869
917
|
</div>
|
|
870
918
|
<div class="table-cell data-points">
|
|
871
919
|
<div *ngFor="let dataPoint of item.data" class="custom-property">
|
|
872
|
-
<span [textContent]="formatDataValue(dataPoint)"></span>
|
|
920
|
+
<span [textContent]="formatDataValue(dataPoint, params)"></span>
|
|
873
921
|
</div>
|
|
874
922
|
</div>
|
|
875
923
|
</div>
|
|
876
924
|
<ng-container *ngIf="item.children && item.children.length > 0 && item.expanded">
|
|
877
|
-
<co-recursive-list [dataPipe]="dataPipe" [collection]="item.children" [depth]="depth + 1" [indentation]="indentation + 20"></co-recursive-list>
|
|
925
|
+
<co-recursive-list [dataPipe]="dataPipe" [collection]="item.children" [depth]="depth + 1" [indentation]="indentation + 20" [params]="params"></co-recursive-list>
|
|
878
926
|
</ng-container>
|
|
879
927
|
</div>
|
|
880
928
|
</div>
|
|
@@ -885,6 +933,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
885
933
|
type: Input
|
|
886
934
|
}], columns: [{
|
|
887
935
|
type: Input
|
|
936
|
+
}], subColumns: [{
|
|
937
|
+
type: Input
|
|
888
938
|
}], tableLegend: [{
|
|
889
939
|
type: Input
|
|
890
940
|
}], depth: [{
|
|
@@ -893,6 +943,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
893
943
|
type: Input
|
|
894
944
|
}], dataPipe: [{
|
|
895
945
|
type: Input
|
|
946
|
+
}], params: [{
|
|
947
|
+
type: Input
|
|
896
948
|
}] } });
|
|
897
949
|
|
|
898
950
|
// summary-grid.component.ts
|
|
@@ -900,6 +952,7 @@ class SummaryGridComponent {
|
|
|
900
952
|
constructor() {
|
|
901
953
|
this.showClass = true;
|
|
902
954
|
this.columns = ['Column1', 'Column2']; // Add your column headers here
|
|
955
|
+
this.subColumns = ['SubColumn1', 'SubColumn2']; // Add your column headers here
|
|
903
956
|
this.tableLegend = "Legend";
|
|
904
957
|
this.dataPipe = null;
|
|
905
958
|
this.collection = [
|
|
@@ -921,7 +974,7 @@ class SummaryGridComponent {
|
|
|
921
974
|
{
|
|
922
975
|
name: 'Grandchild 1.1.2',
|
|
923
976
|
expanded: false,
|
|
924
|
-
data: [7,
|
|
977
|
+
data: [7, 0],
|
|
925
978
|
},
|
|
926
979
|
],
|
|
927
980
|
},
|
|
@@ -958,14 +1011,16 @@ class SummaryGridComponent {
|
|
|
958
1011
|
}
|
|
959
1012
|
}
|
|
960
1013
|
SummaryGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SummaryGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
961
|
-
SummaryGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: SummaryGridComponent, selector: "co-summary-grid", inputs: { columns: "columns", tableLegend: "tableLegend", dataPipe: "dataPipe", collection: "collection" }, host: { properties: { "class.co-summary-grid": "this.showClass" } }, ngImport: i0, template: `
|
|
1014
|
+
SummaryGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: SummaryGridComponent, selector: "co-summary-grid", inputs: { columns: "columns", subColumns: "subColumns", tableLegend: "tableLegend", dataPipe: "dataPipe", params: "params", collection: "collection" }, host: { properties: { "class.co-summary-grid": "this.showClass" } }, ngImport: i0, template: `
|
|
962
1015
|
<co-recursive-list
|
|
963
1016
|
[collection]="collection"
|
|
964
1017
|
[columns]="columns"
|
|
1018
|
+
[subColumns]="subColumns"
|
|
965
1019
|
[tableLegend]="tableLegend"
|
|
966
1020
|
[dataPipe]="dataPipe"
|
|
1021
|
+
[params]="params"
|
|
967
1022
|
></co-recursive-list>
|
|
968
|
-
`, isInline: true, components: [{ type: RecursiveListComponent, selector: "co-recursive-list", inputs: ["collection", "columns", "tableLegend", "depth", "indentation", "dataPipe"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1023
|
+
`, isInline: true, components: [{ type: RecursiveListComponent, selector: "co-recursive-list", inputs: ["collection", "columns", "subColumns", "tableLegend", "depth", "indentation", "dataPipe", "params"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
969
1024
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SummaryGridComponent, decorators: [{
|
|
970
1025
|
type: Component,
|
|
971
1026
|
args: [{
|
|
@@ -974,8 +1029,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
974
1029
|
<co-recursive-list
|
|
975
1030
|
[collection]="collection"
|
|
976
1031
|
[columns]="columns"
|
|
1032
|
+
[subColumns]="subColumns"
|
|
977
1033
|
[tableLegend]="tableLegend"
|
|
978
1034
|
[dataPipe]="dataPipe"
|
|
1035
|
+
[params]="params"
|
|
979
1036
|
></co-recursive-list>
|
|
980
1037
|
`,
|
|
981
1038
|
encapsulation: ViewEncapsulation.None,
|
|
@@ -985,22 +1042,75 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
985
1042
|
args: ['class.co-summary-grid']
|
|
986
1043
|
}], columns: [{
|
|
987
1044
|
type: Input
|
|
1045
|
+
}], subColumns: [{
|
|
1046
|
+
type: Input
|
|
988
1047
|
}], tableLegend: [{
|
|
989
1048
|
type: Input
|
|
990
1049
|
}], dataPipe: [{
|
|
991
1050
|
type: Input
|
|
1051
|
+
}], params: [{
|
|
1052
|
+
type: Input
|
|
992
1053
|
}], collection: [{
|
|
993
1054
|
type: Input
|
|
994
1055
|
}] } });
|
|
995
1056
|
|
|
1057
|
+
class ExtendedComponentsTranslationService {
|
|
1058
|
+
constructor(_dictionaryService) {
|
|
1059
|
+
this._dictionaryService = _dictionaryService;
|
|
1060
|
+
}
|
|
1061
|
+
setTranslation(translation) {
|
|
1062
|
+
this._dictionaryService.translation = translation;
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
ExtendedComponentsTranslationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ExtendedComponentsTranslationService, deps: [{ token: DictionaryService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1066
|
+
ExtendedComponentsTranslationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ExtendedComponentsTranslationService });
|
|
1067
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ExtendedComponentsTranslationService, decorators: [{
|
|
1068
|
+
type: Injectable
|
|
1069
|
+
}], ctorParameters: function () { return [{ type: DictionaryService }]; } });
|
|
1070
|
+
|
|
1071
|
+
class ExtendedComponentsTranslationModule {
|
|
1072
|
+
static forRoot() {
|
|
1073
|
+
return {
|
|
1074
|
+
ngModule: ExtendedComponentsTranslationModule,
|
|
1075
|
+
providers: [
|
|
1076
|
+
ExtendedComponentsTranslationService
|
|
1077
|
+
]
|
|
1078
|
+
};
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
ExtendedComponentsTranslationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ExtendedComponentsTranslationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1082
|
+
ExtendedComponentsTranslationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ExtendedComponentsTranslationModule, declarations: [LocalizePipe], exports: [LocalizePipe] });
|
|
1083
|
+
ExtendedComponentsTranslationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ExtendedComponentsTranslationModule, providers: [
|
|
1084
|
+
ExtendedComponentsTranslationService,
|
|
1085
|
+
DictionaryService
|
|
1086
|
+
] });
|
|
1087
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ExtendedComponentsTranslationModule, decorators: [{
|
|
1088
|
+
type: NgModule,
|
|
1089
|
+
args: [{
|
|
1090
|
+
declarations: [
|
|
1091
|
+
LocalizePipe
|
|
1092
|
+
],
|
|
1093
|
+
providers: [
|
|
1094
|
+
ExtendedComponentsTranslationService,
|
|
1095
|
+
DictionaryService
|
|
1096
|
+
],
|
|
1097
|
+
exports: [
|
|
1098
|
+
LocalizePipe,
|
|
1099
|
+
// LocalizePipe
|
|
1100
|
+
]
|
|
1101
|
+
}]
|
|
1102
|
+
}] });
|
|
1103
|
+
|
|
996
1104
|
class RecursiveListModule {
|
|
997
1105
|
}
|
|
998
1106
|
RecursiveListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: RecursiveListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
999
1107
|
RecursiveListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: RecursiveListModule, declarations: [RecursiveListComponent], imports: [CommonModule,
|
|
1000
|
-
IconModule
|
|
1108
|
+
IconModule,
|
|
1109
|
+
ExtendedComponentsTranslationModule], exports: [RecursiveListComponent] });
|
|
1001
1110
|
RecursiveListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: RecursiveListModule, imports: [[
|
|
1002
1111
|
CommonModule,
|
|
1003
1112
|
IconModule,
|
|
1113
|
+
ExtendedComponentsTranslationModule,
|
|
1004
1114
|
]] });
|
|
1005
1115
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: RecursiveListModule, decorators: [{
|
|
1006
1116
|
type: NgModule,
|
|
@@ -1008,6 +1118,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
1008
1118
|
imports: [
|
|
1009
1119
|
CommonModule,
|
|
1010
1120
|
IconModule,
|
|
1121
|
+
ExtendedComponentsTranslationModule,
|
|
1011
1122
|
],
|
|
1012
1123
|
declarations: [
|
|
1013
1124
|
RecursiveListComponent
|
|
@@ -1043,106 +1154,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
1043
1154
|
}]
|
|
1044
1155
|
}] });
|
|
1045
1156
|
|
|
1046
|
-
// The localization service, providing peers with text translation functionality.
|
|
1047
|
-
class DictionaryService {
|
|
1048
|
-
constructor() {
|
|
1049
|
-
// Some dictionary values have one or more '|~' texts in them, meant to be replaced with client-side given texts.
|
|
1050
|
-
this._placeholder = "|~";
|
|
1051
|
-
}
|
|
1052
|
-
/**
|
|
1053
|
-
* Returns the localized text for the given dictionary key.
|
|
1054
|
-
* @param {string} key
|
|
1055
|
-
* @param {boolean} [upperCaseFirst = true] False for first letter lowercase, true for first letter uppercase for returned dict val
|
|
1056
|
-
* @param {string[]} replacementTexts Rest params for replacement of '|~' in returned dict value
|
|
1057
|
-
* @returns {string} The translated text for given dictionary key
|
|
1058
|
-
*/
|
|
1059
|
-
get(key, upperCaseFirst = true, ...replacementTexts) {
|
|
1060
|
-
let text = key;
|
|
1061
|
-
if (this.translation && this.translation.hasOwnProperty(key)) {
|
|
1062
|
-
text = this.translation[key].toLowerCase();
|
|
1063
|
-
if (upperCaseFirst) {
|
|
1064
|
-
text = text.charAt(0).toUpperCase() + text.slice(1);
|
|
1065
|
-
}
|
|
1066
|
-
}
|
|
1067
|
-
return text;
|
|
1068
|
-
}
|
|
1069
|
-
}
|
|
1070
|
-
DictionaryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DictionaryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1071
|
-
DictionaryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DictionaryService });
|
|
1072
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DictionaryService, decorators: [{
|
|
1073
|
-
type: Injectable
|
|
1074
|
-
}] });
|
|
1075
|
-
|
|
1076
|
-
class ExtendedComponentsTranslationService {
|
|
1077
|
-
constructor(_dictionaryService) {
|
|
1078
|
-
this._dictionaryService = _dictionaryService;
|
|
1079
|
-
}
|
|
1080
|
-
setTranslation(translation) {
|
|
1081
|
-
this._dictionaryService.translation = translation;
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
1084
|
-
ExtendedComponentsTranslationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ExtendedComponentsTranslationService, deps: [{ token: DictionaryService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1085
|
-
ExtendedComponentsTranslationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ExtendedComponentsTranslationService });
|
|
1086
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ExtendedComponentsTranslationService, decorators: [{
|
|
1087
|
-
type: Injectable
|
|
1088
|
-
}], ctorParameters: function () { return [{ type: DictionaryService }]; } });
|
|
1089
|
-
|
|
1090
|
-
class LocalizePipe {
|
|
1091
|
-
constructor(_dictionaryService) {
|
|
1092
|
-
this._dictionaryService = _dictionaryService;
|
|
1093
|
-
}
|
|
1094
|
-
transform(value, upperCaseFirst = true, replace = []) {
|
|
1095
|
-
if (!value) {
|
|
1096
|
-
return "";
|
|
1097
|
-
}
|
|
1098
|
-
replace = (replace !== undefined && replace !== null) ? replace : [];
|
|
1099
|
-
if (!Array.isArray(replace)) {
|
|
1100
|
-
replace = [replace];
|
|
1101
|
-
}
|
|
1102
|
-
return this._dictionaryService.get(value, upperCaseFirst, ...replace);
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
1105
|
-
LocalizePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: LocalizePipe, deps: [{ token: DictionaryService }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1106
|
-
LocalizePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: LocalizePipe, name: "localize" });
|
|
1107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: LocalizePipe, decorators: [{
|
|
1108
|
-
type: Pipe,
|
|
1109
|
-
args: [{
|
|
1110
|
-
name: "localize"
|
|
1111
|
-
}]
|
|
1112
|
-
}], ctorParameters: function () { return [{ type: DictionaryService }]; } });
|
|
1113
|
-
|
|
1114
|
-
class ExtendedComponentsTranslationModule {
|
|
1115
|
-
static forRoot() {
|
|
1116
|
-
return {
|
|
1117
|
-
ngModule: ExtendedComponentsTranslationModule,
|
|
1118
|
-
providers: [
|
|
1119
|
-
ExtendedComponentsTranslationService
|
|
1120
|
-
]
|
|
1121
|
-
};
|
|
1122
|
-
}
|
|
1123
|
-
}
|
|
1124
|
-
ExtendedComponentsTranslationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ExtendedComponentsTranslationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1125
|
-
ExtendedComponentsTranslationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ExtendedComponentsTranslationModule, declarations: [LocalizePipe] });
|
|
1126
|
-
ExtendedComponentsTranslationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ExtendedComponentsTranslationModule, providers: [
|
|
1127
|
-
ExtendedComponentsTranslationService,
|
|
1128
|
-
DictionaryService
|
|
1129
|
-
] });
|
|
1130
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ExtendedComponentsTranslationModule, decorators: [{
|
|
1131
|
-
type: NgModule,
|
|
1132
|
-
args: [{
|
|
1133
|
-
declarations: [
|
|
1134
|
-
LocalizePipe
|
|
1135
|
-
],
|
|
1136
|
-
providers: [
|
|
1137
|
-
ExtendedComponentsTranslationService,
|
|
1138
|
-
DictionaryService
|
|
1139
|
-
],
|
|
1140
|
-
exports: [
|
|
1141
|
-
// LocalizePipe
|
|
1142
|
-
]
|
|
1143
|
-
}]
|
|
1144
|
-
}] });
|
|
1145
|
-
|
|
1146
1157
|
/*
|
|
1147
1158
|
* Public API Surface of extendedcomponents
|
|
1148
1159
|
*/
|
|
@@ -1151,5 +1162,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
1151
1162
|
* Generated bundle index. Do not edit.
|
|
1152
1163
|
*/
|
|
1153
1164
|
|
|
1154
|
-
export { ExtendedComponentsTranslationModule, ExtendedComponentsTranslationService, StackedLineChartComponent, StackedLineChartModule, SummaryGridComponent, SummaryGridModule };
|
|
1165
|
+
export { ExtendedComponentsTranslationModule, ExtendedComponentsTranslationService, LocalizePipe, StackedLineChartComponent, StackedLineChartModule, SummaryGridComponent, SummaryGridModule };
|
|
1155
1166
|
//# sourceMappingURL=colijnit-extendedcomponents.js.map
|