@colijnit/extendedcomponents 12.0.7 → 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 +265 -254
- package/bundles/colijnit-extendedcomponents.umd.js.map +1 -1
- package/esm2015/lib/components/summary-grid/components/recursive-list/recursive-list.component.js +20 -6
- 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 +8 -3
- 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 +133 -111
- package/fesm2015/colijnit-extendedcomponents.js.map +1 -1
- package/lib/components/summary-grid/components/recursive-list/recursive-list.component.d.ts +2 -1
- 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 +2 -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXh0ZW5kZWQtY29tcG9uZW50cy10cmFuc2xhdGlvbi5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9leHRlbmRlZGNvbXBvbmVudHMvc3JjL2xpYi90cmFuc2xhdGlvbi9leHRlbmRlZC1jb21wb25lbnRzLXRyYW5zbGF0aW9uLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQXNCLFFBQVEsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUM1RCxPQUFPLEVBQUMsb0NBQW9DLEVBQUMsTUFBTSwyQ0FBMkMsQ0FBQztBQUMvRixPQUFPLEVBQUMsaUJBQWlCLEVBQUMsTUFBTSxzQkFBc0IsQ0FBQztBQUN2RCxPQUFPLEVBQUMsWUFBWSxFQUFDLE1BQU0saUJBQWlCLENBQUM7O0FBZTdDLE1BQU0sT0FBTyxtQ0FBbUM7SUFDNUMsTUFBTSxDQUFDLE9BQU87UUFDVixPQUFPO1lBQ0gsUUFB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2aWNlXHJcbiAgICBdLFxyXG4gICAgZXhwb3J0czogW1xyXG4gICAgICAgIExvY2FsaXplUGlwZSxcclxuICAgICAgICAvLyBMb2NhbGl6ZVBpcGVcclxuICAgIF1cclxufSlcclxuZXhwb3J0IGNsYXNzIEV4dGVuZGVkQ29tcG9uZW50c1RyYW5zbGF0aW9uTW9kdWxlIHtcclxuICAgIHN0YXRpYyBmb3JSb290KCk6IE1vZHVsZVdpdGhQcm92aWRlcnM8RXh0ZW5kZWRDb21wb25lbnRzVHJhbnNsYXRpb25Nb2R1bGU+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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2V4dGVuZGVkY29tcG9uZW50cy9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsa0VBQWtFLENBQUM7QUFDakYsY0FBYyxx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ewBox=\"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>",
|
|
432
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>",
|
|
433
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>",
|
|
434
|
-
"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>",
|
|
435
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>",
|
|
436
|
-
"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>",
|
|
437
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>",
|
|
438
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>",
|
|
439
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>",
|
|
@@ -763,15 +763,70 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
763
763
|
}]
|
|
764
764
|
}], ctorParameters: function () { return [{ type: i1$1.DomSanitizer }]; } });
|
|
765
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
|
+
|
|
766
820
|
// recursive-list.component.ts
|
|
767
821
|
class RecursiveListComponent {
|
|
768
822
|
constructor(iconCacheService) {
|
|
769
823
|
this.iconCacheService = iconCacheService;
|
|
770
824
|
this.icons = Icon;
|
|
771
825
|
this.columns = [];
|
|
826
|
+
this.subColumns = [];
|
|
772
827
|
this.tableLegend = "";
|
|
773
828
|
this.depth = 0;
|
|
774
|
-
this.indentation =
|
|
829
|
+
this.indentation = 10;
|
|
775
830
|
this.dataPipe = null;
|
|
776
831
|
}
|
|
777
832
|
toggleCollapse(event, item) {
|
|
@@ -794,15 +849,20 @@ class RecursiveListComponent {
|
|
|
794
849
|
}
|
|
795
850
|
}
|
|
796
851
|
RecursiveListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: RecursiveListComponent, deps: [{ token: IconCacheService }], target: i0.ɵɵFactoryTarget.Component });
|
|
797
|
-
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", params: "params" }, 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: `
|
|
798
853
|
<div class="co-recursive-list">
|
|
799
854
|
<div class="table-header-row">
|
|
800
855
|
<div class="table-legend" *ngIf="tableLegend.length > 1">
|
|
801
|
-
<span [textContent]="tableLegend"></span>
|
|
856
|
+
<span [textContent]="tableLegend | localize"></span>
|
|
802
857
|
</div>
|
|
803
858
|
<div class="table-header" *ngIf="columns && columns.length > 0">
|
|
804
859
|
<div class="table-row">
|
|
805
860
|
<div class="table-cell" *ngFor="let column of columns">
|
|
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">
|
|
806
866
|
<span [textContent]="formatDataValue(column)"></span>
|
|
807
867
|
</div>
|
|
808
868
|
</div>
|
|
@@ -825,7 +885,7 @@ RecursiveListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
825
885
|
</ng-container>
|
|
826
886
|
</div>
|
|
827
887
|
</div>
|
|
828
|
-
`, 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", "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"] }], 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 });
|
|
829
889
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: RecursiveListComponent, decorators: [{
|
|
830
890
|
type: Component,
|
|
831
891
|
args: [{
|
|
@@ -834,11 +894,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
834
894
|
<div class="co-recursive-list">
|
|
835
895
|
<div class="table-header-row">
|
|
836
896
|
<div class="table-legend" *ngIf="tableLegend.length > 1">
|
|
837
|
-
<span [textContent]="tableLegend"></span>
|
|
897
|
+
<span [textContent]="tableLegend | localize"></span>
|
|
838
898
|
</div>
|
|
839
899
|
<div class="table-header" *ngIf="columns && columns.length > 0">
|
|
840
900
|
<div class="table-row">
|
|
841
901
|
<div class="table-cell" *ngFor="let column of columns">
|
|
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">
|
|
842
907
|
<span [textContent]="formatDataValue(column)"></span>
|
|
843
908
|
</div>
|
|
844
909
|
</div>
|
|
@@ -868,6 +933,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
868
933
|
type: Input
|
|
869
934
|
}], columns: [{
|
|
870
935
|
type: Input
|
|
936
|
+
}], subColumns: [{
|
|
937
|
+
type: Input
|
|
871
938
|
}], tableLegend: [{
|
|
872
939
|
type: Input
|
|
873
940
|
}], depth: [{
|
|
@@ -885,6 +952,7 @@ class SummaryGridComponent {
|
|
|
885
952
|
constructor() {
|
|
886
953
|
this.showClass = true;
|
|
887
954
|
this.columns = ['Column1', 'Column2']; // Add your column headers here
|
|
955
|
+
this.subColumns = ['SubColumn1', 'SubColumn2']; // Add your column headers here
|
|
888
956
|
this.tableLegend = "Legend";
|
|
889
957
|
this.dataPipe = null;
|
|
890
958
|
this.collection = [
|
|
@@ -943,15 +1011,16 @@ class SummaryGridComponent {
|
|
|
943
1011
|
}
|
|
944
1012
|
}
|
|
945
1013
|
SummaryGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SummaryGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
946
|
-
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", params: "params", 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: `
|
|
947
1015
|
<co-recursive-list
|
|
948
1016
|
[collection]="collection"
|
|
949
1017
|
[columns]="columns"
|
|
1018
|
+
[subColumns]="subColumns"
|
|
950
1019
|
[tableLegend]="tableLegend"
|
|
951
1020
|
[dataPipe]="dataPipe"
|
|
952
1021
|
[params]="params"
|
|
953
1022
|
></co-recursive-list>
|
|
954
|
-
`, isInline: true, components: [{ type: RecursiveListComponent, selector: "co-recursive-list", inputs: ["collection", "columns", "tableLegend", "depth", "indentation", "dataPipe", "params"] }], 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 });
|
|
955
1024
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SummaryGridComponent, decorators: [{
|
|
956
1025
|
type: Component,
|
|
957
1026
|
args: [{
|
|
@@ -960,6 +1029,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
960
1029
|
<co-recursive-list
|
|
961
1030
|
[collection]="collection"
|
|
962
1031
|
[columns]="columns"
|
|
1032
|
+
[subColumns]="subColumns"
|
|
963
1033
|
[tableLegend]="tableLegend"
|
|
964
1034
|
[dataPipe]="dataPipe"
|
|
965
1035
|
[params]="params"
|
|
@@ -972,6 +1042,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
972
1042
|
args: ['class.co-summary-grid']
|
|
973
1043
|
}], columns: [{
|
|
974
1044
|
type: Input
|
|
1045
|
+
}], subColumns: [{
|
|
1046
|
+
type: Input
|
|
975
1047
|
}], tableLegend: [{
|
|
976
1048
|
type: Input
|
|
977
1049
|
}], dataPipe: [{
|
|
@@ -982,14 +1054,63 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
982
1054
|
type: Input
|
|
983
1055
|
}] } });
|
|
984
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
|
+
|
|
985
1104
|
class RecursiveListModule {
|
|
986
1105
|
}
|
|
987
1106
|
RecursiveListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: RecursiveListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
988
1107
|
RecursiveListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: RecursiveListModule, declarations: [RecursiveListComponent], imports: [CommonModule,
|
|
989
|
-
IconModule
|
|
1108
|
+
IconModule,
|
|
1109
|
+
ExtendedComponentsTranslationModule], exports: [RecursiveListComponent] });
|
|
990
1110
|
RecursiveListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: RecursiveListModule, imports: [[
|
|
991
1111
|
CommonModule,
|
|
992
1112
|
IconModule,
|
|
1113
|
+
ExtendedComponentsTranslationModule,
|
|
993
1114
|
]] });
|
|
994
1115
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: RecursiveListModule, decorators: [{
|
|
995
1116
|
type: NgModule,
|
|
@@ -997,6 +1118,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
997
1118
|
imports: [
|
|
998
1119
|
CommonModule,
|
|
999
1120
|
IconModule,
|
|
1121
|
+
ExtendedComponentsTranslationModule,
|
|
1000
1122
|
],
|
|
1001
1123
|
declarations: [
|
|
1002
1124
|
RecursiveListComponent
|
|
@@ -1032,106 +1154,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
1032
1154
|
}]
|
|
1033
1155
|
}] });
|
|
1034
1156
|
|
|
1035
|
-
// The localization service, providing peers with text translation functionality.
|
|
1036
|
-
class DictionaryService {
|
|
1037
|
-
constructor() {
|
|
1038
|
-
// Some dictionary values have one or more '|~' texts in them, meant to be replaced with client-side given texts.
|
|
1039
|
-
this._placeholder = "|~";
|
|
1040
|
-
}
|
|
1041
|
-
/**
|
|
1042
|
-
* Returns the localized text for the given dictionary key.
|
|
1043
|
-
* @param {string} key
|
|
1044
|
-
* @param {boolean} [upperCaseFirst = true] False for first letter lowercase, true for first letter uppercase for returned dict val
|
|
1045
|
-
* @param {string[]} replacementTexts Rest params for replacement of '|~' in returned dict value
|
|
1046
|
-
* @returns {string} The translated text for given dictionary key
|
|
1047
|
-
*/
|
|
1048
|
-
get(key, upperCaseFirst = true, ...replacementTexts) {
|
|
1049
|
-
let text = key;
|
|
1050
|
-
if (this.translation && this.translation.hasOwnProperty(key)) {
|
|
1051
|
-
text = this.translation[key].toLowerCase();
|
|
1052
|
-
if (upperCaseFirst) {
|
|
1053
|
-
text = text.charAt(0).toUpperCase() + text.slice(1);
|
|
1054
|
-
}
|
|
1055
|
-
}
|
|
1056
|
-
return text;
|
|
1057
|
-
}
|
|
1058
|
-
}
|
|
1059
|
-
DictionaryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DictionaryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1060
|
-
DictionaryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DictionaryService });
|
|
1061
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DictionaryService, decorators: [{
|
|
1062
|
-
type: Injectable
|
|
1063
|
-
}] });
|
|
1064
|
-
|
|
1065
|
-
class ExtendedComponentsTranslationService {
|
|
1066
|
-
constructor(_dictionaryService) {
|
|
1067
|
-
this._dictionaryService = _dictionaryService;
|
|
1068
|
-
}
|
|
1069
|
-
setTranslation(translation) {
|
|
1070
|
-
this._dictionaryService.translation = translation;
|
|
1071
|
-
}
|
|
1072
|
-
}
|
|
1073
|
-
ExtendedComponentsTranslationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ExtendedComponentsTranslationService, deps: [{ token: DictionaryService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1074
|
-
ExtendedComponentsTranslationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ExtendedComponentsTranslationService });
|
|
1075
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ExtendedComponentsTranslationService, decorators: [{
|
|
1076
|
-
type: Injectable
|
|
1077
|
-
}], ctorParameters: function () { return [{ type: DictionaryService }]; } });
|
|
1078
|
-
|
|
1079
|
-
class LocalizePipe {
|
|
1080
|
-
constructor(_dictionaryService) {
|
|
1081
|
-
this._dictionaryService = _dictionaryService;
|
|
1082
|
-
}
|
|
1083
|
-
transform(value, upperCaseFirst = true, replace = []) {
|
|
1084
|
-
if (!value) {
|
|
1085
|
-
return "";
|
|
1086
|
-
}
|
|
1087
|
-
replace = (replace !== undefined && replace !== null) ? replace : [];
|
|
1088
|
-
if (!Array.isArray(replace)) {
|
|
1089
|
-
replace = [replace];
|
|
1090
|
-
}
|
|
1091
|
-
return this._dictionaryService.get(value, upperCaseFirst, ...replace);
|
|
1092
|
-
}
|
|
1093
|
-
}
|
|
1094
|
-
LocalizePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: LocalizePipe, deps: [{ token: DictionaryService }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1095
|
-
LocalizePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: LocalizePipe, name: "localize" });
|
|
1096
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: LocalizePipe, decorators: [{
|
|
1097
|
-
type: Pipe,
|
|
1098
|
-
args: [{
|
|
1099
|
-
name: "localize"
|
|
1100
|
-
}]
|
|
1101
|
-
}], ctorParameters: function () { return [{ type: DictionaryService }]; } });
|
|
1102
|
-
|
|
1103
|
-
class ExtendedComponentsTranslationModule {
|
|
1104
|
-
static forRoot() {
|
|
1105
|
-
return {
|
|
1106
|
-
ngModule: ExtendedComponentsTranslationModule,
|
|
1107
|
-
providers: [
|
|
1108
|
-
ExtendedComponentsTranslationService
|
|
1109
|
-
]
|
|
1110
|
-
};
|
|
1111
|
-
}
|
|
1112
|
-
}
|
|
1113
|
-
ExtendedComponentsTranslationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ExtendedComponentsTranslationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1114
|
-
ExtendedComponentsTranslationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ExtendedComponentsTranslationModule, declarations: [LocalizePipe] });
|
|
1115
|
-
ExtendedComponentsTranslationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ExtendedComponentsTranslationModule, providers: [
|
|
1116
|
-
ExtendedComponentsTranslationService,
|
|
1117
|
-
DictionaryService
|
|
1118
|
-
] });
|
|
1119
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ExtendedComponentsTranslationModule, decorators: [{
|
|
1120
|
-
type: NgModule,
|
|
1121
|
-
args: [{
|
|
1122
|
-
declarations: [
|
|
1123
|
-
LocalizePipe
|
|
1124
|
-
],
|
|
1125
|
-
providers: [
|
|
1126
|
-
ExtendedComponentsTranslationService,
|
|
1127
|
-
DictionaryService
|
|
1128
|
-
],
|
|
1129
|
-
exports: [
|
|
1130
|
-
// LocalizePipe
|
|
1131
|
-
]
|
|
1132
|
-
}]
|
|
1133
|
-
}] });
|
|
1134
|
-
|
|
1135
1157
|
/*
|
|
1136
1158
|
* Public API Surface of extendedcomponents
|
|
1137
1159
|
*/
|
|
@@ -1140,5 +1162,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
1140
1162
|
* Generated bundle index. Do not edit.
|
|
1141
1163
|
*/
|
|
1142
1164
|
|
|
1143
|
-
export { ExtendedComponentsTranslationModule, ExtendedComponentsTranslationService, StackedLineChartComponent, StackedLineChartModule, SummaryGridComponent, SummaryGridModule };
|
|
1165
|
+
export { ExtendedComponentsTranslationModule, ExtendedComponentsTranslationService, LocalizePipe, StackedLineChartComponent, StackedLineChartModule, SummaryGridComponent, SummaryGridModule };
|
|
1144
1166
|
//# sourceMappingURL=colijnit-extendedcomponents.js.map
|