@valtimo/dashboard 0.0.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 (237) hide show
  1. package/fesm2022/valtimo-dashboard.mjs +4344 -0
  2. package/fesm2022/valtimo-dashboard.mjs.map +1 -0
  3. package/index.d.ts +6 -0
  4. package/lib/components/dashboard/dashboard.component.d.ts +25 -0
  5. package/lib/components/dashboard/dashboard.component.d.ts.map +1 -0
  6. package/lib/components/widget-dashboard/widget-dashboard.component.d.ts +21 -0
  7. package/lib/components/widget-dashboard/widget-dashboard.component.d.ts.map +1 -0
  8. package/lib/components/widget-dashboard-content/widget-dashboard-content.component.d.ts +43 -0
  9. package/lib/components/widget-dashboard-content/widget-dashboard-content.component.d.ts.map +1 -0
  10. package/lib/constants/data-features.constants.d.ts +7 -0
  11. package/lib/constants/data-features.constants.d.ts.map +1 -0
  12. package/lib/constants/index.d.ts +4 -0
  13. package/lib/constants/index.d.ts.map +1 -0
  14. package/lib/constants/injection-tokens.d.ts +6 -0
  15. package/lib/constants/injection-tokens.d.ts.map +1 -0
  16. package/lib/constants/layout.constants.d.ts +4 -0
  17. package/lib/constants/layout.constants.d.ts.map +1 -0
  18. package/lib/dashboard-routing.module.d.ts +9 -0
  19. package/lib/dashboard-routing.module.d.ts.map +1 -0
  20. package/lib/dashboard.module.d.ts +22 -0
  21. package/lib/dashboard.module.d.ts.map +1 -0
  22. package/lib/data-sources/case-count/case-count.module.d.ts +13 -0
  23. package/lib/data-sources/case-count/case-count.module.d.ts.map +1 -0
  24. package/lib/data-sources/case-count/case-count.specification.d.ts +3 -0
  25. package/lib/data-sources/case-count/case-count.specification.d.ts.map +1 -0
  26. package/lib/data-sources/case-count/components/case-count-configuration/case-count-configuration.component.d.ts +43 -0
  27. package/lib/data-sources/case-count/components/case-count-configuration/case-count-configuration.component.d.ts.map +1 -0
  28. package/lib/data-sources/case-count/components/case-count-configuration/index.d.ts +2 -0
  29. package/lib/data-sources/case-count/components/case-count-configuration/index.d.ts.map +1 -0
  30. package/lib/data-sources/case-count/components/index.d.ts +2 -0
  31. package/lib/data-sources/case-count/components/index.d.ts.map +1 -0
  32. package/lib/data-sources/case-count/index.d.ts +5 -0
  33. package/lib/data-sources/case-count/index.d.ts.map +1 -0
  34. package/lib/data-sources/case-count/models/case-count.model.d.ts +7 -0
  35. package/lib/data-sources/case-count/models/case-count.model.d.ts.map +1 -0
  36. package/lib/data-sources/case-count/models/index.d.ts +2 -0
  37. package/lib/data-sources/case-count/models/index.d.ts.map +1 -0
  38. package/lib/data-sources/case-counts/case-counts.module.d.ts +13 -0
  39. package/lib/data-sources/case-counts/case-counts.module.d.ts.map +1 -0
  40. package/lib/data-sources/case-counts/case-counts.specification.d.ts +3 -0
  41. package/lib/data-sources/case-counts/case-counts.specification.d.ts.map +1 -0
  42. package/lib/data-sources/case-counts/components/case-counts-configuration/case-counts-configuration.component.d.ts +51 -0
  43. package/lib/data-sources/case-counts/components/case-counts-configuration/case-counts-configuration.component.d.ts.map +1 -0
  44. package/lib/data-sources/case-counts/components/case-counts-configuration/index.d.ts +2 -0
  45. package/lib/data-sources/case-counts/components/case-counts-configuration/index.d.ts.map +1 -0
  46. package/lib/data-sources/case-counts/components/index.d.ts +2 -0
  47. package/lib/data-sources/case-counts/components/index.d.ts.map +1 -0
  48. package/lib/data-sources/case-counts/index.d.ts +5 -0
  49. package/lib/data-sources/case-counts/index.d.ts.map +1 -0
  50. package/lib/data-sources/case-counts/models/case-counts.model.d.ts +16 -0
  51. package/lib/data-sources/case-counts/models/case-counts.model.d.ts.map +1 -0
  52. package/lib/data-sources/case-counts/models/index.d.ts +2 -0
  53. package/lib/data-sources/case-counts/models/index.d.ts.map +1 -0
  54. package/lib/data-sources/case-group-by/case-group-by.module.d.ts +13 -0
  55. package/lib/data-sources/case-group-by/case-group-by.module.d.ts.map +1 -0
  56. package/lib/data-sources/case-group-by/case-group-by.specification.d.ts +3 -0
  57. package/lib/data-sources/case-group-by/case-group-by.specification.d.ts.map +1 -0
  58. package/lib/data-sources/case-group-by/components/case-group-by-configuration/case-group-by-configuration.component.d.ts +53 -0
  59. package/lib/data-sources/case-group-by/components/case-group-by-configuration/case-group-by-configuration.component.d.ts.map +1 -0
  60. package/lib/data-sources/case-group-by/components/case-group-by-configuration/index.d.ts +2 -0
  61. package/lib/data-sources/case-group-by/components/case-group-by-configuration/index.d.ts.map +1 -0
  62. package/lib/data-sources/case-group-by/components/index.d.ts +2 -0
  63. package/lib/data-sources/case-group-by/components/index.d.ts.map +1 -0
  64. package/lib/data-sources/case-group-by/index.d.ts +5 -0
  65. package/lib/data-sources/case-group-by/index.d.ts.map +1 -0
  66. package/lib/data-sources/case-group-by/models/case-group-by.model.d.ts +19 -0
  67. package/lib/data-sources/case-group-by/models/case-group-by.model.d.ts.map +1 -0
  68. package/lib/data-sources/case-group-by/models/index.d.ts +2 -0
  69. package/lib/data-sources/case-group-by/models/index.d.ts.map +1 -0
  70. package/lib/data-sources/data-sources.module.d.ts +11 -0
  71. package/lib/data-sources/data-sources.module.d.ts.map +1 -0
  72. package/lib/data-sources/index.d.ts +5 -0
  73. package/lib/data-sources/index.d.ts.map +1 -0
  74. package/lib/data-sources/shared/conditions.d.ts +7 -0
  75. package/lib/data-sources/shared/conditions.d.ts.map +1 -0
  76. package/lib/data-sources/shared/index.d.ts +2 -0
  77. package/lib/data-sources/shared/index.d.ts.map +1 -0
  78. package/lib/data-sources/task-count/components/index.d.ts +2 -0
  79. package/lib/data-sources/task-count/components/index.d.ts.map +1 -0
  80. package/lib/data-sources/task-count/components/task-count-configuration/index.d.ts +2 -0
  81. package/lib/data-sources/task-count/components/task-count-configuration/index.d.ts.map +1 -0
  82. package/lib/data-sources/task-count/components/task-count-configuration/task-count-configuration.component.d.ts +34 -0
  83. package/lib/data-sources/task-count/components/task-count-configuration/task-count-configuration.component.d.ts.map +1 -0
  84. package/lib/data-sources/task-count/index.d.ts +5 -0
  85. package/lib/data-sources/task-count/index.d.ts.map +1 -0
  86. package/lib/data-sources/task-count/models/index.d.ts +2 -0
  87. package/lib/data-sources/task-count/models/index.d.ts.map +1 -0
  88. package/lib/data-sources/task-count/models/task-count.model.d.ts +6 -0
  89. package/lib/data-sources/task-count/models/task-count.model.d.ts.map +1 -0
  90. package/lib/data-sources/task-count/task-count.module.d.ts +13 -0
  91. package/lib/data-sources/task-count/task-count.module.d.ts.map +1 -0
  92. package/lib/data-sources/task-count/task-count.specification.d.ts +3 -0
  93. package/lib/data-sources/task-count/task-count.specification.d.ts.map +1 -0
  94. package/lib/display-types/bar-chart/bar-chart.module.d.ts +16 -0
  95. package/lib/display-types/bar-chart/bar-chart.module.d.ts.map +1 -0
  96. package/lib/display-types/bar-chart/bar-chart.specification.d.ts +3 -0
  97. package/lib/display-types/bar-chart/bar-chart.specification.d.ts.map +1 -0
  98. package/lib/display-types/bar-chart/components/bar-chart-configuration/bar-chart-configuration.component.d.ts +26 -0
  99. package/lib/display-types/bar-chart/components/bar-chart-configuration/bar-chart-configuration.component.d.ts.map +1 -0
  100. package/lib/display-types/bar-chart/components/bar-chart-configuration/index.d.ts +2 -0
  101. package/lib/display-types/bar-chart/components/bar-chart-configuration/index.d.ts.map +1 -0
  102. package/lib/display-types/bar-chart/components/bar-chart-display/bar-chart-display.component.d.ts +19 -0
  103. package/lib/display-types/bar-chart/components/bar-chart-display/bar-chart-display.component.d.ts.map +1 -0
  104. package/lib/display-types/bar-chart/components/bar-chart-display/index.d.ts +2 -0
  105. package/lib/display-types/bar-chart/components/bar-chart-display/index.d.ts.map +1 -0
  106. package/lib/display-types/bar-chart/components/index.d.ts +3 -0
  107. package/lib/display-types/bar-chart/components/index.d.ts.map +1 -0
  108. package/lib/display-types/bar-chart/index.d.ts +5 -0
  109. package/lib/display-types/bar-chart/index.d.ts.map +1 -0
  110. package/lib/display-types/bar-chart/models/bar-chart.model.d.ts +13 -0
  111. package/lib/display-types/bar-chart/models/bar-chart.model.d.ts.map +1 -0
  112. package/lib/display-types/bar-chart/models/index.d.ts +2 -0
  113. package/lib/display-types/bar-chart/models/index.d.ts.map +1 -0
  114. package/lib/display-types/big-number/big-number.module.d.ts +13 -0
  115. package/lib/display-types/big-number/big-number.module.d.ts.map +1 -0
  116. package/lib/display-types/big-number/big-number.specification.d.ts +3 -0
  117. package/lib/display-types/big-number/big-number.specification.d.ts.map +1 -0
  118. package/lib/display-types/big-number/components/big-number-configuration/big-number-configuration.component.d.ts +37 -0
  119. package/lib/display-types/big-number/components/big-number-configuration/big-number-configuration.component.d.ts.map +1 -0
  120. package/lib/display-types/big-number/components/big-number-configuration/index.d.ts +2 -0
  121. package/lib/display-types/big-number/components/big-number-configuration/index.d.ts.map +1 -0
  122. package/lib/display-types/big-number/components/big-number-display/big-number-display.component.d.ts +13 -0
  123. package/lib/display-types/big-number/components/big-number-display/big-number-display.component.d.ts.map +1 -0
  124. package/lib/display-types/big-number/components/big-number-display/index.d.ts +2 -0
  125. package/lib/display-types/big-number/components/big-number-display/index.d.ts.map +1 -0
  126. package/lib/display-types/big-number/components/index.d.ts +3 -0
  127. package/lib/display-types/big-number/components/index.d.ts.map +1 -0
  128. package/lib/display-types/big-number/index.d.ts +5 -0
  129. package/lib/display-types/big-number/index.d.ts.map +1 -0
  130. package/lib/display-types/big-number/models/big-number.model.d.ts +14 -0
  131. package/lib/display-types/big-number/models/big-number.model.d.ts.map +1 -0
  132. package/lib/display-types/big-number/models/index.d.ts +2 -0
  133. package/lib/display-types/big-number/models/index.d.ts.map +1 -0
  134. package/lib/display-types/display-widget-types.module.d.ts +12 -0
  135. package/lib/display-types/display-widget-types.module.d.ts.map +1 -0
  136. package/lib/display-types/donut/components/donut-configuration/donut-configuration.component.d.ts +29 -0
  137. package/lib/display-types/donut/components/donut-configuration/donut-configuration.component.d.ts.map +1 -0
  138. package/lib/display-types/donut/components/donut-configuration/index.d.ts +2 -0
  139. package/lib/display-types/donut/components/donut-configuration/index.d.ts.map +1 -0
  140. package/lib/display-types/donut/components/donut-display/donut-display.component.d.ts +19 -0
  141. package/lib/display-types/donut/components/donut-display/donut-display.component.d.ts.map +1 -0
  142. package/lib/display-types/donut/components/donut-display/index.d.ts +2 -0
  143. package/lib/display-types/donut/components/donut-display/index.d.ts.map +1 -0
  144. package/lib/display-types/donut/components/index.d.ts +3 -0
  145. package/lib/display-types/donut/components/index.d.ts.map +1 -0
  146. package/lib/display-types/donut/donut.module.d.ts +16 -0
  147. package/lib/display-types/donut/donut.module.d.ts.map +1 -0
  148. package/lib/display-types/donut/donut.specification.d.ts +3 -0
  149. package/lib/display-types/donut/donut.specification.d.ts.map +1 -0
  150. package/lib/display-types/donut/index.d.ts +5 -0
  151. package/lib/display-types/donut/index.d.ts.map +1 -0
  152. package/lib/display-types/donut/models/donut.model.d.ts +14 -0
  153. package/lib/display-types/donut/models/donut.model.d.ts.map +1 -0
  154. package/lib/display-types/donut/models/index.d.ts +2 -0
  155. package/lib/display-types/donut/models/index.d.ts.map +1 -0
  156. package/lib/display-types/gauge/components/gauge-configuration/gauge-configuration.component.d.ts +29 -0
  157. package/lib/display-types/gauge/components/gauge-configuration/gauge-configuration.component.d.ts.map +1 -0
  158. package/lib/display-types/gauge/components/gauge-configuration/index.d.ts +2 -0
  159. package/lib/display-types/gauge/components/gauge-configuration/index.d.ts.map +1 -0
  160. package/lib/display-types/gauge/components/gauge-display/gauge-display.component.d.ts +24 -0
  161. package/lib/display-types/gauge/components/gauge-display/gauge-display.component.d.ts.map +1 -0
  162. package/lib/display-types/gauge/components/gauge-display/index.d.ts +2 -0
  163. package/lib/display-types/gauge/components/gauge-display/index.d.ts.map +1 -0
  164. package/lib/display-types/gauge/components/index.d.ts +3 -0
  165. package/lib/display-types/gauge/components/index.d.ts.map +1 -0
  166. package/lib/display-types/gauge/gauge.module.d.ts +14 -0
  167. package/lib/display-types/gauge/gauge.module.d.ts.map +1 -0
  168. package/lib/display-types/gauge/gauge.specification.d.ts +3 -0
  169. package/lib/display-types/gauge/gauge.specification.d.ts.map +1 -0
  170. package/lib/display-types/gauge/index.d.ts +5 -0
  171. package/lib/display-types/gauge/index.d.ts.map +1 -0
  172. package/lib/display-types/gauge/models/gauge.model.d.ts +11 -0
  173. package/lib/display-types/gauge/models/gauge.model.d.ts.map +1 -0
  174. package/lib/display-types/gauge/models/index.d.ts +2 -0
  175. package/lib/display-types/gauge/models/index.d.ts.map +1 -0
  176. package/lib/display-types/index.d.ts +5 -0
  177. package/lib/display-types/index.d.ts.map +1 -0
  178. package/lib/display-types/meter/components/index.d.ts +3 -0
  179. package/lib/display-types/meter/components/index.d.ts.map +1 -0
  180. package/lib/display-types/meter/components/meter-configuration/index.d.ts +2 -0
  181. package/lib/display-types/meter/components/meter-configuration/index.d.ts.map +1 -0
  182. package/lib/display-types/meter/components/meter-configuration/meter-configuration.component.d.ts +26 -0
  183. package/lib/display-types/meter/components/meter-configuration/meter-configuration.component.d.ts.map +1 -0
  184. package/lib/display-types/meter/components/meter-display/index.d.ts +2 -0
  185. package/lib/display-types/meter/components/meter-display/index.d.ts.map +1 -0
  186. package/lib/display-types/meter/components/meter-display/meter-display.component.d.ts +19 -0
  187. package/lib/display-types/meter/components/meter-display/meter-display.component.d.ts.map +1 -0
  188. package/lib/display-types/meter/index.d.ts +5 -0
  189. package/lib/display-types/meter/index.d.ts.map +1 -0
  190. package/lib/display-types/meter/meter.module.d.ts +16 -0
  191. package/lib/display-types/meter/meter.module.d.ts.map +1 -0
  192. package/lib/display-types/meter/meter.specification.d.ts +3 -0
  193. package/lib/display-types/meter/meter.specification.d.ts.map +1 -0
  194. package/lib/display-types/meter/models/index.d.ts +2 -0
  195. package/lib/display-types/meter/models/index.d.ts.map +1 -0
  196. package/lib/display-types/meter/models/meter.model.d.ts +13 -0
  197. package/lib/display-types/meter/models/meter.model.d.ts.map +1 -0
  198. package/lib/models/configuration.model.d.ts +18 -0
  199. package/lib/models/configuration.model.d.ts.map +1 -0
  200. package/lib/models/dashboard.model.d.ts +16 -0
  201. package/lib/models/dashboard.model.d.ts.map +1 -0
  202. package/lib/models/data-source.model.d.ts +19 -0
  203. package/lib/models/data-source.model.d.ts.map +1 -0
  204. package/lib/models/display-type.model.d.ts +23 -0
  205. package/lib/models/display-type.model.d.ts.map +1 -0
  206. package/lib/models/index.d.ts +8 -0
  207. package/lib/models/index.d.ts.map +1 -0
  208. package/lib/models/layout.model.d.ts +18 -0
  209. package/lib/models/layout.model.d.ts.map +1 -0
  210. package/lib/models/widget-data.model.d.ts +6 -0
  211. package/lib/models/widget-data.model.d.ts.map +1 -0
  212. package/lib/models/widget-display.model.d.ts +9 -0
  213. package/lib/models/widget-display.model.d.ts.map +1 -0
  214. package/lib/pipes/index.d.ts +2 -0
  215. package/lib/pipes/index.d.ts.map +1 -0
  216. package/lib/pipes/widget-translate/index.d.ts +3 -0
  217. package/lib/pipes/widget-translate/index.d.ts.map +1 -0
  218. package/lib/pipes/widget-translate/widget-translate-pipe.module.d.ts +9 -0
  219. package/lib/pipes/widget-translate/widget-translate-pipe.module.d.ts.map +1 -0
  220. package/lib/pipes/widget-translate/widget-translate.pipe.d.ts +12 -0
  221. package/lib/pipes/widget-translate/widget-translate.pipe.d.ts.map +1 -0
  222. package/lib/services/dashboard.service.d.ts +15 -0
  223. package/lib/services/dashboard.service.d.ts.map +1 -0
  224. package/lib/services/index.d.ts +4 -0
  225. package/lib/services/index.d.ts.map +1 -0
  226. package/lib/services/widget-api.service.d.ts +15 -0
  227. package/lib/services/widget-api.service.d.ts.map +1 -0
  228. package/lib/services/widget-layout.service.d.ts +24 -0
  229. package/lib/services/widget-layout.service.d.ts.map +1 -0
  230. package/lib/services/widget-translation.service.d.ts +15 -0
  231. package/lib/services/widget-translation.service.d.ts.map +1 -0
  232. package/lib/services/widget.service.d.ts +19 -0
  233. package/lib/services/widget.service.d.ts.map +1 -0
  234. package/package.json +34 -0
  235. package/public_api.d.ts +13 -0
  236. package/public_api.d.ts.map +1 -0
  237. package/valtimo-dashboard.d.ts.map +1 -0
@@ -0,0 +1,4344 @@
1
+ import * as i0 from '@angular/core';
2
+ import { ViewChild, Component, InjectionToken, Injectable, Inject, ViewContainerRef, Input, ViewChildren, ViewEncapsulation, Pipe, EventEmitter, Output, ChangeDetectionStrategy, NgModule } from '@angular/core';
3
+ import moment from 'moment';
4
+ import { BehaviorSubject, filter, map, Subject, Subscription, combineLatest, debounceTime, tap, startWith, distinctUntilChanged } from 'rxjs';
5
+ import { take, map as map$1, delay } from 'rxjs/operators';
6
+ import * as i1 from '@valtimo/task';
7
+ import { TaskModule } from '@valtimo/task';
8
+ import * as i2 from '@angular/router';
9
+ import { RouterModule } from '@angular/router';
10
+ import * as i3 from '@angular/common';
11
+ import { CommonModule } from '@angular/common';
12
+ import * as i1$1 from '@valtimo/components';
13
+ import { CarbonListModule, ValuePathSelectorPrefix, CarbonMultiInputModule, InputModule as InputModule$1, ValuePathSelectorComponent, WidgetModule, BpmnJsDiagramModule, AlertModule, SpinnerModule } from '@valtimo/components';
14
+ import * as i3$1 from '@ngx-translate/core';
15
+ import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
16
+ import Muuri from 'muuri';
17
+ import * as i1$2 from '@angular/common/http';
18
+ import { HttpClient } from '@angular/common/http';
19
+ import * as i2$1 from '@valtimo/shared';
20
+ import { Operator, ROLE_USER } from '@valtimo/shared';
21
+ import * as i4 from 'carbon-components-angular';
22
+ import { InputModule, CheckboxModule, DropdownModule, ButtonModule, TilesModule, LayerModule, IconModule, TabsModule, ThemeModule, LoadingModule } from 'carbon-components-angular';
23
+ import * as i1$3 from '@angular/forms';
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 * as i2$2 from '@valtimo/document';
29
+ import { isEqual } from 'lodash';
30
+ import { Add16, TrashCan16 } from '@carbon/icons';
31
+ import { TranslateHttpLoader } from '@ngx-translate/http-loader';
32
+ import { AuthGuardService } from '@valtimo/security';
33
+
34
+ /*
35
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
36
+ *
37
+ * Licensed under EUPL, Version 1.2 (the "License");
38
+ * you may not use this file except in compliance with the License.
39
+ * You may obtain a copy of the License at
40
+ *
41
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
42
+ *
43
+ * Unless required by applicable law or agreed to in writing, software
44
+ * distributed under the License is distributed on an "AS IS" basis,
45
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
46
+ * See the License for the specific language governing permissions and
47
+ * limitations under the License.
48
+ */
49
+ moment.locale(localStorage.getItem('langKey') || '');
50
+ moment.defaultFormat = 'DD MMM YYYY HH:mm';
51
+ class DashboardComponent {
52
+ constructor(taskService, route) {
53
+ this.taskService = taskService;
54
+ this.route = route;
55
+ this.openTaskFields = [
56
+ {
57
+ key: 'created',
58
+ label: 'Created',
59
+ },
60
+ {
61
+ key: 'name',
62
+ label: 'Name',
63
+ },
64
+ {
65
+ key: 'valtimoAssignee.fullName',
66
+ label: 'Assignee',
67
+ },
68
+ ];
69
+ this.loading$ = new BehaviorSubject(true);
70
+ }
71
+ ngOnInit() {
72
+ this.getOpenTasks();
73
+ }
74
+ getOpenTasks() {
75
+ this.taskService.getTasks().subscribe(response => {
76
+ this.openTasks = response;
77
+ this.openTasks.map(task => {
78
+ task.created = moment(task.created).format('DD MMM YYYY HH:mm');
79
+ });
80
+ this.checkRouteForTaskId(response);
81
+ this.loading$.next(false);
82
+ });
83
+ }
84
+ rowOpenTaskClick(task) {
85
+ if (!task.endTime) {
86
+ this.taskDetail.openTaskDetails(task);
87
+ }
88
+ }
89
+ checkRouteForTaskId(tasks) {
90
+ this.route.queryParams.pipe(take(1)).subscribe(params => {
91
+ const taskId = params?.taskId;
92
+ const findTaskFromId = tasks.find(task => task.id === taskId);
93
+ if (findTaskFromId) {
94
+ this.rowOpenTaskClick(findTaskFromId);
95
+ }
96
+ });
97
+ }
98
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DashboardComponent, deps: [{ token: i1.TaskService }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
99
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: DashboardComponent, isStandalone: false, selector: "valtimo-dashboard", viewQueries: [{ propertyName: "taskDetail", first: true, predicate: ["taskDetail"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content container-fluid\" *ngIf=\"{loading: loading$ | async} as obs\">\n <h4 class=\"title\">\n {{ 'dashboard.openTasks.title' | translate }}\n <sup *ngIf=\"obs.loading === false\" class=\"ml-1 badge badge-pill badge-primary\">{{\n openTasks?.length\n }}</sup>\n </h4>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <valtimo-widget>\n <valtimo-carbon-list\n [items]=\"openTasks\"\n [fields]=\"openTaskFields\"\n (rowClicked)=\"rowOpenTaskClick($event)\"\n ></valtimo-carbon-list>\n </valtimo-widget>\n </ng-container>\n <valtimo-task-detail-modal\n #taskDetail\n (formSubmit)=\"getOpenTasks()\"\n (assignmentOfTaskChanged)=\"getOpenTasks()\"\n ></valtimo-task-detail-modal>\n</div>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$1.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "component", type: i1.TaskDetailModalComponent, selector: "valtimo-task-detail-modal", inputs: ["modalSize", "openFromCaseManagement"], outputs: ["formSubmit", "assignmentOfTaskChanged"] }, { kind: "component", type: i1$1.SpinnerComponent, selector: "valtimo-spinner", inputs: ["useBootstrapSpinner", "name", "type", "size", "color", "bdColor", "fullScreen", "noMarginTop"] }, { kind: "component", type: i1$1.CarbonListComponent, selector: "valtimo-carbon-list", inputs: ["items", "fields", "tableTranslations", "paginatorConfig", "pagination", "loading", "actions", "actionItems", "showActionItems", "header", "hideColumnHeader", "initialSortState", "sortState", "isSearchable", "enableSingleSelection", "lastColumnTemplate", "paginationIdentifier", "showSelectionColumn", "striped", "hideToolbar", "lockedTooltipTranslationKey", "movingRowsEnabled", "dragAndDrop", "dragAndDropDisabled"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged", "moveRow", "itemsReordered"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }] }); }
100
+ }
101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DashboardComponent, decorators: [{
102
+ type: Component,
103
+ args: [{ standalone: false, selector: 'valtimo-dashboard', template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content container-fluid\" *ngIf=\"{loading: loading$ | async} as obs\">\n <h4 class=\"title\">\n {{ 'dashboard.openTasks.title' | translate }}\n <sup *ngIf=\"obs.loading === false\" class=\"ml-1 badge badge-pill badge-primary\">{{\n openTasks?.length\n }}</sup>\n </h4>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <valtimo-widget>\n <valtimo-carbon-list\n [items]=\"openTasks\"\n [fields]=\"openTaskFields\"\n (rowClicked)=\"rowOpenTaskClick($event)\"\n ></valtimo-carbon-list>\n </valtimo-widget>\n </ng-container>\n <valtimo-task-detail-modal\n #taskDetail\n (formSubmit)=\"getOpenTasks()\"\n (assignmentOfTaskChanged)=\"getOpenTasks()\"\n ></valtimo-task-detail-modal>\n</div>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n" }]
104
+ }], ctorParameters: () => [{ type: i1.TaskService }, { type: i2.ActivatedRoute }], propDecorators: { taskDetail: [{
105
+ type: ViewChild,
106
+ args: ['taskDetail']
107
+ }] } });
108
+
109
+ /*
110
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
111
+ *
112
+ * Licensed under EUPL, Version 1.2 (the "License");
113
+ * you may not use this file except in compliance with the License.
114
+ * You may obtain a copy of the License at
115
+ *
116
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
117
+ *
118
+ * Unless required by applicable law or agreed to in writing, software
119
+ * distributed under the License is distributed on an "AS IS" basis,
120
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
121
+ * See the License for the specific language governing permissions and
122
+ * limitations under the License.
123
+ */
124
+ const DATA_FEATURES = {
125
+ NUMBER: 'number',
126
+ TOTAL: 'total',
127
+ NUMBERS: 'numbers',
128
+ };
129
+
130
+ /*
131
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
132
+ *
133
+ * Licensed under EUPL, Version 1.2 (the "License");
134
+ * you may not use this file except in compliance with the License.
135
+ * You may obtain a copy of the License at
136
+ *
137
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
138
+ *
139
+ * Unless required by applicable law or agreed to in writing, software
140
+ * distributed under the License is distributed on an "AS IS" basis,
141
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
142
+ * See the License for the specific language governing permissions and
143
+ * limitations under the License.
144
+ */
145
+ const DISPLAY_TYPE_TOKEN = new InjectionToken('Supported display types');
146
+ const DATA_SOURCE_TOKEN = new InjectionToken('Supported data sources');
147
+
148
+ /*
149
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
150
+ *
151
+ * Licensed under EUPL, Version 1.2 (the "License");
152
+ * you may not use this file except in compliance with the License.
153
+ * You may obtain a copy of the License at
154
+ *
155
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
156
+ *
157
+ * Unless required by applicable law or agreed to in writing, software
158
+ * distributed under the License is distributed on an "AS IS" basis,
159
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
160
+ * See the License for the specific language governing permissions and
161
+ * limitations under the License.
162
+ */
163
+ const WIDGET_1X_HEIGHT = 220;
164
+ const WIDGET_1X_MIN_WIDTH = 275;
165
+
166
+ /*
167
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
168
+ *
169
+ * Licensed under EUPL, Version 1.2 (the "License");
170
+ * you may not use this file except in compliance with the License.
171
+ * You may obtain a copy of the License at
172
+ *
173
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
174
+ *
175
+ * Unless required by applicable law or agreed to in writing, software
176
+ * distributed under the License is distributed on an "AS IS" basis,
177
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
178
+ * See the License for the specific language governing permissions and
179
+ * limitations under the License.
180
+ */
181
+
182
+ /*
183
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
184
+ *
185
+ * Licensed under EUPL, Version 1.2 (the "License");
186
+ * you may not use this file except in compliance with the License.
187
+ * You may obtain a copy of the License at
188
+ *
189
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
190
+ *
191
+ * Unless required by applicable law or agreed to in writing, software
192
+ * distributed under the License is distributed on an "AS IS" basis,
193
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
194
+ * See the License for the specific language governing permissions and
195
+ * limitations under the License.
196
+ */
197
+ class WidgetLayoutService {
198
+ get muuri$() {
199
+ return this._muuriSubject$.pipe(filter(muuri => !!muuri));
200
+ }
201
+ get muuriSubject$() {
202
+ return this._muuriSubject$.asObservable();
203
+ }
204
+ get widgetContainerWidth$() {
205
+ return this._widgetContainerWidth$.asObservable().pipe(filter(width => !!width));
206
+ }
207
+ get amountOfColumns$() {
208
+ return this.widgetContainerWidth$.pipe(map(containerWidth => Math.floor(containerWidth / WIDGET_1X_MIN_WIDTH)));
209
+ }
210
+ constructor() {
211
+ this._widgetContainerWidth$ = new BehaviorSubject(null);
212
+ this._widgetConfigurations$ = new BehaviorSubject([]);
213
+ this._muuriSubject$ = new BehaviorSubject(null);
214
+ this._triggerMuuriLayout$ = new Subject();
215
+ this._subscriptions = new Subscription();
216
+ this.openMuuriSubscription();
217
+ }
218
+ setWidgetContainerWidth(width) {
219
+ this._widgetContainerWidth$.next(width);
220
+ }
221
+ setWidgetConfigurations(configurations) {
222
+ this._widgetConfigurations$.next(configurations);
223
+ }
224
+ setMuuri(muuri) {
225
+ this._muuriSubject$.next(muuri);
226
+ }
227
+ triggerMuuriLayout() {
228
+ this._triggerMuuriLayout$.next(null);
229
+ }
230
+ openMuuriSubscription() {
231
+ this._subscriptions.add(combineLatest([this.muuri$, this._triggerMuuriLayout$])
232
+ .pipe(debounceTime(150))
233
+ .subscribe(([muuri]) => {
234
+ muuri.refreshItems();
235
+ muuri.layout();
236
+ }));
237
+ }
238
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WidgetLayoutService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
239
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WidgetLayoutService }); }
240
+ }
241
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WidgetLayoutService, decorators: [{
242
+ type: Injectable
243
+ }], ctorParameters: () => [] });
244
+
245
+ /*
246
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
247
+ *
248
+ * Licensed under EUPL, Version 1.2 (the "License");
249
+ * you may not use this file except in compliance with the License.
250
+ * You may obtain a copy of the License at
251
+ *
252
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
253
+ *
254
+ * Unless required by applicable law or agreed to in writing, software
255
+ * distributed under the License is distributed on an "AS IS" basis,
256
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
257
+ * See the License for the specific language governing permissions and
258
+ * limitations under the License.
259
+ */
260
+ class DashboardService {
261
+ constructor(http, configService) {
262
+ this.http = http;
263
+ this.configService = configService;
264
+ this._endpointUri = this.configService.config.valtimoApi.endpointUri;
265
+ }
266
+ getDashboards() {
267
+ return this.http.get(`${this._endpointUri}v1/dashboard`);
268
+ }
269
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DashboardService, deps: [{ token: i1$2.HttpClient }, { token: i2$1.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
270
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DashboardService, providedIn: 'root' }); }
271
+ }
272
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DashboardService, decorators: [{
273
+ type: Injectable,
274
+ args: [{
275
+ providedIn: 'root',
276
+ }]
277
+ }], ctorParameters: () => [{ type: i1$2.HttpClient }, { type: i2$1.ConfigService }] });
278
+
279
+ /*
280
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
281
+ *
282
+ * Licensed under EUPL, Version 1.2 (the "License");
283
+ * you may not use this file except in compliance with the License.
284
+ * You may obtain a copy of the License at
285
+ *
286
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
287
+ *
288
+ * Unless required by applicable law or agreed to in writing, software
289
+ * distributed under the License is distributed on an "AS IS" basis,
290
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
291
+ * See the License for the specific language governing permissions and
292
+ * limitations under the License.
293
+ */
294
+ class WidgetService {
295
+ get supportedDisplayTypes$() {
296
+ return this._supportedDisplayTypes$.pipe(filter(specifications => !!specifications));
297
+ }
298
+ get supportedDataSources$() {
299
+ return this._supportedDataSources$.pipe(filter(specifications => !!specifications));
300
+ }
301
+ get supportedDisplayTypes() {
302
+ return this._supportedDisplayTypes$.getValue() || [];
303
+ }
304
+ get supportedDataSources() {
305
+ return this._supportedDataSources$.getValue() || [];
306
+ }
307
+ constructor(supportedDisplayTypesFromToken, supportedDataSourcesFromToken) {
308
+ this.supportedDisplayTypesFromToken = supportedDisplayTypesFromToken;
309
+ this.supportedDataSourcesFromToken = supportedDataSourcesFromToken;
310
+ this._supportedDisplayTypes$ = new BehaviorSubject(null);
311
+ this._supportedDataSources$ = new BehaviorSubject(null);
312
+ this.setSupportedDisplayTypes(supportedDisplayTypesFromToken);
313
+ this.setSupportedDataSources(supportedDataSourcesFromToken);
314
+ }
315
+ setSupportedDisplayTypes(supportedDisplayTypes) {
316
+ this._supportedDisplayTypes$.next(supportedDisplayTypes.filter(displayType => !!displayType));
317
+ }
318
+ setSupportedDataSources(supportedDataSources) {
319
+ this._supportedDataSources$.next(supportedDataSources.filter(dataSource => !!dataSource));
320
+ }
321
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WidgetService, deps: [{ token: DISPLAY_TYPE_TOKEN }, { token: DATA_SOURCE_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable }); }
322
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WidgetService, providedIn: 'root' }); }
323
+ }
324
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WidgetService, decorators: [{
325
+ type: Injectable,
326
+ args: [{
327
+ providedIn: 'root',
328
+ }]
329
+ }], ctorParameters: () => [{ type: Array, decorators: [{
330
+ type: Inject,
331
+ args: [DISPLAY_TYPE_TOKEN]
332
+ }] }, { type: Array, decorators: [{
333
+ type: Inject,
334
+ args: [DATA_SOURCE_TOKEN]
335
+ }] }] });
336
+
337
+ /*
338
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
339
+ *
340
+ * Licensed under EUPL, Version 1.2 (the "License");
341
+ * you may not use this file except in compliance with the License.
342
+ * You may obtain a copy of the License at
343
+ *
344
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
345
+ *
346
+ * Unless required by applicable law or agreed to in writing, software
347
+ * distributed under the License is distributed on an "AS IS" basis,
348
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
349
+ * See the License for the specific language governing permissions and
350
+ * limitations under the License.
351
+ */
352
+ class WidgetTranslationService {
353
+ constructor(translateService, widgetService) {
354
+ this.translateService = translateService;
355
+ this.widgetService = widgetService;
356
+ }
357
+ translate(translateKey, key) {
358
+ return combineLatest([
359
+ this.widgetService.supportedDisplayTypes$,
360
+ this.widgetService.supportedDataSources$,
361
+ this.translateService.stream('key'),
362
+ ]).pipe(map$1(([supportedDisplayTypes, supportedDataSources]) => this.getTranslation(supportedDisplayTypes, supportedDataSources, key, translateKey)));
363
+ }
364
+ instant(translateKey, displayTypeKey) {
365
+ return this.getTranslation(this.widgetService.supportedDisplayTypes, this.widgetService.supportedDataSources, displayTypeKey, translateKey);
366
+ }
367
+ getTranslation(supportedDisplayTypes, supportedDataSources, key, translateKey) {
368
+ const currentLang = this.translateService.currentLang;
369
+ const displayTypeSpecification = supportedDisplayTypes.find(displayType => displayType.displayTypeKey === key);
370
+ const dataSourceSpecification = supportedDataSources.find(datasource => datasource.dataSourceKey === key);
371
+ let translation = '';
372
+ if (displayTypeSpecification &&
373
+ displayTypeSpecification.translations.hasOwnProperty(currentLang)) {
374
+ translation = displayTypeSpecification.translations[currentLang][translateKey];
375
+ }
376
+ else if (dataSourceSpecification &&
377
+ dataSourceSpecification.translations.hasOwnProperty(currentLang)) {
378
+ translation = dataSourceSpecification.translations[currentLang][translateKey];
379
+ }
380
+ return translation || `${key}.${translateKey}`;
381
+ }
382
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WidgetTranslationService, deps: [{ token: i3$1.TranslateService }, { token: WidgetService }], target: i0.ɵɵFactoryTarget.Injectable }); }
383
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WidgetTranslationService, providedIn: 'root' }); }
384
+ }
385
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WidgetTranslationService, decorators: [{
386
+ type: Injectable,
387
+ args: [{
388
+ providedIn: 'root',
389
+ }]
390
+ }], ctorParameters: () => [{ type: i3$1.TranslateService }, { type: WidgetService }] });
391
+
392
+ /*
393
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
394
+ *
395
+ * Licensed under EUPL, Version 1.2 (the "License");
396
+ * you may not use this file except in compliance with the License.
397
+ * You may obtain a copy of the License at
398
+ *
399
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
400
+ *
401
+ * Unless required by applicable law or agreed to in writing, software
402
+ * distributed under the License is distributed on an "AS IS" basis,
403
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
404
+ * See the License for the specific language governing permissions and
405
+ * limitations under the License.
406
+ */
407
+
408
+ /*
409
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
410
+ *
411
+ * Licensed under EUPL, Version 1.2 (the "License");
412
+ * you may not use this file except in compliance with the License.
413
+ * You may obtain a copy of the License at
414
+ *
415
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
416
+ *
417
+ * Unless required by applicable law or agreed to in writing, software
418
+ * distributed under the License is distributed on an "AS IS" basis,
419
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
420
+ * See the License for the specific language governing permissions and
421
+ * limitations under the License.
422
+ */
423
+ class WidgetDashboardContentComponent {
424
+ set widgetData(value) {
425
+ this._isLoading$.next(value.loading);
426
+ this._widgetData$.next(value.data);
427
+ }
428
+ set dashboard(value) {
429
+ this.setWidgetConfigurations(value);
430
+ }
431
+ get _muuriInitialized$() {
432
+ return this._muuri$.pipe(map$1(muuri => !!muuri));
433
+ }
434
+ constructor(layoutService, widgetService, renderer, router) {
435
+ this.layoutService = layoutService;
436
+ this.widgetService = widgetService;
437
+ this.renderer = renderer;
438
+ this.router = router;
439
+ this._isLoading$ = new BehaviorSubject(true);
440
+ this._widgetData$ = new BehaviorSubject([]);
441
+ this.widgetConfigurations$ = new BehaviorSubject(null);
442
+ this._subscriptions = new Subscription();
443
+ this._muuri$ = this.layoutService.muuriSubject$;
444
+ this._creatingMuuri = false;
445
+ this._noResults$ = new BehaviorSubject(false);
446
+ this.loaded$ = combineLatest([
447
+ this._isLoading$,
448
+ this._muuriInitialized$,
449
+ this._noResults$,
450
+ ]).pipe(map$1(([isLoading, muuriInitialized, noResults]) => !isLoading && (muuriInitialized || noResults)), delay(400));
451
+ }
452
+ ngAfterViewInit() {
453
+ this._observer = new ResizeObserver(event => {
454
+ this.observerMutation(event);
455
+ });
456
+ this._observer.observe(this._widgetContainerRef.nativeElement);
457
+ this.openWidgetSizeSubscription();
458
+ this.renderWidgets();
459
+ }
460
+ ngOnDestroy() {
461
+ this._observer?.disconnect();
462
+ this._subscriptions?.unsubscribe();
463
+ }
464
+ navigateToRoute(widgetConfiguration, event) {
465
+ if (widgetConfiguration.url) {
466
+ event.preventDefault();
467
+ this.router.navigateByUrl(widgetConfiguration.url);
468
+ }
469
+ }
470
+ setWidgetConfigurations(dashboard) {
471
+ this.widgetService.supportedDisplayTypes$.pipe(take(1)).subscribe(supportedDisplayTypes => {
472
+ const supportedWidgetConfigurations = dashboard.widgets?.filter(widgetConfiguration => supportedDisplayTypes.find(type => type.displayTypeKey === widgetConfiguration.displayType)) || [];
473
+ this.layoutService.setWidgetConfigurations(supportedWidgetConfigurations);
474
+ this.widgetConfigurations$.next(supportedWidgetConfigurations);
475
+ });
476
+ }
477
+ observerMutation(event) {
478
+ const widgetContainerWidth = event[0]?.borderBoxSize[0]?.inlineSize;
479
+ if (typeof widgetContainerWidth === 'number' && widgetContainerWidth !== 0) {
480
+ this.layoutService.setWidgetContainerWidth(widgetContainerWidth);
481
+ }
482
+ }
483
+ openWidgetSizeSubscription() {
484
+ this._subscriptions.add(combineLatest([
485
+ this.layoutService.amountOfColumns$,
486
+ this.widgetConfigurations$,
487
+ this.widgetService.supportedDisplayTypes$,
488
+ this._muuri$,
489
+ ]).subscribe(([amountOfColumns, widgetConfigurations, supportedDisplayTypes, muuri]) => {
490
+ this._widgetConfigurationRefs.toArray().forEach(widgetConfigurationRef => {
491
+ const nativeElement = widgetConfigurationRef.nativeElement;
492
+ const widgetConfiguration = widgetConfigurations.find(config => config.key === nativeElement.id);
493
+ const specification = supportedDisplayTypes.find(type => type.displayTypeKey === widgetConfiguration.displayType);
494
+ const widthPercentage = specification.width > amountOfColumns
495
+ ? 100
496
+ : (specification.width / amountOfColumns) * 100;
497
+ this.renderer.setStyle(nativeElement, 'height', `${WIDGET_1X_HEIGHT * specification.height}px`);
498
+ this.renderer.setStyle(nativeElement, 'width', `${widthPercentage}%`);
499
+ });
500
+ if (widgetConfigurations.length > 0) {
501
+ if (!muuri) {
502
+ this.initMuuri();
503
+ }
504
+ else {
505
+ this.layoutService.triggerMuuriLayout();
506
+ }
507
+ }
508
+ else {
509
+ this._noResults$.next(true);
510
+ }
511
+ }));
512
+ }
513
+ renderWidgets() {
514
+ this._subscriptions.add(combineLatest([
515
+ this.widgetConfigurations$,
516
+ this.widgetService.supportedDisplayTypes$,
517
+ this._widgetData$,
518
+ ]).subscribe(([configurations, displayTypes, data]) => {
519
+ configurations?.forEach((configuration, index) => {
520
+ const displayType = displayTypes.find(type => type.displayTypeKey === configuration.displayType);
521
+ const vcRef = this._widgetConfigurationContentVcRefs.toArray()[index];
522
+ if (displayType && data) {
523
+ vcRef.clear();
524
+ const componentInstance = vcRef.createComponent(displayType.displayComponent);
525
+ componentInstance.setInput('displayTypeKey', configuration.displayType);
526
+ componentInstance.setInput('displayTypeProperties', {
527
+ ...configuration.displayTypeProperties,
528
+ });
529
+ componentInstance.setInput('data', data.find(dataItem => dataItem.key === configuration.key)?.data);
530
+ }
531
+ });
532
+ }));
533
+ }
534
+ initMuuri() {
535
+ if (!this._widgetContainerRef || this._creatingMuuri)
536
+ return;
537
+ this._creatingMuuri = true;
538
+ this.layoutService.setMuuri(new Muuri(this._widgetContainerRef.nativeElement, {
539
+ layout: {
540
+ fillGaps: true,
541
+ },
542
+ layoutOnResize: false,
543
+ }));
544
+ this._creatingMuuri = false;
545
+ }
546
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WidgetDashboardContentComponent, deps: [{ token: WidgetLayoutService }, { token: WidgetService }, { token: i0.Renderer2 }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Component }); }
547
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: WidgetDashboardContentComponent, isStandalone: false, selector: "valtimo-widget-dashboard-content", inputs: { widgetData: "widgetData", dashboard: "dashboard" }, providers: [WidgetLayoutService], viewQueries: [{ propertyName: "_widgetContainerRef", first: true, predicate: ["widgetContainer"], descendants: true }, { propertyName: "_widgetConfigurationRefs", predicate: ["widgetConfiguration"], descendants: true }, { propertyName: "_widgetConfigurationContentVcRefs", predicate: ["widgetConfigurationContent"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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<ng-container *ngIf=\"{loaded: loaded$ | async} as obs\">\n <div *ngIf=\"!obs.loaded\" class=\"loading-container\">\n <cds-loading></cds-loading>\n </div>\n</ng-container>\n\n<div\n #widgetContainer\n class=\"widget-container\"\n [ngClass]=\"{'widget-container__visible': loaded$ | async}\"\n>\n <ng-container *ngIf=\"widgetConfigurations$ | async as widgetConfigurations\">\n <ng-container *ngFor=\"let config of widgetConfigurations\">\n <div #widgetConfiguration [id]=\"config.key\" class=\"widget-configuration\">\n <div\n (click)=\"navigateToRoute(config, $event)\"\n [ngClass]=\"{\n 'widget-configuration-content-clickable': config.url,\n }\"\n class=\"widget-configuration-content\"\n >\n <ng-container #widgetConfigurationContent></ng-container>\n </div>\n </div>\n </ng-container>\n\n <valtimo-no-results\n *ngIf=\"!widgetConfigurations.length\"\n [title]=\"'dashboard.noWidgets' | translate\"\n [description]=\"'dashboard.noWidgetsDescription' | translate\"\n illustration=\"valtimo-layout/img/no-widgets.svg\"\n ></valtimo-no-results>\n </ng-container>\n</div>\n", styles: [":host{position:relative}.widget-container{margin-top:16px;width:calc(100% + 16px);margin-left:-8px;position:relative;visibility:hidden}.widget-container__visible{visibility:visible}.widget-configuration{position:absolute;display:flex;justify-content:center;align-items:center}.widget-configuration-content{width:calc(100% - 16px);height:calc(100% - 16px);background-color:#fff}.widget-configuration-content-clickable{cursor:pointer}.loading-container{padding-top:32px;position:absolute;top:0;display:flex;width:100%;justify-content:center}\n/*!\n * Copyright 2015-2025 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.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { 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" }] }); }
548
+ }
549
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WidgetDashboardContentComponent, decorators: [{
550
+ type: Component,
551
+ args: [{ standalone: false, selector: 'valtimo-widget-dashboard-content', providers: [WidgetLayoutService], template: "<!--\n ~ Copyright 2015-2025 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<ng-container *ngIf=\"{loaded: loaded$ | async} as obs\">\n <div *ngIf=\"!obs.loaded\" class=\"loading-container\">\n <cds-loading></cds-loading>\n </div>\n</ng-container>\n\n<div\n #widgetContainer\n class=\"widget-container\"\n [ngClass]=\"{'widget-container__visible': loaded$ | async}\"\n>\n <ng-container *ngIf=\"widgetConfigurations$ | async as widgetConfigurations\">\n <ng-container *ngFor=\"let config of widgetConfigurations\">\n <div #widgetConfiguration [id]=\"config.key\" class=\"widget-configuration\">\n <div\n (click)=\"navigateToRoute(config, $event)\"\n [ngClass]=\"{\n 'widget-configuration-content-clickable': config.url,\n }\"\n class=\"widget-configuration-content\"\n >\n <ng-container #widgetConfigurationContent></ng-container>\n </div>\n </div>\n </ng-container>\n\n <valtimo-no-results\n *ngIf=\"!widgetConfigurations.length\"\n [title]=\"'dashboard.noWidgets' | translate\"\n [description]=\"'dashboard.noWidgetsDescription' | translate\"\n illustration=\"valtimo-layout/img/no-widgets.svg\"\n ></valtimo-no-results>\n </ng-container>\n</div>\n", styles: [":host{position:relative}.widget-container{margin-top:16px;width:calc(100% + 16px);margin-left:-8px;position:relative;visibility:hidden}.widget-container__visible{visibility:visible}.widget-configuration{position:absolute;display:flex;justify-content:center;align-items:center}.widget-configuration-content{width:calc(100% - 16px);height:calc(100% - 16px);background-color:#fff}.widget-configuration-content-clickable{cursor:pointer}.loading-container{padding-top:32px;position:absolute;top:0;display:flex;width:100%;justify-content:center}\n/*!\n * Copyright 2015-2025 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"] }]
552
+ }], ctorParameters: () => [{ type: WidgetLayoutService }, { type: WidgetService }, { type: i0.Renderer2 }, { type: i2.Router }], propDecorators: { _widgetConfigurationRefs: [{
553
+ type: ViewChildren,
554
+ args: ['widgetConfiguration']
555
+ }], _widgetConfigurationContentVcRefs: [{
556
+ type: ViewChildren,
557
+ args: ['widgetConfigurationContent', { read: ViewContainerRef }]
558
+ }], _widgetContainerRef: [{
559
+ type: ViewChild,
560
+ args: ['widgetContainer']
561
+ }], widgetData: [{
562
+ type: Input
563
+ }], dashboard: [{
564
+ type: Input
565
+ }] } });
566
+
567
+ /*
568
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
569
+ *
570
+ * Licensed under EUPL, Version 1.2 (the "License");
571
+ * you may not use this file except in compliance with the License.
572
+ * You may obtain a copy of the License at
573
+ *
574
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
575
+ *
576
+ * Unless required by applicable law or agreed to in writing, software
577
+ * distributed under the License is distributed on an "AS IS" basis,
578
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
579
+ * See the License for the specific language governing permissions and
580
+ * limitations under the License.
581
+ */
582
+ class WidgetApiService {
583
+ constructor(configService, http) {
584
+ this.configService = configService;
585
+ this.http = http;
586
+ this._endpointUri = `${this.configService.config.valtimoApi.endpointUri}v1/dashboard`;
587
+ }
588
+ getWidgetData(dashboardKey) {
589
+ return this.http.get(`${this._endpointUri}/${dashboardKey}/data`);
590
+ }
591
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WidgetApiService, deps: [{ token: i2$1.ConfigService }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
592
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WidgetApiService, providedIn: 'root' }); }
593
+ }
594
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WidgetApiService, decorators: [{
595
+ type: Injectable,
596
+ args: [{
597
+ providedIn: 'root',
598
+ }]
599
+ }], ctorParameters: () => [{ type: i2$1.ConfigService }, { type: i1$2.HttpClient }] });
600
+
601
+ /*
602
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
603
+ *
604
+ * Licensed under EUPL, Version 1.2 (the "License");
605
+ * you may not use this file except in compliance with the License.
606
+ * You may obtain a copy of the License at
607
+ *
608
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
609
+ *
610
+ * Unless required by applicable law or agreed to in writing, software
611
+ * distributed under the License is distributed on an "AS IS" basis,
612
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
613
+ * See the License for the specific language governing permissions and
614
+ * limitations under the License.
615
+ */
616
+ class WidgetDashboardComponent {
617
+ constructor(dashboardService, widgetApiService) {
618
+ this.dashboardService = dashboardService;
619
+ this.widgetApiService = widgetApiService;
620
+ this.dashboards$ = this.dashboardService.getDashboards().pipe(tap(dashboards => {
621
+ if (dashboards.length === 1) {
622
+ this.onTabSelected(dashboards[0].key);
623
+ }
624
+ }));
625
+ this.activeWidgetData$ = new BehaviorSubject({
626
+ data: [],
627
+ loading: true,
628
+ });
629
+ this.selectedDashboardKey$ = new BehaviorSubject('');
630
+ }
631
+ onTabSelected(dashboardKey) {
632
+ this.selectedDashboardKey$.next(dashboardKey);
633
+ this.activeWidgetData$.next({ data: [], loading: true });
634
+ this.widgetApiService
635
+ .getWidgetData(dashboardKey)
636
+ .subscribe((data) => this.activeWidgetData$.next({ data, loading: false }));
637
+ }
638
+ trackByIndex(index) {
639
+ return index;
640
+ }
641
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WidgetDashboardComponent, deps: [{ token: DashboardService }, { token: WidgetApiService }], target: i0.ɵɵFactoryTarget.Component }); }
642
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: WidgetDashboardComponent, isStandalone: false, selector: "valtimo-widget-dashboard", ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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-2025 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.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.Tabs, selector: "cds-tabs, ibm-tabs", inputs: ["position", "cacheActive", "followFocus", "isNavigation", "ariaLabel", "ariaLabelledby", "type", "theme", "skeleton"] }, { kind: "component", type: i4.Tab, selector: "cds-tab, ibm-tab", inputs: ["heading", "title", "context", "active", "disabled", "tabIndex", "id", "cacheActive", "tabContent", "templateContext"], outputs: ["selected"] }, { kind: "component", type: i1$1.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "component", type: WidgetDashboardContentComponent, selector: "valtimo-widget-dashboard-content", inputs: ["widgetData", "dashboard"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
643
+ }
644
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WidgetDashboardComponent, decorators: [{
645
+ type: Component,
646
+ args: [{ standalone: false, selector: 'valtimo-widget-dashboard', encapsulation: ViewEncapsulation.None, template: "<!--\n ~ Copyright 2015-2025 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-2025 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"] }]
647
+ }], ctorParameters: () => [{ type: DashboardService }, { type: WidgetApiService }] });
648
+
649
+ /*
650
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
651
+ *
652
+ * Licensed under EUPL, Version 1.2 (the "License");
653
+ * you may not use this file except in compliance with the License.
654
+ * You may obtain a copy of the License at
655
+ *
656
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
657
+ *
658
+ * Unless required by applicable law or agreed to in writing, software
659
+ * distributed under the License is distributed on an "AS IS" basis,
660
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
661
+ * See the License for the specific language governing permissions and
662
+ * limitations under the License.
663
+ */
664
+ class WidgetTranslatePipe {
665
+ constructor(widgetTranslationService) {
666
+ this.widgetTranslationService = widgetTranslationService;
667
+ }
668
+ transform(translateKey, key) {
669
+ return this.widgetTranslationService.translate(translateKey, key);
670
+ }
671
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WidgetTranslatePipe, deps: [{ token: WidgetTranslationService }], target: i0.ɵɵFactoryTarget.Pipe }); }
672
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: WidgetTranslatePipe, isStandalone: false, name: "widgetTranslate" }); }
673
+ }
674
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WidgetTranslatePipe, decorators: [{
675
+ type: Pipe,
676
+ args: [{
677
+ standalone: false,
678
+ name: 'widgetTranslate',
679
+ }]
680
+ }], ctorParameters: () => [{ type: WidgetTranslationService }] });
681
+
682
+ /*
683
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
684
+ *
685
+ * Licensed under EUPL, Version 1.2 (the "License");
686
+ * you may not use this file except in compliance with the License.
687
+ * You may obtain a copy of the License at
688
+ *
689
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
690
+ *
691
+ * Unless required by applicable law or agreed to in writing, software
692
+ * distributed under the License is distributed on an "AS IS" basis,
693
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
694
+ * See the License for the specific language governing permissions and
695
+ * limitations under the License.
696
+ */
697
+ class BarChartConfigurationComponent {
698
+ set disabled(disabledValue) {
699
+ if (disabledValue) {
700
+ this.form.disable();
701
+ }
702
+ else {
703
+ this.form.enable();
704
+ }
705
+ }
706
+ get title() {
707
+ return this.form.get('title');
708
+ }
709
+ get subtitle() {
710
+ return this.form.get('subtitle');
711
+ }
712
+ set prefillConfiguration(configurationValue) {
713
+ if (configurationValue) {
714
+ this.title.setValue(configurationValue.title || '');
715
+ this.subtitle.setValue(configurationValue.subtitle || '');
716
+ }
717
+ }
718
+ constructor(fb) {
719
+ this.fb = fb;
720
+ this.form = this.fb.group({
721
+ title: this.fb.control('', [Validators.required]),
722
+ subtitle: this.fb.control(''),
723
+ });
724
+ this.configurationEvent = new EventEmitter();
725
+ this._subscriptions = new Subscription();
726
+ }
727
+ ngOnInit() {
728
+ this.openFormSubscription();
729
+ }
730
+ ngOnDestroy() {
731
+ this._subscriptions.unsubscribe();
732
+ }
733
+ openFormSubscription() {
734
+ this._subscriptions.add(this.form.valueChanges.pipe(startWith(this.form.value)).subscribe(formValue => {
735
+ this.configurationEvent.emit({
736
+ valid: this.form.valid,
737
+ data: formValue,
738
+ });
739
+ }));
740
+ }
741
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BarChartConfigurationComponent, deps: [{ token: i1$3.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
742
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: BarChartConfigurationComponent, isStandalone: false, selector: "ng-component", inputs: { displayTypeKey: "displayTypeKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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: i4.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i4.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 }); }
743
+ }
744
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BarChartConfigurationComponent, decorators: [{
745
+ type: Component,
746
+ args: [{ standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2025 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" }]
747
+ }], ctorParameters: () => [{ type: i1$3.FormBuilder }], propDecorators: { displayTypeKey: [{
748
+ type: Input
749
+ }], disabled: [{
750
+ type: Input
751
+ }], prefillConfiguration: [{
752
+ type: Input
753
+ }], configurationEvent: [{
754
+ type: Output
755
+ }] } });
756
+
757
+ /*
758
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
759
+ *
760
+ * Licensed under EUPL, Version 1.2 (the "License");
761
+ * you may not use this file except in compliance with the License.
762
+ * You may obtain a copy of the License at
763
+ *
764
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
765
+ *
766
+ * Unless required by applicable law or agreed to in writing, software
767
+ * distributed under the License is distributed on an "AS IS" basis,
768
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
769
+ * See the License for the specific language governing permissions and
770
+ * limitations under the License.
771
+ */
772
+
773
+ /*
774
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
775
+ *
776
+ * Licensed under EUPL, Version 1.2 (the "License");
777
+ * you may not use this file except in compliance with the License.
778
+ * You may obtain a copy of the License at
779
+ *
780
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
781
+ *
782
+ * Unless required by applicable law or agreed to in writing, software
783
+ * distributed under the License is distributed on an "AS IS" basis,
784
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
785
+ * See the License for the specific language governing permissions and
786
+ * limitations under the License.
787
+ */
788
+ class BarChartDisplayComponent {
789
+ set data(value) {
790
+ if (!value)
791
+ return;
792
+ this._data$.next(value);
793
+ }
794
+ constructor(themeService) {
795
+ this.themeService = themeService;
796
+ this._data$ = new BehaviorSubject(null);
797
+ this.barChartData$ = this._data$.pipe(filter(data => !!data), map(data => data?.values.map(dataValue => ({
798
+ group: dataValue.label,
799
+ value: dataValue.value,
800
+ })) || []));
801
+ this.barChartChartOptions$ = this.themeService.currentTheme$.pipe(map(currentTheme => ({
802
+ title: 'Vertical simple bar (discrete)',
803
+ theme: currentTheme,
804
+ height: '400px',
805
+ axes: {
806
+ left: {
807
+ mapsTo: 'value',
808
+ },
809
+ bottom: {
810
+ mapsTo: 'group',
811
+ scaleType: ScaleTypes.LABELS,
812
+ },
813
+ },
814
+ })));
815
+ }
816
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BarChartDisplayComponent, deps: [{ token: i1$1.CdsThemeService }], target: i0.ɵɵFactoryTarget.Component }); }
817
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: BarChartDisplayComponent, isStandalone: false, selector: "valtimo-bar-chart-display", inputs: { displayTypeKey: "displayTypeKey", data: "data", displayTypeProperties: "displayTypeProperties" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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]=\"'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-2025 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 }); }
818
+ }
819
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BarChartDisplayComponent, decorators: [{
820
+ type: Component,
821
+ args: [{ standalone: false, selector: 'valtimo-bar-chart-display', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2025 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]=\"'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-2025 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"] }]
822
+ }], ctorParameters: () => [{ type: i1$1.CdsThemeService }], propDecorators: { displayTypeKey: [{
823
+ type: Input
824
+ }], data: [{
825
+ type: Input
826
+ }], displayTypeProperties: [{
827
+ type: Input
828
+ }] } });
829
+
830
+ /*
831
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
832
+ *
833
+ * Licensed under EUPL, Version 1.2 (the "License");
834
+ * you may not use this file except in compliance with the License.
835
+ * You may obtain a copy of the License at
836
+ *
837
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
838
+ *
839
+ * Unless required by applicable law or agreed to in writing, software
840
+ * distributed under the License is distributed on an "AS IS" basis,
841
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
842
+ * See the License for the specific language governing permissions and
843
+ * limitations under the License.
844
+ */
845
+
846
+ /*
847
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
848
+ *
849
+ * Licensed under EUPL, Version 1.2 (the "License");
850
+ * you may not use this file except in compliance with the License.
851
+ * You may obtain a copy of the License at
852
+ *
853
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
854
+ *
855
+ * Unless required by applicable law or agreed to in writing, software
856
+ * distributed under the License is distributed on an "AS IS" basis,
857
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
858
+ * See the License for the specific language governing permissions and
859
+ * limitations under the License.
860
+ */
861
+
862
+ /*
863
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
864
+ *
865
+ * Licensed under EUPL, Version 1.2 (the "License");
866
+ * you may not use this file except in compliance with the License.
867
+ * You may obtain a copy of the License at
868
+ *
869
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
870
+ *
871
+ * Unless required by applicable law or agreed to in writing, software
872
+ * distributed under the License is distributed on an "AS IS" basis,
873
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
874
+ * See the License for the specific language governing permissions and
875
+ * limitations under the License.
876
+ */
877
+ const barChartSpecification = {
878
+ displayTypeKey: 'bar-chart',
879
+ displayComponent: BarChartDisplayComponent,
880
+ configurationComponent: BarChartConfigurationComponent,
881
+ width: 1,
882
+ height: 2,
883
+ translations: {
884
+ nl: {
885
+ title: 'Staafdiagram',
886
+ formTitle: 'Titel (vereist)',
887
+ formTitleHelperText: 'De titel die wordt weergegeven in de widget',
888
+ subtitle: 'Ondertitel',
889
+ subtitleHelperText: 'De ondertitel weergegeven in de widget',
890
+ label: 'Label',
891
+ labelHelperText: 'Het label dat wordt weergegeven in de widget',
892
+ },
893
+ en: {
894
+ title: 'Bar chart',
895
+ formTitle: 'Title (required)',
896
+ formTitleHelperText: 'The title displayed in the widget',
897
+ subtitle: 'Subtitle',
898
+ subtitleHelperText: 'The subtitle displayed in the widget',
899
+ label: 'Label',
900
+ labelHelperText: 'The label displayed in the widget',
901
+ },
902
+ de: {
903
+ title: 'Balkendiagramm',
904
+ formTitle: 'Titel (erforderlich)',
905
+ formTitleHelperText: 'Der im Widget angezeigte Titel',
906
+ subtitle: 'Untertitel',
907
+ subtitleHelperText: 'Der im Widget angezeigte Untertitel',
908
+ label: 'Beschriftung',
909
+ labelHelperText: 'Die im Widget angezeigte Beschriftung',
910
+ },
911
+ },
912
+ requiredDataFeatures: [DATA_FEATURES.NUMBERS],
913
+ };
914
+
915
+ /*
916
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
917
+ *
918
+ * Licensed under EUPL, Version 1.2 (the "License");
919
+ * you may not use this file except in compliance with the License.
920
+ * You may obtain a copy of the License at
921
+ *
922
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
923
+ *
924
+ * Unless required by applicable law or agreed to in writing, software
925
+ * distributed under the License is distributed on an "AS IS" basis,
926
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
927
+ * See the License for the specific language governing permissions and
928
+ * limitations under the License.
929
+ */
930
+ class WidgetTranslatePipeModule {
931
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WidgetTranslatePipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
932
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: WidgetTranslatePipeModule, declarations: [WidgetTranslatePipe], imports: [TranslateModule], exports: [WidgetTranslatePipe] }); }
933
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WidgetTranslatePipeModule, imports: [TranslateModule] }); }
934
+ }
935
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: WidgetTranslatePipeModule, decorators: [{
936
+ type: NgModule,
937
+ args: [{
938
+ imports: [TranslateModule],
939
+ declarations: [WidgetTranslatePipe],
940
+ exports: [WidgetTranslatePipe],
941
+ }]
942
+ }] });
943
+
944
+ /*
945
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
946
+ *
947
+ * Licensed under EUPL, Version 1.2 (the "License");
948
+ * you may not use this file except in compliance with the License.
949
+ * You may obtain a copy of the License at
950
+ *
951
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
952
+ *
953
+ * Unless required by applicable law or agreed to in writing, software
954
+ * distributed under the License is distributed on an "AS IS" basis,
955
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
956
+ * See the License for the specific language governing permissions and
957
+ * limitations under the License.
958
+ */
959
+
960
+ /*
961
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
962
+ *
963
+ * Licensed under EUPL, Version 1.2 (the "License");
964
+ * you may not use this file except in compliance with the License.
965
+ * You may obtain a copy of the License at
966
+ *
967
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
968
+ *
969
+ * Unless required by applicable law or agreed to in writing, software
970
+ * distributed under the License is distributed on an "AS IS" basis,
971
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
972
+ * See the License for the specific language governing permissions and
973
+ * limitations under the License.
974
+ */
975
+
976
+ /*
977
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
978
+ *
979
+ * Licensed under EUPL, Version 1.2 (the "License");
980
+ * you may not use this file except in compliance with the License.
981
+ * You may obtain a copy of the License at
982
+ *
983
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
984
+ *
985
+ * Unless required by applicable law or agreed to in writing, software
986
+ * distributed under the License is distributed on an "AS IS" basis,
987
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
988
+ * See the License for the specific language governing permissions and
989
+ * limitations under the License.
990
+ */
991
+ class BarChartModule {
992
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BarChartModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
993
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: BarChartModule, declarations: [BarChartDisplayComponent, BarChartConfigurationComponent], imports: [CommonModule,
994
+ ReactiveFormsModule,
995
+ WidgetTranslatePipeModule,
996
+ InputModule,
997
+ CheckboxModule,
998
+ CommonModule,
999
+ ChartsModule,
1000
+ CarbonListModule,
1001
+ TranslateModule], exports: [BarChartDisplayComponent] }); }
1002
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BarChartModule, providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: barChartSpecification, multi: true }], imports: [CommonModule,
1003
+ ReactiveFormsModule,
1004
+ WidgetTranslatePipeModule,
1005
+ InputModule,
1006
+ CheckboxModule,
1007
+ CommonModule,
1008
+ ChartsModule,
1009
+ CarbonListModule,
1010
+ TranslateModule] }); }
1011
+ }
1012
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BarChartModule, decorators: [{
1013
+ type: NgModule,
1014
+ args: [{
1015
+ declarations: [BarChartDisplayComponent, BarChartConfigurationComponent],
1016
+ imports: [
1017
+ CommonModule,
1018
+ ReactiveFormsModule,
1019
+ WidgetTranslatePipeModule,
1020
+ InputModule,
1021
+ CheckboxModule,
1022
+ CommonModule,
1023
+ ChartsModule,
1024
+ CarbonListModule,
1025
+ TranslateModule,
1026
+ ],
1027
+ exports: [BarChartDisplayComponent],
1028
+ providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: barChartSpecification, multi: true }],
1029
+ }]
1030
+ }] });
1031
+
1032
+ /*
1033
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1034
+ *
1035
+ * Licensed under EUPL, Version 1.2 (the "License");
1036
+ * you may not use this file except in compliance with the License.
1037
+ * You may obtain a copy of the License at
1038
+ *
1039
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1040
+ *
1041
+ * Unless required by applicable law or agreed to in writing, software
1042
+ * distributed under the License is distributed on an "AS IS" basis,
1043
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1044
+ * See the License for the specific language governing permissions and
1045
+ * limitations under the License.
1046
+ */
1047
+
1048
+ /*
1049
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1050
+ *
1051
+ * Licensed under EUPL, Version 1.2 (the "License");
1052
+ * you may not use this file except in compliance with the License.
1053
+ * You may obtain a copy of the License at
1054
+ *
1055
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1056
+ *
1057
+ * Unless required by applicable law or agreed to in writing, software
1058
+ * distributed under the License is distributed on an "AS IS" basis,
1059
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1060
+ * See the License for the specific language governing permissions and
1061
+ * limitations under the License.
1062
+ */
1063
+
1064
+ /*
1065
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1066
+ *
1067
+ * Licensed under EUPL, Version 1.2 (the "License");
1068
+ * you may not use this file except in compliance with the License.
1069
+ * You may obtain a copy of the License at
1070
+ *
1071
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1072
+ *
1073
+ * Unless required by applicable law or agreed to in writing, software
1074
+ * distributed under the License is distributed on an "AS IS" basis,
1075
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1076
+ * See the License for the specific language governing permissions and
1077
+ * limitations under the License.
1078
+ */
1079
+
1080
+ /*
1081
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1082
+ *
1083
+ * Licensed under EUPL, Version 1.2 (the "License");
1084
+ * you may not use this file except in compliance with the License.
1085
+ * You may obtain a copy of the License at
1086
+ *
1087
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1088
+ *
1089
+ * Unless required by applicable law or agreed to in writing, software
1090
+ * distributed under the License is distributed on an "AS IS" basis,
1091
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1092
+ * See the License for the specific language governing permissions and
1093
+ * limitations under the License.
1094
+ */
1095
+ class BigNumberConfigurationComponent {
1096
+ set disabled(disabledValue) {
1097
+ if (disabledValue) {
1098
+ this.form.disable();
1099
+ }
1100
+ else {
1101
+ this.form.enable();
1102
+ }
1103
+ }
1104
+ get title() {
1105
+ return this.form.get('title');
1106
+ }
1107
+ get subtitle() {
1108
+ return this.form.get('subtitle');
1109
+ }
1110
+ get label() {
1111
+ return this.form.get('label');
1112
+ }
1113
+ get useKPI() {
1114
+ return this.form.get('useKPI');
1115
+ }
1116
+ get lowSeverityThreshold() {
1117
+ return this.form.get('lowSeverityThreshold');
1118
+ }
1119
+ get mediumSeverityThreshold() {
1120
+ return this.form.get('mediumSeverityThreshold');
1121
+ }
1122
+ get highSeverityThreshold() {
1123
+ return this.form.get('highSeverityThreshold');
1124
+ }
1125
+ set prefillConfiguration(configurationValue) {
1126
+ if (configurationValue) {
1127
+ this.title.setValue(configurationValue.title || '');
1128
+ this.subtitle.setValue(configurationValue.subtitle || '');
1129
+ this.label.setValue(configurationValue.label || '');
1130
+ this.useKPI.setValue(configurationValue.useKPI || false);
1131
+ this.lowSeverityThreshold.setValue(configurationValue.lowSeverityThreshold || null);
1132
+ this.mediumSeverityThreshold.setValue(configurationValue.mediumSeverityThreshold || null);
1133
+ this.highSeverityThreshold.setValue(configurationValue.highSeverityThreshold || null);
1134
+ }
1135
+ }
1136
+ constructor(fb) {
1137
+ this.fb = fb;
1138
+ this.form = this.fb.group({
1139
+ title: this.fb.control('', [Validators.required]),
1140
+ subtitle: this.fb.control(''),
1141
+ label: this.fb.control(''),
1142
+ useKPI: this.fb.control(false, [Validators.required]),
1143
+ lowSeverityThreshold: this.fb.control(null),
1144
+ mediumSeverityThreshold: this.fb.control(null),
1145
+ highSeverityThreshold: this.fb.control(null),
1146
+ });
1147
+ this.configurationEvent = new EventEmitter();
1148
+ this._subscriptions = new Subscription();
1149
+ }
1150
+ ngOnInit() {
1151
+ this.openFormSubscription();
1152
+ this.openKPISubscription();
1153
+ }
1154
+ ngOnDestroy() {
1155
+ this._subscriptions.unsubscribe();
1156
+ }
1157
+ openFormSubscription() {
1158
+ this._subscriptions.add(this.form.valueChanges.pipe(startWith(this.form.value)).subscribe(formValue => {
1159
+ this.configurationEvent.emit({ valid: this.form.valid, data: formValue });
1160
+ }));
1161
+ }
1162
+ openKPISubscription() {
1163
+ this._subscriptions.add(this.useKPI.valueChanges.pipe(startWith(this.useKPI.value)).subscribe(useKpi => {
1164
+ const validators = [Validators.required];
1165
+ if (useKpi) {
1166
+ this.lowSeverityThreshold.setValidators(validators);
1167
+ this.mediumSeverityThreshold.setValidators(validators);
1168
+ this.highSeverityThreshold.setValidators(validators);
1169
+ }
1170
+ else {
1171
+ this.lowSeverityThreshold.clearValidators();
1172
+ this.mediumSeverityThreshold.clearValidators();
1173
+ this.highSeverityThreshold.clearValidators();
1174
+ }
1175
+ this.lowSeverityThreshold.updateValueAndValidity();
1176
+ this.mediumSeverityThreshold.updateValueAndValidity();
1177
+ this.highSeverityThreshold.updateValueAndValidity();
1178
+ }));
1179
+ }
1180
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BigNumberConfigurationComponent, deps: [{ token: i1$3.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
1181
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: BigNumberConfigurationComponent, isStandalone: false, selector: "ng-component", inputs: { displayTypeKey: "displayTypeKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<form [formGroup]=\"form\">\n <div class=\"form__element\">\n <cds-label\n [helperText]=\"'formTitleHelperText' | widgetTranslate: displayTypeKey | async\"\n [invalidText]=\"'formTitleHelperText' | widgetTranslate: displayTypeKey | async\"\n [invalid]=\"title.dirty && title.invalid\"\n >\n {{ 'formTitle' | widgetTranslate: displayTypeKey | async }}\n\n <input cdsText formControlName=\"title\" [invalid]=\"title.dirty && title.invalid\" />\n </cds-label>\n </div>\n\n <div class=\"form__element\">\n <cds-label\n [helperText]=\"'subtitleHelperText' | widgetTranslate: displayTypeKey | async\"\n [invalidText]=\"'subtitleHelperText' | widgetTranslate: displayTypeKey | async\"\n [invalid]=\"subtitle.dirty && subtitle.invalid\"\n >\n {{ 'subtitle' | widgetTranslate: displayTypeKey | async }}\n\n <input cdsText formControlName=\"subtitle\" [invalid]=\"subtitle.dirty && subtitle.invalid\" />\n </cds-label>\n </div>\n\n <div class=\"form__element\">\n <cds-label\n [helperText]=\"'labelHelperText' | widgetTranslate: displayTypeKey | async\"\n [invalidText]=\"'labelHelperText' | widgetTranslate: displayTypeKey | async\"\n [invalid]=\"label.dirty && label.invalid\"\n >\n {{ 'label' | widgetTranslate: displayTypeKey | async }}\n\n <input cdsText formControlName=\"label\" [invalid]=\"label.dirty && label.invalid\" />\n </cds-label>\n </div>\n\n <div class=\"form__element\">\n <cds-checkbox formControlName=\"useKPI\">\n {{ 'useKPI' | widgetTranslate: displayTypeKey | async }}\n </cds-checkbox>\n </div>\n\n <div class=\"form__row\" *ngIf=\"useKPI.value\">\n <div class=\"form__element\">\n <cds-label [invalid]=\"lowSeverityThreshold.dirty && lowSeverityThreshold.invalid\">\n {{ 'lowSeverityThreshold' | widgetTranslate: displayTypeKey | async }}\n\n <input\n cdsText\n [invalid]=\"lowSeverityThreshold.dirty && lowSeverityThreshold.invalid\"\n formControlName=\"lowSeverityThreshold\"\n type=\"number\"\n />\n </cds-label>\n </div>\n\n <div class=\"form__spacer\"></div>\n\n <div class=\"form__element\">\n <cds-label [invalid]=\"mediumSeverityThreshold.dirty && mediumSeverityThreshold.invalid\">\n {{ 'mediumSeverityThreshold' | widgetTranslate: displayTypeKey | async }}\n\n <input\n cdsText\n formControlName=\"mediumSeverityThreshold\"\n [invalid]=\"mediumSeverityThreshold.dirty && mediumSeverityThreshold.invalid\"\n type=\"number\"\n />\n </cds-label>\n </div>\n\n <div class=\"form__spacer\"></div>\n\n <div class=\"form__element\">\n <cds-label [invalid]=\"highSeverityThreshold.dirty && highSeverityThreshold.invalid\">\n {{ 'highSeverityThreshold' | widgetTranslate: displayTypeKey | async }}\n\n <input\n cdsText\n formControlName=\"highSeverityThreshold\"\n [invalid]=\"highSeverityThreshold.dirty && highSeverityThreshold.invalid\"\n type=\"number\"\n />\n </cds-label>\n </div>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i4.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "component", type: i4.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 }); }
1182
+ }
1183
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BigNumberConfigurationComponent, decorators: [{
1184
+ type: Component,
1185
+ args: [{ standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2025 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" }]
1186
+ }], ctorParameters: () => [{ type: i1$3.FormBuilder }], propDecorators: { displayTypeKey: [{
1187
+ type: Input
1188
+ }], disabled: [{
1189
+ type: Input
1190
+ }], prefillConfiguration: [{
1191
+ type: Input
1192
+ }], configurationEvent: [{
1193
+ type: Output
1194
+ }] } });
1195
+
1196
+ /*
1197
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1198
+ *
1199
+ * Licensed under EUPL, Version 1.2 (the "License");
1200
+ * you may not use this file except in compliance with the License.
1201
+ * You may obtain a copy of the License at
1202
+ *
1203
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1204
+ *
1205
+ * Unless required by applicable law or agreed to in writing, software
1206
+ * distributed under the License is distributed on an "AS IS" basis,
1207
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1208
+ * See the License for the specific language governing permissions and
1209
+ * limitations under the License.
1210
+ */
1211
+
1212
+ /*
1213
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1214
+ *
1215
+ * Licensed under EUPL, Version 1.2 (the "License");
1216
+ * you may not use this file except in compliance with the License.
1217
+ * You may obtain a copy of the License at
1218
+ *
1219
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1220
+ *
1221
+ * Unless required by applicable law or agreed to in writing, software
1222
+ * distributed under the License is distributed on an "AS IS" basis,
1223
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1224
+ * See the License for the specific language governing permissions and
1225
+ * limitations under the License.
1226
+ */
1227
+
1228
+ /*
1229
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1230
+ *
1231
+ * Licensed under EUPL, Version 1.2 (the "License");
1232
+ * you may not use this file except in compliance with the License.
1233
+ * You may obtain a copy of the License at
1234
+ *
1235
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1236
+ *
1237
+ * Unless required by applicable law or agreed to in writing, software
1238
+ * distributed under the License is distributed on an "AS IS" basis,
1239
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1240
+ * See the License for the specific language governing permissions and
1241
+ * limitations under the License.
1242
+ */
1243
+
1244
+ /*
1245
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1246
+ *
1247
+ * Licensed under EUPL, Version 1.2 (the "License");
1248
+ * you may not use this file except in compliance with the License.
1249
+ * You may obtain a copy of the License at
1250
+ *
1251
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1252
+ *
1253
+ * Unless required by applicable law or agreed to in writing, software
1254
+ * distributed under the License is distributed on an "AS IS" basis,
1255
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1256
+ * See the License for the specific language governing permissions and
1257
+ * limitations under the License.
1258
+ */
1259
+
1260
+ /*
1261
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1262
+ *
1263
+ * Licensed under EUPL, Version 1.2 (the "License");
1264
+ * you may not use this file except in compliance with the License.
1265
+ * You may obtain a copy of the License at
1266
+ *
1267
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1268
+ *
1269
+ * Unless required by applicable law or agreed to in writing, software
1270
+ * distributed under the License is distributed on an "AS IS" basis,
1271
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1272
+ * See the License for the specific language governing permissions and
1273
+ * limitations under the License.
1274
+ */
1275
+
1276
+ /*
1277
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1278
+ *
1279
+ * Licensed under EUPL, Version 1.2 (the "License");
1280
+ * you may not use this file except in compliance with the License.
1281
+ * You may obtain a copy of the License at
1282
+ *
1283
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1284
+ *
1285
+ * Unless required by applicable law or agreed to in writing, software
1286
+ * distributed under the License is distributed on an "AS IS" basis,
1287
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1288
+ * See the License for the specific language governing permissions and
1289
+ * limitations under the License.
1290
+ */
1291
+
1292
+ /*
1293
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1294
+ *
1295
+ * Licensed under EUPL, Version 1.2 (the "License");
1296
+ * you may not use this file except in compliance with the License.
1297
+ * You may obtain a copy of the License at
1298
+ *
1299
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1300
+ *
1301
+ * Unless required by applicable law or agreed to in writing, software
1302
+ * distributed under the License is distributed on an "AS IS" basis,
1303
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1304
+ * See the License for the specific language governing permissions and
1305
+ * limitations under the License.
1306
+ */
1307
+
1308
+ /*
1309
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1310
+ *
1311
+ * Licensed under EUPL, Version 1.2 (the "License");
1312
+ * you may not use this file except in compliance with the License.
1313
+ * You may obtain a copy of the License at
1314
+ *
1315
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1316
+ *
1317
+ * Unless required by applicable law or agreed to in writing, software
1318
+ * distributed under the License is distributed on an "AS IS" basis,
1319
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1320
+ * See the License for the specific language governing permissions and
1321
+ * limitations under the License.
1322
+ */
1323
+ var WidgetSeverity;
1324
+ (function (WidgetSeverity) {
1325
+ WidgetSeverity["BLACK"] = "valtimo-severity__black";
1326
+ WidgetSeverity["GREEN"] = "valtimo-severity__green";
1327
+ WidgetSeverity["YELLOW"] = "valtimo-severity__yellow";
1328
+ WidgetSeverity["ORANGE"] = "valtimo-severity__orange";
1329
+ WidgetSeverity["RED"] = "valtimo-severity__red";
1330
+ })(WidgetSeverity || (WidgetSeverity = {}));
1331
+
1332
+ /*
1333
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1334
+ *
1335
+ * Licensed under EUPL, Version 1.2 (the "License");
1336
+ * you may not use this file except in compliance with the License.
1337
+ * You may obtain a copy of the License at
1338
+ *
1339
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1340
+ *
1341
+ * Unless required by applicable law or agreed to in writing, software
1342
+ * distributed under the License is distributed on an "AS IS" basis,
1343
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1344
+ * See the License for the specific language governing permissions and
1345
+ * limitations under the License.
1346
+ */
1347
+
1348
+ /*
1349
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1350
+ *
1351
+ * Licensed under EUPL, Version 1.2 (the "License");
1352
+ * you may not use this file except in compliance with the License.
1353
+ * You may obtain a copy of the License at
1354
+ *
1355
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1356
+ *
1357
+ * Unless required by applicable law or agreed to in writing, software
1358
+ * distributed under the License is distributed on an "AS IS" basis,
1359
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1360
+ * See the License for the specific language governing permissions and
1361
+ * limitations under the License.
1362
+ */
1363
+ class BigNumberDisplayComponent {
1364
+ get severityClass() {
1365
+ if (!this.displayTypeProperties.useKPI) {
1366
+ return WidgetSeverity.BLACK;
1367
+ }
1368
+ const value = this.data?.value;
1369
+ if (value < this.displayTypeProperties.lowSeverityThreshold) {
1370
+ return WidgetSeverity.GREEN;
1371
+ }
1372
+ else if (value < this.displayTypeProperties.mediumSeverityThreshold) {
1373
+ return WidgetSeverity.YELLOW;
1374
+ }
1375
+ else if (value < this.displayTypeProperties.highSeverityThreshold) {
1376
+ return WidgetSeverity.ORANGE;
1377
+ }
1378
+ return WidgetSeverity.RED;
1379
+ }
1380
+ get numberFontSize() {
1381
+ if (!this.data) {
1382
+ return 122;
1383
+ }
1384
+ return Math.floor(122 / this.data.value.toString().length) + 20;
1385
+ }
1386
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BigNumberDisplayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1387
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: BigNumberDisplayComponent, isStandalone: false, selector: "valtimo-big-number-display", inputs: { displayTypeKey: "displayTypeKey", data: "data", displayTypeProperties: "displayTypeProperties" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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-2025 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 }); }
1388
+ }
1389
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BigNumberDisplayComponent, decorators: [{
1390
+ type: Component,
1391
+ args: [{ standalone: false, selector: 'valtimo-big-number-display', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2025 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-2025 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"] }]
1392
+ }], propDecorators: { displayTypeKey: [{
1393
+ type: Input
1394
+ }], data: [{
1395
+ type: Input
1396
+ }], displayTypeProperties: [{
1397
+ type: Input
1398
+ }] } });
1399
+
1400
+ /*
1401
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1402
+ *
1403
+ * Licensed under EUPL, Version 1.2 (the "License");
1404
+ * you may not use this file except in compliance with the License.
1405
+ * You may obtain a copy of the License at
1406
+ *
1407
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1408
+ *
1409
+ * Unless required by applicable law or agreed to in writing, software
1410
+ * distributed under the License is distributed on an "AS IS" basis,
1411
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1412
+ * See the License for the specific language governing permissions and
1413
+ * limitations under the License.
1414
+ */
1415
+
1416
+ /*
1417
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1418
+ *
1419
+ * Licensed under EUPL, Version 1.2 (the "License");
1420
+ * you may not use this file except in compliance with the License.
1421
+ * You may obtain a copy of the License at
1422
+ *
1423
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1424
+ *
1425
+ * Unless required by applicable law or agreed to in writing, software
1426
+ * distributed under the License is distributed on an "AS IS" basis,
1427
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1428
+ * See the License for the specific language governing permissions and
1429
+ * limitations under the License.
1430
+ */
1431
+
1432
+ /*
1433
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1434
+ *
1435
+ * Licensed under EUPL, Version 1.2 (the "License");
1436
+ * you may not use this file except in compliance with the License.
1437
+ * You may obtain a copy of the License at
1438
+ *
1439
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1440
+ *
1441
+ * Unless required by applicable law or agreed to in writing, software
1442
+ * distributed under the License is distributed on an "AS IS" basis,
1443
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1444
+ * See the License for the specific language governing permissions and
1445
+ * limitations under the License.
1446
+ */
1447
+ const bigNumberSpecification = {
1448
+ displayTypeKey: 'number',
1449
+ displayComponent: BigNumberDisplayComponent,
1450
+ configurationComponent: BigNumberConfigurationComponent,
1451
+ width: 1,
1452
+ height: 1,
1453
+ translations: {
1454
+ nl: {
1455
+ title: 'Groot getal',
1456
+ formTitle: 'Titel (vereist)',
1457
+ formTitleHelperText: 'De titel die wordt weergegeven in de widget',
1458
+ subtitle: 'Ondertitel',
1459
+ subtitleHelperText: 'De ondertitel weergegeven in de widget',
1460
+ label: 'Label',
1461
+ labelHelperText: 'Het label dat wordt weergegeven in de widget',
1462
+ useKPI: 'KPI gebruiken',
1463
+ lowSeverityThreshold: 'Lage ernstdrempel (vereist)',
1464
+ mediumSeverityThreshold: 'Middelmatige ernstdrempel (vereist)',
1465
+ highSeverityThreshold: 'Hoge ernstdrempel (vereist)',
1466
+ },
1467
+ en: {
1468
+ title: 'Big number',
1469
+ formTitle: 'Title (required)',
1470
+ formTitleHelperText: 'The title displayed in the widget',
1471
+ subtitle: 'Subtitle',
1472
+ subtitleHelperText: 'The subtitle displayed in the widget',
1473
+ label: 'Label',
1474
+ labelHelperText: 'The label displayed in the widget',
1475
+ useKPI: 'Use KPI',
1476
+ lowSeverityThreshold: 'Low severity threshold (required)',
1477
+ mediumSeverityThreshold: 'Medium severity threshold (required)',
1478
+ highSeverityThreshold: 'High severity threshold (required)',
1479
+ },
1480
+ de: {
1481
+ title: 'Große Nummer',
1482
+ formTitle: 'Titel (erforderlich)',
1483
+ formTitleHelperText: 'Der im Widget angezeigte Titel',
1484
+ subtitle: 'Untertitel',
1485
+ subtitleHelperText: 'Der im Widget angezeigte Untertitel',
1486
+ label: 'Beschriftung',
1487
+ labelHelperText: 'Die im Widget angezeigte Beschriftung',
1488
+ useKPI: 'Verwenden Sie KPI',
1489
+ lowSeverityThreshold: 'Niedriger Schweregradschwellenwert (erforderlich)',
1490
+ mediumSeverityThreshold: 'Mittlerer Schweregradschwellenwert (erforderlich)',
1491
+ highSeverityThreshold: 'Hoher Schweregradschwellenwert (erforderlich)',
1492
+ },
1493
+ },
1494
+ requiredDataFeatures: [DATA_FEATURES.NUMBER],
1495
+ };
1496
+
1497
+ /*
1498
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1499
+ *
1500
+ * Licensed under EUPL, Version 1.2 (the "License");
1501
+ * you may not use this file except in compliance with the License.
1502
+ * You may obtain a copy of the License at
1503
+ *
1504
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1505
+ *
1506
+ * Unless required by applicable law or agreed to in writing, software
1507
+ * distributed under the License is distributed on an "AS IS" basis,
1508
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1509
+ * See the License for the specific language governing permissions and
1510
+ * limitations under the License.
1511
+ */
1512
+ class BigNumberModule {
1513
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BigNumberModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1514
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: BigNumberModule, declarations: [BigNumberDisplayComponent, BigNumberConfigurationComponent], imports: [CommonModule,
1515
+ ReactiveFormsModule,
1516
+ WidgetTranslatePipeModule,
1517
+ InputModule,
1518
+ CheckboxModule], exports: [BigNumberDisplayComponent] }); }
1519
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BigNumberModule, providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: bigNumberSpecification, multi: true }], imports: [CommonModule,
1520
+ ReactiveFormsModule,
1521
+ WidgetTranslatePipeModule,
1522
+ InputModule,
1523
+ CheckboxModule] }); }
1524
+ }
1525
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BigNumberModule, decorators: [{
1526
+ type: NgModule,
1527
+ args: [{
1528
+ declarations: [BigNumberDisplayComponent, BigNumberConfigurationComponent],
1529
+ imports: [
1530
+ CommonModule,
1531
+ ReactiveFormsModule,
1532
+ WidgetTranslatePipeModule,
1533
+ InputModule,
1534
+ CheckboxModule,
1535
+ ],
1536
+ exports: [BigNumberDisplayComponent],
1537
+ providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: bigNumberSpecification, multi: true }],
1538
+ }]
1539
+ }] });
1540
+
1541
+ /*
1542
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1543
+ *
1544
+ * Licensed under EUPL, Version 1.2 (the "License");
1545
+ * you may not use this file except in compliance with the License.
1546
+ * You may obtain a copy of the License at
1547
+ *
1548
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1549
+ *
1550
+ * Unless required by applicable law or agreed to in writing, software
1551
+ * distributed under the License is distributed on an "AS IS" basis,
1552
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1553
+ * See the License for the specific language governing permissions and
1554
+ * limitations under the License.
1555
+ */
1556
+
1557
+ /*
1558
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1559
+ *
1560
+ * Licensed under EUPL, Version 1.2 (the "License");
1561
+ * you may not use this file except in compliance with the License.
1562
+ * You may obtain a copy of the License at
1563
+ *
1564
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1565
+ *
1566
+ * Unless required by applicable law or agreed to in writing, software
1567
+ * distributed under the License is distributed on an "AS IS" basis,
1568
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1569
+ * See the License for the specific language governing permissions and
1570
+ * limitations under the License.
1571
+ */
1572
+
1573
+ /*
1574
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1575
+ *
1576
+ * Licensed under EUPL, Version 1.2 (the "License");
1577
+ * you may not use this file except in compliance with the License.
1578
+ * You may obtain a copy of the License at
1579
+ *
1580
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1581
+ *
1582
+ * Unless required by applicable law or agreed to in writing, software
1583
+ * distributed under the License is distributed on an "AS IS" basis,
1584
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1585
+ * See the License for the specific language governing permissions and
1586
+ * limitations under the License.
1587
+ */
1588
+
1589
+ /*
1590
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1591
+ *
1592
+ * Licensed under EUPL, Version 1.2 (the "License");
1593
+ * you may not use this file except in compliance with the License.
1594
+ * You may obtain a copy of the License at
1595
+ *
1596
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1597
+ *
1598
+ * Unless required by applicable law or agreed to in writing, software
1599
+ * distributed under the License is distributed on an "AS IS" basis,
1600
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1601
+ * See the License for the specific language governing permissions and
1602
+ * limitations under the License.
1603
+ */
1604
+ class DonutConfigurationComponent {
1605
+ set disabled(disabledValue) {
1606
+ if (disabledValue) {
1607
+ this.form.disable();
1608
+ }
1609
+ else {
1610
+ this.form.enable();
1611
+ }
1612
+ }
1613
+ get title() {
1614
+ return this.form.get('title');
1615
+ }
1616
+ get subtitle() {
1617
+ return this.form.get('subtitle');
1618
+ }
1619
+ get label() {
1620
+ return this.form.get('label');
1621
+ }
1622
+ set prefillConfiguration(configurationValue) {
1623
+ if (configurationValue) {
1624
+ this.title.setValue(configurationValue.title || '');
1625
+ this.subtitle.setValue(configurationValue.subtitle || '');
1626
+ this.label.setValue(configurationValue.label || '');
1627
+ }
1628
+ }
1629
+ constructor(fb) {
1630
+ this.fb = fb;
1631
+ this.form = this.fb.group({
1632
+ title: this.fb.control('', [Validators.required]),
1633
+ subtitle: this.fb.control(''),
1634
+ label: this.fb.control(''),
1635
+ useKPI: this.fb.control(false, [Validators.required]),
1636
+ });
1637
+ this.configurationEvent = new EventEmitter();
1638
+ this._subscriptions = new Subscription();
1639
+ }
1640
+ ngOnInit() {
1641
+ this.openFormSubscription();
1642
+ }
1643
+ ngOnDestroy() {
1644
+ this._subscriptions.unsubscribe();
1645
+ }
1646
+ openFormSubscription() {
1647
+ this._subscriptions.add(this.form.valueChanges.pipe(startWith(this.form.value)).subscribe(formValue => {
1648
+ this.configurationEvent.emit({
1649
+ valid: this.form.valid,
1650
+ data: formValue,
1651
+ });
1652
+ }));
1653
+ }
1654
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DonutConfigurationComponent, deps: [{ token: i1$3.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
1655
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: DonutConfigurationComponent, isStandalone: false, selector: "ng-component", inputs: { displayTypeKey: "displayTypeKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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: i4.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i4.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 }); }
1656
+ }
1657
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DonutConfigurationComponent, decorators: [{
1658
+ type: Component,
1659
+ args: [{ standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2025 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" }]
1660
+ }], ctorParameters: () => [{ type: i1$3.FormBuilder }], propDecorators: { displayTypeKey: [{
1661
+ type: Input
1662
+ }], disabled: [{
1663
+ type: Input
1664
+ }], prefillConfiguration: [{
1665
+ type: Input
1666
+ }], configurationEvent: [{
1667
+ type: Output
1668
+ }] } });
1669
+
1670
+ /*
1671
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1672
+ *
1673
+ * Licensed under EUPL, Version 1.2 (the "License");
1674
+ * you may not use this file except in compliance with the License.
1675
+ * You may obtain a copy of the License at
1676
+ *
1677
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1678
+ *
1679
+ * Unless required by applicable law or agreed to in writing, software
1680
+ * distributed under the License is distributed on an "AS IS" basis,
1681
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1682
+ * See the License for the specific language governing permissions and
1683
+ * limitations under the License.
1684
+ */
1685
+
1686
+ /*
1687
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1688
+ *
1689
+ * Licensed under EUPL, Version 1.2 (the "License");
1690
+ * you may not use this file except in compliance with the License.
1691
+ * You may obtain a copy of the License at
1692
+ *
1693
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1694
+ *
1695
+ * Unless required by applicable law or agreed to in writing, software
1696
+ * distributed under the License is distributed on an "AS IS" basis,
1697
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1698
+ * See the License for the specific language governing permissions and
1699
+ * limitations under the License.
1700
+ */
1701
+ class DonutDisplayComponent {
1702
+ set data(value) {
1703
+ if (!value)
1704
+ return;
1705
+ this._data$.next(value);
1706
+ }
1707
+ constructor(themeService) {
1708
+ this.themeService = themeService;
1709
+ this._data$ = new BehaviorSubject(null);
1710
+ this.donutData$ = this._data$.pipe(filter(data => !!data), map(data => data?.values.map(dataValue => ({
1711
+ group: dataValue.label,
1712
+ value: dataValue.value,
1713
+ })) || []));
1714
+ this.donutChartOptions$ = this.themeService.currentTheme$.pipe(map(currentTheme => ({
1715
+ resizable: true,
1716
+ toolbar: { enabled: false },
1717
+ height: '300px',
1718
+ theme: currentTheme,
1719
+ donut: {
1720
+ alignment: 'center',
1721
+ center: {
1722
+ label: this.displayTypeProperties.label,
1723
+ },
1724
+ },
1725
+ pie: {
1726
+ labels: {
1727
+ enabled: false,
1728
+ },
1729
+ },
1730
+ legend: {
1731
+ truncation: {
1732
+ numCharacter: 28,
1733
+ },
1734
+ },
1735
+ })));
1736
+ }
1737
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DonutDisplayComponent, deps: [{ token: i1$1.CdsThemeService }], target: i0.ɵɵFactoryTarget.Component }); }
1738
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: DonutDisplayComponent, isStandalone: false, selector: "valtimo-donut-display", inputs: { displayTypeKey: "displayTypeKey", data: "data", displayTypeProperties: "displayTypeProperties" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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]=\"'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-2025 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 }); }
1739
+ }
1740
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DonutDisplayComponent, decorators: [{
1741
+ type: Component,
1742
+ args: [{ standalone: false, selector: 'valtimo-donut-display', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2025 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]=\"'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-2025 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"] }]
1743
+ }], ctorParameters: () => [{ type: i1$1.CdsThemeService }], propDecorators: { displayTypeKey: [{
1744
+ type: Input
1745
+ }], data: [{
1746
+ type: Input
1747
+ }], displayTypeProperties: [{
1748
+ type: Input
1749
+ }] } });
1750
+
1751
+ /*
1752
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1753
+ *
1754
+ * Licensed under EUPL, Version 1.2 (the "License");
1755
+ * you may not use this file except in compliance with the License.
1756
+ * You may obtain a copy of the License at
1757
+ *
1758
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1759
+ *
1760
+ * Unless required by applicable law or agreed to in writing, software
1761
+ * distributed under the License is distributed on an "AS IS" basis,
1762
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1763
+ * See the License for the specific language governing permissions and
1764
+ * limitations under the License.
1765
+ */
1766
+
1767
+ /*
1768
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1769
+ *
1770
+ * Licensed under EUPL, Version 1.2 (the "License");
1771
+ * you may not use this file except in compliance with the License.
1772
+ * You may obtain a copy of the License at
1773
+ *
1774
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1775
+ *
1776
+ * Unless required by applicable law or agreed to in writing, software
1777
+ * distributed under the License is distributed on an "AS IS" basis,
1778
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1779
+ * See the License for the specific language governing permissions and
1780
+ * limitations under the License.
1781
+ */
1782
+
1783
+ /*
1784
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1785
+ *
1786
+ * Licensed under EUPL, Version 1.2 (the "License");
1787
+ * you may not use this file except in compliance with the License.
1788
+ * You may obtain a copy of the License at
1789
+ *
1790
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1791
+ *
1792
+ * Unless required by applicable law or agreed to in writing, software
1793
+ * distributed under the License is distributed on an "AS IS" basis,
1794
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1795
+ * See the License for the specific language governing permissions and
1796
+ * limitations under the License.
1797
+ */
1798
+ const donutSpecification = {
1799
+ displayTypeKey: 'donut',
1800
+ displayComponent: DonutDisplayComponent,
1801
+ configurationComponent: DonutConfigurationComponent,
1802
+ width: 1,
1803
+ height: 2,
1804
+ translations: {
1805
+ nl: {
1806
+ title: 'Donut-diagram',
1807
+ formTitle: 'Titel (vereist)',
1808
+ formTitleHelperText: 'De titel die wordt weergegeven in de widget',
1809
+ subtitle: 'Ondertitel',
1810
+ subtitleHelperText: 'De ondertitel weergegeven in de widget',
1811
+ label: 'Label',
1812
+ labelHelperText: 'Het label dat wordt weergegeven in de widget',
1813
+ },
1814
+ en: {
1815
+ title: 'Donut chart',
1816
+ formTitle: 'Title (required)',
1817
+ formTitleHelperText: 'The title displayed in the widget',
1818
+ subtitle: 'Subtitle',
1819
+ subtitleHelperText: 'The subtitle displayed in the widget',
1820
+ label: 'Label',
1821
+ labelHelperText: 'The label displayed in the widget',
1822
+ },
1823
+ de: {
1824
+ title: 'Donut-Diagramm',
1825
+ formTitle: 'Titel (erforderlich)',
1826
+ formTitleHelperText: 'Der im Widget angezeigte Titel',
1827
+ subtitle: 'Untertitel',
1828
+ subtitleHelperText: 'Der im Widget angezeigte Untertitel',
1829
+ label: 'Beschriftung',
1830
+ labelHelperText: 'Die im Widget angezeigte Beschriftung',
1831
+ },
1832
+ },
1833
+ requiredDataFeatures: [DATA_FEATURES.NUMBERS],
1834
+ };
1835
+
1836
+ /*
1837
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1838
+ *
1839
+ * Licensed under EUPL, Version 1.2 (the "License");
1840
+ * you may not use this file except in compliance with the License.
1841
+ * You may obtain a copy of the License at
1842
+ *
1843
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1844
+ *
1845
+ * Unless required by applicable law or agreed to in writing, software
1846
+ * distributed under the License is distributed on an "AS IS" basis,
1847
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1848
+ * See the License for the specific language governing permissions and
1849
+ * limitations under the License.
1850
+ */
1851
+ class DonutModule {
1852
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DonutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1853
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: DonutModule, declarations: [DonutDisplayComponent, DonutConfigurationComponent], imports: [CommonModule,
1854
+ ReactiveFormsModule,
1855
+ WidgetTranslatePipeModule,
1856
+ InputModule,
1857
+ CheckboxModule,
1858
+ CommonModule,
1859
+ ChartsModule,
1860
+ CarbonListModule,
1861
+ TranslateModule], exports: [DonutDisplayComponent] }); }
1862
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DonutModule, providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: donutSpecification, multi: true }], imports: [CommonModule,
1863
+ ReactiveFormsModule,
1864
+ WidgetTranslatePipeModule,
1865
+ InputModule,
1866
+ CheckboxModule,
1867
+ CommonModule,
1868
+ ChartsModule,
1869
+ CarbonListModule,
1870
+ TranslateModule] }); }
1871
+ }
1872
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DonutModule, decorators: [{
1873
+ type: NgModule,
1874
+ args: [{
1875
+ declarations: [DonutDisplayComponent, DonutConfigurationComponent],
1876
+ imports: [
1877
+ CommonModule,
1878
+ ReactiveFormsModule,
1879
+ WidgetTranslatePipeModule,
1880
+ InputModule,
1881
+ CheckboxModule,
1882
+ CommonModule,
1883
+ ChartsModule,
1884
+ CarbonListModule,
1885
+ TranslateModule,
1886
+ ],
1887
+ exports: [DonutDisplayComponent],
1888
+ providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: donutSpecification, multi: true }],
1889
+ }]
1890
+ }] });
1891
+
1892
+ /*
1893
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1894
+ *
1895
+ * Licensed under EUPL, Version 1.2 (the "License");
1896
+ * you may not use this file except in compliance with the License.
1897
+ * You may obtain a copy of the License at
1898
+ *
1899
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1900
+ *
1901
+ * Unless required by applicable law or agreed to in writing, software
1902
+ * distributed under the License is distributed on an "AS IS" basis,
1903
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1904
+ * See the License for the specific language governing permissions and
1905
+ * limitations under the License.
1906
+ */
1907
+
1908
+ /*
1909
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1910
+ *
1911
+ * Licensed under EUPL, Version 1.2 (the "License");
1912
+ * you may not use this file except in compliance with the License.
1913
+ * You may obtain a copy of the License at
1914
+ *
1915
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1916
+ *
1917
+ * Unless required by applicable law or agreed to in writing, software
1918
+ * distributed under the License is distributed on an "AS IS" basis,
1919
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1920
+ * See the License for the specific language governing permissions and
1921
+ * limitations under the License.
1922
+ */
1923
+
1924
+ /*
1925
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1926
+ *
1927
+ * Licensed under EUPL, Version 1.2 (the "License");
1928
+ * you may not use this file except in compliance with the License.
1929
+ * You may obtain a copy of the License at
1930
+ *
1931
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1932
+ *
1933
+ * Unless required by applicable law or agreed to in writing, software
1934
+ * distributed under the License is distributed on an "AS IS" basis,
1935
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1936
+ * See the License for the specific language governing permissions and
1937
+ * limitations under the License.
1938
+ */
1939
+
1940
+ /*
1941
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1942
+ *
1943
+ * Licensed under EUPL, Version 1.2 (the "License");
1944
+ * you may not use this file except in compliance with the License.
1945
+ * You may obtain a copy of the License at
1946
+ *
1947
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1948
+ *
1949
+ * Unless required by applicable law or agreed to in writing, software
1950
+ * distributed under the License is distributed on an "AS IS" basis,
1951
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1952
+ * See the License for the specific language governing permissions and
1953
+ * limitations under the License.
1954
+ */
1955
+ class GaugeConfigurationComponent {
1956
+ set disabled(disabledValue) {
1957
+ if (disabledValue) {
1958
+ this.form.disable();
1959
+ }
1960
+ else {
1961
+ this.form.enable();
1962
+ }
1963
+ }
1964
+ get title() {
1965
+ return this.form.get('title');
1966
+ }
1967
+ get subtitle() {
1968
+ return this.form.get('subtitle');
1969
+ }
1970
+ get label() {
1971
+ return this.form.get('label');
1972
+ }
1973
+ set prefillConfiguration(configurationValue) {
1974
+ if (configurationValue) {
1975
+ this.title.setValue(configurationValue.title || '');
1976
+ this.subtitle.setValue(configurationValue.subtitle || '');
1977
+ this.label.setValue(configurationValue.label || '');
1978
+ }
1979
+ }
1980
+ constructor(fb) {
1981
+ this.fb = fb;
1982
+ this.form = this.fb.group({
1983
+ title: this.fb.control('', [Validators.required]),
1984
+ subtitle: this.fb.control(''),
1985
+ label: this.fb.control(''),
1986
+ useKPI: this.fb.control(false, [Validators.required]),
1987
+ });
1988
+ this.configurationEvent = new EventEmitter();
1989
+ this._subscriptions = new Subscription();
1990
+ }
1991
+ ngOnInit() {
1992
+ this.openFormSubscription();
1993
+ }
1994
+ ngOnDestroy() {
1995
+ this._subscriptions.unsubscribe();
1996
+ }
1997
+ openFormSubscription() {
1998
+ this._subscriptions.add(this.form.valueChanges.pipe(startWith(this.form.value)).subscribe(formValue => {
1999
+ this.configurationEvent.emit({
2000
+ valid: this.form.valid,
2001
+ data: formValue,
2002
+ });
2003
+ }));
2004
+ }
2005
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: GaugeConfigurationComponent, deps: [{ token: i1$3.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
2006
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: GaugeConfigurationComponent, isStandalone: false, selector: "ng-component", inputs: { displayTypeKey: "displayTypeKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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: i4.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i4.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 }); }
2007
+ }
2008
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: GaugeConfigurationComponent, decorators: [{
2009
+ type: Component,
2010
+ args: [{ standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2025 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" }]
2011
+ }], ctorParameters: () => [{ type: i1$3.FormBuilder }], propDecorators: { displayTypeKey: [{
2012
+ type: Input
2013
+ }], disabled: [{
2014
+ type: Input
2015
+ }], prefillConfiguration: [{
2016
+ type: Input
2017
+ }], configurationEvent: [{
2018
+ type: Output
2019
+ }] } });
2020
+
2021
+ /*
2022
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2023
+ *
2024
+ * Licensed under EUPL, Version 1.2 (the "License");
2025
+ * you may not use this file except in compliance with the License.
2026
+ * You may obtain a copy of the License at
2027
+ *
2028
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2029
+ *
2030
+ * Unless required by applicable law or agreed to in writing, software
2031
+ * distributed under the License is distributed on an "AS IS" basis,
2032
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2033
+ * See the License for the specific language governing permissions and
2034
+ * limitations under the License.
2035
+ */
2036
+
2037
+ /*
2038
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2039
+ *
2040
+ * Licensed under EUPL, Version 1.2 (the "License");
2041
+ * you may not use this file except in compliance with the License.
2042
+ * You may obtain a copy of the License at
2043
+ *
2044
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2045
+ *
2046
+ * Unless required by applicable law or agreed to in writing, software
2047
+ * distributed under the License is distributed on an "AS IS" basis,
2048
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2049
+ * See the License for the specific language governing permissions and
2050
+ * limitations under the License.
2051
+ */
2052
+ class GaugeDisplayComponent {
2053
+ set data(value) {
2054
+ if (!value)
2055
+ return;
2056
+ this._data$.next(value);
2057
+ }
2058
+ constructor(themeService, translateService) {
2059
+ this.themeService = themeService;
2060
+ this.translateService = translateService;
2061
+ this._DELTA = -1.0;
2062
+ this._data$ = new BehaviorSubject(null);
2063
+ this.chartData$ = this._data$.pipe(filter(data => !!data), map(data => [
2064
+ {
2065
+ group: 'value',
2066
+ value: this.calculatePercentage(data?.value || 0, data?.total || 0),
2067
+ },
2068
+ {
2069
+ group: 'delta',
2070
+ value: this._DELTA,
2071
+ },
2072
+ ]));
2073
+ this.gaugeChartOptions$ = combineLatest([
2074
+ this.themeService.currentTheme$,
2075
+ this.translateService.stream('key'),
2076
+ ]).pipe(map(([currentTheme]) => ({
2077
+ resizable: true,
2078
+ toolbar: { enabled: false },
2079
+ height: '110px',
2080
+ theme: currentTheme == 'g10' ? 'white' : 'g100',
2081
+ gauge: {
2082
+ alignment: 'center',
2083
+ numberFormatter: value => this.numberFormatter(this, value),
2084
+ deltaArrow: {
2085
+ enabled: false,
2086
+ },
2087
+ showPercentageSymbol: false,
2088
+ type: 'semi',
2089
+ },
2090
+ })));
2091
+ }
2092
+ calculatePercentage(value, total) {
2093
+ return (value * 100.0) / (total || 100.0);
2094
+ }
2095
+ numberFormatter(scope, value) {
2096
+ const scopeData = scope._data$.getValue();
2097
+ if (value == scope._DELTA) {
2098
+ return `${this.translateService.instant('dashboard.of')} ${scopeData?.total || 0} ${scope.displayTypeProperties.label} `;
2099
+ }
2100
+ return Math.round(value * (scopeData?.total || 0)) / 100.0 + '';
2101
+ }
2102
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: GaugeDisplayComponent, deps: [{ token: i1$1.CdsThemeService }, { token: i3$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
2103
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: GaugeDisplayComponent, isStandalone: false, selector: "valtimo-gauge-display", inputs: { displayTypeKey: "displayTypeKey", data: "data", displayTypeProperties: "displayTypeProperties" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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-2025 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 }); }
2104
+ }
2105
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: GaugeDisplayComponent, decorators: [{
2106
+ type: Component,
2107
+ args: [{ standalone: false, selector: 'valtimo-gauge-display', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2025 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-2025 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"] }]
2108
+ }], ctorParameters: () => [{ type: i1$1.CdsThemeService }, { type: i3$1.TranslateService }], propDecorators: { displayTypeKey: [{
2109
+ type: Input
2110
+ }], data: [{
2111
+ type: Input
2112
+ }], displayTypeProperties: [{
2113
+ type: Input
2114
+ }] } });
2115
+
2116
+ /*
2117
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2118
+ *
2119
+ * Licensed under EUPL, Version 1.2 (the "License");
2120
+ * you may not use this file except in compliance with the License.
2121
+ * You may obtain a copy of the License at
2122
+ *
2123
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2124
+ *
2125
+ * Unless required by applicable law or agreed to in writing, software
2126
+ * distributed under the License is distributed on an "AS IS" basis,
2127
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2128
+ * See the License for the specific language governing permissions and
2129
+ * limitations under the License.
2130
+ */
2131
+
2132
+ /*
2133
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2134
+ *
2135
+ * Licensed under EUPL, Version 1.2 (the "License");
2136
+ * you may not use this file except in compliance with the License.
2137
+ * You may obtain a copy of the License at
2138
+ *
2139
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2140
+ *
2141
+ * Unless required by applicable law or agreed to in writing, software
2142
+ * distributed under the License is distributed on an "AS IS" basis,
2143
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2144
+ * See the License for the specific language governing permissions and
2145
+ * limitations under the License.
2146
+ */
2147
+
2148
+ /*
2149
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2150
+ *
2151
+ * Licensed under EUPL, Version 1.2 (the "License");
2152
+ * you may not use this file except in compliance with the License.
2153
+ * You may obtain a copy of the License at
2154
+ *
2155
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2156
+ *
2157
+ * Unless required by applicable law or agreed to in writing, software
2158
+ * distributed under the License is distributed on an "AS IS" basis,
2159
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2160
+ * See the License for the specific language governing permissions and
2161
+ * limitations under the License.
2162
+ */
2163
+ const gaugeSpecification = {
2164
+ displayTypeKey: 'gauge',
2165
+ displayComponent: GaugeDisplayComponent,
2166
+ configurationComponent: GaugeConfigurationComponent,
2167
+ width: 1,
2168
+ height: 1,
2169
+ translations: {
2170
+ nl: {
2171
+ title: 'Graadmeter',
2172
+ formTitle: 'Titel (vereist)',
2173
+ formTitleHelperText: 'De titel die wordt weergegeven in de widget',
2174
+ subtitle: 'Ondertitel',
2175
+ subtitleHelperText: 'De ondertitel weergegeven in de widget',
2176
+ label: 'Label',
2177
+ labelHelperText: 'Het label dat wordt weergegeven in de widget',
2178
+ },
2179
+ en: {
2180
+ title: 'Gauge',
2181
+ formTitle: 'Title (required)',
2182
+ formTitleHelperText: 'The title displayed in the widget',
2183
+ subtitle: 'Subtitle',
2184
+ subtitleHelperText: 'The subtitle displayed in the widget',
2185
+ label: 'Label',
2186
+ labelHelperText: 'The label displayed in the widget',
2187
+ },
2188
+ de: {
2189
+ title: 'Messgerät',
2190
+ formTitle: 'Titel (erforderlich)',
2191
+ formTitleHelperText: 'Der im Widget angezeigte Titel',
2192
+ subtitle: 'Untertitel',
2193
+ subtitleHelperText: 'Der im Widget angezeigte Untertitel',
2194
+ label: 'Beschriftung',
2195
+ labelHelperText: 'Die im Widget angezeigte Beschriftung',
2196
+ },
2197
+ },
2198
+ requiredDataFeatures: [DATA_FEATURES.NUMBER, DATA_FEATURES.TOTAL],
2199
+ };
2200
+
2201
+ /*
2202
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2203
+ *
2204
+ * Licensed under EUPL, Version 1.2 (the "License");
2205
+ * you may not use this file except in compliance with the License.
2206
+ * You may obtain a copy of the License at
2207
+ *
2208
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2209
+ *
2210
+ * Unless required by applicable law or agreed to in writing, software
2211
+ * distributed under the License is distributed on an "AS IS" basis,
2212
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2213
+ * See the License for the specific language governing permissions and
2214
+ * limitations under the License.
2215
+ */
2216
+ class GaugeModule {
2217
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: GaugeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2218
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: GaugeModule, declarations: [GaugeDisplayComponent, GaugeConfigurationComponent], imports: [CommonModule,
2219
+ ReactiveFormsModule,
2220
+ WidgetTranslatePipeModule,
2221
+ InputModule,
2222
+ CheckboxModule,
2223
+ CommonModule,
2224
+ ChartsModule], exports: [GaugeDisplayComponent] }); }
2225
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: GaugeModule, providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: gaugeSpecification, multi: true }], imports: [CommonModule,
2226
+ ReactiveFormsModule,
2227
+ WidgetTranslatePipeModule,
2228
+ InputModule,
2229
+ CheckboxModule,
2230
+ CommonModule,
2231
+ ChartsModule] }); }
2232
+ }
2233
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: GaugeModule, decorators: [{
2234
+ type: NgModule,
2235
+ args: [{
2236
+ declarations: [GaugeDisplayComponent, GaugeConfigurationComponent],
2237
+ imports: [
2238
+ CommonModule,
2239
+ ReactiveFormsModule,
2240
+ WidgetTranslatePipeModule,
2241
+ InputModule,
2242
+ CheckboxModule,
2243
+ CommonModule,
2244
+ ChartsModule,
2245
+ ],
2246
+ exports: [GaugeDisplayComponent],
2247
+ providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: gaugeSpecification, multi: true }],
2248
+ }]
2249
+ }] });
2250
+
2251
+ /*
2252
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2253
+ *
2254
+ * Licensed under EUPL, Version 1.2 (the "License");
2255
+ * you may not use this file except in compliance with the License.
2256
+ * You may obtain a copy of the License at
2257
+ *
2258
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2259
+ *
2260
+ * Unless required by applicable law or agreed to in writing, software
2261
+ * distributed under the License is distributed on an "AS IS" basis,
2262
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2263
+ * See the License for the specific language governing permissions and
2264
+ * limitations under the License.
2265
+ */
2266
+
2267
+ /*
2268
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2269
+ *
2270
+ * Licensed under EUPL, Version 1.2 (the "License");
2271
+ * you may not use this file except in compliance with the License.
2272
+ * You may obtain a copy of the License at
2273
+ *
2274
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2275
+ *
2276
+ * Unless required by applicable law or agreed to in writing, software
2277
+ * distributed under the License is distributed on an "AS IS" basis,
2278
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2279
+ * See the License for the specific language governing permissions and
2280
+ * limitations under the License.
2281
+ */
2282
+
2283
+ /*
2284
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2285
+ *
2286
+ * Licensed under EUPL, Version 1.2 (the "License");
2287
+ * you may not use this file except in compliance with the License.
2288
+ * You may obtain a copy of the License at
2289
+ *
2290
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2291
+ *
2292
+ * Unless required by applicable law or agreed to in writing, software
2293
+ * distributed under the License is distributed on an "AS IS" basis,
2294
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2295
+ * See the License for the specific language governing permissions and
2296
+ * limitations under the License.
2297
+ */
2298
+
2299
+ /*
2300
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2301
+ *
2302
+ * Licensed under EUPL, Version 1.2 (the "License");
2303
+ * you may not use this file except in compliance with the License.
2304
+ * You may obtain a copy of the License at
2305
+ *
2306
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2307
+ *
2308
+ * Unless required by applicable law or agreed to in writing, software
2309
+ * distributed under the License is distributed on an "AS IS" basis,
2310
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2311
+ * See the License for the specific language governing permissions and
2312
+ * limitations under the License.
2313
+ */
2314
+ class MeterConfigurationComponent {
2315
+ set disabled(disabledValue) {
2316
+ if (disabledValue) {
2317
+ this.form.disable();
2318
+ }
2319
+ else {
2320
+ this.form.enable();
2321
+ }
2322
+ }
2323
+ get title() {
2324
+ return this.form.get('title');
2325
+ }
2326
+ get subtitle() {
2327
+ return this.form.get('subtitle');
2328
+ }
2329
+ set prefillConfiguration(configurationValue) {
2330
+ if (configurationValue) {
2331
+ this.title.setValue(configurationValue.title || '');
2332
+ this.subtitle.setValue(configurationValue.subtitle || '');
2333
+ }
2334
+ }
2335
+ constructor(fb) {
2336
+ this.fb = fb;
2337
+ this.form = this.fb.group({
2338
+ title: this.fb.control('', [Validators.required]),
2339
+ subtitle: this.fb.control(''),
2340
+ });
2341
+ this.configurationEvent = new EventEmitter();
2342
+ this._subscriptions = new Subscription();
2343
+ }
2344
+ ngOnInit() {
2345
+ this.openFormSubscription();
2346
+ }
2347
+ ngOnDestroy() {
2348
+ this._subscriptions.unsubscribe();
2349
+ }
2350
+ openFormSubscription() {
2351
+ this._subscriptions.add(this.form.valueChanges.pipe(startWith(this.form.value)).subscribe(formValue => {
2352
+ this.configurationEvent.emit({
2353
+ valid: this.form.valid,
2354
+ data: formValue,
2355
+ });
2356
+ }));
2357
+ }
2358
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MeterConfigurationComponent, deps: [{ token: i1$3.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
2359
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: MeterConfigurationComponent, isStandalone: false, selector: "ng-component", inputs: { displayTypeKey: "displayTypeKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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: i4.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i4.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 }); }
2360
+ }
2361
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MeterConfigurationComponent, decorators: [{
2362
+ type: Component,
2363
+ args: [{ standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2025 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" }]
2364
+ }], ctorParameters: () => [{ type: i1$3.FormBuilder }], propDecorators: { displayTypeKey: [{
2365
+ type: Input
2366
+ }], disabled: [{
2367
+ type: Input
2368
+ }], prefillConfiguration: [{
2369
+ type: Input
2370
+ }], configurationEvent: [{
2371
+ type: Output
2372
+ }] } });
2373
+
2374
+ /*
2375
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2376
+ *
2377
+ * Licensed under EUPL, Version 1.2 (the "License");
2378
+ * you may not use this file except in compliance with the License.
2379
+ * You may obtain a copy of the License at
2380
+ *
2381
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2382
+ *
2383
+ * Unless required by applicable law or agreed to in writing, software
2384
+ * distributed under the License is distributed on an "AS IS" basis,
2385
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2386
+ * See the License for the specific language governing permissions and
2387
+ * limitations under the License.
2388
+ */
2389
+
2390
+ /*
2391
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2392
+ *
2393
+ * Licensed under EUPL, Version 1.2 (the "License");
2394
+ * you may not use this file except in compliance with the License.
2395
+ * You may obtain a copy of the License at
2396
+ *
2397
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2398
+ *
2399
+ * Unless required by applicable law or agreed to in writing, software
2400
+ * distributed under the License is distributed on an "AS IS" basis,
2401
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2402
+ * See the License for the specific language governing permissions and
2403
+ * limitations under the License.
2404
+ */
2405
+ class MeterDisplayComponent {
2406
+ set data(value) {
2407
+ if (!value)
2408
+ return;
2409
+ this._data$.next(value);
2410
+ }
2411
+ constructor(themeService) {
2412
+ this.themeService = themeService;
2413
+ this._data$ = new BehaviorSubject(null);
2414
+ this.meterData$ = this._data$.pipe(filter(data => !!data), map(data => data?.values.map(dataValue => ({
2415
+ group: dataValue.label,
2416
+ value: dataValue.value,
2417
+ })) || []));
2418
+ this.meterChartOptions$ = combineLatest([
2419
+ this.themeService.currentTheme$,
2420
+ this.meterData$,
2421
+ ]).pipe(map(([currentTheme, meterData]) => ({
2422
+ resizable: true,
2423
+ toolbar: { enabled: false },
2424
+ theme: currentTheme,
2425
+ height: '60px',
2426
+ meter: {
2427
+ height: 60,
2428
+ showLabels: false,
2429
+ title: {
2430
+ percentageIndicator: {
2431
+ enabled: false,
2432
+ },
2433
+ },
2434
+ proportional: {
2435
+ total: meterData.reduce((acc, curr) => acc + curr.value, 0),
2436
+ },
2437
+ },
2438
+ })));
2439
+ }
2440
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MeterDisplayComponent, deps: [{ token: i1$1.CdsThemeService }], target: i0.ɵɵFactoryTarget.Component }); }
2441
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: MeterDisplayComponent, isStandalone: false, selector: "valtimo-meter-display", inputs: { displayTypeKey: "displayTypeKey", data: "data", displayTypeProperties: "displayTypeProperties" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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]=\"'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-2025 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 }); }
2442
+ }
2443
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MeterDisplayComponent, decorators: [{
2444
+ type: Component,
2445
+ args: [{ standalone: false, selector: 'valtimo-meter-display', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2025 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]=\"'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-2025 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
+ }], ctorParameters: () => [{ type: i1$1.CdsThemeService }], propDecorators: { displayTypeKey: [{
2447
+ type: Input
2448
+ }], data: [{
2449
+ type: Input
2450
+ }], displayTypeProperties: [{
2451
+ type: Input
2452
+ }] } });
2453
+
2454
+ /*
2455
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2456
+ *
2457
+ * Licensed under EUPL, Version 1.2 (the "License");
2458
+ * you may not use this file except in compliance with the License.
2459
+ * You may obtain a copy of the License at
2460
+ *
2461
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2462
+ *
2463
+ * Unless required by applicable law or agreed to in writing, software
2464
+ * distributed under the License is distributed on an "AS IS" basis,
2465
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2466
+ * See the License for the specific language governing permissions and
2467
+ * limitations under the License.
2468
+ */
2469
+
2470
+ /*
2471
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2472
+ *
2473
+ * Licensed under EUPL, Version 1.2 (the "License");
2474
+ * you may not use this file except in compliance with the License.
2475
+ * You may obtain a copy of the License at
2476
+ *
2477
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2478
+ *
2479
+ * Unless required by applicable law or agreed to in writing, software
2480
+ * distributed under the License is distributed on an "AS IS" basis,
2481
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2482
+ * See the License for the specific language governing permissions and
2483
+ * limitations under the License.
2484
+ */
2485
+
2486
+ /*
2487
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2488
+ *
2489
+ * Licensed under EUPL, Version 1.2 (the "License");
2490
+ * you may not use this file except in compliance with the License.
2491
+ * You may obtain a copy of the License at
2492
+ *
2493
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2494
+ *
2495
+ * Unless required by applicable law or agreed to in writing, software
2496
+ * distributed under the License is distributed on an "AS IS" basis,
2497
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2498
+ * See the License for the specific language governing permissions and
2499
+ * limitations under the License.
2500
+ */
2501
+ const meterSpecification = {
2502
+ displayTypeKey: 'meter',
2503
+ displayComponent: MeterDisplayComponent,
2504
+ configurationComponent: MeterConfigurationComponent,
2505
+ width: 2,
2506
+ height: 1,
2507
+ translations: {
2508
+ nl: {
2509
+ title: 'Meter',
2510
+ formTitle: 'Titel (vereist)',
2511
+ formTitleHelperText: 'De titel die wordt weergegeven in de widget',
2512
+ subtitle: 'Ondertitel',
2513
+ subtitleHelperText: 'De ondertitel weergegeven in de widget',
2514
+ label: 'Label',
2515
+ labelHelperText: 'Het label dat wordt weergegeven in de widget',
2516
+ },
2517
+ en: {
2518
+ title: 'Meter',
2519
+ formTitle: 'Title (required)',
2520
+ formTitleHelperText: 'The title displayed in the widget',
2521
+ subtitle: 'Subtitle',
2522
+ subtitleHelperText: 'The subtitle displayed in the widget',
2523
+ label: 'Label',
2524
+ labelHelperText: 'The label displayed in the widget',
2525
+ },
2526
+ de: {
2527
+ title: 'Meter',
2528
+ formTitle: 'Titel (erforderlich)',
2529
+ formTitleHelperText: 'Der im Widget angezeigte Titel',
2530
+ subtitle: 'Untertitel',
2531
+ subtitleHelperText: 'Der im Widget angezeigte Untertitel',
2532
+ label: 'Beschriftung',
2533
+ labelHelperText: 'Die im Widget angezeigte Beschriftung',
2534
+ },
2535
+ },
2536
+ requiredDataFeatures: [DATA_FEATURES.NUMBERS],
2537
+ };
2538
+
2539
+ /*
2540
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2541
+ *
2542
+ * Licensed under EUPL, Version 1.2 (the "License");
2543
+ * you may not use this file except in compliance with the License.
2544
+ * You may obtain a copy of the License at
2545
+ *
2546
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2547
+ *
2548
+ * Unless required by applicable law or agreed to in writing, software
2549
+ * distributed under the License is distributed on an "AS IS" basis,
2550
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2551
+ * See the License for the specific language governing permissions and
2552
+ * limitations under the License.
2553
+ */
2554
+ class MeterModule {
2555
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MeterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2556
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: MeterModule, declarations: [MeterDisplayComponent, MeterConfigurationComponent], imports: [CommonModule,
2557
+ ReactiveFormsModule,
2558
+ WidgetTranslatePipeModule,
2559
+ InputModule,
2560
+ CheckboxModule,
2561
+ CommonModule,
2562
+ ChartsModule,
2563
+ CarbonListModule,
2564
+ TranslateModule], exports: [MeterDisplayComponent] }); }
2565
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MeterModule, providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: meterSpecification, multi: true }], imports: [CommonModule,
2566
+ ReactiveFormsModule,
2567
+ WidgetTranslatePipeModule,
2568
+ InputModule,
2569
+ CheckboxModule,
2570
+ CommonModule,
2571
+ ChartsModule,
2572
+ CarbonListModule,
2573
+ TranslateModule] }); }
2574
+ }
2575
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MeterModule, decorators: [{
2576
+ type: NgModule,
2577
+ args: [{
2578
+ declarations: [MeterDisplayComponent, MeterConfigurationComponent],
2579
+ imports: [
2580
+ CommonModule,
2581
+ ReactiveFormsModule,
2582
+ WidgetTranslatePipeModule,
2583
+ InputModule,
2584
+ CheckboxModule,
2585
+ CommonModule,
2586
+ ChartsModule,
2587
+ CarbonListModule,
2588
+ TranslateModule,
2589
+ ],
2590
+ exports: [MeterDisplayComponent],
2591
+ providers: [{ provide: DISPLAY_TYPE_TOKEN, useValue: meterSpecification, multi: true }],
2592
+ }]
2593
+ }] });
2594
+
2595
+ /*
2596
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2597
+ *
2598
+ * Licensed under EUPL, Version 1.2 (the "License");
2599
+ * you may not use this file except in compliance with the License.
2600
+ * You may obtain a copy of the License at
2601
+ *
2602
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2603
+ *
2604
+ * Unless required by applicable law or agreed to in writing, software
2605
+ * distributed under the License is distributed on an "AS IS" basis,
2606
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2607
+ * See the License for the specific language governing permissions and
2608
+ * limitations under the License.
2609
+ */
2610
+
2611
+ /*
2612
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2613
+ *
2614
+ * Licensed under EUPL, Version 1.2 (the "License");
2615
+ * you may not use this file except in compliance with the License.
2616
+ * You may obtain a copy of the License at
2617
+ *
2618
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2619
+ *
2620
+ * Unless required by applicable law or agreed to in writing, software
2621
+ * distributed under the License is distributed on an "AS IS" basis,
2622
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2623
+ * See the License for the specific language governing permissions and
2624
+ * limitations under the License.
2625
+ */
2626
+
2627
+ /*
2628
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2629
+ *
2630
+ * Licensed under EUPL, Version 1.2 (the "License");
2631
+ * you may not use this file except in compliance with the License.
2632
+ * You may obtain a copy of the License at
2633
+ *
2634
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2635
+ *
2636
+ * Unless required by applicable law or agreed to in writing, software
2637
+ * distributed under the License is distributed on an "AS IS" basis,
2638
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2639
+ * See the License for the specific language governing permissions and
2640
+ * limitations under the License.
2641
+ */
2642
+
2643
+ /*
2644
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2645
+ *
2646
+ * Licensed under EUPL, Version 1.2 (the "License");
2647
+ * you may not use this file except in compliance with the License.
2648
+ * You may obtain a copy of the License at
2649
+ *
2650
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2651
+ *
2652
+ * Unless required by applicable law or agreed to in writing, software
2653
+ * distributed under the License is distributed on an "AS IS" basis,
2654
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2655
+ * See the License for the specific language governing permissions and
2656
+ * limitations under the License.
2657
+ */
2658
+ class DisplayWidgetTypesModule {
2659
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DisplayWidgetTypesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2660
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: DisplayWidgetTypesModule, imports: [BarChartModule, BigNumberModule, DonutModule, GaugeModule, MeterModule] }); }
2661
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DisplayWidgetTypesModule, imports: [BarChartModule, BigNumberModule, DonutModule, GaugeModule, MeterModule] }); }
2662
+ }
2663
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DisplayWidgetTypesModule, decorators: [{
2664
+ type: NgModule,
2665
+ args: [{
2666
+ imports: [BarChartModule, BigNumberModule, DonutModule, GaugeModule, MeterModule],
2667
+ }]
2668
+ }] });
2669
+
2670
+ /*
2671
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2672
+ *
2673
+ * Licensed under EUPL, Version 1.2 (the "License");
2674
+ * you may not use this file except in compliance with the License.
2675
+ * You may obtain a copy of the License at
2676
+ *
2677
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2678
+ *
2679
+ * Unless required by applicable law or agreed to in writing, software
2680
+ * distributed under the License is distributed on an "AS IS" basis,
2681
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2682
+ * See the License for the specific language governing permissions and
2683
+ * limitations under the License.
2684
+ */
2685
+ class CaseCountConfigurationComponent {
2686
+ set disabled(disabledValue) {
2687
+ if (disabledValue) {
2688
+ this.form.disable();
2689
+ }
2690
+ else {
2691
+ this.form.enable();
2692
+ }
2693
+ }
2694
+ get documentDefinition() {
2695
+ return this.form.get('documentDefinition');
2696
+ }
2697
+ get queryConditions() {
2698
+ return this.form.get('queryConditions');
2699
+ }
2700
+ set prefillConfiguration(configurationValue) {
2701
+ if (configurationValue) {
2702
+ this.documentDefinitionSelected({
2703
+ item: {
2704
+ content: configurationValue.documentDefinition,
2705
+ },
2706
+ });
2707
+ this.defaultConditionValues$.next(configurationValue.queryConditions.map(condition => ({
2708
+ key: condition.queryPath,
2709
+ dropdown: condition.queryOperator,
2710
+ value: condition.queryValue,
2711
+ })));
2712
+ }
2713
+ }
2714
+ constructor(fb, documentService, translateService) {
2715
+ this.fb = fb;
2716
+ this.documentService = documentService;
2717
+ this.translateService = translateService;
2718
+ this.form = this.fb.group({
2719
+ documentDefinition: this.fb.control(null, [Validators.required]),
2720
+ queryConditions: this.fb.control(null),
2721
+ });
2722
+ this.selectedDocumentDefinition$ = new BehaviorSubject('');
2723
+ this.documentItems$ = combineLatest([
2724
+ this.documentService.getAllDefinitions(),
2725
+ this.selectedDocumentDefinition$,
2726
+ ]).pipe(map(([documentDefinitions, selectedDocumentDefintion]) => documentDefinitions.content.map(definition => ({
2727
+ content: definition.id.name,
2728
+ selected: definition.id.name === selectedDocumentDefintion,
2729
+ }))));
2730
+ this._OPERATORS = [
2731
+ Operator.NOT_EQUAL_TO,
2732
+ Operator.EQUAL_TO,
2733
+ Operator.GREATER_THAN,
2734
+ Operator.GREATER_THAN_OR_EQUAL_TO,
2735
+ Operator.LESS_THAN,
2736
+ Operator.LESS_THAN_OR_EQUAL_TO,
2737
+ ];
2738
+ this.operatorItems$ = this.translateService
2739
+ .stream('key')
2740
+ .pipe(map(() => this._OPERATORS.map(operator => ({
2741
+ id: operator,
2742
+ content: this.translateService.instant('condition.operator.' + operator),
2743
+ selected: false,
2744
+ }))));
2745
+ this.defaultConditionValues$ = new BehaviorSubject(null);
2746
+ this.allConditionsValid$ = new BehaviorSubject(true);
2747
+ this.configurationEvent = new EventEmitter();
2748
+ this.ValuePathSelectorPrefix = ValuePathSelectorPrefix;
2749
+ this._subscriptions = new Subscription();
2750
+ }
2751
+ ngOnInit() {
2752
+ this.openFormSubscription();
2753
+ }
2754
+ ngOnDestroy() {
2755
+ this._subscriptions.unsubscribe();
2756
+ }
2757
+ documentDefinitionSelected(documentDefinitionItem) {
2758
+ if (!documentDefinitionItem) {
2759
+ return;
2760
+ }
2761
+ this.selectedDocumentDefinition$.next(documentDefinitionItem?.item?.content);
2762
+ this.documentDefinition.setValue(documentDefinitionItem?.item?.content);
2763
+ }
2764
+ conditionsValueChange(values) {
2765
+ if (values.length === 0) {
2766
+ this.queryConditions.setValue(null);
2767
+ }
2768
+ else {
2769
+ this.queryConditions.setValue(values.map(value => ({
2770
+ queryPath: value.key,
2771
+ queryOperator: value.dropdown,
2772
+ queryValue: value.value,
2773
+ })));
2774
+ }
2775
+ }
2776
+ onAllConditionsValid(allConditionsValid) {
2777
+ this.allConditionsValid$.next(allConditionsValid);
2778
+ }
2779
+ openFormSubscription() {
2780
+ this._subscriptions.add(combineLatest([
2781
+ this.form.valueChanges.pipe(startWith(this.form.value)),
2782
+ this.allConditionsValid$,
2783
+ ]).subscribe(([formValue, allConditionsValid]) => {
2784
+ this.configurationEvent.emit({
2785
+ valid: this.form.valid && allConditionsValid,
2786
+ data: formValue,
2787
+ });
2788
+ }));
2789
+ }
2790
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CaseCountConfigurationComponent, deps: [{ token: i1$3.FormBuilder }, { token: i2$2.DocumentService }, { token: i3$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
2791
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: CaseCountConfigurationComponent, isStandalone: false, selector: "ng-component", inputs: { dataSourceKey: "dataSourceKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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 type=\"valuePathSelectorDropdownValue\"\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 (allValuesValidEvent)=\"onAllConditionsValid($event)\"\n (valueChange)=\"conditionsValueChange($event)\"\n valuePathSelectorNotation=\"dots\"\n [valuePathSelectorPrefixes]=\"[ValuePathSelectorPrefix.DOC, ValuePathSelectorPrefix.CASE]\"\n [valuePathSelectorShowCaseDefinitionSelector]=\"false\"\n [valuePathSelectorCaseDefinitionKey]=\"selectedDocumentDefinition$ | async\"\n [keyColumnFlex]=\"2\"\n [dropdownColumnFlex]=\"1\"\n [valueColumnFlex]=\"1\"\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-2025 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: i4.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "component", type: i4.Dropdown, selector: "cds-dropdown, ibm-dropdown", inputs: ["id", "label", "hideLabel", "helperText", "placeholder", "displayValue", "clearText", "size", "type", "theme", "disabled", "readonly", "skeleton", "inline", "disableArrowKeys", "invalid", "invalidText", "warn", "warnText", "appendInline", "scrollableContainer", "itemValueKey", "selectionFeedback", "menuButtonLabel", "selectedLabel", "dropUp", "fluid"], outputs: ["selected", "onClose", "close"] }, { kind: "component", type: i4.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: ["addRowText", "addButtonType", "addRowTranslationKey", "arbitraryAmountTitles", "arbitraryValueAmount", "defaultValues", "deleteRowText", "deleteRowTranslationKey", "disabled", "dropdownColumnTitle", "dropdownItems", "dropdownWidth", "fullWidth", "hideAddButton", "hideDeleteButton", "initialAmountOfRows", "keyColumnTitle", "margin", "maxRows", "minimumAmountOfRows", "name", "required", "title", "titleTranslationKey", "tooltip", "type", "valueColumnTitle", "valuePathSelectorCaseDefinitionKey", "valuePathSelectorPrefixes", "valuePathSelectorShowCaseDefinitionSelector", "valuePathSelectorNotation", "keyColumnFlex", "dropdownColumnFlex", "valueColumnFlex"], outputs: ["valueChange", "allValuesValidEvent"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: WidgetTranslatePipe, name: "widgetTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2792
+ }
2793
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CaseCountConfigurationComponent, decorators: [{
2794
+ type: Component,
2795
+ args: [{ standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2025 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 type=\"valuePathSelectorDropdownValue\"\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 (allValuesValidEvent)=\"onAllConditionsValid($event)\"\n (valueChange)=\"conditionsValueChange($event)\"\n valuePathSelectorNotation=\"dots\"\n [valuePathSelectorPrefixes]=\"[ValuePathSelectorPrefix.DOC, ValuePathSelectorPrefix.CASE]\"\n [valuePathSelectorShowCaseDefinitionSelector]=\"false\"\n [valuePathSelectorCaseDefinitionKey]=\"selectedDocumentDefinition$ | async\"\n [keyColumnFlex]=\"2\"\n [dropdownColumnFlex]=\"1\"\n [valueColumnFlex]=\"1\"\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-2025 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"] }]
2796
+ }], ctorParameters: () => [{ type: i1$3.FormBuilder }, { type: i2$2.DocumentService }, { type: i3$1.TranslateService }], propDecorators: { dataSourceKey: [{
2797
+ type: Input
2798
+ }], disabled: [{
2799
+ type: Input
2800
+ }], prefillConfiguration: [{
2801
+ type: Input
2802
+ }], configurationEvent: [{
2803
+ type: Output
2804
+ }] } });
2805
+
2806
+ /*
2807
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2808
+ *
2809
+ * Licensed under EUPL, Version 1.2 (the "License");
2810
+ * you may not use this file except in compliance with the License.
2811
+ * You may obtain a copy of the License at
2812
+ *
2813
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2814
+ *
2815
+ * Unless required by applicable law or agreed to in writing, software
2816
+ * distributed under the License is distributed on an "AS IS" basis,
2817
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2818
+ * See the License for the specific language governing permissions and
2819
+ * limitations under the License.
2820
+ */
2821
+
2822
+ /*
2823
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2824
+ *
2825
+ * Licensed under EUPL, Version 1.2 (the "License");
2826
+ * you may not use this file except in compliance with the License.
2827
+ * You may obtain a copy of the License at
2828
+ *
2829
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2830
+ *
2831
+ * Unless required by applicable law or agreed to in writing, software
2832
+ * distributed under the License is distributed on an "AS IS" basis,
2833
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2834
+ * See the License for the specific language governing permissions and
2835
+ * limitations under the License.
2836
+ */
2837
+
2838
+ /*
2839
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2840
+ *
2841
+ * Licensed under EUPL, Version 1.2 (the "License");
2842
+ * you may not use this file except in compliance with the License.
2843
+ * You may obtain a copy of the License at
2844
+ *
2845
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2846
+ *
2847
+ * Unless required by applicable law or agreed to in writing, software
2848
+ * distributed under the License is distributed on an "AS IS" basis,
2849
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2850
+ * See the License for the specific language governing permissions and
2851
+ * limitations under the License.
2852
+ */
2853
+
2854
+ /*
2855
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2856
+ *
2857
+ * Licensed under EUPL, Version 1.2 (the "License");
2858
+ * you may not use this file except in compliance with the License.
2859
+ * You may obtain a copy of the License at
2860
+ *
2861
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2862
+ *
2863
+ * Unless required by applicable law or agreed to in writing, software
2864
+ * distributed under the License is distributed on an "AS IS" basis,
2865
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2866
+ * See the License for the specific language governing permissions and
2867
+ * limitations under the License.
2868
+ */
2869
+
2870
+ /*
2871
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2872
+ *
2873
+ * Licensed under EUPL, Version 1.2 (the "License");
2874
+ * you may not use this file except in compliance with the License.
2875
+ * You may obtain a copy of the License at
2876
+ *
2877
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2878
+ *
2879
+ * Unless required by applicable law or agreed to in writing, software
2880
+ * distributed under the License is distributed on an "AS IS" basis,
2881
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2882
+ * See the License for the specific language governing permissions and
2883
+ * limitations under the License.
2884
+ */
2885
+ /*
2886
+ *
2887
+ * Licensed under EUPL, Version 1.2 (the "License");
2888
+ * you may not use this file except in compliance with the License.
2889
+ * You may obtain a copy of the License at
2890
+ *
2891
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2892
+ *
2893
+ * Unless required by applicable law or agreed to in writing, software
2894
+ * distributed under the License is distributed on an "AS IS" basis,
2895
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2896
+ * See the License for the specific language governing permissions and
2897
+ * limitations under the License.
2898
+ */
2899
+ const CONDITIONS_HELPER_TEXTS = {
2900
+ DE: (example = 'case:createdBy') => `Zum Beispiel: ‘${example}’, ‘Not equal to’, ‘test@test.com’. Um mit leeren Werten zu vergleichen, kann ‘\${null}’ als Wert verwendet werden. Um mit dem aktuellen Datum zu vergleichen, kann ‘\${localDateTimeNow}’ als Wert verwendet werden. Zusätzlich wird Logik wie ‘\${localDateTimeNow.minusWeeks(2)}’ unterstützt. Die Platzhalter ‘\${currentUserId}’, ‘\${currentUserEmail}’ und ‘\${currentUserIdentifier}’ ermöglichen die Anzeige personalisierter Informationen für den aktuellen Dashboard-Benutzer.`,
2901
+ NL: (example = 'case:createdBy') => `Bijvoorbeeld: ‘${example}’, ‘Not equal to’, ‘test@test.com’. Om te vergelijken met lege waarden, kun je ‘\${null}’ gebruiken als waarde. Om te vergelijken met de huidige datum, gebruik je ‘\${localDateTimeNow}’ als waarde. Hier wordt logica zoals ‘\${localDateTimeNow.minusWeeks(2)}’ ondersteund. De placeholders ‘\${currentUserId}’, ‘\${currentUserEmail}’ en ‘\${currentUserIdentifier}’ maken het mogelijk om gepersonaliseerde informatie weer te geven voor de huidige dashboardgebruiker.`,
2902
+ EN: (example = 'case:createdBy') => `For example: '${example}', 'Not equal to', 'test@test.com'. To compare against empty values, you can use '\${null}' as a value. To compare with the current date, use '\${localDateTimeNow}' as a value. Additionally, logic such as '\${localDateTimeNow.minusWeeks(2)}' is supported. The placeholders '\${currentUserId}', '\${currentUserEmail}', and '\${currentUserIdentifier}' enable the display of personalized information for the current dashboard user.`,
2903
+ };
2904
+
2905
+ /*
2906
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2907
+ *
2908
+ * Licensed under EUPL, Version 1.2 (the "License");
2909
+ * you may not use this file except in compliance with the License.
2910
+ * You may obtain a copy of the License at
2911
+ *
2912
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2913
+ *
2914
+ * Unless required by applicable law or agreed to in writing, software
2915
+ * distributed under the License is distributed on an "AS IS" basis,
2916
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2917
+ * See the License for the specific language governing permissions and
2918
+ * limitations under the License.
2919
+ */
2920
+
2921
+ /*
2922
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2923
+ *
2924
+ * Licensed under EUPL, Version 1.2 (the "License");
2925
+ * you may not use this file except in compliance with the License.
2926
+ * You may obtain a copy of the License at
2927
+ *
2928
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2929
+ *
2930
+ * Unless required by applicable law or agreed to in writing, software
2931
+ * distributed under the License is distributed on an "AS IS" basis,
2932
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2933
+ * See the License for the specific language governing permissions and
2934
+ * limitations under the License.
2935
+ */
2936
+ const caseCountDataSourceSpecification = {
2937
+ dataSourceKey: 'case-count',
2938
+ configurationComponent: CaseCountConfigurationComponent,
2939
+ translations: {
2940
+ de: {
2941
+ title: 'Fallzahl',
2942
+ documentDefinition: 'Falltyp (erforderlich)',
2943
+ documentDefinitionHelperText: 'Der Falltyp, für den die Anzahl abgerufen wird',
2944
+ path: 'Pfad',
2945
+ operator: 'Operator',
2946
+ value: 'Wert',
2947
+ conditions: 'Bedingungen',
2948
+ conditionsHelperText: `Geben Sie optionale Bedingungen zum Abrufen der Anzahl der Fälle für den ausgewählten Falltyp an. ${CONDITIONS_HELPER_TEXTS.DE()}`,
2949
+ addCondition: 'Bedingung hinzufügen',
2950
+ },
2951
+ en: {
2952
+ title: 'Case count',
2953
+ documentDefinition: 'Case type (required)',
2954
+ documentDefinitionHelperText: 'The case type for which the count is retrieved',
2955
+ path: 'Path (required)',
2956
+ operator: 'Operator',
2957
+ value: 'Value',
2958
+ conditions: 'Conditions',
2959
+ conditionsHelperText: `Specify optional conditions for retrieving the number of cases for the selected case type. ${CONDITIONS_HELPER_TEXTS.EN()}`,
2960
+ addCondition: 'Add condition',
2961
+ },
2962
+ nl: {
2963
+ title: 'Aantal dossiers',
2964
+ documentDefinition: 'Dossiertype (vereist)',
2965
+ documentDefinitionHelperText: 'Het dossiertype waarvoor de telling wordt opgehaald',
2966
+ path: 'Pad',
2967
+ operator: 'Operator',
2968
+ value: 'Waarde',
2969
+ conditions: 'Condities',
2970
+ conditionsHelperText: `Geef optionele condities op voor het ophalen van het aantal zaken voor het geselecteerde dossiertype. ${CONDITIONS_HELPER_TEXTS.NL()}}`,
2971
+ addCondition: 'Conditie toevoegen',
2972
+ },
2973
+ },
2974
+ };
2975
+
2976
+ /*
2977
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2978
+ *
2979
+ * Licensed under EUPL, Version 1.2 (the "License");
2980
+ * you may not use this file except in compliance with the License.
2981
+ * You may obtain a copy of the License at
2982
+ *
2983
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2984
+ *
2985
+ * Unless required by applicable law or agreed to in writing, software
2986
+ * distributed under the License is distributed on an "AS IS" basis,
2987
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2988
+ * See the License for the specific language governing permissions and
2989
+ * limitations under the License.
2990
+ */
2991
+ class CaseCountDataSourceModule {
2992
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CaseCountDataSourceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2993
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: CaseCountDataSourceModule, declarations: [CaseCountConfigurationComponent], imports: [CommonModule,
2994
+ ReactiveFormsModule,
2995
+ WidgetTranslatePipeModule,
2996
+ InputModule,
2997
+ DropdownModule,
2998
+ CarbonMultiInputModule], exports: [CaseCountConfigurationComponent] }); }
2999
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CaseCountDataSourceModule, providers: [
3000
+ { provide: DATA_SOURCE_TOKEN, useValue: caseCountDataSourceSpecification, multi: true },
3001
+ ], imports: [CommonModule,
3002
+ ReactiveFormsModule,
3003
+ WidgetTranslatePipeModule,
3004
+ InputModule,
3005
+ DropdownModule,
3006
+ CarbonMultiInputModule] }); }
3007
+ }
3008
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CaseCountDataSourceModule, decorators: [{
3009
+ type: NgModule,
3010
+ args: [{
3011
+ declarations: [CaseCountConfigurationComponent],
3012
+ imports: [
3013
+ CommonModule,
3014
+ ReactiveFormsModule,
3015
+ WidgetTranslatePipeModule,
3016
+ InputModule,
3017
+ DropdownModule,
3018
+ CarbonMultiInputModule,
3019
+ ],
3020
+ exports: [CaseCountConfigurationComponent],
3021
+ providers: [
3022
+ { provide: DATA_SOURCE_TOKEN, useValue: caseCountDataSourceSpecification, multi: true },
3023
+ ],
3024
+ }]
3025
+ }] });
3026
+
3027
+ /*
3028
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3029
+ *
3030
+ * Licensed under EUPL, Version 1.2 (the "License");
3031
+ * you may not use this file except in compliance with the License.
3032
+ * You may obtain a copy of the License at
3033
+ *
3034
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3035
+ *
3036
+ * Unless required by applicable law or agreed to in writing, software
3037
+ * distributed under the License is distributed on an "AS IS" basis,
3038
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3039
+ * See the License for the specific language governing permissions and
3040
+ * limitations under the License.
3041
+ */
3042
+
3043
+ /*
3044
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3045
+ *
3046
+ * Licensed under EUPL, Version 1.2 (the "License");
3047
+ * you may not use this file except in compliance with the License.
3048
+ * You may obtain a copy of the License at
3049
+ *
3050
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3051
+ *
3052
+ * Unless required by applicable law or agreed to in writing, software
3053
+ * distributed under the License is distributed on an "AS IS" basis,
3054
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3055
+ * See the License for the specific language governing permissions and
3056
+ * limitations under the License.
3057
+ */
3058
+ class CaseCountsConfigurationComponent {
3059
+ set disabled(disabledValue) {
3060
+ if (disabledValue) {
3061
+ this.form.disable();
3062
+ }
3063
+ else {
3064
+ this.form.enable();
3065
+ }
3066
+ }
3067
+ get queryItems() {
3068
+ return this.form.get('queryItems');
3069
+ }
3070
+ get queryItemsValue$() {
3071
+ return this.queryItems.valueChanges.pipe(startWith(this.queryItems.value || []));
3072
+ }
3073
+ get queryItemsList$() {
3074
+ return this.queryItemsValue$.pipe(map(queryItemsValue => queryItemsValue.map(() => null)), distinctUntilChanged((previous, current) => isEqual(previous, current)));
3075
+ }
3076
+ get documentDefinition() {
3077
+ return this.form.get('documentDefinition');
3078
+ }
3079
+ get formDisabled() {
3080
+ return this.form.disabled;
3081
+ }
3082
+ set prefillConfiguration(configurationValue) {
3083
+ if (!configurationValue)
3084
+ return;
3085
+ this.documentDefinitionSelected({
3086
+ item: {
3087
+ content: configurationValue.documentDefinition,
3088
+ },
3089
+ });
3090
+ this.documentDefinition.patchValue(configurationValue.documentDefinition);
3091
+ this.queryItems.patchValue(this.queryItemsToMultiInputValues(configurationValue.queryItems));
3092
+ }
3093
+ constructor(fb, documentService, translateService, iconService) {
3094
+ this.fb = fb;
3095
+ this.documentService = documentService;
3096
+ this.translateService = translateService;
3097
+ this.iconService = iconService;
3098
+ this._EMPTY_QUERY_ITEM_VALUE = {
3099
+ label: '',
3100
+ queryConditions: [{ key: '', value: '', dropdown: '' }],
3101
+ };
3102
+ this.form = this.fb.group({
3103
+ documentDefinition: this.fb.control(null, [Validators.required]),
3104
+ queryItems: this.fb.control([this._EMPTY_QUERY_ITEM_VALUE, this._EMPTY_QUERY_ITEM_VALUE], [this.queryItemsValidator()]),
3105
+ });
3106
+ this.configurationEvent = new EventEmitter();
3107
+ this.selectedDocumentDefinition$ = new BehaviorSubject('');
3108
+ this.documentItems$ = combineLatest([
3109
+ this.documentService.getAllDefinitions(),
3110
+ this.selectedDocumentDefinition$,
3111
+ ]).pipe(map(([documentDefinitions, selectedDocumentDefintion]) => documentDefinitions.content.map(definition => ({
3112
+ content: definition.id.name,
3113
+ selected: definition.id.name === selectedDocumentDefintion,
3114
+ }))));
3115
+ this._OPERATORS = [
3116
+ Operator.NOT_EQUAL_TO,
3117
+ Operator.EQUAL_TO,
3118
+ Operator.GREATER_THAN,
3119
+ Operator.GREATER_THAN_OR_EQUAL_TO,
3120
+ Operator.LESS_THAN,
3121
+ Operator.LESS_THAN_OR_EQUAL_TO,
3122
+ ];
3123
+ this.operatorItems$ = this.translateService
3124
+ .stream('key')
3125
+ .pipe(map(() => this._OPERATORS.map(operator => ({
3126
+ id: operator,
3127
+ content: this.translateService.instant('condition.operator.' + operator),
3128
+ selected: false,
3129
+ }))));
3130
+ this.ValuePathSelectorPrefix = ValuePathSelectorPrefix;
3131
+ this._subscriptions = new Subscription();
3132
+ this.iconService.registerAll([Add16, TrashCan16]);
3133
+ }
3134
+ ngOnInit() {
3135
+ this.openFormSubscription();
3136
+ }
3137
+ ngOnDestroy() {
3138
+ this._subscriptions.unsubscribe();
3139
+ }
3140
+ documentDefinitionSelected(documentDefinitionItem) {
3141
+ const documentDefinitionName = documentDefinitionItem?.item?.content;
3142
+ if (!documentDefinitionName) {
3143
+ return;
3144
+ }
3145
+ this.selectedDocumentDefinition$.next(documentDefinitionName);
3146
+ this.documentDefinition.setValue(documentDefinitionName);
3147
+ }
3148
+ conditionsValueChange(index, values) {
3149
+ const currentQueryItemsValues = this.queryItems.value;
3150
+ if (isEqual(currentQueryItemsValues[index].queryConditions, values))
3151
+ return;
3152
+ this.queryItems.patchValue(currentQueryItemsValues.map((item, itemIndex) => itemIndex === index ? { ...item, queryConditions: values } : item));
3153
+ }
3154
+ labelValueChange(index, value) {
3155
+ const currentQueryItemsValues = this.queryItems.value;
3156
+ if (currentQueryItemsValues[index].label === value)
3157
+ return;
3158
+ this.queryItems.patchValue(currentQueryItemsValues.map((item, itemIndex) => itemIndex === index ? { ...item, label: value } : item));
3159
+ }
3160
+ addQueryItem() {
3161
+ const currentQueryItems = this.queryItems.value;
3162
+ this.queryItems.patchValue([...currentQueryItems, this._EMPTY_QUERY_ITEM_VALUE]);
3163
+ }
3164
+ deleteCount(i) {
3165
+ const currentQueryItems = this.queryItems.value;
3166
+ this.queryItems.patchValue(currentQueryItems.filter((_, index) => index !== i));
3167
+ }
3168
+ openFormSubscription() {
3169
+ this._subscriptions.add(this.form.valueChanges.pipe(startWith(this.form.value)).subscribe(formValue => {
3170
+ this.configurationEvent.emit({
3171
+ valid: this.form.valid,
3172
+ data: {
3173
+ documentDefinition: formValue?.documentDefinition,
3174
+ queryItems: this.multiInputValuesToQueryItems(formValue.queryItems),
3175
+ },
3176
+ });
3177
+ }));
3178
+ }
3179
+ queryItemsToMultiInputValues(queryItems) {
3180
+ return queryItems.map(queryItem => ({
3181
+ ...queryItem,
3182
+ queryConditions: queryItem.queryConditions.map(condition => ({
3183
+ key: condition.queryPath,
3184
+ dropdown: condition.queryOperator,
3185
+ value: condition.queryValue,
3186
+ })),
3187
+ }));
3188
+ }
3189
+ multiInputValuesToQueryItems(multiInputValues) {
3190
+ return multiInputValues.map(queryItem => ({
3191
+ ...queryItem,
3192
+ queryConditions: queryItem.queryConditions.map(condition => ({
3193
+ queryPath: condition.key,
3194
+ queryOperator: condition.dropdown,
3195
+ queryValue: condition.value,
3196
+ })),
3197
+ }));
3198
+ }
3199
+ queryItemsValidator() {
3200
+ return (control) => {
3201
+ const queryItems = control.value;
3202
+ const validQueryItems = queryItems.filter(item => {
3203
+ const validLabel = !!item.label;
3204
+ const validConditions = item.queryConditions.filter(condition => !!condition.value && !!condition.key && !!condition.dropdown);
3205
+ return (validLabel &&
3206
+ validConditions.length > 0 &&
3207
+ item.queryConditions.length === validConditions.length);
3208
+ });
3209
+ return validQueryItems.length > 1 && validQueryItems.length === queryItems.length
3210
+ ? null
3211
+ : {
3212
+ invalidQueryItems: 'invalid',
3213
+ };
3214
+ };
3215
+ }
3216
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CaseCountsConfigurationComponent, deps: [{ token: i1$3.FormBuilder }, { token: i2$2.DocumentService }, { token: i3$1.TranslateService }, { token: i4.IconService }], target: i0.ɵɵFactoryTarget.Component }); }
3217
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: CaseCountsConfigurationComponent, isStandalone: false, selector: "ng-component", inputs: { dataSourceKey: "dataSourceKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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 selectedDocumentDefinition: selectedDocumentDefinition$ | 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\" [cdsLayer]=\"0\">\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 type=\"valuePathSelectorDropdownValue\"\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 valuePathSelectorNotation=\"dots\"\n [valuePathSelectorPrefixes]=\"[ValuePathSelectorPrefix.DOC, ValuePathSelectorPrefix.CASE]\"\n [valuePathSelectorShowCaseDefinitionSelector]=\"false\"\n [valuePathSelectorCaseDefinitionKey]=\"obs.selectedDocumentDefinition\"\n [keyColumnFlex]=\"2\"\n [dropdownColumnFlex]=\"1\"\n [valueColumnFlex]=\"1\"\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-2025 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", "trim", "presetsTitle", "presetOptions"], outputs: ["valueChange"] }, { kind: "component", type: i4.Dropdown, selector: "cds-dropdown, ibm-dropdown", inputs: ["id", "label", "hideLabel", "helperText", "placeholder", "displayValue", "clearText", "size", "type", "theme", "disabled", "readonly", "skeleton", "inline", "disableArrowKeys", "invalid", "invalidText", "warn", "warnText", "appendInline", "scrollableContainer", "itemValueKey", "selectionFeedback", "menuButtonLabel", "selectedLabel", "dropUp", "fluid"], outputs: ["selected", "onClose", "close"] }, { kind: "component", type: i4.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: ["addRowText", "addButtonType", "addRowTranslationKey", "arbitraryAmountTitles", "arbitraryValueAmount", "defaultValues", "deleteRowText", "deleteRowTranslationKey", "disabled", "dropdownColumnTitle", "dropdownItems", "dropdownWidth", "fullWidth", "hideAddButton", "hideDeleteButton", "initialAmountOfRows", "keyColumnTitle", "margin", "maxRows", "minimumAmountOfRows", "name", "required", "title", "titleTranslationKey", "tooltip", "type", "valueColumnTitle", "valuePathSelectorCaseDefinitionKey", "valuePathSelectorPrefixes", "valuePathSelectorShowCaseDefinitionSelector", "valuePathSelectorNotation", "keyColumnFlex", "dropdownColumnFlex", "valueColumnFlex"], outputs: ["valueChange", "allValuesValidEvent"] }, { kind: "directive", type: i4.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "component", type: i4.IconButton, selector: "cds-icon-button, ibm-icon-button", inputs: ["buttonNgClass", "buttonAttributes", "buttonId", "kind", "size", "type", "isExpressive", "disabled", "description", "showTooltipWhenDisabled"], outputs: ["click", "focus", "blur", "tooltipClick"] }, { kind: "component", type: i4.Tile, selector: "cds-tile, ibm-tile", inputs: ["theme"] }, { kind: "directive", type: i4.LayerDirective, selector: "[cdsLayer], [ibmLayer]", inputs: ["ibmLayer", "cdsLayer"], exportAs: ["layer"] }, { kind: "directive", type: i4.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 }); }
3218
+ }
3219
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CaseCountsConfigurationComponent, decorators: [{
3220
+ type: Component,
3221
+ args: [{ standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2025 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 selectedDocumentDefinition: selectedDocumentDefinition$ | 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\" [cdsLayer]=\"0\">\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 type=\"valuePathSelectorDropdownValue\"\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 valuePathSelectorNotation=\"dots\"\n [valuePathSelectorPrefixes]=\"[ValuePathSelectorPrefix.DOC, ValuePathSelectorPrefix.CASE]\"\n [valuePathSelectorShowCaseDefinitionSelector]=\"false\"\n [valuePathSelectorCaseDefinitionKey]=\"obs.selectedDocumentDefinition\"\n [keyColumnFlex]=\"2\"\n [dropdownColumnFlex]=\"1\"\n [valueColumnFlex]=\"1\"\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-2025 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"] }]
3222
+ }], ctorParameters: () => [{ type: i1$3.FormBuilder }, { type: i2$2.DocumentService }, { type: i3$1.TranslateService }, { type: i4.IconService }], propDecorators: { dataSourceKey: [{
3223
+ type: Input
3224
+ }], disabled: [{
3225
+ type: Input
3226
+ }], prefillConfiguration: [{
3227
+ type: Input
3228
+ }], configurationEvent: [{
3229
+ type: Output
3230
+ }] } });
3231
+
3232
+ /*
3233
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3234
+ *
3235
+ * Licensed under EUPL, Version 1.2 (the "License");
3236
+ * you may not use this file except in compliance with the License.
3237
+ * You may obtain a copy of the License at
3238
+ *
3239
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3240
+ *
3241
+ * Unless required by applicable law or agreed to in writing, software
3242
+ * distributed under the License is distributed on an "AS IS" basis,
3243
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3244
+ * See the License for the specific language governing permissions and
3245
+ * limitations under the License.
3246
+ */
3247
+
3248
+ /*
3249
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3250
+ *
3251
+ * Licensed under EUPL, Version 1.2 (the "License");
3252
+ * you may not use this file except in compliance with the License.
3253
+ * You may obtain a copy of the License at
3254
+ *
3255
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3256
+ *
3257
+ * Unless required by applicable law or agreed to in writing, software
3258
+ * distributed under the License is distributed on an "AS IS" basis,
3259
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3260
+ * See the License for the specific language governing permissions and
3261
+ * limitations under the License.
3262
+ */
3263
+
3264
+ /*
3265
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3266
+ *
3267
+ * Licensed under EUPL, Version 1.2 (the "License");
3268
+ * you may not use this file except in compliance with the License.
3269
+ * You may obtain a copy of the License at
3270
+ *
3271
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3272
+ *
3273
+ * Unless required by applicable law or agreed to in writing, software
3274
+ * distributed under the License is distributed on an "AS IS" basis,
3275
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3276
+ * See the License for the specific language governing permissions and
3277
+ * limitations under the License.
3278
+ */
3279
+
3280
+ /*
3281
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3282
+ *
3283
+ * Licensed under EUPL, Version 1.2 (the "License");
3284
+ * you may not use this file except in compliance with the License.
3285
+ * You may obtain a copy of the License at
3286
+ *
3287
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3288
+ *
3289
+ * Unless required by applicable law or agreed to in writing, software
3290
+ * distributed under the License is distributed on an "AS IS" basis,
3291
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3292
+ * See the License for the specific language governing permissions and
3293
+ * limitations under the License.
3294
+ */
3295
+
3296
+ /*
3297
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3298
+ *
3299
+ * Licensed under EUPL, Version 1.2 (the "License");
3300
+ * you may not use this file except in compliance with the License.
3301
+ * You may obtain a copy of the License at
3302
+ *
3303
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3304
+ *
3305
+ * Unless required by applicable law or agreed to in writing, software
3306
+ * distributed under the License is distributed on an "AS IS" basis,
3307
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3308
+ * See the License for the specific language governing permissions and
3309
+ * limitations under the License.
3310
+ */
3311
+ const caseCountsDataSourceSpecification = {
3312
+ dataSourceKey: 'case-counts',
3313
+ configurationComponent: CaseCountsConfigurationComponent,
3314
+ translations: {
3315
+ de: {
3316
+ title: 'Mehrere Fallanzahllen',
3317
+ documentDefinition: 'Falltyp (erforderlich)',
3318
+ documentDefinitionHelperText: 'Der Falltyp, für den die Anzahllen abgeruft wirden',
3319
+ path: 'Pfad',
3320
+ operator: 'Operator',
3321
+ value: 'Wert',
3322
+ counts: 'Anzahllen',
3323
+ countsHelperText: `Geben Sie eine oder mehrere Bedingungen für jede anzuzeigende Zählung an. Konfigurieren Sie mindestens zwei Zählungen und mindestens eine Bedingung pro Zählung. ${CONDITIONS_HELPER_TEXTS.DE()}`,
3324
+ addCondition: 'Bedingung hinzufügen',
3325
+ countTitle: 'Anzahltitel',
3326
+ },
3327
+ en: {
3328
+ title: 'Multiple case counts',
3329
+ documentDefinition: 'Case type (required)',
3330
+ documentDefinitionHelperText: 'The case type for which the counts are retrieved',
3331
+ path: 'Path (required)',
3332
+ operator: 'Operator',
3333
+ value: 'Value',
3334
+ counts: 'Counts',
3335
+ countsHelperText: `Specify one or more conditions for each count that should be displayed. Configure at least two counts and at least one condition per count. ${CONDITIONS_HELPER_TEXTS.EN()}`,
3336
+ addCondition: 'Add condition',
3337
+ countTitle: 'Count title',
3338
+ },
3339
+ nl: {
3340
+ title: 'Meerdere dossieraantallen',
3341
+ documentDefinition: 'Dossiertype (vereist)',
3342
+ documentDefinitionHelperText: 'Het dossiertype waarvoor de aantallen worden opgehaald',
3343
+ path: 'Pad',
3344
+ operator: 'Operator',
3345
+ value: 'Waarde',
3346
+ counts: 'Aantallen',
3347
+ countsHelperText: `Geef een of meer condities op voor elk aantal dat moet worden weergegeven. Configureer minimaal twee aantallen en minimaal één conditie per aantal. ${CONDITIONS_HELPER_TEXTS.NL()}`,
3348
+ addCondition: 'Conditie toevoegen',
3349
+ countTitle: 'Aantaltitel',
3350
+ },
3351
+ },
3352
+ };
3353
+
3354
+ /*
3355
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3356
+ *
3357
+ * Licensed under EUPL, Version 1.2 (the "License");
3358
+ * you may not use this file except in compliance with the License.
3359
+ * You may obtain a copy of the License at
3360
+ *
3361
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3362
+ *
3363
+ * Unless required by applicable law or agreed to in writing, software
3364
+ * distributed under the License is distributed on an "AS IS" basis,
3365
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3366
+ * See the License for the specific language governing permissions and
3367
+ * limitations under the License.
3368
+ */
3369
+ class CaseCountsDataSourceModule {
3370
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CaseCountsDataSourceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3371
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: CaseCountsDataSourceModule, declarations: [CaseCountsConfigurationComponent], imports: [CommonModule,
3372
+ ReactiveFormsModule,
3373
+ WidgetTranslatePipeModule,
3374
+ InputModule$1,
3375
+ DropdownModule,
3376
+ CarbonMultiInputModule,
3377
+ InputModule$1,
3378
+ ButtonModule,
3379
+ TilesModule,
3380
+ LayerModule,
3381
+ IconModule], exports: [CaseCountsConfigurationComponent] }); }
3382
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CaseCountsDataSourceModule, providers: [
3383
+ { provide: DATA_SOURCE_TOKEN, useValue: caseCountsDataSourceSpecification, multi: true },
3384
+ ], imports: [CommonModule,
3385
+ ReactiveFormsModule,
3386
+ WidgetTranslatePipeModule,
3387
+ InputModule$1,
3388
+ DropdownModule,
3389
+ CarbonMultiInputModule,
3390
+ InputModule$1,
3391
+ ButtonModule,
3392
+ TilesModule,
3393
+ LayerModule,
3394
+ IconModule] }); }
3395
+ }
3396
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CaseCountsDataSourceModule, decorators: [{
3397
+ type: NgModule,
3398
+ args: [{
3399
+ declarations: [CaseCountsConfigurationComponent],
3400
+ imports: [
3401
+ CommonModule,
3402
+ ReactiveFormsModule,
3403
+ WidgetTranslatePipeModule,
3404
+ InputModule$1,
3405
+ DropdownModule,
3406
+ CarbonMultiInputModule,
3407
+ InputModule$1,
3408
+ ButtonModule,
3409
+ TilesModule,
3410
+ LayerModule,
3411
+ IconModule,
3412
+ ],
3413
+ exports: [CaseCountsConfigurationComponent],
3414
+ providers: [
3415
+ { provide: DATA_SOURCE_TOKEN, useValue: caseCountsDataSourceSpecification, multi: true },
3416
+ ],
3417
+ }]
3418
+ }] });
3419
+
3420
+ /*
3421
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3422
+ *
3423
+ * Licensed under EUPL, Version 1.2 (the "License");
3424
+ * you may not use this file except in compliance with the License.
3425
+ * You may obtain a copy of the License at
3426
+ *
3427
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3428
+ *
3429
+ * Unless required by applicable law or agreed to in writing, software
3430
+ * distributed under the License is distributed on an "AS IS" basis,
3431
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3432
+ * See the License for the specific language governing permissions and
3433
+ * limitations under the License.
3434
+ */
3435
+
3436
+ /*
3437
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3438
+ *
3439
+ * Licensed under EUPL, Version 1.2 (the "License");
3440
+ * you may not use this file except in compliance with the License.
3441
+ * You may obtain a copy of the License at
3442
+ *
3443
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3444
+ *
3445
+ * Unless required by applicable law or agreed to in writing, software
3446
+ * distributed under the License is distributed on an "AS IS" basis,
3447
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3448
+ * See the License for the specific language governing permissions and
3449
+ * limitations under the License.
3450
+ */
3451
+ class CaseGroupByConfigurationComponent {
3452
+ get documentDefinition() {
3453
+ return this.form.get('documentDefinition');
3454
+ }
3455
+ get path() {
3456
+ return this.form.get('path');
3457
+ }
3458
+ get queryConditions() {
3459
+ return this.form.get('queryConditions');
3460
+ }
3461
+ get enum() {
3462
+ return this.form.get('enum');
3463
+ }
3464
+ get formDisabled() {
3465
+ return this.form.disabled;
3466
+ }
3467
+ get formValue$() {
3468
+ return this.form.valueChanges.pipe(startWith(this.form.value));
3469
+ }
3470
+ set disabled(disabledValue) {
3471
+ if (disabledValue) {
3472
+ this.form.disable();
3473
+ }
3474
+ else {
3475
+ this.form.enable();
3476
+ }
3477
+ }
3478
+ set prefillConfiguration(configurationValue) {
3479
+ if (!configurationValue)
3480
+ return;
3481
+ this.documentDefinitionSelected({
3482
+ item: {
3483
+ content: configurationValue.documentDefinition,
3484
+ },
3485
+ });
3486
+ this.queryConditions.patchValue(this.queryConditionsToMultiInputValues(configurationValue.queryConditions));
3487
+ this.enum.patchValue(this.enumToMultiInputValues(configurationValue.enum));
3488
+ this.path.patchValue(configurationValue.path);
3489
+ }
3490
+ constructor(fb, documentService, translateService) {
3491
+ this.fb = fb;
3492
+ this.documentService = documentService;
3493
+ this.translateService = translateService;
3494
+ this.form = this.fb.group({
3495
+ documentDefinition: this.fb.control(null, [Validators.required]),
3496
+ path: this.fb.control(null, [Validators.required]),
3497
+ queryConditions: this.fb.control([], [this.queryConditionsValidator()]),
3498
+ enum: this.fb.control([], [this.enumValidator()]),
3499
+ });
3500
+ this.selectedDocumentDefinition$ = new BehaviorSubject('');
3501
+ this.documentItems$ = combineLatest([
3502
+ this.documentService.getAllDefinitions(),
3503
+ this.selectedDocumentDefinition$,
3504
+ ]).pipe(map(([documentDefinitions, selectedDocumentDefintion]) => documentDefinitions.content.map(definition => ({
3505
+ content: definition.id.name,
3506
+ selected: definition.id.name === selectedDocumentDefintion,
3507
+ }))));
3508
+ this._OPERATORS = [
3509
+ Operator.NOT_EQUAL_TO,
3510
+ Operator.EQUAL_TO,
3511
+ Operator.GREATER_THAN,
3512
+ Operator.GREATER_THAN_OR_EQUAL_TO,
3513
+ Operator.LESS_THAN,
3514
+ Operator.LESS_THAN_OR_EQUAL_TO,
3515
+ ];
3516
+ this.operatorItems$ = this.translateService
3517
+ .stream('key')
3518
+ .pipe(map(() => this._OPERATORS.map(operator => ({
3519
+ id: operator,
3520
+ content: this.translateService.instant('condition.operator.' + operator),
3521
+ selected: false,
3522
+ }))));
3523
+ this.configurationEvent = new EventEmitter();
3524
+ this.ValuePathSelectorPrefix = ValuePathSelectorPrefix;
3525
+ this._subscriptions = new Subscription();
3526
+ }
3527
+ ngOnInit() {
3528
+ this.openFormSubscription();
3529
+ }
3530
+ ngOnDestroy() {
3531
+ this._subscriptions.unsubscribe();
3532
+ }
3533
+ documentDefinitionSelected(documentDefinitionItem) {
3534
+ const documentDefinitionName = documentDefinitionItem?.item?.content;
3535
+ if (!documentDefinitionName) {
3536
+ return;
3537
+ }
3538
+ this.selectedDocumentDefinition$.next(documentDefinitionName);
3539
+ this.documentDefinition.setValue(documentDefinitionName);
3540
+ }
3541
+ conditionsValueChange(values) {
3542
+ if (!values)
3543
+ return;
3544
+ const currentValue = this.queryConditions.value;
3545
+ if (isEqual(values, currentValue))
3546
+ return;
3547
+ this.queryConditions.patchValue(values);
3548
+ }
3549
+ enumValueChange(values) {
3550
+ if (!values)
3551
+ return;
3552
+ const currentValue = this.enum.value;
3553
+ if (isEqual(values, currentValue))
3554
+ return;
3555
+ this.enum.patchValue(values);
3556
+ }
3557
+ openFormSubscription() {
3558
+ this._subscriptions.add(this.form.valueChanges.pipe(startWith(this.form.value)).subscribe(formValue => {
3559
+ this.configurationEvent.emit({
3560
+ valid: this.form.valid,
3561
+ data: {
3562
+ ...formValue,
3563
+ queryConditions: this.multiInputValuesToQueryConditions(formValue.queryConditions),
3564
+ enum: this.multiInputValuesToEnum(formValue.enum),
3565
+ },
3566
+ });
3567
+ }));
3568
+ }
3569
+ queryConditionsValidator() {
3570
+ return (control) => {
3571
+ const queryConditions = control.value;
3572
+ const validConditions = queryConditions.filter(condition => !!condition.value && !!condition.key && !!condition.dropdown);
3573
+ return validConditions.length === queryConditions.length
3574
+ ? null
3575
+ : {
3576
+ invalidQueryItems: 'invalid',
3577
+ };
3578
+ };
3579
+ }
3580
+ enumValidator() {
3581
+ return (control) => {
3582
+ const enumeration = control.value || [];
3583
+ const enumLength = enumeration.length;
3584
+ const validEnumKeysLength = enumeration.filter(entry => !!entry.key).length;
3585
+ const validEnumValuesLength = enumeration.filter(entry => !!entry.value).length;
3586
+ return enumLength === validEnumKeysLength && enumLength === validEnumValuesLength
3587
+ ? null
3588
+ : {
3589
+ invalidEnum: 'invalid',
3590
+ };
3591
+ };
3592
+ }
3593
+ enumToMultiInputValues(enumeration) {
3594
+ return Object.keys(enumeration || {}).reduce((acc, key) => [...acc, { key, value: enumeration[key] }], []);
3595
+ }
3596
+ multiInputValuesToEnum(values) {
3597
+ return (values || []).reduce((acc, curr) => ({ ...acc, [curr.key]: curr.value }), {});
3598
+ }
3599
+ queryConditionsToMultiInputValues(queryConditions) {
3600
+ return (queryConditions || []).map(condition => ({
3601
+ key: condition.queryPath,
3602
+ dropdown: condition.queryOperator,
3603
+ value: condition.queryValue,
3604
+ }));
3605
+ }
3606
+ multiInputValuesToQueryConditions(values) {
3607
+ return (values || []).map(condition => ({
3608
+ queryPath: condition.key,
3609
+ queryOperator: condition.dropdown,
3610
+ queryValue: condition.value,
3611
+ }));
3612
+ }
3613
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CaseGroupByConfigurationComponent, deps: [{ token: i1$3.FormBuilder }, { token: i2$2.DocumentService }, { token: i3$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
3614
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: CaseGroupByConfigurationComponent, isStandalone: false, selector: "ng-component", inputs: { dataSourceKey: "dataSourceKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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 selectedDocumentDefinition: selectedDocumentDefinition$ | async,\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 class=\"full-width\"\n >\n {{ 'path' | widgetTranslate: dataSourceKey | async }}\n\n <valtimo-value-path-selector\n formControlName=\"path\"\n [caseDefinitionKey]=\"obs.selectedDocumentDefinition\"\n [prefixes]=\"[ValuePathSelectorPrefix.DOC, ValuePathSelectorPrefix.CASE]\"\n ></valtimo-value-path-selector>\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 type=\"valuePathSelectorDropdownValue\"\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 valuePathSelectorNotation=\"dots\"\n [valuePathSelectorPrefixes]=\"[ValuePathSelectorPrefix.DOC, ValuePathSelectorPrefix.CASE]\"\n [valuePathSelectorShowCaseDefinitionSelector]=\"false\"\n [valuePathSelectorCaseDefinitionKey]=\"obs.selectedDocumentDefinition\"\n [keyColumnFlex]=\"2\"\n [dropdownColumnFlex]=\"1\"\n [valueColumnFlex]=\"1\"\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}::ng-deep .case-count-configuration-form .full-width,::ng-deep .case-count-configuration-form .full-width .cds--label{width:100%}\n/*!\n * Copyright 2015-2025 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: i4.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "component", type: i4.Dropdown, selector: "cds-dropdown, ibm-dropdown", inputs: ["id", "label", "hideLabel", "helperText", "placeholder", "displayValue", "clearText", "size", "type", "theme", "disabled", "readonly", "skeleton", "inline", "disableArrowKeys", "invalid", "invalidText", "warn", "warnText", "appendInline", "scrollableContainer", "itemValueKey", "selectionFeedback", "menuButtonLabel", "selectedLabel", "dropUp", "fluid"], outputs: ["selected", "onClose", "close"] }, { kind: "component", type: i4.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: ["addRowText", "addButtonType", "addRowTranslationKey", "arbitraryAmountTitles", "arbitraryValueAmount", "defaultValues", "deleteRowText", "deleteRowTranslationKey", "disabled", "dropdownColumnTitle", "dropdownItems", "dropdownWidth", "fullWidth", "hideAddButton", "hideDeleteButton", "initialAmountOfRows", "keyColumnTitle", "margin", "maxRows", "minimumAmountOfRows", "name", "required", "title", "titleTranslationKey", "tooltip", "type", "valueColumnTitle", "valuePathSelectorCaseDefinitionKey", "valuePathSelectorPrefixes", "valuePathSelectorShowCaseDefinitionSelector", "valuePathSelectorNotation", "keyColumnFlex", "dropdownColumnFlex", "valueColumnFlex"], outputs: ["valueChange", "allValuesValidEvent"] }, { kind: "component", type: i1$1.ValuePathSelectorComponent, selector: "valtimo-value-path-selector", inputs: ["name", "appendInline", "margin", "marginLg", "marginXl", "disabled", "caseDefinitionKey", "caseDefinitionVersionTag", "prefixes", "label", "tooltip", "required", "showCaseDefinitionSelector", "notation", "defaultValue", "type", "parentItem"], outputs: ["valueChangeEvent", "collectionSelected"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: WidgetTranslatePipe, name: "widgetTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3615
+ }
3616
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CaseGroupByConfigurationComponent, decorators: [{
3617
+ type: Component,
3618
+ args: [{ standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2025 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 selectedDocumentDefinition: selectedDocumentDefinition$ | async,\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 class=\"full-width\"\n >\n {{ 'path' | widgetTranslate: dataSourceKey | async }}\n\n <valtimo-value-path-selector\n formControlName=\"path\"\n [caseDefinitionKey]=\"obs.selectedDocumentDefinition\"\n [prefixes]=\"[ValuePathSelectorPrefix.DOC, ValuePathSelectorPrefix.CASE]\"\n ></valtimo-value-path-selector>\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 type=\"valuePathSelectorDropdownValue\"\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 valuePathSelectorNotation=\"dots\"\n [valuePathSelectorPrefixes]=\"[ValuePathSelectorPrefix.DOC, ValuePathSelectorPrefix.CASE]\"\n [valuePathSelectorShowCaseDefinitionSelector]=\"false\"\n [valuePathSelectorCaseDefinitionKey]=\"obs.selectedDocumentDefinition\"\n [keyColumnFlex]=\"2\"\n [dropdownColumnFlex]=\"1\"\n [valueColumnFlex]=\"1\"\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}::ng-deep .case-count-configuration-form .full-width,::ng-deep .case-count-configuration-form .full-width .cds--label{width:100%}\n/*!\n * Copyright 2015-2025 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"] }]
3619
+ }], ctorParameters: () => [{ type: i1$3.FormBuilder }, { type: i2$2.DocumentService }, { type: i3$1.TranslateService }], propDecorators: { dataSourceKey: [{
3620
+ type: Input
3621
+ }], disabled: [{
3622
+ type: Input
3623
+ }], prefillConfiguration: [{
3624
+ type: Input
3625
+ }], configurationEvent: [{
3626
+ type: Output
3627
+ }] } });
3628
+
3629
+ /*
3630
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3631
+ *
3632
+ * Licensed under EUPL, Version 1.2 (the "License");
3633
+ * you may not use this file except in compliance with the License.
3634
+ * You may obtain a copy of the License at
3635
+ *
3636
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3637
+ *
3638
+ * Unless required by applicable law or agreed to in writing, software
3639
+ * distributed under the License is distributed on an "AS IS" basis,
3640
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3641
+ * See the License for the specific language governing permissions and
3642
+ * limitations under the License.
3643
+ */
3644
+
3645
+ /*
3646
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3647
+ *
3648
+ * Licensed under EUPL, Version 1.2 (the "License");
3649
+ * you may not use this file except in compliance with the License.
3650
+ * You may obtain a copy of the License at
3651
+ *
3652
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3653
+ *
3654
+ * Unless required by applicable law or agreed to in writing, software
3655
+ * distributed under the License is distributed on an "AS IS" basis,
3656
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3657
+ * See the License for the specific language governing permissions and
3658
+ * limitations under the License.
3659
+ */
3660
+
3661
+ /*
3662
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3663
+ *
3664
+ * Licensed under EUPL, Version 1.2 (the "License");
3665
+ * you may not use this file except in compliance with the License.
3666
+ * You may obtain a copy of the License at
3667
+ *
3668
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3669
+ *
3670
+ * Unless required by applicable law or agreed to in writing, software
3671
+ * distributed under the License is distributed on an "AS IS" basis,
3672
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3673
+ * See the License for the specific language governing permissions and
3674
+ * limitations under the License.
3675
+ */
3676
+
3677
+ /*
3678
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3679
+ *
3680
+ * Licensed under EUPL, Version 1.2 (the "License");
3681
+ * you may not use this file except in compliance with the License.
3682
+ * You may obtain a copy of the License at
3683
+ *
3684
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3685
+ *
3686
+ * Unless required by applicable law or agreed to in writing, software
3687
+ * distributed under the License is distributed on an "AS IS" basis,
3688
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3689
+ * See the License for the specific language governing permissions and
3690
+ * limitations under the License.
3691
+ */
3692
+
3693
+ /*
3694
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3695
+ *
3696
+ * Licensed under EUPL, Version 1.2 (the "License");
3697
+ * you may not use this file except in compliance with the License.
3698
+ * You may obtain a copy of the License at
3699
+ *
3700
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3701
+ *
3702
+ * Unless required by applicable law or agreed to in writing, software
3703
+ * distributed under the License is distributed on an "AS IS" basis,
3704
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3705
+ * See the License for the specific language governing permissions and
3706
+ * limitations under the License.
3707
+ */
3708
+ const caseGroupByDataSourceSpecification = {
3709
+ dataSourceKey: 'case-group-by',
3710
+ configurationComponent: CaseGroupByConfigurationComponent,
3711
+ translations: {
3712
+ de: {
3713
+ title: 'Gruppe',
3714
+ documentDefinition: 'Falltyp (erforderlich)',
3715
+ documentDefinitionHelperText: 'Der Falltyp, für den die Anzahl abgerufen wird',
3716
+ path: 'Pfad',
3717
+ pathHelperText: 'Der Pfad innerhalb der Fall, deren Werte gruppiert werden sollen',
3718
+ operator: 'Operator',
3719
+ value: 'Wert',
3720
+ conditions: 'Bedingungen',
3721
+ conditionsHelperText: `Geben Sie optionale Bedingungen an, um die Gruppierung für den ausgewählten Falltyp abzurufen. ${CONDITIONS_HELPER_TEXTS.DE()}`,
3722
+ addCondition: 'Bedingung hinzufügen',
3723
+ enum: 'Anzeige der Werte',
3724
+ 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'.",
3725
+ displayValue: 'Anzeige',
3726
+ addDisplay: 'Ansicht hinzufügen',
3727
+ },
3728
+ en: {
3729
+ title: 'Group by',
3730
+ documentDefinition: 'Case type (required)',
3731
+ documentDefinitionHelperText: 'The case type for which the count is retrieved',
3732
+ path: 'Path (required)',
3733
+ pathHelperText: 'The path within the case of which the values should be grouped',
3734
+ operator: 'Operator',
3735
+ value: 'Value',
3736
+ conditions: 'Conditions',
3737
+ conditionsHelperText: `Specify optional conditions for retrieving the grouping for the selected case type. ${CONDITIONS_HELPER_TEXTS.EN()}`,
3738
+ addCondition: 'Add condition',
3739
+ enum: 'Display of values',
3740
+ 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'.",
3741
+ displayValue: 'Display',
3742
+ addDisplay: 'Add display',
3743
+ },
3744
+ nl: {
3745
+ title: 'Groepering',
3746
+ documentDefinition: 'Dossiertype (vereist)',
3747
+ documentDefinitionHelperText: 'Het dossiertype waarvoor de telling wordt opgehaald',
3748
+ path: 'Pad',
3749
+ pathHelperText: 'Het pad binnen het dossier waarvan de waardes gegroepeerd moeten worden',
3750
+ operator: 'Operator',
3751
+ value: 'Waarde',
3752
+ conditions: 'Condities',
3753
+ conditionsHelperText: `Geef optionele condities op voor het ophalen van de groepering voor het geselecteerde dossiertype. ${CONDITIONS_HELPER_TEXTS.NL()}`,
3754
+ addCondition: 'Conditie toevoegen',
3755
+ enum: 'Weergave van waardes',
3756
+ 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'.",
3757
+ displayValue: 'Weergave',
3758
+ addDisplay: 'Weergave toevoegen',
3759
+ },
3760
+ },
3761
+ };
3762
+
3763
+ /*
3764
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3765
+ *
3766
+ * Licensed under EUPL, Version 1.2 (the "License");
3767
+ * you may not use this file except in compliance with the License.
3768
+ * You may obtain a copy of the License at
3769
+ *
3770
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3771
+ *
3772
+ * Unless required by applicable law or agreed to in writing, software
3773
+ * distributed under the License is distributed on an "AS IS" basis,
3774
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3775
+ * See the License for the specific language governing permissions and
3776
+ * limitations under the License.
3777
+ */
3778
+ class CaseGroupByDataSourceModule {
3779
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CaseGroupByDataSourceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3780
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: CaseGroupByDataSourceModule, declarations: [CaseGroupByConfigurationComponent], imports: [CommonModule,
3781
+ ReactiveFormsModule,
3782
+ WidgetTranslatePipeModule,
3783
+ InputModule,
3784
+ DropdownModule,
3785
+ CarbonMultiInputModule,
3786
+ ValuePathSelectorComponent], exports: [CaseGroupByConfigurationComponent] }); }
3787
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CaseGroupByDataSourceModule, providers: [
3788
+ { provide: DATA_SOURCE_TOKEN, useValue: caseGroupByDataSourceSpecification, multi: true },
3789
+ ], imports: [CommonModule,
3790
+ ReactiveFormsModule,
3791
+ WidgetTranslatePipeModule,
3792
+ InputModule,
3793
+ DropdownModule,
3794
+ CarbonMultiInputModule,
3795
+ ValuePathSelectorComponent] }); }
3796
+ }
3797
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CaseGroupByDataSourceModule, decorators: [{
3798
+ type: NgModule,
3799
+ args: [{
3800
+ declarations: [CaseGroupByConfigurationComponent],
3801
+ imports: [
3802
+ CommonModule,
3803
+ ReactiveFormsModule,
3804
+ WidgetTranslatePipeModule,
3805
+ InputModule,
3806
+ DropdownModule,
3807
+ CarbonMultiInputModule,
3808
+ ValuePathSelectorComponent,
3809
+ ],
3810
+ exports: [CaseGroupByConfigurationComponent],
3811
+ providers: [
3812
+ { provide: DATA_SOURCE_TOKEN, useValue: caseGroupByDataSourceSpecification, multi: true },
3813
+ ],
3814
+ }]
3815
+ }] });
3816
+
3817
+ /*
3818
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3819
+ *
3820
+ * Licensed under EUPL, Version 1.2 (the "License");
3821
+ * you may not use this file except in compliance with the License.
3822
+ * You may obtain a copy of the License at
3823
+ *
3824
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3825
+ *
3826
+ * Unless required by applicable law or agreed to in writing, software
3827
+ * distributed under the License is distributed on an "AS IS" basis,
3828
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3829
+ * See the License for the specific language governing permissions and
3830
+ * limitations under the License.
3831
+ */
3832
+
3833
+ /*
3834
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3835
+ *
3836
+ * Licensed under EUPL, Version 1.2 (the "License");
3837
+ * you may not use this file except in compliance with the License.
3838
+ * You may obtain a copy of the License at
3839
+ *
3840
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3841
+ *
3842
+ * Unless required by applicable law or agreed to in writing, software
3843
+ * distributed under the License is distributed on an "AS IS" basis,
3844
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3845
+ * See the License for the specific language governing permissions and
3846
+ * limitations under the License.
3847
+ */
3848
+ class TaskCountConfigurationComponent {
3849
+ set disabled(disabledValue) {
3850
+ if (disabledValue) {
3851
+ this.form.disable();
3852
+ }
3853
+ else {
3854
+ this.form.enable();
3855
+ }
3856
+ }
3857
+ get queryConditions() {
3858
+ return this.form.get('queryConditions');
3859
+ }
3860
+ set prefillConfiguration(configurationValue) {
3861
+ if (configurationValue) {
3862
+ this.defaultConditionValues$.next(configurationValue.queryConditions.map(condition => ({
3863
+ key: condition.queryPath,
3864
+ dropdown: condition.queryOperator,
3865
+ value: condition.queryValue,
3866
+ })));
3867
+ }
3868
+ }
3869
+ constructor(fb, translateService) {
3870
+ this.fb = fb;
3871
+ this.translateService = translateService;
3872
+ this.form = this.fb.group({
3873
+ queryConditions: this.fb.control(null),
3874
+ });
3875
+ this._OPERATORS = [
3876
+ Operator.NOT_EQUAL_TO,
3877
+ Operator.EQUAL_TO,
3878
+ Operator.GREATER_THAN,
3879
+ Operator.GREATER_THAN_OR_EQUAL_TO,
3880
+ Operator.LESS_THAN,
3881
+ Operator.LESS_THAN_OR_EQUAL_TO,
3882
+ ];
3883
+ this.operatorItems$ = this.translateService
3884
+ .stream('key')
3885
+ .pipe(map(() => this._OPERATORS.map(operator => ({
3886
+ id: operator,
3887
+ content: this.translateService.instant('condition.operator.' + operator),
3888
+ selected: false,
3889
+ }))));
3890
+ this.defaultConditionValues$ = new BehaviorSubject(null);
3891
+ this.allConditionsValid$ = new BehaviorSubject(true);
3892
+ this.configurationEvent = new EventEmitter();
3893
+ this._subscriptions = new Subscription();
3894
+ }
3895
+ ngOnInit() {
3896
+ this.openFormSubscription();
3897
+ }
3898
+ ngOnDestroy() {
3899
+ this._subscriptions.unsubscribe();
3900
+ }
3901
+ conditionsValueChange(values) {
3902
+ if (values.length === 0) {
3903
+ this.queryConditions.setValue(null);
3904
+ }
3905
+ else {
3906
+ this.queryConditions.setValue(values.map(value => ({
3907
+ queryPath: value.key,
3908
+ queryOperator: value.dropdown,
3909
+ queryValue: value.value,
3910
+ })));
3911
+ }
3912
+ }
3913
+ onAllConditionsValid(allConditionsValid) {
3914
+ this.allConditionsValid$.next(allConditionsValid);
3915
+ }
3916
+ openFormSubscription() {
3917
+ this._subscriptions.add(combineLatest([
3918
+ this.form.valueChanges.pipe(startWith(this.form.value)),
3919
+ this.allConditionsValid$,
3920
+ ]).subscribe(([formValue, allConditionsValid]) => {
3921
+ this.configurationEvent.emit({
3922
+ valid: this.form.valid && allConditionsValid,
3923
+ data: formValue,
3924
+ });
3925
+ }));
3926
+ }
3927
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TaskCountConfigurationComponent, deps: [{ token: i1$3.FormBuilder }, { token: i3$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
3928
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: TaskCountConfigurationComponent, isStandalone: false, selector: "ng-component", inputs: { dataSourceKey: "dataSourceKey", disabled: "disabled", prefillConfiguration: "prefillConfiguration" }, outputs: { configurationEvent: "configurationEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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=\"task-count-configuration-form\"\n *ngIf=\"{operatorItems: operatorItems$} as obs\"\n [formGroup]=\"form\"\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 .task-count-configuration-form .conditions-label{margin-bottom:16px}::ng-deep .task-count-configuration-form .conditions-multi-input .cds--form__helper-text{font-style:italic}\n/*!\n * Copyright 2015-2025 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.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: "component", type: i4.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "component", type: i1$1.CarbonMultiInputComponent, selector: "valtimo-carbon-multi-input", inputs: ["addRowText", "addButtonType", "addRowTranslationKey", "arbitraryAmountTitles", "arbitraryValueAmount", "defaultValues", "deleteRowText", "deleteRowTranslationKey", "disabled", "dropdownColumnTitle", "dropdownItems", "dropdownWidth", "fullWidth", "hideAddButton", "hideDeleteButton", "initialAmountOfRows", "keyColumnTitle", "margin", "maxRows", "minimumAmountOfRows", "name", "required", "title", "titleTranslationKey", "tooltip", "type", "valueColumnTitle", "valuePathSelectorCaseDefinitionKey", "valuePathSelectorPrefixes", "valuePathSelectorShowCaseDefinitionSelector", "valuePathSelectorNotation", "keyColumnFlex", "dropdownColumnFlex", "valueColumnFlex"], outputs: ["valueChange", "allValuesValidEvent"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: WidgetTranslatePipe, name: "widgetTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3929
+ }
3930
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TaskCountConfigurationComponent, decorators: [{
3931
+ type: Component,
3932
+ args: [{ standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2025 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=\"task-count-configuration-form\"\n *ngIf=\"{operatorItems: operatorItems$} as obs\"\n [formGroup]=\"form\"\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 .task-count-configuration-form .conditions-label{margin-bottom:16px}::ng-deep .task-count-configuration-form .conditions-multi-input .cds--form__helper-text{font-style:italic}\n/*!\n * Copyright 2015-2025 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"] }]
3933
+ }], ctorParameters: () => [{ type: i1$3.FormBuilder }, { type: i3$1.TranslateService }], propDecorators: { dataSourceKey: [{
3934
+ type: Input
3935
+ }], disabled: [{
3936
+ type: Input
3937
+ }], prefillConfiguration: [{
3938
+ type: Input
3939
+ }], configurationEvent: [{
3940
+ type: Output
3941
+ }] } });
3942
+
3943
+ /*
3944
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3945
+ *
3946
+ * Licensed under EUPL, Version 1.2 (the "License");
3947
+ * you may not use this file except in compliance with the License.
3948
+ * You may obtain a copy of the License at
3949
+ *
3950
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3951
+ *
3952
+ * Unless required by applicable law or agreed to in writing, software
3953
+ * distributed under the License is distributed on an "AS IS" basis,
3954
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3955
+ * See the License for the specific language governing permissions and
3956
+ * limitations under the License.
3957
+ */
3958
+
3959
+ /*
3960
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3961
+ *
3962
+ * Licensed under EUPL, Version 1.2 (the "License");
3963
+ * you may not use this file except in compliance with the License.
3964
+ * You may obtain a copy of the License at
3965
+ *
3966
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3967
+ *
3968
+ * Unless required by applicable law or agreed to in writing, software
3969
+ * distributed under the License is distributed on an "AS IS" basis,
3970
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3971
+ * See the License for the specific language governing permissions and
3972
+ * limitations under the License.
3973
+ */
3974
+
3975
+ /*
3976
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3977
+ *
3978
+ * Licensed under EUPL, Version 1.2 (the "License");
3979
+ * you may not use this file except in compliance with the License.
3980
+ * You may obtain a copy of the License at
3981
+ *
3982
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3983
+ *
3984
+ * Unless required by applicable law or agreed to in writing, software
3985
+ * distributed under the License is distributed on an "AS IS" basis,
3986
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3987
+ * See the License for the specific language governing permissions and
3988
+ * limitations under the License.
3989
+ */
3990
+
3991
+ /*
3992
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3993
+ *
3994
+ * Licensed under EUPL, Version 1.2 (the "License");
3995
+ * you may not use this file except in compliance with the License.
3996
+ * You may obtain a copy of the License at
3997
+ *
3998
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3999
+ *
4000
+ * Unless required by applicable law or agreed to in writing, software
4001
+ * distributed under the License is distributed on an "AS IS" basis,
4002
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4003
+ * See the License for the specific language governing permissions and
4004
+ * limitations under the License.
4005
+ */
4006
+
4007
+ /*
4008
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
4009
+ *
4010
+ * Licensed under EUPL, Version 1.2 (the "License");
4011
+ * you may not use this file except in compliance with the License.
4012
+ * You may obtain a copy of the License at
4013
+ *
4014
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
4015
+ *
4016
+ * Unless required by applicable law or agreed to in writing, software
4017
+ * distributed under the License is distributed on an "AS IS" basis,
4018
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4019
+ * See the License for the specific language governing permissions and
4020
+ * limitations under the License.
4021
+ */
4022
+ const taskCountSpecification = {
4023
+ dataSourceKey: 'task-count',
4024
+ configurationComponent: TaskCountConfigurationComponent,
4025
+ translations: {
4026
+ de: {
4027
+ title: 'Aufgabenanzahl',
4028
+ path: 'Pfad',
4029
+ operator: 'Operator',
4030
+ value: 'Wert',
4031
+ conditions: 'Bedingungen',
4032
+ conditionsHelperText: `Geben Sie optionale Bedingungen zum Abrufen der Anzahl der Aufgaben. ${CONDITIONS_HELPER_TEXTS.DE('task:assignee')}`,
4033
+ addCondition: 'Bedingung hinzufügen',
4034
+ },
4035
+ en: {
4036
+ title: 'Task count',
4037
+ path: 'Path (required)',
4038
+ operator: 'Operator',
4039
+ value: 'Value',
4040
+ conditions: 'Conditions',
4041
+ conditionsHelperText: `Specify optional conditions for retrieving the number of tasks. ${CONDITIONS_HELPER_TEXTS.EN('task:assignee')}`,
4042
+ addCondition: 'Add condition',
4043
+ },
4044
+ nl: {
4045
+ title: 'Aantal taken',
4046
+ path: 'Pad',
4047
+ operator: 'Operator',
4048
+ value: 'Waarde',
4049
+ conditions: 'Condities',
4050
+ conditionsHelperText: `Geef optionele condities op voor het ophalen van het aantal taken. ${CONDITIONS_HELPER_TEXTS.NL('task:assignee')}}`,
4051
+ addCondition: 'Conditie toevoegen',
4052
+ },
4053
+ },
4054
+ };
4055
+
4056
+ /*
4057
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
4058
+ *
4059
+ * Licensed under EUPL, Version 1.2 (the "License");
4060
+ * you may not use this file except in compliance with the License.
4061
+ * You may obtain a copy of the License at
4062
+ *
4063
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
4064
+ *
4065
+ * Unless required by applicable law or agreed to in writing, software
4066
+ * distributed under the License is distributed on an "AS IS" basis,
4067
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4068
+ * See the License for the specific language governing permissions and
4069
+ * limitations under the License.
4070
+ */
4071
+ class TaskCountDataSourceModule {
4072
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TaskCountDataSourceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
4073
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: TaskCountDataSourceModule, declarations: [TaskCountConfigurationComponent], imports: [CommonModule,
4074
+ ReactiveFormsModule,
4075
+ WidgetTranslatePipeModule,
4076
+ InputModule,
4077
+ DropdownModule,
4078
+ CarbonMultiInputModule], exports: [TaskCountConfigurationComponent] }); }
4079
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TaskCountDataSourceModule, providers: [{ provide: DATA_SOURCE_TOKEN, useValue: taskCountSpecification, multi: true }], imports: [CommonModule,
4080
+ ReactiveFormsModule,
4081
+ WidgetTranslatePipeModule,
4082
+ InputModule,
4083
+ DropdownModule,
4084
+ CarbonMultiInputModule] }); }
4085
+ }
4086
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TaskCountDataSourceModule, decorators: [{
4087
+ type: NgModule,
4088
+ args: [{
4089
+ declarations: [TaskCountConfigurationComponent],
4090
+ imports: [
4091
+ CommonModule,
4092
+ ReactiveFormsModule,
4093
+ WidgetTranslatePipeModule,
4094
+ InputModule,
4095
+ DropdownModule,
4096
+ CarbonMultiInputModule,
4097
+ ],
4098
+ exports: [TaskCountConfigurationComponent],
4099
+ providers: [{ provide: DATA_SOURCE_TOKEN, useValue: taskCountSpecification, multi: true }],
4100
+ }]
4101
+ }] });
4102
+
4103
+ /*
4104
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
4105
+ *
4106
+ * Licensed under EUPL, Version 1.2 (the "License");
4107
+ * you may not use this file except in compliance with the License.
4108
+ * You may obtain a copy of the License at
4109
+ *
4110
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
4111
+ *
4112
+ * Unless required by applicable law or agreed to in writing, software
4113
+ * distributed under the License is distributed on an "AS IS" basis,
4114
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4115
+ * See the License for the specific language governing permissions and
4116
+ * limitations under the License.
4117
+ */
4118
+
4119
+ /*
4120
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
4121
+ *
4122
+ * Licensed under EUPL, Version 1.2 (the "License");
4123
+ * you may not use this file except in compliance with the License.
4124
+ * You may obtain a copy of the License at
4125
+ *
4126
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
4127
+ *
4128
+ * Unless required by applicable law or agreed to in writing, software
4129
+ * distributed under the License is distributed on an "AS IS" basis,
4130
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4131
+ * See the License for the specific language governing permissions and
4132
+ * limitations under the License.
4133
+ */
4134
+ class DataSourcesModule {
4135
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DataSourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
4136
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: DataSourcesModule, imports: [CaseCountDataSourceModule,
4137
+ CaseCountsDataSourceModule,
4138
+ CaseGroupByDataSourceModule,
4139
+ TaskCountDataSourceModule] }); }
4140
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DataSourcesModule, imports: [CaseCountDataSourceModule,
4141
+ CaseCountsDataSourceModule,
4142
+ CaseGroupByDataSourceModule,
4143
+ TaskCountDataSourceModule] }); }
4144
+ }
4145
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DataSourcesModule, decorators: [{
4146
+ type: NgModule,
4147
+ args: [{
4148
+ imports: [
4149
+ CaseCountDataSourceModule,
4150
+ CaseCountsDataSourceModule,
4151
+ CaseGroupByDataSourceModule,
4152
+ TaskCountDataSourceModule,
4153
+ ],
4154
+ }]
4155
+ }] });
4156
+
4157
+ /*
4158
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
4159
+ *
4160
+ * Licensed under EUPL, Version 1.2 (the "License");
4161
+ * you may not use this file except in compliance with the License.
4162
+ * You may obtain a copy of the License at
4163
+ *
4164
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
4165
+ *
4166
+ * Unless required by applicable law or agreed to in writing, software
4167
+ * distributed under the License is distributed on an "AS IS" basis,
4168
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4169
+ * See the License for the specific language governing permissions and
4170
+ * limitations under the License.
4171
+ */
4172
+ const routes = [
4173
+ {
4174
+ path: '',
4175
+ component: WidgetDashboardComponent,
4176
+ canActivate: [AuthGuardService],
4177
+ data: { title: 'Dashboard', roles: [ROLE_USER], hidePageTitle: true },
4178
+ },
4179
+ ];
4180
+ class DashboardRoutingModule {
4181
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DashboardRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
4182
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: DashboardRoutingModule, imports: [CommonModule, i2.RouterModule], exports: [RouterModule] }); }
4183
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DashboardRoutingModule, imports: [CommonModule, RouterModule.forChild(routes), RouterModule] }); }
4184
+ }
4185
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DashboardRoutingModule, decorators: [{
4186
+ type: NgModule,
4187
+ args: [{
4188
+ declarations: [],
4189
+ imports: [CommonModule, RouterModule.forChild(routes)],
4190
+ exports: [RouterModule],
4191
+ }]
4192
+ }] });
4193
+
4194
+ /*
4195
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
4196
+ *
4197
+ * Licensed under EUPL, Version 1.2 (the "License");
4198
+ * you may not use this file except in compliance with the License.
4199
+ * You may obtain a copy of the License at
4200
+ *
4201
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
4202
+ *
4203
+ * Unless required by applicable law or agreed to in writing, software
4204
+ * distributed under the License is distributed on an "AS IS" basis,
4205
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4206
+ * See the License for the specific language governing permissions and
4207
+ * limitations under the License.
4208
+ */
4209
+ // AoT requires an exported function for factories
4210
+ function HttpLoaderFactory(httpClient) {
4211
+ return new TranslateHttpLoader(httpClient);
4212
+ }
4213
+ class DashboardModule {
4214
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DashboardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
4215
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: DashboardModule, declarations: [DashboardComponent, WidgetDashboardComponent, WidgetDashboardContentComponent], imports: [CommonModule,
4216
+ DashboardRoutingModule,
4217
+ WidgetModule,
4218
+ BpmnJsDiagramModule, i3$1.TranslateModule, AlertModule,
4219
+ TaskModule,
4220
+ SpinnerModule,
4221
+ TabsModule,
4222
+ ThemeModule,
4223
+ WidgetTranslatePipeModule,
4224
+ LoadingModule,
4225
+ CarbonListModule,
4226
+ DisplayWidgetTypesModule,
4227
+ DataSourcesModule], exports: [DashboardComponent, WidgetDashboardComponent] }); }
4228
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DashboardModule, providers: [
4229
+ { provide: DISPLAY_TYPE_TOKEN, useValue: null, multi: true },
4230
+ { provide: DATA_SOURCE_TOKEN, useValue: null, multi: true },
4231
+ ], imports: [CommonModule,
4232
+ DashboardRoutingModule,
4233
+ WidgetModule,
4234
+ BpmnJsDiagramModule,
4235
+ TranslateModule.forRoot({
4236
+ loader: {
4237
+ provide: TranslateLoader,
4238
+ useFactory: HttpLoaderFactory,
4239
+ deps: [HttpClient],
4240
+ },
4241
+ }),
4242
+ AlertModule,
4243
+ TaskModule,
4244
+ SpinnerModule,
4245
+ TabsModule,
4246
+ ThemeModule,
4247
+ WidgetTranslatePipeModule,
4248
+ LoadingModule,
4249
+ CarbonListModule,
4250
+ DisplayWidgetTypesModule,
4251
+ DataSourcesModule] }); }
4252
+ }
4253
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DashboardModule, decorators: [{
4254
+ type: NgModule,
4255
+ args: [{
4256
+ declarations: [DashboardComponent, WidgetDashboardComponent, WidgetDashboardContentComponent],
4257
+ imports: [
4258
+ CommonModule,
4259
+ DashboardRoutingModule,
4260
+ WidgetModule,
4261
+ BpmnJsDiagramModule,
4262
+ TranslateModule.forRoot({
4263
+ loader: {
4264
+ provide: TranslateLoader,
4265
+ useFactory: HttpLoaderFactory,
4266
+ deps: [HttpClient],
4267
+ },
4268
+ }),
4269
+ AlertModule,
4270
+ TaskModule,
4271
+ SpinnerModule,
4272
+ TabsModule,
4273
+ ThemeModule,
4274
+ WidgetTranslatePipeModule,
4275
+ LoadingModule,
4276
+ CarbonListModule,
4277
+ DisplayWidgetTypesModule,
4278
+ DataSourcesModule,
4279
+ ],
4280
+ exports: [DashboardComponent, WidgetDashboardComponent],
4281
+ providers: [
4282
+ { provide: DISPLAY_TYPE_TOKEN, useValue: null, multi: true },
4283
+ { provide: DATA_SOURCE_TOKEN, useValue: null, multi: true },
4284
+ ],
4285
+ }]
4286
+ }] });
4287
+
4288
+ /*
4289
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
4290
+ *
4291
+ * Licensed under EUPL, Version 1.2 (the "License");
4292
+ * you may not use this file except in compliance with the License.
4293
+ * You may obtain a copy of the License at
4294
+ *
4295
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
4296
+ *
4297
+ * Unless required by applicable law or agreed to in writing, software
4298
+ * distributed under the License is distributed on an "AS IS" basis,
4299
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4300
+ * See the License for the specific language governing permissions and
4301
+ * limitations under the License.
4302
+ */
4303
+
4304
+ /*
4305
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
4306
+ *
4307
+ * Licensed under EUPL, Version 1.2 (the "License");
4308
+ * you may not use this file except in compliance with the License.
4309
+ * You may obtain a copy of the License at
4310
+ *
4311
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
4312
+ *
4313
+ * Unless required by applicable law or agreed to in writing, software
4314
+ * distributed under the License is distributed on an "AS IS" basis,
4315
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4316
+ * See the License for the specific language governing permissions and
4317
+ * limitations under the License.
4318
+ */
4319
+
4320
+ /*
4321
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
4322
+ *
4323
+ * Licensed under EUPL, Version 1.2 (the "License");
4324
+ * you may not use this file except in compliance with the License.
4325
+ * You may obtain a copy of the License at
4326
+ *
4327
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
4328
+ *
4329
+ * Unless required by applicable law or agreed to in writing, software
4330
+ * distributed under the License is distributed on an "AS IS" basis,
4331
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4332
+ * See the License for the specific language governing permissions and
4333
+ * limitations under the License.
4334
+ */
4335
+ /*
4336
+ * Public API Surface of dashboard
4337
+ */
4338
+
4339
+ /**
4340
+ * Generated bundle index. Do not edit.
4341
+ */
4342
+
4343
+ export { BigNumberConfigurationComponent, BigNumberDisplayComponent, BigNumberModule, CaseCountConfigurationComponent, CaseCountDataSourceModule, CaseCountsConfigurationComponent, CaseCountsDataSourceModule, CaseGroupByConfigurationComponent, CaseGroupByDataSourceModule, DATA_FEATURES, DATA_SOURCE_TOKEN, DISPLAY_TYPE_TOKEN, DashboardComponent, DashboardModule, DashboardService, DataSourcesModule, DisplayWidgetTypesModule, DonutConfigurationComponent, DonutDisplayComponent, DonutModule, GaugeConfigurationComponent, GaugeDisplayComponent, GaugeModule, HttpLoaderFactory, MeterConfigurationComponent, MeterDisplayComponent, MeterModule, TaskCountConfigurationComponent, TaskCountDataSourceModule, WIDGET_1X_HEIGHT, WIDGET_1X_MIN_WIDTH, WidgetDashboardComponent, WidgetDashboardContentComponent, WidgetService, WidgetSeverity, WidgetTranslatePipe, WidgetTranslatePipeModule, WidgetTranslationService, bigNumberSpecification, caseCountDataSourceSpecification, caseCountsDataSourceSpecification, caseGroupByDataSourceSpecification, donutSpecification, gaugeSpecification, meterSpecification, taskCountSpecification };
4344
+ //# sourceMappingURL=valtimo-dashboard.mjs.map