@valtimo/dashboard 10.5.1 → 10.7.0
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/components/dashboard/dashboard.component.mjs +85 -0
- package/esm2020/lib/components/widget-dashboard/widget-dashboard.component.mjs +56 -0
- package/esm2020/lib/components/widget-dashboard-content/widget-dashboard-content.component.mjs +122 -0
- package/esm2020/lib/constants/data-features.constants.mjs +21 -0
- package/esm2020/lib/constants/index.mjs +19 -0
- package/esm2020/lib/constants/injection-tokens.mjs +20 -0
- package/esm2020/lib/constants/layout.constants.mjs +19 -0
- package/esm2020/lib/dashboard-routing.module.mjs +10 -10
- package/esm2020/lib/dashboard.module.mjs +37 -13
- package/esm2020/lib/data-sources/case-count/case-count.module.mjs +61 -0
- package/esm2020/lib/data-sources/case-count/case-count.specification.mjs +74 -0
- package/esm2020/lib/data-sources/case-count/components/case-count-configuration/case-count-configuration.component.mjs +149 -0
- package/esm2020/lib/data-sources/case-count/components/case-count-configuration/index.mjs +17 -0
- package/esm2020/lib/data-sources/case-count/components/index.mjs +17 -0
- package/esm2020/lib/data-sources/case-count/index.mjs +20 -0
- package/esm2020/lib/data-sources/case-count/models/case-count.model.mjs +26 -0
- package/esm2020/lib/data-sources/case-count/models/index.mjs +17 -0
- package/esm2020/lib/data-sources/index.mjs +18 -0
- package/esm2020/lib/data-sources/test/components/index.mjs +17 -0
- package/esm2020/lib/data-sources/test/components/test-configuration/index.mjs +17 -0
- package/esm2020/lib/data-sources/test/components/test-configuration/test-configuration.component.mjs +80 -0
- package/esm2020/lib/data-sources/test/index.mjs +20 -0
- package/esm2020/lib/data-sources/test/models/index.mjs +17 -0
- package/esm2020/lib/data-sources/test/models/test.model.mjs +17 -0
- package/esm2020/lib/data-sources/test/test.module.mjs +39 -0
- package/esm2020/lib/data-sources/test/test.specification.mjs +44 -0
- package/esm2020/lib/display-types/bar-chart/bar-chart.module.mjs +36 -0
- package/esm2020/lib/display-types/bar-chart/bar-chart.specification.mjs +35 -0
- package/esm2020/lib/display-types/bar-chart/components/bar-chart-display/bar-chart-display.component.mjs +32 -0
- package/esm2020/lib/display-types/bar-chart/components/bar-chart-display/index.mjs +17 -0
- package/esm2020/lib/display-types/bar-chart/components/index.mjs +17 -0
- package/esm2020/lib/display-types/bar-chart/index.mjs +20 -0
- package/esm2020/lib/display-types/bar-chart/models/bar-chart.model.mjs +17 -0
- package/esm2020/lib/display-types/bar-chart/models/index.mjs +17 -0
- package/esm2020/lib/display-types/big-number/big-number.module.mjs +53 -0
- package/esm2020/lib/display-types/big-number/big-number.specification.mjs +67 -0
- package/esm2020/lib/display-types/big-number/components/big-number-configuration/big-number-configuration.component.mjs +124 -0
- package/esm2020/lib/display-types/big-number/components/big-number-configuration/index.mjs +17 -0
- package/esm2020/lib/display-types/big-number/components/big-number-display/big-number-display.component.mjs +56 -0
- package/esm2020/lib/display-types/big-number/components/big-number-display/index.mjs +17 -0
- package/esm2020/lib/display-types/big-number/components/index.mjs +18 -0
- package/esm2020/lib/display-types/big-number/index.mjs +20 -0
- package/esm2020/lib/display-types/big-number/models/big-number.model.mjs +17 -0
- package/esm2020/lib/display-types/big-number/models/index.mjs +17 -0
- package/esm2020/lib/display-types/index.mjs +19 -0
- package/esm2020/lib/display-types/meter/components/index.mjs +17 -0
- package/esm2020/lib/display-types/meter/components/meter-display/index.mjs +17 -0
- package/esm2020/lib/display-types/meter/components/meter-display/meter-display.component.mjs +32 -0
- package/esm2020/lib/display-types/meter/index.mjs +20 -0
- package/esm2020/lib/display-types/meter/meter.module.mjs +36 -0
- package/esm2020/lib/display-types/meter/meter.specification.mjs +35 -0
- package/esm2020/lib/display-types/meter/models/index.mjs +17 -0
- package/esm2020/lib/display-types/meter/models/meter.model.mjs +17 -0
- package/esm2020/lib/models/configuration.model.mjs +17 -0
- package/esm2020/lib/models/dashboard.model.mjs +17 -0
- package/esm2020/lib/models/data-source.model.mjs +17 -0
- package/esm2020/lib/models/display-type.model.mjs +17 -0
- package/esm2020/lib/models/index.mjs +23 -0
- package/esm2020/lib/models/layout.model.mjs +17 -0
- package/esm2020/lib/models/widget-data.model.mjs +17 -0
- package/esm2020/lib/models/widget-display.model.mjs +25 -0
- package/esm2020/lib/pipes/index.mjs +17 -0
- package/esm2020/lib/pipes/widget-translate/index.mjs +18 -0
- package/esm2020/lib/pipes/widget-translate/widget-translate-pipe.module.mjs +33 -0
- package/esm2020/lib/pipes/widget-translate/widget-translate.pipe.mjs +35 -0
- package/esm2020/lib/services/dashboard.service.mjs +38 -0
- package/esm2020/lib/services/index.mjs +19 -0
- package/esm2020/lib/services/widget-api.service.mjs +38 -0
- package/esm2020/lib/services/widget-layout.service.mjs +121 -0
- package/esm2020/lib/services/widget-translation.service.mjs +61 -0
- package/esm2020/lib/services/widget.service.mjs +62 -0
- package/esm2020/public_api.mjs +10 -2
- package/fesm2015/valtimo-dashboard.mjs +2047 -90
- package/fesm2015/valtimo-dashboard.mjs.map +1 -1
- package/fesm2020/valtimo-dashboard.mjs +2213 -90
- package/fesm2020/valtimo-dashboard.mjs.map +1 -1
- package/lib/{dashboard.component.d.ts → components/dashboard/dashboard.component.d.ts} +3 -8
- package/lib/components/dashboard/dashboard.component.d.ts.map +1 -0
- package/lib/components/widget-dashboard/widget-dashboard.component.d.ts +20 -0
- package/lib/components/widget-dashboard/widget-dashboard.component.d.ts.map +1 -0
- package/lib/components/widget-dashboard-content/widget-dashboard-content.component.d.ts +34 -0
- package/lib/components/widget-dashboard-content/widget-dashboard-content.component.d.ts.map +1 -0
- package/lib/constants/data-features.constants.d.ts +6 -0
- package/lib/constants/data-features.constants.d.ts.map +1 -0
- package/lib/constants/index.d.ts +4 -0
- package/lib/constants/index.d.ts.map +1 -0
- package/lib/constants/injection-tokens.d.ts +6 -0
- package/lib/constants/injection-tokens.d.ts.map +1 -0
- package/lib/constants/layout.constants.d.ts +4 -0
- package/lib/constants/layout.constants.d.ts.map +1 -0
- package/lib/dashboard-routing.module.d.ts.map +1 -1
- package/lib/dashboard.module.d.ts +12 -8
- package/lib/dashboard.module.d.ts.map +1 -1
- package/lib/data-sources/case-count/case-count.module.d.ts +13 -0
- package/lib/data-sources/case-count/case-count.module.d.ts.map +1 -0
- package/lib/data-sources/case-count/case-count.specification.d.ts +3 -0
- package/lib/data-sources/case-count/case-count.specification.d.ts.map +1 -0
- package/lib/data-sources/case-count/components/case-count-configuration/case-count-configuration.component.d.ts +44 -0
- package/lib/data-sources/case-count/components/case-count-configuration/case-count-configuration.component.d.ts.map +1 -0
- package/lib/data-sources/case-count/components/case-count-configuration/index.d.ts +2 -0
- package/lib/data-sources/case-count/components/case-count-configuration/index.d.ts.map +1 -0
- package/lib/data-sources/case-count/components/index.d.ts +2 -0
- package/lib/data-sources/case-count/components/index.d.ts.map +1 -0
- package/lib/data-sources/case-count/index.d.ts +5 -0
- package/lib/data-sources/case-count/index.d.ts.map +1 -0
- package/lib/data-sources/case-count/models/case-count.model.d.ts +19 -0
- package/lib/data-sources/case-count/models/case-count.model.d.ts.map +1 -0
- package/lib/data-sources/case-count/models/index.d.ts +2 -0
- package/lib/data-sources/case-count/models/index.d.ts.map +1 -0
- package/lib/data-sources/index.d.ts +3 -0
- package/lib/data-sources/index.d.ts.map +1 -0
- package/lib/data-sources/test/components/index.d.ts +2 -0
- package/lib/data-sources/test/components/index.d.ts.map +1 -0
- package/lib/data-sources/test/components/test-configuration/index.d.ts +2 -0
- package/lib/data-sources/test/components/test-configuration/index.d.ts.map +1 -0
- package/lib/data-sources/test/components/test-configuration/test-configuration.component.d.ts +26 -0
- package/lib/data-sources/test/components/test-configuration/test-configuration.component.d.ts.map +1 -0
- package/lib/data-sources/test/index.d.ts +5 -0
- package/lib/data-sources/test/index.d.ts.map +1 -0
- package/lib/data-sources/test/models/index.d.ts +2 -0
- package/lib/data-sources/test/models/index.d.ts.map +1 -0
- package/lib/data-sources/test/models/test.model.d.ts +6 -0
- package/lib/data-sources/test/models/test.model.d.ts.map +1 -0
- package/lib/data-sources/test/test.module.d.ts +12 -0
- package/lib/data-sources/test/test.module.d.ts.map +1 -0
- package/lib/data-sources/test/test.specification.d.ts +3 -0
- package/lib/data-sources/test/test.specification.d.ts.map +1 -0
- package/lib/display-types/bar-chart/bar-chart.module.d.ts +9 -0
- package/lib/display-types/bar-chart/bar-chart.module.d.ts.map +1 -0
- package/lib/display-types/bar-chart/bar-chart.specification.d.ts +3 -0
- package/lib/display-types/bar-chart/bar-chart.specification.d.ts.map +1 -0
- package/lib/display-types/bar-chart/components/bar-chart-display/bar-chart-display.component.d.ts +11 -0
- package/lib/display-types/bar-chart/components/bar-chart-display/bar-chart-display.component.d.ts.map +1 -0
- package/lib/display-types/bar-chart/components/bar-chart-display/index.d.ts +2 -0
- package/lib/display-types/bar-chart/components/bar-chart-display/index.d.ts.map +1 -0
- package/lib/display-types/bar-chart/components/index.d.ts +2 -0
- package/lib/display-types/bar-chart/components/index.d.ts.map +1 -0
- package/lib/display-types/bar-chart/index.d.ts +5 -0
- package/lib/display-types/bar-chart/index.d.ts.map +1 -0
- package/lib/display-types/bar-chart/models/bar-chart.model.d.ts +8 -0
- package/lib/display-types/bar-chart/models/bar-chart.model.d.ts.map +1 -0
- package/lib/display-types/bar-chart/models/index.d.ts +2 -0
- package/lib/display-types/bar-chart/models/index.d.ts.map +1 -0
- package/lib/display-types/big-number/big-number.module.d.ts +13 -0
- package/lib/display-types/big-number/big-number.module.d.ts.map +1 -0
- package/lib/display-types/big-number/big-number.specification.d.ts +3 -0
- package/lib/display-types/big-number/big-number.specification.d.ts.map +1 -0
- package/lib/display-types/big-number/components/big-number-configuration/big-number-configuration.component.d.ts +37 -0
- package/lib/display-types/big-number/components/big-number-configuration/big-number-configuration.component.d.ts.map +1 -0
- package/lib/display-types/big-number/components/big-number-configuration/index.d.ts +2 -0
- package/lib/display-types/big-number/components/big-number-configuration/index.d.ts.map +1 -0
- package/lib/display-types/big-number/components/big-number-display/big-number-display.component.d.ts +13 -0
- package/lib/display-types/big-number/components/big-number-display/big-number-display.component.d.ts.map +1 -0
- package/lib/display-types/big-number/components/big-number-display/index.d.ts +2 -0
- package/lib/display-types/big-number/components/big-number-display/index.d.ts.map +1 -0
- package/lib/display-types/big-number/components/index.d.ts +3 -0
- package/lib/display-types/big-number/components/index.d.ts.map +1 -0
- package/lib/display-types/big-number/index.d.ts +5 -0
- package/lib/display-types/big-number/index.d.ts.map +1 -0
- package/lib/display-types/big-number/models/big-number.model.d.ts +14 -0
- package/lib/display-types/big-number/models/big-number.model.d.ts.map +1 -0
- package/lib/display-types/big-number/models/index.d.ts +2 -0
- package/lib/display-types/big-number/models/index.d.ts.map +1 -0
- package/lib/display-types/index.d.ts +4 -0
- package/lib/display-types/index.d.ts.map +1 -0
- package/lib/display-types/meter/components/index.d.ts +2 -0
- package/lib/display-types/meter/components/index.d.ts.map +1 -0
- package/lib/display-types/meter/components/meter-display/index.d.ts +2 -0
- package/lib/display-types/meter/components/meter-display/index.d.ts.map +1 -0
- package/lib/display-types/meter/components/meter-display/meter-display.component.d.ts +11 -0
- package/lib/display-types/meter/components/meter-display/meter-display.component.d.ts.map +1 -0
- package/lib/display-types/meter/index.d.ts +5 -0
- package/lib/display-types/meter/index.d.ts.map +1 -0
- package/lib/display-types/meter/meter.module.d.ts +9 -0
- package/lib/display-types/meter/meter.module.d.ts.map +1 -0
- package/lib/display-types/meter/meter.specification.d.ts +3 -0
- package/lib/display-types/meter/meter.specification.d.ts.map +1 -0
- package/lib/display-types/meter/models/index.d.ts +2 -0
- package/lib/display-types/meter/models/index.d.ts.map +1 -0
- package/lib/display-types/meter/models/meter.model.d.ts +8 -0
- package/lib/display-types/meter/models/meter.model.d.ts.map +1 -0
- package/lib/models/configuration.model.d.ts +18 -0
- package/lib/models/configuration.model.d.ts.map +1 -0
- package/lib/models/dashboard.model.d.ts +15 -0
- package/lib/models/dashboard.model.d.ts.map +1 -0
- package/lib/models/data-source.model.d.ts +14 -0
- package/lib/models/data-source.model.d.ts.map +1 -0
- package/lib/models/display-type.model.d.ts +23 -0
- package/lib/models/display-type.model.d.ts.map +1 -0
- package/lib/models/index.d.ts +8 -0
- package/lib/models/index.d.ts.map +1 -0
- package/lib/models/layout.model.d.ts +18 -0
- package/lib/models/layout.model.d.ts.map +1 -0
- package/lib/models/widget-data.model.d.ts +6 -0
- package/lib/models/widget-data.model.d.ts.map +1 -0
- package/lib/models/widget-display.model.d.ts +9 -0
- package/lib/models/widget-display.model.d.ts.map +1 -0
- package/lib/pipes/index.d.ts +2 -0
- package/lib/pipes/index.d.ts.map +1 -0
- package/lib/pipes/widget-translate/index.d.ts +3 -0
- package/lib/pipes/widget-translate/index.d.ts.map +1 -0
- package/lib/pipes/widget-translate/widget-translate-pipe.module.d.ts +9 -0
- package/lib/pipes/widget-translate/widget-translate-pipe.module.d.ts.map +1 -0
- package/lib/pipes/widget-translate/widget-translate.pipe.d.ts +12 -0
- package/lib/pipes/widget-translate/widget-translate.pipe.d.ts.map +1 -0
- package/lib/services/dashboard.service.d.ts +15 -0
- package/lib/services/dashboard.service.d.ts.map +1 -0
- package/lib/services/index.d.ts +4 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/widget-api.service.d.ts +15 -0
- package/lib/services/widget-api.service.d.ts.map +1 -0
- package/lib/services/widget-layout.service.d.ts +29 -0
- package/lib/services/widget-layout.service.d.ts.map +1 -0
- package/lib/services/widget-translation.service.d.ts +15 -0
- package/lib/services/widget-translation.service.d.ts.map +1 -0
- package/lib/services/widget.service.d.ts +19 -0
- package/lib/services/widget.service.d.ts.map +1 -0
- package/package.json +7 -6
- package/public_api.d.ts +9 -1
- package/public_api.d.ts.map +1 -1
- package/esm2020/lib/dashboard.component.mjs +0 -89
- package/lib/dashboard.component.d.ts.map +0 -1
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ViewChild, NgModule } from '@angular/core';
|
|
2
|
+
import { Component, ViewChild, InjectionToken, Injectable, Inject, ViewContainerRef, ViewChildren, Input, ViewEncapsulation, NgModule, Pipe, EventEmitter, ChangeDetectionStrategy, Output } from '@angular/core';
|
|
3
3
|
import moment from 'moment';
|
|
4
|
-
import { take } from 'rxjs
|
|
5
|
-
import {
|
|
6
|
-
import * as i1 from '@
|
|
7
|
-
import { RouterModule } from '@angular/router';
|
|
8
|
-
import * as i2 from '@valtimo/context';
|
|
9
|
-
import * as i3 from '@valtimo/task';
|
|
4
|
+
import { BehaviorSubject, filter, combineLatest, map, Subscription, tap, take as take$1, startWith } from 'rxjs';
|
|
5
|
+
import { take, map as map$1 } from 'rxjs/operators';
|
|
6
|
+
import * as i1 from '@valtimo/task';
|
|
10
7
|
import { TaskModule } from '@valtimo/task';
|
|
11
|
-
import * as
|
|
12
|
-
import {
|
|
13
|
-
import * as
|
|
8
|
+
import * as i2 from '@angular/router';
|
|
9
|
+
import { RouterModule } from '@angular/router';
|
|
10
|
+
import * as i3 from '@angular/common';
|
|
14
11
|
import { CommonModule } from '@angular/common';
|
|
15
|
-
import * as
|
|
16
|
-
import { WidgetModule, ListModule, BpmnJsDiagramModule, AlertModule, SpinnerModule } from '@valtimo/components';
|
|
12
|
+
import * as i4 from '@valtimo/components';
|
|
13
|
+
import { WidgetModule, ListModule, BpmnJsDiagramModule, AlertModule, SpinnerModule, CarbonMultiInputModule } from '@valtimo/components';
|
|
14
|
+
import * as i1$1 from '@ngx-translate/core';
|
|
15
|
+
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
|
|
16
|
+
import pack from 'bin-pack-with-constraints';
|
|
17
|
+
import * as i1$2 from '@angular/common/http';
|
|
18
|
+
import { HttpClient } from '@angular/common/http';
|
|
19
|
+
import * as i2$1 from '@valtimo/config';
|
|
20
|
+
import { ROLE_USER } from '@valtimo/config';
|
|
21
|
+
import * as i4$1 from 'carbon-components-angular';
|
|
22
|
+
import { TabsModule, ThemeModule, LoadingModule, InputModule, DropdownModule, CheckboxModule } from 'carbon-components-angular';
|
|
17
23
|
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
|
18
24
|
import { AuthGuardService } from '@valtimo/security';
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
25
|
+
import * as i1$3 from '@angular/forms';
|
|
26
|
+
import { Validators, ReactiveFormsModule } from '@angular/forms';
|
|
27
|
+
import * as i2$2 from '@valtimo/document';
|
|
21
28
|
|
|
22
29
|
/*
|
|
23
30
|
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
@@ -37,12 +44,9 @@ import { HttpClient } from '@angular/common/http';
|
|
|
37
44
|
moment.locale(localStorage.getItem('langKey') || '');
|
|
38
45
|
moment.defaultFormat = 'DD MMM YYYY HH:mm';
|
|
39
46
|
class DashboardComponent {
|
|
40
|
-
constructor(
|
|
41
|
-
this.router = router;
|
|
42
|
-
this.contextService = contextService;
|
|
47
|
+
constructor(taskService, route) {
|
|
43
48
|
this.taskService = taskService;
|
|
44
49
|
this.route = route;
|
|
45
|
-
this.translate = translate;
|
|
46
50
|
this.openTaskFields = [
|
|
47
51
|
{
|
|
48
52
|
key: 'created',
|
|
@@ -87,12 +91,12 @@ class DashboardComponent {
|
|
|
87
91
|
});
|
|
88
92
|
}
|
|
89
93
|
}
|
|
90
|
-
DashboardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
91
|
-
DashboardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
92
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
94
|
+
DashboardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DashboardComponent, deps: [{ token: i1.TaskService }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
95
|
+
DashboardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DashboardComponent, selector: "valtimo-dashboard", viewQueries: [{ propertyName: "taskDetail", first: true, predicate: ["taskDetail"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content container-fluid\" *ngIf=\"{loading: loading$ | async} as obs\">\n <h4 class=\"title\">\n {{ 'dashboard.openTasks.title' | translate }}\n <sup *ngIf=\"obs.loading === false\" class=\"ml-1 badge badge-pill badge-primary\">{{\n openTasks?.length\n }}</sup>\n </h4>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <valtimo-widget>\n <valtimo-list\n [items]=\"openTasks\"\n [fields]=\"openTaskFields\"\n (rowClicked)=\"rowOpenTaskClick($event)\"\n ></valtimo-list>\n </valtimo-widget>\n </ng-container>\n <valtimo-task-detail-modal\n #taskDetail\n (formSubmit)=\"getOpenTasks()\"\n (assignmentOfTaskChanged)=\"getOpenTasks()\"\n ></valtimo-task-detail-modal>\n</div>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "component", type: i4.ListComponent, selector: "valtimo-list", inputs: ["items", "fields", "pagination", "viewMode", "isSearchable", "header", "actions", "paginationIdentifier", "initialSortState", "lastColumnTemplate"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged"] }, { kind: "component", type: i1.TaskDetailModalComponent, selector: "valtimo-task-detail-modal", outputs: ["formSubmit", "assignmentOfTaskChanged"] }, { kind: "component", type: i4.SpinnerComponent, selector: "valtimo-spinner", inputs: ["useBootstrapSpinner", "name", "type", "size", "color", "bdColor", "fullScreen", "noMarginTop"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DashboardComponent, decorators: [{
|
|
93
97
|
type: Component,
|
|
94
98
|
args: [{ selector: 'valtimo-dashboard', template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content container-fluid\" *ngIf=\"{loading: loading$ | async} as obs\">\n <h4 class=\"title\">\n {{ 'dashboard.openTasks.title' | translate }}\n <sup *ngIf=\"obs.loading === false\" class=\"ml-1 badge badge-pill badge-primary\">{{\n openTasks?.length\n }}</sup>\n </h4>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <valtimo-widget>\n <valtimo-list\n [items]=\"openTasks\"\n [fields]=\"openTaskFields\"\n (rowClicked)=\"rowOpenTaskClick($event)\"\n ></valtimo-list>\n </valtimo-widget>\n </ng-container>\n <valtimo-task-detail-modal\n #taskDetail\n (formSubmit)=\"getOpenTasks()\"\n (assignmentOfTaskChanged)=\"getOpenTasks()\"\n ></valtimo-task-detail-modal>\n</div>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n" }]
|
|
95
|
-
}], ctorParameters: function () { return [{ type: i1.
|
|
99
|
+
}], ctorParameters: function () { return [{ type: i1.TaskService }, { type: i2.ActivatedRoute }]; }, propDecorators: { taskDetail: [{
|
|
96
100
|
type: ViewChild,
|
|
97
101
|
args: ['taskDetail']
|
|
98
102
|
}] } });
|
|
@@ -112,27 +116,120 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
112
116
|
* See the License for the specific language governing permissions and
|
|
113
117
|
* limitations under the License.
|
|
114
118
|
*/
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
119
|
+
const DATA_FEATURES = {
|
|
120
|
+
NUMBER: 'number',
|
|
121
|
+
TOTAL: 'total',
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
/*
|
|
125
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
126
|
+
*
|
|
127
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
128
|
+
* you may not use this file except in compliance with the License.
|
|
129
|
+
* You may obtain a copy of the License at
|
|
130
|
+
*
|
|
131
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
132
|
+
*
|
|
133
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
134
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
135
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
136
|
+
* See the License for the specific language governing permissions and
|
|
137
|
+
* limitations under the License.
|
|
138
|
+
*/
|
|
139
|
+
const DISPLAY_TYPE_TOKEN = new InjectionToken('Supported display types');
|
|
140
|
+
const DATA_SOURCE_TOKEN = new InjectionToken('Supported data sources');
|
|
141
|
+
|
|
142
|
+
/*
|
|
143
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
144
|
+
*
|
|
145
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
146
|
+
* you may not use this file except in compliance with the License.
|
|
147
|
+
* You may obtain a copy of the License at
|
|
148
|
+
*
|
|
149
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
150
|
+
*
|
|
151
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
152
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
153
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
154
|
+
* See the License for the specific language governing permissions and
|
|
155
|
+
* limitations under the License.
|
|
156
|
+
*/
|
|
157
|
+
const WIDGET_1X_HEIGHT = 220;
|
|
158
|
+
const WIDGET_1X_MIN_WIDTH = 275;
|
|
159
|
+
|
|
160
|
+
/*
|
|
161
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
162
|
+
*
|
|
163
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
164
|
+
* you may not use this file except in compliance with the License.
|
|
165
|
+
* You may obtain a copy of the License at
|
|
166
|
+
*
|
|
167
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
168
|
+
*
|
|
169
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
170
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
171
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
172
|
+
* See the License for the specific language governing permissions and
|
|
173
|
+
* limitations under the License.
|
|
174
|
+
*/
|
|
175
|
+
|
|
176
|
+
/*
|
|
177
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
178
|
+
*
|
|
179
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
180
|
+
* you may not use this file except in compliance with the License.
|
|
181
|
+
* You may obtain a copy of the License at
|
|
182
|
+
*
|
|
183
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
184
|
+
*
|
|
185
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
186
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
187
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
188
|
+
* See the License for the specific language governing permissions and
|
|
189
|
+
* limitations under the License.
|
|
190
|
+
*/
|
|
191
|
+
class WidgetService {
|
|
192
|
+
constructor(supportedDisplayTypesFromToken, supportedDataSourcesFromToken) {
|
|
193
|
+
this.supportedDisplayTypesFromToken = supportedDisplayTypesFromToken;
|
|
194
|
+
this.supportedDataSourcesFromToken = supportedDataSourcesFromToken;
|
|
195
|
+
this._supportedDisplayTypes$ = new BehaviorSubject(null);
|
|
196
|
+
this._supportedDataSources$ = new BehaviorSubject(null);
|
|
197
|
+
this.setSupportedDisplayTypes(supportedDisplayTypesFromToken);
|
|
198
|
+
this.setSupportedDataSources(supportedDataSourcesFromToken);
|
|
199
|
+
}
|
|
200
|
+
get supportedDisplayTypes$() {
|
|
201
|
+
return this._supportedDisplayTypes$.pipe(filter(specifications => !!specifications));
|
|
202
|
+
}
|
|
203
|
+
get supportedDataSources$() {
|
|
204
|
+
return this._supportedDataSources$.pipe(filter(specifications => !!specifications));
|
|
205
|
+
}
|
|
206
|
+
get supportedDisplayTypes() {
|
|
207
|
+
return this._supportedDisplayTypes$.getValue() || [];
|
|
208
|
+
}
|
|
209
|
+
get supportedDataSources() {
|
|
210
|
+
return this._supportedDataSources$.getValue() || [];
|
|
211
|
+
}
|
|
212
|
+
setSupportedDisplayTypes(supportedDisplayTypes) {
|
|
213
|
+
this._supportedDisplayTypes$.next(supportedDisplayTypes.filter(displayType => !!displayType));
|
|
214
|
+
}
|
|
215
|
+
setSupportedDataSources(supportedDataSources) {
|
|
216
|
+
this._supportedDataSources$.next(supportedDataSources.filter(dataSource => !!dataSource));
|
|
217
|
+
}
|
|
124
218
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
type: NgModule,
|
|
219
|
+
WidgetService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WidgetService, deps: [{ token: DISPLAY_TYPE_TOKEN }, { token: DATA_SOURCE_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
220
|
+
WidgetService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WidgetService, providedIn: 'root' });
|
|
221
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WidgetService, decorators: [{
|
|
222
|
+
type: Injectable,
|
|
130
223
|
args: [{
|
|
131
|
-
|
|
132
|
-
imports: [CommonModule, RouterModule.forChild(routes)],
|
|
133
|
-
exports: [RouterModule],
|
|
224
|
+
providedIn: 'root',
|
|
134
225
|
}]
|
|
135
|
-
}]
|
|
226
|
+
}], ctorParameters: function () { return [{ type: Array, decorators: [{
|
|
227
|
+
type: Inject,
|
|
228
|
+
args: [DISPLAY_TYPE_TOKEN]
|
|
229
|
+
}] }, { type: Array, decorators: [{
|
|
230
|
+
type: Inject,
|
|
231
|
+
args: [DATA_SOURCE_TOKEN]
|
|
232
|
+
}] }]; } });
|
|
136
233
|
|
|
137
234
|
/*
|
|
138
235
|
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
@@ -149,59 +246,2085 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
149
246
|
* See the License for the specific language governing permissions and
|
|
150
247
|
* limitations under the License.
|
|
151
248
|
*/
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
249
|
+
class WidgetLayoutService {
|
|
250
|
+
constructor(widgetService) {
|
|
251
|
+
this.widgetService = widgetService;
|
|
252
|
+
this._widgetContainerWidth$ = new BehaviorSubject(null);
|
|
253
|
+
this._widgetConfigurations$ = new BehaviorSubject([]);
|
|
254
|
+
this._widgetPackResult$ = new BehaviorSubject(null);
|
|
255
|
+
this.openLayoutSubscription();
|
|
256
|
+
}
|
|
257
|
+
get widgetPackResult$() {
|
|
258
|
+
return this._widgetPackResult$.asObservable().pipe(filter(result => !!result));
|
|
259
|
+
}
|
|
260
|
+
get widgetContainerWidth$() {
|
|
261
|
+
return this._widgetContainerWidth$.asObservable().pipe(filter(width => !!width));
|
|
262
|
+
}
|
|
263
|
+
get widgetConfigurationBins$() {
|
|
264
|
+
return combineLatest([
|
|
265
|
+
this.widgetService.supportedDisplayTypes$,
|
|
266
|
+
this._widgetConfigurations$,
|
|
267
|
+
]).pipe(map(([displayTypes, configurations]) => configurations.map(configuration => {
|
|
268
|
+
const specification = displayTypes.find(type => type.displayTypeKey === configuration.displayType);
|
|
269
|
+
return {
|
|
270
|
+
configurationKey: configuration.key,
|
|
271
|
+
width: specification.width,
|
|
272
|
+
height: specification.height,
|
|
273
|
+
};
|
|
274
|
+
})));
|
|
275
|
+
}
|
|
276
|
+
ngOnDestroy() {
|
|
277
|
+
this._layoutSubscription?.unsubscribe();
|
|
278
|
+
}
|
|
279
|
+
setWidgetContainerWidth(width) {
|
|
280
|
+
this._widgetContainerWidth$.next(width);
|
|
281
|
+
}
|
|
282
|
+
setWidgetConfigurations(configurations) {
|
|
283
|
+
this._widgetConfigurations$.next(configurations);
|
|
284
|
+
}
|
|
285
|
+
openLayoutSubscription() {
|
|
286
|
+
this._layoutSubscription = combineLatest([
|
|
287
|
+
this.widgetContainerWidth$,
|
|
288
|
+
this.widgetConfigurationBins$,
|
|
289
|
+
]).subscribe(([widgetContainerWidth, configurationBins]) => {
|
|
290
|
+
const amountOfMinWidthColumns = this.getAmountOfMinWidthColumns(widgetContainerWidth);
|
|
291
|
+
const widget1xWidth = this.getWidget1xWidth(widgetContainerWidth, amountOfMinWidthColumns);
|
|
292
|
+
const binsToFit = configurationBins.map(configurationBin => ({
|
|
293
|
+
...configurationBin,
|
|
294
|
+
width: configurationBin.width * widget1xWidth,
|
|
295
|
+
height: configurationBin.height * WIDGET_1X_HEIGHT,
|
|
296
|
+
}));
|
|
297
|
+
const heightConstraint = this.getHeightConstraint(configurationBins, amountOfMinWidthColumns);
|
|
298
|
+
const resultWithoutHeightConstraint = this.getPackResult(binsToFit, widgetContainerWidth);
|
|
299
|
+
const resultWithHeightConstraint = this.getPackResult(binsToFit, widgetContainerWidth, heightConstraint);
|
|
300
|
+
const resultWithHeightConstraintExceedsBoundary = this.checkIfPackResultExceedsBoundary(resultWithHeightConstraint, widgetContainerWidth);
|
|
301
|
+
const resultToUse = resultWithHeightConstraintExceedsBoundary
|
|
302
|
+
? resultWithoutHeightConstraint
|
|
303
|
+
: resultWithHeightConstraint;
|
|
304
|
+
const resultWithMaxWidth = this.getResultWithMaxWidth(resultToUse, widgetContainerWidth);
|
|
305
|
+
this._widgetPackResult$.next(resultWithMaxWidth);
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
getPackResult(binsToFit, maxWidth, maxHeight) {
|
|
309
|
+
return pack(binsToFit, {
|
|
310
|
+
maxWidth,
|
|
311
|
+
...(maxHeight && { maxHeight }),
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
checkIfPackResultExceedsBoundary(result, maxWidth) {
|
|
315
|
+
return !!result.items.find(item => item.width + item.x > maxWidth);
|
|
316
|
+
}
|
|
317
|
+
getAmountOfMinWidthColumns(containerWidth) {
|
|
318
|
+
return Math.floor(containerWidth / WIDGET_1X_MIN_WIDTH);
|
|
319
|
+
}
|
|
320
|
+
getWidget1xWidth(containerWidth, amountOfMinWidthColumns) {
|
|
321
|
+
const widget1xWidth = Math.floor(containerWidth / (amountOfMinWidthColumns || 1));
|
|
322
|
+
return widget1xWidth;
|
|
323
|
+
}
|
|
324
|
+
getResultWithMaxWidth(result, containerWidth) {
|
|
325
|
+
return {
|
|
326
|
+
...result,
|
|
327
|
+
items: result.items.map(item => ({
|
|
328
|
+
...item,
|
|
329
|
+
width: item.width > containerWidth ? containerWidth : item.width,
|
|
330
|
+
})),
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
getHeightConstraint(binsToFit, amountOfMinWidthColumns) {
|
|
334
|
+
const amountOfSpacesNeeded = binsToFit.reduce((acc, curr) => acc + curr.height * curr.width, 0);
|
|
335
|
+
const minAmountOfRowsNeeded = Math.ceil(amountOfSpacesNeeded / amountOfMinWidthColumns);
|
|
336
|
+
const tallestWidgetHeightSpace = binsToFit.reduce((acc, curr) => (curr.height > acc ? curr.height : acc), 0);
|
|
337
|
+
const amountOfRowsNeeded = minAmountOfRowsNeeded < tallestWidgetHeightSpace
|
|
338
|
+
? tallestWidgetHeightSpace
|
|
339
|
+
: minAmountOfRowsNeeded;
|
|
340
|
+
return amountOfRowsNeeded * WIDGET_1X_HEIGHT;
|
|
341
|
+
}
|
|
155
342
|
}
|
|
156
|
-
|
|
343
|
+
WidgetLayoutService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WidgetLayoutService, deps: [{ token: WidgetService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
344
|
+
WidgetLayoutService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WidgetLayoutService });
|
|
345
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WidgetLayoutService, decorators: [{
|
|
346
|
+
type: Injectable
|
|
347
|
+
}], ctorParameters: function () { return [{ type: WidgetService }]; } });
|
|
348
|
+
|
|
349
|
+
/*
|
|
350
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
351
|
+
*
|
|
352
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
353
|
+
* you may not use this file except in compliance with the License.
|
|
354
|
+
* You may obtain a copy of the License at
|
|
355
|
+
*
|
|
356
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
357
|
+
*
|
|
358
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
359
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
360
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
361
|
+
* See the License for the specific language governing permissions and
|
|
362
|
+
* limitations under the License.
|
|
363
|
+
*/
|
|
364
|
+
class DashboardService {
|
|
365
|
+
constructor(http, configService) {
|
|
366
|
+
this.http = http;
|
|
367
|
+
this.configService = configService;
|
|
368
|
+
this._endpointUri = this.configService.config.valtimoApi.endpointUri;
|
|
369
|
+
}
|
|
370
|
+
getDashboards() {
|
|
371
|
+
return this.http.get(`${this._endpointUri}v1/dashboard`);
|
|
372
|
+
}
|
|
157
373
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
ListModule,
|
|
163
|
-
BpmnJsDiagramModule, i4.TranslateModule, AlertModule,
|
|
164
|
-
TaskModule,
|
|
165
|
-
SpinnerModule], exports: [DashboardComponent] });
|
|
166
|
-
DashboardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DashboardModule, imports: [CommonModule,
|
|
167
|
-
DashboardRoutingModule,
|
|
168
|
-
WidgetModule,
|
|
169
|
-
ListModule,
|
|
170
|
-
BpmnJsDiagramModule,
|
|
171
|
-
TranslateModule.forRoot({
|
|
172
|
-
loader: {
|
|
173
|
-
provide: TranslateLoader,
|
|
174
|
-
useFactory: HttpLoaderFactory,
|
|
175
|
-
deps: [HttpClient],
|
|
176
|
-
},
|
|
177
|
-
}),
|
|
178
|
-
AlertModule,
|
|
179
|
-
TaskModule,
|
|
180
|
-
SpinnerModule] });
|
|
181
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DashboardModule, decorators: [{
|
|
182
|
-
type: NgModule,
|
|
374
|
+
DashboardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DashboardService, deps: [{ token: i1$2.HttpClient }, { token: i2$1.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
375
|
+
DashboardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DashboardService, providedIn: 'root' });
|
|
376
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DashboardService, decorators: [{
|
|
377
|
+
type: Injectable,
|
|
183
378
|
args: [{
|
|
184
|
-
|
|
185
|
-
imports: [
|
|
186
|
-
CommonModule,
|
|
187
|
-
DashboardRoutingModule,
|
|
188
|
-
WidgetModule,
|
|
189
|
-
ListModule,
|
|
190
|
-
BpmnJsDiagramModule,
|
|
191
|
-
TranslateModule.forRoot({
|
|
192
|
-
loader: {
|
|
193
|
-
provide: TranslateLoader,
|
|
194
|
-
useFactory: HttpLoaderFactory,
|
|
195
|
-
deps: [HttpClient],
|
|
196
|
-
},
|
|
197
|
-
}),
|
|
198
|
-
AlertModule,
|
|
199
|
-
TaskModule,
|
|
200
|
-
SpinnerModule,
|
|
201
|
-
],
|
|
202
|
-
exports: [DashboardComponent],
|
|
379
|
+
providedIn: 'root',
|
|
203
380
|
}]
|
|
204
|
-
}] });
|
|
381
|
+
}], ctorParameters: function () { return [{ type: i1$2.HttpClient }, { type: i2$1.ConfigService }]; } });
|
|
382
|
+
|
|
383
|
+
/*
|
|
384
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
385
|
+
*
|
|
386
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
387
|
+
* you may not use this file except in compliance with the License.
|
|
388
|
+
* You may obtain a copy of the License at
|
|
389
|
+
*
|
|
390
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
391
|
+
*
|
|
392
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
393
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
394
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
395
|
+
* See the License for the specific language governing permissions and
|
|
396
|
+
* limitations under the License.
|
|
397
|
+
*/
|
|
398
|
+
class WidgetTranslationService {
|
|
399
|
+
constructor(translateService, widgetService) {
|
|
400
|
+
this.translateService = translateService;
|
|
401
|
+
this.widgetService = widgetService;
|
|
402
|
+
}
|
|
403
|
+
translate(translateKey, key) {
|
|
404
|
+
return combineLatest([
|
|
405
|
+
this.widgetService.supportedDisplayTypes$,
|
|
406
|
+
this.widgetService.supportedDataSources$,
|
|
407
|
+
this.translateService.stream('key'),
|
|
408
|
+
]).pipe(map$1(([supportedDisplayTypes, supportedDataSources]) => this.getTranslation(supportedDisplayTypes, supportedDataSources, key, translateKey)));
|
|
409
|
+
}
|
|
410
|
+
instant(translateKey, displayTypeKey) {
|
|
411
|
+
return this.getTranslation(this.widgetService.supportedDisplayTypes, this.widgetService.supportedDataSources, displayTypeKey, translateKey);
|
|
412
|
+
}
|
|
413
|
+
getTranslation(supportedDisplayTypes, supportedDataSources, key, translateKey) {
|
|
414
|
+
const currentLang = this.translateService.currentLang;
|
|
415
|
+
const displayTypeSpecification = supportedDisplayTypes.find(displayType => displayType.displayTypeKey === key);
|
|
416
|
+
const dataSourceSpecification = supportedDataSources.find(datasource => datasource.dataSourceKey === key);
|
|
417
|
+
let translation = '';
|
|
418
|
+
if (displayTypeSpecification &&
|
|
419
|
+
displayTypeSpecification.translations.hasOwnProperty(currentLang)) {
|
|
420
|
+
translation = displayTypeSpecification.translations[currentLang][translateKey];
|
|
421
|
+
}
|
|
422
|
+
else if (dataSourceSpecification &&
|
|
423
|
+
dataSourceSpecification.translations.hasOwnProperty(currentLang)) {
|
|
424
|
+
translation = dataSourceSpecification.translations[currentLang][translateKey];
|
|
425
|
+
}
|
|
426
|
+
return translation || `${key}.${translateKey}`;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
WidgetTranslationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WidgetTranslationService, deps: [{ token: i1$1.TranslateService }, { token: WidgetService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
430
|
+
WidgetTranslationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WidgetTranslationService, providedIn: 'root' });
|
|
431
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WidgetTranslationService, decorators: [{
|
|
432
|
+
type: Injectable,
|
|
433
|
+
args: [{
|
|
434
|
+
providedIn: 'root',
|
|
435
|
+
}]
|
|
436
|
+
}], ctorParameters: function () { return [{ type: i1$1.TranslateService }, { type: WidgetService }]; } });
|
|
437
|
+
|
|
438
|
+
/*
|
|
439
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
440
|
+
*
|
|
441
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
442
|
+
* you may not use this file except in compliance with the License.
|
|
443
|
+
* You may obtain a copy of the License at
|
|
444
|
+
*
|
|
445
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
446
|
+
*
|
|
447
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
448
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
449
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
450
|
+
* See the License for the specific language governing permissions and
|
|
451
|
+
* limitations under the License.
|
|
452
|
+
*/
|
|
453
|
+
|
|
454
|
+
/*
|
|
455
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
456
|
+
*
|
|
457
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
458
|
+
* you may not use this file except in compliance with the License.
|
|
459
|
+
* You may obtain a copy of the License at
|
|
460
|
+
*
|
|
461
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
462
|
+
*
|
|
463
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
464
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
465
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
466
|
+
* See the License for the specific language governing permissions and
|
|
467
|
+
* limitations under the License.
|
|
468
|
+
*/
|
|
469
|
+
class WidgetDashboardContentComponent {
|
|
470
|
+
constructor(layoutService, widgetService, renderer) {
|
|
471
|
+
this.layoutService = layoutService;
|
|
472
|
+
this.widgetService = widgetService;
|
|
473
|
+
this.renderer = renderer;
|
|
474
|
+
this.isLoading$ = new BehaviorSubject(true);
|
|
475
|
+
this._widgetData$ = new BehaviorSubject([]);
|
|
476
|
+
this.widgetConfigurations$ = new BehaviorSubject(null);
|
|
477
|
+
this._subscriptions = new Subscription();
|
|
478
|
+
}
|
|
479
|
+
set widgetData(value) {
|
|
480
|
+
this.isLoading$.next(value.loading);
|
|
481
|
+
this._widgetData$.next(value.data);
|
|
482
|
+
}
|
|
483
|
+
set dashboard(value) {
|
|
484
|
+
this.setWidgetConfigurations(value);
|
|
485
|
+
}
|
|
486
|
+
ngAfterViewInit() {
|
|
487
|
+
this._observer = new ResizeObserver(event => {
|
|
488
|
+
this.observerMutation(event);
|
|
489
|
+
});
|
|
490
|
+
this._observer.observe(this._widgetContainerRef.nativeElement);
|
|
491
|
+
this.openPackResultSubscription();
|
|
492
|
+
this.renderWidgets();
|
|
493
|
+
}
|
|
494
|
+
ngOnDestroy() {
|
|
495
|
+
this._observer?.disconnect();
|
|
496
|
+
this._subscriptions?.unsubscribe();
|
|
497
|
+
}
|
|
498
|
+
setWidgetConfigurations(dashboard) {
|
|
499
|
+
this.widgetService.supportedDisplayTypes$.pipe(take(1)).subscribe(supportedDisplayTypes => {
|
|
500
|
+
const supportedWidgetConfigurations = dashboard.widgets?.filter(widgetConfiguration => supportedDisplayTypes.find(type => type.displayTypeKey === widgetConfiguration.displayType)) || [];
|
|
501
|
+
this.layoutService.setWidgetConfigurations(supportedWidgetConfigurations);
|
|
502
|
+
this.widgetConfigurations$.next(supportedWidgetConfigurations);
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
observerMutation(event) {
|
|
506
|
+
const widgetContainerWidth = event[0]?.borderBoxSize[0]?.inlineSize;
|
|
507
|
+
if (typeof widgetContainerWidth === 'number' && widgetContainerWidth !== 0) {
|
|
508
|
+
this.layoutService.setWidgetContainerWidth(widgetContainerWidth);
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
openPackResultSubscription() {
|
|
512
|
+
this._subscriptions.add(this.layoutService.widgetPackResult$.subscribe(packResult => {
|
|
513
|
+
this.renderer.setStyle(this._widgetContainerRef.nativeElement, 'height', `${packResult.height}px`);
|
|
514
|
+
this._widgetConfigurationRefs.toArray().forEach(widgetConfigurationRef => {
|
|
515
|
+
const nativeElement = widgetConfigurationRef.nativeElement;
|
|
516
|
+
const configPackResult = packResult.items.find(result => result.item.configurationKey === nativeElement.id);
|
|
517
|
+
this.renderer.setStyle(nativeElement, 'height', `${configPackResult?.height}px`);
|
|
518
|
+
this.renderer.setStyle(nativeElement, 'width', `${configPackResult?.width}px`);
|
|
519
|
+
this.renderer.setStyle(nativeElement, 'left', `${configPackResult?.x}px`);
|
|
520
|
+
this.renderer.setStyle(nativeElement, 'top', `${configPackResult?.y}px`);
|
|
521
|
+
});
|
|
522
|
+
}));
|
|
523
|
+
}
|
|
524
|
+
renderWidgets() {
|
|
525
|
+
this._subscriptions.add(combineLatest([
|
|
526
|
+
this.widgetConfigurations$,
|
|
527
|
+
this.widgetService.supportedDisplayTypes$,
|
|
528
|
+
this._widgetData$,
|
|
529
|
+
]).subscribe(([configurations, displayTypes, data]) => {
|
|
530
|
+
configurations?.forEach((configuration, index) => {
|
|
531
|
+
const displayType = displayTypes.find(type => type.displayTypeKey === configuration.displayType);
|
|
532
|
+
const vcRef = this._widgetConfigurationContentVcRefs.toArray()[index];
|
|
533
|
+
if (displayType && data) {
|
|
534
|
+
vcRef.clear();
|
|
535
|
+
const componentInstance = vcRef.createComponent(displayType.displayComponent);
|
|
536
|
+
componentInstance.setInput('displayTypeKey', configuration.displayType);
|
|
537
|
+
componentInstance.setInput('displayTypeProperties', {
|
|
538
|
+
...configuration.displayTypeProperties,
|
|
539
|
+
});
|
|
540
|
+
componentInstance.setInput('data', data.find(dataItem => dataItem.key === configuration.key)?.data);
|
|
541
|
+
}
|
|
542
|
+
});
|
|
543
|
+
}));
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
WidgetDashboardContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WidgetDashboardContentComponent, deps: [{ token: WidgetLayoutService }, { token: WidgetService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
547
|
+
WidgetDashboardContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: WidgetDashboardContentComponent, selector: "valtimo-widget-dashboard-content", inputs: { widgetData: "widgetData", dashboard: "dashboard" }, providers: [WidgetLayoutService], viewQueries: [{ propertyName: "_widgetContainerRef", first: true, predicate: ["widgetContainer"], descendants: true }, { propertyName: "_widgetConfigurationRefs", predicate: ["widgetConfiguration"], descendants: true }, { propertyName: "_widgetConfigurationContentVcRefs", predicate: ["widgetConfigurationContent"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div #widgetContainer [class.loading]=\"isLoading$ | async\" class=\"widget-container\">\n <ng-container *ngIf=\"widgetConfigurations$ | async as widgetConfigurations\">\n <ng-container *ngFor=\"let config of widgetConfigurations\">\n <div #widgetConfiguration [id]=\"config.key\" class=\"widget-configuration\">\n <div class=\"widget-configuration-content\">\n <ng-container #widgetConfigurationContent></ng-container>\n </div>\n </div>\n </ng-container>\n\n <div *ngIf=\"widgetConfigurations.length === 0\" class=\"no-widgets-message\">\n {{ 'dashboard.noWidgets' | translate }}\n </div>\n </ng-container>\n</div>\n\n<cds-loading *ngIf=\"isLoading$ | async\" class=\"widget-loader\"></cds-loading>\n", styles: ["/*!\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.widget-container{margin-top:16px;width:calc(100% + 16px);margin-left:-8px;position:relative}.widget-configuration{position:absolute;display:flex;justify-content:center;align-items:center}.widget-configuration-content{width:calc(100% - 16px);height:calc(100% - 16px);background-color:#fff}.no-widgets-message{padding-top:16px;display:flex;justify-content:center;width:100%}.widget-loader{display:flex;justify-content:center;padding-top:32px}.loading{display:none}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$1.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
548
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WidgetDashboardContentComponent, decorators: [{
|
|
549
|
+
type: Component,
|
|
550
|
+
args: [{ selector: 'valtimo-widget-dashboard-content', providers: [WidgetLayoutService], template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div #widgetContainer [class.loading]=\"isLoading$ | async\" class=\"widget-container\">\n <ng-container *ngIf=\"widgetConfigurations$ | async as widgetConfigurations\">\n <ng-container *ngFor=\"let config of widgetConfigurations\">\n <div #widgetConfiguration [id]=\"config.key\" class=\"widget-configuration\">\n <div class=\"widget-configuration-content\">\n <ng-container #widgetConfigurationContent></ng-container>\n </div>\n </div>\n </ng-container>\n\n <div *ngIf=\"widgetConfigurations.length === 0\" class=\"no-widgets-message\">\n {{ 'dashboard.noWidgets' | translate }}\n </div>\n </ng-container>\n</div>\n\n<cds-loading *ngIf=\"isLoading$ | async\" class=\"widget-loader\"></cds-loading>\n", styles: ["/*!\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.widget-container{margin-top:16px;width:calc(100% + 16px);margin-left:-8px;position:relative}.widget-configuration{position:absolute;display:flex;justify-content:center;align-items:center}.widget-configuration-content{width:calc(100% - 16px);height:calc(100% - 16px);background-color:#fff}.no-widgets-message{padding-top:16px;display:flex;justify-content:center;width:100%}.widget-loader{display:flex;justify-content:center;padding-top:32px}.loading{display:none}\n"] }]
|
|
551
|
+
}], ctorParameters: function () { return [{ type: WidgetLayoutService }, { type: WidgetService }, { type: i0.Renderer2 }]; }, propDecorators: { _widgetConfigurationRefs: [{
|
|
552
|
+
type: ViewChildren,
|
|
553
|
+
args: ['widgetConfiguration']
|
|
554
|
+
}], _widgetConfigurationContentVcRefs: [{
|
|
555
|
+
type: ViewChildren,
|
|
556
|
+
args: ['widgetConfigurationContent', { read: ViewContainerRef }]
|
|
557
|
+
}], _widgetContainerRef: [{
|
|
558
|
+
type: ViewChild,
|
|
559
|
+
args: ['widgetContainer']
|
|
560
|
+
}], widgetData: [{
|
|
561
|
+
type: Input
|
|
562
|
+
}], dashboard: [{
|
|
563
|
+
type: Input
|
|
564
|
+
}] } });
|
|
565
|
+
|
|
566
|
+
/*
|
|
567
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
568
|
+
*
|
|
569
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
570
|
+
* you may not use this file except in compliance with the License.
|
|
571
|
+
* You may obtain a copy of the License at
|
|
572
|
+
*
|
|
573
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
574
|
+
*
|
|
575
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
576
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
577
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
578
|
+
* See the License for the specific language governing permissions and
|
|
579
|
+
* limitations under the License.
|
|
580
|
+
*/
|
|
581
|
+
class WidgetApiService {
|
|
582
|
+
constructor(configService, http) {
|
|
583
|
+
this.configService = configService;
|
|
584
|
+
this.http = http;
|
|
585
|
+
this._endpointUri = `${this.configService.config.valtimoApi.endpointUri}v1/dashboard`;
|
|
586
|
+
}
|
|
587
|
+
getWidgetData(dashboardKey) {
|
|
588
|
+
return this.http.get(`${this._endpointUri}/${dashboardKey}/data`);
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
WidgetApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WidgetApiService, deps: [{ token: i2$1.ConfigService }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
592
|
+
WidgetApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WidgetApiService, providedIn: 'root' });
|
|
593
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WidgetApiService, decorators: [{
|
|
594
|
+
type: Injectable,
|
|
595
|
+
args: [{
|
|
596
|
+
providedIn: 'root',
|
|
597
|
+
}]
|
|
598
|
+
}], ctorParameters: function () { return [{ type: i2$1.ConfigService }, { type: i1$2.HttpClient }]; } });
|
|
599
|
+
|
|
600
|
+
/*
|
|
601
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
602
|
+
*
|
|
603
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
604
|
+
* you may not use this file except in compliance with the License.
|
|
605
|
+
* You may obtain a copy of the License at
|
|
606
|
+
*
|
|
607
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
608
|
+
*
|
|
609
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
610
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
611
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
612
|
+
* See the License for the specific language governing permissions and
|
|
613
|
+
* limitations under the License.
|
|
614
|
+
*/
|
|
615
|
+
class WidgetDashboardComponent {
|
|
616
|
+
constructor(dashboardService, widgetApiService) {
|
|
617
|
+
this.dashboardService = dashboardService;
|
|
618
|
+
this.widgetApiService = widgetApiService;
|
|
619
|
+
this.dashboards$ = this.dashboardService.getDashboards().pipe(tap(dashboards => {
|
|
620
|
+
if (dashboards.length === 1) {
|
|
621
|
+
this.onTabSelected(dashboards[0].key);
|
|
622
|
+
}
|
|
623
|
+
}));
|
|
624
|
+
this.activeWidgetData$ = new BehaviorSubject({
|
|
625
|
+
data: [],
|
|
626
|
+
loading: true,
|
|
627
|
+
});
|
|
628
|
+
}
|
|
629
|
+
onTabSelected(dashboardKey) {
|
|
630
|
+
this.widgetApiService
|
|
631
|
+
.getWidgetData(dashboardKey)
|
|
632
|
+
.pipe(tap(() => {
|
|
633
|
+
this.activeWidgetData$.next({ data: [], loading: true });
|
|
634
|
+
}), take$1(1))
|
|
635
|
+
.subscribe((data) => this.activeWidgetData$.next({ data, loading: false }));
|
|
636
|
+
}
|
|
637
|
+
trackByIndex(index) {
|
|
638
|
+
return index;
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
WidgetDashboardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WidgetDashboardComponent, deps: [{ token: DashboardService }, { token: WidgetApiService }], target: i0.ɵɵFactoryTarget.Component });
|
|
642
|
+
WidgetDashboardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: WidgetDashboardComponent, selector: "valtimo-widget-dashboard", ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div *ngIf=\"dashboards$ | async as dashboards\" class=\"dashboards-container\">\n <div *ngIf=\"dashboards.length === 1\">\n <h4>{{ dashboards[0].title }}</h4>\n\n <valtimo-widget-dashboard-content\n [dashboard]=\"dashboards[0]\"\n [widgetData]=\"activeWidgetData$ | async\"\n ></valtimo-widget-dashboard-content>\n </div>\n\n <div *ngIf=\"dashboards.length > 1\">\n <cds-tabs>\n <cds-tab\n *ngFor=\"let dashboard of dashboards; trackBy: trackByIndex\"\n [heading]=\"dashboard.title\"\n (selected)=\"onTabSelected(dashboard.key)\"\n >\n <valtimo-widget-dashboard-content\n [dashboard]=\"dashboard\"\n [widgetData]=\"activeWidgetData$ | async\"\n ></valtimo-widget-dashboard-content>\n </cds-tab>\n </cds-tabs>\n </div>\n</div>\n", styles: ["/*!\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.dashboards-container .cds--tab-content{outline:0;padding:0}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$1.Tabs, selector: "cds-tabs, ibm-tabs", inputs: ["position", "cacheActive", "followFocus", "isNavigation", "ariaLabel", "ariaLabelledby", "type", "theme", "skeleton"] }, { kind: "component", type: i4$1.Tab, selector: "cds-tab, ibm-tab", inputs: ["heading", "title", "context", "active", "disabled", "tabIndex", "id", "cacheActive"], outputs: ["selected"] }, { kind: "component", type: WidgetDashboardContentComponent, selector: "valtimo-widget-dashboard-content", inputs: ["widgetData", "dashboard"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None });
|
|
643
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WidgetDashboardComponent, decorators: [{
|
|
644
|
+
type: Component,
|
|
645
|
+
args: [{ selector: 'valtimo-widget-dashboard', encapsulation: ViewEncapsulation.None, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div *ngIf=\"dashboards$ | async as dashboards\" class=\"dashboards-container\">\n <div *ngIf=\"dashboards.length === 1\">\n <h4>{{ dashboards[0].title }}</h4>\n\n <valtimo-widget-dashboard-content\n [dashboard]=\"dashboards[0]\"\n [widgetData]=\"activeWidgetData$ | async\"\n ></valtimo-widget-dashboard-content>\n </div>\n\n <div *ngIf=\"dashboards.length > 1\">\n <cds-tabs>\n <cds-tab\n *ngFor=\"let dashboard of dashboards; trackBy: trackByIndex\"\n [heading]=\"dashboard.title\"\n (selected)=\"onTabSelected(dashboard.key)\"\n >\n <valtimo-widget-dashboard-content\n [dashboard]=\"dashboard\"\n [widgetData]=\"activeWidgetData$ | async\"\n ></valtimo-widget-dashboard-content>\n </cds-tab>\n </cds-tabs>\n </div>\n</div>\n", styles: ["/*!\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.dashboards-container .cds--tab-content{outline:0;padding:0}\n"] }]
|
|
646
|
+
}], ctorParameters: function () { return [{ type: DashboardService }, { type: WidgetApiService }]; } });
|
|
647
|
+
|
|
648
|
+
/*
|
|
649
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
650
|
+
*
|
|
651
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
652
|
+
* you may not use this file except in compliance with the License.
|
|
653
|
+
* You may obtain a copy of the License at
|
|
654
|
+
*
|
|
655
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
656
|
+
*
|
|
657
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
658
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
659
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
660
|
+
* See the License for the specific language governing permissions and
|
|
661
|
+
* limitations under the License.
|
|
662
|
+
*/
|
|
663
|
+
const routes = [
|
|
664
|
+
{
|
|
665
|
+
path: '',
|
|
666
|
+
component: WidgetDashboardComponent,
|
|
667
|
+
canActivate: [AuthGuardService],
|
|
668
|
+
data: { title: 'Dashboard', roles: [ROLE_USER], hidePageTitle: true },
|
|
669
|
+
},
|
|
670
|
+
];
|
|
671
|
+
class DashboardRoutingModule {
|
|
672
|
+
}
|
|
673
|
+
DashboardRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DashboardRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
674
|
+
DashboardRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: DashboardRoutingModule, imports: [CommonModule, i2.RouterModule], exports: [RouterModule] });
|
|
675
|
+
DashboardRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DashboardRoutingModule, imports: [CommonModule, RouterModule.forChild(routes), RouterModule] });
|
|
676
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DashboardRoutingModule, decorators: [{
|
|
677
|
+
type: NgModule,
|
|
678
|
+
args: [{
|
|
679
|
+
declarations: [],
|
|
680
|
+
imports: [CommonModule, RouterModule.forChild(routes)],
|
|
681
|
+
exports: [RouterModule],
|
|
682
|
+
}]
|
|
683
|
+
}] });
|
|
684
|
+
|
|
685
|
+
/*
|
|
686
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
687
|
+
*
|
|
688
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
689
|
+
* you may not use this file except in compliance with the License.
|
|
690
|
+
* You may obtain a copy of the License at
|
|
691
|
+
*
|
|
692
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
693
|
+
*
|
|
694
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
695
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
696
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
697
|
+
* See the License for the specific language governing permissions and
|
|
698
|
+
* limitations under the License.
|
|
699
|
+
*/
|
|
700
|
+
class WidgetTranslatePipe {
|
|
701
|
+
constructor(widgetTranslationService) {
|
|
702
|
+
this.widgetTranslationService = widgetTranslationService;
|
|
703
|
+
}
|
|
704
|
+
transform(translateKey, key) {
|
|
705
|
+
return this.widgetTranslationService.translate(translateKey, key);
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
WidgetTranslatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WidgetTranslatePipe, deps: [{ token: WidgetTranslationService }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
709
|
+
WidgetTranslatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: WidgetTranslatePipe, name: "widgetTranslate" });
|
|
710
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WidgetTranslatePipe, decorators: [{
|
|
711
|
+
type: Pipe,
|
|
712
|
+
args: [{
|
|
713
|
+
name: 'widgetTranslate',
|
|
714
|
+
}]
|
|
715
|
+
}], ctorParameters: function () { return [{ type: WidgetTranslationService }]; } });
|
|
716
|
+
|
|
717
|
+
/*
|
|
718
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
719
|
+
*
|
|
720
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
721
|
+
* you may not use this file except in compliance with the License.
|
|
722
|
+
* You may obtain a copy of the License at
|
|
723
|
+
*
|
|
724
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
725
|
+
*
|
|
726
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
727
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
728
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
729
|
+
* See the License for the specific language governing permissions and
|
|
730
|
+
* limitations under the License.
|
|
731
|
+
*/
|
|
732
|
+
class WidgetTranslatePipeModule {
|
|
733
|
+
}
|
|
734
|
+
WidgetTranslatePipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WidgetTranslatePipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
735
|
+
WidgetTranslatePipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: WidgetTranslatePipeModule, declarations: [WidgetTranslatePipe], imports: [TranslateModule], exports: [WidgetTranslatePipe] });
|
|
736
|
+
WidgetTranslatePipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WidgetTranslatePipeModule, imports: [TranslateModule] });
|
|
737
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WidgetTranslatePipeModule, decorators: [{
|
|
738
|
+
type: NgModule,
|
|
739
|
+
args: [{
|
|
740
|
+
imports: [TranslateModule],
|
|
741
|
+
declarations: [WidgetTranslatePipe],
|
|
742
|
+
exports: [WidgetTranslatePipe],
|
|
743
|
+
}]
|
|
744
|
+
}] });
|
|
745
|
+
|
|
746
|
+
/*
|
|
747
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
748
|
+
*
|
|
749
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
750
|
+
* you may not use this file except in compliance with the License.
|
|
751
|
+
* You may obtain a copy of the License at
|
|
752
|
+
*
|
|
753
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
754
|
+
*
|
|
755
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
756
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
757
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
758
|
+
* See the License for the specific language governing permissions and
|
|
759
|
+
* limitations under the License.
|
|
760
|
+
*/
|
|
761
|
+
|
|
762
|
+
/*
|
|
763
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
764
|
+
*
|
|
765
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
766
|
+
* you may not use this file except in compliance with the License.
|
|
767
|
+
* You may obtain a copy of the License at
|
|
768
|
+
*
|
|
769
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
770
|
+
*
|
|
771
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
772
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
773
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
774
|
+
* See the License for the specific language governing permissions and
|
|
775
|
+
* limitations under the License.
|
|
776
|
+
*/
|
|
777
|
+
|
|
778
|
+
/*
|
|
779
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
780
|
+
*
|
|
781
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
782
|
+
* you may not use this file except in compliance with the License.
|
|
783
|
+
* You may obtain a copy of the License at
|
|
784
|
+
*
|
|
785
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
786
|
+
*
|
|
787
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
788
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
789
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
790
|
+
* See the License for the specific language governing permissions and
|
|
791
|
+
* limitations under the License.
|
|
792
|
+
*/
|
|
793
|
+
// AoT requires an exported function for factories
|
|
794
|
+
function HttpLoaderFactory(httpClient) {
|
|
795
|
+
return new TranslateHttpLoader(httpClient);
|
|
796
|
+
}
|
|
797
|
+
class DashboardModule {
|
|
798
|
+
}
|
|
799
|
+
DashboardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DashboardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
800
|
+
DashboardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: DashboardModule, declarations: [DashboardComponent, WidgetDashboardComponent, WidgetDashboardContentComponent], imports: [CommonModule,
|
|
801
|
+
DashboardRoutingModule,
|
|
802
|
+
WidgetModule,
|
|
803
|
+
ListModule,
|
|
804
|
+
BpmnJsDiagramModule, i1$1.TranslateModule, AlertModule,
|
|
805
|
+
TaskModule,
|
|
806
|
+
SpinnerModule,
|
|
807
|
+
TabsModule,
|
|
808
|
+
ThemeModule,
|
|
809
|
+
WidgetTranslatePipeModule,
|
|
810
|
+
LoadingModule], exports: [DashboardComponent, WidgetDashboardComponent] });
|
|
811
|
+
DashboardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DashboardModule, providers: [
|
|
812
|
+
{ provide: DISPLAY_TYPE_TOKEN, useValue: null, multi: true },
|
|
813
|
+
{ provide: DATA_SOURCE_TOKEN, useValue: null, multi: true },
|
|
814
|
+
], imports: [CommonModule,
|
|
815
|
+
DashboardRoutingModule,
|
|
816
|
+
WidgetModule,
|
|
817
|
+
ListModule,
|
|
818
|
+
BpmnJsDiagramModule,
|
|
819
|
+
TranslateModule.forRoot({
|
|
820
|
+
loader: {
|
|
821
|
+
provide: TranslateLoader,
|
|
822
|
+
useFactory: HttpLoaderFactory,
|
|
823
|
+
deps: [HttpClient],
|
|
824
|
+
},
|
|
825
|
+
}),
|
|
826
|
+
AlertModule,
|
|
827
|
+
TaskModule,
|
|
828
|
+
SpinnerModule,
|
|
829
|
+
TabsModule,
|
|
830
|
+
ThemeModule,
|
|
831
|
+
WidgetTranslatePipeModule,
|
|
832
|
+
LoadingModule] });
|
|
833
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DashboardModule, decorators: [{
|
|
834
|
+
type: NgModule,
|
|
835
|
+
args: [{
|
|
836
|
+
declarations: [DashboardComponent, WidgetDashboardComponent, WidgetDashboardContentComponent],
|
|
837
|
+
imports: [
|
|
838
|
+
CommonModule,
|
|
839
|
+
DashboardRoutingModule,
|
|
840
|
+
WidgetModule,
|
|
841
|
+
ListModule,
|
|
842
|
+
BpmnJsDiagramModule,
|
|
843
|
+
TranslateModule.forRoot({
|
|
844
|
+
loader: {
|
|
845
|
+
provide: TranslateLoader,
|
|
846
|
+
useFactory: HttpLoaderFactory,
|
|
847
|
+
deps: [HttpClient],
|
|
848
|
+
},
|
|
849
|
+
}),
|
|
850
|
+
AlertModule,
|
|
851
|
+
TaskModule,
|
|
852
|
+
SpinnerModule,
|
|
853
|
+
TabsModule,
|
|
854
|
+
ThemeModule,
|
|
855
|
+
WidgetTranslatePipeModule,
|
|
856
|
+
LoadingModule,
|
|
857
|
+
],
|
|
858
|
+
exports: [DashboardComponent, WidgetDashboardComponent],
|
|
859
|
+
providers: [
|
|
860
|
+
{ provide: DISPLAY_TYPE_TOKEN, useValue: null, multi: true },
|
|
861
|
+
{ provide: DATA_SOURCE_TOKEN, useValue: null, multi: true },
|
|
862
|
+
],
|
|
863
|
+
}]
|
|
864
|
+
}] });
|
|
865
|
+
|
|
866
|
+
/*
|
|
867
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
868
|
+
*
|
|
869
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
870
|
+
* you may not use this file except in compliance with the License.
|
|
871
|
+
* You may obtain a copy of the License at
|
|
872
|
+
*
|
|
873
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
874
|
+
*
|
|
875
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
876
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
877
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
878
|
+
* See the License for the specific language governing permissions and
|
|
879
|
+
* limitations under the License.
|
|
880
|
+
*/
|
|
881
|
+
class TestConfigurationComponent {
|
|
882
|
+
constructor(fb) {
|
|
883
|
+
this.fb = fb;
|
|
884
|
+
this.form = this.fb.group({
|
|
885
|
+
value: this.fb.control(null, [Validators.required]),
|
|
886
|
+
total: this.fb.control(null, [Validators.required]),
|
|
887
|
+
});
|
|
888
|
+
this.configurationEvent = new EventEmitter();
|
|
889
|
+
this._subscriptions = new Subscription();
|
|
890
|
+
}
|
|
891
|
+
set disabled(disabledValue) {
|
|
892
|
+
if (disabledValue) {
|
|
893
|
+
this.form.disable();
|
|
894
|
+
}
|
|
895
|
+
else {
|
|
896
|
+
this.form.enable();
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
get value() {
|
|
900
|
+
return this.form.get('value');
|
|
901
|
+
}
|
|
902
|
+
get total() {
|
|
903
|
+
return this.form.get('total');
|
|
904
|
+
}
|
|
905
|
+
set prefillConfiguration(configurationValue) {
|
|
906
|
+
if (configurationValue) {
|
|
907
|
+
this.value.setValue(configurationValue.value);
|
|
908
|
+
this.total.setValue(configurationValue.total);
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
ngOnInit() {
|
|
912
|
+
this.openFormSubscription();
|
|
913
|
+
}
|
|
914
|
+
ngOnDestroy() {
|
|
915
|
+
this._subscriptions.unsubscribe();
|
|
916
|
+
}
|
|
917
|
+
openFormSubscription() {
|
|
918
|
+
this._subscriptions.add(this.form.valueChanges.pipe(startWith(this.form.value)).subscribe(formValue => {
|
|
919
|
+
this.configurationEvent.emit({ valid: this.form.valid, data: formValue });
|
|
920
|
+
}));
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
TestConfigurationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TestConfigurationComponent, deps: [{ token: i1$3.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
924
|
+
TestConfigurationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TestConfigurationComponent, selector: "ng-component", inputs: { dataSourceKey: "dataSourceKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<form [formGroup]=\"form\">\n <div class=\"form__element\">\n <cds-label\n [helperText]=\"'valueHelperText' | widgetTranslate : dataSourceKey | async\"\n [invalidText]=\"'valueHelperText' | widgetTranslate : dataSourceKey | async\"\n [invalid]=\"value.dirty && value.invalid\"\n >\n {{ 'value' | widgetTranslate : dataSourceKey | async }}\n\n <input\n cdsText\n formControlName=\"value\"\n [invalid]=\"value.dirty && value.invalid\"\n type=\"number\"\n />\n </cds-label>\n </div>\n\n <div class=\"form__element\">\n <cds-label\n [helperText]=\"'totalHelperText' | widgetTranslate : dataSourceKey | async\"\n [invalidText]=\"'totalHelperText' | widgetTranslate : dataSourceKey | async\"\n [invalid]=\"total.dirty && total.invalid\"\n >\n {{ 'total' | widgetTranslate : dataSourceKey | async }}\n\n <input\n cdsText\n formControlName=\"total\"\n [invalid]=\"total.dirty && total.invalid\"\n type=\"number\"\n />\n </cds-label>\n </div>\n</form>\n", styles: ["/*!\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "directive", type: i1$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4$1.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i4$1.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: WidgetTranslatePipe, name: "widgetTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
925
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TestConfigurationComponent, decorators: [{
|
|
926
|
+
type: Component,
|
|
927
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<form [formGroup]=\"form\">\n <div class=\"form__element\">\n <cds-label\n [helperText]=\"'valueHelperText' | widgetTranslate : dataSourceKey | async\"\n [invalidText]=\"'valueHelperText' | widgetTranslate : dataSourceKey | async\"\n [invalid]=\"value.dirty && value.invalid\"\n >\n {{ 'value' | widgetTranslate : dataSourceKey | async }}\n\n <input\n cdsText\n formControlName=\"value\"\n [invalid]=\"value.dirty && value.invalid\"\n type=\"number\"\n />\n </cds-label>\n </div>\n\n <div class=\"form__element\">\n <cds-label\n [helperText]=\"'totalHelperText' | widgetTranslate : dataSourceKey | async\"\n [invalidText]=\"'totalHelperText' | widgetTranslate : dataSourceKey | async\"\n [invalid]=\"total.dirty && total.invalid\"\n >\n {{ 'total' | widgetTranslate : dataSourceKey | async }}\n\n <input\n cdsText\n formControlName=\"total\"\n [invalid]=\"total.dirty && total.invalid\"\n type=\"number\"\n />\n </cds-label>\n </div>\n</form>\n", styles: ["/*!\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
|
|
928
|
+
}], ctorParameters: function () { return [{ type: i1$3.FormBuilder }]; }, propDecorators: { dataSourceKey: [{
|
|
929
|
+
type: Input
|
|
930
|
+
}], disabled: [{
|
|
931
|
+
type: Input
|
|
932
|
+
}], prefillConfiguration: [{
|
|
933
|
+
type: Input
|
|
934
|
+
}], configurationEvent: [{
|
|
935
|
+
type: Output
|
|
936
|
+
}] } });
|
|
937
|
+
|
|
938
|
+
/*
|
|
939
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
940
|
+
*
|
|
941
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
942
|
+
* you may not use this file except in compliance with the License.
|
|
943
|
+
* You may obtain a copy of the License at
|
|
944
|
+
*
|
|
945
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
946
|
+
*
|
|
947
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
948
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
949
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
950
|
+
* See the License for the specific language governing permissions and
|
|
951
|
+
* limitations under the License.
|
|
952
|
+
*/
|
|
953
|
+
|
|
954
|
+
/*
|
|
955
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
956
|
+
*
|
|
957
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
958
|
+
* you may not use this file except in compliance with the License.
|
|
959
|
+
* You may obtain a copy of the License at
|
|
960
|
+
*
|
|
961
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
962
|
+
*
|
|
963
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
964
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
965
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
966
|
+
* See the License for the specific language governing permissions and
|
|
967
|
+
* limitations under the License.
|
|
968
|
+
*/
|
|
969
|
+
|
|
970
|
+
/*
|
|
971
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
972
|
+
*
|
|
973
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
974
|
+
* you may not use this file except in compliance with the License.
|
|
975
|
+
* You may obtain a copy of the License at
|
|
976
|
+
*
|
|
977
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
978
|
+
*
|
|
979
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
980
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
981
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
982
|
+
* See the License for the specific language governing permissions and
|
|
983
|
+
* limitations under the License.
|
|
984
|
+
*/
|
|
985
|
+
|
|
986
|
+
/*
|
|
987
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
988
|
+
*
|
|
989
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
990
|
+
* you may not use this file except in compliance with the License.
|
|
991
|
+
* You may obtain a copy of the License at
|
|
992
|
+
*
|
|
993
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
994
|
+
*
|
|
995
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
996
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
997
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
998
|
+
* See the License for the specific language governing permissions and
|
|
999
|
+
* limitations under the License.
|
|
1000
|
+
*/
|
|
1001
|
+
|
|
1002
|
+
/*
|
|
1003
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1004
|
+
*
|
|
1005
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1006
|
+
* you may not use this file except in compliance with the License.
|
|
1007
|
+
* You may obtain a copy of the License at
|
|
1008
|
+
*
|
|
1009
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1010
|
+
*
|
|
1011
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1012
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1013
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1014
|
+
* See the License for the specific language governing permissions and
|
|
1015
|
+
* limitations under the License.
|
|
1016
|
+
*/
|
|
1017
|
+
const testDataSourceSpecification = {
|
|
1018
|
+
dataSourceKey: 'test',
|
|
1019
|
+
configurationComponent: TestConfigurationComponent,
|
|
1020
|
+
translations: {
|
|
1021
|
+
de: {
|
|
1022
|
+
title: 'Test-Datenquelle',
|
|
1023
|
+
value: 'Wert (erforderlich)',
|
|
1024
|
+
valueHelperText: 'Der im Widget angezeigte Wert',
|
|
1025
|
+
total: 'Gesamtwert (erforderlich)',
|
|
1026
|
+
totalHelperText: 'Der im Widget angezeigte Gesamtwert',
|
|
1027
|
+
},
|
|
1028
|
+
en: {
|
|
1029
|
+
title: 'Test data source',
|
|
1030
|
+
value: 'Value (required)',
|
|
1031
|
+
valueHelperText: 'The value displayed in the widget',
|
|
1032
|
+
total: 'Total value (required)',
|
|
1033
|
+
totalHelperText: 'The total value displayed in the widget',
|
|
1034
|
+
},
|
|
1035
|
+
nl: {
|
|
1036
|
+
title: 'Testdatabron',
|
|
1037
|
+
value: 'Waarde (vereist)',
|
|
1038
|
+
valueHelperText: 'De waarde die wordt weergegeven in de widget',
|
|
1039
|
+
total: 'Totaalwaarde (vereist)',
|
|
1040
|
+
totalHelperText: 'De totaalwaarde die wordt weergegeven in de widget',
|
|
1041
|
+
},
|
|
1042
|
+
},
|
|
1043
|
+
};
|
|
1044
|
+
|
|
1045
|
+
/*
|
|
1046
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1047
|
+
*
|
|
1048
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1049
|
+
* you may not use this file except in compliance with the License.
|
|
1050
|
+
* You may obtain a copy of the License at
|
|
1051
|
+
*
|
|
1052
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1053
|
+
*
|
|
1054
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1055
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1056
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1057
|
+
* See the License for the specific language governing permissions and
|
|
1058
|
+
* limitations under the License.
|
|
1059
|
+
*/
|
|
1060
|
+
class TestDataSourceModule {
|
|
1061
|
+
}
|
|
1062
|
+
TestDataSourceModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TestDataSourceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1063
|
+
TestDataSourceModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: TestDataSourceModule, declarations: [TestConfigurationComponent], imports: [CommonModule, ReactiveFormsModule, WidgetTranslatePipeModule, InputModule], exports: [TestConfigurationComponent] });
|
|
1064
|
+
TestDataSourceModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TestDataSourceModule, providers: [{ provide: DATA_SOURCE_TOKEN, useValue: testDataSourceSpecification, multi: true }], imports: [CommonModule, ReactiveFormsModule, WidgetTranslatePipeModule, InputModule] });
|
|
1065
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TestDataSourceModule, decorators: [{
|
|
1066
|
+
type: NgModule,
|
|
1067
|
+
args: [{
|
|
1068
|
+
declarations: [TestConfigurationComponent],
|
|
1069
|
+
imports: [CommonModule, ReactiveFormsModule, WidgetTranslatePipeModule, InputModule],
|
|
1070
|
+
exports: [TestConfigurationComponent],
|
|
1071
|
+
providers: [{ provide: DATA_SOURCE_TOKEN, useValue: testDataSourceSpecification, multi: true }],
|
|
1072
|
+
}]
|
|
1073
|
+
}] });
|
|
1074
|
+
|
|
1075
|
+
/*
|
|
1076
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1077
|
+
*
|
|
1078
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1079
|
+
* you may not use this file except in compliance with the License.
|
|
1080
|
+
* You may obtain a copy of the License at
|
|
1081
|
+
*
|
|
1082
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1083
|
+
*
|
|
1084
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1085
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1086
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1087
|
+
* See the License for the specific language governing permissions and
|
|
1088
|
+
* limitations under the License.
|
|
1089
|
+
*/
|
|
1090
|
+
|
|
1091
|
+
/*
|
|
1092
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1093
|
+
*
|
|
1094
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1095
|
+
* you may not use this file except in compliance with the License.
|
|
1096
|
+
* You may obtain a copy of the License at
|
|
1097
|
+
*
|
|
1098
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1099
|
+
*
|
|
1100
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1101
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1102
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1103
|
+
* See the License for the specific language governing permissions and
|
|
1104
|
+
* limitations under the License.
|
|
1105
|
+
*/
|
|
1106
|
+
var Operator;
|
|
1107
|
+
(function (Operator) {
|
|
1108
|
+
Operator["NOT_EQUAL_TO"] = "!=";
|
|
1109
|
+
Operator["EQUAL_TO"] = "==";
|
|
1110
|
+
Operator["GREATER_THAN"] = ">";
|
|
1111
|
+
Operator["GREATER_THAN_OR_EQUAL_TO"] = ">=";
|
|
1112
|
+
Operator["LESS_THAN"] = "<";
|
|
1113
|
+
Operator["LESS_THAN_OR_EQUAL_TO"] = "<=";
|
|
1114
|
+
})(Operator || (Operator = {}));
|
|
1115
|
+
|
|
1116
|
+
/*
|
|
1117
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1118
|
+
*
|
|
1119
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1120
|
+
* you may not use this file except in compliance with the License.
|
|
1121
|
+
* You may obtain a copy of the License at
|
|
1122
|
+
*
|
|
1123
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1124
|
+
*
|
|
1125
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1126
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1127
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1128
|
+
* See the License for the specific language governing permissions and
|
|
1129
|
+
* limitations under the License.
|
|
1130
|
+
*/
|
|
1131
|
+
|
|
1132
|
+
/*
|
|
1133
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1134
|
+
*
|
|
1135
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1136
|
+
* you may not use this file except in compliance with the License.
|
|
1137
|
+
* You may obtain a copy of the License at
|
|
1138
|
+
*
|
|
1139
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1140
|
+
*
|
|
1141
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1142
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1143
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1144
|
+
* See the License for the specific language governing permissions and
|
|
1145
|
+
* limitations under the License.
|
|
1146
|
+
*/
|
|
1147
|
+
class CaseCountConfigurationComponent {
|
|
1148
|
+
constructor(fb, documentService, translateService, widgetTranslationService) {
|
|
1149
|
+
this.fb = fb;
|
|
1150
|
+
this.documentService = documentService;
|
|
1151
|
+
this.translateService = translateService;
|
|
1152
|
+
this.widgetTranslationService = widgetTranslationService;
|
|
1153
|
+
this.form = this.fb.group({
|
|
1154
|
+
documentDefinition: this.fb.control(null, [Validators.required]),
|
|
1155
|
+
queryConditions: this.fb.control(null),
|
|
1156
|
+
});
|
|
1157
|
+
this._selectedDocumentDefinition$ = new BehaviorSubject('');
|
|
1158
|
+
this.documentItems$ = combineLatest([
|
|
1159
|
+
this.documentService.getAllDefinitions(),
|
|
1160
|
+
this._selectedDocumentDefinition$,
|
|
1161
|
+
]).pipe(map(([documentDefinitions, selectedDocumentDefintion]) => documentDefinitions.content.map(definition => ({
|
|
1162
|
+
content: definition.id.name,
|
|
1163
|
+
selected: definition.id.name === selectedDocumentDefintion,
|
|
1164
|
+
}))));
|
|
1165
|
+
this._OPERATORS = [
|
|
1166
|
+
Operator.NOT_EQUAL_TO,
|
|
1167
|
+
Operator.EQUAL_TO,
|
|
1168
|
+
Operator.GREATER_THAN,
|
|
1169
|
+
Operator.GREATER_THAN_OR_EQUAL_TO,
|
|
1170
|
+
Operator.LESS_THAN,
|
|
1171
|
+
Operator.LESS_THAN_OR_EQUAL_TO,
|
|
1172
|
+
];
|
|
1173
|
+
this.operatorItems$ = this.translateService
|
|
1174
|
+
.stream('key')
|
|
1175
|
+
.pipe(map(() => this._OPERATORS.map(operator => ({
|
|
1176
|
+
id: operator,
|
|
1177
|
+
content: this.widgetTranslationService.instant(operator, this.dataSourceKey),
|
|
1178
|
+
selected: false,
|
|
1179
|
+
}))));
|
|
1180
|
+
this.defaultConditionValues$ = new BehaviorSubject(null);
|
|
1181
|
+
this.allConditionsValid$ = new BehaviorSubject(true);
|
|
1182
|
+
this.configurationEvent = new EventEmitter();
|
|
1183
|
+
this._subscriptions = new Subscription();
|
|
1184
|
+
}
|
|
1185
|
+
set disabled(disabledValue) {
|
|
1186
|
+
if (disabledValue) {
|
|
1187
|
+
this.form.disable();
|
|
1188
|
+
}
|
|
1189
|
+
else {
|
|
1190
|
+
this.form.enable();
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
get documentDefinition() {
|
|
1194
|
+
return this.form.get('documentDefinition');
|
|
1195
|
+
}
|
|
1196
|
+
get queryConditions() {
|
|
1197
|
+
return this.form.get('queryConditions');
|
|
1198
|
+
}
|
|
1199
|
+
set prefillConfiguration(configurationValue) {
|
|
1200
|
+
if (configurationValue) {
|
|
1201
|
+
this.documentDefinitionSelected({
|
|
1202
|
+
item: {
|
|
1203
|
+
content: configurationValue.documentDefinition,
|
|
1204
|
+
},
|
|
1205
|
+
});
|
|
1206
|
+
this.defaultConditionValues$.next(configurationValue.queryConditions.map(condition => ({
|
|
1207
|
+
key: condition.queryPath,
|
|
1208
|
+
dropdown: condition.queryOperator,
|
|
1209
|
+
value: condition.queryValue,
|
|
1210
|
+
})));
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
ngOnInit() {
|
|
1214
|
+
this.openFormSubscription();
|
|
1215
|
+
}
|
|
1216
|
+
ngOnDestroy() {
|
|
1217
|
+
this._subscriptions.unsubscribe();
|
|
1218
|
+
}
|
|
1219
|
+
documentDefinitionSelected(documentDefinitionItem) {
|
|
1220
|
+
if (!documentDefinitionItem) {
|
|
1221
|
+
return;
|
|
1222
|
+
}
|
|
1223
|
+
this._selectedDocumentDefinition$.next(documentDefinitionItem?.item?.content);
|
|
1224
|
+
this.documentDefinition.setValue(documentDefinitionItem?.item?.content);
|
|
1225
|
+
}
|
|
1226
|
+
conditionsValueChange(values) {
|
|
1227
|
+
if (values.length === 0) {
|
|
1228
|
+
this.queryConditions.setValue(null);
|
|
1229
|
+
}
|
|
1230
|
+
else {
|
|
1231
|
+
this.queryConditions.setValue(values.map(value => ({
|
|
1232
|
+
queryPath: value.key,
|
|
1233
|
+
queryOperator: value.dropdown,
|
|
1234
|
+
queryValue: value.value,
|
|
1235
|
+
})));
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
onAllConditionsValid(allConditionsValid) {
|
|
1239
|
+
this.allConditionsValid$.next(allConditionsValid);
|
|
1240
|
+
}
|
|
1241
|
+
openFormSubscription() {
|
|
1242
|
+
this._subscriptions.add(combineLatest([
|
|
1243
|
+
this.form.valueChanges.pipe(startWith(this.form.value)),
|
|
1244
|
+
this.allConditionsValid$,
|
|
1245
|
+
]).subscribe(([formValue, allConditionsValid]) => {
|
|
1246
|
+
this.configurationEvent.emit({
|
|
1247
|
+
valid: this.form.valid && allConditionsValid,
|
|
1248
|
+
data: formValue,
|
|
1249
|
+
});
|
|
1250
|
+
}));
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
CaseCountConfigurationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CaseCountConfigurationComponent, deps: [{ token: i1$3.FormBuilder }, { token: i2$2.DocumentService }, { token: i1$1.TranslateService }, { token: WidgetTranslationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1254
|
+
CaseCountConfigurationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: CaseCountConfigurationComponent, selector: "ng-component", inputs: { dataSourceKey: "dataSourceKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<form\n class=\"case-count-configuration-form\"\n *ngIf=\"{documentItems: documentItems$ | async, operatorItems: operatorItems$} as obs\"\n [formGroup]=\"form\"\n>\n <div class=\"form__element\">\n <cds-dropdown\n formControlName=\"documentDefinition\"\n [helperText]=\"'documentDefinitionHelperText' | widgetTranslate : dataSourceKey | async\"\n [invalidText]=\"'documentDefinitionHelperText' | widgetTranslate : dataSourceKey | async\"\n [invalid]=\"documentDefinition.dirty && documentDefinition.invalid\"\n [label]=\"'documentDefinition' | widgetTranslate : dataSourceKey | async\"\n (selected)=\"documentDefinitionSelected($event)\"\n >\n <cds-dropdown-list [items]=\"obs?.documentItems || []\" type=\"multi\"></cds-dropdown-list>\n </cds-dropdown>\n </div>\n\n <div class=\"form__element conditions-multi-input\">\n <cds-label\n [helperText]=\"'conditionsHelperText' | widgetTranslate : dataSourceKey | async\"\n class=\"conditions-label\"\n >{{ 'conditions' | widgetTranslate : dataSourceKey | async }}</cds-label\n >\n <valtimo-carbon-multi-input\n [addRowText]=\"'addCondition' | widgetTranslate : dataSourceKey | async\"\n [defaultValues]=\"defaultConditionValues$ | async\"\n [dropdownColumnTitle]=\"'operator' | widgetTranslate : dataSourceKey | async\"\n [dropdownItems]=\"operatorItems$ | async\"\n [fullWidth]=\"true\"\n [initialAmountOfRows]=\"0\"\n [keyColumnTitle]=\"'path' | widgetTranslate : dataSourceKey | async\"\n [minimumAmountOfRows]=\"0\"\n [valueColumnTitle]=\"'value' | widgetTranslate : dataSourceKey | async\"\n type=\"keyDropdownValue\"\n (allValuesValidEvent)=\"onAllConditionsValid($event)\"\n (valueChange)=\"conditionsValueChange($event)\"\n ></valtimo-carbon-multi-input>\n </div>\n</form>\n", styles: ["/*!\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.case-count-configuration-form .conditions-label{margin-bottom:16px}.case-count-configuration-form .conditions-multi-input .cds--form__helper-text{font-style:italic}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4$1.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "component", type: i4$1.Dropdown, selector: "cds-dropdown, ibm-dropdown", inputs: ["id", "label", "helperText", "placeholder", "displayValue", "clearText", "size", "type", "theme", "disabled", "skeleton", "inline", "disableArrowKeys", "invalid", "invalidText", "warn", "warnText", "appendInline", "scrollableContainer", "itemValueKey", "selectionFeedback", "menuButtonLabel", "selectedLabel", "dropUp"], outputs: ["selected", "onClose", "close"] }, { kind: "component", type: i4$1.DropdownList, selector: "cds-dropdown-list, ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }, { kind: "component", type: i4.CarbonMultiInputComponent, selector: "valtimo-carbon-multi-input", inputs: ["name", "title", "titleTranslationKey", "type", "initialAmountOfRows", "minimumAmountOfRows", "maxRows", "addRowText", "addRowTranslationKey", "deleteRowText", "deleteRowTranslationKey", "disabled", "defaultValues", "margin", "tooltip", "required", "keyColumnTitle", "valueColumnTitle", "dropdownColumnTitle", "hideDeleteButton", "hideAddButton", "dropdownItems", "dropdownWidth", "fullWidth"], outputs: ["valueChange", "allValuesValidEvent"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: WidgetTranslatePipe, name: "widgetTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1255
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CaseCountConfigurationComponent, decorators: [{
|
|
1256
|
+
type: Component,
|
|
1257
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<form\n class=\"case-count-configuration-form\"\n *ngIf=\"{documentItems: documentItems$ | async, operatorItems: operatorItems$} as obs\"\n [formGroup]=\"form\"\n>\n <div class=\"form__element\">\n <cds-dropdown\n formControlName=\"documentDefinition\"\n [helperText]=\"'documentDefinitionHelperText' | widgetTranslate : dataSourceKey | async\"\n [invalidText]=\"'documentDefinitionHelperText' | widgetTranslate : dataSourceKey | async\"\n [invalid]=\"documentDefinition.dirty && documentDefinition.invalid\"\n [label]=\"'documentDefinition' | widgetTranslate : dataSourceKey | async\"\n (selected)=\"documentDefinitionSelected($event)\"\n >\n <cds-dropdown-list [items]=\"obs?.documentItems || []\" type=\"multi\"></cds-dropdown-list>\n </cds-dropdown>\n </div>\n\n <div class=\"form__element conditions-multi-input\">\n <cds-label\n [helperText]=\"'conditionsHelperText' | widgetTranslate : dataSourceKey | async\"\n class=\"conditions-label\"\n >{{ 'conditions' | widgetTranslate : dataSourceKey | async }}</cds-label\n >\n <valtimo-carbon-multi-input\n [addRowText]=\"'addCondition' | widgetTranslate : dataSourceKey | async\"\n [defaultValues]=\"defaultConditionValues$ | async\"\n [dropdownColumnTitle]=\"'operator' | widgetTranslate : dataSourceKey | async\"\n [dropdownItems]=\"operatorItems$ | async\"\n [fullWidth]=\"true\"\n [initialAmountOfRows]=\"0\"\n [keyColumnTitle]=\"'path' | widgetTranslate : dataSourceKey | async\"\n [minimumAmountOfRows]=\"0\"\n [valueColumnTitle]=\"'value' | widgetTranslate : dataSourceKey | async\"\n type=\"keyDropdownValue\"\n (allValuesValidEvent)=\"onAllConditionsValid($event)\"\n (valueChange)=\"conditionsValueChange($event)\"\n ></valtimo-carbon-multi-input>\n </div>\n</form>\n", styles: ["/*!\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.case-count-configuration-form .conditions-label{margin-bottom:16px}.case-count-configuration-form .conditions-multi-input .cds--form__helper-text{font-style:italic}\n"] }]
|
|
1258
|
+
}], ctorParameters: function () { return [{ type: i1$3.FormBuilder }, { type: i2$2.DocumentService }, { type: i1$1.TranslateService }, { type: WidgetTranslationService }]; }, propDecorators: { dataSourceKey: [{
|
|
1259
|
+
type: Input
|
|
1260
|
+
}], disabled: [{
|
|
1261
|
+
type: Input
|
|
1262
|
+
}], prefillConfiguration: [{
|
|
1263
|
+
type: Input
|
|
1264
|
+
}], configurationEvent: [{
|
|
1265
|
+
type: Output
|
|
1266
|
+
}] } });
|
|
1267
|
+
|
|
1268
|
+
/*
|
|
1269
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1270
|
+
*
|
|
1271
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1272
|
+
* you may not use this file except in compliance with the License.
|
|
1273
|
+
* You may obtain a copy of the License at
|
|
1274
|
+
*
|
|
1275
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1276
|
+
*
|
|
1277
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1278
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1279
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1280
|
+
* See the License for the specific language governing permissions and
|
|
1281
|
+
* limitations under the License.
|
|
1282
|
+
*/
|
|
1283
|
+
|
|
1284
|
+
/*
|
|
1285
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1286
|
+
*
|
|
1287
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1288
|
+
* you may not use this file except in compliance with the License.
|
|
1289
|
+
* You may obtain a copy of the License at
|
|
1290
|
+
*
|
|
1291
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1292
|
+
*
|
|
1293
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1294
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1295
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1296
|
+
* See the License for the specific language governing permissions and
|
|
1297
|
+
* limitations under the License.
|
|
1298
|
+
*/
|
|
1299
|
+
|
|
1300
|
+
/*
|
|
1301
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1302
|
+
*
|
|
1303
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1304
|
+
* you may not use this file except in compliance with the License.
|
|
1305
|
+
* You may obtain a copy of the License at
|
|
1306
|
+
*
|
|
1307
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1308
|
+
*
|
|
1309
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1310
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1311
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1312
|
+
* See the License for the specific language governing permissions and
|
|
1313
|
+
* limitations under the License.
|
|
1314
|
+
*/
|
|
1315
|
+
const caseCountDataSourceSpecification = {
|
|
1316
|
+
dataSourceKey: 'case-count',
|
|
1317
|
+
configurationComponent: CaseCountConfigurationComponent,
|
|
1318
|
+
translations: {
|
|
1319
|
+
de: {
|
|
1320
|
+
title: 'Fallzahl',
|
|
1321
|
+
documentDefinition: 'Falltyp (erforderlich)',
|
|
1322
|
+
documentDefinitionHelperText: 'Der Falltyp, für den die Anzahl abgerufen wird',
|
|
1323
|
+
'!=': 'Nicht gleichzusetzen mit',
|
|
1324
|
+
'==': 'Gleich',
|
|
1325
|
+
'>': 'Größer als',
|
|
1326
|
+
'>=': 'Größer als oder gleich wie',
|
|
1327
|
+
'<': 'Weniger als',
|
|
1328
|
+
'<=': 'Gleich oder kleiner als',
|
|
1329
|
+
path: 'Pfad',
|
|
1330
|
+
operator: 'Operator',
|
|
1331
|
+
value: 'Wert',
|
|
1332
|
+
conditions: 'Bedingungen',
|
|
1333
|
+
conditionsHelperText: "Geben Sie optionale Bedingungen zum Abrufen der Anzahl der Fälle für den ausgewählten Falltyp an. Zum Beispiel: 'case:createdBy', 'Gleich', 'test@test.com'.",
|
|
1334
|
+
addCondition: 'Bedingung hinzufügen',
|
|
1335
|
+
},
|
|
1336
|
+
en: {
|
|
1337
|
+
title: 'Case count',
|
|
1338
|
+
documentDefinition: 'Case type (required)',
|
|
1339
|
+
documentDefinitionHelperText: 'The case type for which the count is retrieved',
|
|
1340
|
+
'!=': 'Not equal to',
|
|
1341
|
+
'==': 'Equal to',
|
|
1342
|
+
'>': 'Greater than',
|
|
1343
|
+
'>=': 'Greater than or equal to',
|
|
1344
|
+
'<': 'Less than',
|
|
1345
|
+
'<=': 'Less than or equal to',
|
|
1346
|
+
path: 'Path (required)',
|
|
1347
|
+
operator: 'Operator',
|
|
1348
|
+
value: 'Value',
|
|
1349
|
+
conditions: 'Conditions',
|
|
1350
|
+
conditionsHelperText: "Specify optional conditions for retrieving the number of cases for the selected case type. For example: 'case:createdBy', 'Equal to', 'test@test.com'.",
|
|
1351
|
+
addCondition: 'Add condition',
|
|
1352
|
+
},
|
|
1353
|
+
nl: {
|
|
1354
|
+
title: 'Aantal dossiers',
|
|
1355
|
+
documentDefinition: 'Dossiertype (vereist)',
|
|
1356
|
+
documentDefinitionHelperText: 'Het dossiertype waarvoor de telling wordt opgehaald',
|
|
1357
|
+
'!=': 'Niet gelijk aan',
|
|
1358
|
+
'==': 'Gelijk aan',
|
|
1359
|
+
'>': 'Groter dan',
|
|
1360
|
+
'>=': 'Groter dan of gelijk aan',
|
|
1361
|
+
'<': 'Minder dan',
|
|
1362
|
+
'<=': 'Minder dan of gelijk aan',
|
|
1363
|
+
path: 'Pad',
|
|
1364
|
+
operator: 'Operator',
|
|
1365
|
+
value: 'Waarde',
|
|
1366
|
+
conditions: 'Condities',
|
|
1367
|
+
conditionsHelperText: "Geef optionele condities op voor het ophalen van het aantal zaken voor het geselecteerde zaaktype. Bijvoorbeeld: 'case:createdBy', 'Gelijk aan', 'test@test.com'.",
|
|
1368
|
+
addCondition: 'Conditie toevoegen',
|
|
1369
|
+
},
|
|
1370
|
+
},
|
|
1371
|
+
};
|
|
1372
|
+
|
|
1373
|
+
/*
|
|
1374
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1375
|
+
*
|
|
1376
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1377
|
+
* you may not use this file except in compliance with the License.
|
|
1378
|
+
* You may obtain a copy of the License at
|
|
1379
|
+
*
|
|
1380
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1381
|
+
*
|
|
1382
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1383
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1384
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1385
|
+
* See the License for the specific language governing permissions and
|
|
1386
|
+
* limitations under the License.
|
|
1387
|
+
*/
|
|
1388
|
+
class CaseCountDataSourceModule {
|
|
1389
|
+
}
|
|
1390
|
+
CaseCountDataSourceModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CaseCountDataSourceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1391
|
+
CaseCountDataSourceModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: CaseCountDataSourceModule, declarations: [CaseCountConfigurationComponent], imports: [CommonModule,
|
|
1392
|
+
ReactiveFormsModule,
|
|
1393
|
+
WidgetTranslatePipeModule,
|
|
1394
|
+
InputModule,
|
|
1395
|
+
DropdownModule,
|
|
1396
|
+
CarbonMultiInputModule], exports: [CaseCountConfigurationComponent] });
|
|
1397
|
+
CaseCountDataSourceModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CaseCountDataSourceModule, providers: [
|
|
1398
|
+
{ provide: DATA_SOURCE_TOKEN, useValue: caseCountDataSourceSpecification, multi: true },
|
|
1399
|
+
], imports: [CommonModule,
|
|
1400
|
+
ReactiveFormsModule,
|
|
1401
|
+
WidgetTranslatePipeModule,
|
|
1402
|
+
InputModule,
|
|
1403
|
+
DropdownModule,
|
|
1404
|
+
CarbonMultiInputModule] });
|
|
1405
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CaseCountDataSourceModule, decorators: [{
|
|
1406
|
+
type: NgModule,
|
|
1407
|
+
args: [{
|
|
1408
|
+
declarations: [CaseCountConfigurationComponent],
|
|
1409
|
+
imports: [
|
|
1410
|
+
CommonModule,
|
|
1411
|
+
ReactiveFormsModule,
|
|
1412
|
+
WidgetTranslatePipeModule,
|
|
1413
|
+
InputModule,
|
|
1414
|
+
DropdownModule,
|
|
1415
|
+
CarbonMultiInputModule,
|
|
1416
|
+
],
|
|
1417
|
+
exports: [CaseCountConfigurationComponent],
|
|
1418
|
+
providers: [
|
|
1419
|
+
{ provide: DATA_SOURCE_TOKEN, useValue: caseCountDataSourceSpecification, multi: true },
|
|
1420
|
+
],
|
|
1421
|
+
}]
|
|
1422
|
+
}] });
|
|
1423
|
+
|
|
1424
|
+
/*
|
|
1425
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1426
|
+
*
|
|
1427
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1428
|
+
* you may not use this file except in compliance with the License.
|
|
1429
|
+
* You may obtain a copy of the License at
|
|
1430
|
+
*
|
|
1431
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1432
|
+
*
|
|
1433
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1434
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1435
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1436
|
+
* See the License for the specific language governing permissions and
|
|
1437
|
+
* limitations under the License.
|
|
1438
|
+
*/
|
|
1439
|
+
|
|
1440
|
+
/*
|
|
1441
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1442
|
+
*
|
|
1443
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1444
|
+
* you may not use this file except in compliance with the License.
|
|
1445
|
+
* You may obtain a copy of the License at
|
|
1446
|
+
*
|
|
1447
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1448
|
+
*
|
|
1449
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1450
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1451
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1452
|
+
* See the License for the specific language governing permissions and
|
|
1453
|
+
* limitations under the License.
|
|
1454
|
+
*/
|
|
1455
|
+
|
|
1456
|
+
/*
|
|
1457
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1458
|
+
*
|
|
1459
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1460
|
+
* you may not use this file except in compliance with the License.
|
|
1461
|
+
* You may obtain a copy of the License at
|
|
1462
|
+
*
|
|
1463
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1464
|
+
*
|
|
1465
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1466
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1467
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1468
|
+
* See the License for the specific language governing permissions and
|
|
1469
|
+
* limitations under the License.
|
|
1470
|
+
*/
|
|
1471
|
+
|
|
1472
|
+
/*
|
|
1473
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1474
|
+
*
|
|
1475
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1476
|
+
* you may not use this file except in compliance with the License.
|
|
1477
|
+
* You may obtain a copy of the License at
|
|
1478
|
+
*
|
|
1479
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1480
|
+
*
|
|
1481
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1482
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1483
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1484
|
+
* See the License for the specific language governing permissions and
|
|
1485
|
+
* limitations under the License.
|
|
1486
|
+
*/
|
|
1487
|
+
|
|
1488
|
+
/*
|
|
1489
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1490
|
+
*
|
|
1491
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1492
|
+
* you may not use this file except in compliance with the License.
|
|
1493
|
+
* You may obtain a copy of the License at
|
|
1494
|
+
*
|
|
1495
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1496
|
+
*
|
|
1497
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1498
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1499
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1500
|
+
* See the License for the specific language governing permissions and
|
|
1501
|
+
* limitations under the License.
|
|
1502
|
+
*/
|
|
1503
|
+
class BarChartDisplayComponent {
|
|
1504
|
+
}
|
|
1505
|
+
BarChartDisplayComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BarChartDisplayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1506
|
+
BarChartDisplayComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: BarChartDisplayComponent, selector: "valtimo-bar-chart-display", inputs: { displayTypeKey: "displayTypeKey", data: "data", displayTypeProperties: "displayTypeProperties" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\nbar chart works\n", styles: ["/*!\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */:host{display:flex;padding:20px;width:100%;height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1507
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BarChartDisplayComponent, decorators: [{
|
|
1508
|
+
type: Component,
|
|
1509
|
+
args: [{ selector: 'valtimo-bar-chart-display', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\nbar chart works\n", styles: ["/*!\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */:host{display:flex;padding:20px;width:100%;height:100%}\n"] }]
|
|
1510
|
+
}], propDecorators: { displayTypeKey: [{
|
|
1511
|
+
type: Input
|
|
1512
|
+
}], data: [{
|
|
1513
|
+
type: Input
|
|
1514
|
+
}], displayTypeProperties: [{
|
|
1515
|
+
type: Input
|
|
1516
|
+
}] } });
|
|
1517
|
+
|
|
1518
|
+
/*
|
|
1519
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1520
|
+
*
|
|
1521
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1522
|
+
* you may not use this file except in compliance with the License.
|
|
1523
|
+
* You may obtain a copy of the License at
|
|
1524
|
+
*
|
|
1525
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1526
|
+
*
|
|
1527
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1528
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1529
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1530
|
+
* See the License for the specific language governing permissions and
|
|
1531
|
+
* limitations under the License.
|
|
1532
|
+
*/
|
|
1533
|
+
|
|
1534
|
+
/*
|
|
1535
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1536
|
+
*
|
|
1537
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1538
|
+
* you may not use this file except in compliance with the License.
|
|
1539
|
+
* You may obtain a copy of the License at
|
|
1540
|
+
*
|
|
1541
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1542
|
+
*
|
|
1543
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1544
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1545
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1546
|
+
* See the License for the specific language governing permissions and
|
|
1547
|
+
* limitations under the License.
|
|
1548
|
+
*/
|
|
1549
|
+
|
|
1550
|
+
/*
|
|
1551
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1552
|
+
*
|
|
1553
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1554
|
+
* you may not use this file except in compliance with the License.
|
|
1555
|
+
* You may obtain a copy of the License at
|
|
1556
|
+
*
|
|
1557
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1558
|
+
*
|
|
1559
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1560
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1561
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1562
|
+
* See the License for the specific language governing permissions and
|
|
1563
|
+
* limitations under the License.
|
|
1564
|
+
*/
|
|
1565
|
+
const barChartSpecification = {
|
|
1566
|
+
displayTypeKey: 'bar-chart',
|
|
1567
|
+
displayComponent: BarChartDisplayComponent,
|
|
1568
|
+
width: 1,
|
|
1569
|
+
height: 2,
|
|
1570
|
+
translations: {
|
|
1571
|
+
nl: {
|
|
1572
|
+
title: 'Staafdiagram',
|
|
1573
|
+
},
|
|
1574
|
+
en: {
|
|
1575
|
+
title: 'Bar chart',
|
|
1576
|
+
},
|
|
1577
|
+
de: {
|
|
1578
|
+
title: 'Balkendiagramm',
|
|
1579
|
+
},
|
|
1580
|
+
},
|
|
1581
|
+
requiredDataFeatures: [],
|
|
1582
|
+
};
|
|
1583
|
+
|
|
1584
|
+
/*
|
|
1585
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1586
|
+
*
|
|
1587
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1588
|
+
* you may not use this file except in compliance with the License.
|
|
1589
|
+
* You may obtain a copy of the License at
|
|
1590
|
+
*
|
|
1591
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1592
|
+
*
|
|
1593
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1594
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1595
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1596
|
+
* See the License for the specific language governing permissions and
|
|
1597
|
+
* limitations under the License.
|
|
1598
|
+
*/
|
|
1599
|
+
class BarChartModule {
|
|
1600
|
+
}
|
|
1601
|
+
BarChartModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BarChartModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1602
|
+
BarChartModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: BarChartModule, declarations: [BarChartDisplayComponent], imports: [CommonModule], exports: [BarChartDisplayComponent] });
|
|
1603
|
+
BarChartModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BarChartModule, providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: barChartSpecification, multi: true }], imports: [CommonModule] });
|
|
1604
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BarChartModule, decorators: [{
|
|
1605
|
+
type: NgModule,
|
|
1606
|
+
args: [{
|
|
1607
|
+
declarations: [BarChartDisplayComponent],
|
|
1608
|
+
imports: [CommonModule],
|
|
1609
|
+
exports: [BarChartDisplayComponent],
|
|
1610
|
+
providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: barChartSpecification, multi: true }],
|
|
1611
|
+
}]
|
|
1612
|
+
}] });
|
|
1613
|
+
|
|
1614
|
+
/*
|
|
1615
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1616
|
+
*
|
|
1617
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1618
|
+
* you may not use this file except in compliance with the License.
|
|
1619
|
+
* You may obtain a copy of the License at
|
|
1620
|
+
*
|
|
1621
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1622
|
+
*
|
|
1623
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1624
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1625
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1626
|
+
* See the License for the specific language governing permissions and
|
|
1627
|
+
* limitations under the License.
|
|
1628
|
+
*/
|
|
1629
|
+
|
|
1630
|
+
/*
|
|
1631
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1632
|
+
*
|
|
1633
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1634
|
+
* you may not use this file except in compliance with the License.
|
|
1635
|
+
* You may obtain a copy of the License at
|
|
1636
|
+
*
|
|
1637
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1638
|
+
*
|
|
1639
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1640
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1641
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1642
|
+
* See the License for the specific language governing permissions and
|
|
1643
|
+
* limitations under the License.
|
|
1644
|
+
*/
|
|
1645
|
+
class BigNumberConfigurationComponent {
|
|
1646
|
+
constructor(fb) {
|
|
1647
|
+
this.fb = fb;
|
|
1648
|
+
this.form = this.fb.group({
|
|
1649
|
+
title: this.fb.control('', [Validators.required]),
|
|
1650
|
+
subtitle: this.fb.control(''),
|
|
1651
|
+
label: this.fb.control(''),
|
|
1652
|
+
useKPI: this.fb.control(false, [Validators.required]),
|
|
1653
|
+
lowSeverityThreshold: this.fb.control(null),
|
|
1654
|
+
mediumSeverityThreshold: this.fb.control(null),
|
|
1655
|
+
highSeverityThreshold: this.fb.control(null),
|
|
1656
|
+
});
|
|
1657
|
+
this.configurationEvent = new EventEmitter();
|
|
1658
|
+
this._subscriptions = new Subscription();
|
|
1659
|
+
}
|
|
1660
|
+
set disabled(disabledValue) {
|
|
1661
|
+
if (disabledValue) {
|
|
1662
|
+
this.form.disable();
|
|
1663
|
+
}
|
|
1664
|
+
else {
|
|
1665
|
+
this.form.enable();
|
|
1666
|
+
}
|
|
1667
|
+
}
|
|
1668
|
+
get title() {
|
|
1669
|
+
return this.form.get('title');
|
|
1670
|
+
}
|
|
1671
|
+
get subtitle() {
|
|
1672
|
+
return this.form.get('subtitle');
|
|
1673
|
+
}
|
|
1674
|
+
get label() {
|
|
1675
|
+
return this.form.get('label');
|
|
1676
|
+
}
|
|
1677
|
+
get useKPI() {
|
|
1678
|
+
return this.form.get('useKPI');
|
|
1679
|
+
}
|
|
1680
|
+
get lowSeverityThreshold() {
|
|
1681
|
+
return this.form.get('lowSeverityThreshold');
|
|
1682
|
+
}
|
|
1683
|
+
get mediumSeverityThreshold() {
|
|
1684
|
+
return this.form.get('mediumSeverityThreshold');
|
|
1685
|
+
}
|
|
1686
|
+
get highSeverityThreshold() {
|
|
1687
|
+
return this.form.get('highSeverityThreshold');
|
|
1688
|
+
}
|
|
1689
|
+
set prefillConfiguration(configurationValue) {
|
|
1690
|
+
if (configurationValue) {
|
|
1691
|
+
this.title.setValue(configurationValue.title || '');
|
|
1692
|
+
this.subtitle.setValue(configurationValue.subtitle || '');
|
|
1693
|
+
this.label.setValue(configurationValue.label || '');
|
|
1694
|
+
this.useKPI.setValue(configurationValue.useKPI || false);
|
|
1695
|
+
this.lowSeverityThreshold.setValue(configurationValue.lowSeverityThreshold || null);
|
|
1696
|
+
this.mediumSeverityThreshold.setValue(configurationValue.mediumSeverityThreshold || null);
|
|
1697
|
+
this.highSeverityThreshold.setValue(configurationValue.highSeverityThreshold || null);
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
ngOnInit() {
|
|
1701
|
+
this.openFormSubscription();
|
|
1702
|
+
this.openKPISubscription();
|
|
1703
|
+
}
|
|
1704
|
+
ngOnDestroy() {
|
|
1705
|
+
this._subscriptions.unsubscribe();
|
|
1706
|
+
}
|
|
1707
|
+
openFormSubscription() {
|
|
1708
|
+
this._subscriptions.add(this.form.valueChanges.pipe(startWith(this.form.value)).subscribe(formValue => {
|
|
1709
|
+
this.configurationEvent.emit({ valid: this.form.valid, data: formValue });
|
|
1710
|
+
}));
|
|
1711
|
+
}
|
|
1712
|
+
openKPISubscription() {
|
|
1713
|
+
this._subscriptions.add(this.useKPI.valueChanges.pipe(startWith(this.useKPI.value)).subscribe(useKpi => {
|
|
1714
|
+
const validators = [Validators.required];
|
|
1715
|
+
if (useKpi) {
|
|
1716
|
+
this.lowSeverityThreshold.setValidators(validators);
|
|
1717
|
+
this.mediumSeverityThreshold.setValidators(validators);
|
|
1718
|
+
this.highSeverityThreshold.setValidators(validators);
|
|
1719
|
+
}
|
|
1720
|
+
else {
|
|
1721
|
+
this.lowSeverityThreshold.clearValidators();
|
|
1722
|
+
this.mediumSeverityThreshold.clearValidators();
|
|
1723
|
+
this.highSeverityThreshold.clearValidators();
|
|
1724
|
+
}
|
|
1725
|
+
this.lowSeverityThreshold.updateValueAndValidity();
|
|
1726
|
+
this.mediumSeverityThreshold.updateValueAndValidity();
|
|
1727
|
+
this.highSeverityThreshold.updateValueAndValidity();
|
|
1728
|
+
}));
|
|
1729
|
+
}
|
|
1730
|
+
}
|
|
1731
|
+
BigNumberConfigurationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BigNumberConfigurationComponent, deps: [{ token: i1$3.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
1732
|
+
BigNumberConfigurationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: BigNumberConfigurationComponent, selector: "ng-component", inputs: { displayTypeKey: "displayTypeKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<form [formGroup]=\"form\">\n <div class=\"form__element\">\n <cds-label\n [helperText]=\"'formTitleHelperText' | widgetTranslate : displayTypeKey | async\"\n [invalidText]=\"'formTitleHelperText' | widgetTranslate : displayTypeKey | async\"\n [invalid]=\"title.dirty && title.invalid\"\n >\n {{ 'formTitle' | widgetTranslate : displayTypeKey | async }}\n\n <input cdsText formControlName=\"title\" [invalid]=\"title.dirty && title.invalid\" />\n </cds-label>\n </div>\n\n <div class=\"form__element\">\n <cds-label\n [helperText]=\"'subtitleHelperText' | widgetTranslate : displayTypeKey | async\"\n [invalidText]=\"'subtitleHelperText' | widgetTranslate : displayTypeKey | async\"\n [invalid]=\"subtitle.dirty && subtitle.invalid\"\n >\n {{ 'subtitle' | widgetTranslate : displayTypeKey | async }}\n\n <input cdsText formControlName=\"subtitle\" [invalid]=\"subtitle.dirty && subtitle.invalid\" />\n </cds-label>\n </div>\n\n <div class=\"form__element\">\n <cds-label\n [helperText]=\"'labelHelperText' | widgetTranslate : displayTypeKey | async\"\n [invalidText]=\"'labelHelperText' | widgetTranslate : displayTypeKey | async\"\n [invalid]=\"label.dirty && label.invalid\"\n >\n {{ 'label' | widgetTranslate : displayTypeKey | async }}\n\n <input cdsText formControlName=\"label\" [invalid]=\"label.dirty && label.invalid\" />\n </cds-label>\n </div>\n\n <div class=\"form__element\">\n <cds-checkbox formControlName=\"useKPI\">\n {{ 'useKPI' | widgetTranslate : displayTypeKey | async }}\n </cds-checkbox>\n </div>\n\n <div class=\"form__row\" *ngIf=\"useKPI.value\">\n <div class=\"form__element\">\n <cds-label [invalid]=\"lowSeverityThreshold.dirty && lowSeverityThreshold.invalid\">\n {{ 'lowSeverityThreshold' | widgetTranslate : displayTypeKey | async }}\n\n <input\n cdsText\n [invalid]=\"lowSeverityThreshold.dirty && lowSeverityThreshold.invalid\"\n formControlName=\"lowSeverityThreshold\"\n type=\"number\"\n />\n </cds-label>\n </div>\n\n <div class=\"form__spacer\"></div>\n\n <div class=\"form__element\">\n <cds-label [invalid]=\"mediumSeverityThreshold.dirty && mediumSeverityThreshold.invalid\">\n {{ 'mediumSeverityThreshold' | widgetTranslate : displayTypeKey | async }}\n\n <input\n cdsText\n formControlName=\"mediumSeverityThreshold\"\n [invalid]=\"mediumSeverityThreshold.dirty && mediumSeverityThreshold.invalid\"\n type=\"number\"\n />\n </cds-label>\n </div>\n\n <div class=\"form__spacer\"></div>\n\n <div class=\"form__element\">\n <cds-label [invalid]=\"highSeverityThreshold.dirty && highSeverityThreshold.invalid\">\n {{ 'highSeverityThreshold' | widgetTranslate : displayTypeKey | async }}\n\n <input\n cdsText\n formControlName=\"highSeverityThreshold\"\n [invalid]=\"highSeverityThreshold.dirty && highSeverityThreshold.invalid\"\n type=\"number\"\n />\n </cds-label>\n </div>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4$1.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i4$1.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "component", type: i4$1.Checkbox, selector: "cds-checkbox, ibm-checkbox", inputs: ["disabled", "skeleton", "hideLabel", "name", "id", "required", "value", "ariaLabel", "ariaLabelledby", "indeterminate", "checked"], outputs: ["click", "checkedChange", "indeterminateChange"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: WidgetTranslatePipe, name: "widgetTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1733
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BigNumberConfigurationComponent, decorators: [{
|
|
1734
|
+
type: Component,
|
|
1735
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<form [formGroup]=\"form\">\n <div class=\"form__element\">\n <cds-label\n [helperText]=\"'formTitleHelperText' | widgetTranslate : displayTypeKey | async\"\n [invalidText]=\"'formTitleHelperText' | widgetTranslate : displayTypeKey | async\"\n [invalid]=\"title.dirty && title.invalid\"\n >\n {{ 'formTitle' | widgetTranslate : displayTypeKey | async }}\n\n <input cdsText formControlName=\"title\" [invalid]=\"title.dirty && title.invalid\" />\n </cds-label>\n </div>\n\n <div class=\"form__element\">\n <cds-label\n [helperText]=\"'subtitleHelperText' | widgetTranslate : displayTypeKey | async\"\n [invalidText]=\"'subtitleHelperText' | widgetTranslate : displayTypeKey | async\"\n [invalid]=\"subtitle.dirty && subtitle.invalid\"\n >\n {{ 'subtitle' | widgetTranslate : displayTypeKey | async }}\n\n <input cdsText formControlName=\"subtitle\" [invalid]=\"subtitle.dirty && subtitle.invalid\" />\n </cds-label>\n </div>\n\n <div class=\"form__element\">\n <cds-label\n [helperText]=\"'labelHelperText' | widgetTranslate : displayTypeKey | async\"\n [invalidText]=\"'labelHelperText' | widgetTranslate : displayTypeKey | async\"\n [invalid]=\"label.dirty && label.invalid\"\n >\n {{ 'label' | widgetTranslate : displayTypeKey | async }}\n\n <input cdsText formControlName=\"label\" [invalid]=\"label.dirty && label.invalid\" />\n </cds-label>\n </div>\n\n <div class=\"form__element\">\n <cds-checkbox formControlName=\"useKPI\">\n {{ 'useKPI' | widgetTranslate : displayTypeKey | async }}\n </cds-checkbox>\n </div>\n\n <div class=\"form__row\" *ngIf=\"useKPI.value\">\n <div class=\"form__element\">\n <cds-label [invalid]=\"lowSeverityThreshold.dirty && lowSeverityThreshold.invalid\">\n {{ 'lowSeverityThreshold' | widgetTranslate : displayTypeKey | async }}\n\n <input\n cdsText\n [invalid]=\"lowSeverityThreshold.dirty && lowSeverityThreshold.invalid\"\n formControlName=\"lowSeverityThreshold\"\n type=\"number\"\n />\n </cds-label>\n </div>\n\n <div class=\"form__spacer\"></div>\n\n <div class=\"form__element\">\n <cds-label [invalid]=\"mediumSeverityThreshold.dirty && mediumSeverityThreshold.invalid\">\n {{ 'mediumSeverityThreshold' | widgetTranslate : displayTypeKey | async }}\n\n <input\n cdsText\n formControlName=\"mediumSeverityThreshold\"\n [invalid]=\"mediumSeverityThreshold.dirty && mediumSeverityThreshold.invalid\"\n type=\"number\"\n />\n </cds-label>\n </div>\n\n <div class=\"form__spacer\"></div>\n\n <div class=\"form__element\">\n <cds-label [invalid]=\"highSeverityThreshold.dirty && highSeverityThreshold.invalid\">\n {{ 'highSeverityThreshold' | widgetTranslate : displayTypeKey | async }}\n\n <input\n cdsText\n formControlName=\"highSeverityThreshold\"\n [invalid]=\"highSeverityThreshold.dirty && highSeverityThreshold.invalid\"\n type=\"number\"\n />\n </cds-label>\n </div>\n </div>\n</form>\n" }]
|
|
1736
|
+
}], ctorParameters: function () { return [{ type: i1$3.FormBuilder }]; }, propDecorators: { displayTypeKey: [{
|
|
1737
|
+
type: Input
|
|
1738
|
+
}], disabled: [{
|
|
1739
|
+
type: Input
|
|
1740
|
+
}], prefillConfiguration: [{
|
|
1741
|
+
type: Input
|
|
1742
|
+
}], configurationEvent: [{
|
|
1743
|
+
type: Output
|
|
1744
|
+
}] } });
|
|
1745
|
+
|
|
1746
|
+
/*
|
|
1747
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1748
|
+
*
|
|
1749
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1750
|
+
* you may not use this file except in compliance with the License.
|
|
1751
|
+
* You may obtain a copy of the License at
|
|
1752
|
+
*
|
|
1753
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1754
|
+
*
|
|
1755
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1756
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1757
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1758
|
+
* See the License for the specific language governing permissions and
|
|
1759
|
+
* limitations under the License.
|
|
1760
|
+
*/
|
|
1761
|
+
|
|
1762
|
+
/*
|
|
1763
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1764
|
+
*
|
|
1765
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1766
|
+
* you may not use this file except in compliance with the License.
|
|
1767
|
+
* You may obtain a copy of the License at
|
|
1768
|
+
*
|
|
1769
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1770
|
+
*
|
|
1771
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1772
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1773
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1774
|
+
* See the License for the specific language governing permissions and
|
|
1775
|
+
* limitations under the License.
|
|
1776
|
+
*/
|
|
1777
|
+
|
|
1778
|
+
/*
|
|
1779
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1780
|
+
*
|
|
1781
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1782
|
+
* you may not use this file except in compliance with the License.
|
|
1783
|
+
* You may obtain a copy of the License at
|
|
1784
|
+
*
|
|
1785
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1786
|
+
*
|
|
1787
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1788
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1789
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1790
|
+
* See the License for the specific language governing permissions and
|
|
1791
|
+
* limitations under the License.
|
|
1792
|
+
*/
|
|
1793
|
+
|
|
1794
|
+
/*
|
|
1795
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1796
|
+
*
|
|
1797
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1798
|
+
* you may not use this file except in compliance with the License.
|
|
1799
|
+
* You may obtain a copy of the License at
|
|
1800
|
+
*
|
|
1801
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1802
|
+
*
|
|
1803
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1804
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1805
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1806
|
+
* See the License for the specific language governing permissions and
|
|
1807
|
+
* limitations under the License.
|
|
1808
|
+
*/
|
|
1809
|
+
|
|
1810
|
+
/*
|
|
1811
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1812
|
+
*
|
|
1813
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1814
|
+
* you may not use this file except in compliance with the License.
|
|
1815
|
+
* You may obtain a copy of the License at
|
|
1816
|
+
*
|
|
1817
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1818
|
+
*
|
|
1819
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1820
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1821
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1822
|
+
* See the License for the specific language governing permissions and
|
|
1823
|
+
* limitations under the License.
|
|
1824
|
+
*/
|
|
1825
|
+
|
|
1826
|
+
/*
|
|
1827
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1828
|
+
*
|
|
1829
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1830
|
+
* you may not use this file except in compliance with the License.
|
|
1831
|
+
* You may obtain a copy of the License at
|
|
1832
|
+
*
|
|
1833
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1834
|
+
*
|
|
1835
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1836
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1837
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1838
|
+
* See the License for the specific language governing permissions and
|
|
1839
|
+
* limitations under the License.
|
|
1840
|
+
*/
|
|
1841
|
+
|
|
1842
|
+
/*
|
|
1843
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1844
|
+
*
|
|
1845
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1846
|
+
* you may not use this file except in compliance with the License.
|
|
1847
|
+
* You may obtain a copy of the License at
|
|
1848
|
+
*
|
|
1849
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1850
|
+
*
|
|
1851
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1852
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1853
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1854
|
+
* See the License for the specific language governing permissions and
|
|
1855
|
+
* limitations under the License.
|
|
1856
|
+
*/
|
|
1857
|
+
|
|
1858
|
+
/*
|
|
1859
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1860
|
+
*
|
|
1861
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1862
|
+
* you may not use this file except in compliance with the License.
|
|
1863
|
+
* You may obtain a copy of the License at
|
|
1864
|
+
*
|
|
1865
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1866
|
+
*
|
|
1867
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1868
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1869
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1870
|
+
* See the License for the specific language governing permissions and
|
|
1871
|
+
* limitations under the License.
|
|
1872
|
+
*/
|
|
1873
|
+
var WidgetSeverity;
|
|
1874
|
+
(function (WidgetSeverity) {
|
|
1875
|
+
WidgetSeverity["BLACK"] = "valtimo-severity__black";
|
|
1876
|
+
WidgetSeverity["GREEN"] = "valtimo-severity__green";
|
|
1877
|
+
WidgetSeverity["YELLOW"] = "valtimo-severity__yellow";
|
|
1878
|
+
WidgetSeverity["ORANGE"] = "valtimo-severity__orange";
|
|
1879
|
+
WidgetSeverity["RED"] = "valtimo-severity__red";
|
|
1880
|
+
})(WidgetSeverity || (WidgetSeverity = {}));
|
|
1881
|
+
|
|
1882
|
+
/*
|
|
1883
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1884
|
+
*
|
|
1885
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1886
|
+
* you may not use this file except in compliance with the License.
|
|
1887
|
+
* You may obtain a copy of the License at
|
|
1888
|
+
*
|
|
1889
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1890
|
+
*
|
|
1891
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1892
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1893
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1894
|
+
* See the License for the specific language governing permissions and
|
|
1895
|
+
* limitations under the License.
|
|
1896
|
+
*/
|
|
1897
|
+
|
|
1898
|
+
/*
|
|
1899
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1900
|
+
*
|
|
1901
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1902
|
+
* you may not use this file except in compliance with the License.
|
|
1903
|
+
* You may obtain a copy of the License at
|
|
1904
|
+
*
|
|
1905
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1906
|
+
*
|
|
1907
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1908
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1909
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1910
|
+
* See the License for the specific language governing permissions and
|
|
1911
|
+
* limitations under the License.
|
|
1912
|
+
*/
|
|
1913
|
+
class BigNumberDisplayComponent {
|
|
1914
|
+
get severityClass() {
|
|
1915
|
+
if (!this.displayTypeProperties.useKPI) {
|
|
1916
|
+
return WidgetSeverity.BLACK;
|
|
1917
|
+
}
|
|
1918
|
+
const value = this.data?.value;
|
|
1919
|
+
if (value < this.displayTypeProperties.lowSeverityThreshold) {
|
|
1920
|
+
return WidgetSeverity.GREEN;
|
|
1921
|
+
}
|
|
1922
|
+
else if (value < this.displayTypeProperties.mediumSeverityThreshold) {
|
|
1923
|
+
return WidgetSeverity.YELLOW;
|
|
1924
|
+
}
|
|
1925
|
+
else if (value < this.displayTypeProperties.highSeverityThreshold) {
|
|
1926
|
+
return WidgetSeverity.ORANGE;
|
|
1927
|
+
}
|
|
1928
|
+
return WidgetSeverity.RED;
|
|
1929
|
+
}
|
|
1930
|
+
get numberFontSize() {
|
|
1931
|
+
if (!this.data) {
|
|
1932
|
+
return 122;
|
|
1933
|
+
}
|
|
1934
|
+
return Math.floor(122 / this.data.value.toString().length) + 20;
|
|
1935
|
+
}
|
|
1936
|
+
}
|
|
1937
|
+
BigNumberDisplayComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BigNumberDisplayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1938
|
+
BigNumberDisplayComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: BigNumberDisplayComponent, selector: "valtimo-big-number-display", inputs: { displayTypeKey: "displayTypeKey", data: "data", displayTypeProperties: "displayTypeProperties" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<section class=\"valtimo-big-number-widget__header\">\n <h3 class=\"valtimo-big-number-widget__title\">{{ displayTypeProperties.title }}</h3>\n\n <span *ngIf=\"displayTypeProperties.subtitle\" class=\"valtimo-big-number-widget__subtitle\">\n {{ displayTypeProperties.subtitle }}\n </span>\n</section>\n\n<section class=\"valtimo-big-number-widget__content\">\n <span\n [class]=\"['valtimo-big-number-widget__number', severityClass]\"\n [style.fontSize.px]=\"numberFontSize\"\n >{{ data?.value }}</span\n >\n\n <span *ngIf=\"displayTypeProperties.label\" class=\"valtimo-big-number-widget__label\">\n {{ displayTypeProperties.label }}\n </span>\n</section>\n", styles: ["/*!\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */:host{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%;padding:20px}.valtimo-big-number-widget__title{font-size:20px;margin-bottom:12px}.valtimo-big-number-widget__subtitle{font-size:14px}.valtimo-big-number-widget__number{font-weight:lighter;font-size:122px;line-height:.75em}.valtimo-big-number-widget__label{font-size:12px;margin-left:12px;margin-bottom:-1px}.valtimo-big-number-widget__content{display:flex;align-items:flex-end}.valtimo-severity__black{color:#000}.valtimo-severity__green{color:#42be65}.valtimo-severity__yellow{color:#f1c21b}.valtimo-severity__orange{color:#ff832b}.valtimo-severity__red{color:#da1e28}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1939
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BigNumberDisplayComponent, decorators: [{
|
|
1940
|
+
type: Component,
|
|
1941
|
+
args: [{ selector: 'valtimo-big-number-display', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<section class=\"valtimo-big-number-widget__header\">\n <h3 class=\"valtimo-big-number-widget__title\">{{ displayTypeProperties.title }}</h3>\n\n <span *ngIf=\"displayTypeProperties.subtitle\" class=\"valtimo-big-number-widget__subtitle\">\n {{ displayTypeProperties.subtitle }}\n </span>\n</section>\n\n<section class=\"valtimo-big-number-widget__content\">\n <span\n [class]=\"['valtimo-big-number-widget__number', severityClass]\"\n [style.fontSize.px]=\"numberFontSize\"\n >{{ data?.value }}</span\n >\n\n <span *ngIf=\"displayTypeProperties.label\" class=\"valtimo-big-number-widget__label\">\n {{ displayTypeProperties.label }}\n </span>\n</section>\n", styles: ["/*!\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */:host{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%;padding:20px}.valtimo-big-number-widget__title{font-size:20px;margin-bottom:12px}.valtimo-big-number-widget__subtitle{font-size:14px}.valtimo-big-number-widget__number{font-weight:lighter;font-size:122px;line-height:.75em}.valtimo-big-number-widget__label{font-size:12px;margin-left:12px;margin-bottom:-1px}.valtimo-big-number-widget__content{display:flex;align-items:flex-end}.valtimo-severity__black{color:#000}.valtimo-severity__green{color:#42be65}.valtimo-severity__yellow{color:#f1c21b}.valtimo-severity__orange{color:#ff832b}.valtimo-severity__red{color:#da1e28}\n"] }]
|
|
1942
|
+
}], propDecorators: { displayTypeKey: [{
|
|
1943
|
+
type: Input
|
|
1944
|
+
}], data: [{
|
|
1945
|
+
type: Input
|
|
1946
|
+
}], displayTypeProperties: [{
|
|
1947
|
+
type: Input
|
|
1948
|
+
}] } });
|
|
1949
|
+
|
|
1950
|
+
/*
|
|
1951
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1952
|
+
*
|
|
1953
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1954
|
+
* you may not use this file except in compliance with the License.
|
|
1955
|
+
* You may obtain a copy of the License at
|
|
1956
|
+
*
|
|
1957
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1958
|
+
*
|
|
1959
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1960
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1961
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1962
|
+
* See the License for the specific language governing permissions and
|
|
1963
|
+
* limitations under the License.
|
|
1964
|
+
*/
|
|
1965
|
+
|
|
1966
|
+
/*
|
|
1967
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1968
|
+
*
|
|
1969
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1970
|
+
* you may not use this file except in compliance with the License.
|
|
1971
|
+
* You may obtain a copy of the License at
|
|
1972
|
+
*
|
|
1973
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1974
|
+
*
|
|
1975
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1976
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1977
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1978
|
+
* See the License for the specific language governing permissions and
|
|
1979
|
+
* limitations under the License.
|
|
1980
|
+
*/
|
|
1981
|
+
|
|
1982
|
+
/*
|
|
1983
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
1984
|
+
*
|
|
1985
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1986
|
+
* you may not use this file except in compliance with the License.
|
|
1987
|
+
* You may obtain a copy of the License at
|
|
1988
|
+
*
|
|
1989
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1990
|
+
*
|
|
1991
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1992
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1993
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1994
|
+
* See the License for the specific language governing permissions and
|
|
1995
|
+
* limitations under the License.
|
|
1996
|
+
*/
|
|
1997
|
+
const bigNumberSpecification = {
|
|
1998
|
+
displayTypeKey: 'number',
|
|
1999
|
+
displayComponent: BigNumberDisplayComponent,
|
|
2000
|
+
configurationComponent: BigNumberConfigurationComponent,
|
|
2001
|
+
width: 1,
|
|
2002
|
+
height: 1,
|
|
2003
|
+
translations: {
|
|
2004
|
+
nl: {
|
|
2005
|
+
title: 'Groot getal',
|
|
2006
|
+
formTitle: 'Titel (vereist)',
|
|
2007
|
+
formTitleHelperText: 'De titel die wordt weergegeven in de widget',
|
|
2008
|
+
subtitle: 'Ondertitel',
|
|
2009
|
+
subtitleHelperText: 'De ondertitel weergegeven in de widget',
|
|
2010
|
+
label: 'Label',
|
|
2011
|
+
labelHelperText: 'Het label dat wordt weergegeven in de widget',
|
|
2012
|
+
useKPI: 'KPI gebruiken',
|
|
2013
|
+
lowSeverityThreshold: 'Lage ernstdrempel (vereist)',
|
|
2014
|
+
mediumSeverityThreshold: 'Middelmatige ernstdrempel (vereist)',
|
|
2015
|
+
highSeverityThreshold: 'Hoge ernstdrempel (vereist)',
|
|
2016
|
+
},
|
|
2017
|
+
en: {
|
|
2018
|
+
title: 'Big number',
|
|
2019
|
+
formTitle: 'Title (required)',
|
|
2020
|
+
formTitleHelperText: 'The title displayed in the widget',
|
|
2021
|
+
subtitle: 'Subtitle',
|
|
2022
|
+
subtitleHelperText: 'The subtitle displayed in the widget',
|
|
2023
|
+
label: 'Label',
|
|
2024
|
+
labelHelperText: 'The label displayed in the widget',
|
|
2025
|
+
useKPI: 'Use KPI',
|
|
2026
|
+
lowSeverityThreshold: 'Low severity threshold (required)',
|
|
2027
|
+
mediumSeverityThreshold: 'Medium severity threshold (required)',
|
|
2028
|
+
highSeverityThreshold: 'High severity threshold (required)',
|
|
2029
|
+
},
|
|
2030
|
+
de: {
|
|
2031
|
+
title: 'Große Nummer',
|
|
2032
|
+
formTitle: 'Titel (erforderlich)',
|
|
2033
|
+
formTitleHelperText: 'Der im Widget angezeigte Titel',
|
|
2034
|
+
subtitle: 'Untertitel',
|
|
2035
|
+
subtitleHelperText: 'Der im Widget angezeigte Untertitel',
|
|
2036
|
+
label: 'Beschriftung',
|
|
2037
|
+
labelHelperText: 'Die im Widget angezeigte Beschriftung',
|
|
2038
|
+
useKPI: 'Verwenden Sie KPI',
|
|
2039
|
+
lowSeverityThreshold: 'Niedriger Schweregradschwellenwert (erforderlich)',
|
|
2040
|
+
mediumSeverityThreshold: 'Mittlerer Schweregradschwellenwert (erforderlich)',
|
|
2041
|
+
highSeverityThreshold: 'Hoher Schweregradschwellenwert (erforderlich)',
|
|
2042
|
+
},
|
|
2043
|
+
},
|
|
2044
|
+
requiredDataFeatures: [DATA_FEATURES.NUMBER],
|
|
2045
|
+
};
|
|
2046
|
+
|
|
2047
|
+
/*
|
|
2048
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
2049
|
+
*
|
|
2050
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2051
|
+
* you may not use this file except in compliance with the License.
|
|
2052
|
+
* You may obtain a copy of the License at
|
|
2053
|
+
*
|
|
2054
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2055
|
+
*
|
|
2056
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2057
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2058
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2059
|
+
* See the License for the specific language governing permissions and
|
|
2060
|
+
* limitations under the License.
|
|
2061
|
+
*/
|
|
2062
|
+
class BigNumberModule {
|
|
2063
|
+
}
|
|
2064
|
+
BigNumberModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BigNumberModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2065
|
+
BigNumberModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: BigNumberModule, declarations: [BigNumberDisplayComponent, BigNumberConfigurationComponent], imports: [CommonModule,
|
|
2066
|
+
ReactiveFormsModule,
|
|
2067
|
+
WidgetTranslatePipeModule,
|
|
2068
|
+
InputModule,
|
|
2069
|
+
CheckboxModule], exports: [BigNumberDisplayComponent] });
|
|
2070
|
+
BigNumberModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BigNumberModule, providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: bigNumberSpecification, multi: true }], imports: [CommonModule,
|
|
2071
|
+
ReactiveFormsModule,
|
|
2072
|
+
WidgetTranslatePipeModule,
|
|
2073
|
+
InputModule,
|
|
2074
|
+
CheckboxModule] });
|
|
2075
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BigNumberModule, decorators: [{
|
|
2076
|
+
type: NgModule,
|
|
2077
|
+
args: [{
|
|
2078
|
+
declarations: [BigNumberDisplayComponent, BigNumberConfigurationComponent],
|
|
2079
|
+
imports: [
|
|
2080
|
+
CommonModule,
|
|
2081
|
+
ReactiveFormsModule,
|
|
2082
|
+
WidgetTranslatePipeModule,
|
|
2083
|
+
InputModule,
|
|
2084
|
+
CheckboxModule,
|
|
2085
|
+
],
|
|
2086
|
+
exports: [BigNumberDisplayComponent],
|
|
2087
|
+
providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: bigNumberSpecification, multi: true }],
|
|
2088
|
+
}]
|
|
2089
|
+
}] });
|
|
2090
|
+
|
|
2091
|
+
/*
|
|
2092
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
2093
|
+
*
|
|
2094
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2095
|
+
* you may not use this file except in compliance with the License.
|
|
2096
|
+
* You may obtain a copy of the License at
|
|
2097
|
+
*
|
|
2098
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2099
|
+
*
|
|
2100
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2101
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2102
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2103
|
+
* See the License for the specific language governing permissions and
|
|
2104
|
+
* limitations under the License.
|
|
2105
|
+
*/
|
|
2106
|
+
|
|
2107
|
+
/*
|
|
2108
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
2109
|
+
*
|
|
2110
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2111
|
+
* you may not use this file except in compliance with the License.
|
|
2112
|
+
* You may obtain a copy of the License at
|
|
2113
|
+
*
|
|
2114
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2115
|
+
*
|
|
2116
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2117
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2118
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2119
|
+
* See the License for the specific language governing permissions and
|
|
2120
|
+
* limitations under the License.
|
|
2121
|
+
*/
|
|
2122
|
+
|
|
2123
|
+
/*
|
|
2124
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
2125
|
+
*
|
|
2126
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2127
|
+
* you may not use this file except in compliance with the License.
|
|
2128
|
+
* You may obtain a copy of the License at
|
|
2129
|
+
*
|
|
2130
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2131
|
+
*
|
|
2132
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2133
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2134
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2135
|
+
* See the License for the specific language governing permissions and
|
|
2136
|
+
* limitations under the License.
|
|
2137
|
+
*/
|
|
2138
|
+
|
|
2139
|
+
/*
|
|
2140
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
2141
|
+
*
|
|
2142
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2143
|
+
* you may not use this file except in compliance with the License.
|
|
2144
|
+
* You may obtain a copy of the License at
|
|
2145
|
+
*
|
|
2146
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2147
|
+
*
|
|
2148
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2149
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2150
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2151
|
+
* See the License for the specific language governing permissions and
|
|
2152
|
+
* limitations under the License.
|
|
2153
|
+
*/
|
|
2154
|
+
class MeterDisplayComponent {
|
|
2155
|
+
}
|
|
2156
|
+
MeterDisplayComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MeterDisplayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2157
|
+
MeterDisplayComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: MeterDisplayComponent, selector: "valtimo-meter-display", inputs: { displayTypeKey: "displayTypeKey", data: "data", displayTypeProperties: "displayTypeProperties" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\nmeter works\n", styles: ["/*!\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */:host{display:flex;padding:20px;width:100%;height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2158
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MeterDisplayComponent, decorators: [{
|
|
2159
|
+
type: Component,
|
|
2160
|
+
args: [{ selector: 'valtimo-meter-display', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\nmeter works\n", styles: ["/*!\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */:host{display:flex;padding:20px;width:100%;height:100%}\n"] }]
|
|
2161
|
+
}], propDecorators: { displayTypeKey: [{
|
|
2162
|
+
type: Input
|
|
2163
|
+
}], data: [{
|
|
2164
|
+
type: Input
|
|
2165
|
+
}], displayTypeProperties: [{
|
|
2166
|
+
type: Input
|
|
2167
|
+
}] } });
|
|
2168
|
+
|
|
2169
|
+
/*
|
|
2170
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
2171
|
+
*
|
|
2172
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2173
|
+
* you may not use this file except in compliance with the License.
|
|
2174
|
+
* You may obtain a copy of the License at
|
|
2175
|
+
*
|
|
2176
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2177
|
+
*
|
|
2178
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2179
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2180
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2181
|
+
* See the License for the specific language governing permissions and
|
|
2182
|
+
* limitations under the License.
|
|
2183
|
+
*/
|
|
2184
|
+
|
|
2185
|
+
/*
|
|
2186
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
2187
|
+
*
|
|
2188
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2189
|
+
* you may not use this file except in compliance with the License.
|
|
2190
|
+
* You may obtain a copy of the License at
|
|
2191
|
+
*
|
|
2192
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2193
|
+
*
|
|
2194
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2195
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2196
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2197
|
+
* See the License for the specific language governing permissions and
|
|
2198
|
+
* limitations under the License.
|
|
2199
|
+
*/
|
|
2200
|
+
|
|
2201
|
+
/*
|
|
2202
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
2203
|
+
*
|
|
2204
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2205
|
+
* you may not use this file except in compliance with the License.
|
|
2206
|
+
* You may obtain a copy of the License at
|
|
2207
|
+
*
|
|
2208
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2209
|
+
*
|
|
2210
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2211
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2212
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2213
|
+
* See the License for the specific language governing permissions and
|
|
2214
|
+
* limitations under the License.
|
|
2215
|
+
*/
|
|
2216
|
+
const meterSpecification = {
|
|
2217
|
+
displayTypeKey: 'meter',
|
|
2218
|
+
displayComponent: MeterDisplayComponent,
|
|
2219
|
+
width: 2,
|
|
2220
|
+
height: 1,
|
|
2221
|
+
translations: {
|
|
2222
|
+
nl: {
|
|
2223
|
+
title: 'Meter',
|
|
2224
|
+
},
|
|
2225
|
+
en: {
|
|
2226
|
+
title: 'Meter',
|
|
2227
|
+
},
|
|
2228
|
+
de: {
|
|
2229
|
+
title: 'Meter',
|
|
2230
|
+
},
|
|
2231
|
+
},
|
|
2232
|
+
requiredDataFeatures: [],
|
|
2233
|
+
};
|
|
2234
|
+
|
|
2235
|
+
/*
|
|
2236
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
2237
|
+
*
|
|
2238
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2239
|
+
* you may not use this file except in compliance with the License.
|
|
2240
|
+
* You may obtain a copy of the License at
|
|
2241
|
+
*
|
|
2242
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2243
|
+
*
|
|
2244
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2245
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2246
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2247
|
+
* See the License for the specific language governing permissions and
|
|
2248
|
+
* limitations under the License.
|
|
2249
|
+
*/
|
|
2250
|
+
class MeterModule {
|
|
2251
|
+
}
|
|
2252
|
+
MeterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MeterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2253
|
+
MeterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: MeterModule, declarations: [MeterDisplayComponent], imports: [CommonModule], exports: [MeterDisplayComponent] });
|
|
2254
|
+
MeterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MeterModule, providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: meterSpecification, multi: true }], imports: [CommonModule] });
|
|
2255
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MeterModule, decorators: [{
|
|
2256
|
+
type: NgModule,
|
|
2257
|
+
args: [{
|
|
2258
|
+
declarations: [MeterDisplayComponent],
|
|
2259
|
+
imports: [CommonModule],
|
|
2260
|
+
exports: [MeterDisplayComponent],
|
|
2261
|
+
providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: meterSpecification, multi: true }],
|
|
2262
|
+
}]
|
|
2263
|
+
}] });
|
|
2264
|
+
|
|
2265
|
+
/*
|
|
2266
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
2267
|
+
*
|
|
2268
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2269
|
+
* you may not use this file except in compliance with the License.
|
|
2270
|
+
* You may obtain a copy of the License at
|
|
2271
|
+
*
|
|
2272
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2273
|
+
*
|
|
2274
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2275
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2276
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2277
|
+
* See the License for the specific language governing permissions and
|
|
2278
|
+
* limitations under the License.
|
|
2279
|
+
*/
|
|
2280
|
+
|
|
2281
|
+
/*
|
|
2282
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
2283
|
+
*
|
|
2284
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2285
|
+
* you may not use this file except in compliance with the License.
|
|
2286
|
+
* You may obtain a copy of the License at
|
|
2287
|
+
*
|
|
2288
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2289
|
+
*
|
|
2290
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2291
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2292
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2293
|
+
* See the License for the specific language governing permissions and
|
|
2294
|
+
* limitations under the License.
|
|
2295
|
+
*/
|
|
2296
|
+
|
|
2297
|
+
/*
|
|
2298
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
2299
|
+
*
|
|
2300
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2301
|
+
* you may not use this file except in compliance with the License.
|
|
2302
|
+
* You may obtain a copy of the License at
|
|
2303
|
+
*
|
|
2304
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2305
|
+
*
|
|
2306
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2307
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2308
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2309
|
+
* See the License for the specific language governing permissions and
|
|
2310
|
+
* limitations under the License.
|
|
2311
|
+
*/
|
|
2312
|
+
|
|
2313
|
+
/*
|
|
2314
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
2315
|
+
*
|
|
2316
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
2317
|
+
* you may not use this file except in compliance with the License.
|
|
2318
|
+
* You may obtain a copy of the License at
|
|
2319
|
+
*
|
|
2320
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
2321
|
+
*
|
|
2322
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2323
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
2324
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2325
|
+
* See the License for the specific language governing permissions and
|
|
2326
|
+
* limitations under the License.
|
|
2327
|
+
*/
|
|
205
2328
|
|
|
206
2329
|
/*
|
|
207
2330
|
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
@@ -223,5 +2346,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
223
2346
|
* Generated bundle index. Do not edit.
|
|
224
2347
|
*/
|
|
225
2348
|
|
|
226
|
-
export { DashboardComponent, DashboardModule, HttpLoaderFactory };
|
|
2349
|
+
export { BarChartDisplayComponent, BarChartModule, BigNumberConfigurationComponent, BigNumberDisplayComponent, BigNumberModule, CaseCountConfigurationComponent, CaseCountDataSourceModule, DATA_FEATURES, DATA_SOURCE_TOKEN, DISPLAY_TYPE_TOKEN, DashboardComponent, DashboardModule, DashboardService, HttpLoaderFactory, MeterDisplayComponent, MeterModule, Operator, TestConfigurationComponent, TestDataSourceModule, WIDGET_1X_HEIGHT, WIDGET_1X_MIN_WIDTH, WidgetDashboardComponent, WidgetDashboardContentComponent, WidgetService, WidgetSeverity, WidgetTranslatePipe, WidgetTranslatePipeModule, WidgetTranslationService, barChartSpecification, bigNumberSpecification, caseCountDataSourceSpecification, meterSpecification, testDataSourceSpecification };
|
|
227
2350
|
//# sourceMappingURL=valtimo-dashboard.mjs.map
|