@valtimo/form-flow-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 (28) hide show
  1. package/README.md +33 -0
  2. package/fesm2022/valtimo-form-flow-management.mjs +769 -0
  3. package/fesm2022/valtimo-form-flow-management.mjs.map +1 -0
  4. package/index.d.ts +6 -0
  5. package/lib/components/delete-form-flow-modal/delete-form-flow-modal.component.d.ts +12 -0
  6. package/lib/components/delete-form-flow-modal/delete-form-flow-modal.component.d.ts.map +1 -0
  7. package/lib/components/editor/form-flow-editor.component.d.ts +129 -0
  8. package/lib/components/editor/form-flow-editor.component.d.ts.map +1 -0
  9. package/lib/components/new-form-flow-modal/new-form-flow-modal.component.d.ts +20 -0
  10. package/lib/components/new-form-flow-modal/new-form-flow-modal.component.d.ts.map +1 -0
  11. package/lib/components/overview/form-flow-overview.component.d.ts +37 -0
  12. package/lib/components/overview/form-flow-overview.component.d.ts.map +1 -0
  13. package/lib/form-flow-management.module.d.ts +16 -0
  14. package/lib/form-flow-management.module.d.ts.map +1 -0
  15. package/lib/models/form-flow.model.d.ts +54 -0
  16. package/lib/models/form-flow.model.d.ts.map +1 -0
  17. package/lib/models/index.d.ts +2 -0
  18. package/lib/models/index.d.ts.map +1 -0
  19. package/lib/services/form-flow-download.service.d.ts +8 -0
  20. package/lib/services/form-flow-download.service.d.ts.map +1 -0
  21. package/lib/services/form-flow.service.d.ts +23 -0
  22. package/lib/services/form-flow.service.d.ts.map +1 -0
  23. package/lib/services/index.d.ts +2 -0
  24. package/lib/services/index.d.ts.map +1 -0
  25. package/package.json +23 -0
  26. package/public-api.d.ts +7 -0
  27. package/public-api.d.ts.map +1 -0
  28. package/valtimo-form-flow-management.d.ts.map +1 -0
@@ -0,0 +1,769 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, EventEmitter, Output, Input, ChangeDetectionStrategy, Component, ViewChild, NgModule } from '@angular/core';
3
+ import * as i2 from '@valtimo/shared';
4
+ import { BaseApiService, getCaseManagementRouteParams, getContextObservable, getBuildingBlockManagementRouteParams } from '@valtimo/shared';
5
+ import * as i1 from '@angular/common/http';
6
+ import * as i1$2 from '@valtimo/components';
7
+ import { CARBON_CONSTANTS, ValtimoCdsModalDirective, ViewType, CarbonListComponent, ConfirmationModalModule, EditorModule, RenderInPageHeaderDirective, OverflowMenuComponent, OverflowMenuOptionComponent, OverflowMenuTriggerComponent, CarbonListModule } from '@valtimo/components';
8
+ import { BehaviorSubject, combineLatest, tap, switchMap, of, map, take, finalize } from 'rxjs';
9
+ import * as i3$1 from '@angular/router';
10
+ import * as i4 from '@ngx-translate/core';
11
+ import { TranslateModule } from '@ngx-translate/core';
12
+ import * as i5 from '@angular/common';
13
+ import { CommonModule } from '@angular/common';
14
+ import * as i3 from 'carbon-components-angular';
15
+ import { ModalModule, InputModule, ButtonModule, IconModule, LoadingModule, NotificationModule, DropdownModule } from 'carbon-components-angular';
16
+ import * as i1$1 from '@angular/forms';
17
+ import { Validators, ReactiveFormsModule, FormsModule } from '@angular/forms';
18
+ import { ArrowLeft16 } from '@carbon/icons';
19
+
20
+ /*
21
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
22
+ *
23
+ * Licensed under EUPL, Version 1.2 (the "License");
24
+ * you may not use this file except in compliance with the License.
25
+ * You may obtain a copy of the License at
26
+ *
27
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
28
+ *
29
+ * Unless required by applicable law or agreed to in writing, software
30
+ * distributed under the License is distributed on an "AS IS" basis,
31
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
+ * See the License for the specific language governing permissions and
33
+ * limitations under the License.
34
+ */
35
+
36
+ /*
37
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
38
+ *
39
+ * Licensed under EUPL, Version 1.2 (the "License");
40
+ * you may not use this file except in compliance with the License.
41
+ * You may obtain a copy of the License at
42
+ *
43
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
44
+ *
45
+ * Unless required by applicable law or agreed to in writing, software
46
+ * distributed under the License is distributed on an "AS IS" basis,
47
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
48
+ * See the License for the specific language governing permissions and
49
+ * limitations under the License.
50
+ */
51
+
52
+ class FormFlowService extends BaseApiService {
53
+ constructor(httpClient, configService) {
54
+ super(httpClient, configService);
55
+ this.httpClient = httpClient;
56
+ this.configService = configService;
57
+ }
58
+ getFormFlowDefinitions(caseDefinitionKey, caseVersionTag) {
59
+ return this.httpClient.get(this.getApiUrl(`management/v1/case-definition/${caseDefinitionKey}/version/${caseVersionTag}/form-flow-definition`));
60
+ }
61
+ getFormFlowDefinitionByKey(caseDefinitionKey, caseVersionTag, formFlowDefinitionKey) {
62
+ return this.httpClient.get(this.getApiUrl(`management/v1/case-definition/${caseDefinitionKey}/version/${caseVersionTag}/form-flow-definition/${formFlowDefinitionKey}`));
63
+ }
64
+ createFormFlowDefinition(caseDefinitionKey, caseVersionTag, definition) {
65
+ return this.httpClient.post(this.getApiUrl(`management/v1/case-definition/${caseDefinitionKey}/version/${caseVersionTag}/form-flow-definition`), definition);
66
+ }
67
+ deleteFormFlowDefinition(caseDefinitionKey, caseVersionTag, definitionKey) {
68
+ return this.httpClient.delete(this.getApiUrl(`management/v1/case-definition/${caseDefinitionKey}/version/${caseVersionTag}/form-flow-definition/${definitionKey}`));
69
+ }
70
+ updateFormFlowDefinition(caseDefinitionKey, caseVersionTag, definitionKey, updatedDefinition) {
71
+ return this.httpClient.put(this.getApiUrl(`management/v1/case-definition/${caseDefinitionKey}/version/${caseVersionTag}/form-flow-definition/${definitionKey}`), updatedDefinition);
72
+ }
73
+ getBuildingBlockFormFlowDefinitions(buildingBlockKey, versionTag) {
74
+ return this.httpClient.get(this.getApiUrl(`management/v1/building-block/${buildingBlockKey}/version/${versionTag}/form-flow-definition`));
75
+ }
76
+ getBuildingBlockFormFlowDefinitionByKey(buildingBlockKey, versionTag, formFlowDefinitionKey) {
77
+ return this.httpClient.get(this.getApiUrl(`management/v1/building-block/${buildingBlockKey}/version/${versionTag}/form-flow-definition/${formFlowDefinitionKey}`));
78
+ }
79
+ createBuildingBlockFormFlowDefinition(buildingBlockKey, versionTag, definition) {
80
+ return this.httpClient.post(this.getApiUrl(`management/v1/building-block/${buildingBlockKey}/version/${versionTag}/form-flow-definition`), definition);
81
+ }
82
+ deleteBuildingBlockFormFlowDefinition(buildingBlockKey, versionTag, definitionKey) {
83
+ return this.httpClient.delete(this.getApiUrl(`management/v1/building-block/${buildingBlockKey}/version/${versionTag}/form-flow-definition/${definitionKey}`));
84
+ }
85
+ updateBuildingBlockFormFlowDefinition(buildingBlockKey, versionTag, definitionKey, updatedDefinition) {
86
+ return this.httpClient.put(this.getApiUrl(`management/v1/building-block/${buildingBlockKey}/version/${versionTag}/form-flow-definition/${definitionKey}`), updatedDefinition);
87
+ }
88
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormFlowService, deps: [{ token: i1.HttpClient }, { token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
89
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormFlowService, providedIn: 'root' }); }
90
+ }
91
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormFlowService, decorators: [{
92
+ type: Injectable,
93
+ args: [{
94
+ providedIn: 'root',
95
+ }]
96
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.ConfigService }] });
97
+
98
+ /*
99
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
100
+ *
101
+ * Licensed under EUPL, Version 1.2 (the "License");
102
+ * you may not use this file except in compliance with the License.
103
+ * You may obtain a copy of the License at
104
+ *
105
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
106
+ *
107
+ * Unless required by applicable law or agreed to in writing, software
108
+ * distributed under the License is distributed on an "AS IS" basis,
109
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
110
+ * See the License for the specific language governing permissions and
111
+ * limitations under the License.
112
+ */
113
+
114
+ /*
115
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
116
+ *
117
+ * Licensed under EUPL, Version 1.2 (the "License");
118
+ * you may not use this file except in compliance with the License.
119
+ * You may obtain a copy of the License at
120
+ *
121
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
122
+ *
123
+ * Unless required by applicable law or agreed to in writing, software
124
+ * distributed under the License is distributed on an "AS IS" basis,
125
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
126
+ * See the License for the specific language governing permissions and
127
+ * limitations under the License.
128
+ */
129
+ class NewFormFlowModalComponent {
130
+ get key() {
131
+ return this.form?.get('key');
132
+ }
133
+ constructor(fb) {
134
+ this.fb = fb;
135
+ this.open = false;
136
+ this.closeEvent = new EventEmitter();
137
+ this.form = this.fb.group({
138
+ key: this.fb.control('', Validators.required),
139
+ });
140
+ }
141
+ onCancel() {
142
+ this.closeEvent.emit(null);
143
+ this.resetForm();
144
+ }
145
+ onConfirm() {
146
+ if (!this.key) {
147
+ return;
148
+ }
149
+ this.closeEvent.emit({
150
+ key: this.key.value ?? '',
151
+ startStep: 'start-step',
152
+ steps: [],
153
+ });
154
+ this.resetForm();
155
+ }
156
+ resetForm() {
157
+ setTimeout(() => {
158
+ this.form.reset();
159
+ }, CARBON_CONSTANTS.modalAnimationMs);
160
+ }
161
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: NewFormFlowModalComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
162
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: NewFormFlowModalComponent, isStandalone: true, selector: "valtimo-new-form-flow-modal", inputs: { open: "open" }, outputs: { closeEvent: "closeEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<cds-modal\n [open]=\"open\"\n showFooter=\"true\"\n [title]=\"'formFlow.add' | translate\"\n valtimoCdsModal\n (close)=\"onCancel()\"\n>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"onCancel()\">\n <h3 cdsModalHeaderHeading>\n {{ 'formFlow.add' | translate }}\n </h3>\n </cds-modal-header>\n\n <section cdsModalContent>\n <form [formGroup]=\"form\">\n <cds-label [invalid]=\"key.dirty && key.invalid\">\n {{ 'formFlow.key' | translate }}\n\n <input\n formControlName=\"key\"\n cdsText\n placeholder=\"{{ 'formFlow.key' | translate }}\"\n [attr.modal-primary-focus]=\"true\"\n [invalid]=\"key.dirty && key.invalid\"\n />\n </cds-label>\n </form>\n </section>\n\n <cds-modal-footer>\n <button cdsButton=\"secondary\" (click)=\"onCancel()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button [disabled]=\"this.form.invalid\" (click)=\"onConfirm()\" cdsButton=\"primary\">\n {{ 'interface.create' | translate }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ModalModule }, { kind: "component", type: i3.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i3.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i3.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i3.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i3.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "ngmodule", type: InputModule }, { kind: "component", type: i3.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i3.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: ValtimoCdsModalDirective, selector: "[valtimoCdsModal]", inputs: ["minContentHeight"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
163
+ }
164
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: NewFormFlowModalComponent, decorators: [{
165
+ type: Component,
166
+ args: [{ standalone: true, selector: 'valtimo-new-form-flow-modal', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
167
+ ReactiveFormsModule,
168
+ TranslateModule,
169
+ ModalModule,
170
+ InputModule,
171
+ ButtonModule,
172
+ ValtimoCdsModalDirective,
173
+ ], 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 [open]=\"open\"\n showFooter=\"true\"\n [title]=\"'formFlow.add' | translate\"\n valtimoCdsModal\n (close)=\"onCancel()\"\n>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"onCancel()\">\n <h3 cdsModalHeaderHeading>\n {{ 'formFlow.add' | translate }}\n </h3>\n </cds-modal-header>\n\n <section cdsModalContent>\n <form [formGroup]=\"form\">\n <cds-label [invalid]=\"key.dirty && key.invalid\">\n {{ 'formFlow.key' | translate }}\n\n <input\n formControlName=\"key\"\n cdsText\n placeholder=\"{{ 'formFlow.key' | translate }}\"\n [attr.modal-primary-focus]=\"true\"\n [invalid]=\"key.dirty && key.invalid\"\n />\n </cds-label>\n </form>\n </section>\n\n <cds-modal-footer>\n <button cdsButton=\"secondary\" (click)=\"onCancel()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button [disabled]=\"this.form.invalid\" (click)=\"onConfirm()\" cdsButton=\"primary\">\n {{ 'interface.create' | translate }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n" }]
174
+ }], ctorParameters: () => [{ type: i1$1.FormBuilder }], propDecorators: { open: [{
175
+ type: Input
176
+ }], closeEvent: [{
177
+ type: Output
178
+ }] } });
179
+
180
+ /*
181
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
182
+ *
183
+ * Licensed under EUPL, Version 1.2 (the "License");
184
+ * you may not use this file except in compliance with the License.
185
+ * You may obtain a copy of the License at
186
+ *
187
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
188
+ *
189
+ * Unless required by applicable law or agreed to in writing, software
190
+ * distributed under the License is distributed on an "AS IS" basis,
191
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
192
+ * See the License for the specific language governing permissions and
193
+ * limitations under the License.
194
+ */
195
+ class FormFlowOverviewComponent {
196
+ constructor(formFlowService, globalNotificationService, route, router, translateService, editPermissionsService) {
197
+ this.formFlowService = formFlowService;
198
+ this.globalNotificationService = globalNotificationService;
199
+ this.route = route;
200
+ this.router = router;
201
+ this.translateService = translateService;
202
+ this.editPermissionsService = editPermissionsService;
203
+ this.FIELDS = [
204
+ {
205
+ viewType: ViewType.TEXT,
206
+ key: 'key',
207
+ label: 'formFlow.key',
208
+ },
209
+ {
210
+ viewType: ViewType.TEXT,
211
+ key: 'versions.0',
212
+ label: 'formFlow.version',
213
+ },
214
+ {
215
+ viewType: ViewType.BOOLEAN,
216
+ key: 'readOnly',
217
+ label: 'formFlow.readOnly',
218
+ },
219
+ ];
220
+ this.ACTION_ITEMS = [
221
+ {
222
+ callback: this.editFormFlowDetails.bind(this),
223
+ label: 'interface.edit',
224
+ },
225
+ {
226
+ callback: this.deleteFormFlow.bind(this),
227
+ label: 'interface.delete',
228
+ type: 'danger',
229
+ },
230
+ ];
231
+ this.loading$ = new BehaviorSubject(true);
232
+ this.showDeleteModal$ = new BehaviorSubject(false);
233
+ this.deleteDefinitionKey$ = new BehaviorSubject(null);
234
+ this._params = undefined;
235
+ this._refresh$ = new BehaviorSubject(null);
236
+ this.formFlowDefinitions$ = combineLatest([
237
+ getCaseManagementRouteParams(this.route),
238
+ this._refresh$,
239
+ ]).pipe(tap(([params]) => {
240
+ this.loading$.next(true);
241
+ this._params = params;
242
+ }), switchMap(([params]) => !params
243
+ ? of(null)
244
+ : this.formFlowService.getFormFlowDefinitions(params.caseDefinitionKey, params.caseDefinitionVersionTag)), map((formFlows) => {
245
+ this.loading$.next(false);
246
+ return !formFlows ? [] : formFlows.content;
247
+ }));
248
+ this.showAddModal$ = new BehaviorSubject(false);
249
+ this.params$ = getCaseManagementRouteParams(this.route);
250
+ this.hasEditPermissions$ = this.params$.pipe(switchMap(params => this.editPermissionsService.hasEditPermissions(params?.caseDefinitionKey, params?.caseDefinitionVersionTag)));
251
+ }
252
+ openAddModal() {
253
+ this.showAddModal$.next(true);
254
+ }
255
+ onAdd(formFlowDefinition) {
256
+ this.showAddModal$.next(false);
257
+ if (!formFlowDefinition || !this._params)
258
+ return;
259
+ this.formFlowService
260
+ .createFormFlowDefinition(this._params.caseDefinitionKey, this._params.caseDefinitionVersionTag, formFlowDefinition)
261
+ .subscribe((formFlowDefinition) => {
262
+ this.showAddModal$.next(false);
263
+ this.router.navigate([formFlowDefinition.key], { relativeTo: this.route });
264
+ });
265
+ }
266
+ editFormFlowDetails(formFlowDefinition) {
267
+ this.router.navigate([formFlowDefinition.key], { relativeTo: this.route });
268
+ }
269
+ deleteFormFlow(item) {
270
+ this.deleteDefinitionKey$.next(item.key);
271
+ this.showDeleteModal$.next(true);
272
+ }
273
+ onDelete(definitionKey) {
274
+ if (!this._params)
275
+ return;
276
+ this.formFlowService
277
+ .deleteFormFlowDefinition(this._params.caseDefinitionKey, this._params.caseDefinitionVersionTag, definitionKey)
278
+ .subscribe(() => {
279
+ this.globalNotificationService.showToast({
280
+ title: this.translateService.instant('interface.delete'),
281
+ caption: this.translateService.instant('formFlow.deletedSuccessfully', {
282
+ key: definitionKey,
283
+ }),
284
+ type: 'success',
285
+ });
286
+ this._refresh$.next(null);
287
+ });
288
+ }
289
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormFlowOverviewComponent, deps: [{ token: FormFlowService }, { token: i2.GlobalNotificationService }, { token: i3$1.ActivatedRoute }, { token: i3$1.Router }, { token: i4.TranslateService }, { token: i2.EditPermissionsService }], target: i0.ɵɵFactoryTarget.Component }); }
290
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: FormFlowOverviewComponent, isStandalone: false, selector: "ng-component", viewQueries: [{ propertyName: "carbonList", first: true, predicate: CarbonListComponent, descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-carbon-list\n [actionItems]=\"ACTION_ITEMS\"\n [header]=\"false\"\n [items]=\"formFlowDefinitions$ | async\"\n [fields]=\"FIELDS\"\n [loading]=\"loading$ | async\"\n (rowClicked)=\"editFormFlowDetails($event)\"\n>\n <ng-container header> {{ 'formFlow.title' | translate }} </ng-container>\n\n <div carbonToolbarContent>\n <ng-container [ngTemplateOutlet]=\"addFormFlowButton\"></ng-container>\n </div>\n\n <valtimo-no-results\n [action]=\"addFormFlowButton\"\n description=\"{{ 'formFlow.noResults.description' | translate }}\"\n title=\"{{ 'formFlow.noResults.title' | translate }}\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n\n<valtimo-new-form-flow-modal\n [open]=\"showAddModal$ | async\"\n (closeEvent)=\"onAdd($event)\"\n></valtimo-new-form-flow-modal>\n\n<ng-template #addFormFlowButton>\n <button *ngIf=\"hasEditPermissions$ | async\" cdsButton=\"primary\" (click)=\"openAddModal()\">\n {{ 'formFlow.add' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"formFlow.deleteModalContent\"\n [outputOnConfirm]=\"deleteDefinitionKey$ | async\"\n [showModalSubject$]=\"showDeleteModal$\"\n titleTranslationKey=\"interface.delete\"\n (confirmEvent)=\"onDelete($event)\"\n></valtimo-confirmation-modal>\n", dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i3.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: i1$2.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "confirmButtonType", "showOptionalButton", "optionalButtonText", "optionalButtonTextTranslationKey", "optionalButtonType", "cancelButtonText", "cancelButtonTextTranslationKey", "cancelButtonType", "showModalSubject$", "outputOnConfirm", "outputOnOptional", "spacerAfterCancelButton"], outputs: ["confirmEvent", "optionalEvent", "cancelEvent"] }, { kind: "component", type: i1$2.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: i1$2.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "component", type: NewFormFlowModalComponent, selector: "valtimo-new-form-flow-modal", inputs: ["open"], outputs: ["closeEvent"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
291
+ }
292
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormFlowOverviewComponent, decorators: [{
293
+ type: Component,
294
+ args: [{ standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-carbon-list\n [actionItems]=\"ACTION_ITEMS\"\n [header]=\"false\"\n [items]=\"formFlowDefinitions$ | async\"\n [fields]=\"FIELDS\"\n [loading]=\"loading$ | async\"\n (rowClicked)=\"editFormFlowDetails($event)\"\n>\n <ng-container header> {{ 'formFlow.title' | translate }} </ng-container>\n\n <div carbonToolbarContent>\n <ng-container [ngTemplateOutlet]=\"addFormFlowButton\"></ng-container>\n </div>\n\n <valtimo-no-results\n [action]=\"addFormFlowButton\"\n description=\"{{ 'formFlow.noResults.description' | translate }}\"\n title=\"{{ 'formFlow.noResults.title' | translate }}\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n\n<valtimo-new-form-flow-modal\n [open]=\"showAddModal$ | async\"\n (closeEvent)=\"onAdd($event)\"\n></valtimo-new-form-flow-modal>\n\n<ng-template #addFormFlowButton>\n <button *ngIf=\"hasEditPermissions$ | async\" cdsButton=\"primary\" (click)=\"openAddModal()\">\n {{ 'formFlow.add' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"formFlow.deleteModalContent\"\n [outputOnConfirm]=\"deleteDefinitionKey$ | async\"\n [showModalSubject$]=\"showDeleteModal$\"\n titleTranslationKey=\"interface.delete\"\n (confirmEvent)=\"onDelete($event)\"\n></valtimo-confirmation-modal>\n" }]
295
+ }], ctorParameters: () => [{ type: FormFlowService }, { type: i2.GlobalNotificationService }, { type: i3$1.ActivatedRoute }, { type: i3$1.Router }, { type: i4.TranslateService }, { type: i2.EditPermissionsService }], propDecorators: { carbonList: [{
296
+ type: ViewChild,
297
+ args: [CarbonListComponent]
298
+ }] } });
299
+
300
+ var $schema = "http://json-schema.org/draft-07/schema#";
301
+ var $id = "formflow.schema";
302
+ var title = "Form flow definition";
303
+ var description = "Representation of a form flow definition";
304
+ var type = "object";
305
+ var properties = {
306
+ startStep: {
307
+ type: "string",
308
+ description: "This must contain the key of the first step of the form flow"
309
+ },
310
+ steps: {
311
+ type: "array",
312
+ description: "This array should contain all the possible steps of the form flow",
313
+ items: {
314
+ type: "object",
315
+ properties: {
316
+ key: {
317
+ type: "string",
318
+ description: "The identifying human readable key of the step"
319
+ },
320
+ type: {
321
+ type: "object",
322
+ description: "The type of form that should be displayed",
323
+ properties: {
324
+ name: {
325
+ type: "string",
326
+ description: "This defines the type of the step, for instance: 'form'"
327
+ },
328
+ properties: {
329
+ type: "object",
330
+ description: "This object holds additional properties for the specified type"
331
+ }
332
+ },
333
+ required: [
334
+ "name",
335
+ "properties"
336
+ ]
337
+ },
338
+ onOpen: {
339
+ type: "array",
340
+ description: "An array of expressions which are executed in order when opening the step",
341
+ items: {
342
+ type: "string",
343
+ description: "An expression that is executed when opening the step"
344
+ }
345
+ },
346
+ onComplete: {
347
+ type: "array",
348
+ description: "An array of expressions which are executed in order when completing the step",
349
+ items: {
350
+ type: "string",
351
+ description: "An expression that is executed when completing the step"
352
+ }
353
+ },
354
+ nextSteps: {
355
+ type: "array",
356
+ description: "The possible next steps. A condition must be added on all steps but one. The step without a condition is the default step that will be used when all conditions fail",
357
+ items: {
358
+ type: "object",
359
+ properties: {
360
+ step: {
361
+ type: "string",
362
+ title: "The key of the next step. This should match one of the keys in the steps array"
363
+ },
364
+ condition: {
365
+ type: [
366
+ "string",
367
+ "null"
368
+ ],
369
+ title: "This should contain an expression telling what condition should be met to go to this next step. If there is no condition this is the default next step."
370
+ }
371
+ },
372
+ required: [
373
+ "step"
374
+ ]
375
+ }
376
+ }
377
+ },
378
+ required: [
379
+ "key",
380
+ "type"
381
+ ]
382
+ },
383
+ minItems: 0,
384
+ uniqueItems: true
385
+ }
386
+ };
387
+ var required = [
388
+ "startStep",
389
+ "steps"
390
+ ];
391
+ var formFlowSchemaJson = {
392
+ $schema: $schema,
393
+ $id: $id,
394
+ title: title,
395
+ description: description,
396
+ type: type,
397
+ properties: properties,
398
+ required: required
399
+ };
400
+
401
+ /*
402
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
403
+ *
404
+ * Licensed under EUPL, Version 1.2 (the "License");
405
+ * you may not use this file except in compliance with the License.
406
+ * You may obtain a copy of the License at
407
+ *
408
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
409
+ *
410
+ * Unless required by applicable law or agreed to in writing, software
411
+ * distributed under the License is distributed on an "AS IS" basis,
412
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
413
+ * See the License for the specific language governing permissions and
414
+ * limitations under the License.
415
+ */
416
+ class FormFlowDownloadService {
417
+ downloadJson(json, params) {
418
+ const sJson = JSON.stringify(json, null, 2);
419
+ const element = document.createElement('a');
420
+ element.setAttribute('href', 'data:text/json;charset=UTF-8,' + encodeURIComponent(sJson));
421
+ element.setAttribute('download', `${params.caseDefinitionKey}-${params.caseDefinitionVersionTag}-${params.formFlowDefinitionKey}.formflow.json`);
422
+ element.style.display = 'none';
423
+ document.body.appendChild(element);
424
+ element.click(); // simulate click
425
+ document.body.removeChild(element);
426
+ }
427
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormFlowDownloadService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
428
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormFlowDownloadService, providedIn: 'root' }); }
429
+ }
430
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormFlowDownloadService, decorators: [{
431
+ type: Injectable,
432
+ args: [{ providedIn: 'root' }]
433
+ }] });
434
+
435
+ /*
436
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
437
+ *
438
+ * Licensed under EUPL, Version 1.2 (the "License");
439
+ * you may not use this file except in compliance with the License.
440
+ * You may obtain a copy of the License at
441
+ *
442
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
443
+ *
444
+ * Unless required by applicable law or agreed to in writing, software
445
+ * distributed under the License is distributed on an "AS IS" basis,
446
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
447
+ * See the License for the specific language governing permissions and
448
+ * limitations under the License.
449
+ */
450
+ class FormFlowEditorComponent {
451
+ constructor(breadcrumbService, formFlowDownloadService, formFlowService, iconService, notificationService, pageHeaderService, pageTitleService, route, router, translateService) {
452
+ this.breadcrumbService = breadcrumbService;
453
+ this.formFlowDownloadService = formFlowDownloadService;
454
+ this.formFlowService = formFlowService;
455
+ this.iconService = iconService;
456
+ this.notificationService = notificationService;
457
+ this.pageHeaderService = pageHeaderService;
458
+ this.pageTitleService = pageTitleService;
459
+ this.route = route;
460
+ this.router = router;
461
+ this.translateService = translateService;
462
+ this.readOnly$ = new BehaviorSubject(false);
463
+ this.valid$ = new BehaviorSubject(false);
464
+ this.loading$ = new BehaviorSubject(true);
465
+ this.showDeleteModal$ = new BehaviorSubject(false);
466
+ this.formFlowDefinitionId$ = new BehaviorSubject(null);
467
+ this.CARBON_THEME = 'g10';
468
+ this._context$ = getContextObservable(this.route);
469
+ this._params$ = this._context$.pipe(switchMap(context => {
470
+ if (context === 'buildingBlock') {
471
+ return combineLatest([
472
+ getBuildingBlockManagementRouteParams(this.route),
473
+ this.route.params,
474
+ ]).pipe(map(([bbParams, params]) => ({
475
+ caseDefinitionKey: bbParams?.buildingBlockDefinitionKey ?? '',
476
+ caseDefinitionVersionTag: bbParams?.buildingBlockDefinitionVersionTag ?? '',
477
+ formFlowDefinitionKey: params.formFlowDefinitionKey,
478
+ })));
479
+ }
480
+ return combineLatest([
481
+ getCaseManagementRouteParams(this.route),
482
+ this.route.params,
483
+ ]).pipe(map(([caseManagementParams, params]) => ({
484
+ ...(caseManagementParams ?? { caseDefinitionKey: '', caseDefinitionVersionTag: '' }),
485
+ ...params,
486
+ })));
487
+ }));
488
+ this.formFlowSchemaJson = formFlowSchemaJson;
489
+ this._formFlowDefinition2$ = combineLatest([this._params$, this._context$]).pipe(tap(() => this.loading$.next(true)), switchMap(([params, context]) => {
490
+ this.initBreadcrumbs(params, context);
491
+ if (context === 'buildingBlock') {
492
+ return this.formFlowService.getBuildingBlockFormFlowDefinitionByKey(params.caseDefinitionKey, params.caseDefinitionVersionTag, params.formFlowDefinitionKey);
493
+ }
494
+ return this.formFlowService.getFormFlowDefinitionByKey(params.caseDefinitionKey, params.caseDefinitionVersionTag, params.formFlowDefinitionKey);
495
+ }), tap((formFlowDefinition) => {
496
+ this.pageTitleService.setCustomPageTitle(formFlowDefinition.key);
497
+ this.readOnly$.next(formFlowDefinition.readOnly === true);
498
+ this.loading$.next(false);
499
+ }));
500
+ this.model$ = this._formFlowDefinition2$.pipe(map((formFlowDefinition) => this.getEditorModel(formFlowDefinition)));
501
+ this._updatedModelValue$ = new BehaviorSubject('');
502
+ this.compactMode$ = this.pageHeaderService.compactMode$;
503
+ this.iconService.registerAll([ArrowLeft16]);
504
+ this.pageTitleService.disableReset();
505
+ }
506
+ ngOnDestroy() {
507
+ this.pageTitleService.enableReset();
508
+ this.breadcrumbService.clearThirdBreadcrumb();
509
+ this.breadcrumbService.clearFourthBreadcrumb();
510
+ }
511
+ onValid(valid) {
512
+ this.valid$.next(valid);
513
+ }
514
+ onValueChange(value) {
515
+ this._updatedModelValue$.next(value);
516
+ }
517
+ updateFormFlowDefinition() {
518
+ this.loading$.next(true);
519
+ combineLatest([this._params$, this._updatedModelValue$, this._context$])
520
+ .pipe(take(1), switchMap(([params, updatedModelValue, context]) => {
521
+ const updatedDefinition = {
522
+ ...JSON.parse(updatedModelValue),
523
+ key: params.formFlowDefinitionKey,
524
+ };
525
+ if (context === 'buildingBlock') {
526
+ return this.formFlowService.updateBuildingBlockFormFlowDefinition(params.caseDefinitionKey, params.caseDefinitionVersionTag, params.formFlowDefinitionKey, updatedDefinition);
527
+ }
528
+ return this.formFlowService.updateFormFlowDefinition(params.caseDefinitionKey, params.caseDefinitionVersionTag, params.formFlowDefinitionKey, updatedDefinition);
529
+ }), finalize(() => this.loading$.next(false)))
530
+ .subscribe(result => {
531
+ this.showSuccessMessage(result.key);
532
+ });
533
+ }
534
+ onDelete() {
535
+ this.loading$.next(true);
536
+ combineLatest([this._params$, this._context$])
537
+ .pipe(take(1), switchMap(([params, context]) => {
538
+ if (context === 'buildingBlock') {
539
+ return this.formFlowService.deleteBuildingBlockFormFlowDefinition(params.caseDefinitionKey, params.caseDefinitionVersionTag, params.formFlowDefinitionKey);
540
+ }
541
+ return this.formFlowService.deleteFormFlowDefinition(params.caseDefinitionKey, params.caseDefinitionVersionTag, params.formFlowDefinitionKey);
542
+ }))
543
+ .subscribe(() => {
544
+ this.router.navigate(['../'], { relativeTo: this.route });
545
+ });
546
+ }
547
+ showDeleteModal() {
548
+ this.showDeleteModal$.next(true);
549
+ }
550
+ downloadFormFlowDefinition(model) {
551
+ this._params$
552
+ .pipe(take(1))
553
+ .subscribe((params) => this.formFlowDownloadService.downloadJson(JSON.parse(model.value), params));
554
+ }
555
+ navigateBack() {
556
+ this.router.navigate(['../'], { relativeTo: this.route });
557
+ }
558
+ getEditorModel(formFlowDefinition) {
559
+ const clone = { ...formFlowDefinition };
560
+ delete clone.readOnly;
561
+ return {
562
+ value: JSON.stringify(clone),
563
+ language: 'json',
564
+ };
565
+ }
566
+ showSuccessMessage(formFlowDefinitionKey) {
567
+ this.notificationService.showToast({
568
+ caption: this.translateService.instant('formFlow.savedSuccessTitleMessage', {
569
+ key: formFlowDefinitionKey,
570
+ }),
571
+ type: 'success',
572
+ title: this.translateService.instant('formFlow.savedSuccessTitle'),
573
+ });
574
+ }
575
+ initBreadcrumbs(params, context) {
576
+ if (context === 'buildingBlock') {
577
+ const route = `/building-block-management/building-block/${params.caseDefinitionKey}/version/${params.caseDefinitionVersionTag}`;
578
+ const generalRoute = `${route}/general`;
579
+ this.breadcrumbService.setThirdBreadcrumb({
580
+ route: [generalRoute],
581
+ content: `${params.caseDefinitionKey} (${params.caseDefinitionVersionTag})`,
582
+ href: generalRoute,
583
+ });
584
+ const routeWithFormFlows = `${route}/form-flows`;
585
+ this.breadcrumbService.setFourthBreadcrumb({
586
+ route: [routeWithFormFlows],
587
+ content: this.translateService.instant('buildingBlockManagement.tabs.formFlows'),
588
+ href: routeWithFormFlows,
589
+ });
590
+ }
591
+ else {
592
+ const route = `/case-management/case/${params.caseDefinitionKey}/version/${params.caseDefinitionVersionTag}`;
593
+ this.breadcrumbService.setThirdBreadcrumb({
594
+ route: [route],
595
+ content: `${params.caseDefinitionKey} (${params.caseDefinitionVersionTag})`,
596
+ href: route,
597
+ });
598
+ const routeWithFormFlows = `${route}/form-flows`;
599
+ this.breadcrumbService.setFourthBreadcrumb({
600
+ route: [routeWithFormFlows],
601
+ content: this.translateService.instant('caseManagement.tabs.formFlows'),
602
+ href: routeWithFormFlows,
603
+ });
604
+ }
605
+ }
606
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormFlowEditorComponent, deps: [{ token: i1$2.BreadcrumbService }, { token: FormFlowDownloadService }, { token: FormFlowService }, { token: i3.IconService }, { token: i2.GlobalNotificationService }, { token: i1$2.PageHeaderService }, { token: i1$2.PageTitleService }, { token: i3$1.ActivatedRoute }, { token: i3$1.Router }, { token: i4.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
607
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: FormFlowEditorComponent, isStandalone: false, selector: "ng-component", ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n@if (model$ | async; as model) {\n <valtimo-editor\n [disabled]=\"(loading$ | async) === false && readOnly$ | async\"\n [model]=\"model\"\n [jsonSchema]=\"formFlowSchemaJson\"\n (validEvent)=\"onValid($event)\"\n (valueChangeEvent)=\"onValueChange($event)\"\n [fitPage]=\"true\"\n ></valtimo-editor>\n} @else {\n <cds-loading></cds-loading>\n}\n\n<ng-container renderInPageHeader>\n <ng-template>\n <div\n *ngIf=\"{\n compactMode: compactMode$ | async,\n valid: valid$ | async,\n readOnly: readOnly$ | async,\n model: model$ | async,\n } as obs\"\n class=\"buttons-container\"\n >\n <v-overflow-menu placement=\"bottom-end\">\n <v-overflow-menu-trigger overflowTrigger></v-overflow-menu-trigger>\n <v-overflow-menu-option\n [disabled]=\"!obs.valid && !obs.readOnly\"\n (selected)=\"downloadFormFlowDefinition(obs.model)\"\n >{{ 'interface.export' | translate }}\n </v-overflow-menu-option>\n\n <v-overflow-menu-option\n [disabled]=\"obs.readOnly\"\n type=\"danger\"\n (selected)=\"showDeleteModal()\"\n >{{ 'interface.delete' | translate }}\n </v-overflow-menu-option>\n </v-overflow-menu>\n\n <button cdsButton=\"secondary\" [size]=\"obs.compactMode ? 'sm' : 'md'\" (click)=\"navigateBack()\">\n {{ 'interface.back' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"arrow--left\" size=\"16\"></svg>\n </button>\n\n <button\n [disabled]=\"!obs.valid || obs.readOnly\"\n cdsButton=\"primary\"\n [size]=\"obs.compactMode ? 'sm' : 'md'\"\n (click)=\"updateFormFlowDefinition()\"\n >\n {{ 'interface.save' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"save\" size=\"16\"></svg>\n </button>\n </div>\n </ng-template>\n</ng-container>\n\n<valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"formFlow.deleteModalContent\"\n [showModalSubject$]=\"showDeleteModal$\"\n titleTranslationKey=\"interface.delete\"\n (confirmEvent)=\"onDelete()\"\n></valtimo-confirmation-modal>\n", styles: ["cds-loading{display:flex;justify-content:center}.buttons-container{display:flex;align-items:center;justify-self:flex-end;gap:16px}\n/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i3.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: i1$2.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "confirmButtonType", "showOptionalButton", "optionalButtonText", "optionalButtonTextTranslationKey", "optionalButtonType", "cancelButtonText", "cancelButtonTextTranslationKey", "cancelButtonType", "showModalSubject$", "outputOnConfirm", "outputOnOptional", "spacerAfterCancelButton"], outputs: ["confirmEvent", "optionalEvent", "cancelEvent"] }, { kind: "component", type: i1$2.EditorComponent, selector: "valtimo-editor", inputs: ["editorOptions", "model", "disabled", "formatOnLoad", "widthPx", "heightPx", "heightStyle", "jsonSchema", "fitPage", "fitPageSpaceAdjustment"], outputs: ["validEvent", "valueChangeEvent"] }, { kind: "directive", type: i1$2.RenderInPageHeaderDirective, selector: "[renderInPageHeader]", inputs: ["fullWidth"] }, { kind: "component", type: i3.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "component", type: i1$2.OverflowMenuComponent, selector: "v-overflow-menu", inputs: ["open", "placement", "menuWidth", "offsetX", "offsetY", "closeOnSelect", "useHostAsReference", "portalToBody"], outputs: ["openChange"] }, { kind: "component", type: i1$2.OverflowMenuOptionComponent, selector: "v-overflow-menu-option", inputs: ["disabled", "type", "testId", "optionId"], outputs: ["selected"] }, { kind: "component", type: i1$2.OverflowMenuTriggerComponent, selector: "v-overflow-menu-trigger", inputs: ["compact"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
608
+ }
609
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormFlowEditorComponent, decorators: [{
610
+ type: Component,
611
+ args: [{ standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n@if (model$ | async; as model) {\n <valtimo-editor\n [disabled]=\"(loading$ | async) === false && readOnly$ | async\"\n [model]=\"model\"\n [jsonSchema]=\"formFlowSchemaJson\"\n (validEvent)=\"onValid($event)\"\n (valueChangeEvent)=\"onValueChange($event)\"\n [fitPage]=\"true\"\n ></valtimo-editor>\n} @else {\n <cds-loading></cds-loading>\n}\n\n<ng-container renderInPageHeader>\n <ng-template>\n <div\n *ngIf=\"{\n compactMode: compactMode$ | async,\n valid: valid$ | async,\n readOnly: readOnly$ | async,\n model: model$ | async,\n } as obs\"\n class=\"buttons-container\"\n >\n <v-overflow-menu placement=\"bottom-end\">\n <v-overflow-menu-trigger overflowTrigger></v-overflow-menu-trigger>\n <v-overflow-menu-option\n [disabled]=\"!obs.valid && !obs.readOnly\"\n (selected)=\"downloadFormFlowDefinition(obs.model)\"\n >{{ 'interface.export' | translate }}\n </v-overflow-menu-option>\n\n <v-overflow-menu-option\n [disabled]=\"obs.readOnly\"\n type=\"danger\"\n (selected)=\"showDeleteModal()\"\n >{{ 'interface.delete' | translate }}\n </v-overflow-menu-option>\n </v-overflow-menu>\n\n <button cdsButton=\"secondary\" [size]=\"obs.compactMode ? 'sm' : 'md'\" (click)=\"navigateBack()\">\n {{ 'interface.back' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"arrow--left\" size=\"16\"></svg>\n </button>\n\n <button\n [disabled]=\"!obs.valid || obs.readOnly\"\n cdsButton=\"primary\"\n [size]=\"obs.compactMode ? 'sm' : 'md'\"\n (click)=\"updateFormFlowDefinition()\"\n >\n {{ 'interface.save' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"save\" size=\"16\"></svg>\n </button>\n </div>\n </ng-template>\n</ng-container>\n\n<valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"formFlow.deleteModalContent\"\n [showModalSubject$]=\"showDeleteModal$\"\n titleTranslationKey=\"interface.delete\"\n (confirmEvent)=\"onDelete()\"\n></valtimo-confirmation-modal>\n", styles: ["cds-loading{display:flex;justify-content:center}.buttons-container{display:flex;align-items:center;justify-self:flex-end;gap:16px}\n/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
612
+ }], ctorParameters: () => [{ type: i1$2.BreadcrumbService }, { type: FormFlowDownloadService }, { type: FormFlowService }, { type: i3.IconService }, { type: i2.GlobalNotificationService }, { type: i1$2.PageHeaderService }, { type: i1$2.PageTitleService }, { type: i3$1.ActivatedRoute }, { type: i3$1.Router }, { type: i4.TranslateService }] });
613
+
614
+ /*
615
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
616
+ *
617
+ * Licensed under EUPL, Version 1.2 (the "License");
618
+ * you may not use this file except in compliance with the License.
619
+ * You may obtain a copy of the License at
620
+ *
621
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
622
+ *
623
+ * Unless required by applicable law or agreed to in writing, software
624
+ * distributed under the License is distributed on an "AS IS" basis,
625
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
626
+ * See the License for the specific language governing permissions and
627
+ * limitations under the License.
628
+ */
629
+ class DeleteFormFlowModalComponent {
630
+ constructor() {
631
+ this.deleteEvent = new EventEmitter();
632
+ }
633
+ onDelete(formFlowDefinitionKey) {
634
+ this.deleteEvent.emit(formFlowDefinitionKey);
635
+ }
636
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: DeleteFormFlowModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
637
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: DeleteFormFlowModalComponent, isStandalone: false, selector: "valtimo-delete-form-flow-modal", inputs: { deleteFormFlowDefinitionKey: "deleteFormFlowDefinitionKey", showDeleteModal$: "showDeleteModal$" }, outputs: { deleteEvent: "deleteEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"formFlow.deleteModalContent\"\n [outputOnConfirm]=\"deleteFormFlowDefinitionKey\"\n [showModalSubject$]=\"showDeleteModal$\"\n titleTranslationKey=\"interface.delete\"\n (confirmEvent)=\"onDelete($event)\"\n></valtimo-confirmation-modal>\n", dependencies: [{ kind: "component", type: i1$2.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "confirmButtonType", "showOptionalButton", "optionalButtonText", "optionalButtonTextTranslationKey", "optionalButtonType", "cancelButtonText", "cancelButtonTextTranslationKey", "cancelButtonType", "showModalSubject$", "outputOnConfirm", "outputOnOptional", "spacerAfterCancelButton"], outputs: ["confirmEvent", "optionalEvent", "cancelEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
638
+ }
639
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: DeleteFormFlowModalComponent, decorators: [{
640
+ type: Component,
641
+ args: [{ standalone: false, selector: 'valtimo-delete-form-flow-modal', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"formFlow.deleteModalContent\"\n [outputOnConfirm]=\"deleteFormFlowDefinitionKey\"\n [showModalSubject$]=\"showDeleteModal$\"\n titleTranslationKey=\"interface.delete\"\n (confirmEvent)=\"onDelete($event)\"\n></valtimo-confirmation-modal>\n" }]
642
+ }], propDecorators: { deleteFormFlowDefinitionKey: [{
643
+ type: Input
644
+ }], showDeleteModal$: [{
645
+ type: Input
646
+ }], deleteEvent: [{
647
+ type: Output
648
+ }] } });
649
+
650
+ /*
651
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
652
+ *
653
+ * Licensed under EUPL, Version 1.2 (the "License");
654
+ * you may not use this file except in compliance with the License.
655
+ * You may obtain a copy of the License at
656
+ *
657
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
658
+ *
659
+ * Unless required by applicable law or agreed to in writing, software
660
+ * distributed under the License is distributed on an "AS IS" basis,
661
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
662
+ * See the License for the specific language governing permissions and
663
+ * limitations under the License.
664
+ */
665
+ class FormFlowManagementModule {
666
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormFlowManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
667
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: FormFlowManagementModule, declarations: [FormFlowOverviewComponent,
668
+ FormFlowEditorComponent,
669
+ DeleteFormFlowModalComponent], imports: [CommonModule,
670
+ ButtonModule,
671
+ FormsModule,
672
+ ModalModule,
673
+ TranslateModule,
674
+ ReactiveFormsModule,
675
+ InputModule,
676
+ IconModule,
677
+ ConfirmationModalModule,
678
+ EditorModule,
679
+ RenderInPageHeaderDirective,
680
+ LoadingModule,
681
+ IconModule,
682
+ OverflowMenuComponent,
683
+ OverflowMenuOptionComponent,
684
+ OverflowMenuTriggerComponent,
685
+ NotificationModule,
686
+ CarbonListModule,
687
+ DropdownModule,
688
+ ConfirmationModalModule,
689
+ NewFormFlowModalComponent] }); }
690
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormFlowManagementModule, imports: [CommonModule,
691
+ ButtonModule,
692
+ FormsModule,
693
+ ModalModule,
694
+ TranslateModule,
695
+ ReactiveFormsModule,
696
+ InputModule,
697
+ IconModule,
698
+ ConfirmationModalModule,
699
+ EditorModule,
700
+ LoadingModule,
701
+ IconModule,
702
+ OverflowMenuComponent,
703
+ OverflowMenuOptionComponent,
704
+ OverflowMenuTriggerComponent,
705
+ NotificationModule,
706
+ CarbonListModule,
707
+ DropdownModule,
708
+ ConfirmationModalModule,
709
+ NewFormFlowModalComponent] }); }
710
+ }
711
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FormFlowManagementModule, decorators: [{
712
+ type: NgModule,
713
+ args: [{
714
+ declarations: [
715
+ FormFlowOverviewComponent,
716
+ FormFlowEditorComponent,
717
+ DeleteFormFlowModalComponent,
718
+ ],
719
+ imports: [
720
+ CommonModule,
721
+ ButtonModule,
722
+ FormsModule,
723
+ ModalModule,
724
+ TranslateModule,
725
+ ReactiveFormsModule,
726
+ InputModule,
727
+ IconModule,
728
+ ConfirmationModalModule,
729
+ EditorModule,
730
+ RenderInPageHeaderDirective,
731
+ LoadingModule,
732
+ IconModule,
733
+ OverflowMenuComponent,
734
+ OverflowMenuOptionComponent,
735
+ OverflowMenuTriggerComponent,
736
+ NotificationModule,
737
+ CarbonListModule,
738
+ DropdownModule,
739
+ ConfirmationModalModule,
740
+ NewFormFlowModalComponent,
741
+ ],
742
+ }]
743
+ }] });
744
+
745
+ /*
746
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
747
+ *
748
+ * Licensed under EUPL, Version 1.2 (the "License");
749
+ * you may not use this file except in compliance with the License.
750
+ * You may obtain a copy of the License at
751
+ *
752
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
753
+ *
754
+ * Unless required by applicable law or agreed to in writing, software
755
+ * distributed under the License is distributed on an "AS IS" basis,
756
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
757
+ * See the License for the specific language governing permissions and
758
+ * limitations under the License.
759
+ */
760
+ /*
761
+ * Public API Surface of form-flow
762
+ */
763
+
764
+ /**
765
+ * Generated bundle index. Do not edit.
766
+ */
767
+
768
+ export { FormFlowEditorComponent, FormFlowManagementModule, FormFlowOverviewComponent, FormFlowService, NewFormFlowModalComponent };
769
+ //# sourceMappingURL=valtimo-form-flow-management.mjs.map