@valtimo/form-flow-management 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/README.md +33 -0
  2. package/fesm2022/valtimo-form-flow-management.mjs +696 -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 +128 -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 +51 -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 +10 -0
  20. package/lib/services/form-flow-download.service.d.ts.map +1 -0
  21. package/lib/services/form-flow.service.d.ts +18 -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 +6 -0
  27. package/public-api.d.ts.map +1 -0
  28. package/valtimo-form-flow-management.d.ts.map +1 -0
@@ -0,0 +1,696 @@
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 } from '@valtimo/shared';
5
+ import * as i1 from '@angular/common/http';
6
+ import * as i1$2 from '@valtimo/components';
7
+ import { CARBON_CONSTANTS, ViewType, CarbonListComponent, ConfirmationModalModule, EditorModule, RenderInPageHeaderDirective, CarbonListModule } from '@valtimo/components';
8
+ import { BehaviorSubject, combineLatest, tap, switchMap, of, map, take, finalize } from 'rxjs';
9
+ import * as i3 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 i2$1 from 'carbon-components-angular';
15
+ import { ButtonModule, ModalModule, InputModule, IconModule, LoadingModule, DialogModule, NotificationModule, DropdownModule } from 'carbon-components-angular';
16
+ import * as i1$1 from '@angular/forms';
17
+ import { Validators, FormsModule, ReactiveFormsModule } 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
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FormFlowService, deps: [{ token: i1.HttpClient }, { token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
74
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FormFlowService, providedIn: 'root' }); }
75
+ }
76
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FormFlowService, decorators: [{
77
+ type: Injectable,
78
+ args: [{
79
+ providedIn: 'root',
80
+ }]
81
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.ConfigService }] });
82
+
83
+ /*
84
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
85
+ *
86
+ * Licensed under EUPL, Version 1.2 (the "License");
87
+ * you may not use this file except in compliance with the License.
88
+ * You may obtain a copy of the License at
89
+ *
90
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
91
+ *
92
+ * Unless required by applicable law or agreed to in writing, software
93
+ * distributed under the License is distributed on an "AS IS" basis,
94
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
95
+ * See the License for the specific language governing permissions and
96
+ * limitations under the License.
97
+ */
98
+
99
+ /*
100
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
101
+ *
102
+ * Licensed under EUPL, Version 1.2 (the "License");
103
+ * you may not use this file except in compliance with the License.
104
+ * You may obtain a copy of the License at
105
+ *
106
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
107
+ *
108
+ * Unless required by applicable law or agreed to in writing, software
109
+ * distributed under the License is distributed on an "AS IS" basis,
110
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
111
+ * See the License for the specific language governing permissions and
112
+ * limitations under the License.
113
+ */
114
+ class NewFormFlowModalComponent {
115
+ get key() {
116
+ return this.form?.get('key');
117
+ }
118
+ constructor(fb) {
119
+ this.fb = fb;
120
+ this.open = false;
121
+ this.closeEvent = new EventEmitter();
122
+ this.form = this.fb.group({
123
+ key: this.fb.control('', Validators.required),
124
+ });
125
+ }
126
+ onCancel() {
127
+ this.closeEvent.emit(null);
128
+ this.resetForm();
129
+ }
130
+ onConfirm() {
131
+ if (!this.key) {
132
+ return;
133
+ }
134
+ this.closeEvent.emit({
135
+ key: this.key.value ?? '',
136
+ startStep: 'start-step',
137
+ steps: [],
138
+ });
139
+ this.resetForm();
140
+ }
141
+ resetForm() {
142
+ setTimeout(() => {
143
+ this.form.reset();
144
+ }, CARBON_CONSTANTS.modalAnimationMs);
145
+ }
146
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: NewFormFlowModalComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
147
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: NewFormFlowModalComponent, isStandalone: false, 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=\"ghost\" (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: "directive", type: i2$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { 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: "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: 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: "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: "pipe", type: i4.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
148
+ }
149
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: NewFormFlowModalComponent, decorators: [{
150
+ type: Component,
151
+ args: [{ standalone: false, selector: 'valtimo-new-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<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=\"ghost\" (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" }]
152
+ }], ctorParameters: () => [{ type: i1$1.FormBuilder }], propDecorators: { open: [{
153
+ type: Input
154
+ }], closeEvent: [{
155
+ type: Output
156
+ }] } });
157
+
158
+ /*
159
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
160
+ *
161
+ * Licensed under EUPL, Version 1.2 (the "License");
162
+ * you may not use this file except in compliance with the License.
163
+ * You may obtain a copy of the License at
164
+ *
165
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
166
+ *
167
+ * Unless required by applicable law or agreed to in writing, software
168
+ * distributed under the License is distributed on an "AS IS" basis,
169
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
170
+ * See the License for the specific language governing permissions and
171
+ * limitations under the License.
172
+ */
173
+ class FormFlowOverviewComponent {
174
+ constructor(formFlowService, globalNotificationService, route, router, translateService, editPermissionsService) {
175
+ this.formFlowService = formFlowService;
176
+ this.globalNotificationService = globalNotificationService;
177
+ this.route = route;
178
+ this.router = router;
179
+ this.translateService = translateService;
180
+ this.editPermissionsService = editPermissionsService;
181
+ this.FIELDS = [
182
+ {
183
+ viewType: ViewType.TEXT,
184
+ key: 'key',
185
+ label: 'formFlow.key',
186
+ },
187
+ {
188
+ viewType: ViewType.TEXT,
189
+ key: 'versions.0',
190
+ label: 'formFlow.version',
191
+ },
192
+ {
193
+ viewType: ViewType.BOOLEAN,
194
+ key: 'readOnly',
195
+ label: 'formFlow.readOnly',
196
+ },
197
+ ];
198
+ this.ACTION_ITEMS = [
199
+ {
200
+ callback: this.editFormFlowDetails.bind(this),
201
+ label: 'interface.edit',
202
+ },
203
+ {
204
+ callback: this.deleteFormFlow.bind(this),
205
+ label: 'interface.delete',
206
+ type: 'danger',
207
+ },
208
+ ];
209
+ this.loading$ = new BehaviorSubject(true);
210
+ this.showDeleteModal$ = new BehaviorSubject(false);
211
+ this.deleteDefinitionKey$ = new BehaviorSubject(null);
212
+ this._params = undefined;
213
+ this._refresh$ = new BehaviorSubject(null);
214
+ this.formFlowDefinitions$ = combineLatest([
215
+ getCaseManagementRouteParams(this.route),
216
+ this._refresh$,
217
+ ]).pipe(tap(([params]) => {
218
+ this.loading$.next(true);
219
+ this._params = params;
220
+ }), switchMap(([params]) => !params
221
+ ? of(null)
222
+ : this.formFlowService.getFormFlowDefinitions(params.caseDefinitionKey, params.caseDefinitionVersionTag)), map((formFlows) => {
223
+ this.loading$.next(false);
224
+ return !formFlows ? [] : formFlows.content;
225
+ }));
226
+ this.showAddModal$ = new BehaviorSubject(false);
227
+ this.params$ = getCaseManagementRouteParams(this.route);
228
+ this.hasEditPermissions$ = this.params$.pipe(switchMap(params => this.editPermissionsService.hasEditPermissions(params?.caseDefinitionKey, params?.caseDefinitionVersionTag)));
229
+ }
230
+ openAddModal() {
231
+ this.showAddModal$.next(true);
232
+ }
233
+ onAdd(formFlowDefinition) {
234
+ this.showAddModal$.next(false);
235
+ if (!formFlowDefinition || !this._params)
236
+ return;
237
+ this.formFlowService
238
+ .createFormFlowDefinition(this._params.caseDefinitionKey, this._params.caseDefinitionVersionTag, formFlowDefinition)
239
+ .subscribe((formFlowDefinition) => {
240
+ this.showAddModal$.next(false);
241
+ this.router.navigate([formFlowDefinition.key], { relativeTo: this.route });
242
+ });
243
+ }
244
+ editFormFlowDetails(formFlowDefinition) {
245
+ this.router.navigate([formFlowDefinition.key], { relativeTo: this.route });
246
+ }
247
+ deleteFormFlow(item) {
248
+ this.deleteDefinitionKey$.next(item.key);
249
+ this.showDeleteModal$.next(true);
250
+ }
251
+ onDelete(definitionKey) {
252
+ if (!this._params)
253
+ return;
254
+ this.formFlowService
255
+ .deleteFormFlowDefinition(this._params.caseDefinitionKey, this._params.caseDefinitionVersionTag, definitionKey)
256
+ .subscribe(() => {
257
+ this.globalNotificationService.showToast({
258
+ title: this.translateService.instant('interface.delete'),
259
+ caption: this.translateService.instant('formFlow.deletedSuccessfully', {
260
+ key: definitionKey,
261
+ }),
262
+ type: 'success',
263
+ });
264
+ this._refresh$.next(null);
265
+ });
266
+ }
267
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FormFlowOverviewComponent, deps: [{ token: FormFlowService }, { token: i2.GlobalNotificationService }, { token: i3.ActivatedRoute }, { token: i3.Router }, { token: i4.TranslateService }, { token: i2.EditPermissionsService }], target: i0.ɵɵFactoryTarget.Component }); }
268
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", 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: i2$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i2$1.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", "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 }); }
269
+ }
270
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FormFlowOverviewComponent, decorators: [{
271
+ type: Component,
272
+ 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" }]
273
+ }], ctorParameters: () => [{ type: FormFlowService }, { type: i2.GlobalNotificationService }, { type: i3.ActivatedRoute }, { type: i3.Router }, { type: i4.TranslateService }, { type: i2.EditPermissionsService }], propDecorators: { carbonList: [{
274
+ type: ViewChild,
275
+ args: [CarbonListComponent]
276
+ }] } });
277
+
278
+ var $schema = "http://json-schema.org/draft-07/schema#";
279
+ var $id = "formflow.schema";
280
+ var title = "Form flow definition";
281
+ var description = "Representation of a form flow definition";
282
+ var type = "object";
283
+ var properties = {
284
+ startStep: {
285
+ type: "string",
286
+ description: "This must contain the key of the first step of the form flow"
287
+ },
288
+ steps: {
289
+ type: "array",
290
+ description: "This array should contain all the possible steps of the form flow",
291
+ items: {
292
+ type: "object",
293
+ properties: {
294
+ key: {
295
+ type: "string",
296
+ description: "The identifying human readable key of the step"
297
+ },
298
+ type: {
299
+ type: "object",
300
+ description: "The type of form that should be displayed",
301
+ properties: {
302
+ name: {
303
+ type: "string",
304
+ description: "This defines the type of the step, for instance: 'form'"
305
+ },
306
+ properties: {
307
+ type: "object",
308
+ description: "This object holds additional properties for the specified type"
309
+ }
310
+ },
311
+ required: [
312
+ "name",
313
+ "properties"
314
+ ]
315
+ },
316
+ onOpen: {
317
+ type: "array",
318
+ description: "An array of expressions which are executed in order when opening the step",
319
+ items: {
320
+ type: "string",
321
+ description: "An expression that is executed when opening the step"
322
+ }
323
+ },
324
+ onComplete: {
325
+ type: "array",
326
+ description: "An array of expressions which are executed in order when completing the step",
327
+ items: {
328
+ type: "string",
329
+ description: "An expression that is executed when completing the step"
330
+ }
331
+ },
332
+ nextSteps: {
333
+ type: "array",
334
+ 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",
335
+ items: {
336
+ type: "object",
337
+ properties: {
338
+ step: {
339
+ type: "string",
340
+ title: "The key of the next step. This should match one of the keys in the steps array"
341
+ },
342
+ condition: {
343
+ type: [
344
+ "string",
345
+ "null"
346
+ ],
347
+ 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."
348
+ }
349
+ },
350
+ required: [
351
+ "step"
352
+ ]
353
+ }
354
+ }
355
+ },
356
+ required: [
357
+ "key",
358
+ "type"
359
+ ]
360
+ },
361
+ minItems: 0,
362
+ uniqueItems: true
363
+ }
364
+ };
365
+ var required = [
366
+ "startStep",
367
+ "steps"
368
+ ];
369
+ var formFlowSchemaJson = {
370
+ $schema: $schema,
371
+ $id: $id,
372
+ title: title,
373
+ description: description,
374
+ type: type,
375
+ properties: properties,
376
+ required: required
377
+ };
378
+
379
+ /*
380
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
381
+ *
382
+ * Licensed under EUPL, Version 1.2 (the "License");
383
+ * you may not use this file except in compliance with the License.
384
+ * You may obtain a copy of the License at
385
+ *
386
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
387
+ *
388
+ * Unless required by applicable law or agreed to in writing, software
389
+ * distributed under the License is distributed on an "AS IS" basis,
390
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
391
+ * See the License for the specific language governing permissions and
392
+ * limitations under the License.
393
+ */
394
+ class FormFlowDownloadService {
395
+ downloadJson(json, params) {
396
+ const sJson = JSON.stringify(json, null, 2);
397
+ const element = document.createElement('a');
398
+ element.setAttribute('href', 'data:text/json;charset=UTF-8,' + encodeURIComponent(sJson));
399
+ element.setAttribute('download', `${params.caseDefinitionKey}-${params.caseDefinitionVersionTag}-${params.formFlowDefinitionKey}.formflow.json`);
400
+ element.style.display = 'none';
401
+ document.body.appendChild(element);
402
+ element.click(); // simulate click
403
+ document.body.removeChild(element);
404
+ }
405
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FormFlowDownloadService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
406
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FormFlowDownloadService, providedIn: 'root' }); }
407
+ }
408
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FormFlowDownloadService, decorators: [{
409
+ type: Injectable,
410
+ args: [{ providedIn: 'root' }]
411
+ }] });
412
+
413
+ /*
414
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
415
+ *
416
+ * Licensed under EUPL, Version 1.2 (the "License");
417
+ * you may not use this file except in compliance with the License.
418
+ * You may obtain a copy of the License at
419
+ *
420
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
421
+ *
422
+ * Unless required by applicable law or agreed to in writing, software
423
+ * distributed under the License is distributed on an "AS IS" basis,
424
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
425
+ * See the License for the specific language governing permissions and
426
+ * limitations under the License.
427
+ */
428
+ class FormFlowEditorComponent {
429
+ constructor(breadcrumbService, formFlowDownloadService, formFlowService, iconService, notificationService, pageHeaderService, pageTitleService, route, router, translateService) {
430
+ this.breadcrumbService = breadcrumbService;
431
+ this.formFlowDownloadService = formFlowDownloadService;
432
+ this.formFlowService = formFlowService;
433
+ this.iconService = iconService;
434
+ this.notificationService = notificationService;
435
+ this.pageHeaderService = pageHeaderService;
436
+ this.pageTitleService = pageTitleService;
437
+ this.route = route;
438
+ this.router = router;
439
+ this.translateService = translateService;
440
+ this.readOnly$ = new BehaviorSubject(false);
441
+ this.valid$ = new BehaviorSubject(false);
442
+ this.loading$ = new BehaviorSubject(true);
443
+ this.showDeleteModal$ = new BehaviorSubject(false);
444
+ this.formFlowDefinitionId$ = new BehaviorSubject(null);
445
+ this.CARBON_THEME = 'g10';
446
+ this._params$ = combineLatest([
447
+ getCaseManagementRouteParams(this.route),
448
+ this.route.params,
449
+ ]).pipe(map(([caseManagementParams, params]) => ({
450
+ ...(caseManagementParams ?? { caseDefinitionKey: '', caseDefinitionVersionTag: '' }),
451
+ ...params,
452
+ })));
453
+ this.formFlowSchemaJson = formFlowSchemaJson;
454
+ this._formFlowDefinition2$ = this._params$.pipe(tap(() => this.loading$.next(true)), switchMap((params) => {
455
+ this.initBreadcrumbs(params);
456
+ return this.formFlowService.getFormFlowDefinitionByKey(params.caseDefinitionKey, params.caseDefinitionVersionTag, params.formFlowDefinitionKey);
457
+ }), tap((formFlowDefinition) => {
458
+ this.pageTitleService.setCustomPageTitle(formFlowDefinition.key);
459
+ this.readOnly$.next(formFlowDefinition.readOnly === true);
460
+ this.loading$.next(false);
461
+ }));
462
+ this.model$ = this._formFlowDefinition2$.pipe(map((formFlowDefinition) => this.getEditorModel(formFlowDefinition)));
463
+ this._updatedModelValue$ = new BehaviorSubject('');
464
+ this.compactMode$ = this.pageHeaderService.compactMode$;
465
+ this.iconService.registerAll([ArrowLeft16]);
466
+ this.pageTitleService.disableReset();
467
+ }
468
+ ngOnDestroy() {
469
+ this.pageTitleService.enableReset();
470
+ this.breadcrumbService.clearThirdBreadcrumb();
471
+ this.breadcrumbService.clearFourthBreadcrumb();
472
+ }
473
+ onValid(valid) {
474
+ this.valid$.next(valid);
475
+ }
476
+ onValueChange(value) {
477
+ this._updatedModelValue$.next(value);
478
+ }
479
+ updateFormFlowDefinition() {
480
+ this.loading$.next(true);
481
+ combineLatest([this._params$, this._updatedModelValue$])
482
+ .pipe(take(1), switchMap(([params, updatedModelValue]) => this.formFlowService.updateFormFlowDefinition(params.caseDefinitionKey, params.caseDefinitionVersionTag, params.formFlowDefinitionKey, {
483
+ ...JSON.parse(updatedModelValue),
484
+ key: params.formFlowDefinitionKey,
485
+ })), finalize(() => this.loading$.next(false)))
486
+ .subscribe(result => {
487
+ this.showSuccessMessage(result.key);
488
+ });
489
+ }
490
+ onDelete() {
491
+ this.loading$.next(true);
492
+ this._params$
493
+ .pipe(take(1), switchMap((params) => this.formFlowService.deleteFormFlowDefinition(params.caseDefinitionKey, params.caseDefinitionVersionTag, params.formFlowDefinitionKey)))
494
+ .subscribe(() => {
495
+ this.router.navigate(['../'], { relativeTo: this.route });
496
+ });
497
+ }
498
+ showDeleteModal() {
499
+ this.showDeleteModal$.next(true);
500
+ }
501
+ downloadFormFlowDefinition(model) {
502
+ this._params$
503
+ .pipe(take(1))
504
+ .subscribe((params) => this.formFlowDownloadService.downloadJson(JSON.parse(model.value), params));
505
+ }
506
+ navigateBack() {
507
+ this.router.navigate(['../'], { relativeTo: this.route });
508
+ }
509
+ getEditorModel(formFlowDefinition) {
510
+ const clone = { ...formFlowDefinition };
511
+ delete clone.readOnly;
512
+ return {
513
+ value: JSON.stringify(clone),
514
+ language: 'json',
515
+ };
516
+ }
517
+ showSuccessMessage(formFlowDefinitionKey) {
518
+ this.notificationService.showToast({
519
+ caption: this.translateService.instant('formFlow.savedSuccessTitleMessage', {
520
+ key: formFlowDefinitionKey,
521
+ }),
522
+ type: 'success',
523
+ title: this.translateService.instant('formFlow.savedSuccessTitle'),
524
+ });
525
+ }
526
+ initBreadcrumbs(params) {
527
+ const route = `/case-management/case/${params.caseDefinitionKey}/version/${params.caseDefinitionVersionTag}`;
528
+ this.breadcrumbService.setThirdBreadcrumb({
529
+ route: [route],
530
+ content: `${params.caseDefinitionKey} (${params.caseDefinitionVersionTag})`,
531
+ href: route,
532
+ });
533
+ const routeWithFormFlows = `${route}/form-flows`;
534
+ this.breadcrumbService.setFourthBreadcrumb({
535
+ route: [routeWithFormFlows],
536
+ content: this.translateService.instant('caseManagement.tabs.formFlows'),
537
+ href: routeWithFormFlows,
538
+ });
539
+ }
540
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FormFlowEditorComponent, deps: [{ token: i1$2.BreadcrumbService }, { token: FormFlowDownloadService }, { token: FormFlowService }, { token: i2$1.IconService }, { token: i2.GlobalNotificationService }, { token: i1$2.PageHeaderService }, { token: i1$2.PageTitleService }, { token: i3.ActivatedRoute }, { token: i3.Router }, { token: i4.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
541
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", 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 <cds-overflow-menu>\n <cds-overflow-menu-option\n [disabled]=\"!obs.valid && !obs.readOnly\"\n (selected)=\"downloadFormFlowDefinition(obs.model)\"\n >{{ 'interface.export' | translate }}\n </cds-overflow-menu-option>\n\n <cds-overflow-menu-option\n [disabled]=\"obs.readOnly\"\n type=\"danger\"\n (selected)=\"showDeleteModal()\"\n >{{ 'interface.delete' | translate }}\n </cds-overflow-menu-option>\n </cds-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: i2$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i2$1.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: i2$1.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "component", type: i2$1.OverflowMenu, selector: "cds-overflow-menu, ibm-overflow-menu", inputs: ["buttonLabel", "description", "flip", "placement", "open", "customTrigger", "offset", "wrapperClass", "triggerClass"], outputs: ["openChange"] }, { kind: "component", type: i2$1.OverflowMenuOption, selector: "cds-overflow-menu-option, ibm-overflow-menu-option", inputs: ["divider", "type", "disabled", "href", "target", "innerClass"], outputs: ["selected"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
542
+ }
543
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FormFlowEditorComponent, decorators: [{
544
+ type: Component,
545
+ 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 <cds-overflow-menu>\n <cds-overflow-menu-option\n [disabled]=\"!obs.valid && !obs.readOnly\"\n (selected)=\"downloadFormFlowDefinition(obs.model)\"\n >{{ 'interface.export' | translate }}\n </cds-overflow-menu-option>\n\n <cds-overflow-menu-option\n [disabled]=\"obs.readOnly\"\n type=\"danger\"\n (selected)=\"showDeleteModal()\"\n >{{ 'interface.delete' | translate }}\n </cds-overflow-menu-option>\n </cds-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"] }]
546
+ }], ctorParameters: () => [{ type: i1$2.BreadcrumbService }, { type: FormFlowDownloadService }, { type: FormFlowService }, { type: i2$1.IconService }, { type: i2.GlobalNotificationService }, { type: i1$2.PageHeaderService }, { type: i1$2.PageTitleService }, { type: i3.ActivatedRoute }, { type: i3.Router }, { type: i4.TranslateService }] });
547
+
548
+ /*
549
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
550
+ *
551
+ * Licensed under EUPL, Version 1.2 (the "License");
552
+ * you may not use this file except in compliance with the License.
553
+ * You may obtain a copy of the License at
554
+ *
555
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
556
+ *
557
+ * Unless required by applicable law or agreed to in writing, software
558
+ * distributed under the License is distributed on an "AS IS" basis,
559
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
560
+ * See the License for the specific language governing permissions and
561
+ * limitations under the License.
562
+ */
563
+ class DeleteFormFlowModalComponent {
564
+ constructor() {
565
+ this.deleteEvent = new EventEmitter();
566
+ }
567
+ onDelete(formFlowDefinitionKey) {
568
+ this.deleteEvent.emit(formFlowDefinitionKey);
569
+ }
570
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DeleteFormFlowModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
571
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", 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 }); }
572
+ }
573
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DeleteFormFlowModalComponent, decorators: [{
574
+ type: Component,
575
+ 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" }]
576
+ }], propDecorators: { deleteFormFlowDefinitionKey: [{
577
+ type: Input
578
+ }], showDeleteModal$: [{
579
+ type: Input
580
+ }], deleteEvent: [{
581
+ type: Output
582
+ }] } });
583
+
584
+ /*
585
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
586
+ *
587
+ * Licensed under EUPL, Version 1.2 (the "License");
588
+ * you may not use this file except in compliance with the License.
589
+ * You may obtain a copy of the License at
590
+ *
591
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
592
+ *
593
+ * Unless required by applicable law or agreed to in writing, software
594
+ * distributed under the License is distributed on an "AS IS" basis,
595
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
596
+ * See the License for the specific language governing permissions and
597
+ * limitations under the License.
598
+ */
599
+ class FormFlowManagementModule {
600
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FormFlowManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
601
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: FormFlowManagementModule, declarations: [FormFlowOverviewComponent,
602
+ NewFormFlowModalComponent,
603
+ FormFlowEditorComponent,
604
+ DeleteFormFlowModalComponent], imports: [CommonModule,
605
+ ButtonModule,
606
+ FormsModule,
607
+ ModalModule,
608
+ TranslateModule,
609
+ ReactiveFormsModule,
610
+ InputModule,
611
+ IconModule,
612
+ ConfirmationModalModule,
613
+ EditorModule,
614
+ RenderInPageHeaderDirective,
615
+ LoadingModule,
616
+ IconModule,
617
+ DialogModule,
618
+ NotificationModule,
619
+ CarbonListModule,
620
+ DropdownModule,
621
+ ConfirmationModalModule] }); }
622
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FormFlowManagementModule, imports: [CommonModule,
623
+ ButtonModule,
624
+ FormsModule,
625
+ ModalModule,
626
+ TranslateModule,
627
+ ReactiveFormsModule,
628
+ InputModule,
629
+ IconModule,
630
+ ConfirmationModalModule,
631
+ EditorModule,
632
+ LoadingModule,
633
+ IconModule,
634
+ DialogModule,
635
+ NotificationModule,
636
+ CarbonListModule,
637
+ DropdownModule,
638
+ ConfirmationModalModule] }); }
639
+ }
640
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FormFlowManagementModule, decorators: [{
641
+ type: NgModule,
642
+ args: [{
643
+ declarations: [
644
+ FormFlowOverviewComponent,
645
+ NewFormFlowModalComponent,
646
+ FormFlowEditorComponent,
647
+ DeleteFormFlowModalComponent,
648
+ ],
649
+ imports: [
650
+ CommonModule,
651
+ ButtonModule,
652
+ FormsModule,
653
+ ModalModule,
654
+ TranslateModule,
655
+ ReactiveFormsModule,
656
+ InputModule,
657
+ IconModule,
658
+ ConfirmationModalModule,
659
+ EditorModule,
660
+ RenderInPageHeaderDirective,
661
+ LoadingModule,
662
+ IconModule,
663
+ DialogModule,
664
+ NotificationModule,
665
+ CarbonListModule,
666
+ DropdownModule,
667
+ ConfirmationModalModule,
668
+ ],
669
+ }]
670
+ }] });
671
+
672
+ /*
673
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
674
+ *
675
+ * Licensed under EUPL, Version 1.2 (the "License");
676
+ * you may not use this file except in compliance with the License.
677
+ * You may obtain a copy of the License at
678
+ *
679
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
680
+ *
681
+ * Unless required by applicable law or agreed to in writing, software
682
+ * distributed under the License is distributed on an "AS IS" basis,
683
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
684
+ * See the License for the specific language governing permissions and
685
+ * limitations under the License.
686
+ */
687
+ /*
688
+ * Public API Surface of form-flow
689
+ */
690
+
691
+ /**
692
+ * Generated bundle index. Do not edit.
693
+ */
694
+
695
+ export { FormFlowEditorComponent, FormFlowManagementModule, FormFlowOverviewComponent, FormFlowService };
696
+ //# sourceMappingURL=valtimo-form-flow-management.mjs.map