@valtimo/iko 13.2.1

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 (100) hide show
  1. package/README.md +31 -0
  2. package/fesm2022/valtimo-iko.mjs +3363 -0
  3. package/fesm2022/valtimo-iko.mjs.map +1 -0
  4. package/index.d.ts +6 -0
  5. package/lib/components/iko-details/iko-details.component.d.ts +25 -0
  6. package/lib/components/iko-details/iko-details.component.d.ts.map +1 -0
  7. package/lib/components/iko-list/iko-list.component.d.ts +23 -0
  8. package/lib/components/iko-list/iko-list.component.d.ts.map +1 -0
  9. package/lib/components/iko-management/iko-management.component.d.ts +26 -0
  10. package/lib/components/iko-management/iko-management.component.d.ts.map +1 -0
  11. package/lib/components/iko-management-api/iko-management-api.component.d.ts +46 -0
  12. package/lib/components/iko-management-api/iko-management-api.component.d.ts.map +1 -0
  13. package/lib/components/iko-management-details/components/list/iko-management-list.component.d.ts +58 -0
  14. package/lib/components/iko-management-details/components/list/iko-management-list.component.d.ts.map +1 -0
  15. package/lib/components/iko-management-details/components/list-modal/list-modal.component.d.ts +67 -0
  16. package/lib/components/iko-management-details/components/list-modal/list-modal.component.d.ts.map +1 -0
  17. package/lib/components/iko-management-details/components/search-actions/iko-management-search-actions.component.d.ts +32 -0
  18. package/lib/components/iko-management-details/components/search-actions/iko-management-search-actions.component.d.ts.map +1 -0
  19. package/lib/components/iko-management-details/components/search-actions/search-action-modal/search-action-modal.component.d.ts +25 -0
  20. package/lib/components/iko-management-details/components/search-actions/search-action-modal/search-action-modal.component.d.ts.map +1 -0
  21. package/lib/components/iko-management-details/components/search-fields/iko-management-search-fields.component.d.ts +44 -0
  22. package/lib/components/iko-management-details/components/search-fields/iko-management-search-fields.component.d.ts.map +1 -0
  23. package/lib/components/iko-management-details/components/search-fields/search-field-modal/search-field-modal.component.d.ts +73 -0
  24. package/lib/components/iko-management-details/components/search-fields/search-field-modal/search-field-modal.component.d.ts.map +1 -0
  25. package/lib/components/iko-management-details/components/tab-detail-modal/iko-management-tab-details-modal.component.d.ts +41 -0
  26. package/lib/components/iko-management-details/components/tab-detail-modal/iko-management-tab-details-modal.component.d.ts.map +1 -0
  27. package/lib/components/iko-management-details/components/tabs/iko-management-tabs.component.d.ts +61 -0
  28. package/lib/components/iko-management-details/components/tabs/iko-management-tabs.component.d.ts.map +1 -0
  29. package/lib/components/iko-management-details/components/widgets/iko-management-widgets.component.d.ts +29 -0
  30. package/lib/components/iko-management-details/components/widgets/iko-management-widgets.component.d.ts.map +1 -0
  31. package/lib/components/iko-management-details/iko-management-details.component.d.ts +35 -0
  32. package/lib/components/iko-management-details/iko-management-details.component.d.ts.map +1 -0
  33. package/lib/components/iko-search/iko-search.component.d.ts +34 -0
  34. package/lib/components/iko-search/iko-search.component.d.ts.map +1 -0
  35. package/lib/components/tabs/iko-widget/iko-widget.component.d.ts +24 -0
  36. package/lib/components/tabs/iko-widget/iko-widget.component.d.ts.map +1 -0
  37. package/lib/components/tabs/tabs.constants.d.ts +5 -0
  38. package/lib/components/tabs/tabs.constants.d.ts.map +1 -0
  39. package/lib/components/widget-collection/iko-widget-collection.component.d.ts +22 -0
  40. package/lib/components/widget-collection/iko-widget-collection.component.d.ts.map +1 -0
  41. package/lib/components/widget-collection/index.d.ts +2 -0
  42. package/lib/components/widget-collection/index.d.ts.map +1 -0
  43. package/lib/components/widget-custom/iko-widget-custom.component.d.ts +12 -0
  44. package/lib/components/widget-custom/iko-widget-custom.component.d.ts.map +1 -0
  45. package/lib/components/widget-custom/index.d.ts +2 -0
  46. package/lib/components/widget-custom/index.d.ts.map +1 -0
  47. package/lib/components/widget-field/iko-widget-field.component.d.ts +19 -0
  48. package/lib/components/widget-field/iko-widget-field.component.d.ts.map +1 -0
  49. package/lib/components/widget-field/index.d.ts +2 -0
  50. package/lib/components/widget-field/index.d.ts.map +1 -0
  51. package/lib/components/widget-formio/iko-widget-formio.component.d.ts +14 -0
  52. package/lib/components/widget-formio/iko-widget-formio.component.d.ts.map +1 -0
  53. package/lib/components/widget-formio/index.d.ts +2 -0
  54. package/lib/components/widget-formio/index.d.ts.map +1 -0
  55. package/lib/components/widget-table/iko-widget-table.component.d.ts +25 -0
  56. package/lib/components/widget-table/iko-widget-table.component.d.ts.map +1 -0
  57. package/lib/components/widget-table/index.d.ts +2 -0
  58. package/lib/components/widget-table/index.d.ts.map +1 -0
  59. package/lib/constants/iko-management.constants.d.ts +4 -0
  60. package/lib/constants/iko-management.constants.d.ts.map +1 -0
  61. package/lib/constants/index.d.ts +2 -0
  62. package/lib/constants/index.d.ts.map +1 -0
  63. package/lib/iko-routing.module.d.ts +9 -0
  64. package/lib/iko-routing.module.d.ts.map +1 -0
  65. package/lib/iko.module.d.ts +15 -0
  66. package/lib/iko.module.d.ts.map +1 -0
  67. package/lib/mock/iko.mock.d.ts +4 -0
  68. package/lib/mock/iko.mock.d.ts.map +1 -0
  69. package/lib/mock/index.d.ts +2 -0
  70. package/lib/mock/index.d.ts.map +1 -0
  71. package/lib/models/iko-management-list.model.d.ts +26 -0
  72. package/lib/models/iko-management-list.model.d.ts.map +1 -0
  73. package/lib/models/iko-management.model.d.ts +137 -0
  74. package/lib/models/iko-management.model.d.ts.map +1 -0
  75. package/lib/models/iko-menu.model.d.ts +19 -0
  76. package/lib/models/iko-menu.model.d.ts.map +1 -0
  77. package/lib/models/iko-search-field.model.d.ts +40 -0
  78. package/lib/models/iko-search-field.model.d.ts.map +1 -0
  79. package/lib/models/iko-widget.model.d.ts +6 -0
  80. package/lib/models/iko-widget.model.d.ts.map +1 -0
  81. package/lib/models/iko.model.d.ts +51 -0
  82. package/lib/models/iko.model.d.ts.map +1 -0
  83. package/lib/models/index.d.ts +7 -0
  84. package/lib/models/index.d.ts.map +1 -0
  85. package/lib/services/iko-api.service.d.ts +28 -0
  86. package/lib/services/iko-api.service.d.ts.map +1 -0
  87. package/lib/services/iko-management-api.service.d.ts +59 -0
  88. package/lib/services/iko-management-api.service.d.ts.map +1 -0
  89. package/lib/services/iko-management-widget-api.service.d.ts +24 -0
  90. package/lib/services/iko-management-widget-api.service.d.ts.map +1 -0
  91. package/lib/services/iko-menu.service.d.ts +13 -0
  92. package/lib/services/iko-menu.service.d.ts.map +1 -0
  93. package/lib/services/iko-tab.service.d.ts +21 -0
  94. package/lib/services/iko-tab.service.d.ts.map +1 -0
  95. package/lib/services/index.d.ts +6 -0
  96. package/lib/services/index.d.ts.map +1 -0
  97. package/package.json +23 -0
  98. package/public-api.d.ts +2 -0
  99. package/public-api.d.ts.map +1 -0
  100. package/valtimo-iko.d.ts.map +1 -0
@@ -0,0 +1,3363 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, ViewContainerRef, ViewChild, signal, EventEmitter, Output, Inject, computed, NgModule } from '@angular/core';
3
+ import * as i4 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+ import * as i2 from '@valtimo/shared';
6
+ import { BaseApiService, getDisplayTypeParametersView, ROLE_ADMIN, IKO_TOKEN } from '@valtimo/shared';
7
+ import * as i3 from '@angular/router';
8
+ import { RouterModule } from '@angular/router';
9
+ import { AuthGuardService } from '@valtimo/security';
10
+ import * as i1$2 from '@valtimo/components';
11
+ import { CarbonListModule, EllipsisPipe, FormIoModule, RenderInPageHeaderDirective, ViewType, runAfterCarbonModalClosed, ValtimoCdsModalDirective, SelectModule, CarbonMultiInputModule, InputLabelModule, CARBON_CONSTANTS, ValuePathSelectorPrefix, ConfirmationModalModule } from '@valtimo/components';
12
+ import * as i6 from 'carbon-components-angular';
13
+ import { InputModule, PaginationModule, TilesModule, ButtonModule, TabsModule, ModalModule, LayerModule, ToggleModule, TooltipModule, NumberModule, IconModule, DropdownModule } from 'carbon-components-angular';
14
+ import { BehaviorSubject, filter, of, switchMap, combineLatest, tap, map as map$1, Subscription, delay, startWith, distinctUntilChanged, take } from 'rxjs';
15
+ import * as i2$1 from '@valtimo/layout';
16
+ import { WidgetCollectionComponent, WidgetCustomComponent, WidgetFieldComponent, WidgetFormioComponent, WidgetTableComponent, WidgetType, WidgetContainerComponent, WIDGET_MANAGEMENT_SERVICE, WidgetManagementComponent } from '@valtimo/layout';
17
+ import * as i3$1 from '@ngx-translate/core';
18
+ import { TranslateModule, TranslatePipe } from '@ngx-translate/core';
19
+ import * as i1 from '@angular/common/http';
20
+ import { HttpParams } from '@angular/common/http';
21
+ import { map, take as take$1 } from 'rxjs/operators';
22
+ import * as i1$1 from 'ngx-logger';
23
+ import { isEqual } from 'lodash';
24
+ import * as i2$2 from '@angular/forms';
25
+ import { Validators, ReactiveFormsModule, FormsModule } from '@angular/forms';
26
+ import { TrashCan16, InformationFilled16, Search16 } from '@carbon/icons';
27
+ import { toObservable } from '@angular/core/rxjs-interop';
28
+ import { runAfterCarbonModalClosed as runAfterCarbonModalClosed$1, ValtimoCdsModalDirective as ValtimoCdsModalDirective$1, SelectModule as SelectModule$1, CarbonMultiInputModule as CarbonMultiInputModule$1, InputLabelModule as InputLabelModule$1, AutoKeyInputComponent } from 'dist/valtimo/components';
29
+
30
+ /*
31
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
32
+ *
33
+ * Licensed under EUPL, Version 1.2 (the "License");
34
+ * you may not use this file except in compliance with the License.
35
+ * You may obtain a copy of the License at
36
+ *
37
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
38
+ *
39
+ * Unless required by applicable law or agreed to in writing, software
40
+ * distributed under the License is distributed on an "AS IS" basis,
41
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
42
+ * See the License for the specific language governing permissions and
43
+ * limitations under the License.
44
+ */
45
+ class IkoApiService extends BaseApiService {
46
+ get cachedMenuItems$() {
47
+ return this._cachedMenuItems$.asObservable();
48
+ }
49
+ setCachedMenuItems(items) {
50
+ this._cachedMenuItems$.next(items);
51
+ }
52
+ constructor(httpClient, configService) {
53
+ super(httpClient, configService);
54
+ this.httpClient = httpClient;
55
+ this.configService = configService;
56
+ this._cachedMenuItems$ = new BehaviorSubject([]);
57
+ }
58
+ getIkoDataAggregates(key, title, page = 0, size = 10000, sort = 'title,asc') {
59
+ const params = new URLSearchParams();
60
+ if (key)
61
+ params.append('key', key);
62
+ if (title)
63
+ params.append('title', title);
64
+ params.append('page', page.toString());
65
+ params.append('size', size.toString());
66
+ params.append('sort', sort);
67
+ return this.httpClient.get(this.getApiUrl(`/v1/iko-data-aggregate?${params.toString()}`));
68
+ }
69
+ getIkoDetailTabs(ikoDataAggregateKey) {
70
+ return this.httpClient.get(this.getApiUrl(`/v1/iko-data-aggregate/${ikoDataAggregateKey}/tab`));
71
+ }
72
+ getIkoDataRequests(ikoDataAggregateKey) {
73
+ return this.httpClient.get(this.getApiUrl(`/v1/iko-data-aggregate/${ikoDataAggregateKey}/data-request`));
74
+ }
75
+ getIkoWidget(ikoDataAggregateKey, tabKey) {
76
+ return this.httpClient.get(this.getApiUrl(`/v1/iko-data-aggregate/${ikoDataAggregateKey}/tab/${tabKey}/widget`));
77
+ }
78
+ getIkoWidgetData(ikoDataAggregateKey, tabKey, widgetId, id) {
79
+ return this.httpClient.get(this.getApiUrl(`/v1/iko-data-aggregate/${ikoDataAggregateKey}/tab/${tabKey}/widget/${widgetId}/data?id=${id}`));
80
+ }
81
+ searchIkoDataRequest(ikoKey, paramKey, filters) {
82
+ return this.httpClient.post(this.getApiUrl(`/v1/iko-data-aggregate/${ikoKey}/data-request/${paramKey}/search`), filters);
83
+ }
84
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoApiService, deps: [{ token: i1.HttpClient }, { token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
85
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoApiService, providedIn: 'root' }); }
86
+ }
87
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoApiService, decorators: [{
88
+ type: Injectable,
89
+ args: [{
90
+ providedIn: 'root',
91
+ }]
92
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.ConfigService }] });
93
+
94
+ /*
95
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
96
+ *
97
+ * Licensed under EUPL, Version 1.2 (the "License");
98
+ * you may not use this file except in compliance with the License.
99
+ * You may obtain a copy of the License at
100
+ *
101
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
102
+ *
103
+ * Unless required by applicable law or agreed to in writing, software
104
+ * distributed under the License is distributed on an "AS IS" basis,
105
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
106
+ * See the License for the specific language governing permissions and
107
+ * limitations under the License.
108
+ */
109
+ class IkoTabService {
110
+ get activeTab$() {
111
+ return this._activeTab$.pipe(filter(tab => !!tab));
112
+ }
113
+ get activeTabKey$() {
114
+ return this.activeTab$.pipe(map(tab => tab.key));
115
+ }
116
+ get dataAggregateKey$() {
117
+ return this._dataAggregateKey$.pipe(filter(key => !!key));
118
+ }
119
+ get entryId$() {
120
+ return this._entryId$.pipe(filter(key => !!key));
121
+ }
122
+ constructor(logger) {
123
+ this.logger = logger;
124
+ this._activeTab$ = new BehaviorSubject(null);
125
+ this._dataAggregateKey$ = new BehaviorSubject(null);
126
+ this._entryId$ = new BehaviorSubject(null);
127
+ }
128
+ setActiveTab(tab) {
129
+ this._activeTab$.next(tab);
130
+ this.logger.debug(`Active IKO tab set to ${JSON.stringify(tab)}`);
131
+ }
132
+ setDataAggregateKey(key) {
133
+ this._dataAggregateKey$.next(key);
134
+ this.logger.debug(`Active IKO data aggregate key set to ${key}`);
135
+ }
136
+ setEntryId(id) {
137
+ this._entryId$.next(id);
138
+ this.logger.debug(`Active IKO entry id set to ${id}`);
139
+ }
140
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoTabService, deps: [{ token: i1$1.NGXLogger }], target: i0.ɵɵFactoryTarget.Injectable }); }
141
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoTabService, providedIn: 'root' }); }
142
+ }
143
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoTabService, decorators: [{
144
+ type: Injectable,
145
+ args: [{ providedIn: 'root' }]
146
+ }], ctorParameters: () => [{ type: i1$1.NGXLogger }] });
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
+ class IkoManagementApiService extends BaseApiService {
164
+ constructor(httpClient, configService) {
165
+ super(httpClient, configService);
166
+ this.httpClient = httpClient;
167
+ this.configService = configService;
168
+ }
169
+ getIkoDataAggregates(key, title, page = 0, size = 100, sort = 'title,asc') {
170
+ let params = new HttpParams().set('page', page).set('size', size).set('sort', sort);
171
+ if (key)
172
+ params = params.set('key', key);
173
+ if (title)
174
+ params = params.set('title', title);
175
+ return this.httpClient.get(this.getApiUrl('/v1/iko-data-aggregate'), { params });
176
+ }
177
+ getIkoDataAggregate(key) {
178
+ return this.httpClient.get(this.getApiUrl(`/v1/iko-data-aggregate/${key}`));
179
+ }
180
+ createIkoDataAggregate(key, body) {
181
+ return this.httpClient.post(this.getApiUrl(`/v1/iko-data-aggregate/${key}`), body);
182
+ }
183
+ updateIkoDataAggregate(key, body) {
184
+ return this.httpClient.put(this.getApiUrl(`/v1/iko-data-aggregate/${key}`), body);
185
+ }
186
+ deleteIkoDataAggregate(key) {
187
+ return this.httpClient.delete(this.getApiUrl(`/v1/iko-data-aggregate/${key}`));
188
+ }
189
+ getIkoDataAggregatePropertyFields(type) {
190
+ return this.httpClient.get(this.getApiUrl(`/v1/iko-property-fields/${type}/data-aggregate`));
191
+ }
192
+ getManagementIkoDataAggregates(key, title, ikoRepositoryConfigKey, page = 0, size = 100, sort = 'title,asc') {
193
+ let params = new HttpParams().set('page', page).set('size', size).set('sort', sort);
194
+ if (key)
195
+ params = params.set('key', key);
196
+ if (title)
197
+ params = params.set('title', title);
198
+ if (ikoRepositoryConfigKey)
199
+ params = params.set('ikoRepositoryConfigKey', ikoRepositoryConfigKey);
200
+ return this.httpClient.get(this.getApiUrl(`management/v1/iko-data-aggregate`), { params });
201
+ }
202
+ getManagementIkoDataRequests(aggregateKey) {
203
+ return this.httpClient.get(this.getApiUrl(`management/v1/iko-data-aggregate/${aggregateKey}/data-request`));
204
+ }
205
+ getIkoDataRequest(aggregateKey, key) {
206
+ return this.httpClient.get(this.getApiUrl(`management/v1/iko-data-aggregate/${aggregateKey}/data-request/${key}`));
207
+ }
208
+ createIkoDataRequest(aggregateKey, key, body) {
209
+ return this.httpClient.post(this.getApiUrl(`management/v1/iko-data-aggregate/${aggregateKey}/data-request/${key}`), body);
210
+ }
211
+ updateIkoDataRequests(aggregateKey, body) {
212
+ return this.httpClient.put(this.getApiUrl(`management/v1/iko-data-aggregate/${aggregateKey}/data-request`), body);
213
+ }
214
+ updateIkoDataRequest(aggregateKey, actionKey, body) {
215
+ return this.httpClient.put(this.getApiUrl(`management/v1/iko-data-aggregate/${aggregateKey}/data-request/${actionKey}`), body);
216
+ }
217
+ deleteIkoDataRequest(aggregateKey, key) {
218
+ return this.httpClient.delete(this.getApiUrl(`management/v1/iko-data-aggregate/${aggregateKey}/data-request/${key}`));
219
+ }
220
+ getIkoDataRequestPropertyFields(type) {
221
+ return this.httpClient.get(this.getApiUrl(`/v1/iko-property-fields/${type}/data-request`));
222
+ }
223
+ getIkoRepositoryConfigs() {
224
+ return this.httpClient.get(this.getApiUrl(`/management/v1/iko`));
225
+ }
226
+ getIkoRepositoryConfig(key) {
227
+ return this.httpClient.get(this.getApiUrl(`/management/v1/iko/${key}`));
228
+ }
229
+ createIkoRepositoryConfig(key, body) {
230
+ return this.httpClient.post(this.getApiUrl(`management/v1/iko/${key}`), body);
231
+ }
232
+ updateIkoRepositoryConfig(key, body) {
233
+ return this.httpClient.put(this.getApiUrl(`/v1/iko/${key}`), body);
234
+ }
235
+ deleteIkoRepositoryConfig(key) {
236
+ return this.httpClient.delete(this.getApiUrl(`/v1/iko/${key}`));
237
+ }
238
+ getIkoRepositoryConfigPropertyFields(type) {
239
+ return this.httpClient.get(this.getApiUrl(`/management/v1/iko-property-fields/${type}/repository-config`));
240
+ }
241
+ getIkoRepositoryTypes() {
242
+ return this.httpClient.get(this.getApiUrl(`/management/v1/iko-types`));
243
+ }
244
+ getIkoTabs(aggregateKey) {
245
+ return this.httpClient.get(this.getApiUrl(`/v1/iko-data-aggregate/${aggregateKey}/tab`));
246
+ }
247
+ getIkoTab(aggregateKey, tabKey) {
248
+ return this.httpClient.get(this.getApiUrl(`/management/v1/iko-data-aggregate/${aggregateKey}/tab/${tabKey}`));
249
+ }
250
+ createIkoTab(aggregateKey, tabKey, body) {
251
+ return this.httpClient.post(this.getApiUrl(`/management/v1/iko-data-aggregate/${aggregateKey}/tab/${tabKey}`), body);
252
+ }
253
+ updateIkoTabs(aggregateKey, body) {
254
+ return this.httpClient.put(this.getApiUrl(`/management/v1/iko-data-aggregate/${aggregateKey}/tab`), body);
255
+ }
256
+ updateIkoTab(aggregateKey, tabKey, body) {
257
+ return this.httpClient.put(this.getApiUrl(`/management/v1/iko-data-aggregate/${aggregateKey}/tab/${tabKey}`), body);
258
+ }
259
+ deleteIkoTab(aggregateKey, tabKey) {
260
+ return this.httpClient.delete(this.getApiUrl(`/management/v1/iko-data-aggregate/${aggregateKey}/tab/${tabKey}`));
261
+ }
262
+ // public getIkoWidgets(aggregateKey: string, tabKey: string): Observable<BasicWidget[]> {
263
+ // return this.httpClient.get<BasicWidget[]>(
264
+ // this.getApiUrl(`/v1/iko-data-aggregate/${aggregateKey}/tab/${tabKey}/widget`)
265
+ // );
266
+ // }
267
+ getIkoWidget(aggregateKey, tabKey, widgetKey) {
268
+ return this.httpClient.get(this.getApiUrl(`/v1/iko-data-aggregate/${aggregateKey}/tab/${tabKey}/widget/${widgetKey}`));
269
+ }
270
+ // public createIkoWidget(
271
+ // aggregateKey: string,
272
+ // tabKey: string,
273
+ // widgetKey: string,
274
+ // body: WidgetDto
275
+ // ): Observable<WidgetDto> {
276
+ // return this.httpClient.post<WidgetDto>(
277
+ // this.getApiUrl(`/v1/iko-data-aggregate/${aggregateKey}/tab/${tabKey}/widget/${widgetKey}`),
278
+ // body
279
+ // );
280
+ // }
281
+ // public updateIkoWidgets(
282
+ // aggregateKey: string,
283
+ // tabKey: string,
284
+ // body: WidgetDto[]
285
+ // ): Observable<WidgetDto[]> {
286
+ // return this.httpClient.put<WidgetDto[]>(
287
+ // this.getApiUrl(`/v1/iko-data-aggregate/${aggregateKey}/tab/${tabKey}/widget`),
288
+ // body
289
+ // );
290
+ // }
291
+ // public deleteIkoWidget(
292
+ // aggregateKey: string,
293
+ // tabKey: string,
294
+ // widgetKey: string
295
+ // ): Observable<void> {
296
+ // return this.httpClient.delete<void>(
297
+ // this.getApiUrl(`/v1/iko-data-aggregate/${aggregateKey}/tab/${tabKey}/widget/${widgetKey}`)
298
+ // );
299
+ // }
300
+ getIkoSearchFields(aggregateKey, requestKey) {
301
+ return this.httpClient.get(this.getApiUrl(`management/v1/iko-data-aggregate/${aggregateKey}/data-request/${requestKey}/search-field`));
302
+ }
303
+ getIkoSearchField(aggregateKey, requestKey, key) {
304
+ return this.httpClient.get(this.getApiUrl(`/v1/iko-data-aggregate/${aggregateKey}/data-request/${requestKey}/search-field/${key}`));
305
+ }
306
+ createIkoSearchField(aggregateKey, requestKey, key, body) {
307
+ return this.httpClient.post(this.getApiUrl(`management/v1/iko-data-aggregate/${aggregateKey}/data-request/${requestKey}/search-field/${key}`), body);
308
+ }
309
+ updateIkoSearchFields(aggregateKey, requestKey, body) {
310
+ return this.httpClient.put(this.getApiUrl(`management/v1/iko-data-aggregate/${aggregateKey}/data-request/${requestKey}/search-field`), body);
311
+ }
312
+ updateIkoSearchField(aggregateKey, requestKey, fieldKey, body) {
313
+ return this.httpClient.put(this.getApiUrl(`management/v1/iko-data-aggregate/${aggregateKey}/data-request/${requestKey}/search-field/${fieldKey}`), body);
314
+ }
315
+ deleteIkoSearchField(aggregateKey, requestKey, key) {
316
+ return this.httpClient.delete(this.getApiUrl(`management/v1/iko-data-aggregate/${aggregateKey}/data-request/${requestKey}/search-field/${key}`));
317
+ }
318
+ getIkoListColumns(aggregateKey) {
319
+ return this.httpClient.get(this.getApiUrl(`/management/v1/iko-data-aggregate/${aggregateKey}/column`));
320
+ }
321
+ getIkoListColumn(aggregateKey, columnKey) {
322
+ return this.httpClient.get(this.getApiUrl(`/management/v1/iko-data-aggregate/${aggregateKey}/column/${columnKey}`));
323
+ }
324
+ createIkoListColumn(aggregateKey, columnKey, body) {
325
+ return this.httpClient.post(this.getApiUrl(`/management/v1/iko-data-aggregate/${aggregateKey}/column/${columnKey}`), body);
326
+ }
327
+ updateListColumn(aggregateKey, columnKey, body) {
328
+ return this.httpClient.put(this.getApiUrl(`/management/v1/iko-data-aggregate/${aggregateKey}/column/${columnKey}`), body);
329
+ }
330
+ updateIkoListColumnOrder(aggregateKey, body) {
331
+ return this.httpClient.put(this.getApiUrl(`/management/v1/iko-data-aggregate/${aggregateKey}/column`), body);
332
+ }
333
+ deleteIkoListColumn(aggregateKey, columnKey) {
334
+ return this.httpClient.delete(this.getApiUrl(`/management/v1/iko-data-aggregate/${aggregateKey}/column/${columnKey}`));
335
+ }
336
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementApiService, deps: [{ token: i1.HttpClient }, { token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
337
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementApiService, providedIn: 'root' }); }
338
+ }
339
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementApiService, decorators: [{
340
+ type: Injectable,
341
+ args: [{
342
+ providedIn: 'root',
343
+ }]
344
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.ConfigService }] });
345
+
346
+ /*
347
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
348
+ *
349
+ * Licensed under EUPL, Version 1.2 (the "License");
350
+ * you may not use this file except in compliance with the License.
351
+ * You may obtain a copy of the License at
352
+ *
353
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
354
+ *
355
+ * Unless required by applicable law or agreed to in writing, software
356
+ * distributed under the License is distributed on an "AS IS" basis,
357
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
358
+ * See the License for the specific language governing permissions and
359
+ * limitations under the License.
360
+ */
361
+ class IkoMenuService {
362
+ constructor(ikoApiService) {
363
+ this.ikoApiService = ikoApiService;
364
+ this.appendIkoMenuItems = (menuItems) => {
365
+ const ikoExists = menuItems.some(item => item.title === 'IKO');
366
+ if (ikoExists)
367
+ return of(menuItems);
368
+ return this.ikoApiService.getIkoDataAggregates().pipe(map(ikoItems => {
369
+ this.ikoApiService.setCachedMenuItems(ikoItems.content);
370
+ const ikoSubMenu = ikoItems.content.map((item, index) => ({
371
+ link: ['/iko', item.key],
372
+ title: item.title,
373
+ sequence: index,
374
+ show: true,
375
+ }));
376
+ const ikoMenu = {
377
+ title: 'IKO',
378
+ iconClass: 'icon mdi mdi-account',
379
+ show: true,
380
+ sequence: this.getIkoSequenceAfterCases(menuItems),
381
+ children: ikoSubMenu,
382
+ };
383
+ const adminMenuItem = menuItems.find(item => item.title.toUpperCase().includes('ADMIN'));
384
+ if (adminMenuItem) {
385
+ adminMenuItem.children = [
386
+ ...adminMenuItem.children,
387
+ {
388
+ title: ikoMenu.title,
389
+ show: true,
390
+ sequence: adminMenuItem.children[adminMenuItem.children.length - 1].sequence + 1,
391
+ link: ['/iko-management'],
392
+ },
393
+ ];
394
+ }
395
+ return [...menuItems, ikoMenu].sort((a, b) => a.sequence - b.sequence);
396
+ }));
397
+ };
398
+ }
399
+ getIkoSequenceAfterCases(menuItems) {
400
+ const casesItem = menuItems.find(item => item.title === 'Cases' || item.title === 'Dossiers');
401
+ const casesSequence = Number(casesItem?.sequence ?? 0);
402
+ return casesSequence + 0.5;
403
+ }
404
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoMenuService, deps: [{ token: IkoApiService }], target: i0.ɵɵFactoryTarget.Injectable }); }
405
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoMenuService, providedIn: 'root' }); }
406
+ }
407
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoMenuService, decorators: [{
408
+ type: Injectable,
409
+ args: [{ providedIn: 'root' }]
410
+ }], ctorParameters: () => [{ type: IkoApiService }] });
411
+
412
+ class IkoWidgetManagementApiService extends BaseApiService {
413
+ get _params() {
414
+ return this._params$.getValue();
415
+ }
416
+ get params$() {
417
+ return this._params$.pipe(filter(params => !!params));
418
+ }
419
+ constructor(httpClient, configService) {
420
+ super(httpClient, configService);
421
+ this.httpClient = httpClient;
422
+ this.configService = configService;
423
+ this._params$ = new BehaviorSubject(null);
424
+ this.valueResolverApi$ = new BehaviorSubject('');
425
+ }
426
+ initParams(serviceParams) {
427
+ if (!isEqual(serviceParams, this._params))
428
+ this._params$.next(serviceParams);
429
+ }
430
+ getWidgetConfiguration() {
431
+ return this.params$.pipe(filter((params) => !!params), switchMap((params) => this.httpClient.get(this.getApiUrl(`/v1/iko-data-aggregate/${params?.aggregateKey}/tab/${params?.widgetTabKey}/widget`))));
432
+ }
433
+ updateWidgetConfiguration(widgets) {
434
+ return this.params$.pipe(filter((params) => !!params), switchMap((params) => this.httpClient.put(this.getApiUrl(`management/v1/iko-data-aggregate/${params?.aggregateKey}/tab/${params?.widgetTabKey}/widget`), widgets)));
435
+ }
436
+ deleteWidget(widget) {
437
+ return this.params$.pipe(filter((params) => !!params), switchMap((params) => this.httpClient.delete(this.getApiUrl(`management/v1/iko-data-aggregate/${params?.aggregateKey}/tab/${params?.widgetTabKey}/widget/${widget.key}`))));
438
+ }
439
+ updateWidget(widget) {
440
+ return this.params$.pipe(filter((params) => !!params), switchMap((params) => this.httpClient.put(this.getApiUrl(`management/v1/iko-data-aggregate/${params?.aggregateKey}/tab/${params?.widgetTabKey}/widget/${widget.key}`), widget)));
441
+ }
442
+ createWidget(widget) {
443
+ return this.params$.pipe(filter((params) => !!params), switchMap((params) => this.httpClient.post(this.getApiUrl(`management/v1/iko-data-aggregate/${params?.aggregateKey}/tab/${params?.widgetTabKey}/widget/${widget.key}`), widget)));
444
+ }
445
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoWidgetManagementApiService, deps: [{ token: i1.HttpClient }, { token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
446
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoWidgetManagementApiService }); }
447
+ }
448
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoWidgetManagementApiService, decorators: [{
449
+ type: Injectable
450
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.ConfigService }] });
451
+
452
+ /*
453
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
454
+ *
455
+ * Licensed under EUPL, Version 1.2 (the "License");
456
+ * you may not use this file except in compliance with the License.
457
+ * You may obtain a copy of the License at
458
+ *
459
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
460
+ *
461
+ * Unless required by applicable law or agreed to in writing, software
462
+ * distributed under the License is distributed on an "AS IS" basis,
463
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
464
+ * See the License for the specific language governing permissions and
465
+ * limitations under the License.
466
+ */
467
+
468
+ /*
469
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
470
+ *
471
+ * Licensed under EUPL, Version 1.2 (the "License");
472
+ * you may not use this file except in compliance with the License.
473
+ * You may obtain a copy of the License at
474
+ *
475
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
476
+ *
477
+ * Unless required by applicable law or agreed to in writing, software
478
+ * distributed under the License is distributed on an "AS IS" basis,
479
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
480
+ * See the License for the specific language governing permissions and
481
+ * limitations under the License.
482
+ */
483
+ class IkoWidgetCollectionComponent {
484
+ set widgetConfiguration(value) {
485
+ if (!value)
486
+ return;
487
+ this.widgetConfiguration$.next(value);
488
+ }
489
+ set widgetParams(value) {
490
+ this._widgetParams$.next(value);
491
+ }
492
+ constructor(ikoApiService, widgetLayoutService) {
493
+ this.ikoApiService = ikoApiService;
494
+ this.widgetLayoutService = widgetLayoutService;
495
+ this._widgetParams$ = new BehaviorSubject(null);
496
+ this.widgetConfiguration$ = new BehaviorSubject(null);
497
+ this._queryParams$ = new BehaviorSubject(null);
498
+ this.widgetData$ = combineLatest([
499
+ this.widgetConfiguration$,
500
+ this._widgetParams$,
501
+ ]).pipe(switchMap(([widgetConfiguration, widgetParams]) => !widgetParams || !widgetConfiguration
502
+ ? of(null)
503
+ : this.ikoApiService.getIkoWidgetData(widgetParams.dataAggregateKey, widgetParams.tabKey, widgetConfiguration.key, widgetParams.entryId)), tap(() => this.widgetLayoutService.setWidgetDataLoaded(this.widgetUuid)));
504
+ }
505
+ onPaginationEvent(event) {
506
+ this._queryParams$.next(`page=${event.currentPage - 1}&size=${event.pageLength}`);
507
+ }
508
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoWidgetCollectionComponent, deps: [{ token: IkoApiService }, { token: i2$1.WidgetLayoutService }], target: i0.ɵɵFactoryTarget.Component }); }
509
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: IkoWidgetCollectionComponent, isStandalone: true, selector: "valtimo-iko-widget-collection", inputs: { widgetConfiguration: "widgetConfiguration", widgetParams: "widgetParams", widgetUuid: "widgetUuid" }, 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<valtimo-widget-collection\n *ngIf=\"{\n widgetConfiguration: widgetConfiguration$ | async,\n widgetData: widgetData$ | async,\n } as obs\"\n [widgetConfiguration]=\"obs.widgetConfiguration\"\n [widgetData]=\"obs.widgetData\"\n (paginationEvent)=\"onPaginationEvent($event)\"\n>\n</valtimo-widget-collection>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: InputModule }, { kind: "ngmodule", type: PaginationModule }, { kind: "ngmodule", type: TilesModule }, { kind: "ngmodule", type: CarbonListModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: WidgetCollectionComponent, selector: "valtimo-widget-collection", inputs: ["widgetConfiguration", "widgetData"], outputs: ["paginationEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
510
+ }
511
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoWidgetCollectionComponent, decorators: [{
512
+ type: Component,
513
+ args: [{ selector: 'valtimo-iko-widget-collection', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [
514
+ CommonModule,
515
+ InputModule,
516
+ PaginationModule,
517
+ TilesModule,
518
+ CarbonListModule,
519
+ TranslateModule,
520
+ ButtonModule,
521
+ WidgetCollectionComponent,
522
+ ], 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<valtimo-widget-collection\n *ngIf=\"{\n widgetConfiguration: widgetConfiguration$ | async,\n widgetData: widgetData$ | async,\n } as obs\"\n [widgetConfiguration]=\"obs.widgetConfiguration\"\n [widgetData]=\"obs.widgetData\"\n (paginationEvent)=\"onPaginationEvent($event)\"\n>\n</valtimo-widget-collection>\n" }]
523
+ }], ctorParameters: () => [{ type: IkoApiService }, { type: i2$1.WidgetLayoutService }], propDecorators: { widgetConfiguration: [{
524
+ type: Input
525
+ }], widgetParams: [{
526
+ type: Input
527
+ }], widgetUuid: [{
528
+ type: Input
529
+ }] } });
530
+
531
+ /*
532
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
533
+ *
534
+ * Licensed under EUPL, Version 1.2 (the "License");
535
+ * you may not use this file except in compliance with the License.
536
+ * You may obtain a copy of the License at
537
+ *
538
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
539
+ *
540
+ * Unless required by applicable law or agreed to in writing, software
541
+ * distributed under the License is distributed on an "AS IS" basis,
542
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
543
+ * See the License for the specific language governing permissions and
544
+ * limitations under the License.
545
+ */
546
+
547
+ /*
548
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
549
+ *
550
+ * Licensed under EUPL, Version 1.2 (the "License");
551
+ * you may not use this file except in compliance with the License.
552
+ * You may obtain a copy of the License at
553
+ *
554
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
555
+ *
556
+ * Unless required by applicable law or agreed to in writing, software
557
+ * distributed under the License is distributed on an "AS IS" basis,
558
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
559
+ * See the License for the specific language governing permissions and
560
+ * limitations under the License.
561
+ */
562
+ class IkoWidgetCustomComponent {
563
+ constructor() {
564
+ this._widgetConfigSubject$ = new BehaviorSubject(null);
565
+ }
566
+ set widgetConfiguration(value) {
567
+ if (!value)
568
+ return;
569
+ this._widgetConfigSubject$.next(value);
570
+ }
571
+ get widgetConfig$() {
572
+ return this._widgetConfigSubject$.pipe(filter(config => config !== null));
573
+ }
574
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoWidgetCustomComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
575
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: IkoWidgetCustomComponent, isStandalone: true, selector: "valtimo-iko-widget-custom", inputs: { widgetConfiguration: "widgetConfiguration", widgetUuid: "widgetUuid" }, 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<valtimo-widget-custom\n *ngIf=\"widgetConfig$ | async as widgetConfig\"\n [widgetConfiguration]=\"widgetConfig\"\n [widgetUuid]=\"widgetUuid\"\n>\n</valtimo-widget-custom>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: WidgetCustomComponent, selector: "valtimo-widget-custom", inputs: ["widgetConfiguration", "widgetUuid"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
576
+ }
577
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoWidgetCustomComponent, decorators: [{
578
+ type: Component,
579
+ args: [{ selector: 'valtimo-iko-widget-custom', standalone: true, imports: [CommonModule, CarbonListModule, TranslateModule, ButtonModule, WidgetCustomComponent], 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<valtimo-widget-custom\n *ngIf=\"widgetConfig$ | async as widgetConfig\"\n [widgetConfiguration]=\"widgetConfig\"\n [widgetUuid]=\"widgetUuid\"\n>\n</valtimo-widget-custom>\n" }]
580
+ }], propDecorators: { widgetConfiguration: [{
581
+ type: Input
582
+ }], widgetUuid: [{
583
+ type: Input
584
+ }] } });
585
+
586
+ /*
587
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
588
+ *
589
+ * Licensed under EUPL, Version 1.2 (the "License");
590
+ * you may not use this file except in compliance with the License.
591
+ * You may obtain a copy of the License at
592
+ *
593
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
594
+ *
595
+ * Unless required by applicable law or agreed to in writing, software
596
+ * distributed under the License is distributed on an "AS IS" basis,
597
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
598
+ * See the License for the specific language governing permissions and
599
+ * limitations under the License.
600
+ */
601
+
602
+ /*
603
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
604
+ *
605
+ * Licensed under EUPL, Version 1.2 (the "License");
606
+ * you may not use this file except in compliance with the License.
607
+ * You may obtain a copy of the License at
608
+ *
609
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
610
+ *
611
+ * Unless required by applicable law or agreed to in writing, software
612
+ * distributed under the License is distributed on an "AS IS" basis,
613
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
614
+ * See the License for the specific language governing permissions and
615
+ * limitations under the License.
616
+ */
617
+ class IkoWidgetFieldComponent {
618
+ set widgetConfiguration(value) {
619
+ if (!value)
620
+ return;
621
+ this.widgetConfiguration$.next(value);
622
+ }
623
+ set widgetParams(value) {
624
+ this._widgetParams$.next(value);
625
+ }
626
+ constructor(ikoApiService, widgetLayoutService) {
627
+ this.ikoApiService = ikoApiService;
628
+ this.widgetLayoutService = widgetLayoutService;
629
+ this._widgetParams$ = new BehaviorSubject(null);
630
+ this.widgetConfiguration$ = new BehaviorSubject(null);
631
+ this.widgetData$ = combineLatest([
632
+ this.widgetConfiguration$,
633
+ this._widgetParams$,
634
+ ]).pipe(switchMap(([widgetConfiguration, widgetParams]) => !widgetParams || !widgetConfiguration
635
+ ? of(null)
636
+ : this.ikoApiService.getIkoWidgetData(widgetParams.dataAggregateKey, widgetParams.tabKey, widgetConfiguration.key, widgetParams.entryId)), tap(() => this.widgetLayoutService.setWidgetDataLoaded(this.widgetUuid)));
637
+ }
638
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoWidgetFieldComponent, deps: [{ token: IkoApiService }, { token: i2$1.WidgetLayoutService }], target: i0.ɵɵFactoryTarget.Component }); }
639
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: IkoWidgetFieldComponent, isStandalone: true, selector: "valtimo-iko-widget-field", inputs: { widgetConfiguration: "widgetConfiguration", widgetParams: "widgetParams", widgetUuid: "widgetUuid" }, 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<valtimo-widget-field\n [widgetConfiguration]=\"widgetConfiguration$ | async\"\n [widgetData]=\"widgetData$ | async\"\n>\n</valtimo-widget-field>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: InputModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: CarbonListModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: WidgetFieldComponent, selector: "valtimo-widget-field", inputs: ["widgetConfiguration", "widgetData"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
640
+ }
641
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoWidgetFieldComponent, decorators: [{
642
+ type: Component,
643
+ args: [{ selector: 'valtimo-iko-widget-field', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
644
+ CommonModule,
645
+ InputModule,
646
+ TranslateModule,
647
+ CarbonListModule,
648
+ EllipsisPipe,
649
+ ButtonModule,
650
+ WidgetFieldComponent,
651
+ ], 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<valtimo-widget-field\n [widgetConfiguration]=\"widgetConfiguration$ | async\"\n [widgetData]=\"widgetData$ | async\"\n>\n</valtimo-widget-field>\n" }]
652
+ }], ctorParameters: () => [{ type: IkoApiService }, { type: i2$1.WidgetLayoutService }], propDecorators: { widgetConfiguration: [{
653
+ type: Input
654
+ }], widgetParams: [{
655
+ type: Input
656
+ }], widgetUuid: [{
657
+ type: Input
658
+ }] } });
659
+
660
+ /*
661
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
662
+ *
663
+ * Licensed under EUPL, Version 1.2 (the "License");
664
+ * you may not use this file except in compliance with the License.
665
+ * You may obtain a copy of the License at
666
+ *
667
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
668
+ *
669
+ * Unless required by applicable law or agreed to in writing, software
670
+ * distributed under the License is distributed on an "AS IS" basis,
671
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
672
+ * See the License for the specific language governing permissions and
673
+ * limitations under the License.
674
+ */
675
+
676
+ /*
677
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
678
+ *
679
+ * Licensed under EUPL, Version 1.2 (the "License");
680
+ * you may not use this file except in compliance with the License.
681
+ * You may obtain a copy of the License at
682
+ *
683
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
684
+ *
685
+ * Unless required by applicable law or agreed to in writing, software
686
+ * distributed under the License is distributed on an "AS IS" basis,
687
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
688
+ * See the License for the specific language governing permissions and
689
+ * limitations under the License.
690
+ */
691
+ class IkoWidgetFormioComponent {
692
+ set widgetConfiguration(value) {
693
+ if (!value)
694
+ return;
695
+ this.layoutService.setWidgetWithExternalData(value.uuid);
696
+ this._widgetConfigurationSubject$.next(value);
697
+ }
698
+ get widgetConfiguration$() {
699
+ return this._widgetConfigurationSubject$.pipe(filter(config => !!config));
700
+ }
701
+ constructor(layoutService) {
702
+ this.layoutService = layoutService;
703
+ this._widgetConfigurationSubject$ = new BehaviorSubject(null);
704
+ }
705
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoWidgetFormioComponent, deps: [{ token: i2$1.WidgetLayoutService }], target: i0.ɵɵFactoryTarget.Component }); }
706
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: IkoWidgetFormioComponent, isStandalone: true, selector: "valtimo-iko-widget-formio", inputs: { widgetConfiguration: "widgetConfiguration", widgetUuid: "widgetUuid" }, 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<valtimo-widget-formio\n [widgetConfiguration]=\"widgetConfiguration$ | async\"\n [widgetUuid]=\"widgetUuid\"\n>\n</valtimo-widget-formio>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: FormIoModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: WidgetFormioComponent, selector: "valtimo-widget-formio", inputs: ["documentId", "widgetConfiguration", "widgetUuid"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
707
+ }
708
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoWidgetFormioComponent, decorators: [{
709
+ type: Component,
710
+ args: [{ selector: 'valtimo-iko-widget-formio', standalone: true, imports: [CommonModule, TranslateModule, FormIoModule, ButtonModule, WidgetFormioComponent], 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<valtimo-widget-formio\n [widgetConfiguration]=\"widgetConfiguration$ | async\"\n [widgetUuid]=\"widgetUuid\"\n>\n</valtimo-widget-formio>\n" }]
711
+ }], ctorParameters: () => [{ type: i2$1.WidgetLayoutService }], propDecorators: { widgetConfiguration: [{
712
+ type: Input
713
+ }], widgetUuid: [{
714
+ type: Input
715
+ }] } });
716
+
717
+ /*
718
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
719
+ *
720
+ * Licensed under EUPL, Version 1.2 (the "License");
721
+ * you may not use this file except in compliance with the License.
722
+ * You may obtain a copy of the License at
723
+ *
724
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
725
+ *
726
+ * Unless required by applicable law or agreed to in writing, software
727
+ * distributed under the License is distributed on an "AS IS" basis,
728
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
729
+ * See the License for the specific language governing permissions and
730
+ * limitations under the License.
731
+ */
732
+
733
+ /*
734
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
735
+ *
736
+ * Licensed under EUPL, Version 1.2 (the "License");
737
+ * you may not use this file except in compliance with the License.
738
+ * You may obtain a copy of the License at
739
+ *
740
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
741
+ *
742
+ * Unless required by applicable law or agreed to in writing, software
743
+ * distributed under the License is distributed on an "AS IS" basis,
744
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
745
+ * See the License for the specific language governing permissions and
746
+ * limitations under the License.
747
+ */
748
+ class IkoWidgetTableComponent {
749
+ set widgetConfiguration(value) {
750
+ this._widgetConfiguration = value;
751
+ this.widgetConfiguration$.next(value);
752
+ }
753
+ get widgetConfiguration() {
754
+ return this._widgetConfiguration;
755
+ }
756
+ set widgetParams(value) {
757
+ this._widgetParams$.next(value);
758
+ }
759
+ constructor(ikoApiService, widgetLayoutService) {
760
+ this.ikoApiService = ikoApiService;
761
+ this.widgetLayoutService = widgetLayoutService;
762
+ this.widgetConfiguration$ = new BehaviorSubject(null);
763
+ this._widgetParams$ = new BehaviorSubject(null);
764
+ this._queryParams$ = new BehaviorSubject(null);
765
+ this.widgetData$ = combineLatest([
766
+ this.widgetConfiguration$,
767
+ this._widgetParams$,
768
+ ]).pipe(switchMap(([widgetConfiguration, widgetParams]) => !widgetParams || !widgetConfiguration
769
+ ? of(null)
770
+ : this.ikoApiService.getIkoWidgetData(widgetParams.dataAggregateKey, widgetParams.tabKey, widgetConfiguration.key, widgetParams.entryId)), tap(() => this.widgetLayoutService.setWidgetDataLoaded(this.widgetUuid)));
771
+ }
772
+ onPaginationEvent(event) {
773
+ this._queryParams$.next(`page=${event.currentPage - 1}&size=${event.pageLength}`);
774
+ }
775
+ getPageSizeParam(widgetConfiguration) {
776
+ return `size=${widgetConfiguration.properties.defaultPageSize}`;
777
+ }
778
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoWidgetTableComponent, deps: [{ token: IkoApiService }, { token: i2$1.WidgetLayoutService }], target: i0.ɵɵFactoryTarget.Component }); }
779
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: IkoWidgetTableComponent, isStandalone: true, selector: "valtimo-iko-widget-table", inputs: { widgetConfiguration: "widgetConfiguration", widgetUuid: "widgetUuid", widgetParams: "widgetParams" }, 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<valtimo-widget-table\n [widgetData]=\"widgetData$ | async\"\n [widgetConfiguration]=\"widgetConfiguration\"\n (paginationEvent)=\"onPaginationEvent($event)\"\n>\n</valtimo-widget-table>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "ngmodule", type: PaginationModule }, { kind: "ngmodule", type: TilesModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: WidgetTableComponent, selector: "valtimo-widget-table", inputs: ["widgetConfiguration", "widgetData"], outputs: ["paginationEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
780
+ }
781
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoWidgetTableComponent, decorators: [{
782
+ type: Component,
783
+ args: [{ selector: 'valtimo-iko-widget-table', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [
784
+ CommonModule,
785
+ CarbonListModule,
786
+ PaginationModule,
787
+ TilesModule,
788
+ TranslateModule,
789
+ ButtonModule,
790
+ WidgetTableComponent,
791
+ ], 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<valtimo-widget-table\n [widgetData]=\"widgetData$ | async\"\n [widgetConfiguration]=\"widgetConfiguration\"\n (paginationEvent)=\"onPaginationEvent($event)\"\n>\n</valtimo-widget-table>\n" }]
792
+ }], ctorParameters: () => [{ type: IkoApiService }, { type: i2$1.WidgetLayoutService }], propDecorators: { widgetConfiguration: [{
793
+ type: Input,
794
+ args: [{ required: true }]
795
+ }], widgetUuid: [{
796
+ type: Input
797
+ }], widgetParams: [{
798
+ type: Input
799
+ }] } });
800
+
801
+ /*
802
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
803
+ *
804
+ * Licensed under EUPL, Version 1.2 (the "License");
805
+ * you may not use this file except in compliance with the License.
806
+ * You may obtain a copy of the License at
807
+ *
808
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
809
+ *
810
+ * Unless required by applicable law or agreed to in writing, software
811
+ * distributed under the License is distributed on an "AS IS" basis,
812
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
813
+ * See the License for the specific language governing permissions and
814
+ * limitations under the License.
815
+ */
816
+
817
+ /*
818
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
819
+ *
820
+ * Licensed under EUPL, Version 1.2 (the "License");
821
+ * you may not use this file except in compliance with the License.
822
+ * You may obtain a copy of the License at
823
+ *
824
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
825
+ *
826
+ * Unless required by applicable law or agreed to in writing, software
827
+ * distributed under the License is distributed on an "AS IS" basis,
828
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
829
+ * See the License for the specific language governing permissions and
830
+ * limitations under the License.
831
+ */
832
+ class IkoWidgetComponent {
833
+ set key(value) {
834
+ this._key$.next(value);
835
+ }
836
+ get key$() {
837
+ return this._key$.pipe(filter((key) => !!key));
838
+ }
839
+ constructor(ikoTabService, ikoApiService, logger) {
840
+ this.ikoTabService = ikoTabService;
841
+ this.ikoApiService = ikoApiService;
842
+ this.logger = logger;
843
+ this.dataAggregateKey$ = this.ikoTabService.dataAggregateKey$;
844
+ this.entryId$ = this.ikoTabService.entryId$;
845
+ this._key$ = new BehaviorSubject('');
846
+ this.loading$ = new BehaviorSubject(true);
847
+ this.widgets$ = combineLatest([this.dataAggregateKey$, this.key$]).pipe(switchMap(([dataAggregateKey, key]) => this.ikoApiService.getIkoWidget(dataAggregateKey, key)));
848
+ this.widgetParams$ = combineLatest([
849
+ this.dataAggregateKey$,
850
+ this.key$,
851
+ this.entryId$,
852
+ ]).pipe(map$1(([dataAggregateKey, tabKey, entryId]) => ({
853
+ dataAggregateKey,
854
+ entryId,
855
+ tabKey,
856
+ })), tap(widgets => {
857
+ this.logger.debug(`IKO widgets retrieved ${JSON.stringify(widgets)}`);
858
+ this.loading$.next(false);
859
+ }));
860
+ this.widgetComponentMap = {
861
+ [WidgetType.FIELDS]: IkoWidgetFieldComponent,
862
+ [WidgetType.CUSTOM]: IkoWidgetCustomComponent,
863
+ [WidgetType.FORMIO]: IkoWidgetFormioComponent,
864
+ [WidgetType.TABLE]: IkoWidgetTableComponent,
865
+ [WidgetType.COLLECTION]: IkoWidgetCollectionComponent,
866
+ };
867
+ }
868
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoWidgetComponent, deps: [{ token: IkoTabService }, { token: IkoApiService }, { token: i1$1.NGXLogger }], target: i0.ɵɵFactoryTarget.Component }); }
869
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: IkoWidgetComponent, isStandalone: true, selector: "ng-component", inputs: { key: "key" }, 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<valtimo-widget-container\n [widgets]=\"widgets$ | async\"\n [widgetComponentMap]=\"widgetComponentMap\"\n [widgetParams]=\"widgetParams$ | async\"\n>\n</valtimo-widget-container>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "component", type: WidgetContainerComponent, selector: "valtimo-widget-container", inputs: ["widgets", "widgetComponentMap", "widgetParams"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
870
+ }
871
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoWidgetComponent, decorators: [{
872
+ type: Component,
873
+ args: [{ standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, WidgetContainerComponent], 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<valtimo-widget-container\n [widgets]=\"widgets$ | async\"\n [widgetComponentMap]=\"widgetComponentMap\"\n [widgetParams]=\"widgetParams$ | async\"\n>\n</valtimo-widget-container>\n" }]
874
+ }], ctorParameters: () => [{ type: IkoTabService }, { type: IkoApiService }, { type: i1$1.NGXLogger }], propDecorators: { key: [{
875
+ type: Input
876
+ }] } });
877
+
878
+ /*
879
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
880
+ *
881
+ * Licensed under EUPL, Version 1.2 (the "License");
882
+ * you may not use this file except in compliance with the License.
883
+ * You may obtain a copy of the License at
884
+ *
885
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
886
+ *
887
+ * Unless required by applicable law or agreed to in writing, software
888
+ * distributed under the License is distributed on an "AS IS" basis,
889
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
890
+ * See the License for the specific language governing permissions and
891
+ * limitations under the License.
892
+ */
893
+ const IkoTabComponents = [IkoWidgetComponent];
894
+ const TabComponentTypes = {
895
+ widgets: IkoWidgetComponent,
896
+ };
897
+
898
+ /*
899
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
900
+ *
901
+ * Licensed under EUPL, Version 1.2 (the "License");
902
+ * you may not use this file except in compliance with the License.
903
+ * You may obtain a copy of the License at
904
+ *
905
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
906
+ *
907
+ * Unless required by applicable law or agreed to in writing, software
908
+ * distributed under the License is distributed on an "AS IS" basis,
909
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
910
+ * See the License for the specific language governing permissions and
911
+ * limitations under the License.
912
+ */
913
+ class IkoDetailsComponent {
914
+ constructor(breadcrumbService, ikoApiService, ikoTabService, pageTitleService, route, translateService) {
915
+ this.breadcrumbService = breadcrumbService;
916
+ this.ikoApiService = ikoApiService;
917
+ this.ikoTabService = ikoTabService;
918
+ this.pageTitleService = pageTitleService;
919
+ this.route = route;
920
+ this.translateService = translateService;
921
+ this.activeTabKey$ = this.ikoTabService.activeTabKey$;
922
+ this.tabs$ = combineLatest([
923
+ this.route.params,
924
+ this.route.queryParams,
925
+ this.translateService.stream('interface.results'),
926
+ this.ikoApiService.cachedMenuItems$,
927
+ ]).pipe(tap(([params, queryParams, breadcrumbTitle, menuItems]) => {
928
+ const currentMenuItem = menuItems.find(item => item.key === params.key);
929
+ if (currentMenuItem && currentMenuItem?.title)
930
+ this.pageTitleService.setCustomPageTitle(currentMenuItem.title, true);
931
+ this.breadcrumbService.setSecondBreadcrumb({
932
+ route: [`/iko/${params.key}`],
933
+ content: currentMenuItem?.title ?? '',
934
+ href: `/iko/${params.key}`,
935
+ });
936
+ this.breadcrumbService.setThirdBreadcrumb({
937
+ content: breadcrumbTitle,
938
+ route: [`/iko/${params.key}/${params.searchKey}`],
939
+ href: `/iko/${params.key}/${params.searchKey}`,
940
+ routeExtras: { queryParams },
941
+ });
942
+ this.ikoTabService.setDataAggregateKey(params.key);
943
+ this.ikoTabService.setEntryId(params.id);
944
+ }), switchMap(([params]) => this.ikoApiService.getIkoDetailTabs(params.key)), tap((tabs) => this.ikoTabService.setActiveTab(tabs[0])));
945
+ }
946
+ ngOnDestroy() {
947
+ this.breadcrumbService.clearSecondBreadcrumb();
948
+ this.breadcrumbService.clearThirdBreadcrumb();
949
+ this.pageTitleService.enableReset();
950
+ }
951
+ onTabSelected(tab) {
952
+ this.ikoTabService.setActiveTab(tab);
953
+ this._container.clear();
954
+ const componentRef = this._container.createComponent(TabComponentTypes[tab.type]);
955
+ componentRef.instance.key = tab.key;
956
+ }
957
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoDetailsComponent, deps: [{ token: i1$2.BreadcrumbService }, { token: IkoApiService }, { token: IkoTabService }, { token: i1$2.PageTitleService }, { token: i3.ActivatedRoute }, { token: i3$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
958
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: IkoDetailsComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "_container", first: true, predicate: ["content"], descendants: true, read: ViewContainerRef, static: 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<ng-container\n *ngIf=\"{tabs: tabs$ | async, activeTabKey: activeTabKey$ | async} as obs\"\n renderInPageHeader\n>\n <ng-template>\n <cds-tabs>\n @for (tab of obs.tabs; track tab.key) {\n <cds-tab\n [active]=\"obs.activeTabKey === tab.key\"\n [heading]=\"tab.title\"\n (selected)=\"onTabSelected(tab)\"\n >\n </cds-tab>\n }\n </cds-tabs>\n </ng-template>\n</ng-container>\n\n<ng-container #content></ng-container>\n", styles: ["::ng-deep .cds--tab-content{display:none}::ng-deep .page-actions{margin-left:unset!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: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TabsModule }, { kind: "component", type: i6.Tabs, selector: "cds-tabs, ibm-tabs", inputs: ["position", "cacheActive", "followFocus", "isNavigation", "ariaLabel", "ariaLabelledby", "type", "theme", "skeleton"] }, { kind: "component", type: i6.Tab, selector: "cds-tab, ibm-tab", inputs: ["heading", "title", "context", "active", "disabled", "tabIndex", "id", "cacheActive", "tabContent", "templateContext"], outputs: ["selected"] }, { kind: "directive", type: RenderInPageHeaderDirective, selector: "[renderInPageHeader]", inputs: ["fullWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
959
+ }
960
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoDetailsComponent, decorators: [{
961
+ type: Component,
962
+ args: [{ standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, TabsModule, RenderInPageHeaderDirective, ...[IkoTabComponents]], 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\n *ngIf=\"{tabs: tabs$ | async, activeTabKey: activeTabKey$ | async} as obs\"\n renderInPageHeader\n>\n <ng-template>\n <cds-tabs>\n @for (tab of obs.tabs; track tab.key) {\n <cds-tab\n [active]=\"obs.activeTabKey === tab.key\"\n [heading]=\"tab.title\"\n (selected)=\"onTabSelected(tab)\"\n >\n </cds-tab>\n }\n </cds-tabs>\n </ng-template>\n</ng-container>\n\n<ng-container #content></ng-container>\n", styles: ["::ng-deep .cds--tab-content{display:none}::ng-deep .page-actions{margin-left:unset!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"] }]
963
+ }], ctorParameters: () => [{ type: i1$2.BreadcrumbService }, { type: IkoApiService }, { type: IkoTabService }, { type: i1$2.PageTitleService }, { type: i3.ActivatedRoute }, { type: i3$1.TranslateService }], propDecorators: { _container: [{
964
+ type: ViewChild,
965
+ args: ['content', { read: ViewContainerRef, static: true }]
966
+ }] } });
967
+
968
+ /*
969
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
970
+ *
971
+ * Licensed under EUPL, Version 1.2 (the "License");
972
+ * you may not use this file except in compliance with the License.
973
+ * You may obtain a copy of the License at
974
+ *
975
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
976
+ *
977
+ * Unless required by applicable law or agreed to in writing, software
978
+ * distributed under the License is distributed on an "AS IS" basis,
979
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
980
+ * See the License for the specific language governing permissions and
981
+ * limitations under the License.
982
+ */
983
+ class IkoListComponent {
984
+ constructor(breadcrumbService, ikoApiService, route, router) {
985
+ this.breadcrumbService = breadcrumbService;
986
+ this.ikoApiService = ikoApiService;
987
+ this.route = route;
988
+ this.router = router;
989
+ this.loading$ = new BehaviorSubject(true);
990
+ this.listConfig$ = combineLatest([
991
+ this.route.params,
992
+ this.route.queryParams,
993
+ this.ikoApiService.cachedMenuItems$,
994
+ ]).pipe(tap(() => this.loading$.next(true)), switchMap(([params, queryParams, menuItems]) => {
995
+ const currentMenuItem = menuItems.find(item => item.key === params.key);
996
+ this.breadcrumbService.setSecondBreadcrumb({
997
+ route: [`/iko/${params.key}`],
998
+ content: currentMenuItem?.title ?? '',
999
+ href: `/iko/${params.key}`,
1000
+ });
1001
+ return this.ikoApiService.searchIkoDataRequest(params.key, params.searchKey, {
1002
+ filters: queryParams,
1003
+ });
1004
+ }), map$1(res => ({
1005
+ fields: res.headers.reduce((acc, curr) => [
1006
+ ...acc,
1007
+ ...(curr.displayType.type === 'hidden'
1008
+ ? []
1009
+ : [
1010
+ {
1011
+ key: curr.key,
1012
+ label: curr.title,
1013
+ viewType: curr.displayType.type,
1014
+ sortable: curr.sortable,
1015
+ ...(!!curr.defaultSort && { default: curr.defaultSort }),
1016
+ ...curr.displayType.displayTypeParameters,
1017
+ },
1018
+ ]),
1019
+ ], []),
1020
+ items: res.rows.content.map(stuff => stuff.items.reduce((acc, curr) => ({ ...acc, [curr.key]: curr.value }), {})),
1021
+ })), tap(() => this.loading$.next(false)));
1022
+ }
1023
+ ngOnDestroy() {
1024
+ this.breadcrumbService.clearSecondBreadcrumb();
1025
+ }
1026
+ onRowClicked(item) {
1027
+ this.router.navigate([`details/${item.id}`], {
1028
+ relativeTo: this.route,
1029
+ queryParamsHandling: 'preserve',
1030
+ });
1031
+ }
1032
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoListComponent, deps: [{ token: i1$2.BreadcrumbService }, { token: IkoApiService }, { token: i3.ActivatedRoute }, { token: i3.Router }], target: i0.ɵɵFactoryTarget.Component }); }
1033
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: IkoListComponent, isStandalone: true, selector: "valtimo-iko-list", 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<valtimo-carbon-list\n *ngIf=\"listConfig$ | async as listConfig\"\n [fields]=\"listConfig.fields\"\n [items]=\"listConfig.items\"\n [loading]=\"loading$ | async\"\n [hideToolbar]=\"true\"\n (rowClicked)=\"onRowClicked($event)\"\n></valtimo-carbon-list>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i1$2.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"] }] }); }
1034
+ }
1035
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoListComponent, decorators: [{
1036
+ type: Component,
1037
+ args: [{ selector: 'valtimo-iko-list', standalone: true, imports: [CommonModule, CarbonListModule], 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<valtimo-carbon-list\n *ngIf=\"listConfig$ | async as listConfig\"\n [fields]=\"listConfig.fields\"\n [items]=\"listConfig.items\"\n [loading]=\"loading$ | async\"\n [hideToolbar]=\"true\"\n (rowClicked)=\"onRowClicked($event)\"\n></valtimo-carbon-list>\n" }]
1038
+ }], ctorParameters: () => [{ type: i1$2.BreadcrumbService }, { type: IkoApiService }, { type: i3.ActivatedRoute }, { type: i3.Router }] });
1039
+
1040
+ /*
1041
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1042
+ *
1043
+ * Licensed under EUPL, Version 1.2 (the "License");
1044
+ * you may not use this file except in compliance with the License.
1045
+ * You may obtain a copy of the License at
1046
+ *
1047
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1048
+ *
1049
+ * Unless required by applicable law or agreed to in writing, software
1050
+ * distributed under the License is distributed on an "AS IS" basis,
1051
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1052
+ * See the License for the specific language governing permissions and
1053
+ * limitations under the License.
1054
+ */
1055
+ class IkoManagementListModalComponent {
1056
+ set openModal(value) {
1057
+ this.$openModal.set(value);
1058
+ }
1059
+ set selectedListColumn(value) {
1060
+ if (!value)
1061
+ return;
1062
+ this._selectedListColumn = value;
1063
+ this.form.setValue(this.mapListColumnDtoToFormValue(value));
1064
+ this.form.markAsPristine();
1065
+ }
1066
+ set modalMode(value) {
1067
+ this._modalMode = value;
1068
+ if (value === 'add') {
1069
+ this.key.setAsyncValidators(this.keyNotUsedValidator());
1070
+ this.key.enable();
1071
+ }
1072
+ else {
1073
+ this.key.clearAsyncValidators();
1074
+ this.key.disable();
1075
+ }
1076
+ this.key.updateValueAndValidity();
1077
+ }
1078
+ get modalMode() {
1079
+ return this._modalMode;
1080
+ }
1081
+ get title() {
1082
+ return this.form.get('title');
1083
+ }
1084
+ get key() {
1085
+ return this.form.get('key');
1086
+ }
1087
+ get path() {
1088
+ return this.form.get('path');
1089
+ }
1090
+ get displayType() {
1091
+ return this.form.get('displayType');
1092
+ }
1093
+ get sortable() {
1094
+ return this.form.get('sortable');
1095
+ }
1096
+ get defaultSort() {
1097
+ return this.form.get('defaultSort');
1098
+ }
1099
+ get dateFormat() {
1100
+ return this.form.get('dateFormat');
1101
+ }
1102
+ constructor(ikoManagementApiService, formBuilder, route) {
1103
+ this.ikoManagementApiService = ikoManagementApiService;
1104
+ this.formBuilder = formBuilder;
1105
+ this.route = route;
1106
+ this.$openModal = signal(false);
1107
+ this.listColumns = [];
1108
+ this._modalMode = 'add';
1109
+ this.closeModalEvent = new EventEmitter();
1110
+ this.form = this.formBuilder.group({
1111
+ title: this.formBuilder.control('', [Validators.required]),
1112
+ key: this.formBuilder.control('', [Validators.required], [this.keyNotUsedValidator()]),
1113
+ path: this.formBuilder.control('', [Validators.required]),
1114
+ displayType: this.formBuilder.control('', [Validators.required]),
1115
+ sortable: this.formBuilder.control(false, [Validators.required]),
1116
+ defaultSort: this.formBuilder.control(''),
1117
+ dateFormat: this.formBuilder.control(''),
1118
+ tagAmount: this.formBuilder.control(1),
1119
+ booleanDisplayTypeParameters: this.formBuilder.control([
1120
+ { key: '', value: '' },
1121
+ ]),
1122
+ enumDisplayTypeParameters: this.formBuilder.control([
1123
+ { key: '', value: '' },
1124
+ ]),
1125
+ });
1126
+ this.isDateDisplayType$ = this.displayType.valueChanges.pipe(map(type => type === ViewType.DATE));
1127
+ this.isBooleanDisplayType$ = this.displayType.valueChanges.pipe(map(type => type === ViewType.BOOLEAN));
1128
+ this.isEnumDisplayType$ = this.displayType.valueChanges.pipe(map(type => type === ViewType.ENUM));
1129
+ this.isTagsDisplayType$ = this.displayType.valueChanges.pipe(map(type => type === ViewType.TAGS));
1130
+ this._DISPLAY_TYPES = [
1131
+ ViewType.TEXT,
1132
+ ViewType.DATE,
1133
+ ViewType.BOOLEAN,
1134
+ ViewType.ENUM,
1135
+ ViewType.ARRAY_COUNT,
1136
+ ViewType.UNDERSCORES_TO_SPACES,
1137
+ ViewType.TAGS,
1138
+ ViewType.HIDDEN,
1139
+ ];
1140
+ this._dataAggregateKey$ = this.route.params.pipe(map(params => params?.key), filter(key => !!key));
1141
+ this.displayTypeSelectItems = this._DISPLAY_TYPES.map(displayType => ({
1142
+ id: displayType,
1143
+ translationKey: `listColumnDisplayType.${displayType}`,
1144
+ }));
1145
+ this.sortSelectItems = [
1146
+ {
1147
+ translationKey: 'listColumn.sortableAsc',
1148
+ id: 'ASC',
1149
+ },
1150
+ {
1151
+ translationKey: 'listColumn.sortableDesc',
1152
+ id: 'DESC',
1153
+ },
1154
+ ];
1155
+ this._subscriptions = new Subscription();
1156
+ this.resetForm = () => {
1157
+ this.form.reset();
1158
+ this.form.markAsPristine();
1159
+ this.form.markAsUntouched();
1160
+ this.form.updateValueAndValidity();
1161
+ };
1162
+ }
1163
+ ngOnInit() {
1164
+ this._subscriptions.add(this.defaultSort.valueChanges.subscribe(defaultSortValue => {
1165
+ if (defaultSortValue) {
1166
+ this.sortable.setValue(true);
1167
+ this.sortable.disable();
1168
+ }
1169
+ else {
1170
+ this.sortable.enable();
1171
+ }
1172
+ }));
1173
+ }
1174
+ ngOnDestroy() {
1175
+ this._subscriptions.unsubscribe();
1176
+ }
1177
+ closeModal() {
1178
+ this.closeModalEvent.emit('close');
1179
+ runAfterCarbonModalClosed(this.resetForm);
1180
+ }
1181
+ addColumn() {
1182
+ const formValue = this.form.getRawValue();
1183
+ const requestBody = this.getCreateRequestBodyFromFormValue();
1184
+ this.disableForm();
1185
+ this._dataAggregateKey$
1186
+ .pipe(switchMap(dataAggregateKey => this.modalMode === 'add'
1187
+ ? this.ikoManagementApiService.createIkoListColumn(dataAggregateKey, formValue.key, requestBody)
1188
+ : this.ikoManagementApiService.updateListColumn(dataAggregateKey, formValue.key, requestBody)))
1189
+ .subscribe({
1190
+ next: () => {
1191
+ this.enableForm();
1192
+ this.closeModalEvent.emit('closeAndRefresh');
1193
+ runAfterCarbonModalClosed(this.resetForm);
1194
+ },
1195
+ error: () => {
1196
+ this.enableForm();
1197
+ },
1198
+ });
1199
+ }
1200
+ disableForm() {
1201
+ this.form.disable();
1202
+ }
1203
+ enableForm() {
1204
+ this.form.enable();
1205
+ }
1206
+ mapMultiInputValueToEnum(multiInputValues) {
1207
+ return multiInputValues.reduce((acc, curr) => {
1208
+ return { ...acc, [curr.key]: curr.value };
1209
+ }, {});
1210
+ }
1211
+ getCreateRequestBodyFromFormValue() {
1212
+ const { key, path, sortable, displayType, dateFormat, enumDisplayTypeParameters, booleanDisplayTypeParameters, defaultSort, ...rest } = this.form.getRawValue();
1213
+ const displayTypeParameters = (() => {
1214
+ switch (displayType) {
1215
+ case ViewType.DATE:
1216
+ return { dateFormat };
1217
+ case ViewType.ENUM:
1218
+ return {
1219
+ enum: this.mapMultiInputValueToEnum(enumDisplayTypeParameters),
1220
+ };
1221
+ case ViewType.BOOLEAN:
1222
+ return {
1223
+ enum: this.mapMultiInputValueToEnum(booleanDisplayTypeParameters),
1224
+ };
1225
+ default:
1226
+ return {};
1227
+ }
1228
+ })();
1229
+ return {
1230
+ key,
1231
+ path,
1232
+ sortable: Boolean(sortable),
1233
+ ...(defaultSort ? { defaultSort: defaultSort } : {}),
1234
+ ...rest,
1235
+ ...(this.modalMode === 'edit' && {
1236
+ order: this._selectedListColumn.order,
1237
+ }),
1238
+ displayType: {
1239
+ type: displayType,
1240
+ displayTypeParameters,
1241
+ },
1242
+ };
1243
+ }
1244
+ mapEnumToMultiInputValues(enumObj) {
1245
+ if (!enumObj) {
1246
+ return [{ key: '', value: '' }];
1247
+ }
1248
+ return Object.entries(enumObj).map(([key, value]) => ({ key, value }));
1249
+ }
1250
+ mapListColumnDtoToFormValue(dto) {
1251
+ const { key, title, path, sortable, defaultSort, displayType } = dto;
1252
+ const baseFormValue = {
1253
+ key,
1254
+ title: title || '',
1255
+ path,
1256
+ sortable,
1257
+ defaultSort: defaultSort || '',
1258
+ displayType: displayType.type,
1259
+ dateFormat: '',
1260
+ booleanDisplayTypeParameters: [{ key: '', value: '' }],
1261
+ enumDisplayTypeParameters: [{ key: '', value: '' }],
1262
+ tagAmount: 1,
1263
+ };
1264
+ if (displayType.type === ViewType.DATE) {
1265
+ baseFormValue.dateFormat = displayType.displayTypeParameters?.dateFormat || '';
1266
+ }
1267
+ if (displayType.type === ViewType.ENUM) {
1268
+ baseFormValue.enumDisplayTypeParameters = this.mapEnumToMultiInputValues(displayType.displayTypeParameters?.enum);
1269
+ }
1270
+ if (displayType.type === ViewType.BOOLEAN) {
1271
+ baseFormValue.booleanDisplayTypeParameters = this.mapEnumToMultiInputValues(displayType.displayTypeParameters?.enum);
1272
+ }
1273
+ return baseFormValue;
1274
+ }
1275
+ keyNotUsedValidator() {
1276
+ return (control) => {
1277
+ const value = control.value?.trim();
1278
+ if (!value)
1279
+ return of(null);
1280
+ const exists = this.listColumns.some(column => column.key.trim().toLowerCase() === value.toLowerCase());
1281
+ return of(exists ? { keyTaken: true } : null).pipe(delay(200));
1282
+ };
1283
+ }
1284
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementListModalComponent, deps: [{ token: IkoManagementApiService }, { token: i2$2.FormBuilder }, { token: i3.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
1285
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: IkoManagementListModalComponent, isStandalone: true, selector: "valtimo-iko-management-list-modal", inputs: { openModal: "openModal", listColumns: "listColumns", selectedListColumn: "selectedListColumn", modalMode: "modalMode" }, outputs: { closeModalEvent: "closeModalEvent" }, 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<cds-modal\n valtimoCdsModal\n *ngIf=\"{\n title:\n (modalMode === 'add' ? 'ikoManagement.addColumn' : 'ikoManagement.editColumn') | translate,\n } as state\"\n [open]=\"$openModal()\"\n [title]=\"state.title\"\n (close)=\"closeModal()\"\n>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 cdsModalHeaderHeading>\n {{ state.title }}\n </h3>\n </cds-modal-header>\n\n <form cdsModalContent [cdsLayer]=\"1\" [formGroup]=\"form\" class=\"iko-column-form\">\n <cds-label>\n {{ 'ikoManagement.titleTitle' | translate }}\n\n <input\n [invalid]=\"title.dirty && title.invalid\"\n formControlName=\"title\"\n cdsText\n placeholder=\"{{ 'ikoManagement.columnTitlePlaceholder' | translate }}\"\n />\n </cds-label>\n\n <cds-label>\n {{ 'ikoManagement.keyTitle' | translate }}\n\n <input\n [invalid]=\"key.dirty && key.invalid\"\n formControlName=\"key\"\n cdsText\n placeholder=\"{{ 'ikoManagement.columnKeyPlaceholder' | translate }}\"\n />\n </cds-label>\n\n <cds-label>\n {{ 'ikoManagement.pathTitle' | translate }}\n\n <input\n [invalid]=\"path.dirty && path.invalid\"\n formControlName=\"path\"\n cdsText\n placeholder=\"{{ 'ikoManagement.columnPathPlaceholder' | translate }}\"\n />\n </cds-label>\n\n <cds-toggle\n formControlName=\"sortable\"\n [label]=\"'ikoManagement.sortableTitle' | translate\"\n [onText]=\"'ikoManagement.sortingEnabled' | translate\"\n [offText]=\"'ikoManagement.sortingDisabled' | translate\"\n ></cds-toggle>\n\n <v-select\n [invalid]=\"defaultSort.dirty && defaultSort.invalid\"\n formControlName=\"defaultSort\"\n [items]=\"sortSelectItems\"\n titleTranslationKey=\"ikoManagement.defaultSortTitle\"\n [appendInline]=\"false\"\n ></v-select>\n\n <v-select\n [invalid]=\"displayType.dirty && displayType.invalid\"\n formControlName=\"displayType\"\n [items]=\"displayTypeSelectItems\"\n titleTranslationKey=\"ikoManagement.displayType\"\n [appendInline]=\"false\"\n ></v-select>\n\n <v-input-label\n *ngIf=\"isDateDisplayType$ | async\"\n titleTranslationKey=\"listColumn.dateFormat\"\n tooltipTranslationKey=\"listColumn.dateFormatTooltip\"\n >\n <input cdsText formControlName=\"dateFormat\" />\n </v-input-label>\n\n <v-input-label\n *ngIf=\"isBooleanDisplayType$ | async\"\n titleTranslationKey=\"listColumn.enumTitleOptional\"\n tooltipTranslationKey=\"listColumn.enumTooltipOptional\"\n >\n <valtimo-carbon-multi-input\n type=\"keyValue\"\n formControlName=\"booleanDisplayTypeParameters\"\n [hideAddButton]=\"true\"\n [hideDeleteButton]=\"true\"\n [maxRows]=\"1\"\n [keyColumnTitle]=\"'viewTypeConverter.Yes' | translate\"\n [valueColumnTitle]=\"'viewTypeConverter.No' | translate\"\n ></valtimo-carbon-multi-input>\n </v-input-label>\n\n <v-input-label\n *ngIf=\"isEnumDisplayType$ | async\"\n titleTranslationKey=\"listColumn.enumTitle\"\n tooltipTranslationKey=\"listColumn.enumTooltip\"\n >\n <valtimo-carbon-multi-input\n type=\"keyValue\"\n formControlName=\"enumDisplayTypeParameters\"\n ></valtimo-carbon-multi-input>\n </v-input-label>\n\n <v-input-label\n *ngIf=\"isTagsDisplayType$ | async\"\n titleTranslationKey=\"listColumn.tagAmount\"\n tooltipTranslationKey=\"listColumn.tagAmountTooltip\"\n >\n <cds-number formControlName=\"tagAmount\" [min]=\"1\" [step]=\"1\"></cds-number>\n </v-input-label>\n </form>\n\n <cds-modal-footer>\n <button cdsButton=\"ghost\" (click)=\"closeModal()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button\n [disabled]=\"form.invalid || form.disabled || !form.dirty\"\n cdsButton=\"primary\"\n (click)=\"addColumn()\"\n >\n {{ 'interface.save' | translate }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", styles: [".iko-column-form{display:flex;flex-direction:column;gap:16px;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: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ModalModule }, { kind: "component", type: i6.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i6.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i6.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i6.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i6.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "directive", type: ValtimoCdsModalDirective, selector: "[valtimoCdsModal]", inputs: ["minContentHeight"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: InputModule }, { kind: "component", type: i6.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i6.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.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: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: LayerModule }, { kind: "directive", type: i6.LayerDirective, selector: "[cdsLayer], [ibmLayer]", inputs: ["ibmLayer", "cdsLayer"], exportAs: ["layer"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i1$2.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "disabled", "dropUp", "invalid", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "clearText", "clearable", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder", "smallMargin", "carbonTheme", "appendInline", "dataTestId"], outputs: ["selectedChange"] }, { kind: "ngmodule", type: ToggleModule }, { kind: "component", type: i6.Toggle, selector: "cds-toggle, ibm-toggle", inputs: ["offText", "onText", "label", "size", "hideLabel", "ariaLabel", "skeleton"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "ngmodule", type: CarbonMultiInputModule }, { kind: "component", type: i1$2.CarbonMultiInputComponent, selector: "valtimo-carbon-multi-input", inputs: ["addRowText", "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: "ngmodule", type: InputLabelModule }, { kind: "component", type: i1$2.InputLabelComponent, selector: "v-input-label", inputs: ["name", "tooltip", "tooltipTranslationKey", "largeMargin", "small", "noMargin", "title", "titleTranslationKey", "required", "disabled", "carbonTheme"] }, { kind: "ngmodule", type: NumberModule }, { kind: "component", type: i6.NumberComponent, selector: "cds-number, ibm-number", inputs: ["readonly", "theme", "disabled", "skeleton", "invalid", "id", "placeholder", "size", "required", "value", "min", "max", "label", "helperText", "invalidText", "step", "precision", "warn", "warnText", "ariaLabel", "decrementLabel", "incrementLabel", "fluid"], outputs: ["change"] }] }); }
1286
+ }
1287
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementListModalComponent, decorators: [{
1288
+ type: Component,
1289
+ args: [{ standalone: true, selector: 'valtimo-iko-management-list-modal', imports: [
1290
+ CommonModule,
1291
+ TranslateModule,
1292
+ ModalModule,
1293
+ ValtimoCdsModalDirective,
1294
+ ButtonModule,
1295
+ InputModule,
1296
+ ReactiveFormsModule,
1297
+ LayerModule,
1298
+ SelectModule,
1299
+ ToggleModule,
1300
+ TooltipModule,
1301
+ CarbonMultiInputModule,
1302
+ InputLabelModule,
1303
+ NumberModule,
1304
+ ], 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<cds-modal\n valtimoCdsModal\n *ngIf=\"{\n title:\n (modalMode === 'add' ? 'ikoManagement.addColumn' : 'ikoManagement.editColumn') | translate,\n } as state\"\n [open]=\"$openModal()\"\n [title]=\"state.title\"\n (close)=\"closeModal()\"\n>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 cdsModalHeaderHeading>\n {{ state.title }}\n </h3>\n </cds-modal-header>\n\n <form cdsModalContent [cdsLayer]=\"1\" [formGroup]=\"form\" class=\"iko-column-form\">\n <cds-label>\n {{ 'ikoManagement.titleTitle' | translate }}\n\n <input\n [invalid]=\"title.dirty && title.invalid\"\n formControlName=\"title\"\n cdsText\n placeholder=\"{{ 'ikoManagement.columnTitlePlaceholder' | translate }}\"\n />\n </cds-label>\n\n <cds-label>\n {{ 'ikoManagement.keyTitle' | translate }}\n\n <input\n [invalid]=\"key.dirty && key.invalid\"\n formControlName=\"key\"\n cdsText\n placeholder=\"{{ 'ikoManagement.columnKeyPlaceholder' | translate }}\"\n />\n </cds-label>\n\n <cds-label>\n {{ 'ikoManagement.pathTitle' | translate }}\n\n <input\n [invalid]=\"path.dirty && path.invalid\"\n formControlName=\"path\"\n cdsText\n placeholder=\"{{ 'ikoManagement.columnPathPlaceholder' | translate }}\"\n />\n </cds-label>\n\n <cds-toggle\n formControlName=\"sortable\"\n [label]=\"'ikoManagement.sortableTitle' | translate\"\n [onText]=\"'ikoManagement.sortingEnabled' | translate\"\n [offText]=\"'ikoManagement.sortingDisabled' | translate\"\n ></cds-toggle>\n\n <v-select\n [invalid]=\"defaultSort.dirty && defaultSort.invalid\"\n formControlName=\"defaultSort\"\n [items]=\"sortSelectItems\"\n titleTranslationKey=\"ikoManagement.defaultSortTitle\"\n [appendInline]=\"false\"\n ></v-select>\n\n <v-select\n [invalid]=\"displayType.dirty && displayType.invalid\"\n formControlName=\"displayType\"\n [items]=\"displayTypeSelectItems\"\n titleTranslationKey=\"ikoManagement.displayType\"\n [appendInline]=\"false\"\n ></v-select>\n\n <v-input-label\n *ngIf=\"isDateDisplayType$ | async\"\n titleTranslationKey=\"listColumn.dateFormat\"\n tooltipTranslationKey=\"listColumn.dateFormatTooltip\"\n >\n <input cdsText formControlName=\"dateFormat\" />\n </v-input-label>\n\n <v-input-label\n *ngIf=\"isBooleanDisplayType$ | async\"\n titleTranslationKey=\"listColumn.enumTitleOptional\"\n tooltipTranslationKey=\"listColumn.enumTooltipOptional\"\n >\n <valtimo-carbon-multi-input\n type=\"keyValue\"\n formControlName=\"booleanDisplayTypeParameters\"\n [hideAddButton]=\"true\"\n [hideDeleteButton]=\"true\"\n [maxRows]=\"1\"\n [keyColumnTitle]=\"'viewTypeConverter.Yes' | translate\"\n [valueColumnTitle]=\"'viewTypeConverter.No' | translate\"\n ></valtimo-carbon-multi-input>\n </v-input-label>\n\n <v-input-label\n *ngIf=\"isEnumDisplayType$ | async\"\n titleTranslationKey=\"listColumn.enumTitle\"\n tooltipTranslationKey=\"listColumn.enumTooltip\"\n >\n <valtimo-carbon-multi-input\n type=\"keyValue\"\n formControlName=\"enumDisplayTypeParameters\"\n ></valtimo-carbon-multi-input>\n </v-input-label>\n\n <v-input-label\n *ngIf=\"isTagsDisplayType$ | async\"\n titleTranslationKey=\"listColumn.tagAmount\"\n tooltipTranslationKey=\"listColumn.tagAmountTooltip\"\n >\n <cds-number formControlName=\"tagAmount\" [min]=\"1\" [step]=\"1\"></cds-number>\n </v-input-label>\n </form>\n\n <cds-modal-footer>\n <button cdsButton=\"ghost\" (click)=\"closeModal()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button\n [disabled]=\"form.invalid || form.disabled || !form.dirty\"\n cdsButton=\"primary\"\n (click)=\"addColumn()\"\n >\n {{ 'interface.save' | translate }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", styles: [".iko-column-form{display:flex;flex-direction:column;gap:16px;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"] }]
1305
+ }], ctorParameters: () => [{ type: IkoManagementApiService }, { type: i2$2.FormBuilder }, { type: i3.ActivatedRoute }], propDecorators: { openModal: [{
1306
+ type: Input
1307
+ }], listColumns: [{
1308
+ type: Input
1309
+ }], selectedListColumn: [{
1310
+ type: Input
1311
+ }], modalMode: [{
1312
+ type: Input
1313
+ }], closeModalEvent: [{
1314
+ type: Output
1315
+ }] } });
1316
+
1317
+ /*
1318
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1319
+ *
1320
+ * Licensed under EUPL, Version 1.2 (the "License");
1321
+ * you may not use this file except in compliance with the License.
1322
+ * You may obtain a copy of the License at
1323
+ *
1324
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1325
+ *
1326
+ * Unless required by applicable law or agreed to in writing, software
1327
+ * distributed under the License is distributed on an "AS IS" basis,
1328
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1329
+ * See the License for the specific language governing permissions and
1330
+ * limitations under the License.
1331
+ */
1332
+ class IkoManagementApiComponent {
1333
+ constructor(ikoManagementApiService, pageTitleService, router, formBuilder, translateService) {
1334
+ this.ikoManagementApiService = ikoManagementApiService;
1335
+ this.pageTitleService = pageTitleService;
1336
+ this.router = router;
1337
+ this.formBuilder = formBuilder;
1338
+ this.translateService = translateService;
1339
+ this.openModal$ = new BehaviorSubject(false);
1340
+ this.disabled$ = new BehaviorSubject(true);
1341
+ this.loading$ = new BehaviorSubject(true);
1342
+ this._reload$ = new BehaviorSubject(null);
1343
+ this.apiConfigs$ = this._reload$.pipe(switchMap(() => this.ikoManagementApiService.getIkoRepositoryConfigs()), map(res => res.content), tap(() => this.loading$.next(false)));
1344
+ this.FIELDS = [
1345
+ {
1346
+ key: 'title',
1347
+ label: 'ikoManagement.ikoServer',
1348
+ },
1349
+ ];
1350
+ this.form = this.formBuilder.group({
1351
+ title: this.formBuilder.control('', [Validators.required]),
1352
+ key: this.formBuilder.control('', [Validators.required]),
1353
+ type: this.formBuilder.control('iko', [Validators.required]),
1354
+ pluginId: this.formBuilder.control('', [Validators.required]),
1355
+ });
1356
+ this._ikoRepositoryTypes$ = this.ikoManagementApiService.getIkoRepositoryTypes();
1357
+ this.ikoRepositoryTypeSelectItems$ = this._ikoRepositoryTypes$.pipe(map(types => Object.keys(types).map(typeKey => ({ id: typeKey, text: types[typeKey] }))), tap(() => {
1358
+ this.disabled$.next(false);
1359
+ }));
1360
+ this.pluginSelectItems$ = this.form
1361
+ .get('type')
1362
+ .valueChanges.pipe(startWith(this.form.get('type').value), tap(() => this.form.patchValue({ pluginId: '' })), switchMap(type => combineLatest([
1363
+ type ? this.ikoManagementApiService.getIkoRepositoryConfigPropertyFields(type) : of([]),
1364
+ this.translateService.stream('key'),
1365
+ ])), map(([res]) => res?.reduce((acc, curr) => {
1366
+ return [
1367
+ ...acc,
1368
+ ...curr?.dropdownList.map(field => ({
1369
+ id: field.first,
1370
+ text: field.second,
1371
+ })),
1372
+ ];
1373
+ }, []) || []), tap(() => {
1374
+ this.disabled$.next(false);
1375
+ }));
1376
+ this._subscriptions = new Subscription();
1377
+ }
1378
+ ngOnInit() {
1379
+ this.pageTitleService.disableReset();
1380
+ }
1381
+ ngOnDestroy() {
1382
+ this._subscriptions.unsubscribe();
1383
+ this.pageTitleService.enableReset();
1384
+ }
1385
+ onRowClicked(event) {
1386
+ this.router.navigate(['iko-management', event.key]);
1387
+ }
1388
+ openModal() {
1389
+ this.openModal$.next(true);
1390
+ }
1391
+ closeModal() {
1392
+ this.openModal$.next(false);
1393
+ setTimeout(() => {
1394
+ this.form.reset();
1395
+ }, CARBON_CONSTANTS.modalAnimationMs);
1396
+ }
1397
+ getControlInvalid(controlKey) {
1398
+ const control = this.form.get(controlKey);
1399
+ if (!control) {
1400
+ return true;
1401
+ }
1402
+ return !control.valid && !control.pristine;
1403
+ }
1404
+ createApiConfig() {
1405
+ const formValue = this.form.getRawValue();
1406
+ this.disable();
1407
+ this.ikoManagementApiService
1408
+ .createIkoRepositoryConfig(formValue.key, {
1409
+ title: formValue.title,
1410
+ key: formValue.key,
1411
+ type: formValue.type,
1412
+ properties: {
1413
+ pluginConfiguration: formValue.pluginId,
1414
+ },
1415
+ })
1416
+ .subscribe({
1417
+ next: () => {
1418
+ this.enable();
1419
+ this.closeModal();
1420
+ this.reload();
1421
+ },
1422
+ error: () => this.enable(),
1423
+ });
1424
+ }
1425
+ disable() {
1426
+ this.disabled$.next(true);
1427
+ this.form.disable();
1428
+ }
1429
+ enable() {
1430
+ this.disabled$.next(false);
1431
+ this.form.enable();
1432
+ }
1433
+ reload() {
1434
+ this.loading$.next(true);
1435
+ this._reload$.next(null);
1436
+ }
1437
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementApiComponent, deps: [{ token: IkoManagementApiService }, { token: i1$2.PageTitleService }, { token: i3.Router }, { token: i2$2.FormBuilder }, { token: i3$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
1438
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: IkoManagementApiComponent, isStandalone: true, selector: "valtimo-iko-management-api", 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<valtimo-carbon-list\n [fields]=\"FIELDS\"\n [items]=\"apiConfigs$ | async\"\n [loading]=\"loading$ | async\"\n (rowClicked)=\"onRowClicked($event)\"\n>\n <div carbonToolbarContent>\n <button cdsButton=\"primary\" (click)=\"openModal()\">\n {{ 'ikoManagement.addApiConfig' | translate }}\n\n <svg cdsIcon=\"add\" size=\"16\" class=\"cds--btn__icon\"></svg>\n </button>\n </div>\n</valtimo-carbon-list>\n\n<cds-modal\n valtimoCdsModal\n [open]=\"openModal$ | async\"\n showFooter=\"true\"\n title=\"{{ 'ikoManagement.addApiConfig' | translate }}\"\n (close)=\"closeModal()\"\n>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 cdsModalHeaderHeading>\n {{ 'ikoManagement.addApiConfig' | translate }}\n </h3>\n </cds-modal-header>\n\n <form cdsModalContent [cdsLayer]=\"1\" [formGroup]=\"form\" class=\"iko-api-form\">\n <cds-label [invalid]=\"getControlInvalid('title')\">\n {{ 'ikoManagement.titleTitle' | translate }}\n\n <input\n [invalid]=\"getControlInvalid('title')\"\n formControlName=\"title\"\n cdsText\n placeholder=\"{{ 'ikoManagement.titlePlaceholder' | translate }}\"\n />\n </cds-label>\n\n <cds-label [invalid]=\"getControlInvalid('key')\">\n {{ 'ikoManagement.keyTitle' | translate }}\n\n <input\n [invalid]=\"getControlInvalid('key')\"\n formControlName=\"key\"\n cdsText\n placeholder=\"{{ 'ikoManagement.keyPlaceholder' | translate }}\"\n />\n </cds-label>\n\n @if (false) {\n <!-- TODO: Discuss with Thomas-->\n <v-select\n [invalid]=\"getControlInvalid('type')\"\n formControlName=\"type\"\n [items]=\"ikoRepositoryTypeSelectItems$ | async\"\n [title]=\"'ikoManagement.typeTitle' | translate\"\n [appendInline]=\"false\"\n ></v-select>\n }\n\n <v-select\n [invalid]=\"getControlInvalid('pluginId')\"\n formControlName=\"pluginId\"\n [items]=\"pluginSelectItems$ | async\"\n [title]=\"'ikoManagement.pluginIdTitle' | translate\"\n [appendInline]=\"false\"\n ></v-select>\n </form>\n\n <cds-modal-footer>\n <button cdsButton=\"ghost\" (click)=\"closeModal()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button [disabled]=\"this.form.invalid\" cdsButton=\"primary\" (click)=\"createApiConfig()\">\n {{ 'interface.save' | translate }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", styles: [".iko-api-form{display:flex;flex-direction:column;gap:16px;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: "ngmodule", type: CommonModule }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i1$2.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: "ngmodule", type: TabsModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ModalModule }, { kind: "component", type: i6.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i6.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i6.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i6.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i6.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i6.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.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: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: InputModule }, { kind: "component", type: i6.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i6.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: ValtimoCdsModalDirective, selector: "[valtimoCdsModal]", inputs: ["minContentHeight"] }, { kind: "ngmodule", type: LayerModule }, { kind: "directive", type: i6.LayerDirective, selector: "[cdsLayer], [ibmLayer]", inputs: ["ibmLayer", "cdsLayer"], exportAs: ["layer"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i1$2.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "disabled", "dropUp", "invalid", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "clearText", "clearable", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder", "smallMargin", "carbonTheme", "appendInline", "dataTestId"], outputs: ["selectedChange"] }] }); }
1439
+ }
1440
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementApiComponent, decorators: [{
1441
+ type: Component,
1442
+ args: [{ selector: 'valtimo-iko-management-api', standalone: true, imports: [
1443
+ CommonModule,
1444
+ CarbonListModule,
1445
+ TabsModule,
1446
+ TranslateModule,
1447
+ ModalModule,
1448
+ ButtonModule,
1449
+ IconModule,
1450
+ FormsModule,
1451
+ InputModule,
1452
+ ReactiveFormsModule,
1453
+ ValtimoCdsModalDirective,
1454
+ LayerModule,
1455
+ SelectModule,
1456
+ IkoManagementListModalComponent,
1457
+ ], 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<valtimo-carbon-list\n [fields]=\"FIELDS\"\n [items]=\"apiConfigs$ | async\"\n [loading]=\"loading$ | async\"\n (rowClicked)=\"onRowClicked($event)\"\n>\n <div carbonToolbarContent>\n <button cdsButton=\"primary\" (click)=\"openModal()\">\n {{ 'ikoManagement.addApiConfig' | translate }}\n\n <svg cdsIcon=\"add\" size=\"16\" class=\"cds--btn__icon\"></svg>\n </button>\n </div>\n</valtimo-carbon-list>\n\n<cds-modal\n valtimoCdsModal\n [open]=\"openModal$ | async\"\n showFooter=\"true\"\n title=\"{{ 'ikoManagement.addApiConfig' | translate }}\"\n (close)=\"closeModal()\"\n>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 cdsModalHeaderHeading>\n {{ 'ikoManagement.addApiConfig' | translate }}\n </h3>\n </cds-modal-header>\n\n <form cdsModalContent [cdsLayer]=\"1\" [formGroup]=\"form\" class=\"iko-api-form\">\n <cds-label [invalid]=\"getControlInvalid('title')\">\n {{ 'ikoManagement.titleTitle' | translate }}\n\n <input\n [invalid]=\"getControlInvalid('title')\"\n formControlName=\"title\"\n cdsText\n placeholder=\"{{ 'ikoManagement.titlePlaceholder' | translate }}\"\n />\n </cds-label>\n\n <cds-label [invalid]=\"getControlInvalid('key')\">\n {{ 'ikoManagement.keyTitle' | translate }}\n\n <input\n [invalid]=\"getControlInvalid('key')\"\n formControlName=\"key\"\n cdsText\n placeholder=\"{{ 'ikoManagement.keyPlaceholder' | translate }}\"\n />\n </cds-label>\n\n @if (false) {\n <!-- TODO: Discuss with Thomas-->\n <v-select\n [invalid]=\"getControlInvalid('type')\"\n formControlName=\"type\"\n [items]=\"ikoRepositoryTypeSelectItems$ | async\"\n [title]=\"'ikoManagement.typeTitle' | translate\"\n [appendInline]=\"false\"\n ></v-select>\n }\n\n <v-select\n [invalid]=\"getControlInvalid('pluginId')\"\n formControlName=\"pluginId\"\n [items]=\"pluginSelectItems$ | async\"\n [title]=\"'ikoManagement.pluginIdTitle' | translate\"\n [appendInline]=\"false\"\n ></v-select>\n </form>\n\n <cds-modal-footer>\n <button cdsButton=\"ghost\" (click)=\"closeModal()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button [disabled]=\"this.form.invalid\" cdsButton=\"primary\" (click)=\"createApiConfig()\">\n {{ 'interface.save' | translate }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", styles: [".iko-api-form{display:flex;flex-direction:column;gap:16px;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"] }]
1458
+ }], ctorParameters: () => [{ type: IkoManagementApiService }, { type: i1$2.PageTitleService }, { type: i3.Router }, { type: i2$2.FormBuilder }, { type: i3$1.TranslateService }] });
1459
+
1460
+ /*
1461
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1462
+ *
1463
+ * Licensed under EUPL, Version 1.2 (the "License");
1464
+ * you may not use this file except in compliance with the License.
1465
+ * You may obtain a copy of the License at
1466
+ *
1467
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1468
+ *
1469
+ * Unless required by applicable law or agreed to in writing, software
1470
+ * distributed under the License is distributed on an "AS IS" basis,
1471
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1472
+ * See the License for the specific language governing permissions and
1473
+ * limitations under the License.
1474
+ */
1475
+
1476
+ /*
1477
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1478
+ *
1479
+ * Licensed under EUPL, Version 1.2 (the "License");
1480
+ * you may not use this file except in compliance with the License.
1481
+ * You may obtain a copy of the License at
1482
+ *
1483
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1484
+ *
1485
+ * Unless required by applicable law or agreed to in writing, software
1486
+ * distributed under the License is distributed on an "AS IS" basis,
1487
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1488
+ * See the License for the specific language governing permissions and
1489
+ * limitations under the License.
1490
+ */
1491
+
1492
+ /*
1493
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1494
+ *
1495
+ * Licensed under EUPL, Version 1.2 (the "License");
1496
+ * you may not use this file except in compliance with the License.
1497
+ * You may obtain a copy of the License at
1498
+ *
1499
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1500
+ *
1501
+ * Unless required by applicable law or agreed to in writing, software
1502
+ * distributed under the License is distributed on an "AS IS" basis,
1503
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1504
+ * See the License for the specific language governing permissions and
1505
+ * limitations under the License.
1506
+ */
1507
+
1508
+ /*
1509
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1510
+ *
1511
+ * Licensed under EUPL, Version 1.2 (the "License");
1512
+ * you may not use this file except in compliance with the License.
1513
+ * You may obtain a copy of the License at
1514
+ *
1515
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1516
+ *
1517
+ * Unless required by applicable law or agreed to in writing, software
1518
+ * distributed under the License is distributed on an "AS IS" basis,
1519
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1520
+ * See the License for the specific language governing permissions and
1521
+ * limitations under the License.
1522
+ */
1523
+ var IkoManagementTabType;
1524
+ (function (IkoManagementTabType) {
1525
+ IkoManagementTabType["LIST"] = "list";
1526
+ IkoManagementTabType["SEARCH_FIELDS"] = "search";
1527
+ IkoManagementTabType["WIDGETS"] = "widgets";
1528
+ IkoManagementTabType["TABS"] = "tabs";
1529
+ })(IkoManagementTabType || (IkoManagementTabType = {}));
1530
+ var IkoTabType;
1531
+ (function (IkoTabType) {
1532
+ IkoTabType["WIDGETS"] = "widgets";
1533
+ })(IkoTabType || (IkoTabType = {}));
1534
+
1535
+ /*
1536
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1537
+ *
1538
+ * Licensed under EUPL, Version 1.2 (the "License");
1539
+ * you may not use this file except in compliance with the License.
1540
+ * You may obtain a copy of the License at
1541
+ *
1542
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1543
+ *
1544
+ * Unless required by applicable law or agreed to in writing, software
1545
+ * distributed under the License is distributed on an "AS IS" basis,
1546
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1547
+ * See the License for the specific language governing permissions and
1548
+ * limitations under the License.
1549
+ */
1550
+
1551
+ /*
1552
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1553
+ *
1554
+ * Licensed under EUPL, Version 1.2 (the "License");
1555
+ * you may not use this file except in compliance with the License.
1556
+ * You may obtain a copy of the License at
1557
+ *
1558
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1559
+ *
1560
+ * Unless required by applicable law or agreed to in writing, software
1561
+ * distributed under the License is distributed on an "AS IS" basis,
1562
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1563
+ * See the License for the specific language governing permissions and
1564
+ * limitations under the License.
1565
+ */
1566
+ var SearchFieldDataType;
1567
+ (function (SearchFieldDataType) {
1568
+ SearchFieldDataType["TEXT"] = "text";
1569
+ SearchFieldDataType["NUMBER"] = "number";
1570
+ SearchFieldDataType["DATE"] = "date";
1571
+ SearchFieldDataType["DATETIME"] = "datetime";
1572
+ SearchFieldDataType["TIME"] = "time";
1573
+ SearchFieldDataType["BOOLEAN"] = "boolean";
1574
+ })(SearchFieldDataType || (SearchFieldDataType = {}));
1575
+ var SearchFieldFieldType;
1576
+ (function (SearchFieldFieldType) {
1577
+ SearchFieldFieldType["SINGLE"] = "single";
1578
+ SearchFieldFieldType["RANGE"] = "range";
1579
+ SearchFieldFieldType["SINGLE_SELECT_DROPDOWN"] = "single_select_dropdown";
1580
+ SearchFieldFieldType["MULTI_SELECT_DROPDOWN"] = "multi_select_dropdown";
1581
+ })(SearchFieldFieldType || (SearchFieldFieldType = {}));
1582
+ var SearchFieldMatchType;
1583
+ (function (SearchFieldMatchType) {
1584
+ SearchFieldMatchType["LIKE"] = "like";
1585
+ SearchFieldMatchType["EXACT"] = "exact";
1586
+ })(SearchFieldMatchType || (SearchFieldMatchType = {}));
1587
+ var SearchDropdownDataProvider;
1588
+ (function (SearchDropdownDataProvider) {
1589
+ SearchDropdownDataProvider["DATABASE"] = "dropdownDatabaseDataProvider";
1590
+ SearchDropdownDataProvider["JSON"] = "dropdownJsonFileDataProvider";
1591
+ })(SearchDropdownDataProvider || (SearchDropdownDataProvider = {}));
1592
+
1593
+ /*
1594
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1595
+ *
1596
+ * Licensed under EUPL, Version 1.2 (the "License");
1597
+ * you may not use this file except in compliance with the License.
1598
+ * You may obtain a copy of the License at
1599
+ *
1600
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1601
+ *
1602
+ * Unless required by applicable law or agreed to in writing, software
1603
+ * distributed under the License is distributed on an "AS IS" basis,
1604
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1605
+ * See the License for the specific language governing permissions and
1606
+ * limitations under the License.
1607
+ */
1608
+
1609
+ /*
1610
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1611
+ *
1612
+ * Licensed under EUPL, Version 1.2 (the "License");
1613
+ * you may not use this file except in compliance with the License.
1614
+ * You may obtain a copy of the License at
1615
+ *
1616
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1617
+ *
1618
+ * Unless required by applicable law or agreed to in writing, software
1619
+ * distributed under the License is distributed on an "AS IS" basis,
1620
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1621
+ * See the License for the specific language governing permissions and
1622
+ * limitations under the License.
1623
+ */
1624
+ class IkoManagementSearchFieldModalComponent {
1625
+ set prefillData(value) {
1626
+ this._prefillData = value;
1627
+ this.setPrefilledForm(value);
1628
+ }
1629
+ get prefillData() {
1630
+ return this._prefillData;
1631
+ }
1632
+ get dataType() {
1633
+ return this.formGroup.get('dataType');
1634
+ }
1635
+ get dataTypeValue$() {
1636
+ return this.dataType?.valueChanges.pipe(startWith(this.dataType.value)) ?? of(null);
1637
+ }
1638
+ get matchType() {
1639
+ return this.formGroup.get('matchType');
1640
+ }
1641
+ get matchTypeValue$() {
1642
+ return this.matchType?.valueChanges.pipe(startWith(this.matchType.value)) ?? of(null);
1643
+ }
1644
+ get dropdownDataProvider() {
1645
+ return this.formGroup.get('dropdownDataProvider');
1646
+ }
1647
+ get dropdownDataProviderValue$() {
1648
+ return (this.dropdownDataProvider?.valueChanges.pipe(startWith(this.dropdownDataProvider.value)) ??
1649
+ of(null));
1650
+ }
1651
+ get fieldType() {
1652
+ return this.formGroup.get('fieldType');
1653
+ }
1654
+ get fieldTypeValue$() {
1655
+ return this.fieldType?.valueChanges.pipe(startWith(this.fieldType.value)) ?? of(null);
1656
+ }
1657
+ get keyValue() {
1658
+ const controlValue = this.formGroup.get('key')?.value;
1659
+ return !controlValue ? null : controlValue;
1660
+ }
1661
+ get dataTypeValue() {
1662
+ const controlValue = this.formGroup.get('dataType')?.value;
1663
+ this._dataTypeValue$.next(controlValue?.id);
1664
+ return !controlValue ? null : controlValue.id;
1665
+ }
1666
+ get fieldTypeValue() {
1667
+ const controlValue = this.formGroup.get('fieldType')?.value;
1668
+ return !controlValue ? null : controlValue.id;
1669
+ }
1670
+ get dropdownDataProviderValue() {
1671
+ const controlValue = this.formGroup.get('dropdownDataProvider')?.value;
1672
+ this._dropdownProviderValue$.next(controlValue?.id);
1673
+ return !controlValue ? null : controlValue.id;
1674
+ }
1675
+ get dropdownValuesArray() {
1676
+ const formArray = this.formGroup.get('dropdownValues');
1677
+ return !formArray ? null : formArray;
1678
+ }
1679
+ constructor(iconService, fb, translateService) {
1680
+ this.iconService = iconService;
1681
+ this.fb = fb;
1682
+ this.translateService = translateService;
1683
+ this.closeEvent = new EventEmitter();
1684
+ this.formGroup = this.fb.group({
1685
+ key: this.fb.control('', Validators.required),
1686
+ title: this.fb.control('', Validators.required),
1687
+ path: this.fb.control('', Validators.required),
1688
+ dataType: this.fb.control(null, Validators.required),
1689
+ matchType: this.fb.control(null, this.matchTypeValidator),
1690
+ fieldType: this.fb.control(null, Validators.required),
1691
+ dropdownDataProvider: this.fb.control(null),
1692
+ dropdownValues: this.fb.array([]),
1693
+ });
1694
+ this.SearchFieldDataType = SearchFieldDataType;
1695
+ this.SearchFieldFieldType = SearchFieldFieldType;
1696
+ this.SearchDropdownDataProvider = SearchDropdownDataProvider;
1697
+ this.DROPDOWN_FIELDS = [
1698
+ {
1699
+ key: 'key',
1700
+ label: 'searchFieldsOverview.key',
1701
+ viewType: ViewType.TEXT,
1702
+ },
1703
+ {
1704
+ key: 'value',
1705
+ label: 'searchFieldsOverview.text',
1706
+ viewType: ViewType.TEXT,
1707
+ },
1708
+ ];
1709
+ this._dataTypeValue$ = new BehaviorSubject(null);
1710
+ this._dropdownProviderValue$ = new BehaviorSubject(null);
1711
+ this.dataTypeItems$ = combineLatest([
1712
+ this.dataTypeValue$,
1713
+ this.translateService.stream('key'),
1714
+ ]).pipe(map$1(([dataTypeValue]) => [
1715
+ {
1716
+ content: this.translateService.instant('searchFields.text'),
1717
+ id: SearchFieldDataType.TEXT,
1718
+ },
1719
+ {
1720
+ content: this.translateService.instant('searchFields.boolean'),
1721
+ id: SearchFieldDataType.BOOLEAN,
1722
+ },
1723
+ {
1724
+ content: this.translateService.instant('searchFields.date'),
1725
+ id: SearchFieldDataType.DATE,
1726
+ },
1727
+ {
1728
+ content: this.translateService.instant('searchFields.datetime'),
1729
+ id: SearchFieldDataType.DATETIME,
1730
+ },
1731
+ {
1732
+ content: this.translateService.instant('searchFields.number'),
1733
+ id: SearchFieldDataType.NUMBER,
1734
+ },
1735
+ {
1736
+ content: this.translateService.instant('searchFields.time'),
1737
+ id: SearchFieldDataType.TIME,
1738
+ },
1739
+ ].map(item => ({ ...item, selected: item.id === dataTypeValue?.id }))));
1740
+ this.fieldTypeItems$ = combineLatest([
1741
+ this._dataTypeValue$.pipe(distinctUntilChanged()),
1742
+ this.fieldTypeValue$,
1743
+ this.translateService.stream('key'),
1744
+ ]).pipe(map$1(([dataTypeValue, fieldTypeValue]) => [
1745
+ {
1746
+ content: this.translateService.instant('searchFieldsOverview.single'),
1747
+ id: SearchFieldFieldType.SINGLE,
1748
+ },
1749
+ {
1750
+ content: this.translateService.instant('searchFieldsOverview.range'),
1751
+ id: SearchFieldFieldType.RANGE,
1752
+ },
1753
+ ...(dataTypeValue === SearchFieldDataType.TEXT
1754
+ ? [
1755
+ {
1756
+ content: this.translateService.instant('searchFieldsOverview.single-select-dropdown'),
1757
+ id: SearchFieldFieldType.SINGLE_SELECT_DROPDOWN,
1758
+ },
1759
+ {
1760
+ content: this.translateService.instant('searchFieldsOverview.multi-select-dropdown'),
1761
+ id: SearchFieldFieldType.MULTI_SELECT_DROPDOWN,
1762
+ },
1763
+ ]
1764
+ : []),
1765
+ ].map(item => ({ ...item, selected: item.id === fieldTypeValue?.id }))));
1766
+ this.dataProviderItems$ = this.translateService
1767
+ .stream('key')
1768
+ .pipe(switchMap(() => this.dropdownDataProviderValue$), map$1(dataProviderValue => [
1769
+ {
1770
+ content: this.translateService.instant('searchFieldsOverview.dropdownDatabaseDataProvider'),
1771
+ id: SearchDropdownDataProvider.DATABASE,
1772
+ },
1773
+ {
1774
+ content: this.translateService.instant('searchFieldsOverview.dropdownJsonFileDataProvider'),
1775
+ id: SearchDropdownDataProvider.JSON,
1776
+ },
1777
+ ].map(item => ({ ...item, selected: item.id === dataProviderValue?.id }))));
1778
+ this.matchTypeItems$ = this.translateService
1779
+ .stream('key')
1780
+ .pipe(switchMap(() => this.matchTypeValue$), map$1(matchTypeValue => [
1781
+ {
1782
+ content: this.translateService.instant('searchFieldsOverview.like'),
1783
+ id: SearchFieldMatchType.LIKE,
1784
+ },
1785
+ {
1786
+ content: this.translateService.instant('searchFieldsOverview.exact'),
1787
+ id: SearchFieldMatchType.EXACT,
1788
+ },
1789
+ ].map(item => ({ ...item, selected: item.id === matchTypeValue?.id }))));
1790
+ this.ValuePathSelectorPrefix = ValuePathSelectorPrefix;
1791
+ this.iconService.registerAll([TrashCan16, InformationFilled16]);
1792
+ }
1793
+ ngOnInit() {
1794
+ this.formGroup.setValidators([
1795
+ this.dropdownDataProviderValidator,
1796
+ this.dropdownValuesValidator,
1797
+ ]);
1798
+ }
1799
+ addDropdownValue(prefillValue) {
1800
+ if (!this.dropdownValuesArray)
1801
+ return;
1802
+ this.dropdownValuesArray.push(this.fb.group({
1803
+ key: this.fb.control(prefillValue?.key ?? '', Validators.required),
1804
+ value: this.fb.control(prefillValue?.value ?? '', Validators.required),
1805
+ }));
1806
+ }
1807
+ removeDropdownValue(index) {
1808
+ if (!this.dropdownValuesArray)
1809
+ return;
1810
+ this.dropdownValuesArray.removeAt(index);
1811
+ }
1812
+ onCancel() {
1813
+ this.closeEvent.emit(null);
1814
+ this.resetForm();
1815
+ }
1816
+ onSave() {
1817
+ const groupValue = this.formGroup.getRawValue();
1818
+ this.closeEvent.emit({
1819
+ ...(groupValue.title && { title: groupValue.title }),
1820
+ ...(groupValue.key && { key: groupValue.key }),
1821
+ ...(groupValue.path && { path: groupValue.path }),
1822
+ ...(groupValue.dataType?.content && { dataType: groupValue.dataType.id }),
1823
+ ...(groupValue.matchType?.content && { matchType: groupValue.matchType.id }),
1824
+ ...(groupValue.fieldType?.content && { fieldType: groupValue.fieldType.id }),
1825
+ ...(groupValue.dropdownDataProvider?.content && {
1826
+ dropdownDataProvider: groupValue.dropdownDataProvider.id,
1827
+ }),
1828
+ ...(groupValue.dropdownValues && {
1829
+ dropdownValues: groupValue.dropdownValues.reduce((acc, curr) => ({ ...acc, ...(!!curr?.key && { [curr.key]: curr.value }) }), {}),
1830
+ }),
1831
+ });
1832
+ this.resetForm();
1833
+ }
1834
+ setPrefilledForm(prefillData) {
1835
+ if (!prefillData)
1836
+ return;
1837
+ this.formGroup.patchValue({
1838
+ ...prefillData,
1839
+ dataType: !prefillData.dataType
1840
+ ? null
1841
+ : {
1842
+ content: prefillData.dataType,
1843
+ id: prefillData.dataType,
1844
+ selected: true,
1845
+ },
1846
+ matchType: !prefillData.matchType
1847
+ ? null
1848
+ : {
1849
+ content: prefillData.matchType,
1850
+ id: prefillData.matchType,
1851
+ selected: true,
1852
+ },
1853
+ fieldType: !prefillData.fieldType
1854
+ ? null
1855
+ : {
1856
+ content: prefillData.fieldType,
1857
+ id: prefillData.fieldType,
1858
+ selected: true,
1859
+ },
1860
+ dropdownDataProvider: !prefillData.dropdownDataProvider
1861
+ ? null
1862
+ : {
1863
+ content: prefillData.dropdownDataProvider,
1864
+ id: prefillData.dropdownDataProvider,
1865
+ selected: true,
1866
+ },
1867
+ dropdownValues: [],
1868
+ });
1869
+ if (prefillData.dropdownDataProvider && prefillData.dropdownValues)
1870
+ this.setPrefilledDropdownValues(prefillData.dropdownValues);
1871
+ this.formGroup.get('key')?.disable();
1872
+ }
1873
+ setPrefilledDropdownValues(dropdownValue) {
1874
+ if (!this.dropdownValuesArray || !this.dropdownDataProviderValue)
1875
+ return;
1876
+ Object.entries(dropdownValue).forEach(([key, value]) => {
1877
+ this.addDropdownValue({ key, value });
1878
+ });
1879
+ }
1880
+ matchTypeValidator(control) {
1881
+ const controlValue = control.value;
1882
+ const dataTypeControlValue = control.parent?.get('dataType')?.value;
1883
+ if (dataTypeControlValue?.id === SearchFieldDataType.TEXT &&
1884
+ (!controlValue || !controlValue.selected))
1885
+ return { error: 'Match type not selected' };
1886
+ return null;
1887
+ }
1888
+ dropdownDataProviderValidator(group) {
1889
+ const controlValue = group.get('dropdownDataProvider')?.value;
1890
+ const fieldTypeControlValue = group.get('fieldType')?.value;
1891
+ if ([
1892
+ SearchFieldFieldType.SINGLE_SELECT_DROPDOWN,
1893
+ SearchFieldFieldType.MULTI_SELECT_DROPDOWN,
1894
+ ].includes(fieldTypeControlValue?.id) &&
1895
+ !controlValue)
1896
+ return { error: 'Dropdown source provider is not specified' };
1897
+ return null;
1898
+ }
1899
+ dropdownValuesValidator(group) {
1900
+ const controlValue = group.get('dropdownValues')?.value;
1901
+ const fieldTypeControlValue = group.get('fieldType')?.value?.id;
1902
+ const dropdownProviderValue = group.get('dropdownDataProvider')?.value?.id;
1903
+ if ([
1904
+ SearchFieldFieldType.SINGLE_SELECT_DROPDOWN,
1905
+ SearchFieldFieldType.MULTI_SELECT_DROPDOWN,
1906
+ ].includes(fieldTypeControlValue) &&
1907
+ (!controlValue || controlValue?.length === 0) &&
1908
+ dropdownProviderValue === SearchDropdownDataProvider.DATABASE)
1909
+ return { error: 'Dropdown source provider is not specified or is empty' };
1910
+ return null;
1911
+ }
1912
+ resetForm() {
1913
+ setTimeout(() => {
1914
+ while (!!this.dropdownValuesArray?.length) {
1915
+ this.dropdownValuesArray.removeAt(0);
1916
+ }
1917
+ this.formGroup.reset();
1918
+ this.formGroup.enable();
1919
+ }, CARBON_CONSTANTS.modalAnimationMs);
1920
+ }
1921
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementSearchFieldModalComponent, deps: [{ token: i6.IconService }, { token: i2$2.FormBuilder }, { token: i3$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
1922
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: IkoManagementSearchFieldModalComponent, isStandalone: true, selector: "valtimo-iko-management-search-field-modal", inputs: { open: "open", prefillData: "prefillData" }, outputs: { closeEvent: "closeEvent" }, 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<cds-modal [open]=\"open\" showFooter=\"true\" (close)=\"onCancel()\">\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"onCancel()\">\n <h3 cdsModalHeaderHeading>\n {{ (!prefillData ? 'searchFieldsOverview.add' : 'searchFieldsOverview.edit') | translate }}\n </h3>\n </cds-modal-header>\n\n <form cdsModalContent [formGroup]=\"formGroup\" class=\"valtimo-search-fields-modal__content\">\n <div class=\"valtimo-search-fields-modal__input\">\n <v-input-label\n [title]=\"'searchFieldsOverview.title' | translate\"\n [tooltip]=\"'searchFieldsOverviewTooltips.title' | translate\"\n >\n </v-input-label>\n\n <input data-testid=\"-search-title\" cdsText type=\"text\" formControlName=\"title\" cdsLayer />\n </div>\n\n <div class=\"valtimo-search-fields-modal__input\">\n <v-input-label\n [title]=\"'searchFieldsOverview.key' | translate\"\n [tooltip]=\"'searchFieldsOverviewTooltips.key' | translate\"\n >\n </v-input-label>\n\n <input cdsLayer data-testid=\"iko-search-key\" cdsText type=\"text\" formControlName=\"key\" />\n </div>\n\n <div class=\"valtimo-search-fields-modal__input\">\n <v-input-label\n [title]=\"'searchFieldsOverview.path' | translate\"\n [tooltip]=\"'searchFieldsOverviewTooltips.path' | translate\"\n >\n </v-input-label>\n\n <input cdsLayer data-testid=\"iko-search-key\" cdsText type=\"text\" formControlName=\"path\" />\n\n <!-- TODO: When BE value resolver is in place -->\n <!-- <valtimo-value-path-selector\n formControlName=\"path\"\n [caseDefinitionKey]=\"caseDefinitionKey$ | async\"\n [prefixes]=\"[ValuePathSelectorPrefix.DOC, ValuePathSelectorPrefix.CASE]\"\n ></valtimo-value-path-selector> -->\n </div>\n\n <div class=\"valtimo-search-fields-modal__input\">\n <v-input-label\n [title]=\"'searchFieldsOverview.dataType' | translate\"\n [tooltip]=\"'searchFieldsOverviewTooltips.dataType' | translate\"\n >\n </v-input-label>\n\n <cds-dropdown cdsLayer data-testid=\"-search-dataType\" formControlName=\"dataType\">\n <cds-dropdown-list [items]=\"dataTypeItems$ | async\"></cds-dropdown-list>\n </cds-dropdown>\n </div>\n\n @if (dataTypeValue === SearchFieldDataType.TEXT) {\n <div class=\"valtimo-search-fields-modal__input\">\n <v-input-label\n [title]=\"'searchFieldsOverview.matchType' | translate\"\n [tooltip]=\"'searchFieldsOverviewTooltips.matchType' | translate\"\n >\n </v-input-label>\n\n <cds-dropdown cdsLayer data-testid=\"-search-matchType\" formControlName=\"matchType\">\n <cds-dropdown-list [items]=\"matchTypeItems$ | async\"></cds-dropdown-list>\n </cds-dropdown>\n </div>\n }\n\n <div class=\"valtimo-search-fields-modal__input\">\n <v-input-label\n [title]=\"'searchFieldsOverview.fieldType' | translate\"\n [tooltip]=\"'searchFieldsOverviewTooltips.fieldType' | translate\"\n >\n </v-input-label>\n\n <cds-dropdown cdsLayer data-testid=\"-search-fieldType\" formControlName=\"fieldType\">\n <cds-dropdown-list [items]=\"fieldTypeItems$ | async\"></cds-dropdown-list>\n </cds-dropdown>\n </div>\n\n @if (\n dataTypeValue === SearchFieldDataType.TEXT &&\n (fieldTypeValue === SearchFieldFieldType.SINGLE_SELECT_DROPDOWN ||\n fieldTypeValue === SearchFieldFieldType.MULTI_SELECT_DROPDOWN)\n ) {\n <div class=\"valtimo-search-fields-modal__input\">\n <v-input-label\n [title]=\"'searchFieldsOverview.dropdownDataProvider' | translate\"\n [tooltip]=\"'searchFieldsOverviewTooltips.dropdownDataProvider' | translate\"\n >\n </v-input-label>\n\n <cds-dropdown\n data-testid=\"-search-dropdownDataProvider\"\n formControlName=\"dropdownDataProvider\"\n cdsLayer\n >\n <cds-dropdown-list [items]=\"dataProviderItems$ | async\"></cds-dropdown-list>\n </cds-dropdown>\n </div>\n\n @if (dropdownDataProviderValue === SearchDropdownDataProvider.DATABASE) {\n <div class=\"valtimo-search-fields-modal__list\" formArrayName=\"dropdownValues\">\n <v-input-label\n [title]=\"'searchFieldsOverview.dropdownListValues' | translate\"\n [tooltip]=\"'searchFieldsOverviewTooltips.dropdownListValues' | translate\"\n [noMargin]=\"true\"\n >\n </v-input-label>\n\n @for (dropdownValue of dropdownValuesArray?.controls; track $index) {\n <form [formGroup]=\"dropdownValue\" class=\"valtimo-search-fields-modal__dropdown-values\">\n <cds-text-label>\n {{ 'interface.value' | translate }}\n\n <input\n data-testid=\"iko-search-dropdownKey\"\n cdsText\n type=\"text\"\n formControlName=\"key\"\n cdsLayer\n />\n </cds-text-label>\n\n <cds-text-label>\n {{ 'interface.display' | translate }}\n\n <input\n data-testid=\"-search-dropdownValue\"\n cdsText\n type=\"text\"\n formControlName=\"value\"\n cdsLayer\n />\n </cds-text-label>\n\n <button\n cdsButton=\"danger\"\n data-testid=\"iko-search-deleteEnum\"\n [disabled]=\"$count === 1\"\n [iconOnly]=\"true\"\n (click)=\"removeDropdownValue($index)\"\n >\n <svg cdsIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n </form>\n }\n\n <button\n data-testid=\"-search-addDropdownValue\"\n cdsButton=\"primary\"\n (click)=\"addDropdownValue()\"\n >\n {{ 'interface.addRow' | translate }}\n\n <svg cdsIcon=\"add\" size=\"16\" class=\"cds--btn__icon\"></svg>\n </button>\n </div>\n }\n }\n </form>\n\n <cds-modal-footer>\n <button data-testid=\"-search-cancel\" cdsButton=\"ghost\" (click)=\"onCancel()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button\n data-testid=\"-search-save\"\n cdsButton=\"primary\"\n [disabled]=\"formGroup.invalid\"\n (click)=\"onSave()\"\n >\n {{ 'interface.save' | translate }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", styles: [".valtimo-search-fields-modal__content,.valtimo-search-fields-modal__dropdown-values{display:flex;gap:16px}.valtimo-search-fields-modal__content{flex-direction:column}.valtimo-search-fields-modal__dropdown-values{align-items:flex-end;gap:16px}.valtimo-search-fields-modal__label{display:flex;gap:4px}.valtimo-search-fields-modal__list{display:flex;flex-direction:column;gap: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: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i6.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: i6.DropdownList, selector: "cds-dropdown-list, ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }, { kind: "ngmodule", type: InputLabelModule }, { kind: "component", type: i1$2.InputLabelComponent, selector: "v-input-label", inputs: ["name", "tooltip", "tooltipTranslationKey", "largeMargin", "small", "noMargin", "title", "titleTranslationKey", "required", "disabled", "carbonTheme"] }, { kind: "ngmodule", type: InputModule }, { kind: "component", type: i6.TextInputLabelComponent, selector: "cds-text-label, ibm-text-label", inputs: ["labelInputID", "disabled", "skeleton", "labelTemplate", "textInputTemplate", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel", "fluid"] }, { kind: "directive", type: i6.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "ngmodule", type: LayerModule }, { kind: "directive", type: i6.LayerDirective, selector: "[cdsLayer], [ibmLayer]", inputs: ["ibmLayer", "cdsLayer"], exportAs: ["layer"] }, { kind: "ngmodule", type: ModalModule }, { kind: "component", type: i6.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i6.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i6.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i6.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i6.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.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: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2$2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1923
+ }
1924
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementSearchFieldModalComponent, decorators: [{
1925
+ type: Component,
1926
+ args: [{ selector: 'valtimo-iko-management-search-field-modal', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
1927
+ ButtonModule,
1928
+ CommonModule,
1929
+ DropdownModule,
1930
+ InputLabelModule,
1931
+ InputModule,
1932
+ LayerModule,
1933
+ ModalModule,
1934
+ ReactiveFormsModule,
1935
+ TranslateModule,
1936
+ ValtimoCdsModalDirective,
1937
+ ], 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<cds-modal [open]=\"open\" showFooter=\"true\" (close)=\"onCancel()\">\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"onCancel()\">\n <h3 cdsModalHeaderHeading>\n {{ (!prefillData ? 'searchFieldsOverview.add' : 'searchFieldsOverview.edit') | translate }}\n </h3>\n </cds-modal-header>\n\n <form cdsModalContent [formGroup]=\"formGroup\" class=\"valtimo-search-fields-modal__content\">\n <div class=\"valtimo-search-fields-modal__input\">\n <v-input-label\n [title]=\"'searchFieldsOverview.title' | translate\"\n [tooltip]=\"'searchFieldsOverviewTooltips.title' | translate\"\n >\n </v-input-label>\n\n <input data-testid=\"-search-title\" cdsText type=\"text\" formControlName=\"title\" cdsLayer />\n </div>\n\n <div class=\"valtimo-search-fields-modal__input\">\n <v-input-label\n [title]=\"'searchFieldsOverview.key' | translate\"\n [tooltip]=\"'searchFieldsOverviewTooltips.key' | translate\"\n >\n </v-input-label>\n\n <input cdsLayer data-testid=\"iko-search-key\" cdsText type=\"text\" formControlName=\"key\" />\n </div>\n\n <div class=\"valtimo-search-fields-modal__input\">\n <v-input-label\n [title]=\"'searchFieldsOverview.path' | translate\"\n [tooltip]=\"'searchFieldsOverviewTooltips.path' | translate\"\n >\n </v-input-label>\n\n <input cdsLayer data-testid=\"iko-search-key\" cdsText type=\"text\" formControlName=\"path\" />\n\n <!-- TODO: When BE value resolver is in place -->\n <!-- <valtimo-value-path-selector\n formControlName=\"path\"\n [caseDefinitionKey]=\"caseDefinitionKey$ | async\"\n [prefixes]=\"[ValuePathSelectorPrefix.DOC, ValuePathSelectorPrefix.CASE]\"\n ></valtimo-value-path-selector> -->\n </div>\n\n <div class=\"valtimo-search-fields-modal__input\">\n <v-input-label\n [title]=\"'searchFieldsOverview.dataType' | translate\"\n [tooltip]=\"'searchFieldsOverviewTooltips.dataType' | translate\"\n >\n </v-input-label>\n\n <cds-dropdown cdsLayer data-testid=\"-search-dataType\" formControlName=\"dataType\">\n <cds-dropdown-list [items]=\"dataTypeItems$ | async\"></cds-dropdown-list>\n </cds-dropdown>\n </div>\n\n @if (dataTypeValue === SearchFieldDataType.TEXT) {\n <div class=\"valtimo-search-fields-modal__input\">\n <v-input-label\n [title]=\"'searchFieldsOverview.matchType' | translate\"\n [tooltip]=\"'searchFieldsOverviewTooltips.matchType' | translate\"\n >\n </v-input-label>\n\n <cds-dropdown cdsLayer data-testid=\"-search-matchType\" formControlName=\"matchType\">\n <cds-dropdown-list [items]=\"matchTypeItems$ | async\"></cds-dropdown-list>\n </cds-dropdown>\n </div>\n }\n\n <div class=\"valtimo-search-fields-modal__input\">\n <v-input-label\n [title]=\"'searchFieldsOverview.fieldType' | translate\"\n [tooltip]=\"'searchFieldsOverviewTooltips.fieldType' | translate\"\n >\n </v-input-label>\n\n <cds-dropdown cdsLayer data-testid=\"-search-fieldType\" formControlName=\"fieldType\">\n <cds-dropdown-list [items]=\"fieldTypeItems$ | async\"></cds-dropdown-list>\n </cds-dropdown>\n </div>\n\n @if (\n dataTypeValue === SearchFieldDataType.TEXT &&\n (fieldTypeValue === SearchFieldFieldType.SINGLE_SELECT_DROPDOWN ||\n fieldTypeValue === SearchFieldFieldType.MULTI_SELECT_DROPDOWN)\n ) {\n <div class=\"valtimo-search-fields-modal__input\">\n <v-input-label\n [title]=\"'searchFieldsOverview.dropdownDataProvider' | translate\"\n [tooltip]=\"'searchFieldsOverviewTooltips.dropdownDataProvider' | translate\"\n >\n </v-input-label>\n\n <cds-dropdown\n data-testid=\"-search-dropdownDataProvider\"\n formControlName=\"dropdownDataProvider\"\n cdsLayer\n >\n <cds-dropdown-list [items]=\"dataProviderItems$ | async\"></cds-dropdown-list>\n </cds-dropdown>\n </div>\n\n @if (dropdownDataProviderValue === SearchDropdownDataProvider.DATABASE) {\n <div class=\"valtimo-search-fields-modal__list\" formArrayName=\"dropdownValues\">\n <v-input-label\n [title]=\"'searchFieldsOverview.dropdownListValues' | translate\"\n [tooltip]=\"'searchFieldsOverviewTooltips.dropdownListValues' | translate\"\n [noMargin]=\"true\"\n >\n </v-input-label>\n\n @for (dropdownValue of dropdownValuesArray?.controls; track $index) {\n <form [formGroup]=\"dropdownValue\" class=\"valtimo-search-fields-modal__dropdown-values\">\n <cds-text-label>\n {{ 'interface.value' | translate }}\n\n <input\n data-testid=\"iko-search-dropdownKey\"\n cdsText\n type=\"text\"\n formControlName=\"key\"\n cdsLayer\n />\n </cds-text-label>\n\n <cds-text-label>\n {{ 'interface.display' | translate }}\n\n <input\n data-testid=\"-search-dropdownValue\"\n cdsText\n type=\"text\"\n formControlName=\"value\"\n cdsLayer\n />\n </cds-text-label>\n\n <button\n cdsButton=\"danger\"\n data-testid=\"iko-search-deleteEnum\"\n [disabled]=\"$count === 1\"\n [iconOnly]=\"true\"\n (click)=\"removeDropdownValue($index)\"\n >\n <svg cdsIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n </form>\n }\n\n <button\n data-testid=\"-search-addDropdownValue\"\n cdsButton=\"primary\"\n (click)=\"addDropdownValue()\"\n >\n {{ 'interface.addRow' | translate }}\n\n <svg cdsIcon=\"add\" size=\"16\" class=\"cds--btn__icon\"></svg>\n </button>\n </div>\n }\n }\n </form>\n\n <cds-modal-footer>\n <button data-testid=\"-search-cancel\" cdsButton=\"ghost\" (click)=\"onCancel()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button\n data-testid=\"-search-save\"\n cdsButton=\"primary\"\n [disabled]=\"formGroup.invalid\"\n (click)=\"onSave()\"\n >\n {{ 'interface.save' | translate }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", styles: [".valtimo-search-fields-modal__content,.valtimo-search-fields-modal__dropdown-values{display:flex;gap:16px}.valtimo-search-fields-modal__content{flex-direction:column}.valtimo-search-fields-modal__dropdown-values{align-items:flex-end;gap:16px}.valtimo-search-fields-modal__label{display:flex;gap:4px}.valtimo-search-fields-modal__list{display:flex;flex-direction:column;gap: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"] }]
1938
+ }], ctorParameters: () => [{ type: i6.IconService }, { type: i2$2.FormBuilder }, { type: i3$1.TranslateService }], propDecorators: { open: [{
1939
+ type: Input,
1940
+ args: [{ required: true }]
1941
+ }], prefillData: [{
1942
+ type: Input
1943
+ }], closeEvent: [{
1944
+ type: Output
1945
+ }] } });
1946
+
1947
+ /*
1948
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1949
+ *
1950
+ * Licensed under EUPL, Version 1.2 (the "License");
1951
+ * you may not use this file except in compliance with the License.
1952
+ * You may obtain a copy of the License at
1953
+ *
1954
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1955
+ *
1956
+ * Unless required by applicable law or agreed to in writing, software
1957
+ * distributed under the License is distributed on an "AS IS" basis,
1958
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1959
+ * See the License for the specific language governing permissions and
1960
+ * limitations under the License.
1961
+ */
1962
+ class IkoManagementSearchFieldsComponent {
1963
+ constructor(breadcrumbService, ikoManagementApiService, pageTitleService, route, translateService) {
1964
+ this.breadcrumbService = breadcrumbService;
1965
+ this.ikoManagementApiService = ikoManagementApiService;
1966
+ this.pageTitleService = pageTitleService;
1967
+ this.route = route;
1968
+ this.translateService = translateService;
1969
+ this._refresh$ = new BehaviorSubject(null);
1970
+ this.params$ = this.route.params.pipe(map$1((params) => ({
1971
+ apiKey: params.apiKey,
1972
+ aggregateKey: params.key,
1973
+ actionKey: params.actionKey,
1974
+ tabKey: params.tabKey,
1975
+ })));
1976
+ this.loading$ = new BehaviorSubject(true);
1977
+ this.searchFields$ = combineLatest([
1978
+ this.params$,
1979
+ this.translateService.stream('key'),
1980
+ this._refresh$,
1981
+ ]).pipe(switchMap(([params]) => this.ikoManagementApiService.getIkoSearchFields(params.aggregateKey, params.actionKey)), map$1((searchFields) => searchFields.map((field) => ({
1982
+ ...field,
1983
+ dataTypeText: this.translateService.instant(`searchFields.${field.dataType}`),
1984
+ fieldTypeText: this.translateService.instant(`searchFieldsOverview.${field.fieldType}`),
1985
+ }))), tap(() => this.loading$.next(false)));
1986
+ this.deleteModalOpen$ = new BehaviorSubject(false);
1987
+ this.deleteFieldKey$ = new BehaviorSubject(null);
1988
+ this.fieldModalOpen$ = new BehaviorSubject(false);
1989
+ this.prefillData$ = new BehaviorSubject(null);
1990
+ this._searchAction$ = this.params$.pipe(switchMap((params) => this.ikoManagementApiService.getIkoDataRequest(params.aggregateKey, params.actionKey)));
1991
+ this._ikoRepositoryConfig$ = this.params$.pipe(switchMap((params) => this.ikoManagementApiService.getIkoRepositoryConfig(params.apiKey)));
1992
+ this.FIELDS = [
1993
+ {
1994
+ key: 'key',
1995
+ label: 'interface.key',
1996
+ viewType: ViewType.TEXT,
1997
+ },
1998
+ {
1999
+ key: 'title',
2000
+ label: 'interface.title',
2001
+ viewType: ViewType.TEXT,
2002
+ },
2003
+ {
2004
+ key: 'path',
2005
+ label: 'searchFieldsOverview.path',
2006
+ viewType: ViewType.TEXT,
2007
+ },
2008
+ {
2009
+ key: 'dataTypeText',
2010
+ label: 'searchFieldsOverview.dataType',
2011
+ viewType: ViewType.TEXT,
2012
+ },
2013
+ {
2014
+ key: 'fieldTypeText',
2015
+ label: 'searchFieldsOverview.fieldType',
2016
+ viewType: ViewType.TEXT,
2017
+ },
2018
+ ];
2019
+ this.ACTION_ITEMS = [
2020
+ {
2021
+ label: 'interface.edit',
2022
+ callback: this.editSearchField.bind(this),
2023
+ },
2024
+ {
2025
+ label: 'interface.delete',
2026
+ callback: this.deleteSearchField.bind(this),
2027
+ type: 'danger',
2028
+ },
2029
+ ];
2030
+ this._subscriptions = new Subscription();
2031
+ }
2032
+ ngOnInit() {
2033
+ this.setBreadcrumbs();
2034
+ this._subscriptions.add(combineLatest([this._searchAction$, this.translateService.stream('key')]).subscribe(([searchAction]) => {
2035
+ this.pageTitleService.setCustomPageTitle(this.translateService.instant('ikoManagement.searchFields.pageTitle', {
2036
+ searchActionTitle: searchAction.title,
2037
+ }), true);
2038
+ }));
2039
+ }
2040
+ ngOnDestroy() {
2041
+ this._subscriptions.unsubscribe();
2042
+ this.pageTitleService.enableReset();
2043
+ this.breadcrumbService.clearThirdBreadcrumb();
2044
+ this.breadcrumbService.clearFourthBreadcrumb();
2045
+ }
2046
+ onItemsReordered(searchFields, params) {
2047
+ this.ikoManagementApiService
2048
+ .updateIkoSearchFields(params.aggregateKey, params.actionKey, searchFields)
2049
+ .pipe(take(1))
2050
+ .subscribe();
2051
+ }
2052
+ openAddModal() {
2053
+ this.fieldModalOpen$.next(true);
2054
+ }
2055
+ deleteSearchField(field) {
2056
+ this.deleteFieldKey$.next(field.key);
2057
+ this.deleteModalOpen$.next(true);
2058
+ }
2059
+ editSearchField(field) {
2060
+ this.prefillData$.next(field);
2061
+ this.fieldModalOpen$.next(true);
2062
+ }
2063
+ onDeleteSearchField(key) {
2064
+ this.params$
2065
+ .pipe(switchMap((params) => this.ikoManagementApiService.deleteIkoSearchField(params.aggregateKey, params.actionKey, key)))
2066
+ .subscribe(() => this._refresh$.next(null));
2067
+ }
2068
+ onModalClose(field) {
2069
+ this.fieldModalOpen$.next(false);
2070
+ if (!field)
2071
+ return;
2072
+ this.params$
2073
+ .pipe(switchMap((params) => this.prefillData$.getValue() === null
2074
+ ? this.ikoManagementApiService.createIkoSearchField(params.aggregateKey, params.actionKey, field.key, field)
2075
+ : this.ikoManagementApiService.updateIkoSearchField(params.aggregateKey, params.actionKey, field.key, field)))
2076
+ .subscribe(() => this._refresh$.next(null));
2077
+ }
2078
+ setBreadcrumbs() {
2079
+ combineLatest([
2080
+ this._ikoRepositoryConfig$,
2081
+ this.params$,
2082
+ this.translateService.stream('key'),
2083
+ ]).subscribe(([repositoryConfig, params]) => {
2084
+ this.breadcrumbService.setThirdBreadcrumb({
2085
+ route: [`/iko-management/${repositoryConfig.key}`],
2086
+ content: repositoryConfig.title,
2087
+ href: `/iko-management/${repositoryConfig.key}`,
2088
+ });
2089
+ this.breadcrumbService.setFourthBreadcrumb({
2090
+ route: [`/iko-management/${repositoryConfig.key}/${params.aggregateKey}/${params.tabKey}`],
2091
+ content: this.translateService.instant('ikoManagement.searchActions.title'),
2092
+ href: `/iko-management/${repositoryConfig.key}/${params.aggregateKey}/${params.tabKey}`,
2093
+ });
2094
+ });
2095
+ }
2096
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementSearchFieldsComponent, deps: [{ token: i1$2.BreadcrumbService }, { token: IkoManagementApiService }, { token: i1$2.PageTitleService }, { token: i3.ActivatedRoute }, { token: i3$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
2097
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: IkoManagementSearchFieldsComponent, isStandalone: true, selector: "valtimo-iko-management-search-fields", 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@if (params$ | async; as params) {\n <valtimo-carbon-list\n [actionItems]=\"ACTION_ITEMS\"\n [dragAndDrop]=\"true\"\n [fields]=\"FIELDS\"\n [items]=\"searchFields$ | async\"\n [loading]=\"loading$ | async\"\n (itemsReordered)=\"onItemsReordered($event, params)\"\n (rowClicked)=\"editSearchField($event)\"\n >\n <div carbonToolbarContent>\n <ng-container [ngTemplateOutlet]=\"addFieldButton\"></ng-container>\n </div>\n\n <valtimo-no-results\n [action]=\"addFieldButton\"\n [description]=\"'ikoManagement.searchFields.noResultsDescription' | translate\"\n [title]=\"'ikoManagement.searchFields.noResultsTitle' | translate\"\n ></valtimo-no-results>\n </valtimo-carbon-list>\n}\n\n<valtimo-iko-management-search-field-modal\n [open]=\"fieldModalOpen$ | async\"\n [prefillData]=\"prefillData$ | async\"\n (closeEvent)=\"onModalClose($event)\"\n></valtimo-iko-management-search-field-modal>\n\n<valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"ikoManagement.searchFields.deleteModalText\"\n [outputOnConfirm]=\"deleteFieldKey$ | async\"\n [showModalSubject$]=\"deleteModalOpen$\"\n titleTranslationKey=\"interface.delete\"\n (confirmEvent)=\"onDeleteSearchField($event)\"\n></valtimo-confirmation-modal>\n\n<ng-template #addFieldButton>\n <button cdsButton=\"primary\" (click)=\"openAddModal()\">\n {{ 'searchFieldsOverview.add' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i1$2.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: "component", type: i1$2.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ConfirmationModalModule }, { kind: "component", type: i1$2.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "confirmButtonType", "showOptionalButton", "optionalButtonText", "optionalButtonTextTranslationKey", "optionalButtonType", "cancelButtonText", "cancelButtonTextTranslationKey", "cancelButtonType", "showModalSubject$", "outputOnConfirm", "outputOnOptional", "spacerAfterCancelButton"], outputs: ["confirmEvent", "optionalEvent", "cancelEvent"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i6.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "component", type: IkoManagementSearchFieldModalComponent, selector: "valtimo-iko-management-search-field-modal", inputs: ["open", "prefillData"], outputs: ["closeEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2098
+ }
2099
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementSearchFieldsComponent, decorators: [{
2100
+ type: Component,
2101
+ args: [{ selector: 'valtimo-iko-management-search-fields', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
2102
+ ButtonModule,
2103
+ CarbonListModule,
2104
+ CommonModule,
2105
+ ConfirmationModalModule,
2106
+ IconModule,
2107
+ TranslateModule,
2108
+ IkoManagementSearchFieldModalComponent,
2109
+ ], 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@if (params$ | async; as params) {\n <valtimo-carbon-list\n [actionItems]=\"ACTION_ITEMS\"\n [dragAndDrop]=\"true\"\n [fields]=\"FIELDS\"\n [items]=\"searchFields$ | async\"\n [loading]=\"loading$ | async\"\n (itemsReordered)=\"onItemsReordered($event, params)\"\n (rowClicked)=\"editSearchField($event)\"\n >\n <div carbonToolbarContent>\n <ng-container [ngTemplateOutlet]=\"addFieldButton\"></ng-container>\n </div>\n\n <valtimo-no-results\n [action]=\"addFieldButton\"\n [description]=\"'ikoManagement.searchFields.noResultsDescription' | translate\"\n [title]=\"'ikoManagement.searchFields.noResultsTitle' | translate\"\n ></valtimo-no-results>\n </valtimo-carbon-list>\n}\n\n<valtimo-iko-management-search-field-modal\n [open]=\"fieldModalOpen$ | async\"\n [prefillData]=\"prefillData$ | async\"\n (closeEvent)=\"onModalClose($event)\"\n></valtimo-iko-management-search-field-modal>\n\n<valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"ikoManagement.searchFields.deleteModalText\"\n [outputOnConfirm]=\"deleteFieldKey$ | async\"\n [showModalSubject$]=\"deleteModalOpen$\"\n titleTranslationKey=\"interface.delete\"\n (confirmEvent)=\"onDeleteSearchField($event)\"\n></valtimo-confirmation-modal>\n\n<ng-template #addFieldButton>\n <button cdsButton=\"primary\" (click)=\"openAddModal()\">\n {{ 'searchFieldsOverview.add' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n" }]
2110
+ }], ctorParameters: () => [{ type: i1$2.BreadcrumbService }, { type: IkoManagementApiService }, { type: i1$2.PageTitleService }, { type: i3.ActivatedRoute }, { type: i3$1.TranslateService }] });
2111
+
2112
+ /*
2113
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2114
+ *
2115
+ * Licensed under EUPL, Version 1.2 (the "License");
2116
+ * you may not use this file except in compliance with the License.
2117
+ * You may obtain a copy of the License at
2118
+ *
2119
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2120
+ *
2121
+ * Unless required by applicable law or agreed to in writing, software
2122
+ * distributed under the License is distributed on an "AS IS" basis,
2123
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2124
+ * See the License for the specific language governing permissions and
2125
+ * limitations under the License.
2126
+ */
2127
+ class IkoManagementWidgetsComponent {
2128
+ constructor(breadcrumbService, ikoManagementApiService, route, translateService, ikoWidgetManagementApiService) {
2129
+ this.breadcrumbService = breadcrumbService;
2130
+ this.ikoManagementApiService = ikoManagementApiService;
2131
+ this.route = route;
2132
+ this.translateService = translateService;
2133
+ this.ikoWidgetManagementApiService = ikoWidgetManagementApiService;
2134
+ this.params$ = this.route.params.pipe(map$1((params) => ({
2135
+ apiKey: params.apiKey,
2136
+ aggregateKey: params.key,
2137
+ actionKey: params.actionKey,
2138
+ tabKey: params.tabKey,
2139
+ widgetTabKey: params.widgetTabKey,
2140
+ })), tap((params) => this.ikoWidgetManagementApiService.initParams(params)));
2141
+ this.widgets$ = this.ikoWidgetManagementApiService.getWidgetConfiguration();
2142
+ this.AVAILABLE_WIDGET_TYPES = [
2143
+ WidgetType.FIELDS,
2144
+ WidgetType.COLLECTION,
2145
+ WidgetType.TABLE,
2146
+ ];
2147
+ this._ikoRepositoryConfig$ = this.params$.pipe(switchMap((params) => this.ikoManagementApiService.getIkoRepositoryConfig(params.apiKey)));
2148
+ this._ikoTabConfig$ = this.params$.pipe(switchMap((params) => this.ikoManagementApiService.getIkoTab(params.aggregateKey, params.widgetTabKey)));
2149
+ this._subscriptions = new Subscription();
2150
+ }
2151
+ ngOnInit() {
2152
+ this.setBreadcrumbs();
2153
+ }
2154
+ ngOnDestroy() {
2155
+ this.breadcrumbService.clearThirdBreadcrumb();
2156
+ this.breadcrumbService.clearFourthBreadcrumb();
2157
+ this._subscriptions.unsubscribe();
2158
+ }
2159
+ setBreadcrumbs() {
2160
+ this._subscriptions.add(combineLatest([
2161
+ this._ikoTabConfig$,
2162
+ this._ikoRepositoryConfig$,
2163
+ this.ikoWidgetManagementApiService.params$,
2164
+ this.translateService.stream('key'),
2165
+ ])
2166
+ .pipe(tap(([tabConfig, repositoryConfig, params]) => {
2167
+ if (!params)
2168
+ return;
2169
+ this.breadcrumbService.setThirdBreadcrumb({
2170
+ route: [`/iko-management/${repositoryConfig.key}`],
2171
+ content: repositoryConfig.title,
2172
+ href: `/iko-management/${repositoryConfig.key}`,
2173
+ });
2174
+ this.breadcrumbService.setFourthBreadcrumb({
2175
+ route: [
2176
+ `/iko-management/${repositoryConfig.key}/${params.aggregateKey}/${params.tabKey}`,
2177
+ ],
2178
+ content: tabConfig.title || params.widgetTabKey || '',
2179
+ href: `/iko-management/${repositoryConfig.key}/${params.aggregateKey}/${params.tabKey}`,
2180
+ });
2181
+ }))
2182
+ .subscribe());
2183
+ }
2184
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementWidgetsComponent, deps: [{ token: i1$2.BreadcrumbService }, { token: IkoManagementApiService }, { token: i3.ActivatedRoute }, { token: i3$1.TranslateService }, { token: WIDGET_MANAGEMENT_SERVICE }], target: i0.ɵɵFactoryTarget.Component }); }
2185
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: IkoManagementWidgetsComponent, isStandalone: true, selector: "ng-component", providers: [
2186
+ {
2187
+ provide: WIDGET_MANAGEMENT_SERVICE,
2188
+ useClass: IkoWidgetManagementApiService,
2189
+ },
2190
+ ], 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<valtimo-widget-management\n [params]=\"params$ | async\"\n [availableWidgetTypes]=\"AVAILABLE_WIDGET_TYPES\"\n></valtimo-widget-management>\n", styles: ["/*!\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: "ngmodule", type: CommonModule }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "component", type: WidgetManagementComponent, selector: "valtimo-widget-management", inputs: ["params", "availableWidgetTypes"] }, { kind: "ngmodule", type: TranslateModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2191
+ }
2192
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementWidgetsComponent, decorators: [{
2193
+ type: Component,
2194
+ args: [{ standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, WidgetManagementComponent, TranslateModule], providers: [
2195
+ {
2196
+ provide: WIDGET_MANAGEMENT_SERVICE,
2197
+ useClass: IkoWidgetManagementApiService,
2198
+ },
2199
+ ], 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<valtimo-widget-management\n [params]=\"params$ | async\"\n [availableWidgetTypes]=\"AVAILABLE_WIDGET_TYPES\"\n></valtimo-widget-management>\n", styles: ["/*!\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"] }]
2200
+ }], ctorParameters: () => [{ type: i1$2.BreadcrumbService }, { type: IkoManagementApiService }, { type: i3.ActivatedRoute }, { type: i3$1.TranslateService }, { type: undefined, decorators: [{
2201
+ type: Inject,
2202
+ args: [WIDGET_MANAGEMENT_SERVICE]
2203
+ }] }] });
2204
+
2205
+ /*
2206
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2207
+ *
2208
+ * Licensed under EUPL, Version 1.2 (the "License");
2209
+ * you may not use this file except in compliance with the License.
2210
+ * You may obtain a copy of the License at
2211
+ *
2212
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2213
+ *
2214
+ * Unless required by applicable law or agreed to in writing, software
2215
+ * distributed under the License is distributed on an "AS IS" basis,
2216
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2217
+ * See the License for the specific language governing permissions and
2218
+ * limitations under the License.
2219
+ */
2220
+ class IkoManagementSearchActionModalComponent {
2221
+ set open(value) {
2222
+ this.$isOpen.set(value);
2223
+ if (value)
2224
+ return;
2225
+ setTimeout(() => {
2226
+ this.$modalType.set('add');
2227
+ this.formGroup.reset();
2228
+ this.formGroup.get('key')?.enable();
2229
+ }, CARBON_CONSTANTS.modalAnimationMs);
2230
+ }
2231
+ set prefillData(value) {
2232
+ if (!value)
2233
+ return;
2234
+ this.$modalType.set('edit');
2235
+ this.formGroup.patchValue(value);
2236
+ this.formGroup.get('key')?.disable();
2237
+ }
2238
+ constructor(fb) {
2239
+ this.fb = fb;
2240
+ this.$modalType = signal('add');
2241
+ this.$isOpen = signal(false);
2242
+ this.modalClose = new EventEmitter();
2243
+ this.formGroup = this.fb.group({
2244
+ key: this.fb.control('', Validators.required),
2245
+ title: this.fb.control('', Validators.required),
2246
+ ikoDataAggregateKey: this.fb.control(''),
2247
+ properties: this.fb.control({}),
2248
+ });
2249
+ }
2250
+ onCancel() {
2251
+ this.modalClose.emit(null);
2252
+ }
2253
+ onSave() {
2254
+ this.modalClose.emit({
2255
+ key: this.formGroup.get('key')?.value ?? '',
2256
+ title: this.formGroup.get('title')?.value ?? '',
2257
+ ikoDataAggregateKey: this.formGroup.get('ikoDataAggregateKey')?.value ?? this.aggregateKey,
2258
+ properties: this.formGroup.get('properties')?.value ?? {},
2259
+ });
2260
+ }
2261
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementSearchActionModalComponent, deps: [{ token: i2$2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
2262
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: IkoManagementSearchActionModalComponent, isStandalone: true, selector: "valtimo-iko-management-search-action-modal", inputs: { open: "open", prefillData: "prefillData", aggregateKey: "aggregateKey" }, outputs: { modalClose: "modalClose" }, 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<cds-modal\n valtimoCdsModal\n [open]=\"$isOpen()\"\n size=\"sm\"\n showFooter=\"true\"\n [title]=\"'ikoManagement.searchActions.' + $modalType() + 'ActionTitle' | translate\"\n (close)=\"onCancel()\"\n>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"onCancel()\">\n <h3 cdsModalHeaderHeading>\n {{ 'ikoManagement.searchActions.' + $modalType() + 'ActionTitle' | translate }}\n </h3>\n </cds-modal-header>\n\n <form cdsModalContent [formGroup]=\"formGroup\">\n <cds-label>\n {{ 'interface.title' | translate }}\n\n <input\n formControlName=\"title\"\n cdsText\n cdsLayer\n placeholder=\"{{ 'interface.title' | translate }}\"\n [attr.modal-primary-focus]=\"true\"\n />\n </cds-label>\n\n <cds-label>\n {{ 'interface.key' | translate }}\n\n <input\n formControlName=\"key\"\n cdsText\n cdsLayer\n placeholder=\"{{ 'interface.key' | translate }}\"\n [attr.modal-primary-focus]=\"true\"\n />\n </cds-label>\n </form>\n\n <cds-modal-footer>\n <button cdsButton=\"ghost\" (click)=\"onCancel()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button cdsButton=\"primary\" [disabled]=\"formGroup.invalid\" (click)=\"onSave()\">\n {{ 'interface.save' | translate }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", styles: ["form{display:flex;flex-direction:column;gap: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: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.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: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: InputModule }, { kind: "component", type: i6.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i6.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ModalModule }, { kind: "component", type: i6.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i6.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i6.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i6.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i6.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "directive", type: ValtimoCdsModalDirective, selector: "[valtimoCdsModal]", inputs: ["minContentHeight"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: LayerModule }, { kind: "directive", type: i6.LayerDirective, selector: "[cdsLayer], [ibmLayer]", inputs: ["ibmLayer", "cdsLayer"], exportAs: ["layer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2263
+ }
2264
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementSearchActionModalComponent, decorators: [{
2265
+ type: Component,
2266
+ args: [{ selector: 'valtimo-iko-management-search-action-modal', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
2267
+ CommonModule,
2268
+ ReactiveFormsModule,
2269
+ InputModule,
2270
+ TranslateModule,
2271
+ ModalModule,
2272
+ ValtimoCdsModalDirective,
2273
+ ButtonModule,
2274
+ LayerModule,
2275
+ ], 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<cds-modal\n valtimoCdsModal\n [open]=\"$isOpen()\"\n size=\"sm\"\n showFooter=\"true\"\n [title]=\"'ikoManagement.searchActions.' + $modalType() + 'ActionTitle' | translate\"\n (close)=\"onCancel()\"\n>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"onCancel()\">\n <h3 cdsModalHeaderHeading>\n {{ 'ikoManagement.searchActions.' + $modalType() + 'ActionTitle' | translate }}\n </h3>\n </cds-modal-header>\n\n <form cdsModalContent [formGroup]=\"formGroup\">\n <cds-label>\n {{ 'interface.title' | translate }}\n\n <input\n formControlName=\"title\"\n cdsText\n cdsLayer\n placeholder=\"{{ 'interface.title' | translate }}\"\n [attr.modal-primary-focus]=\"true\"\n />\n </cds-label>\n\n <cds-label>\n {{ 'interface.key' | translate }}\n\n <input\n formControlName=\"key\"\n cdsText\n cdsLayer\n placeholder=\"{{ 'interface.key' | translate }}\"\n [attr.modal-primary-focus]=\"true\"\n />\n </cds-label>\n </form>\n\n <cds-modal-footer>\n <button cdsButton=\"ghost\" (click)=\"onCancel()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button cdsButton=\"primary\" [disabled]=\"formGroup.invalid\" (click)=\"onSave()\">\n {{ 'interface.save' | translate }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", styles: ["form{display:flex;flex-direction:column;gap: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"] }]
2276
+ }], ctorParameters: () => [{ type: i2$2.FormBuilder }], propDecorators: { open: [{
2277
+ type: Input
2278
+ }], prefillData: [{
2279
+ type: Input
2280
+ }], aggregateKey: [{
2281
+ type: Input
2282
+ }], modalClose: [{
2283
+ type: Output
2284
+ }] } });
2285
+
2286
+ /*
2287
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2288
+ *
2289
+ * Licensed under EUPL, Version 1.2 (the "License");
2290
+ * you may not use this file except in compliance with the License.
2291
+ * You may obtain a copy of the License at
2292
+ *
2293
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2294
+ *
2295
+ * Unless required by applicable law or agreed to in writing, software
2296
+ * distributed under the License is distributed on an "AS IS" basis,
2297
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2298
+ * See the License for the specific language governing permissions and
2299
+ * limitations under the License.
2300
+ */
2301
+ class IkoManagementSearchActionsComponent {
2302
+ constructor(route, router, ikoManagementApiService) {
2303
+ this.route = route;
2304
+ this.router = router;
2305
+ this.ikoManagementApiService = ikoManagementApiService;
2306
+ this.loading$ = new BehaviorSubject(true);
2307
+ this.FIELDS = [
2308
+ {
2309
+ key: 'title',
2310
+ label: 'interface.title',
2311
+ viewType: ViewType.TEXT,
2312
+ },
2313
+ {
2314
+ key: 'key',
2315
+ label: 'interface.key',
2316
+ viewType: ViewType.TEXT,
2317
+ },
2318
+ ];
2319
+ this.ACTION_ITEMS = [
2320
+ {
2321
+ label: 'interface.edit',
2322
+ callback: this.editSearchAction.bind(this),
2323
+ },
2324
+ {
2325
+ label: 'interface.delete',
2326
+ callback: this.deleteSearchAction.bind(this),
2327
+ type: 'danger',
2328
+ },
2329
+ ];
2330
+ this.deleteSearchActionKey$ = new BehaviorSubject(null);
2331
+ this.prefillData$ = new BehaviorSubject(null);
2332
+ this.actionModalOpen$ = new BehaviorSubject(false);
2333
+ this.deleteModalOpen$ = new BehaviorSubject(false);
2334
+ this.aggregateKey$ = this.route.params.pipe(map((params) => params.key), filter(key => !!key));
2335
+ this._refresh$ = new BehaviorSubject(null);
2336
+ this.searchActions$ = combineLatest([
2337
+ this.aggregateKey$,
2338
+ this._refresh$,
2339
+ ]).pipe(switchMap(([key]) => this.ikoManagementApiService.getManagementIkoDataRequests(key)), tap(() => this.loading$.next(false)));
2340
+ }
2341
+ onSearchActionClick(action) {
2342
+ this.router.navigate([`search-action/${action.key}`], { relativeTo: this.route });
2343
+ }
2344
+ deleteSearchAction(action) {
2345
+ this.deleteSearchActionKey$.next(action.key);
2346
+ this.deleteModalOpen$.next(true);
2347
+ }
2348
+ onDeleteSearchAction(key) {
2349
+ this.aggregateKey$
2350
+ .pipe(switchMap((aggregateKey) => this.ikoManagementApiService.deleteIkoDataRequest(aggregateKey, key)))
2351
+ .subscribe(() => this._refresh$.next(null));
2352
+ }
2353
+ editSearchAction(action) {
2354
+ this.prefillData$.next(action);
2355
+ this.actionModalOpen$.next(true);
2356
+ }
2357
+ onItemsReordered(searchActions, aggregateKey) {
2358
+ this.ikoManagementApiService
2359
+ .updateIkoDataRequests(aggregateKey, searchActions)
2360
+ .pipe(take$1(1))
2361
+ .subscribe();
2362
+ }
2363
+ onModalClose(action) {
2364
+ this.actionModalOpen$.next(false);
2365
+ const prefillData = this.prefillData$.getValue();
2366
+ this.prefillData$.next(null);
2367
+ if (!action)
2368
+ return;
2369
+ this.aggregateKey$
2370
+ .pipe(switchMap((aggregateKey) => prefillData === null
2371
+ ? this.ikoManagementApiService.createIkoDataRequest(aggregateKey, action.key, {
2372
+ ...action,
2373
+ properties: {},
2374
+ })
2375
+ : this.ikoManagementApiService.updateIkoDataRequest(aggregateKey, action.key, action)))
2376
+ .subscribe(() => {
2377
+ this._refresh$.next(null);
2378
+ });
2379
+ }
2380
+ openAddModal() {
2381
+ this.actionModalOpen$.next(true);
2382
+ }
2383
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementSearchActionsComponent, deps: [{ token: i3.ActivatedRoute }, { token: i3.Router }, { token: IkoManagementApiService }], target: i0.ɵɵFactoryTarget.Component }); }
2384
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: IkoManagementSearchActionsComponent, isStandalone: true, selector: "ng-component", 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@if (aggregateKey$ | async; as aggregateKey) {\n <valtimo-carbon-list\n [actionItems]=\"ACTION_ITEMS\"\n [dragAndDrop]=\"true\"\n [fields]=\"FIELDS\"\n [items]=\"searchActions$ | async\"\n [loading]=\"loading$ | async\"\n (itemsReordered)=\"onItemsReordered($event, aggregateKey)\"\n (rowClicked)=\"onSearchActionClick($event)\"\n >\n <div carbonToolbarContent>\n <ng-container [ngTemplateOutlet]=\"addActionButton\"></ng-container>\n </div>\n\n <valtimo-no-results\n [action]=\"addActionButton\"\n [description]=\"'ikoManagement.searchActions.noResultsDescription' | translate\"\n [title]=\"'ikoManagement.searchActions.noResultsTitle' | translate\"\n ></valtimo-no-results>\n </valtimo-carbon-list>\n\n <valtimo-iko-management-search-action-modal\n [aggregateKey]=\"aggregateKey\"\n [open]=\"actionModalOpen$ | async\"\n [prefillData]=\"prefillData$ | async\"\n (modalClose)=\"onModalClose($event)\"\n ></valtimo-iko-management-search-action-modal>\n\n <valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"ikoManagement.searchActions.deleteModalText\"\n [outputOnConfirm]=\"deleteSearchActionKey$ | async\"\n [showModalSubject$]=\"deleteModalOpen$\"\n titleTranslationKey=\"interface.delete\"\n (confirmEvent)=\"onDeleteSearchAction($event)\"\n ></valtimo-confirmation-modal>\n\n <ng-template #addActionButton>\n <button cdsButton=\"primary\" (click)=\"openAddModal()\">\n {{ 'ikoManagement.searchActions.addActionTitle' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n </ng-template>\n}\n", dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i1$2.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: "component", type: i1$2.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ConfirmationModalModule }, { kind: "component", type: i1$2.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "confirmButtonType", "showOptionalButton", "optionalButtonText", "optionalButtonTextTranslationKey", "optionalButtonType", "cancelButtonText", "cancelButtonTextTranslationKey", "cancelButtonType", "showModalSubject$", "outputOnConfirm", "outputOnOptional", "spacerAfterCancelButton"], outputs: ["confirmEvent", "optionalEvent", "cancelEvent"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i6.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: IkoManagementSearchActionModalComponent, selector: "valtimo-iko-management-search-action-modal", inputs: ["open", "prefillData", "aggregateKey"], outputs: ["modalClose"] }, { kind: "ngmodule", type: TabsModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }] }); }
2385
+ }
2386
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementSearchActionsComponent, decorators: [{
2387
+ type: Component,
2388
+ args: [{ standalone: true, imports: [
2389
+ ButtonModule,
2390
+ CarbonListModule,
2391
+ CommonModule,
2392
+ ConfirmationModalModule,
2393
+ IconModule,
2394
+ IkoManagementSearchActionModalComponent,
2395
+ TabsModule,
2396
+ TranslateModule,
2397
+ ], 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@if (aggregateKey$ | async; as aggregateKey) {\n <valtimo-carbon-list\n [actionItems]=\"ACTION_ITEMS\"\n [dragAndDrop]=\"true\"\n [fields]=\"FIELDS\"\n [items]=\"searchActions$ | async\"\n [loading]=\"loading$ | async\"\n (itemsReordered)=\"onItemsReordered($event, aggregateKey)\"\n (rowClicked)=\"onSearchActionClick($event)\"\n >\n <div carbonToolbarContent>\n <ng-container [ngTemplateOutlet]=\"addActionButton\"></ng-container>\n </div>\n\n <valtimo-no-results\n [action]=\"addActionButton\"\n [description]=\"'ikoManagement.searchActions.noResultsDescription' | translate\"\n [title]=\"'ikoManagement.searchActions.noResultsTitle' | translate\"\n ></valtimo-no-results>\n </valtimo-carbon-list>\n\n <valtimo-iko-management-search-action-modal\n [aggregateKey]=\"aggregateKey\"\n [open]=\"actionModalOpen$ | async\"\n [prefillData]=\"prefillData$ | async\"\n (modalClose)=\"onModalClose($event)\"\n ></valtimo-iko-management-search-action-modal>\n\n <valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"ikoManagement.searchActions.deleteModalText\"\n [outputOnConfirm]=\"deleteSearchActionKey$ | async\"\n [showModalSubject$]=\"deleteModalOpen$\"\n titleTranslationKey=\"interface.delete\"\n (confirmEvent)=\"onDeleteSearchAction($event)\"\n ></valtimo-confirmation-modal>\n\n <ng-template #addActionButton>\n <button cdsButton=\"primary\" (click)=\"openAddModal()\">\n {{ 'ikoManagement.searchActions.addActionTitle' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n </ng-template>\n}\n" }]
2398
+ }], ctorParameters: () => [{ type: i3.ActivatedRoute }, { type: i3.Router }, { type: IkoManagementApiService }] });
2399
+
2400
+ /*
2401
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2402
+ *
2403
+ * Licensed under EUPL, Version 1.2 (the "License");
2404
+ * you may not use this file except in compliance with the License.
2405
+ * You may obtain a copy of the License at
2406
+ *
2407
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2408
+ *
2409
+ * Unless required by applicable law or agreed to in writing, software
2410
+ * distributed under the License is distributed on an "AS IS" basis,
2411
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2412
+ * See the License for the specific language governing permissions and
2413
+ * limitations under the License.
2414
+ */
2415
+ class IkoManagementListComponent {
2416
+ constructor(route, ikoManagementApiService, translateService) {
2417
+ this.route = route;
2418
+ this.ikoManagementApiService = ikoManagementApiService;
2419
+ this.translateService = translateService;
2420
+ this.$openModal = signal(false);
2421
+ this.openConfirmationModal$ = new BehaviorSubject(false);
2422
+ this.$loading = signal(true);
2423
+ this.$disableInput = signal(true);
2424
+ this.$modalMode = signal('add');
2425
+ this._dataAggregateKey$ = this.route.params.pipe(map(params => params?.key), filter(key => !!key));
2426
+ this.$ikoListColumnDtos = signal([]);
2427
+ this.$selectedListColumn = signal(null);
2428
+ this._reloadColumns$ = new BehaviorSubject(null);
2429
+ this.ikoListColumns$ = combineLatest([
2430
+ toObservable(this.$ikoListColumnDtos),
2431
+ this.translateService.stream('key'),
2432
+ ]).pipe(map(([columns]) => columns.map(column => ({
2433
+ ...column,
2434
+ title: column.title || '-',
2435
+ sortable: column.sortable
2436
+ ? this.translateService.instant('listColumn.sortableYes')
2437
+ : this.translateService.instant('listColumn.sortableNo'),
2438
+ defaultSort: (column.defaultSort === 'ASC' &&
2439
+ this.translateService.instant('listColumn.sortableAsc')) ||
2440
+ (column.defaultSort === 'DESC' &&
2441
+ this.translateService.instant('listColumn.sortableDesc')) ||
2442
+ '-',
2443
+ displayType: this.translateService.instant(`listColumnDisplayType.${column?.displayType?.type}`),
2444
+ displayTypeParameters: getDisplayTypeParametersView(column.displayType.displayTypeParameters),
2445
+ }))), tap(() => this.$disableInput.set(false)));
2446
+ this.FIELDS = [
2447
+ {
2448
+ key: 'title',
2449
+ label: 'listColumn.title',
2450
+ viewType: 'string',
2451
+ sortable: false,
2452
+ },
2453
+ {
2454
+ key: 'key',
2455
+ label: 'listColumn.key',
2456
+ viewType: 'string',
2457
+ sortable: false,
2458
+ },
2459
+ {
2460
+ key: 'path',
2461
+ label: 'listColumn.path',
2462
+ viewType: 'string',
2463
+ sortable: false,
2464
+ },
2465
+ {
2466
+ key: 'displayType',
2467
+ label: 'listColumn.displayType',
2468
+ viewType: 'string',
2469
+ sortable: false,
2470
+ },
2471
+ {
2472
+ key: 'displayTypeParameters',
2473
+ label: 'listColumn.displayTypeParameters',
2474
+ viewType: 'string',
2475
+ sortable: false,
2476
+ },
2477
+ {
2478
+ key: 'sortable',
2479
+ label: 'listColumn.sortable',
2480
+ viewType: 'string',
2481
+ sortable: false,
2482
+ },
2483
+ {
2484
+ key: 'defaultSort',
2485
+ label: 'listColumn.defaultSort',
2486
+ viewType: 'string',
2487
+ sortable: false,
2488
+ },
2489
+ ];
2490
+ this.ACTION_ITEMS = [
2491
+ {
2492
+ label: 'interface.edit',
2493
+ callback: this.onRowClicked.bind(this),
2494
+ },
2495
+ {
2496
+ label: 'interface.delete',
2497
+ callback: this.onDeleteClicked.bind(this),
2498
+ type: 'danger',
2499
+ },
2500
+ ];
2501
+ this._subscriptions = new Subscription();
2502
+ }
2503
+ ngOnInit() {
2504
+ this._subscriptions.add(combineLatest([this._dataAggregateKey$, this._reloadColumns$])
2505
+ .pipe(tap(() => this.$disableInput.set(true)), switchMap(([key]) => this.ikoManagementApiService.getIkoListColumns(key)), tap(res => {
2506
+ this.$ikoListColumnDtos.set(res);
2507
+ this.$loading.set(false);
2508
+ }))
2509
+ .subscribe());
2510
+ }
2511
+ ngOnDestroy() {
2512
+ this._subscriptions.unsubscribe();
2513
+ }
2514
+ onItemsReordered(items) {
2515
+ const listColumns = this.$ikoListColumnDtos();
2516
+ const mappedItems = items
2517
+ .map(item => listColumns.find(column => column.id === item.id))
2518
+ .map((item, index) => ({ ...item, order: index }));
2519
+ this.disableInput();
2520
+ this._dataAggregateKey$
2521
+ .pipe(switchMap(key => this.ikoManagementApiService.updateIkoListColumnOrder(key, mappedItems)))
2522
+ .subscribe({
2523
+ next: () => {
2524
+ this.enableInput();
2525
+ this.reloadColumns();
2526
+ },
2527
+ error: () => {
2528
+ this.enableInput();
2529
+ },
2530
+ });
2531
+ }
2532
+ onRowClicked(event) {
2533
+ const listColumnDto = this.$ikoListColumnDtos().find(column => column.key === event.key);
2534
+ if (!listColumnDto)
2535
+ return;
2536
+ this.$selectedListColumn.set({ ...listColumnDto });
2537
+ this.$openModal.set(true);
2538
+ this.$modalMode.set('edit');
2539
+ }
2540
+ onDeleteClicked(event) {
2541
+ const listColumnDto = this.$ikoListColumnDtos().find(column => column.key === event.key);
2542
+ if (!listColumnDto)
2543
+ return;
2544
+ this.$selectedListColumn.set({ ...listColumnDto });
2545
+ this.openConfirmationModal$.next(true);
2546
+ }
2547
+ onDeleteListColumn(event) {
2548
+ this.disableInput();
2549
+ this._dataAggregateKey$
2550
+ .pipe(switchMap(key => this.ikoManagementApiService.deleteIkoListColumn(key, event.key)))
2551
+ .subscribe({
2552
+ next: () => {
2553
+ this.reloadColumns();
2554
+ this.enableInput();
2555
+ },
2556
+ error: () => {
2557
+ this.enableInput();
2558
+ },
2559
+ });
2560
+ }
2561
+ openModal() {
2562
+ this.$openModal.set(true);
2563
+ }
2564
+ onCreateButtonClicked() {
2565
+ this.$modalMode.set('add');
2566
+ this.openModal();
2567
+ }
2568
+ closeModal() {
2569
+ this.$openModal.set(false);
2570
+ }
2571
+ onCloseModalEvent(event) {
2572
+ this.closeModal();
2573
+ if (event === 'closeAndRefresh')
2574
+ this.reloadColumns();
2575
+ }
2576
+ disableInput() {
2577
+ this.$disableInput.set(true);
2578
+ }
2579
+ enableInput() {
2580
+ this.$disableInput.set(false);
2581
+ }
2582
+ reloadColumns() {
2583
+ this._reloadColumns$.next(null);
2584
+ }
2585
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementListComponent, deps: [{ token: i3.ActivatedRoute }, { token: IkoManagementApiService }, { token: i3$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
2586
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: IkoManagementListComponent, isStandalone: true, selector: "valtimo-iko-management-list-columns", 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\n *ngIf=\"{\n columns: (ikoListColumns$ | async) || [],\n ikoListColumnDtos: $ikoListColumnDtos(),\n selectedListColumn: $selectedListColumn(),\n loading: $loading(),\n openModal: $openModal(),\n disableInput: $disableInput(),\n modalMode: $modalMode(),\n } as state\"\n>\n <valtimo-carbon-list\n [items]=\"state.columns\"\n [loading]=\"state.loading\"\n [fields]=\"FIELDS\"\n [header]=\"false\"\n [dragAndDrop]=\"true\"\n [dragAndDropDisabled]=\"state.disableInput\"\n [actionItems]=\"ACTION_ITEMS\"\n (itemsReordered)=\"onItemsReordered($event)\"\n (rowClicked)=\"onRowClicked($event)\"\n >\n <div carbonToolbarContent>\n <button cdsButton=\"primary\" (click)=\"onCreateButtonClicked()\">\n {{ 'ikoManagement.addColumn' | translate }}\n\n <svg cdsIcon=\"add\" size=\"16\" class=\"cds--btn__icon\"></svg>\n </button>\n </div>\n\n <valtimo-no-results\n [title]=\"'listColumn.noConfigWarningTitle' | translate\"\n [description]=\"'listColumn.noConfigWarning' | translate\"\n illustration=\"valtimo-layout/img/emptystate-empty.svg\"\n ></valtimo-no-results>\n </valtimo-carbon-list>\n\n <valtimo-iko-management-list-modal\n [openModal]=\"state.openModal\"\n [listColumns]=\"state.ikoListColumnDtos\"\n [selectedListColumn]=\"state.selectedListColumn\"\n [modalMode]=\"state.modalMode\"\n (closeModalEvent)=\"onCloseModalEvent($event)\"\n ></valtimo-iko-management-list-modal>\n\n <valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"ikoManagement.searchActions.deleteModalText\"\n [showModalSubject$]=\"openConfirmationModal$\"\n [outputOnConfirm]=\"state.selectedListColumn\"\n titleTranslationKey=\"interface.delete\"\n (confirmEvent)=\"onDeleteListColumn($event)\"\n ></valtimo-confirmation-modal>\n</ng-container>\n", styles: ["::ng-deep .tab-container{min-height:unset!important}::ng-deep .cds--inline-notification{max-width:100%}::ng-deep .cds--label{width:100%}.center-link{display:flex;align-items:center}.iko-list-columns__actions{display:flex;gap:8px}.list-columns__buttons{display:flex;gap:16px;flex-direction:row;justify-content:flex-end}\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: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i1$2.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: "component", type: i1$2.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "ngmodule", type: TabsModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "component", type: IkoManagementListModalComponent, selector: "valtimo-iko-management-list-modal", inputs: ["openModal", "listColumns", "selectedListColumn", "modalMode"], outputs: ["closeModalEvent"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i6.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "ngmodule", type: ConfirmationModalModule }, { kind: "component", type: i1$2.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "confirmButtonType", "showOptionalButton", "optionalButtonText", "optionalButtonTextTranslationKey", "optionalButtonType", "cancelButtonText", "cancelButtonTextTranslationKey", "cancelButtonType", "showModalSubject$", "outputOnConfirm", "outputOnOptional", "spacerAfterCancelButton"], outputs: ["confirmEvent", "optionalEvent", "cancelEvent"] }] }); }
2587
+ }
2588
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementListComponent, decorators: [{
2589
+ type: Component,
2590
+ args: [{ standalone: true, selector: 'valtimo-iko-management-list-columns', imports: [
2591
+ CommonModule,
2592
+ CarbonListModule,
2593
+ TabsModule,
2594
+ TranslateModule,
2595
+ IkoManagementListModalComponent,
2596
+ ButtonModule,
2597
+ IconModule,
2598
+ ConfirmationModalModule,
2599
+ ], 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\n *ngIf=\"{\n columns: (ikoListColumns$ | async) || [],\n ikoListColumnDtos: $ikoListColumnDtos(),\n selectedListColumn: $selectedListColumn(),\n loading: $loading(),\n openModal: $openModal(),\n disableInput: $disableInput(),\n modalMode: $modalMode(),\n } as state\"\n>\n <valtimo-carbon-list\n [items]=\"state.columns\"\n [loading]=\"state.loading\"\n [fields]=\"FIELDS\"\n [header]=\"false\"\n [dragAndDrop]=\"true\"\n [dragAndDropDisabled]=\"state.disableInput\"\n [actionItems]=\"ACTION_ITEMS\"\n (itemsReordered)=\"onItemsReordered($event)\"\n (rowClicked)=\"onRowClicked($event)\"\n >\n <div carbonToolbarContent>\n <button cdsButton=\"primary\" (click)=\"onCreateButtonClicked()\">\n {{ 'ikoManagement.addColumn' | translate }}\n\n <svg cdsIcon=\"add\" size=\"16\" class=\"cds--btn__icon\"></svg>\n </button>\n </div>\n\n <valtimo-no-results\n [title]=\"'listColumn.noConfigWarningTitle' | translate\"\n [description]=\"'listColumn.noConfigWarning' | translate\"\n illustration=\"valtimo-layout/img/emptystate-empty.svg\"\n ></valtimo-no-results>\n </valtimo-carbon-list>\n\n <valtimo-iko-management-list-modal\n [openModal]=\"state.openModal\"\n [listColumns]=\"state.ikoListColumnDtos\"\n [selectedListColumn]=\"state.selectedListColumn\"\n [modalMode]=\"state.modalMode\"\n (closeModalEvent)=\"onCloseModalEvent($event)\"\n ></valtimo-iko-management-list-modal>\n\n <valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"ikoManagement.searchActions.deleteModalText\"\n [showModalSubject$]=\"openConfirmationModal$\"\n [outputOnConfirm]=\"state.selectedListColumn\"\n titleTranslationKey=\"interface.delete\"\n (confirmEvent)=\"onDeleteListColumn($event)\"\n ></valtimo-confirmation-modal>\n</ng-container>\n", styles: ["::ng-deep .tab-container{min-height:unset!important}::ng-deep .cds--inline-notification{max-width:100%}::ng-deep .cds--label{width:100%}.center-link{display:flex;align-items:center}.iko-list-columns__actions{display:flex;gap:8px}.list-columns__buttons{display:flex;gap:16px;flex-direction:row;justify-content:flex-end}\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"] }]
2600
+ }], ctorParameters: () => [{ type: i3.ActivatedRoute }, { type: IkoManagementApiService }, { type: i3$1.TranslateService }] });
2601
+
2602
+ /*
2603
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2604
+ *
2605
+ * Licensed under EUPL, Version 1.2 (the "License");
2606
+ * you may not use this file except in compliance with the License.
2607
+ * You may obtain a copy of the License at
2608
+ *
2609
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2610
+ *
2611
+ * Unless required by applicable law or agreed to in writing, software
2612
+ * distributed under the License is distributed on an "AS IS" basis,
2613
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2614
+ * See the License for the specific language governing permissions and
2615
+ * limitations under the License.
2616
+ */
2617
+ class IkoManagementTabDetailsModalComponent {
2618
+ set openModal(value) {
2619
+ this.$openModal.set(value);
2620
+ }
2621
+ set selectedTab(value) {
2622
+ if (!value)
2623
+ return;
2624
+ this.form.setValue({ ...value, title: value.title || '' });
2625
+ this.form.markAsPristine();
2626
+ }
2627
+ set modalMode(value) {
2628
+ this._modalMode = value;
2629
+ }
2630
+ get modalMode() {
2631
+ return this._modalMode;
2632
+ }
2633
+ get title() {
2634
+ return this.form.get('title');
2635
+ }
2636
+ get key() {
2637
+ return this.form.get('key');
2638
+ }
2639
+ get type() {
2640
+ return this.form.get('type');
2641
+ }
2642
+ constructor(ikoManagementApiService, formBuilder, route) {
2643
+ this.ikoManagementApiService = ikoManagementApiService;
2644
+ this.formBuilder = formBuilder;
2645
+ this.route = route;
2646
+ this.$openModal = signal(false);
2647
+ this.usedKeys = [];
2648
+ this._modalMode = 'add';
2649
+ this.closeModalEvent = new EventEmitter();
2650
+ this.form = this.formBuilder.group({
2651
+ title: this.formBuilder.control('', Validators.required),
2652
+ key: this.formBuilder.control('', [Validators.required]),
2653
+ type: this.formBuilder.control('', [Validators.required]),
2654
+ });
2655
+ this._dataAggregateKey$ = this.route.params.pipe(map$1(params => params?.key), filter(key => !!key));
2656
+ this._TAB_TYPES = [IkoTabType.WIDGETS];
2657
+ this.tabTypeSelectItems = this._TAB_TYPES.map(tabType => ({
2658
+ id: tabType,
2659
+ translationKey: `ikoManagement.tabTypes.${tabType}`,
2660
+ }));
2661
+ this.resetForm = () => {
2662
+ this.form.reset();
2663
+ this.form.markAsPristine();
2664
+ this.form.markAsUntouched();
2665
+ this.form.updateValueAndValidity();
2666
+ };
2667
+ }
2668
+ closeModal() {
2669
+ this.closeModalEvent.emit('close');
2670
+ runAfterCarbonModalClosed$1(this.resetForm);
2671
+ }
2672
+ addTab() {
2673
+ const formValue = this.form.getRawValue();
2674
+ this.disableForm();
2675
+ this._dataAggregateKey$
2676
+ .pipe(switchMap(dataAggregateKey => this.modalMode === 'add'
2677
+ ? this.ikoManagementApiService.createIkoTab(dataAggregateKey, formValue.key, formValue)
2678
+ : this.ikoManagementApiService.updateIkoTab(dataAggregateKey, formValue.key, formValue)))
2679
+ .subscribe({
2680
+ next: () => {
2681
+ this.enableForm();
2682
+ this.closeModalEvent.emit('closeAndRefresh');
2683
+ runAfterCarbonModalClosed$1(this.resetForm);
2684
+ },
2685
+ error: () => {
2686
+ this.enableForm();
2687
+ },
2688
+ });
2689
+ }
2690
+ disableForm() {
2691
+ this.form.disable();
2692
+ }
2693
+ enableForm() {
2694
+ this.form.enable();
2695
+ }
2696
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementTabDetailsModalComponent, deps: [{ token: IkoManagementApiService }, { token: i2$2.FormBuilder }, { token: i3.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
2697
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: IkoManagementTabDetailsModalComponent, isStandalone: true, selector: "valtimo-iko-management-tab-details-modal", inputs: { openModal: "openModal", usedKeys: "usedKeys", selectedTab: "selectedTab", modalMode: "modalMode" }, outputs: { closeModalEvent: "closeModalEvent" }, 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<cds-modal\n valtimoCdsModal\n *ngIf=\"{\n title: (modalMode === 'add' ? 'ikoManagement.addTab' : 'ikoManagement.editTab') | translate,\n } as state\"\n [open]=\"$openModal()\"\n [title]=\"state.title\"\n (close)=\"closeModal()\"\n>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 cdsModalHeaderHeading>\n {{ state.title }}\n </h3>\n </cds-modal-header>\n\n <form cdsModalContent [cdsLayer]=\"1\" [formGroup]=\"form\" class=\"iko-tab-form\">\n <cds-label>\n {{ 'ikoManagement.tabTitle' | translate }}\n\n <input\n [invalid]=\"title.dirty && title.invalid\"\n formControlName=\"title\"\n cdsText\n placeholder=\"{{ 'ikoManagement.tabTitlePlaceholder' | translate }}\"\n />\n </cds-label>\n\n <valtimo-auto-key-input\n formControlName=\"key\"\n labelTranslationKey=\"ikoManagement.keyTitle\"\n placeholderTranslationKey=\"ikoManagement.tabKeyPlaceholder\"\n [usedKeys]=\"usedKeys\"\n [sourceText]=\"title.value\"\n [mode]=\"modalMode\"\n >\n </valtimo-auto-key-input>\n\n <v-select\n [invalid]=\"type.dirty && type.invalid\"\n formControlName=\"type\"\n [items]=\"tabTypeSelectItems\"\n titleTranslationKey=\"ikoManagement.tabTypeTitle\"\n [appendInline]=\"false\"\n ></v-select>\n </form>\n\n <cds-modal-footer>\n <button cdsButton=\"ghost\" (click)=\"closeModal()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button\n [disabled]=\"form.invalid || form.disabled || !form.dirty\"\n cdsButton=\"primary\"\n (click)=\"addTab()\"\n >\n {{ 'interface.save' | translate }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", styles: [".iko-tab-form{display:flex;flex-direction:column;gap:16px;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: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ModalModule }, { kind: "component", type: i6.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i6.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i6.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i6.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i6.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "directive", type: ValtimoCdsModalDirective$1, selector: "[valtimoCdsModal]", inputs: ["minContentHeight"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: InputModule }, { kind: "component", type: i6.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i6.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.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: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: LayerModule }, { kind: "directive", type: i6.LayerDirective, selector: "[cdsLayer], [ibmLayer]", inputs: ["ibmLayer", "cdsLayer"], exportAs: ["layer"] }, { kind: "ngmodule", type: SelectModule$1 }, { kind: "component", type: i1$2.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "disabled", "dropUp", "invalid", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "clearText", "clearable", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder", "smallMargin", "carbonTheme", "appendInline", "dataTestId"], outputs: ["selectedChange"] }, { kind: "ngmodule", type: ToggleModule }, { kind: "ngmodule", type: TooltipModule }, { kind: "ngmodule", type: CarbonMultiInputModule$1 }, { kind: "ngmodule", type: InputLabelModule$1 }, { kind: "ngmodule", type: NumberModule }, { kind: "component", type: AutoKeyInputComponent, selector: "valtimo-auto-key-input", inputs: ["labelTranslationKey", "placeholderTranslationKey", "mode", "usedKeys", "sourceText"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2698
+ }
2699
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementTabDetailsModalComponent, decorators: [{
2700
+ type: Component,
2701
+ args: [{ selector: 'valtimo-iko-management-tab-details-modal', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
2702
+ CommonModule,
2703
+ TranslateModule,
2704
+ ModalModule,
2705
+ ValtimoCdsModalDirective$1,
2706
+ ButtonModule,
2707
+ InputModule,
2708
+ ReactiveFormsModule,
2709
+ LayerModule,
2710
+ SelectModule$1,
2711
+ ToggleModule,
2712
+ TooltipModule,
2713
+ CarbonMultiInputModule$1,
2714
+ InputLabelModule$1,
2715
+ NumberModule,
2716
+ AutoKeyInputComponent,
2717
+ ], 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<cds-modal\n valtimoCdsModal\n *ngIf=\"{\n title: (modalMode === 'add' ? 'ikoManagement.addTab' : 'ikoManagement.editTab') | translate,\n } as state\"\n [open]=\"$openModal()\"\n [title]=\"state.title\"\n (close)=\"closeModal()\"\n>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 cdsModalHeaderHeading>\n {{ state.title }}\n </h3>\n </cds-modal-header>\n\n <form cdsModalContent [cdsLayer]=\"1\" [formGroup]=\"form\" class=\"iko-tab-form\">\n <cds-label>\n {{ 'ikoManagement.tabTitle' | translate }}\n\n <input\n [invalid]=\"title.dirty && title.invalid\"\n formControlName=\"title\"\n cdsText\n placeholder=\"{{ 'ikoManagement.tabTitlePlaceholder' | translate }}\"\n />\n </cds-label>\n\n <valtimo-auto-key-input\n formControlName=\"key\"\n labelTranslationKey=\"ikoManagement.keyTitle\"\n placeholderTranslationKey=\"ikoManagement.tabKeyPlaceholder\"\n [usedKeys]=\"usedKeys\"\n [sourceText]=\"title.value\"\n [mode]=\"modalMode\"\n >\n </valtimo-auto-key-input>\n\n <v-select\n [invalid]=\"type.dirty && type.invalid\"\n formControlName=\"type\"\n [items]=\"tabTypeSelectItems\"\n titleTranslationKey=\"ikoManagement.tabTypeTitle\"\n [appendInline]=\"false\"\n ></v-select>\n </form>\n\n <cds-modal-footer>\n <button cdsButton=\"ghost\" (click)=\"closeModal()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button\n [disabled]=\"form.invalid || form.disabled || !form.dirty\"\n cdsButton=\"primary\"\n (click)=\"addTab()\"\n >\n {{ 'interface.save' | translate }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", styles: [".iko-tab-form{display:flex;flex-direction:column;gap:16px;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"] }]
2718
+ }], ctorParameters: () => [{ type: IkoManagementApiService }, { type: i2$2.FormBuilder }, { type: i3.ActivatedRoute }], propDecorators: { openModal: [{
2719
+ type: Input
2720
+ }], usedKeys: [{
2721
+ type: Input
2722
+ }], selectedTab: [{
2723
+ type: Input
2724
+ }], modalMode: [{
2725
+ type: Input
2726
+ }], closeModalEvent: [{
2727
+ type: Output
2728
+ }] } });
2729
+
2730
+ /*
2731
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2732
+ *
2733
+ * Licensed under EUPL, Version 1.2 (the "License");
2734
+ * you may not use this file except in compliance with the License.
2735
+ * You may obtain a copy of the License at
2736
+ *
2737
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2738
+ *
2739
+ * Unless required by applicable law or agreed to in writing, software
2740
+ * distributed under the License is distributed on an "AS IS" basis,
2741
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2742
+ * See the License for the specific language governing permissions and
2743
+ * limitations under the License.
2744
+ */
2745
+ class IkoManagementTabsComponent {
2746
+ constructor(route, ikoManagementApiService, translateService, router) {
2747
+ this.route = route;
2748
+ this.ikoManagementApiService = ikoManagementApiService;
2749
+ this.translateService = translateService;
2750
+ this.router = router;
2751
+ this.$disableInput = signal(true);
2752
+ this.$ikoTabDtos = signal([]);
2753
+ this.$usedKeys = computed(() => this.$ikoTabDtos().map(tab => tab.key));
2754
+ this.$loading = signal(true);
2755
+ this.$selectedTab = signal(null);
2756
+ this.$openModal = signal(false);
2757
+ this.$modalMode = signal('add');
2758
+ this.openConfirmationModal$ = new BehaviorSubject(false);
2759
+ this._dataAggregateKey$ = this.route.params.pipe(map(params => params?.key), filter(key => !!key));
2760
+ this._reloadTabs$ = new BehaviorSubject(null);
2761
+ this.ikoTabs$ = combineLatest([
2762
+ toObservable(this.$ikoTabDtos),
2763
+ this.translateService.stream('key'),
2764
+ ]).pipe(map(([tabs]) => tabs.map(tab => ({
2765
+ ...tab,
2766
+ type: this.translateService.instant(`ikoManagement.tabTypes.${tab.type}`),
2767
+ }))), tap(() => this.$disableInput.set(false)));
2768
+ this.FIELDS = [
2769
+ {
2770
+ key: 'key',
2771
+ label: 'ikoManagement.tabKey',
2772
+ viewType: 'string',
2773
+ sortable: false,
2774
+ },
2775
+ {
2776
+ key: 'title',
2777
+ label: 'ikoManagement.tabTitle',
2778
+ viewType: 'string',
2779
+ sortable: false,
2780
+ },
2781
+ {
2782
+ key: 'type',
2783
+ label: 'ikoManagement.tabType',
2784
+ viewType: 'string',
2785
+ sortable: false,
2786
+ },
2787
+ ];
2788
+ this.ACTION_ITEMS = [
2789
+ {
2790
+ label: 'interface.edit',
2791
+ callback: this.editTab.bind(this),
2792
+ },
2793
+ {
2794
+ label: 'interface.delete',
2795
+ callback: this.onDeleteClicked.bind(this),
2796
+ type: 'danger',
2797
+ },
2798
+ ];
2799
+ this._subscriptions = new Subscription();
2800
+ }
2801
+ ngOnInit() {
2802
+ this._subscriptions.add(combineLatest([this._dataAggregateKey$, this._reloadTabs$])
2803
+ .pipe(tap(() => this.$disableInput.set(true)), switchMap(([key]) => this.ikoManagementApiService.getIkoTabs(key)), tap(res => {
2804
+ this.$ikoTabDtos.set(res);
2805
+ this.$loading.set(false);
2806
+ }))
2807
+ .subscribe());
2808
+ }
2809
+ ngOnDestroy() {
2810
+ this._subscriptions.unsubscribe();
2811
+ }
2812
+ onRowClicked(event) {
2813
+ const tabDto = this.$ikoTabDtos().find(column => column.key === event.key);
2814
+ if (!tabDto)
2815
+ return;
2816
+ if (tabDto.type === 'widgets') {
2817
+ this.router.navigate(['widget-details', tabDto.key], { relativeTo: this.route });
2818
+ return;
2819
+ }
2820
+ this.editTab(event);
2821
+ }
2822
+ editTab(event) {
2823
+ const tabDto = this.$ikoTabDtos().find(column => column.key === event.key);
2824
+ if (!tabDto)
2825
+ return;
2826
+ this.$selectedTab.set({ ...tabDto });
2827
+ this.$openModal.set(true);
2828
+ this.$modalMode.set('edit');
2829
+ }
2830
+ onDeleteClicked(event) {
2831
+ const tabDto = this.$ikoTabDtos().find(tab => tab.key === event.key);
2832
+ if (!tabDto)
2833
+ return;
2834
+ this.$selectedTab.set({ ...tabDto });
2835
+ this.openConfirmationModal$.next(true);
2836
+ }
2837
+ onItemsReordered(items) {
2838
+ const tabs = this.$ikoTabDtos();
2839
+ const mappedItems = items
2840
+ .map(item => tabs.find(column => column.key === item.key))
2841
+ .map((item, index) => ({ ...item, order: index, title: item.title || null }));
2842
+ this.disableInput();
2843
+ this._dataAggregateKey$
2844
+ .pipe(switchMap(key => this.ikoManagementApiService.updateIkoTabs(key, mappedItems)))
2845
+ .subscribe({
2846
+ next: () => {
2847
+ this.enableInput();
2848
+ this.reloadTabs();
2849
+ },
2850
+ error: () => {
2851
+ this.enableInput();
2852
+ },
2853
+ });
2854
+ }
2855
+ onCreateButtonClicked() {
2856
+ this.$modalMode.set('add');
2857
+ this.openModal();
2858
+ }
2859
+ closeModal() {
2860
+ this.$openModal.set(false);
2861
+ }
2862
+ onCloseModalEvent(event) {
2863
+ this.closeModal();
2864
+ if (event === 'closeAndRefresh')
2865
+ this.reloadTabs();
2866
+ }
2867
+ openModal() {
2868
+ this.$openModal.set(true);
2869
+ }
2870
+ onDeleteTab(event) {
2871
+ this.disableInput();
2872
+ this._dataAggregateKey$
2873
+ .pipe(switchMap(key => this.ikoManagementApiService.deleteIkoTab(key, event.key)))
2874
+ .subscribe({
2875
+ next: () => {
2876
+ this.reloadTabs();
2877
+ this.enableInput();
2878
+ },
2879
+ error: () => {
2880
+ this.enableInput();
2881
+ },
2882
+ });
2883
+ }
2884
+ disableInput() {
2885
+ this.$disableInput.set(true);
2886
+ }
2887
+ enableInput() {
2888
+ this.$disableInput.set(false);
2889
+ }
2890
+ reloadTabs() {
2891
+ this._reloadTabs$.next(null);
2892
+ }
2893
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementTabsComponent, deps: [{ token: i3.ActivatedRoute }, { token: IkoManagementApiService }, { token: i3$1.TranslateService }, { token: i3.Router }], target: i0.ɵɵFactoryTarget.Component }); }
2894
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: IkoManagementTabsComponent, isStandalone: true, selector: "ng-component", 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\n *ngIf=\"{\n tabs: (ikoTabs$ | async) || [],\n ikoTabColumnDtos: $ikoTabDtos(),\n selectedTab: $selectedTab(),\n loading: $loading(),\n openModal: $openModal(),\n disableInput: $disableInput(),\n modalMode: $modalMode(),\n usedKeys: $usedKeys(),\n } as state\"\n>\n <valtimo-carbon-list\n [items]=\"state.tabs\"\n [loading]=\"state.loading\"\n [fields]=\"FIELDS\"\n [header]=\"false\"\n [dragAndDrop]=\"true\"\n [dragAndDropDisabled]=\"state.disableInput\"\n [actionItems]=\"ACTION_ITEMS\"\n (itemsReordered)=\"onItemsReordered($event)\"\n (rowClicked)=\"onRowClicked($event)\"\n >\n <div carbonToolbarContent>\n <button cdsButton=\"primary\" (click)=\"onCreateButtonClicked()\">\n {{ 'ikoManagement.addTab' | translate }}\n\n <svg cdsIcon=\"add\" size=\"16\" class=\"cds--btn__icon\"></svg>\n </button>\n </div>\n\n <valtimo-no-results\n [title]=\"'ikoManagement.noTabConfigWarningTitle' | translate\"\n [description]=\"'ikoManagement.noTabConfigWarning' | translate\"\n illustration=\"valtimo-layout/img/emptystate-empty.svg\"\n ></valtimo-no-results>\n </valtimo-carbon-list>\n\n <valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"ikoManagement.deleteTabModalText\"\n [showModalSubject$]=\"openConfirmationModal$\"\n [outputOnConfirm]=\"state.selectedTab\"\n titleTranslationKey=\"interface.delete\"\n (confirmEvent)=\"onDeleteTab($event)\"\n ></valtimo-confirmation-modal>\n\n <valtimo-iko-management-tab-details-modal\n [openModal]=\"state.openModal\"\n [selectedTab]=\"state.selectedTab\"\n [modalMode]=\"state.modalMode\"\n [usedKeys]=\"state.usedKeys\"\n (closeModalEvent)=\"onCloseModalEvent($event)\"\n ></valtimo-iko-management-tab-details-modal>\n</ng-container>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i1$2.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: "component", type: i1$2.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "ngmodule", type: TabsModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i6.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: IkoManagementTabDetailsModalComponent, selector: "valtimo-iko-management-tab-details-modal", inputs: ["openModal", "usedKeys", "selectedTab", "modalMode"], outputs: ["closeModalEvent"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ConfirmationModalModule }, { kind: "component", type: i1$2.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "confirmButtonType", "showOptionalButton", "optionalButtonText", "optionalButtonTextTranslationKey", "optionalButtonType", "cancelButtonText", "cancelButtonTextTranslationKey", "cancelButtonType", "showModalSubject$", "outputOnConfirm", "outputOnOptional", "spacerAfterCancelButton"], outputs: ["confirmEvent", "optionalEvent", "cancelEvent"] }] }); }
2895
+ }
2896
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementTabsComponent, decorators: [{
2897
+ type: Component,
2898
+ args: [{ standalone: true, imports: [
2899
+ CommonModule,
2900
+ CarbonListModule,
2901
+ TabsModule,
2902
+ CarbonListModule,
2903
+ ButtonModule,
2904
+ IconModule,
2905
+ IkoManagementTabDetailsModalComponent,
2906
+ TranslatePipe,
2907
+ ConfirmationModalModule,
2908
+ ], 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\n *ngIf=\"{\n tabs: (ikoTabs$ | async) || [],\n ikoTabColumnDtos: $ikoTabDtos(),\n selectedTab: $selectedTab(),\n loading: $loading(),\n openModal: $openModal(),\n disableInput: $disableInput(),\n modalMode: $modalMode(),\n usedKeys: $usedKeys(),\n } as state\"\n>\n <valtimo-carbon-list\n [items]=\"state.tabs\"\n [loading]=\"state.loading\"\n [fields]=\"FIELDS\"\n [header]=\"false\"\n [dragAndDrop]=\"true\"\n [dragAndDropDisabled]=\"state.disableInput\"\n [actionItems]=\"ACTION_ITEMS\"\n (itemsReordered)=\"onItemsReordered($event)\"\n (rowClicked)=\"onRowClicked($event)\"\n >\n <div carbonToolbarContent>\n <button cdsButton=\"primary\" (click)=\"onCreateButtonClicked()\">\n {{ 'ikoManagement.addTab' | translate }}\n\n <svg cdsIcon=\"add\" size=\"16\" class=\"cds--btn__icon\"></svg>\n </button>\n </div>\n\n <valtimo-no-results\n [title]=\"'ikoManagement.noTabConfigWarningTitle' | translate\"\n [description]=\"'ikoManagement.noTabConfigWarning' | translate\"\n illustration=\"valtimo-layout/img/emptystate-empty.svg\"\n ></valtimo-no-results>\n </valtimo-carbon-list>\n\n <valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"ikoManagement.deleteTabModalText\"\n [showModalSubject$]=\"openConfirmationModal$\"\n [outputOnConfirm]=\"state.selectedTab\"\n titleTranslationKey=\"interface.delete\"\n (confirmEvent)=\"onDeleteTab($event)\"\n ></valtimo-confirmation-modal>\n\n <valtimo-iko-management-tab-details-modal\n [openModal]=\"state.openModal\"\n [selectedTab]=\"state.selectedTab\"\n [modalMode]=\"state.modalMode\"\n [usedKeys]=\"state.usedKeys\"\n (closeModalEvent)=\"onCloseModalEvent($event)\"\n ></valtimo-iko-management-tab-details-modal>\n</ng-container>\n" }]
2909
+ }], ctorParameters: () => [{ type: i3.ActivatedRoute }, { type: IkoManagementApiService }, { type: i3$1.TranslateService }, { type: i3.Router }] });
2910
+
2911
+ /*
2912
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2913
+ *
2914
+ * Licensed under EUPL, Version 1.2 (the "License");
2915
+ * you may not use this file except in compliance with the License.
2916
+ * You may obtain a copy of the License at
2917
+ *
2918
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2919
+ *
2920
+ * Unless required by applicable law or agreed to in writing, software
2921
+ * distributed under the License is distributed on an "AS IS" basis,
2922
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2923
+ * See the License for the specific language governing permissions and
2924
+ * limitations under the License.
2925
+ */
2926
+ const IKO_MANAGEMENT_TABS = [
2927
+ {
2928
+ key: IkoManagementTabType.SEARCH_FIELDS,
2929
+ title: 'ikoManagement.searchActions.title',
2930
+ component: IkoManagementSearchActionsComponent,
2931
+ },
2932
+ {
2933
+ key: IkoManagementTabType.LIST,
2934
+ title: 'ikoManagement.list',
2935
+ component: IkoManagementListComponent,
2936
+ },
2937
+ {
2938
+ key: IkoManagementTabType.TABS,
2939
+ title: 'ikoManagement.tabs.title',
2940
+ component: IkoManagementTabsComponent,
2941
+ },
2942
+ ];
2943
+
2944
+ /*
2945
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2946
+ *
2947
+ * Licensed under EUPL, Version 1.2 (the "License");
2948
+ * you may not use this file except in compliance with the License.
2949
+ * You may obtain a copy of the License at
2950
+ *
2951
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2952
+ *
2953
+ * Unless required by applicable law or agreed to in writing, software
2954
+ * distributed under the License is distributed on an "AS IS" basis,
2955
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2956
+ * See the License for the specific language governing permissions and
2957
+ * limitations under the License.
2958
+ */
2959
+
2960
+ /*
2961
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2962
+ *
2963
+ * Licensed under EUPL, Version 1.2 (the "License");
2964
+ * you may not use this file except in compliance with the License.
2965
+ * You may obtain a copy of the License at
2966
+ *
2967
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2968
+ *
2969
+ * Unless required by applicable law or agreed to in writing, software
2970
+ * distributed under the License is distributed on an "AS IS" basis,
2971
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2972
+ * See the License for the specific language governing permissions and
2973
+ * limitations under the License.
2974
+ */
2975
+ class IkoManagementDetailsComponent {
2976
+ set dynamicContainer(view) {
2977
+ if (view)
2978
+ this._dynamicContainerSubject$.next(view);
2979
+ }
2980
+ get _dynamicContainer$() {
2981
+ return this._dynamicContainerSubject$.pipe(filter(container => !!container));
2982
+ }
2983
+ constructor(ikoApiService, route, pageTitleService, router, breadcrumbService, ikoManagementApiService) {
2984
+ this.ikoApiService = ikoApiService;
2985
+ this.route = route;
2986
+ this.pageTitleService = pageTitleService;
2987
+ this.router = router;
2988
+ this.breadcrumbService = breadcrumbService;
2989
+ this.ikoManagementApiService = ikoManagementApiService;
2990
+ this._dynamicContainerSubject$ = new BehaviorSubject(null);
2991
+ this.loading$ = new BehaviorSubject(true);
2992
+ this.tabKey$ = this.route.params.pipe(map(params => params?.tabKey), filter(key => !!key));
2993
+ this._key$ = this.route.params.pipe(map(params => params?.key), filter(key => !!key));
2994
+ this._apiKey$ = this.route.params.pipe(map(params => params?.apiKey), filter(key => !!key));
2995
+ this.currentMenuItem$ = combineLatest([
2996
+ this._key$,
2997
+ this.ikoApiService.cachedMenuItems$,
2998
+ ]).pipe(map(([key, items]) => {
2999
+ const currentItem = items.find(item => item.key === key);
3000
+ if (!currentItem)
3001
+ return;
3002
+ this.pageTitleService.setCustomPageTitle(currentItem.title || '-');
3003
+ }));
3004
+ this.FIELDS = [
3005
+ {
3006
+ key: 'title',
3007
+ label: 'ikoManagement.title',
3008
+ },
3009
+ ];
3010
+ this.TABS = IKO_MANAGEMENT_TABS;
3011
+ this._subscriptions = new Subscription();
3012
+ }
3013
+ ngOnInit() {
3014
+ this.openActivateTabSubscription();
3015
+ this.setThirdBreadcrumb();
3016
+ this.pageTitleService.disableReset();
3017
+ }
3018
+ ngOnDestroy() {
3019
+ this._subscriptions.unsubscribe();
3020
+ this.pageTitleService.enableReset();
3021
+ this.breadcrumbService.clearThirdBreadcrumb();
3022
+ }
3023
+ onTabSelected(tab) {
3024
+ this.router.navigate([`../${tab.key}`], { relativeTo: this.route });
3025
+ }
3026
+ openActivateTabSubscription() {
3027
+ this._subscriptions.add(combineLatest([this.tabKey$, this._dynamicContainer$]).subscribe(([tabKey, container]) => {
3028
+ const tab = this.TABS.find(tab => tab.key === tabKey);
3029
+ container.clear();
3030
+ container.createComponent(tab.component);
3031
+ }));
3032
+ }
3033
+ setThirdBreadcrumb() {
3034
+ this._apiKey$
3035
+ .pipe(take(1), switchMap(apiKey => this.ikoManagementApiService.getIkoRepositoryConfig(apiKey)))
3036
+ .subscribe(repositoryConfig => {
3037
+ this.breadcrumbService.setThirdBreadcrumb({
3038
+ route: [`/iko-management/${repositoryConfig.key}`],
3039
+ content: repositoryConfig?.title ?? '',
3040
+ href: `/iko-management/${repositoryConfig.key}`,
3041
+ });
3042
+ });
3043
+ }
3044
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementDetailsComponent, deps: [{ token: IkoApiService }, { token: i3.ActivatedRoute }, { token: i1$2.PageTitleService }, { token: i3.Router }, { token: i1$2.BreadcrumbService }, { token: IkoManagementApiService }], target: i0.ɵɵFactoryTarget.Component }); }
3045
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: IkoManagementDetailsComponent, isStandalone: true, selector: "valtimo-iko-management-details", viewQueries: [{ propertyName: "dynamicContainer", first: true, predicate: ["tabComponent"], 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\n *ngIf=\"{\n currentMenuItem: currentMenuItem$ | async,\n tabKey: tabKey$ | async,\n } as obs\"\n>\n <cds-tabs type=\"contained\">\n <cds-tab\n *ngFor=\"let tab of TABS\"\n [active]=\"obs.tabKey === tab.key\"\n [heading]=\"tab.title | translate\"\n (selected)=\"onTabSelected(tab)\"\n >\n </cds-tab>\n </cds-tabs>\n\n <ng-template #tabComponent></ng-template>\n</ng-container>\n", styles: [":host ::ng-deep .cds--tab-content{display:none}\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: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "ngmodule", type: TabsModule }, { kind: "component", type: i6.Tabs, selector: "cds-tabs, ibm-tabs", inputs: ["position", "cacheActive", "followFocus", "isNavigation", "ariaLabel", "ariaLabelledby", "type", "theme", "skeleton"] }, { kind: "component", type: i6.Tab, selector: "cds-tab, ibm-tab", inputs: ["heading", "title", "context", "active", "disabled", "tabIndex", "id", "cacheActive", "tabContent", "templateContext"], outputs: ["selected"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }] }); }
3046
+ }
3047
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementDetailsComponent, decorators: [{
3048
+ type: Component,
3049
+ args: [{ selector: 'valtimo-iko-management-details', standalone: true, imports: [CommonModule, CarbonListModule, TabsModule, TranslateModule], 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\n *ngIf=\"{\n currentMenuItem: currentMenuItem$ | async,\n tabKey: tabKey$ | async,\n } as obs\"\n>\n <cds-tabs type=\"contained\">\n <cds-tab\n *ngFor=\"let tab of TABS\"\n [active]=\"obs.tabKey === tab.key\"\n [heading]=\"tab.title | translate\"\n (selected)=\"onTabSelected(tab)\"\n >\n </cds-tab>\n </cds-tabs>\n\n <ng-template #tabComponent></ng-template>\n</ng-container>\n", styles: [":host ::ng-deep .cds--tab-content{display:none}\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"] }]
3050
+ }], ctorParameters: () => [{ type: IkoApiService }, { type: i3.ActivatedRoute }, { type: i1$2.PageTitleService }, { type: i3.Router }, { type: i1$2.BreadcrumbService }, { type: IkoManagementApiService }], propDecorators: { dynamicContainer: [{
3051
+ type: ViewChild,
3052
+ args: ['tabComponent', { static: false, read: ViewContainerRef }]
3053
+ }] } });
3054
+
3055
+ /*
3056
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3057
+ *
3058
+ * Licensed under EUPL, Version 1.2 (the "License");
3059
+ * you may not use this file except in compliance with the License.
3060
+ * You may obtain a copy of the License at
3061
+ *
3062
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3063
+ *
3064
+ * Unless required by applicable law or agreed to in writing, software
3065
+ * distributed under the License is distributed on an "AS IS" basis,
3066
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3067
+ * See the License for the specific language governing permissions and
3068
+ * limitations under the License.
3069
+ */
3070
+ class IkoManagementComponent {
3071
+ constructor(ikoApiService, ikoManagementApiService, router, route, pageTitleService) {
3072
+ this.ikoApiService = ikoApiService;
3073
+ this.ikoManagementApiService = ikoManagementApiService;
3074
+ this.router = router;
3075
+ this.route = route;
3076
+ this.pageTitleService = pageTitleService;
3077
+ this.loading$ = new BehaviorSubject(true);
3078
+ this._apiKey$ = this.route.params.pipe(map(params => params?.apiKey), filter(key => !!key));
3079
+ this.ikoDataAggregates$ = this._apiKey$.pipe(switchMap(apiKey => this.ikoManagementApiService
3080
+ .getManagementIkoDataAggregates(undefined, undefined, apiKey)
3081
+ .pipe(map(dataAggregatePage => dataAggregatePage.content), tap(() => this.loading$.next(false)))));
3082
+ this.FIELDS = [
3083
+ {
3084
+ key: 'title',
3085
+ label: 'ikoManagement.view',
3086
+ },
3087
+ ];
3088
+ }
3089
+ ngOnInit() {
3090
+ this.pageTitleService.disableReset();
3091
+ this.setPageTitle();
3092
+ }
3093
+ ngOnDestroy() {
3094
+ this.pageTitleService.enableReset();
3095
+ }
3096
+ onRowClicked(event) {
3097
+ this._apiKey$.pipe(take(1)).subscribe(apiKey => {
3098
+ this.router.navigate(['iko-management', apiKey, event.key, IKO_MANAGEMENT_TABS[0].key]);
3099
+ });
3100
+ }
3101
+ setPageTitle() {
3102
+ this._apiKey$
3103
+ .pipe(take(1), switchMap(apiKey => this.ikoManagementApiService.getIkoRepositoryConfig(apiKey)))
3104
+ .subscribe(repositoryConfig => {
3105
+ this.pageTitleService.setCustomPageTitle(repositoryConfig.title);
3106
+ });
3107
+ }
3108
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementComponent, deps: [{ token: IkoApiService }, { token: IkoManagementApiService }, { token: i3.Router }, { token: i3.ActivatedRoute }, { token: i1$2.PageTitleService }], target: i0.ɵɵFactoryTarget.Component }); }
3109
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: IkoManagementComponent, isStandalone: true, selector: "valtimo-iko-management", 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<valtimo-carbon-list\n [fields]=\"FIELDS\"\n [items]=\"ikoDataAggregates$ | async\"\n [loading]=\"loading$ | async\"\n [hideToolbar]=\"true\"\n (rowClicked)=\"onRowClicked($event)\"\n></valtimo-carbon-list>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i1$2.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"] }] }); }
3110
+ }
3111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoManagementComponent, decorators: [{
3112
+ type: Component,
3113
+ args: [{ selector: 'valtimo-iko-management', standalone: true, imports: [CommonModule, CarbonListModule], 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<valtimo-carbon-list\n [fields]=\"FIELDS\"\n [items]=\"ikoDataAggregates$ | async\"\n [loading]=\"loading$ | async\"\n [hideToolbar]=\"true\"\n (rowClicked)=\"onRowClicked($event)\"\n></valtimo-carbon-list>\n" }]
3114
+ }], ctorParameters: () => [{ type: IkoApiService }, { type: IkoManagementApiService }, { type: i3.Router }, { type: i3.ActivatedRoute }, { type: i1$2.PageTitleService }] });
3115
+
3116
+ /*
3117
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3118
+ *
3119
+ * Licensed under EUPL, Version 1.2 (the "License");
3120
+ * you may not use this file except in compliance with the License.
3121
+ * You may obtain a copy of the License at
3122
+ *
3123
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3124
+ *
3125
+ * Unless required by applicable law or agreed to in writing, software
3126
+ * distributed under the License is distributed on an "AS IS" basis,
3127
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3128
+ * See the License for the specific language governing permissions and
3129
+ * limitations under the License.
3130
+ */
3131
+ class IkoSearchComponent {
3132
+ constructor(route, router, pageTitleService, iconService, ikoApiService) {
3133
+ this.route = route;
3134
+ this.router = router;
3135
+ this.pageTitleService = pageTitleService;
3136
+ this.iconService = iconService;
3137
+ this.ikoApiService = ikoApiService;
3138
+ this.formValues = {};
3139
+ this._key$ = this.route.params.pipe(map$1(params => params?.key), filter(key => !!key));
3140
+ this.dataRequests$ = this._key$.pipe(switchMap(key => combineLatest([
3141
+ of(key),
3142
+ this.ikoApiService.cachedMenuItems$,
3143
+ this.ikoApiService.getIkoDataRequests(key),
3144
+ ])), map$1(([key, menuItems, dataRequests]) => {
3145
+ const currentMenuItem = menuItems.find(item => item.key === key);
3146
+ if (currentMenuItem && currentMenuItem?.title)
3147
+ this.pageTitleService.setCustomPageTitle(currentMenuItem.title, true);
3148
+ return dataRequests;
3149
+ }));
3150
+ this.iconService.register(Search16);
3151
+ }
3152
+ ngOnDestroy() {
3153
+ this.pageTitleService.enableReset();
3154
+ }
3155
+ searchDisabled(params) {
3156
+ return params.some(param => !this.formValues[param.key] && param.required);
3157
+ }
3158
+ isQueryGroup(param) {
3159
+ return param && param.group === true && Array.isArray(param.fields);
3160
+ }
3161
+ searchGroup(paramKey, params) {
3162
+ const queryParams = {};
3163
+ for (const param of params) {
3164
+ const value = this.formValues[param.key];
3165
+ if (value) {
3166
+ queryParams[param.key] = value;
3167
+ }
3168
+ }
3169
+ this.router.navigate([`${paramKey}`], { relativeTo: this.route, queryParams });
3170
+ }
3171
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoSearchComponent, deps: [{ token: i3.ActivatedRoute }, { token: i3.Router }, { token: i1$2.PageTitleService }, { token: i6.IconService }, { token: IkoApiService }], target: i0.ɵɵFactoryTarget.Component }); }
3172
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: IkoSearchComponent, isStandalone: true, selector: "valtimo-iko-search", 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@if (dataRequests$ | async; as dataRequests) {\n @if (dataRequests.length === 0) {\n <valtimo-no-results [title]=\"'iko.searchFieldsNoResults' | translate\"></valtimo-no-results>\n } @else {\n @for (param of dataRequests; track param.key ?? param.fields?.[0]?.key) {\n <div class=\"query-group\">\n <span class=\"query-group__label\">{{ param.title }}</span>\n\n <div class=\"query-group__row\">\n @for (field of param.searchFields; track field.key) {\n <div class=\"query-group__field\">\n <input\n cdsText\n [id]=\"field.key\"\n [placeholder]=\"field.title\"\n [(ngModel)]=\"formValues[field.key]\"\n />\n </div>\n }\n <button\n cdsButton=\"primary\"\n class=\"query-group__search-button\"\n [disabled]=\"searchDisabled(param.searchFields)\"\n (click)=\"searchGroup(param.key, param.searchFields)\"\n >\n {{ 'searchFields.searchButtonText' | translate }}\n <svg cdsIcon=\"search\" size=\"16\"></svg>\n </button>\n </div>\n </div>\n }\n }\n}\n", styles: [":host{display:flex;flex-direction:column;gap:32px}.query-group{display:flex;flex-direction:column;gap:8px}.query-group__row{display:flex;flex-wrap:wrap;gap:16px;align-items:flex-end}.query-group__field{flex:1 1 200px;display:flex;flex-direction:column;min-width:180px}.query-group__field input{width:100%}.query-group__label{font-size:14px;font-weight:600;color:var(--cds-text-primary)}.query-group__search-button{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;height:40px;max-height:40px;min-height:40px;padding:8px 16px;min-width:120px;white-space:nowrap;overflow:hidden}\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: "ngmodule", type: CommonModule }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: InputModule }, { kind: "directive", type: i6.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i6.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.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: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i1$2.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }] }); }
3173
+ }
3174
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoSearchComponent, decorators: [{
3175
+ type: Component,
3176
+ args: [{ selector: 'valtimo-iko-search', standalone: true, imports: [
3177
+ CommonModule,
3178
+ InputModule,
3179
+ ButtonModule,
3180
+ IconModule,
3181
+ FormsModule,
3182
+ ReactiveFormsModule,
3183
+ TranslateModule,
3184
+ IkoListComponent,
3185
+ CarbonListModule,
3186
+ ], 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@if (dataRequests$ | async; as dataRequests) {\n @if (dataRequests.length === 0) {\n <valtimo-no-results [title]=\"'iko.searchFieldsNoResults' | translate\"></valtimo-no-results>\n } @else {\n @for (param of dataRequests; track param.key ?? param.fields?.[0]?.key) {\n <div class=\"query-group\">\n <span class=\"query-group__label\">{{ param.title }}</span>\n\n <div class=\"query-group__row\">\n @for (field of param.searchFields; track field.key) {\n <div class=\"query-group__field\">\n <input\n cdsText\n [id]=\"field.key\"\n [placeholder]=\"field.title\"\n [(ngModel)]=\"formValues[field.key]\"\n />\n </div>\n }\n <button\n cdsButton=\"primary\"\n class=\"query-group__search-button\"\n [disabled]=\"searchDisabled(param.searchFields)\"\n (click)=\"searchGroup(param.key, param.searchFields)\"\n >\n {{ 'searchFields.searchButtonText' | translate }}\n <svg cdsIcon=\"search\" size=\"16\"></svg>\n </button>\n </div>\n </div>\n }\n }\n}\n", styles: [":host{display:flex;flex-direction:column;gap:32px}.query-group{display:flex;flex-direction:column;gap:8px}.query-group__row{display:flex;flex-wrap:wrap;gap:16px;align-items:flex-end}.query-group__field{flex:1 1 200px;display:flex;flex-direction:column;min-width:180px}.query-group__field input{width:100%}.query-group__label{font-size:14px;font-weight:600;color:var(--cds-text-primary)}.query-group__search-button{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;height:40px;max-height:40px;min-height:40px;padding:8px 16px;min-width:120px;white-space:nowrap;overflow:hidden}\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"] }]
3187
+ }], ctorParameters: () => [{ type: i3.ActivatedRoute }, { type: i3.Router }, { type: i1$2.PageTitleService }, { type: i6.IconService }, { type: IkoApiService }] });
3188
+
3189
+ /*
3190
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3191
+ *
3192
+ * Licensed under EUPL, Version 1.2 (the "License");
3193
+ * you may not use this file except in compliance with the License.
3194
+ * You may obtain a copy of the License at
3195
+ *
3196
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3197
+ *
3198
+ * Unless required by applicable law or agreed to in writing, software
3199
+ * distributed under the License is distributed on an "AS IS" basis,
3200
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3201
+ * See the License for the specific language governing permissions and
3202
+ * limitations under the License.
3203
+ */
3204
+ const routes = [
3205
+ {
3206
+ path: 'iko/:key',
3207
+ component: IkoSearchComponent,
3208
+ canActivate: [AuthGuardService],
3209
+ data: {
3210
+ title: 'Iko',
3211
+ customPageTitle: true,
3212
+ },
3213
+ },
3214
+ {
3215
+ path: 'iko/:key/:searchKey',
3216
+ component: IkoListComponent,
3217
+ canActivate: [AuthGuardService],
3218
+ data: {
3219
+ title: 'interface.results',
3220
+ },
3221
+ },
3222
+ {
3223
+ path: 'iko/:key/:searchKey/details/:id',
3224
+ component: IkoDetailsComponent,
3225
+ canActivate: [AuthGuardService],
3226
+ data: {
3227
+ title: 'interface.details',
3228
+ customPageTitle: true,
3229
+ },
3230
+ },
3231
+ {
3232
+ path: 'iko-management',
3233
+ component: IkoManagementApiComponent,
3234
+ canActivate: [AuthGuardService],
3235
+ data: {
3236
+ title: 'Iko',
3237
+ roles: [ROLE_ADMIN],
3238
+ },
3239
+ },
3240
+ {
3241
+ path: 'iko-management/:apiKey',
3242
+ component: IkoManagementComponent,
3243
+ canActivate: [AuthGuardService],
3244
+ data: {
3245
+ title: 'Iko',
3246
+ roles: [ROLE_ADMIN],
3247
+ customPageTitle: true,
3248
+ },
3249
+ },
3250
+ {
3251
+ path: 'iko-management/:apiKey/:key/:tabKey',
3252
+ component: IkoManagementDetailsComponent,
3253
+ canActivate: [AuthGuardService],
3254
+ data: {
3255
+ customPageTitle: true,
3256
+ title: 'IKO Details',
3257
+ roles: [ROLE_ADMIN],
3258
+ },
3259
+ },
3260
+ {
3261
+ path: 'iko-management/:apiKey/:key/:tabKey/search-action/:actionKey',
3262
+ component: IkoManagementSearchFieldsComponent,
3263
+ canActivate: [AuthGuardService],
3264
+ data: {
3265
+ customPageTitle: true,
3266
+ title: 'IKO Search action details',
3267
+ roles: [ROLE_ADMIN],
3268
+ },
3269
+ },
3270
+ {
3271
+ path: 'iko-management/:apiKey/:key/:tabKey/widget-details/:widgetTabKey',
3272
+ component: IkoManagementWidgetsComponent,
3273
+ canActivate: [AuthGuardService],
3274
+ data: {
3275
+ title: 'IKO Widget details',
3276
+ roles: [ROLE_ADMIN],
3277
+ },
3278
+ },
3279
+ ];
3280
+ class IkoRoutingModule {
3281
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3282
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: IkoRoutingModule, imports: [CommonModule, i3.RouterModule], exports: [RouterModule] }); }
3283
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoRoutingModule, imports: [CommonModule, RouterModule.forChild(routes), RouterModule] }); }
3284
+ }
3285
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoRoutingModule, decorators: [{
3286
+ type: NgModule,
3287
+ args: [{
3288
+ declarations: [],
3289
+ imports: [CommonModule, RouterModule.forChild(routes)],
3290
+ exports: [RouterModule],
3291
+ }]
3292
+ }] });
3293
+
3294
+ /*
3295
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3296
+ *
3297
+ * Licensed under EUPL, Version 1.2 (the "License");
3298
+ * you may not use this file except in compliance with the License.
3299
+ * You may obtain a copy of the License at
3300
+ *
3301
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3302
+ *
3303
+ * Unless required by applicable law or agreed to in writing, software
3304
+ * distributed under the License is distributed on an "AS IS" basis,
3305
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3306
+ * See the License for the specific language governing permissions and
3307
+ * limitations under the License.
3308
+ */
3309
+ class IkoModule {
3310
+ constructor(ikoMenuService, menuService) {
3311
+ this.ikoMenuService = ikoMenuService;
3312
+ this.menuService = menuService;
3313
+ this.menuService.registerAppendMenuItemsFunction(this.ikoMenuService.appendIkoMenuItems);
3314
+ }
3315
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoModule, deps: [{ token: IkoMenuService }, { token: i1$2.MenuService }], target: i0.ɵɵFactoryTarget.NgModule }); }
3316
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: IkoModule, imports: [CommonModule, IkoRoutingModule, IkoSearchComponent] }); }
3317
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoModule, providers: [
3318
+ IkoMenuService,
3319
+ {
3320
+ provide: IKO_TOKEN,
3321
+ useValue: true,
3322
+ },
3323
+ ], imports: [CommonModule, IkoRoutingModule, IkoSearchComponent] }); }
3324
+ }
3325
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IkoModule, decorators: [{
3326
+ type: NgModule,
3327
+ args: [{
3328
+ imports: [CommonModule, IkoRoutingModule, IkoSearchComponent],
3329
+ providers: [
3330
+ IkoMenuService,
3331
+ {
3332
+ provide: IKO_TOKEN,
3333
+ useValue: true,
3334
+ },
3335
+ ],
3336
+ }]
3337
+ }], ctorParameters: () => [{ type: IkoMenuService }, { type: i1$2.MenuService }] });
3338
+
3339
+ /*
3340
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3341
+ *
3342
+ * Licensed under EUPL, Version 1.2 (the "License");
3343
+ * you may not use this file except in compliance with the License.
3344
+ * You may obtain a copy of the License at
3345
+ *
3346
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3347
+ *
3348
+ * Unless required by applicable law or agreed to in writing, software
3349
+ * distributed under the License is distributed on an "AS IS" basis,
3350
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3351
+ * See the License for the specific language governing permissions and
3352
+ * limitations under the License.
3353
+ */
3354
+ /*
3355
+ * Public API Surface of iko
3356
+ */
3357
+
3358
+ /**
3359
+ * Generated bundle index. Do not edit.
3360
+ */
3361
+
3362
+ export { IkoModule };
3363
+ //# sourceMappingURL=valtimo-iko.mjs.map