@valtimo/form-management 0.0.0-test

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 (56) hide show
  1. package/README.md +32 -0
  2. package/fesm2022/valtimo-form-management.mjs +1463 -0
  3. package/fesm2022/valtimo-form-management.mjs.map +1 -0
  4. package/index.d.ts +6 -0
  5. package/lib/components/form-management/form-management.component.d.ts +24 -0
  6. package/lib/components/form-management/form-management.component.d.ts.map +1 -0
  7. package/lib/components/form-management-create/form-management-create.component.d.ts +33 -0
  8. package/lib/components/form-management-create/form-management-create.component.d.ts.map +1 -0
  9. package/lib/components/form-management-create/index.d.ts +2 -0
  10. package/lib/components/form-management-create/index.d.ts.map +1 -0
  11. package/lib/components/form-management-duplicate/form-management-duplicate.component.d.ts +31 -0
  12. package/lib/components/form-management-duplicate/form-management-duplicate.component.d.ts.map +1 -0
  13. package/lib/components/form-management-duplicate/index.d.ts +2 -0
  14. package/lib/components/form-management-duplicate/index.d.ts.map +1 -0
  15. package/lib/components/form-management-edit/form-management-edit.component.d.ts +86 -0
  16. package/lib/components/form-management-edit/form-management-edit.component.d.ts.map +1 -0
  17. package/lib/components/form-management-edit/index.d.ts +2 -0
  18. package/lib/components/form-management-edit/index.d.ts.map +1 -0
  19. package/lib/components/form-management-list/form-management-list.component.d.ts +53 -0
  20. package/lib/components/form-management-list/form-management-list.component.d.ts.map +1 -0
  21. package/lib/components/form-management-list/index.d.ts +2 -0
  22. package/lib/components/form-management-list/index.d.ts.map +1 -0
  23. package/lib/components/form-management-upload/form-management-upload.component.d.ts +28 -0
  24. package/lib/components/form-management-upload/form-management-upload.component.d.ts.map +1 -0
  25. package/lib/components/form-management-upload/index.d.ts +2 -0
  26. package/lib/components/form-management-upload/index.d.ts.map +1 -0
  27. package/lib/components/index.d.ts +6 -0
  28. package/lib/components/index.d.ts.map +1 -0
  29. package/lib/constants/form-management.test-ids.d.ts +11 -0
  30. package/lib/constants/form-management.test-ids.d.ts.map +1 -0
  31. package/lib/constants/index.d.ts +2 -0
  32. package/lib/constants/index.d.ts.map +1 -0
  33. package/lib/form-management.module.d.ts +14 -0
  34. package/lib/form-management.module.d.ts.map +1 -0
  35. package/lib/models/form-definition.model.d.ts +32 -0
  36. package/lib/models/form-definition.model.d.ts.map +1 -0
  37. package/lib/models/form-edit-tabs.enum.d.ts +6 -0
  38. package/lib/models/form-edit-tabs.enum.d.ts.map +1 -0
  39. package/lib/models/form-management.model.d.ts +13 -0
  40. package/lib/models/form-management.model.d.ts.map +1 -0
  41. package/lib/models/index.d.ts +4 -0
  42. package/lib/models/index.d.ts.map +1 -0
  43. package/lib/services/form-management.service.d.ts +31 -0
  44. package/lib/services/form-management.service.d.ts.map +1 -0
  45. package/lib/services/index.d.ts +2 -0
  46. package/lib/services/index.d.ts.map +1 -0
  47. package/lib/utils/form-management.utils.d.ts +8 -0
  48. package/lib/utils/form-management.utils.d.ts.map +1 -0
  49. package/lib/utils/index.d.ts +2 -0
  50. package/lib/utils/index.d.ts.map +1 -0
  51. package/lib/validators/no-duplicate-form.validator.d.ts +6 -0
  52. package/lib/validators/no-duplicate-form.validator.d.ts.map +1 -0
  53. package/package.json +24 -0
  54. package/public-api.d.ts +8 -0
  55. package/public-api.d.ts.map +1 -0
  56. package/valtimo-form-management.d.ts.map +1 -0
@@ -0,0 +1,1463 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, EventEmitter, Output, Input, Component, Inject, ChangeDetectionStrategy, HostBinding, ViewEncapsulation, NgModule } from '@angular/core';
3
+ import { of, combineLatest, map as map$1, switchMap as switchMap$1, tap, BehaviorSubject, startWith, Subscription, filter as filter$1, take as take$1 } from 'rxjs';
4
+ import * as i4 from '@valtimo/shared';
5
+ import { BaseApiService, getCaseManagementRouteParams, getBuildingBlockManagementRouteParams, getCaseManagementRouteParamsAndContext, ROLE_ADMIN, RouterUtils } from '@valtimo/shared';
6
+ import * as i1 from '@angular/common/http';
7
+ import * as i7 from '@angular/common';
8
+ import { CommonModule } from '@angular/common';
9
+ import * as i3 from '@angular/router';
10
+ import { RouterOutlet, RouterModule } from '@angular/router';
11
+ import * as i2$1 from 'carbon-components-angular';
12
+ import { ButtonModule, InputModule, TilesModule, LayerModule, ModalModule, BaseModal, FileUploaderModule, TabsModule, TagModule, IconModule, LoadingModule } from 'carbon-components-angular';
13
+ import * as i2 from '@angular/forms';
14
+ import { FormControl, Validators, ReactiveFormsModule, FormGroup, FormsModule } from '@angular/forms';
15
+ import * as i5 from '@ngx-translate/core';
16
+ import { TranslateModule } from '@ngx-translate/core';
17
+ import * as i3$1 from '@valtimo/components';
18
+ import { WidgetModule, ValtimoCdsModalDirective, CARBON_CONSTANTS, CarbonListModule, EditorModule, FormIoModule, RenderInPageHeaderDirective, OverflowMenuComponent, OverflowMenuOptionComponent, OverflowMenuTriggerComponent, ConfirmationModalModule, SpinnerModule, ViewType } from '@valtimo/components';
19
+ import { map, distinctUntilChanged, switchMap, filter, take, tap as tap$1 } from 'rxjs/operators';
20
+ import { ArrowLeft16, Upload16 } from '@carbon/icons';
21
+ import { AuthGuardService } from '@valtimo/security';
22
+
23
+ /*
24
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
25
+ *
26
+ * Licensed under EUPL, Version 1.2 (the "License");
27
+ * you may not use this file except in compliance with the License.
28
+ * You may obtain a copy of the License at
29
+ *
30
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
31
+ *
32
+ * Unless required by applicable law or agreed to in writing, software
33
+ * distributed under the License is distributed on an "AS IS" basis,
34
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35
+ * See the License for the specific language governing permissions and
36
+ * limitations under the License.
37
+ */
38
+ class FormManagementService extends BaseApiService {
39
+ constructor(httpClient, configService) {
40
+ super(httpClient, configService);
41
+ this.httpClient = httpClient;
42
+ this.configService = configService;
43
+ }
44
+ getFormDefinition(formDefinitionId) {
45
+ return this.httpClient.get(this.getApiUrl(`/management/v1/form/${formDefinitionId}`));
46
+ }
47
+ getFormDefinitionCase(caseDefinitionKey, caseDefinitionVersionTag, formDefinitionId) {
48
+ return this.httpClient.get(this.getApiUrl(`/management/v1/case-definition/${caseDefinitionKey}/version/${caseDefinitionVersionTag}/form/${formDefinitionId}`));
49
+ }
50
+ existsFormDefinition(formDefinitionName) {
51
+ if (!formDefinitionName)
52
+ return of(false);
53
+ return this.httpClient.get(this.getApiUrl(`/management/v1/form/exists/${formDefinitionName}`));
54
+ }
55
+ existsFormDefinitionCase(caseDefinitionKey, caseDefinitionVersionTag, formDefinitionName) {
56
+ if (!formDefinitionName || !caseDefinitionKey || !caseDefinitionVersionTag)
57
+ return of(false);
58
+ return this.httpClient.get(this.getApiUrl(`management/v1/case-definition/${caseDefinitionKey}/version/${caseDefinitionVersionTag}/form/${formDefinitionName}/exists`));
59
+ }
60
+ queryFormDefinitions(params) {
61
+ return this.httpClient.get(this.getApiUrl(`/management/v1/form`), {
62
+ params,
63
+ });
64
+ }
65
+ queryFormDefinitionsCase(caseDefinitionKey, caseDefinitionVersionTag, params) {
66
+ return this.httpClient.get(this.getApiUrl(`/management/v1/case-definition/${caseDefinitionKey}/version/${caseDefinitionVersionTag}/form`), {
67
+ params,
68
+ });
69
+ }
70
+ createFormDefinition(request) {
71
+ return this.httpClient.post(this.getApiUrl(`/management/v1/form`), request);
72
+ }
73
+ createFormDefinitionsCase(caseDefinitionKey, caseDefinitionVersionTag, request) {
74
+ return this.httpClient.post(this.getApiUrl(`/management/v1/case-definition/${caseDefinitionKey}/version/${caseDefinitionVersionTag}/form`), request);
75
+ }
76
+ modifyFormDefinition(request) {
77
+ return this.httpClient.put(this.getApiUrl(`/management/v1/form`), request);
78
+ }
79
+ modifyFormDefinitionCase(caseDefinitionKey, caseDefinitionVersionTag, request) {
80
+ return this.httpClient.put(this.getApiUrl(`/management/v1/case-definition/${caseDefinitionKey}/version/${caseDefinitionVersionTag}/form`), request);
81
+ }
82
+ deleteFormDefinition(formDefinitionId) {
83
+ return this.httpClient.delete(this.getApiUrl(`/management/v1/form/${formDefinitionId}`));
84
+ }
85
+ deleteFormDefinitionCase(caseDefinitionKey, caseDefinitionVersionTag, formDefinitionId) {
86
+ return this.httpClient.delete(this.getApiUrl(`/management/v1/case-definition/${caseDefinitionKey}/version/${caseDefinitionVersionTag}/form/${formDefinitionId}`));
87
+ }
88
+ // Building block form management methods
89
+ getFormDefinitionBuildingBlock(buildingBlockDefinitionKey, buildingBlockDefinitionVersionTag, formDefinitionId) {
90
+ return this.httpClient.get(this.getApiUrl(`/management/v1/building-block/${buildingBlockDefinitionKey}/version/${buildingBlockDefinitionVersionTag}/form/${formDefinitionId}`));
91
+ }
92
+ existsFormDefinitionBuildingBlock(buildingBlockDefinitionKey, buildingBlockDefinitionVersionTag, formDefinitionName) {
93
+ if (!formDefinitionName || !buildingBlockDefinitionKey || !buildingBlockDefinitionVersionTag)
94
+ return of(false);
95
+ return this.httpClient.get(this.getApiUrl(`management/v1/building-block/${buildingBlockDefinitionKey}/version/${buildingBlockDefinitionVersionTag}/form/${formDefinitionName}/exists`));
96
+ }
97
+ queryFormDefinitionsBuildingBlock(buildingBlockDefinitionKey, buildingBlockDefinitionVersionTag, params) {
98
+ return this.httpClient.get(this.getApiUrl(`/management/v1/building-block/${buildingBlockDefinitionKey}/version/${buildingBlockDefinitionVersionTag}/form`), {
99
+ params,
100
+ });
101
+ }
102
+ createFormDefinitionsBuildingBlock(buildingBlockDefinitionKey, buildingBlockDefinitionVersionTag, request) {
103
+ return this.httpClient.post(this.getApiUrl(`/management/v1/building-block/${buildingBlockDefinitionKey}/version/${buildingBlockDefinitionVersionTag}/form`), request);
104
+ }
105
+ modifyFormDefinitionBuildingBlock(buildingBlockDefinitionKey, buildingBlockDefinitionVersionTag, request) {
106
+ return this.httpClient.put(this.getApiUrl(`/management/v1/building-block/${buildingBlockDefinitionKey}/version/${buildingBlockDefinitionVersionTag}/form/${request.id}`), request);
107
+ }
108
+ deleteFormDefinitionBuildingBlock(buildingBlockDefinitionKey, buildingBlockDefinitionVersionTag, formDefinitionId) {
109
+ return this.httpClient.delete(this.getApiUrl(`/management/v1/building-block/${buildingBlockDefinitionKey}/version/${buildingBlockDefinitionVersionTag}/form/${formDefinitionId}`));
110
+ }
111
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementService, deps: [{ token: i1.HttpClient }, { token: i4.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
112
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementService, providedIn: 'root' }); }
113
+ }
114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementService, decorators: [{
115
+ type: Injectable,
116
+ args: [{
117
+ providedIn: 'root',
118
+ }]
119
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i4.ConfigService }] });
120
+
121
+ /*
122
+ * Copyright 2015-2026 Ritense BV, the Netherlands.
123
+ *
124
+ * Licensed under EUPL, Version 1.2 (the "License");
125
+ * you may not use this file except in compliance with the License.
126
+ * You may obtain a copy of the License at
127
+ *
128
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
129
+ *
130
+ * Unless required by applicable law or agreed to in writing, software
131
+ * distributed under the License is distributed on an "AS IS" basis,
132
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
133
+ * See the License for the specific language governing permissions and
134
+ * limitations under the License.
135
+ */
136
+ const FORM_MANAGEMENT_LIST_TEST_IDS = {
137
+ createFormButton: 'formManagementCreateFormButton',
138
+ };
139
+ const FORM_MANAGEMENT_CREATE_TEST_IDS = {
140
+ nameInput: 'formManagementCreateNameInput',
141
+ submitButton: 'formManagementCreateSubmitButton',
142
+ };
143
+ const FORM_MANAGEMENT_EDIT_TEST_IDS = {
144
+ saveButton: 'formManagementEditSaveButton',
145
+ };
146
+
147
+ /*
148
+ * Copyright 2015-2026 Ritense BV, the Netherlands.
149
+ *
150
+ * Licensed under EUPL, Version 1.2 (the "License");
151
+ * you may not use this file except in compliance with the License.
152
+ * You may obtain a copy of the License at
153
+ *
154
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
155
+ *
156
+ * Unless required by applicable law or agreed to in writing, software
157
+ * distributed under the License is distributed on an "AS IS" basis,
158
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
159
+ * See the License for the specific language governing permissions and
160
+ * limitations under the License.
161
+ */
162
+
163
+ function getContextObservable(route) {
164
+ return route.data.pipe(map(data => (data && data['context']) || null), distinctUntilChanged());
165
+ }
166
+ function getFormManagementRouteParamsAndContext(route) {
167
+ const context$ = getContextObservable(route);
168
+ return context$.pipe(switchMap(context => {
169
+ if (context === 'case') {
170
+ return combineLatest([of(context), getCaseManagementRouteParams(route, true)]).pipe(map(([ctx, params]) => [
171
+ ctx,
172
+ {
173
+ caseDefinitionKey: params?.caseDefinitionKey,
174
+ caseDefinitionVersionTag: params?.caseDefinitionVersionTag,
175
+ },
176
+ ]));
177
+ }
178
+ if (context === 'buildingBlock') {
179
+ return combineLatest([of(context), getBuildingBlockManagementRouteParams(route, true)]).pipe(map(([ctx, params]) => [
180
+ ctx,
181
+ {
182
+ buildingBlockDefinitionKey: params?.buildingBlockDefinitionKey,
183
+ buildingBlockDefinitionVersionTag: params?.buildingBlockDefinitionVersionTag,
184
+ },
185
+ ]));
186
+ }
187
+ const fallbackParams = {};
188
+ return of([context, fallbackParams]);
189
+ }));
190
+ }
191
+
192
+ /*
193
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
194
+ *
195
+ * Licensed under EUPL, Version 1.2 (the "License");
196
+ * you may not use this file except in compliance with the License.
197
+ * You may obtain a copy of the License at
198
+ *
199
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
200
+ *
201
+ * Unless required by applicable law or agreed to in writing, software
202
+ * distributed under the License is distributed on an "AS IS" basis,
203
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
204
+ * See the License for the specific language governing permissions and
205
+ * limitations under the License.
206
+ */
207
+
208
+ /*
209
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
210
+ *
211
+ * Licensed under EUPL, Version 1.2 (the "License");
212
+ * you may not use this file except in compliance with the License.
213
+ * You may obtain a copy of the License at
214
+ *
215
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
216
+ *
217
+ * Unless required by applicable law or agreed to in writing, software
218
+ * distributed under the License is distributed on an "AS IS" basis,
219
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
220
+ * See the License for the specific language governing permissions and
221
+ * limitations under the License.
222
+ */
223
+ function noDuplicateFormValidator(context, params, formManagementService) {
224
+ return (control) => {
225
+ let exists$;
226
+ switch (context) {
227
+ case 'case':
228
+ exists$ = formManagementService.existsFormDefinitionCase(params.caseDefinitionKey, params.caseDefinitionVersionTag, control.value.toString());
229
+ break;
230
+ case 'buildingBlock':
231
+ exists$ = formManagementService.existsFormDefinitionBuildingBlock(params.buildingBlockDefinitionKey, params.buildingBlockDefinitionVersionTag, control.value.toString());
232
+ break;
233
+ default:
234
+ exists$ = formManagementService.existsFormDefinition(control.value.toString());
235
+ break;
236
+ }
237
+ return exists$.pipe(map$1((result) => (result ? { duplicate: true } : null)));
238
+ };
239
+ }
240
+
241
+ /*
242
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
243
+ *
244
+ * Licensed under EUPL, Version 1.2 (the "License");
245
+ * you may not use this file except in compliance with the License.
246
+ * You may obtain a copy of the License at
247
+ *
248
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
249
+ *
250
+ * Unless required by applicable law or agreed to in writing, software
251
+ * distributed under the License is distributed on an "AS IS" basis,
252
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
253
+ * See the License for the specific language governing permissions and
254
+ * limitations under the License.
255
+ */
256
+
257
+ /*
258
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
259
+ *
260
+ * Licensed under EUPL, Version 1.2 (the "License");
261
+ * you may not use this file except in compliance with the License.
262
+ * You may obtain a copy of the License at
263
+ *
264
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
265
+ *
266
+ * Unless required by applicable law or agreed to in writing, software
267
+ * distributed under the License is distributed on an "AS IS" basis,
268
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
269
+ * See the License for the specific language governing permissions and
270
+ * limitations under the License.
271
+ */
272
+ class FormManagementCreateComponent {
273
+ constructor(formManagementService, formBuilder, route) {
274
+ this.formManagementService = formManagementService;
275
+ this.formBuilder = formBuilder;
276
+ this.route = route;
277
+ this.upload = false;
278
+ this.goBackEvent = new EventEmitter();
279
+ this.afterCreateEvent = new EventEmitter();
280
+ this.afterUploadEvent = new EventEmitter();
281
+ this.context$ = getContextObservable(this.route);
282
+ this.caseManagementRouteParams$ = this.context$.pipe(filter(context => context === 'case'), switchMap$1(() => getCaseManagementRouteParams(this.route)));
283
+ this.testIds = FORM_MANAGEMENT_CREATE_TEST_IDS;
284
+ }
285
+ ngOnInit() {
286
+ this.initForm();
287
+ }
288
+ initForm() {
289
+ getFormManagementRouteParamsAndContext(this.route)
290
+ .pipe(take(1), tap(([context, params]) => {
291
+ this.form = this.formBuilder.group({
292
+ name: new FormControl('', Validators.required, [
293
+ noDuplicateFormValidator(context, params, this.formManagementService),
294
+ ]),
295
+ });
296
+ }))
297
+ .subscribe();
298
+ }
299
+ get formControls() {
300
+ return this.form?.controls;
301
+ }
302
+ onBackButtonClick() {
303
+ this.goBackEvent.emit();
304
+ }
305
+ reset() {
306
+ this.form.setValue({ name: '' });
307
+ }
308
+ onCloseEvent() {
309
+ this.goBackEvent.emit();
310
+ }
311
+ createFormDefinition() {
312
+ const emptyForm = { display: 'form', components: [] };
313
+ const request = {
314
+ name: this.form.value.name,
315
+ formDefinition: JSON.stringify(emptyForm),
316
+ };
317
+ getFormManagementRouteParamsAndContext(this.route)
318
+ .pipe(take(1), switchMap$1(([context, params]) => {
319
+ switch (context) {
320
+ case 'case':
321
+ return this.formManagementService.createFormDefinitionsCase(params.caseDefinitionKey, params.caseDefinitionVersionTag, request);
322
+ case 'buildingBlock':
323
+ return this.formManagementService.createFormDefinitionsBuildingBlock(params.buildingBlockDefinitionKey, params.buildingBlockDefinitionVersionTag, request);
324
+ default:
325
+ return this.formManagementService.createFormDefinition(request);
326
+ }
327
+ }), tap(formDefinition => {
328
+ if (this.upload) {
329
+ this.afterUploadEvent.emit(formDefinition.id);
330
+ }
331
+ else {
332
+ this.afterCreateEvent.emit(formDefinition.id);
333
+ }
334
+ }))
335
+ .subscribe();
336
+ }
337
+ onSubmit(event) {
338
+ event.preventDefault();
339
+ event.stopPropagation();
340
+ this.form.markAllAsTouched();
341
+ if (this.form.invalid) {
342
+ return;
343
+ }
344
+ this.createFormDefinition();
345
+ }
346
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementCreateComponent, deps: [{ token: FormManagementService }, { token: i2.FormBuilder }, { token: i3.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
347
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: FormManagementCreateComponent, isStandalone: true, selector: "valtimo-form-management-create", inputs: { upload: "upload" }, outputs: { goBackEvent: "goBackEvent", afterCreateEvent: "afterCreateEvent", afterUploadEvent: "afterUploadEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<cds-modal\n valtimoCdsModal\n class=\"form-management-create\"\n size=\"sm\"\n [cdsLayer]=\"0\"\n [open]=\"true\"\n (close)=\"onCloseEvent()\"\n>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"onCloseEvent()\">\n <h3 cdsModalHeaderHeading>\n {{ 'formManagement.add' | translate }}\n </h3>\n </cds-modal-header>\n\n <form *ngIf=\"form\" [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <section cdsModalContent [cdsLayer]=\"1\">\n <cds-label\n [invalid]=\"formControls?.name?.touched && formControls?.name?.errors\"\n [invalidText]=\"\n (formControls?.name?.errors?.required && ('formManagement.nameIsRequired' | translate)) ||\n (formControls?.name?.errors?.duplicate && ('formManagement.nameIsInUse' | translate))\n \"\n >\n {{ 'formManagement.name' | translate }}\n\n <input\n cdsText\n type=\"text\"\n id=\"name\"\n formControlName=\"name\"\n [invalid]=\"formControls?.name?.touched && formControls?.name?.errors\"\n required\n [attr.data-test-id]=\"testIds.nameInput\"\n />\n </cds-label>\n </section>\n\n <cds-modal-footer [cdsLayer]=\"1\">\n <button cdsButton=\"secondary\" (click)=\"$event.preventDefault(); onBackButtonClick()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button\n cdsButton=\"primary\"\n type=\"submit\"\n [disabled]=\"form?.invalid\"\n [attr.data-test-id]=\"testIds.submitButton\"\n >\n {{ 'formManagement.submit' | translate }}\n </button>\n </cds-modal-footer>\n </form>\n</cds-modal>\n", styles: [".form-management-create{max-width:512px;margin:0 auto}cds-modal-footer{width:100%}\n/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { 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: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: InputModule }, { kind: "component", type: i2$1.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i2$1.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "ngmodule", type: WidgetModule }, { kind: "ngmodule", type: TilesModule }, { kind: "ngmodule", type: LayerModule }, { kind: "directive", type: i2$1.LayerDirective, selector: "[cdsLayer], [ibmLayer]", inputs: ["ibmLayer", "cdsLayer"], exportAs: ["layer"] }, { kind: "ngmodule", type: ModalModule }, { kind: "component", type: i2$1.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i2$1.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i2$1.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i2$1.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i2$1.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "directive", type: ValtimoCdsModalDirective, selector: "[valtimoCdsModal]", inputs: ["minContentHeight"] }] }); }
348
+ }
349
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementCreateComponent, decorators: [{
350
+ type: Component,
351
+ args: [{ selector: 'valtimo-form-management-create', standalone: true, imports: [
352
+ CommonModule,
353
+ ReactiveFormsModule,
354
+ TranslateModule,
355
+ ButtonModule,
356
+ InputModule,
357
+ WidgetModule,
358
+ InputModule,
359
+ TilesModule,
360
+ LayerModule,
361
+ ModalModule,
362
+ ValtimoCdsModalDirective,
363
+ ButtonModule,
364
+ ], template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<cds-modal\n valtimoCdsModal\n class=\"form-management-create\"\n size=\"sm\"\n [cdsLayer]=\"0\"\n [open]=\"true\"\n (close)=\"onCloseEvent()\"\n>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"onCloseEvent()\">\n <h3 cdsModalHeaderHeading>\n {{ 'formManagement.add' | translate }}\n </h3>\n </cds-modal-header>\n\n <form *ngIf=\"form\" [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <section cdsModalContent [cdsLayer]=\"1\">\n <cds-label\n [invalid]=\"formControls?.name?.touched && formControls?.name?.errors\"\n [invalidText]=\"\n (formControls?.name?.errors?.required && ('formManagement.nameIsRequired' | translate)) ||\n (formControls?.name?.errors?.duplicate && ('formManagement.nameIsInUse' | translate))\n \"\n >\n {{ 'formManagement.name' | translate }}\n\n <input\n cdsText\n type=\"text\"\n id=\"name\"\n formControlName=\"name\"\n [invalid]=\"formControls?.name?.touched && formControls?.name?.errors\"\n required\n [attr.data-test-id]=\"testIds.nameInput\"\n />\n </cds-label>\n </section>\n\n <cds-modal-footer [cdsLayer]=\"1\">\n <button cdsButton=\"secondary\" (click)=\"$event.preventDefault(); onBackButtonClick()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button\n cdsButton=\"primary\"\n type=\"submit\"\n [disabled]=\"form?.invalid\"\n [attr.data-test-id]=\"testIds.submitButton\"\n >\n {{ 'formManagement.submit' | translate }}\n </button>\n </cds-modal-footer>\n </form>\n</cds-modal>\n", styles: [".form-management-create{max-width:512px;margin:0 auto}cds-modal-footer{width:100%}\n/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
365
+ }], ctorParameters: () => [{ type: FormManagementService }, { type: i2.FormBuilder }, { type: i3.ActivatedRoute }], propDecorators: { upload: [{
366
+ type: Input
367
+ }], goBackEvent: [{
368
+ type: Output
369
+ }], afterCreateEvent: [{
370
+ type: Output
371
+ }], afterUploadEvent: [{
372
+ type: Output
373
+ }] } });
374
+
375
+ /*
376
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
377
+ *
378
+ * Licensed under EUPL, Version 1.2 (the "License");
379
+ * you may not use this file except in compliance with the License.
380
+ * You may obtain a copy of the License at
381
+ *
382
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
383
+ *
384
+ * Unless required by applicable law or agreed to in writing, software
385
+ * distributed under the License is distributed on an "AS IS" basis,
386
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
387
+ * See the License for the specific language governing permissions and
388
+ * limitations under the License.
389
+ */
390
+
391
+ /*
392
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
393
+ *
394
+ * Licensed under EUPL, Version 1.2 (the "License");
395
+ * you may not use this file except in compliance with the License.
396
+ * You may obtain a copy of the License at
397
+ *
398
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
399
+ *
400
+ * Unless required by applicable law or agreed to in writing, software
401
+ * distributed under the License is distributed on an "AS IS" basis,
402
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
403
+ * See the License for the specific language governing permissions and
404
+ * limitations under the License.
405
+ */
406
+ function compareFormDefinitions(fd1, fd2) {
407
+ if (fd1 === null && fd2 === null) {
408
+ return true;
409
+ }
410
+ if (fd1 === null || fd2 === null) {
411
+ return false;
412
+ }
413
+ return fd1.id === fd2.id;
414
+ }
415
+
416
+ /*
417
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
418
+ *
419
+ * Licensed under EUPL, Version 1.2 (the "License");
420
+ * you may not use this file except in compliance with the License.
421
+ * You may obtain a copy of the License at
422
+ *
423
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
424
+ *
425
+ * Unless required by applicable law or agreed to in writing, software
426
+ * distributed under the License is distributed on an "AS IS" basis,
427
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
428
+ * See the License for the specific language governing permissions and
429
+ * limitations under the License.
430
+ */
431
+ var EDIT_TABS;
432
+ (function (EDIT_TABS) {
433
+ EDIT_TABS["BUILDER"] = "formManagement.tabs.formBuilder";
434
+ EDIT_TABS["EDITOR"] = "formManagement.tabs.jsonEditor";
435
+ EDIT_TABS["OUTPUT"] = "formManagement.tabs.output";
436
+ })(EDIT_TABS || (EDIT_TABS = {}));
437
+
438
+ /*
439
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
440
+ *
441
+ * Licensed under EUPL, Version 1.2 (the "License");
442
+ * you may not use this file except in compliance with the License.
443
+ * You may obtain a copy of the License at
444
+ *
445
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
446
+ *
447
+ * Unless required by applicable law or agreed to in writing, software
448
+ * distributed under the License is distributed on an "AS IS" basis,
449
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
450
+ * See the License for the specific language governing permissions and
451
+ * limitations under the License.
452
+ */
453
+
454
+ /*
455
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
456
+ *
457
+ * Licensed under EUPL, Version 1.2 (the "License");
458
+ * you may not use this file except in compliance with the License.
459
+ * You may obtain a copy of the License at
460
+ *
461
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
462
+ *
463
+ * Unless required by applicable law or agreed to in writing, software
464
+ * distributed under the License is distributed on an "AS IS" basis,
465
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
466
+ * See the License for the specific language governing permissions and
467
+ * limitations under the License.
468
+ */
469
+
470
+ /*
471
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
472
+ *
473
+ * Licensed under EUPL, Version 1.2 (the "License");
474
+ * you may not use this file except in compliance with the License.
475
+ * You may obtain a copy of the License at
476
+ *
477
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
478
+ *
479
+ * Unless required by applicable law or agreed to in writing, software
480
+ * distributed under the License is distributed on an "AS IS" basis,
481
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
482
+ * See the License for the specific language governing permissions and
483
+ * limitations under the License.
484
+ */
485
+ class FormManagementDuplicateComponent extends BaseModal {
486
+ get duplicateFormName() {
487
+ return this.duplicateForm.controls['duplicateFormName'];
488
+ }
489
+ getDefaultName() {
490
+ return this.formToDuplicate.name + '-duplicate';
491
+ }
492
+ constructor(formToDuplicate, context, params, modalService, formManagementService, route, router, notificationService, translateService) {
493
+ super();
494
+ this.formToDuplicate = formToDuplicate;
495
+ this.context = context;
496
+ this.params = params;
497
+ this.modalService = modalService;
498
+ this.formManagementService = formManagementService;
499
+ this.route = route;
500
+ this.router = router;
501
+ this.notificationService = notificationService;
502
+ this.translateService = translateService;
503
+ }
504
+ ngOnInit() {
505
+ this.initForm();
506
+ }
507
+ initForm() {
508
+ this.duplicateForm = new FormGroup({
509
+ duplicateFormName: new FormControl(this.getDefaultName(), Validators.compose([Validators.required]), [noDuplicateFormValidator(this.context, this.params, this.formManagementService)]),
510
+ });
511
+ this.duplicateForm.markAllAsTouched();
512
+ }
513
+ duplicate() {
514
+ const control = this.duplicateFormName;
515
+ this.formToDuplicate.name = this.duplicateForm.controls['duplicateFormName'].value;
516
+ const request = {
517
+ name: control.value.toString(),
518
+ formDefinition: JSON.stringify(this.formToDuplicate.formDefinition),
519
+ };
520
+ let create$;
521
+ switch (this.context) {
522
+ case 'case':
523
+ create$ = this.formManagementService.createFormDefinitionsCase(this.params.caseDefinitionKey, this.params.caseDefinitionVersionTag, request);
524
+ break;
525
+ case 'buildingBlock':
526
+ create$ = this.formManagementService.createFormDefinitionsBuildingBlock(this.params.buildingBlockDefinitionKey, this.params.buildingBlockDefinitionVersionTag, request);
527
+ break;
528
+ default:
529
+ create$ = this.formManagementService.createFormDefinition(request);
530
+ break;
531
+ }
532
+ create$.pipe(take(1)).subscribe({
533
+ next: formDefinition => {
534
+ this.navigateWithNewId(formDefinition.id).then(() => {
535
+ this.closeModal();
536
+ this.notificationService.showToast({
537
+ type: 'success',
538
+ title: this.translateService.instant('formManagement.notifications.duplicated'),
539
+ });
540
+ });
541
+ },
542
+ error: err => {
543
+ if (err.toString().includes('Duplicate name')) {
544
+ control.setErrors({ duplicate: true });
545
+ }
546
+ else {
547
+ control.setErrors({ incorrect: true });
548
+ }
549
+ },
550
+ });
551
+ }
552
+ async navigateWithNewId(newId) {
553
+ const currentUrl = this.router.url.split('?')[0];
554
+ const segments = currentUrl.split('/');
555
+ const formIdIndex = segments.findIndex(segment => segment.match(/^[a-f0-9-]{36}$/));
556
+ if (formIdIndex !== -1) {
557
+ segments[formIdIndex] = newId;
558
+ }
559
+ const updatedUrl = segments.join('/');
560
+ const queryParams = { ...this.route.snapshot.queryParams };
561
+ try {
562
+ return await this.router.navigate([updatedUrl], { queryParams });
563
+ }
564
+ catch (error) {
565
+ return false;
566
+ }
567
+ }
568
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementDuplicateComponent, deps: [{ token: 'formToDuplicate' }, { token: 'context' }, { token: 'params' }, { token: i2$1.ModalService }, { token: FormManagementService }, { token: i3.ActivatedRoute }, { token: i3.Router }, { token: i4.GlobalNotificationService }, { token: i5.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
569
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: FormManagementDuplicateComponent, isStandalone: true, selector: "valtimo-form-management-duplicate-modal", usesInheritance: 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<cds-modal\n valtimoCdsModal\n class=\"form-management-create\"\n size=\"sm\"\n [cdsLayer]=\"0\"\n [open]=\"true\"\n (close)=\"closeModal()\"\n>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 cdsModalHeaderHeading>\n {{ 'formManagement.duplicate' | translate }}\n </h3>\n </cds-modal-header>\n\n <form [formGroup]=\"duplicateForm\">\n <section cdsModalContent [cdsLayer]=\"1\">\n <cds-label\n [invalid]=\"duplicateFormName?.touched && duplicateFormName?.errors\"\n [invalidText]=\"\n (duplicateFormName?.errors?.required && ('formManagement.nameIsRequired' | translate)) ||\n (duplicateFormName?.errors?.duplicate && ('formManagement.nameIsInUse' | translate)) ||\n 'Error'\n \"\n >\n {{ 'formManagement.name' | translate }}\n\n <input\n cdsText\n type=\"text\"\n id=\"duplicateFormName\"\n formControlName=\"duplicateFormName\"\n [invalid]=\"duplicateFormName?.touched && duplicateFormName?.errors\"\n required\n />\n </cds-label>\n </section>\n\n <cds-modal-footer [cdsLayer]=\"1\">\n <cds-modal-footer>\n <button cdsButton=\"secondary\" (click)=\"closeModal()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button [disabled]=\"duplicateForm.invalid\" cdsButton=\"primary\" (click)=\"duplicate()\">\n {{ 'formManagement.submit' | translate }}\n </button>\n </cds-modal-footer>\n </cds-modal-footer>\n </form>\n</cds-modal>\n", styles: ["/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ModalModule }, { kind: "component", type: i2$1.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i2$1.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i2$1.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i2$1.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i2$1.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: InputModule }, { kind: "component", type: i2$1.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i2$1.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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { 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: FormsModule }, { kind: "ngmodule", type: LayerModule }, { kind: "directive", type: i2$1.LayerDirective, selector: "[cdsLayer], [ibmLayer]", inputs: ["ibmLayer", "cdsLayer"], exportAs: ["layer"] }, { kind: "directive", type: ValtimoCdsModalDirective, selector: "[valtimoCdsModal]", inputs: ["minContentHeight"] }] }); }
570
+ }
571
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementDuplicateComponent, decorators: [{
572
+ type: Component,
573
+ args: [{ selector: 'valtimo-form-management-duplicate-modal', standalone: true, imports: [
574
+ CommonModule,
575
+ TranslateModule,
576
+ ModalModule,
577
+ ButtonModule,
578
+ InputModule,
579
+ ReactiveFormsModule,
580
+ FormsModule,
581
+ LayerModule,
582
+ ValtimoCdsModalDirective,
583
+ ], template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<cds-modal\n valtimoCdsModal\n class=\"form-management-create\"\n size=\"sm\"\n [cdsLayer]=\"0\"\n [open]=\"true\"\n (close)=\"closeModal()\"\n>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"closeModal()\">\n <h3 cdsModalHeaderHeading>\n {{ 'formManagement.duplicate' | translate }}\n </h3>\n </cds-modal-header>\n\n <form [formGroup]=\"duplicateForm\">\n <section cdsModalContent [cdsLayer]=\"1\">\n <cds-label\n [invalid]=\"duplicateFormName?.touched && duplicateFormName?.errors\"\n [invalidText]=\"\n (duplicateFormName?.errors?.required && ('formManagement.nameIsRequired' | translate)) ||\n (duplicateFormName?.errors?.duplicate && ('formManagement.nameIsInUse' | translate)) ||\n 'Error'\n \"\n >\n {{ 'formManagement.name' | translate }}\n\n <input\n cdsText\n type=\"text\"\n id=\"duplicateFormName\"\n formControlName=\"duplicateFormName\"\n [invalid]=\"duplicateFormName?.touched && duplicateFormName?.errors\"\n required\n />\n </cds-label>\n </section>\n\n <cds-modal-footer [cdsLayer]=\"1\">\n <cds-modal-footer>\n <button cdsButton=\"secondary\" (click)=\"closeModal()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button [disabled]=\"duplicateForm.invalid\" cdsButton=\"primary\" (click)=\"duplicate()\">\n {{ 'formManagement.submit' | translate }}\n </button>\n </cds-modal-footer>\n </cds-modal-footer>\n </form>\n</cds-modal>\n", styles: ["/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
584
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
585
+ type: Inject,
586
+ args: ['formToDuplicate']
587
+ }] }, { type: undefined, decorators: [{
588
+ type: Inject,
589
+ args: ['context']
590
+ }] }, { type: undefined, decorators: [{
591
+ type: Inject,
592
+ args: ['params']
593
+ }] }, { type: i2$1.ModalService }, { type: FormManagementService }, { type: i3.ActivatedRoute }, { type: i3.Router }, { type: i4.GlobalNotificationService }, { type: i5.TranslateService }] });
594
+
595
+ /*
596
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
597
+ *
598
+ * Licensed under EUPL, Version 1.2 (the "License");
599
+ * you may not use this file except in compliance with the License.
600
+ * You may obtain a copy of the License at
601
+ *
602
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
603
+ *
604
+ * Unless required by applicable law or agreed to in writing, software
605
+ * distributed under the License is distributed on an "AS IS" basis,
606
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
607
+ * See the License for the specific language governing permissions and
608
+ * limitations under the License.
609
+ */
610
+
611
+ /*
612
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
613
+ *
614
+ * Licensed under EUPL, Version 1.2 (the "License");
615
+ * you may not use this file except in compliance with the License.
616
+ * You may obtain a copy of the License at
617
+ *
618
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
619
+ *
620
+ * Unless required by applicable law or agreed to in writing, software
621
+ * distributed under the License is distributed on an "AS IS" basis,
622
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
623
+ * See the License for the specific language governing permissions and
624
+ * limitations under the License.
625
+ */
626
+ class FormManagementUploadComponent {
627
+ constructor(formBuilder, notificationService, translateService) {
628
+ this.formBuilder = formBuilder;
629
+ this.notificationService = notificationService;
630
+ this.translateService = translateService;
631
+ this.definitionUploaded = new EventEmitter();
632
+ this.modalOpen$ = new BehaviorSubject(false);
633
+ this.ACCEPTED_FILES = ['json'];
634
+ this.form = this.formBuilder.group({
635
+ file: this.formBuilder.control(new Set(), [Validators.required]),
636
+ });
637
+ this.fileSelected$ = this.form.get('file')?.valueChanges.pipe(startWith(null), map$1(value => !!(value instanceof Set && value.size > 0)));
638
+ this._subscriptions = new Subscription();
639
+ }
640
+ ngOnInit() {
641
+ this._subscriptions.add(this.show$.subscribe(show => {
642
+ this.modalOpen$.next(show);
643
+ }));
644
+ }
645
+ ngOnDestroy() {
646
+ this._subscriptions.unsubscribe();
647
+ }
648
+ closeModal() {
649
+ this.modalOpen$.next(false);
650
+ setTimeout(() => {
651
+ this.form.reset();
652
+ }, CARBON_CONSTANTS.modalAnimationMs);
653
+ }
654
+ async uploadFormDefinition() {
655
+ const formioDefinition = this.form.value?.file?.values()?.next()?.value?.file;
656
+ const formioDefinitionString = await formioDefinition.text();
657
+ if (!formioDefinitionString)
658
+ return;
659
+ this.notificationService.showNotification({
660
+ type: 'success',
661
+ title: this.translateService.instant('formManagement.upload.success'),
662
+ });
663
+ this.definitionUploaded.emit(formioDefinitionString);
664
+ this.modalOpen$.next(false);
665
+ }
666
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementUploadComponent, deps: [{ token: i2.FormBuilder }, { token: i4.GlobalNotificationService }, { token: i5.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
667
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: FormManagementUploadComponent, isStandalone: true, selector: "valtimo-form-management-upload", inputs: { show$: "show$" }, outputs: { definitionUploaded: "definitionUploaded" }, 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 valtimoCdsModal [open]=\"modalOpen$ | async\" size=\"sm\" (close)=\"closeModal()\">\n <cds-modal-header showCloseButton=\"true\" (closeSelect)=\"closeModal()\">\n <h3 cdsModalHeaderHeading>{{ 'formManagement.upload.modalTitle' | translate }}</h3>\n </cds-modal-header>\n\n <section cdsModalContent [cdsLayer]=\"1\" [formGroup]=\"form\">\n <cds-file-uploader\n [accept]=\"ACCEPTED_FILES\"\n [buttonText]=\"'formManagement.upload.buttonText' | translate\"\n [description]=\"'formManagement.upload.description' | translate\"\n [multiple]=\"false\"\n [title]=\"'formManagement.upload.title' | translate\"\n buttonType=\"primary\"\n formControlName=\"file\"\n >\n </cds-file-uploader>\n </section>\n\n <cds-modal-footer>\n <button cdsButton=\"secondary\" (click)=\"closeModal()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button\n cdsButton=\"primary\"\n [disabled]=\"(fileSelected$ | async) === false\"\n (click)=\"uploadFormDefinition()\"\n >\n {{ 'interface.upload' | translate }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", styles: ["/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i7.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FileUploaderModule }, { kind: "component", type: i2$1.FileUploader, selector: "cds-file-uploader, ibm-file-uploader", inputs: ["buttonText", "buttonType", "title", "description", "accept", "multiple", "skeleton", "size", "fileItemSize", "drop", "dropText", "fileUploaderId", "files", "disabled"], outputs: ["filesChange"] }, { kind: "ngmodule", type: ModalModule }, { kind: "component", type: i2$1.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i2$1.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i2$1.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i2$1.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i2$1.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "ngmodule", type: LayerModule }, { kind: "directive", type: i2$1.LayerDirective, selector: "[cdsLayer], [ibmLayer]", inputs: ["ibmLayer", "cdsLayer"], exportAs: ["layer"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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: i2$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
668
+ }
669
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementUploadComponent, decorators: [{
670
+ type: Component,
671
+ args: [{ selector: 'valtimo-form-management-upload', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
672
+ CommonModule,
673
+ TranslateModule,
674
+ FileUploaderModule,
675
+ ModalModule,
676
+ LayerModule,
677
+ ReactiveFormsModule,
678
+ ButtonModule,
679
+ ], 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 valtimoCdsModal [open]=\"modalOpen$ | async\" size=\"sm\" (close)=\"closeModal()\">\n <cds-modal-header showCloseButton=\"true\" (closeSelect)=\"closeModal()\">\n <h3 cdsModalHeaderHeading>{{ 'formManagement.upload.modalTitle' | translate }}</h3>\n </cds-modal-header>\n\n <section cdsModalContent [cdsLayer]=\"1\" [formGroup]=\"form\">\n <cds-file-uploader\n [accept]=\"ACCEPTED_FILES\"\n [buttonText]=\"'formManagement.upload.buttonText' | translate\"\n [description]=\"'formManagement.upload.description' | translate\"\n [multiple]=\"false\"\n [title]=\"'formManagement.upload.title' | translate\"\n buttonType=\"primary\"\n formControlName=\"file\"\n >\n </cds-file-uploader>\n </section>\n\n <cds-modal-footer>\n <button cdsButton=\"secondary\" (click)=\"closeModal()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button\n cdsButton=\"primary\"\n [disabled]=\"(fileSelected$ | async) === false\"\n (click)=\"uploadFormDefinition()\"\n >\n {{ 'interface.upload' | translate }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", styles: ["/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
680
+ }], ctorParameters: () => [{ type: i2.FormBuilder }, { type: i4.GlobalNotificationService }, { type: i5.TranslateService }], propDecorators: { show$: [{
681
+ type: Input
682
+ }], definitionUploaded: [{
683
+ type: Output
684
+ }] } });
685
+
686
+ /*
687
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
688
+ *
689
+ * Licensed under EUPL, Version 1.2 (the "License");
690
+ * you may not use this file except in compliance with the License.
691
+ * You may obtain a copy of the License at
692
+ *
693
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
694
+ *
695
+ * Unless required by applicable law or agreed to in writing, software
696
+ * distributed under the License is distributed on an "AS IS" basis,
697
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
698
+ * See the License for the specific language governing permissions and
699
+ * limitations under the License.
700
+ */
701
+
702
+ /*
703
+ * Copyright 2015-2026 Ritense BV, the Netherlands.
704
+ *
705
+ * Licensed under EUPL, Version 1.2 (the "License");
706
+ * you may not use this file except in compliance with the License.
707
+ * You may obtain a copy of the License at
708
+ *
709
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
710
+ *
711
+ * Unless required by applicable law or agreed to in writing, software
712
+ * distributed under the License is distributed on an "AS IS" basis,
713
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
714
+ * See the License for the specific language governing permissions and
715
+ * limitations under the License.
716
+ */
717
+ class FormManagementEditComponent {
718
+ get _formDefinition() {
719
+ return this._formDefinition$.getValue();
720
+ }
721
+ constructor(formManagementService, modalService, pageTitleService, route, shellService, pageHeaderService, iconService, router, translateService, notificationService, breadcrumbService, environmentService, draftVersionService, formIoTagsService, injector) {
722
+ this.formManagementService = formManagementService;
723
+ this.modalService = modalService;
724
+ this.pageTitleService = pageTitleService;
725
+ this.route = route;
726
+ this.shellService = shellService;
727
+ this.pageHeaderService = pageHeaderService;
728
+ this.iconService = iconService;
729
+ this.router = router;
730
+ this.translateService = translateService;
731
+ this.notificationService = notificationService;
732
+ this.breadcrumbService = breadcrumbService;
733
+ this.environmentService = environmentService;
734
+ this.draftVersionService = draftVersionService;
735
+ this.formIoTagsService = formIoTagsService;
736
+ this.injector = injector;
737
+ this.class = 'valtimo-form-management-edit';
738
+ this.deleteEvent = new EventEmitter();
739
+ this.goBackEvent = new EventEmitter();
740
+ this.formModifiedEvent = new EventEmitter();
741
+ this.formDeletedEvent = new EventEmitter();
742
+ this.deleteErrorEvent = new EventEmitter();
743
+ this.deployErrorEvent = new EventEmitter();
744
+ this.modifiedFormDefinition = null;
745
+ this.validJsonChange = null;
746
+ this.TABS = EDIT_TABS;
747
+ this.activeTab = EDIT_TABS.BUILDER;
748
+ this.testIds = FORM_MANAGEMENT_EDIT_TEST_IDS;
749
+ this.editParam$ = this.route.paramMap.pipe(map$1(params => (params.has('formDefinitionId') ? params.get('formDefinitionId') : null)));
750
+ this.context$ = getContextObservable(this.route);
751
+ this.caseManagementRouteParams$ = this.context$.pipe(filter(context => context === 'case'), switchMap(() => getCaseManagementRouteParams(this.route)));
752
+ this._formDefinition$ = new BehaviorSubject(null);
753
+ this.canUpdateGlobalConfiguration$ = this.environmentService.canUpdateGlobalConfiguration();
754
+ this.isDraftVersion$ = getFormManagementRouteParamsAndContext(this.route).pipe(switchMap(([context, params]) => {
755
+ if (context === 'case') {
756
+ return this.draftVersionService.isDraftVersion(params?.caseDefinitionKey, params?.caseDefinitionVersionTag);
757
+ }
758
+ if (context === 'buildingBlock') {
759
+ return this.draftVersionService.isDraftVersionBuildingBlock(params?.buildingBlockDefinitionKey, params?.buildingBlockDefinitionVersionTag);
760
+ }
761
+ return of(true); // Independent forms are always editable
762
+ }));
763
+ this.formDefinition$ = this._formDefinition$.pipe(filter((definition) => !!definition), distinctUntilChanged((prevFormDefinition, currFormDefinition) => JSON.stringify(prevFormDefinition?.formDefinition?.components) ===
764
+ JSON.stringify(currFormDefinition?.formDefinition?.components)), tap$1(() => {
765
+ if (!this._editorInitialized) {
766
+ this._editorInitialized = true;
767
+ return;
768
+ }
769
+ }));
770
+ this.jsonFormDefinition$ = new BehaviorSubject(null);
771
+ this.jsonOutput$ = new BehaviorSubject(null);
772
+ this.reloading$ = new BehaviorSubject(false);
773
+ this.showDeleteModal$ = new BehaviorSubject(false);
774
+ this.showModal$ = new BehaviorSubject(false);
775
+ this.compactMode$ = this.pageHeaderService.compactMode$;
776
+ this._alertSub = Subscription.EMPTY;
777
+ this._changeActive = false;
778
+ this._editorInitialized = false;
779
+ this.iconService.registerAll([ArrowLeft16]);
780
+ this.formIoTagsService.reregisterTags(this.injector);
781
+ }
782
+ ngOnInit() {
783
+ this.loadFormDefinition().subscribe();
784
+ this.checkToOpenUploadModal();
785
+ this.pageTitleService.disableReset();
786
+ this.initBreadcrumbs();
787
+ }
788
+ ngOnDestroy() {
789
+ this._alertSub.unsubscribe();
790
+ this.pageTitleService.enableReset();
791
+ this.pageTitleService.clearPageActionsViewContainerRef();
792
+ this.breadcrumbService.clearThirdBreadcrumb();
793
+ this.breadcrumbService.clearFourthBreadcrumb();
794
+ }
795
+ formBuilderChanged(event, definition) {
796
+ if (event.type === 'updateComponent') {
797
+ return;
798
+ }
799
+ this._changeActive = true;
800
+ this.modifiedFormDefinition = event.form;
801
+ this._formDefinition$.next({ ...this._formDefinition, formDefinition: event.form });
802
+ this.jsonFormDefinition$.next({ ...definition, value: JSON.stringify(event.form), language: 'json' });
803
+ this._changeActive = false;
804
+ }
805
+ delete() {
806
+ this.showDeleteModal$.next(true);
807
+ }
808
+ deleteFormDefinition(definition) {
809
+ getFormManagementRouteParamsAndContext(this.route)
810
+ .pipe(switchMap(([context, params]) => {
811
+ switch (context) {
812
+ case 'case':
813
+ return this.formManagementService.deleteFormDefinitionCase(params?.caseDefinitionKey, params?.caseDefinitionVersionTag, definition.id);
814
+ case 'buildingBlock':
815
+ return this.formManagementService.deleteFormDefinitionBuildingBlock(params?.buildingBlockDefinitionKey, params?.buildingBlockDefinitionVersionTag, definition.id);
816
+ default:
817
+ return this.formManagementService.deleteFormDefinition(definition.id);
818
+ }
819
+ }))
820
+ .subscribe({
821
+ next: () => {
822
+ this.notificationService.showToast({
823
+ type: 'success',
824
+ title: this.translateService.instant('formManagement.notifications.deleted'),
825
+ });
826
+ this.navigateBack();
827
+ },
828
+ error: () => {
829
+ this.notificationService.showToast({
830
+ type: 'error',
831
+ title: this.translateService.instant('formManagement.notifications.deletionError'),
832
+ });
833
+ },
834
+ });
835
+ }
836
+ onGoBackButtonClick() {
837
+ this.navigateBack();
838
+ }
839
+ modifyFormDefinition(definition) {
840
+ combineLatest([this.pageTitleService.customPageTitle$, this.editParam$])
841
+ .pipe(take(1))
842
+ .subscribe(([customPageTitle, formDefinitionId]) => {
843
+ if (!customPageTitle || !formDefinitionId)
844
+ return;
845
+ const form = JSON.stringify(this.modifiedFormDefinition !== null
846
+ ? this.modifiedFormDefinition
847
+ : definition.formDefinition);
848
+ const request = {
849
+ id: formDefinitionId,
850
+ name: customPageTitle,
851
+ formDefinition: form,
852
+ };
853
+ getFormManagementRouteParamsAndContext(this.route)
854
+ .pipe(switchMap(([context, params]) => {
855
+ switch (context) {
856
+ case 'case':
857
+ return this.formManagementService.modifyFormDefinitionCase(params.caseDefinitionKey, params.caseDefinitionVersionTag, request);
858
+ case 'buildingBlock':
859
+ return this.formManagementService.modifyFormDefinitionBuildingBlock(params.buildingBlockDefinitionKey, params.buildingBlockDefinitionVersionTag, request);
860
+ default:
861
+ return this.formManagementService.modifyFormDefinition(request);
862
+ }
863
+ }))
864
+ .subscribe({
865
+ next: () => {
866
+ this.notificationService.showToast({
867
+ type: 'success',
868
+ title: this.translateService.instant('formManagement.notifications.deployed'),
869
+ });
870
+ this.navigateBack();
871
+ },
872
+ error: () => {
873
+ this.notificationService.showToast({
874
+ type: 'error',
875
+ title: this.translateService.instant('formManagement.notifications.deploymentError'),
876
+ });
877
+ },
878
+ });
879
+ });
880
+ }
881
+ loadFormDefinition(setDefinition = true) {
882
+ return getFormManagementRouteParamsAndContext(this.route).pipe(switchMap(([context, params]) => combineLatest([of(context), of(params), this.editParam$])), switchMap(([context, params, formDefinitionId]) => {
883
+ if (!formDefinitionId)
884
+ return of(null);
885
+ switch (context) {
886
+ case 'case':
887
+ return this.formManagementService.getFormDefinitionCase(params.caseDefinitionKey, params.caseDefinitionVersionTag, formDefinitionId);
888
+ case 'buildingBlock':
889
+ return this.formManagementService.getFormDefinitionBuildingBlock(params.buildingBlockDefinitionKey, params.buildingBlockDefinitionVersionTag, formDefinitionId);
890
+ default:
891
+ return this.formManagementService.getFormDefinition(formDefinitionId);
892
+ }
893
+ }), tap$1((definition) => {
894
+ if (!definition)
895
+ return;
896
+ if (setDefinition)
897
+ this._formDefinition$.next(definition);
898
+ if (setDefinition)
899
+ this.jsonFormDefinition$.next({
900
+ value: JSON.stringify(definition.formDefinition),
901
+ language: 'json',
902
+ });
903
+ this.pageTitleService.setCustomPageTitle(definition.name);
904
+ }));
905
+ }
906
+ downloadFormDefinition(definition) {
907
+ const file = new Blob([JSON.stringify(definition.formDefinition)], {
908
+ type: 'text/json',
909
+ });
910
+ const link = document.createElement('a');
911
+ link.download = `form_${definition.name}.json`;
912
+ link.href = window.URL.createObjectURL(file);
913
+ link.click();
914
+ window.URL.revokeObjectURL(link.href);
915
+ link.remove();
916
+ }
917
+ onSelectedTab(tab) {
918
+ this.activeTab = tab;
919
+ this.formIoTagsService.reregisterTags(this.injector);
920
+ if (tab === EDIT_TABS.BUILDER) {
921
+ return;
922
+ }
923
+ setTimeout(() => {
924
+ this.shellService.onMainContentResize();
925
+ });
926
+ }
927
+ onOutputChange(event) {
928
+ this.reloading$.next(false);
929
+ if (!event.data) {
930
+ return;
931
+ }
932
+ else if (JSON.stringify(event.data) === this._activeOuput) {
933
+ return;
934
+ }
935
+ this._activeOuput = JSON.stringify(event.data);
936
+ this.jsonOutput$.next({ value: this._activeOuput, language: 'json' });
937
+ }
938
+ onValueChangeEvent(value, definition, disabled) {
939
+ if (this._changeActive || this.validJsonChange === false || disabled) {
940
+ return;
941
+ }
942
+ const parsedDefinition = JSON.parse(value);
943
+ this.modifiedFormDefinition = parsedDefinition;
944
+ this._formDefinition$.next({
945
+ ...definition,
946
+ formDefinition: parsedDefinition,
947
+ });
948
+ }
949
+ onValidEvent(value, disabled) {
950
+ if (this._changeActive || disabled) {
951
+ return;
952
+ }
953
+ this.validJsonChange = value;
954
+ }
955
+ showUploadModal() {
956
+ this.showModal$.next(true);
957
+ }
958
+ showDuplicateModal(definition) {
959
+ getFormManagementRouteParamsAndContext(this.route)
960
+ .pipe(take(1))
961
+ .subscribe(([context, params]) => {
962
+ this.modalService.create({
963
+ component: FormManagementDuplicateComponent,
964
+ inputs: {
965
+ formToDuplicate: definition,
966
+ context,
967
+ params,
968
+ },
969
+ });
970
+ });
971
+ }
972
+ setFormDefinition(formDefinition) {
973
+ this.reloading$.next(true);
974
+ const definition = JSON.parse(formDefinition);
975
+ if (!definition?.components) {
976
+ this.reloading$.next(false);
977
+ return;
978
+ }
979
+ const components = definition.components;
980
+ const currentDefinition = this.modifiedFormDefinition || definition.formDefinition;
981
+ const newDefinition = { ...currentDefinition, ...(components && { components }) };
982
+ this.modifiedFormDefinition = newDefinition;
983
+ definition.formDefinition = newDefinition;
984
+ this._formDefinition$.next(definition);
985
+ this.jsonFormDefinition$.next({
986
+ value: JSON.stringify(newDefinition),
987
+ language: 'json',
988
+ });
989
+ this.loadFormDefinition(false).subscribe(() => this.reloading$.next(false));
990
+ }
991
+ onConfirmRedirect() {
992
+ const cancelButton = document.querySelector('button[ref="cancelButton"]');
993
+ if (!cancelButton) {
994
+ return;
995
+ }
996
+ cancelButton.click();
997
+ }
998
+ checkToOpenUploadModal() {
999
+ this.route.queryParams.pipe(take(1)).subscribe(params => {
1000
+ if (params?.upload === 'true') {
1001
+ this.showUploadModal();
1002
+ }
1003
+ });
1004
+ }
1005
+ navigateBack() {
1006
+ this.router.navigate(['../'], { relativeTo: this.route });
1007
+ }
1008
+ initBreadcrumbs() {
1009
+ getFormManagementRouteParamsAndContext(this.route)
1010
+ .pipe(take(1))
1011
+ .subscribe(([context, params]) => {
1012
+ if (context === 'independent' || !context)
1013
+ return;
1014
+ if (context === 'case') {
1015
+ const route = `/case-management/case/${params.caseDefinitionKey}/version/${params.caseDefinitionVersionTag}`;
1016
+ this.breadcrumbService.setThirdBreadcrumb({
1017
+ route: [route],
1018
+ content: `${params.caseDefinitionKey} (${params.caseDefinitionVersionTag})`,
1019
+ href: route,
1020
+ });
1021
+ const routeWithForms = `${route}/forms`;
1022
+ this.breadcrumbService.setFourthBreadcrumb({
1023
+ route: [routeWithForms],
1024
+ content: this.translateService.instant('caseManagement.tabs.forms'),
1025
+ href: routeWithForms,
1026
+ });
1027
+ }
1028
+ else if (context === 'buildingBlock') {
1029
+ const route = `/building-block-management/building-block/${params.buildingBlockDefinitionKey}/version/${params.buildingBlockDefinitionVersionTag}`;
1030
+ const generalRoute = `${route}/general`;
1031
+ this.breadcrumbService.setThirdBreadcrumb({
1032
+ route: [generalRoute],
1033
+ content: `${params.buildingBlockDefinitionKey} (${params.buildingBlockDefinitionVersionTag})`,
1034
+ href: generalRoute,
1035
+ });
1036
+ const routeWithForms = `${route}/forms`;
1037
+ this.breadcrumbService.setFourthBreadcrumb({
1038
+ route: [`${route}/forms`],
1039
+ content: this.translateService.instant('buildingBlockManagement.tabs.forms'),
1040
+ href: routeWithForms,
1041
+ });
1042
+ }
1043
+ });
1044
+ }
1045
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementEditComponent, deps: [{ token: FormManagementService }, { token: i2$1.ModalService }, { token: i3$1.PageTitleService }, { token: i3.ActivatedRoute }, { token: i3$1.ShellService }, { token: i3$1.PageHeaderService }, { token: i2$1.IconService }, { token: i3.Router }, { token: i5.TranslateService }, { token: i4.GlobalNotificationService }, { token: i3$1.BreadcrumbService }, { token: i4.EnvironmentService }, { token: i4.DraftVersionService }, { token: i3$1.FormIoTagsService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
1046
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: FormManagementEditComponent, isStandalone: true, selector: "valtimo-form-management-edit", outputs: { deleteEvent: "deleteEvent", goBackEvent: "goBackEvent", formModifiedEvent: "formModifiedEvent", formDeletedEvent: "formDeletedEvent", deleteErrorEvent: "deleteErrorEvent", deployErrorEvent: "deployErrorEvent" }, host: { properties: { "class": "this.class" } }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2026 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n<ng-container\n *ngIf=\"{\n formDefinition: formDefinition$ | async,\n jsonFormDefinition: jsonFormDefinition$ | async,\n jsonOutput: jsonOutput$ | async,\n compactMode: compactMode$ | async,\n context: context$ | async,\n canUpdateGlobalConfiguration: canUpdateGlobalConfiguration$ | async,\n isDraftVersion: isDraftVersion$ | async,\n } as obs\"\n>\n @if (obs.formDefinition) {\n <ng-container renderInPageHeader [fullWidth]=\"true\">\n <ng-template>\n <ng-container *ngTemplateOutlet=\"actions; context: {obs: obs}\"></ng-container>\n </ng-template>\n </ng-container>\n\n <cds-tabs type=\"contained\">\n <cds-tab [heading]=\"TABS.BUILDER | translate\" (selected)=\"onSelectedTab(TABS.BUILDER)\">\n <valtimo-form-io-builder\n *ngIf=\"(reloading$ | async) === false && activeTab === TABS.BUILDER\"\n [form]=\"obs.formDefinition.formDefinition\"\n (change)=\"formBuilderChanged($event, obs.jsonFormDefinition)\"\n ></valtimo-form-io-builder>\n </cds-tab>\n\n <cds-tab [heading]=\"TABS.EDITOR | translate\" (selected)=\"onSelectedTab(TABS.EDITOR)\">\n @if (activeTab === TABS.EDITOR && obs.jsonFormDefinition) {\n <ng-container\n *ngTemplateOutlet=\"\n jsonEditor;\n context: {\n data: {\n disabled: obs.formDefinition.readOnly || !obs.canUpdateGlobalConfiguration,\n formDefinition: obs.formDefinition,\n model: obs.jsonFormDefinition,\n },\n }\n \"\n ></ng-container>\n }\n </cds-tab>\n\n <cds-tab\n [heading]=\"TABS.OUTPUT | translate\"\n (selected)=\"onSelectedTab(TABS.OUTPUT)\"\n class=\"valtimo-form-management-edit__output\"\n >\n <valtimo-form-io\n *ngIf=\"activeTab === TABS.OUTPUT\"\n [form]=\"obs.formDefinition.formDefinition\"\n (change)=\"onOutputChange($event)\"\n ></valtimo-form-io>\n\n @if (activeTab === TABS.OUTPUT && obs.jsonOutput) {\n <ng-container\n *ngTemplateOutlet=\"\n jsonEditor;\n context: {\n data: {disabled: true, formDefinition: obs.formDefinition, model: obs.jsonOutput},\n }\n \"\n ></ng-container>\n }\n </cds-tab>\n </cds-tabs>\n } @else {\n <cds-loading></cds-loading>\n }\n\n <valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"interface.deleteConfirmation\"\n cancelButtonTextTranslationKey=\"interface.cancel\"\n [outputOnConfirm]=\"obs.formDefinition\"\n [showModalSubject$]=\"showDeleteModal$\"\n titleTranslationKey=\"dashboardManagement.delete\"\n (confirmEvent)=\"deleteFormDefinition($event)\"\n ></valtimo-confirmation-modal>\n\n <valtimo-form-management-upload\n [show$]=\"showModal$\"\n (definitionUploaded)=\"setFormDefinition($event)\"\n ></valtimo-form-management-upload>\n\n <ng-template #jsonEditor let-data=\"data\">\n <valtimo-editor\n [model]=\"data.model\"\n [disabled]=\"data.disabled\"\n (validEvent)=\"onValidEvent($event, data.disabled)\"\n (valueChangeEvent)=\"onValueChangeEvent($event, data.formDefinition, data.disabled)\"\n [fitPage]=\"true\"\n [fitPageSpaceAdjustment]=\"80\"\n ></valtimo-editor>\n </ng-template>\n</ng-container>\n\n<ng-template #actions let-obs=\"obs\">\n <div\n class=\"valtimo-form-management-edit__header-container\"\n [ngClass]=\"{\n '--compact': obs.compactMode,\n }\"\n >\n @if (obs.formDefinition.readOnly || !obs.canUpdateGlobalConfiguration || !obs.isDraftVersion) {\n <cds-tag size=\"sm\" type=\"blue\">{{ 'formManagement.readOnly' | translate }}</cds-tag>\n }\n\n <div class=\"valtimo-form-management-edit__header\">\n <v-overflow-menu placement=\"bottom-end\">\n <v-overflow-menu-trigger overflowTrigger></v-overflow-menu-trigger>\n <v-overflow-menu-option (selected)=\"downloadFormDefinition(obs.formDefinition)\">\n {{ 'Download' | translate }}\n </v-overflow-menu-option>\n\n <v-overflow-menu-option\n [disabled]=\"\n obs.formDefinition.readOnly || !obs.canUpdateGlobalConfiguration || !obs.isDraftVersion\n \"\n (selected)=\"showUploadModal()\"\n >\n {{ 'Upload' | translate }}\n </v-overflow-menu-option>\n\n <v-overflow-menu-option\n *ngIf=\"(obs.context === 'case' && obs.isDraftVersion) || obs.context === 'independent'\"\n (selected)=\"showDuplicateModal(obs.formDefinition)\"\n >\n {{ 'formManagement.duplicate' | translate }}\n </v-overflow-menu-option>\n\n <v-overflow-menu-option\n [disabled]=\"\n obs.formDefinition.readOnly || !obs.canUpdateGlobalConfiguration || !obs.isDraftVersion\n \"\n type=\"danger\"\n (selected)=\"delete()\"\n >\n {{ 'interface.delete' | translate }}\n </v-overflow-menu-option>\n </v-overflow-menu>\n\n @if (obs.context === 'case') {\n <button\n cdsButton=\"secondary\"\n [size]=\"obs.compactMode ? 'sm' : 'md'\"\n (click)=\"onGoBackButtonClick()\"\n >\n <svg class=\"cds--btn__icon\" cdsIcon=\"arrow--left\" size=\"16\"></svg>\n\n <span>{{ 'interface.back' | translate }}</span>\n </button>\n }\n\n <button\n *ngIf=\"obs?.canUpdateGlobalConfiguration || obs.context === 'independent'\"\n cdsButton=\"primary\"\n [disabled]=\"obs.formDefinition.readOnly || !obs.isDraftVersion\"\n [size]=\"obs.compactMode ? 'sm' : 'md'\"\n (click)=\"modifyFormDefinition(obs.formDefinition)\"\n [attr.data-test-id]=\"testIds.saveButton\"\n >\n {{ 'interface.save' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"save\" size=\"16\"></svg>\n </button>\n </div>\n </div>\n</ng-template>\n", styles: [".valtimo-form-management-edit__header{display:flex;align-items:center;justify-content:flex-end;gap:16px;margin-left:auto}.valtimo-form-management-edit__case-header{display:flex;width:100%;justify-content:flex-end}.valtimo-form-management-edit__header-container{width:100%;display:flex;justify-content:space-between;align-items:flex-end;padding-bottom:4px}.valtimo-form-management-edit__header-container .cds--tag{margin:0;height:var(--cds-layout-size-height-md)}.valtimo-form-management-edit__header-container.--compact{align-items:flex-start;padding-bottom:0}.valtimo-form-management-edit__output .cds--tab-content{display:grid;grid-template-columns:1fr 1fr}.valtimo-form-management-edit__output .cds--tab-content>*{min-width:100%!important}.valtimo-form-management-edit .formbuilder .btn.formcomponent.drag-copy,.valtimo-form-management-edit .btn.formcomponent.gu-mirror{font-weight:400;background-color:silver;border-color:silver;color:#fff}.valtimo-form-management-edit .formbuilder .btn.formcomponent.drag-copy:hover,.valtimo-form-management-edit .formbuilder .btn.formcomponent.drag-copy:active,.valtimo-form-management-edit .btn.formcomponent.gu-mirror:hover,.valtimo-form-management-edit .btn.formcomponent.gu-mirror:active{box-shadow:none}.valtimo-form-management-edit .formbuilder .btn.formcomponent.drag-copy:active,.valtimo-form-management-edit .btn.formcomponent.gu-mirror:active{background-color:silver;border-color:silver}.valtimo-form-management-edit .formbuilder-header{padding-left:18px;padding-right:18px;font-size:18px;height:80px;border:1px solid #dee2e6;border-bottom:0}.valtimo-form-management-edit .formbuilder-header .formbuilder-title{margin-top:21px;margin-bottom:7px}.valtimo-form-management-edit .formbuilder-header .formbuilder-subtitle{margin-top:0;margin-bottom:12px}.valtimo-form-management-edit .formbuilder{background:#fff;padding:1rem;border:1px solid #dee2e6;margin-right:0!important;margin-left:0!important}.valtimo-form-management-edit .formbuilder .form-builder-panel .builder-group-button[aria-expanded=false],.valtimo-form-management-edit .formbuilder .form-builder-panel .builder-group-button[aria-expanded=\"\"]{color:#a9a9a9}.valtimo-form-management-edit .formbuilder .form-builder-panel .builder-group-button[aria-expanded=true]{color:#000}.valtimo-form-management-edit .formbuilder .drag-and-drop-alert{display:none}.valtimo-form-management-edit .formbuilder .formarea{padding:10px;border:solid 1px silver;background-color:#fff}.valtimo-form-management-edit .increase-size{font-size:1rem}.valtimo-form-management-edit .cds--tab-content{background:#fff!important}\n/*!\n * Copyright 2015-2026 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i7.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ModalModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: InputModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: WidgetModule }, { kind: "ngmodule", type: CarbonListModule }, { kind: "ngmodule", type: TabsModule }, { kind: "component", type: i2$1.Tabs, selector: "cds-tabs, ibm-tabs", inputs: ["position", "cacheActive", "followFocus", "isNavigation", "ariaLabel", "ariaLabelledby", "type", "theme", "skeleton"] }, { kind: "component", type: i2$1.Tab, selector: "cds-tab, ibm-tab", inputs: ["heading", "title", "context", "active", "disabled", "tabIndex", "id", "cacheActive", "tabContent", "templateContext"], outputs: ["selected"] }, { kind: "ngmodule", type: EditorModule }, { kind: "component", type: i3$1.EditorComponent, selector: "valtimo-editor", inputs: ["editorOptions", "model", "disabled", "formatOnLoad", "widthPx", "heightPx", "heightStyle", "jsonSchema", "fitPage", "fitPageSpaceAdjustment"], outputs: ["validEvent", "valueChangeEvent"] }, { kind: "ngmodule", type: FormIoModule }, { kind: "component", type: i3$1.FormioComponent, selector: "valtimo-form-io", inputs: ["options", "submission", "form", "readOnly", "formRefresh$"], outputs: ["submit", "change", "event"] }, { kind: "component", type: i3$1.FormioBuilderComponent, selector: "valtimo-form-io-builder", inputs: ["form"], outputs: ["change"] }, { kind: "directive", type: RenderInPageHeaderDirective, selector: "[renderInPageHeader]", inputs: ["fullWidth"] }, { kind: "component", type: OverflowMenuComponent, selector: "v-overflow-menu", inputs: ["open", "placement", "menuWidth", "offsetX", "offsetY", "closeOnSelect", "useHostAsReference", "portalToBody"], outputs: ["openChange"] }, { kind: "component", type: OverflowMenuOptionComponent, selector: "v-overflow-menu-option", inputs: ["disabled", "type", "testId", "optionId"], outputs: ["selected"] }, { kind: "component", type: OverflowMenuTriggerComponent, selector: "v-overflow-menu-trigger", inputs: ["compact"] }, { kind: "ngmodule", type: TagModule }, { kind: "component", type: i2$1.Tag, selector: "cds-tag, ibm-tag", inputs: ["type", "size", "class", "skeleton"] }, { kind: "ngmodule", type: ConfirmationModalModule }, { kind: "component", type: i3$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: "ngmodule", type: SpinnerModule }, { kind: "component", type: FormManagementUploadComponent, selector: "valtimo-form-management-upload", inputs: ["show$"], outputs: ["definitionUploaded"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i2$1.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "ngmodule", type: LoadingModule }, { kind: "component", type: i2$1.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }], encapsulation: i0.ViewEncapsulation.None }); }
1047
+ }
1048
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementEditComponent, decorators: [{
1049
+ type: Component,
1050
+ args: [{ selector: 'valtimo-form-management-edit', encapsulation: ViewEncapsulation.None, standalone: true, imports: [
1051
+ CommonModule,
1052
+ TranslateModule,
1053
+ ModalModule,
1054
+ ButtonModule,
1055
+ InputModule,
1056
+ ReactiveFormsModule,
1057
+ FormsModule,
1058
+ WidgetModule,
1059
+ CarbonListModule,
1060
+ ValtimoCdsModalDirective,
1061
+ TabsModule,
1062
+ EditorModule,
1063
+ FormIoModule,
1064
+ RenderInPageHeaderDirective,
1065
+ OverflowMenuComponent,
1066
+ OverflowMenuOptionComponent,
1067
+ OverflowMenuTriggerComponent,
1068
+ TagModule,
1069
+ ConfirmationModalModule,
1070
+ SpinnerModule,
1071
+ FormManagementUploadComponent,
1072
+ IconModule,
1073
+ SpinnerModule,
1074
+ LoadingModule,
1075
+ ], template: "<!--\n ~ Copyright 2015-2026 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n<ng-container\n *ngIf=\"{\n formDefinition: formDefinition$ | async,\n jsonFormDefinition: jsonFormDefinition$ | async,\n jsonOutput: jsonOutput$ | async,\n compactMode: compactMode$ | async,\n context: context$ | async,\n canUpdateGlobalConfiguration: canUpdateGlobalConfiguration$ | async,\n isDraftVersion: isDraftVersion$ | async,\n } as obs\"\n>\n @if (obs.formDefinition) {\n <ng-container renderInPageHeader [fullWidth]=\"true\">\n <ng-template>\n <ng-container *ngTemplateOutlet=\"actions; context: {obs: obs}\"></ng-container>\n </ng-template>\n </ng-container>\n\n <cds-tabs type=\"contained\">\n <cds-tab [heading]=\"TABS.BUILDER | translate\" (selected)=\"onSelectedTab(TABS.BUILDER)\">\n <valtimo-form-io-builder\n *ngIf=\"(reloading$ | async) === false && activeTab === TABS.BUILDER\"\n [form]=\"obs.formDefinition.formDefinition\"\n (change)=\"formBuilderChanged($event, obs.jsonFormDefinition)\"\n ></valtimo-form-io-builder>\n </cds-tab>\n\n <cds-tab [heading]=\"TABS.EDITOR | translate\" (selected)=\"onSelectedTab(TABS.EDITOR)\">\n @if (activeTab === TABS.EDITOR && obs.jsonFormDefinition) {\n <ng-container\n *ngTemplateOutlet=\"\n jsonEditor;\n context: {\n data: {\n disabled: obs.formDefinition.readOnly || !obs.canUpdateGlobalConfiguration,\n formDefinition: obs.formDefinition,\n model: obs.jsonFormDefinition,\n },\n }\n \"\n ></ng-container>\n }\n </cds-tab>\n\n <cds-tab\n [heading]=\"TABS.OUTPUT | translate\"\n (selected)=\"onSelectedTab(TABS.OUTPUT)\"\n class=\"valtimo-form-management-edit__output\"\n >\n <valtimo-form-io\n *ngIf=\"activeTab === TABS.OUTPUT\"\n [form]=\"obs.formDefinition.formDefinition\"\n (change)=\"onOutputChange($event)\"\n ></valtimo-form-io>\n\n @if (activeTab === TABS.OUTPUT && obs.jsonOutput) {\n <ng-container\n *ngTemplateOutlet=\"\n jsonEditor;\n context: {\n data: {disabled: true, formDefinition: obs.formDefinition, model: obs.jsonOutput},\n }\n \"\n ></ng-container>\n }\n </cds-tab>\n </cds-tabs>\n } @else {\n <cds-loading></cds-loading>\n }\n\n <valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"interface.deleteConfirmation\"\n cancelButtonTextTranslationKey=\"interface.cancel\"\n [outputOnConfirm]=\"obs.formDefinition\"\n [showModalSubject$]=\"showDeleteModal$\"\n titleTranslationKey=\"dashboardManagement.delete\"\n (confirmEvent)=\"deleteFormDefinition($event)\"\n ></valtimo-confirmation-modal>\n\n <valtimo-form-management-upload\n [show$]=\"showModal$\"\n (definitionUploaded)=\"setFormDefinition($event)\"\n ></valtimo-form-management-upload>\n\n <ng-template #jsonEditor let-data=\"data\">\n <valtimo-editor\n [model]=\"data.model\"\n [disabled]=\"data.disabled\"\n (validEvent)=\"onValidEvent($event, data.disabled)\"\n (valueChangeEvent)=\"onValueChangeEvent($event, data.formDefinition, data.disabled)\"\n [fitPage]=\"true\"\n [fitPageSpaceAdjustment]=\"80\"\n ></valtimo-editor>\n </ng-template>\n</ng-container>\n\n<ng-template #actions let-obs=\"obs\">\n <div\n class=\"valtimo-form-management-edit__header-container\"\n [ngClass]=\"{\n '--compact': obs.compactMode,\n }\"\n >\n @if (obs.formDefinition.readOnly || !obs.canUpdateGlobalConfiguration || !obs.isDraftVersion) {\n <cds-tag size=\"sm\" type=\"blue\">{{ 'formManagement.readOnly' | translate }}</cds-tag>\n }\n\n <div class=\"valtimo-form-management-edit__header\">\n <v-overflow-menu placement=\"bottom-end\">\n <v-overflow-menu-trigger overflowTrigger></v-overflow-menu-trigger>\n <v-overflow-menu-option (selected)=\"downloadFormDefinition(obs.formDefinition)\">\n {{ 'Download' | translate }}\n </v-overflow-menu-option>\n\n <v-overflow-menu-option\n [disabled]=\"\n obs.formDefinition.readOnly || !obs.canUpdateGlobalConfiguration || !obs.isDraftVersion\n \"\n (selected)=\"showUploadModal()\"\n >\n {{ 'Upload' | translate }}\n </v-overflow-menu-option>\n\n <v-overflow-menu-option\n *ngIf=\"(obs.context === 'case' && obs.isDraftVersion) || obs.context === 'independent'\"\n (selected)=\"showDuplicateModal(obs.formDefinition)\"\n >\n {{ 'formManagement.duplicate' | translate }}\n </v-overflow-menu-option>\n\n <v-overflow-menu-option\n [disabled]=\"\n obs.formDefinition.readOnly || !obs.canUpdateGlobalConfiguration || !obs.isDraftVersion\n \"\n type=\"danger\"\n (selected)=\"delete()\"\n >\n {{ 'interface.delete' | translate }}\n </v-overflow-menu-option>\n </v-overflow-menu>\n\n @if (obs.context === 'case') {\n <button\n cdsButton=\"secondary\"\n [size]=\"obs.compactMode ? 'sm' : 'md'\"\n (click)=\"onGoBackButtonClick()\"\n >\n <svg class=\"cds--btn__icon\" cdsIcon=\"arrow--left\" size=\"16\"></svg>\n\n <span>{{ 'interface.back' | translate }}</span>\n </button>\n }\n\n <button\n *ngIf=\"obs?.canUpdateGlobalConfiguration || obs.context === 'independent'\"\n cdsButton=\"primary\"\n [disabled]=\"obs.formDefinition.readOnly || !obs.isDraftVersion\"\n [size]=\"obs.compactMode ? 'sm' : 'md'\"\n (click)=\"modifyFormDefinition(obs.formDefinition)\"\n [attr.data-test-id]=\"testIds.saveButton\"\n >\n {{ 'interface.save' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"save\" size=\"16\"></svg>\n </button>\n </div>\n </div>\n</ng-template>\n", styles: [".valtimo-form-management-edit__header{display:flex;align-items:center;justify-content:flex-end;gap:16px;margin-left:auto}.valtimo-form-management-edit__case-header{display:flex;width:100%;justify-content:flex-end}.valtimo-form-management-edit__header-container{width:100%;display:flex;justify-content:space-between;align-items:flex-end;padding-bottom:4px}.valtimo-form-management-edit__header-container .cds--tag{margin:0;height:var(--cds-layout-size-height-md)}.valtimo-form-management-edit__header-container.--compact{align-items:flex-start;padding-bottom:0}.valtimo-form-management-edit__output .cds--tab-content{display:grid;grid-template-columns:1fr 1fr}.valtimo-form-management-edit__output .cds--tab-content>*{min-width:100%!important}.valtimo-form-management-edit .formbuilder .btn.formcomponent.drag-copy,.valtimo-form-management-edit .btn.formcomponent.gu-mirror{font-weight:400;background-color:silver;border-color:silver;color:#fff}.valtimo-form-management-edit .formbuilder .btn.formcomponent.drag-copy:hover,.valtimo-form-management-edit .formbuilder .btn.formcomponent.drag-copy:active,.valtimo-form-management-edit .btn.formcomponent.gu-mirror:hover,.valtimo-form-management-edit .btn.formcomponent.gu-mirror:active{box-shadow:none}.valtimo-form-management-edit .formbuilder .btn.formcomponent.drag-copy:active,.valtimo-form-management-edit .btn.formcomponent.gu-mirror:active{background-color:silver;border-color:silver}.valtimo-form-management-edit .formbuilder-header{padding-left:18px;padding-right:18px;font-size:18px;height:80px;border:1px solid #dee2e6;border-bottom:0}.valtimo-form-management-edit .formbuilder-header .formbuilder-title{margin-top:21px;margin-bottom:7px}.valtimo-form-management-edit .formbuilder-header .formbuilder-subtitle{margin-top:0;margin-bottom:12px}.valtimo-form-management-edit .formbuilder{background:#fff;padding:1rem;border:1px solid #dee2e6;margin-right:0!important;margin-left:0!important}.valtimo-form-management-edit .formbuilder .form-builder-panel .builder-group-button[aria-expanded=false],.valtimo-form-management-edit .formbuilder .form-builder-panel .builder-group-button[aria-expanded=\"\"]{color:#a9a9a9}.valtimo-form-management-edit .formbuilder .form-builder-panel .builder-group-button[aria-expanded=true]{color:#000}.valtimo-form-management-edit .formbuilder .drag-and-drop-alert{display:none}.valtimo-form-management-edit .formbuilder .formarea{padding:10px;border:solid 1px silver;background-color:#fff}.valtimo-form-management-edit .increase-size{font-size:1rem}.valtimo-form-management-edit .cds--tab-content{background:#fff!important}\n/*!\n * Copyright 2015-2026 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
1076
+ }], ctorParameters: () => [{ type: FormManagementService }, { type: i2$1.ModalService }, { type: i3$1.PageTitleService }, { type: i3.ActivatedRoute }, { type: i3$1.ShellService }, { type: i3$1.PageHeaderService }, { type: i2$1.IconService }, { type: i3.Router }, { type: i5.TranslateService }, { type: i4.GlobalNotificationService }, { type: i3$1.BreadcrumbService }, { type: i4.EnvironmentService }, { type: i4.DraftVersionService }, { type: i3$1.FormIoTagsService }, { type: i0.Injector }], propDecorators: { class: [{
1077
+ type: HostBinding,
1078
+ args: ['class']
1079
+ }], deleteEvent: [{
1080
+ type: Output
1081
+ }], goBackEvent: [{
1082
+ type: Output
1083
+ }], formModifiedEvent: [{
1084
+ type: Output
1085
+ }], formDeletedEvent: [{
1086
+ type: Output
1087
+ }], deleteErrorEvent: [{
1088
+ type: Output
1089
+ }], deployErrorEvent: [{
1090
+ type: Output
1091
+ }] } });
1092
+
1093
+ /*
1094
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1095
+ *
1096
+ * Licensed under EUPL, Version 1.2 (the "License");
1097
+ * you may not use this file except in compliance with the License.
1098
+ * You may obtain a copy of the License at
1099
+ *
1100
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1101
+ *
1102
+ * Unless required by applicable law or agreed to in writing, software
1103
+ * distributed under the License is distributed on an "AS IS" basis,
1104
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1105
+ * See the License for the specific language governing permissions and
1106
+ * limitations under the License.
1107
+ */
1108
+
1109
+ /*
1110
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1111
+ *
1112
+ * Licensed under EUPL, Version 1.2 (the "License");
1113
+ * you may not use this file except in compliance with the License.
1114
+ * You may obtain a copy of the License at
1115
+ *
1116
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1117
+ *
1118
+ * Unless required by applicable law or agreed to in writing, software
1119
+ * distributed under the License is distributed on an "AS IS" basis,
1120
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1121
+ * See the License for the specific language governing permissions and
1122
+ * limitations under the License.
1123
+ */
1124
+ class FormManagementListComponent {
1125
+ get _partialPagination() {
1126
+ return this._partialPagination$.getValue();
1127
+ }
1128
+ constructor(formManagementService, iconService, route, environmentService, draftVersionService, notificationService, translateService, editPermissionsService) {
1129
+ this.formManagementService = formManagementService;
1130
+ this.iconService = iconService;
1131
+ this.route = route;
1132
+ this.environmentService = environmentService;
1133
+ this.draftVersionService = draftVersionService;
1134
+ this.notificationService = notificationService;
1135
+ this.translateService = translateService;
1136
+ this.editPermissionsService = editPermissionsService;
1137
+ this.navigateToCreateEvent = new EventEmitter();
1138
+ this.navigateToUploadEvent = new EventEmitter();
1139
+ this.navigateToEditEvent = new EventEmitter();
1140
+ this.ACTION_ITEMS = [
1141
+ {
1142
+ callback: this.editFormDefinition.bind(this),
1143
+ label: 'interface.edit',
1144
+ },
1145
+ { callback: this.showDeleteModal.bind(this), label: 'interface.delete', type: 'danger' },
1146
+ ];
1147
+ this.showDeleteModal$ = new BehaviorSubject(false);
1148
+ this.formDefinitionToDelete$ = new BehaviorSubject(null);
1149
+ this.loading$ = new BehaviorSubject(true);
1150
+ this.searchTerm$ = new BehaviorSubject('');
1151
+ this.testIds = FORM_MANAGEMENT_LIST_TEST_IDS;
1152
+ this.context$ = getContextObservable(this.route);
1153
+ this.caseManagementRouteParams$ = this.context$.pipe(filter$1(context => context === 'case'), switchMap$1(() => getCaseManagementRouteParams(this.route)));
1154
+ this.hasEditPermissions$ = combineLatest([
1155
+ getCaseManagementRouteParams(this.route),
1156
+ this.context$,
1157
+ ]).pipe(switchMap$1(([params, context]) => this.editPermissionsService.hasPermissionsToEditBasedOnContext(params, context)));
1158
+ this._collectionSize$ = new BehaviorSubject(0);
1159
+ this._partialPagination$ = new BehaviorSubject({
1160
+ page: 1,
1161
+ size: 10,
1162
+ });
1163
+ this.pagination$ = combineLatest([
1164
+ this._collectionSize$,
1165
+ this._partialPagination$,
1166
+ ]).pipe(map$1(([collectionSize, partialPagination]) => ({ ...partialPagination, collectionSize })));
1167
+ this.formDefinitions$ = combineLatest([
1168
+ this.context$,
1169
+ this.caseManagementRouteParams$.pipe(startWith(null)),
1170
+ this._partialPagination$,
1171
+ this.searchTerm$,
1172
+ ]).pipe(filter$1(([context, params]) => context === 'case' ? !!(params?.caseDefinitionVersionTag && params?.caseDefinitionKey) : true), switchMap$1(([context, routeParams, pagination, searchTerm]) => {
1173
+ const params = {
1174
+ ...pagination,
1175
+ page: (pagination?.page ?? 1) - 1,
1176
+ ...(searchTerm && { searchTerm }),
1177
+ };
1178
+ switch (context) {
1179
+ case 'case':
1180
+ return this.formManagementService.queryFormDefinitionsCase(routeParams?.caseDefinitionKey ?? '', routeParams?.caseDefinitionVersionTag ?? '', params);
1181
+ default:
1182
+ case 'independent':
1183
+ return this.formManagementService.queryFormDefinitions(params);
1184
+ }
1185
+ }), map$1((res) => {
1186
+ this._collectionSize$.next(res?.totalElements);
1187
+ return res?.content
1188
+ ? [...res.content].sort((firstForm, secondForm) => (firstForm.name ?? '').localeCompare(secondForm.name ?? ''))
1189
+ : [];
1190
+ }), tap(() => this.loading$.next(false)));
1191
+ this.FIELDS = [
1192
+ { key: 'name', label: 'Form name' },
1193
+ { key: 'readOnly', label: 'Read-only', viewType: ViewType.BOOLEAN },
1194
+ ];
1195
+ this.iconService.registerAll([Upload16]);
1196
+ }
1197
+ navigateToCreateRoute() {
1198
+ this.navigateToCreateEvent.emit();
1199
+ }
1200
+ navigateToUploadRoute() {
1201
+ this.navigateToUploadEvent.emit();
1202
+ }
1203
+ paginationClicked(page) {
1204
+ this.updatePagination({ page });
1205
+ }
1206
+ paginationSet(size) {
1207
+ this.updatePagination({ size, page: 1 });
1208
+ }
1209
+ editFormDefinition(formDefinition) {
1210
+ this.navigateToEditEvent.emit(formDefinition.id);
1211
+ }
1212
+ searchTermEntered(searchTerm) {
1213
+ this.searchTerm$.next(searchTerm);
1214
+ }
1215
+ showDeleteModal(definition) {
1216
+ this.formDefinitionToDelete$.next(definition);
1217
+ this.showDeleteModal$.next(true);
1218
+ }
1219
+ deleteFormDefinition(definition) {
1220
+ getCaseManagementRouteParamsAndContext(this.route)
1221
+ .pipe(take$1(1), switchMap$1(([context, caseManagementRouteParams]) => {
1222
+ switch (context) {
1223
+ case 'case':
1224
+ return this.formManagementService.deleteFormDefinitionCase(caseManagementRouteParams?.caseDefinitionKey, caseManagementRouteParams?.caseDefinitionVersionTag, definition.id);
1225
+ case 'independent':
1226
+ default:
1227
+ return this.formManagementService.deleteFormDefinition(definition.id);
1228
+ }
1229
+ }))
1230
+ .subscribe({
1231
+ next: () => {
1232
+ this.notificationService.showToast({
1233
+ type: 'success',
1234
+ title: this.translateService.instant('formManagement.notifications.deleted'),
1235
+ });
1236
+ this._partialPagination$.next({ ...this._partialPagination });
1237
+ },
1238
+ error: () => {
1239
+ this.notificationService.showToast({
1240
+ type: 'error',
1241
+ title: this.translateService.instant('formManagement.notifications.deletionError'),
1242
+ });
1243
+ },
1244
+ });
1245
+ }
1246
+ updatePagination(update) {
1247
+ this._partialPagination$.next({ ...this._partialPagination, ...update });
1248
+ }
1249
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementListComponent, deps: [{ token: FormManagementService }, { token: i2$1.IconService }, { token: i3.ActivatedRoute }, { token: i4.EnvironmentService }, { token: i4.DraftVersionService }, { token: i4.GlobalNotificationService }, { token: i5.TranslateService }, { token: i4.EditPermissionsService }], target: i0.ɵɵFactoryTarget.Component }); }
1250
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: FormManagementListComponent, isStandalone: true, selector: "valtimo-form-management-list", outputs: { navigateToCreateEvent: "navigateToCreateEvent", navigateToUploadEvent: "navigateToUploadEvent", navigateToEditEvent: "navigateToEditEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n<valtimo-carbon-list\n *ngIf=\"{\n formDefinitions: formDefinitions$ | async,\n pagination: pagination$ | async,\n loading: loading$ | async,\n context: context$ | async,\n hasEditPermissions: hasEditPermissions$ | async,\n } as obs\"\n [showActionItems]=\"obs.hasEditPermissions\"\n [actionItems]=\"ACTION_ITEMS\"\n [fields]=\"FIELDS\"\n [header]=\"false\"\n [isSearchable]=\"true\"\n [items]=\"obs?.formDefinitions || []\"\n [pagination]=\"obs.pagination\"\n [loading]=\"obs.loading\"\n paginationIdentifier=\"formManagementList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"editFormDefinition($event)\"\n (search)=\"searchTermEntered($event)\"\n>\n <ng-container *ngIf=\"obs.hasEditPermissions\" carbonToolbarContent>\n <button cdsButton=\"ghost\" [iconOnly]=\"true\" (click)=\"navigateToUploadRoute()\">\n <svg cdsIcon=\"upload\" size=\"16\"></svg>\n </button>\n\n <ng-container [ngTemplateOutlet]=\"createFormButton\"></ng-container>\n </ng-container>\n\n <valtimo-no-results\n [action]=\"createFormButton\"\n [description]=\"'formManagement.noResults.' + obs.context + 'Description' | translate\"\n [title]=\"'formManagement.noResults.title' | translate\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n\n<valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"interface.deleteConfirmation\"\n cancelButtonTextTranslationKey=\"interface.cancel\"\n [outputOnConfirm]=\"formDefinitionToDelete$ | async\"\n [showModalSubject$]=\"showDeleteModal$\"\n titleTranslationKey=\"dashboardManagement.delete\"\n (confirmEvent)=\"deleteFormDefinition($event)\"\n></valtimo-confirmation-modal>\n\n<ng-template #createFormButton>\n <button\n *ngIf=\"hasEditPermissions$ | async\"\n cdsButton=\"primary\"\n (click)=\"navigateToCreateRoute()\"\n [attr.data-test-id]=\"testIds.createFormButton\"\n >\n {{ 'Create Form' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i7.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i3$1.CarbonListComponent, selector: "valtimo-carbon-list", inputs: ["items", "fields", "tableTranslations", "paginatorConfig", "pagination", "loading", "skeletonRowCount", "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: i3$1.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i2$1.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: ConfirmationModalModule }, { kind: "component", type: i3$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"] }] }); }
1251
+ }
1252
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementListComponent, decorators: [{
1253
+ type: Component,
1254
+ args: [{ selector: 'valtimo-form-management-list', standalone: true, imports: [
1255
+ CommonModule,
1256
+ FormsModule,
1257
+ ReactiveFormsModule,
1258
+ TranslateModule,
1259
+ CarbonListModule,
1260
+ IconModule,
1261
+ ButtonModule,
1262
+ ConfirmationModalModule,
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<valtimo-carbon-list\n *ngIf=\"{\n formDefinitions: formDefinitions$ | async,\n pagination: pagination$ | async,\n loading: loading$ | async,\n context: context$ | async,\n hasEditPermissions: hasEditPermissions$ | async,\n } as obs\"\n [showActionItems]=\"obs.hasEditPermissions\"\n [actionItems]=\"ACTION_ITEMS\"\n [fields]=\"FIELDS\"\n [header]=\"false\"\n [isSearchable]=\"true\"\n [items]=\"obs?.formDefinitions || []\"\n [pagination]=\"obs.pagination\"\n [loading]=\"obs.loading\"\n paginationIdentifier=\"formManagementList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"editFormDefinition($event)\"\n (search)=\"searchTermEntered($event)\"\n>\n <ng-container *ngIf=\"obs.hasEditPermissions\" carbonToolbarContent>\n <button cdsButton=\"ghost\" [iconOnly]=\"true\" (click)=\"navigateToUploadRoute()\">\n <svg cdsIcon=\"upload\" size=\"16\"></svg>\n </button>\n\n <ng-container [ngTemplateOutlet]=\"createFormButton\"></ng-container>\n </ng-container>\n\n <valtimo-no-results\n [action]=\"createFormButton\"\n [description]=\"'formManagement.noResults.' + obs.context + 'Description' | translate\"\n [title]=\"'formManagement.noResults.title' | translate\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n\n<valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"interface.deleteConfirmation\"\n cancelButtonTextTranslationKey=\"interface.cancel\"\n [outputOnConfirm]=\"formDefinitionToDelete$ | async\"\n [showModalSubject$]=\"showDeleteModal$\"\n titleTranslationKey=\"dashboardManagement.delete\"\n (confirmEvent)=\"deleteFormDefinition($event)\"\n></valtimo-confirmation-modal>\n\n<ng-template #createFormButton>\n <button\n *ngIf=\"hasEditPermissions$ | async\"\n cdsButton=\"primary\"\n (click)=\"navigateToCreateRoute()\"\n [attr.data-test-id]=\"testIds.createFormButton\"\n >\n {{ 'Create Form' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
1264
+ }], ctorParameters: () => [{ type: FormManagementService }, { type: i2$1.IconService }, { type: i3.ActivatedRoute }, { type: i4.EnvironmentService }, { type: i4.DraftVersionService }, { type: i4.GlobalNotificationService }, { type: i5.TranslateService }, { type: i4.EditPermissionsService }], propDecorators: { navigateToCreateEvent: [{
1265
+ type: Output
1266
+ }], navigateToUploadEvent: [{
1267
+ type: Output
1268
+ }], navigateToEditEvent: [{
1269
+ type: Output
1270
+ }] } });
1271
+
1272
+ /*
1273
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1274
+ *
1275
+ * Licensed under EUPL, Version 1.2 (the "License");
1276
+ * you may not use this file except in compliance with the License.
1277
+ * You may obtain a copy of the License at
1278
+ *
1279
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1280
+ *
1281
+ * Unless required by applicable law or agreed to in writing, software
1282
+ * distributed under the License is distributed on an "AS IS" basis,
1283
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1284
+ * See the License for the specific language governing permissions and
1285
+ * limitations under the License.
1286
+ */
1287
+
1288
+ /*
1289
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1290
+ *
1291
+ * Licensed under EUPL, Version 1.2 (the "License");
1292
+ * you may not use this file except in compliance with the License.
1293
+ * You may obtain a copy of the License at
1294
+ *
1295
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1296
+ *
1297
+ * Unless required by applicable law or agreed to in writing, software
1298
+ * distributed under the License is distributed on an "AS IS" basis,
1299
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1300
+ * See the License for the specific language governing permissions and
1301
+ * limitations under the License.
1302
+ */
1303
+ class FormManagementComponent {
1304
+ constructor(route, router, notificationService, translateService) {
1305
+ this.route = route;
1306
+ this.router = router;
1307
+ this.notificationService = notificationService;
1308
+ this.translateService = translateService;
1309
+ this.create$ = new BehaviorSubject(false);
1310
+ this.upload$ = new BehaviorSubject(false);
1311
+ }
1312
+ onNavigateToCreateEvent() {
1313
+ this.create$.next(true);
1314
+ }
1315
+ onGoBackFromCreateEvent() {
1316
+ this.create$.next(false);
1317
+ this.upload$.next(false);
1318
+ }
1319
+ onFormDefinitionEditEvent(formDefinitionId, upload = false) {
1320
+ this.router.navigate([formDefinitionId], {
1321
+ relativeTo: this.route,
1322
+ queryParams: { ...(upload && { upload: true }) },
1323
+ });
1324
+ }
1325
+ onFormDefinitionCreateEvent(formDefinitionId) {
1326
+ this.resetNotifications();
1327
+ this.notificationService.showToast({
1328
+ type: 'success',
1329
+ title: this.translateService.instant('formManagement.notifications.created'),
1330
+ });
1331
+ this.onFormDefinitionEditEvent(formDefinitionId);
1332
+ }
1333
+ onFormDefinitionUploadEvent(formDefinitionId) {
1334
+ this.resetNotifications();
1335
+ this.notificationService.showToast({
1336
+ type: 'success',
1337
+ title: this.translateService.instant('formManagement.notifications.created'),
1338
+ });
1339
+ this.onFormDefinitionEditEvent(formDefinitionId, true);
1340
+ }
1341
+ onNavigateToUploadEvent() {
1342
+ this.create$.next(true);
1343
+ this.upload$.next(true);
1344
+ }
1345
+ resetNotifications() {
1346
+ this.notificationService
1347
+ ?.getNotificationRefs()
1348
+ .forEach(ref => this.notificationService.close(ref));
1349
+ }
1350
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementComponent, deps: [{ token: i3.ActivatedRoute }, { token: i3.Router }, { token: i4.GlobalNotificationService }, { token: i5.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
1351
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: FormManagementComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n *ngIf=\"{\n create: create$ | async,\n upload: upload$ | async,\n } as obs\"\n>\n <valtimo-form-management-list\n (navigateToCreateEvent)=\"onNavigateToCreateEvent()\"\n (navigateToUploadEvent)=\"onNavigateToUploadEvent()\"\n (navigateToEditEvent)=\"onFormDefinitionEditEvent($event)\"\n ></valtimo-form-management-list>\n\n <valtimo-form-management-create\n *ngIf=\"obs.create\"\n [upload]=\"obs.upload\"\n (goBackEvent)=\"onGoBackFromCreateEvent()\"\n (afterCreateEvent)=\"onFormDefinitionCreateEvent($event)\"\n (afterUploadEvent)=\"onFormDefinitionUploadEvent($event)\"\n ></valtimo-form-management-create>\n</ng-container>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i7.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: FormManagementListComponent, selector: "valtimo-form-management-list", outputs: ["navigateToCreateEvent", "navigateToUploadEvent", "navigateToEditEvent"] }, { kind: "component", type: FormManagementCreateComponent, selector: "valtimo-form-management-create", inputs: ["upload"], outputs: ["goBackEvent", "afterCreateEvent", "afterUploadEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1352
+ }
1353
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementComponent, decorators: [{
1354
+ type: Component,
1355
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
1356
+ CommonModule,
1357
+ ButtonModule,
1358
+ FormManagementListComponent,
1359
+ FormManagementCreateComponent,
1360
+ FormManagementEditComponent,
1361
+ RouterOutlet,
1362
+ ], 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 create: create$ | async,\n upload: upload$ | async,\n } as obs\"\n>\n <valtimo-form-management-list\n (navigateToCreateEvent)=\"onNavigateToCreateEvent()\"\n (navigateToUploadEvent)=\"onNavigateToUploadEvent()\"\n (navigateToEditEvent)=\"onFormDefinitionEditEvent($event)\"\n ></valtimo-form-management-list>\n\n <valtimo-form-management-create\n *ngIf=\"obs.create\"\n [upload]=\"obs.upload\"\n (goBackEvent)=\"onGoBackFromCreateEvent()\"\n (afterCreateEvent)=\"onFormDefinitionCreateEvent($event)\"\n (afterUploadEvent)=\"onFormDefinitionUploadEvent($event)\"\n ></valtimo-form-management-create>\n</ng-container>\n" }]
1363
+ }], ctorParameters: () => [{ type: i3.ActivatedRoute }, { type: i3.Router }, { type: i4.GlobalNotificationService }, { type: i5.TranslateService }] });
1364
+
1365
+ /*
1366
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1367
+ *
1368
+ * Licensed under EUPL, Version 1.2 (the "License");
1369
+ * you may not use this file except in compliance with the License.
1370
+ * You may obtain a copy of the License at
1371
+ *
1372
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1373
+ *
1374
+ * Unless required by applicable law or agreed to in writing, software
1375
+ * distributed under the License is distributed on an "AS IS" basis,
1376
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1377
+ * See the License for the specific language governing permissions and
1378
+ * limitations under the License.
1379
+ */
1380
+
1381
+ /*
1382
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
1383
+ *
1384
+ * Licensed under EUPL, Version 1.2 (the "License");
1385
+ * you may not use this file except in compliance with the License.
1386
+ * You may obtain a copy of the License at
1387
+ *
1388
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1389
+ *
1390
+ * Unless required by applicable law or agreed to in writing, software
1391
+ * distributed under the License is distributed on an "AS IS" basis,
1392
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1393
+ * See the License for the specific language governing permissions and
1394
+ * limitations under the License.
1395
+ */
1396
+ const routes = [
1397
+ {
1398
+ path: 'form-management',
1399
+ component: FormManagementComponent,
1400
+ canActivate: [AuthGuardService],
1401
+ data: { title: 'Forms', roles: [ROLE_ADMIN], context: 'independent' },
1402
+ },
1403
+ {
1404
+ path: 'form-management/:formDefinitionId',
1405
+ component: FormManagementEditComponent,
1406
+ canActivate: [AuthGuardService],
1407
+ data: {
1408
+ title: 'Forms',
1409
+ roles: [ROLE_ADMIN],
1410
+ context: 'independent',
1411
+ customPageTitle: true,
1412
+ },
1413
+ },
1414
+ ];
1415
+ class FormManagementRoutingModule {
1416
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1417
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: FormManagementRoutingModule, imports: [i3.RouterModule], exports: [RouterModule] }); }
1418
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementRoutingModule, imports: [RouterModule.forRoot(routes, RouterUtils.getRouterExtraOptions()), RouterModule] }); }
1419
+ }
1420
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementRoutingModule, decorators: [{
1421
+ type: NgModule,
1422
+ args: [{
1423
+ imports: [RouterModule.forRoot(routes, RouterUtils.getRouterExtraOptions())],
1424
+ exports: [RouterModule],
1425
+ }]
1426
+ }] });
1427
+ class FormManagementModule {
1428
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1429
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: FormManagementModule, imports: [FormManagementComponent, FormManagementRoutingModule] }); }
1430
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementModule, imports: [FormManagementComponent, FormManagementRoutingModule] }); }
1431
+ }
1432
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormManagementModule, decorators: [{
1433
+ type: NgModule,
1434
+ args: [{
1435
+ imports: [FormManagementComponent, FormManagementRoutingModule],
1436
+ }]
1437
+ }] });
1438
+
1439
+ /*
1440
+ * Copyright 2015-2026 Ritense BV, the Netherlands.
1441
+ *
1442
+ * Licensed under EUPL, Version 1.2 (the "License");
1443
+ * you may not use this file except in compliance with the License.
1444
+ * You may obtain a copy of the License at
1445
+ *
1446
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1447
+ *
1448
+ * Unless required by applicable law or agreed to in writing, software
1449
+ * distributed under the License is distributed on an "AS IS" basis,
1450
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1451
+ * See the License for the specific language governing permissions and
1452
+ * limitations under the License.
1453
+ */
1454
+ /*
1455
+ * Public API Surface of form-management
1456
+ */
1457
+
1458
+ /**
1459
+ * Generated bundle index. Do not edit.
1460
+ */
1461
+
1462
+ export { EDIT_TABS, FORM_MANAGEMENT_CREATE_TEST_IDS, FORM_MANAGEMENT_EDIT_TEST_IDS, FORM_MANAGEMENT_LIST_TEST_IDS, FormManagementComponent, FormManagementCreateComponent, FormManagementEditComponent, FormManagementModule, FormManagementRoutingModule, FormManagementService, compareFormDefinitions };
1463
+ //# sourceMappingURL=valtimo-form-management.mjs.map