@valtimo/dashboard 12.4.0 → 12.5.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.
Files changed (42) hide show
  1. package/esm2022/lib/dashboard.module.mjs +7 -3
  2. package/esm2022/lib/display-types/bar-chart/bar-chart.module.mjs +68 -0
  3. package/esm2022/lib/display-types/bar-chart/bar-chart.specification.mjs +55 -0
  4. package/esm2022/lib/display-types/bar-chart/components/bar-chart-configuration/bar-chart-configuration.component.mjs +83 -0
  5. package/esm2022/lib/display-types/bar-chart/components/bar-chart-configuration/index.mjs +17 -0
  6. package/esm2022/lib/display-types/bar-chart/components/bar-chart-display/bar-chart-display.component.mjs +64 -0
  7. package/esm2022/lib/display-types/bar-chart/components/bar-chart-display/index.mjs +17 -0
  8. package/esm2022/lib/display-types/bar-chart/components/index.mjs +18 -0
  9. package/esm2022/lib/display-types/bar-chart/index.mjs +20 -0
  10. package/esm2022/lib/display-types/bar-chart/models/bar-chart.model.mjs +17 -0
  11. package/esm2022/lib/display-types/bar-chart/models/index.mjs +17 -0
  12. package/esm2022/lib/display-types/display-widget-types.module.mjs +19 -0
  13. package/esm2022/public_api.mjs +2 -1
  14. package/fesm2022/valtimo-dashboard.mjs +1694 -1341
  15. package/fesm2022/valtimo-dashboard.mjs.map +1 -1
  16. package/lib/dashboard.module.d.ts +2 -1
  17. package/lib/dashboard.module.d.ts.map +1 -1
  18. package/lib/display-types/bar-chart/bar-chart.module.d.ts +16 -0
  19. package/lib/display-types/bar-chart/bar-chart.module.d.ts.map +1 -0
  20. package/lib/display-types/bar-chart/bar-chart.specification.d.ts +3 -0
  21. package/lib/display-types/bar-chart/bar-chart.specification.d.ts.map +1 -0
  22. package/lib/display-types/bar-chart/components/bar-chart-configuration/bar-chart-configuration.component.d.ts +26 -0
  23. package/lib/display-types/bar-chart/components/bar-chart-configuration/bar-chart-configuration.component.d.ts.map +1 -0
  24. package/lib/display-types/bar-chart/components/bar-chart-configuration/index.d.ts +2 -0
  25. package/lib/display-types/bar-chart/components/bar-chart-configuration/index.d.ts.map +1 -0
  26. package/lib/display-types/bar-chart/components/bar-chart-display/bar-chart-display.component.d.ts +19 -0
  27. package/lib/display-types/bar-chart/components/bar-chart-display/bar-chart-display.component.d.ts.map +1 -0
  28. package/lib/display-types/bar-chart/components/bar-chart-display/index.d.ts +2 -0
  29. package/lib/display-types/bar-chart/components/bar-chart-display/index.d.ts.map +1 -0
  30. package/lib/display-types/bar-chart/components/index.d.ts +3 -0
  31. package/lib/display-types/bar-chart/components/index.d.ts.map +1 -0
  32. package/lib/display-types/bar-chart/index.d.ts +5 -0
  33. package/lib/display-types/bar-chart/index.d.ts.map +1 -0
  34. package/lib/display-types/bar-chart/models/bar-chart.model.d.ts +13 -0
  35. package/lib/display-types/bar-chart/models/bar-chart.model.d.ts.map +1 -0
  36. package/lib/display-types/bar-chart/models/index.d.ts +2 -0
  37. package/lib/display-types/bar-chart/models/index.d.ts.map +1 -0
  38. package/lib/display-types/display-widget-types.module.d.ts +12 -0
  39. package/lib/display-types/display-widget-types.module.d.ts.map +1 -0
  40. package/package.json +1 -1
  41. package/public_api.d.ts +1 -0
  42. package/public_api.d.ts.map +1 -1
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, ViewChild, InjectionToken, Injectable, Inject, ViewContainerRef, ViewChildren, Input, ViewEncapsulation, NgModule, Pipe, EventEmitter, ChangeDetectionStrategy, Output } from '@angular/core';
2
+ import { Component, ViewChild, InjectionToken, Injectable, Inject, ViewContainerRef, ViewChildren, Input, ViewEncapsulation, Pipe, EventEmitter, ChangeDetectionStrategy, Output, NgModule } from '@angular/core';
3
3
  import moment from 'moment';
4
4
  import { BehaviorSubject, filter, map, Subject, Subscription, combineLatest, debounceTime, tap, startWith, distinctUntilChanged } from 'rxjs';
5
5
  import { take, map as map$1, delay } from 'rxjs/operators';
@@ -10,7 +10,7 @@ import { RouterModule } from '@angular/router';
10
10
  import * as i3 from '@angular/common';
11
11
  import { CommonModule } from '@angular/common';
12
12
  import * as i1$1 from '@valtimo/components';
13
- import { WidgetModule, ListModule, BpmnJsDiagramModule, AlertModule, SpinnerModule, CarbonListModule, CarbonMultiInputModule, InputModule as InputModule$1 } from '@valtimo/components';
13
+ import { CarbonListModule, WidgetModule, ListModule, BpmnJsDiagramModule, AlertModule, SpinnerModule, CarbonMultiInputModule, InputModule as InputModule$1 } from '@valtimo/components';
14
14
  import * as i3$1 from '@ngx-translate/core';
15
15
  import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
16
16
  import Muuri from 'muuri';
@@ -19,16 +19,17 @@ import { HttpClient } from '@angular/common/http';
19
19
  import * as i2$1 from '@valtimo/config';
20
20
  import { ROLE_USER } from '@valtimo/config';
21
21
  import * as i5 from 'carbon-components-angular';
22
- import { TabsModule, ThemeModule, LoadingModule, InputModule, DropdownModule, ButtonModule, TilesModule, LayerModule, IconModule, CheckboxModule } from 'carbon-components-angular';
23
- import { TranslateHttpLoader } from '@ngx-translate/http-loader';
24
- import { AuthGuardService } from '@valtimo/security';
22
+ import { InputModule, CheckboxModule, TabsModule, ThemeModule, LoadingModule, DropdownModule, ButtonModule, TilesModule, LayerModule, IconModule } from 'carbon-components-angular';
25
23
  import * as i1$3 from '@angular/forms';
26
24
  import { Validators, ReactiveFormsModule } from '@angular/forms';
25
+ import { ScaleTypes } from '@carbon/charts';
26
+ import * as i3$2 from '@carbon/charts-angular';
27
+ import { ChartsModule } from '@carbon/charts-angular';
28
+ import { TranslateHttpLoader } from '@ngx-translate/http-loader';
29
+ import { AuthGuardService } from '@valtimo/security';
27
30
  import * as i2$2 from '@valtimo/document';
28
31
  import { isEqual } from 'lodash';
29
32
  import { Add16, TrashCan16 } from '@carbon/icons';
30
- import * as i3$2 from '@carbon/charts-angular';
31
- import { ChartsModule } from '@carbon/charts-angular';
32
33
 
33
34
  /*
34
35
  * Copyright 2015-2024 Ritense BV, the Netherlands.
@@ -638,43 +639,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
638
639
  args: [{ selector: 'valtimo-widget-dashboard', encapsulation: ViewEncapsulation.None, template: "<!--\n ~ Copyright 2015-2024 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 <valtimo-no-results\n *ngIf=\"!dashboards.length\"\n [title]=\"'dashboard.noDashboards' | translate\"\n [description]=\"'dashboard.noDashboardsDescription' | translate\"\n illustration=\"valtimo-layout/img/no-dashboards.svg\"\n ></valtimo-no-results>\n\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 *ngIf=\"(selectedDashboardKey$ | async) === dashboard.key\"\n [dashboard]=\"dashboard\"\n [widgetData]=\"activeWidgetData$ | async\"\n ></valtimo-widget-dashboard-content>\n </cds-tab>\n </cds-tabs>\n </div>\n</div>\n", styles: [".dashboards-container .cds--tab-content{outline:0;padding:0}.dashboards-container .valtimo-no-results,.widget-container .valtimo-no-results{flex-wrap:wrap;align-items:flex-start;align-content:center;flex-direction:column;gap:16px!important}.dashboards-container .valtimo-no-results__content,.widget-container .valtimo-no-results__content{gap:16px!important;max-width:500px;line-height:20px}.dashboards-container .valtimo-no-results img,.widget-container .valtimo-no-results img{padding-left:0!important}.dashboards-container .valtimo-no-results span,.dashboards-container .valtimo-no-results h4,.widget-container .valtimo-no-results span,.widget-container .valtimo-no-results h4{width:100%!important}\n/*!\n * Copyright 2015-2024 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"] }]
639
640
  }], ctorParameters: () => [{ type: DashboardService }, { type: WidgetApiService }] });
640
641
 
641
- /*
642
- * Copyright 2015-2024 Ritense BV, the Netherlands.
643
- *
644
- * Licensed under EUPL, Version 1.2 (the "License");
645
- * you may not use this file except in compliance with the License.
646
- * You may obtain a copy of the License at
647
- *
648
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
649
- *
650
- * Unless required by applicable law or agreed to in writing, software
651
- * distributed under the License is distributed on an "AS IS" basis,
652
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
653
- * See the License for the specific language governing permissions and
654
- * limitations under the License.
655
- */
656
- const routes = [
657
- {
658
- path: '',
659
- component: WidgetDashboardComponent,
660
- canActivate: [AuthGuardService],
661
- data: { title: 'Dashboard', roles: [ROLE_USER], hidePageTitle: true },
662
- },
663
- ];
664
- class DashboardRoutingModule {
665
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DashboardRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
666
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: DashboardRoutingModule, imports: [CommonModule, i2.RouterModule], exports: [RouterModule] }); }
667
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DashboardRoutingModule, imports: [CommonModule, RouterModule.forChild(routes), RouterModule] }); }
668
- }
669
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DashboardRoutingModule, decorators: [{
670
- type: NgModule,
671
- args: [{
672
- declarations: [],
673
- imports: [CommonModule, RouterModule.forChild(routes)],
674
- exports: [RouterModule],
675
- }]
676
- }] });
677
-
678
642
  /*
679
643
  * Copyright 2015-2024 Ritense BV, the Netherlands.
680
644
  *
@@ -722,19 +686,65 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
722
686
  * See the License for the specific language governing permissions and
723
687
  * limitations under the License.
724
688
  */
725
- class WidgetTranslatePipeModule {
726
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: WidgetTranslatePipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
727
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: WidgetTranslatePipeModule, declarations: [WidgetTranslatePipe], imports: [TranslateModule], exports: [WidgetTranslatePipe] }); }
728
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: WidgetTranslatePipeModule, imports: [TranslateModule] }); }
689
+ class BarChartConfigurationComponent {
690
+ set disabled(disabledValue) {
691
+ if (disabledValue) {
692
+ this.form.disable();
693
+ }
694
+ else {
695
+ this.form.enable();
696
+ }
697
+ }
698
+ get title() {
699
+ return this.form.get('title');
700
+ }
701
+ get subtitle() {
702
+ return this.form.get('subtitle');
703
+ }
704
+ set prefillConfiguration(configurationValue) {
705
+ if (configurationValue) {
706
+ this.title.setValue(configurationValue.title || '');
707
+ this.subtitle.setValue(configurationValue.subtitle || '');
708
+ }
709
+ }
710
+ constructor(fb) {
711
+ this.fb = fb;
712
+ this.form = this.fb.group({
713
+ title: this.fb.control('', [Validators.required]),
714
+ subtitle: this.fb.control(''),
715
+ });
716
+ this.configurationEvent = new EventEmitter();
717
+ this._subscriptions = new Subscription();
718
+ }
719
+ ngOnInit() {
720
+ this.openFormSubscription();
721
+ }
722
+ ngOnDestroy() {
723
+ this._subscriptions.unsubscribe();
724
+ }
725
+ openFormSubscription() {
726
+ this._subscriptions.add(this.form.valueChanges.pipe(startWith(this.form.value)).subscribe(formValue => {
727
+ this.configurationEvent.emit({
728
+ valid: this.form.valid,
729
+ data: formValue,
730
+ });
731
+ }));
732
+ }
733
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BarChartConfigurationComponent, deps: [{ token: i1$3.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
734
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: BarChartConfigurationComponent, selector: "ng-component", inputs: { displayTypeKey: "displayTypeKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 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</form>\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.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: i5.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i5.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 }); }
729
735
  }
730
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: WidgetTranslatePipeModule, decorators: [{
731
- type: NgModule,
732
- args: [{
733
- imports: [TranslateModule],
734
- declarations: [WidgetTranslatePipe],
735
- exports: [WidgetTranslatePipe],
736
- }]
737
- }] });
736
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BarChartConfigurationComponent, decorators: [{
737
+ type: Component,
738
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2024 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</form>\n" }]
739
+ }], ctorParameters: () => [{ type: i1$3.FormBuilder }], propDecorators: { displayTypeKey: [{
740
+ type: Input
741
+ }], disabled: [{
742
+ type: Input
743
+ }], prefillConfiguration: [{
744
+ type: Input
745
+ }], configurationEvent: [{
746
+ type: Output
747
+ }] } });
738
748
 
739
749
  /*
740
750
  * Copyright 2015-2024 Ritense BV, the Netherlands.
@@ -767,6 +777,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
767
777
  * See the License for the specific language governing permissions and
768
778
  * limitations under the License.
769
779
  */
780
+ class BarChartDisplayComponent {
781
+ set data(value) {
782
+ if (!value)
783
+ return;
784
+ this._data$.next(value);
785
+ }
786
+ constructor(themeService) {
787
+ this.themeService = themeService;
788
+ this._data$ = new BehaviorSubject(null);
789
+ this.barChartData$ = this._data$.pipe(filter(data => !!data), map(data => data?.values.map(dataValue => ({
790
+ group: dataValue.label,
791
+ value: dataValue.value,
792
+ })) || []));
793
+ this.barChartChartOptions$ = this.themeService.currentTheme$.pipe(map(currentTheme => ({
794
+ title: 'Vertical simple bar (discrete)',
795
+ theme: currentTheme,
796
+ height: '400px',
797
+ axes: {
798
+ left: {
799
+ mapsTo: 'value',
800
+ },
801
+ bottom: {
802
+ mapsTo: 'group',
803
+ scaleType: ScaleTypes.LABELS,
804
+ },
805
+ },
806
+ })));
807
+ }
808
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BarChartDisplayComponent, deps: [{ token: i1$1.CdsThemeService }], target: i0.ɵɵFactoryTarget.Component }); }
809
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: BarChartDisplayComponent, selector: "valtimo-bar-chart-display", inputs: { displayTypeKey: "displayTypeKey", data: "data", displayTypeProperties: "displayTypeProperties" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 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-donut-widget__header\">\n <h3 class=\"valtimo-donut-widget__title\">{{ displayTypeProperties.title }}</h3>\n\n <span *ngIf=\"displayTypeProperties.subtitle\" class=\"valtimo-donut-widget__subtitle\">\n {{ displayTypeProperties.subtitle }}\n </span>\n</section>\n\n<section class=\"valtimo-donut-widget__content\">\n <ng-container *ngIf=\"barChartData$ | async as barChartData\">\n @if (barChartData.length > 0) {\n <ibm-bar-chart\n [data]=\"barChartData\"\n [options]=\"barChartChartOptions$ | async\"\n ></ibm-bar-chart>\n } @else {\n <valtimo-no-results\n [collapseVertically]=\"true\"\n [description]=\"'dossier.widgets.noData' | translate\"\n [smallPadding]=\"true\"\n ></valtimo-no-results>\n }\n </ng-container>\n</section>\n", styles: [":host{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%;padding:20px}.valtimo-donut-widget__title,.valtimo-donut-widget__subtitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.valtimo-donut-widget__title{font-size:20px;margin-bottom:12px}.valtimo-donut-widget__subtitle{font-size:14px}.valtimo-donut-widget__label{font-size:12px;margin-left:12px;margin-bottom:-1px}.valtimo-donut-widget__content{display:flex;align-items:flex-end;justify-content:center;margin-bottom:12px}\n/*!\n * Copyright 2015-2024 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: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$1.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
810
+ }
811
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BarChartDisplayComponent, decorators: [{
812
+ type: Component,
813
+ args: [{ selector: 'valtimo-bar-chart-display', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2024 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-donut-widget__header\">\n <h3 class=\"valtimo-donut-widget__title\">{{ displayTypeProperties.title }}</h3>\n\n <span *ngIf=\"displayTypeProperties.subtitle\" class=\"valtimo-donut-widget__subtitle\">\n {{ displayTypeProperties.subtitle }}\n </span>\n</section>\n\n<section class=\"valtimo-donut-widget__content\">\n <ng-container *ngIf=\"barChartData$ | async as barChartData\">\n @if (barChartData.length > 0) {\n <ibm-bar-chart\n [data]=\"barChartData\"\n [options]=\"barChartChartOptions$ | async\"\n ></ibm-bar-chart>\n } @else {\n <valtimo-no-results\n [collapseVertically]=\"true\"\n [description]=\"'dossier.widgets.noData' | translate\"\n [smallPadding]=\"true\"\n ></valtimo-no-results>\n }\n </ng-container>\n</section>\n", styles: [":host{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%;padding:20px}.valtimo-donut-widget__title,.valtimo-donut-widget__subtitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.valtimo-donut-widget__title{font-size:20px;margin-bottom:12px}.valtimo-donut-widget__subtitle{font-size:14px}.valtimo-donut-widget__label{font-size:12px;margin-left:12px;margin-bottom:-1px}.valtimo-donut-widget__content{display:flex;align-items:flex-end;justify-content:center;margin-bottom:12px}\n/*!\n * Copyright 2015-2024 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"] }]
814
+ }], ctorParameters: () => [{ type: i1$1.CdsThemeService }], propDecorators: { displayTypeKey: [{
815
+ type: Input
816
+ }], data: [{
817
+ type: Input
818
+ }], displayTypeProperties: [{
819
+ type: Input
820
+ }] } });
770
821
 
771
822
  /*
772
823
  * Copyright 2015-2024 Ritense BV, the Netherlands.
@@ -783,81 +834,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
783
834
  * See the License for the specific language governing permissions and
784
835
  * limitations under the License.
785
836
  */
786
- // AoT requires an exported function for factories
787
- function HttpLoaderFactory(httpClient) {
788
- return new TranslateHttpLoader(httpClient);
789
- }
790
- class DashboardModule {
791
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DashboardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
792
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: DashboardModule, declarations: [DashboardComponent, WidgetDashboardComponent, WidgetDashboardContentComponent], imports: [CommonModule,
793
- DashboardRoutingModule,
794
- WidgetModule,
795
- ListModule,
796
- BpmnJsDiagramModule, i3$1.TranslateModule, AlertModule,
797
- TaskModule,
798
- SpinnerModule,
799
- TabsModule,
800
- ThemeModule,
801
- WidgetTranslatePipeModule,
802
- LoadingModule,
803
- CarbonListModule], exports: [DashboardComponent, WidgetDashboardComponent] }); }
804
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DashboardModule, providers: [
805
- { provide: DISPLAY_TYPE_TOKEN, useValue: null, multi: true },
806
- { provide: DATA_SOURCE_TOKEN, useValue: null, multi: true },
807
- ], imports: [CommonModule,
808
- DashboardRoutingModule,
809
- WidgetModule,
810
- ListModule,
811
- BpmnJsDiagramModule,
812
- TranslateModule.forRoot({
813
- loader: {
814
- provide: TranslateLoader,
815
- useFactory: HttpLoaderFactory,
816
- deps: [HttpClient],
817
- },
818
- }),
819
- AlertModule,
820
- TaskModule,
821
- SpinnerModule,
822
- TabsModule,
823
- ThemeModule,
824
- WidgetTranslatePipeModule,
825
- LoadingModule,
826
- CarbonListModule] }); }
827
- }
828
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DashboardModule, decorators: [{
829
- type: NgModule,
830
- args: [{
831
- declarations: [DashboardComponent, WidgetDashboardComponent, WidgetDashboardContentComponent],
832
- imports: [
833
- CommonModule,
834
- DashboardRoutingModule,
835
- WidgetModule,
836
- ListModule,
837
- BpmnJsDiagramModule,
838
- TranslateModule.forRoot({
839
- loader: {
840
- provide: TranslateLoader,
841
- useFactory: HttpLoaderFactory,
842
- deps: [HttpClient],
843
- },
844
- }),
845
- AlertModule,
846
- TaskModule,
847
- SpinnerModule,
848
- TabsModule,
849
- ThemeModule,
850
- WidgetTranslatePipeModule,
851
- LoadingModule,
852
- CarbonListModule,
853
- ],
854
- exports: [DashboardComponent, WidgetDashboardComponent],
855
- providers: [
856
- { provide: DISPLAY_TYPE_TOKEN, useValue: null, multi: true },
857
- { provide: DATA_SOURCE_TOKEN, useValue: null, multi: true },
858
- ],
859
- }]
860
- }] });
861
837
 
862
838
  /*
863
839
  * Copyright 2015-2024 Ritense BV, the Netherlands.
@@ -890,6 +866,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
890
866
  * See the License for the specific language governing permissions and
891
867
  * limitations under the License.
892
868
  */
869
+ const barChartSpecification = {
870
+ displayTypeKey: 'bar-chart',
871
+ displayComponent: BarChartDisplayComponent,
872
+ configurationComponent: BarChartConfigurationComponent,
873
+ width: 1,
874
+ height: 2,
875
+ translations: {
876
+ nl: {
877
+ title: 'Staafdiagram',
878
+ formTitle: 'Titel (vereist)',
879
+ formTitleHelperText: 'De titel die wordt weergegeven in de widget',
880
+ subtitle: 'Ondertitel',
881
+ subtitleHelperText: 'De ondertitel weergegeven in de widget',
882
+ label: 'Label',
883
+ labelHelperText: 'Het label dat wordt weergegeven in de widget',
884
+ },
885
+ en: {
886
+ title: 'Bar chart',
887
+ formTitle: 'Title (required)',
888
+ formTitleHelperText: 'The title displayed in the widget',
889
+ subtitle: 'Subtitle',
890
+ subtitleHelperText: 'The subtitle displayed in the widget',
891
+ label: 'Label',
892
+ labelHelperText: 'The label displayed in the widget',
893
+ },
894
+ de: {
895
+ title: 'Balkendiagramm',
896
+ formTitle: 'Titel (erforderlich)',
897
+ formTitleHelperText: 'Der im Widget angezeigte Titel',
898
+ subtitle: 'Untertitel',
899
+ subtitleHelperText: 'Der im Widget angezeigte Untertitel',
900
+ label: 'Beschriftung',
901
+ labelHelperText: 'Die im Widget angezeigte Beschriftung',
902
+ },
903
+ },
904
+ requiredDataFeatures: [DATA_FEATURES.NUMBERS],
905
+ };
893
906
 
894
907
  /*
895
908
  * Copyright 2015-2024 Ritense BV, the Netherlands.
@@ -906,22 +919,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
906
919
  * See the License for the specific language governing permissions and
907
920
  * limitations under the License.
908
921
  */
909
- var Operator;
910
- (function (Operator) {
911
- Operator["NOT_EQUAL_TO"] = "!=";
912
- Operator["EQUAL_TO"] = "==";
913
- Operator["GREATER_THAN"] = ">";
914
- Operator["GREATER_THAN_OR_EQUAL_TO"] = ">=";
915
- Operator["LESS_THAN"] = "<";
916
- Operator["LESS_THAN_OR_EQUAL_TO"] = "<=";
917
- })(Operator || (Operator = {}));
918
-
919
- /*
920
- * Copyright 2015-2024 Ritense BV, the Netherlands.
921
- *
922
- * Licensed under EUPL, Version 1.2 (the "License");
923
- * you may not use this file except in compliance with the License.
924
- * You may obtain a copy of the License at
922
+ class WidgetTranslatePipeModule {
923
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: WidgetTranslatePipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
924
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: WidgetTranslatePipeModule, declarations: [WidgetTranslatePipe], imports: [TranslateModule], exports: [WidgetTranslatePipe] }); }
925
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: WidgetTranslatePipeModule, imports: [TranslateModule] }); }
926
+ }
927
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: WidgetTranslatePipeModule, decorators: [{
928
+ type: NgModule,
929
+ args: [{
930
+ imports: [TranslateModule],
931
+ declarations: [WidgetTranslatePipe],
932
+ exports: [WidgetTranslatePipe],
933
+ }]
934
+ }] });
935
+
936
+ /*
937
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
938
+ *
939
+ * Licensed under EUPL, Version 1.2 (the "License");
940
+ * you may not use this file except in compliance with the License.
941
+ * You may obtain a copy of the License at
925
942
  *
926
943
  * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
927
944
  *
@@ -963,6 +980,46 @@ var Operator;
963
980
  * See the License for the specific language governing permissions and
964
981
  * limitations under the License.
965
982
  */
983
+ class BarChartModule {
984
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BarChartModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
985
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: BarChartModule, declarations: [BarChartDisplayComponent, BarChartConfigurationComponent], imports: [CommonModule,
986
+ ReactiveFormsModule,
987
+ WidgetTranslatePipeModule,
988
+ InputModule,
989
+ CheckboxModule,
990
+ CommonModule,
991
+ ChartsModule,
992
+ CarbonListModule,
993
+ TranslateModule], exports: [BarChartDisplayComponent] }); }
994
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BarChartModule, providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: barChartSpecification, multi: true }], imports: [CommonModule,
995
+ ReactiveFormsModule,
996
+ WidgetTranslatePipeModule,
997
+ InputModule,
998
+ CheckboxModule,
999
+ CommonModule,
1000
+ ChartsModule,
1001
+ CarbonListModule,
1002
+ TranslateModule] }); }
1003
+ }
1004
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BarChartModule, decorators: [{
1005
+ type: NgModule,
1006
+ args: [{
1007
+ declarations: [BarChartDisplayComponent, BarChartConfigurationComponent],
1008
+ imports: [
1009
+ CommonModule,
1010
+ ReactiveFormsModule,
1011
+ WidgetTranslatePipeModule,
1012
+ InputModule,
1013
+ CheckboxModule,
1014
+ CommonModule,
1015
+ ChartsModule,
1016
+ CarbonListModule,
1017
+ TranslateModule,
1018
+ ],
1019
+ exports: [BarChartDisplayComponent],
1020
+ providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: barChartSpecification, multi: true }],
1021
+ }]
1022
+ }] });
966
1023
 
967
1024
  /*
968
1025
  * Copyright 2015-2024 Ritense BV, the Netherlands.
@@ -979,14 +1036,6 @@ var Operator;
979
1036
  * See the License for the specific language governing permissions and
980
1037
  * limitations under the License.
981
1038
  */
982
- var WidgetSeverity;
983
- (function (WidgetSeverity) {
984
- WidgetSeverity["BLACK"] = "valtimo-severity__black";
985
- WidgetSeverity["GREEN"] = "valtimo-severity__green";
986
- WidgetSeverity["YELLOW"] = "valtimo-severity__yellow";
987
- WidgetSeverity["ORANGE"] = "valtimo-severity__orange";
988
- WidgetSeverity["RED"] = "valtimo-severity__red";
989
- })(WidgetSeverity || (WidgetSeverity = {}));
990
1039
 
991
1040
  /*
992
1041
  * Copyright 2015-2024 Ritense BV, the Netherlands.
@@ -1019,7 +1068,23 @@ var WidgetSeverity;
1019
1068
  * See the License for the specific language governing permissions and
1020
1069
  * limitations under the License.
1021
1070
  */
1022
- class CaseCountConfigurationComponent {
1071
+
1072
+ /*
1073
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
1074
+ *
1075
+ * Licensed under EUPL, Version 1.2 (the "License");
1076
+ * you may not use this file except in compliance with the License.
1077
+ * You may obtain a copy of the License at
1078
+ *
1079
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1080
+ *
1081
+ * Unless required by applicable law or agreed to in writing, software
1082
+ * distributed under the License is distributed on an "AS IS" basis,
1083
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1084
+ * See the License for the specific language governing permissions and
1085
+ * limitations under the License.
1086
+ */
1087
+ class BigNumberConfigurationComponent {
1023
1088
  set disabled(disabledValue) {
1024
1089
  if (disabledValue) {
1025
1090
  this.form.disable();
@@ -1028,109 +1093,89 @@ class CaseCountConfigurationComponent {
1028
1093
  this.form.enable();
1029
1094
  }
1030
1095
  }
1031
- get documentDefinition() {
1032
- return this.form.get('documentDefinition');
1096
+ get title() {
1097
+ return this.form.get('title');
1033
1098
  }
1034
- get queryConditions() {
1035
- return this.form.get('queryConditions');
1099
+ get subtitle() {
1100
+ return this.form.get('subtitle');
1101
+ }
1102
+ get label() {
1103
+ return this.form.get('label');
1104
+ }
1105
+ get useKPI() {
1106
+ return this.form.get('useKPI');
1107
+ }
1108
+ get lowSeverityThreshold() {
1109
+ return this.form.get('lowSeverityThreshold');
1110
+ }
1111
+ get mediumSeverityThreshold() {
1112
+ return this.form.get('mediumSeverityThreshold');
1113
+ }
1114
+ get highSeverityThreshold() {
1115
+ return this.form.get('highSeverityThreshold');
1036
1116
  }
1037
1117
  set prefillConfiguration(configurationValue) {
1038
1118
  if (configurationValue) {
1039
- this.documentDefinitionSelected({
1040
- item: {
1041
- content: configurationValue.documentDefinition,
1042
- },
1043
- });
1044
- this.defaultConditionValues$.next(configurationValue.queryConditions.map(condition => ({
1045
- key: condition.queryPath,
1046
- dropdown: condition.queryOperator,
1047
- value: condition.queryValue,
1048
- })));
1119
+ this.title.setValue(configurationValue.title || '');
1120
+ this.subtitle.setValue(configurationValue.subtitle || '');
1121
+ this.label.setValue(configurationValue.label || '');
1122
+ this.useKPI.setValue(configurationValue.useKPI || false);
1123
+ this.lowSeverityThreshold.setValue(configurationValue.lowSeverityThreshold || null);
1124
+ this.mediumSeverityThreshold.setValue(configurationValue.mediumSeverityThreshold || null);
1125
+ this.highSeverityThreshold.setValue(configurationValue.highSeverityThreshold || null);
1049
1126
  }
1050
1127
  }
1051
- constructor(fb, documentService, translateService, widgetTranslationService) {
1128
+ constructor(fb) {
1052
1129
  this.fb = fb;
1053
- this.documentService = documentService;
1054
- this.translateService = translateService;
1055
- this.widgetTranslationService = widgetTranslationService;
1056
1130
  this.form = this.fb.group({
1057
- documentDefinition: this.fb.control(null, [Validators.required]),
1058
- queryConditions: this.fb.control(null),
1131
+ title: this.fb.control('', [Validators.required]),
1132
+ subtitle: this.fb.control(''),
1133
+ label: this.fb.control(''),
1134
+ useKPI: this.fb.control(false, [Validators.required]),
1135
+ lowSeverityThreshold: this.fb.control(null),
1136
+ mediumSeverityThreshold: this.fb.control(null),
1137
+ highSeverityThreshold: this.fb.control(null),
1059
1138
  });
1060
- this._selectedDocumentDefinition$ = new BehaviorSubject('');
1061
- this.documentItems$ = combineLatest([
1062
- this.documentService.getAllDefinitions(),
1063
- this._selectedDocumentDefinition$,
1064
- ]).pipe(map(([documentDefinitions, selectedDocumentDefintion]) => documentDefinitions.content.map(definition => ({
1065
- content: definition.id.name,
1066
- selected: definition.id.name === selectedDocumentDefintion,
1067
- }))));
1068
- this._OPERATORS = [
1069
- Operator.NOT_EQUAL_TO,
1070
- Operator.EQUAL_TO,
1071
- Operator.GREATER_THAN,
1072
- Operator.GREATER_THAN_OR_EQUAL_TO,
1073
- Operator.LESS_THAN,
1074
- Operator.LESS_THAN_OR_EQUAL_TO,
1075
- ];
1076
- this.operatorItems$ = this.translateService
1077
- .stream('key')
1078
- .pipe(map(() => this._OPERATORS.map(operator => ({
1079
- id: operator,
1080
- content: this.widgetTranslationService.instant(operator, this.dataSourceKey),
1081
- selected: false,
1082
- }))));
1083
- this.defaultConditionValues$ = new BehaviorSubject(null);
1084
- this.allConditionsValid$ = new BehaviorSubject(true);
1085
1139
  this.configurationEvent = new EventEmitter();
1086
1140
  this._subscriptions = new Subscription();
1087
1141
  }
1088
1142
  ngOnInit() {
1089
1143
  this.openFormSubscription();
1144
+ this.openKPISubscription();
1090
1145
  }
1091
1146
  ngOnDestroy() {
1092
1147
  this._subscriptions.unsubscribe();
1093
1148
  }
1094
- documentDefinitionSelected(documentDefinitionItem) {
1095
- if (!documentDefinitionItem) {
1096
- return;
1097
- }
1098
- this._selectedDocumentDefinition$.next(documentDefinitionItem?.item?.content);
1099
- this.documentDefinition.setValue(documentDefinitionItem?.item?.content);
1100
- }
1101
- conditionsValueChange(values) {
1102
- if (values.length === 0) {
1103
- this.queryConditions.setValue(null);
1104
- }
1105
- else {
1106
- this.queryConditions.setValue(values.map(value => ({
1107
- queryPath: value.key,
1108
- queryOperator: value.dropdown,
1109
- queryValue: value.value,
1110
- })));
1111
- }
1112
- }
1113
- onAllConditionsValid(allConditionsValid) {
1114
- this.allConditionsValid$.next(allConditionsValid);
1115
- }
1116
1149
  openFormSubscription() {
1117
- this._subscriptions.add(combineLatest([
1118
- this.form.valueChanges.pipe(startWith(this.form.value)),
1119
- this.allConditionsValid$,
1120
- ]).subscribe(([formValue, allConditionsValid]) => {
1121
- this.configurationEvent.emit({
1122
- valid: this.form.valid && allConditionsValid,
1123
- data: formValue,
1124
- });
1150
+ this._subscriptions.add(this.form.valueChanges.pipe(startWith(this.form.value)).subscribe(formValue => {
1151
+ this.configurationEvent.emit({ valid: this.form.valid, data: formValue });
1125
1152
  }));
1126
1153
  }
1127
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseCountConfigurationComponent, deps: [{ token: i1$3.FormBuilder }, { token: i2$2.DocumentService }, { token: i3$1.TranslateService }, { token: WidgetTranslationService }], target: i0.ɵɵFactoryTarget.Component }); }
1128
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: CaseCountConfigurationComponent, selector: "ng-component", inputs: { dataSourceKey: "dataSourceKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 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 [appendInline]=\"true\"\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: ["::ng-deep .case-count-configuration-form .conditions-label{margin-bottom:16px}::ng-deep .case-count-configuration-form .conditions-multi-input .cds--form__helper-text{font-style:italic}\n/*!\n * Copyright 2015-2024 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: 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: i5.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "component", type: i5.Dropdown, selector: "cds-dropdown, ibm-dropdown", inputs: ["id", "label", "hideLabel", "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: i5.DropdownList, selector: "cds-dropdown-list, ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }, { kind: "component", type: i1$1.CarbonMultiInputComponent, selector: "valtimo-carbon-multi-input", inputs: ["name", "title", "titleTranslationKey", "type", "arbitraryValueAmount", "arbitraryAmountTitles", "initialAmountOfRows", "minimumAmountOfRows", "maxRows", "addRowText", "addRowTranslationKey", "deleteRowText", "deleteRowTranslationKey", "disabled", "defaultValues", "margin", "tooltip", "required", "keyColumnTitle", "valueColumnTitle", "dropdownColumnTitle", "hideDeleteButton", "hideAddButton", "dropdownItems", "dropdownWidth", "fullWidth", "carbonTheme"], outputs: ["valueChange", "allValuesValidEvent"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: WidgetTranslatePipe, name: "widgetTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1154
+ openKPISubscription() {
1155
+ this._subscriptions.add(this.useKPI.valueChanges.pipe(startWith(this.useKPI.value)).subscribe(useKpi => {
1156
+ const validators = [Validators.required];
1157
+ if (useKpi) {
1158
+ this.lowSeverityThreshold.setValidators(validators);
1159
+ this.mediumSeverityThreshold.setValidators(validators);
1160
+ this.highSeverityThreshold.setValidators(validators);
1161
+ }
1162
+ else {
1163
+ this.lowSeverityThreshold.clearValidators();
1164
+ this.mediumSeverityThreshold.clearValidators();
1165
+ this.highSeverityThreshold.clearValidators();
1166
+ }
1167
+ this.lowSeverityThreshold.updateValueAndValidity();
1168
+ this.mediumSeverityThreshold.updateValueAndValidity();
1169
+ this.highSeverityThreshold.updateValueAndValidity();
1170
+ }));
1171
+ }
1172
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BigNumberConfigurationComponent, deps: [{ token: i1$3.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
1173
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: BigNumberConfigurationComponent, selector: "ng-component", inputs: { displayTypeKey: "displayTypeKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 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: i5.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i5.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "component", type: i5.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 }); }
1129
1174
  }
1130
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseCountConfigurationComponent, decorators: [{
1175
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BigNumberConfigurationComponent, decorators: [{
1131
1176
  type: Component,
1132
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2024 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 [appendInline]=\"true\"\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: ["::ng-deep .case-count-configuration-form .conditions-label{margin-bottom:16px}::ng-deep .case-count-configuration-form .conditions-multi-input .cds--form__helper-text{font-style:italic}\n/*!\n * Copyright 2015-2024 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"] }]
1133
- }], ctorParameters: () => [{ type: i1$3.FormBuilder }, { type: i2$2.DocumentService }, { type: i3$1.TranslateService }, { type: WidgetTranslationService }], propDecorators: { dataSourceKey: [{
1177
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2024 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" }]
1178
+ }], ctorParameters: () => [{ type: i1$3.FormBuilder }], propDecorators: { displayTypeKey: [{
1134
1179
  type: Input
1135
1180
  }], disabled: [{
1136
1181
  type: Input
@@ -1203,6 +1248,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
1203
1248
  * See the License for the specific language governing permissions and
1204
1249
  * limitations under the License.
1205
1250
  */
1251
+ var Operator;
1252
+ (function (Operator) {
1253
+ Operator["NOT_EQUAL_TO"] = "!=";
1254
+ Operator["EQUAL_TO"] = "==";
1255
+ Operator["GREATER_THAN"] = ">";
1256
+ Operator["GREATER_THAN_OR_EQUAL_TO"] = ">=";
1257
+ Operator["LESS_THAN"] = "<";
1258
+ Operator["LESS_THAN_OR_EQUAL_TO"] = "<=";
1259
+ })(Operator || (Operator = {}));
1206
1260
 
1207
1261
  /*
1208
1262
  * Copyright 2015-2024 Ritense BV, the Netherlands.
@@ -1219,63 +1273,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
1219
1273
  * See the License for the specific language governing permissions and
1220
1274
  * limitations under the License.
1221
1275
  */
1222
- const caseCountDataSourceSpecification = {
1223
- dataSourceKey: 'case-count',
1224
- configurationComponent: CaseCountConfigurationComponent,
1225
- translations: {
1226
- de: {
1227
- title: 'Fallzahl',
1228
- documentDefinition: 'Falltyp (erforderlich)',
1229
- documentDefinitionHelperText: 'Der Falltyp, für den die Anzahl abgerufen wird',
1230
- '!=': 'Nicht gleichzusetzen mit',
1231
- '==': 'Gleich',
1232
- '>': 'Größer als',
1233
- '>=': 'Größer als oder gleich wie',
1234
- '<': 'Weniger als',
1235
- '<=': 'Gleich oder kleiner als',
1236
- path: 'Pfad',
1237
- operator: 'Operator',
1238
- value: 'Wert',
1239
- conditions: 'Bedingungen',
1240
- 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'. Zum Vergleichen mit leeren Werten kann als Wert '${null}' eingegeben werden. Zum Vergleichen mit dem aktuellen Datum kann als Wert '${localDateTimeNow}' eingegeben werden. Damit wird beispielsweise auch folgende Logik unterstützt: '${localDateTimeNow.minusWeeks(2)}'.",
1241
- addCondition: 'Bedingung hinzufügen',
1242
- },
1243
- en: {
1244
- title: 'Case count',
1245
- documentDefinition: 'Case type (required)',
1246
- documentDefinitionHelperText: 'The case type for which the count is retrieved',
1247
- '!=': 'Not equal to',
1248
- '==': 'Equal to',
1249
- '>': 'Greater than',
1250
- '>=': 'Greater than or equal to',
1251
- '<': 'Less than',
1252
- '<=': 'Less than or equal to',
1253
- path: 'Path (required)',
1254
- operator: 'Operator',
1255
- value: 'Value',
1256
- conditions: 'Conditions',
1257
- conditionsHelperText: "Specify optional conditions for retrieving the number of cases for the selected case type. For example: 'case:createdBy', 'Equal to', 'test@test.com'. To compare with empty values, '${null}' can be entered as a value. To compare with the current date, '${localDateTimeNow}' can be entered as a value. This also supports, for example, the following logic: '${localDateTimeNow.minusWeeks(2)}'.",
1258
- addCondition: 'Add condition',
1259
- },
1260
- nl: {
1261
- title: 'Aantal dossiers',
1262
- documentDefinition: 'Dossiertype (vereist)',
1263
- documentDefinitionHelperText: 'Het dossiertype waarvoor de telling wordt opgehaald',
1264
- '!=': 'Niet gelijk aan',
1265
- '==': 'Gelijk aan',
1266
- '>': 'Groter dan',
1267
- '>=': 'Groter dan of gelijk aan',
1268
- '<': 'Minder dan',
1269
- '<=': 'Minder dan of gelijk aan',
1270
- path: 'Pad',
1271
- operator: 'Operator',
1272
- value: 'Waarde',
1273
- conditions: 'Condities',
1274
- conditionsHelperText: "Geef optionele condities op voor het ophalen van het aantal zaken voor het geselecteerde zaaktype. Bijvoorbeeld: 'case:createdBy', 'Gelijk aan', 'test@test.com'. Voor het vergelijken met lege waardes kan '${null}' ingevuld worden als waarde. Voor het vergelijken met de huidige datum kan '${localDateTimeNow}' ingevuld worden als waarde. Deze ondersteunt ook bijvoorbeeld de volgende logica: '${localDateTimeNow.minusWeeks(2)}'.",
1275
- addCondition: 'Conditie toevoegen',
1276
- },
1277
- },
1278
- };
1279
1276
 
1280
1277
  /*
1281
1278
  * Copyright 2015-2024 Ritense BV, the Netherlands.
@@ -1292,41 +1289,6 @@ const caseCountDataSourceSpecification = {
1292
1289
  * See the License for the specific language governing permissions and
1293
1290
  * limitations under the License.
1294
1291
  */
1295
- class CaseCountDataSourceModule {
1296
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseCountDataSourceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1297
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: CaseCountDataSourceModule, declarations: [CaseCountConfigurationComponent], imports: [CommonModule,
1298
- ReactiveFormsModule,
1299
- WidgetTranslatePipeModule,
1300
- InputModule,
1301
- DropdownModule,
1302
- CarbonMultiInputModule], exports: [CaseCountConfigurationComponent] }); }
1303
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseCountDataSourceModule, providers: [
1304
- { provide: DATA_SOURCE_TOKEN, useValue: caseCountDataSourceSpecification, multi: true },
1305
- ], imports: [CommonModule,
1306
- ReactiveFormsModule,
1307
- WidgetTranslatePipeModule,
1308
- InputModule,
1309
- DropdownModule,
1310
- CarbonMultiInputModule] }); }
1311
- }
1312
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseCountDataSourceModule, decorators: [{
1313
- type: NgModule,
1314
- args: [{
1315
- declarations: [CaseCountConfigurationComponent],
1316
- imports: [
1317
- CommonModule,
1318
- ReactiveFormsModule,
1319
- WidgetTranslatePipeModule,
1320
- InputModule,
1321
- DropdownModule,
1322
- CarbonMultiInputModule,
1323
- ],
1324
- exports: [CaseCountConfigurationComponent],
1325
- providers: [
1326
- { provide: DATA_SOURCE_TOKEN, useValue: caseCountDataSourceSpecification, multi: true },
1327
- ],
1328
- }]
1329
- }] });
1330
1292
 
1331
1293
  /*
1332
1294
  * Copyright 2015-2024 Ritense BV, the Netherlands.
@@ -1359,177 +1321,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
1359
1321
  * See the License for the specific language governing permissions and
1360
1322
  * limitations under the License.
1361
1323
  */
1362
- class CaseCountsConfigurationComponent {
1363
- set disabled(disabledValue) {
1364
- if (disabledValue) {
1365
- this.form.disable();
1366
- }
1367
- else {
1368
- this.form.enable();
1369
- }
1370
- }
1371
- get queryItems() {
1372
- return this.form.get('queryItems');
1373
- }
1374
- get queryItemsValue$() {
1375
- return this.queryItems.valueChanges.pipe(startWith(this.queryItems.value || []));
1376
- }
1377
- get queryItemsList$() {
1378
- return this.queryItemsValue$.pipe(map(queryItemsValue => queryItemsValue.map(() => null)), distinctUntilChanged((previous, current) => isEqual(previous, current)));
1379
- }
1380
- get documentDefinition() {
1381
- return this.form.get('documentDefinition');
1382
- }
1383
- get formDisabled() {
1384
- return this.form.disabled;
1385
- }
1386
- set prefillConfiguration(configurationValue) {
1387
- if (!configurationValue)
1388
- return;
1389
- this.documentDefinitionSelected({
1390
- item: {
1391
- content: configurationValue.documentDefinition,
1392
- },
1393
- });
1394
- this.documentDefinition.patchValue(configurationValue.documentDefinition);
1395
- this.queryItems.patchValue(this.queryItemsToMultiInputValues(configurationValue.queryItems));
1396
- }
1397
- constructor(fb, documentService, translateService, widgetTranslationService, iconService) {
1398
- this.fb = fb;
1399
- this.documentService = documentService;
1400
- this.translateService = translateService;
1401
- this.widgetTranslationService = widgetTranslationService;
1402
- this.iconService = iconService;
1403
- this._EMPTY_QUERY_ITEM_VALUE = {
1404
- label: '',
1405
- queryConditions: [{ key: '', value: '', dropdown: '' }],
1406
- };
1407
- this.form = this.fb.group({
1408
- documentDefinition: this.fb.control(null, [Validators.required]),
1409
- queryItems: this.fb.control([this._EMPTY_QUERY_ITEM_VALUE, this._EMPTY_QUERY_ITEM_VALUE], [this.queryItemsValidator()]),
1410
- });
1411
- this.configurationEvent = new EventEmitter();
1412
- this._selectedDocumentDefinition$ = new BehaviorSubject('');
1413
- this.documentItems$ = combineLatest([
1414
- this.documentService.getAllDefinitions(),
1415
- this._selectedDocumentDefinition$,
1416
- ]).pipe(map(([documentDefinitions, selectedDocumentDefintion]) => documentDefinitions.content.map(definition => ({
1417
- content: definition.id.name,
1418
- selected: definition.id.name === selectedDocumentDefintion,
1419
- }))));
1420
- this._OPERATORS = [
1421
- Operator.NOT_EQUAL_TO,
1422
- Operator.EQUAL_TO,
1423
- Operator.GREATER_THAN,
1424
- Operator.GREATER_THAN_OR_EQUAL_TO,
1425
- Operator.LESS_THAN,
1426
- Operator.LESS_THAN_OR_EQUAL_TO,
1427
- ];
1428
- this.operatorItems$ = this.translateService
1429
- .stream('key')
1430
- .pipe(map(() => this._OPERATORS.map(operator => ({
1431
- id: operator,
1432
- content: this.widgetTranslationService.instant(operator, this.dataSourceKey),
1433
- selected: false,
1434
- }))));
1435
- this._subscriptions = new Subscription();
1436
- this.iconService.registerAll([Add16, TrashCan16]);
1437
- }
1438
- ngOnInit() {
1439
- this.openFormSubscription();
1440
- }
1441
- ngOnDestroy() {
1442
- this._subscriptions.unsubscribe();
1443
- }
1444
- documentDefinitionSelected(documentDefinitionItem) {
1445
- if (!documentDefinitionItem) {
1446
- return;
1447
- }
1448
- this._selectedDocumentDefinition$.next(documentDefinitionItem?.item?.content);
1449
- }
1450
- conditionsValueChange(index, values) {
1451
- const currentQueryItemsValues = this.queryItems.value;
1452
- if (isEqual(currentQueryItemsValues[index].queryConditions, values))
1453
- return;
1454
- this.queryItems.patchValue(currentQueryItemsValues.map((item, itemIndex) => itemIndex === index ? { ...item, queryConditions: values } : item));
1455
- }
1456
- labelValueChange(index, value) {
1457
- const currentQueryItemsValues = this.queryItems.value;
1458
- if (currentQueryItemsValues[index].label === value)
1459
- return;
1460
- this.queryItems.patchValue(currentQueryItemsValues.map((item, itemIndex) => itemIndex === index ? { ...item, label: value } : item));
1461
- }
1462
- addQueryItem() {
1463
- const currentQueryItems = this.queryItems.value;
1464
- this.queryItems.patchValue([...currentQueryItems, this._EMPTY_QUERY_ITEM_VALUE]);
1465
- }
1466
- deleteCount(i) {
1467
- const currentQueryItems = this.queryItems.value;
1468
- this.queryItems.patchValue(currentQueryItems.filter((_, index) => index !== i));
1469
- }
1470
- openFormSubscription() {
1471
- this._subscriptions.add(this.form.valueChanges.pipe(startWith(this.form.value)).subscribe(formValue => {
1472
- this.configurationEvent.emit({
1473
- valid: this.form.valid,
1474
- data: {
1475
- documentDefinition: formValue?.documentDefinition?.content,
1476
- queryItems: this.multiInputValuesToQueryItems(formValue.queryItems),
1477
- },
1478
- });
1479
- }));
1480
- }
1481
- queryItemsToMultiInputValues(queryItems) {
1482
- return queryItems.map(queryItem => ({
1483
- ...queryItem,
1484
- queryConditions: queryItem.queryConditions.map(condition => ({
1485
- key: condition.queryPath,
1486
- dropdown: condition.queryOperator,
1487
- value: condition.queryValue,
1488
- })),
1489
- }));
1490
- }
1491
- multiInputValuesToQueryItems(multiInputValues) {
1492
- return multiInputValues.map(queryItem => ({
1493
- ...queryItem,
1494
- queryConditions: queryItem.queryConditions.map(condition => ({
1495
- queryPath: condition.key,
1496
- queryOperator: condition.dropdown,
1497
- queryValue: condition.value,
1498
- })),
1499
- }));
1500
- }
1501
- queryItemsValidator() {
1502
- return (control) => {
1503
- const queryItems = control.value;
1504
- const validQueryItems = queryItems.filter(item => {
1505
- const validLabel = !!item.label;
1506
- const validConditions = item.queryConditions.filter(condition => !!condition.value && !!condition.key && !!condition.dropdown);
1507
- return (validLabel &&
1508
- validConditions.length > 0 &&
1509
- item.queryConditions.length === validConditions.length);
1510
- });
1511
- return validQueryItems.length > 1 && validQueryItems.length === queryItems.length
1512
- ? null
1513
- : {
1514
- invalidQueryItems: 'invalid',
1515
- };
1516
- };
1517
- }
1518
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseCountsConfigurationComponent, deps: [{ token: i1$3.FormBuilder }, { token: i2$2.DocumentService }, { token: i3$1.TranslateService }, { token: WidgetTranslationService }, { token: i5.IconService }], target: i0.ɵɵFactoryTarget.Component }); }
1519
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: CaseCountsConfigurationComponent, selector: "ng-component", inputs: { dataSourceKey: "dataSourceKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 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-counts-configuration-form\"\n *ngIf=\"{\n documentItems: documentItems$ | async,\n operatorItems: operatorItems$,\n queryItemsValue: queryItemsValue$ | async,\n } as obs\"\n [formGroup]=\"form\"\n>\n <div class=\"form__element\">\n <cds-dropdown\n [appendInline]=\"true\"\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 <cds-label class=\"conditions__label\">{{\n 'counts' | widgetTranslate: dataSourceKey | async\n }}</cds-label>\n\n <p class=\"conditions__helper-text cds--form__helper-text\">\n {{ 'countsHelperText' | widgetTranslate: dataSourceKey | async }}\n </p>\n\n @for (_ of queryItemsList$ | async; track $index; let i = $index) {\n <cds-tile class=\"count-tile\" cdsLayer=\"1\">\n <div class=\"count-tile__input\">\n <v-input\n [title]=\"'countTitle' | widgetTranslate: dataSourceKey | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.queryItemsValue[i]?.label\"\n [disabled]=\"formDisabled\"\n [required]=\"true\"\n [fullWidth]=\"true\"\n (valueChange)=\"labelValueChange(i, $event)\"\n >\n </v-input>\n\n <valtimo-carbon-multi-input\n [disabled]=\"formDisabled\"\n [addRowText]=\"'addCondition' | widgetTranslate: dataSourceKey | async\"\n [defaultValues]=\"obs.queryItemsValue[i]?.queryConditions\"\n [dropdownColumnTitle]=\"'operator' | widgetTranslate: dataSourceKey | async\"\n [dropdownItems]=\"operatorItems$ | async\"\n [fullWidth]=\"true\"\n [initialAmountOfRows]=\"1\"\n [keyColumnTitle]=\"'path' | widgetTranslate: dataSourceKey | async\"\n [minimumAmountOfRows]=\"1\"\n [valueColumnTitle]=\"'value' | widgetTranslate: dataSourceKey | async\"\n type=\"keyDropdownValue\"\n (valueChange)=\"conditionsValueChange(i, $event)\"\n ></valtimo-carbon-multi-input>\n </div>\n\n <div class=\"count-tile__delete-button\">\n <cds-icon-button\n [disabled]=\"formDisabled || i < 2\"\n (click)=\"deleteCount(i)\"\n kind=\"danger\"\n size=\"sm\"\n >\n <svg class=\"cds--btn__icon\" cdsIcon=\"trash-can\" size=\"16\"></svg>\n </cds-icon-button>\n </div>\n </cds-tile>\n }\n\n <button\n class=\"add-count-button\"\n cdsButton=\"primary\"\n [disabled]=\"formDisabled\"\n (click)=\"addQueryItem()\"\n >\n {{ 'Aantal toevoegen' }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</form>\n", styles: ["::ng-deep .case-counts-configuration-form .conditions__label{display:flex;margin-bottom:8px}::ng-deep .case-counts-configuration-form .conditions__helper-text{font-style:italic;display:flex;margin-bottom:16px}::ng-deep .case-counts-configuration-form .count-tile{display:flex;flex-direction:row;gap:32px;justify-content:space-between;margin-bottom:16px}::ng-deep .case-counts-configuration-form .count-tile__input{width:100%}::ng-deep .case-counts-configuration-form .add-count-button{margin-bottom:16px}\n/*!\n * Copyright 2015-2024 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: 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: i1$1.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "smallMargin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$", "carbonTheme", "placeholder", "dataTestId"], outputs: ["valueChange"] }, { kind: "component", type: i5.Dropdown, selector: "cds-dropdown, ibm-dropdown", inputs: ["id", "label", "hideLabel", "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: i5.DropdownList, selector: "cds-dropdown-list, ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }, { kind: "component", type: i1$1.CarbonMultiInputComponent, selector: "valtimo-carbon-multi-input", inputs: ["name", "title", "titleTranslationKey", "type", "arbitraryValueAmount", "arbitraryAmountTitles", "initialAmountOfRows", "minimumAmountOfRows", "maxRows", "addRowText", "addRowTranslationKey", "deleteRowText", "deleteRowTranslationKey", "disabled", "defaultValues", "margin", "tooltip", "required", "keyColumnTitle", "valueColumnTitle", "dropdownColumnTitle", "hideDeleteButton", "hideAddButton", "dropdownItems", "dropdownWidth", "fullWidth", "carbonTheme"], outputs: ["valueChange", "allValuesValidEvent"] }, { kind: "directive", type: i5.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "component", type: i5.IconButton, selector: "cds-icon-button, ibm-icon-button", inputs: ["buttonNgClass", "buttonAttributes", "buttonId", "kind", "size", "type", "isExpressive", "disabled", "description"], outputs: ["click", "focus", "blur", "tooltipClick"] }, { kind: "component", type: i5.Tile, selector: "cds-tile, ibm-tile", inputs: ["theme"] }, { kind: "directive", type: i5.LayerDirective, selector: "[cdsLayer], [ibmLayer]", inputs: ["ibmLayer", "cdsLayer"], exportAs: ["layer"] }, { kind: "directive", type: i5.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: WidgetTranslatePipe, name: "widgetTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1520
- }
1521
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseCountsConfigurationComponent, decorators: [{
1522
- type: Component,
1523
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2024 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-counts-configuration-form\"\n *ngIf=\"{\n documentItems: documentItems$ | async,\n operatorItems: operatorItems$,\n queryItemsValue: queryItemsValue$ | async,\n } as obs\"\n [formGroup]=\"form\"\n>\n <div class=\"form__element\">\n <cds-dropdown\n [appendInline]=\"true\"\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 <cds-label class=\"conditions__label\">{{\n 'counts' | widgetTranslate: dataSourceKey | async\n }}</cds-label>\n\n <p class=\"conditions__helper-text cds--form__helper-text\">\n {{ 'countsHelperText' | widgetTranslate: dataSourceKey | async }}\n </p>\n\n @for (_ of queryItemsList$ | async; track $index; let i = $index) {\n <cds-tile class=\"count-tile\" cdsLayer=\"1\">\n <div class=\"count-tile__input\">\n <v-input\n [title]=\"'countTitle' | widgetTranslate: dataSourceKey | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.queryItemsValue[i]?.label\"\n [disabled]=\"formDisabled\"\n [required]=\"true\"\n [fullWidth]=\"true\"\n (valueChange)=\"labelValueChange(i, $event)\"\n >\n </v-input>\n\n <valtimo-carbon-multi-input\n [disabled]=\"formDisabled\"\n [addRowText]=\"'addCondition' | widgetTranslate: dataSourceKey | async\"\n [defaultValues]=\"obs.queryItemsValue[i]?.queryConditions\"\n [dropdownColumnTitle]=\"'operator' | widgetTranslate: dataSourceKey | async\"\n [dropdownItems]=\"operatorItems$ | async\"\n [fullWidth]=\"true\"\n [initialAmountOfRows]=\"1\"\n [keyColumnTitle]=\"'path' | widgetTranslate: dataSourceKey | async\"\n [minimumAmountOfRows]=\"1\"\n [valueColumnTitle]=\"'value' | widgetTranslate: dataSourceKey | async\"\n type=\"keyDropdownValue\"\n (valueChange)=\"conditionsValueChange(i, $event)\"\n ></valtimo-carbon-multi-input>\n </div>\n\n <div class=\"count-tile__delete-button\">\n <cds-icon-button\n [disabled]=\"formDisabled || i < 2\"\n (click)=\"deleteCount(i)\"\n kind=\"danger\"\n size=\"sm\"\n >\n <svg class=\"cds--btn__icon\" cdsIcon=\"trash-can\" size=\"16\"></svg>\n </cds-icon-button>\n </div>\n </cds-tile>\n }\n\n <button\n class=\"add-count-button\"\n cdsButton=\"primary\"\n [disabled]=\"formDisabled\"\n (click)=\"addQueryItem()\"\n >\n {{ 'Aantal toevoegen' }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</form>\n", styles: ["::ng-deep .case-counts-configuration-form .conditions__label{display:flex;margin-bottom:8px}::ng-deep .case-counts-configuration-form .conditions__helper-text{font-style:italic;display:flex;margin-bottom:16px}::ng-deep .case-counts-configuration-form .count-tile{display:flex;flex-direction:row;gap:32px;justify-content:space-between;margin-bottom:16px}::ng-deep .case-counts-configuration-form .count-tile__input{width:100%}::ng-deep .case-counts-configuration-form .add-count-button{margin-bottom:16px}\n/*!\n * Copyright 2015-2024 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"] }]
1524
- }], ctorParameters: () => [{ type: i1$3.FormBuilder }, { type: i2$2.DocumentService }, { type: i3$1.TranslateService }, { type: WidgetTranslationService }, { type: i5.IconService }], propDecorators: { dataSourceKey: [{
1525
- type: Input
1526
- }], disabled: [{
1527
- type: Input
1528
- }], prefillConfiguration: [{
1529
- type: Input
1530
- }], configurationEvent: [{
1531
- type: Output
1532
- }] } });
1324
+ var WidgetSeverity;
1325
+ (function (WidgetSeverity) {
1326
+ WidgetSeverity["BLACK"] = "valtimo-severity__black";
1327
+ WidgetSeverity["GREEN"] = "valtimo-severity__green";
1328
+ WidgetSeverity["YELLOW"] = "valtimo-severity__yellow";
1329
+ WidgetSeverity["ORANGE"] = "valtimo-severity__orange";
1330
+ WidgetSeverity["RED"] = "valtimo-severity__red";
1331
+ })(WidgetSeverity || (WidgetSeverity = {}));
1533
1332
 
1534
1333
  /*
1535
1334
  * Copyright 2015-2024 Ritense BV, the Netherlands.
@@ -1562,21 +1361,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
1562
1361
  * See the License for the specific language governing permissions and
1563
1362
  * limitations under the License.
1564
1363
  */
1565
-
1566
- /*
1567
- * Copyright 2015-2024 Ritense BV, the Netherlands.
1568
- *
1569
- * Licensed under EUPL, Version 1.2 (the "License");
1570
- * you may not use this file except in compliance with the License.
1571
- * You may obtain a copy of the License at
1572
- *
1573
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1574
- *
1575
- * Unless required by applicable law or agreed to in writing, software
1576
- * distributed under the License is distributed on an "AS IS" basis,
1577
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1578
- * See the License for the specific language governing permissions and
1579
- * limitations under the License.
1364
+ class BigNumberDisplayComponent {
1365
+ get severityClass() {
1366
+ if (!this.displayTypeProperties.useKPI) {
1367
+ return WidgetSeverity.BLACK;
1368
+ }
1369
+ const value = this.data?.value;
1370
+ if (value < this.displayTypeProperties.lowSeverityThreshold) {
1371
+ return WidgetSeverity.GREEN;
1372
+ }
1373
+ else if (value < this.displayTypeProperties.mediumSeverityThreshold) {
1374
+ return WidgetSeverity.YELLOW;
1375
+ }
1376
+ else if (value < this.displayTypeProperties.highSeverityThreshold) {
1377
+ return WidgetSeverity.ORANGE;
1378
+ }
1379
+ return WidgetSeverity.RED;
1380
+ }
1381
+ get numberFontSize() {
1382
+ if (!this.data) {
1383
+ return 122;
1384
+ }
1385
+ return Math.floor(122 / this.data.value.toString().length) + 20;
1386
+ }
1387
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BigNumberDisplayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1388
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: BigNumberDisplayComponent, selector: "valtimo-big-number-display", inputs: { displayTypeKey: "displayTypeKey", data: "data", displayTypeProperties: "displayTypeProperties" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 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: [":host{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%;padding:20px}.valtimo-big-number-widget__title,.valtimo-big-number-widget__subtitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.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/*!\n * Copyright 2015-2024 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: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1389
+ }
1390
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BigNumberDisplayComponent, decorators: [{
1391
+ type: Component,
1392
+ args: [{ selector: 'valtimo-big-number-display', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2024 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: [":host{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%;padding:20px}.valtimo-big-number-widget__title,.valtimo-big-number-widget__subtitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.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/*!\n * Copyright 2015-2024 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"] }]
1393
+ }], propDecorators: { displayTypeKey: [{
1394
+ type: Input
1395
+ }], data: [{
1396
+ type: Input
1397
+ }], displayTypeProperties: [{
1398
+ type: Input
1399
+ }] } });
1400
+
1401
+ /*
1402
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
1403
+ *
1404
+ * Licensed under EUPL, Version 1.2 (the "License");
1405
+ * you may not use this file except in compliance with the License.
1406
+ * You may obtain a copy of the License at
1407
+ *
1408
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1409
+ *
1410
+ * Unless required by applicable law or agreed to in writing, software
1411
+ * distributed under the License is distributed on an "AS IS" basis,
1412
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1413
+ * See the License for the specific language governing permissions and
1414
+ * limitations under the License.
1580
1415
  */
1581
1416
 
1582
1417
  /*
@@ -1610,65 +1445,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
1610
1445
  * See the License for the specific language governing permissions and
1611
1446
  * limitations under the License.
1612
1447
  */
1613
- const caseCountsDataSourceSpecification = {
1614
- dataSourceKey: 'case-counts',
1615
- configurationComponent: CaseCountsConfigurationComponent,
1448
+ const bigNumberSpecification = {
1449
+ displayTypeKey: 'number',
1450
+ displayComponent: BigNumberDisplayComponent,
1451
+ configurationComponent: BigNumberConfigurationComponent,
1452
+ width: 1,
1453
+ height: 1,
1616
1454
  translations: {
1617
- de: {
1618
- title: 'Mehrere Fallanzahllen',
1619
- documentDefinition: 'Falltyp (erforderlich)',
1620
- documentDefinitionHelperText: 'Der Falltyp, für den die Anzahllen abgeruft wirden',
1621
- '!=': 'Nicht gleichzusetzen mit',
1622
- '==': 'Gleich',
1623
- '>': 'Größer als',
1624
- '>=': 'Größer als oder gleich wie',
1625
- '<': 'Weniger als',
1626
- '<=': 'Gleich oder kleiner als',
1627
- path: 'Pfad',
1628
- operator: 'Operator',
1629
- value: 'Wert',
1630
- counts: 'Anzahllen',
1631
- countsHelperText: "Geben Sie eine oder mehrere Bedingungen für mindestens zwei Anzahllen an. Zum Beispiel: 'case:createdBy', 'Gleich', 'test@test.com'. Zum Vergleichen mit leeren Werten kann als Wert '${null}' eingegeben werden. Zum Vergleichen mit dem aktuellen Datum kann als Wert '${localDateTimeNow}' eingegeben werden. Damit wird beispielsweise auch folgende Logik unterstützt: '${localDateTimeNow.minusWeeks(2)}'.",
1632
- addCondition: 'Bedingung hinzufügen',
1633
- countTitle: 'Anzahltitel',
1455
+ nl: {
1456
+ title: 'Groot getal',
1457
+ formTitle: 'Titel (vereist)',
1458
+ formTitleHelperText: 'De titel die wordt weergegeven in de widget',
1459
+ subtitle: 'Ondertitel',
1460
+ subtitleHelperText: 'De ondertitel weergegeven in de widget',
1461
+ label: 'Label',
1462
+ labelHelperText: 'Het label dat wordt weergegeven in de widget',
1463
+ useKPI: 'KPI gebruiken',
1464
+ lowSeverityThreshold: 'Lage ernstdrempel (vereist)',
1465
+ mediumSeverityThreshold: 'Middelmatige ernstdrempel (vereist)',
1466
+ highSeverityThreshold: 'Hoge ernstdrempel (vereist)',
1634
1467
  },
1635
1468
  en: {
1636
- title: 'Multiple case counts',
1637
- documentDefinition: 'Case type (required)',
1638
- documentDefinitionHelperText: 'The case type for which the counts are retrieved',
1639
- '!=': 'Not equal to',
1640
- '==': 'Equal to',
1641
- '>': 'Greater than',
1642
- '>=': 'Greater than or equal to',
1643
- '<': 'Less than',
1644
- '<=': 'Less than or equal to',
1645
- path: 'Path (required)',
1646
- operator: 'Operator',
1647
- value: 'Value',
1648
- counts: 'Counts',
1649
- countsHelperText: "Specify one or more conditions for each count that should be displayed. For example: 'case:createdBy', 'Equal to', 'test@test.com'. Configure at least two counts and at least one condition per count.",
1650
- addCondition: 'Add condition',
1651
- countTitle: 'Count title',
1469
+ title: 'Big number',
1470
+ formTitle: 'Title (required)',
1471
+ formTitleHelperText: 'The title displayed in the widget',
1472
+ subtitle: 'Subtitle',
1473
+ subtitleHelperText: 'The subtitle displayed in the widget',
1474
+ label: 'Label',
1475
+ labelHelperText: 'The label displayed in the widget',
1476
+ useKPI: 'Use KPI',
1477
+ lowSeverityThreshold: 'Low severity threshold (required)',
1478
+ mediumSeverityThreshold: 'Medium severity threshold (required)',
1479
+ highSeverityThreshold: 'High severity threshold (required)',
1652
1480
  },
1653
- nl: {
1654
- title: 'Meerdere dossieraantallen',
1655
- documentDefinition: 'Dossiertype (vereist)',
1656
- documentDefinitionHelperText: 'Het dossiertype waarvoor de aantallen worden opgehaald',
1657
- '!=': 'Niet gelijk aan',
1658
- '==': 'Gelijk aan',
1659
- '>': 'Groter dan',
1660
- '>=': 'Groter dan of gelijk aan',
1661
- '<': 'Minder dan',
1662
- '<=': 'Minder dan of gelijk aan',
1663
- path: 'Pad',
1664
- operator: 'Operator',
1665
- value: 'Waarde',
1666
- counts: 'Aantallen',
1667
- countsHelperText: "Geef een of meer condities op voor een minimum van twee aantallen. Bijvoorbeeld: 'case:createdBy', 'Gelijk aan', 'test@test.com'. Voor het vergelijken met lege waardes kan '${null}' ingevuld worden als waarde. Voor het vergelijken met de huidige datum kan '${localDateTimeNow}' ingevuld worden als waarde. Deze ondersteunt ook bijvoorbeeld de volgende logica: '${localDateTimeNow.minusWeeks(2)}'.",
1668
- addCondition: 'Conditie toevoegen',
1669
- countTitle: 'Aantaltitel',
1481
+ de: {
1482
+ title: 'Große Nummer',
1483
+ formTitle: 'Titel (erforderlich)',
1484
+ formTitleHelperText: 'Der im Widget angezeigte Titel',
1485
+ subtitle: 'Untertitel',
1486
+ subtitleHelperText: 'Der im Widget angezeigte Untertitel',
1487
+ label: 'Beschriftung',
1488
+ labelHelperText: 'Die im Widget angezeigte Beschriftung',
1489
+ useKPI: 'Verwenden Sie KPI',
1490
+ lowSeverityThreshold: 'Niedriger Schweregradschwellenwert (erforderlich)',
1491
+ mediumSeverityThreshold: 'Mittlerer Schweregradschwellenwert (erforderlich)',
1492
+ highSeverityThreshold: 'Hoher Schweregradschwellenwert (erforderlich)',
1670
1493
  },
1671
1494
  },
1495
+ requiredDataFeatures: [DATA_FEATURES.NUMBER],
1672
1496
  };
1673
1497
 
1674
1498
  /*
@@ -1686,54 +1510,32 @@ const caseCountsDataSourceSpecification = {
1686
1510
  * See the License for the specific language governing permissions and
1687
1511
  * limitations under the License.
1688
1512
  */
1689
- class CaseCountsDataSourceModule {
1690
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseCountsDataSourceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1691
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: CaseCountsDataSourceModule, declarations: [CaseCountsConfigurationComponent], imports: [CommonModule,
1513
+ class BigNumberModule {
1514
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BigNumberModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1515
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: BigNumberModule, declarations: [BigNumberDisplayComponent, BigNumberConfigurationComponent], imports: [CommonModule,
1692
1516
  ReactiveFormsModule,
1693
1517
  WidgetTranslatePipeModule,
1694
- InputModule$1,
1695
- DropdownModule,
1696
- CarbonMultiInputModule,
1697
- InputModule$1,
1698
- ButtonModule,
1699
- TilesModule,
1700
- LayerModule,
1701
- IconModule], exports: [CaseCountsConfigurationComponent] }); }
1702
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseCountsDataSourceModule, providers: [
1703
- { provide: DATA_SOURCE_TOKEN, useValue: caseCountsDataSourceSpecification, multi: true },
1704
- ], imports: [CommonModule,
1518
+ InputModule,
1519
+ CheckboxModule], exports: [BigNumberDisplayComponent] }); }
1520
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BigNumberModule, providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: bigNumberSpecification, multi: true }], imports: [CommonModule,
1705
1521
  ReactiveFormsModule,
1706
1522
  WidgetTranslatePipeModule,
1707
- InputModule$1,
1708
- DropdownModule,
1709
- CarbonMultiInputModule,
1710
- InputModule$1,
1711
- ButtonModule,
1712
- TilesModule,
1713
- LayerModule,
1714
- IconModule] }); }
1523
+ InputModule,
1524
+ CheckboxModule] }); }
1715
1525
  }
1716
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseCountsDataSourceModule, decorators: [{
1526
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BigNumberModule, decorators: [{
1717
1527
  type: NgModule,
1718
1528
  args: [{
1719
- declarations: [CaseCountsConfigurationComponent],
1529
+ declarations: [BigNumberDisplayComponent, BigNumberConfigurationComponent],
1720
1530
  imports: [
1721
1531
  CommonModule,
1722
1532
  ReactiveFormsModule,
1723
1533
  WidgetTranslatePipeModule,
1724
- InputModule$1,
1725
- DropdownModule,
1726
- CarbonMultiInputModule,
1727
- InputModule$1,
1728
- ButtonModule,
1729
- TilesModule,
1730
- LayerModule,
1731
- IconModule,
1732
- ],
1733
- exports: [CaseCountsConfigurationComponent],
1734
- providers: [
1735
- { provide: DATA_SOURCE_TOKEN, useValue: caseCountsDataSourceSpecification, multi: true },
1534
+ InputModule,
1535
+ CheckboxModule,
1736
1536
  ],
1537
+ exports: [BigNumberDisplayComponent],
1538
+ providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: bigNumberSpecification, multi: true }],
1737
1539
  }]
1738
1540
  }] });
1739
1541
 
@@ -1768,25 +1570,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
1768
1570
  * See the License for the specific language governing permissions and
1769
1571
  * limitations under the License.
1770
1572
  */
1771
- class CaseGroupByConfigurationComponent {
1772
- get documentDefinition() {
1773
- return this.form.get('documentDefinition');
1774
- }
1775
- get path() {
1776
- return this.form.get('path');
1777
- }
1778
- get queryConditions() {
1779
- return this.form.get('queryConditions');
1780
- }
1781
- get enum() {
1782
- return this.form.get('enum');
1783
- }
1784
- get formDisabled() {
1785
- return this.form.disabled;
1786
- }
1787
- get formValue$() {
1788
- return this.form.valueChanges.pipe(startWith(this.form.value));
1789
- }
1573
+
1574
+ /*
1575
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
1576
+ *
1577
+ * Licensed under EUPL, Version 1.2 (the "License");
1578
+ * you may not use this file except in compliance with the License.
1579
+ * You may obtain a copy of the License at
1580
+ *
1581
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1582
+ *
1583
+ * Unless required by applicable law or agreed to in writing, software
1584
+ * distributed under the License is distributed on an "AS IS" basis,
1585
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1586
+ * See the License for the specific language governing permissions and
1587
+ * limitations under the License.
1588
+ */
1589
+
1590
+ /*
1591
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
1592
+ *
1593
+ * Licensed under EUPL, Version 1.2 (the "License");
1594
+ * you may not use this file except in compliance with the License.
1595
+ * You may obtain a copy of the License at
1596
+ *
1597
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1598
+ *
1599
+ * Unless required by applicable law or agreed to in writing, software
1600
+ * distributed under the License is distributed on an "AS IS" basis,
1601
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1602
+ * See the License for the specific language governing permissions and
1603
+ * limitations under the License.
1604
+ */
1605
+ class DonutConfigurationComponent {
1790
1606
  set disabled(disabledValue) {
1791
1607
  if (disabledValue) {
1792
1608
  this.form.disable();
@@ -1795,52 +1611,30 @@ class CaseGroupByConfigurationComponent {
1795
1611
  this.form.enable();
1796
1612
  }
1797
1613
  }
1798
- set prefillConfiguration(configurationValue) {
1799
- if (!configurationValue)
1800
- return;
1801
- this.documentDefinitionSelected({
1802
- item: {
1803
- content: configurationValue.documentDefinition,
1804
- },
1805
- });
1806
- this.queryConditions.patchValue(this.queryConditionsToMultiInputValues(configurationValue.queryConditions));
1807
- this.enum.patchValue(this.enumToMultiInputValues(configurationValue.enum));
1808
- this.path.patchValue(configurationValue.path);
1614
+ get title() {
1615
+ return this.form.get('title');
1809
1616
  }
1810
- constructor(fb, documentService, translateService, widgetTranslationService) {
1617
+ get subtitle() {
1618
+ return this.form.get('subtitle');
1619
+ }
1620
+ get label() {
1621
+ return this.form.get('label');
1622
+ }
1623
+ set prefillConfiguration(configurationValue) {
1624
+ if (configurationValue) {
1625
+ this.title.setValue(configurationValue.title || '');
1626
+ this.subtitle.setValue(configurationValue.subtitle || '');
1627
+ this.label.setValue(configurationValue.label || '');
1628
+ }
1629
+ }
1630
+ constructor(fb) {
1811
1631
  this.fb = fb;
1812
- this.documentService = documentService;
1813
- this.translateService = translateService;
1814
- this.widgetTranslationService = widgetTranslationService;
1815
1632
  this.form = this.fb.group({
1816
- documentDefinition: this.fb.control(null, [Validators.required]),
1817
- path: this.fb.control(null, [Validators.required]),
1818
- queryConditions: this.fb.control([], [this.queryConditionsValidator()]),
1819
- enum: this.fb.control([], [this.enumValidator()]),
1633
+ title: this.fb.control('', [Validators.required]),
1634
+ subtitle: this.fb.control(''),
1635
+ label: this.fb.control(''),
1636
+ useKPI: this.fb.control(false, [Validators.required]),
1820
1637
  });
1821
- this._selectedDocumentDefinition$ = new BehaviorSubject('');
1822
- this.documentItems$ = combineLatest([
1823
- this.documentService.getAllDefinitions(),
1824
- this._selectedDocumentDefinition$,
1825
- ]).pipe(map(([documentDefinitions, selectedDocumentDefintion]) => documentDefinitions.content.map(definition => ({
1826
- content: definition.id.name,
1827
- selected: definition.id.name === selectedDocumentDefintion,
1828
- }))));
1829
- this._OPERATORS = [
1830
- Operator.NOT_EQUAL_TO,
1831
- Operator.EQUAL_TO,
1832
- Operator.GREATER_THAN,
1833
- Operator.GREATER_THAN_OR_EQUAL_TO,
1834
- Operator.LESS_THAN,
1835
- Operator.LESS_THAN_OR_EQUAL_TO,
1836
- ];
1837
- this.operatorItems$ = this.translateService
1838
- .stream('key')
1839
- .pipe(map(() => this._OPERATORS.map(operator => ({
1840
- id: operator,
1841
- content: this.widgetTranslationService.instant(operator, this.dataSourceKey),
1842
- selected: false,
1843
- }))));
1844
1638
  this.configurationEvent = new EventEmitter();
1845
1639
  this._subscriptions = new Subscription();
1846
1640
  }
@@ -1850,92 +1644,21 @@ class CaseGroupByConfigurationComponent {
1850
1644
  ngOnDestroy() {
1851
1645
  this._subscriptions.unsubscribe();
1852
1646
  }
1853
- documentDefinitionSelected(documentDefinitionItem) {
1854
- if (!documentDefinitionItem) {
1855
- return;
1856
- }
1857
- this._selectedDocumentDefinition$.next(documentDefinitionItem?.item?.content);
1858
- this.documentDefinition.setValue(documentDefinitionItem?.item?.content);
1859
- }
1860
- conditionsValueChange(values) {
1861
- if (!values)
1862
- return;
1863
- const currentValue = this.queryConditions.value;
1864
- if (isEqual(values, currentValue))
1865
- return;
1866
- this.queryConditions.patchValue(values);
1867
- }
1868
- enumValueChange(values) {
1869
- if (!values)
1870
- return;
1871
- const currentValue = this.enum.value;
1872
- if (isEqual(values, currentValue))
1873
- return;
1874
- this.enum.patchValue(values);
1875
- }
1876
1647
  openFormSubscription() {
1877
1648
  this._subscriptions.add(this.form.valueChanges.pipe(startWith(this.form.value)).subscribe(formValue => {
1878
1649
  this.configurationEvent.emit({
1879
1650
  valid: this.form.valid,
1880
- data: {
1881
- ...formValue,
1882
- queryConditions: this.multiInputValuesToQueryConditions(formValue.queryConditions),
1883
- enum: this.multiInputValuesToEnum(formValue.enum),
1884
- },
1651
+ data: formValue,
1885
1652
  });
1886
1653
  }));
1887
1654
  }
1888
- queryConditionsValidator() {
1889
- return (control) => {
1890
- const queryConditions = control.value;
1891
- const validConditions = queryConditions.filter(condition => !!condition.value && !!condition.key && !!condition.dropdown);
1892
- return validConditions.length === queryConditions.length
1893
- ? null
1894
- : {
1895
- invalidQueryItems: 'invalid',
1896
- };
1897
- };
1898
- }
1899
- enumValidator() {
1900
- return (control) => {
1901
- const enumeration = control.value || [];
1902
- const enumLength = enumeration.length;
1903
- const validEnumKeysLength = enumeration.filter(entry => !!entry.key).length;
1904
- const validEnumValuesLength = enumeration.filter(entry => !!entry.value).length;
1905
- return enumLength === validEnumKeysLength && enumLength === validEnumValuesLength
1906
- ? null
1907
- : {
1908
- invalidEnum: 'invalid',
1909
- };
1910
- };
1911
- }
1912
- enumToMultiInputValues(enumeration) {
1913
- return Object.keys(enumeration || {}).reduce((acc, key) => [...acc, { key, value: enumeration[key] }], []);
1914
- }
1915
- multiInputValuesToEnum(values) {
1916
- return (values || []).reduce((acc, curr) => ({ ...acc, [curr.key]: curr.value }), {});
1917
- }
1918
- queryConditionsToMultiInputValues(queryConditions) {
1919
- return (queryConditions || []).map(condition => ({
1920
- key: condition.queryPath,
1921
- dropdown: condition.queryOperator,
1922
- value: condition.queryValue,
1923
- }));
1924
- }
1925
- multiInputValuesToQueryConditions(values) {
1926
- return (values || []).map(condition => ({
1927
- queryPath: condition.key,
1928
- queryOperator: condition.dropdown,
1929
- queryValue: condition.value,
1930
- }));
1931
- }
1932
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseGroupByConfigurationComponent, deps: [{ token: i1$3.FormBuilder }, { token: i2$2.DocumentService }, { token: i3$1.TranslateService }, { token: WidgetTranslationService }], target: i0.ɵɵFactoryTarget.Component }); }
1933
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: CaseGroupByConfigurationComponent, selector: "ng-component", inputs: { dataSourceKey: "dataSourceKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 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=\"{\n documentItems: documentItems$ | async,\n operatorItems: operatorItems$,\n formValue: formValue$ | async,\n } as obs\"\n [formGroup]=\"form\"\n>\n <div class=\"form__element\">\n <cds-dropdown\n [appendInline]=\"true\"\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\">\n <cds-label\n [helperText]=\"'pathHelperText' | widgetTranslate: dataSourceKey | async\"\n [invalidText]=\"'pathHelperText' | widgetTranslate: dataSourceKey | async\"\n [invalid]=\"path.dirty && path.invalid\"\n >\n {{ 'path' | widgetTranslate: dataSourceKey | async }}\n\n <input cdsText formControlName=\"path\" [invalid]=\"path.dirty && path.invalid\" />\n </cds-label>\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]=\"obs.formValue?.queryConditions\"\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 (valueChange)=\"conditionsValueChange($event)\"\n ></valtimo-carbon-multi-input>\n </div>\n\n <div class=\"form__element conditions-multi-input\">\n <cds-label\n [helperText]=\"'enumHelperText' | widgetTranslate: dataSourceKey | async\"\n class=\"conditions-label\"\n >{{ 'enum' | widgetTranslate: dataSourceKey | async }}</cds-label\n >\n <valtimo-carbon-multi-input\n [addRowText]=\"'addDisplay' | widgetTranslate: dataSourceKey | async\"\n [defaultValues]=\"obs.formValue?.enum\"\n [fullWidth]=\"true\"\n [initialAmountOfRows]=\"0\"\n [keyColumnTitle]=\"'value' | widgetTranslate: dataSourceKey | async\"\n [minimumAmountOfRows]=\"0\"\n [valueColumnTitle]=\"'displayValue' | widgetTranslate: dataSourceKey | async\"\n type=\"keyValue\"\n (valueChange)=\"enumValueChange($event)\"\n ></valtimo-carbon-multi-input>\n </div>\n</form>\n", styles: ["::ng-deep .case-count-configuration-form .conditions-label{margin-bottom:16px}::ng-deep .case-count-configuration-form .conditions-multi-input .cds--form__helper-text{font-style:italic}\n/*!\n * Copyright 2015-2024 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: 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.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: i5.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i5.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "component", type: i5.Dropdown, selector: "cds-dropdown, ibm-dropdown", inputs: ["id", "label", "hideLabel", "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: i5.DropdownList, selector: "cds-dropdown-list, ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }, { kind: "component", type: i1$1.CarbonMultiInputComponent, selector: "valtimo-carbon-multi-input", inputs: ["name", "title", "titleTranslationKey", "type", "arbitraryValueAmount", "arbitraryAmountTitles", "initialAmountOfRows", "minimumAmountOfRows", "maxRows", "addRowText", "addRowTranslationKey", "deleteRowText", "deleteRowTranslationKey", "disabled", "defaultValues", "margin", "tooltip", "required", "keyColumnTitle", "valueColumnTitle", "dropdownColumnTitle", "hideDeleteButton", "hideAddButton", "dropdownItems", "dropdownWidth", "fullWidth", "carbonTheme"], outputs: ["valueChange", "allValuesValidEvent"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: WidgetTranslatePipe, name: "widgetTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1655
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DonutConfigurationComponent, deps: [{ token: i1$3.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
1656
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: DonutConfigurationComponent, selector: "ng-component", inputs: { displayTypeKey: "displayTypeKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 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</form>\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.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: i5.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i5.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 }); }
1934
1657
  }
1935
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseGroupByConfigurationComponent, decorators: [{
1658
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DonutConfigurationComponent, decorators: [{
1936
1659
  type: Component,
1937
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2024 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=\"{\n documentItems: documentItems$ | async,\n operatorItems: operatorItems$,\n formValue: formValue$ | async,\n } as obs\"\n [formGroup]=\"form\"\n>\n <div class=\"form__element\">\n <cds-dropdown\n [appendInline]=\"true\"\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\">\n <cds-label\n [helperText]=\"'pathHelperText' | widgetTranslate: dataSourceKey | async\"\n [invalidText]=\"'pathHelperText' | widgetTranslate: dataSourceKey | async\"\n [invalid]=\"path.dirty && path.invalid\"\n >\n {{ 'path' | widgetTranslate: dataSourceKey | async }}\n\n <input cdsText formControlName=\"path\" [invalid]=\"path.dirty && path.invalid\" />\n </cds-label>\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]=\"obs.formValue?.queryConditions\"\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 (valueChange)=\"conditionsValueChange($event)\"\n ></valtimo-carbon-multi-input>\n </div>\n\n <div class=\"form__element conditions-multi-input\">\n <cds-label\n [helperText]=\"'enumHelperText' | widgetTranslate: dataSourceKey | async\"\n class=\"conditions-label\"\n >{{ 'enum' | widgetTranslate: dataSourceKey | async }}</cds-label\n >\n <valtimo-carbon-multi-input\n [addRowText]=\"'addDisplay' | widgetTranslate: dataSourceKey | async\"\n [defaultValues]=\"obs.formValue?.enum\"\n [fullWidth]=\"true\"\n [initialAmountOfRows]=\"0\"\n [keyColumnTitle]=\"'value' | widgetTranslate: dataSourceKey | async\"\n [minimumAmountOfRows]=\"0\"\n [valueColumnTitle]=\"'displayValue' | widgetTranslate: dataSourceKey | async\"\n type=\"keyValue\"\n (valueChange)=\"enumValueChange($event)\"\n ></valtimo-carbon-multi-input>\n </div>\n</form>\n", styles: ["::ng-deep .case-count-configuration-form .conditions-label{margin-bottom:16px}::ng-deep .case-count-configuration-form .conditions-multi-input .cds--form__helper-text{font-style:italic}\n/*!\n * Copyright 2015-2024 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"] }]
1938
- }], ctorParameters: () => [{ type: i1$3.FormBuilder }, { type: i2$2.DocumentService }, { type: i3$1.TranslateService }, { type: WidgetTranslationService }], propDecorators: { dataSourceKey: [{
1660
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2024 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</form>\n" }]
1661
+ }], ctorParameters: () => [{ type: i1$3.FormBuilder }], propDecorators: { displayTypeKey: [{
1939
1662
  type: Input
1940
1663
  }], disabled: [{
1941
1664
  type: Input
@@ -1976,6 +1699,55 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
1976
1699
  * See the License for the specific language governing permissions and
1977
1700
  * limitations under the License.
1978
1701
  */
1702
+ class DonutDisplayComponent {
1703
+ set data(value) {
1704
+ if (!value)
1705
+ return;
1706
+ this._data$.next(value);
1707
+ }
1708
+ constructor(themeService) {
1709
+ this.themeService = themeService;
1710
+ this._data$ = new BehaviorSubject(null);
1711
+ this.donutData$ = this._data$.pipe(filter(data => !!data), map(data => data?.values.map(dataValue => ({
1712
+ group: dataValue.label,
1713
+ value: dataValue.value,
1714
+ })) || []));
1715
+ this.donutChartOptions$ = this.themeService.currentTheme$.pipe(map(currentTheme => ({
1716
+ resizable: true,
1717
+ toolbar: { enabled: false },
1718
+ height: '300px',
1719
+ theme: currentTheme,
1720
+ donut: {
1721
+ alignment: 'center',
1722
+ center: {
1723
+ label: this.displayTypeProperties.label,
1724
+ },
1725
+ },
1726
+ pie: {
1727
+ labels: {
1728
+ enabled: false,
1729
+ },
1730
+ },
1731
+ legend: {
1732
+ truncation: {
1733
+ numCharacter: 28,
1734
+ },
1735
+ },
1736
+ })));
1737
+ }
1738
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DonutDisplayComponent, deps: [{ token: i1$1.CdsThemeService }], target: i0.ɵɵFactoryTarget.Component }); }
1739
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: DonutDisplayComponent, selector: "valtimo-donut-display", inputs: { displayTypeKey: "displayTypeKey", data: "data", displayTypeProperties: "displayTypeProperties" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 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-donut-widget__header\">\n <h3 class=\"valtimo-donut-widget__title\">{{ displayTypeProperties.title }}</h3>\n\n <span *ngIf=\"displayTypeProperties.subtitle\" class=\"valtimo-donut-widget__subtitle\">\n {{ displayTypeProperties.subtitle }}\n </span>\n</section>\n\n<section class=\"valtimo-donut-widget__content\">\n <ng-container *ngIf=\"donutData$ | async as donutData\">\n @if (donutData.length > 0) {\n <ibm-donut-chart\n type=\"donut\"\n class=\"n-chart\"\n [data]=\"donutData\"\n [options]=\"donutChartOptions$ | async\"\n ></ibm-donut-chart>\n } @else {\n <valtimo-no-results\n [collapseVertically]=\"true\"\n [description]=\"'dossier.widgets.noData' | translate\"\n [smallPadding]=\"true\"\n ></valtimo-no-results>\n }\n </ng-container>\n</section>\n", styles: [":host{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%;padding:20px}.valtimo-donut-widget__title,.valtimo-donut-widget__subtitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.valtimo-donut-widget__title{font-size:20px;margin-bottom:12px}.valtimo-donut-widget__subtitle{font-size:14px}.valtimo-donut-widget__label{font-size:12px;margin-left:12px;margin-bottom:-1px}.valtimo-donut-widget__content{display:flex;align-items:flex-end;justify-content:center;margin-bottom:12px}\n/*!\n * Copyright 2015-2024 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: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$2.DonutChartComponent, selector: "ibm-donut-chart" }, { kind: "component", type: i1$1.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1740
+ }
1741
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DonutDisplayComponent, decorators: [{
1742
+ type: Component,
1743
+ args: [{ selector: 'valtimo-donut-display', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2024 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-donut-widget__header\">\n <h3 class=\"valtimo-donut-widget__title\">{{ displayTypeProperties.title }}</h3>\n\n <span *ngIf=\"displayTypeProperties.subtitle\" class=\"valtimo-donut-widget__subtitle\">\n {{ displayTypeProperties.subtitle }}\n </span>\n</section>\n\n<section class=\"valtimo-donut-widget__content\">\n <ng-container *ngIf=\"donutData$ | async as donutData\">\n @if (donutData.length > 0) {\n <ibm-donut-chart\n type=\"donut\"\n class=\"n-chart\"\n [data]=\"donutData\"\n [options]=\"donutChartOptions$ | async\"\n ></ibm-donut-chart>\n } @else {\n <valtimo-no-results\n [collapseVertically]=\"true\"\n [description]=\"'dossier.widgets.noData' | translate\"\n [smallPadding]=\"true\"\n ></valtimo-no-results>\n }\n </ng-container>\n</section>\n", styles: [":host{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%;padding:20px}.valtimo-donut-widget__title,.valtimo-donut-widget__subtitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.valtimo-donut-widget__title{font-size:20px;margin-bottom:12px}.valtimo-donut-widget__subtitle{font-size:14px}.valtimo-donut-widget__label{font-size:12px;margin-left:12px;margin-bottom:-1px}.valtimo-donut-widget__content{display:flex;align-items:flex-end;justify-content:center;margin-bottom:12px}\n/*!\n * Copyright 2015-2024 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"] }]
1744
+ }], ctorParameters: () => [{ type: i1$1.CdsThemeService }], propDecorators: { displayTypeKey: [{
1745
+ type: Input
1746
+ }], data: [{
1747
+ type: Input
1748
+ }], displayTypeProperties: [{
1749
+ type: Input
1750
+ }] } });
1979
1751
 
1980
1752
  /*
1981
1753
  * Copyright 2015-2024 Ritense BV, the Netherlands.
@@ -2024,77 +1796,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
2024
1796
  * See the License for the specific language governing permissions and
2025
1797
  * limitations under the License.
2026
1798
  */
2027
- const caseGroupByDataSourceSpecification = {
2028
- dataSourceKey: 'case-group-by',
2029
- configurationComponent: CaseGroupByConfigurationComponent,
1799
+ const donutSpecification = {
1800
+ displayTypeKey: 'donut',
1801
+ displayComponent: DonutDisplayComponent,
1802
+ configurationComponent: DonutConfigurationComponent,
1803
+ width: 1,
1804
+ height: 2,
2030
1805
  translations: {
2031
- de: {
2032
- title: 'Gruppe',
2033
- documentDefinition: 'Falltyp (erforderlich)',
2034
- documentDefinitionHelperText: 'Der Falltyp, für den die Anzahl abgerufen wird',
2035
- '!=': 'Nicht gleichzusetzen mit',
2036
- '==': 'Gleich',
2037
- '>': 'Größer als',
2038
- '>=': 'Größer als oder gleich wie',
2039
- '<': 'Weniger als',
2040
- '<=': 'Gleich oder kleiner als',
2041
- path: 'Pfad',
2042
- pathHelperText: 'Der Pfad innerhalb der Fall, deren Werte gruppiert werden sollen',
2043
- operator: 'Operator',
2044
- value: 'Wert',
2045
- conditions: 'Bedingungen',
2046
- conditionsHelperText: "Geben Sie optionale Bedingungen zum Abrufen der Gruppierung für den ausgewählten Falltyp an. Zum Beispiel: 'case:createdBy', 'Nicht gleichzusetzen mit', 'test@test.com'.",
2047
- addCondition: 'Bedingung hinzufügen',
2048
- enum: 'Anzeige der Werte',
2049
- enumHelperText: "Einige Werte aus der Datenbank sind für den Endbenutzer nicht lesbar. Geben Sie hier an, wie die Werte angezeigt werden sollen. Beispiel: Wert: 'anfrage-gesendet', Anzeige: 'Anfrage gesendet'.",
2050
- displayValue: 'Anzeige',
2051
- addDisplay: 'Ansicht hinzufügen',
1806
+ nl: {
1807
+ title: 'Donut-diagram',
1808
+ formTitle: 'Titel (vereist)',
1809
+ formTitleHelperText: 'De titel die wordt weergegeven in de widget',
1810
+ subtitle: 'Ondertitel',
1811
+ subtitleHelperText: 'De ondertitel weergegeven in de widget',
1812
+ label: 'Label',
1813
+ labelHelperText: 'Het label dat wordt weergegeven in de widget',
2052
1814
  },
2053
1815
  en: {
2054
- title: 'Group by',
2055
- documentDefinition: 'Case type (required)',
2056
- documentDefinitionHelperText: 'The case type for which the count is retrieved',
2057
- '!=': 'Not equal to',
2058
- '==': 'Equal to',
2059
- '>': 'Greater than',
2060
- '>=': 'Greater than or equal to',
2061
- '<': 'Less than',
2062
- '<=': 'Less than or equal to',
2063
- path: 'Path (required)',
2064
- pathHelperText: 'The path within the case of which the values should be grouped',
2065
- operator: 'Operator',
2066
- value: 'Value',
2067
- conditions: 'Conditions',
2068
- conditionsHelperText: "Specify optional conditions for retrieving the grouping for the selected case type. For example: 'case:createdBy', 'Not equal to', 'test@test.com'. To compare with empty values, '${null}' can be entered as a value. To compare with the current date, '${localDateTimeNow}' can be entered as a value. This also supports, for example, the following logic: '${localDateTimeNow.minusWeeks(2)}'.",
2069
- addCondition: 'Add condition',
2070
- enum: 'Display of values',
2071
- enumHelperText: "Some values from the database will not be readable by the end user. Specify here how the values should be displayed. For example: Value: 'request-sent', Display: 'Request sent'.",
2072
- displayValue: 'Display',
2073
- addDisplay: 'Add display',
1816
+ title: 'Donut chart',
1817
+ formTitle: 'Title (required)',
1818
+ formTitleHelperText: 'The title displayed in the widget',
1819
+ subtitle: 'Subtitle',
1820
+ subtitleHelperText: 'The subtitle displayed in the widget',
1821
+ label: 'Label',
1822
+ labelHelperText: 'The label displayed in the widget',
2074
1823
  },
2075
- nl: {
2076
- title: 'Groepering',
2077
- documentDefinition: 'Dossiertype (vereist)',
2078
- documentDefinitionHelperText: 'Het dossiertype waarvoor de telling wordt opgehaald',
2079
- '!=': 'Niet gelijk aan',
2080
- '==': 'Gelijk aan',
2081
- '>': 'Groter dan',
2082
- '>=': 'Groter dan of gelijk aan',
2083
- '<': 'Minder dan',
2084
- '<=': 'Minder dan of gelijk aan',
2085
- path: 'Pad',
2086
- pathHelperText: 'Het pad binnen het dossier waarvan de waardes gegroepeerd moeten worden',
2087
- operator: 'Operator',
2088
- value: 'Waarde',
2089
- conditions: 'Condities',
2090
- conditionsHelperText: "Geef optionele condities op voor het ophalen van de groepering voor het geselecteerde dossiertype. Bijvoorbeeld: 'case:createdBy', 'Niet gelijk aan', 'test@test.com'. Voor het vergelijken met lege waardes kan '${null}' ingevuld worden als waarde. Voor het vergelijken met de huidige datum kan '${localDateTimeNow}' ingevuld worden als waarde. Deze ondersteunt ook bijvoorbeeld de volgende logica: '${localDateTimeNow.minusWeeks(2)}'.",
2091
- addCondition: 'Conditie toevoegen',
2092
- enum: 'Weergave van waardes',
2093
- enumHelperText: "Sommige waardes uit de database zullen niet leesbaar zijn voor de eindgebruiker. Geef hier op hoe de waardes weergegeven moeten worden. Bijvoorbeeld: Waarde: 'aanvraag-verzonden', Weergave: 'Aanvraag verzonden'.",
2094
- displayValue: 'Weergave',
2095
- addDisplay: 'Weergave toevoegen',
1824
+ de: {
1825
+ title: 'Donut-Diagramm',
1826
+ formTitle: 'Titel (erforderlich)',
1827
+ formTitleHelperText: 'Der im Widget angezeigte Titel',
1828
+ subtitle: 'Untertitel',
1829
+ subtitleHelperText: 'Der im Widget angezeigte Untertitel',
1830
+ label: 'Beschriftung',
1831
+ labelHelperText: 'Die im Widget angezeigte Beschriftung',
2096
1832
  },
2097
1833
  },
1834
+ requiredDataFeatures: [DATA_FEATURES.NUMBERS],
2098
1835
  };
2099
1836
 
2100
1837
  /*
@@ -2112,39 +1849,44 @@ const caseGroupByDataSourceSpecification = {
2112
1849
  * See the License for the specific language governing permissions and
2113
1850
  * limitations under the License.
2114
1851
  */
2115
- class CaseGroupByDataSourceModule {
2116
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseGroupByDataSourceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2117
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: CaseGroupByDataSourceModule, declarations: [CaseGroupByConfigurationComponent], imports: [CommonModule,
1852
+ class DonutModule {
1853
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DonutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1854
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: DonutModule, declarations: [DonutDisplayComponent, DonutConfigurationComponent], imports: [CommonModule,
2118
1855
  ReactiveFormsModule,
2119
1856
  WidgetTranslatePipeModule,
2120
1857
  InputModule,
2121
- DropdownModule,
2122
- CarbonMultiInputModule], exports: [CaseGroupByConfigurationComponent] }); }
2123
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseGroupByDataSourceModule, providers: [
2124
- { provide: DATA_SOURCE_TOKEN, useValue: caseGroupByDataSourceSpecification, multi: true },
2125
- ], imports: [CommonModule,
1858
+ CheckboxModule,
1859
+ CommonModule,
1860
+ ChartsModule,
1861
+ CarbonListModule,
1862
+ TranslateModule], exports: [DonutDisplayComponent] }); }
1863
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DonutModule, providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: donutSpecification, multi: true }], imports: [CommonModule,
2126
1864
  ReactiveFormsModule,
2127
1865
  WidgetTranslatePipeModule,
2128
1866
  InputModule,
2129
- DropdownModule,
2130
- CarbonMultiInputModule] }); }
1867
+ CheckboxModule,
1868
+ CommonModule,
1869
+ ChartsModule,
1870
+ CarbonListModule,
1871
+ TranslateModule] }); }
2131
1872
  }
2132
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseGroupByDataSourceModule, decorators: [{
1873
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DonutModule, decorators: [{
2133
1874
  type: NgModule,
2134
1875
  args: [{
2135
- declarations: [CaseGroupByConfigurationComponent],
1876
+ declarations: [DonutDisplayComponent, DonutConfigurationComponent],
2136
1877
  imports: [
2137
1878
  CommonModule,
2138
1879
  ReactiveFormsModule,
2139
1880
  WidgetTranslatePipeModule,
2140
1881
  InputModule,
2141
- DropdownModule,
2142
- CarbonMultiInputModule,
2143
- ],
2144
- exports: [CaseGroupByConfigurationComponent],
2145
- providers: [
2146
- { provide: DATA_SOURCE_TOKEN, useValue: caseGroupByDataSourceSpecification, multi: true },
1882
+ CheckboxModule,
1883
+ CommonModule,
1884
+ ChartsModule,
1885
+ CarbonListModule,
1886
+ TranslateModule,
2147
1887
  ],
1888
+ exports: [DonutDisplayComponent],
1889
+ providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: donutSpecification, multi: true }],
2148
1890
  }]
2149
1891
  }] });
2150
1892
 
@@ -2195,7 +1937,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
2195
1937
  * See the License for the specific language governing permissions and
2196
1938
  * limitations under the License.
2197
1939
  */
2198
- class BigNumberConfigurationComponent {
1940
+
1941
+ /*
1942
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
1943
+ *
1944
+ * Licensed under EUPL, Version 1.2 (the "License");
1945
+ * you may not use this file except in compliance with the License.
1946
+ * You may obtain a copy of the License at
1947
+ *
1948
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1949
+ *
1950
+ * Unless required by applicable law or agreed to in writing, software
1951
+ * distributed under the License is distributed on an "AS IS" basis,
1952
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1953
+ * See the License for the specific language governing permissions and
1954
+ * limitations under the License.
1955
+ */
1956
+ class GaugeConfigurationComponent {
2199
1957
  set disabled(disabledValue) {
2200
1958
  if (disabledValue) {
2201
1959
  this.form.disable();
@@ -2213,27 +1971,11 @@ class BigNumberConfigurationComponent {
2213
1971
  get label() {
2214
1972
  return this.form.get('label');
2215
1973
  }
2216
- get useKPI() {
2217
- return this.form.get('useKPI');
2218
- }
2219
- get lowSeverityThreshold() {
2220
- return this.form.get('lowSeverityThreshold');
2221
- }
2222
- get mediumSeverityThreshold() {
2223
- return this.form.get('mediumSeverityThreshold');
2224
- }
2225
- get highSeverityThreshold() {
2226
- return this.form.get('highSeverityThreshold');
2227
- }
2228
1974
  set prefillConfiguration(configurationValue) {
2229
1975
  if (configurationValue) {
2230
1976
  this.title.setValue(configurationValue.title || '');
2231
1977
  this.subtitle.setValue(configurationValue.subtitle || '');
2232
1978
  this.label.setValue(configurationValue.label || '');
2233
- this.useKPI.setValue(configurationValue.useKPI || false);
2234
- this.lowSeverityThreshold.setValue(configurationValue.lowSeverityThreshold || null);
2235
- this.mediumSeverityThreshold.setValue(configurationValue.mediumSeverityThreshold || null);
2236
- this.highSeverityThreshold.setValue(configurationValue.highSeverityThreshold || null);
2237
1979
  }
2238
1980
  }
2239
1981
  constructor(fb) {
@@ -2243,49 +1985,30 @@ class BigNumberConfigurationComponent {
2243
1985
  subtitle: this.fb.control(''),
2244
1986
  label: this.fb.control(''),
2245
1987
  useKPI: this.fb.control(false, [Validators.required]),
2246
- lowSeverityThreshold: this.fb.control(null),
2247
- mediumSeverityThreshold: this.fb.control(null),
2248
- highSeverityThreshold: this.fb.control(null),
2249
1988
  });
2250
1989
  this.configurationEvent = new EventEmitter();
2251
1990
  this._subscriptions = new Subscription();
2252
1991
  }
2253
1992
  ngOnInit() {
2254
1993
  this.openFormSubscription();
2255
- this.openKPISubscription();
2256
1994
  }
2257
1995
  ngOnDestroy() {
2258
1996
  this._subscriptions.unsubscribe();
2259
1997
  }
2260
1998
  openFormSubscription() {
2261
1999
  this._subscriptions.add(this.form.valueChanges.pipe(startWith(this.form.value)).subscribe(formValue => {
2262
- this.configurationEvent.emit({ valid: this.form.valid, data: formValue });
2263
- }));
2264
- }
2265
- openKPISubscription() {
2266
- this._subscriptions.add(this.useKPI.valueChanges.pipe(startWith(this.useKPI.value)).subscribe(useKpi => {
2267
- const validators = [Validators.required];
2268
- if (useKpi) {
2269
- this.lowSeverityThreshold.setValidators(validators);
2270
- this.mediumSeverityThreshold.setValidators(validators);
2271
- this.highSeverityThreshold.setValidators(validators);
2272
- }
2273
- else {
2274
- this.lowSeverityThreshold.clearValidators();
2275
- this.mediumSeverityThreshold.clearValidators();
2276
- this.highSeverityThreshold.clearValidators();
2277
- }
2278
- this.lowSeverityThreshold.updateValueAndValidity();
2279
- this.mediumSeverityThreshold.updateValueAndValidity();
2280
- this.highSeverityThreshold.updateValueAndValidity();
2000
+ this.configurationEvent.emit({
2001
+ valid: this.form.valid,
2002
+ data: formValue,
2003
+ });
2281
2004
  }));
2282
2005
  }
2283
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BigNumberConfigurationComponent, deps: [{ token: i1$3.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
2284
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: BigNumberConfigurationComponent, selector: "ng-component", inputs: { displayTypeKey: "displayTypeKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 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: i5.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i5.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "component", type: i5.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 }); }
2006
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GaugeConfigurationComponent, deps: [{ token: i1$3.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
2007
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: GaugeConfigurationComponent, selector: "ng-component", inputs: { displayTypeKey: "displayTypeKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 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</form>\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.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: i5.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i5.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 }); }
2285
2008
  }
2286
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BigNumberConfigurationComponent, decorators: [{
2009
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GaugeConfigurationComponent, decorators: [{
2287
2010
  type: Component,
2288
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2024 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" }]
2011
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2024 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</form>\n" }]
2289
2012
  }], ctorParameters: () => [{ type: i1$3.FormBuilder }], propDecorators: { displayTypeKey: [{
2290
2013
  type: Input
2291
2014
  }], disabled: [{
@@ -2327,36 +2050,63 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
2327
2050
  * See the License for the specific language governing permissions and
2328
2051
  * limitations under the License.
2329
2052
  */
2330
- class BigNumberDisplayComponent {
2331
- get severityClass() {
2332
- if (!this.displayTypeProperties.useKPI) {
2333
- return WidgetSeverity.BLACK;
2334
- }
2335
- const value = this.data?.value;
2336
- if (value < this.displayTypeProperties.lowSeverityThreshold) {
2337
- return WidgetSeverity.GREEN;
2338
- }
2339
- else if (value < this.displayTypeProperties.mediumSeverityThreshold) {
2340
- return WidgetSeverity.YELLOW;
2341
- }
2342
- else if (value < this.displayTypeProperties.highSeverityThreshold) {
2343
- return WidgetSeverity.ORANGE;
2344
- }
2345
- return WidgetSeverity.RED;
2053
+ class GaugeDisplayComponent {
2054
+ set data(value) {
2055
+ if (!value)
2056
+ return;
2057
+ this._data$.next(value);
2346
2058
  }
2347
- get numberFontSize() {
2348
- if (!this.data) {
2349
- return 122;
2059
+ constructor(themeService, translateService) {
2060
+ this.themeService = themeService;
2061
+ this.translateService = translateService;
2062
+ this._DELTA = -1.0;
2063
+ this._data$ = new BehaviorSubject(null);
2064
+ this.chartData$ = this._data$.pipe(filter(data => !!data), map(data => [
2065
+ {
2066
+ group: 'value',
2067
+ value: this.calculatePercentage(data?.value || 0, data?.total || 0),
2068
+ },
2069
+ {
2070
+ group: 'delta',
2071
+ value: this._DELTA,
2072
+ },
2073
+ ]));
2074
+ this.gaugeChartOptions$ = combineLatest([
2075
+ this.themeService.currentTheme$,
2076
+ this.translateService.stream('key'),
2077
+ ]).pipe(map(([currentTheme]) => ({
2078
+ resizable: true,
2079
+ toolbar: { enabled: false },
2080
+ height: '110px',
2081
+ theme: currentTheme == 'g10' ? 'white' : 'g100',
2082
+ gauge: {
2083
+ alignment: 'center',
2084
+ numberFormatter: value => this.numberFormatter(this, value),
2085
+ deltaArrow: {
2086
+ enabled: false,
2087
+ },
2088
+ showPercentageSymbol: false,
2089
+ type: 'semi',
2090
+ },
2091
+ })));
2092
+ }
2093
+ calculatePercentage(value, total) {
2094
+ return (value * 100.0) / (total || 100.0);
2095
+ }
2096
+ numberFormatter(scope, value) {
2097
+ const scopeData = scope._data$.getValue();
2098
+ if (value == scope._DELTA) {
2099
+ return `${this.translateService.instant('dashboard.of')} ${scopeData?.total || 0} ${scope.displayTypeProperties.label} `;
2350
2100
  }
2351
- return Math.floor(122 / this.data.value.toString().length) + 20;
2101
+ return Math.round(value * (scopeData?.total || 0)) / 100.0 + '';
2352
2102
  }
2353
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BigNumberDisplayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2354
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: BigNumberDisplayComponent, selector: "valtimo-big-number-display", inputs: { displayTypeKey: "displayTypeKey", data: "data", displayTypeProperties: "displayTypeProperties" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 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: [":host{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%;padding:20px}.valtimo-big-number-widget__title,.valtimo-big-number-widget__subtitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.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/*!\n * Copyright 2015-2024 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: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2103
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GaugeDisplayComponent, deps: [{ token: i1$1.CdsThemeService }, { token: i3$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
2104
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: GaugeDisplayComponent, selector: "valtimo-gauge-display", inputs: { displayTypeKey: "displayTypeKey", data: "data", displayTypeProperties: "displayTypeProperties" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 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-gauge-widget__header\">\n <h3 class=\"valtimo-gauge-widget__title\">{{ displayTypeProperties.title }}</h3>\n\n <span *ngIf=\"displayTypeProperties.subtitle\" class=\"valtimo-gauge-widget__subtitle\">\n {{ displayTypeProperties.subtitle }}\n </span>\n</section>\n\n<section class=\"valtimo-gauge-widget__content\">\n <ibm-gauge-chart\n *ngIf=\"chartData$ | async as chartData\"\n type=\"gauge\"\n class=\"n-chart\"\n [data]=\"chartData\"\n [options]=\"gaugeChartOptions$ | async\"\n ></ibm-gauge-chart>\n</section>\n", styles: [":host{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%;padding:20px}.valtimo-gauge-widget__title,.valtimo-gauge-widget__subtitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.valtimo-gauge-widget__title{font-size:20px;margin-bottom:12px}.valtimo-gauge-widget__subtitle{font-size:14px}.valtimo-gauge-widget__label{font-size:12px;margin-left:12px;margin-bottom:-1px}.valtimo-gauge-widget__content{display:flex;align-items:flex-end;margin-bottom:12px}\n/*!\n * Copyright 2015-2024 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: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$2.GaugeChartComponent, selector: "ibm-gauge-chart" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2355
2105
  }
2356
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BigNumberDisplayComponent, decorators: [{
2106
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GaugeDisplayComponent, decorators: [{
2357
2107
  type: Component,
2358
- args: [{ selector: 'valtimo-big-number-display', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2024 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: [":host{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%;padding:20px}.valtimo-big-number-widget__title,.valtimo-big-number-widget__subtitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.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/*!\n * Copyright 2015-2024 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"] }]
2359
- }], propDecorators: { displayTypeKey: [{
2108
+ args: [{ selector: 'valtimo-gauge-display', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2024 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-gauge-widget__header\">\n <h3 class=\"valtimo-gauge-widget__title\">{{ displayTypeProperties.title }}</h3>\n\n <span *ngIf=\"displayTypeProperties.subtitle\" class=\"valtimo-gauge-widget__subtitle\">\n {{ displayTypeProperties.subtitle }}\n </span>\n</section>\n\n<section class=\"valtimo-gauge-widget__content\">\n <ibm-gauge-chart\n *ngIf=\"chartData$ | async as chartData\"\n type=\"gauge\"\n class=\"n-chart\"\n [data]=\"chartData\"\n [options]=\"gaugeChartOptions$ | async\"\n ></ibm-gauge-chart>\n</section>\n", styles: [":host{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%;padding:20px}.valtimo-gauge-widget__title,.valtimo-gauge-widget__subtitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.valtimo-gauge-widget__title{font-size:20px;margin-bottom:12px}.valtimo-gauge-widget__subtitle{font-size:14px}.valtimo-gauge-widget__label{font-size:12px;margin-left:12px;margin-bottom:-1px}.valtimo-gauge-widget__content{display:flex;align-items:flex-end;margin-bottom:12px}\n/*!\n * Copyright 2015-2024 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"] }]
2109
+ }], ctorParameters: () => [{ type: i1$1.CdsThemeService }, { type: i3$1.TranslateService }], propDecorators: { displayTypeKey: [{
2360
2110
  type: Input
2361
2111
  }], data: [{
2362
2112
  type: Input
@@ -2411,54 +2161,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
2411
2161
  * See the License for the specific language governing permissions and
2412
2162
  * limitations under the License.
2413
2163
  */
2414
- const bigNumberSpecification = {
2415
- displayTypeKey: 'number',
2416
- displayComponent: BigNumberDisplayComponent,
2417
- configurationComponent: BigNumberConfigurationComponent,
2164
+ const gaugeSpecification = {
2165
+ displayTypeKey: 'gauge',
2166
+ displayComponent: GaugeDisplayComponent,
2167
+ configurationComponent: GaugeConfigurationComponent,
2418
2168
  width: 1,
2419
2169
  height: 1,
2420
2170
  translations: {
2421
2171
  nl: {
2422
- title: 'Groot getal',
2172
+ title: 'Graadmeter',
2423
2173
  formTitle: 'Titel (vereist)',
2424
2174
  formTitleHelperText: 'De titel die wordt weergegeven in de widget',
2425
2175
  subtitle: 'Ondertitel',
2426
2176
  subtitleHelperText: 'De ondertitel weergegeven in de widget',
2427
2177
  label: 'Label',
2428
2178
  labelHelperText: 'Het label dat wordt weergegeven in de widget',
2429
- useKPI: 'KPI gebruiken',
2430
- lowSeverityThreshold: 'Lage ernstdrempel (vereist)',
2431
- mediumSeverityThreshold: 'Middelmatige ernstdrempel (vereist)',
2432
- highSeverityThreshold: 'Hoge ernstdrempel (vereist)',
2433
2179
  },
2434
2180
  en: {
2435
- title: 'Big number',
2181
+ title: 'Gauge',
2436
2182
  formTitle: 'Title (required)',
2437
2183
  formTitleHelperText: 'The title displayed in the widget',
2438
2184
  subtitle: 'Subtitle',
2439
2185
  subtitleHelperText: 'The subtitle displayed in the widget',
2440
2186
  label: 'Label',
2441
2187
  labelHelperText: 'The label displayed in the widget',
2442
- useKPI: 'Use KPI',
2443
- lowSeverityThreshold: 'Low severity threshold (required)',
2444
- mediumSeverityThreshold: 'Medium severity threshold (required)',
2445
- highSeverityThreshold: 'High severity threshold (required)',
2446
2188
  },
2447
2189
  de: {
2448
- title: 'Große Nummer',
2190
+ title: 'Messgerät',
2449
2191
  formTitle: 'Titel (erforderlich)',
2450
2192
  formTitleHelperText: 'Der im Widget angezeigte Titel',
2451
2193
  subtitle: 'Untertitel',
2452
2194
  subtitleHelperText: 'Der im Widget angezeigte Untertitel',
2453
2195
  label: 'Beschriftung',
2454
2196
  labelHelperText: 'Die im Widget angezeigte Beschriftung',
2455
- useKPI: 'Verwenden Sie KPI',
2456
- lowSeverityThreshold: 'Niedriger Schweregradschwellenwert (erforderlich)',
2457
- mediumSeverityThreshold: 'Mittlerer Schweregradschwellenwert (erforderlich)',
2458
- highSeverityThreshold: 'Hoher Schweregradschwellenwert (erforderlich)',
2459
2197
  },
2460
2198
  },
2461
- requiredDataFeatures: [DATA_FEATURES.NUMBER],
2199
+ requiredDataFeatures: [DATA_FEATURES.NUMBER, DATA_FEATURES.TOTAL],
2462
2200
  };
2463
2201
 
2464
2202
  /*
@@ -2476,32 +2214,38 @@ const bigNumberSpecification = {
2476
2214
  * See the License for the specific language governing permissions and
2477
2215
  * limitations under the License.
2478
2216
  */
2479
- class BigNumberModule {
2480
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BigNumberModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2481
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: BigNumberModule, declarations: [BigNumberDisplayComponent, BigNumberConfigurationComponent], imports: [CommonModule,
2217
+ class GaugeModule {
2218
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GaugeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2219
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: GaugeModule, declarations: [GaugeDisplayComponent, GaugeConfigurationComponent], imports: [CommonModule,
2482
2220
  ReactiveFormsModule,
2483
2221
  WidgetTranslatePipeModule,
2484
2222
  InputModule,
2485
- CheckboxModule], exports: [BigNumberDisplayComponent] }); }
2486
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BigNumberModule, providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: bigNumberSpecification, multi: true }], imports: [CommonModule,
2223
+ CheckboxModule,
2224
+ CommonModule,
2225
+ ChartsModule], exports: [GaugeDisplayComponent] }); }
2226
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GaugeModule, providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: gaugeSpecification, multi: true }], imports: [CommonModule,
2487
2227
  ReactiveFormsModule,
2488
2228
  WidgetTranslatePipeModule,
2489
2229
  InputModule,
2490
- CheckboxModule] }); }
2230
+ CheckboxModule,
2231
+ CommonModule,
2232
+ ChartsModule] }); }
2491
2233
  }
2492
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BigNumberModule, decorators: [{
2234
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GaugeModule, decorators: [{
2493
2235
  type: NgModule,
2494
2236
  args: [{
2495
- declarations: [BigNumberDisplayComponent, BigNumberConfigurationComponent],
2237
+ declarations: [GaugeDisplayComponent, GaugeConfigurationComponent],
2496
2238
  imports: [
2497
2239
  CommonModule,
2498
2240
  ReactiveFormsModule,
2499
2241
  WidgetTranslatePipeModule,
2500
2242
  InputModule,
2501
2243
  CheckboxModule,
2244
+ CommonModule,
2245
+ ChartsModule,
2502
2246
  ],
2503
- exports: [BigNumberDisplayComponent],
2504
- providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: bigNumberSpecification, multi: true }],
2247
+ exports: [GaugeDisplayComponent],
2248
+ providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: gaugeSpecification, multi: true }],
2505
2249
  }]
2506
2250
  }] });
2507
2251
 
@@ -2568,7 +2312,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
2568
2312
  * See the License for the specific language governing permissions and
2569
2313
  * limitations under the License.
2570
2314
  */
2571
- class DonutConfigurationComponent {
2315
+ class MeterConfigurationComponent {
2572
2316
  set disabled(disabledValue) {
2573
2317
  if (disabledValue) {
2574
2318
  this.form.disable();
@@ -2583,14 +2327,10 @@ class DonutConfigurationComponent {
2583
2327
  get subtitle() {
2584
2328
  return this.form.get('subtitle');
2585
2329
  }
2586
- get label() {
2587
- return this.form.get('label');
2588
- }
2589
2330
  set prefillConfiguration(configurationValue) {
2590
2331
  if (configurationValue) {
2591
2332
  this.title.setValue(configurationValue.title || '');
2592
2333
  this.subtitle.setValue(configurationValue.subtitle || '');
2593
- this.label.setValue(configurationValue.label || '');
2594
2334
  }
2595
2335
  }
2596
2336
  constructor(fb) {
@@ -2598,8 +2338,6 @@ class DonutConfigurationComponent {
2598
2338
  this.form = this.fb.group({
2599
2339
  title: this.fb.control('', [Validators.required]),
2600
2340
  subtitle: this.fb.control(''),
2601
- label: this.fb.control(''),
2602
- useKPI: this.fb.control(false, [Validators.required]),
2603
2341
  });
2604
2342
  this.configurationEvent = new EventEmitter();
2605
2343
  this._subscriptions = new Subscription();
@@ -2618,12 +2356,12 @@ class DonutConfigurationComponent {
2618
2356
  });
2619
2357
  }));
2620
2358
  }
2621
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DonutConfigurationComponent, deps: [{ token: i1$3.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
2622
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: DonutConfigurationComponent, selector: "ng-component", inputs: { displayTypeKey: "displayTypeKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 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</form>\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.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: i5.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i5.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 }); }
2359
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MeterConfigurationComponent, deps: [{ token: i1$3.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
2360
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: MeterConfigurationComponent, selector: "ng-component", inputs: { displayTypeKey: "displayTypeKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 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</form>\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.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: i5.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i5.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 }); }
2623
2361
  }
2624
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DonutConfigurationComponent, decorators: [{
2362
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MeterConfigurationComponent, decorators: [{
2625
2363
  type: Component,
2626
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2024 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</form>\n" }]
2364
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2024 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</form>\n" }]
2627
2365
  }], ctorParameters: () => [{ type: i1$3.FormBuilder }], propDecorators: { displayTypeKey: [{
2628
2366
  type: Input
2629
2367
  }], disabled: [{
@@ -2665,7 +2403,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
2665
2403
  * See the License for the specific language governing permissions and
2666
2404
  * limitations under the License.
2667
2405
  */
2668
- class DonutDisplayComponent {
2406
+ class MeterDisplayComponent {
2669
2407
  set data(value) {
2670
2408
  if (!value)
2671
2409
  return;
@@ -2674,39 +2412,38 @@ class DonutDisplayComponent {
2674
2412
  constructor(themeService) {
2675
2413
  this.themeService = themeService;
2676
2414
  this._data$ = new BehaviorSubject(null);
2677
- this.donutData$ = this._data$.pipe(filter(data => !!data), map(data => data?.values.map(dataValue => ({
2415
+ this.meterData$ = this._data$.pipe(filter(data => !!data), map(data => data?.values.map(dataValue => ({
2678
2416
  group: dataValue.label,
2679
2417
  value: dataValue.value,
2680
2418
  })) || []));
2681
- this.donutChartOptions$ = this.themeService.currentTheme$.pipe(map(currentTheme => ({
2419
+ this.meterChartOptions$ = combineLatest([
2420
+ this.themeService.currentTheme$,
2421
+ this.meterData$,
2422
+ ]).pipe(map(([currentTheme, meterData]) => ({
2682
2423
  resizable: true,
2683
2424
  toolbar: { enabled: false },
2684
- height: '300px',
2685
2425
  theme: currentTheme,
2686
- donut: {
2687
- alignment: 'center',
2688
- center: {
2689
- label: this.displayTypeProperties.label,
2690
- },
2691
- },
2692
- pie: {
2693
- labels: {
2694
- enabled: false,
2426
+ height: '60px',
2427
+ meter: {
2428
+ height: 60,
2429
+ showLabels: false,
2430
+ title: {
2431
+ percentageIndicator: {
2432
+ enabled: false,
2433
+ },
2695
2434
  },
2696
- },
2697
- legend: {
2698
- truncation: {
2699
- numCharacter: 28,
2435
+ proportional: {
2436
+ total: meterData.reduce((acc, curr) => acc + curr.value, 0),
2700
2437
  },
2701
2438
  },
2702
2439
  })));
2703
2440
  }
2704
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DonutDisplayComponent, deps: [{ token: i1$1.CdsThemeService }], target: i0.ɵɵFactoryTarget.Component }); }
2705
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: DonutDisplayComponent, selector: "valtimo-donut-display", inputs: { displayTypeKey: "displayTypeKey", data: "data", displayTypeProperties: "displayTypeProperties" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 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-donut-widget__header\">\n <h3 class=\"valtimo-donut-widget__title\">{{ displayTypeProperties.title }}</h3>\n\n <span *ngIf=\"displayTypeProperties.subtitle\" class=\"valtimo-donut-widget__subtitle\">\n {{ displayTypeProperties.subtitle }}\n </span>\n</section>\n\n<section class=\"valtimo-donut-widget__content\">\n <ng-container *ngIf=\"donutData$ | async as donutData\">\n @if (donutData.length > 0) {\n <ibm-donut-chart\n type=\"donut\"\n class=\"n-chart\"\n [data]=\"donutData\"\n [options]=\"donutChartOptions$ | async\"\n ></ibm-donut-chart>\n } @else {\n <valtimo-no-results\n [collapseVertically]=\"true\"\n [description]=\"'dossier.widgets.noData' | translate\"\n [smallPadding]=\"true\"\n ></valtimo-no-results>\n }\n </ng-container>\n</section>\n", styles: [":host{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%;padding:20px}.valtimo-donut-widget__title,.valtimo-donut-widget__subtitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.valtimo-donut-widget__title{font-size:20px;margin-bottom:12px}.valtimo-donut-widget__subtitle{font-size:14px}.valtimo-donut-widget__label{font-size:12px;margin-left:12px;margin-bottom:-1px}.valtimo-donut-widget__content{display:flex;align-items:flex-end;justify-content:center;margin-bottom:12px}\n/*!\n * Copyright 2015-2024 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: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$2.DonutChartComponent, selector: "ibm-donut-chart" }, { kind: "component", type: i1$1.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2441
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MeterDisplayComponent, deps: [{ token: i1$1.CdsThemeService }], target: i0.ɵɵFactoryTarget.Component }); }
2442
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: MeterDisplayComponent, selector: "valtimo-meter-display", inputs: { displayTypeKey: "displayTypeKey", data: "data", displayTypeProperties: "displayTypeProperties" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 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-donut-widget__header\">\n <h3 class=\"valtimo-donut-widget__title\">{{ displayTypeProperties.title }}</h3>\n\n <span *ngIf=\"displayTypeProperties.subtitle\" class=\"valtimo-donut-widget__subtitle\">\n {{ displayTypeProperties.subtitle }}\n </span>\n</section>\n\n<section class=\"valtimo-donut-widget__content\">\n <ng-container *ngIf=\"meterData$ | async as meterData\">\n @if (meterData.length > 0) {\n <ibm-meter-chart [data]=\"meterData\" [options]=\"meterChartOptions$ | async\"></ibm-meter-chart>\n } @else {\n <valtimo-no-results\n [collapseVertically]=\"true\"\n [description]=\"'dossier.widgets.noData' | translate\"\n [smallPadding]=\"true\"\n ></valtimo-no-results>\n }\n </ng-container>\n</section>\n", styles: [":host{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%;padding:20px}.valtimo-donut-widget__title,.valtimo-donut-widget__subtitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.valtimo-donut-widget__title{font-size:20px;margin-bottom:12px}.valtimo-donut-widget__subtitle{font-size:14px}.valtimo-donut-widget__label{font-size:12px;margin-left:12px;margin-bottom:-1px}.valtimo-donut-widget__content{display:flex;align-items:flex-end;justify-content:center;margin-bottom:12px}\n/*!\n * Copyright 2015-2024 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: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$2.MeterChartComponent, selector: "ibm-meter-chart" }, { kind: "component", type: i1$1.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2706
2443
  }
2707
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DonutDisplayComponent, decorators: [{
2444
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MeterDisplayComponent, decorators: [{
2708
2445
  type: Component,
2709
- args: [{ selector: 'valtimo-donut-display', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2024 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-donut-widget__header\">\n <h3 class=\"valtimo-donut-widget__title\">{{ displayTypeProperties.title }}</h3>\n\n <span *ngIf=\"displayTypeProperties.subtitle\" class=\"valtimo-donut-widget__subtitle\">\n {{ displayTypeProperties.subtitle }}\n </span>\n</section>\n\n<section class=\"valtimo-donut-widget__content\">\n <ng-container *ngIf=\"donutData$ | async as donutData\">\n @if (donutData.length > 0) {\n <ibm-donut-chart\n type=\"donut\"\n class=\"n-chart\"\n [data]=\"donutData\"\n [options]=\"donutChartOptions$ | async\"\n ></ibm-donut-chart>\n } @else {\n <valtimo-no-results\n [collapseVertically]=\"true\"\n [description]=\"'dossier.widgets.noData' | translate\"\n [smallPadding]=\"true\"\n ></valtimo-no-results>\n }\n </ng-container>\n</section>\n", styles: [":host{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%;padding:20px}.valtimo-donut-widget__title,.valtimo-donut-widget__subtitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.valtimo-donut-widget__title{font-size:20px;margin-bottom:12px}.valtimo-donut-widget__subtitle{font-size:14px}.valtimo-donut-widget__label{font-size:12px;margin-left:12px;margin-bottom:-1px}.valtimo-donut-widget__content{display:flex;align-items:flex-end;justify-content:center;margin-bottom:12px}\n/*!\n * Copyright 2015-2024 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"] }]
2446
+ args: [{ selector: 'valtimo-meter-display', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2024 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-donut-widget__header\">\n <h3 class=\"valtimo-donut-widget__title\">{{ displayTypeProperties.title }}</h3>\n\n <span *ngIf=\"displayTypeProperties.subtitle\" class=\"valtimo-donut-widget__subtitle\">\n {{ displayTypeProperties.subtitle }}\n </span>\n</section>\n\n<section class=\"valtimo-donut-widget__content\">\n <ng-container *ngIf=\"meterData$ | async as meterData\">\n @if (meterData.length > 0) {\n <ibm-meter-chart [data]=\"meterData\" [options]=\"meterChartOptions$ | async\"></ibm-meter-chart>\n } @else {\n <valtimo-no-results\n [collapseVertically]=\"true\"\n [description]=\"'dossier.widgets.noData' | translate\"\n [smallPadding]=\"true\"\n ></valtimo-no-results>\n }\n </ng-container>\n</section>\n", styles: [":host{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%;padding:20px}.valtimo-donut-widget__title,.valtimo-donut-widget__subtitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.valtimo-donut-widget__title{font-size:20px;margin-bottom:12px}.valtimo-donut-widget__subtitle{font-size:14px}.valtimo-donut-widget__label{font-size:12px;margin-left:12px;margin-bottom:-1px}.valtimo-donut-widget__content{display:flex;align-items:flex-end;justify-content:center;margin-bottom:12px}\n/*!\n * Copyright 2015-2024 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"] }]
2710
2447
  }], ctorParameters: () => [{ type: i1$1.CdsThemeService }], propDecorators: { displayTypeKey: [{
2711
2448
  type: Input
2712
2449
  }], data: [{
@@ -2762,15 +2499,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
2762
2499
  * See the License for the specific language governing permissions and
2763
2500
  * limitations under the License.
2764
2501
  */
2765
- const donutSpecification = {
2766
- displayTypeKey: 'donut',
2767
- displayComponent: DonutDisplayComponent,
2768
- configurationComponent: DonutConfigurationComponent,
2769
- width: 1,
2770
- height: 2,
2502
+ const meterSpecification = {
2503
+ displayTypeKey: 'meter',
2504
+ displayComponent: MeterDisplayComponent,
2505
+ configurationComponent: MeterConfigurationComponent,
2506
+ width: 2,
2507
+ height: 1,
2771
2508
  translations: {
2772
2509
  nl: {
2773
- title: 'Donut-diagram',
2510
+ title: 'Meter',
2774
2511
  formTitle: 'Titel (vereist)',
2775
2512
  formTitleHelperText: 'De titel die wordt weergegeven in de widget',
2776
2513
  subtitle: 'Ondertitel',
@@ -2779,7 +2516,7 @@ const donutSpecification = {
2779
2516
  labelHelperText: 'Het label dat wordt weergegeven in de widget',
2780
2517
  },
2781
2518
  en: {
2782
- title: 'Donut chart',
2519
+ title: 'Meter',
2783
2520
  formTitle: 'Title (required)',
2784
2521
  formTitleHelperText: 'The title displayed in the widget',
2785
2522
  subtitle: 'Subtitle',
@@ -2788,7 +2525,7 @@ const donutSpecification = {
2788
2525
  labelHelperText: 'The label displayed in the widget',
2789
2526
  },
2790
2527
  de: {
2791
- title: 'Donut-Diagramm',
2528
+ title: 'Meter',
2792
2529
  formTitle: 'Titel (erforderlich)',
2793
2530
  formTitleHelperText: 'Der im Widget angezeigte Titel',
2794
2531
  subtitle: 'Untertitel',
@@ -2815,9 +2552,9 @@ const donutSpecification = {
2815
2552
  * See the License for the specific language governing permissions and
2816
2553
  * limitations under the License.
2817
2554
  */
2818
- class DonutModule {
2819
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DonutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2820
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: DonutModule, declarations: [DonutDisplayComponent, DonutConfigurationComponent], imports: [CommonModule,
2555
+ class MeterModule {
2556
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MeterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2557
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: MeterModule, declarations: [MeterDisplayComponent, MeterConfigurationComponent], imports: [CommonModule,
2821
2558
  ReactiveFormsModule,
2822
2559
  WidgetTranslatePipeModule,
2823
2560
  InputModule,
@@ -2825,8 +2562,8 @@ class DonutModule {
2825
2562
  CommonModule,
2826
2563
  ChartsModule,
2827
2564
  CarbonListModule,
2828
- TranslateModule], exports: [DonutDisplayComponent] }); }
2829
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DonutModule, providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: donutSpecification, multi: true }], imports: [CommonModule,
2565
+ TranslateModule], exports: [MeterDisplayComponent] }); }
2566
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MeterModule, providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: meterSpecification, multi: true }], imports: [CommonModule,
2830
2567
  ReactiveFormsModule,
2831
2568
  WidgetTranslatePipeModule,
2832
2569
  InputModule,
@@ -2836,10 +2573,10 @@ class DonutModule {
2836
2573
  CarbonListModule,
2837
2574
  TranslateModule] }); }
2838
2575
  }
2839
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DonutModule, decorators: [{
2576
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MeterModule, decorators: [{
2840
2577
  type: NgModule,
2841
2578
  args: [{
2842
- declarations: [DonutDisplayComponent, DonutConfigurationComponent],
2579
+ declarations: [MeterDisplayComponent, MeterConfigurationComponent],
2843
2580
  imports: [
2844
2581
  CommonModule,
2845
2582
  ReactiveFormsModule,
@@ -2851,8 +2588,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
2851
2588
  CarbonListModule,
2852
2589
  TranslateModule,
2853
2590
  ],
2854
- exports: [DonutDisplayComponent],
2855
- providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: donutSpecification, multi: true }],
2591
+ exports: [MeterDisplayComponent],
2592
+ providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: meterSpecification, multi: true }],
2856
2593
  }]
2857
2594
  }] });
2858
2595
 
@@ -2904,86 +2641,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
2904
2641
  * limitations under the License.
2905
2642
  */
2906
2643
 
2907
- /*
2908
- * Copyright 2015-2024 Ritense BV, the Netherlands.
2909
- *
2910
- * Licensed under EUPL, Version 1.2 (the "License");
2911
- * you may not use this file except in compliance with the License.
2912
- * You may obtain a copy of the License at
2913
- *
2914
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2915
- *
2916
- * Unless required by applicable law or agreed to in writing, software
2917
- * distributed under the License is distributed on an "AS IS" basis,
2918
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2919
- * See the License for the specific language governing permissions and
2920
- * limitations under the License.
2921
- */
2922
- class GaugeConfigurationComponent {
2923
- set disabled(disabledValue) {
2924
- if (disabledValue) {
2925
- this.form.disable();
2926
- }
2927
- else {
2928
- this.form.enable();
2929
- }
2930
- }
2931
- get title() {
2932
- return this.form.get('title');
2933
- }
2934
- get subtitle() {
2935
- return this.form.get('subtitle');
2936
- }
2937
- get label() {
2938
- return this.form.get('label');
2939
- }
2940
- set prefillConfiguration(configurationValue) {
2941
- if (configurationValue) {
2942
- this.title.setValue(configurationValue.title || '');
2943
- this.subtitle.setValue(configurationValue.subtitle || '');
2944
- this.label.setValue(configurationValue.label || '');
2945
- }
2946
- }
2947
- constructor(fb) {
2948
- this.fb = fb;
2949
- this.form = this.fb.group({
2950
- title: this.fb.control('', [Validators.required]),
2951
- subtitle: this.fb.control(''),
2952
- label: this.fb.control(''),
2953
- useKPI: this.fb.control(false, [Validators.required]),
2954
- });
2955
- this.configurationEvent = new EventEmitter();
2956
- this._subscriptions = new Subscription();
2957
- }
2958
- ngOnInit() {
2959
- this.openFormSubscription();
2960
- }
2961
- ngOnDestroy() {
2962
- this._subscriptions.unsubscribe();
2963
- }
2964
- openFormSubscription() {
2965
- this._subscriptions.add(this.form.valueChanges.pipe(startWith(this.form.value)).subscribe(formValue => {
2966
- this.configurationEvent.emit({
2967
- valid: this.form.valid,
2968
- data: formValue,
2969
- });
2970
- }));
2971
- }
2972
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GaugeConfigurationComponent, deps: [{ token: i1$3.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
2973
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: GaugeConfigurationComponent, selector: "ng-component", inputs: { displayTypeKey: "displayTypeKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 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</form>\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.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: i5.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i5.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 }); }
2644
+ class DisplayWidgetTypesModule {
2645
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DisplayWidgetTypesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2646
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: DisplayWidgetTypesModule, imports: [BarChartModule, BigNumberModule, DonutModule, GaugeModule, MeterModule] }); }
2647
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DisplayWidgetTypesModule, imports: [BarChartModule, BigNumberModule, DonutModule, GaugeModule, MeterModule] }); }
2974
2648
  }
2975
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GaugeConfigurationComponent, decorators: [{
2976
- type: Component,
2977
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2024 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</form>\n" }]
2978
- }], ctorParameters: () => [{ type: i1$3.FormBuilder }], propDecorators: { displayTypeKey: [{
2979
- type: Input
2980
- }], disabled: [{
2981
- type: Input
2982
- }], prefillConfiguration: [{
2983
- type: Input
2984
- }], configurationEvent: [{
2985
- type: Output
2986
- }] } });
2649
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DisplayWidgetTypesModule, decorators: [{
2650
+ type: NgModule,
2651
+ args: [{
2652
+ imports: [BarChartModule, BigNumberModule, DonutModule, GaugeModule, MeterModule],
2653
+ }]
2654
+ }] });
2987
2655
 
2988
2656
  /*
2989
2657
  * Copyright 2015-2024 Ritense BV, the Netherlands.
@@ -3000,6 +2668,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
3000
2668
  * See the License for the specific language governing permissions and
3001
2669
  * limitations under the License.
3002
2670
  */
2671
+ const routes = [
2672
+ {
2673
+ path: '',
2674
+ component: WidgetDashboardComponent,
2675
+ canActivate: [AuthGuardService],
2676
+ data: { title: 'Dashboard', roles: [ROLE_USER], hidePageTitle: true },
2677
+ },
2678
+ ];
2679
+ class DashboardRoutingModule {
2680
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DashboardRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2681
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: DashboardRoutingModule, imports: [CommonModule, i2.RouterModule], exports: [RouterModule] }); }
2682
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DashboardRoutingModule, imports: [CommonModule, RouterModule.forChild(routes), RouterModule] }); }
2683
+ }
2684
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DashboardRoutingModule, decorators: [{
2685
+ type: NgModule,
2686
+ args: [{
2687
+ declarations: [],
2688
+ imports: [CommonModule, RouterModule.forChild(routes)],
2689
+ exports: [RouterModule],
2690
+ }]
2691
+ }] });
3003
2692
 
3004
2693
  /*
3005
2694
  * Copyright 2015-2024 Ritense BV, the Netherlands.
@@ -3016,68 +2705,610 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
3016
2705
  * See the License for the specific language governing permissions and
3017
2706
  * limitations under the License.
3018
2707
  */
3019
- class GaugeDisplayComponent {
3020
- set data(value) {
3021
- if (!value)
3022
- return;
3023
- this._data$.next(value);
3024
- }
3025
- constructor(themeService, translateService) {
3026
- this.themeService = themeService;
3027
- this.translateService = translateService;
3028
- this._DELTA = -1.0;
3029
- this._data$ = new BehaviorSubject(null);
3030
- this.chartData$ = this._data$.pipe(filter(data => !!data), map(data => [
3031
- {
3032
- group: 'value',
3033
- value: this.calculatePercentage(data?.value || 0, data?.total || 0),
3034
- },
3035
- {
3036
- group: 'delta',
3037
- value: this._DELTA,
3038
- },
3039
- ]));
3040
- this.gaugeChartOptions$ = combineLatest([
3041
- this.themeService.currentTheme$,
3042
- this.translateService.stream('key'),
3043
- ]).pipe(map(([currentTheme]) => ({
3044
- resizable: true,
3045
- toolbar: { enabled: false },
3046
- height: '110px',
3047
- theme: currentTheme == 'g10' ? 'white' : 'g100',
3048
- gauge: {
3049
- alignment: 'center',
3050
- numberFormatter: value => this.numberFormatter(this, value),
3051
- deltaArrow: {
3052
- enabled: false,
3053
- },
3054
- showPercentageSymbol: false,
3055
- type: 'semi',
3056
- },
3057
- })));
3058
- }
3059
- calculatePercentage(value, total) {
3060
- return (value * 100.0) / (total || 100.0);
3061
- }
3062
- numberFormatter(scope, value) {
3063
- const scopeData = scope._data$.getValue();
3064
- if (value == scope._DELTA) {
3065
- return `${this.translateService.instant('dashboard.of')} ${scopeData?.total || 0} ${scope.displayTypeProperties.label} `;
3066
- }
3067
- return Math.round(value * (scopeData?.total || 0)) / 100.0 + '';
2708
+ // AoT requires an exported function for factories
2709
+ function HttpLoaderFactory(httpClient) {
2710
+ return new TranslateHttpLoader(httpClient);
2711
+ }
2712
+ class DashboardModule {
2713
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DashboardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2714
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: DashboardModule, declarations: [DashboardComponent, WidgetDashboardComponent, WidgetDashboardContentComponent], imports: [CommonModule,
2715
+ DashboardRoutingModule,
2716
+ WidgetModule,
2717
+ ListModule,
2718
+ BpmnJsDiagramModule, i3$1.TranslateModule, AlertModule,
2719
+ TaskModule,
2720
+ SpinnerModule,
2721
+ TabsModule,
2722
+ ThemeModule,
2723
+ WidgetTranslatePipeModule,
2724
+ LoadingModule,
2725
+ CarbonListModule,
2726
+ DisplayWidgetTypesModule], exports: [DashboardComponent, WidgetDashboardComponent] }); }
2727
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DashboardModule, providers: [
2728
+ { provide: DISPLAY_TYPE_TOKEN, useValue: null, multi: true },
2729
+ { provide: DATA_SOURCE_TOKEN, useValue: null, multi: true },
2730
+ ], imports: [CommonModule,
2731
+ DashboardRoutingModule,
2732
+ WidgetModule,
2733
+ ListModule,
2734
+ BpmnJsDiagramModule,
2735
+ TranslateModule.forRoot({
2736
+ loader: {
2737
+ provide: TranslateLoader,
2738
+ useFactory: HttpLoaderFactory,
2739
+ deps: [HttpClient],
2740
+ },
2741
+ }),
2742
+ AlertModule,
2743
+ TaskModule,
2744
+ SpinnerModule,
2745
+ TabsModule,
2746
+ ThemeModule,
2747
+ WidgetTranslatePipeModule,
2748
+ LoadingModule,
2749
+ CarbonListModule,
2750
+ DisplayWidgetTypesModule] }); }
2751
+ }
2752
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DashboardModule, decorators: [{
2753
+ type: NgModule,
2754
+ args: [{
2755
+ declarations: [DashboardComponent, WidgetDashboardComponent, WidgetDashboardContentComponent],
2756
+ imports: [
2757
+ CommonModule,
2758
+ DashboardRoutingModule,
2759
+ WidgetModule,
2760
+ ListModule,
2761
+ BpmnJsDiagramModule,
2762
+ TranslateModule.forRoot({
2763
+ loader: {
2764
+ provide: TranslateLoader,
2765
+ useFactory: HttpLoaderFactory,
2766
+ deps: [HttpClient],
2767
+ },
2768
+ }),
2769
+ AlertModule,
2770
+ TaskModule,
2771
+ SpinnerModule,
2772
+ TabsModule,
2773
+ ThemeModule,
2774
+ WidgetTranslatePipeModule,
2775
+ LoadingModule,
2776
+ CarbonListModule,
2777
+ DisplayWidgetTypesModule,
2778
+ ],
2779
+ exports: [DashboardComponent, WidgetDashboardComponent],
2780
+ providers: [
2781
+ { provide: DISPLAY_TYPE_TOKEN, useValue: null, multi: true },
2782
+ { provide: DATA_SOURCE_TOKEN, useValue: null, multi: true },
2783
+ ],
2784
+ }]
2785
+ }] });
2786
+
2787
+ /*
2788
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
2789
+ *
2790
+ * Licensed under EUPL, Version 1.2 (the "License");
2791
+ * you may not use this file except in compliance with the License.
2792
+ * You may obtain a copy of the License at
2793
+ *
2794
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2795
+ *
2796
+ * Unless required by applicable law or agreed to in writing, software
2797
+ * distributed under the License is distributed on an "AS IS" basis,
2798
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2799
+ * See the License for the specific language governing permissions and
2800
+ * limitations under the License.
2801
+ */
2802
+ class CaseCountConfigurationComponent {
2803
+ set disabled(disabledValue) {
2804
+ if (disabledValue) {
2805
+ this.form.disable();
2806
+ }
2807
+ else {
2808
+ this.form.enable();
2809
+ }
2810
+ }
2811
+ get documentDefinition() {
2812
+ return this.form.get('documentDefinition');
2813
+ }
2814
+ get queryConditions() {
2815
+ return this.form.get('queryConditions');
2816
+ }
2817
+ set prefillConfiguration(configurationValue) {
2818
+ if (configurationValue) {
2819
+ this.documentDefinitionSelected({
2820
+ item: {
2821
+ content: configurationValue.documentDefinition,
2822
+ },
2823
+ });
2824
+ this.defaultConditionValues$.next(configurationValue.queryConditions.map(condition => ({
2825
+ key: condition.queryPath,
2826
+ dropdown: condition.queryOperator,
2827
+ value: condition.queryValue,
2828
+ })));
2829
+ }
2830
+ }
2831
+ constructor(fb, documentService, translateService, widgetTranslationService) {
2832
+ this.fb = fb;
2833
+ this.documentService = documentService;
2834
+ this.translateService = translateService;
2835
+ this.widgetTranslationService = widgetTranslationService;
2836
+ this.form = this.fb.group({
2837
+ documentDefinition: this.fb.control(null, [Validators.required]),
2838
+ queryConditions: this.fb.control(null),
2839
+ });
2840
+ this._selectedDocumentDefinition$ = new BehaviorSubject('');
2841
+ this.documentItems$ = combineLatest([
2842
+ this.documentService.getAllDefinitions(),
2843
+ this._selectedDocumentDefinition$,
2844
+ ]).pipe(map(([documentDefinitions, selectedDocumentDefintion]) => documentDefinitions.content.map(definition => ({
2845
+ content: definition.id.name,
2846
+ selected: definition.id.name === selectedDocumentDefintion,
2847
+ }))));
2848
+ this._OPERATORS = [
2849
+ Operator.NOT_EQUAL_TO,
2850
+ Operator.EQUAL_TO,
2851
+ Operator.GREATER_THAN,
2852
+ Operator.GREATER_THAN_OR_EQUAL_TO,
2853
+ Operator.LESS_THAN,
2854
+ Operator.LESS_THAN_OR_EQUAL_TO,
2855
+ ];
2856
+ this.operatorItems$ = this.translateService
2857
+ .stream('key')
2858
+ .pipe(map(() => this._OPERATORS.map(operator => ({
2859
+ id: operator,
2860
+ content: this.widgetTranslationService.instant(operator, this.dataSourceKey),
2861
+ selected: false,
2862
+ }))));
2863
+ this.defaultConditionValues$ = new BehaviorSubject(null);
2864
+ this.allConditionsValid$ = new BehaviorSubject(true);
2865
+ this.configurationEvent = new EventEmitter();
2866
+ this._subscriptions = new Subscription();
2867
+ }
2868
+ ngOnInit() {
2869
+ this.openFormSubscription();
2870
+ }
2871
+ ngOnDestroy() {
2872
+ this._subscriptions.unsubscribe();
2873
+ }
2874
+ documentDefinitionSelected(documentDefinitionItem) {
2875
+ if (!documentDefinitionItem) {
2876
+ return;
2877
+ }
2878
+ this._selectedDocumentDefinition$.next(documentDefinitionItem?.item?.content);
2879
+ this.documentDefinition.setValue(documentDefinitionItem?.item?.content);
2880
+ }
2881
+ conditionsValueChange(values) {
2882
+ if (values.length === 0) {
2883
+ this.queryConditions.setValue(null);
2884
+ }
2885
+ else {
2886
+ this.queryConditions.setValue(values.map(value => ({
2887
+ queryPath: value.key,
2888
+ queryOperator: value.dropdown,
2889
+ queryValue: value.value,
2890
+ })));
2891
+ }
2892
+ }
2893
+ onAllConditionsValid(allConditionsValid) {
2894
+ this.allConditionsValid$.next(allConditionsValid);
2895
+ }
2896
+ openFormSubscription() {
2897
+ this._subscriptions.add(combineLatest([
2898
+ this.form.valueChanges.pipe(startWith(this.form.value)),
2899
+ this.allConditionsValid$,
2900
+ ]).subscribe(([formValue, allConditionsValid]) => {
2901
+ this.configurationEvent.emit({
2902
+ valid: this.form.valid && allConditionsValid,
2903
+ data: formValue,
2904
+ });
2905
+ }));
2906
+ }
2907
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseCountConfigurationComponent, deps: [{ token: i1$3.FormBuilder }, { token: i2$2.DocumentService }, { token: i3$1.TranslateService }, { token: WidgetTranslationService }], target: i0.ɵɵFactoryTarget.Component }); }
2908
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: CaseCountConfigurationComponent, selector: "ng-component", inputs: { dataSourceKey: "dataSourceKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 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 [appendInline]=\"true\"\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: ["::ng-deep .case-count-configuration-form .conditions-label{margin-bottom:16px}::ng-deep .case-count-configuration-form .conditions-multi-input .cds--form__helper-text{font-style:italic}\n/*!\n * Copyright 2015-2024 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: 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: i5.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "component", type: i5.Dropdown, selector: "cds-dropdown, ibm-dropdown", inputs: ["id", "label", "hideLabel", "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: i5.DropdownList, selector: "cds-dropdown-list, ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }, { kind: "component", type: i1$1.CarbonMultiInputComponent, selector: "valtimo-carbon-multi-input", inputs: ["name", "title", "titleTranslationKey", "type", "arbitraryValueAmount", "arbitraryAmountTitles", "initialAmountOfRows", "minimumAmountOfRows", "maxRows", "addRowText", "addRowTranslationKey", "deleteRowText", "deleteRowTranslationKey", "disabled", "defaultValues", "margin", "tooltip", "required", "keyColumnTitle", "valueColumnTitle", "dropdownColumnTitle", "hideDeleteButton", "hideAddButton", "dropdownItems", "dropdownWidth", "fullWidth", "carbonTheme"], outputs: ["valueChange", "allValuesValidEvent"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: WidgetTranslatePipe, name: "widgetTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2909
+ }
2910
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseCountConfigurationComponent, decorators: [{
2911
+ type: Component,
2912
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2024 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 [appendInline]=\"true\"\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: ["::ng-deep .case-count-configuration-form .conditions-label{margin-bottom:16px}::ng-deep .case-count-configuration-form .conditions-multi-input .cds--form__helper-text{font-style:italic}\n/*!\n * Copyright 2015-2024 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"] }]
2913
+ }], ctorParameters: () => [{ type: i1$3.FormBuilder }, { type: i2$2.DocumentService }, { type: i3$1.TranslateService }, { type: WidgetTranslationService }], propDecorators: { dataSourceKey: [{
2914
+ type: Input
2915
+ }], disabled: [{
2916
+ type: Input
2917
+ }], prefillConfiguration: [{
2918
+ type: Input
2919
+ }], configurationEvent: [{
2920
+ type: Output
2921
+ }] } });
2922
+
2923
+ /*
2924
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
2925
+ *
2926
+ * Licensed under EUPL, Version 1.2 (the "License");
2927
+ * you may not use this file except in compliance with the License.
2928
+ * You may obtain a copy of the License at
2929
+ *
2930
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2931
+ *
2932
+ * Unless required by applicable law or agreed to in writing, software
2933
+ * distributed under the License is distributed on an "AS IS" basis,
2934
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2935
+ * See the License for the specific language governing permissions and
2936
+ * limitations under the License.
2937
+ */
2938
+
2939
+ /*
2940
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
2941
+ *
2942
+ * Licensed under EUPL, Version 1.2 (the "License");
2943
+ * you may not use this file except in compliance with the License.
2944
+ * You may obtain a copy of the License at
2945
+ *
2946
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2947
+ *
2948
+ * Unless required by applicable law or agreed to in writing, software
2949
+ * distributed under the License is distributed on an "AS IS" basis,
2950
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2951
+ * See the License for the specific language governing permissions and
2952
+ * limitations under the License.
2953
+ */
2954
+
2955
+ /*
2956
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
2957
+ *
2958
+ * Licensed under EUPL, Version 1.2 (the "License");
2959
+ * you may not use this file except in compliance with the License.
2960
+ * You may obtain a copy of the License at
2961
+ *
2962
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2963
+ *
2964
+ * Unless required by applicable law or agreed to in writing, software
2965
+ * distributed under the License is distributed on an "AS IS" basis,
2966
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2967
+ * See the License for the specific language governing permissions and
2968
+ * limitations under the License.
2969
+ */
2970
+
2971
+ /*
2972
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
2973
+ *
2974
+ * Licensed under EUPL, Version 1.2 (the "License");
2975
+ * you may not use this file except in compliance with the License.
2976
+ * You may obtain a copy of the License at
2977
+ *
2978
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2979
+ *
2980
+ * Unless required by applicable law or agreed to in writing, software
2981
+ * distributed under the License is distributed on an "AS IS" basis,
2982
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2983
+ * See the License for the specific language governing permissions and
2984
+ * limitations under the License.
2985
+ */
2986
+
2987
+ /*
2988
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
2989
+ *
2990
+ * Licensed under EUPL, Version 1.2 (the "License");
2991
+ * you may not use this file except in compliance with the License.
2992
+ * You may obtain a copy of the License at
2993
+ *
2994
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2995
+ *
2996
+ * Unless required by applicable law or agreed to in writing, software
2997
+ * distributed under the License is distributed on an "AS IS" basis,
2998
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2999
+ * See the License for the specific language governing permissions and
3000
+ * limitations under the License.
3001
+ */
3002
+ const caseCountDataSourceSpecification = {
3003
+ dataSourceKey: 'case-count',
3004
+ configurationComponent: CaseCountConfigurationComponent,
3005
+ translations: {
3006
+ de: {
3007
+ title: 'Fallzahl',
3008
+ documentDefinition: 'Falltyp (erforderlich)',
3009
+ documentDefinitionHelperText: 'Der Falltyp, für den die Anzahl abgerufen wird',
3010
+ '!=': 'Nicht gleichzusetzen mit',
3011
+ '==': 'Gleich',
3012
+ '>': 'Größer als',
3013
+ '>=': 'Größer als oder gleich wie',
3014
+ '<': 'Weniger als',
3015
+ '<=': 'Gleich oder kleiner als',
3016
+ path: 'Pfad',
3017
+ operator: 'Operator',
3018
+ value: 'Wert',
3019
+ conditions: 'Bedingungen',
3020
+ 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'. Zum Vergleichen mit leeren Werten kann als Wert '${null}' eingegeben werden. Zum Vergleichen mit dem aktuellen Datum kann als Wert '${localDateTimeNow}' eingegeben werden. Damit wird beispielsweise auch folgende Logik unterstützt: '${localDateTimeNow.minusWeeks(2)}'.",
3021
+ addCondition: 'Bedingung hinzufügen',
3022
+ },
3023
+ en: {
3024
+ title: 'Case count',
3025
+ documentDefinition: 'Case type (required)',
3026
+ documentDefinitionHelperText: 'The case type for which the count is retrieved',
3027
+ '!=': 'Not equal to',
3028
+ '==': 'Equal to',
3029
+ '>': 'Greater than',
3030
+ '>=': 'Greater than or equal to',
3031
+ '<': 'Less than',
3032
+ '<=': 'Less than or equal to',
3033
+ path: 'Path (required)',
3034
+ operator: 'Operator',
3035
+ value: 'Value',
3036
+ conditions: 'Conditions',
3037
+ conditionsHelperText: "Specify optional conditions for retrieving the number of cases for the selected case type. For example: 'case:createdBy', 'Equal to', 'test@test.com'. To compare with empty values, '${null}' can be entered as a value. To compare with the current date, '${localDateTimeNow}' can be entered as a value. This also supports, for example, the following logic: '${localDateTimeNow.minusWeeks(2)}'.",
3038
+ addCondition: 'Add condition',
3039
+ },
3040
+ nl: {
3041
+ title: 'Aantal dossiers',
3042
+ documentDefinition: 'Dossiertype (vereist)',
3043
+ documentDefinitionHelperText: 'Het dossiertype waarvoor de telling wordt opgehaald',
3044
+ '!=': 'Niet gelijk aan',
3045
+ '==': 'Gelijk aan',
3046
+ '>': 'Groter dan',
3047
+ '>=': 'Groter dan of gelijk aan',
3048
+ '<': 'Minder dan',
3049
+ '<=': 'Minder dan of gelijk aan',
3050
+ path: 'Pad',
3051
+ operator: 'Operator',
3052
+ value: 'Waarde',
3053
+ conditions: 'Condities',
3054
+ conditionsHelperText: "Geef optionele condities op voor het ophalen van het aantal zaken voor het geselecteerde zaaktype. Bijvoorbeeld: 'case:createdBy', 'Gelijk aan', 'test@test.com'. Voor het vergelijken met lege waardes kan '${null}' ingevuld worden als waarde. Voor het vergelijken met de huidige datum kan '${localDateTimeNow}' ingevuld worden als waarde. Deze ondersteunt ook bijvoorbeeld de volgende logica: '${localDateTimeNow.minusWeeks(2)}'.",
3055
+ addCondition: 'Conditie toevoegen',
3056
+ },
3057
+ },
3058
+ };
3059
+
3060
+ /*
3061
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
3062
+ *
3063
+ * Licensed under EUPL, Version 1.2 (the "License");
3064
+ * you may not use this file except in compliance with the License.
3065
+ * You may obtain a copy of the License at
3066
+ *
3067
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3068
+ *
3069
+ * Unless required by applicable law or agreed to in writing, software
3070
+ * distributed under the License is distributed on an "AS IS" basis,
3071
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3072
+ * See the License for the specific language governing permissions and
3073
+ * limitations under the License.
3074
+ */
3075
+ class CaseCountDataSourceModule {
3076
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseCountDataSourceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3077
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: CaseCountDataSourceModule, declarations: [CaseCountConfigurationComponent], imports: [CommonModule,
3078
+ ReactiveFormsModule,
3079
+ WidgetTranslatePipeModule,
3080
+ InputModule,
3081
+ DropdownModule,
3082
+ CarbonMultiInputModule], exports: [CaseCountConfigurationComponent] }); }
3083
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseCountDataSourceModule, providers: [
3084
+ { provide: DATA_SOURCE_TOKEN, useValue: caseCountDataSourceSpecification, multi: true },
3085
+ ], imports: [CommonModule,
3086
+ ReactiveFormsModule,
3087
+ WidgetTranslatePipeModule,
3088
+ InputModule,
3089
+ DropdownModule,
3090
+ CarbonMultiInputModule] }); }
3091
+ }
3092
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseCountDataSourceModule, decorators: [{
3093
+ type: NgModule,
3094
+ args: [{
3095
+ declarations: [CaseCountConfigurationComponent],
3096
+ imports: [
3097
+ CommonModule,
3098
+ ReactiveFormsModule,
3099
+ WidgetTranslatePipeModule,
3100
+ InputModule,
3101
+ DropdownModule,
3102
+ CarbonMultiInputModule,
3103
+ ],
3104
+ exports: [CaseCountConfigurationComponent],
3105
+ providers: [
3106
+ { provide: DATA_SOURCE_TOKEN, useValue: caseCountDataSourceSpecification, multi: true },
3107
+ ],
3108
+ }]
3109
+ }] });
3110
+
3111
+ /*
3112
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
3113
+ *
3114
+ * Licensed under EUPL, Version 1.2 (the "License");
3115
+ * you may not use this file except in compliance with the License.
3116
+ * You may obtain a copy of the License at
3117
+ *
3118
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3119
+ *
3120
+ * Unless required by applicable law or agreed to in writing, software
3121
+ * distributed under the License is distributed on an "AS IS" basis,
3122
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3123
+ * See the License for the specific language governing permissions and
3124
+ * limitations under the License.
3125
+ */
3126
+
3127
+ /*
3128
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
3129
+ *
3130
+ * Licensed under EUPL, Version 1.2 (the "License");
3131
+ * you may not use this file except in compliance with the License.
3132
+ * You may obtain a copy of the License at
3133
+ *
3134
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3135
+ *
3136
+ * Unless required by applicable law or agreed to in writing, software
3137
+ * distributed under the License is distributed on an "AS IS" basis,
3138
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3139
+ * See the License for the specific language governing permissions and
3140
+ * limitations under the License.
3141
+ */
3142
+ class CaseCountsConfigurationComponent {
3143
+ set disabled(disabledValue) {
3144
+ if (disabledValue) {
3145
+ this.form.disable();
3146
+ }
3147
+ else {
3148
+ this.form.enable();
3149
+ }
3068
3150
  }
3069
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GaugeDisplayComponent, deps: [{ token: i1$1.CdsThemeService }, { token: i3$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
3070
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: GaugeDisplayComponent, selector: "valtimo-gauge-display", inputs: { displayTypeKey: "displayTypeKey", data: "data", displayTypeProperties: "displayTypeProperties" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 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-gauge-widget__header\">\n <h3 class=\"valtimo-gauge-widget__title\">{{ displayTypeProperties.title }}</h3>\n\n <span *ngIf=\"displayTypeProperties.subtitle\" class=\"valtimo-gauge-widget__subtitle\">\n {{ displayTypeProperties.subtitle }}\n </span>\n</section>\n\n<section class=\"valtimo-gauge-widget__content\">\n <ibm-gauge-chart\n *ngIf=\"chartData$ | async as chartData\"\n type=\"gauge\"\n class=\"n-chart\"\n [data]=\"chartData\"\n [options]=\"gaugeChartOptions$ | async\"\n ></ibm-gauge-chart>\n</section>\n", styles: [":host{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%;padding:20px}.valtimo-gauge-widget__title,.valtimo-gauge-widget__subtitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.valtimo-gauge-widget__title{font-size:20px;margin-bottom:12px}.valtimo-gauge-widget__subtitle{font-size:14px}.valtimo-gauge-widget__label{font-size:12px;margin-left:12px;margin-bottom:-1px}.valtimo-gauge-widget__content{display:flex;align-items:flex-end;margin-bottom:12px}\n/*!\n * Copyright 2015-2024 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: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$2.GaugeChartComponent, selector: "ibm-gauge-chart" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3151
+ get queryItems() {
3152
+ return this.form.get('queryItems');
3153
+ }
3154
+ get queryItemsValue$() {
3155
+ return this.queryItems.valueChanges.pipe(startWith(this.queryItems.value || []));
3156
+ }
3157
+ get queryItemsList$() {
3158
+ return this.queryItemsValue$.pipe(map(queryItemsValue => queryItemsValue.map(() => null)), distinctUntilChanged((previous, current) => isEqual(previous, current)));
3159
+ }
3160
+ get documentDefinition() {
3161
+ return this.form.get('documentDefinition');
3162
+ }
3163
+ get formDisabled() {
3164
+ return this.form.disabled;
3165
+ }
3166
+ set prefillConfiguration(configurationValue) {
3167
+ if (!configurationValue)
3168
+ return;
3169
+ this.documentDefinitionSelected({
3170
+ item: {
3171
+ content: configurationValue.documentDefinition,
3172
+ },
3173
+ });
3174
+ this.documentDefinition.patchValue(configurationValue.documentDefinition);
3175
+ this.queryItems.patchValue(this.queryItemsToMultiInputValues(configurationValue.queryItems));
3176
+ }
3177
+ constructor(fb, documentService, translateService, widgetTranslationService, iconService) {
3178
+ this.fb = fb;
3179
+ this.documentService = documentService;
3180
+ this.translateService = translateService;
3181
+ this.widgetTranslationService = widgetTranslationService;
3182
+ this.iconService = iconService;
3183
+ this._EMPTY_QUERY_ITEM_VALUE = {
3184
+ label: '',
3185
+ queryConditions: [{ key: '', value: '', dropdown: '' }],
3186
+ };
3187
+ this.form = this.fb.group({
3188
+ documentDefinition: this.fb.control(null, [Validators.required]),
3189
+ queryItems: this.fb.control([this._EMPTY_QUERY_ITEM_VALUE, this._EMPTY_QUERY_ITEM_VALUE], [this.queryItemsValidator()]),
3190
+ });
3191
+ this.configurationEvent = new EventEmitter();
3192
+ this._selectedDocumentDefinition$ = new BehaviorSubject('');
3193
+ this.documentItems$ = combineLatest([
3194
+ this.documentService.getAllDefinitions(),
3195
+ this._selectedDocumentDefinition$,
3196
+ ]).pipe(map(([documentDefinitions, selectedDocumentDefintion]) => documentDefinitions.content.map(definition => ({
3197
+ content: definition.id.name,
3198
+ selected: definition.id.name === selectedDocumentDefintion,
3199
+ }))));
3200
+ this._OPERATORS = [
3201
+ Operator.NOT_EQUAL_TO,
3202
+ Operator.EQUAL_TO,
3203
+ Operator.GREATER_THAN,
3204
+ Operator.GREATER_THAN_OR_EQUAL_TO,
3205
+ Operator.LESS_THAN,
3206
+ Operator.LESS_THAN_OR_EQUAL_TO,
3207
+ ];
3208
+ this.operatorItems$ = this.translateService
3209
+ .stream('key')
3210
+ .pipe(map(() => this._OPERATORS.map(operator => ({
3211
+ id: operator,
3212
+ content: this.widgetTranslationService.instant(operator, this.dataSourceKey),
3213
+ selected: false,
3214
+ }))));
3215
+ this._subscriptions = new Subscription();
3216
+ this.iconService.registerAll([Add16, TrashCan16]);
3217
+ }
3218
+ ngOnInit() {
3219
+ this.openFormSubscription();
3220
+ }
3221
+ ngOnDestroy() {
3222
+ this._subscriptions.unsubscribe();
3223
+ }
3224
+ documentDefinitionSelected(documentDefinitionItem) {
3225
+ if (!documentDefinitionItem) {
3226
+ return;
3227
+ }
3228
+ this._selectedDocumentDefinition$.next(documentDefinitionItem?.item?.content);
3229
+ }
3230
+ conditionsValueChange(index, values) {
3231
+ const currentQueryItemsValues = this.queryItems.value;
3232
+ if (isEqual(currentQueryItemsValues[index].queryConditions, values))
3233
+ return;
3234
+ this.queryItems.patchValue(currentQueryItemsValues.map((item, itemIndex) => itemIndex === index ? { ...item, queryConditions: values } : item));
3235
+ }
3236
+ labelValueChange(index, value) {
3237
+ const currentQueryItemsValues = this.queryItems.value;
3238
+ if (currentQueryItemsValues[index].label === value)
3239
+ return;
3240
+ this.queryItems.patchValue(currentQueryItemsValues.map((item, itemIndex) => itemIndex === index ? { ...item, label: value } : item));
3241
+ }
3242
+ addQueryItem() {
3243
+ const currentQueryItems = this.queryItems.value;
3244
+ this.queryItems.patchValue([...currentQueryItems, this._EMPTY_QUERY_ITEM_VALUE]);
3245
+ }
3246
+ deleteCount(i) {
3247
+ const currentQueryItems = this.queryItems.value;
3248
+ this.queryItems.patchValue(currentQueryItems.filter((_, index) => index !== i));
3249
+ }
3250
+ openFormSubscription() {
3251
+ this._subscriptions.add(this.form.valueChanges.pipe(startWith(this.form.value)).subscribe(formValue => {
3252
+ this.configurationEvent.emit({
3253
+ valid: this.form.valid,
3254
+ data: {
3255
+ documentDefinition: formValue?.documentDefinition?.content,
3256
+ queryItems: this.multiInputValuesToQueryItems(formValue.queryItems),
3257
+ },
3258
+ });
3259
+ }));
3260
+ }
3261
+ queryItemsToMultiInputValues(queryItems) {
3262
+ return queryItems.map(queryItem => ({
3263
+ ...queryItem,
3264
+ queryConditions: queryItem.queryConditions.map(condition => ({
3265
+ key: condition.queryPath,
3266
+ dropdown: condition.queryOperator,
3267
+ value: condition.queryValue,
3268
+ })),
3269
+ }));
3270
+ }
3271
+ multiInputValuesToQueryItems(multiInputValues) {
3272
+ return multiInputValues.map(queryItem => ({
3273
+ ...queryItem,
3274
+ queryConditions: queryItem.queryConditions.map(condition => ({
3275
+ queryPath: condition.key,
3276
+ queryOperator: condition.dropdown,
3277
+ queryValue: condition.value,
3278
+ })),
3279
+ }));
3280
+ }
3281
+ queryItemsValidator() {
3282
+ return (control) => {
3283
+ const queryItems = control.value;
3284
+ const validQueryItems = queryItems.filter(item => {
3285
+ const validLabel = !!item.label;
3286
+ const validConditions = item.queryConditions.filter(condition => !!condition.value && !!condition.key && !!condition.dropdown);
3287
+ return (validLabel &&
3288
+ validConditions.length > 0 &&
3289
+ item.queryConditions.length === validConditions.length);
3290
+ });
3291
+ return validQueryItems.length > 1 && validQueryItems.length === queryItems.length
3292
+ ? null
3293
+ : {
3294
+ invalidQueryItems: 'invalid',
3295
+ };
3296
+ };
3297
+ }
3298
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseCountsConfigurationComponent, deps: [{ token: i1$3.FormBuilder }, { token: i2$2.DocumentService }, { token: i3$1.TranslateService }, { token: WidgetTranslationService }, { token: i5.IconService }], target: i0.ɵɵFactoryTarget.Component }); }
3299
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: CaseCountsConfigurationComponent, selector: "ng-component", inputs: { dataSourceKey: "dataSourceKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 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-counts-configuration-form\"\n *ngIf=\"{\n documentItems: documentItems$ | async,\n operatorItems: operatorItems$,\n queryItemsValue: queryItemsValue$ | async,\n } as obs\"\n [formGroup]=\"form\"\n>\n <div class=\"form__element\">\n <cds-dropdown\n [appendInline]=\"true\"\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 <cds-label class=\"conditions__label\">{{\n 'counts' | widgetTranslate: dataSourceKey | async\n }}</cds-label>\n\n <p class=\"conditions__helper-text cds--form__helper-text\">\n {{ 'countsHelperText' | widgetTranslate: dataSourceKey | async }}\n </p>\n\n @for (_ of queryItemsList$ | async; track $index; let i = $index) {\n <cds-tile class=\"count-tile\" cdsLayer=\"1\">\n <div class=\"count-tile__input\">\n <v-input\n [title]=\"'countTitle' | widgetTranslate: dataSourceKey | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.queryItemsValue[i]?.label\"\n [disabled]=\"formDisabled\"\n [required]=\"true\"\n [fullWidth]=\"true\"\n (valueChange)=\"labelValueChange(i, $event)\"\n >\n </v-input>\n\n <valtimo-carbon-multi-input\n [disabled]=\"formDisabled\"\n [addRowText]=\"'addCondition' | widgetTranslate: dataSourceKey | async\"\n [defaultValues]=\"obs.queryItemsValue[i]?.queryConditions\"\n [dropdownColumnTitle]=\"'operator' | widgetTranslate: dataSourceKey | async\"\n [dropdownItems]=\"operatorItems$ | async\"\n [fullWidth]=\"true\"\n [initialAmountOfRows]=\"1\"\n [keyColumnTitle]=\"'path' | widgetTranslate: dataSourceKey | async\"\n [minimumAmountOfRows]=\"1\"\n [valueColumnTitle]=\"'value' | widgetTranslate: dataSourceKey | async\"\n type=\"keyDropdownValue\"\n (valueChange)=\"conditionsValueChange(i, $event)\"\n ></valtimo-carbon-multi-input>\n </div>\n\n <div class=\"count-tile__delete-button\">\n <cds-icon-button\n [disabled]=\"formDisabled || i < 2\"\n (click)=\"deleteCount(i)\"\n kind=\"danger\"\n size=\"sm\"\n >\n <svg class=\"cds--btn__icon\" cdsIcon=\"trash-can\" size=\"16\"></svg>\n </cds-icon-button>\n </div>\n </cds-tile>\n }\n\n <button\n class=\"add-count-button\"\n cdsButton=\"primary\"\n [disabled]=\"formDisabled\"\n (click)=\"addQueryItem()\"\n >\n {{ 'Aantal toevoegen' }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</form>\n", styles: ["::ng-deep .case-counts-configuration-form .conditions__label{display:flex;margin-bottom:8px}::ng-deep .case-counts-configuration-form .conditions__helper-text{font-style:italic;display:flex;margin-bottom:16px}::ng-deep .case-counts-configuration-form .count-tile{display:flex;flex-direction:row;gap:32px;justify-content:space-between;margin-bottom:16px}::ng-deep .case-counts-configuration-form .count-tile__input{width:100%}::ng-deep .case-counts-configuration-form .add-count-button{margin-bottom:16px}\n/*!\n * Copyright 2015-2024 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: 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: i1$1.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "smallMargin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$", "carbonTheme", "placeholder", "dataTestId"], outputs: ["valueChange"] }, { kind: "component", type: i5.Dropdown, selector: "cds-dropdown, ibm-dropdown", inputs: ["id", "label", "hideLabel", "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: i5.DropdownList, selector: "cds-dropdown-list, ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }, { kind: "component", type: i1$1.CarbonMultiInputComponent, selector: "valtimo-carbon-multi-input", inputs: ["name", "title", "titleTranslationKey", "type", "arbitraryValueAmount", "arbitraryAmountTitles", "initialAmountOfRows", "minimumAmountOfRows", "maxRows", "addRowText", "addRowTranslationKey", "deleteRowText", "deleteRowTranslationKey", "disabled", "defaultValues", "margin", "tooltip", "required", "keyColumnTitle", "valueColumnTitle", "dropdownColumnTitle", "hideDeleteButton", "hideAddButton", "dropdownItems", "dropdownWidth", "fullWidth", "carbonTheme"], outputs: ["valueChange", "allValuesValidEvent"] }, { kind: "directive", type: i5.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "component", type: i5.IconButton, selector: "cds-icon-button, ibm-icon-button", inputs: ["buttonNgClass", "buttonAttributes", "buttonId", "kind", "size", "type", "isExpressive", "disabled", "description"], outputs: ["click", "focus", "blur", "tooltipClick"] }, { kind: "component", type: i5.Tile, selector: "cds-tile, ibm-tile", inputs: ["theme"] }, { kind: "directive", type: i5.LayerDirective, selector: "[cdsLayer], [ibmLayer]", inputs: ["ibmLayer", "cdsLayer"], exportAs: ["layer"] }, { kind: "directive", type: i5.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: WidgetTranslatePipe, name: "widgetTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3071
3300
  }
3072
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GaugeDisplayComponent, decorators: [{
3301
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseCountsConfigurationComponent, decorators: [{
3073
3302
  type: Component,
3074
- args: [{ selector: 'valtimo-gauge-display', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2024 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-gauge-widget__header\">\n <h3 class=\"valtimo-gauge-widget__title\">{{ displayTypeProperties.title }}</h3>\n\n <span *ngIf=\"displayTypeProperties.subtitle\" class=\"valtimo-gauge-widget__subtitle\">\n {{ displayTypeProperties.subtitle }}\n </span>\n</section>\n\n<section class=\"valtimo-gauge-widget__content\">\n <ibm-gauge-chart\n *ngIf=\"chartData$ | async as chartData\"\n type=\"gauge\"\n class=\"n-chart\"\n [data]=\"chartData\"\n [options]=\"gaugeChartOptions$ | async\"\n ></ibm-gauge-chart>\n</section>\n", styles: [":host{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%;padding:20px}.valtimo-gauge-widget__title,.valtimo-gauge-widget__subtitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.valtimo-gauge-widget__title{font-size:20px;margin-bottom:12px}.valtimo-gauge-widget__subtitle{font-size:14px}.valtimo-gauge-widget__label{font-size:12px;margin-left:12px;margin-bottom:-1px}.valtimo-gauge-widget__content{display:flex;align-items:flex-end;margin-bottom:12px}\n/*!\n * Copyright 2015-2024 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"] }]
3075
- }], ctorParameters: () => [{ type: i1$1.CdsThemeService }, { type: i3$1.TranslateService }], propDecorators: { displayTypeKey: [{
3303
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2024 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-counts-configuration-form\"\n *ngIf=\"{\n documentItems: documentItems$ | async,\n operatorItems: operatorItems$,\n queryItemsValue: queryItemsValue$ | async,\n } as obs\"\n [formGroup]=\"form\"\n>\n <div class=\"form__element\">\n <cds-dropdown\n [appendInline]=\"true\"\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 <cds-label class=\"conditions__label\">{{\n 'counts' | widgetTranslate: dataSourceKey | async\n }}</cds-label>\n\n <p class=\"conditions__helper-text cds--form__helper-text\">\n {{ 'countsHelperText' | widgetTranslate: dataSourceKey | async }}\n </p>\n\n @for (_ of queryItemsList$ | async; track $index; let i = $index) {\n <cds-tile class=\"count-tile\" cdsLayer=\"1\">\n <div class=\"count-tile__input\">\n <v-input\n [title]=\"'countTitle' | widgetTranslate: dataSourceKey | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.queryItemsValue[i]?.label\"\n [disabled]=\"formDisabled\"\n [required]=\"true\"\n [fullWidth]=\"true\"\n (valueChange)=\"labelValueChange(i, $event)\"\n >\n </v-input>\n\n <valtimo-carbon-multi-input\n [disabled]=\"formDisabled\"\n [addRowText]=\"'addCondition' | widgetTranslate: dataSourceKey | async\"\n [defaultValues]=\"obs.queryItemsValue[i]?.queryConditions\"\n [dropdownColumnTitle]=\"'operator' | widgetTranslate: dataSourceKey | async\"\n [dropdownItems]=\"operatorItems$ | async\"\n [fullWidth]=\"true\"\n [initialAmountOfRows]=\"1\"\n [keyColumnTitle]=\"'path' | widgetTranslate: dataSourceKey | async\"\n [minimumAmountOfRows]=\"1\"\n [valueColumnTitle]=\"'value' | widgetTranslate: dataSourceKey | async\"\n type=\"keyDropdownValue\"\n (valueChange)=\"conditionsValueChange(i, $event)\"\n ></valtimo-carbon-multi-input>\n </div>\n\n <div class=\"count-tile__delete-button\">\n <cds-icon-button\n [disabled]=\"formDisabled || i < 2\"\n (click)=\"deleteCount(i)\"\n kind=\"danger\"\n size=\"sm\"\n >\n <svg class=\"cds--btn__icon\" cdsIcon=\"trash-can\" size=\"16\"></svg>\n </cds-icon-button>\n </div>\n </cds-tile>\n }\n\n <button\n class=\"add-count-button\"\n cdsButton=\"primary\"\n [disabled]=\"formDisabled\"\n (click)=\"addQueryItem()\"\n >\n {{ 'Aantal toevoegen' }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</form>\n", styles: ["::ng-deep .case-counts-configuration-form .conditions__label{display:flex;margin-bottom:8px}::ng-deep .case-counts-configuration-form .conditions__helper-text{font-style:italic;display:flex;margin-bottom:16px}::ng-deep .case-counts-configuration-form .count-tile{display:flex;flex-direction:row;gap:32px;justify-content:space-between;margin-bottom:16px}::ng-deep .case-counts-configuration-form .count-tile__input{width:100%}::ng-deep .case-counts-configuration-form .add-count-button{margin-bottom:16px}\n/*!\n * Copyright 2015-2024 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"] }]
3304
+ }], ctorParameters: () => [{ type: i1$3.FormBuilder }, { type: i2$2.DocumentService }, { type: i3$1.TranslateService }, { type: WidgetTranslationService }, { type: i5.IconService }], propDecorators: { dataSourceKey: [{
3076
3305
  type: Input
3077
- }], data: [{
3306
+ }], disabled: [{
3078
3307
  type: Input
3079
- }], displayTypeProperties: [{
3308
+ }], prefillConfiguration: [{
3080
3309
  type: Input
3310
+ }], configurationEvent: [{
3311
+ type: Output
3081
3312
  }] } });
3082
3313
 
3083
3314
  /*
@@ -3127,42 +3358,97 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
3127
3358
  * See the License for the specific language governing permissions and
3128
3359
  * limitations under the License.
3129
3360
  */
3130
- const gaugeSpecification = {
3131
- displayTypeKey: 'gauge',
3132
- displayComponent: GaugeDisplayComponent,
3133
- configurationComponent: GaugeConfigurationComponent,
3134
- width: 1,
3135
- height: 1,
3361
+
3362
+ /*
3363
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
3364
+ *
3365
+ * Licensed under EUPL, Version 1.2 (the "License");
3366
+ * you may not use this file except in compliance with the License.
3367
+ * You may obtain a copy of the License at
3368
+ *
3369
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3370
+ *
3371
+ * Unless required by applicable law or agreed to in writing, software
3372
+ * distributed under the License is distributed on an "AS IS" basis,
3373
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3374
+ * See the License for the specific language governing permissions and
3375
+ * limitations under the License.
3376
+ */
3377
+
3378
+ /*
3379
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
3380
+ *
3381
+ * Licensed under EUPL, Version 1.2 (the "License");
3382
+ * you may not use this file except in compliance with the License.
3383
+ * You may obtain a copy of the License at
3384
+ *
3385
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3386
+ *
3387
+ * Unless required by applicable law or agreed to in writing, software
3388
+ * distributed under the License is distributed on an "AS IS" basis,
3389
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3390
+ * See the License for the specific language governing permissions and
3391
+ * limitations under the License.
3392
+ */
3393
+ const caseCountsDataSourceSpecification = {
3394
+ dataSourceKey: 'case-counts',
3395
+ configurationComponent: CaseCountsConfigurationComponent,
3136
3396
  translations: {
3137
- nl: {
3138
- title: 'Graadmeter',
3139
- formTitle: 'Titel (vereist)',
3140
- formTitleHelperText: 'De titel die wordt weergegeven in de widget',
3141
- subtitle: 'Ondertitel',
3142
- subtitleHelperText: 'De ondertitel weergegeven in de widget',
3143
- label: 'Label',
3144
- labelHelperText: 'Het label dat wordt weergegeven in de widget',
3397
+ de: {
3398
+ title: 'Mehrere Fallanzahllen',
3399
+ documentDefinition: 'Falltyp (erforderlich)',
3400
+ documentDefinitionHelperText: 'Der Falltyp, für den die Anzahllen abgeruft wirden',
3401
+ '!=': 'Nicht gleichzusetzen mit',
3402
+ '==': 'Gleich',
3403
+ '>': 'Größer als',
3404
+ '>=': 'Größer als oder gleich wie',
3405
+ '<': 'Weniger als',
3406
+ '<=': 'Gleich oder kleiner als',
3407
+ path: 'Pfad',
3408
+ operator: 'Operator',
3409
+ value: 'Wert',
3410
+ counts: 'Anzahllen',
3411
+ countsHelperText: "Geben Sie eine oder mehrere Bedingungen für mindestens zwei Anzahllen an. Zum Beispiel: 'case:createdBy', 'Gleich', 'test@test.com'. Zum Vergleichen mit leeren Werten kann als Wert '${null}' eingegeben werden. Zum Vergleichen mit dem aktuellen Datum kann als Wert '${localDateTimeNow}' eingegeben werden. Damit wird beispielsweise auch folgende Logik unterstützt: '${localDateTimeNow.minusWeeks(2)}'.",
3412
+ addCondition: 'Bedingung hinzufügen',
3413
+ countTitle: 'Anzahltitel',
3145
3414
  },
3146
- en: {
3147
- title: 'Gauge',
3148
- formTitle: 'Title (required)',
3149
- formTitleHelperText: 'The title displayed in the widget',
3150
- subtitle: 'Subtitle',
3151
- subtitleHelperText: 'The subtitle displayed in the widget',
3152
- label: 'Label',
3153
- labelHelperText: 'The label displayed in the widget',
3415
+ en: {
3416
+ title: 'Multiple case counts',
3417
+ documentDefinition: 'Case type (required)',
3418
+ documentDefinitionHelperText: 'The case type for which the counts are retrieved',
3419
+ '!=': 'Not equal to',
3420
+ '==': 'Equal to',
3421
+ '>': 'Greater than',
3422
+ '>=': 'Greater than or equal to',
3423
+ '<': 'Less than',
3424
+ '<=': 'Less than or equal to',
3425
+ path: 'Path (required)',
3426
+ operator: 'Operator',
3427
+ value: 'Value',
3428
+ counts: 'Counts',
3429
+ countsHelperText: "Specify one or more conditions for each count that should be displayed. For example: 'case:createdBy', 'Equal to', 'test@test.com'. Configure at least two counts and at least one condition per count.",
3430
+ addCondition: 'Add condition',
3431
+ countTitle: 'Count title',
3154
3432
  },
3155
- de: {
3156
- title: 'Messgerät',
3157
- formTitle: 'Titel (erforderlich)',
3158
- formTitleHelperText: 'Der im Widget angezeigte Titel',
3159
- subtitle: 'Untertitel',
3160
- subtitleHelperText: 'Der im Widget angezeigte Untertitel',
3161
- label: 'Beschriftung',
3162
- labelHelperText: 'Die im Widget angezeigte Beschriftung',
3433
+ nl: {
3434
+ title: 'Meerdere dossieraantallen',
3435
+ documentDefinition: 'Dossiertype (vereist)',
3436
+ documentDefinitionHelperText: 'Het dossiertype waarvoor de aantallen worden opgehaald',
3437
+ '!=': 'Niet gelijk aan',
3438
+ '==': 'Gelijk aan',
3439
+ '>': 'Groter dan',
3440
+ '>=': 'Groter dan of gelijk aan',
3441
+ '<': 'Minder dan',
3442
+ '<=': 'Minder dan of gelijk aan',
3443
+ path: 'Pad',
3444
+ operator: 'Operator',
3445
+ value: 'Waarde',
3446
+ counts: 'Aantallen',
3447
+ countsHelperText: "Geef een of meer condities op voor een minimum van twee aantallen. Bijvoorbeeld: 'case:createdBy', 'Gelijk aan', 'test@test.com'. Voor het vergelijken met lege waardes kan '${null}' ingevuld worden als waarde. Voor het vergelijken met de huidige datum kan '${localDateTimeNow}' ingevuld worden als waarde. Deze ondersteunt ook bijvoorbeeld de volgende logica: '${localDateTimeNow.minusWeeks(2)}'.",
3448
+ addCondition: 'Conditie toevoegen',
3449
+ countTitle: 'Aantaltitel',
3163
3450
  },
3164
3451
  },
3165
- requiredDataFeatures: [DATA_FEATURES.NUMBER, DATA_FEATURES.TOTAL],
3166
3452
  };
3167
3453
 
3168
3454
  /*
@@ -3180,38 +3466,54 @@ const gaugeSpecification = {
3180
3466
  * See the License for the specific language governing permissions and
3181
3467
  * limitations under the License.
3182
3468
  */
3183
- class GaugeModule {
3184
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GaugeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3185
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: GaugeModule, declarations: [GaugeDisplayComponent, GaugeConfigurationComponent], imports: [CommonModule,
3469
+ class CaseCountsDataSourceModule {
3470
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseCountsDataSourceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3471
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: CaseCountsDataSourceModule, declarations: [CaseCountsConfigurationComponent], imports: [CommonModule,
3186
3472
  ReactiveFormsModule,
3187
3473
  WidgetTranslatePipeModule,
3188
- InputModule,
3189
- CheckboxModule,
3190
- CommonModule,
3191
- ChartsModule], exports: [GaugeDisplayComponent] }); }
3192
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GaugeModule, providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: gaugeSpecification, multi: true }], imports: [CommonModule,
3474
+ InputModule$1,
3475
+ DropdownModule,
3476
+ CarbonMultiInputModule,
3477
+ InputModule$1,
3478
+ ButtonModule,
3479
+ TilesModule,
3480
+ LayerModule,
3481
+ IconModule], exports: [CaseCountsConfigurationComponent] }); }
3482
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseCountsDataSourceModule, providers: [
3483
+ { provide: DATA_SOURCE_TOKEN, useValue: caseCountsDataSourceSpecification, multi: true },
3484
+ ], imports: [CommonModule,
3193
3485
  ReactiveFormsModule,
3194
3486
  WidgetTranslatePipeModule,
3195
- InputModule,
3196
- CheckboxModule,
3197
- CommonModule,
3198
- ChartsModule] }); }
3487
+ InputModule$1,
3488
+ DropdownModule,
3489
+ CarbonMultiInputModule,
3490
+ InputModule$1,
3491
+ ButtonModule,
3492
+ TilesModule,
3493
+ LayerModule,
3494
+ IconModule] }); }
3199
3495
  }
3200
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GaugeModule, decorators: [{
3496
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseCountsDataSourceModule, decorators: [{
3201
3497
  type: NgModule,
3202
3498
  args: [{
3203
- declarations: [GaugeDisplayComponent, GaugeConfigurationComponent],
3499
+ declarations: [CaseCountsConfigurationComponent],
3204
3500
  imports: [
3205
3501
  CommonModule,
3206
3502
  ReactiveFormsModule,
3207
3503
  WidgetTranslatePipeModule,
3208
- InputModule,
3209
- CheckboxModule,
3210
- CommonModule,
3211
- ChartsModule,
3504
+ InputModule$1,
3505
+ DropdownModule,
3506
+ CarbonMultiInputModule,
3507
+ InputModule$1,
3508
+ ButtonModule,
3509
+ TilesModule,
3510
+ LayerModule,
3511
+ IconModule,
3512
+ ],
3513
+ exports: [CaseCountsConfigurationComponent],
3514
+ providers: [
3515
+ { provide: DATA_SOURCE_TOKEN, useValue: caseCountsDataSourceSpecification, multi: true },
3212
3516
  ],
3213
- exports: [GaugeDisplayComponent],
3214
- providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: gaugeSpecification, multi: true }],
3215
3517
  }]
3216
3518
  }] });
3217
3519
 
@@ -3246,39 +3548,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
3246
3548
  * See the License for the specific language governing permissions and
3247
3549
  * limitations under the License.
3248
3550
  */
3249
-
3250
- /*
3251
- * Copyright 2015-2024 Ritense BV, the Netherlands.
3252
- *
3253
- * Licensed under EUPL, Version 1.2 (the "License");
3254
- * you may not use this file except in compliance with the License.
3255
- * You may obtain a copy of the License at
3256
- *
3257
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3258
- *
3259
- * Unless required by applicable law or agreed to in writing, software
3260
- * distributed under the License is distributed on an "AS IS" basis,
3261
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3262
- * See the License for the specific language governing permissions and
3263
- * limitations under the License.
3264
- */
3265
-
3266
- /*
3267
- * Copyright 2015-2024 Ritense BV, the Netherlands.
3268
- *
3269
- * Licensed under EUPL, Version 1.2 (the "License");
3270
- * you may not use this file except in compliance with the License.
3271
- * You may obtain a copy of the License at
3272
- *
3273
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3274
- *
3275
- * Unless required by applicable law or agreed to in writing, software
3276
- * distributed under the License is distributed on an "AS IS" basis,
3277
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3278
- * See the License for the specific language governing permissions and
3279
- * limitations under the License.
3280
- */
3281
- class MeterConfigurationComponent {
3551
+ class CaseGroupByConfigurationComponent {
3552
+ get documentDefinition() {
3553
+ return this.form.get('documentDefinition');
3554
+ }
3555
+ get path() {
3556
+ return this.form.get('path');
3557
+ }
3558
+ get queryConditions() {
3559
+ return this.form.get('queryConditions');
3560
+ }
3561
+ get enum() {
3562
+ return this.form.get('enum');
3563
+ }
3564
+ get formDisabled() {
3565
+ return this.form.disabled;
3566
+ }
3567
+ get formValue$() {
3568
+ return this.form.valueChanges.pipe(startWith(this.form.value));
3569
+ }
3282
3570
  set disabled(disabledValue) {
3283
3571
  if (disabledValue) {
3284
3572
  this.form.disable();
@@ -3287,48 +3575,147 @@ class MeterConfigurationComponent {
3287
3575
  this.form.enable();
3288
3576
  }
3289
3577
  }
3290
- get title() {
3291
- return this.form.get('title');
3578
+ set prefillConfiguration(configurationValue) {
3579
+ if (!configurationValue)
3580
+ return;
3581
+ this.documentDefinitionSelected({
3582
+ item: {
3583
+ content: configurationValue.documentDefinition,
3584
+ },
3585
+ });
3586
+ this.queryConditions.patchValue(this.queryConditionsToMultiInputValues(configurationValue.queryConditions));
3587
+ this.enum.patchValue(this.enumToMultiInputValues(configurationValue.enum));
3588
+ this.path.patchValue(configurationValue.path);
3292
3589
  }
3293
- get subtitle() {
3294
- return this.form.get('subtitle');
3590
+ constructor(fb, documentService, translateService, widgetTranslationService) {
3591
+ this.fb = fb;
3592
+ this.documentService = documentService;
3593
+ this.translateService = translateService;
3594
+ this.widgetTranslationService = widgetTranslationService;
3595
+ this.form = this.fb.group({
3596
+ documentDefinition: this.fb.control(null, [Validators.required]),
3597
+ path: this.fb.control(null, [Validators.required]),
3598
+ queryConditions: this.fb.control([], [this.queryConditionsValidator()]),
3599
+ enum: this.fb.control([], [this.enumValidator()]),
3600
+ });
3601
+ this._selectedDocumentDefinition$ = new BehaviorSubject('');
3602
+ this.documentItems$ = combineLatest([
3603
+ this.documentService.getAllDefinitions(),
3604
+ this._selectedDocumentDefinition$,
3605
+ ]).pipe(map(([documentDefinitions, selectedDocumentDefintion]) => documentDefinitions.content.map(definition => ({
3606
+ content: definition.id.name,
3607
+ selected: definition.id.name === selectedDocumentDefintion,
3608
+ }))));
3609
+ this._OPERATORS = [
3610
+ Operator.NOT_EQUAL_TO,
3611
+ Operator.EQUAL_TO,
3612
+ Operator.GREATER_THAN,
3613
+ Operator.GREATER_THAN_OR_EQUAL_TO,
3614
+ Operator.LESS_THAN,
3615
+ Operator.LESS_THAN_OR_EQUAL_TO,
3616
+ ];
3617
+ this.operatorItems$ = this.translateService
3618
+ .stream('key')
3619
+ .pipe(map(() => this._OPERATORS.map(operator => ({
3620
+ id: operator,
3621
+ content: this.widgetTranslationService.instant(operator, this.dataSourceKey),
3622
+ selected: false,
3623
+ }))));
3624
+ this.configurationEvent = new EventEmitter();
3625
+ this._subscriptions = new Subscription();
3295
3626
  }
3296
- set prefillConfiguration(configurationValue) {
3297
- if (configurationValue) {
3298
- this.title.setValue(configurationValue.title || '');
3299
- this.subtitle.setValue(configurationValue.subtitle || '');
3627
+ ngOnInit() {
3628
+ this.openFormSubscription();
3629
+ }
3630
+ ngOnDestroy() {
3631
+ this._subscriptions.unsubscribe();
3632
+ }
3633
+ documentDefinitionSelected(documentDefinitionItem) {
3634
+ if (!documentDefinitionItem) {
3635
+ return;
3300
3636
  }
3637
+ this._selectedDocumentDefinition$.next(documentDefinitionItem?.item?.content);
3638
+ this.documentDefinition.setValue(documentDefinitionItem?.item?.content);
3639
+ }
3640
+ conditionsValueChange(values) {
3641
+ if (!values)
3642
+ return;
3643
+ const currentValue = this.queryConditions.value;
3644
+ if (isEqual(values, currentValue))
3645
+ return;
3646
+ this.queryConditions.patchValue(values);
3647
+ }
3648
+ enumValueChange(values) {
3649
+ if (!values)
3650
+ return;
3651
+ const currentValue = this.enum.value;
3652
+ if (isEqual(values, currentValue))
3653
+ return;
3654
+ this.enum.patchValue(values);
3655
+ }
3656
+ openFormSubscription() {
3657
+ this._subscriptions.add(this.form.valueChanges.pipe(startWith(this.form.value)).subscribe(formValue => {
3658
+ this.configurationEvent.emit({
3659
+ valid: this.form.valid,
3660
+ data: {
3661
+ ...formValue,
3662
+ queryConditions: this.multiInputValuesToQueryConditions(formValue.queryConditions),
3663
+ enum: this.multiInputValuesToEnum(formValue.enum),
3664
+ },
3665
+ });
3666
+ }));
3667
+ }
3668
+ queryConditionsValidator() {
3669
+ return (control) => {
3670
+ const queryConditions = control.value;
3671
+ const validConditions = queryConditions.filter(condition => !!condition.value && !!condition.key && !!condition.dropdown);
3672
+ return validConditions.length === queryConditions.length
3673
+ ? null
3674
+ : {
3675
+ invalidQueryItems: 'invalid',
3676
+ };
3677
+ };
3301
3678
  }
3302
- constructor(fb) {
3303
- this.fb = fb;
3304
- this.form = this.fb.group({
3305
- title: this.fb.control('', [Validators.required]),
3306
- subtitle: this.fb.control(''),
3307
- });
3308
- this.configurationEvent = new EventEmitter();
3309
- this._subscriptions = new Subscription();
3679
+ enumValidator() {
3680
+ return (control) => {
3681
+ const enumeration = control.value || [];
3682
+ const enumLength = enumeration.length;
3683
+ const validEnumKeysLength = enumeration.filter(entry => !!entry.key).length;
3684
+ const validEnumValuesLength = enumeration.filter(entry => !!entry.value).length;
3685
+ return enumLength === validEnumKeysLength && enumLength === validEnumValuesLength
3686
+ ? null
3687
+ : {
3688
+ invalidEnum: 'invalid',
3689
+ };
3690
+ };
3310
3691
  }
3311
- ngOnInit() {
3312
- this.openFormSubscription();
3692
+ enumToMultiInputValues(enumeration) {
3693
+ return Object.keys(enumeration || {}).reduce((acc, key) => [...acc, { key, value: enumeration[key] }], []);
3313
3694
  }
3314
- ngOnDestroy() {
3315
- this._subscriptions.unsubscribe();
3695
+ multiInputValuesToEnum(values) {
3696
+ return (values || []).reduce((acc, curr) => ({ ...acc, [curr.key]: curr.value }), {});
3316
3697
  }
3317
- openFormSubscription() {
3318
- this._subscriptions.add(this.form.valueChanges.pipe(startWith(this.form.value)).subscribe(formValue => {
3319
- this.configurationEvent.emit({
3320
- valid: this.form.valid,
3321
- data: formValue,
3322
- });
3698
+ queryConditionsToMultiInputValues(queryConditions) {
3699
+ return (queryConditions || []).map(condition => ({
3700
+ key: condition.queryPath,
3701
+ dropdown: condition.queryOperator,
3702
+ value: condition.queryValue,
3323
3703
  }));
3324
3704
  }
3325
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MeterConfigurationComponent, deps: [{ token: i1$3.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
3326
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: MeterConfigurationComponent, selector: "ng-component", inputs: { displayTypeKey: "displayTypeKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 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</form>\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.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: i5.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i5.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 }); }
3705
+ multiInputValuesToQueryConditions(values) {
3706
+ return (values || []).map(condition => ({
3707
+ queryPath: condition.key,
3708
+ queryOperator: condition.dropdown,
3709
+ queryValue: condition.value,
3710
+ }));
3711
+ }
3712
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseGroupByConfigurationComponent, deps: [{ token: i1$3.FormBuilder }, { token: i2$2.DocumentService }, { token: i3$1.TranslateService }, { token: WidgetTranslationService }], target: i0.ɵɵFactoryTarget.Component }); }
3713
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: CaseGroupByConfigurationComponent, selector: "ng-component", inputs: { dataSourceKey: "dataSourceKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 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=\"{\n documentItems: documentItems$ | async,\n operatorItems: operatorItems$,\n formValue: formValue$ | async,\n } as obs\"\n [formGroup]=\"form\"\n>\n <div class=\"form__element\">\n <cds-dropdown\n [appendInline]=\"true\"\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\">\n <cds-label\n [helperText]=\"'pathHelperText' | widgetTranslate: dataSourceKey | async\"\n [invalidText]=\"'pathHelperText' | widgetTranslate: dataSourceKey | async\"\n [invalid]=\"path.dirty && path.invalid\"\n >\n {{ 'path' | widgetTranslate: dataSourceKey | async }}\n\n <input cdsText formControlName=\"path\" [invalid]=\"path.dirty && path.invalid\" />\n </cds-label>\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]=\"obs.formValue?.queryConditions\"\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 (valueChange)=\"conditionsValueChange($event)\"\n ></valtimo-carbon-multi-input>\n </div>\n\n <div class=\"form__element conditions-multi-input\">\n <cds-label\n [helperText]=\"'enumHelperText' | widgetTranslate: dataSourceKey | async\"\n class=\"conditions-label\"\n >{{ 'enum' | widgetTranslate: dataSourceKey | async }}</cds-label\n >\n <valtimo-carbon-multi-input\n [addRowText]=\"'addDisplay' | widgetTranslate: dataSourceKey | async\"\n [defaultValues]=\"obs.formValue?.enum\"\n [fullWidth]=\"true\"\n [initialAmountOfRows]=\"0\"\n [keyColumnTitle]=\"'value' | widgetTranslate: dataSourceKey | async\"\n [minimumAmountOfRows]=\"0\"\n [valueColumnTitle]=\"'displayValue' | widgetTranslate: dataSourceKey | async\"\n type=\"keyValue\"\n (valueChange)=\"enumValueChange($event)\"\n ></valtimo-carbon-multi-input>\n </div>\n</form>\n", styles: ["::ng-deep .case-count-configuration-form .conditions-label{margin-bottom:16px}::ng-deep .case-count-configuration-form .conditions-multi-input .cds--form__helper-text{font-style:italic}\n/*!\n * Copyright 2015-2024 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: 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.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: i5.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i5.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "component", type: i5.Dropdown, selector: "cds-dropdown, ibm-dropdown", inputs: ["id", "label", "hideLabel", "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: i5.DropdownList, selector: "cds-dropdown-list, ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }, { kind: "component", type: i1$1.CarbonMultiInputComponent, selector: "valtimo-carbon-multi-input", inputs: ["name", "title", "titleTranslationKey", "type", "arbitraryValueAmount", "arbitraryAmountTitles", "initialAmountOfRows", "minimumAmountOfRows", "maxRows", "addRowText", "addRowTranslationKey", "deleteRowText", "deleteRowTranslationKey", "disabled", "defaultValues", "margin", "tooltip", "required", "keyColumnTitle", "valueColumnTitle", "dropdownColumnTitle", "hideDeleteButton", "hideAddButton", "dropdownItems", "dropdownWidth", "fullWidth", "carbonTheme"], outputs: ["valueChange", "allValuesValidEvent"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: WidgetTranslatePipe, name: "widgetTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3327
3714
  }
3328
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MeterConfigurationComponent, decorators: [{
3715
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseGroupByConfigurationComponent, decorators: [{
3329
3716
  type: Component,
3330
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2024 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</form>\n" }]
3331
- }], ctorParameters: () => [{ type: i1$3.FormBuilder }], propDecorators: { displayTypeKey: [{
3717
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2024 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=\"{\n documentItems: documentItems$ | async,\n operatorItems: operatorItems$,\n formValue: formValue$ | async,\n } as obs\"\n [formGroup]=\"form\"\n>\n <div class=\"form__element\">\n <cds-dropdown\n [appendInline]=\"true\"\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\">\n <cds-label\n [helperText]=\"'pathHelperText' | widgetTranslate: dataSourceKey | async\"\n [invalidText]=\"'pathHelperText' | widgetTranslate: dataSourceKey | async\"\n [invalid]=\"path.dirty && path.invalid\"\n >\n {{ 'path' | widgetTranslate: dataSourceKey | async }}\n\n <input cdsText formControlName=\"path\" [invalid]=\"path.dirty && path.invalid\" />\n </cds-label>\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]=\"obs.formValue?.queryConditions\"\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 (valueChange)=\"conditionsValueChange($event)\"\n ></valtimo-carbon-multi-input>\n </div>\n\n <div class=\"form__element conditions-multi-input\">\n <cds-label\n [helperText]=\"'enumHelperText' | widgetTranslate: dataSourceKey | async\"\n class=\"conditions-label\"\n >{{ 'enum' | widgetTranslate: dataSourceKey | async }}</cds-label\n >\n <valtimo-carbon-multi-input\n [addRowText]=\"'addDisplay' | widgetTranslate: dataSourceKey | async\"\n [defaultValues]=\"obs.formValue?.enum\"\n [fullWidth]=\"true\"\n [initialAmountOfRows]=\"0\"\n [keyColumnTitle]=\"'value' | widgetTranslate: dataSourceKey | async\"\n [minimumAmountOfRows]=\"0\"\n [valueColumnTitle]=\"'displayValue' | widgetTranslate: dataSourceKey | async\"\n type=\"keyValue\"\n (valueChange)=\"enumValueChange($event)\"\n ></valtimo-carbon-multi-input>\n </div>\n</form>\n", styles: ["::ng-deep .case-count-configuration-form .conditions-label{margin-bottom:16px}::ng-deep .case-count-configuration-form .conditions-multi-input .cds--form__helper-text{font-style:italic}\n/*!\n * Copyright 2015-2024 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"] }]
3718
+ }], ctorParameters: () => [{ type: i1$3.FormBuilder }, { type: i2$2.DocumentService }, { type: i3$1.TranslateService }, { type: WidgetTranslationService }], propDecorators: { dataSourceKey: [{
3332
3719
  type: Input
3333
3720
  }], disabled: [{
3334
3721
  type: Input
@@ -3369,54 +3756,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
3369
3756
  * See the License for the specific language governing permissions and
3370
3757
  * limitations under the License.
3371
3758
  */
3372
- class MeterDisplayComponent {
3373
- set data(value) {
3374
- if (!value)
3375
- return;
3376
- this._data$.next(value);
3377
- }
3378
- constructor(themeService) {
3379
- this.themeService = themeService;
3380
- this._data$ = new BehaviorSubject(null);
3381
- this.meterData$ = this._data$.pipe(filter(data => !!data), map(data => data?.values.map(dataValue => ({
3382
- group: dataValue.label,
3383
- value: dataValue.value,
3384
- })) || []));
3385
- this.meterChartOptions$ = combineLatest([
3386
- this.themeService.currentTheme$,
3387
- this.meterData$,
3388
- ]).pipe(map(([currentTheme, meterData]) => ({
3389
- resizable: true,
3390
- toolbar: { enabled: false },
3391
- theme: currentTheme,
3392
- height: '60px',
3393
- meter: {
3394
- height: 60,
3395
- showLabels: false,
3396
- title: {
3397
- percentageIndicator: {
3398
- enabled: false,
3399
- },
3400
- },
3401
- proportional: {
3402
- total: meterData.reduce((acc, curr) => acc + curr.value, 0),
3403
- },
3404
- },
3405
- })));
3406
- }
3407
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MeterDisplayComponent, deps: [{ token: i1$1.CdsThemeService }], target: i0.ɵɵFactoryTarget.Component }); }
3408
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: MeterDisplayComponent, selector: "valtimo-meter-display", inputs: { displayTypeKey: "displayTypeKey", data: "data", displayTypeProperties: "displayTypeProperties" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 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-donut-widget__header\">\n <h3 class=\"valtimo-donut-widget__title\">{{ displayTypeProperties.title }}</h3>\n\n <span *ngIf=\"displayTypeProperties.subtitle\" class=\"valtimo-donut-widget__subtitle\">\n {{ displayTypeProperties.subtitle }}\n </span>\n</section>\n\n<section class=\"valtimo-donut-widget__content\">\n <ng-container *ngIf=\"meterData$ | async as meterData\">\n @if (meterData.length > 0) {\n <ibm-meter-chart [data]=\"meterData\" [options]=\"meterChartOptions$ | async\"></ibm-meter-chart>\n } @else {\n <valtimo-no-results\n [collapseVertically]=\"true\"\n [description]=\"'dossier.widgets.noData' | translate\"\n [smallPadding]=\"true\"\n ></valtimo-no-results>\n }\n </ng-container>\n</section>\n", styles: [":host{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%;padding:20px}.valtimo-donut-widget__title,.valtimo-donut-widget__subtitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.valtimo-donut-widget__title{font-size:20px;margin-bottom:12px}.valtimo-donut-widget__subtitle{font-size:14px}.valtimo-donut-widget__label{font-size:12px;margin-left:12px;margin-bottom:-1px}.valtimo-donut-widget__content{display:flex;align-items:flex-end;justify-content:center;margin-bottom:12px}\n/*!\n * Copyright 2015-2024 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: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$2.MeterChartComponent, selector: "ibm-meter-chart" }, { kind: "component", type: i1$1.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3409
- }
3410
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MeterDisplayComponent, decorators: [{
3411
- type: Component,
3412
- args: [{ selector: 'valtimo-meter-display', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2024 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-donut-widget__header\">\n <h3 class=\"valtimo-donut-widget__title\">{{ displayTypeProperties.title }}</h3>\n\n <span *ngIf=\"displayTypeProperties.subtitle\" class=\"valtimo-donut-widget__subtitle\">\n {{ displayTypeProperties.subtitle }}\n </span>\n</section>\n\n<section class=\"valtimo-donut-widget__content\">\n <ng-container *ngIf=\"meterData$ | async as meterData\">\n @if (meterData.length > 0) {\n <ibm-meter-chart [data]=\"meterData\" [options]=\"meterChartOptions$ | async\"></ibm-meter-chart>\n } @else {\n <valtimo-no-results\n [collapseVertically]=\"true\"\n [description]=\"'dossier.widgets.noData' | translate\"\n [smallPadding]=\"true\"\n ></valtimo-no-results>\n }\n </ng-container>\n</section>\n", styles: [":host{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%;padding:20px}.valtimo-donut-widget__title,.valtimo-donut-widget__subtitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.valtimo-donut-widget__title{font-size:20px;margin-bottom:12px}.valtimo-donut-widget__subtitle{font-size:14px}.valtimo-donut-widget__label{font-size:12px;margin-left:12px;margin-bottom:-1px}.valtimo-donut-widget__content{display:flex;align-items:flex-end;justify-content:center;margin-bottom:12px}\n/*!\n * Copyright 2015-2024 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"] }]
3413
- }], ctorParameters: () => [{ type: i1$1.CdsThemeService }], propDecorators: { displayTypeKey: [{
3414
- type: Input
3415
- }], data: [{
3416
- type: Input
3417
- }], displayTypeProperties: [{
3418
- type: Input
3419
- }] } });
3420
3759
 
3421
3760
  /*
3422
3761
  * Copyright 2015-2024 Ritense BV, the Netherlands.
@@ -3465,42 +3804,77 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
3465
3804
  * See the License for the specific language governing permissions and
3466
3805
  * limitations under the License.
3467
3806
  */
3468
- const meterSpecification = {
3469
- displayTypeKey: 'meter',
3470
- displayComponent: MeterDisplayComponent,
3471
- configurationComponent: MeterConfigurationComponent,
3472
- width: 2,
3473
- height: 1,
3807
+ const caseGroupByDataSourceSpecification = {
3808
+ dataSourceKey: 'case-group-by',
3809
+ configurationComponent: CaseGroupByConfigurationComponent,
3474
3810
  translations: {
3475
- nl: {
3476
- title: 'Meter',
3477
- formTitle: 'Titel (vereist)',
3478
- formTitleHelperText: 'De titel die wordt weergegeven in de widget',
3479
- subtitle: 'Ondertitel',
3480
- subtitleHelperText: 'De ondertitel weergegeven in de widget',
3481
- label: 'Label',
3482
- labelHelperText: 'Het label dat wordt weergegeven in de widget',
3811
+ de: {
3812
+ title: 'Gruppe',
3813
+ documentDefinition: 'Falltyp (erforderlich)',
3814
+ documentDefinitionHelperText: 'Der Falltyp, für den die Anzahl abgerufen wird',
3815
+ '!=': 'Nicht gleichzusetzen mit',
3816
+ '==': 'Gleich',
3817
+ '>': 'Größer als',
3818
+ '>=': 'Größer als oder gleich wie',
3819
+ '<': 'Weniger als',
3820
+ '<=': 'Gleich oder kleiner als',
3821
+ path: 'Pfad',
3822
+ pathHelperText: 'Der Pfad innerhalb der Fall, deren Werte gruppiert werden sollen',
3823
+ operator: 'Operator',
3824
+ value: 'Wert',
3825
+ conditions: 'Bedingungen',
3826
+ conditionsHelperText: "Geben Sie optionale Bedingungen zum Abrufen der Gruppierung für den ausgewählten Falltyp an. Zum Beispiel: 'case:createdBy', 'Nicht gleichzusetzen mit', 'test@test.com'.",
3827
+ addCondition: 'Bedingung hinzufügen',
3828
+ enum: 'Anzeige der Werte',
3829
+ enumHelperText: "Einige Werte aus der Datenbank sind für den Endbenutzer nicht lesbar. Geben Sie hier an, wie die Werte angezeigt werden sollen. Beispiel: Wert: 'anfrage-gesendet', Anzeige: 'Anfrage gesendet'.",
3830
+ displayValue: 'Anzeige',
3831
+ addDisplay: 'Ansicht hinzufügen',
3483
3832
  },
3484
3833
  en: {
3485
- title: 'Meter',
3486
- formTitle: 'Title (required)',
3487
- formTitleHelperText: 'The title displayed in the widget',
3488
- subtitle: 'Subtitle',
3489
- subtitleHelperText: 'The subtitle displayed in the widget',
3490
- label: 'Label',
3491
- labelHelperText: 'The label displayed in the widget',
3834
+ title: 'Group by',
3835
+ documentDefinition: 'Case type (required)',
3836
+ documentDefinitionHelperText: 'The case type for which the count is retrieved',
3837
+ '!=': 'Not equal to',
3838
+ '==': 'Equal to',
3839
+ '>': 'Greater than',
3840
+ '>=': 'Greater than or equal to',
3841
+ '<': 'Less than',
3842
+ '<=': 'Less than or equal to',
3843
+ path: 'Path (required)',
3844
+ pathHelperText: 'The path within the case of which the values should be grouped',
3845
+ operator: 'Operator',
3846
+ value: 'Value',
3847
+ conditions: 'Conditions',
3848
+ conditionsHelperText: "Specify optional conditions for retrieving the grouping for the selected case type. For example: 'case:createdBy', 'Not equal to', 'test@test.com'. To compare with empty values, '${null}' can be entered as a value. To compare with the current date, '${localDateTimeNow}' can be entered as a value. This also supports, for example, the following logic: '${localDateTimeNow.minusWeeks(2)}'.",
3849
+ addCondition: 'Add condition',
3850
+ enum: 'Display of values',
3851
+ enumHelperText: "Some values from the database will not be readable by the end user. Specify here how the values should be displayed. For example: Value: 'request-sent', Display: 'Request sent'.",
3852
+ displayValue: 'Display',
3853
+ addDisplay: 'Add display',
3492
3854
  },
3493
- de: {
3494
- title: 'Meter',
3495
- formTitle: 'Titel (erforderlich)',
3496
- formTitleHelperText: 'Der im Widget angezeigte Titel',
3497
- subtitle: 'Untertitel',
3498
- subtitleHelperText: 'Der im Widget angezeigte Untertitel',
3499
- label: 'Beschriftung',
3500
- labelHelperText: 'Die im Widget angezeigte Beschriftung',
3855
+ nl: {
3856
+ title: 'Groepering',
3857
+ documentDefinition: 'Dossiertype (vereist)',
3858
+ documentDefinitionHelperText: 'Het dossiertype waarvoor de telling wordt opgehaald',
3859
+ '!=': 'Niet gelijk aan',
3860
+ '==': 'Gelijk aan',
3861
+ '>': 'Groter dan',
3862
+ '>=': 'Groter dan of gelijk aan',
3863
+ '<': 'Minder dan',
3864
+ '<=': 'Minder dan of gelijk aan',
3865
+ path: 'Pad',
3866
+ pathHelperText: 'Het pad binnen het dossier waarvan de waardes gegroepeerd moeten worden',
3867
+ operator: 'Operator',
3868
+ value: 'Waarde',
3869
+ conditions: 'Condities',
3870
+ conditionsHelperText: "Geef optionele condities op voor het ophalen van de groepering voor het geselecteerde dossiertype. Bijvoorbeeld: 'case:createdBy', 'Niet gelijk aan', 'test@test.com'. Voor het vergelijken met lege waardes kan '${null}' ingevuld worden als waarde. Voor het vergelijken met de huidige datum kan '${localDateTimeNow}' ingevuld worden als waarde. Deze ondersteunt ook bijvoorbeeld de volgende logica: '${localDateTimeNow.minusWeeks(2)}'.",
3871
+ addCondition: 'Conditie toevoegen',
3872
+ enum: 'Weergave van waardes',
3873
+ enumHelperText: "Sommige waardes uit de database zullen niet leesbaar zijn voor de eindgebruiker. Geef hier op hoe de waardes weergegeven moeten worden. Bijvoorbeeld: Waarde: 'aanvraag-verzonden', Weergave: 'Aanvraag verzonden'.",
3874
+ displayValue: 'Weergave',
3875
+ addDisplay: 'Weergave toevoegen',
3501
3876
  },
3502
3877
  },
3503
- requiredDataFeatures: [DATA_FEATURES.NUMBERS],
3504
3878
  };
3505
3879
 
3506
3880
  /*
@@ -3518,44 +3892,39 @@ const meterSpecification = {
3518
3892
  * See the License for the specific language governing permissions and
3519
3893
  * limitations under the License.
3520
3894
  */
3521
- class MeterModule {
3522
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MeterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3523
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: MeterModule, declarations: [MeterDisplayComponent, MeterConfigurationComponent], imports: [CommonModule,
3895
+ class CaseGroupByDataSourceModule {
3896
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseGroupByDataSourceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3897
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: CaseGroupByDataSourceModule, declarations: [CaseGroupByConfigurationComponent], imports: [CommonModule,
3524
3898
  ReactiveFormsModule,
3525
3899
  WidgetTranslatePipeModule,
3526
3900
  InputModule,
3527
- CheckboxModule,
3528
- CommonModule,
3529
- ChartsModule,
3530
- CarbonListModule,
3531
- TranslateModule], exports: [MeterDisplayComponent] }); }
3532
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MeterModule, providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: meterSpecification, multi: true }], imports: [CommonModule,
3901
+ DropdownModule,
3902
+ CarbonMultiInputModule], exports: [CaseGroupByConfigurationComponent] }); }
3903
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseGroupByDataSourceModule, providers: [
3904
+ { provide: DATA_SOURCE_TOKEN, useValue: caseGroupByDataSourceSpecification, multi: true },
3905
+ ], imports: [CommonModule,
3533
3906
  ReactiveFormsModule,
3534
3907
  WidgetTranslatePipeModule,
3535
3908
  InputModule,
3536
- CheckboxModule,
3537
- CommonModule,
3538
- ChartsModule,
3539
- CarbonListModule,
3540
- TranslateModule] }); }
3909
+ DropdownModule,
3910
+ CarbonMultiInputModule] }); }
3541
3911
  }
3542
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MeterModule, decorators: [{
3912
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CaseGroupByDataSourceModule, decorators: [{
3543
3913
  type: NgModule,
3544
3914
  args: [{
3545
- declarations: [MeterDisplayComponent, MeterConfigurationComponent],
3915
+ declarations: [CaseGroupByConfigurationComponent],
3546
3916
  imports: [
3547
3917
  CommonModule,
3548
3918
  ReactiveFormsModule,
3549
3919
  WidgetTranslatePipeModule,
3550
3920
  InputModule,
3551
- CheckboxModule,
3552
- CommonModule,
3553
- ChartsModule,
3554
- CarbonListModule,
3555
- TranslateModule,
3921
+ DropdownModule,
3922
+ CarbonMultiInputModule,
3923
+ ],
3924
+ exports: [CaseGroupByConfigurationComponent],
3925
+ providers: [
3926
+ { provide: DATA_SOURCE_TOKEN, useValue: caseGroupByDataSourceSpecification, multi: true },
3556
3927
  ],
3557
- exports: [MeterDisplayComponent],
3558
- providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: meterSpecification, multi: true }],
3559
3928
  }]
3560
3929
  }] });
3561
3930
 
@@ -3607,22 +3976,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
3607
3976
  * limitations under the License.
3608
3977
  */
3609
3978
 
3610
- /*
3611
- * Copyright 2015-2024 Ritense BV, the Netherlands.
3612
- *
3613
- * Licensed under EUPL, Version 1.2 (the "License");
3614
- * you may not use this file except in compliance with the License.
3615
- * You may obtain a copy of the License at
3616
- *
3617
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3618
- *
3619
- * Unless required by applicable law or agreed to in writing, software
3620
- * distributed under the License is distributed on an "AS IS" basis,
3621
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3622
- * See the License for the specific language governing permissions and
3623
- * limitations under the License.
3624
- */
3625
-
3626
3979
  /*
3627
3980
  * Copyright 2015-2024 Ritense BV, the Netherlands.
3628
3981
  *
@@ -3646,5 +3999,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
3646
3999
  * Generated bundle index. Do not edit.
3647
4000
  */
3648
4001
 
3649
- export { BigNumberConfigurationComponent, BigNumberDisplayComponent, BigNumberModule, CaseCountConfigurationComponent, CaseCountDataSourceModule, CaseCountsConfigurationComponent, CaseCountsDataSourceModule, CaseGroupByConfigurationComponent, CaseGroupByDataSourceModule, DATA_FEATURES, DATA_SOURCE_TOKEN, DISPLAY_TYPE_TOKEN, DashboardComponent, DashboardModule, DashboardService, DonutConfigurationComponent, DonutDisplayComponent, DonutModule, GaugeConfigurationComponent, GaugeDisplayComponent, GaugeModule, HttpLoaderFactory, MeterConfigurationComponent, MeterDisplayComponent, MeterModule, Operator, WIDGET_1X_HEIGHT, WIDGET_1X_MIN_WIDTH, WidgetDashboardComponent, WidgetDashboardContentComponent, WidgetService, WidgetSeverity, WidgetTranslatePipe, WidgetTranslatePipeModule, WidgetTranslationService, bigNumberSpecification, caseCountDataSourceSpecification, caseCountsDataSourceSpecification, caseGroupByDataSourceSpecification, donutSpecification, gaugeSpecification, meterSpecification };
4002
+ export { BigNumberConfigurationComponent, BigNumberDisplayComponent, BigNumberModule, CaseCountConfigurationComponent, CaseCountDataSourceModule, CaseCountsConfigurationComponent, CaseCountsDataSourceModule, CaseGroupByConfigurationComponent, CaseGroupByDataSourceModule, DATA_FEATURES, DATA_SOURCE_TOKEN, DISPLAY_TYPE_TOKEN, DashboardComponent, DashboardModule, DashboardService, DisplayWidgetTypesModule, DonutConfigurationComponent, DonutDisplayComponent, DonutModule, GaugeConfigurationComponent, GaugeDisplayComponent, GaugeModule, HttpLoaderFactory, MeterConfigurationComponent, MeterDisplayComponent, MeterModule, Operator, WIDGET_1X_HEIGHT, WIDGET_1X_MIN_WIDTH, WidgetDashboardComponent, WidgetDashboardContentComponent, WidgetService, WidgetSeverity, WidgetTranslatePipe, WidgetTranslatePipeModule, WidgetTranslationService, bigNumberSpecification, caseCountDataSourceSpecification, caseCountsDataSourceSpecification, caseGroupByDataSourceSpecification, donutSpecification, gaugeSpecification, meterSpecification };
3650
4003
  //# sourceMappingURL=valtimo-dashboard.mjs.map