@valtimo/layout 13.2.0 → 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 (107) hide show
  1. package/fesm2022/valtimo-layout.mjs +3106 -253
  2. package/fesm2022/valtimo-layout.mjs.map +1 -1
  3. package/lib/components/index.d.ts +13 -0
  4. package/lib/components/index.d.ts.map +1 -0
  5. package/lib/components/layout/index.d.ts +2 -0
  6. package/lib/components/layout/index.d.ts.map +1 -0
  7. package/lib/components/layout-internal/index.d.ts +2 -0
  8. package/lib/components/layout-internal/index.d.ts.map +1 -0
  9. package/lib/components/layout-public/index.d.ts +2 -0
  10. package/lib/components/layout-public/index.d.ts.map +1 -0
  11. package/lib/components/translation-management/index.d.ts +2 -0
  12. package/lib/components/translation-management/index.d.ts.map +1 -0
  13. package/lib/components/widget-block/index.d.ts +2 -0
  14. package/lib/components/widget-block/index.d.ts.map +1 -0
  15. package/lib/components/widget-block/widget-block.component.d.ts +40 -0
  16. package/lib/components/widget-block/widget-block.component.d.ts.map +1 -0
  17. package/lib/components/widget-collection/index.d.ts +2 -0
  18. package/lib/components/widget-collection/index.d.ts.map +1 -0
  19. package/lib/components/widget-collection/widget-collection.component.d.ts +45 -0
  20. package/lib/components/widget-collection/widget-collection.component.d.ts.map +1 -0
  21. package/lib/components/widget-container/index.d.ts +2 -0
  22. package/lib/components/widget-container/index.d.ts.map +1 -0
  23. package/lib/components/widget-container/widget-container.component.d.ts +26 -0
  24. package/lib/components/widget-container/widget-container.component.d.ts.map +1 -0
  25. package/lib/components/widget-custom/index.d.ts +2 -0
  26. package/lib/components/widget-custom/index.d.ts.map +1 -0
  27. package/lib/components/widget-custom/widget-custom.component.d.ts +29 -0
  28. package/lib/components/widget-custom/widget-custom.component.d.ts.map +1 -0
  29. package/lib/components/widget-field/index.d.ts +2 -0
  30. package/lib/components/widget-field/index.d.ts.map +1 -0
  31. package/lib/components/widget-field/widget-field.component.d.ts +35 -0
  32. package/lib/components/widget-field/widget-field.component.d.ts.map +1 -0
  33. package/lib/components/widget-formio/index.d.ts +2 -0
  34. package/lib/components/widget-formio/index.d.ts.map +1 -0
  35. package/lib/components/widget-formio/widget-formio.component.d.ts +22 -0
  36. package/lib/components/widget-formio/widget-formio.component.d.ts.map +1 -0
  37. package/lib/components/widget-management/index.d.ts +5 -0
  38. package/lib/components/widget-management/index.d.ts.map +1 -0
  39. package/lib/components/widget-management/management/widget-management.component.d.ts +19 -0
  40. package/lib/components/widget-management/management/widget-management.component.d.ts.map +1 -0
  41. package/lib/components/widget-management/management-content/collection/widget-management-collection.component.d.ts +63 -0
  42. package/lib/components/widget-management/management-content/collection/widget-management-collection.component.d.ts.map +1 -0
  43. package/lib/components/widget-management/management-content/custom/widget-management-custom.component.d.ts +40 -0
  44. package/lib/components/widget-management/management-content/custom/widget-management-custom.component.d.ts.map +1 -0
  45. package/lib/components/widget-management/management-content/fields/column/widget-management-fields-column.component.d.ts +56 -0
  46. package/lib/components/widget-management/management-content/fields/column/widget-management-fields-column.component.d.ts.map +1 -0
  47. package/lib/components/widget-management/management-content/fields/widget-management-fields.component.d.ts +42 -0
  48. package/lib/components/widget-management/management-content/fields/widget-management-fields.component.d.ts.map +1 -0
  49. package/lib/components/widget-management/management-content/index.d.ts +5 -0
  50. package/lib/components/widget-management/management-content/index.d.ts.map +1 -0
  51. package/lib/components/widget-management/management-content/table/widget-management-table.component.d.ts +38 -0
  52. package/lib/components/widget-management/management-content/table/widget-management-table.component.d.ts.map +1 -0
  53. package/lib/components/widget-management/management-editor/widget-management-editor.component.d.ts +35 -0
  54. package/lib/components/widget-management/management-editor/widget-management-editor.component.d.ts.map +1 -0
  55. package/lib/components/widget-management/management-wizard/steps/index.d.ts +6 -0
  56. package/lib/components/widget-management/management-wizard/steps/index.d.ts.map +1 -0
  57. package/lib/components/widget-management/management-wizard/steps/widget-wizard-content-step/widget-wizard-content-step.component.d.ts +15 -0
  58. package/lib/components/widget-management/management-wizard/steps/widget-wizard-content-step/widget-wizard-content-step.component.d.ts.map +1 -0
  59. package/lib/components/widget-management/management-wizard/steps/widget-wizard-style-step/widget-wizard-style-step.component.d.ts +15 -0
  60. package/lib/components/widget-management/management-wizard/steps/widget-wizard-style-step/widget-wizard-style-step.component.d.ts.map +1 -0
  61. package/lib/components/widget-management/management-wizard/steps/widget-wizard-type-step/widget-wizard-type-step.component.d.ts +15 -0
  62. package/lib/components/widget-management/management-wizard/steps/widget-wizard-type-step/widget-wizard-type-step.component.d.ts.map +1 -0
  63. package/lib/components/widget-management/management-wizard/steps/widget-wizard-width-step/widget-wizard-width-step.component.d.ts +16 -0
  64. package/lib/components/widget-management/management-wizard/steps/widget-wizard-width-step/widget-wizard-width-step.component.d.ts.map +1 -0
  65. package/lib/components/widget-management/management-wizard/widget-management-wizard.component.d.ts +38 -0
  66. package/lib/components/widget-management/management-wizard/widget-management-wizard.component.d.ts.map +1 -0
  67. package/lib/components/widget-table/index.d.ts +2 -0
  68. package/lib/components/widget-table/index.d.ts.map +1 -0
  69. package/lib/components/widget-table/widget-table.component.d.ts +26 -0
  70. package/lib/components/widget-table/widget-table.component.d.ts.map +1 -0
  71. package/lib/constants/custom-widget-token.d.ts +5 -0
  72. package/lib/constants/custom-widget-token.d.ts.map +1 -0
  73. package/lib/constants/index.d.ts +4 -0
  74. package/lib/constants/index.d.ts.map +1 -0
  75. package/lib/constants/widget-management.constants.d.ts +5 -0
  76. package/lib/constants/widget-management.constants.d.ts.map +1 -0
  77. package/lib/constants/widget.constants.d.ts +6 -0
  78. package/lib/constants/widget.constants.d.ts.map +1 -0
  79. package/lib/interfaces/index.d.ts +3 -0
  80. package/lib/interfaces/index.d.ts.map +1 -0
  81. package/lib/interfaces/widget-content-component.interface.d.ts +5 -0
  82. package/lib/interfaces/widget-content-component.interface.d.ts.map +1 -0
  83. package/lib/interfaces/widget-management-service.interface.d.ts +13 -0
  84. package/lib/interfaces/widget-management-service.interface.d.ts.map +1 -0
  85. package/lib/models/index.d.ts +6 -0
  86. package/lib/models/index.d.ts.map +1 -0
  87. package/lib/models/widget-content.model.d.ts +52 -0
  88. package/lib/models/widget-content.model.d.ts.map +1 -0
  89. package/lib/models/widget-display.model.d.ts +62 -0
  90. package/lib/models/widget-display.model.d.ts.map +1 -0
  91. package/lib/models/widget-editor.model.d.ts +10 -0
  92. package/lib/models/widget-editor.model.d.ts.map +1 -0
  93. package/lib/models/widget-wizard.model.d.ts +38 -0
  94. package/lib/models/widget-wizard.model.d.ts.map +1 -0
  95. package/lib/models/widget.model.d.ts +107 -0
  96. package/lib/models/widget.model.d.ts.map +1 -0
  97. package/lib/services/index.d.ts +3 -0
  98. package/lib/services/index.d.ts.map +1 -1
  99. package/lib/services/widget-fields.service.d.ts +17 -0
  100. package/lib/services/widget-fields.service.d.ts.map +1 -0
  101. package/lib/services/widget-layout.service.d.ts +35 -0
  102. package/lib/services/widget-layout.service.d.ts.map +1 -0
  103. package/lib/services/widget-wizard.service.d.ts +20 -0
  104. package/lib/services/widget-wizard.service.d.ts.map +1 -0
  105. package/package.json +1 -1
  106. package/public_api.d.ts +4 -0
  107. package/public_api.d.ts.map +1 -1
@@ -1,20 +1,29 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Component, ViewChild, ViewContainerRef, NgModule, Inject } from '@angular/core';
3
- import * as i2 from '@angular/router';
4
- import { NavigationEnd, RouterModule } from '@angular/router';
5
- import { Subscription, BehaviorSubject, tap, switchMap, map, combineLatest, take } from 'rxjs';
6
- import { filter } from 'rxjs/operators';
7
- import * as i5 from 'carbon-components-angular';
8
- import { LoadingModule, ButtonModule, IconModule } from 'carbon-components-angular';
2
+ import { Injectable, InjectionToken, EventEmitter, computed, Output, Input, HostBinding, ViewEncapsulation, ChangeDetectionStrategy, Component, signal, ViewChild, Optional, Inject, ViewContainerRef, NgModule } from '@angular/core';
3
+ import { Subscription, debounceTime, map, BehaviorSubject, combineLatest, filter, tap, switchMap, take, of, startWith, delay, Subject } from 'rxjs';
9
4
  import * as i4 from '@angular/common';
10
5
  import { CommonModule, DOCUMENT } from '@angular/common';
11
- import * as i2$2 from '@valtimo/shared';
6
+ import * as i2 from '@angular/forms';
7
+ import { Validators, ReactiveFormsModule } from '@angular/forms';
8
+ import * as i2$1 from '@ngx-translate/core';
9
+ import { TranslateModule, TranslatePipe } from '@ngx-translate/core';
10
+ import * as i1 from '@valtimo/components';
11
+ import { ValuePathSelectorPrefix, InputLabelModule, ValuePathSelectorComponent, CARBON_THEME, CurrentCarbonTheme, ValuePathType, ViewType, CarbonListModule, EllipsisPipe, FormIoModule, CARBON_CONSTANTS, ConfirmationModalModule, JsonEditorComponent, MenuRoutingModule, TopbarModule, LeftSidebarModule, RightSidebarModule, PageHeaderModule, AlertModule, PromptModule, MultiInputFormModule, CarbonMultiInputModule, RenderInPageHeaderDirective } from '@valtimo/components';
12
+ import * as i3 from 'carbon-components-angular';
13
+ import { ButtonModule, DropdownModule, InputModule, IconModule, AccordionModule, CheckboxModule, TabsModule, Tab, ToggleModule, SelectModule, PaginationModel, PaginationModule, TilesModule, LoadingModule, ProgressIndicatorModule, ModalModule } from 'carbon-components-angular';
14
+ import { TrashCan16 } from '@carbon/icons';
15
+ import * as i2$2 from '@angular/router';
16
+ import { NavigationEnd, RouterModule } from '@angular/router';
17
+ import { filter as filter$1 } from 'rxjs/operators';
18
+ import * as i2$3 from '@valtimo/shared';
12
19
  import { GlobalNotificationComponent, ROLE_ADMIN } from '@valtimo/shared';
13
- import * as i2$1 from '@valtimo/components';
14
- import { MenuRoutingModule, TopbarModule, LeftSidebarModule, RightSidebarModule, PageHeaderModule, AlertModule, PromptModule, MultiInputFormModule, CarbonMultiInputModule, RenderInPageHeaderDirective, ConfirmationModalModule } from '@valtimo/components';
15
- import { isEqual } from 'lodash';
16
- import * as i1 from '@ngx-translate/core';
17
- import { TranslateModule } from '@ngx-translate/core';
20
+ import { isEqual, cloneDeep } from 'lodash';
21
+ import * as i1$1 from '@valtimo/form';
22
+ import * as i2$4 from '@valtimo/document';
23
+ import * as i3$1 from '@valtimo/access-control';
24
+ import { v4 } from 'uuid';
25
+ import Muuri from 'muuri';
26
+ import { toObservable } from '@angular/core/rxjs-interop';
18
27
  import { AuthGuardService } from '@valtimo/security';
19
28
 
20
29
  /*
@@ -42,10 +51,10 @@ class LayoutService {
42
51
  toggleFullscreen() {
43
52
  this.fullscreen = !this.fullscreen;
44
53
  }
45
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LayoutService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
46
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LayoutService, providedIn: 'root' }); }
54
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LayoutService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
55
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LayoutService, providedIn: 'root' }); }
47
56
  }
48
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LayoutService, decorators: [{
57
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LayoutService, decorators: [{
49
58
  type: Injectable,
50
59
  args: [{
51
60
  providedIn: 'root',
@@ -67,6 +76,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
67
76
  * See the License for the specific language governing permissions and
68
77
  * limitations under the License.
69
78
  */
79
+ const CUSTOM_WIDGET_TOKEN = new InjectionToken('Specify a component to display per configured custom widget component key.');
70
80
 
71
81
  /*
72
82
  * Copyright 2015-2025 Ritense BV, the Netherlands.
@@ -83,14 +93,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
83
93
  * See the License for the specific language governing permissions and
84
94
  * limitations under the License.
85
95
  */
86
- class LayoutPublicComponent {
87
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LayoutPublicComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
88
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: LayoutPublicComponent, isStandalone: false, selector: "valtimo-layout-public", ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"public-page-content\">\n <img src=\"assets/logo.svg\" class=\"logo\" />\n <router-outlet></router-outlet>\n</div>\n", styles: ["body{background-color:#eee}.public-page-content{background-color:#fff;margin:60px auto;border:1px solid #dee2e6;padding:0 30px 30px}.public-page-content .logo{width:25%;display:block;margin:30px auto}@media (min-width: 768px){.public-page-content{width:50%}}@media (max-width: 767px) and (min-width: 576px){.public-page-content{width:75%}}@media (max-width: 575px){.public-page-content{width:95%}.public-page-content .logo{width:50%}}\n/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "directive", type: i2.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] }); }
89
- }
90
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LayoutPublicComponent, decorators: [{
91
- type: Component,
92
- args: [{ selector: 'valtimo-layout-public', standalone: false, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"public-page-content\">\n <img src=\"assets/logo.svg\" class=\"logo\" />\n <router-outlet></router-outlet>\n</div>\n", styles: ["body{background-color:#eee}.public-page-content{background-color:#fff;margin:60px auto;border:1px solid #dee2e6;padding:0 30px 30px}.public-page-content .logo{width:25%;display:block;margin:30px auto}@media (min-width: 768px){.public-page-content{width:50%}}@media (max-width: 767px) and (min-width: 576px){.public-page-content{width:75%}}@media (max-width: 575px){.public-page-content{width:95%}.public-page-content .logo{width:50%}}\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"] }]
93
- }] });
94
96
 
95
97
  /*
96
98
  * Copyright 2015-2025 Ritense BV, the Netherlands.
@@ -107,37 +109,260 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
107
109
  * See the License for the specific language governing permissions and
108
110
  * limitations under the License.
109
111
  */
110
- class LayoutInternalComponent {
111
- constructor(layoutService, renderer, userInterfaceService, shellService) {
112
- this.layoutService = layoutService;
113
- this.renderer = renderer;
114
- this.userInterfaceService = userInterfaceService;
115
- this.shellService = shellService;
116
- this.showPageHeader$ = this.userInterfaceService.showPageHeader$;
117
- this.sideBarExpanded$ = this.shellService.sideBarExpanded$;
118
- this.collapsibleWidescreenMenu$ = this.shellService.collapsibleWidescreenMenu$;
119
- this.renderer.addClass(document.body, 'be-animate');
112
+ var WidgetDisplayTypeKey;
113
+ (function (WidgetDisplayTypeKey) {
114
+ WidgetDisplayTypeKey["TEXT"] = "text";
115
+ WidgetDisplayTypeKey["BOOLEAN"] = "boolean";
116
+ WidgetDisplayTypeKey["CURRENCY"] = "currency";
117
+ WidgetDisplayTypeKey["DATE"] = "date";
118
+ WidgetDisplayTypeKey["DATE_TIME"] = "datetime";
119
+ WidgetDisplayTypeKey["ENUM"] = "enum";
120
+ WidgetDisplayTypeKey["NUMBER"] = "number";
121
+ WidgetDisplayTypeKey["PERCENT"] = "percent";
122
+ WidgetDisplayTypeKey["LINK"] = "link";
123
+ })(WidgetDisplayTypeKey || (WidgetDisplayTypeKey = {}));
124
+
125
+ var WidgetType;
126
+ (function (WidgetType) {
127
+ WidgetType["FIELDS"] = "fields";
128
+ WidgetType["TABLE"] = "table";
129
+ WidgetType["CUSTOM"] = "custom";
130
+ WidgetType["COLLECTION"] = "collection";
131
+ WidgetType["FORMIO"] = "formio";
132
+ })(WidgetType || (WidgetType = {}));
133
+
134
+ /*
135
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
136
+ *
137
+ * Licensed under EUPL, Version 1.2 (the "License");
138
+ * you may not use this file except in compliance with the License.
139
+ * You may obtain a copy of the License at
140
+ *
141
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
142
+ *
143
+ * Unless required by applicable law or agreed to in writing, software
144
+ * distributed under the License is distributed on an "AS IS" basis,
145
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
146
+ * See the License for the specific language governing permissions and
147
+ * limitations under the License.
148
+ */
149
+ var WidgetManagementTab;
150
+ (function (WidgetManagementTab) {
151
+ WidgetManagementTab["VISUAL"] = "visual";
152
+ WidgetManagementTab["JSON"] = "json";
153
+ })(WidgetManagementTab || (WidgetManagementTab = {}));
154
+ const WidgetTypeTags = {
155
+ [WidgetType.COLLECTION]: 'teal',
156
+ [WidgetType.CUSTOM]: 'magenta',
157
+ [WidgetType.FIELDS]: 'blue',
158
+ [WidgetType.FORMIO]: 'green',
159
+ [WidgetType.TABLE]: 'purple',
160
+ };
161
+
162
+ /*
163
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
164
+ *
165
+ * Licensed under EUPL, Version 1.2 (the "License");
166
+ * you may not use this file except in compliance with the License.
167
+ * You may obtain a copy of the License at
168
+ *
169
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
170
+ *
171
+ * Unless required by applicable law or agreed to in writing, software
172
+ * distributed under the License is distributed on an "AS IS" basis,
173
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
174
+ * See the License for the specific language governing permissions and
175
+ * limitations under the License.
176
+ */
177
+ class WidgetManagementFieldsColumnComponent {
178
+ get formRows() {
179
+ if (!this.formGroup.get('rows'))
180
+ return undefined;
181
+ return this.formGroup.get('rows');
120
182
  }
121
- ngAfterViewInit() {
122
- App.init();
123
- this.shellService.setContentElement(this.mainContentRef.nativeElement);
124
- this._observer = new ResizeObserver(() => {
125
- this.shellService.onMainContentResize();
183
+ getDisplayItemsSelected(row) {
184
+ return this.widgetFieldsService.getDisplayItemsSelected(row);
185
+ }
186
+ constructor(cdsThemeService, cdr, fb, iconService, translateService, widgetFieldsService, widgetWizardService) {
187
+ this.cdsThemeService = cdsThemeService;
188
+ this.cdr = cdr;
189
+ this.fb = fb;
190
+ this.iconService = iconService;
191
+ this.translateService = translateService;
192
+ this.widgetFieldsService = widgetFieldsService;
193
+ this.widgetWizardService = widgetWizardService;
194
+ this.class = 'valtimo-widget-management-field-column';
195
+ this.addTranslateKey = 'widgetTabManagement.content.fields.add';
196
+ this.showHideWhenEmptyCheckbox = false;
197
+ this.columnUpdateEvent = new EventEmitter();
198
+ this.ValuePathSelectorPrefix = ValuePathSelectorPrefix;
199
+ this.formGroup = this.fb.group({
200
+ rows: this.fb.array([]),
126
201
  });
127
- this._observer.observe(this.mainContentRef.nativeElement);
202
+ this.displayTypeItems = this.widgetFieldsService.displayTypeItems;
203
+ this.WidgetDisplayTypeKey = WidgetDisplayTypeKey;
204
+ this.$widgetType = computed(() => this.widgetWizardService.$selectedWidget()?.type ?? WidgetType.FIELDS);
205
+ this.$isFieldWidget = computed(() => this.$widgetType() === WidgetType.FIELDS);
206
+ this.inputTheme$ = this.cdsThemeService.currentTheme$;
207
+ this._subscriptions = new Subscription();
208
+ this.iconService.register(TrashCan16);
209
+ }
210
+ ngOnInit() {
211
+ this.initForm();
212
+ this.openFormSubscription();
128
213
  }
129
214
  ngOnDestroy() {
130
- this._observer.disconnect();
215
+ this._subscriptions.unsubscribe();
216
+ this.formGroup.reset();
217
+ }
218
+ addField() {
219
+ if (!this.formRows)
220
+ return;
221
+ this.formRows.push(this.fb.group({
222
+ type: this.fb.control({ content: '', selected: false }, [
223
+ Validators.required,
224
+ this.typeSelectValidator,
225
+ ]),
226
+ title: this.fb.control('', Validators.required),
227
+ content: this.fb.control('', Validators.required),
228
+ ellipsisCharacterLimit: this.fb.control(null, Validators.pattern('[1-9][0-9]*')),
229
+ hideWhenEmpty: this.fb.control(false),
230
+ }));
231
+ }
232
+ onDeleteRowClick(event, formArray, index) {
233
+ event.stopImmediatePropagation();
234
+ if (!formArray)
235
+ return;
236
+ formArray.removeAt(index);
131
237
  }
132
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LayoutInternalComponent, deps: [{ token: LayoutService }, { token: i0.Renderer2 }, { token: i2$1.UserInterfaceService }, { token: i2$1.ShellService }], target: i0.ɵɵFactoryTarget.Component }); }
133
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: LayoutInternalComponent, isStandalone: false, selector: "valtimo-layout-internal", viewQueries: [{ propertyName: "mainContentRef", first: true, predicate: ["mainContent"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-topbar></valtimo-topbar>\n<main\n class=\"cds--content\"\n [ngClass]=\"{\n 'cds--content--sidebar':\n (sideBarExpanded$ | async) && (collapsibleWidescreenMenu$ | async) === false,\n }\"\n #mainContent\n>\n <valtimo-left-sidebar [hidden]=\"layoutService.isFullscreen\"></valtimo-left-sidebar>\n <valtimo-alert></valtimo-alert>\n <valtimo-page-header [hidden]=\"layoutService.isFullscreen\"></valtimo-page-header>\n <router-outlet></router-outlet>\n <valtimo-right-sidebar></valtimo-right-sidebar>\n <v-prompt></v-prompt>\n</main>\n", styles: ["::ng-deep .cds--content{padding-top:24px!important}@media screen and (max-width: 767px){.be-content{margin-left:0!important}}@media only screen and (min-width: 1056px){.cds--content--sidebar{padding-left:18rem}}\n/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "directive", type: i2.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: i2$1.TopbarComponent, selector: "valtimo-topbar" }, { kind: "component", type: i2$1.LeftSidebarComponent, selector: "valtimo-left-sidebar" }, { kind: "component", type: i2$1.RightSidebarComponent, selector: "valtimo-right-sidebar" }, { kind: "component", type: i2$1.PageHeaderComponent, selector: "valtimo-page-header" }, { kind: "component", type: i2$1.AlertComponent, selector: "valtimo-alert" }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2$1.PromptComponent, selector: "v-prompt", inputs: ["appearingDelayMs", "maxWidthPx"], outputs: ["closeEvent"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }] }); }
238
+ onTypeSelected(formRow, event) {
239
+ this.widgetFieldsService.onDisplayTypeSelected(['title', 'content', 'type', 'hideWhenEmpty'], formRow, event);
240
+ }
241
+ onAddEnumValueClick(valuesFormArray) {
242
+ valuesFormArray.push(this.fb.group({
243
+ key: this.fb.control('', Validators.required),
244
+ value: this.fb.control('', Validators.required),
245
+ }));
246
+ }
247
+ typeSelectValidator(control) {
248
+ const controlValue = control.value;
249
+ if (!controlValue || !controlValue.selected)
250
+ return { error: 'Type is not selected' };
251
+ return null;
252
+ }
253
+ getRowForm(row) {
254
+ return this.fb.group({
255
+ type: this.fb.control({
256
+ content: this.translateService.instant(this.translateService.instant(`widgetTabManagement.content.displayType.${row.displayProperties?.type ?? WidgetDisplayTypeKey.TEXT}`)),
257
+ id: row.displayProperties?.type ?? WidgetDisplayTypeKey.TEXT,
258
+ selected: true,
259
+ }, Validators.required),
260
+ title: this.fb.control(row.title, Validators.required),
261
+ content: this.fb.control(row.value, Validators.required),
262
+ ...((!row.displayProperties || row.displayProperties?.type === WidgetDisplayTypeKey.TEXT) && {
263
+ ellipsisCharacterLimit: this.fb.control(row.displayProperties?.ellipsisCharacterLimit ?? null, Validators.pattern('[1-9][0-9]*')),
264
+ }),
265
+ hideWhenEmpty: this.fb.control(row.displayProperties?.hideWhenEmpty ?? false),
266
+ ...([WidgetDisplayTypeKey.NUMBER, WidgetDisplayTypeKey.PERCENT].includes(row.displayProperties?.type) && {
267
+ digitsInfo: this.fb.control(row.displayProperties.digitsInfo ?? ''),
268
+ }),
269
+ ...(row.displayProperties?.type === WidgetDisplayTypeKey.CURRENCY && {
270
+ digitsInfo: this.fb.control(row.displayProperties.digitsInfo ?? ''),
271
+ currencyCode: this.fb.control(row.displayProperties.currencyCode ?? ''),
272
+ display: this.fb.control(row.displayProperties.display ?? ''),
273
+ }),
274
+ ...(row.displayProperties?.type === WidgetDisplayTypeKey.DATE && {
275
+ format: this.fb.control(row.displayProperties.format ?? ''),
276
+ }),
277
+ ...(row.displayProperties?.type === WidgetDisplayTypeKey.DATE_TIME && {
278
+ format: this.fb.control(row.displayProperties.format ?? ''),
279
+ }),
280
+ ...(row.displayProperties?.type === WidgetDisplayTypeKey.LINK && {
281
+ linkText: this.fb.control(row.displayProperties.linkText ?? ''),
282
+ }),
283
+ ...(row.displayProperties?.type === WidgetDisplayTypeKey.ENUM && {
284
+ values: this.fb.array(Object.entries(row.displayProperties.values).map(([key, value]) => this.fb.group({
285
+ key: this.fb.control(key, Validators.required),
286
+ value: this.fb.control(value, Validators.required),
287
+ }))),
288
+ }),
289
+ });
290
+ }
291
+ initForm() {
292
+ if (!this.columnData) {
293
+ this.addField();
294
+ return;
295
+ }
296
+ const rowsControl = this.formGroup.get('rows');
297
+ if (!rowsControl)
298
+ return;
299
+ this.columnData.forEach((row) => {
300
+ rowsControl.push(this.getRowForm(row), { emitEvent: false });
301
+ });
302
+ this.columnUpdateEvent.emit({ data: this.columnData, valid: true });
303
+ this.cdr.detectChanges();
304
+ }
305
+ openFormSubscription() {
306
+ this._subscriptions.add(this.formRows?.valueChanges.pipe(debounceTime(100)).subscribe((rows) => {
307
+ const mappedRows = rows.map((row) => ({
308
+ key: row.title.replace(/\W+/g, '-').replace(/\-$/, '').toLowerCase(),
309
+ title: row.title,
310
+ value: row.content,
311
+ ...(!!row?.type.id && {
312
+ displayProperties: {
313
+ type: row.type.id,
314
+ ...(!!row?.ellipsisCharacterLimit && {
315
+ ellipsisCharacterLimit: row.ellipsisCharacterLimit,
316
+ }),
317
+ ...(!!row?.hideWhenEmpty && { hideWhenEmpty: row.hideWhenEmpty }),
318
+ ...(!!row?.currencyCode && { currencyCode: row.currencyCode }),
319
+ ...(!!row?.display && { display: row.display }),
320
+ ...(!!row?.digitsInfo && { digitsInfo: row.digitsInfo }),
321
+ ...(!!row?.linkText && { linkText: row.linkText }),
322
+ ...(!!row?.format && { format: row.format }),
323
+ ...(!!row?.values && {
324
+ values: row.values?.reduce((acc, curr) => ({ ...acc, [curr.key]: curr.value }), {}),
325
+ }),
326
+ },
327
+ }),
328
+ }));
329
+ this.columnUpdateEvent.emit({ data: mappedRows, valid: this.formGroup.valid });
330
+ }));
331
+ }
332
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetManagementFieldsColumnComponent, deps: [{ token: i1.CdsThemeService }, { token: i0.ChangeDetectorRef }, { token: i2.FormBuilder }, { token: i3.IconService }, { token: i2$1.TranslateService }, { token: WidgetFieldsService }, { token: WidgetWizardService }], target: i0.ɵɵFactoryTarget.Component }); }
333
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: WidgetManagementFieldsColumnComponent, isStandalone: true, selector: "valtimo-widget-management-fields-column", inputs: { columnData: "columnData", addTranslateKey: "addTranslateKey", fieldWidthDropdown: "fieldWidthDropdown", selectedCollection: "selectedCollection", showHideWhenEmptyCheckbox: "showHideWhenEmptyCheckbox" }, outputs: { columnUpdateEvent: "columnUpdateEvent" }, host: { properties: { "class": "this.class" } }, 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<form\n *ngIf=\"inputTheme$ | async as inputTheme\"\n class=\"valtimo-widget-management-field-column\"\n [formGroup]=\"formGroup\"\n>\n <cds-accordion formArrayName=\"rows\" align=\"start\" size=\"sm\">\n @for (formRow of formRows.controls; track $index) {\n <cds-accordion-item\n [title]=\"fieldTitle\"\n [context]=\"{count: $count, index: $index, title: formRow.get('title')?.value}\"\n [expanded]=\"$index === 0\"\n class=\"valtimo-widget-management-field-column__item\"\n >\n <form [formGroup]=\"formRow\" class=\"valtimo-widget-management-field-column__container\">\n <div\n class=\"valtimo-widget-management-field-column__content\"\n [class.valtimo-widget-management-field-column__content--collection]=\"\n !!fieldWidthDropdown\n \"\n >\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.title' | translate\"\n [tooltip]=\"\n 'widgetTabManagement.content.' + $widgetType() + '.titleTooltip' | translate\n \"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"inputTheme\"\n [placeholder]=\"'widgetTabManagement.content.fields.titlePlaceholder' | translate\"\n type=\"text\"\n formControlName=\"title\"\n />\n </cds-text-label>\n\n <cds-dropdown\n [attr.data-carbon-theme]=\"inputTheme\"\n [label]=\"'widgetTabManagement.content.fields.type' | translate\"\n [dropUp]=\"false\"\n [placeholder]=\"'widgetTabManagement.content.fields.typePlaceholder' | translate\"\n (selected)=\"onTypeSelected(formRow, $event)\"\n formControlName=\"type\"\n >\n <cds-dropdown-list [items]=\"getDisplayItemsSelected(formRow)\"></cds-dropdown-list>\n </cds-dropdown>\n\n <ng-container\n *ngTemplateOutlet=\"fieldWidthDropdown; context: {index: $index}\"\n ></ng-container>\n\n <div class=\"valtimo-widget-management-field-column__path-selector\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.value' | translate\"\n [tooltip]=\"\n 'widgetTabManagement.content.' + $widgetType() + '.valueTooltip' | translate\n \"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"inputTheme\"\n [placeholder]=\"'widgetTabManagement.content.fields.value' | translate\"\n type=\"text\"\n formControlName=\"content\"\n />\n <!-- TODO: Implement when selector is up and parameterise -->\n <!-- <valtimo-value-path-selector\n formControlName=\"content\"\n [caseDefinitionKey]=\"params?.caseDefinitionKey\"\n [caseDefinitionVersionTag]=\"params?.caseDefinitionVersionTag\"\n [parentItem]=\"selectedCollection\"\n ></valtimo-value-path-selector> -->\n </div>\n </div>\n\n <div class=\"valtimo-widget-management-field-column__options\">\n @switch (formRow.get('type').value.id) {\n @case (WidgetDisplayTypeKey.CURRENCY) {\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.currencyCode' | translate\"\n [tooltip]=\"'widgetTabManagement.content.fields.currencyCodeTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"inputTheme\"\n [placeholder]=\"\n 'widgetTabManagement.content.fields.currencyCodePlaceholder' | translate\n \"\n type=\"text\"\n formControlName=\"currencyCode\"\n />\n </cds-text-label>\n\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.display' | translate\"\n [tooltip]=\"'widgetTabManagement.content.fields.displayTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"inputTheme\"\n [placeholder]=\"\n 'widgetTabManagement.content.fields.displayPlaceholder' | translate\n \"\n type=\"text\"\n formControlName=\"display\"\n />\n </cds-text-label>\n\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.digitsInfo' | translate\"\n tooltip=\"{{\n 'widgetTabManagement.content.fields.digitsInfoTooltip'\n | translate: {minFractionDigits: 2, maxFractionDigits: 2}\n }}\"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"inputTheme\"\n [placeholder]=\"\n 'widgetTabManagement.content.fields.digitsInfoPlaceholder' | translate\n \"\n type=\"text\"\n formControlName=\"digitsInfo\"\n />\n </cds-text-label>\n }\n @case (WidgetDisplayTypeKey.DATE) {\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.format' | translate\"\n [tooltip]=\"'widgetTabManagement.content.fields.dateFormatTooltip' | translate\"\n ></v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"inputTheme\"\n [placeholder]=\"\n 'widgetTabManagement.content.fields.formatPlaceholder' | translate\n \"\n type=\"text\"\n formControlName=\"format\"\n />\n </cds-text-label>\n }\n @case (WidgetDisplayTypeKey.DATE_TIME) {\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.format' | translate\"\n [tooltip]=\"\n 'widgetTabManagement.content.fields.dateTimeFormatTooltip' | translate\n \"\n ></v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"inputTheme\"\n [placeholder]=\"\n 'widgetTabManagement.content.fields.formatPlaceholder' | translate\n \"\n type=\"text\"\n formControlName=\"format\"\n />\n </cds-text-label>\n }\n @case (WidgetDisplayTypeKey.ENUM) {\n <div class=\"valtimo-widget-management-field-column__enum\" formArrayName=\"values\">\n @for (rowValue of formRow.get('values')?.controls; track $index) {\n <form\n [formGroup]=\"rowValue\"\n class=\"valtimo-widget-management-field-column__enum-form\"\n >\n <cds-text-label>\n <v-input-label\n *ngIf=\"$index === 0\"\n [title]=\"'widgetTabManagement.content.fields.enumValue' | translate\"\n [tooltip]=\"\n 'widgetTabManagement.content.fields.enumValueTooltip' | translate\n \"\n ></v-input-label>\n\n <input\n [attr.data-carbon-theme]=\"inputTheme\"\n cdsText\n [placeholder]=\"'widgetTabManagement.content.fields.enumValue' | translate\"\n type=\"text\"\n formControlName=\"key\"\n />\n </cds-text-label>\n\n <cds-text-label>\n <v-input-label\n *ngIf=\"$index === 0\"\n [title]=\"'widgetTabManagement.content.fields.enumDisplay' | translate\"\n [tooltip]=\"\n 'widgetTabManagement.content.fields.enumDisplayTooltip' | translate\n \"\n ></v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"inputTheme\"\n [placeholder]=\"\n 'widgetTabManagement.content.fields.enumDisplay' | translate\n \"\n type=\"text\"\n formControlName=\"value\"\n />\n </cds-text-label>\n\n <button\n cdsButton=\"danger--ghost\"\n [disabled]=\"$count === 1\"\n [iconOnly]=\"true\"\n class=\"valtimo-widget-management-field-column__delete-button enum\"\n (click)=\"onDeleteRowClick($event, formRow.get('values'), $index)\"\n >\n <svg cdsIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n </form>\n }\n\n <button\n cdsButton=\"primary\"\n size=\"sm\"\n (click)=\"onAddEnumValueClick(formRow.get('values'))\"\n >\n {{ 'widgetTabManagement.content.fields.addEnum' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n </div>\n }\n @case (WidgetDisplayTypeKey.NUMBER) {\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.digitsInfo' | translate\"\n tooltip=\"{{\n 'widgetTabManagement.content.fields.digitsInfoTooltip'\n | translate\n : {\n minFractionDigits: 0,\n maxFractionDigits: 3,\n }\n }}\"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"inputTheme\"\n [placeholder]=\"'widgetTabManagement.content.fields.digitsInfo' | translate\"\n type=\"text\"\n formControlName=\"digitsInfo\"\n />\n </cds-text-label>\n }\n @case (WidgetDisplayTypeKey.PERCENT) {\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.digitsInfo' | translate\"\n tooltip=\"{{\n 'widgetTabManagement.content.fields.digitsInfoTooltip'\n | translate\n : {\n minFractionDigits: 0,\n maxFractionDigits: 0,\n }\n }}\"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"inputTheme\"\n [placeholder]=\"'widgetTabManagement.content.fields.digitsInfo' | translate\"\n type=\"text\"\n formControlName=\"digitsInfo\"\n />\n </cds-text-label>\n }\n @case (WidgetDisplayTypeKey.LINK) {\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.linkText' | translate\"\n [tooltip]=\"'widgetTabManagement.content.fields.linkTextTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"inputTheme\"\n [placeholder]=\"\n 'widgetTabManagement.content.fields.linkTextPlaceholder' | translate\n \"\n type=\"text\"\n formControlName=\"linkText\"\n />\n </cds-text-label>\n }\n }\n\n <cds-text-label\n *ngIf=\"formRow.get('type').value.id === WidgetDisplayTypeKey.TEXT && $isFieldWidget()\"\n >\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.ellipsisCharacterLimit' | translate\"\n tooltip=\"{{\n 'widgetTabManagement.content.fields.ellipsisCharacterLimitTooltip' | translate\n }}\"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"inputTheme\"\n [placeholder]=\"\n 'widgetTabManagement.content.fields.ellipsisCharacterLimitPlaceholder' | translate\n \"\n type=\"text\"\n formControlName=\"ellipsisCharacterLimit\"\n />\n </cds-text-label>\n\n <cds-checkbox *ngIf=\"showHideWhenEmptyCheckbox\" formControlName=\"hideWhenEmpty\">\n {{ 'widgetTabManagement.content.hideWhenEmpty' | translate }}\n </cds-checkbox>\n </div>\n </form>\n </cds-accordion-item>\n }\n </cds-accordion>\n\n <button cdsButton=\"primary\" size=\"sm\" (click)=\"addField()\">\n {{ addTranslateKey | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</form>\n\n<ng-template #fieldTitle let-count=\"count\" let-index=\"index\" let-title=\"title\">\n <div class=\"valtimo-widget-management-field-column__title\">\n {{ title || ('widgetTabManagement.content.fields.titlePlaceholder' | translate) }}\n\n <button\n cdsButton=\"danger\"\n [disabled]=\"count === 1\"\n [iconOnly]=\"true\"\n (click)=\"onDeleteRowClick($event, formRows, index)\"\n class=\"valtimo-widget-management-field-column__delete-button\"\n >\n <svg cdsIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n </div>\n</ng-template>\n", styles: [".valtimo-widget-management-field-column{display:flex;flex-direction:column;gap:16px}.valtimo-widget-management-field-column__item,.valtimo-widget-management-field-column__cotainer{background:var(--cds-layer-01)}.valtimo-widget-management-field-column__item .cds--accordion__content{padding-inline-end:20px}.valtimo-widget-management-field-column__container{display:flex;flex-direction:column;gap:16px}.valtimo-widget-management-field-column__content{display:grid;grid-template-columns:1fr 180px 1fr;align-items:flex-end;gap:16px}.valtimo-widget-management-field-column__content--collection{grid-template-columns:1fr 180px 180px 1fr}.valtimo-widget-management-field-column__title{display:flex;justify-content:space-between;align-items:center;width:100%;padding:8px}.valtimo-widget-management-field-column__delete-button{display:flex;align-items:center;justify-content:center;padding:0;align-self:center}.valtimo-widget-management-field-column__delete-button.enum{align-self:flex-end}.valtimo-widget-management-field-column__path-selector{display:flex;flex-direction:column}.valtimo-widget-management-field-column__options{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.valtimo-widget-management-field-column__enum{display:flex;flex-direction:column;gap:16px}.valtimo-widget-management-field-column__enum-form{display:grid;grid-template-columns:1fr 1fr auto;align-items:flex-end;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: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i3.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: i3.DropdownList, selector: "cds-dropdown-list, ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }, { kind: "ngmodule", type: InputModule }, { kind: "component", type: i3.TextInputLabelComponent, selector: "cds-text-label, ibm-text-label", inputs: ["labelInputID", "disabled", "skeleton", "labelTemplate", "textInputTemplate", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel", "fluid"] }, { kind: "directive", type: i3.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i3.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "ngmodule", type: AccordionModule }, { kind: "component", type: i3.Accordion, selector: "cds-accordion, ibm-accordion", inputs: ["align", "size", "skeleton"] }, { kind: "component", type: i3.AccordionItem, selector: "cds-accordion-item, ibm-accordion-item", inputs: ["title", "context", "id", "skeleton", "expanded", "disabled"], outputs: ["selected"] }, { kind: "ngmodule", type: InputLabelModule }, { kind: "component", type: i1.InputLabelComponent, selector: "v-input-label", inputs: ["name", "tooltip", "tooltipTranslationKey", "largeMargin", "small", "noMargin", "title", "titleTranslationKey", "required", "disabled", "carbonTheme"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i3.Checkbox, selector: "cds-checkbox, ibm-checkbox", inputs: ["disabled", "skeleton", "hideLabel", "name", "id", "required", "value", "ariaLabel", "ariaLabelledby", "indeterminate", "checked"], outputs: ["click", "checkedChange", "indeterminateChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
134
334
  }
135
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LayoutInternalComponent, decorators: [{
335
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetManagementFieldsColumnComponent, decorators: [{
136
336
  type: Component,
137
- args: [{ selector: 'valtimo-layout-internal', standalone: false, 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-topbar></valtimo-topbar>\n<main\n class=\"cds--content\"\n [ngClass]=\"{\n 'cds--content--sidebar':\n (sideBarExpanded$ | async) && (collapsibleWidescreenMenu$ | async) === false,\n }\"\n #mainContent\n>\n <valtimo-left-sidebar [hidden]=\"layoutService.isFullscreen\"></valtimo-left-sidebar>\n <valtimo-alert></valtimo-alert>\n <valtimo-page-header [hidden]=\"layoutService.isFullscreen\"></valtimo-page-header>\n <router-outlet></router-outlet>\n <valtimo-right-sidebar></valtimo-right-sidebar>\n <v-prompt></v-prompt>\n</main>\n", styles: ["::ng-deep .cds--content{padding-top:24px!important}@media screen and (max-width: 767px){.be-content{margin-left:0!important}}@media only screen and (min-width: 1056px){.cds--content--sidebar{padding-left:18rem}}\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"] }]
138
- }], ctorParameters: () => [{ type: LayoutService }, { type: i0.Renderer2 }, { type: i2$1.UserInterfaceService }, { type: i2$1.ShellService }], propDecorators: { mainContentRef: [{
139
- type: ViewChild,
140
- args: ['mainContent']
337
+ args: [{ selector: 'valtimo-widget-management-fields-column', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [
338
+ CommonModule,
339
+ TranslateModule,
340
+ ButtonModule,
341
+ DropdownModule,
342
+ InputModule,
343
+ ReactiveFormsModule,
344
+ IconModule,
345
+ AccordionModule,
346
+ InputLabelModule,
347
+ ValuePathSelectorComponent,
348
+ CheckboxModule,
349
+ ], 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<form\n *ngIf=\"inputTheme$ | async as inputTheme\"\n class=\"valtimo-widget-management-field-column\"\n [formGroup]=\"formGroup\"\n>\n <cds-accordion formArrayName=\"rows\" align=\"start\" size=\"sm\">\n @for (formRow of formRows.controls; track $index) {\n <cds-accordion-item\n [title]=\"fieldTitle\"\n [context]=\"{count: $count, index: $index, title: formRow.get('title')?.value}\"\n [expanded]=\"$index === 0\"\n class=\"valtimo-widget-management-field-column__item\"\n >\n <form [formGroup]=\"formRow\" class=\"valtimo-widget-management-field-column__container\">\n <div\n class=\"valtimo-widget-management-field-column__content\"\n [class.valtimo-widget-management-field-column__content--collection]=\"\n !!fieldWidthDropdown\n \"\n >\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.title' | translate\"\n [tooltip]=\"\n 'widgetTabManagement.content.' + $widgetType() + '.titleTooltip' | translate\n \"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"inputTheme\"\n [placeholder]=\"'widgetTabManagement.content.fields.titlePlaceholder' | translate\"\n type=\"text\"\n formControlName=\"title\"\n />\n </cds-text-label>\n\n <cds-dropdown\n [attr.data-carbon-theme]=\"inputTheme\"\n [label]=\"'widgetTabManagement.content.fields.type' | translate\"\n [dropUp]=\"false\"\n [placeholder]=\"'widgetTabManagement.content.fields.typePlaceholder' | translate\"\n (selected)=\"onTypeSelected(formRow, $event)\"\n formControlName=\"type\"\n >\n <cds-dropdown-list [items]=\"getDisplayItemsSelected(formRow)\"></cds-dropdown-list>\n </cds-dropdown>\n\n <ng-container\n *ngTemplateOutlet=\"fieldWidthDropdown; context: {index: $index}\"\n ></ng-container>\n\n <div class=\"valtimo-widget-management-field-column__path-selector\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.value' | translate\"\n [tooltip]=\"\n 'widgetTabManagement.content.' + $widgetType() + '.valueTooltip' | translate\n \"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"inputTheme\"\n [placeholder]=\"'widgetTabManagement.content.fields.value' | translate\"\n type=\"text\"\n formControlName=\"content\"\n />\n <!-- TODO: Implement when selector is up and parameterise -->\n <!-- <valtimo-value-path-selector\n formControlName=\"content\"\n [caseDefinitionKey]=\"params?.caseDefinitionKey\"\n [caseDefinitionVersionTag]=\"params?.caseDefinitionVersionTag\"\n [parentItem]=\"selectedCollection\"\n ></valtimo-value-path-selector> -->\n </div>\n </div>\n\n <div class=\"valtimo-widget-management-field-column__options\">\n @switch (formRow.get('type').value.id) {\n @case (WidgetDisplayTypeKey.CURRENCY) {\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.currencyCode' | translate\"\n [tooltip]=\"'widgetTabManagement.content.fields.currencyCodeTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"inputTheme\"\n [placeholder]=\"\n 'widgetTabManagement.content.fields.currencyCodePlaceholder' | translate\n \"\n type=\"text\"\n formControlName=\"currencyCode\"\n />\n </cds-text-label>\n\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.display' | translate\"\n [tooltip]=\"'widgetTabManagement.content.fields.displayTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"inputTheme\"\n [placeholder]=\"\n 'widgetTabManagement.content.fields.displayPlaceholder' | translate\n \"\n type=\"text\"\n formControlName=\"display\"\n />\n </cds-text-label>\n\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.digitsInfo' | translate\"\n tooltip=\"{{\n 'widgetTabManagement.content.fields.digitsInfoTooltip'\n | translate: {minFractionDigits: 2, maxFractionDigits: 2}\n }}\"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"inputTheme\"\n [placeholder]=\"\n 'widgetTabManagement.content.fields.digitsInfoPlaceholder' | translate\n \"\n type=\"text\"\n formControlName=\"digitsInfo\"\n />\n </cds-text-label>\n }\n @case (WidgetDisplayTypeKey.DATE) {\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.format' | translate\"\n [tooltip]=\"'widgetTabManagement.content.fields.dateFormatTooltip' | translate\"\n ></v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"inputTheme\"\n [placeholder]=\"\n 'widgetTabManagement.content.fields.formatPlaceholder' | translate\n \"\n type=\"text\"\n formControlName=\"format\"\n />\n </cds-text-label>\n }\n @case (WidgetDisplayTypeKey.DATE_TIME) {\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.format' | translate\"\n [tooltip]=\"\n 'widgetTabManagement.content.fields.dateTimeFormatTooltip' | translate\n \"\n ></v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"inputTheme\"\n [placeholder]=\"\n 'widgetTabManagement.content.fields.formatPlaceholder' | translate\n \"\n type=\"text\"\n formControlName=\"format\"\n />\n </cds-text-label>\n }\n @case (WidgetDisplayTypeKey.ENUM) {\n <div class=\"valtimo-widget-management-field-column__enum\" formArrayName=\"values\">\n @for (rowValue of formRow.get('values')?.controls; track $index) {\n <form\n [formGroup]=\"rowValue\"\n class=\"valtimo-widget-management-field-column__enum-form\"\n >\n <cds-text-label>\n <v-input-label\n *ngIf=\"$index === 0\"\n [title]=\"'widgetTabManagement.content.fields.enumValue' | translate\"\n [tooltip]=\"\n 'widgetTabManagement.content.fields.enumValueTooltip' | translate\n \"\n ></v-input-label>\n\n <input\n [attr.data-carbon-theme]=\"inputTheme\"\n cdsText\n [placeholder]=\"'widgetTabManagement.content.fields.enumValue' | translate\"\n type=\"text\"\n formControlName=\"key\"\n />\n </cds-text-label>\n\n <cds-text-label>\n <v-input-label\n *ngIf=\"$index === 0\"\n [title]=\"'widgetTabManagement.content.fields.enumDisplay' | translate\"\n [tooltip]=\"\n 'widgetTabManagement.content.fields.enumDisplayTooltip' | translate\n \"\n ></v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"inputTheme\"\n [placeholder]=\"\n 'widgetTabManagement.content.fields.enumDisplay' | translate\n \"\n type=\"text\"\n formControlName=\"value\"\n />\n </cds-text-label>\n\n <button\n cdsButton=\"danger--ghost\"\n [disabled]=\"$count === 1\"\n [iconOnly]=\"true\"\n class=\"valtimo-widget-management-field-column__delete-button enum\"\n (click)=\"onDeleteRowClick($event, formRow.get('values'), $index)\"\n >\n <svg cdsIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n </form>\n }\n\n <button\n cdsButton=\"primary\"\n size=\"sm\"\n (click)=\"onAddEnumValueClick(formRow.get('values'))\"\n >\n {{ 'widgetTabManagement.content.fields.addEnum' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n </div>\n }\n @case (WidgetDisplayTypeKey.NUMBER) {\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.digitsInfo' | translate\"\n tooltip=\"{{\n 'widgetTabManagement.content.fields.digitsInfoTooltip'\n | translate\n : {\n minFractionDigits: 0,\n maxFractionDigits: 3,\n }\n }}\"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"inputTheme\"\n [placeholder]=\"'widgetTabManagement.content.fields.digitsInfo' | translate\"\n type=\"text\"\n formControlName=\"digitsInfo\"\n />\n </cds-text-label>\n }\n @case (WidgetDisplayTypeKey.PERCENT) {\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.digitsInfo' | translate\"\n tooltip=\"{{\n 'widgetTabManagement.content.fields.digitsInfoTooltip'\n | translate\n : {\n minFractionDigits: 0,\n maxFractionDigits: 0,\n }\n }}\"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"inputTheme\"\n [placeholder]=\"'widgetTabManagement.content.fields.digitsInfo' | translate\"\n type=\"text\"\n formControlName=\"digitsInfo\"\n />\n </cds-text-label>\n }\n @case (WidgetDisplayTypeKey.LINK) {\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.linkText' | translate\"\n [tooltip]=\"'widgetTabManagement.content.fields.linkTextTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"inputTheme\"\n [placeholder]=\"\n 'widgetTabManagement.content.fields.linkTextPlaceholder' | translate\n \"\n type=\"text\"\n formControlName=\"linkText\"\n />\n </cds-text-label>\n }\n }\n\n <cds-text-label\n *ngIf=\"formRow.get('type').value.id === WidgetDisplayTypeKey.TEXT && $isFieldWidget()\"\n >\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.ellipsisCharacterLimit' | translate\"\n tooltip=\"{{\n 'widgetTabManagement.content.fields.ellipsisCharacterLimitTooltip' | translate\n }}\"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"inputTheme\"\n [placeholder]=\"\n 'widgetTabManagement.content.fields.ellipsisCharacterLimitPlaceholder' | translate\n \"\n type=\"text\"\n formControlName=\"ellipsisCharacterLimit\"\n />\n </cds-text-label>\n\n <cds-checkbox *ngIf=\"showHideWhenEmptyCheckbox\" formControlName=\"hideWhenEmpty\">\n {{ 'widgetTabManagement.content.hideWhenEmpty' | translate }}\n </cds-checkbox>\n </div>\n </form>\n </cds-accordion-item>\n }\n </cds-accordion>\n\n <button cdsButton=\"primary\" size=\"sm\" (click)=\"addField()\">\n {{ addTranslateKey | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</form>\n\n<ng-template #fieldTitle let-count=\"count\" let-index=\"index\" let-title=\"title\">\n <div class=\"valtimo-widget-management-field-column__title\">\n {{ title || ('widgetTabManagement.content.fields.titlePlaceholder' | translate) }}\n\n <button\n cdsButton=\"danger\"\n [disabled]=\"count === 1\"\n [iconOnly]=\"true\"\n (click)=\"onDeleteRowClick($event, formRows, index)\"\n class=\"valtimo-widget-management-field-column__delete-button\"\n >\n <svg cdsIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n </div>\n</ng-template>\n", styles: [".valtimo-widget-management-field-column{display:flex;flex-direction:column;gap:16px}.valtimo-widget-management-field-column__item,.valtimo-widget-management-field-column__cotainer{background:var(--cds-layer-01)}.valtimo-widget-management-field-column__item .cds--accordion__content{padding-inline-end:20px}.valtimo-widget-management-field-column__container{display:flex;flex-direction:column;gap:16px}.valtimo-widget-management-field-column__content{display:grid;grid-template-columns:1fr 180px 1fr;align-items:flex-end;gap:16px}.valtimo-widget-management-field-column__content--collection{grid-template-columns:1fr 180px 180px 1fr}.valtimo-widget-management-field-column__title{display:flex;justify-content:space-between;align-items:center;width:100%;padding:8px}.valtimo-widget-management-field-column__delete-button{display:flex;align-items:center;justify-content:center;padding:0;align-self:center}.valtimo-widget-management-field-column__delete-button.enum{align-self:flex-end}.valtimo-widget-management-field-column__path-selector{display:flex;flex-direction:column}.valtimo-widget-management-field-column__options{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.valtimo-widget-management-field-column__enum{display:flex;flex-direction:column;gap:16px}.valtimo-widget-management-field-column__enum-form{display:grid;grid-template-columns:1fr 1fr auto;align-items:flex-end;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"] }]
350
+ }], ctorParameters: () => [{ type: i1.CdsThemeService }, { type: i0.ChangeDetectorRef }, { type: i2.FormBuilder }, { type: i3.IconService }, { type: i2$1.TranslateService }, { type: WidgetFieldsService }, { type: WidgetWizardService }], propDecorators: { class: [{
351
+ type: HostBinding,
352
+ args: ['class']
353
+ }], columnData: [{
354
+ type: Input,
355
+ args: [{ required: true }]
356
+ }], addTranslateKey: [{
357
+ type: Input
358
+ }], fieldWidthDropdown: [{
359
+ type: Input
360
+ }], selectedCollection: [{
361
+ type: Input
362
+ }], showHideWhenEmptyCheckbox: [{
363
+ type: Input
364
+ }], columnUpdateEvent: [{
365
+ type: Output
141
366
  }] } });
142
367
 
143
368
  /*
@@ -155,44 +380,119 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
155
380
  * See the License for the specific language governing permissions and
156
381
  * limitations under the License.
157
382
  */
158
- class LayoutComponent {
159
- constructor(placeHolderService, route, router) {
160
- this.placeHolderService = placeHolderService;
383
+ class WidgetManagementFieldsComponent {
384
+ constructor(cdsThemeService, fb, route, widgetWizardService) {
385
+ this.cdsThemeService = cdsThemeService;
386
+ this.fb = fb;
161
387
  this.route = route;
162
- this.router = router;
163
- this.layoutType = null;
164
- this._routerSub = new Subscription();
165
- this._DEFAULT_LAYOUT = 'internal';
388
+ this.widgetWizardService = widgetWizardService;
389
+ this.class = 'valtimo-widget-management-fields';
390
+ this.changeValidEvent = new EventEmitter();
391
+ this.form = this.fb.group({
392
+ widgetTitle: this.fb.control(this.widgetWizardService.$widgetTitle(), Validators.required),
393
+ });
394
+ this.$columns = signal([null]);
395
+ this.$widgetWidth = this.widgetWizardService.$widgetWidth();
396
+ this.selectedTabIndex = -1;
397
+ this.theme$ = this.cdsThemeService.currentTheme$.pipe(map((theme) => theme === CurrentCarbonTheme.G10 ? CARBON_THEME.WHITE : CARBON_THEME.G90));
398
+ this.$selectedWidgetContent = computed(() => this.widgetWizardService.$widgetContent()?.columns.reduce((acc, curr, index) => ({
399
+ ...acc,
400
+ [index]: curr,
401
+ }), {}));
402
+ this.activeTab = signal(0);
403
+ this._subscriptions = new Subscription();
404
+ this._contentValid = signal(false);
166
405
  }
167
406
  ngOnInit() {
168
- this.openRouterSubscription();
407
+ this._subscriptions.add(this.form.valueChanges.pipe(debounceTime(100)).subscribe(formValue => {
408
+ this.widgetWizardService.$widgetTitle.set(formValue.widgetTitle ?? '');
409
+ this.changeValidEvent.emit(this.form.valid && this._contentValid());
410
+ }));
411
+ const widgetContent = this.widgetWizardService.$widgetContent()
412
+ ?.columns;
413
+ if (!widgetContent)
414
+ return;
415
+ this.$columns.set(Object.keys(widgetContent).map(() => null));
169
416
  }
170
417
  ngAfterViewInit() {
171
- this.registerCarbonPlaceHolder();
418
+ this._tab.tabIndex = -1;
172
419
  }
173
420
  ngOnDestroy() {
174
- this._routerSub.unsubscribe();
421
+ this._subscriptions.unsubscribe();
422
+ this.changeValidEvent.emit(false);
423
+ this.form.reset();
424
+ this._contentValid.set(false);
175
425
  }
176
- registerCarbonPlaceHolder() {
177
- if (this._carbonPlaceHolder) {
178
- this.placeHolderService.registerViewContainerRef(this._carbonPlaceHolder);
179
- }
426
+ onAddColumnClick() {
427
+ this.$columns.update(value => [...value, null]);
428
+ this.activeTab.set(this.$columns().length - 1);
429
+ this.changeValidEvent.emit(false);
180
430
  }
181
- openRouterSubscription() {
182
- this._routerSub.add(this.router.events.pipe(filter(event => event instanceof NavigationEnd)).subscribe(() => {
183
- const layout = this.route.snapshot.firstChild.data.layout;
184
- this.layoutType = layout ? layout : this._DEFAULT_LAYOUT;
185
- }));
431
+ onTabSelected(index) {
432
+ this.activeTab.set(index);
433
+ }
434
+ onDeleteColumnClick(index) {
435
+ this.widgetWizardService.$widgetContent.update(content => {
436
+ if (!content)
437
+ return null;
438
+ const widgetContent = content;
439
+ let tempIndex = index;
440
+ let tempContent = { ...widgetContent };
441
+ while (tempIndex < this.$columns().length - 1) {
442
+ tempContent.columns[tempIndex] = tempContent.columns[tempIndex + 1];
443
+ tempIndex++;
444
+ }
445
+ tempContent.columns.splice(tempIndex, 1);
446
+ return tempContent;
447
+ });
448
+ this.$columns.update((columns) => {
449
+ const temp = columns;
450
+ temp.splice(index, 1);
451
+ return temp;
452
+ });
453
+ if (this.activeTab() !== index)
454
+ return;
455
+ this.activeTab.set(-1);
456
+ }
457
+ onColumnUpdateEvent(event, columnIndex) {
458
+ this.widgetWizardService.$widgetContent.update(content => {
459
+ if (!content)
460
+ return { columns: [event.data] };
461
+ const columns = content?.columns.map((column, index) => index === columnIndex ? event.data : column);
462
+ return {
463
+ columns: columnIndex > columns.length - 1 ? [...columns, event.data] : columns,
464
+ };
465
+ });
466
+ this._contentValid.set(event.valid);
467
+ this.changeValidEvent.emit(event.valid && this.form.valid);
186
468
  }
187
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LayoutComponent, deps: [{ token: i5.PlaceholderService }, { token: i2.ActivatedRoute }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Component }); }
188
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: LayoutComponent, isStandalone: false, selector: "valtimo-layout", viewQueries: [{ propertyName: "_carbonPlaceHolder", first: true, predicate: ["carbonPlaceHolder"], 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<div #carbonPlaceHolder class=\"carbon-placeholder\"></div>\n\n<valtimo-global-notification></valtimo-global-notification>\n<valtimo-layout-public *ngIf=\"layoutType === 'public'\"></valtimo-layout-public>\n<valtimo-layout-internal *ngIf=\"layoutType === 'internal'\"></valtimo-layout-internal>\n", dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$2.GlobalNotificationComponent, selector: "valtimo-global-notification" }, { kind: "component", type: LayoutPublicComponent, selector: "valtimo-layout-public" }, { kind: "component", type: LayoutInternalComponent, selector: "valtimo-layout-internal" }] }); }
469
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetManagementFieldsComponent, deps: [{ token: i1.CdsThemeService }, { token: i2.FormBuilder }, { token: i2$2.ActivatedRoute }, { token: WidgetWizardService }], target: i0.ɵɵFactoryTarget.Component }); }
470
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: WidgetManagementFieldsComponent, isStandalone: true, selector: "ng-component", outputs: { changeValidEvent: "changeValidEvent" }, host: { properties: { "class": "this.class" } }, viewQueries: [{ propertyName: "_tab", first: true, predicate: Tab, descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<p>{{ 'widgetTabManagement.content.description' | translate }}</p>\n\n<form [formGroup]=\"form\">\n <cds-text-label\n [attr.data-carbon-theme]=\"theme$ | async\"\n class=\"valtimo-widget-management-fields__input\"\n >\n <v-input-label\n [title]=\"'widgetTabManagement.content.widgetTitle' | translate\"\n [tooltip]=\"'widgetTabManagement.content.widgetTitleTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n formControlName=\"widgetTitle\"\n cdsText\n [placeholder]=\"'widgetTabManagement.content.widgetTitlePlaceholder' | translate\"\n type=\"text\"\n />\n </cds-text-label>\n</form>\n\n<!-- For projecting elements such as process selector in case widgets -->\n<ng-content></ng-content>\n\n<cds-tabs type=\"contained\">\n @for (column of $columns(); track $index) {\n <cds-tab\n [active]=\"activeTab() === $index\"\n [heading]=\"columnHeading\"\n [context]=\"{index: $index, count: $count}\"\n (selected)=\"onTabSelected($index)\"\n >\n <valtimo-widget-management-fields-column\n *ngIf=\"activeTab() === $index\"\n [isFieldWidget]=\"true\"\n [columnData]=\"$selectedWidgetContent()?.[$index]\"\n [showHideWhenEmptyCheckbox]=\"true\"\n (columnUpdateEvent)=\"onColumnUpdateEvent($event, $index)\"\n ></valtimo-widget-management-fields-column>\n </cds-tab>\n }\n\n <cds-tab\n *ngIf=\"$columns().length < $widgetWidth\"\n [heading]=\"addColumn\"\n [id]=\"'addColumn'\"\n class=\"valtimo-widget-management-fields__add\"\n ></cds-tab>\n</cds-tabs>\n\n<ng-template #addColumn>\n <button\n cdsButton=\"ghost\"\n [iconOnly]=\"true\"\n (click)=\"$event.stopImmediatePropagation(); onAddColumnClick()\"\n >\n <svg cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #columnHeading let-data>\n <div class=\"valtimo-widget-management-fields__heading\">\n {{ 'widgetTabManagement.content.column' | translate: {number: data.index + 1} }}\n\n <button\n cdsButton=\"ghost\"\n [disabled]=\"data.count === 1\"\n [iconOnly]=\"true\"\n size=\"sm\"\n (click)=\"onDeleteColumnClick(data.index)\"\n >\n <svg cdsIcon=\"close\" size=\"16\"></svg>\n </button>\n </div>\n</ng-template>\n", styles: [".cds--tab-content{padding:0!important}.valtimo-widget-management-fields{display:flex;flex-direction:column;gap:16px}.valtimo-widget-management-fields__input{max-width:288px}.valtimo-widget-management-fields__heading{display:flex;align-items:center}.valtimo-widget-management-fields #addColumn-header{padding:0!important}.valtimo-widget-management-fields .cds--tabs__nav-item{padding-right:0!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: TranslateModule }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: InputModule }, { kind: "component", type: i3.TextInputLabelComponent, selector: "cds-text-label, ibm-text-label", inputs: ["labelInputID", "disabled", "skeleton", "labelTemplate", "textInputTemplate", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel", "fluid"] }, { kind: "directive", type: i3.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "ngmodule", type: TabsModule }, { kind: "component", type: i3.Tabs, selector: "cds-tabs, ibm-tabs", inputs: ["position", "cacheActive", "followFocus", "isNavigation", "ariaLabel", "ariaLabelledby", "type", "theme", "skeleton"] }, { kind: "component", type: i3.Tab, selector: "cds-tab, ibm-tab", inputs: ["heading", "title", "context", "active", "disabled", "tabIndex", "id", "cacheActive", "tabContent", "templateContext"], outputs: ["selected"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i3.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "component", type: WidgetManagementFieldsColumnComponent, selector: "valtimo-widget-management-fields-column", inputs: ["columnData", "addTranslateKey", "fieldWidthDropdown", "selectedCollection", "showHideWhenEmptyCheckbox"], outputs: ["columnUpdateEvent"] }, { kind: "ngmodule", type:
471
+ // CaseManagementWidgetProcessSelectorComponent,
472
+ InputLabelModule }, { kind: "component", type: i1.InputLabelComponent, selector: "v-input-label", inputs: ["name", "tooltip", "tooltipTranslationKey", "largeMargin", "small", "noMargin", "title", "titleTranslationKey", "required", "disabled", "carbonTheme"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
189
473
  }
190
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LayoutComponent, decorators: [{
474
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetManagementFieldsComponent, decorators: [{
191
475
  type: Component,
192
- args: [{ selector: 'valtimo-layout', standalone: false, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div #carbonPlaceHolder class=\"carbon-placeholder\"></div>\n\n<valtimo-global-notification></valtimo-global-notification>\n<valtimo-layout-public *ngIf=\"layoutType === 'public'\"></valtimo-layout-public>\n<valtimo-layout-internal *ngIf=\"layoutType === 'internal'\"></valtimo-layout-internal>\n" }]
193
- }], ctorParameters: () => [{ type: i5.PlaceholderService }, { type: i2.ActivatedRoute }, { type: i2.Router }], propDecorators: { _carbonPlaceHolder: [{
476
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [
477
+ CommonModule,
478
+ TranslateModule,
479
+ InputModule,
480
+ TabsModule,
481
+ IconModule,
482
+ ReactiveFormsModule,
483
+ ButtonModule,
484
+ WidgetManagementFieldsColumnComponent,
485
+ // CaseManagementWidgetProcessSelectorComponent,
486
+ InputLabelModule,
487
+ ], 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<p>{{ 'widgetTabManagement.content.description' | translate }}</p>\n\n<form [formGroup]=\"form\">\n <cds-text-label\n [attr.data-carbon-theme]=\"theme$ | async\"\n class=\"valtimo-widget-management-fields__input\"\n >\n <v-input-label\n [title]=\"'widgetTabManagement.content.widgetTitle' | translate\"\n [tooltip]=\"'widgetTabManagement.content.widgetTitleTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n formControlName=\"widgetTitle\"\n cdsText\n [placeholder]=\"'widgetTabManagement.content.widgetTitlePlaceholder' | translate\"\n type=\"text\"\n />\n </cds-text-label>\n</form>\n\n<!-- For projecting elements such as process selector in case widgets -->\n<ng-content></ng-content>\n\n<cds-tabs type=\"contained\">\n @for (column of $columns(); track $index) {\n <cds-tab\n [active]=\"activeTab() === $index\"\n [heading]=\"columnHeading\"\n [context]=\"{index: $index, count: $count}\"\n (selected)=\"onTabSelected($index)\"\n >\n <valtimo-widget-management-fields-column\n *ngIf=\"activeTab() === $index\"\n [isFieldWidget]=\"true\"\n [columnData]=\"$selectedWidgetContent()?.[$index]\"\n [showHideWhenEmptyCheckbox]=\"true\"\n (columnUpdateEvent)=\"onColumnUpdateEvent($event, $index)\"\n ></valtimo-widget-management-fields-column>\n </cds-tab>\n }\n\n <cds-tab\n *ngIf=\"$columns().length < $widgetWidth\"\n [heading]=\"addColumn\"\n [id]=\"'addColumn'\"\n class=\"valtimo-widget-management-fields__add\"\n ></cds-tab>\n</cds-tabs>\n\n<ng-template #addColumn>\n <button\n cdsButton=\"ghost\"\n [iconOnly]=\"true\"\n (click)=\"$event.stopImmediatePropagation(); onAddColumnClick()\"\n >\n <svg cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #columnHeading let-data>\n <div class=\"valtimo-widget-management-fields__heading\">\n {{ 'widgetTabManagement.content.column' | translate: {number: data.index + 1} }}\n\n <button\n cdsButton=\"ghost\"\n [disabled]=\"data.count === 1\"\n [iconOnly]=\"true\"\n size=\"sm\"\n (click)=\"onDeleteColumnClick(data.index)\"\n >\n <svg cdsIcon=\"close\" size=\"16\"></svg>\n </button>\n </div>\n</ng-template>\n", styles: [".cds--tab-content{padding:0!important}.valtimo-widget-management-fields{display:flex;flex-direction:column;gap:16px}.valtimo-widget-management-fields__input{max-width:288px}.valtimo-widget-management-fields__heading{display:flex;align-items:center}.valtimo-widget-management-fields #addColumn-header{padding:0!important}.valtimo-widget-management-fields .cds--tabs__nav-item{padding-right:0!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"] }]
488
+ }], ctorParameters: () => [{ type: i1.CdsThemeService }, { type: i2.FormBuilder }, { type: i2$2.ActivatedRoute }, { type: WidgetWizardService }], propDecorators: { class: [{
489
+ type: HostBinding,
490
+ args: ['class']
491
+ }], changeValidEvent: [{
492
+ type: Output
493
+ }], _tab: [{
194
494
  type: ViewChild,
195
- args: ['carbonPlaceHolder', { static: true, read: ViewContainerRef }]
495
+ args: [Tab]
196
496
  }] } });
197
497
 
198
498
  /*
@@ -210,48 +510,79 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
210
510
  * See the License for the specific language governing permissions and
211
511
  * limitations under the License.
212
512
  */
213
- class LayoutModule {
214
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
215
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: LayoutModule, declarations: [LayoutComponent, LayoutPublicComponent, LayoutInternalComponent], imports: [RouterModule,
216
- MenuRoutingModule,
217
- TopbarModule,
218
- LeftSidebarModule,
219
- RightSidebarModule,
220
- PageHeaderModule,
221
- AlertModule,
222
- CommonModule,
223
- PromptModule,
224
- GlobalNotificationComponent], exports: [LayoutComponent] }); }
225
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LayoutModule, imports: [RouterModule,
226
- MenuRoutingModule,
227
- TopbarModule,
228
- LeftSidebarModule,
229
- RightSidebarModule,
230
- PageHeaderModule,
231
- AlertModule,
232
- CommonModule,
233
- PromptModule,
234
- GlobalNotificationComponent] }); }
513
+ class WidgetManagementTableComponent {
514
+ constructor(cdsThemeService, fb, widgetWizardService, route) {
515
+ this.cdsThemeService = cdsThemeService;
516
+ this.fb = fb;
517
+ this.widgetWizardService = widgetWizardService;
518
+ this.route = route;
519
+ this.class = 'valtimo-widget-management-table';
520
+ this.changeValidEvent = new EventEmitter();
521
+ this.form = this.fb.group({
522
+ title: this.fb.control(this.widgetWizardService.$widgetTitle() ?? '', Validators.required),
523
+ collection: this.fb.control(this.widgetWizardService.$widgetContent()?.collection ?? '', Validators.required),
524
+ defaultPageSize: this.fb.control(this.widgetWizardService.$widgetContent()?.defaultPageSize ?? 5, Validators.required),
525
+ });
526
+ this.theme$ = this.cdsThemeService.currentTheme$.pipe(map((currentTheme) => currentTheme === CurrentCarbonTheme.G10 ? CARBON_THEME.WHITE : CARBON_THEME.G90));
527
+ this.$content = this.widgetWizardService
528
+ .$widgetContent;
529
+ this.$checked = computed(() => this.widgetWizardService.$widgetContent()?.firstColumnAsTitle || false);
530
+ this.selectedCollection$ = new BehaviorSubject(null);
531
+ this.ValuePathSelectorPrefix = ValuePathSelectorPrefix;
532
+ this.ValuePathType = ValuePathType;
533
+ this._contentValid = signal(this.widgetWizardService.$editMode());
534
+ this._subscriptions = new Subscription();
535
+ }
536
+ ngOnInit() {
537
+ this._subscriptions.add(this.form.valueChanges.pipe(debounceTime(500)).subscribe(value => {
538
+ this.widgetWizardService.$widgetTitle.set(value?.title ?? '');
539
+ this.widgetWizardService.$widgetContent.update((content) => ({
540
+ ...content,
541
+ collection: value?.collection || '',
542
+ defaultPageSize: value?.defaultPageSize || 5,
543
+ }));
544
+ this.changeValidEvent.emit(this.form.valid && this._contentValid());
545
+ }));
546
+ }
547
+ ngOnDestroy() {
548
+ this._contentValid.set(false);
549
+ this._subscriptions.unsubscribe();
550
+ this.changeValidEvent.emit(false);
551
+ this.form.reset();
552
+ }
553
+ onColumnUpdateEvent(event) {
554
+ const { data, valid } = event;
555
+ this.widgetWizardService.$widgetContent.update((content) => ({ ...content, columns: data }));
556
+ this._contentValid.set(valid);
557
+ this.changeValidEvent.emit(valid && this.form.valid);
558
+ }
559
+ onCheckedChange(firstColumnAsTitle) {
560
+ this.widgetWizardService.$widgetContent.update((content) => ({ ...content, firstColumnAsTitle }));
561
+ }
562
+ onCollectionSelected(item) {
563
+ this.selectedCollection$.next(item);
564
+ }
565
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetManagementTableComponent, deps: [{ token: i1.CdsThemeService }, { token: i2.FormBuilder }, { token: WidgetWizardService }, { token: i2$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
566
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: WidgetManagementTableComponent, isStandalone: true, selector: "ng-component", outputs: { changeValidEvent: "changeValidEvent" }, host: { properties: { "class": "this.class" } }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<form\n *ngIf=\"theme$ | async as theme\"\n [formGroup]=\"form\"\n class=\"valtimo-widget-management-table__form\"\n>\n <cds-text-label [attr.data-carbon-theme]=\"theme\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.widgetTitle' | translate\"\n [tooltip]=\"'widgetTabManagement.content.widgetTitleTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n formControlName=\"title\"\n cdsText\n [placeholder]=\"'widgetTabManagement.content.widgetTitlePlaceholder' | translate\"\n type=\"text\"\n />\n </cds-text-label>\n\n <cds-text-label [attr.data-carbon-theme]=\"theme\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.table.defaultPageSize' | translate\"\n [tooltip]=\"'widgetTabManagement.content.table.defaultPageSizeTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n formControlName=\"defaultPageSize\"\n cdsText\n [placeholder]=\"'widgetTabManagement.content.table.defaultPageSizePlaceholder' | translate\"\n type=\"text\"\n />\n </cds-text-label>\n\n <div class=\"valtimo-widget-management-table__path-selector\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.table.collection' | translate\"\n [tooltip]=\"'widgetTabManagement.content.table.collectionTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n formControlName=\"collection\"\n cdsText\n [attr.data-carbon-theme]=\"theme\"\n [placeholder]=\"'widgetTabManagement.content.table.collection' | translate\"\n type=\"text\"\n />\n\n <!-- TODO: Implement to work for case as well -->\n\n <!-- <valtimo-value-path-selector\n formControlName=\"collection\"\n [attr.data-carbon-theme]=\"obs.theme\"\n [caseDefinitionKey]=\"obs.params?.caseDefinitionKey\"\n [caseDefinitionVersionTag]=\"obs.params?.caseDefinitionVersionTag\"\n [type]=\"ValuePathType.COLLECTION\"\n (collectionSelected)=\"onCollectionSelected($event)\"\n ></valtimo-value-path-selector> -->\n </div>\n</form>\n\n<!-- For projecting elements such as process selector in case widgets -->\n<ng-content></ng-content>\n\n<span class=\"valtimo-widget-management-table__subtitle\">\n {{ 'widgetTabManagement.content.table.columns' | translate }}\n</span>\n\n<valtimo-widget-management-fields-column\n [addTranslateKey]=\"'widgetTabManagement.content.table.addColumn'\"\n [columnData]=\"$content()?.columns\"\n (columnUpdateEvent)=\"onColumnUpdateEvent($event)\"\n></valtimo-widget-management-fields-column>\n<!-- TODO: Implement to work for case as well -->\n<!-- [selectedCollection]=\"selectedCollection$ | async\" -->\n\n<section class=\"valtimo-widget-management-table__toggle\">\n <span class=\"valtimo-widget-management-table__subtitle\">\n {{ 'widgetTabManagement.content.table.options' | translate }}\n </span>\n\n <cds-toggle\n [checked]=\"$checked()\"\n [label]=\"'widgetTabManagement.content.table.firstColumnAsTitle' | translate\"\n [onText]=\"'interface.yes' | translate\"\n [offText]=\"'interface.no' | translate\"\n (checkedChange)=\"onCheckedChange($event)\"\n ></cds-toggle>\n</section>\n", styles: [".valtimo-widget-management-table{display:flex;flex-direction:column;gap:24px}.valtimo-widget-management-table__form{display:grid;gap:16px;grid-template-columns:repeat(3,1fr);align-items:flex-end}.valtimo-widget-management-table__subtitle{font-size:16px;font-weight:600;line-height:22px}.valtimo-widget-management-table__toggle{display:flex;flex-direction:column;gap:8px}.valtimo-widget-management-table__path-selector{display:flex;flex-direction:column}\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: i2$1.TranslatePipe, name: "translate" }, { kind: "component", type: WidgetManagementFieldsColumnComponent, selector: "valtimo-widget-management-fields-column", inputs: ["columnData", "addTranslateKey", "fieldWidthDropdown", "selectedCollection", "showHideWhenEmptyCheckbox"], outputs: ["columnUpdateEvent"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: InputModule }, { kind: "component", type: i3.TextInputLabelComponent, selector: "cds-text-label, ibm-text-label", inputs: ["labelInputID", "disabled", "skeleton", "labelTemplate", "textInputTemplate", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel", "fluid"] }, { kind: "directive", type: i3.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "ngmodule", type: ToggleModule }, { kind: "component", type: i3.Toggle, selector: "cds-toggle, ibm-toggle", inputs: ["offText", "onText", "label", "size", "hideLabel", "ariaLabel", "skeleton"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: InputLabelModule }, { kind: "component", type: i1.InputLabelComponent, selector: "v-input-label", inputs: ["name", "tooltip", "tooltipTranslationKey", "largeMargin", "small", "noMargin", "title", "titleTranslationKey", "required", "disabled", "carbonTheme"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
235
567
  }
236
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LayoutModule, decorators: [{
237
- type: NgModule,
238
- args: [{
239
- declarations: [LayoutComponent, LayoutPublicComponent, LayoutInternalComponent],
240
- imports: [
241
- RouterModule,
242
- MenuRoutingModule,
243
- TopbarModule,
244
- LeftSidebarModule,
245
- RightSidebarModule,
246
- PageHeaderModule,
247
- AlertModule,
568
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetManagementTableComponent, decorators: [{
569
+ type: Component,
570
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, encapsulation: ViewEncapsulation.None, imports: [
248
571
  CommonModule,
249
- PromptModule,
250
- GlobalNotificationComponent,
251
- ],
252
- exports: [LayoutComponent],
253
- }]
254
- }] });
572
+ TranslateModule,
573
+ WidgetManagementFieldsColumnComponent,
574
+ ReactiveFormsModule,
575
+ InputModule,
576
+ ToggleModule,
577
+ ButtonModule,
578
+ InputLabelModule,
579
+ ], template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<form\n *ngIf=\"theme$ | async as theme\"\n [formGroup]=\"form\"\n class=\"valtimo-widget-management-table__form\"\n>\n <cds-text-label [attr.data-carbon-theme]=\"theme\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.widgetTitle' | translate\"\n [tooltip]=\"'widgetTabManagement.content.widgetTitleTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n formControlName=\"title\"\n cdsText\n [placeholder]=\"'widgetTabManagement.content.widgetTitlePlaceholder' | translate\"\n type=\"text\"\n />\n </cds-text-label>\n\n <cds-text-label [attr.data-carbon-theme]=\"theme\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.table.defaultPageSize' | translate\"\n [tooltip]=\"'widgetTabManagement.content.table.defaultPageSizeTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n formControlName=\"defaultPageSize\"\n cdsText\n [placeholder]=\"'widgetTabManagement.content.table.defaultPageSizePlaceholder' | translate\"\n type=\"text\"\n />\n </cds-text-label>\n\n <div class=\"valtimo-widget-management-table__path-selector\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.table.collection' | translate\"\n [tooltip]=\"'widgetTabManagement.content.table.collectionTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n formControlName=\"collection\"\n cdsText\n [attr.data-carbon-theme]=\"theme\"\n [placeholder]=\"'widgetTabManagement.content.table.collection' | translate\"\n type=\"text\"\n />\n\n <!-- TODO: Implement to work for case as well -->\n\n <!-- <valtimo-value-path-selector\n formControlName=\"collection\"\n [attr.data-carbon-theme]=\"obs.theme\"\n [caseDefinitionKey]=\"obs.params?.caseDefinitionKey\"\n [caseDefinitionVersionTag]=\"obs.params?.caseDefinitionVersionTag\"\n [type]=\"ValuePathType.COLLECTION\"\n (collectionSelected)=\"onCollectionSelected($event)\"\n ></valtimo-value-path-selector> -->\n </div>\n</form>\n\n<!-- For projecting elements such as process selector in case widgets -->\n<ng-content></ng-content>\n\n<span class=\"valtimo-widget-management-table__subtitle\">\n {{ 'widgetTabManagement.content.table.columns' | translate }}\n</span>\n\n<valtimo-widget-management-fields-column\n [addTranslateKey]=\"'widgetTabManagement.content.table.addColumn'\"\n [columnData]=\"$content()?.columns\"\n (columnUpdateEvent)=\"onColumnUpdateEvent($event)\"\n></valtimo-widget-management-fields-column>\n<!-- TODO: Implement to work for case as well -->\n<!-- [selectedCollection]=\"selectedCollection$ | async\" -->\n\n<section class=\"valtimo-widget-management-table__toggle\">\n <span class=\"valtimo-widget-management-table__subtitle\">\n {{ 'widgetTabManagement.content.table.options' | translate }}\n </span>\n\n <cds-toggle\n [checked]=\"$checked()\"\n [label]=\"'widgetTabManagement.content.table.firstColumnAsTitle' | translate\"\n [onText]=\"'interface.yes' | translate\"\n [offText]=\"'interface.no' | translate\"\n (checkedChange)=\"onCheckedChange($event)\"\n ></cds-toggle>\n</section>\n", styles: [".valtimo-widget-management-table{display:flex;flex-direction:column;gap:24px}.valtimo-widget-management-table__form{display:grid;gap:16px;grid-template-columns:repeat(3,1fr);align-items:flex-end}.valtimo-widget-management-table__subtitle{font-size:16px;font-weight:600;line-height:22px}.valtimo-widget-management-table__toggle{display:flex;flex-direction:column;gap:8px}.valtimo-widget-management-table__path-selector{display:flex;flex-direction:column}\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"] }]
580
+ }], ctorParameters: () => [{ type: i1.CdsThemeService }, { type: i2.FormBuilder }, { type: WidgetWizardService }, { type: i2$2.ActivatedRoute }], propDecorators: { class: [{
581
+ type: HostBinding,
582
+ args: ['class']
583
+ }], changeValidEvent: [{
584
+ type: Output
585
+ }] } });
255
586
 
256
587
  /*
257
588
  * Copyright 2015-2025 Ritense BV, the Netherlands.
@@ -268,165 +599,2655 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
268
599
  * See the License for the specific language governing permissions and
269
600
  * limitations under the License.
270
601
  */
271
- class TranslationManagementComponent {
272
- constructor(translateService, localizationService, pageHeaderService, document) {
602
+ class WidgetManagementCollectionComponent {
603
+ constructor(cdsThemeService, fb, translateService, widgetFieldsService, route, widgetWizardService) {
604
+ this.cdsThemeService = cdsThemeService;
605
+ this.fb = fb;
273
606
  this.translateService = translateService;
274
- this.localizationService = localizationService;
275
- this.pageHeaderService = pageHeaderService;
276
- this.document = document;
277
- this.loading$ = new BehaviorSubject(true);
278
- this.allChangedValuesValid$ = new BehaviorSubject(false);
279
- this.disabled$ = new BehaviorSubject(false);
280
- this._languageOptions$ = new BehaviorSubject(undefined);
281
- this._refreshLocalizations$ = new BehaviorSubject(null);
282
- this._localizationTranslations$ = this._refreshLocalizations$.pipe(tap(() => this.loading$.next(true)), switchMap(() => this.localizationService.getMergedLocalizations()), tap(() => this.loading$.next(false)));
283
- this._defaultValues = [];
284
- this._changedValues$ = new BehaviorSubject(undefined);
285
- this.showConfirmationModal$ = new BehaviorSubject(false);
286
- this.valuesChanged$ = this._changedValues$.pipe(map(changedValues => !isEqual(changedValues, this._defaultValues)));
287
- this.localizationTranslationValues$ = combineLatest([
288
- this._languageOptions$,
289
- this._localizationTranslations$,
290
- this.translateService.stream('key'),
291
- ]).pipe(map(([languageOptions, localizationTranslations]) => this.mapMergedLocalizationsToMultiInput(languageOptions, localizationTranslations)), tap(defaultValues => {
292
- this._defaultValues = defaultValues;
293
- }));
294
- this.multiInputTiles$ = combineLatest([
295
- this._languageOptions$,
296
- this.translateService.stream('key'),
297
- ]).pipe(map(([languageOptions]) => {
298
- const objToReturn = {};
299
- objToReturn[0] = this.translateService.instant('listColumn.key');
300
- languageOptions.forEach((languageOption, index) => {
301
- objToReturn[index + 1] = this.translateService.instant(`settings.language.options.${languageOption}`);
302
- });
303
- return objToReturn;
304
- }));
305
- this.amountOfArbitraryValues$ = this.multiInputTiles$.pipe(map(multiInputTitles => Object.keys(multiInputTitles).length));
306
- this.compactMode$ = this.pageHeaderService.compactMode$;
607
+ this.widgetFieldsService = widgetFieldsService;
608
+ this.route = route;
609
+ this.widgetWizardService = widgetWizardService;
610
+ this.class = 'valtimo-widget-management-collection';
611
+ this.changeValidEvent = new EventEmitter();
612
+ this.widgetForm = this.fb.group({
613
+ title: this.fb.control(this.widgetWizardService.$widgetTitle() ?? '', Validators.required),
614
+ defaultPageSize: this.fb.control(this.widgetWizardService.$widgetContent()?.defaultPageSize ?? 5, Validators.required),
615
+ collection: this.fb.control(this.widgetWizardService.$widgetContent()?.collection ?? '', Validators.required),
616
+ });
617
+ this.cardForm = this.fb.group({
618
+ value: this.fb.control(this.widgetWizardService.$widgetContent()?.title?.value ?? '', Validators.required),
619
+ type: this.fb.control({
620
+ content: this.translateService.instant(this.translateService.instant(`widgetTabManagement.content.displayType.${this.widgetWizardService.$widgetContent()?.title?.displayProperties?.type ?? WidgetDisplayTypeKey.TEXT}`)),
621
+ id: this.widgetWizardService.$widgetContent()?.title
622
+ ?.displayProperties?.type ?? WidgetDisplayTypeKey.TEXT,
623
+ selected: true,
624
+ }, Validators.required),
625
+ });
626
+ this.theme$ = this.cdsThemeService.currentTheme$.pipe(map((theme) => theme === CurrentCarbonTheme.G10 ? CARBON_THEME.WHITE : CARBON_THEME.G90));
627
+ this.ValuePathSelectorPrefix = ValuePathSelectorPrefix;
628
+ this.ValuePathType = ValuePathType;
629
+ this.WidgetDisplayTypeKey = WidgetDisplayTypeKey;
630
+ this.$content = this.widgetWizardService
631
+ .$widgetContent;
632
+ this.displayTypeItems = this.widgetFieldsService.displayTypeItems;
633
+ this.selectedCollection$ = new BehaviorSubject(null);
634
+ this.WIDTH_ITEMS = [
635
+ {
636
+ content: this.translateService.instant('widgetTabManagement.width.fullWidth'),
637
+ id: 'full',
638
+ selected: true,
639
+ },
640
+ {
641
+ content: this.translateService.instant('widgetTabManagement.width.half'),
642
+ id: 'half',
643
+ selected: false,
644
+ },
645
+ ];
646
+ this._subscriptions = new Subscription();
647
+ this._$contentValid = signal(false);
307
648
  }
308
649
  ngOnInit() {
309
- this.setLanguages();
650
+ this.openWidgetFormSubscription();
651
+ this.openCardFormSubscription();
652
+ this.initForm();
310
653
  }
311
- validChange(valid) {
312
- this.allChangedValuesValid$.next(valid);
654
+ ngOnDestroy() {
655
+ this._subscriptions.unsubscribe();
313
656
  }
314
- valueChange(value) {
315
- this._changedValues$.next(value);
657
+ onAddEnumValueClick(valuesFormArray) {
658
+ valuesFormArray.push(this.fb.group({
659
+ key: this.fb.control('', Validators.required),
660
+ value: this.fb.control('', Validators.required),
661
+ }));
316
662
  }
317
- saveAndRefresh() {
318
- this.saveChanges(true);
663
+ getDisplayItemsSelected(control) {
664
+ return this.widgetFieldsService.getDisplayItemsSelected(control);
319
665
  }
320
- saveAndStay() {
321
- this.saveChanges();
666
+ getSelectedWidthItem(fieldIndex) {
667
+ const widgetContent = this.widgetWizardService.$widgetContent();
668
+ return !widgetContent
669
+ ? this.WIDTH_ITEMS
670
+ : this.WIDTH_ITEMS.map((item) => ({
671
+ ...item,
672
+ selected: widgetContent.fields?.[fieldIndex]?.width === item.id,
673
+ }));
322
674
  }
323
- cancel() {
324
- this.hideModal();
675
+ onColumnUpdateEvent(event) {
676
+ const { data, valid } = event;
677
+ this.widgetWizardService.$widgetContent.update((content) => {
678
+ const existingFields = content?.fields;
679
+ return {
680
+ ...content,
681
+ fields: data.map((item, index) => ({
682
+ ...item,
683
+ width: existingFields?.[index]?.width ?? 'full',
684
+ })),
685
+ };
686
+ });
687
+ this._$contentValid.set(valid);
688
+ this.changeValidEvent.emit(valid && this.widgetForm.valid);
325
689
  }
326
- showModal() {
327
- this.showConfirmationModal$.next(true);
690
+ onDeleteRowClick(formArray, index) {
691
+ if (!formArray)
692
+ return;
693
+ formArray.removeAt(index);
328
694
  }
329
- saveChanges(reload = false) {
330
- this.disable();
331
- combineLatest([this._changedValues$, this._languageOptions$])
332
- .pipe(take(1), map(([changedValues, languageOptions]) => this.getLocalizationsForUpdateRequest(changedValues, languageOptions)), switchMap(updatedLocalizations => this.localizationService.updateLocalizations(updatedLocalizations)))
333
- .subscribe(() => {
334
- if (reload) {
335
- this.document?.defaultView?.location?.reload();
336
- }
337
- else {
338
- this._refreshLocalizations$.next(null);
339
- this.enable();
340
- }
341
- });
695
+ onTypeSelected(formGroup, event) {
696
+ this.widgetFieldsService.onDisplayTypeSelected(['value', 'type'], formGroup, event);
342
697
  }
343
- setLanguages() {
344
- this._languageOptions$.next(this.translateService.langs);
698
+ onWidthSelected(event, fieldIndex) {
699
+ this.widgetWizardService.$widgetContent.update((content) => ({
700
+ ...content,
701
+ fields: content?.fields.map((field, index) => index === fieldIndex ? { ...field, width: event.item.id } : field),
702
+ }));
345
703
  }
346
- disable() {
347
- this.disabled$.next(true);
704
+ onCollectionSelected(item) {
705
+ this.selectedCollection$.next(item);
348
706
  }
349
- enable() {
350
- this.disabled$.next(false);
707
+ initForm() {
708
+ if (!this.widgetWizardService.$widgetContent())
709
+ return;
710
+ const title = this.widgetWizardService.$widgetContent().title;
711
+ if (!title)
712
+ return;
713
+ this.onTypeSelected(this.cardForm, {
714
+ item: { id: title.displayProperties?.type ?? '', content: '', selected: true },
715
+ });
716
+ this.cardForm.patchValue({
717
+ ...([
718
+ WidgetDisplayTypeKey.NUMBER,
719
+ WidgetDisplayTypeKey.PERCENT,
720
+ WidgetDisplayTypeKey.CURRENCY,
721
+ ].includes(title.displayProperties?.type) && {
722
+ digitsInfo: title.displayProperties.digitsInfo,
723
+ }),
724
+ ...(title.displayProperties?.type === WidgetDisplayTypeKey.CURRENCY && {
725
+ currencyCode: title.displayProperties.currencyCode,
726
+ display: title.displayProperties.display,
727
+ }),
728
+ ...(title.displayProperties?.type === WidgetDisplayTypeKey.DATE && {
729
+ format: title.displayProperties.format,
730
+ }),
731
+ ...(title.displayProperties?.type === WidgetDisplayTypeKey.DATE_TIME && {
732
+ format: title.displayProperties.format,
733
+ }),
734
+ ...(title.displayProperties?.type === WidgetDisplayTypeKey.ENUM && {
735
+ values: Object.entries(title.displayProperties.values).map(([key, value]) => ({ key, value })),
736
+ }),
737
+ }, { emitEvent: false });
351
738
  }
352
- hideModal() {
353
- this.showConfirmationModal$.next(false);
739
+ openWidgetFormSubscription() {
740
+ this._subscriptions.add(this.widgetForm.valueChanges.pipe(debounceTime(500)).subscribe(value => {
741
+ this.widgetWizardService.$widgetTitle.set(value?.title ?? '');
742
+ this.widgetWizardService.$widgetContent.update((content) => ({
743
+ ...content,
744
+ collection: value?.collection || '',
745
+ defaultPageSize: value?.defaultPageSize || 5,
746
+ }));
747
+ this.changeValidEvent.emit(this.widgetForm.valid && this.cardForm.valid && this._$contentValid());
748
+ }));
354
749
  }
355
- flattenObject(ob) {
356
- const toReturn = {};
357
- for (const i in ob) {
358
- if (!ob.hasOwnProperty(i))
359
- continue;
360
- if (typeof ob[i] == 'object' && ob[i] !== null) {
361
- const flatObject = this.flattenObject(ob[i]);
362
- for (const x in flatObject) {
363
- if (!flatObject.hasOwnProperty(x))
364
- continue;
365
- toReturn[i + '.' + x] = flatObject[x];
366
- }
367
- }
750
+ openCardFormSubscription() {
751
+ this._subscriptions.add(this.cardForm.valueChanges.pipe(debounceTime(500)).subscribe(formValue => {
752
+ let { value, ...displayProperties } = formValue;
753
+ displayProperties = {
754
+ ...displayProperties,
755
+ ...(!!displayProperties.type && {
756
+ type: displayProperties.type.id,
757
+ }),
758
+ ...(!!formValue.values && {
759
+ values: formValue.values?.reduce((acc, curr) => ({ ...acc, [curr.key]: curr.value }), {}),
760
+ }),
761
+ };
762
+ this.widgetWizardService.$widgetContent.update((content) => ({
763
+ ...content,
764
+ title: {
765
+ value,
766
+ ...(displayProperties.type !== WidgetDisplayTypeKey.TEXT && {
767
+ displayProperties,
768
+ }),
769
+ },
770
+ }));
771
+ this.changeValidEvent.emit(this.widgetForm.valid && this.cardForm.valid && this._$contentValid());
772
+ }));
773
+ }
774
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetManagementCollectionComponent, deps: [{ token: i1.CdsThemeService }, { token: i2.FormBuilder }, { token: i2$1.TranslateService }, { token: WidgetFieldsService }, { token: i2$2.ActivatedRoute }, { token: WidgetWizardService }], target: i0.ɵɵFactoryTarget.Component }); }
775
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: WidgetManagementCollectionComponent, isStandalone: true, selector: "ng-component", outputs: { changeValidEvent: "changeValidEvent" }, host: { properties: { "class": "this.class" } }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngIf=\"theme$ | async as theme\">\n <form [formGroup]=\"widgetForm\" class=\"valtimo-widget-management-collection__form\">\n <cds-text-label [attr.data-carbon-theme]=\"theme\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.widgetTitle' | translate\"\n [tooltip]=\"'widgetTabManagement.content.widgetTitleTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n formControlName=\"title\"\n cdsText\n [placeholder]=\"'widgetTabManagement.content.widgetTitlePlaceholder' | translate\"\n type=\"text\"\n />\n </cds-text-label>\n\n <cds-text-label [attr.data-carbon-theme]=\"theme\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.collection.defaultPageSize' | translate\"\n [tooltip]=\"'widgetTabManagement.content.collection.defaultPageSizeTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n formControlName=\"defaultPageSize\"\n cdsText\n [placeholder]=\"\n 'widgetTabManagement.content.collection.defaultPageSizePlaceholder' | translate\n \"\n type=\"text\"\n />\n </cds-text-label>\n\n <div class=\"valtimo-widget-management-collection__path-selector\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.collection.collection' | translate\"\n [tooltip]=\"'widgetTabManagement.content.collection.collectionTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n formControlName=\"collection\"\n cdsText\n [attr.data-carbon-theme]=\"theme\"\n [placeholder]=\"'widgetTabManagement.content.collection.collection' | translate\"\n type=\"text\"\n />\n <!-- <valtimo-value-path-selector\n formControlName=\"collection\"\n [attr.data-carbon-theme]=\"theme\"\n [caseDefinitionKey]=\"obs.params?.caseDefinitionKey\"\n [caseDefinitionVersionTag]=\"obs.params?.caseDefinitionVersionTag\"\n [type]=\"ValuePathType.COLLECTION\"\n (collectionSelected)=\"onCollectionSelected($event)\"\n ></valtimo-value-path-selector> -->\n </div>\n </form>\n\n <!-- For injecting things such as process-selector in case widgets -->\n <ng-content></ng-content>\n\n <!-- <valtimo-case-management-widget-process-selector\n [params]=\"params$ | async\"\n ></valtimo-case-management-widget-process-selector> -->\n\n <span class=\"valtimo-widget-management-collection__subtitle\">\n {{ 'widgetTabManagement.content.collection.cardTitle' | translate }}\n </span>\n\n <form [formGroup]=\"cardForm\" class=\"valtimo-widget-management-collection__card\">\n <section class=\"valtimo-widget-management-collection__card-title\">\n <div class=\"valtimo-widget-management-collection__path-selector\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.value' | translate\"\n [tooltip]=\"'widgetTabManagement.content.collection.valueTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n formControlName=\"value\"\n cdsText\n [attr.data-carbon-theme]=\"theme\"\n [placeholder]=\"'widgetTabManagement.content.fields.value' | translate\"\n type=\"text\"\n />\n <!-- <valtimo-value-path-selector\n formControlName=\"value\"\n [attr.data-carbon-theme]=\"theme\"\n [caseDefinitionKey]=\"obs.params?.caseDefinitionKey\"\n [caseDefinitionVersionTag]=\"obs.params?.caseDefinitionVersionTag\"\n [parentItem]=\"selectedCollection$ | async\"\n ></valtimo-value-path-selector> -->\n </div>\n\n <cds-dropdown\n [attr.data-carbon-theme]=\"theme\"\n [label]=\"'widgetTabManagement.content.fields.type' | translate\"\n [dropUp]=\"false\"\n [placeholder]=\"'widgetTabManagement.content.fields.typePlaceholder' | translate\"\n (selected)=\"onTypeSelected(cardForm, $event)\"\n formControlName=\"type\"\n >\n <cds-dropdown-list [items]=\"getDisplayItemsSelected(cardForm)\"></cds-dropdown-list>\n </cds-dropdown>\n </section>\n\n <section class=\"valtimo-widget-management-collection__card-options\">\n @switch (cardForm.get('type').value.id) {\n @case (WidgetDisplayTypeKey.CURRENCY) {\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.currencyCode' | translate\"\n [tooltip]=\"'widgetTabManagement.content.fields.currencyCodeTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"theme\"\n [placeholder]=\"\n 'widgetTabManagement.content.fields.currencyCodePlaceholder' | translate\n \"\n type=\"text\"\n formControlName=\"currencyCode\"\n />\n </cds-text-label>\n\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.display' | translate\"\n [tooltip]=\"'widgetTabManagement.content.fields.displayTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"theme\"\n [placeholder]=\"'widgetTabManagement.content.fields.displayPlaceholder' | translate\"\n type=\"text\"\n formControlName=\"display\"\n />\n </cds-text-label>\n\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.digitsInfo' | translate\"\n tooltip=\"{{\n 'widgetTabManagement.content.fields.digitsInfoTooltip'\n | translate: {minFractionDigits: 2, maxFractionDigits: 2}\n }}\"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"theme\"\n [placeholder]=\"'widgetTabManagement.content.fields.digitsInfoPlaceholder' | translate\"\n type=\"text\"\n formControlName=\"digitsInfo\"\n />\n </cds-text-label>\n }\n @case (WidgetDisplayTypeKey.DATE) {\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.format' | translate\"\n [tooltip]=\"'widgetTabManagement.content.fields.dateFormatTooltip' | translate\"\n ></v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"theme\"\n [placeholder]=\"'widgetTabManagement.content.fields.formatPlaceholder' | translate\"\n type=\"text\"\n formControlName=\"format\"\n />\n </cds-text-label>\n }\n @case (WidgetDisplayTypeKey.DATE_TIME) {\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.format' | translate\"\n [tooltip]=\"'widgetTabManagement.content.fields.dateTimeFormatTooltip' | translate\"\n ></v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"theme\"\n [placeholder]=\"'widgetTabManagement.content.fields.formatPlaceholder' | translate\"\n type=\"text\"\n formControlName=\"format\"\n />\n </cds-text-label>\n }\n @case (WidgetDisplayTypeKey.ENUM) {\n <div class=\"valtimo-widget-management-collection__enum\" formArrayName=\"values\">\n @for (rowValue of cardForm.get('values')?.controls; track $index) {\n <form [formGroup]=\"rowValue\" class=\"valtimo-widget-management-collection__enum-form\">\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.enumValue' | translate\"\n [tooltip]=\"'widgetTabManagement.content.fields.enumValueTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n [attr.data-carbon-theme]=\"theme\"\n cdsText\n [placeholder]=\"'widgetTabManagement.content.enumValue' | translate\"\n type=\"text\"\n formControlName=\"key\"\n />\n </cds-text-label>\n\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.enumDisplay' | translate\"\n [tooltip]=\"'widgetTabManagement.content.fields.enumDisplayTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"theme\"\n [placeholder]=\"'widgetTabManagement.content.fields.enumDisplay' | translate\"\n type=\"text\"\n formControlName=\"value\"\n />\n </cds-text-label>\n\n <button\n cdsButton=\"danger--ghost\"\n [disabled]=\"$count === 1\"\n [iconOnly]=\"true\"\n class=\"valtimo-case-management-widget-field-column__delete-button enum\"\n (click)=\"onDeleteRowClick(cardForm.get('values'), $index)\"\n >\n <svg cdsIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n </form>\n }\n\n <button\n cdsButton=\"primary\"\n size=\"sm\"\n (click)=\"onAddEnumValueClick(cardForm.get('values'))\"\n >\n {{ 'widgetTabManagement.content.fields.addEnum' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n </div>\n }\n @case (WidgetDisplayTypeKey.NUMBER) {\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.digitsInfo' | translate\"\n tooltip=\"{{\n 'widgetTabManagement.content.fields.digitsInfoTooltip'\n | translate\n : {\n minFractionDigits: 0,\n maxFractionDigits: 3,\n }\n }}\"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"theme\"\n [placeholder]=\"'widgetTabManagement.content.fields.digitsInfo' | translate\"\n type=\"text\"\n formControlName=\"digitsInfo\"\n />\n </cds-text-label>\n }\n @case (WidgetDisplayTypeKey.PERCENT) {\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.digitsInfo' | translate\"\n tooltip=\"{{\n 'widgetTabManagement.content.fields.digitsInfoTooltip'\n | translate\n : {\n minFractionDigits: 0,\n maxFractionDigits: 0,\n }\n }}\"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"theme\"\n [placeholder]=\"'widgetTabManagement.content.fields.digitsInfo' | translate\"\n type=\"text\"\n formControlName=\"digitsInfo\"\n />\n </cds-text-label>\n }\n }\n </section>\n </form>\n\n <span class=\"valtimo-widget-management-collection__subtitle\">\n {{ 'widgetTabManagement.content.collection.cardFields' | translate }}\n </span>\n\n <valtimo-widget-management-fields-column\n [columnData]=\"$content()?.fields\"\n [fieldWidthDropdown]=\"fieldWidthDropdown\"\n [showHideWhenEmptyCheckbox]=\"true\"\n (columnUpdateEvent)=\"onColumnUpdateEvent($event)\"\n >\n <!-- [params]=\"params$ | async\"\n [selectedCollection]=\"selectedCollection$ | async\" -->\n </valtimo-widget-management-fields-column>\n\n <ng-template #fieldWidthDropdown let-index=\"index\">\n <cds-dropdown\n [label]=\"'widgetTabManagement.content.collection.fieldWidth' | translate\"\n [dropUp]=\"false\"\n [placeholder]=\"'widgetTabManagement.content.collection.fieldWidthPlaceholder' | translate\"\n (selected)=\"onWidthSelected($event, index)\"\n >\n <cds-dropdown-list [items]=\"getSelectedWidthItem(index)\"></cds-dropdown-list>\n </cds-dropdown>\n </ng-template>\n</ng-container>\n", styles: [".valtimo-widget-management-collection{display:flex;flex-direction:column;gap:24px}.valtimo-widget-management-collection__form{display:grid;gap:16px;grid-template-columns:repeat(3,1fr);align-items:flex-end}.valtimo-widget-management-collection__subtitle{font-size:16px;font-weight:600;line-height:22px}.valtimo-widget-management-collection__path-selector{display:flex;flex-direction:column}.valtimo-widget-management-collection__card{flex-direction:column;display:flex;gap:16px}.valtimo-widget-management-collection__card-title{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;align-items:flex-end}.valtimo-widget-management-collection__card-options{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.valtimo-widget-management-collection__enum{display:flex;flex-direction:column;gap:16px}.valtimo-widget-management-collection__enum-form{display:grid;grid-template-columns:1fr 1fr auto;align-items:flex-end;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: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }, { kind: "component", type: WidgetManagementFieldsColumnComponent, selector: "valtimo-widget-management-fields-column", inputs: ["columnData", "addTranslateKey", "fieldWidthDropdown", "selectedCollection", "showHideWhenEmptyCheckbox"], outputs: ["columnUpdateEvent"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "ngmodule", type: InputModule }, { kind: "component", type: i3.TextInputLabelComponent, selector: "cds-text-label, ibm-text-label", inputs: ["labelInputID", "disabled", "skeleton", "labelTemplate", "textInputTemplate", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel", "fluid"] }, { kind: "directive", type: i3.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i3.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: i3.DropdownList, selector: "cds-dropdown-list, ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i3.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "ngmodule", type: InputLabelModule }, { kind: "component", type: i1.InputLabelComponent, selector: "v-input-label", inputs: ["name", "tooltip", "tooltipTranslationKey", "largeMargin", "small", "noMargin", "title", "titleTranslationKey", "required", "disabled", "carbonTheme"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
776
+ }
777
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetManagementCollectionComponent, decorators: [{
778
+ type: Component,
779
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [
780
+ CommonModule,
781
+ TranslateModule,
782
+ WidgetManagementFieldsColumnComponent,
783
+ ReactiveFormsModule,
784
+ InputModule,
785
+ DropdownModule,
786
+ ButtonModule,
787
+ IconModule,
788
+ InputLabelModule,
789
+ ValuePathSelectorComponent,
790
+ ], template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngIf=\"theme$ | async as theme\">\n <form [formGroup]=\"widgetForm\" class=\"valtimo-widget-management-collection__form\">\n <cds-text-label [attr.data-carbon-theme]=\"theme\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.widgetTitle' | translate\"\n [tooltip]=\"'widgetTabManagement.content.widgetTitleTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n formControlName=\"title\"\n cdsText\n [placeholder]=\"'widgetTabManagement.content.widgetTitlePlaceholder' | translate\"\n type=\"text\"\n />\n </cds-text-label>\n\n <cds-text-label [attr.data-carbon-theme]=\"theme\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.collection.defaultPageSize' | translate\"\n [tooltip]=\"'widgetTabManagement.content.collection.defaultPageSizeTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n formControlName=\"defaultPageSize\"\n cdsText\n [placeholder]=\"\n 'widgetTabManagement.content.collection.defaultPageSizePlaceholder' | translate\n \"\n type=\"text\"\n />\n </cds-text-label>\n\n <div class=\"valtimo-widget-management-collection__path-selector\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.collection.collection' | translate\"\n [tooltip]=\"'widgetTabManagement.content.collection.collectionTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n formControlName=\"collection\"\n cdsText\n [attr.data-carbon-theme]=\"theme\"\n [placeholder]=\"'widgetTabManagement.content.collection.collection' | translate\"\n type=\"text\"\n />\n <!-- <valtimo-value-path-selector\n formControlName=\"collection\"\n [attr.data-carbon-theme]=\"theme\"\n [caseDefinitionKey]=\"obs.params?.caseDefinitionKey\"\n [caseDefinitionVersionTag]=\"obs.params?.caseDefinitionVersionTag\"\n [type]=\"ValuePathType.COLLECTION\"\n (collectionSelected)=\"onCollectionSelected($event)\"\n ></valtimo-value-path-selector> -->\n </div>\n </form>\n\n <!-- For injecting things such as process-selector in case widgets -->\n <ng-content></ng-content>\n\n <!-- <valtimo-case-management-widget-process-selector\n [params]=\"params$ | async\"\n ></valtimo-case-management-widget-process-selector> -->\n\n <span class=\"valtimo-widget-management-collection__subtitle\">\n {{ 'widgetTabManagement.content.collection.cardTitle' | translate }}\n </span>\n\n <form [formGroup]=\"cardForm\" class=\"valtimo-widget-management-collection__card\">\n <section class=\"valtimo-widget-management-collection__card-title\">\n <div class=\"valtimo-widget-management-collection__path-selector\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.value' | translate\"\n [tooltip]=\"'widgetTabManagement.content.collection.valueTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n formControlName=\"value\"\n cdsText\n [attr.data-carbon-theme]=\"theme\"\n [placeholder]=\"'widgetTabManagement.content.fields.value' | translate\"\n type=\"text\"\n />\n <!-- <valtimo-value-path-selector\n formControlName=\"value\"\n [attr.data-carbon-theme]=\"theme\"\n [caseDefinitionKey]=\"obs.params?.caseDefinitionKey\"\n [caseDefinitionVersionTag]=\"obs.params?.caseDefinitionVersionTag\"\n [parentItem]=\"selectedCollection$ | async\"\n ></valtimo-value-path-selector> -->\n </div>\n\n <cds-dropdown\n [attr.data-carbon-theme]=\"theme\"\n [label]=\"'widgetTabManagement.content.fields.type' | translate\"\n [dropUp]=\"false\"\n [placeholder]=\"'widgetTabManagement.content.fields.typePlaceholder' | translate\"\n (selected)=\"onTypeSelected(cardForm, $event)\"\n formControlName=\"type\"\n >\n <cds-dropdown-list [items]=\"getDisplayItemsSelected(cardForm)\"></cds-dropdown-list>\n </cds-dropdown>\n </section>\n\n <section class=\"valtimo-widget-management-collection__card-options\">\n @switch (cardForm.get('type').value.id) {\n @case (WidgetDisplayTypeKey.CURRENCY) {\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.currencyCode' | translate\"\n [tooltip]=\"'widgetTabManagement.content.fields.currencyCodeTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"theme\"\n [placeholder]=\"\n 'widgetTabManagement.content.fields.currencyCodePlaceholder' | translate\n \"\n type=\"text\"\n formControlName=\"currencyCode\"\n />\n </cds-text-label>\n\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.display' | translate\"\n [tooltip]=\"'widgetTabManagement.content.fields.displayTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"theme\"\n [placeholder]=\"'widgetTabManagement.content.fields.displayPlaceholder' | translate\"\n type=\"text\"\n formControlName=\"display\"\n />\n </cds-text-label>\n\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.digitsInfo' | translate\"\n tooltip=\"{{\n 'widgetTabManagement.content.fields.digitsInfoTooltip'\n | translate: {minFractionDigits: 2, maxFractionDigits: 2}\n }}\"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"theme\"\n [placeholder]=\"'widgetTabManagement.content.fields.digitsInfoPlaceholder' | translate\"\n type=\"text\"\n formControlName=\"digitsInfo\"\n />\n </cds-text-label>\n }\n @case (WidgetDisplayTypeKey.DATE) {\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.format' | translate\"\n [tooltip]=\"'widgetTabManagement.content.fields.dateFormatTooltip' | translate\"\n ></v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"theme\"\n [placeholder]=\"'widgetTabManagement.content.fields.formatPlaceholder' | translate\"\n type=\"text\"\n formControlName=\"format\"\n />\n </cds-text-label>\n }\n @case (WidgetDisplayTypeKey.DATE_TIME) {\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.format' | translate\"\n [tooltip]=\"'widgetTabManagement.content.fields.dateTimeFormatTooltip' | translate\"\n ></v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"theme\"\n [placeholder]=\"'widgetTabManagement.content.fields.formatPlaceholder' | translate\"\n type=\"text\"\n formControlName=\"format\"\n />\n </cds-text-label>\n }\n @case (WidgetDisplayTypeKey.ENUM) {\n <div class=\"valtimo-widget-management-collection__enum\" formArrayName=\"values\">\n @for (rowValue of cardForm.get('values')?.controls; track $index) {\n <form [formGroup]=\"rowValue\" class=\"valtimo-widget-management-collection__enum-form\">\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.enumValue' | translate\"\n [tooltip]=\"'widgetTabManagement.content.fields.enumValueTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n [attr.data-carbon-theme]=\"theme\"\n cdsText\n [placeholder]=\"'widgetTabManagement.content.enumValue' | translate\"\n type=\"text\"\n formControlName=\"key\"\n />\n </cds-text-label>\n\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.enumDisplay' | translate\"\n [tooltip]=\"'widgetTabManagement.content.fields.enumDisplayTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"theme\"\n [placeholder]=\"'widgetTabManagement.content.fields.enumDisplay' | translate\"\n type=\"text\"\n formControlName=\"value\"\n />\n </cds-text-label>\n\n <button\n cdsButton=\"danger--ghost\"\n [disabled]=\"$count === 1\"\n [iconOnly]=\"true\"\n class=\"valtimo-case-management-widget-field-column__delete-button enum\"\n (click)=\"onDeleteRowClick(cardForm.get('values'), $index)\"\n >\n <svg cdsIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n </form>\n }\n\n <button\n cdsButton=\"primary\"\n size=\"sm\"\n (click)=\"onAddEnumValueClick(cardForm.get('values'))\"\n >\n {{ 'widgetTabManagement.content.fields.addEnum' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n </div>\n }\n @case (WidgetDisplayTypeKey.NUMBER) {\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.digitsInfo' | translate\"\n tooltip=\"{{\n 'widgetTabManagement.content.fields.digitsInfoTooltip'\n | translate\n : {\n minFractionDigits: 0,\n maxFractionDigits: 3,\n }\n }}\"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"theme\"\n [placeholder]=\"'widgetTabManagement.content.fields.digitsInfo' | translate\"\n type=\"text\"\n formControlName=\"digitsInfo\"\n />\n </cds-text-label>\n }\n @case (WidgetDisplayTypeKey.PERCENT) {\n <cds-text-label>\n <v-input-label\n [title]=\"'widgetTabManagement.content.fields.digitsInfo' | translate\"\n tooltip=\"{{\n 'widgetTabManagement.content.fields.digitsInfoTooltip'\n | translate\n : {\n minFractionDigits: 0,\n maxFractionDigits: 0,\n }\n }}\"\n >\n </v-input-label>\n\n <input\n cdsText\n [attr.data-carbon-theme]=\"theme\"\n [placeholder]=\"'widgetTabManagement.content.fields.digitsInfo' | translate\"\n type=\"text\"\n formControlName=\"digitsInfo\"\n />\n </cds-text-label>\n }\n }\n </section>\n </form>\n\n <span class=\"valtimo-widget-management-collection__subtitle\">\n {{ 'widgetTabManagement.content.collection.cardFields' | translate }}\n </span>\n\n <valtimo-widget-management-fields-column\n [columnData]=\"$content()?.fields\"\n [fieldWidthDropdown]=\"fieldWidthDropdown\"\n [showHideWhenEmptyCheckbox]=\"true\"\n (columnUpdateEvent)=\"onColumnUpdateEvent($event)\"\n >\n <!-- [params]=\"params$ | async\"\n [selectedCollection]=\"selectedCollection$ | async\" -->\n </valtimo-widget-management-fields-column>\n\n <ng-template #fieldWidthDropdown let-index=\"index\">\n <cds-dropdown\n [label]=\"'widgetTabManagement.content.collection.fieldWidth' | translate\"\n [dropUp]=\"false\"\n [placeholder]=\"'widgetTabManagement.content.collection.fieldWidthPlaceholder' | translate\"\n (selected)=\"onWidthSelected($event, index)\"\n >\n <cds-dropdown-list [items]=\"getSelectedWidthItem(index)\"></cds-dropdown-list>\n </cds-dropdown>\n </ng-template>\n</ng-container>\n", styles: [".valtimo-widget-management-collection{display:flex;flex-direction:column;gap:24px}.valtimo-widget-management-collection__form{display:grid;gap:16px;grid-template-columns:repeat(3,1fr);align-items:flex-end}.valtimo-widget-management-collection__subtitle{font-size:16px;font-weight:600;line-height:22px}.valtimo-widget-management-collection__path-selector{display:flex;flex-direction:column}.valtimo-widget-management-collection__card{flex-direction:column;display:flex;gap:16px}.valtimo-widget-management-collection__card-title{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;align-items:flex-end}.valtimo-widget-management-collection__card-options{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.valtimo-widget-management-collection__enum{display:flex;flex-direction:column;gap:16px}.valtimo-widget-management-collection__enum-form{display:grid;grid-template-columns:1fr 1fr auto;align-items:flex-end;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"] }]
791
+ }], ctorParameters: () => [{ type: i1.CdsThemeService }, { type: i2.FormBuilder }, { type: i2$1.TranslateService }, { type: WidgetFieldsService }, { type: i2$2.ActivatedRoute }, { type: WidgetWizardService }], propDecorators: { class: [{
792
+ type: HostBinding,
793
+ args: ['class']
794
+ }], changeValidEvent: [{
795
+ type: Output
796
+ }] } });
797
+
798
+ /*
799
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
800
+ *
801
+ * Licensed under EUPL, Version 1.2 (the "License");
802
+ * you may not use this file except in compliance with the License.
803
+ * You may obtain a copy of the License at
804
+ *
805
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
806
+ *
807
+ * Unless required by applicable law or agreed to in writing, software
808
+ * distributed under the License is distributed on an "AS IS" basis,
809
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
810
+ * See the License for the specific language governing permissions and
811
+ * limitations under the License.
812
+ */
813
+ class WidgetManagementCustomComponent {
814
+ get widgetTitle() {
815
+ return this.form.get('widgetTitle');
816
+ }
817
+ constructor(customWidgetConfig, cdsThemeService, fb, widgetWizardService) {
818
+ this.customWidgetConfig = customWidgetConfig;
819
+ this.cdsThemeService = cdsThemeService;
820
+ this.fb = fb;
821
+ this.widgetWizardService = widgetWizardService;
822
+ this.changeValidEvent = new EventEmitter();
823
+ this.form = this.fb.group({
824
+ widgetTitle: this.fb.control(this.widgetWizardService.$widgetTitle(), Validators.required),
825
+ });
826
+ this.theme$ = this.cdsThemeService.currentTheme$.pipe(map((theme) => theme === CurrentCarbonTheme.G10 ? CARBON_THEME.WHITE : CARBON_THEME.G90));
827
+ this._selectedCustomComponentKey$ = new BehaviorSubject(null);
828
+ this._customWidgetConfig$ = new BehaviorSubject({});
829
+ this.componentListItems$ = combineLatest([
830
+ this._customWidgetConfig$,
831
+ this._selectedCustomComponentKey$,
832
+ ]).pipe(filter(([config]) => !!config), map(([config, selectedKey]) => Object.keys(config).reduce((acc, curr) => [...acc, { content: curr, selected: curr === selectedKey }], [])));
833
+ this._subscriptions = new Subscription();
834
+ if (customWidgetConfig)
835
+ this._customWidgetConfig$.next(customWidgetConfig);
836
+ }
837
+ componentDropDownChange(event) {
838
+ const componentKey = event?.item?.content;
839
+ if (!componentKey)
840
+ return;
841
+ this._selectedCustomComponentKey$.next(componentKey);
842
+ this.widgetWizardService.$widgetContent.set({ componentKey });
843
+ this.changeValidEvent.emit(true);
844
+ }
845
+ ngOnInit() {
846
+ this.openTitleSubscription();
847
+ this.prefill();
848
+ }
849
+ ngOnDestroy() {
850
+ this._subscriptions.unsubscribe();
851
+ }
852
+ openTitleSubscription() {
853
+ this._subscriptions.add(this.widgetTitle?.valueChanges.subscribe(title => {
854
+ this.widgetWizardService.$widgetTitle.set(title);
855
+ }));
856
+ }
857
+ prefill() {
858
+ const componentKey = this.widgetWizardService.$widgetContent()
859
+ ?.componentKey;
860
+ if (!componentKey || Object.keys(this.customWidgetConfig || {}).length === 0)
861
+ return;
862
+ this._selectedCustomComponentKey$.next(componentKey);
863
+ this.changeValidEvent.emit(true);
864
+ }
865
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetManagementCustomComponent, deps: [{ token: CUSTOM_WIDGET_TOKEN, optional: true }, { token: i1.CdsThemeService }, { token: i2.FormBuilder }, { token: WidgetWizardService }], target: i0.ɵɵFactoryTarget.Component }); }
866
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: WidgetManagementCustomComponent, isStandalone: true, selector: "ng-component", outputs: { changeValidEvent: "changeValidEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<form\n class=\"valtimo-widget-management-custom\"\n [formGroup]=\"form\"\n [attr.data-carbon-theme]=\"theme$ | async\"\n>\n <cds-text-label class=\"valtimo-widget-management-field__input\">\n {{ 'widgetTabManagement.content.widgetTitle' | translate }}\n\n <input\n formControlName=\"widgetTitle\"\n cdsText\n [placeholder]=\"'widgetTabManagement.content.widgetTitlePlaceholder' | translate\"\n type=\"text\"\n />\n </cds-text-label>\n\n <!-- For injecting things such as process selector in case management -->\n <ng-container></ng-container>\n\n <cds-label class=\"dropdown-label\">\n {{ 'widgetTabManagement.content.custom.selectComponent' | translate }}\n\n <cds-dropdown\n *ngIf=\"componentListItems$ | async as componentListItems\"\n [appendInline]=\"false\"\n [placeholder]=\"'widgetTabManagement.content.custom.placeholder' | translate\"\n [disabled]=\"componentListItems.length === 0\"\n (selected)=\"componentDropDownChange($event)\"\n >\n <cds-dropdown-list [items]=\"componentListItems\"> </cds-dropdown-list>\n </cds-dropdown>\n </cds-label>\n</form>\n", styles: [".valtimo-widget-management-custom{display:flex;flex-direction:column;gap:16px}.valtimo-widget-management-custom ::ng-deep .dropdown-label label{display:flex;flex-direction:column;width:100%}.valtimo-widget-management-custom ::ng-deep .dropdown-label cds-dropdown{margin-top:8px}\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: i2$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: InputModule }, { kind: "component", type: i3.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "component", type: i3.TextInputLabelComponent, selector: "cds-text-label, ibm-text-label", inputs: ["labelInputID", "disabled", "skeleton", "labelTemplate", "textInputTemplate", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel", "fluid"] }, { kind: "directive", type: i3.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: SelectModule }, { kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i3.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: i3.DropdownList, selector: "cds-dropdown-list, ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
867
+ }
868
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetManagementCustomComponent, decorators: [{
869
+ type: Component,
870
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
871
+ CommonModule,
872
+ TranslateModule,
873
+ InputModule,
874
+ ReactiveFormsModule,
875
+ SelectModule,
876
+ DropdownModule,
877
+ ], template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<form\n class=\"valtimo-widget-management-custom\"\n [formGroup]=\"form\"\n [attr.data-carbon-theme]=\"theme$ | async\"\n>\n <cds-text-label class=\"valtimo-widget-management-field__input\">\n {{ 'widgetTabManagement.content.widgetTitle' | translate }}\n\n <input\n formControlName=\"widgetTitle\"\n cdsText\n [placeholder]=\"'widgetTabManagement.content.widgetTitlePlaceholder' | translate\"\n type=\"text\"\n />\n </cds-text-label>\n\n <!-- For injecting things such as process selector in case management -->\n <ng-container></ng-container>\n\n <cds-label class=\"dropdown-label\">\n {{ 'widgetTabManagement.content.custom.selectComponent' | translate }}\n\n <cds-dropdown\n *ngIf=\"componentListItems$ | async as componentListItems\"\n [appendInline]=\"false\"\n [placeholder]=\"'widgetTabManagement.content.custom.placeholder' | translate\"\n [disabled]=\"componentListItems.length === 0\"\n (selected)=\"componentDropDownChange($event)\"\n >\n <cds-dropdown-list [items]=\"componentListItems\"> </cds-dropdown-list>\n </cds-dropdown>\n </cds-label>\n</form>\n", styles: [".valtimo-widget-management-custom{display:flex;flex-direction:column;gap:16px}.valtimo-widget-management-custom ::ng-deep .dropdown-label label{display:flex;flex-direction:column;width:100%}.valtimo-widget-management-custom ::ng-deep .dropdown-label cds-dropdown{margin-top:8px}\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"] }]
878
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
879
+ type: Optional
880
+ }, {
881
+ type: Inject,
882
+ args: [CUSTOM_WIDGET_TOKEN]
883
+ }] }, { type: i1.CdsThemeService }, { type: i2.FormBuilder }, { type: WidgetWizardService }], propDecorators: { changeValidEvent: [{
884
+ type: Output
885
+ }] } });
886
+
887
+ /*
888
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
889
+ *
890
+ * Licensed under EUPL, Version 1.2 (the "License");
891
+ * you may not use this file except in compliance with the License.
892
+ * You may obtain a copy of the License at
893
+ *
894
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
895
+ *
896
+ * Unless required by applicable law or agreed to in writing, software
897
+ * distributed under the License is distributed on an "AS IS" basis,
898
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
899
+ * See the License for the specific language governing permissions and
900
+ * limitations under the License.
901
+ */
902
+
903
+ var WidgetWizardStep;
904
+ (function (WidgetWizardStep) {
905
+ WidgetWizardStep[WidgetWizardStep["TYPE"] = 0] = "TYPE";
906
+ WidgetWizardStep[WidgetWizardStep["WIDTH"] = 1] = "WIDTH";
907
+ WidgetWizardStep[WidgetWizardStep["STYLE"] = 2] = "STYLE";
908
+ WidgetWizardStep[WidgetWizardStep["CONTENT"] = 3] = "CONTENT";
909
+ })(WidgetWizardStep || (WidgetWizardStep = {}));
910
+ var WidgetWizardCloseEventType;
911
+ (function (WidgetWizardCloseEventType) {
912
+ WidgetWizardCloseEventType[WidgetWizardCloseEventType["CANCEL"] = 0] = "CANCEL";
913
+ WidgetWizardCloseEventType[WidgetWizardCloseEventType["CREATE"] = 1] = "CREATE";
914
+ WidgetWizardCloseEventType[WidgetWizardCloseEventType["EDIT"] = 2] = "EDIT";
915
+ })(WidgetWizardCloseEventType || (WidgetWizardCloseEventType = {}));
916
+ var WidgetStyle;
917
+ (function (WidgetStyle) {
918
+ WidgetStyle["DEFAULT"] = "default";
919
+ WidgetStyle["HIGH_CONTRAST"] = "high-contrast";
920
+ })(WidgetStyle || (WidgetStyle = {}));
921
+ const AVAILABLE_WIDGETS = [
922
+ {
923
+ titleKey: 'widgetTabManagement.types.fields.title',
924
+ descriptionKey: 'widgetTabManagement.types.fields.description',
925
+ illustrationUrl: 'valtimo-layout/img/widget-management/types/fields.svg',
926
+ type: WidgetType.FIELDS,
927
+ component: WidgetManagementFieldsComponent,
928
+ },
929
+ {
930
+ titleKey: 'widgetTabManagement.types.custom.title',
931
+ descriptionKey: 'widgetTabManagement.types.custom.description',
932
+ illustrationUrl: 'valtimo-layout/img/widget-management/types/angular.svg',
933
+ type: WidgetType.CUSTOM,
934
+ component: WidgetManagementCustomComponent,
935
+ },
936
+ {
937
+ titleKey: 'widgetTabManagement.types.table.title',
938
+ descriptionKey: 'widgetTabManagement.types.table.description',
939
+ illustrationUrl: 'valtimo-layout/img/widget-management/types/table.svg',
940
+ type: WidgetType.TABLE,
941
+ component: WidgetManagementTableComponent,
942
+ },
943
+ {
944
+ titleKey: 'widgetTabManagement.types.collection.title',
945
+ descriptionKey: 'widgetTabManagement.types.collection.description',
946
+ illustrationUrl: 'valtimo-layout/img/widget-management/types/collection.svg',
947
+ type: WidgetType.COLLECTION,
948
+ component: WidgetManagementCollectionComponent,
949
+ },
950
+ ];
951
+ const WIDGET_WIDTH_LABELS = {
952
+ 1: 'widgetTabManagement.width.small.title',
953
+ 2: 'widgetTabManagement.width.medium.title',
954
+ 3: 'widgetTabManagement.width.large.title',
955
+ 4: 'widgetTabManagement.width.xtraLarge.title',
956
+ };
957
+ const WIDGET_STYLE_LABELS = {
958
+ [WidgetStyle.DEFAULT]: 'widgetTabManagement.style.default.title',
959
+ [WidgetStyle.HIGH_CONTRAST]: 'widgetTabManagement.style.highContrast.title',
960
+ };
961
+
962
+ /*
963
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
964
+ *
965
+ * Licensed under EUPL, Version 1.2 (the "License");
966
+ * you may not use this file except in compliance with the License.
967
+ * You may obtain a copy of the License at
968
+ *
969
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
970
+ *
971
+ * Unless required by applicable law or agreed to in writing, software
972
+ * distributed under the License is distributed on an "AS IS" basis,
973
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
974
+ * See the License for the specific language governing permissions and
975
+ * limitations under the License.
976
+ */
977
+
978
+ /*
979
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
980
+ *
981
+ * Licensed under EUPL, Version 1.2 (the "License");
982
+ * you may not use this file except in compliance with the License.
983
+ * You may obtain a copy of the License at
984
+ *
985
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
986
+ *
987
+ * Unless required by applicable law or agreed to in writing, software
988
+ * distributed under the License is distributed on an "AS IS" basis,
989
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
990
+ * See the License for the specific language governing permissions and
991
+ * limitations under the License.
992
+ */
993
+ class LayoutPublicComponent {
994
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LayoutPublicComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
995
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: LayoutPublicComponent, isStandalone: false, selector: "valtimo-layout-public", ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"public-page-content\">\n <img src=\"assets/logo.svg\" class=\"logo\" />\n <router-outlet></router-outlet>\n</div>\n", styles: ["body{background-color:#eee}.public-page-content{background-color:#fff;margin:60px auto;border:1px solid #dee2e6;padding:0 30px 30px}.public-page-content .logo{width:25%;display:block;margin:30px auto}@media (min-width: 768px){.public-page-content{width:50%}}@media (max-width: 767px) and (min-width: 576px){.public-page-content{width:75%}}@media (max-width: 575px){.public-page-content{width:95%}.public-page-content .logo{width:50%}}\n/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "directive", type: i2$2.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] }); }
996
+ }
997
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LayoutPublicComponent, decorators: [{
998
+ type: Component,
999
+ args: [{ selector: 'valtimo-layout-public', standalone: false, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"public-page-content\">\n <img src=\"assets/logo.svg\" class=\"logo\" />\n <router-outlet></router-outlet>\n</div>\n", styles: ["body{background-color:#eee}.public-page-content{background-color:#fff;margin:60px auto;border:1px solid #dee2e6;padding:0 30px 30px}.public-page-content .logo{width:25%;display:block;margin:30px auto}@media (min-width: 768px){.public-page-content{width:50%}}@media (max-width: 767px) and (min-width: 576px){.public-page-content{width:75%}}@media (max-width: 575px){.public-page-content{width:95%}.public-page-content .logo{width:50%}}\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"] }]
1000
+ }] });
1001
+
1002
+ /*
1003
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1004
+ *
1005
+ * Licensed under EUPL, Version 1.2 (the "License");
1006
+ * you may not use this file except in compliance with the License.
1007
+ * You may obtain a copy of the License at
1008
+ *
1009
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1010
+ *
1011
+ * Unless required by applicable law or agreed to in writing, software
1012
+ * distributed under the License is distributed on an "AS IS" basis,
1013
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1014
+ * See the License for the specific language governing permissions and
1015
+ * limitations under the License.
1016
+ */
1017
+ class LayoutInternalComponent {
1018
+ constructor(layoutService, renderer, userInterfaceService, shellService) {
1019
+ this.layoutService = layoutService;
1020
+ this.renderer = renderer;
1021
+ this.userInterfaceService = userInterfaceService;
1022
+ this.shellService = shellService;
1023
+ this.showPageHeader$ = this.userInterfaceService.showPageHeader$;
1024
+ this.sideBarExpanded$ = this.shellService.sideBarExpanded$;
1025
+ this.collapsibleWidescreenMenu$ = this.shellService.collapsibleWidescreenMenu$;
1026
+ this.renderer.addClass(document.body, 'be-animate');
1027
+ }
1028
+ ngAfterViewInit() {
1029
+ App.init();
1030
+ this.shellService.setContentElement(this.mainContentRef.nativeElement);
1031
+ this._observer = new ResizeObserver(() => {
1032
+ this.shellService.onMainContentResize();
1033
+ });
1034
+ this._observer.observe(this.mainContentRef.nativeElement);
1035
+ }
1036
+ ngOnDestroy() {
1037
+ this._observer.disconnect();
1038
+ }
1039
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LayoutInternalComponent, deps: [{ token: LayoutService }, { token: i0.Renderer2 }, { token: i1.UserInterfaceService }, { token: i1.ShellService }], target: i0.ɵɵFactoryTarget.Component }); }
1040
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: LayoutInternalComponent, isStandalone: false, selector: "valtimo-layout-internal", viewQueries: [{ propertyName: "mainContentRef", first: true, predicate: ["mainContent"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-topbar></valtimo-topbar>\n<main\n class=\"cds--content\"\n [ngClass]=\"{\n 'cds--content--sidebar':\n (sideBarExpanded$ | async) && (collapsibleWidescreenMenu$ | async) === false,\n }\"\n #mainContent\n>\n <valtimo-left-sidebar [hidden]=\"layoutService.isFullscreen\"></valtimo-left-sidebar>\n <valtimo-alert></valtimo-alert>\n <valtimo-page-header [hidden]=\"layoutService.isFullscreen\"></valtimo-page-header>\n <router-outlet></router-outlet>\n <valtimo-right-sidebar></valtimo-right-sidebar>\n <v-prompt></v-prompt>\n</main>\n", styles: ["::ng-deep .cds--content{padding-top:24px!important}@media screen and (max-width: 767px){.be-content{margin-left:0!important}}@media only screen and (min-width: 1056px){.cds--content--sidebar{padding-left:18rem}}\n/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "directive", type: i2$2.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: i1.TopbarComponent, selector: "valtimo-topbar" }, { kind: "component", type: i1.LeftSidebarComponent, selector: "valtimo-left-sidebar" }, { kind: "component", type: i1.RightSidebarComponent, selector: "valtimo-right-sidebar" }, { kind: "component", type: i1.PageHeaderComponent, selector: "valtimo-page-header" }, { kind: "component", type: i1.AlertComponent, selector: "valtimo-alert" }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i1.PromptComponent, selector: "v-prompt", inputs: ["appearingDelayMs", "maxWidthPx"], outputs: ["closeEvent"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }] }); }
1041
+ }
1042
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LayoutInternalComponent, decorators: [{
1043
+ type: Component,
1044
+ args: [{ selector: 'valtimo-layout-internal', standalone: false, 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-topbar></valtimo-topbar>\n<main\n class=\"cds--content\"\n [ngClass]=\"{\n 'cds--content--sidebar':\n (sideBarExpanded$ | async) && (collapsibleWidescreenMenu$ | async) === false,\n }\"\n #mainContent\n>\n <valtimo-left-sidebar [hidden]=\"layoutService.isFullscreen\"></valtimo-left-sidebar>\n <valtimo-alert></valtimo-alert>\n <valtimo-page-header [hidden]=\"layoutService.isFullscreen\"></valtimo-page-header>\n <router-outlet></router-outlet>\n <valtimo-right-sidebar></valtimo-right-sidebar>\n <v-prompt></v-prompt>\n</main>\n", styles: ["::ng-deep .cds--content{padding-top:24px!important}@media screen and (max-width: 767px){.be-content{margin-left:0!important}}@media only screen and (min-width: 1056px){.cds--content--sidebar{padding-left:18rem}}\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"] }]
1045
+ }], ctorParameters: () => [{ type: LayoutService }, { type: i0.Renderer2 }, { type: i1.UserInterfaceService }, { type: i1.ShellService }], propDecorators: { mainContentRef: [{
1046
+ type: ViewChild,
1047
+ args: ['mainContent']
1048
+ }] } });
1049
+
1050
+ /*
1051
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1052
+ *
1053
+ * Licensed under EUPL, Version 1.2 (the "License");
1054
+ * you may not use this file except in compliance with the License.
1055
+ * You may obtain a copy of the License at
1056
+ *
1057
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1058
+ *
1059
+ * Unless required by applicable law or agreed to in writing, software
1060
+ * distributed under the License is distributed on an "AS IS" basis,
1061
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1062
+ * See the License for the specific language governing permissions and
1063
+ * limitations under the License.
1064
+ */
1065
+ class LayoutComponent {
1066
+ constructor(placeHolderService, route, router) {
1067
+ this.placeHolderService = placeHolderService;
1068
+ this.route = route;
1069
+ this.router = router;
1070
+ this.layoutType = null;
1071
+ this._routerSub = new Subscription();
1072
+ this._DEFAULT_LAYOUT = 'internal';
1073
+ }
1074
+ ngOnInit() {
1075
+ this.openRouterSubscription();
1076
+ }
1077
+ ngAfterViewInit() {
1078
+ this.registerCarbonPlaceHolder();
1079
+ }
1080
+ ngOnDestroy() {
1081
+ this._routerSub.unsubscribe();
1082
+ }
1083
+ registerCarbonPlaceHolder() {
1084
+ if (this._carbonPlaceHolder) {
1085
+ this.placeHolderService.registerViewContainerRef(this._carbonPlaceHolder);
1086
+ }
1087
+ }
1088
+ openRouterSubscription() {
1089
+ this._routerSub.add(this.router.events.pipe(filter$1(event => event instanceof NavigationEnd)).subscribe(() => {
1090
+ const layout = this.route.snapshot.firstChild.data.layout;
1091
+ this.layoutType = layout ? layout : this._DEFAULT_LAYOUT;
1092
+ }));
1093
+ }
1094
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LayoutComponent, deps: [{ token: i3.PlaceholderService }, { token: i2$2.ActivatedRoute }, { token: i2$2.Router }], target: i0.ɵɵFactoryTarget.Component }); }
1095
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: LayoutComponent, isStandalone: false, selector: "valtimo-layout", viewQueries: [{ propertyName: "_carbonPlaceHolder", first: true, predicate: ["carbonPlaceHolder"], 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<div #carbonPlaceHolder class=\"carbon-placeholder\"></div>\n\n<valtimo-global-notification></valtimo-global-notification>\n<valtimo-layout-public *ngIf=\"layoutType === 'public'\"></valtimo-layout-public>\n<valtimo-layout-internal *ngIf=\"layoutType === 'internal'\"></valtimo-layout-internal>\n", dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$3.GlobalNotificationComponent, selector: "valtimo-global-notification" }, { kind: "component", type: LayoutPublicComponent, selector: "valtimo-layout-public" }, { kind: "component", type: LayoutInternalComponent, selector: "valtimo-layout-internal" }] }); }
1096
+ }
1097
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LayoutComponent, decorators: [{
1098
+ type: Component,
1099
+ args: [{ selector: 'valtimo-layout', standalone: false, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div #carbonPlaceHolder class=\"carbon-placeholder\"></div>\n\n<valtimo-global-notification></valtimo-global-notification>\n<valtimo-layout-public *ngIf=\"layoutType === 'public'\"></valtimo-layout-public>\n<valtimo-layout-internal *ngIf=\"layoutType === 'internal'\"></valtimo-layout-internal>\n" }]
1100
+ }], ctorParameters: () => [{ type: i3.PlaceholderService }, { type: i2$2.ActivatedRoute }, { type: i2$2.Router }], propDecorators: { _carbonPlaceHolder: [{
1101
+ type: ViewChild,
1102
+ args: ['carbonPlaceHolder', { static: true, read: ViewContainerRef }]
1103
+ }] } });
1104
+
1105
+ /*
1106
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1107
+ *
1108
+ * Licensed under EUPL, Version 1.2 (the "License");
1109
+ * you may not use this file except in compliance with the License.
1110
+ * You may obtain a copy of the License at
1111
+ *
1112
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1113
+ *
1114
+ * Unless required by applicable law or agreed to in writing, software
1115
+ * distributed under the License is distributed on an "AS IS" basis,
1116
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1117
+ * See the License for the specific language governing permissions and
1118
+ * limitations under the License.
1119
+ */
1120
+
1121
+ /*
1122
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1123
+ *
1124
+ * Licensed under EUPL, Version 1.2 (the "License");
1125
+ * you may not use this file except in compliance with the License.
1126
+ * You may obtain a copy of the License at
1127
+ *
1128
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1129
+ *
1130
+ * Unless required by applicable law or agreed to in writing, software
1131
+ * distributed under the License is distributed on an "AS IS" basis,
1132
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1133
+ * See the License for the specific language governing permissions and
1134
+ * limitations under the License.
1135
+ */
1136
+
1137
+ /*
1138
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1139
+ *
1140
+ * Licensed under EUPL, Version 1.2 (the "License");
1141
+ * you may not use this file except in compliance with the License.
1142
+ * You may obtain a copy of the License at
1143
+ *
1144
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1145
+ *
1146
+ * Unless required by applicable law or agreed to in writing, software
1147
+ * distributed under the License is distributed on an "AS IS" basis,
1148
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1149
+ * See the License for the specific language governing permissions and
1150
+ * limitations under the License.
1151
+ */
1152
+
1153
+ /*
1154
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1155
+ *
1156
+ * Licensed under EUPL, Version 1.2 (the "License");
1157
+ * you may not use this file except in compliance with the License.
1158
+ * You may obtain a copy of the License at
1159
+ *
1160
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1161
+ *
1162
+ * Unless required by applicable law or agreed to in writing, software
1163
+ * distributed under the License is distributed on an "AS IS" basis,
1164
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1165
+ * See the License for the specific language governing permissions and
1166
+ * limitations under the License.
1167
+ */
1168
+ class WidgetFieldComponent {
1169
+ set widgetConfiguration(value) {
1170
+ if (!value)
1171
+ return;
1172
+ this.widgetConfiguration$.next(value);
1173
+ }
1174
+ set widgetData(value) {
1175
+ if (!value)
1176
+ return;
1177
+ this.widgetData$.next(value);
1178
+ this.isEmptyWidgetData$.next(this.checkEmptyWidgetData(value));
1179
+ }
1180
+ constructor(viewContentService) {
1181
+ this.viewContentService = viewContentService;
1182
+ this.class = 'widget-field';
1183
+ this.isEmptyWidgetData$ = new BehaviorSubject(false);
1184
+ this.noVisibleFields$ = new BehaviorSubject(true);
1185
+ this.renderVertically = signal(0);
1186
+ this.widgetConfiguration$ = new BehaviorSubject(null);
1187
+ this.widgetData$ = new BehaviorSubject(null);
1188
+ this.widgetPropertyValue$ = combineLatest([this.widgetConfiguration$, this.widgetData$]).pipe(map(([widget, widgetData]) => widget?.properties.columns.map(column => column.reduce((columnFields, property) => [
1189
+ ...columnFields,
1190
+ ...(widgetData?.hasOwnProperty(property.key)
1191
+ ? [
1192
+ {
1193
+ title: property.title,
1194
+ ellipsisCharacterLimit: property.displayProperties
1195
+ ?.ellipsisCharacterLimit ?? null,
1196
+ hideWhenEmpty: property.displayProperties?.hideWhenEmpty ?? false,
1197
+ value: this.viewContentService.get(widgetData[property.key], {
1198
+ ...property.displayProperties,
1199
+ viewType: property.displayProperties?.type ?? ViewType.TEXT,
1200
+ }),
1201
+ isRawValue: this.viewContentService.isRawValue({
1202
+ ...property.displayProperties,
1203
+ viewType: property.displayProperties?.type ?? ViewType.TEXT,
1204
+ })
1205
+ },
1206
+ ]
1207
+ : []),
1208
+ ], []))), tap(columns => this.checkEmptyFields(columns)));
1209
+ }
1210
+ ngAfterViewInit() {
1211
+ if (this._widgetFieldRef)
1212
+ this.openWidthObserver();
1213
+ }
1214
+ ngOnDestroy() {
1215
+ this._observer?.disconnect();
1216
+ }
1217
+ openWidthObserver() {
1218
+ this._observer = new ResizeObserver(event => {
1219
+ this.observerMutation(event);
1220
+ });
1221
+ this._observer.observe(this._widgetFieldRef.nativeElement);
1222
+ }
1223
+ observerMutation(event) {
1224
+ const elementWidth = event[0]?.borderBoxSize[0]?.inlineSize;
1225
+ if (typeof elementWidth === 'number' && elementWidth !== 0) {
1226
+ if (elementWidth < 640) {
1227
+ this.renderVertically.set(1);
1228
+ }
1229
+ else if (elementWidth > 640 && elementWidth <= 768) {
1230
+ this.renderVertically.set(2);
1231
+ }
1232
+ else if (elementWidth > 768 && elementWidth <= 1080) {
1233
+ this.renderVertically.set(3);
1234
+ }
1235
+ else if (elementWidth > 1080) {
1236
+ this.renderVertically.set(4);
1237
+ }
1238
+ }
1239
+ }
1240
+ checkEmptyWidgetData(widgetData) {
1241
+ return widgetData && Object.keys(widgetData).length === 0;
1242
+ }
1243
+ checkEmptyFields(columns) {
1244
+ columns.forEach(column => {
1245
+ column.forEach(field => {
1246
+ if (!field?.hideWhenEmpty || (field?.hideWhenEmpty && field?.value && field?.value !== '-'))
1247
+ this.noVisibleFields$.next(false);
1248
+ });
1249
+ });
1250
+ }
1251
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetFieldComponent, deps: [{ token: i1.ViewContentService }], target: i0.ɵɵFactoryTarget.Component }); }
1252
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: WidgetFieldComponent, isStandalone: true, selector: "valtimo-widget-field", inputs: { widgetConfiguration: "widgetConfiguration", widgetData: "widgetData" }, host: { properties: { "class": "this.class" } }, viewQueries: [{ propertyName: "_widgetFieldRef", first: true, predicate: ["widgetField"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n *ngIf=\"{\n widgetConfiguration: widgetConfiguration$ | async,\n widgetPropertyValue: widgetPropertyValue$ | async,\n widgetData: widgetData$ | async,\n isEmptyWidgetData: isEmptyWidgetData$ | async,\n noVisibleFields: noVisibleFields$ | async,\n } as obs\"\n>\n <section class=\"widget-field__header\">\n <h4 class=\"widget-field__title\">{{ obs?.widgetConfiguration?.title }}</h4>\n\n <ng-content></ng-content>\n </section>\n\n @if (obs?.isEmptyWidgetData) {\n <valtimo-no-results\n [collapseVertically]=\"true\"\n [description]=\"'widgets.noData' | translate\"\n [smallPadding]=\"true\"\n ></valtimo-no-results>\n } @else {\n <div\n #widgetField\n [ngClass]=\"{\n 'widget-field__render-vertically': renderVertically() === 1,\n 'widget-field__render-two-columns': renderVertically() === 2,\n 'widget-field__render-three-columns': renderVertically() === 3,\n 'widget-field__container': renderVertically() === 4,\n }\"\n >\n @if (obs.noVisibleFields) {\n <valtimo-no-results\n [collapseVertically]=\"true\"\n [description]=\"'widgets.emptyFields' | translate\"\n [smallPadding]=\"true\"\n ></valtimo-no-results>\n } @else {\n @for (column of obs?.widgetPropertyValue; track column.key) {\n <div class=\"widget-field__column\">\n @for (property of column; track property) {\n <div\n *ngIf=\"\n (property?.value !== null &&\n property?.value !== '-' &&\n property?.hideWhenEmpty) ||\n !property?.hideWhenEmpty\n \"\n class=\"widget-field__field\"\n >\n <label class=\"widget-field__field-label\" [attr.title]=\"property?.title\">\n {{ property?.title }}</label\n >\n\n <div [attr.title]=\"property?.value\" class=\"widget-field__field-value\">\n @if (property?.isRawValue) {\n <div [innerHTML]=\"property?.value\"></div>\n } @else {\n {{ property?.value | valtimoEllipsis: property?.ellipsisCharacterLimit }}\n }\n </div>\n </div>\n }\n </div>\n }\n }\n </div>\n }\n</ng-container>\n", styles: [".widget-field{padding:24px}.widget-field__header{display:flex;align-items:center;justify-content:space-between}.widget-field,.widget-field__column{display:flex;flex-direction:column;gap:16px;width:100%;overflow:hidden}.widget-field__title{color:var(--cds-text-primary);font-weight:600;font-size:16px;line-height:24px}.widget-field__container{display:grid;grid-gap:24px;grid-template-columns:repeat(4,1fr)}.widget-field__field{display:flex;width:100%;flex-direction:column;gap:8px}.widget-field__field-label{font-size:12px;color:var(--cds-text-secondary)}.widget-field__field-value{color:var(--cds-text-primary);padding:8px 16px;border-bottom:1px solid var(--cds-border-subtle-01);font-size:14px}.widget-field .cds--label{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.widget-field__render-vertically,.widget-field__render-two-columns,.widget-field__render-three-columns{display:grid;align-items:stretch;gap:24px}.widget-field__render-vertically{grid-template-columns:repeat(1,1fr)}.widget-field__render-two-columns{grid-template-columns:repeat(2,1fr)}.widget-field__render-three-columns{grid-template-columns:repeat(3,1fr)}\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.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: TranslateModule }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i1.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "pipe", type: EllipsisPipe, name: "valtimoEllipsis" }, { kind: "ngmodule", type: ButtonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1253
+ }
1254
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetFieldComponent, decorators: [{
1255
+ type: Component,
1256
+ args: [{ selector: 'valtimo-widget-field', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [
1257
+ CommonModule,
1258
+ InputModule,
1259
+ TranslateModule,
1260
+ CarbonListModule,
1261
+ EllipsisPipe,
1262
+ ButtonModule,
1263
+ ], 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 widgetConfiguration: widgetConfiguration$ | async,\n widgetPropertyValue: widgetPropertyValue$ | async,\n widgetData: widgetData$ | async,\n isEmptyWidgetData: isEmptyWidgetData$ | async,\n noVisibleFields: noVisibleFields$ | async,\n } as obs\"\n>\n <section class=\"widget-field__header\">\n <h4 class=\"widget-field__title\">{{ obs?.widgetConfiguration?.title }}</h4>\n\n <ng-content></ng-content>\n </section>\n\n @if (obs?.isEmptyWidgetData) {\n <valtimo-no-results\n [collapseVertically]=\"true\"\n [description]=\"'widgets.noData' | translate\"\n [smallPadding]=\"true\"\n ></valtimo-no-results>\n } @else {\n <div\n #widgetField\n [ngClass]=\"{\n 'widget-field__render-vertically': renderVertically() === 1,\n 'widget-field__render-two-columns': renderVertically() === 2,\n 'widget-field__render-three-columns': renderVertically() === 3,\n 'widget-field__container': renderVertically() === 4,\n }\"\n >\n @if (obs.noVisibleFields) {\n <valtimo-no-results\n [collapseVertically]=\"true\"\n [description]=\"'widgets.emptyFields' | translate\"\n [smallPadding]=\"true\"\n ></valtimo-no-results>\n } @else {\n @for (column of obs?.widgetPropertyValue; track column.key) {\n <div class=\"widget-field__column\">\n @for (property of column; track property) {\n <div\n *ngIf=\"\n (property?.value !== null &&\n property?.value !== '-' &&\n property?.hideWhenEmpty) ||\n !property?.hideWhenEmpty\n \"\n class=\"widget-field__field\"\n >\n <label class=\"widget-field__field-label\" [attr.title]=\"property?.title\">\n {{ property?.title }}</label\n >\n\n <div [attr.title]=\"property?.value\" class=\"widget-field__field-value\">\n @if (property?.isRawValue) {\n <div [innerHTML]=\"property?.value\"></div>\n } @else {\n {{ property?.value | valtimoEllipsis: property?.ellipsisCharacterLimit }}\n }\n </div>\n </div>\n }\n </div>\n }\n }\n </div>\n }\n</ng-container>\n", styles: [".widget-field{padding:24px}.widget-field__header{display:flex;align-items:center;justify-content:space-between}.widget-field,.widget-field__column{display:flex;flex-direction:column;gap:16px;width:100%;overflow:hidden}.widget-field__title{color:var(--cds-text-primary);font-weight:600;font-size:16px;line-height:24px}.widget-field__container{display:grid;grid-gap:24px;grid-template-columns:repeat(4,1fr)}.widget-field__field{display:flex;width:100%;flex-direction:column;gap:8px}.widget-field__field-label{font-size:12px;color:var(--cds-text-secondary)}.widget-field__field-value{color:var(--cds-text-primary);padding:8px 16px;border-bottom:1px solid var(--cds-border-subtle-01);font-size:14px}.widget-field .cds--label{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.widget-field__render-vertically,.widget-field__render-two-columns,.widget-field__render-three-columns{display:grid;align-items:stretch;gap:24px}.widget-field__render-vertically{grid-template-columns:repeat(1,1fr)}.widget-field__render-two-columns{grid-template-columns:repeat(2,1fr)}.widget-field__render-three-columns{grid-template-columns:repeat(3,1fr)}\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"] }]
1264
+ }], ctorParameters: () => [{ type: i1.ViewContentService }], propDecorators: { class: [{
1265
+ type: HostBinding,
1266
+ args: ['class']
1267
+ }], _widgetFieldRef: [{
1268
+ type: ViewChild,
1269
+ args: ['widgetField']
1270
+ }], widgetConfiguration: [{
1271
+ type: Input
1272
+ }], widgetData: [{
1273
+ type: Input
1274
+ }] } });
1275
+
1276
+ /*
1277
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1278
+ *
1279
+ * Licensed under EUPL, Version 1.2 (the "License");
1280
+ * you may not use this file except in compliance with the License.
1281
+ * You may obtain a copy of the License at
1282
+ *
1283
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1284
+ *
1285
+ * Unless required by applicable law or agreed to in writing, software
1286
+ * distributed under the License is distributed on an "AS IS" basis,
1287
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1288
+ * See the License for the specific language governing permissions and
1289
+ * limitations under the License.
1290
+ */
1291
+
1292
+ /*
1293
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1294
+ *
1295
+ * Licensed under EUPL, Version 1.2 (the "License");
1296
+ * you may not use this file except in compliance with the License.
1297
+ * You may obtain a copy of the License at
1298
+ *
1299
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1300
+ *
1301
+ * Unless required by applicable law or agreed to in writing, software
1302
+ * distributed under the License is distributed on an "AS IS" basis,
1303
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1304
+ * See the License for the specific language governing permissions and
1305
+ * limitations under the License.
1306
+ */
1307
+ class TranslationManagementComponent {
1308
+ constructor(translateService, localizationService, pageHeaderService, document) {
1309
+ this.translateService = translateService;
1310
+ this.localizationService = localizationService;
1311
+ this.pageHeaderService = pageHeaderService;
1312
+ this.document = document;
1313
+ this.loading$ = new BehaviorSubject(true);
1314
+ this.allChangedValuesValid$ = new BehaviorSubject(false);
1315
+ this.disabled$ = new BehaviorSubject(false);
1316
+ this._languageOptions$ = new BehaviorSubject(undefined);
1317
+ this._refreshLocalizations$ = new BehaviorSubject(null);
1318
+ this._localizationTranslations$ = this._refreshLocalizations$.pipe(tap(() => this.loading$.next(true)), switchMap(() => this.localizationService.getMergedLocalizations()), tap(() => this.loading$.next(false)));
1319
+ this._defaultValues = [];
1320
+ this._changedValues$ = new BehaviorSubject(undefined);
1321
+ this.showConfirmationModal$ = new BehaviorSubject(false);
1322
+ this.valuesChanged$ = this._changedValues$.pipe(map(changedValues => !isEqual(changedValues, this._defaultValues)));
1323
+ this.localizationTranslationValues$ = combineLatest([
1324
+ this._languageOptions$,
1325
+ this._localizationTranslations$,
1326
+ this.translateService.stream('key'),
1327
+ ]).pipe(map(([languageOptions, localizationTranslations]) => this.mapMergedLocalizationsToMultiInput(languageOptions, localizationTranslations)), tap(defaultValues => {
1328
+ this._defaultValues = defaultValues;
1329
+ }));
1330
+ this.multiInputTiles$ = combineLatest([
1331
+ this._languageOptions$,
1332
+ this.translateService.stream('key'),
1333
+ ]).pipe(map(([languageOptions]) => {
1334
+ const objToReturn = {};
1335
+ objToReturn[0] = this.translateService.instant('listColumn.key');
1336
+ languageOptions.forEach((languageOption, index) => {
1337
+ objToReturn[index + 1] = this.translateService.instant(`settings.language.options.${languageOption}`);
1338
+ });
1339
+ return objToReturn;
1340
+ }));
1341
+ this.amountOfArbitraryValues$ = this.multiInputTiles$.pipe(map(multiInputTitles => Object.keys(multiInputTitles).length));
1342
+ this.compactMode$ = this.pageHeaderService.compactMode$;
1343
+ }
1344
+ ngOnInit() {
1345
+ this.setLanguages();
1346
+ }
1347
+ validChange(valid) {
1348
+ this.allChangedValuesValid$.next(valid);
1349
+ }
1350
+ valueChange(value) {
1351
+ this._changedValues$.next(value);
1352
+ }
1353
+ saveAndRefresh() {
1354
+ this.saveChanges(true);
1355
+ }
1356
+ saveAndStay() {
1357
+ this.saveChanges();
1358
+ }
1359
+ cancel() {
1360
+ this.hideModal();
1361
+ }
1362
+ showModal() {
1363
+ this.showConfirmationModal$.next(true);
1364
+ }
1365
+ saveChanges(reload = false) {
1366
+ this.disable();
1367
+ combineLatest([this._changedValues$, this._languageOptions$])
1368
+ .pipe(take(1), map(([changedValues, languageOptions]) => this.getLocalizationsForUpdateRequest(changedValues, languageOptions)), switchMap(updatedLocalizations => this.localizationService.updateLocalizations(updatedLocalizations)))
1369
+ .subscribe(() => {
1370
+ if (reload) {
1371
+ this.document?.defaultView?.location?.reload();
1372
+ }
1373
+ else {
1374
+ this._refreshLocalizations$.next(null);
1375
+ this.enable();
1376
+ }
1377
+ });
1378
+ }
1379
+ setLanguages() {
1380
+ this._languageOptions$.next(this.translateService.langs);
1381
+ }
1382
+ disable() {
1383
+ this.disabled$.next(true);
1384
+ }
1385
+ enable() {
1386
+ this.disabled$.next(false);
1387
+ }
1388
+ hideModal() {
1389
+ this.showConfirmationModal$.next(false);
1390
+ }
1391
+ flattenObject(ob) {
1392
+ const toReturn = {};
1393
+ for (const i in ob) {
1394
+ if (!ob.hasOwnProperty(i))
1395
+ continue;
1396
+ if (typeof ob[i] == 'object' && ob[i] !== null) {
1397
+ const flatObject = this.flattenObject(ob[i]);
1398
+ for (const x in flatObject) {
1399
+ if (!flatObject.hasOwnProperty(x))
1400
+ continue;
1401
+ toReturn[i + '.' + x] = flatObject[x];
1402
+ }
1403
+ }
368
1404
  else {
369
1405
  toReturn[i] = ob[i];
370
1406
  }
371
1407
  }
372
- return toReturn;
1408
+ return toReturn;
1409
+ }
1410
+ unflattenObject(obj, delimiter = '.') {
1411
+ return Object.keys(obj).reduce((res, k) => {
1412
+ k.split(delimiter).reduce((acc, e, i, keys) => acc[e] ||
1413
+ (acc[e] = isNaN(Number(keys[i + 1])) ? (keys.length - 1 === i ? obj[k] : {}) : []), res);
1414
+ return res;
1415
+ }, {});
1416
+ }
1417
+ getLocalizationsForUpdateRequest(changedValues, languageOptions) {
1418
+ const localizations = [];
1419
+ const translationObject = {};
1420
+ languageOptions.forEach(languageOption => {
1421
+ translationObject[languageOption] = {};
1422
+ });
1423
+ changedValues.forEach(changedValue => {
1424
+ languageOptions.forEach((languageOption, index) => {
1425
+ translationObject[languageOption] = {
1426
+ ...translationObject[languageOption],
1427
+ [changedValue[0]]: changedValue[index + 1],
1428
+ };
1429
+ });
1430
+ });
1431
+ languageOptions.forEach(languageOption => {
1432
+ translationObject[languageOption] = this.unflattenObject(translationObject[languageOption]);
1433
+ });
1434
+ Object.keys(translationObject).forEach(languageKey => {
1435
+ localizations.push({ languageKey, content: translationObject[languageKey] });
1436
+ });
1437
+ return localizations;
1438
+ }
1439
+ mapMergedLocalizationsToMultiInput(languageOptions, mergedLocalizations) {
1440
+ if (Object.keys(mergedLocalizations).length === 0) {
1441
+ return [];
1442
+ }
1443
+ const firstLanguageOption = languageOptions[0];
1444
+ const firstLanguageTranslations = firstLanguageOption && mergedLocalizations[firstLanguageOption];
1445
+ const flattenedFirstLanguageTranslations = firstLanguageTranslations && this.flattenObject(firstLanguageTranslations);
1446
+ return Object.keys(flattenedFirstLanguageTranslations).map(flattenedTranslationKey => {
1447
+ const emptyArbitraryValue = {};
1448
+ emptyArbitraryValue['0'] = flattenedTranslationKey;
1449
+ languageOptions.forEach((languageOption, index) => {
1450
+ emptyArbitraryValue[`${index + 1}`] =
1451
+ this.flattenObject(mergedLocalizations[languageOption])[flattenedTranslationKey] || '';
1452
+ });
1453
+ return emptyArbitraryValue;
1454
+ });
1455
+ }
1456
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TranslationManagementComponent, deps: [{ token: i2$1.TranslateService }, { token: i2$3.LocalizationService }, { token: i1.PageHeaderService }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component }); }
1457
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TranslationManagementComponent, isStandalone: false, selector: "valtimo-translation-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<ng-container\n *ngIf=\"{\n localizationTranslationValues: localizationTranslationValues$ | async,\n loading: loading$ | async,\n disabled: disabled$ | async,\n multiInputTitles: multiInputTiles$ | async,\n amountOfArbitraryValues: amountOfArbitraryValues$ | async,\n showConfirmationModal: showConfirmationModal$,\n allChangedValuesValid: allChangedValuesValid$ | async,\n valuesChanged: valuesChanged$ | async,\n compactMode: compactMode$ | async,\n } as obs\"\n>\n <ng-container *ngIf=\"!obs.loading && obs.localizationTranslationValues; else loading\">\n <valtimo-carbon-multi-input\n [disabled]=\"obs.disabled\"\n [arbitraryAmountTitles]=\"obs.multiInputTitles\"\n [fullWidth]=\"true\"\n [minimumAmountOfRows]=\"0\"\n type=\"arbitraryAmount\"\n [arbitraryValueAmount]=\"obs.amountOfArbitraryValues\"\n [defaultValues]=\"obs.localizationTranslationValues\"\n (allValuesValidEvent)=\"validChange($event)\"\n (valueChange)=\"valueChange($event)\"\n addRowTranslationKey=\"translationManagement.add\"\n ></valtimo-carbon-multi-input>\n </ng-container>\n\n <ng-template #loading>\n <div class=\"loading-container\"><cds-loading></cds-loading></div>\n </ng-template>\n\n <valtimo-confirmation-modal\n [showModalSubject$]=\"obs.showConfirmationModal\"\n (confirmEvent)=\"saveAndRefresh()\"\n (optionalEvent)=\"saveAndStay()\"\n (cancelEvent)=\"cancel()\"\n [showOptionalButton]=\"true\"\n cancelButtonType=\"ghost\"\n optionalButtonType=\"secondary\"\n confirmButtonTextTranslationKey=\"translationManagement.saveWithReload\"\n optionalButtonTextTranslationKey=\"translationManagement.saveWithoutReload\"\n titleTranslationKey=\"translationManagement.modalTitle\"\n contentTranslationKey=\"translationManagement.modalContent\"\n [spacerAfterCancelButton]=\"true\"\n ></valtimo-confirmation-modal>\n\n <ng-container renderInPageHeader>\n <ng-template>\n <button\n cdsButton=\"primary\"\n [size]=\"obs.compactMode ? 'sm' : 'md'\"\n (click)=\"showModal()\"\n [disabled]=\"!obs.allChangedValuesValid || obs.disabled || !obs.valuesChanged\"\n >\n {{ 'interface.save' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"save\" size=\"16\"></svg>\n </button>\n </ng-template>\n </ng-container>\n</ng-container>\n", styles: [".loading-container{display:flex;width:100%;justify-content:center}\n/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.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: "component", type: i3.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "directive", type: i1.RenderInPageHeaderDirective, selector: "[renderInPageHeader]", inputs: ["fullWidth"] }, { kind: "directive", type: i3.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i3.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: i1.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: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] }); }
1458
+ }
1459
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TranslationManagementComponent, decorators: [{
1460
+ type: Component,
1461
+ args: [{ selector: 'valtimo-translation-management', standalone: false, 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 localizationTranslationValues: localizationTranslationValues$ | async,\n loading: loading$ | async,\n disabled: disabled$ | async,\n multiInputTitles: multiInputTiles$ | async,\n amountOfArbitraryValues: amountOfArbitraryValues$ | async,\n showConfirmationModal: showConfirmationModal$,\n allChangedValuesValid: allChangedValuesValid$ | async,\n valuesChanged: valuesChanged$ | async,\n compactMode: compactMode$ | async,\n } as obs\"\n>\n <ng-container *ngIf=\"!obs.loading && obs.localizationTranslationValues; else loading\">\n <valtimo-carbon-multi-input\n [disabled]=\"obs.disabled\"\n [arbitraryAmountTitles]=\"obs.multiInputTitles\"\n [fullWidth]=\"true\"\n [minimumAmountOfRows]=\"0\"\n type=\"arbitraryAmount\"\n [arbitraryValueAmount]=\"obs.amountOfArbitraryValues\"\n [defaultValues]=\"obs.localizationTranslationValues\"\n (allValuesValidEvent)=\"validChange($event)\"\n (valueChange)=\"valueChange($event)\"\n addRowTranslationKey=\"translationManagement.add\"\n ></valtimo-carbon-multi-input>\n </ng-container>\n\n <ng-template #loading>\n <div class=\"loading-container\"><cds-loading></cds-loading></div>\n </ng-template>\n\n <valtimo-confirmation-modal\n [showModalSubject$]=\"obs.showConfirmationModal\"\n (confirmEvent)=\"saveAndRefresh()\"\n (optionalEvent)=\"saveAndStay()\"\n (cancelEvent)=\"cancel()\"\n [showOptionalButton]=\"true\"\n cancelButtonType=\"ghost\"\n optionalButtonType=\"secondary\"\n confirmButtonTextTranslationKey=\"translationManagement.saveWithReload\"\n optionalButtonTextTranslationKey=\"translationManagement.saveWithoutReload\"\n titleTranslationKey=\"translationManagement.modalTitle\"\n contentTranslationKey=\"translationManagement.modalContent\"\n [spacerAfterCancelButton]=\"true\"\n ></valtimo-confirmation-modal>\n\n <ng-container renderInPageHeader>\n <ng-template>\n <button\n cdsButton=\"primary\"\n [size]=\"obs.compactMode ? 'sm' : 'md'\"\n (click)=\"showModal()\"\n [disabled]=\"!obs.allChangedValuesValid || obs.disabled || !obs.valuesChanged\"\n >\n {{ 'interface.save' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"save\" size=\"16\"></svg>\n </button>\n </ng-template>\n </ng-container>\n</ng-container>\n", styles: [".loading-container{display:flex;width:100%;justify-content:center}\n/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
1462
+ }], ctorParameters: () => [{ type: i2$1.TranslateService }, { type: i2$3.LocalizationService }, { type: i1.PageHeaderService }, { type: Document, decorators: [{
1463
+ type: Inject,
1464
+ args: [DOCUMENT]
1465
+ }] }] });
1466
+
1467
+ /*
1468
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1469
+ *
1470
+ * Licensed under EUPL, Version 1.2 (the "License");
1471
+ * you may not use this file except in compliance with the License.
1472
+ * You may obtain a copy of the License at
1473
+ *
1474
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1475
+ *
1476
+ * Unless required by applicable law or agreed to in writing, software
1477
+ * distributed under the License is distributed on an "AS IS" basis,
1478
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1479
+ * See the License for the specific language governing permissions and
1480
+ * limitations under the License.
1481
+ */
1482
+
1483
+ /*
1484
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1485
+ *
1486
+ * Licensed under EUPL, Version 1.2 (the "License");
1487
+ * you may not use this file except in compliance with the License.
1488
+ * You may obtain a copy of the License at
1489
+ *
1490
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1491
+ *
1492
+ * Unless required by applicable law or agreed to in writing, software
1493
+ * distributed under the License is distributed on an "AS IS" basis,
1494
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1495
+ * See the License for the specific language governing permissions and
1496
+ * limitations under the License.
1497
+ */
1498
+ class WidgetFormioComponent {
1499
+ set documentId(value) {
1500
+ if (value)
1501
+ this._documentIdSubject$.next(value);
1502
+ }
1503
+ set widgetConfiguration(value) {
1504
+ if (!value)
1505
+ return;
1506
+ this._widgetConfigurationSubject$.next(value);
1507
+ }
1508
+ set widgetUuid(value) {
1509
+ this.widgetLayoutService.setWidgetDataLoaded(value);
1510
+ }
1511
+ get widgetConfiguration$() {
1512
+ return this._widgetConfigurationSubject$.pipe(filter(config => !!config));
1513
+ }
1514
+ get _documentId$() {
1515
+ return this._documentIdSubject$.pipe(filter(id => !!id));
1516
+ }
1517
+ constructor(formService, widgetLayoutService) {
1518
+ this.formService = formService;
1519
+ this.widgetLayoutService = widgetLayoutService;
1520
+ this._widgetConfigurationSubject$ = new BehaviorSubject(null);
1521
+ this._documentIdSubject$ = new BehaviorSubject('');
1522
+ this.prefilledFormDefinition$ = combineLatest([
1523
+ this.widgetConfiguration$,
1524
+ this._documentId$,
1525
+ ]).pipe(switchMap(([config, documentId]) => combineLatest([
1526
+ this.formService.getFormDefinitionByNamePreFilled(config.properties.formDefinitionName, documentId),
1527
+ of(config),
1528
+ ])), tap(() => {
1529
+ this.widgetLayoutService.setWidgetDataLoaded(this.widgetUuid);
1530
+ }), map(([formDef]) => formDef));
1531
+ }
1532
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetFormioComponent, deps: [{ token: i1$1.FormService }, { token: WidgetLayoutService }], target: i0.ɵɵFactoryTarget.Component }); }
1533
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: WidgetFormioComponent, isStandalone: true, selector: "valtimo-widget-formio", inputs: { documentId: "documentId", 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<div\n class=\"formio-widget\"\n *ngIf=\"{\n prefilledFormDefinition: prefilledFormDefinition$ | async,\n widgetConfiguration: widgetConfiguration$ | async,\n } as obs\"\n>\n <section class=\"formio-widget__header\">\n <h4 class=\"formio-widget__title\">{{ obs.widgetConfiguration$?.title || '-' }}</h4>\n\n <ng-content></ng-content>\n </section>\n\n <valtimo-form-io [form]=\"obs.prefilledFormDefinition\"></valtimo-form-io>\n</div>\n", styles: [".loading-container{display:flex;width:100%;flex-direction:row;justify-content:center}.error-message{text-align:center}\n/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "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: "ngmodule", type: FormIoModule }, { kind: "component", type: i1.FormioComponent, selector: "valtimo-form-io", inputs: ["options", "submission", "form", "readOnly", "formRefresh$"], outputs: ["submit", "change", "event"] }, { kind: "ngmodule", type: ButtonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1534
+ }
1535
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetFormioComponent, decorators: [{
1536
+ type: Component,
1537
+ args: [{ selector: 'valtimo-widget-formio', standalone: true, imports: [CommonModule, TranslateModule, FormIoModule, ButtonModule], 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<div\n class=\"formio-widget\"\n *ngIf=\"{\n prefilledFormDefinition: prefilledFormDefinition$ | async,\n widgetConfiguration: widgetConfiguration$ | async,\n } as obs\"\n>\n <section class=\"formio-widget__header\">\n <h4 class=\"formio-widget__title\">{{ obs.widgetConfiguration$?.title || '-' }}</h4>\n\n <ng-content></ng-content>\n </section>\n\n <valtimo-form-io [form]=\"obs.prefilledFormDefinition\"></valtimo-form-io>\n</div>\n", styles: [".loading-container{display:flex;width:100%;flex-direction:row;justify-content:center}.error-message{text-align:center}\n/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
1538
+ }], ctorParameters: () => [{ type: i1$1.FormService }, { type: WidgetLayoutService }], propDecorators: { documentId: [{
1539
+ type: Input
1540
+ }], widgetConfiguration: [{
1541
+ type: Input
1542
+ }], widgetUuid: [{
1543
+ type: Input
1544
+ }] } });
1545
+
1546
+ /*
1547
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1548
+ *
1549
+ * Licensed under EUPL, Version 1.2 (the "License");
1550
+ * you may not use this file except in compliance with the License.
1551
+ * You may obtain a copy of the License at
1552
+ *
1553
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1554
+ *
1555
+ * Unless required by applicable law or agreed to in writing, software
1556
+ * distributed under the License is distributed on an "AS IS" basis,
1557
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1558
+ * See the License for the specific language governing permissions and
1559
+ * limitations under the License.
1560
+ */
1561
+
1562
+ /*
1563
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1564
+ *
1565
+ * Licensed under EUPL, Version 1.2 (the "License");
1566
+ * you may not use this file except in compliance with the License.
1567
+ * You may obtain a copy of the License at
1568
+ *
1569
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1570
+ *
1571
+ * Unless required by applicable law or agreed to in writing, software
1572
+ * distributed under the License is distributed on an "AS IS" basis,
1573
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1574
+ * See the License for the specific language governing permissions and
1575
+ * limitations under the License.
1576
+ */
1577
+ class WidgetCollectionComponent {
1578
+ set widgetConfiguration(value) {
1579
+ if (!value)
1580
+ return;
1581
+ this.widgetConfiguration$.next(value);
1582
+ }
1583
+ get widgetData$() {
1584
+ return this._widgetData$.pipe(filter(data => !!data));
1585
+ }
1586
+ set widgetData(value) {
1587
+ if (!value)
1588
+ return;
1589
+ if (!this._initialNumberOfElements)
1590
+ this._initialNumberOfElements = value.numberOfElements;
1591
+ let widgetData = value;
1592
+ if (typeof value?.content?.length !== 'number')
1593
+ return;
1594
+ if (value.content.length < this._initialNumberOfElements) {
1595
+ const rows = new Array(this._initialNumberOfElements).fill(null);
1596
+ widgetData = {
1597
+ ...value,
1598
+ content: rows.map((_, index) => value.content[index] || { ...value[0], hidden: true }),
1599
+ };
1600
+ }
1601
+ this._widgetData$.next(widgetData);
1602
+ if (!this._paginationInitialized) {
1603
+ this.showPagination$.next(value.totalElements > value.size);
1604
+ this.paginationModel.set(value.totalPages < 0
1605
+ ? null
1606
+ : {
1607
+ currentPage: 1,
1608
+ totalDataLength: Math.ceil(value.totalElements / value.size),
1609
+ pageLength: value.size,
1610
+ });
1611
+ this._paginationInitialized = true;
1612
+ }
1613
+ else {
1614
+ this.paginationModel.update((model) => ({
1615
+ ...model,
1616
+ currentPage: value.number + 1,
1617
+ }));
1618
+ }
1619
+ this.cdr.detectChanges();
1620
+ }
1621
+ constructor(viewContentService, cdr) {
1622
+ this.viewContentService = viewContentService;
1623
+ this.cdr = cdr;
1624
+ this.class = 'valtimo-widget-collection';
1625
+ this.showPagination$ = new BehaviorSubject(false);
1626
+ this._widgetData$ = new BehaviorSubject(null);
1627
+ this._paginationInitialized = false;
1628
+ this.paginationEvent = new EventEmitter();
1629
+ this.noVisibleFields$ = new BehaviorSubject(true);
1630
+ this.widgetTitle = signal('-');
1631
+ this.widgetConfiguration$ = new BehaviorSubject(null);
1632
+ this.paginationModel = signal(new PaginationModel());
1633
+ this.amountOfColumns = signal(0);
1634
+ this.collectionWidgetCards$ = combineLatest([this.widgetConfiguration$, this.widgetData$]).pipe(filter(([widgetConfig, widgetData]) => !!widgetConfig && !!widgetData), tap(([widgetConfig]) => {
1635
+ this.widgetTitle.set(widgetConfig.title);
1636
+ }), map(([widgetConfig, widgetData]) => widgetData.content.map((cardData, index) => ({
1637
+ hidden: cardData.hidden,
1638
+ key: index,
1639
+ title: this.getCardTitle({
1640
+ value: cardData.title,
1641
+ displayProperties: widgetConfig?.properties?.title?.displayProperties,
1642
+ }),
1643
+ fields: widgetConfig?.properties.fields.reduce((cardFieldsAccumulator, currentField) => [
1644
+ ...cardFieldsAccumulator,
1645
+ this.getCardField(currentField, cardData),
1646
+ ], []),
1647
+ }))), tap(card => this.checkEmptyFields(card)));
1648
+ }
1649
+ ngAfterViewInit() {
1650
+ this.openWidthObserver();
1651
+ }
1652
+ ngOnDestroy() {
1653
+ this._observer?.disconnect();
1654
+ }
1655
+ onSelectPage(page) {
1656
+ this.paginationEvent.emit({ ...this.paginationModel(), currentPage: page });
1657
+ }
1658
+ getCardField(field, data) {
1659
+ const resolvedValue = this.viewContentService.get(data.fields && field.key ? data.fields[field.key] : '', {
1660
+ ...field.displayProperties,
1661
+ viewType: field.displayProperties?.type ?? WidgetDisplayTypeKey.TEXT,
1662
+ });
1663
+ return {
1664
+ key: field.key,
1665
+ title: field.title,
1666
+ width: field.width,
1667
+ value: resolvedValue || data.fields[field.key],
1668
+ hideWhenEmpty: field.displayProperties?.hideWhenEmpty,
1669
+ };
1670
+ }
1671
+ openWidthObserver() {
1672
+ this._observer = new ResizeObserver(event => {
1673
+ this.observerMutation(event);
1674
+ });
1675
+ this._observer.observe(this._widgetCollectionRef.nativeElement);
1676
+ }
1677
+ observerMutation(event) {
1678
+ const elementWidth = event[0]?.borderBoxSize[0]?.inlineSize;
1679
+ if (typeof elementWidth === 'number' && elementWidth !== 0) {
1680
+ if (elementWidth < 640) {
1681
+ this.amountOfColumns.set(1);
1682
+ }
1683
+ else if (elementWidth > 640 && elementWidth <= 768) {
1684
+ this.amountOfColumns.set(2);
1685
+ }
1686
+ else if (elementWidth > 768 && elementWidth <= 1080) {
1687
+ this.amountOfColumns.set(3);
1688
+ }
1689
+ else if (elementWidth > 1080) {
1690
+ this.amountOfColumns.set(4);
1691
+ }
1692
+ }
1693
+ }
1694
+ getCardTitle(collectionCaseWidgetTitle) {
1695
+ const widgetTitleValue = collectionCaseWidgetTitle.value;
1696
+ const widgetTitleDisplayProperties = collectionCaseWidgetTitle.displayProperties;
1697
+ if (!widgetTitleDisplayProperties && widgetTitleValue) {
1698
+ return widgetTitleValue;
1699
+ }
1700
+ else if (widgetTitleDisplayProperties && widgetTitleValue) {
1701
+ const convertedTitle = this.viewContentService.get(widgetTitleValue, {
1702
+ ...widgetTitleDisplayProperties,
1703
+ viewType: widgetTitleDisplayProperties.type,
1704
+ hideWhenEmpty: widgetTitleDisplayProperties.hideWhenEmpty,
1705
+ });
1706
+ if (convertedTitle)
1707
+ return convertedTitle;
1708
+ }
1709
+ return '-';
1710
+ }
1711
+ checkEmptyFields(card) {
1712
+ card.forEach(collection => {
1713
+ collection.fields.forEach(field => {
1714
+ if (!field.hideWhenEmpty || (field.hideWhenEmpty && field.value && field.value !== '-'))
1715
+ this.noVisibleFields$.next(false);
1716
+ });
1717
+ });
1718
+ }
1719
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetCollectionComponent, deps: [{ token: i1.ViewContentService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1720
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: WidgetCollectionComponent, isStandalone: true, selector: "valtimo-widget-collection", inputs: { widgetConfiguration: "widgetConfiguration", widgetData: "widgetData" }, outputs: { paginationEvent: "paginationEvent" }, host: { properties: { "class": "this.class" } }, viewQueries: [{ propertyName: "_widgetCollectionRef", first: true, predicate: ["widgetCollection"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n *ngIf=\"{\n widgetConfiguration: widgetConfiguration$ | async,\n collectionWidgetCards: collectionWidgetCards$ | async,\n noVisibleFields: noVisibleFields$ | async,\n } as obs\"\n>\n <section class=\"valtimo-widget-collection__header\">\n <span class=\"valtimo-widget-collection__title\">{{ widgetTitle() }}</span>\n\n <ng-content></ng-content>\n </section>\n\n <div\n #widgetCollection\n [ngClass]=\"{\n 'valtimo-widget-collection__render-vertically': amountOfColumns() === 1,\n 'valtimo-widget-collection__render-two-columns': amountOfColumns() === 2,\n 'valtimo-widget-collection__render-three-columns': amountOfColumns() === 3,\n 'valtimo-widget-collection__container': amountOfColumns() === 4,\n }\"\n >\n @for (card of obs?.collectionWidgetCards; track card.key) {\n <div\n *ngIf=\"!obs.noVisibleFields\"\n class=\"valtimo-widget-collection__card\"\n [ngClass]=\"{'valtimo-widget-collection__card--hidden': card.hidden}\"\n >\n <span class=\"valtimo-widget-collection__card-title\">{{ card.title }}</span>\n\n @for (field of card.fields; track field.key) {\n <div\n *ngIf=\"\n (field?.value !== null && field?.value !== '-' && field?.hideWhenEmpty) ||\n !field?.hideWhenEmpty\n \"\n [ngClass]=\"{\n 'valtimo-widget-collection__full-width-input': field?.width === 'full',\n 'valtimo-widget-collection__half-width-input': field?.width === 'half',\n }\"\n >\n <cds-label class=\"valtimo-widget-collection__label\" [attr.title]=\"field?.title\">\n {{ field?.title }}\n\n <input\n [value]=\"field?.value\"\n [readonly]=\"true\"\n class=\"valtimo-widget-collection__card-input\"\n cdsText\n />\n </cds-label>\n </div>\n }\n </div>\n }\n </div>\n\n @if (obs.noVisibleFields || !obs?.collectionWidgetCards?.length) {\n <valtimo-no-results\n [collapseVertically]=\"true\"\n [description]=\"\n (obs.noVisibleFields ? 'case.widgets.emptyFields' : 'case.widgets.noData') | translate\n \"\n [smallPadding]=\"true\"\n ></valtimo-no-results>\n }\n\n <cds-pagination-nav\n *ngIf=\"paginationModel() && (showPagination$ | async)\"\n class=\"valtimo-widget-collection__pagination\"\n [model]=\"paginationModel()\"\n (selectPage)=\"onSelectPage($event)\"\n >\n </cds-pagination-nav>\n</ng-container>\n", styles: [".valtimo-widget-collection{padding:24px}.valtimo-widget-collection .cds--label{overflow:hidden;text-overflow:ellipsis;width:100%}.valtimo-widget-collection__header{display:flex;align-items:center;justify-content:space-between}.valtimo-widget-collection__title{color:var(--cds-text-primary);font-weight:600;font-size:16px;line-height:24px}.valtimo-widget-collection__container{display:flex;column-gap:16px}.valtimo-widget-collection,.valtimo-widget-collection__column{display:flex;flex-direction:column;width:100%;overflow:hidden}.valtimo-widget-collection__card{margin-top:16px;display:flex;flex-flow:row wrap;background-color:var(--cds-background);padding:16px;width:100%;gap:16px}.valtimo-widget-collection__card--hidden{visibility:hidden}.valtimo-widget-collection__card-title{color:var(--cds-text-primary);font-weight:500;font-size:14px;line-height:22px;font-style:italic;width:100%}.valtimo-widget-collection__card-input{background:transparent}.valtimo-widget-collection__full-width-input{width:100%}.valtimo-widget-collection__half-width-input{width:calc(50% - 16px);box-sizing:border-box}.valtimo-widget-collection__pagination{padding:8px 0;display:flex;justify-content:center}.valtimo-widget-collection__render-vertically,.valtimo-widget-collection__render-two-columns,.valtimo-widget-collection__render-three-columns{grid-gap:16px;align-items:stretch;overflow:hidden;text-overflow:ellipsis;width:100%}.valtimo-widget-collection__render-vertically{display:flex!important}.valtimo-widget-collection__render-two-columns{grid-template-columns:repeat(2,1fr)}.valtimo-widget-collection__render-three-columns{grid-template-columns:repeat(3,1fr)}\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.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: InputModule }, { kind: "component", type: i3.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i3.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "ngmodule", type: PaginationModule }, { kind: "component", type: i3.PaginationNav, selector: "cds-pagination-nav, ibm-pagination-navm", inputs: ["model", "disabled", "numOfItemsToShow", "translations", "size"], outputs: ["selectPage"] }, { kind: "ngmodule", type: TilesModule }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i1.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ButtonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1721
+ }
1722
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetCollectionComponent, decorators: [{
1723
+ type: Component,
1724
+ args: [{ selector: 'valtimo-widget-collection', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [
1725
+ CommonModule,
1726
+ InputModule,
1727
+ PaginationModule,
1728
+ TilesModule,
1729
+ CarbonListModule,
1730
+ TranslateModule,
1731
+ ButtonModule,
1732
+ ], 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 widgetConfiguration: widgetConfiguration$ | async,\n collectionWidgetCards: collectionWidgetCards$ | async,\n noVisibleFields: noVisibleFields$ | async,\n } as obs\"\n>\n <section class=\"valtimo-widget-collection__header\">\n <span class=\"valtimo-widget-collection__title\">{{ widgetTitle() }}</span>\n\n <ng-content></ng-content>\n </section>\n\n <div\n #widgetCollection\n [ngClass]=\"{\n 'valtimo-widget-collection__render-vertically': amountOfColumns() === 1,\n 'valtimo-widget-collection__render-two-columns': amountOfColumns() === 2,\n 'valtimo-widget-collection__render-three-columns': amountOfColumns() === 3,\n 'valtimo-widget-collection__container': amountOfColumns() === 4,\n }\"\n >\n @for (card of obs?.collectionWidgetCards; track card.key) {\n <div\n *ngIf=\"!obs.noVisibleFields\"\n class=\"valtimo-widget-collection__card\"\n [ngClass]=\"{'valtimo-widget-collection__card--hidden': card.hidden}\"\n >\n <span class=\"valtimo-widget-collection__card-title\">{{ card.title }}</span>\n\n @for (field of card.fields; track field.key) {\n <div\n *ngIf=\"\n (field?.value !== null && field?.value !== '-' && field?.hideWhenEmpty) ||\n !field?.hideWhenEmpty\n \"\n [ngClass]=\"{\n 'valtimo-widget-collection__full-width-input': field?.width === 'full',\n 'valtimo-widget-collection__half-width-input': field?.width === 'half',\n }\"\n >\n <cds-label class=\"valtimo-widget-collection__label\" [attr.title]=\"field?.title\">\n {{ field?.title }}\n\n <input\n [value]=\"field?.value\"\n [readonly]=\"true\"\n class=\"valtimo-widget-collection__card-input\"\n cdsText\n />\n </cds-label>\n </div>\n }\n </div>\n }\n </div>\n\n @if (obs.noVisibleFields || !obs?.collectionWidgetCards?.length) {\n <valtimo-no-results\n [collapseVertically]=\"true\"\n [description]=\"\n (obs.noVisibleFields ? 'case.widgets.emptyFields' : 'case.widgets.noData') | translate\n \"\n [smallPadding]=\"true\"\n ></valtimo-no-results>\n }\n\n <cds-pagination-nav\n *ngIf=\"paginationModel() && (showPagination$ | async)\"\n class=\"valtimo-widget-collection__pagination\"\n [model]=\"paginationModel()\"\n (selectPage)=\"onSelectPage($event)\"\n >\n </cds-pagination-nav>\n</ng-container>\n", styles: [".valtimo-widget-collection{padding:24px}.valtimo-widget-collection .cds--label{overflow:hidden;text-overflow:ellipsis;width:100%}.valtimo-widget-collection__header{display:flex;align-items:center;justify-content:space-between}.valtimo-widget-collection__title{color:var(--cds-text-primary);font-weight:600;font-size:16px;line-height:24px}.valtimo-widget-collection__container{display:flex;column-gap:16px}.valtimo-widget-collection,.valtimo-widget-collection__column{display:flex;flex-direction:column;width:100%;overflow:hidden}.valtimo-widget-collection__card{margin-top:16px;display:flex;flex-flow:row wrap;background-color:var(--cds-background);padding:16px;width:100%;gap:16px}.valtimo-widget-collection__card--hidden{visibility:hidden}.valtimo-widget-collection__card-title{color:var(--cds-text-primary);font-weight:500;font-size:14px;line-height:22px;font-style:italic;width:100%}.valtimo-widget-collection__card-input{background:transparent}.valtimo-widget-collection__full-width-input{width:100%}.valtimo-widget-collection__half-width-input{width:calc(50% - 16px);box-sizing:border-box}.valtimo-widget-collection__pagination{padding:8px 0;display:flex;justify-content:center}.valtimo-widget-collection__render-vertically,.valtimo-widget-collection__render-two-columns,.valtimo-widget-collection__render-three-columns{grid-gap:16px;align-items:stretch;overflow:hidden;text-overflow:ellipsis;width:100%}.valtimo-widget-collection__render-vertically{display:flex!important}.valtimo-widget-collection__render-two-columns{grid-template-columns:repeat(2,1fr)}.valtimo-widget-collection__render-three-columns{grid-template-columns:repeat(3,1fr)}\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"] }]
1733
+ }], ctorParameters: () => [{ type: i1.ViewContentService }, { type: i0.ChangeDetectorRef }], propDecorators: { class: [{
1734
+ type: HostBinding,
1735
+ args: ['class']
1736
+ }], _widgetCollectionRef: [{
1737
+ type: ViewChild,
1738
+ args: ['widgetCollection']
1739
+ }], widgetConfiguration: [{
1740
+ type: Input
1741
+ }], widgetData: [{
1742
+ type: Input
1743
+ }], paginationEvent: [{
1744
+ type: Output
1745
+ }] } });
1746
+
1747
+ /*
1748
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1749
+ *
1750
+ * Licensed under EUPL, Version 1.2 (the "License");
1751
+ * you may not use this file except in compliance with the License.
1752
+ * You may obtain a copy of the License at
1753
+ *
1754
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1755
+ *
1756
+ * Unless required by applicable law or agreed to in writing, software
1757
+ * distributed under the License is distributed on an "AS IS" basis,
1758
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1759
+ * See the License for the specific language governing permissions and
1760
+ * limitations under the License.
1761
+ */
1762
+
1763
+ /*
1764
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1765
+ *
1766
+ * Licensed under EUPL, Version 1.2 (the "License");
1767
+ * you may not use this file except in compliance with the License.
1768
+ * You may obtain a copy of the License at
1769
+ *
1770
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1771
+ *
1772
+ * Unless required by applicable law or agreed to in writing, software
1773
+ * distributed under the License is distributed on an "AS IS" basis,
1774
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1775
+ * See the License for the specific language governing permissions and
1776
+ * limitations under the License.
1777
+ */
1778
+ class WidgetTableComponent {
1779
+ get widgetConfiguration() {
1780
+ return this._widgetConfiguration;
1781
+ }
1782
+ set widgetConfiguration(value) {
1783
+ this._widgetConfiguration = value;
1784
+ this.fields$.next(value.properties.columns.map((column, index) => ({
1785
+ key: column.key,
1786
+ label: column.title,
1787
+ viewType: column.displayProperties?.type ?? ViewType.TEXT,
1788
+ className: `valtimo-widget-table--transparent ${index === 0 && value.properties.firstColumnAsTitle ? 'valtimo-widget-table--title' : ''}`,
1789
+ ...(!!column.displayProperties?.['format'] && {
1790
+ format: column.displayProperties['format'],
1791
+ }),
1792
+ ...(!!column.displayProperties?.['digitsInfo'] && {
1793
+ digitsInfo: column.displayProperties['digitsInfo'],
1794
+ }),
1795
+ ...(!!column.displayProperties?.['display'] && {
1796
+ display: column.displayProperties['display'],
1797
+ }),
1798
+ ...(!!column.displayProperties?.['currencyCode'] && {
1799
+ currencyCode: column.displayProperties['currencyCode'],
1800
+ }),
1801
+ ...(!!column.displayProperties?.['values'] && {
1802
+ values: column.displayProperties['values'],
1803
+ }),
1804
+ })));
1805
+ this.cdr.detectChanges();
1806
+ }
1807
+ set widgetData(value) {
1808
+ if (!value)
1809
+ return;
1810
+ this.showPagination.set(value.totalElements > value.size);
1811
+ if (!this._initialNumberOfElements)
1812
+ this._initialNumberOfElements = value.numberOfElements;
1813
+ let widgetData = value.content;
1814
+ if (typeof value?.content?.length !== 'number')
1815
+ return;
1816
+ if (value.content.length < this._initialNumberOfElements) {
1817
+ const rows = new Array(this._initialNumberOfElements).fill(null);
1818
+ widgetData = rows.map((_, index) => value.content[index] || { ...value[0], hidden: true });
1819
+ }
1820
+ this.widgetData$.next(widgetData);
1821
+ if (!this._paginationInitialized) {
1822
+ this.showPagination.set(value.totalElements > value.size);
1823
+ this.paginationModel.set(value.totalPages < 0
1824
+ ? null
1825
+ : {
1826
+ currentPage: 1,
1827
+ totalDataLength: Math.ceil(value.totalElements / value.size),
1828
+ pageLength: value.size,
1829
+ });
1830
+ this._paginationInitialized = true;
1831
+ }
1832
+ else {
1833
+ this.paginationModel.update((model) => !model
1834
+ ? null
1835
+ : {
1836
+ ...model,
1837
+ currentPage: value.number + 1,
1838
+ });
1839
+ }
1840
+ this.cdr.detectChanges();
1841
+ }
1842
+ constructor(cdr) {
1843
+ this.cdr = cdr;
1844
+ this.showPagination = signal(false);
1845
+ this.widgetData$ = new BehaviorSubject(null);
1846
+ this._paginationInitialized = false;
1847
+ this.paginationEvent = new EventEmitter();
1848
+ this.fields$ = new BehaviorSubject([]);
1849
+ this.paginationModel = signal(new PaginationModel());
1850
+ }
1851
+ onSelectPage(page) {
1852
+ const paginationModel = this.paginationModel();
1853
+ if (!paginationModel)
1854
+ return;
1855
+ this.paginationEvent.emit({ ...paginationModel, currentPage: page });
1856
+ }
1857
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetTableComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1858
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: WidgetTableComponent, isStandalone: true, selector: "valtimo-widget-table", inputs: { widgetConfiguration: "widgetConfiguration", widgetData: "widgetData" }, outputs: { paginationEvent: "paginationEvent" }, 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-tile\n *ngIf=\"{\n fields: fields$ | async,\n widgetData: widgetData$ | async,\n } as obs\"\n class=\"valtimo-widget-table\"\n>\n <section class=\"valtimo-widget-table__header\">\n <span class=\"widget-title\">{{ widgetConfiguration?.title }}</span>\n\n <ng-content></ng-content>\n </section>\n\n @if (obs.widgetData && obs.fields && obs.widgetData.length) {\n <section class=\"valtimo-widget-table__content\">\n <valtimo-carbon-list\n [header]=\"false\"\n [hideToolbar]=\"true\"\n [fields]=\"obs.fields\"\n [items]=\"obs.widgetData\"\n >\n </valtimo-carbon-list>\n\n <cds-pagination-nav\n *ngIf=\"paginationModel() && showPagination()\"\n class=\"valtimo-widget-table__pagination\"\n [model]=\"paginationModel()\"\n (selectPage)=\"onSelectPage($event)\"\n >\n </cds-pagination-nav>\n </section>\n } @else {\n <valtimo-no-results\n [collapseVertically]=\"true\"\n [description]=\"'case.widgets.noData' | translate\"\n [smallPadding]=\"true\"\n ></valtimo-no-results>\n }\n</cds-tile>\n", styles: [".valtimo-widget-table{padding:24px;display:flex;flex-direction:column;gap:16px}.valtimo-widget-table__header{display:flex;align-items:center;justify-content:space-between}.valtimo-widget-table__content{display:flex;align-items:center;flex-direction:column}.valtimo-widget-table__content valtimo-carbon-list{width:100%}.valtimo-widget-table__pagination{padding:8px 0}.valtimo-widget-table .cds--data-table>thead{background:transparent!important}.valtimo-widget-table .cds--data-table td,.valtimo-widget-table .cds--data-table tr,.valtimo-widget-table .cds--data-table th{display:flex;width:100%}.valtimo-widget-table .cds--data-table td{white-space:nowrap;overflow:hidden}.valtimo-widget-table .cds--data-table td span{text-overflow:ellipsis;overflow:hidden}.valtimo-widget-table .cds--data-table tr{gap:16px}.valtimo-widget-table .cds--table-header-label>span{font-weight:400;font-size:12px;color:var(--cds-text-secondary)}.valtimo-widget-table--transparent{background:transparent!important}.valtimo-widget-table--title{border:none!important;font-style:italic}.valtimo-widget-table .widget-title{color:var(--cds-text-primary);font-weight:600;font-size:16px;line-height:24px}\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.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.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "ngmodule", type: PaginationModule }, { kind: "component", type: i3.PaginationNav, selector: "cds-pagination-nav, ibm-pagination-navm", inputs: ["model", "disabled", "numOfItemsToShow", "translations", "size"], outputs: ["selectPage"] }, { kind: "ngmodule", type: TilesModule }, { kind: "component", type: i3.Tile, selector: "cds-tile, ibm-tile", inputs: ["theme"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ButtonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1859
+ }
1860
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetTableComponent, decorators: [{
1861
+ type: Component,
1862
+ args: [{ selector: 'valtimo-widget-table', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [
1863
+ CommonModule,
1864
+ CarbonListModule,
1865
+ PaginationModule,
1866
+ TilesModule,
1867
+ TranslateModule,
1868
+ ButtonModule,
1869
+ ], 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-tile\n *ngIf=\"{\n fields: fields$ | async,\n widgetData: widgetData$ | async,\n } as obs\"\n class=\"valtimo-widget-table\"\n>\n <section class=\"valtimo-widget-table__header\">\n <span class=\"widget-title\">{{ widgetConfiguration?.title }}</span>\n\n <ng-content></ng-content>\n </section>\n\n @if (obs.widgetData && obs.fields && obs.widgetData.length) {\n <section class=\"valtimo-widget-table__content\">\n <valtimo-carbon-list\n [header]=\"false\"\n [hideToolbar]=\"true\"\n [fields]=\"obs.fields\"\n [items]=\"obs.widgetData\"\n >\n </valtimo-carbon-list>\n\n <cds-pagination-nav\n *ngIf=\"paginationModel() && showPagination()\"\n class=\"valtimo-widget-table__pagination\"\n [model]=\"paginationModel()\"\n (selectPage)=\"onSelectPage($event)\"\n >\n </cds-pagination-nav>\n </section>\n } @else {\n <valtimo-no-results\n [collapseVertically]=\"true\"\n [description]=\"'case.widgets.noData' | translate\"\n [smallPadding]=\"true\"\n ></valtimo-no-results>\n }\n</cds-tile>\n", styles: [".valtimo-widget-table{padding:24px;display:flex;flex-direction:column;gap:16px}.valtimo-widget-table__header{display:flex;align-items:center;justify-content:space-between}.valtimo-widget-table__content{display:flex;align-items:center;flex-direction:column}.valtimo-widget-table__content valtimo-carbon-list{width:100%}.valtimo-widget-table__pagination{padding:8px 0}.valtimo-widget-table .cds--data-table>thead{background:transparent!important}.valtimo-widget-table .cds--data-table td,.valtimo-widget-table .cds--data-table tr,.valtimo-widget-table .cds--data-table th{display:flex;width:100%}.valtimo-widget-table .cds--data-table td{white-space:nowrap;overflow:hidden}.valtimo-widget-table .cds--data-table td span{text-overflow:ellipsis;overflow:hidden}.valtimo-widget-table .cds--data-table tr{gap:16px}.valtimo-widget-table .cds--table-header-label>span{font-weight:400;font-size:12px;color:var(--cds-text-secondary)}.valtimo-widget-table--transparent{background:transparent!important}.valtimo-widget-table--title{border:none!important;font-style:italic}.valtimo-widget-table .widget-title{color:var(--cds-text-primary);font-weight:600;font-size:16px;line-height:24px}\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"] }]
1870
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { widgetConfiguration: [{
1871
+ type: Input,
1872
+ args: [{ required: true }]
1873
+ }], widgetData: [{
1874
+ type: Input,
1875
+ args: [{ required: true }]
1876
+ }], paginationEvent: [{
1877
+ type: Output
1878
+ }] } });
1879
+
1880
+ /*
1881
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1882
+ *
1883
+ * Licensed under EUPL, Version 1.2 (the "License");
1884
+ * you may not use this file except in compliance with the License.
1885
+ * You may obtain a copy of the License at
1886
+ *
1887
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1888
+ *
1889
+ * Unless required by applicable law or agreed to in writing, software
1890
+ * distributed under the License is distributed on an "AS IS" basis,
1891
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1892
+ * See the License for the specific language governing permissions and
1893
+ * limitations under the License.
1894
+ */
1895
+
1896
+ /*
1897
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1898
+ *
1899
+ * Licensed under EUPL, Version 1.2 (the "License");
1900
+ * you may not use this file except in compliance with the License.
1901
+ * You may obtain a copy of the License at
1902
+ *
1903
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1904
+ *
1905
+ * Unless required by applicable law or agreed to in writing, software
1906
+ * distributed under the License is distributed on an "AS IS" basis,
1907
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1908
+ * See the License for the specific language governing permissions and
1909
+ * limitations under the License.
1910
+ */
1911
+ class WidgetCustomComponent {
1912
+ set widgetConfiguration(value) {
1913
+ if (!value)
1914
+ return;
1915
+ this._widgetConfigSubject$.next(value);
1916
+ }
1917
+ set widgetUuid(value) {
1918
+ this.widgetLayoutService.setWidgetDataLoaded(value);
1919
+ }
1920
+ get widgetConfig$() {
1921
+ return this._widgetConfigSubject$.pipe(filter(config => config !== null));
1922
+ }
1923
+ constructor(customWidgetConfig, cdr, widgetLayoutService, documentService, permissionService) {
1924
+ this.customWidgetConfig = customWidgetConfig;
1925
+ this.cdr = cdr;
1926
+ this.widgetLayoutService = widgetLayoutService;
1927
+ this.documentService = documentService;
1928
+ this.permissionService = permissionService;
1929
+ this._customWidgetConfig$ = new BehaviorSubject({});
1930
+ this._widgetConfigSubject$ = new BehaviorSubject(null);
1931
+ this.noCustomComponentAvailable = signal(false);
1932
+ this._subscriptions = new Subscription();
1933
+ if (customWidgetConfig)
1934
+ this._customWidgetConfig$.next(this.customWidgetConfig);
1935
+ }
1936
+ ngAfterViewInit() {
1937
+ this.openCustomWidgetSubscription();
1938
+ }
1939
+ ngOnDestroy() {
1940
+ this._subscriptions.unsubscribe();
1941
+ }
1942
+ openCustomWidgetSubscription() {
1943
+ this._subscriptions.add(combineLatest([this.widgetConfig$, this._customWidgetConfig$]).subscribe(([widgetConfig, customCaseWidgetConfig]) => {
1944
+ const customWidgetComponentKey = widgetConfig?.properties?.componentKey;
1945
+ const customComponent = customCaseWidgetConfig[customWidgetComponentKey];
1946
+ if (!customComponent) {
1947
+ this.noCustomComponentAvailable.set(true);
1948
+ return;
1949
+ }
1950
+ const componentRef = this._customWidgetContainerRef.createComponent(customComponent);
1951
+ componentRef.changeDetectorRef.detectChanges();
1952
+ this.cdr.detectChanges();
1953
+ }));
1954
+ }
1955
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetCustomComponent, deps: [{ token: CUSTOM_WIDGET_TOKEN, optional: true }, { token: i0.ChangeDetectorRef }, { token: WidgetLayoutService }, { token: i2$4.DocumentService }, { token: i3$1.PermissionService }], target: i0.ɵɵFactoryTarget.Component }); }
1956
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: WidgetCustomComponent, isStandalone: true, selector: "valtimo-widget-custom", inputs: { widgetConfiguration: "widgetConfiguration", widgetUuid: "widgetUuid" }, viewQueries: [{ propertyName: "_customWidgetContainerRef", first: true, predicate: ["customWidgetContainer"], 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<div *ngIf=\"{widgetConfig: widgetConfig$ | async} as obs\" class=\"custom-widget\">\n <section class=\"custom-widget__header\">\n <h4 class=\"custom-widget__title\">{{ obs.widgetConfig$?.title || '-' }}</h4>\n\n <ng-content></ng-content>\n </section>\n\n <div class=\"custom-widget__content\">\n <ng-template #customWidgetContainer></ng-template>\n\n @if (noCustomComponentAvailable()) {\n <valtimo-no-results\n [collapseVertically]=\"true\"\n [description]=\"'case.widgets.noCustomComponentDescription' | translate\"\n [smallPadding]=\"true\"\n ></valtimo-no-results>\n }\n </div>\n</div>\n", styles: [".custom-widget{padding:24px}.custom-widget__header{display:flex;align-items:center;justify-content:space-between}.custom-widget__title{color:var(--cds-text-primary);font-weight:600;font-size:16px;line-height:24px}\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.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ButtonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1957
+ }
1958
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetCustomComponent, decorators: [{
1959
+ type: Component,
1960
+ args: [{ selector: 'valtimo-widget-custom', standalone: true, imports: [CommonModule, CarbonListModule, TranslateModule, ButtonModule], 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<div *ngIf=\"{widgetConfig: widgetConfig$ | async} as obs\" class=\"custom-widget\">\n <section class=\"custom-widget__header\">\n <h4 class=\"custom-widget__title\">{{ obs.widgetConfig$?.title || '-' }}</h4>\n\n <ng-content></ng-content>\n </section>\n\n <div class=\"custom-widget__content\">\n <ng-template #customWidgetContainer></ng-template>\n\n @if (noCustomComponentAvailable()) {\n <valtimo-no-results\n [collapseVertically]=\"true\"\n [description]=\"'case.widgets.noCustomComponentDescription' | translate\"\n [smallPadding]=\"true\"\n ></valtimo-no-results>\n }\n </div>\n</div>\n", styles: [".custom-widget{padding:24px}.custom-widget__header{display:flex;align-items:center;justify-content:space-between}.custom-widget__title{color:var(--cds-text-primary);font-weight:600;font-size:16px;line-height:24px}\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"] }]
1961
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1962
+ type: Optional
1963
+ }, {
1964
+ type: Inject,
1965
+ args: [CUSTOM_WIDGET_TOKEN]
1966
+ }] }, { type: i0.ChangeDetectorRef }, { type: WidgetLayoutService }, { type: i2$4.DocumentService }, { type: i3$1.PermissionService }], propDecorators: { _customWidgetContainerRef: [{
1967
+ type: ViewChild,
1968
+ args: ['customWidgetContainer', { read: ViewContainerRef }]
1969
+ }], widgetConfiguration: [{
1970
+ type: Input
1971
+ }], widgetUuid: [{
1972
+ type: Input
1973
+ }] } });
1974
+
1975
+ /*
1976
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1977
+ *
1978
+ * Licensed under EUPL, Version 1.2 (the "License");
1979
+ * you may not use this file except in compliance with the License.
1980
+ * You may obtain a copy of the License at
1981
+ *
1982
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1983
+ *
1984
+ * Unless required by applicable law or agreed to in writing, software
1985
+ * distributed under the License is distributed on an "AS IS" basis,
1986
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1987
+ * See the License for the specific language governing permissions and
1988
+ * limitations under the License.
1989
+ */
1990
+
1991
+ /*
1992
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1993
+ *
1994
+ * Licensed under EUPL, Version 1.2 (the "License");
1995
+ * you may not use this file except in compliance with the License.
1996
+ * You may obtain a copy of the License at
1997
+ *
1998
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1999
+ *
2000
+ * Unless required by applicable law or agreed to in writing, software
2001
+ * distributed under the License is distributed on an "AS IS" basis,
2002
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2003
+ * See the License for the specific language governing permissions and
2004
+ * limitations under the License.
2005
+ */
2006
+ class WidgetBlockComponent {
2007
+ set widget(value) {
2008
+ this._widgetUuid = value.uuid;
2009
+ this._widget$.next(value);
2010
+ }
2011
+ get widget$() {
2012
+ return this._widget$.pipe(filter(widget => widget !== null));
2013
+ }
2014
+ get _viewContainerRef$() {
2015
+ return this._viewContainerRefSubject$.pipe(filter(ref => !!ref));
2016
+ }
2017
+ constructor(widgetLayoutService, route, cdsThemeService, renderer, viewRef) {
2018
+ this.widgetLayoutService = widgetLayoutService;
2019
+ this.route = route;
2020
+ this.cdsThemeService = cdsThemeService;
2021
+ this.renderer = renderer;
2022
+ this.viewRef = viewRef;
2023
+ this._widget$ = new BehaviorSubject(null);
2024
+ this._viewContainerRefSubject$ = new BehaviorSubject(null);
2025
+ this._contentHeight$ = new BehaviorSubject(0);
2026
+ this.blockHeightPx$ = combineLatest([
2027
+ this._contentHeight$,
2028
+ this._viewContainerRef$,
2029
+ ]).pipe(filter(([contentHeight]) => contentHeight !== 0), tap(([contentHeight, viewRef]) => {
2030
+ const blockHeight = Math.ceil((contentHeight + 16) / WIDGET_HEIGHT_1X) * WIDGET_HEIGHT_1X;
2031
+ this.renderer.setStyle(viewRef.element.nativeElement, 'height', `${blockHeight}px`);
2032
+ this.widgetLayoutService.triggerMuuriLayout();
2033
+ }));
2034
+ this.blockWidthPercentage$ = combineLatest([
2035
+ this.widgetLayoutService.amountOfColumns$,
2036
+ this.widget$,
2037
+ this._viewContainerRef$,
2038
+ ]).pipe(tap(([amountOfColumns, widget, viewRef]) => {
2039
+ const percentage = widget.width > amountOfColumns ? 100 : (widget.width / amountOfColumns) * 100;
2040
+ this.renderer.setStyle(viewRef.element.nativeElement, 'width', `${percentage}%`);
2041
+ this.widgetLayoutService.triggerMuuriLayout();
2042
+ }));
2043
+ this.documentId$ = this.route.params.pipe(map(params => params?.documentId), filter(documentId => !!documentId));
2044
+ this.theme$ = combineLatest([this.cdsThemeService.currentTheme$, this.widget$]).pipe(map(([currentTheme, widgetConfiguration]) => {
2045
+ return currentTheme === CurrentCarbonTheme.G10
2046
+ ? widgetConfiguration.highContrast
2047
+ ? CARBON_THEME.G100
2048
+ : CARBON_THEME.G10
2049
+ : widgetConfiguration.highContrast
2050
+ ? CARBON_THEME.WHITE
2051
+ : CARBON_THEME.G90;
2052
+ }));
2053
+ this._subscriptions = new Subscription();
2054
+ }
2055
+ ngAfterViewInit() {
2056
+ this._viewContainerRefSubject$.next(this.viewRef);
2057
+ this.openContentHeightObserver();
2058
+ this.openWidgetComponentSubscription();
2059
+ }
2060
+ ngOnDestroy() {
2061
+ this._subscriptions.unsubscribe();
2062
+ this._observer?.disconnect();
2063
+ }
2064
+ openContentHeightObserver() {
2065
+ this._observer = new ResizeObserver(event => {
2066
+ this.observerMutation(event);
2067
+ });
2068
+ this._observer.observe(this._widgetBlockContentRef.nativeElement);
2069
+ }
2070
+ observerMutation(event) {
2071
+ const widgetContentHeight = event[0]?.borderBoxSize[0]?.blockSize;
2072
+ if (typeof widgetContentHeight === 'number' && widgetContentHeight !== 0) {
2073
+ this._contentHeight$.next(widgetContentHeight);
2074
+ }
2075
+ }
2076
+ openWidgetComponentSubscription() {
2077
+ this._subscriptions.add(combineLatest([this.widget$, this.documentId$.pipe(startWith(null))]).subscribe(([widget, documentId]) => {
2078
+ const component = this.widgetComponentMap[widget.type];
2079
+ if (!component)
2080
+ return;
2081
+ this.dynamicContainer.clear();
2082
+ const componentRef = this.dynamicContainer.createComponent(component);
2083
+ if (documentId)
2084
+ componentRef.instance.documentId = documentId;
2085
+ componentRef.instance.widgetConfiguration = widget;
2086
+ componentRef.instance.widgetUuid = widget.uuid;
2087
+ componentRef.instance.widgetParams = this.widgetParams;
2088
+ }));
2089
+ }
2090
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetBlockComponent, deps: [{ token: WidgetLayoutService }, { token: i2$2.ActivatedRoute }, { token: i1.CdsThemeService }, { token: i0.Renderer2 }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
2091
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: WidgetBlockComponent, isStandalone: true, selector: "valtimo-widget-block", inputs: { widget: "widget", widgetComponentMap: "widgetComponentMap", widgetParams: "widgetParams" }, viewQueries: [{ propertyName: "_widgetBlockContentRef", first: true, predicate: ["widgetBlockContent"], descendants: true }, { propertyName: "dynamicContainer", first: true, predicate: ["widgetComponent"], 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<div class=\"widget-block\" [attr.data-carbon-theme]=\"theme$ | async\">\n <div #widgetBlockContent class=\"widget-block__content\">\n <ng-template #widgetComponent></ng-template>\n </div>\n</div>\n\n<ng-container\n *ngIf=\"{\n documentId: documentId$ | async,\n widgetConfiguration: widget$ | async,\n theme: theme$ | async,\n blockHeightPx: blockHeightPx$ | async,\n blockWidthPercentage: blockWidthPercentage$ | async,\n } as obs\"\n></ng-container>\n", styles: [":host{display:block;position:absolute}.widget-block{width:100%;height:100%;box-sizing:border-box;padding:8px;overflow-wrap:break-word;background-color:var(--cds-layer-01);background-clip:content-box}.widget-block__not-available{padding: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: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: LoadingModule }, { kind: "ngmodule", type: CarbonListModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: TilesModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2092
+ }
2093
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetBlockComponent, decorators: [{
2094
+ type: Component,
2095
+ args: [{ selector: 'valtimo-widget-block', standalone: true, imports: [CommonModule, LoadingModule, CarbonListModule, TranslateModule, TilesModule], 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<div class=\"widget-block\" [attr.data-carbon-theme]=\"theme$ | async\">\n <div #widgetBlockContent class=\"widget-block__content\">\n <ng-template #widgetComponent></ng-template>\n </div>\n</div>\n\n<ng-container\n *ngIf=\"{\n documentId: documentId$ | async,\n widgetConfiguration: widget$ | async,\n theme: theme$ | async,\n blockHeightPx: blockHeightPx$ | async,\n blockWidthPercentage: blockWidthPercentage$ | async,\n } as obs\"\n></ng-container>\n", styles: [":host{display:block;position:absolute}.widget-block{width:100%;height:100%;box-sizing:border-box;padding:8px;overflow-wrap:break-word;background-color:var(--cds-layer-01);background-clip:content-box}.widget-block__not-available{padding: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"] }]
2096
+ }], ctorParameters: () => [{ type: WidgetLayoutService }, { type: i2$2.ActivatedRoute }, { type: i1.CdsThemeService }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }], propDecorators: { _widgetBlockContentRef: [{
2097
+ type: ViewChild,
2098
+ args: ['widgetBlockContent']
2099
+ }], dynamicContainer: [{
2100
+ type: ViewChild,
2101
+ args: ['widgetComponent', { static: true, read: ViewContainerRef }]
2102
+ }], widget: [{
2103
+ type: Input
2104
+ }], widgetComponentMap: [{
2105
+ type: Input
2106
+ }], widgetParams: [{
2107
+ type: Input,
2108
+ args: [{ required: false }]
2109
+ }] } });
2110
+
2111
+ /*
2112
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2113
+ *
2114
+ * Licensed under EUPL, Version 1.2 (the "License");
2115
+ * you may not use this file except in compliance with the License.
2116
+ * You may obtain a copy of the License at
2117
+ *
2118
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2119
+ *
2120
+ * Unless required by applicable law or agreed to in writing, software
2121
+ * distributed under the License is distributed on an "AS IS" basis,
2122
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2123
+ * See the License for the specific language governing permissions and
2124
+ * limitations under the License.
2125
+ */
2126
+
2127
+ /*
2128
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2129
+ *
2130
+ * Licensed under EUPL, Version 1.2 (the "License");
2131
+ * you may not use this file except in compliance with the License.
2132
+ * You may obtain a copy of the License at
2133
+ *
2134
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2135
+ *
2136
+ * Unless required by applicable law or agreed to in writing, software
2137
+ * distributed under the License is distributed on an "AS IS" basis,
2138
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2139
+ * See the License for the specific language governing permissions and
2140
+ * limitations under the License.
2141
+ */
2142
+ class WidgetContainerComponent {
2143
+ set widgets(value) {
2144
+ if (!value)
2145
+ return;
2146
+ const widgetsWithUuids = value.map(widget => ({ ...widget, uuid: v4() }));
2147
+ this.widgetLayoutService.setWidgets(widgetsWithUuids);
2148
+ this.widgetsWithUuids$.next(widgetsWithUuids);
2149
+ this.loadingWidgetConfiguration$.next(false);
2150
+ }
2151
+ get widgetComponentMap$() {
2152
+ return this._widgetComponentMap$.pipe(filter$1(componentMap => componentMap !== null));
2153
+ }
2154
+ set widgetComponentMap(value) {
2155
+ this._widgetComponentMap$.next({ ...DEFAULT_WIDGET_COMPONENT_MAP, ...value });
2156
+ }
2157
+ constructor(widgetLayoutService) {
2158
+ this.widgetLayoutService = widgetLayoutService;
2159
+ this.widgetsWithUuids$ = new BehaviorSubject(null);
2160
+ this._widgetComponentMap$ = new BehaviorSubject(DEFAULT_WIDGET_COMPONENT_MAP);
2161
+ this.widgetParams = {};
2162
+ this.loadingWidgetConfiguration$ = new BehaviorSubject(true);
2163
+ this.loaded$ = this.widgetLayoutService.loaded$.pipe(delay(400));
2164
+ }
2165
+ ngAfterViewInit() {
2166
+ this._observer = new ResizeObserver(event => {
2167
+ this.observerMutation(event);
2168
+ });
2169
+ this._observer.observe(this._widgetsContainerRef.nativeElement);
2170
+ this.initMuuri();
2171
+ }
2172
+ ngOnDestroy() {
2173
+ this._observer?.disconnect();
2174
+ this.widgetLayoutService.reset();
2175
+ }
2176
+ observerMutation(event) {
2177
+ const containerWidth = event[0]?.borderBoxSize[0]?.inlineSize;
2178
+ if (typeof containerWidth === 'number' && containerWidth !== 0) {
2179
+ this.widgetLayoutService.setContainerWidth(containerWidth);
2180
+ this.widgetLayoutService.triggerMuuriLayout();
2181
+ }
2182
+ }
2183
+ initMuuri() {
2184
+ this.widgetLayoutService.loaded$.pipe(take(1), delay(300)).subscribe(() => {
2185
+ this.widgetLayoutService.setMuuri(new Muuri(this._widgetsContainerRef.nativeElement, {
2186
+ layout: {
2187
+ fillGaps: true,
2188
+ },
2189
+ layoutOnResize: false,
2190
+ }));
2191
+ });
2192
+ }
2193
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetContainerComponent, deps: [{ token: WidgetLayoutService }], target: i0.ɵɵFactoryTarget.Component }); }
2194
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: WidgetContainerComponent, isStandalone: true, selector: "valtimo-widget-container", inputs: { widgets: "widgets", widgetComponentMap: "widgetComponentMap", widgetParams: "widgetParams" }, viewQueries: [{ propertyName: "_widgetsContainerRef", first: true, predicate: ["widgetsContainer"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n *ngIf=\"{\n loadingWidgetConfiguration: loadingWidgetConfiguration$ | async,\n widgets: widgetsWithUuids$ | async,\n loaded: loaded$ | async,\n } as obs\"\n>\n <ng-container\n *ngIf=\"{\n noWidgetsConfigured: obs.widgets && obs.widgets.length === 0,\n } as vars\"\n >\n @if (!obs.loaded && !vars.noWidgetsConfigured) {\n <div class=\"loading-container\">\n <cds-loading></cds-loading>\n </div>\n }\n\n @if (vars.noWidgetsConfigured) {\n <valtimo-no-results\n [title]=\"'case.widgets.noWidgets' | translate\"\n [description]=\"'case.widgets.noWidgetsDescription' | translate\"\n illustration=\"valtimo-layout/img/no-widgets.svg\"\n ></valtimo-no-results>\n }\n\n <div [style.visibility]=\"!obs.loaded ? 'hidden' : 'visible'\">\n <div #widgetsContainer class=\"widgets-container\">\n @for (widget of (widgetsWithUuids$ | async) || []; track widget.uuid) {\n <valtimo-widget-block\n [widget]=\"widget\"\n [widgetComponentMap]=\"widgetComponentMap$ | async\"\n [widgetParams]=\"widgetParams\"\n ></valtimo-widget-block>\n }\n </div>\n </div>\n </ng-container>\n</ng-container>\n", styles: [".widgets-container{position:relative;width:calc(100% + 16px);margin-left:-8px;margin-top:-8px;padding-bottom:32px;box-sizing:content-box}.loading-container{display:flex;justify-content:center;padding:16px 0}\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: "component", type: WidgetBlockComponent, selector: "valtimo-widget-block", inputs: ["widget", "widgetComponentMap", "widgetParams"] }, { kind: "ngmodule", type: LoadingModule }, { kind: "component", type: i3.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i1.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2195
+ }
2196
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetContainerComponent, decorators: [{
2197
+ type: Component,
2198
+ args: [{ selector: 'valtimo-widget-container', standalone: true, imports: [CommonModule, WidgetBlockComponent, LoadingModule, CarbonListModule, TranslatePipe], 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<ng-container\n *ngIf=\"{\n loadingWidgetConfiguration: loadingWidgetConfiguration$ | async,\n widgets: widgetsWithUuids$ | async,\n loaded: loaded$ | async,\n } as obs\"\n>\n <ng-container\n *ngIf=\"{\n noWidgetsConfigured: obs.widgets && obs.widgets.length === 0,\n } as vars\"\n >\n @if (!obs.loaded && !vars.noWidgetsConfigured) {\n <div class=\"loading-container\">\n <cds-loading></cds-loading>\n </div>\n }\n\n @if (vars.noWidgetsConfigured) {\n <valtimo-no-results\n [title]=\"'case.widgets.noWidgets' | translate\"\n [description]=\"'case.widgets.noWidgetsDescription' | translate\"\n illustration=\"valtimo-layout/img/no-widgets.svg\"\n ></valtimo-no-results>\n }\n\n <div [style.visibility]=\"!obs.loaded ? 'hidden' : 'visible'\">\n <div #widgetsContainer class=\"widgets-container\">\n @for (widget of (widgetsWithUuids$ | async) || []; track widget.uuid) {\n <valtimo-widget-block\n [widget]=\"widget\"\n [widgetComponentMap]=\"widgetComponentMap$ | async\"\n [widgetParams]=\"widgetParams\"\n ></valtimo-widget-block>\n }\n </div>\n </div>\n </ng-container>\n</ng-container>\n", styles: [".widgets-container{position:relative;width:calc(100% + 16px);margin-left:-8px;margin-top:-8px;padding-bottom:32px;box-sizing:content-box}.loading-container{display:flex;justify-content:center;padding:16px 0}\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"] }]
2199
+ }], ctorParameters: () => [{ type: WidgetLayoutService }], propDecorators: { _widgetsContainerRef: [{
2200
+ type: ViewChild,
2201
+ args: ['widgetsContainer']
2202
+ }], widgets: [{
2203
+ type: Input
2204
+ }], widgetComponentMap: [{
2205
+ type: Input
2206
+ }], widgetParams: [{
2207
+ type: Input,
2208
+ args: [{ required: false }]
2209
+ }] } });
2210
+
2211
+ /*
2212
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2213
+ *
2214
+ * Licensed under EUPL, Version 1.2 (the "License");
2215
+ * you may not use this file except in compliance with the License.
2216
+ * You may obtain a copy of the License at
2217
+ *
2218
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2219
+ *
2220
+ * Unless required by applicable law or agreed to in writing, software
2221
+ * distributed under the License is distributed on an "AS IS" basis,
2222
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2223
+ * See the License for the specific language governing permissions and
2224
+ * limitations under the License.
2225
+ */
2226
+
2227
+ /*
2228
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2229
+ *
2230
+ * Licensed under EUPL, Version 1.2 (the "License");
2231
+ * you may not use this file except in compliance with the License.
2232
+ * You may obtain a copy of the License at
2233
+ *
2234
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2235
+ *
2236
+ * Unless required by applicable law or agreed to in writing, software
2237
+ * distributed under the License is distributed on an "AS IS" basis,
2238
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2239
+ * See the License for the specific language governing permissions and
2240
+ * limitations under the License.
2241
+ */
2242
+ class WidgetWizardContentStepComponent {
2243
+ constructor(cdr, widgetWizardService) {
2244
+ this.cdr = cdr;
2245
+ this.widgetWizardService = widgetWizardService;
2246
+ this.contentValidEvent = new EventEmitter();
2247
+ }
2248
+ ngOnInit() {
2249
+ this.renderComponent();
2250
+ }
2251
+ renderComponent() {
2252
+ this._vcr.clear();
2253
+ const $widget = this.widgetWizardService.$selectedWidget();
2254
+ if (!$widget)
2255
+ return;
2256
+ const componentInstance = this._vcr.createComponent($widget.component).instance;
2257
+ if (!componentInstance)
2258
+ return;
2259
+ componentInstance.changeValidEvent.subscribe((valid) => this.contentValidEvent.emit(valid));
2260
+ this.cdr.detectChanges();
2261
+ }
2262
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetWizardContentStepComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: WidgetWizardService }], target: i0.ɵɵFactoryTarget.Component }); }
2263
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: WidgetWizardContentStepComponent, isStandalone: true, selector: "valtimo-widget-wizard-content-step", outputs: { contentValidEvent: "contentValidEvent" }, viewQueries: [{ propertyName: "_vcr", first: true, predicate: ["contentRenderer"], 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-template #contentRenderer></ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
2264
+ }
2265
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetWizardContentStepComponent, decorators: [{
2266
+ type: Component,
2267
+ args: [{ selector: 'valtimo-widget-wizard-content-step', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [CommonModule], 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-template #contentRenderer></ng-template>\n" }]
2268
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: WidgetWizardService }], propDecorators: { _vcr: [{
2269
+ type: ViewChild,
2270
+ args: ['contentRenderer', { static: true, read: ViewContainerRef }]
2271
+ }], contentValidEvent: [{
2272
+ type: Output
2273
+ }] } });
2274
+
2275
+ /*
2276
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2277
+ *
2278
+ * Licensed under EUPL, Version 1.2 (the "License");
2279
+ * you may not use this file except in compliance with the License.
2280
+ * You may obtain a copy of the License at
2281
+ *
2282
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2283
+ *
2284
+ * Unless required by applicable law or agreed to in writing, software
2285
+ * distributed under the License is distributed on an "AS IS" basis,
2286
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2287
+ * See the License for the specific language governing permissions and
2288
+ * limitations under the License.
2289
+ */
2290
+ class WidgetWizardStyleStepComponent {
2291
+ constructor(widgetWizardService) {
2292
+ this.widgetWizardService = widgetWizardService;
2293
+ this.WidgetStyle = WidgetStyle;
2294
+ this.$widgetStyle = this.widgetWizardService.$widgetStyle;
2295
+ }
2296
+ onSelectedEvent(event) {
2297
+ this.widgetWizardService.$widgetStyle.set(event.value);
2298
+ }
2299
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetWizardStyleStepComponent, deps: [{ token: WidgetWizardService }], target: i0.ɵɵFactoryTarget.Component }); }
2300
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: WidgetWizardStyleStepComponent, isStandalone: true, selector: "valtimo-widget-wizard-style-step", 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-tile-group\n [multiple]=\"false\"\n (selected)=\"onSelectedEvent($event)\"\n class=\"valtimo-widget-wizard-step__content\"\n>\n <cds-selection-tile\n class=\"valtimo-widget-wizard-step__tile\"\n [value]=\"WidgetStyle.DEFAULT\"\n [selected]=\"$widgetStyle() === WidgetStyle.DEFAULT\"\n >\n <h3>{{ 'widgetTabManagement.style.default.title' | translate }}</h3>\n\n <span>{{ 'widgetTabManagement.style.default.description' | translate }}</span>\n\n <img\n src=\"valtimo-layout/img/widget-management/style/default.svg\"\n [alt]=\"'widgetTabManagement.style.default.title' | translate\"\n />\n </cds-selection-tile>\n\n <cds-selection-tile\n class=\"valtimo-widget-wizard-step__tile\"\n [value]=\"WidgetStyle.HIGH_CONTRAST\"\n [selected]=\"$widgetStyle() === WidgetStyle.HIGH_CONTRAST\"\n >\n <h3>{{ 'widgetTabManagement.style.highContrast.title' | translate }}</h3>\n\n <span>{{ 'widgetTabManagement.style.highContrast.description' | translate }}</span>\n\n <img\n src=\"valtimo-layout/img/widget-management/style/high-contrast.svg\"\n [alt]=\"'widgetTabManagement.style.highContrast.title' | translate\"\n />\n </cds-selection-tile>\n</cds-tile-group>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: TilesModule }, { kind: "component", type: i3.SelectionTile, selector: "cds-selection-tile, ibm-selection-tile", inputs: ["theme", "id", "selected", "value", "disabled"], outputs: ["change"] }, { kind: "component", type: i3.TileGroup, selector: "cds-tile-group, ibm-tile-group", inputs: ["name", "multiple", "legend"], outputs: ["selected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2301
+ }
2302
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetWizardStyleStepComponent, decorators: [{
2303
+ type: Component,
2304
+ args: [{ selector: 'valtimo-widget-wizard-style-step', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, TranslateModule, TilesModule], 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-tile-group\n [multiple]=\"false\"\n (selected)=\"onSelectedEvent($event)\"\n class=\"valtimo-widget-wizard-step__content\"\n>\n <cds-selection-tile\n class=\"valtimo-widget-wizard-step__tile\"\n [value]=\"WidgetStyle.DEFAULT\"\n [selected]=\"$widgetStyle() === WidgetStyle.DEFAULT\"\n >\n <h3>{{ 'widgetTabManagement.style.default.title' | translate }}</h3>\n\n <span>{{ 'widgetTabManagement.style.default.description' | translate }}</span>\n\n <img\n src=\"valtimo-layout/img/widget-management/style/default.svg\"\n [alt]=\"'widgetTabManagement.style.default.title' | translate\"\n />\n </cds-selection-tile>\n\n <cds-selection-tile\n class=\"valtimo-widget-wizard-step__tile\"\n [value]=\"WidgetStyle.HIGH_CONTRAST\"\n [selected]=\"$widgetStyle() === WidgetStyle.HIGH_CONTRAST\"\n >\n <h3>{{ 'widgetTabManagement.style.highContrast.title' | translate }}</h3>\n\n <span>{{ 'widgetTabManagement.style.highContrast.description' | translate }}</span>\n\n <img\n src=\"valtimo-layout/img/widget-management/style/high-contrast.svg\"\n [alt]=\"'widgetTabManagement.style.highContrast.title' | translate\"\n />\n </cds-selection-tile>\n</cds-tile-group>\n" }]
2305
+ }], ctorParameters: () => [{ type: WidgetWizardService }] });
2306
+
2307
+ /*
2308
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2309
+ *
2310
+ * Licensed under EUPL, Version 1.2 (the "License");
2311
+ * you may not use this file except in compliance with the License.
2312
+ * You may obtain a copy of the License at
2313
+ *
2314
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2315
+ *
2316
+ * Unless required by applicable law or agreed to in writing, software
2317
+ * distributed under the License is distributed on an "AS IS" basis,
2318
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2319
+ * See the License for the specific language governing permissions and
2320
+ * limitations under the License.
2321
+ */
2322
+ class WidgetWizardTypeStepComponent {
2323
+ constructor(widgetWizardService) {
2324
+ this.widgetWizardService = widgetWizardService;
2325
+ this.$availableWidgetTypes = computed(() => {
2326
+ const availableTypes = this.widgetWizardService.$availableWidgetTypes();
2327
+ return !availableTypes
2328
+ ? AVAILABLE_WIDGETS
2329
+ : AVAILABLE_WIDGETS.filter((typeSelection) => availableTypes.includes(typeSelection.type));
2330
+ });
2331
+ this.$selectedWidget = this.widgetWizardService.$selectedWidget;
2332
+ }
2333
+ onSelectedEvent(event) {
2334
+ if (event.value.type !== this.widgetWizardService.$selectedWidget()?.type) {
2335
+ this.widgetWizardService.$widgetContent.set(null);
2336
+ this.widgetWizardService.$widgetTitle.set(null);
2337
+ }
2338
+ this.widgetWizardService.$selectedWidget.set(event.value);
2339
+ }
2340
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetWizardTypeStepComponent, deps: [{ token: WidgetWizardService }], target: i0.ɵɵFactoryTarget.Component }); }
2341
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: WidgetWizardTypeStepComponent, isStandalone: true, selector: "valtimo-widget-wizard-type-step", 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-tile-group\n [multiple]=\"false\"\n (selected)=\"onSelectedEvent($event)\"\n class=\"valtimo-widget-wizard-step__content\"\n>\n @for (widgetType of $availableWidgetTypes(); track widgetType.titleKey) {\n <cds-selection-tile\n class=\"valtimo-widget-wizard-step__tile\"\n [value]=\"widgetType\"\n [selected]=\"widgetType.type === $selectedWidget()?.type\"\n >\n <h3 class=\"valtimo-widget-wizard-step__tile-title\">{{ widgetType.titleKey | translate }}</h3>\n\n <span>{{ widgetType.descriptionKey | translate }}</span>\n\n <img [src]=\"widgetType.illustrationUrl\" [alt]=\"widgetType.titleKey | translate\" />\n </cds-selection-tile>\n }\n</cds-tile-group>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: TilesModule }, { kind: "component", type: i3.SelectionTile, selector: "cds-selection-tile, ibm-selection-tile", inputs: ["theme", "id", "selected", "value", "disabled"], outputs: ["change"] }, { kind: "component", type: i3.TileGroup, selector: "cds-tile-group, ibm-tile-group", inputs: ["name", "multiple", "legend"], outputs: ["selected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
2342
+ }
2343
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetWizardTypeStepComponent, decorators: [{
2344
+ type: Component,
2345
+ args: [{ selector: 'valtimo-widget-wizard-type-step', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [CommonModule, TranslateModule, TilesModule], 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-tile-group\n [multiple]=\"false\"\n (selected)=\"onSelectedEvent($event)\"\n class=\"valtimo-widget-wizard-step__content\"\n>\n @for (widgetType of $availableWidgetTypes(); track widgetType.titleKey) {\n <cds-selection-tile\n class=\"valtimo-widget-wizard-step__tile\"\n [value]=\"widgetType\"\n [selected]=\"widgetType.type === $selectedWidget()?.type\"\n >\n <h3 class=\"valtimo-widget-wizard-step__tile-title\">{{ widgetType.titleKey | translate }}</h3>\n\n <span>{{ widgetType.descriptionKey | translate }}</span>\n\n <img [src]=\"widgetType.illustrationUrl\" [alt]=\"widgetType.titleKey | translate\" />\n </cds-selection-tile>\n }\n</cds-tile-group>\n" }]
2346
+ }], ctorParameters: () => [{ type: WidgetWizardService }] });
2347
+
2348
+ /*
2349
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2350
+ *
2351
+ * Licensed under EUPL, Version 1.2 (the "License");
2352
+ * you may not use this file except in compliance with the License.
2353
+ * You may obtain a copy of the License at
2354
+ *
2355
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2356
+ *
2357
+ * Unless required by applicable law or agreed to in writing, software
2358
+ * distributed under the License is distributed on an "AS IS" basis,
2359
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2360
+ * See the License for the specific language governing permissions and
2361
+ * limitations under the License.
2362
+ */
2363
+ class WidgetWizardWidthStepComponent {
2364
+ constructor(widgetWizardService) {
2365
+ this.widgetWizardService = widgetWizardService;
2366
+ this.$fieldsColumnsLength = computed(() => this.widgetWizardService.$selectedWidget()?.type === WidgetType.FIELDS
2367
+ ? (this.widgetWizardService.$widgetContent()?.['columns']?.length ?? 0)
2368
+ : 0);
2369
+ this.$widgetWidth = this.widgetWizardService.$widgetWidth;
2370
+ }
2371
+ onSelectedEvent(event) {
2372
+ this.widgetWizardService.$widgetWidth.set(event.value);
2373
+ }
2374
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetWizardWidthStepComponent, deps: [{ token: WidgetWizardService }], target: i0.ɵɵFactoryTarget.Component }); }
2375
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: WidgetWizardWidthStepComponent, isStandalone: true, selector: "valtimo-widget-wizard-width-step", 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-tile-group\n [multiple]=\"false\"\n (selected)=\"onSelectedEvent($event)\"\n class=\"valtimo-widget-wizard-step__content\"\n>\n <cds-selection-tile\n class=\"valtimo-widget-wizard-step__tile\"\n [value]=\"1\"\n [selected]=\"$widgetWidth() === 1\"\n [disabled]=\"$fieldsColumnsLength() > 1\"\n >\n <h3>{{ 'widgetTabManagement.width.small.title' | translate }}</h3>\n\n <span>{{ 'widgetTabManagement.width.small.subtitle' | translate }}</span>\n\n <img\n src=\"valtimo-layout/img/widget-management/width/quarter.svg\"\n [alt]=\"'widgetTabManagement.width.small.title' | translate\"\n />\n </cds-selection-tile>\n\n <cds-selection-tile\n class=\"valtimo-widget-wizard-step__tile\"\n [value]=\"2\"\n [selected]=\"$widgetWidth() === 2\"\n [disabled]=\"$fieldsColumnsLength() > 2\"\n >\n <h3>{{ 'widgetTabManagement.width.medium.title' | translate }}</h3>\n\n <span>{{ 'widgetTabManagement.width.medium.subtitle' | translate }}</span>\n\n <img\n src=\"valtimo-layout/img/widget-management/width/half.svg\"\n [alt]=\"'widgetTabManagement.width.medium.title' | translate\"\n />\n </cds-selection-tile>\n\n <cds-selection-tile\n class=\"valtimo-widget-wizard-step__tile\"\n [value]=\"3\"\n [selected]=\"$widgetWidth() === 3\"\n [disabled]=\"$fieldsColumnsLength() > 3\"\n >\n <h3>{{ 'widgetTabManagement.width.large.title' | translate }}</h3>\n\n <span>{{ 'widgetTabManagement.width.large.subtitle' | translate }}</span>\n\n <img\n src=\"valtimo-layout/img/widget-management/width/three-quarters.svg\"\n [alt]=\"'widgetTabManagement.width.large.title' | translate\"\n />\n </cds-selection-tile>\n\n <cds-selection-tile\n class=\"valtimo-widget-wizard-step__tile\"\n [value]=\"4\"\n [selected]=\"$widgetWidth() === 4\"\n >\n <h3>{{ 'widgetTabManagement.width.xtraLarge.title' | translate }}</h3>\n\n <span>{{ 'widgetTabManagement.width.xtraLarge.subtitle' | translate }}</span>\n\n <img\n src=\"valtimo-layout/img/widget-management/width/full-width.svg\"\n [alt]=\"'widgetTabManagement.width.xtraLarge.title' | translate\"\n />\n </cds-selection-tile>\n</cds-tile-group>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: TilesModule }, { kind: "component", type: i3.SelectionTile, selector: "cds-selection-tile, ibm-selection-tile", inputs: ["theme", "id", "selected", "value", "disabled"], outputs: ["change"] }, { kind: "component", type: i3.TileGroup, selector: "cds-tile-group, ibm-tile-group", inputs: ["name", "multiple", "legend"], outputs: ["selected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2376
+ }
2377
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetWizardWidthStepComponent, decorators: [{
2378
+ type: Component,
2379
+ args: [{ selector: 'valtimo-widget-wizard-width-step', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, TranslateModule, TilesModule], 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-tile-group\n [multiple]=\"false\"\n (selected)=\"onSelectedEvent($event)\"\n class=\"valtimo-widget-wizard-step__content\"\n>\n <cds-selection-tile\n class=\"valtimo-widget-wizard-step__tile\"\n [value]=\"1\"\n [selected]=\"$widgetWidth() === 1\"\n [disabled]=\"$fieldsColumnsLength() > 1\"\n >\n <h3>{{ 'widgetTabManagement.width.small.title' | translate }}</h3>\n\n <span>{{ 'widgetTabManagement.width.small.subtitle' | translate }}</span>\n\n <img\n src=\"valtimo-layout/img/widget-management/width/quarter.svg\"\n [alt]=\"'widgetTabManagement.width.small.title' | translate\"\n />\n </cds-selection-tile>\n\n <cds-selection-tile\n class=\"valtimo-widget-wizard-step__tile\"\n [value]=\"2\"\n [selected]=\"$widgetWidth() === 2\"\n [disabled]=\"$fieldsColumnsLength() > 2\"\n >\n <h3>{{ 'widgetTabManagement.width.medium.title' | translate }}</h3>\n\n <span>{{ 'widgetTabManagement.width.medium.subtitle' | translate }}</span>\n\n <img\n src=\"valtimo-layout/img/widget-management/width/half.svg\"\n [alt]=\"'widgetTabManagement.width.medium.title' | translate\"\n />\n </cds-selection-tile>\n\n <cds-selection-tile\n class=\"valtimo-widget-wizard-step__tile\"\n [value]=\"3\"\n [selected]=\"$widgetWidth() === 3\"\n [disabled]=\"$fieldsColumnsLength() > 3\"\n >\n <h3>{{ 'widgetTabManagement.width.large.title' | translate }}</h3>\n\n <span>{{ 'widgetTabManagement.width.large.subtitle' | translate }}</span>\n\n <img\n src=\"valtimo-layout/img/widget-management/width/three-quarters.svg\"\n [alt]=\"'widgetTabManagement.width.large.title' | translate\"\n />\n </cds-selection-tile>\n\n <cds-selection-tile\n class=\"valtimo-widget-wizard-step__tile\"\n [value]=\"4\"\n [selected]=\"$widgetWidth() === 4\"\n >\n <h3>{{ 'widgetTabManagement.width.xtraLarge.title' | translate }}</h3>\n\n <span>{{ 'widgetTabManagement.width.xtraLarge.subtitle' | translate }}</span>\n\n <img\n src=\"valtimo-layout/img/widget-management/width/full-width.svg\"\n [alt]=\"'widgetTabManagement.width.xtraLarge.title' | translate\"\n />\n </cds-selection-tile>\n</cds-tile-group>\n" }]
2380
+ }], ctorParameters: () => [{ type: WidgetWizardService }] });
2381
+
2382
+ /*
2383
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2384
+ *
2385
+ * Licensed under EUPL, Version 1.2 (the "License");
2386
+ * you may not use this file except in compliance with the License.
2387
+ * You may obtain a copy of the License at
2388
+ *
2389
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2390
+ *
2391
+ * Unless required by applicable law or agreed to in writing, software
2392
+ * distributed under the License is distributed on an "AS IS" basis,
2393
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2394
+ * See the License for the specific language governing permissions and
2395
+ * limitations under the License.
2396
+ */
2397
+ const WIDGET_STEPS = [
2398
+ WidgetWizardContentStepComponent,
2399
+ WidgetWizardStyleStepComponent,
2400
+ WidgetWizardTypeStepComponent,
2401
+ WidgetWizardWidthStepComponent,
2402
+ ];
2403
+
2404
+ /*
2405
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2406
+ *
2407
+ * Licensed under EUPL, Version 1.2 (the "License");
2408
+ * you may not use this file except in compliance with the License.
2409
+ * You may obtain a copy of the License at
2410
+ *
2411
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2412
+ *
2413
+ * Unless required by applicable law or agreed to in writing, software
2414
+ * distributed under the License is distributed on an "AS IS" basis,
2415
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2416
+ * See the License for the specific language governing permissions and
2417
+ * limitations under the License.
2418
+ */
2419
+ class WidgetManagementWizardComponent {
2420
+ set editMode(value) {
2421
+ this._editMode = value;
2422
+ if (!value)
2423
+ return;
2424
+ this.$currentStep.set(WidgetWizardStep.CONTENT);
2425
+ }
2426
+ get editMode() {
2427
+ return this._editMode;
2428
+ }
2429
+ constructor(keyGeneratorService, translateService, widgetWizardService) {
2430
+ this.keyGeneratorService = keyGeneratorService;
2431
+ this.translateService = translateService;
2432
+ this.widgetWizardService = widgetWizardService;
2433
+ this.open = false;
2434
+ this.closeEvent = new EventEmitter();
2435
+ this.WidgetWizardSteps = WidgetWizardStep;
2436
+ this._secondaryLabels = computed(() => {
2437
+ const selectedWidgetType = this.widgetWizardService.$selectedWidget()?.type ?? '';
2438
+ const selectedWidth = this.widgetWizardService.$widgetWidth() ?? '';
2439
+ const selectedStyle = this.widgetWizardService.$widgetStyle() ?? '';
2440
+ return {
2441
+ [WidgetWizardStep.TYPE]: selectedWidgetType
2442
+ ? `widgetTabManagement.types.${selectedWidgetType}.title`
2443
+ : '',
2444
+ [WidgetWizardStep.WIDTH]: WIDGET_WIDTH_LABELS[selectedWidth] ?? '',
2445
+ [WidgetWizardStep.STYLE]: WIDGET_STYLE_LABELS[selectedStyle] ?? '',
2446
+ };
2447
+ });
2448
+ this.steps$ = combineLatest([
2449
+ toObservable(this._secondaryLabels),
2450
+ toObservable(this.widgetWizardService.$editMode),
2451
+ this.translateService.stream('key'),
2452
+ ]).pipe(map(([secondaryLabels, editMode]) => {
2453
+ return [
2454
+ {
2455
+ label: this.translateService.instant('widgetTabManagement.wizard.steps.type'),
2456
+ ...(secondaryLabels[WidgetWizardStep.TYPE] && {
2457
+ secondaryLabel: this.translateService.instant(secondaryLabels[WidgetWizardStep.TYPE]),
2458
+ }),
2459
+ disabled: editMode,
2460
+ complete: !!this.widgetWizardService.$selectedWidget()?.type,
2461
+ },
2462
+ {
2463
+ label: this.translateService.instant('widgetTabManagement.wizard.steps.width'),
2464
+ ...(secondaryLabels[WidgetWizardStep.WIDTH] && {
2465
+ secondaryLabel: this.translateService.instant(secondaryLabels[WidgetWizardStep.WIDTH]),
2466
+ }),
2467
+ disabled: !secondaryLabels[WidgetWizardStep.TYPE],
2468
+ complete: !!this.widgetWizardService.$widgetWidth(),
2469
+ },
2470
+ {
2471
+ label: this.translateService.instant('widgetTabManagement.wizard.steps.style'),
2472
+ ...(secondaryLabels[WidgetWizardStep.STYLE] && {
2473
+ secondaryLabel: this.translateService.instant(secondaryLabels[WidgetWizardStep.STYLE]),
2474
+ }),
2475
+ disabled: !secondaryLabels[WidgetWizardStep.WIDTH],
2476
+ complete: !!this.widgetWizardService.$widgetStyle(),
2477
+ },
2478
+ {
2479
+ label: this.translateService.instant('widgetTabManagement.wizard.steps.content'),
2480
+ disabled: !secondaryLabels[WidgetWizardStep.TYPE] ||
2481
+ !secondaryLabels[WidgetWizardStep.WIDTH] ||
2482
+ !secondaryLabels[WidgetWizardStep.STYLE],
2483
+ complete: !!this.widgetWizardService.$widgetContent(),
2484
+ },
2485
+ ];
2486
+ }));
2487
+ this._$contentStepValid = signal(false);
2488
+ this.$currentStep = signal(WidgetWizardStep.TYPE);
2489
+ this.$backButtonDisabled = computed(() => this.widgetWizardService.$editMode() && this.$currentStep() === WidgetWizardStep.WIDTH);
2490
+ this.$nextButtonDisabled = computed(() => {
2491
+ switch (this.$currentStep()) {
2492
+ case WidgetWizardStep.TYPE:
2493
+ return !this.widgetWizardService.$selectedWidget();
2494
+ case WidgetWizardStep.WIDTH:
2495
+ return !this.widgetWizardService.$widgetWidth();
2496
+ case WidgetWizardStep.STYLE:
2497
+ return this.widgetWizardService.$widgetStyle() === null;
2498
+ case WidgetWizardStep.CONTENT:
2499
+ return this.widgetWizardService.$widgetContent() === null || !this._$contentStepValid();
2500
+ default:
2501
+ return true;
2502
+ }
2503
+ });
2504
+ }
2505
+ onStepSelected(event) {
2506
+ this.$currentStep.set(event.index);
2507
+ }
2508
+ onNextButtonClick() {
2509
+ if (this.$currentStep() === WidgetWizardStep.CONTENT) {
2510
+ const isDuplicateMode = this.editMode && !this.widgetWizardService.$widgetKey();
2511
+ if (isDuplicateMode || !this.editMode) {
2512
+ this.widgetWizardService.$widgetKey.set(this.keyGeneratorService.getUniqueKey(this.widgetWizardService.$widgetTitle() ?? '', this.widgetWizardService.$usedWidgetKeys()));
2513
+ }
2514
+ this.closeEvent.emit({
2515
+ type: this.editMode && !isDuplicateMode
2516
+ ? WidgetWizardCloseEventType.EDIT
2517
+ : WidgetWizardCloseEventType.CREATE,
2518
+ widget: this.widgetWizardService.$widgetsConfig(),
2519
+ });
2520
+ this.resetWizard();
2521
+ return;
2522
+ }
2523
+ this.$currentStep.update((step) => step + 1);
2524
+ }
2525
+ onBackButtonClick() {
2526
+ this.$currentStep.update((step) => step - 1);
2527
+ }
2528
+ onClose() {
2529
+ this.closeEvent.emit({ type: WidgetWizardCloseEventType.CANCEL, widget: null });
2530
+ this.resetWizard();
2531
+ }
2532
+ onContentValidEvent(valid) {
2533
+ this._$contentStepValid.set(valid);
2534
+ }
2535
+ resetWizard() {
2536
+ setTimeout(() => {
2537
+ this.widgetWizardService.resetWizard();
2538
+ this.$currentStep.set(WidgetWizardStep.TYPE);
2539
+ }, CARBON_CONSTANTS.modalAnimationMs);
2540
+ }
2541
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetManagementWizardComponent, deps: [{ token: i1.KeyGeneratorService }, { token: i2$1.TranslateService }, { token: WidgetWizardService }], target: i0.ɵɵFactoryTarget.Component }); }
2542
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: WidgetManagementWizardComponent, isStandalone: true, selector: "valtimo-widget-management-wizard", inputs: { open: "open", editMode: "editMode" }, 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\n *ngIf=\"{steps: steps$ | async} as obs\"\n [open]=\"open\"\n showFooter=\"true\"\n size=\"lg\"\n valtimoCdsModal\n class=\"valtimo-widget-management-wizard\"\n (close)=\"onClose()\"\n>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"onClose()\">\n <h3 cdsModalHeaderHeading>\n {{ 'widgetTabManagement.wizard.' + (editMode ? 'edit' : 'create') | translate }}\n </h3>\n </cds-modal-header>\n\n <section cdsModalContent class=\"valtimo-widget-management-wizard__content\">\n <cds-progress-indicator\n [current]=\"$currentStep()\"\n [skeleton]=\"!obs.steps\"\n [spacing]=\"'equal'\"\n [steps]=\"obs.steps\"\n (stepSelected)=\"onStepSelected($event)\"\n >\n </cds-progress-indicator>\n\n @switch ($currentStep()) {\n @case (WidgetWizardSteps.TYPE) {\n <p>{{ 'widgetTabManagement.types.description' | translate }}</p>\n\n <valtimo-widget-wizard-type-step\n class=\"valtimo-widget-wizard-step\"\n ></valtimo-widget-wizard-type-step>\n }\n @case (WidgetWizardSteps.WIDTH) {\n <p>{{ 'widgetTabManagement.width.description' | translate }}</p>\n\n <valtimo-widget-wizard-width-step\n class=\"valtimo-widget-wizard-step\"\n ></valtimo-widget-wizard-width-step>\n }\n @case (WidgetWizardSteps.STYLE) {\n <p>{{ 'widgetTabManagement.style.description' | translate }}</p>\n\n <valtimo-widget-wizard-style-step\n class=\"valtimo-widget-wizard-step\"\n ></valtimo-widget-wizard-style-step>\n }\n @case (WidgetWizardSteps.CONTENT) {\n <valtimo-widget-wizard-content-step\n (contentValidEvent)=\"onContentValidEvent($event)\"\n ></valtimo-widget-wizard-content-step>\n }\n @default {\n <p>{{ 'widgetTabManagement.types.description' | translate }}</p>\n\n <valtimo-widget-wizard-type-step></valtimo-widget-wizard-type-step>\n }\n }\n </section>\n\n <cds-modal-footer class=\"valtimo-widget-management-wizard__footer\">\n <button class=\"valtimo-widget-management-wizard__cancel\" cdsButton=\"ghost\" (click)=\"onClose()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n @if ($currentStep() !== WidgetWizardSteps.TYPE) {\n <button\n class=\"valtimo-widget-management-wizard__back\"\n cdsButton=\"secondary\"\n [disabled]=\"$backButtonDisabled()\"\n (click)=\"onBackButtonClick()\"\n >\n {{ 'interface.back' | translate }}\n </button>\n }\n\n <button\n class=\"valtimo-widget-management-wizard__next\"\n cdsButton=\"primary\"\n [disabled]=\"$nextButtonDisabled()\"\n (click)=\"onNextButtonClick()\"\n >\n {{\n 'interface.' + ($currentStep() === WidgetWizardSteps.CONTENT ? 'save' : 'next') | translate\n }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", styles: [".valtimo-widget-management-wizard__content{display:flex;flex-direction:column;gap:32px}.valtimo-widget-management-wizard__footer footer{display:grid;grid-template-columns:repeat(4,1fr);grid-template-areas:\"cancel . back next\"}.valtimo-widget-management-wizard__footer footer button{width:100%}.valtimo-widget-management-wizard__cancel{grid-area:cancel}.valtimo-widget-management-wizard__back{grid-area:back}.valtimo-widget-management-wizard__next{grid-area:next}.valtimo-widget-management-wizard .cds--modal-container{height:88%;background:var(--cds-layer-02)}.valtimo-widget-management-wizard .valtimo-widget-wizard-step__content fieldset{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px}.valtimo-widget-management-wizard .valtimo-widget-wizard-step__tile .cds--tile{height:100%}.valtimo-widget-management-wizard .valtimo-widget-wizard-step__tile .cds--tile-content{display:flex;flex-direction:column;max-width:260px;gap:16px;justify-content:space-between}.valtimo-widget-management-wizard .valtimo-widget-wizard-step__tile .cds--tile:not(.cds--tile--disabled) .cds--tile-content{color:var(--cds-text-primary)}.valtimo-widget-management-wizard .valtimo-widget-wizard-step__tile-title{font-size:20px}::ng-deep .cds--tab-content{padding:0}\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: i2$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ProgressIndicatorModule }, { kind: "component", type: i3.ProgressIndicator, selector: "cds-progress-indicator, ibm-progress-indicator", inputs: ["current", "steps", "translations", "orientation", "skeleton", "spacing"], outputs: ["stepSelected"] }, { kind: "ngmodule", type: ModalModule }, { kind: "component", type: i3.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i3.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i3.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i3.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i3.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "component", type: WidgetWizardContentStepComponent, selector: "valtimo-widget-wizard-content-step", outputs: ["contentValidEvent"] }, { kind: "component", type: WidgetWizardStyleStepComponent, selector: "valtimo-widget-wizard-style-step" }, { kind: "component", type: WidgetWizardTypeStepComponent, selector: "valtimo-widget-wizard-type-step" }, { kind: "component", type: WidgetWizardWidthStepComponent, selector: "valtimo-widget-wizard-width-step" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
2543
+ }
2544
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetManagementWizardComponent, decorators: [{
2545
+ type: Component,
2546
+ args: [{ selector: 'valtimo-widget-management-wizard', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [
2547
+ CommonModule,
2548
+ TranslateModule,
2549
+ ProgressIndicatorModule,
2550
+ ModalModule,
2551
+ ButtonModule,
2552
+ ...WIDGET_STEPS,
2553
+ ], 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 *ngIf=\"{steps: steps$ | async} as obs\"\n [open]=\"open\"\n showFooter=\"true\"\n size=\"lg\"\n valtimoCdsModal\n class=\"valtimo-widget-management-wizard\"\n (close)=\"onClose()\"\n>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"onClose()\">\n <h3 cdsModalHeaderHeading>\n {{ 'widgetTabManagement.wizard.' + (editMode ? 'edit' : 'create') | translate }}\n </h3>\n </cds-modal-header>\n\n <section cdsModalContent class=\"valtimo-widget-management-wizard__content\">\n <cds-progress-indicator\n [current]=\"$currentStep()\"\n [skeleton]=\"!obs.steps\"\n [spacing]=\"'equal'\"\n [steps]=\"obs.steps\"\n (stepSelected)=\"onStepSelected($event)\"\n >\n </cds-progress-indicator>\n\n @switch ($currentStep()) {\n @case (WidgetWizardSteps.TYPE) {\n <p>{{ 'widgetTabManagement.types.description' | translate }}</p>\n\n <valtimo-widget-wizard-type-step\n class=\"valtimo-widget-wizard-step\"\n ></valtimo-widget-wizard-type-step>\n }\n @case (WidgetWizardSteps.WIDTH) {\n <p>{{ 'widgetTabManagement.width.description' | translate }}</p>\n\n <valtimo-widget-wizard-width-step\n class=\"valtimo-widget-wizard-step\"\n ></valtimo-widget-wizard-width-step>\n }\n @case (WidgetWizardSteps.STYLE) {\n <p>{{ 'widgetTabManagement.style.description' | translate }}</p>\n\n <valtimo-widget-wizard-style-step\n class=\"valtimo-widget-wizard-step\"\n ></valtimo-widget-wizard-style-step>\n }\n @case (WidgetWizardSteps.CONTENT) {\n <valtimo-widget-wizard-content-step\n (contentValidEvent)=\"onContentValidEvent($event)\"\n ></valtimo-widget-wizard-content-step>\n }\n @default {\n <p>{{ 'widgetTabManagement.types.description' | translate }}</p>\n\n <valtimo-widget-wizard-type-step></valtimo-widget-wizard-type-step>\n }\n }\n </section>\n\n <cds-modal-footer class=\"valtimo-widget-management-wizard__footer\">\n <button class=\"valtimo-widget-management-wizard__cancel\" cdsButton=\"ghost\" (click)=\"onClose()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n @if ($currentStep() !== WidgetWizardSteps.TYPE) {\n <button\n class=\"valtimo-widget-management-wizard__back\"\n cdsButton=\"secondary\"\n [disabled]=\"$backButtonDisabled()\"\n (click)=\"onBackButtonClick()\"\n >\n {{ 'interface.back' | translate }}\n </button>\n }\n\n <button\n class=\"valtimo-widget-management-wizard__next\"\n cdsButton=\"primary\"\n [disabled]=\"$nextButtonDisabled()\"\n (click)=\"onNextButtonClick()\"\n >\n {{\n 'interface.' + ($currentStep() === WidgetWizardSteps.CONTENT ? 'save' : 'next') | translate\n }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", styles: [".valtimo-widget-management-wizard__content{display:flex;flex-direction:column;gap:32px}.valtimo-widget-management-wizard__footer footer{display:grid;grid-template-columns:repeat(4,1fr);grid-template-areas:\"cancel . back next\"}.valtimo-widget-management-wizard__footer footer button{width:100%}.valtimo-widget-management-wizard__cancel{grid-area:cancel}.valtimo-widget-management-wizard__back{grid-area:back}.valtimo-widget-management-wizard__next{grid-area:next}.valtimo-widget-management-wizard .cds--modal-container{height:88%;background:var(--cds-layer-02)}.valtimo-widget-management-wizard .valtimo-widget-wizard-step__content fieldset{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px}.valtimo-widget-management-wizard .valtimo-widget-wizard-step__tile .cds--tile{height:100%}.valtimo-widget-management-wizard .valtimo-widget-wizard-step__tile .cds--tile-content{display:flex;flex-direction:column;max-width:260px;gap:16px;justify-content:space-between}.valtimo-widget-management-wizard .valtimo-widget-wizard-step__tile .cds--tile:not(.cds--tile--disabled) .cds--tile-content{color:var(--cds-text-primary)}.valtimo-widget-management-wizard .valtimo-widget-wizard-step__tile-title{font-size:20px}::ng-deep .cds--tab-content{padding:0}\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"] }]
2554
+ }], ctorParameters: () => [{ type: i1.KeyGeneratorService }, { type: i2$1.TranslateService }, { type: WidgetWizardService }], propDecorators: { open: [{
2555
+ type: Input
2556
+ }], editMode: [{
2557
+ type: Input
2558
+ }], closeEvent: [{
2559
+ type: Output
2560
+ }] } });
2561
+
2562
+ /*
2563
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2564
+ *
2565
+ * Licensed under EUPL, Version 1.2 (the "License");
2566
+ * you may not use this file except in compliance with the License.
2567
+ * You may obtain a copy of the License at
2568
+ *
2569
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2570
+ *
2571
+ * Unless required by applicable law or agreed to in writing, software
2572
+ * distributed under the License is distributed on an "AS IS" basis,
2573
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2574
+ * See the License for the specific language governing permissions and
2575
+ * limitations under the License.
2576
+ */
2577
+ class WidgetManagementEditorComponent {
2578
+ set params(value) {
2579
+ if (!value)
2580
+ return;
2581
+ this.widgetManagementService.initParams(value);
2582
+ }
2583
+ set availableWidgetTypes(value) {
2584
+ if (!value)
2585
+ return;
2586
+ this.widgetWizardService.$availableWidgetTypes.set(value);
2587
+ }
2588
+ constructor(translateService, widgetWizardService, widgetManagementService) {
2589
+ this.translateService = translateService;
2590
+ this.widgetWizardService = widgetWizardService;
2591
+ this.widgetManagementService = widgetManagementService;
2592
+ this.FIELDS = [
2593
+ {
2594
+ key: 'title',
2595
+ label: 'interface.title',
2596
+ viewType: ViewType.TEXT,
2597
+ },
2598
+ {
2599
+ key: 'tags',
2600
+ label: 'widgetTabManagement.columns.type',
2601
+ viewType: ViewType.TAGS,
2602
+ },
2603
+ {
2604
+ key: 'key',
2605
+ label: 'interface.key',
2606
+ viewType: ViewType.TEXT,
2607
+ },
2608
+ {
2609
+ key: 'widthTranslation',
2610
+ label: 'widgetTabManagement.columns.width',
2611
+ viewType: ViewType.TEXT,
2612
+ },
2613
+ {
2614
+ key: 'highContrast',
2615
+ label: 'widgetTabManagement.columns.highContrast',
2616
+ viewType: ViewType.BOOLEAN,
2617
+ },
2618
+ ];
2619
+ this.ACTION_ITEMS = [
2620
+ {
2621
+ label: 'interface.edit',
2622
+ callback: this.editWidget.bind(this),
2623
+ },
2624
+ {
2625
+ label: 'interface.duplicate',
2626
+ callback: this.duplicateWidget.bind(this),
2627
+ },
2628
+ {
2629
+ label: 'interface.delete',
2630
+ callback: this.deleteWidget.bind(this),
2631
+ type: 'danger',
2632
+ },
2633
+ ];
2634
+ this._refresh$ = new BehaviorSubject(null);
2635
+ this.widgets$ = this._refresh$.pipe(switchMap(() => combineLatest([
2636
+ this.widgetManagementService.getWidgetConfiguration(),
2637
+ this.translateService.stream('key'),
2638
+ ])), filter(([widgets]) => !!widgets), tap(([widgets]) => this.widgetWizardService.$usedWidgetKeys.set(widgets.map((widget) => widget.key))), map(([widgets]) => widgets.map(item => ({
2639
+ ...item,
2640
+ widthTranslation: this.translateService.instant(this.getWidthTranslationKey(item.width)),
2641
+ tags: [
2642
+ {
2643
+ content: this.translateService.instant(`widgetTabManagement.types.${item.type}.title`),
2644
+ type: WidgetTypeTags[item.type],
2645
+ },
2646
+ ],
2647
+ }))));
2648
+ this.$isWizardOpen = signal(false);
2649
+ this.$isEditMode = this.widgetWizardService.$editMode;
2650
+ this.deleteModalOpen$ = new BehaviorSubject(false);
2651
+ this.$deleteWidget = signal(null);
2652
+ this.$dragAndDropDisabled = signal(false);
2653
+ }
2654
+ editWidget(tabWidget) {
2655
+ this.widgetWizardService.$widgetTitle.set(tabWidget.title);
2656
+ this.widgetWizardService.$widgetStyle.set(tabWidget.highContrast ? WidgetStyle.HIGH_CONTRAST : WidgetStyle.DEFAULT);
2657
+ this.widgetWizardService.$widgetWidth.set(tabWidget.width);
2658
+ this.widgetWizardService.$selectedWidget.set(AVAILABLE_WIDGETS.find(available => available.type === tabWidget.type) ?? null);
2659
+ this.widgetWizardService.$widgetContent.set(tabWidget.properties);
2660
+ this.widgetWizardService.$editMode.set(true);
2661
+ this.widgetWizardService.$widgetKey.set(tabWidget.key);
2662
+ this.widgetWizardService.$widgetActions.set(tabWidget.actions);
2663
+ this.$isWizardOpen.set(true);
2664
+ }
2665
+ duplicateWidget(tabWidget) {
2666
+ const tabWidgetClone = cloneDeep(tabWidget);
2667
+ tabWidgetClone.key = '';
2668
+ this.editWidget(tabWidgetClone);
2669
+ }
2670
+ openAddModal() {
2671
+ this.$isWizardOpen.set(true);
2672
+ }
2673
+ onDeleteConfirm(widget) {
2674
+ this.widgetManagementService
2675
+ .deleteWidget?.(widget)
2676
+ .pipe(take(1))
2677
+ .subscribe(() => this._refresh$.next(null));
2678
+ }
2679
+ onCloseEvent(event) {
2680
+ this.$isWizardOpen.set(false);
2681
+ this.widgetWizardService.resetWizard();
2682
+ const { type, widget } = event;
2683
+ if (!widget || type === WidgetWizardCloseEventType.CANCEL)
2684
+ return;
2685
+ (type === WidgetWizardCloseEventType.CREATE
2686
+ ? this.widgetManagementService.createWidget(widget)
2687
+ : this.widgetManagementService.updateWidget(widget))
2688
+ .pipe(take(1))
2689
+ .subscribe(() => {
2690
+ this._refresh$.next(null);
2691
+ });
2692
+ }
2693
+ onItemsReordered(widgets) {
2694
+ this.$dragAndDropDisabled.set(true);
2695
+ this.widgetManagementService
2696
+ .updateWidgetConfiguration(widgets)
2697
+ .pipe(take(1))
2698
+ .subscribe(() => this.$dragAndDropDisabled.set(false));
2699
+ }
2700
+ deleteWidget(tabWidget) {
2701
+ this.$deleteWidget.set(tabWidget);
2702
+ this.deleteModalOpen$.next(true);
2703
+ }
2704
+ getWidthTranslationKey(width) {
2705
+ switch (width) {
2706
+ case 1:
2707
+ return 'widgetTabManagement.width.small.title';
2708
+ case 2:
2709
+ return 'widgetTabManagement.width.medium.title';
2710
+ case 3:
2711
+ return 'widgetTabManagement.width.large.title';
2712
+ case 4:
2713
+ return 'widgetTabManagement.width.xtraLarge.title';
2714
+ default:
2715
+ return '-';
2716
+ }
2717
+ }
2718
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetManagementEditorComponent, deps: [{ token: i2$1.TranslateService }, { token: WidgetWizardService }, { token: WIDGET_MANAGEMENT_SERVICE }], target: i0.ɵɵFactoryTarget.Component }); }
2719
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: WidgetManagementEditorComponent, isStandalone: true, selector: "valtimo-widget-management-editor", inputs: { params: "params", availableWidgetTypes: "availableWidgetTypes" }, 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 [actionItems]=\"ACTION_ITEMS\"\n [fields]=\"FIELDS\"\n [header]=\"false\"\n [items]=\"widgets$ | async\"\n [dragAndDrop]=\"true\"\n [dragAndDropDisabled]=\"$dragAndDropDisabled()\"\n (itemsReordered)=\"onItemsReordered($event)\"\n (rowClicked)=\"editWidget($event)\"\n>\n <ng-container carbonToolbarContent>\n <ng-container *ngTemplateOutlet=\"addWidgetButton\"></ng-container>\n </ng-container>\n\n <valtimo-no-results\n [action]=\"addWidgetButton\"\n [description]=\"'widgetTabManagement.list.noResults.description' | translate\"\n [title]=\"'widgetTabManagement.list.noResults.title' | translate\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n\n<ng-template #addWidgetButton>\n <button cdsButton=\"primary\" (click)=\"openAddModal()\">\n {{ 'widgetTabManagement.list.add' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<valtimo-widget-management-wizard\n [editMode]=\"$isEditMode()\"\n [open]=\"$isWizardOpen()\"\n (closeEvent)=\"onCloseEvent($event)\"\n></valtimo-widget-management-wizard>\n\n<valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"Are you sure you want to delete this widget?\"\n [outputOnConfirm]=\"$deleteWidget()\"\n [showModalSubject$]=\"deleteModalOpen$\"\n titleTranslationKey=\"interface.delete\"\n (confirmEvent)=\"onDeleteConfirm($event)\"\n></valtimo-confirmation-modal>\n", dependencies: [{ 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: TranslateModule }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i1.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.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i3.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "ngmodule", type: TabsModule }, { kind: "component", type: WidgetManagementWizardComponent, selector: "valtimo-widget-management-wizard", inputs: ["open", "editMode"], outputs: ["closeEvent"] }, { kind: "ngmodule", type: ConfirmationModalModule }, { kind: "component", type: i1.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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2720
+ }
2721
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetManagementEditorComponent, decorators: [{
2722
+ type: Component,
2723
+ args: [{ selector: 'valtimo-widget-management-editor', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
2724
+ CommonModule,
2725
+ TranslateModule,
2726
+ CarbonListModule,
2727
+ ButtonModule,
2728
+ IconModule,
2729
+ TabsModule,
2730
+ WidgetManagementWizardComponent,
2731
+ ConfirmationModalModule,
2732
+ ], 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 [actionItems]=\"ACTION_ITEMS\"\n [fields]=\"FIELDS\"\n [header]=\"false\"\n [items]=\"widgets$ | async\"\n [dragAndDrop]=\"true\"\n [dragAndDropDisabled]=\"$dragAndDropDisabled()\"\n (itemsReordered)=\"onItemsReordered($event)\"\n (rowClicked)=\"editWidget($event)\"\n>\n <ng-container carbonToolbarContent>\n <ng-container *ngTemplateOutlet=\"addWidgetButton\"></ng-container>\n </ng-container>\n\n <valtimo-no-results\n [action]=\"addWidgetButton\"\n [description]=\"'widgetTabManagement.list.noResults.description' | translate\"\n [title]=\"'widgetTabManagement.list.noResults.title' | translate\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n\n<ng-template #addWidgetButton>\n <button cdsButton=\"primary\" (click)=\"openAddModal()\">\n {{ 'widgetTabManagement.list.add' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<valtimo-widget-management-wizard\n [editMode]=\"$isEditMode()\"\n [open]=\"$isWizardOpen()\"\n (closeEvent)=\"onCloseEvent($event)\"\n></valtimo-widget-management-wizard>\n\n<valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"Are you sure you want to delete this widget?\"\n [outputOnConfirm]=\"$deleteWidget()\"\n [showModalSubject$]=\"deleteModalOpen$\"\n titleTranslationKey=\"interface.delete\"\n (confirmEvent)=\"onDeleteConfirm($event)\"\n></valtimo-confirmation-modal>\n" }]
2733
+ }], ctorParameters: () => [{ type: i2$1.TranslateService }, { type: WidgetWizardService }, { type: undefined, decorators: [{
2734
+ type: Inject,
2735
+ args: [WIDGET_MANAGEMENT_SERVICE]
2736
+ }] }], propDecorators: { params: [{
2737
+ type: Input
2738
+ }], availableWidgetTypes: [{
2739
+ type: Input
2740
+ }] } });
2741
+
2742
+ /*
2743
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2744
+ *
2745
+ * Licensed under EUPL, Version 1.2 (the "License");
2746
+ * you may not use this file except in compliance with the License.
2747
+ * You may obtain a copy of the License at
2748
+ *
2749
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2750
+ *
2751
+ * Unless required by applicable law or agreed to in writing, software
2752
+ * distributed under the License is distributed on an "AS IS" basis,
2753
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2754
+ * See the License for the specific language governing permissions and
2755
+ * limitations under the License.
2756
+ */
2757
+ class WidgetManagementComponent {
2758
+ set params(value) {
2759
+ if (!value)
2760
+ return;
2761
+ this.widgetManagementService.initParams(value);
2762
+ }
2763
+ constructor(widgetManagementService) {
2764
+ this.widgetManagementService = widgetManagementService;
2765
+ this.jsonModel$ = this.widgetManagementService
2766
+ .getWidgetConfiguration()
2767
+ .pipe(map((widgets) => ({
2768
+ value: JSON.stringify(widgets),
2769
+ language: 'json',
2770
+ })));
2771
+ this.$activeTab = signal(WidgetManagementTab.VISUAL);
2772
+ this.WidgetManagementTab = WidgetManagementTab;
2773
+ }
2774
+ onSaveEvent(widgets) {
2775
+ this.widgetManagementService.updateWidgetConfiguration(widgets).pipe(take(1)).subscribe();
2776
+ }
2777
+ switchTab(tab) {
2778
+ this.$activeTab.set(tab);
2779
+ }
2780
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetManagementComponent, deps: [{ token: WIDGET_MANAGEMENT_SERVICE }], target: i0.ɵɵFactoryTarget.Component }); }
2781
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: WidgetManagementComponent, isStandalone: true, selector: "valtimo-widget-management", inputs: { params: "params", availableWidgetTypes: "availableWidgetTypes" }, 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-tabs type=\"contained\">\n <cds-tab\n [heading]=\"'interface.editor.visualEditor' | translate\"\n (selected)=\"switchTab(WidgetManagementTab.VISUAL)\"\n >\n <valtimo-widget-management-editor\n *ngIf=\"$activeTab() === WidgetManagementTab.VISUAL\"\n [availableWidgetTypes]=\"availableWidgetTypes\"\n ></valtimo-widget-management-editor>\n </cds-tab>\n\n <cds-tab\n [heading]=\"'interface.editor.jsonEditor' | translate\"\n (selected)=\"switchTab(WidgetManagementTab.JSON)\"\n >\n <valtimo-json-editor\n *ngIf=\"$activeTab() === WidgetManagementTab.JSON\"\n [model]=\"jsonModel$ | async\"\n [fitPage]=\"true\"\n [fitPageExtraSpace]=\"136\"\n (saveEvent)=\"onSaveEvent($event)\"\n ></valtimo-json-editor>\n </cds-tab>\n</cds-tabs>\n", styles: ["::ng-deep .cds--tab-content{padding:0!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: "component", type: WidgetManagementEditorComponent, selector: "valtimo-widget-management-editor", inputs: ["params", "availableWidgetTypes"] }, { kind: "ngmodule", type: TabsModule }, { kind: "component", type: i3.Tabs, selector: "cds-tabs, ibm-tabs", inputs: ["position", "cacheActive", "followFocus", "isNavigation", "ariaLabel", "ariaLabelledby", "type", "theme", "skeleton"] }, { kind: "component", type: i3.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: i2$1.TranslatePipe, name: "translate" }, { kind: "component", type: JsonEditorComponent, selector: "valtimo-json-editor", inputs: ["disabled", "model", "editorOptions", "fitPage", "fitPageExtraSpace", "formatOnLoad", "heightPx", "heightStyle", "jsonSchema", "showEditButton", "widthPx"], outputs: ["changeEvent", "discardEvent", "keepEditingEvent", "saveEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2782
+ }
2783
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetManagementComponent, decorators: [{
2784
+ type: Component,
2785
+ args: [{ selector: 'valtimo-widget-management', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
2786
+ CommonModule,
2787
+ WidgetManagementEditorComponent,
2788
+ TabsModule,
2789
+ TranslateModule,
2790
+ JsonEditorComponent,
2791
+ ], 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-tabs type=\"contained\">\n <cds-tab\n [heading]=\"'interface.editor.visualEditor' | translate\"\n (selected)=\"switchTab(WidgetManagementTab.VISUAL)\"\n >\n <valtimo-widget-management-editor\n *ngIf=\"$activeTab() === WidgetManagementTab.VISUAL\"\n [availableWidgetTypes]=\"availableWidgetTypes\"\n ></valtimo-widget-management-editor>\n </cds-tab>\n\n <cds-tab\n [heading]=\"'interface.editor.jsonEditor' | translate\"\n (selected)=\"switchTab(WidgetManagementTab.JSON)\"\n >\n <valtimo-json-editor\n *ngIf=\"$activeTab() === WidgetManagementTab.JSON\"\n [model]=\"jsonModel$ | async\"\n [fitPage]=\"true\"\n [fitPageExtraSpace]=\"136\"\n (saveEvent)=\"onSaveEvent($event)\"\n ></valtimo-json-editor>\n </cds-tab>\n</cds-tabs>\n", styles: ["::ng-deep .cds--tab-content{padding:0!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"] }]
2792
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2793
+ type: Inject,
2794
+ args: [WIDGET_MANAGEMENT_SERVICE]
2795
+ }] }], propDecorators: { params: [{
2796
+ type: Input
2797
+ }], availableWidgetTypes: [{
2798
+ type: Input
2799
+ }] } });
2800
+
2801
+ /*
2802
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2803
+ *
2804
+ * Licensed under EUPL, Version 1.2 (the "License");
2805
+ * you may not use this file except in compliance with the License.
2806
+ * You may obtain a copy of the License at
2807
+ *
2808
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2809
+ *
2810
+ * Unless required by applicable law or agreed to in writing, software
2811
+ * distributed under the License is distributed on an "AS IS" basis,
2812
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2813
+ * See the License for the specific language governing permissions and
2814
+ * limitations under the License.
2815
+ */
2816
+
2817
+ /*
2818
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2819
+ *
2820
+ * Licensed under EUPL, Version 1.2 (the "License");
2821
+ * you may not use this file except in compliance with the License.
2822
+ * You may obtain a copy of the License at
2823
+ *
2824
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2825
+ *
2826
+ * Unless required by applicable law or agreed to in writing, software
2827
+ * distributed under the License is distributed on an "AS IS" basis,
2828
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2829
+ * See the License for the specific language governing permissions and
2830
+ * limitations under the License.
2831
+ */
2832
+
2833
+ /*
2834
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2835
+ *
2836
+ * Licensed under EUPL, Version 1.2 (the "License");
2837
+ * you may not use this file except in compliance with the License.
2838
+ * You may obtain a copy of the License at
2839
+ *
2840
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2841
+ *
2842
+ * Unless required by applicable law or agreed to in writing, software
2843
+ * distributed under the License is distributed on an "AS IS" basis,
2844
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2845
+ * See the License for the specific language governing permissions and
2846
+ * limitations under the License.
2847
+ */
2848
+ const WIDGET_WIDTH_1X = 320;
2849
+ const WIDGET_HEIGHT_1X = 200;
2850
+ const DEFAULT_WIDGET_COMPONENT_MAP = {
2851
+ [WidgetType.FORMIO]: WidgetFormioComponent,
2852
+ [WidgetType.CUSTOM]: WidgetCustomComponent,
2853
+ [WidgetType.COLLECTION]: WidgetCollectionComponent,
2854
+ [WidgetType.TABLE]: WidgetTableComponent,
2855
+ [WidgetType.FIELDS]: WidgetFieldComponent,
2856
+ };
2857
+
2858
+ /*
2859
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2860
+ *
2861
+ * Licensed under EUPL, Version 1.2 (the "License");
2862
+ * you may not use this file except in compliance with the License.
2863
+ * You may obtain a copy of the License at
2864
+ *
2865
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2866
+ *
2867
+ * Unless required by applicable law or agreed to in writing, software
2868
+ * distributed under the License is distributed on an "AS IS" basis,
2869
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2870
+ * See the License for the specific language governing permissions and
2871
+ * limitations under the License.
2872
+ */
2873
+ const WIDGET_MANAGEMENT_SERVICE = new InjectionToken('WIDGET_MANAGEMENT_SERVICE');
2874
+
2875
+ /*
2876
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2877
+ *
2878
+ * Licensed under EUPL, Version 1.2 (the "License");
2879
+ * you may not use this file except in compliance with the License.
2880
+ * You may obtain a copy of the License at
2881
+ *
2882
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2883
+ *
2884
+ * Unless required by applicable law or agreed to in writing, software
2885
+ * distributed under the License is distributed on an "AS IS" basis,
2886
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2887
+ * See the License for the specific language governing permissions and
2888
+ * limitations under the License.
2889
+ */
2890
+
2891
+ /*
2892
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
2893
+ *
2894
+ * Licensed under EUPL, Version 1.2 (the "License");
2895
+ * you may not use this file except in compliance with the License.
2896
+ * You may obtain a copy of the License at
2897
+ *
2898
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2899
+ *
2900
+ * Unless required by applicable law or agreed to in writing, software
2901
+ * distributed under the License is distributed on an "AS IS" basis,
2902
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2903
+ * See the License for the specific language governing permissions and
2904
+ * limitations under the License.
2905
+ */
2906
+ class WidgetLayoutService {
2907
+ get _muuri$() {
2908
+ return this._muuriSubject$.pipe(filter(muuri => !!muuri));
373
2909
  }
374
- unflattenObject(obj, delimiter = '.') {
375
- return Object.keys(obj).reduce((res, k) => {
376
- k.split(delimiter).reduce((acc, e, i, keys) => acc[e] ||
377
- (acc[e] = isNaN(Number(keys[i + 1])) ? (keys.length - 1 === i ? obj[k] : {}) : []), res);
378
- return res;
379
- }, {});
2910
+ get _containerWidth$() {
2911
+ return this._containerWidthSubject$.pipe(filter(width => width !== null));
380
2912
  }
381
- getLocalizationsForUpdateRequest(changedValues, languageOptions) {
382
- const localizations = [];
383
- const translationObject = {};
384
- languageOptions.forEach(languageOption => {
385
- translationObject[languageOption] = {};
386
- });
387
- changedValues.forEach(changedValue => {
388
- languageOptions.forEach((languageOption, index) => {
389
- translationObject[languageOption] = {
390
- ...translationObject[languageOption],
391
- [changedValue[0]]: changedValue[index + 1],
392
- };
393
- });
2913
+ get amountOfColumns$() {
2914
+ return this._containerWidth$.pipe(map(containerWidth => Math.floor(containerWidth / WIDGET_WIDTH_1X)));
2915
+ }
2916
+ get _widgets$() {
2917
+ return this._widgetsSubject$.pipe(filter(widgets => widgets !== null));
2918
+ }
2919
+ get _widgetDataLoaded$() {
2920
+ return this._widgetDataLoadedSubject$.pipe(filter(loaded => loaded !== null));
2921
+ }
2922
+ get loaded$() {
2923
+ return combineLatest([
2924
+ this._widgetDataLoaded$,
2925
+ this._widgets$,
2926
+ this._widgetsWithExternalData$,
2927
+ this._widgetsWithExternalDataReady$,
2928
+ this._containerWidth$,
2929
+ ]).pipe(map(([widgetDataLoaded, widgets, widgetsWithExternalData, widgetsWithExternalDataReady]) => widgetDataLoaded?.length === widgets.length &&
2930
+ widgetsWithExternalData.length === widgetsWithExternalDataReady.length), filter(loaded => !!loaded));
2931
+ }
2932
+ constructor() {
2933
+ this._containerWidthSubject$ = new BehaviorSubject(null);
2934
+ this._widgetsSubject$ = new BehaviorSubject(null);
2935
+ this._widgetDataLoadedSubject$ = new BehaviorSubject(null);
2936
+ this._muuriSubject$ = new BehaviorSubject(null);
2937
+ this._triggerMuuriLayout$ = new Subject();
2938
+ this._widgetsWithExternalData$ = new BehaviorSubject([]);
2939
+ this._widgetsWithExternalDataReady$ = new BehaviorSubject([]);
2940
+ this._subscriptions = new Subscription();
2941
+ this.openMuuriSubscription();
2942
+ }
2943
+ ngOnDestroy() {
2944
+ this._subscriptions.unsubscribe();
2945
+ }
2946
+ setMuuri(muuri) {
2947
+ this._muuriSubject$.next(muuri);
2948
+ }
2949
+ triggerMuuriLayout() {
2950
+ this._triggerMuuriLayout$.next(null);
2951
+ }
2952
+ setWidgets(widgets) {
2953
+ this._widgetsSubject$.next(widgets);
2954
+ }
2955
+ setWidgetWithExternalData(uuid) {
2956
+ this._widgetsWithExternalData$.pipe(take(1)).subscribe(widgetsWithExternalData => {
2957
+ this._widgetsWithExternalData$.next([...widgetsWithExternalData, uuid]);
394
2958
  });
395
- languageOptions.forEach(languageOption => {
396
- translationObject[languageOption] = this.unflattenObject(translationObject[languageOption]);
2959
+ }
2960
+ setWidgetWithExternalDataReady(uuid) {
2961
+ this._widgetsWithExternalDataReady$.pipe(take(1)).subscribe(widgetsWithExternalDataReady => {
2962
+ this._widgetsWithExternalDataReady$.next([...widgetsWithExternalDataReady, uuid]);
397
2963
  });
398
- Object.keys(translationObject).forEach(languageKey => {
399
- localizations.push({ languageKey, content: translationObject[languageKey] });
2964
+ }
2965
+ setContainerWidth(width) {
2966
+ this._containerWidthSubject$.next(width);
2967
+ }
2968
+ setWidgetDataLoaded(uuid) {
2969
+ this._widgetDataLoadedSubject$.pipe(take(1)).subscribe(widgetDataLoaded => {
2970
+ if (!(widgetDataLoaded || []).includes(uuid)) {
2971
+ this._widgetDataLoadedSubject$.next([...(widgetDataLoaded || []), uuid]);
2972
+ }
400
2973
  });
401
- return localizations;
402
2974
  }
403
- mapMergedLocalizationsToMultiInput(languageOptions, mergedLocalizations) {
404
- if (Object.keys(mergedLocalizations).length === 0) {
405
- return [];
2975
+ reset() {
2976
+ this._containerWidthSubject$.next(null);
2977
+ this._widgetsSubject$.next(null);
2978
+ this._widgetDataLoadedSubject$.next(null);
2979
+ this._widgetsWithExternalData$.next([]);
2980
+ this._widgetsWithExternalDataReady$.next([]);
2981
+ this._muuriSubject$.next(null);
2982
+ }
2983
+ openMuuriSubscription() {
2984
+ this._subscriptions.add(combineLatest([this._muuri$, this._triggerMuuriLayout$])
2985
+ .pipe(debounceTime(150))
2986
+ .subscribe(([muuri]) => {
2987
+ muuri.refreshItems();
2988
+ muuri.layout();
2989
+ }));
2990
+ }
2991
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetLayoutService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2992
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetLayoutService, providedIn: 'root' }); }
2993
+ }
2994
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetLayoutService, decorators: [{
2995
+ type: Injectable,
2996
+ args: [{ providedIn: 'root' }]
2997
+ }], ctorParameters: () => [] });
2998
+
2999
+ /*
3000
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3001
+ *
3002
+ * Licensed under EUPL, Version 1.2 (the "License");
3003
+ * you may not use this file except in compliance with the License.
3004
+ * You may obtain a copy of the License at
3005
+ *
3006
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3007
+ *
3008
+ * Unless required by applicable law or agreed to in writing, software
3009
+ * distributed under the License is distributed on an "AS IS" basis,
3010
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3011
+ * See the License for the specific language governing permissions and
3012
+ * limitations under the License.
3013
+ */
3014
+ class WidgetFieldsService {
3015
+ constructor(fb, translateService) {
3016
+ this.fb = fb;
3017
+ this.translateService = translateService;
3018
+ this.displayTypeItems = [
3019
+ {
3020
+ content: this.translateService.instant(`widgetTabManagement.content.displayType.${WidgetDisplayTypeKey.TEXT}`),
3021
+ id: WidgetDisplayTypeKey.TEXT,
3022
+ selected: true,
3023
+ },
3024
+ {
3025
+ content: this.translateService.instant(`widgetTabManagement.content.displayType.${WidgetDisplayTypeKey.BOOLEAN}`),
3026
+ id: WidgetDisplayTypeKey.BOOLEAN,
3027
+ selected: false,
3028
+ },
3029
+ {
3030
+ content: this.translateService.instant(`widgetTabManagement.content.displayType.${WidgetDisplayTypeKey.CURRENCY}`),
3031
+ id: WidgetDisplayTypeKey.CURRENCY,
3032
+ selected: false,
3033
+ },
3034
+ {
3035
+ content: this.translateService.instant(`widgetTabManagement.content.displayType.${WidgetDisplayTypeKey.DATE}`),
3036
+ id: WidgetDisplayTypeKey.DATE,
3037
+ selected: false,
3038
+ },
3039
+ {
3040
+ content: this.translateService.instant(`widgetTabManagement.content.displayType.${WidgetDisplayTypeKey.DATE_TIME}`),
3041
+ id: WidgetDisplayTypeKey.DATE_TIME,
3042
+ selected: false,
3043
+ },
3044
+ {
3045
+ content: this.translateService.instant(`widgetTabManagement.content.displayType.${WidgetDisplayTypeKey.ENUM}`),
3046
+ id: WidgetDisplayTypeKey.ENUM,
3047
+ selected: false,
3048
+ },
3049
+ {
3050
+ content: this.translateService.instant(`widgetTabManagement.content.displayType.${WidgetDisplayTypeKey.NUMBER}`),
3051
+ id: WidgetDisplayTypeKey.NUMBER,
3052
+ selected: false,
3053
+ },
3054
+ {
3055
+ content: this.translateService.instant(`widgetTabManagement.content.displayType.${WidgetDisplayTypeKey.PERCENT}`),
3056
+ id: WidgetDisplayTypeKey.PERCENT,
3057
+ selected: false,
3058
+ },
3059
+ {
3060
+ content: this.translateService.instant(`widgetTabManagement.content.displayType.${WidgetDisplayTypeKey.LINK}`),
3061
+ id: WidgetDisplayTypeKey.LINK,
3062
+ selected: false,
3063
+ },
3064
+ ];
3065
+ }
3066
+ getDisplayItemsSelected(control) {
3067
+ const typeControlValue = control.get('type')?.value;
3068
+ if (!typeControlValue)
3069
+ return this.displayTypeItems;
3070
+ return this.displayTypeItems.map((item) => ({
3071
+ ...item,
3072
+ selected: typeControlValue.id === item.id && typeControlValue.selected,
3073
+ }));
3074
+ }
3075
+ onDisplayTypeSelected(mainKeysArray, formGroup, event) {
3076
+ const extraControlKeys = Object.keys(formGroup.controls).filter((key) => !mainKeysArray.includes(key));
3077
+ extraControlKeys.forEach((controlKey) => formGroup.removeControl(controlKey));
3078
+ switch (event.item.id) {
3079
+ case WidgetDisplayTypeKey.BOOLEAN:
3080
+ break;
3081
+ case WidgetDisplayTypeKey.TEXT:
3082
+ formGroup.addControl('ellipsisCharacterLimit', this.fb.control(''));
3083
+ break;
3084
+ case WidgetDisplayTypeKey.CURRENCY:
3085
+ formGroup.addControl('currencyCode', this.fb.control(''));
3086
+ formGroup.addControl('display', this.fb.control(''));
3087
+ formGroup.addControl('digitsInfo', this.fb.control(''));
3088
+ break;
3089
+ case WidgetDisplayTypeKey.DATE:
3090
+ formGroup.addControl('format', this.fb.control(''));
3091
+ break;
3092
+ case WidgetDisplayTypeKey.DATE_TIME:
3093
+ formGroup.addControl('format', this.fb.control(''));
3094
+ break;
3095
+ case WidgetDisplayTypeKey.LINK:
3096
+ formGroup.addControl('linkText', this.fb.control(''));
3097
+ break;
3098
+ case WidgetDisplayTypeKey.ENUM:
3099
+ formGroup.addControl('values', this.fb.array([
3100
+ this.fb.group({
3101
+ key: this.fb.control('', Validators.required),
3102
+ value: this.fb.control('', Validators.required),
3103
+ }),
3104
+ ], Validators.required));
3105
+ break;
3106
+ default:
3107
+ formGroup.addControl('digitsInfo', this.fb.control(''));
3108
+ break;
406
3109
  }
407
- const firstLanguageOption = languageOptions[0];
408
- const firstLanguageTranslations = firstLanguageOption && mergedLocalizations[firstLanguageOption];
409
- const flattenedFirstLanguageTranslations = firstLanguageTranslations && this.flattenObject(firstLanguageTranslations);
410
- return Object.keys(flattenedFirstLanguageTranslations).map(flattenedTranslationKey => {
411
- const emptyArbitraryValue = {};
412
- emptyArbitraryValue['0'] = flattenedTranslationKey;
413
- languageOptions.forEach((languageOption, index) => {
414
- emptyArbitraryValue[`${index + 1}`] =
415
- this.flattenObject(mergedLocalizations[languageOption])[flattenedTranslationKey] || '';
416
- });
417
- return emptyArbitraryValue;
418
- });
419
3110
  }
420
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TranslationManagementComponent, deps: [{ token: i1.TranslateService }, { token: i2$2.LocalizationService }, { token: i2$1.PageHeaderService }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component }); }
421
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: TranslationManagementComponent, isStandalone: false, selector: "valtimo-translation-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<ng-container\n *ngIf=\"{\n localizationTranslationValues: localizationTranslationValues$ | async,\n loading: loading$ | async,\n disabled: disabled$ | async,\n multiInputTitles: multiInputTiles$ | async,\n amountOfArbitraryValues: amountOfArbitraryValues$ | async,\n showConfirmationModal: showConfirmationModal$,\n allChangedValuesValid: allChangedValuesValid$ | async,\n valuesChanged: valuesChanged$ | async,\n compactMode: compactMode$ | async,\n } as obs\"\n>\n <ng-container *ngIf=\"!obs.loading && obs.localizationTranslationValues; else loading\">\n <valtimo-carbon-multi-input\n [disabled]=\"obs.disabled\"\n [arbitraryAmountTitles]=\"obs.multiInputTitles\"\n [fullWidth]=\"true\"\n [minimumAmountOfRows]=\"0\"\n type=\"arbitraryAmount\"\n [arbitraryValueAmount]=\"obs.amountOfArbitraryValues\"\n [defaultValues]=\"obs.localizationTranslationValues\"\n (allValuesValidEvent)=\"validChange($event)\"\n (valueChange)=\"valueChange($event)\"\n addRowTranslationKey=\"translationManagement.add\"\n ></valtimo-carbon-multi-input>\n </ng-container>\n\n <ng-template #loading>\n <div class=\"loading-container\"><cds-loading></cds-loading></div>\n </ng-template>\n\n <valtimo-confirmation-modal\n [showModalSubject$]=\"obs.showConfirmationModal\"\n (confirmEvent)=\"saveAndRefresh()\"\n (optionalEvent)=\"saveAndStay()\"\n (cancelEvent)=\"cancel()\"\n [showOptionalButton]=\"true\"\n cancelButtonType=\"ghost\"\n optionalButtonType=\"secondary\"\n confirmButtonTextTranslationKey=\"translationManagement.saveWithReload\"\n optionalButtonTextTranslationKey=\"translationManagement.saveWithoutReload\"\n titleTranslationKey=\"translationManagement.modalTitle\"\n contentTranslationKey=\"translationManagement.modalContent\"\n [spacerAfterCancelButton]=\"true\"\n ></valtimo-confirmation-modal>\n\n <ng-container renderInPageHeader>\n <ng-template>\n <button\n cdsButton=\"primary\"\n [size]=\"obs.compactMode ? 'sm' : 'md'\"\n (click)=\"showModal()\"\n [disabled]=\"!obs.allChangedValuesValid || obs.disabled || !obs.valuesChanged\"\n >\n {{ 'interface.save' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"save\" size=\"16\"></svg>\n </button>\n </ng-template>\n </ng-container>\n</ng-container>\n", styles: [".loading-container{display:flex;width:100%;justify-content:center}\n/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.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: "component", type: i5.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "directive", type: i2$1.RenderInPageHeaderDirective, selector: "[renderInPageHeader]", inputs: ["fullWidth"] }, { kind: "directive", type: i5.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i5.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: i2$1.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: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] }); }
3111
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetFieldsService, deps: [{ token: i2.FormBuilder }, { token: i2$1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable }); }
3112
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetFieldsService, providedIn: 'root' }); }
422
3113
  }
423
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TranslationManagementComponent, decorators: [{
424
- type: Component,
425
- args: [{ selector: 'valtimo-translation-management', standalone: false, 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 localizationTranslationValues: localizationTranslationValues$ | async,\n loading: loading$ | async,\n disabled: disabled$ | async,\n multiInputTitles: multiInputTiles$ | async,\n amountOfArbitraryValues: amountOfArbitraryValues$ | async,\n showConfirmationModal: showConfirmationModal$,\n allChangedValuesValid: allChangedValuesValid$ | async,\n valuesChanged: valuesChanged$ | async,\n compactMode: compactMode$ | async,\n } as obs\"\n>\n <ng-container *ngIf=\"!obs.loading && obs.localizationTranslationValues; else loading\">\n <valtimo-carbon-multi-input\n [disabled]=\"obs.disabled\"\n [arbitraryAmountTitles]=\"obs.multiInputTitles\"\n [fullWidth]=\"true\"\n [minimumAmountOfRows]=\"0\"\n type=\"arbitraryAmount\"\n [arbitraryValueAmount]=\"obs.amountOfArbitraryValues\"\n [defaultValues]=\"obs.localizationTranslationValues\"\n (allValuesValidEvent)=\"validChange($event)\"\n (valueChange)=\"valueChange($event)\"\n addRowTranslationKey=\"translationManagement.add\"\n ></valtimo-carbon-multi-input>\n </ng-container>\n\n <ng-template #loading>\n <div class=\"loading-container\"><cds-loading></cds-loading></div>\n </ng-template>\n\n <valtimo-confirmation-modal\n [showModalSubject$]=\"obs.showConfirmationModal\"\n (confirmEvent)=\"saveAndRefresh()\"\n (optionalEvent)=\"saveAndStay()\"\n (cancelEvent)=\"cancel()\"\n [showOptionalButton]=\"true\"\n cancelButtonType=\"ghost\"\n optionalButtonType=\"secondary\"\n confirmButtonTextTranslationKey=\"translationManagement.saveWithReload\"\n optionalButtonTextTranslationKey=\"translationManagement.saveWithoutReload\"\n titleTranslationKey=\"translationManagement.modalTitle\"\n contentTranslationKey=\"translationManagement.modalContent\"\n [spacerAfterCancelButton]=\"true\"\n ></valtimo-confirmation-modal>\n\n <ng-container renderInPageHeader>\n <ng-template>\n <button\n cdsButton=\"primary\"\n [size]=\"obs.compactMode ? 'sm' : 'md'\"\n (click)=\"showModal()\"\n [disabled]=\"!obs.allChangedValuesValid || obs.disabled || !obs.valuesChanged\"\n >\n {{ 'interface.save' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"save\" size=\"16\"></svg>\n </button>\n </ng-template>\n </ng-container>\n</ng-container>\n", styles: [".loading-container{display:flex;width:100%;justify-content:center}\n/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
426
- }], ctorParameters: () => [{ type: i1.TranslateService }, { type: i2$2.LocalizationService }, { type: i2$1.PageHeaderService }, { type: Document, decorators: [{
427
- type: Inject,
428
- args: [DOCUMENT]
429
- }] }] });
3114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetFieldsService, decorators: [{
3115
+ type: Injectable,
3116
+ args: [{
3117
+ providedIn: 'root',
3118
+ }]
3119
+ }], ctorParameters: () => [{ type: i2.FormBuilder }, { type: i2$1.TranslateService }] });
3120
+
3121
+ /*
3122
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3123
+ *
3124
+ * Licensed under EUPL, Version 1.2 (the "License");
3125
+ * you may not use this file except in compliance with the License.
3126
+ * You may obtain a copy of the License at
3127
+ *
3128
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3129
+ *
3130
+ * Unless required by applicable law or agreed to in writing, software
3131
+ * distributed under the License is distributed on an "AS IS" basis,
3132
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3133
+ * See the License for the specific language governing permissions and
3134
+ * limitations under the License.
3135
+ */
3136
+ class WidgetWizardService {
3137
+ constructor() {
3138
+ this.$selectedWidget = signal(null);
3139
+ this.$widgetWidth = signal(null);
3140
+ this.$widgetStyle = signal(null);
3141
+ this.$widgetContent = signal(null);
3142
+ this.$widgetTitle = signal(null);
3143
+ this.$widgetKey = signal(null);
3144
+ this.$widgetActions = signal(undefined);
3145
+ this.$widgetsConfig = computed(() => ({
3146
+ key: this.$widgetKey() ?? '',
3147
+ title: this.$widgetTitle() ?? '',
3148
+ type: this.$selectedWidget()?.type ?? WidgetType.FIELDS,
3149
+ width: this.$widgetWidth() ?? 4,
3150
+ highContrast: (this.$widgetStyle() ?? WidgetStyle.DEFAULT) === WidgetStyle.HIGH_CONTRAST,
3151
+ properties: this.$widgetContent() ?? {},
3152
+ actions: this.$widgetActions() ?? [],
3153
+ }));
3154
+ this.$editMode = signal(false);
3155
+ this.$usedWidgetKeys = signal([]);
3156
+ this.$availableWidgetTypes = signal(null);
3157
+ }
3158
+ resetWizard() {
3159
+ this.$selectedWidget.set(null);
3160
+ this.$widgetWidth.set(null);
3161
+ this.$widgetStyle.set(null);
3162
+ this.$widgetContent.set(null);
3163
+ this.$widgetTitle.set(null);
3164
+ this.$widgetKey.set(null);
3165
+ this.$widgetActions.set(undefined);
3166
+ this.$editMode.set(false);
3167
+ }
3168
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetWizardService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3169
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetWizardService, providedIn: 'root' }); }
3170
+ }
3171
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WidgetWizardService, decorators: [{
3172
+ type: Injectable,
3173
+ args: [{
3174
+ providedIn: 'root',
3175
+ }]
3176
+ }] });
3177
+
3178
+ /*
3179
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3180
+ *
3181
+ * Licensed under EUPL, Version 1.2 (the "License");
3182
+ * you may not use this file except in compliance with the License.
3183
+ * You may obtain a copy of the License at
3184
+ *
3185
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3186
+ *
3187
+ * Unless required by applicable law or agreed to in writing, software
3188
+ * distributed under the License is distributed on an "AS IS" basis,
3189
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3190
+ * See the License for the specific language governing permissions and
3191
+ * limitations under the License.
3192
+ */
3193
+
3194
+ /*
3195
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3196
+ *
3197
+ * Licensed under EUPL, Version 1.2 (the "License");
3198
+ * you may not use this file except in compliance with the License.
3199
+ * You may obtain a copy of the License at
3200
+ *
3201
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3202
+ *
3203
+ * Unless required by applicable law or agreed to in writing, software
3204
+ * distributed under the License is distributed on an "AS IS" basis,
3205
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3206
+ * See the License for the specific language governing permissions and
3207
+ * limitations under the License.
3208
+ */
3209
+ class LayoutModule {
3210
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3211
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: LayoutModule, declarations: [LayoutComponent, LayoutPublicComponent, LayoutInternalComponent], imports: [RouterModule,
3212
+ MenuRoutingModule,
3213
+ TopbarModule,
3214
+ LeftSidebarModule,
3215
+ RightSidebarModule,
3216
+ PageHeaderModule,
3217
+ AlertModule,
3218
+ CommonModule,
3219
+ PromptModule,
3220
+ GlobalNotificationComponent], exports: [LayoutComponent] }); }
3221
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LayoutModule, imports: [RouterModule,
3222
+ MenuRoutingModule,
3223
+ TopbarModule,
3224
+ LeftSidebarModule,
3225
+ RightSidebarModule,
3226
+ PageHeaderModule,
3227
+ AlertModule,
3228
+ CommonModule,
3229
+ PromptModule,
3230
+ GlobalNotificationComponent] }); }
3231
+ }
3232
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LayoutModule, decorators: [{
3233
+ type: NgModule,
3234
+ args: [{
3235
+ declarations: [LayoutComponent, LayoutPublicComponent, LayoutInternalComponent],
3236
+ imports: [
3237
+ RouterModule,
3238
+ MenuRoutingModule,
3239
+ TopbarModule,
3240
+ LeftSidebarModule,
3241
+ RightSidebarModule,
3242
+ PageHeaderModule,
3243
+ AlertModule,
3244
+ CommonModule,
3245
+ PromptModule,
3246
+ GlobalNotificationComponent,
3247
+ ],
3248
+ exports: [LayoutComponent],
3249
+ }]
3250
+ }] });
430
3251
 
431
3252
  /*
432
3253
  * Copyright 2015-2025 Ritense BV, the Netherlands.
@@ -452,11 +3273,11 @@ const routes = [
452
3273
  },
453
3274
  ];
454
3275
  class TranslationManagementRoutingModule {
455
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TranslationManagementRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
456
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: TranslationManagementRoutingModule, imports: [i2.RouterModule], exports: [RouterModule] }); }
457
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TranslationManagementRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
3276
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TranslationManagementRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3277
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TranslationManagementRoutingModule, imports: [i2$2.RouterModule], exports: [RouterModule] }); }
3278
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TranslationManagementRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
458
3279
  }
459
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TranslationManagementRoutingModule, decorators: [{
3280
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TranslationManagementRoutingModule, decorators: [{
460
3281
  type: NgModule,
461
3282
  args: [{
462
3283
  imports: [RouterModule.forChild(routes)],
@@ -480,8 +3301,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
480
3301
  * limitations under the License.
481
3302
  */
482
3303
  class TranslationManagementModule {
483
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TranslationManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
484
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: TranslationManagementModule, declarations: [TranslationManagementComponent], imports: [CommonModule,
3304
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TranslationManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3305
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TranslationManagementModule, declarations: [TranslationManagementComponent], imports: [CommonModule,
485
3306
  TranslateModule,
486
3307
  TranslationManagementRoutingModule,
487
3308
  MultiInputFormModule,
@@ -491,7 +3312,7 @@ class TranslationManagementModule {
491
3312
  ButtonModule,
492
3313
  IconModule,
493
3314
  ConfirmationModalModule] }); }
494
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TranslationManagementModule, imports: [CommonModule,
3315
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TranslationManagementModule, imports: [CommonModule,
495
3316
  TranslateModule,
496
3317
  TranslationManagementRoutingModule,
497
3318
  MultiInputFormModule,
@@ -501,7 +3322,7 @@ class TranslationManagementModule {
501
3322
  IconModule,
502
3323
  ConfirmationModalModule] }); }
503
3324
  }
504
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TranslationManagementModule, decorators: [{
3325
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TranslationManagementModule, decorators: [{
505
3326
  type: NgModule,
506
3327
  args: [{
507
3328
  declarations: [TranslationManagementComponent],
@@ -521,6 +3342,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
521
3342
  }]
522
3343
  }] });
523
3344
 
3345
+ /*
3346
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3347
+ *
3348
+ * Licensed under EUPL, Version 1.2 (the "License");
3349
+ * you may not use this file except in compliance with the License.
3350
+ * You may obtain a copy of the License at
3351
+ *
3352
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3353
+ *
3354
+ * Unless required by applicable law or agreed to in writing, software
3355
+ * distributed under the License is distributed on an "AS IS" basis,
3356
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3357
+ * See the License for the specific language governing permissions and
3358
+ * limitations under the License.
3359
+ */
3360
+
3361
+ /*
3362
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
3363
+ *
3364
+ * Licensed under EUPL, Version 1.2 (the "License");
3365
+ * you may not use this file except in compliance with the License.
3366
+ * You may obtain a copy of the License at
3367
+ *
3368
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
3369
+ *
3370
+ * Unless required by applicable law or agreed to in writing, software
3371
+ * distributed under the License is distributed on an "AS IS" basis,
3372
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3373
+ * See the License for the specific language governing permissions and
3374
+ * limitations under the License.
3375
+ */
3376
+
524
3377
  /*
525
3378
  * Copyright 2015-2025 Ritense BV, the Netherlands.
526
3379
  *
@@ -544,5 +3397,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
544
3397
  * Generated bundle index. Do not edit.
545
3398
  */
546
3399
 
547
- export { LayoutComponent, LayoutModule, LayoutService, TranslationManagementModule };
3400
+ export { AVAILABLE_WIDGETS, CUSTOM_WIDGET_TOKEN, DEFAULT_WIDGET_COMPONENT_MAP, LayoutComponent, LayoutInternalComponent, LayoutModule, LayoutPublicComponent, LayoutService, TranslationManagementComponent, TranslationManagementModule, WIDGET_HEIGHT_1X, WIDGET_MANAGEMENT_SERVICE, WIDGET_STYLE_LABELS, WIDGET_WIDTH_1X, WIDGET_WIDTH_LABELS, WidgetBlockComponent, WidgetCollectionComponent, WidgetContainerComponent, WidgetCustomComponent, WidgetDisplayTypeKey, WidgetFieldComponent, WidgetFieldsService, WidgetFormioComponent, WidgetLayoutService, WidgetManagementCollectionComponent, WidgetManagementComponent, WidgetManagementCustomComponent, WidgetManagementEditorComponent, WidgetManagementFieldsComponent, WidgetManagementTab, WidgetManagementTableComponent, WidgetManagementWizardComponent, WidgetStyle, WidgetTableComponent, WidgetType, WidgetTypeTags, WidgetWizardCloseEventType, WidgetWizardService, WidgetWizardStep };
548
3401
  //# sourceMappingURL=valtimo-layout.mjs.map