@valtimo-plugins/freemarker 7.0.1 → 8.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 (29) hide show
  1. package/fesm2022/valtimo-plugins-freemarker.mjs +1257 -240
  2. package/fesm2022/valtimo-plugins-freemarker.mjs.map +1 -1
  3. package/lib/models/freemarker-template.d.ts +9 -6
  4. package/lib/plugins/document-generator/assets/document-generator-plugin-logo.d.ts +2 -0
  5. package/lib/plugins/document-generator/assets/index.d.ts +1 -0
  6. package/lib/plugins/document-generator/components/document-generator-configuration/document-generator-configuration.component.d.ts +25 -0
  7. package/lib/plugins/document-generator/components/document-template-add-edit-modal/document-template-add-edit-modal.component.d.ts +36 -0
  8. package/lib/plugins/document-generator/components/document-template-delete-modal/document-template-delete-modal.component.d.ts +11 -0
  9. package/lib/plugins/document-generator/components/document-template-editor/document-template-editor.component.d.ts +53 -0
  10. package/lib/plugins/document-generator/components/document-template-list/document-template-list.component.d.ts +35 -0
  11. package/lib/plugins/document-generator/components/generate-csv/generate-csv.component.d.ts +32 -0
  12. package/lib/plugins/document-generator/components/generate-pdf/generate-pdf.component.d.ts +32 -0
  13. package/lib/plugins/document-generator/document-generator-management-routing.module.d.ts +8 -0
  14. package/lib/plugins/document-generator/document-generator-plugin-module.d.ts +16 -0
  15. package/lib/plugins/document-generator/document-generator-plugin.specification.d.ts +3 -0
  16. package/lib/plugins/document-generator/models/config.d.ts +13 -0
  17. package/lib/plugins/document-generator/models/index.d.ts +1 -0
  18. package/lib/plugins/mail-template/components/generate-mail-content/generate-mail-content.component.d.ts +8 -8
  19. package/lib/plugins/mail-template/components/generate-mail-file/generate-mail-file.component.d.ts +8 -8
  20. package/lib/plugins/mail-template/components/mail-template-delete-modal/mail-template-delete-modal.component.d.ts +1 -1
  21. package/lib/plugins/mail-template/components/mail-template-editor/mail-template-editor.component.d.ts +1 -1
  22. package/lib/plugins/mail-template/components/mail-template-list/mail-template-list.component.d.ts +2 -2
  23. package/lib/plugins/text-template/components/generate-text-file/generate-text-file.component.d.ts +8 -8
  24. package/lib/plugins/text-template/components/text-template-delete-modal/text-template-delete-modal.component.d.ts +1 -1
  25. package/lib/plugins/text-template/components/text-template-editor/text-template-editor.component.d.ts +1 -2
  26. package/lib/plugins/text-template/components/text-template-list/text-template-list.component.d.ts +2 -2
  27. package/lib/services/freemarker-template-management.service.d.ts +5 -2
  28. package/package.json +1 -1
  29. package/public_api.d.ts +10 -0
@@ -1,27 +1,1113 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Output, Input, Component, Injectable, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';
3
- import { BehaviorSubject, combineLatest, take, map, switchMap, of, tap, filter, startWith } from 'rxjs';
4
- import * as i4 from '@angular/common';
2
+ import { EventEmitter, Output, Input, Component, ChangeDetectionStrategy, Injectable, ViewChild, NgModule } from '@angular/core';
3
+ import { BehaviorSubject, combineLatest, take, map, filter, switchMap, startWith, tap, of, Subscription } from 'rxjs';
4
+ import * as i2 from '@angular/common';
5
5
  import { CommonModule } from '@angular/common';
6
- import * as i1 from '@valtimo/components';
7
- import { ConfirmationModalModule, CARBON_CONSTANTS, ViewType, CarbonListModule, CarbonListComponent, EditorModule, RenderInPageHeaderDirective, FormModule, ParagraphModule, SelectModule, InputModule as InputModule$1 } from '@valtimo/components';
8
- import * as i6 from '@valtimo/plugin';
6
+ import * as i3 from '@valtimo/components';
7
+ import { ConfirmationModalModule, CARBON_CONSTANTS, ValtimoCdsModalDirective, ViewType, CarbonListModule, CarbonListComponent, EditorModule, RenderInPageHeaderDirective, FormModule, ParagraphModule, SelectModule, InputModule as InputModule$1 } from '@valtimo/components';
8
+ import * as i5 from '@valtimo/plugin';
9
9
  import { PluginTranslatePipeModule } from '@valtimo/plugin';
10
- import * as i2$1 from '@valtimo/document';
11
- import * as i2 from '@angular/common/http';
12
- import { HttpHeaders } from '@angular/common/http';
13
- import * as i3 from '@valtimo/shared';
10
+ import * as i4 from 'carbon-components-angular';
11
+ import { ButtonModule, ModalModule, InputModule, ComboBoxModule, TabsModule, DialogModule, NotificationService, DropdownModule, IconModule, LoadingModule, NotificationModule } from 'carbon-components-angular';
12
+ import * as i3$1 from '@valtimo/shared';
14
13
  import { InterceptorSkip, getCaseManagementRouteParams, ROLE_ADMIN, CASE_MANAGEMENT_TAB_TOKEN } from '@valtimo/shared';
15
- import * as i4$1 from 'carbon-components-angular';
16
- import { ButtonModule, ModalModule, InputModule, TabsModule, DialogModule, IconModule, NotificationService, DropdownModule, LoadingModule, NotificationModule } from 'carbon-components-angular';
17
- import * as i5 from '@ngx-translate/core';
14
+ import * as i5$1 from '@ngx-translate/core';
18
15
  import { TranslateModule } from '@ngx-translate/core';
19
- import * as i1$1 from '@angular/forms';
16
+ import * as i1 from '@angular/forms';
20
17
  import { Validators, ReactiveFormsModule } from '@angular/forms';
18
+ import * as i2$1 from '@angular/common/http';
19
+ import { HttpHeaders } from '@angular/common/http';
21
20
  import * as i2$2 from '@angular/router';
22
21
  import { RouterModule } from '@angular/router';
23
22
  import { AuthGuardService } from '@valtimo/security';
24
23
 
24
+ /*
25
+ * Copyright 2015-2022 Ritense BV, the Netherlands.
26
+ *
27
+ * Licensed under EUPL, Version 1.2 (the "License");
28
+ * you may not use this file except in compliance with the License.
29
+ * You may obtain a copy of the License at
30
+ *
31
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
32
+ *
33
+ * Unless required by applicable law or agreed to in writing, software
34
+ * distributed under the License is distributed on an "AS IS" basis,
35
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36
+ * See the License for the specific language governing permissions and
37
+ * limitations under the License.
38
+ */
39
+ const DOCUMENT_TYPES = ['csv', 'pdf'];
40
+
41
+ /*
42
+ * Copyright 2015-2022 Ritense BV, the Netherlands.
43
+ *
44
+ * Licensed under EUPL, Version 1.2 (the "License");
45
+ * you may not use this file except in compliance with the License.
46
+ * You may obtain a copy of the License at
47
+ *
48
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
49
+ *
50
+ * Unless required by applicable law or agreed to in writing, software
51
+ * distributed under the License is distributed on an "AS IS" basis,
52
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
53
+ * See the License for the specific language governing permissions and
54
+ * limitations under the License.
55
+ */
56
+
57
+ /*
58
+ * Copyright 2015-2022 Ritense BV, the Netherlands.
59
+ *
60
+ * Licensed under EUPL, Version 1.2 (the "License");
61
+ * you may not use this file except in compliance with the License.
62
+ * You may obtain a copy of the License at
63
+ *
64
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
65
+ *
66
+ * Unless required by applicable law or agreed to in writing, software
67
+ * distributed under the License is distributed on an "AS IS" basis,
68
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
69
+ * See the License for the specific language governing permissions and
70
+ * limitations under the License.
71
+ */
72
+ class DocumentGeneratorConfigurationComponent {
73
+ constructor() {
74
+ this.valid = new EventEmitter();
75
+ this.configuration = new EventEmitter();
76
+ this.formValue$ = new BehaviorSubject(null);
77
+ this.valid$ = new BehaviorSubject(false);
78
+ }
79
+ ngOnInit() {
80
+ this.openSaveSubscription();
81
+ }
82
+ ngOnDestroy() {
83
+ this.saveSubscription?.unsubscribe();
84
+ }
85
+ formValueChange(formValue) {
86
+ this.formValue$.next(formValue);
87
+ this.handleValid(formValue);
88
+ }
89
+ handleValid(formValue) {
90
+ const valid = !!(formValue.configurationTitle);
91
+ this.valid$.next(valid);
92
+ this.valid.emit(valid);
93
+ }
94
+ openSaveSubscription() {
95
+ this.saveSubscription = this.save$?.subscribe(_ => {
96
+ combineLatest([this.formValue$, this.valid$])
97
+ .pipe(take(1))
98
+ .subscribe(([formValue, valid]) => {
99
+ if (valid) {
100
+ this.configuration.emit(formValue);
101
+ this.injectCaseTab();
102
+ }
103
+ });
104
+ });
105
+ }
106
+ injectCaseTab() {
107
+ }
108
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DocumentGeneratorConfigurationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
109
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DocumentGeneratorConfigurationComponent, isStandalone: false, selector: "valtimo-document-template-configuration", inputs: { save$: "save$", disabled$: "disabled$", pluginId: "pluginId", prefillConfiguration$: "prefillConfiguration$" }, outputs: { valid: "valid", configuration: "configuration" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2022 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<v-form\n (valueChange)=\"formValueChange($event)\"\n *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefillConfiguration$ ? (prefillConfiguration$ | async) : null\n } as obs\"\n>\n <v-input\n name=\"configurationTitle\"\n [title]=\"'configurationTitle' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.configurationTitle\"\n [required]=\"true\"\n [tooltip]=\"'configurationTitleTooltip' | pluginTranslate: pluginId | async\"\n [widthPx]=\"350\"\n placeholder=\"Document Generator Plugin\"\n >\n </v-input>\n</v-form>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { kind: "component", type: i3.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "smallMargin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$", "carbonTheme", "placeholder", "dataTestId", "trim"], outputs: ["valueChange"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.PluginTranslatePipe, name: "pluginTranslate" }] }); }
110
+ }
111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DocumentGeneratorConfigurationComponent, decorators: [{
112
+ type: Component,
113
+ args: [{ standalone: false, selector: 'valtimo-document-template-configuration', template: "<!--\n ~ Copyright 2015-2022 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<v-form\n (valueChange)=\"formValueChange($event)\"\n *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefillConfiguration$ ? (prefillConfiguration$ | async) : null\n } as obs\"\n>\n <v-input\n name=\"configurationTitle\"\n [title]=\"'configurationTitle' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.configurationTitle\"\n [required]=\"true\"\n [tooltip]=\"'configurationTitleTooltip' | pluginTranslate: pluginId | async\"\n [widthPx]=\"350\"\n placeholder=\"Document Generator Plugin\"\n >\n </v-input>\n</v-form>\n" }]
114
+ }], ctorParameters: () => [], propDecorators: { save$: [{
115
+ type: Input
116
+ }], disabled$: [{
117
+ type: Input
118
+ }], pluginId: [{
119
+ type: Input
120
+ }], prefillConfiguration$: [{
121
+ type: Input
122
+ }], valid: [{
123
+ type: Output
124
+ }], configuration: [{
125
+ type: Output
126
+ }] } });
127
+
128
+ /*
129
+ * Copyright 2015-2023 Ritense BV, the Netherlands.
130
+ *
131
+ * Licensed under EUPL, Version 1.2 (the "License");
132
+ * you may not use this file except in compliance with the License.
133
+ * You may obtain a copy of the License at
134
+ *
135
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
136
+ *
137
+ * Unless required by applicable law or agreed to in writing, software
138
+ * distributed under the License is distributed on an "AS IS" basis,
139
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
140
+ * See the License for the specific language governing permissions and
141
+ * limitations under the License.
142
+ */
143
+ class DocumentTemplateDeleteModalComponent {
144
+ constructor() {
145
+ this.deleteEvent = new EventEmitter();
146
+ }
147
+ onDelete(templates) {
148
+ this.deleteEvent.emit(templates);
149
+ }
150
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DocumentTemplateDeleteModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
151
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DocumentTemplateDeleteModalComponent, isStandalone: true, selector: "valtimo-document-template-delete-modal", inputs: { deleteRowKeys: "deleteRowKeys", showDeleteModal$: "showDeleteModal$" }, outputs: { deleteEvent: "deleteEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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 confirmButtonDocumentTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"template.deleteModalContent\"\n [outputOnConfirm]=\"deleteRowKeys\"\n [showModalSubject$]=\"showDeleteModal$\"\n titleTranslationKey=\"interface.delete\"\n (confirmEvent)=\"onDelete($event)\"\n></valtimo-confirmation-modal>\n", dependencies: [{ kind: "ngmodule", type: ConfirmationModalModule }, { kind: "component", type: i3.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 }); }
152
+ }
153
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DocumentTemplateDeleteModalComponent, decorators: [{
154
+ type: Component,
155
+ args: [{ standalone: true, selector: 'valtimo-document-template-delete-modal', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
156
+ ConfirmationModalModule
157
+ ], template: "<!--\n ~ Copyright 2015-2023 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 confirmButtonDocumentTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"template.deleteModalContent\"\n [outputOnConfirm]=\"deleteRowKeys\"\n [showModalSubject$]=\"showDeleteModal$\"\n titleTranslationKey=\"interface.delete\"\n (confirmEvent)=\"onDelete($event)\"\n></valtimo-confirmation-modal>\n" }]
158
+ }], propDecorators: { deleteRowKeys: [{
159
+ type: Input
160
+ }], showDeleteModal$: [{
161
+ type: Input
162
+ }], deleteEvent: [{
163
+ type: Output
164
+ }] } });
165
+
166
+ /*
167
+ * Copyright 2015-2023 Ritense BV, the Netherlands.
168
+ *
169
+ * Licensed under EUPL, Version 1.2 (the "License");
170
+ * you may not use this file except in compliance with the License.
171
+ * You may obtain a copy of the License at
172
+ *
173
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
174
+ *
175
+ * Unless required by applicable law or agreed to in writing, software
176
+ * distributed under the License is distributed on an "AS IS" basis,
177
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
178
+ * See the License for the specific language governing permissions and
179
+ * limitations under the License.
180
+ */
181
+ class DocumentTemplateAddEditModalComponent {
182
+ set defaultKeyValue(value) {
183
+ this._defaultKeyValue = value;
184
+ this.setDefaultKeyValue(value);
185
+ }
186
+ set defaultTypeValue(value) {
187
+ this._defaultTypeValue = value;
188
+ this.setDefaultTypeValue(value);
189
+ }
190
+ get key() {
191
+ const key = this.form?.get('key');
192
+ if (!key?.value) {
193
+ return key;
194
+ }
195
+ key.setValue(this.keyGeneratorService.getUniqueKey(key.value, []));
196
+ return key;
197
+ }
198
+ get type() {
199
+ return this.form?.get('type');
200
+ }
201
+ constructor(fb, keyGeneratorService) {
202
+ this.fb = fb;
203
+ this.keyGeneratorService = keyGeneratorService;
204
+ this.open = false;
205
+ this.modalType = 'add';
206
+ this.closeEvent = new EventEmitter();
207
+ this.form = this.fb.group({
208
+ key: this.fb.control('', Validators.required),
209
+ type: this.fb.control(undefined, Validators.required),
210
+ });
211
+ this.documentTypeSelectItems = DOCUMENT_TYPES.map(item => ({
212
+ id: item,
213
+ content: item,
214
+ selected: false,
215
+ }));
216
+ }
217
+ ngOnInit() {
218
+ }
219
+ onCancel() {
220
+ this.closeEvent.emit(null);
221
+ this.resetForm();
222
+ }
223
+ onConfirm() {
224
+ if (!this.key || !this.type) {
225
+ return;
226
+ }
227
+ this.closeEvent.emit({ key: this.key.value, type: this.type.value });
228
+ this.resetForm();
229
+ }
230
+ setDefaultKeyValue(value) {
231
+ this.key.setValue(value);
232
+ }
233
+ setDefaultTypeValue(value) {
234
+ this.type.setValue(value);
235
+ }
236
+ resetForm() {
237
+ setTimeout(() => {
238
+ this.form.reset();
239
+ if (this.modalType === 'edit') {
240
+ this.setDefaultKeyValue(this._defaultKeyValue);
241
+ this.setDefaultTypeValue(this._defaultTypeValue);
242
+ }
243
+ }, CARBON_CONSTANTS.modalAnimationMs);
244
+ }
245
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DocumentTemplateAddEditModalComponent, deps: [{ token: i1.FormBuilder }, { token: i3.KeyGeneratorService }], target: i0.ɵɵFactoryTarget.Component }); }
246
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DocumentTemplateAddEditModalComponent, isStandalone: true, selector: "valtimo-document-template-add-edit-modal", inputs: { open: "open", modalType: "modalType", defaultKeyValue: "defaultKeyValue", defaultTypeValue: "defaultTypeValue" }, outputs: { closeEvent: "closeEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<cds-modal\n *ngIf=\"{\n isAdd: modalType === 'add'\n } as vars\"\n [open]=\"open\"\n showFooter=\"true\"\n [title]=\"vars.title\"\n valtimoCdsModal\n>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"onCancel()\">\n <h3 cdsModalHeaderHeading>\n {{\n vars.isAdd\n ? 'Add'\n : 'Edit'\n }}\n </h3>\n </cds-modal-header>\n\n <section cdsModalContent>\n <form [formGroup]=\"form\">\n <cds-label [invalid]=\"key.dirty && key.invalid\">\n {{ 'Key' }}\n\n <input\n formControlName=\"key\"\n cdsText\n placeholder=\"{{ 'key' }}\"\n [attr.modal-primary-focus]=\"true\"\n />\n </cds-label>\n <cds-combo-box\n formControlName=\"type\"\n [label]=\"'Document type'\"\n [dropUp]=\"false\"\n [items]=\"documentTypeSelectItems\"\n >\n <cds-dropdown-list></cds-dropdown-list>\n </cds-combo-box>\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 {{ vars.isAdd ? ('interface.create' | translate) : ('interface.save' | translate) }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ModalModule }, { kind: "component", type: i4.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i4.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i4.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i4.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i4.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: InputModule }, { kind: "component", type: i4.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i4.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "ngmodule", type: ComboBoxModule }, { kind: "component", type: i4.ComboBox, selector: "cds-combo-box, ibm-combo-box", inputs: ["placeholder", "openMenuAria", "closeMenuAria", "clearSelectionsTitle", "clearSelectionsAria", "clearSelectionTitle", "clearSelectionAria", "id", "labelId", "items", "type", "size", "itemValueKey", "label", "hideLabel", "helperText", "appendInline", "invalid", "invalidText", "warn", "warnText", "maxLength", "theme", "selectionFeedback", "autocomplete", "dropUp", "disabled", "readonly", "fluid"], outputs: ["selected", "submit", "close", "search", "clear"] }, { kind: "component", type: i4.DropdownList, selector: "cds-dropdown-list, ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }, { kind: "directive", type: ValtimoCdsModalDirective, selector: "[valtimoCdsModal]", inputs: ["minContentHeight"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
247
+ }
248
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DocumentTemplateAddEditModalComponent, decorators: [{
249
+ type: Component,
250
+ args: [{ standalone: true, selector: 'valtimo-document-template-add-edit-modal', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
251
+ CommonModule,
252
+ ButtonModule,
253
+ TranslateModule,
254
+ ModalModule,
255
+ ReactiveFormsModule,
256
+ InputModule,
257
+ ComboBoxModule,
258
+ ValtimoCdsModalDirective,
259
+ ], template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<cds-modal\n *ngIf=\"{\n isAdd: modalType === 'add'\n } as vars\"\n [open]=\"open\"\n showFooter=\"true\"\n [title]=\"vars.title\"\n valtimoCdsModal\n>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"onCancel()\">\n <h3 cdsModalHeaderHeading>\n {{\n vars.isAdd\n ? 'Add'\n : 'Edit'\n }}\n </h3>\n </cds-modal-header>\n\n <section cdsModalContent>\n <form [formGroup]=\"form\">\n <cds-label [invalid]=\"key.dirty && key.invalid\">\n {{ 'Key' }}\n\n <input\n formControlName=\"key\"\n cdsText\n placeholder=\"{{ 'key' }}\"\n [attr.modal-primary-focus]=\"true\"\n />\n </cds-label>\n <cds-combo-box\n formControlName=\"type\"\n [label]=\"'Document type'\"\n [dropUp]=\"false\"\n [items]=\"documentTypeSelectItems\"\n >\n <cds-dropdown-list></cds-dropdown-list>\n </cds-combo-box>\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 {{ vars.isAdd ? ('interface.create' | translate) : ('interface.save' | translate) }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n" }]
260
+ }], ctorParameters: () => [{ type: i1.FormBuilder }, { type: i3.KeyGeneratorService }], propDecorators: { open: [{
261
+ type: Input
262
+ }], modalType: [{
263
+ type: Input
264
+ }], defaultKeyValue: [{
265
+ type: Input
266
+ }], defaultTypeValue: [{
267
+ type: Input
268
+ }], closeEvent: [{
269
+ type: Output
270
+ }] } });
271
+
272
+ /*
273
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
274
+ *
275
+ * Licensed under EUPL, Version 1.2 (the "License");
276
+ * you may not use this file except in compliance with the License.
277
+ * You may obtain a copy of the License at
278
+ *
279
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
280
+ *
281
+ * Unless required by applicable law or agreed to in writing, software
282
+ * distributed under the License is distributed on an "AS IS" basis,
283
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
284
+ * See the License for the specific language governing permissions and
285
+ * limitations under the License.
286
+ */
287
+ class FreemarkerTemplateManagementService {
288
+ constructor(configService, http) {
289
+ this.configService = configService;
290
+ this.http = http;
291
+ this.valtimoEndpointUri = `${this.configService.config.valtimoApi.endpointUri}management/`;
292
+ }
293
+ getAllMailTemplates(caseDefinitionKey, caseDefinitionVersionTag) {
294
+ return this.getTemplates(caseDefinitionKey, caseDefinitionVersionTag, 'mail', undefined, undefined, 0, 10000);
295
+ }
296
+ getAllTextTemplates(caseDefinitionKey, caseDefinitionVersionTag) {
297
+ return this.getTemplates(caseDefinitionKey, caseDefinitionVersionTag, 'text', undefined, undefined, 0, 10000);
298
+ }
299
+ getAllDocumentTemplates(caseDefinitionKey, caseDefinitionVersionTag) {
300
+ return this.getTemplates(caseDefinitionKey, caseDefinitionVersionTag, undefined, ['csv', 'pdf'], undefined, 0, 10000);
301
+ }
302
+ getAllTemplates(caseDefinitionKey, caseDefinitionVersionTag, templateType) {
303
+ return this.getTemplates(caseDefinitionKey, caseDefinitionVersionTag, templateType, undefined, undefined, 0, 10000);
304
+ }
305
+ getTemplates(caseDefinitionKey, caseDefinitionVersionTag, templateType, templateTypes, templateKey, page, pageSize) {
306
+ const params = {
307
+ caseDefinitionKey,
308
+ caseDefinitionVersionTag,
309
+ templateType,
310
+ templateTypes,
311
+ templateKey,
312
+ page,
313
+ size: pageSize
314
+ };
315
+ Object.keys(params).forEach(key => {
316
+ if (params[key] == undefined) {
317
+ delete params[key];
318
+ }
319
+ });
320
+ return this.http.get(`${this.valtimoEndpointUri}v1/template`, { params });
321
+ }
322
+ getMailTemplate(caseDefinitionKey, caseDefinitionVersionTag, key) {
323
+ return this.getTemplate(caseDefinitionKey, caseDefinitionVersionTag, 'mail', key);
324
+ }
325
+ getTextTemplate(caseDefinitionKey, caseDefinitionVersionTag, key) {
326
+ return this.getTemplate(caseDefinitionKey, caseDefinitionVersionTag, 'text', key);
327
+ }
328
+ getTemplate(caseDefinitionKey, caseDefinitionVersionTag, templateType, key) {
329
+ return this.http.get(`${this.valtimoEndpointUri}v1/case-definition/${caseDefinitionKey}/version/${caseDefinitionVersionTag}/template-type/${templateType}/template/${key}`);
330
+ }
331
+ addTemplate(template) {
332
+ return this.http.post(`${this.valtimoEndpointUri}v1/template`, template);
333
+ }
334
+ deleteTemplates(request) {
335
+ return this.http.delete(`${this.valtimoEndpointUri}v1/template`, { body: request });
336
+ }
337
+ updateTemplate(template) {
338
+ return this.http.put(`${this.valtimoEndpointUri}v1/template`, template);
339
+ }
340
+ previewTemplate(template) {
341
+ return this.http.post(`${this.valtimoEndpointUri}v1/template/preview`, template, { responseType: 'blob' });
342
+ }
343
+ isFinal(caseDefinitionKey, caseDefinitionVersionTag) {
344
+ return this.http
345
+ .get(`${this.valtimoEndpointUri}v1/case-definition/${caseDefinitionKey}/version/${caseDefinitionVersionTag}`, {
346
+ headers: new HttpHeaders().set(InterceptorSkip, '403'),
347
+ })
348
+ .pipe(map(caseDefinition => caseDefinition.final));
349
+ }
350
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FreemarkerTemplateManagementService, deps: [{ token: i3$1.ConfigService }, { token: i2$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
351
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FreemarkerTemplateManagementService, providedIn: 'root' }); }
352
+ }
353
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FreemarkerTemplateManagementService, decorators: [{
354
+ type: Injectable,
355
+ args: [{
356
+ providedIn: 'root',
357
+ }]
358
+ }], ctorParameters: () => [{ type: i3$1.ConfigService }, { type: i2$1.HttpClient }] });
359
+
360
+ /*
361
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
362
+ *
363
+ * Licensed under EUPL, Version 1.2 (the "License");
364
+ * you may not use this file except in compliance with the License.
365
+ * You may obtain a copy of the License at
366
+ *
367
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
368
+ *
369
+ * Unless required by applicable law or agreed to in writing, software
370
+ * distributed under the License is distributed on an "AS IS" basis,
371
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
372
+ * See the License for the specific language governing permissions and
373
+ * limitations under the License.
374
+ */
375
+
376
+ /*
377
+ * Copyright 2015-2024 Ritense BV, the Netherlands.
378
+ *
379
+ * Licensed under EUPL, Version 1.2 (the "License");
380
+ * you may not use this file except in compliance with the License.
381
+ * You may obtain a copy of the License at
382
+ *
383
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
384
+ *
385
+ * Unless required by applicable law or agreed to in writing, software
386
+ * distributed under the License is distributed on an "AS IS" basis,
387
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
388
+ * See the License for the specific language governing permissions and
389
+ * limitations under the License.
390
+ */
391
+ class DocumentTemplateListComponent {
392
+ constructor(templateService, router, route, environmentService) {
393
+ this.templateService = templateService;
394
+ this.router = router;
395
+ this.route = route;
396
+ this.environmentService = environmentService;
397
+ this.fields = [
398
+ {
399
+ viewType: ViewType.TEXT,
400
+ key: 'key',
401
+ label: 'Key',
402
+ },
403
+ {
404
+ viewType: ViewType.TEXT,
405
+ key: 'type',
406
+ label: 'Document type',
407
+ },
408
+ ];
409
+ this._caseDefinitionId$ = getCaseManagementRouteParams(this.route).pipe(filter((params) => !!params?.caseDefinitionKey));
410
+ this.readOnly$ = this._caseDefinitionId$.pipe(switchMap(caseDefinitionId => combineLatest([
411
+ this.environmentService.canUpdateGlobalConfiguration(),
412
+ this.templateService.isFinal(caseDefinitionId.caseDefinitionKey, caseDefinitionId.caseDefinitionVersionTag)
413
+ ]).pipe(map(([canUpdateGlobal, isFinalCase]) => !canUpdateGlobal || isFinalCase), startWith(true))));
414
+ this.templates$ = new BehaviorSubject(null);
415
+ this.showAddModal$ = new BehaviorSubject(false);
416
+ this.showDeleteModal$ = new BehaviorSubject(false);
417
+ this.selectedRowKeys$ = new BehaviorSubject([]);
418
+ this.loading$ = new BehaviorSubject(true);
419
+ }
420
+ ngOnInit() {
421
+ this.reloadTemplateList();
422
+ }
423
+ openAddModal() {
424
+ this.showAddModal$.next(true);
425
+ }
426
+ onAdd(data) {
427
+ if (!data) {
428
+ this.showAddModal$.next(false);
429
+ return;
430
+ }
431
+ this._caseDefinitionId$.pipe(take(1), switchMap(caseDefinitionId => this.templateService.addTemplate({
432
+ caseDefinitionKey: caseDefinitionId.caseDefinitionKey,
433
+ caseDefinitionVersionTag: caseDefinitionId.caseDefinitionVersionTag,
434
+ key: data.key,
435
+ type: data.type.id,
436
+ content: ''
437
+ }))).subscribe(template => {
438
+ this.showAddModal$.next(false);
439
+ this.gotoDocumentTemplateEditor(template.caseDefinitionKey, template.caseDefinitionVersionTag, template.key, template.type);
440
+ });
441
+ }
442
+ showDeleteModal() {
443
+ this.setSelectedTemplateKeys();
444
+ this.showDeleteModal$.next(true);
445
+ }
446
+ onDelete(templates) {
447
+ console.log(templates);
448
+ this.loading$.next(true);
449
+ this._caseDefinitionId$.pipe(take(1), switchMap(caseDefinitionId => this.templateService.deleteTemplates({
450
+ caseDefinitionKey: caseDefinitionId.caseDefinitionKey,
451
+ caseDefinitionVersionTag: caseDefinitionId.caseDefinitionVersionTag,
452
+ templates
453
+ }))).subscribe(_ => {
454
+ this.reloadTemplateList();
455
+ });
456
+ }
457
+ onRowClick(template) {
458
+ this._caseDefinitionId$.pipe(take(1)).subscribe(caseDefinitionId => this.gotoDocumentTemplateEditor(caseDefinitionId.caseDefinitionKey, caseDefinitionId.caseDefinitionVersionTag, template.key, template.type));
459
+ }
460
+ gotoDocumentTemplateEditor(caseDefinitionKey, caseDefinitionVersionTag, key, type) {
461
+ this.router.navigate([`/case-management/case/${caseDefinitionKey}/version/${caseDefinitionVersionTag}/document-template/${key}/${type}`]);
462
+ }
463
+ reloadTemplateList() {
464
+ this.loading$.next(true);
465
+ this._caseDefinitionId$.pipe(switchMap(caseDefinitionId => this.templateService.getAllDocumentTemplates(caseDefinitionId.caseDefinitionKey, caseDefinitionId.caseDefinitionVersionTag)), map(templatePage => templatePage.content), take(1)).subscribe(templateListItems => {
466
+ this.templates$.next(templateListItems);
467
+ this.loading$.next(false);
468
+ });
469
+ }
470
+ setSelectedTemplateKeys() {
471
+ this.selectedRowKeys$.next(this.carbonList.selectedItems.map((template) => ({ key: template.key, type: template.type })));
472
+ }
473
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DocumentTemplateListComponent, deps: [{ token: FreemarkerTemplateManagementService }, { token: i2$2.Router }, { token: i2$2.ActivatedRoute }, { token: i3$1.EnvironmentService }], target: i0.ɵɵFactoryTarget.Component }); }
474
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DocumentTemplateListComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "carbonList", first: true, predicate: CarbonListComponent, descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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 [header]=\"false\"\n [items]=\"templates$ | async\"\n [fields]=\"fields\"\n [loading]=\"loading$ | async\"\n [showSelectionColumn]=\"!(readOnly$ | async)\"\n (rowClicked)=\"onRowClick($event)\"\n>\n <ng-container header> {{ 'Title' }}</ng-container>\n\n <div carbonToolbarContent>\n <ng-container [ngTemplateOutlet]=\"addTemplateButton\"></ng-container>\n </div>\n\n <ng-container carbonToolbarActions>\n <button cdsButton=\"primary\" (click)=\"showDeleteModal()\">\n {{ 'interface.delete' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n </ng-container>\n\n <valtimo-no-results\n [action]=\"addTemplateButton\"\n description=\"{{ 'Come back later.' }}\"\n title=\"{{ 'No templates found' }}\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n\n<valtimo-document-template-add-edit-modal\n [open]=\"showAddModal$ | async\"\n (closeEvent)=\"onAdd($event)\"\n></valtimo-document-template-add-edit-modal>\n\n<ng-container *ngIf=\"{selectedRowKeys: selectedRowKeys$ | async} as obs\">\n <valtimo-document-template-delete-modal\n [deleteRowKeys]=\"obs.selectedRowKeys\"\n [showDeleteModal$]=\"showDeleteModal$\"\n (deleteEvent)=\"onDelete($event)\"\n >\n </valtimo-document-template-delete-modal>\n</ng-container>\n\n<ng-template #addTemplateButton>\n <button cdsButton=\"primary\"\n [disabled]=\"readOnly$ | async\"\n (click)=\"openAddModal()\">\n {{ 'Add' }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i3.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: i3.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }, { kind: "component", type: DocumentTemplateDeleteModalComponent, selector: "valtimo-document-template-delete-modal", inputs: ["deleteRowKeys", "showDeleteModal$"], outputs: ["deleteEvent"] }, { kind: "component", type: DocumentTemplateAddEditModalComponent, selector: "valtimo-document-template-add-edit-modal", inputs: ["open", "modalType", "defaultKeyValue", "defaultTypeValue"], outputs: ["closeEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
475
+ }
476
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DocumentTemplateListComponent, decorators: [{
477
+ type: Component,
478
+ args: [{ standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
479
+ CommonModule,
480
+ CarbonListModule,
481
+ ButtonModule,
482
+ TranslateModule,
483
+ DocumentTemplateDeleteModalComponent,
484
+ DocumentTemplateAddEditModalComponent
485
+ ], template: "<!--\n ~ Copyright 2015-2023 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 [header]=\"false\"\n [items]=\"templates$ | async\"\n [fields]=\"fields\"\n [loading]=\"loading$ | async\"\n [showSelectionColumn]=\"!(readOnly$ | async)\"\n (rowClicked)=\"onRowClick($event)\"\n>\n <ng-container header> {{ 'Title' }}</ng-container>\n\n <div carbonToolbarContent>\n <ng-container [ngTemplateOutlet]=\"addTemplateButton\"></ng-container>\n </div>\n\n <ng-container carbonToolbarActions>\n <button cdsButton=\"primary\" (click)=\"showDeleteModal()\">\n {{ 'interface.delete' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n </ng-container>\n\n <valtimo-no-results\n [action]=\"addTemplateButton\"\n description=\"{{ 'Come back later.' }}\"\n title=\"{{ 'No templates found' }}\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n\n<valtimo-document-template-add-edit-modal\n [open]=\"showAddModal$ | async\"\n (closeEvent)=\"onAdd($event)\"\n></valtimo-document-template-add-edit-modal>\n\n<ng-container *ngIf=\"{selectedRowKeys: selectedRowKeys$ | async} as obs\">\n <valtimo-document-template-delete-modal\n [deleteRowKeys]=\"obs.selectedRowKeys\"\n [showDeleteModal$]=\"showDeleteModal$\"\n (deleteEvent)=\"onDelete($event)\"\n >\n </valtimo-document-template-delete-modal>\n</ng-container>\n\n<ng-template #addTemplateButton>\n <button cdsButton=\"primary\"\n [disabled]=\"readOnly$ | async\"\n (click)=\"openAddModal()\">\n {{ 'Add' }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n" }]
486
+ }], ctorParameters: () => [{ type: FreemarkerTemplateManagementService }, { type: i2$2.Router }, { type: i2$2.ActivatedRoute }, { type: i3$1.EnvironmentService }], propDecorators: { carbonList: [{
487
+ type: ViewChild,
488
+ args: [CarbonListComponent]
489
+ }] } });
490
+
491
+ /*
492
+ * Copyright 2015-2023 Ritense BV, the Netherlands.
493
+ *
494
+ * Licensed under EUPL, Version 1.2 (the "License");
495
+ * you may not use this file except in compliance with the License.
496
+ * You may obtain a copy of the License at
497
+ *
498
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
499
+ *
500
+ * Unless required by applicable law or agreed to in writing, software
501
+ * distributed under the License is distributed on an "AS IS" basis,
502
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
503
+ * See the License for the specific language governing permissions and
504
+ * limitations under the License.
505
+ */
506
+ class DocumentTemplateEditorComponent {
507
+ constructor(templateService, route, pageTitleService, router, notificationService, translateService, breadcrumbService, environmentService) {
508
+ this.templateService = templateService;
509
+ this.route = route;
510
+ this.pageTitleService = pageTitleService;
511
+ this.router = router;
512
+ this.notificationService = notificationService;
513
+ this.translateService = translateService;
514
+ this.breadcrumbService = breadcrumbService;
515
+ this.environmentService = environmentService;
516
+ this.model$ = new BehaviorSubject(null);
517
+ this.template$ = new BehaviorSubject(null);
518
+ this.saveDisabled$ = new BehaviorSubject(true);
519
+ this.editorDisabled$ = new BehaviorSubject(false);
520
+ this.moreDisabled$ = new BehaviorSubject(true);
521
+ this.showDeleteModal$ = new BehaviorSubject(false);
522
+ this.updatedModelValue$ = new BehaviorSubject('');
523
+ this._caseDefinitionId$ = getCaseManagementRouteParams(this.route).pipe(filter((params) => !!params?.caseDefinitionKey));
524
+ this.templateKey$ = combineLatest([this.route.params, this.route.parent.params]).pipe(map(([params, parentParams]) => params?.templateKey || parentParams?.templateKey), filter(templateKey => !!templateKey));
525
+ this.templateType$ = combineLatest([this.route.params, this.route.parent.params]).pipe(map(([params, parentParams]) => params?.templateType || parentParams?.templateType), filter(templateType => !!templateType));
526
+ this.readOnly$ = this._caseDefinitionId$.pipe(switchMap(caseDefinitionId => combineLatest([
527
+ this.environmentService.canUpdateGlobalConfiguration(),
528
+ this.templateService.isFinal(caseDefinitionId.caseDefinitionKey, caseDefinitionId.caseDefinitionVersionTag)
529
+ ]).pipe(map(([canUpdateGlobal, isFinalCase]) => !canUpdateGlobal || isFinalCase), startWith(true))));
530
+ }
531
+ ngOnInit() {
532
+ this.loadTemplate();
533
+ }
534
+ ngAfterViewInit() {
535
+ this.initBreadcrumb();
536
+ }
537
+ ngOnDestroy() {
538
+ this.pageTitleService.enableReset();
539
+ this.breadcrumbService.clearThirdBreadcrumb();
540
+ this.breadcrumbService.clearFourthBreadcrumb();
541
+ }
542
+ onValid(valid) {
543
+ this.saveDisabled$.next(valid === false);
544
+ }
545
+ onValueChange(value) {
546
+ this.updatedModelValue$.next(value);
547
+ }
548
+ updateTemplate() {
549
+ this.disableEditor();
550
+ this.disableSave();
551
+ this.disableMore();
552
+ combineLatest([this.updatedModelValue$, this._caseDefinitionId$, this.templateKey$, this.templateType$]).pipe(switchMap(([updatedModelValue, caseDefinitionId, templateKey, templateType]) => this.templateService.updateTemplate({
553
+ key: templateKey,
554
+ caseDefinitionKey: caseDefinitionId.caseDefinitionKey,
555
+ caseDefinitionVersionTag: caseDefinitionId.caseDefinitionVersionTag,
556
+ type: templateType,
557
+ content: updatedModelValue,
558
+ })), take(1)).subscribe({
559
+ next: result => {
560
+ this.enableMore();
561
+ this.enableSave();
562
+ this.enableEditor();
563
+ this.showSuccessMessage(result.key);
564
+ this.setModel(result.content);
565
+ this.template$.next(result);
566
+ },
567
+ error: () => {
568
+ this.enableMore();
569
+ this.enableSave();
570
+ this.enableEditor();
571
+ },
572
+ });
573
+ }
574
+ onDelete(templates) {
575
+ console.log(templates);
576
+ this.disableEditor();
577
+ this.disableSave();
578
+ this.disableMore();
579
+ this._caseDefinitionId$.pipe(take(1)).subscribe(caseDefinitionId => this.templateService.deleteTemplates({
580
+ caseDefinitionKey: caseDefinitionId.caseDefinitionKey,
581
+ caseDefinitionVersionTag: caseDefinitionId.caseDefinitionVersionTag,
582
+ templates
583
+ }).pipe(take(1)).subscribe(_ => this.router.navigate([`/case-management/case/${caseDefinitionId.caseDefinitionKey}/version/${caseDefinitionId.caseDefinitionVersionTag}/document-template`])));
584
+ }
585
+ showDeleteModal() {
586
+ this.showDeleteModal$.next(true);
587
+ }
588
+ loadTemplate() {
589
+ combineLatest([this._caseDefinitionId$, this.templateKey$, this.templateType$]).pipe(tap(([_, key, type]) => {
590
+ this.pageTitleService.setCustomPageTitle(`Document: ${key}.${type}`, true);
591
+ }), switchMap(([caseDefinitionId, key, type]) => this.templateService.getTemplate(caseDefinitionId.caseDefinitionKey, caseDefinitionId.caseDefinitionVersionTag, type, key)), take(1)).subscribe(result => {
592
+ this.enableMore();
593
+ this.enableSave();
594
+ this.enableEditor();
595
+ this.setModel(result.content);
596
+ this.template$.next(result);
597
+ });
598
+ }
599
+ setModel(content) {
600
+ this.model$.next({
601
+ value: content,
602
+ language: 'freemarker2',
603
+ });
604
+ this.updatedModelValue$.next(content);
605
+ }
606
+ disableMore() {
607
+ this.moreDisabled$.next(true);
608
+ }
609
+ enableMore() {
610
+ this.moreDisabled$.next(false);
611
+ }
612
+ disableSave() {
613
+ this.saveDisabled$.next(true);
614
+ }
615
+ enableSave() {
616
+ this.saveDisabled$.next(false);
617
+ }
618
+ disableEditor() {
619
+ this.editorDisabled$.next(true);
620
+ }
621
+ enableEditor() {
622
+ this.editorDisabled$.next(false);
623
+ }
624
+ onSelectedTabPreview() {
625
+ setTimeout(() => {
626
+ const preview = document.getElementById('preview-iframe');
627
+ if (preview) {
628
+ combineLatest([this.updatedModelValue$, this.template$]).pipe(take(1), switchMap(([updatedModelValue, template]) => combineLatest([this.templateService.previewTemplate({
629
+ fileName: `${template.key}.${template.type}`,
630
+ content: updatedModelValue,
631
+ }), of(`${template.key}.${template.type}`)]))).subscribe(([blob, filename]) => {
632
+ console.log(filename);
633
+ preview.src = window.URL.createObjectURL(blob);
634
+ });
635
+ }
636
+ }, 100);
637
+ }
638
+ initBreadcrumb() {
639
+ this._caseDefinitionId$.subscribe(caseDefinitionId => {
640
+ this.breadcrumbService.setThirdBreadcrumb({
641
+ route: [`/case-management/case/${caseDefinitionId.caseDefinitionKey}/version/${caseDefinitionId.caseDefinitionVersionTag}`],
642
+ content: `${caseDefinitionId.caseDefinitionKey}:${caseDefinitionId.caseDefinitionVersionTag}`,
643
+ href: `/case-management/case/${caseDefinitionId.caseDefinitionKey}/version/${caseDefinitionId.caseDefinitionVersionTag}`,
644
+ });
645
+ this.breadcrumbService.setFourthBreadcrumb({
646
+ route: [`/case-management/case/${caseDefinitionId.caseDefinitionKey}/version/${caseDefinitionId.caseDefinitionVersionTag}/document-template`],
647
+ content: 'Document template',
648
+ href: `/case-management/case/${caseDefinitionId.caseDefinitionKey}/version/${caseDefinitionId.caseDefinitionVersionTag}/document-template`,
649
+ });
650
+ });
651
+ }
652
+ showSuccessMessage(key) {
653
+ this.notificationService.showToast({
654
+ caption: this.translateService.instant(`${key} was saved successfully`, {
655
+ key,
656
+ }),
657
+ type: 'success',
658
+ duration: 4000,
659
+ showClose: true,
660
+ title: this.translateService.instant('Saved successfully'),
661
+ });
662
+ }
663
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DocumentTemplateEditorComponent, deps: [{ token: FreemarkerTemplateManagementService }, { token: i2$2.ActivatedRoute }, { token: i3.PageTitleService }, { token: i2$2.Router }, { token: i4.NotificationService }, { token: i5$1.TranslateService }, { token: i3.BreadcrumbService }, { token: i3$1.EnvironmentService }], target: i0.ɵɵFactoryTarget.Component }); }
664
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: DocumentTemplateEditorComponent, isStandalone: true, selector: "ng-component", providers: [NotificationService], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n *ngIf=\"{\n model: model$ | async,\n updatedModelValue: updatedModelValue$ | async,\n template: template$ | async,\n } as obs\">\n\n <div class=\"template-explanation\">\n @if (obs.template.type === 'pdf') {\n <p>\n <strong>PDF Templates</strong> use HTML in combination with\n <a href=\"https://freemarker.apache.org/docs/dgui_quickstart_basics.html\" target=\"_blank\"\n rel=\"noopener noreferrer\">\n FreeMarker\n </a>\n to define placeholders within the HTML structure. The FreeMarker data model is based on nested\n <a href=\"https://docs.valtimo.nl/features/value-resolvers\" target=\"_blank\" rel=\"noopener noreferrer\">\n Valtimo value resolvers\n </a>,\n but uses a slightly different syntax.\n </p>\n <p>\n For example, <code>$&#123;doc.firstName&#125;</code> retrieves the\n <code>firstName</code> value from the case.\n </p>\n <p>\n The notation <code>&lt;#list docs as doc&gt;...&lt;/#list&gt;</code> streams all documents in the\n current case.\n </p>\n } @else {\n <p>\n <strong>CSV Templates</strong> use a semicolon (<code>;</code>) as a separator.\n <a href=\"https://freemarker.apache.org/docs/dgui_quickstart_basics.html\" target=\"_blank\"\n rel=\"noopener noreferrer\">\n FreeMarker\n </a>\n is used to define placeholders within the CSV content. The FreeMarker data model is based on nested\n <a href=\"https://docs.valtimo.nl/features/value-resolvers\" target=\"_blank\" rel=\"noopener noreferrer\">\n Valtimo value resolvers\n </a>,\n but uses a slightly different syntax.\n </p>\n <p>\n For example, <code>$&#123;doc.firstName&#125;</code> retrieves the\n <code>firstName</code> value from the case.\n </p>\n <p>\n The notation <code>&lt;#list docs as doc&gt;...&lt;/#list&gt;</code> streams all documents in the\n current case.\n </p>\n }\n </div>\n\n <cds-tabs type=\"contained\">\n <cds-tab [active]=\"true\" [heading]=\"'Editor'\">\n <valtimo-editor\n [model]=\"obs.model\"\n [disabled]=\"(editorDisabled$ | async) || (readOnly$ | async)\"\n (validEvent)=\"onValid($event)\"\n (valueChangeEvent)=\"onValueChange($event)\"\n [fitPage]=\"true\"\n [fitPageExtraSpace]=\"80\"\n ></valtimo-editor>\n </cds-tab>\n <cds-tab [heading]=\"'Preview'\" (selected)=\"onSelectedTabPreview()\">\n <iframe title=\"Preview\" id=\"preview-iframe\">\n </iframe>\n </cds-tab>\n </cds-tabs>\n\n</ng-container>\n\n<ng-container renderInPageHeader>\n <ng-template>\n <div *ngIf=\"{\n model: model$ | async,\n moreDisabled: moreDisabled$ | async,\n template: template$ | async,\n } as obs\"\n class=\"buttons-container\"\n >\n <cds-overflow-menu class=\"overflow-button\">\n <cds-overflow-menu-option\n [disabled]=\"obs.moreDisabled || (readOnly$ | async)\"\n type=\"danger\"\n (selected)=\"showDeleteModal()\"\n >{{ 'interface.delete' | translate }}\n </cds-overflow-menu-option\n >\n </cds-overflow-menu>\n\n <button\n [disabled]=\"(saveDisabled$ | async) || (readOnly$ | async)\"\n cdsButton=\"primary\"\n size=\"md\"\n (click)=\"updateTemplate()\"\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<ng-container *ngIf=\"{templateKey: templateKey$ | async, templateType: templateType$ | async} as obs\">\n <valtimo-document-template-delete-modal\n [deleteRowKeys]=\"[{key: obs.templateKey, type: obs.templateType}]\"\n [showDeleteModal$]=\"showDeleteModal$\"\n (deleteEvent)=\"onDelete($event)\"\n >\n </valtimo-document-template-delete-modal>\n</ng-container>\n", styles: ["::ng-deep .cds--tab-content{background:var(--cds-layer)!important}::ng-deep #preview-iframe{width:100%;height:calc(100vh - 219px)}.loading-container{display:flex;width:100%;justify-content:center}.overflow-button{margin-right:16px}.buttons-container{display:flex;flex-direction:row}.template-explanation{margin-top:16px;margin-bottom:24px}\n/*!\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: TabsModule }, { kind: "component", type: i4.Tabs, selector: "cds-tabs, ibm-tabs", inputs: ["position", "cacheActive", "followFocus", "isNavigation", "ariaLabel", "ariaLabelledby", "type", "theme", "skeleton"] }, { kind: "component", type: i4.Tab, selector: "cds-tab, ibm-tab", inputs: ["heading", "title", "context", "active", "disabled", "tabIndex", "id", "cacheActive", "tabContent", "templateContext"], outputs: ["selected"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i4.OverflowMenu, selector: "cds-overflow-menu, ibm-overflow-menu", inputs: ["buttonLabel", "description", "flip", "placement", "open", "customTrigger", "offset", "wrapperClass", "triggerClass"], outputs: ["openChange"] }, { kind: "component", type: i4.OverflowMenuOption, selector: "cds-overflow-menu-option, ibm-overflow-menu-option", inputs: ["divider", "type", "disabled", "href", "target", "innerClass"], outputs: ["selected"] }, { kind: "component", type: DocumentTemplateDeleteModalComponent, selector: "valtimo-document-template-delete-modal", inputs: ["deleteRowKeys", "showDeleteModal$"], outputs: ["deleteEvent"] }, { kind: "ngmodule", type: CarbonListModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: EditorModule }, { kind: "component", type: i3.EditorComponent, selector: "valtimo-editor", inputs: ["editorOptions", "model", "disabled", "formatOnLoad", "widthPx", "heightPx", "heightStyle", "jsonSchema", "fitPage", "fitPageExtraSpace"], outputs: ["validEvent", "valueChangeEvent"] }, { kind: "directive", type: RenderInPageHeaderDirective, selector: "[renderInPageHeader]", inputs: ["fullWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
665
+ }
666
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DocumentTemplateEditorComponent, decorators: [{
667
+ type: Component,
668
+ args: [{ standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, providers: [NotificationService], imports: [
669
+ CommonModule,
670
+ TranslateModule,
671
+ TabsModule,
672
+ DialogModule,
673
+ DocumentTemplateDeleteModalComponent,
674
+ CarbonListModule,
675
+ ButtonModule,
676
+ EditorModule,
677
+ RenderInPageHeaderDirective,
678
+ ], template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n *ngIf=\"{\n model: model$ | async,\n updatedModelValue: updatedModelValue$ | async,\n template: template$ | async,\n } as obs\">\n\n <div class=\"template-explanation\">\n @if (obs.template.type === 'pdf') {\n <p>\n <strong>PDF Templates</strong> use HTML in combination with\n <a href=\"https://freemarker.apache.org/docs/dgui_quickstart_basics.html\" target=\"_blank\"\n rel=\"noopener noreferrer\">\n FreeMarker\n </a>\n to define placeholders within the HTML structure. The FreeMarker data model is based on nested\n <a href=\"https://docs.valtimo.nl/features/value-resolvers\" target=\"_blank\" rel=\"noopener noreferrer\">\n Valtimo value resolvers\n </a>,\n but uses a slightly different syntax.\n </p>\n <p>\n For example, <code>$&#123;doc.firstName&#125;</code> retrieves the\n <code>firstName</code> value from the case.\n </p>\n <p>\n The notation <code>&lt;#list docs as doc&gt;...&lt;/#list&gt;</code> streams all documents in the\n current case.\n </p>\n } @else {\n <p>\n <strong>CSV Templates</strong> use a semicolon (<code>;</code>) as a separator.\n <a href=\"https://freemarker.apache.org/docs/dgui_quickstart_basics.html\" target=\"_blank\"\n rel=\"noopener noreferrer\">\n FreeMarker\n </a>\n is used to define placeholders within the CSV content. The FreeMarker data model is based on nested\n <a href=\"https://docs.valtimo.nl/features/value-resolvers\" target=\"_blank\" rel=\"noopener noreferrer\">\n Valtimo value resolvers\n </a>,\n but uses a slightly different syntax.\n </p>\n <p>\n For example, <code>$&#123;doc.firstName&#125;</code> retrieves the\n <code>firstName</code> value from the case.\n </p>\n <p>\n The notation <code>&lt;#list docs as doc&gt;...&lt;/#list&gt;</code> streams all documents in the\n current case.\n </p>\n }\n </div>\n\n <cds-tabs type=\"contained\">\n <cds-tab [active]=\"true\" [heading]=\"'Editor'\">\n <valtimo-editor\n [model]=\"obs.model\"\n [disabled]=\"(editorDisabled$ | async) || (readOnly$ | async)\"\n (validEvent)=\"onValid($event)\"\n (valueChangeEvent)=\"onValueChange($event)\"\n [fitPage]=\"true\"\n [fitPageExtraSpace]=\"80\"\n ></valtimo-editor>\n </cds-tab>\n <cds-tab [heading]=\"'Preview'\" (selected)=\"onSelectedTabPreview()\">\n <iframe title=\"Preview\" id=\"preview-iframe\">\n </iframe>\n </cds-tab>\n </cds-tabs>\n\n</ng-container>\n\n<ng-container renderInPageHeader>\n <ng-template>\n <div *ngIf=\"{\n model: model$ | async,\n moreDisabled: moreDisabled$ | async,\n template: template$ | async,\n } as obs\"\n class=\"buttons-container\"\n >\n <cds-overflow-menu class=\"overflow-button\">\n <cds-overflow-menu-option\n [disabled]=\"obs.moreDisabled || (readOnly$ | async)\"\n type=\"danger\"\n (selected)=\"showDeleteModal()\"\n >{{ 'interface.delete' | translate }}\n </cds-overflow-menu-option\n >\n </cds-overflow-menu>\n\n <button\n [disabled]=\"(saveDisabled$ | async) || (readOnly$ | async)\"\n cdsButton=\"primary\"\n size=\"md\"\n (click)=\"updateTemplate()\"\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<ng-container *ngIf=\"{templateKey: templateKey$ | async, templateType: templateType$ | async} as obs\">\n <valtimo-document-template-delete-modal\n [deleteRowKeys]=\"[{key: obs.templateKey, type: obs.templateType}]\"\n [showDeleteModal$]=\"showDeleteModal$\"\n (deleteEvent)=\"onDelete($event)\"\n >\n </valtimo-document-template-delete-modal>\n</ng-container>\n", styles: ["::ng-deep .cds--tab-content{background:var(--cds-layer)!important}::ng-deep #preview-iframe{width:100%;height:calc(100vh - 219px)}.loading-container{display:flex;width:100%;justify-content:center}.overflow-button{margin-right:16px}.buttons-container{display:flex;flex-direction:row}.template-explanation{margin-top:16px;margin-bottom:24px}\n/*!\n * Copyright 2015-2023 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"] }]
679
+ }], ctorParameters: () => [{ type: FreemarkerTemplateManagementService }, { type: i2$2.ActivatedRoute }, { type: i3.PageTitleService }, { type: i2$2.Router }, { type: i4.NotificationService }, { type: i5$1.TranslateService }, { type: i3.BreadcrumbService }, { type: i3$1.EnvironmentService }] });
680
+
681
+ /*
682
+ * Copyright 2015-2023 Ritense BV, the Netherlands.
683
+ *
684
+ * Licensed under EUPL, Version 1.2 (the "License");
685
+ * you may not use this file except in compliance with the License.
686
+ * You may obtain a copy of the License at
687
+ *
688
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
689
+ *
690
+ * Unless required by applicable law or agreed to in writing, software
691
+ * distributed under the License is distributed on an "AS IS" basis,
692
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
693
+ * See the License for the specific language governing permissions and
694
+ * limitations under the License.
695
+ */
696
+ const routes$2 = [
697
+ {
698
+ path: 'case-management/case/:caseDefinitionKey/version/:caseDefinitionVersionTag/document-template/:templateKey/:templateType',
699
+ component: DocumentTemplateEditorComponent,
700
+ canActivate: [AuthGuardService],
701
+ data: {
702
+ title: 'Document Template Editor',
703
+ templates: [ROLE_ADMIN],
704
+ customPageTitle: true,
705
+ },
706
+ },
707
+ ];
708
+ let TemplateManagementRoutingModule$2 = class TemplateManagementRoutingModule {
709
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TemplateManagementRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
710
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TemplateManagementRoutingModule, imports: [CommonModule, i2$2.RouterModule], exports: [RouterModule] }); }
711
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TemplateManagementRoutingModule, imports: [CommonModule, RouterModule.forChild(routes$2), RouterModule] }); }
712
+ };
713
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TemplateManagementRoutingModule$2, decorators: [{
714
+ type: NgModule,
715
+ args: [{
716
+ imports: [CommonModule, RouterModule.forChild(routes$2)],
717
+ exports: [RouterModule],
718
+ }]
719
+ }] });
720
+
721
+ /*
722
+ * Copyright 2015-2022 Ritense BV, the Netherlands.
723
+ *
724
+ * Licensed under EUPL, Version 1.2 (the "License");
725
+ * you may not use this file except in compliance with the License.
726
+ * You may obtain a copy of the License at
727
+ *
728
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
729
+ *
730
+ * Unless required by applicable law or agreed to in writing, software
731
+ * distributed under the License is distributed on an "AS IS" basis,
732
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
733
+ * See the License for the specific language governing permissions and
734
+ * limitations under the License.
735
+ */
736
+ class GenerateCsvComponent {
737
+ constructor(templateService) {
738
+ this.templateService = templateService;
739
+ this.valid = new EventEmitter();
740
+ this.configuration = new EventEmitter();
741
+ this.formValue$ = new BehaviorSubject(null);
742
+ this.valid$ = new BehaviorSubject(false);
743
+ this.loading$ = new BehaviorSubject(true);
744
+ this.templateListItems$ = new BehaviorSubject(undefined);
745
+ }
746
+ ngOnInit() {
747
+ this.loadTemplateListItems();
748
+ this.openSaveSubscription();
749
+ }
750
+ ngOnDestroy() {
751
+ this.saveSubscription?.unsubscribe();
752
+ }
753
+ formValueChange(formValue) {
754
+ this.formValue$.next(formValue);
755
+ this.handleValid(formValue);
756
+ }
757
+ loadTemplateListItems() {
758
+ this.context$.pipe(switchMap(([_, params]) => this.templateService.getAllTemplates(params.caseDefinitionKey, params.caseDefinitionVersionTag, 'csv')), map(results => results.content.map(template => ({
759
+ id: template.key,
760
+ text: template.key,
761
+ })))).subscribe(templateListItems => {
762
+ this.templateListItems$.next(templateListItems);
763
+ this.loading$.next(false);
764
+ });
765
+ }
766
+ handleValid(formValue) {
767
+ const valid = !!(formValue.templateKey && formValue.processVariableName);
768
+ this.valid$.next(valid);
769
+ this.valid.emit(valid);
770
+ }
771
+ openSaveSubscription() {
772
+ this.saveSubscription = this.save$?.subscribe(save => {
773
+ combineLatest([this.formValue$, this.valid$])
774
+ .pipe(take(1))
775
+ .subscribe(([formValue, valid]) => {
776
+ if (valid) {
777
+ this.configuration.emit(formValue);
778
+ }
779
+ });
780
+ });
781
+ }
782
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GenerateCsvComponent, deps: [{ token: FreemarkerTemplateManagementService }], target: i0.ɵɵFactoryTarget.Component }); }
783
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: GenerateCsvComponent, isStandalone: false, selector: "valtimo-generate-csv-configuration", inputs: { save$: "save$", disabled$: "disabled$", pluginId: "pluginId", prefillConfiguration$: "prefillConfiguration$", context$: "context$" }, outputs: { valid: "valid", configuration: "configuration" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2022 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefillConfiguration$ ? (prefillConfiguration$ | async) : null,\n templateListItems: templateListItems$ | async,\n loading: loading$ | async,\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <v-paragraph [margin]=\"true\" [italic]=\"true\">\n {{ 'generateDocumentFileDescription' | pluginTranslate: pluginId | async }}\n </v-paragraph>\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-select\n [items]=\"obs.templateListItems\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"templateKey\"\n [title]=\"'csvTemplateKey' | pluginTranslate: pluginId | async\"\n [disabled]=\"obs.disabled\"\n [defaultSelectionId]=\"obs.prefill?.templateKey\"\n [required]=\"true\"\n [loading]=\"!obs.templateListItems\"\n [tooltip]=\"'templateKeyTooltip' | pluginTranslate: pluginId | async\"\n ></v-select>\n <v-input\n name=\"processVariableName\"\n [title]=\"'processVariableName' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.prefill?.processVariableName || 'contentId'\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'processVariableNameTooltip' | pluginTranslate: pluginId | async\"\n ></v-input>\n </v-form>\n </ng-container>\n</ng-container>\n\n<ng-template #loading>\n <div class=\"loading-container\">\n <cds-loading></cds-loading>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { kind: "component", type: i3.ParagraphComponent, selector: "v-paragraph", inputs: ["center", "fullWidth", "margin", "italic", "loading", "dataTestId"] }, { kind: "component", type: i3.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "disabled", "dropUp", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "clearText", "clearable", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder", "smallMargin", "carbonTheme", "appendInline", "dataTestId"], outputs: ["selectedChange"] }, { kind: "component", type: i3.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "smallMargin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$", "carbonTheme", "placeholder", "dataTestId", "trim"], outputs: ["valueChange"] }, { kind: "component", type: i4.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.PluginTranslatePipe, name: "pluginTranslate" }] }); }
784
+ }
785
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GenerateCsvComponent, decorators: [{
786
+ type: Component,
787
+ args: [{ standalone: false, selector: 'valtimo-generate-csv-configuration', template: "<!--\n ~ Copyright 2015-2022 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefillConfiguration$ ? (prefillConfiguration$ | async) : null,\n templateListItems: templateListItems$ | async,\n loading: loading$ | async,\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <v-paragraph [margin]=\"true\" [italic]=\"true\">\n {{ 'generateDocumentFileDescription' | pluginTranslate: pluginId | async }}\n </v-paragraph>\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-select\n [items]=\"obs.templateListItems\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"templateKey\"\n [title]=\"'csvTemplateKey' | pluginTranslate: pluginId | async\"\n [disabled]=\"obs.disabled\"\n [defaultSelectionId]=\"obs.prefill?.templateKey\"\n [required]=\"true\"\n [loading]=\"!obs.templateListItems\"\n [tooltip]=\"'templateKeyTooltip' | pluginTranslate: pluginId | async\"\n ></v-select>\n <v-input\n name=\"processVariableName\"\n [title]=\"'processVariableName' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.prefill?.processVariableName || 'contentId'\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'processVariableNameTooltip' | pluginTranslate: pluginId | async\"\n ></v-input>\n </v-form>\n </ng-container>\n</ng-container>\n\n<ng-template #loading>\n <div class=\"loading-container\">\n <cds-loading></cds-loading>\n </div>\n</ng-template>\n" }]
788
+ }], ctorParameters: () => [{ type: FreemarkerTemplateManagementService }], propDecorators: { save$: [{
789
+ type: Input
790
+ }], disabled$: [{
791
+ type: Input
792
+ }], pluginId: [{
793
+ type: Input
794
+ }], prefillConfiguration$: [{
795
+ type: Input
796
+ }], context$: [{
797
+ type: Input
798
+ }], valid: [{
799
+ type: Output
800
+ }], configuration: [{
801
+ type: Output
802
+ }] } });
803
+
804
+ /*
805
+ * Copyright 2015-2022 Ritense BV, the Netherlands.
806
+ *
807
+ * Licensed under EUPL, Version 1.2 (the "License");
808
+ * you may not use this file except in compliance with the License.
809
+ * You may obtain a copy of the License at
810
+ *
811
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
812
+ *
813
+ * Unless required by applicable law or agreed to in writing, software
814
+ * distributed under the License is distributed on an "AS IS" basis,
815
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
816
+ * See the License for the specific language governing permissions and
817
+ * limitations under the License.
818
+ */
819
+ class GeneratePdfComponent {
820
+ constructor(templateService) {
821
+ this.templateService = templateService;
822
+ this.valid = new EventEmitter();
823
+ this.configuration = new EventEmitter();
824
+ this.formValue$ = new BehaviorSubject(null);
825
+ this.valid$ = new BehaviorSubject(false);
826
+ this.loading$ = new BehaviorSubject(true);
827
+ this.templateListItems$ = new BehaviorSubject(undefined);
828
+ }
829
+ ngOnInit() {
830
+ this.loadTemplateListItems();
831
+ this.openSaveSubscription();
832
+ }
833
+ ngOnDestroy() {
834
+ this.saveSubscription?.unsubscribe();
835
+ }
836
+ formValueChange(formValue) {
837
+ this.formValue$.next(formValue);
838
+ this.handleValid(formValue);
839
+ }
840
+ loadTemplateListItems() {
841
+ this.context$.pipe(switchMap(([_, params]) => this.templateService.getAllTemplates(params.caseDefinitionKey, params.caseDefinitionVersionTag, 'pdf')), map(results => results.content.map(template => ({
842
+ id: template.key,
843
+ text: template.key,
844
+ })))).subscribe(templateListItems => {
845
+ this.templateListItems$.next(templateListItems);
846
+ this.loading$.next(false);
847
+ });
848
+ }
849
+ handleValid(formValue) {
850
+ const valid = !!(formValue.templateKey && formValue.processVariableName);
851
+ this.valid$.next(valid);
852
+ this.valid.emit(valid);
853
+ }
854
+ openSaveSubscription() {
855
+ this.saveSubscription = this.save$?.subscribe(save => {
856
+ combineLatest([this.formValue$, this.valid$])
857
+ .pipe(take(1))
858
+ .subscribe(([formValue, valid]) => {
859
+ if (valid) {
860
+ this.configuration.emit(formValue);
861
+ }
862
+ });
863
+ });
864
+ }
865
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GeneratePdfComponent, deps: [{ token: FreemarkerTemplateManagementService }], target: i0.ɵɵFactoryTarget.Component }); }
866
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: GeneratePdfComponent, isStandalone: false, selector: "valtimo-generate-pdf-configuration", inputs: { save$: "save$", disabled$: "disabled$", pluginId: "pluginId", prefillConfiguration$: "prefillConfiguration$", context$: "context$" }, outputs: { valid: "valid", configuration: "configuration" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2022 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefillConfiguration$ ? (prefillConfiguration$ | async) : null,\n templateListItems: templateListItems$ | async,\n loading: loading$ | async,\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <v-paragraph [margin]=\"true\" [italic]=\"true\">\n {{ 'generateDocumentFileDescription' | pluginTranslate: pluginId | async }}\n </v-paragraph>\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-select\n [items]=\"obs.templateListItems\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"templateKey\"\n [title]=\"'pdfTemplateKey' | pluginTranslate: pluginId | async\"\n [disabled]=\"obs.disabled\"\n [defaultSelectionId]=\"obs.prefill?.templateKey\"\n [required]=\"true\"\n [loading]=\"!obs.templateListItems\"\n [tooltip]=\"'templateKeyTooltip' | pluginTranslate: pluginId | async\"\n ></v-select>\n <v-input\n name=\"processVariableName\"\n [title]=\"'processVariableName' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.prefill?.processVariableName || 'contentId'\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'processVariableNameTooltip' | pluginTranslate: pluginId | async\"\n ></v-input>\n </v-form>\n </ng-container>\n</ng-container>\n\n<ng-template #loading>\n <div class=\"loading-container\">\n <cds-loading></cds-loading>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { kind: "component", type: i3.ParagraphComponent, selector: "v-paragraph", inputs: ["center", "fullWidth", "margin", "italic", "loading", "dataTestId"] }, { kind: "component", type: i3.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "disabled", "dropUp", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "clearText", "clearable", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder", "smallMargin", "carbonTheme", "appendInline", "dataTestId"], outputs: ["selectedChange"] }, { kind: "component", type: i3.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "smallMargin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$", "carbonTheme", "placeholder", "dataTestId", "trim"], outputs: ["valueChange"] }, { kind: "component", type: i4.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.PluginTranslatePipe, name: "pluginTranslate" }] }); }
867
+ }
868
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GeneratePdfComponent, decorators: [{
869
+ type: Component,
870
+ args: [{ standalone: false, selector: 'valtimo-generate-pdf-configuration', template: "<!--\n ~ Copyright 2015-2022 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefillConfiguration$ ? (prefillConfiguration$ | async) : null,\n templateListItems: templateListItems$ | async,\n loading: loading$ | async,\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <v-paragraph [margin]=\"true\" [italic]=\"true\">\n {{ 'generateDocumentFileDescription' | pluginTranslate: pluginId | async }}\n </v-paragraph>\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-select\n [items]=\"obs.templateListItems\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"templateKey\"\n [title]=\"'pdfTemplateKey' | pluginTranslate: pluginId | async\"\n [disabled]=\"obs.disabled\"\n [defaultSelectionId]=\"obs.prefill?.templateKey\"\n [required]=\"true\"\n [loading]=\"!obs.templateListItems\"\n [tooltip]=\"'templateKeyTooltip' | pluginTranslate: pluginId | async\"\n ></v-select>\n <v-input\n name=\"processVariableName\"\n [title]=\"'processVariableName' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.prefill?.processVariableName || 'contentId'\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'processVariableNameTooltip' | pluginTranslate: pluginId | async\"\n ></v-input>\n </v-form>\n </ng-container>\n</ng-container>\n\n<ng-template #loading>\n <div class=\"loading-container\">\n <cds-loading></cds-loading>\n </div>\n</ng-template>\n" }]
871
+ }], ctorParameters: () => [{ type: FreemarkerTemplateManagementService }], propDecorators: { save$: [{
872
+ type: Input
873
+ }], disabled$: [{
874
+ type: Input
875
+ }], pluginId: [{
876
+ type: Input
877
+ }], prefillConfiguration$: [{
878
+ type: Input
879
+ }], context$: [{
880
+ type: Input
881
+ }], valid: [{
882
+ type: Output
883
+ }], configuration: [{
884
+ type: Output
885
+ }] } });
886
+
887
+ /*
888
+ * Copyright 2015-2022 Ritense BV, the Netherlands.
889
+ *
890
+ * Licensed under EUPL, Version 1.2 (the "License");
891
+ * you may not use this file except in compliance with the License.
892
+ * You may obtain a copy of the License at
893
+ *
894
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
895
+ *
896
+ * Unless required by applicable law or agreed to in writing, software
897
+ * distributed under the License is distributed on an "AS IS" basis,
898
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
899
+ * See the License for the specific language governing permissions and
900
+ * limitations under the License.
901
+ */
902
+ class DocumentGeneratorPluginModule {
903
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DocumentGeneratorPluginModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
904
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: DocumentGeneratorPluginModule, declarations: [GenerateCsvComponent,
905
+ GeneratePdfComponent,
906
+ DocumentGeneratorConfigurationComponent], imports: [CommonModule,
907
+ PluginTranslatePipeModule,
908
+ TemplateManagementRoutingModule$2,
909
+ FormModule,
910
+ ParagraphModule,
911
+ SelectModule,
912
+ ConfirmationModalModule,
913
+ TranslateModule,
914
+ ReactiveFormsModule,
915
+ CarbonListModule,
916
+ EditorModule,
917
+ InputModule$1,
918
+ ButtonModule,
919
+ DialogModule,
920
+ DropdownModule,
921
+ IconModule,
922
+ InputModule,
923
+ LoadingModule,
924
+ ModalModule,
925
+ NotificationModule,
926
+ RenderInPageHeaderDirective,
927
+ TabsModule], exports: [GenerateCsvComponent,
928
+ GeneratePdfComponent] }); }
929
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DocumentGeneratorPluginModule, providers: [
930
+ {
931
+ provide: CASE_MANAGEMENT_TAB_TOKEN,
932
+ useValue: {
933
+ translationKey: 'document-template',
934
+ component: DocumentTemplateListComponent,
935
+ },
936
+ multi: true,
937
+ }
938
+ ], imports: [CommonModule,
939
+ PluginTranslatePipeModule,
940
+ TemplateManagementRoutingModule$2,
941
+ FormModule,
942
+ ParagraphModule,
943
+ SelectModule,
944
+ ConfirmationModalModule,
945
+ TranslateModule,
946
+ ReactiveFormsModule,
947
+ CarbonListModule,
948
+ EditorModule,
949
+ InputModule$1,
950
+ ButtonModule,
951
+ DialogModule,
952
+ DropdownModule,
953
+ IconModule,
954
+ InputModule,
955
+ LoadingModule,
956
+ ModalModule,
957
+ NotificationModule,
958
+ TabsModule] }); }
959
+ }
960
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DocumentGeneratorPluginModule, decorators: [{
961
+ type: NgModule,
962
+ args: [{
963
+ declarations: [
964
+ GenerateCsvComponent,
965
+ GeneratePdfComponent,
966
+ DocumentGeneratorConfigurationComponent,
967
+ ],
968
+ imports: [
969
+ CommonModule,
970
+ PluginTranslatePipeModule,
971
+ TemplateManagementRoutingModule$2,
972
+ FormModule,
973
+ ParagraphModule,
974
+ SelectModule,
975
+ ConfirmationModalModule,
976
+ TranslateModule,
977
+ ReactiveFormsModule,
978
+ CarbonListModule,
979
+ EditorModule,
980
+ InputModule$1,
981
+ ButtonModule,
982
+ DialogModule,
983
+ DropdownModule,
984
+ IconModule,
985
+ InputModule,
986
+ LoadingModule,
987
+ ModalModule,
988
+ NotificationModule,
989
+ RenderInPageHeaderDirective,
990
+ TabsModule,
991
+ ],
992
+ exports: [
993
+ GenerateCsvComponent,
994
+ GeneratePdfComponent,
995
+ ],
996
+ providers: [
997
+ {
998
+ provide: CASE_MANAGEMENT_TAB_TOKEN,
999
+ useValue: {
1000
+ translationKey: 'document-template',
1001
+ component: DocumentTemplateListComponent,
1002
+ },
1003
+ multi: true,
1004
+ }
1005
+ ]
1006
+ }]
1007
+ }] });
1008
+
1009
+ /*
1010
+ * Copyright 2015-2022 Ritense BV, the Netherlands.
1011
+ *
1012
+ * Licensed under EUPL, Version 1.2 (the "License");
1013
+ * you may not use this file except in compliance with the License.
1014
+ * You may obtain a copy of the License at
1015
+ *
1016
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1017
+ *
1018
+ * Unless required by applicable law or agreed to in writing, software
1019
+ * distributed under the License is distributed on an "AS IS" basis,
1020
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1021
+ * See the License for the specific language governing permissions and
1022
+ * limitations under the License.
1023
+ */
1024
+ const DOCUMENT_GENERATOR_PLUGIN_LOGO_BASE64 = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjcuNTggMzAuODk0NyAzNzYuNjYxIDEzNS40NjU3IiB3aWR0aD0iMzc2LjY2MXB4IiBoZWlnaHQ9IjEzNS40NjU3cHgiPgogIDxwYXRoIGQ9Ik0gMzI3LjExNiAxNDUuODk4IEwgMzQwLjMwNCAxNjUuODkyIEwgMzg0LjI0MSA5OS4yNDYgTCAzNDAuMzA0IDMyLjYwMSBMIDMyNy4xMTYgNTIuNTk1IEwgMzU3Ljg4OCA5OS4yNDYgTCAzMjcuMTE2IDE0NS44OTggWiIgc3R5bGU9ImZpbGw6IHJnYigwLCA4MCwgMTc4KTsiIHRyYW5zZm9ybT0ibWF0cml4KDEsIDAsIDAsIDEsIDEuNDIxMDg1NDcxNTIwMjAwNGUtMTQsIDcuMTA1NDI3MzU3NjAxMDAyZS0xNSkiLz4KICA8cGF0aCBkPSJNIDY0LjcwMyA1Mi41OTUgTCA1MS41MTggMzIuNjAxIEwgNy41OCA5OS4yNDYgTCA1MS41MTggMTY1Ljg5MiBMIDY0LjcwMyAxNDUuODk4IEwgMzMuOTMzIDk5LjI0NiBMIDY0LjcwMyA1Mi41OTUgWiIgc3R5bGU9ImZpbGw6IHJnYigwLCA4MCwgMTc4KTsiIHRyYW5zZm9ybT0ibWF0cml4KDEsIDAsIDAsIDEsIDEuNDIxMDg1NDcxNTIwMjAwNGUtMTQsIDcuMTA1NDI3MzU3NjAxMDAyZS0xNSkiLz4KICA8cGF0aCBkPSJNIDExMi44NiAzMi42MDEgTCAxMzkuNTE4IDMyLjYwMSBMIDEzNC44MTUgNTkuMjYgTCAxNjEuNDc0IDU5LjI2IEwgMTY2LjE3NiAzMi42MDEgTCAxOTIuODM0IDMyLjYwMSBMIDE4OC4xMyA1OS4yNiBMIDIxNC43ODggNTkuMjYgTCAyMTAuMDc3IDg1LjkxNyBMIDE4My40MTggODUuOTE3IEwgMTc4LjcyMyAxMTIuNTc1IEwgMjA1LjM4MiAxMTIuNTc1IEwgMjAwLjY3OCAxMzkuMjMzIEwgMTc0LjAyMSAxMzkuMjMzIEwgMTY5LjMzNiAxNjUuODkyIEwgMTQyLjY3OSAxNjUuODkyIEwgMTQ3LjM3MyAxMzkuMjMzIEwgMTIwLjcxNSAxMzkuMjMzIEwgMTE2LjA5NyAxNjUuODkyIEwgODkuMzYyIDE2NS44OTIgTCA5NC4wNTYgMTM5LjIzMyBMIDY3LjM5OCAxMzkuMjMzIEwgNzIuMTAyIDExMi41NzUgTCA5OC43NiAxMTIuNTc1IEwgMTAzLjQ1NCA4NS45ODUgTCA3Ni43OTYgODUuOTg1IEwgODEuNDk4IDU5LjI2IEwgMTA4LjE1NyA1OS4yNiBMIDExMi44NiAzMi42MDEgWiBNIDEyNS40MTcgMTEyLjU3NSBMIDE1Mi4wNzYgMTEyLjU3NSBMIDE1Ni43NzkgODUuOTE3IEwgMTMwLjEyMSA4NS45MTcgTCAxMjUuNDE3IDExMi41NzUgWiIgc3R5bGU9ImZpbGw6IHJnYigwLCA4MCwgMTc4KTsiIHRyYW5zZm9ybT0ibWF0cml4KDEsIDAsIDAsIDEsIDEuNDIxMDg1NDcxNTIwMjAwNGUtMTQsIDcuMTA1NDI3MzU3NjAxMDAyZS0xNSkiLz4KICA8ZyBpZD0iQ2FwYV8xIiBzdHlsZT0iIiB0cmFuc2Zvcm09Im1hdHJpeCgwLjI0NTk0Mjk5NDk1MjIwMTg0LCAwLCAwLCAwLjI0NTk0Mjk5NDk1MjIwMTg0LCAxODcuNDA1ODUzMjcxNDg0MzgsIDU2LjI1NzYzNzAyMzkyNTc4KSI+CiAgICA8ZyB0cmFuc2Zvcm09Im1hdHJpeCgxLCAwLCAwLCAxLCA1OS40ODYxMTEsIC0xMDMuMTI1Mjc1KSI+CiAgICAgIDxwYXRoIGQ9Ik0xNjAuMzgxLDI4Mi4yMjVjMC0xNC44MzItMTAuMjk5LTIzLjY4NC0yOC40NzQtMjMuNjg0Yy03LjQxNCwwLTEyLjQzNywwLjcxNS0xNS4wNzEsMS40MzJWMzA3LjYgYzMuMTE0LDAuNzA3LDYuOTQyLDAuOTQ5LDEyLjE5MiwwLjk0OUMxNDguNDE5LDMwOC41NDksMTYwLjM4MSwyOTguNzQsMTYwLjM4MSwyODIuMjI1eiIvPgogICAgICA8cGF0aCBkPSJNMjcyLjg3NSwyNTkuMDE5Yy04LjE0NSwwLTEzLjM5NywwLjcxNy0xNi41MTksMS40MzV2MTA1LjUyM2MzLjExNiwwLjcyOSw4LjE0MiwwLjcyOSwxMi42OSwwLjcyOSBjMzMuMDE3LDAuMjMxLDU0LjU1NC0xNy45NDYsNTQuNTU0LTU2LjQ3NEMzMjMuODQyLDI3Ni43MTksMzA0LjIxNSwyNTkuMDE5LDI3Mi44NzUsMjU5LjAxOXoiLz4KICAgICAgPHBhdGggZD0iTTQ4OC40MjYsMTk3LjAxOUg0NzUuMnYtNjMuODE2YzAtMC4zOTgtMC4wNjMtMC43OTktMC4xMTYtMS4yMDJjLTAuMDIxLTIuNTM0LTAuODI3LTUuMDIzLTIuNTYyLTYuOTk1TDM2Ni4zMjUsMy42OTQgYy0wLjAzMi0wLjAzMS0wLjA2My0wLjA0Mi0wLjA4NS0wLjA3NmMtMC42MzMtMC43MDctMS4zNzEtMS4yOTUtMi4xNTEtMS44MDRjLTAuMjMxLTAuMTU1LTAuNDY0LTAuMjg1LTAuNzA2LTAuNDE5IGMtMC42NzYtMC4zNjktMS4zOTMtMC42NzUtMi4xMzEtMC44OTZjLTAuMi0wLjA1Ni0wLjM4LTAuMTM4LTAuNTgtMC4xOUMzNTkuODcsMC4xMTksMzU5LjAzNywwLDM1OC4xOTMsMEg5Ny4yIGMtMTEuOTE4LDAtMjEuNiw5LjY5My0yMS42LDIxLjYwMXYxNzUuNDEzSDYyLjM3N2MtMTcuMDQ5LDAtMzAuODczLDEzLjgxOC0zMC44NzMsMzAuODczdjE2MC41NDUgYzAsMTcuMDQzLDEzLjgyNCwzMC44NywzMC44NzMsMzAuODdoMTMuMjI0VjUyOS4yYzAsMTEuOTA3LDkuNjgyLDIxLjYwMSwyMS42LDIxLjYwMWgzNTYuNGMxMS45MDcsMCwyMS42LTkuNjkzLDIxLjYtMjEuNjAxIFY0MTkuMzAyaDEzLjIyNmMxNy4wNDQsMCwzMC44NzEtMTMuODI3LDMwLjg3MS0zMC44N3YtMTYwLjU0QzUxOS4yOTcsMjEwLjgzOCw1MDUuNDcsMTk3LjAxOSw0ODguNDI2LDE5Ny4wMTl6IE05Ny4yLDIxLjYwNSBoMjUwLjE5M3YxMTAuNTEzYzAsNS45NjcsNC44NDEsMTAuOCwxMC44LDEwLjhoOTUuNDA3djU0LjEwOEg5Ny4yVjIxLjYwNXogTTM2Mi4zNTksMzA5LjAyM2MwLDMwLjg3Ni0xMS4yNDMsNTIuMTY1LTI2LjgyLDY1LjMzMyBjLTE2Ljk3MSwxNC4xMTctNDIuODIsMjAuODE0LTc0LjM5NiwyMC44MTRjLTE4LjksMC0zMi4yOTctMS4xOTctNDEuNDAxLTIuMzg5VjIzNC4zNjVjMTMuMzk5LTIuMTQ5LDMwLjg3OC0zLjM0Niw0OS4zMDQtMy4zNDYgYzMwLjYxMiwwLDUwLjQ3OCw1LjUwOCw2Ni4wMzksMTcuMjI2QzM1MS44MjgsMjYwLjY5LDM2Mi4zNTksMjgwLjU0NywzNjIuMzU5LDMwOS4wMjN6IE04MC43LDM5My40OTlWMjM0LjM2NSBjMTEuMjQxLTEuOTA0LDI3LjA0Mi0zLjM0Niw0OS4yOTYtMy4zNDZjMjIuNDkxLDAsMzguNTI3LDQuMzA4LDQ5LjI5MSwxMi45MjhjMTAuMjkyLDguMTMxLDE3LjIxNSwyMS41MzQsMTcuMjE1LDM3LjMyOCBjMCwxNS43OTktNS4yNSwyOS4xOTgtMTQuODI5LDM4LjI4NWMtMTIuNDQyLDExLjcyOC0zMC44NjUsMTYuOTk2LTUyLjQwNywxNi45OTZjLTQuNzc4LDAtOS4xLTAuMjQzLTEyLjQzNS0wLjcyM3Y1Ny42N0g4MC43IFYzOTMuNDk5eiBNNDUzLjYwMSw1MjMuMzUzSDk3LjJWNDE5LjMwMmgzNTYuNFY1MjMuMzUzeiBNNDg0Ljg5OCwyNjIuMTI3aC02MS45ODl2MzYuODUxaDU3LjkxM3YyOS42NzRoLTU3LjkxM3Y2NC44NDhoLTM2LjU5MyBWMjMyLjIxNmg5OC41ODJWMjYyLjEyN3oiLz4KICAgIDwvZz4KICAgIDxnIHRyYW5zZm9ybT0ibWF0cml4KDEsIDAsIDAsIDEsIDU5LjQ4NjExMSwgLTEwMy4xMjUyNzUpIi8+CiAgICA8ZyB0cmFuc2Zvcm09Im1hdHJpeCgxLCAwLCAwLCAxLCA1OS40ODYxMTEsIC0xMDMuMTI1Mjc1KSIvPgogICAgPGcgdHJhbnNmb3JtPSJtYXRyaXgoMSwgMCwgMCwgMSwgNTkuNDg2MTExLCAtMTAzLjEyNTI3NSkiLz4KICAgIDxnIHRyYW5zZm9ybT0ibWF0cml4KDEsIDAsIDAsIDEsIDU5LjQ4NjExMSwgLTEwMy4xMjUyNzUpIi8+CiAgICA8ZyB0cmFuc2Zvcm09Im1hdHJpeCgxLCAwLCAwLCAxLCA1OS40ODYxMTEsIC0xMDMuMTI1Mjc1KSIvPgogICAgPGcgdHJhbnNmb3JtPSJtYXRyaXgoMSwgMCwgMCwgMSwgNTkuNDg2MTExLCAtMTAzLjEyNTI3NSkiLz4KICAgIDxnIHRyYW5zZm9ybT0ibWF0cml4KDEsIDAsIDAsIDEsIDU5LjQ4NjExMSwgLTEwMy4xMjUyNzUpIi8+CiAgICA8ZyB0cmFuc2Zvcm09Im1hdHJpeCgxLCAwLCAwLCAxLCA1OS40ODYxMTEsIC0xMDMuMTI1Mjc1KSIvPgogICAgPGcgdHJhbnNmb3JtPSJtYXRyaXgoMSwgMCwgMCwgMSwgNTkuNDg2MTExLCAtMTAzLjEyNTI3NSkiLz4KICAgIDxnIHRyYW5zZm9ybT0ibWF0cml4KDEsIDAsIDAsIDEsIDU5LjQ4NjExMSwgLTEwMy4xMjUyNzUpIi8+CiAgICA8ZyB0cmFuc2Zvcm09Im1hdHJpeCgxLCAwLCAwLCAxLCA1OS40ODYxMTEsIC0xMDMuMTI1Mjc1KSIvPgogICAgPGcgdHJhbnNmb3JtPSJtYXRyaXgoMSwgMCwgMCwgMSwgNTkuNDg2MTExLCAtMTAzLjEyNTI3NSkiLz4KICAgIDxnIHRyYW5zZm9ybT0ibWF0cml4KDEsIDAsIDAsIDEsIDU5LjQ4NjExMSwgLTEwMy4xMjUyNzUpIi8+CiAgICA8ZyB0cmFuc2Zvcm09Im1hdHJpeCgxLCAwLCAwLCAxLCA1OS40ODYxMTEsIC0xMDMuMTI1Mjc1KSIvPgogICAgPGcgdHJhbnNmb3JtPSJtYXRyaXgoMSwgMCwgMCwgMSwgNTkuNDg2MTExLCAtMTAzLjEyNTI3NSkiLz4KICA8L2c+Cjwvc3ZnPg==';
1025
+
1026
+ /*
1027
+ * Copyright 2015-2022 Ritense BV, the Netherlands.
1028
+ *
1029
+ * Licensed under EUPL, Version 1.2 (the "License");
1030
+ * you may not use this file except in compliance with the License.
1031
+ * You may obtain a copy of the License at
1032
+ *
1033
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1034
+ *
1035
+ * Unless required by applicable law or agreed to in writing, software
1036
+ * distributed under the License is distributed on an "AS IS" basis,
1037
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1038
+ * See the License for the specific language governing permissions and
1039
+ * limitations under the License.
1040
+ */
1041
+
1042
+ /*
1043
+ * Copyright 2015-2022 Ritense BV, the Netherlands.
1044
+ *
1045
+ * Licensed under EUPL, Version 1.2 (the "License");
1046
+ * you may not use this file except in compliance with the License.
1047
+ * You may obtain a copy of the License at
1048
+ *
1049
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1050
+ *
1051
+ * Unless required by applicable law or agreed to in writing, software
1052
+ * distributed under the License is distributed on an "AS IS" basis,
1053
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1054
+ * See the License for the specific language governing permissions and
1055
+ * limitations under the License.
1056
+ */
1057
+ const documentGeneratorPluginSpecification = {
1058
+ pluginId: 'document-generator',
1059
+ pluginConfigurationComponent: DocumentGeneratorConfigurationComponent,
1060
+ pluginLogoBase64: DOCUMENT_GENERATOR_PLUGIN_LOGO_BASE64,
1061
+ functionConfigurationComponents: {
1062
+ 'generate-csv': GenerateCsvComponent,
1063
+ 'generate-pdf': GeneratePdfComponent,
1064
+ },
1065
+ pluginTranslations: {
1066
+ nl: {
1067
+ title: 'Document generator',
1068
+ 'generate-csv': 'Genereer CSV-bestand',
1069
+ 'generate-pdf': 'Genereer PDF-bestand',
1070
+ description: 'Genereer PDF of CSV bestanden met Freemarker-sjablonen.',
1071
+ configurationTitle: 'Configuratienaam',
1072
+ configurationTitleTooltip: 'De naam van de huidige plug-inconfiguratie. Onder deze naam is de configuratie beschikbaar in de rest van de applicatie.',
1073
+ generateDocumentFileDescription: 'Deze actie genereert een bestand op basis van een Freemarker-sjabloon en slaat het resultaat op in een tijdelijk bestand. Het bestand-ID wordt opgeslagen in een procesvariabele.',
1074
+ csvTemplateKey: 'CSV-sjabloon',
1075
+ pdfTemplateKey: 'PDF-sjabloon',
1076
+ templateKeyTooltip: 'Dit bestand wordt gegenereerd op basis van dit Freemarker-sjabloon.',
1077
+ processVariableName: 'Procesvariabelenaam',
1078
+ processVariableNameTooltip: 'Het gegenereerde bestand wordt opgeslagen in een procesvariabele met deze naam.',
1079
+ },
1080
+ en: {
1081
+ title: 'Document generator',
1082
+ 'generate-csv': 'Generate CSV File',
1083
+ 'generate-pdf': 'Generate PDF File',
1084
+ description: 'Generate PDF or CSV files using Freemarker templates.',
1085
+ configurationTitle: 'Configuration Name',
1086
+ configurationTitleTooltip: 'The name of the current plug-in configuration. This name is used to reference the configuration throughout the application.',
1087
+ generateDocumentFileDescription: 'This action generates a file based on a Freemarker template and stores the result in a temporary file. The file ID is saved in a process variable.',
1088
+ csvTemplateKey: 'CSV Template',
1089
+ pdfTemplateKey: 'PDF Template',
1090
+ templateKeyTooltip: 'The file will be generated based on this Freemarker template.',
1091
+ processVariableName: 'Process Variable Name',
1092
+ processVariableNameTooltip: 'The generated file will be stored in a process variable with this name.',
1093
+ },
1094
+ de: {
1095
+ title: 'Document generator',
1096
+ 'generate-csv': 'CSV-Datei generieren',
1097
+ 'generate-pdf': 'PDF-Datei generieren',
1098
+ description: 'PDF oder CSV Dateien mit Freemarker-Vorlagen generieren.',
1099
+ configurationTitle: 'Konfigurationsname',
1100
+ configurationTitleTooltip: 'Der Name der aktuellen Plug-in-Konfiguration. Diese Konfiguration kann unter diesem Namen in der gesamten Anwendung verwendet werden.',
1101
+ generateDocumentFileDescription: 'Diese Aktion erstellt eine Datei basierend auf einer Freemarker-Vorlage und speichert das Ergebnis in einer temporären Datei. Die Datei-ID wird in einer Prozessvariablen gespeichert.',
1102
+ csvTemplateKey: 'CSV-Vorlage',
1103
+ pdfTemplateKey: 'PDF-Vorlage',
1104
+ templateKeyTooltip: 'Die Datei wird basierend auf dieser Freemarker-Vorlage generiert.',
1105
+ processVariableName: 'Prozessvariablenname',
1106
+ processVariableNameTooltip: 'Die generierte Datei wird in einer Prozessvariablen mit diesem Namen gespeichert.',
1107
+ },
1108
+ },
1109
+ };
1110
+
25
1111
  /*
26
1112
  * Copyright 2015-2022 Ritense BV, the Netherlands.
27
1113
  *
@@ -105,10 +1191,10 @@ class MailTemplateConfigurationComponent {
105
1191
  }
106
1192
  injectCaseTab() {
107
1193
  }
108
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MailTemplateConfigurationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
109
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: MailTemplateConfigurationComponent, isStandalone: false, selector: "valtimo-mail-template-configuration", inputs: { save$: "save$", disabled$: "disabled$", pluginId: "pluginId", prefillConfiguration$: "prefillConfiguration$" }, outputs: { valid: "valid", configuration: "configuration" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2022 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<v-form\n (valueChange)=\"formValueChange($event)\"\n *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefillConfiguration$ ? (prefillConfiguration$ | async) : null\n } as obs\"\n>\n <v-input\n name=\"configurationTitle\"\n [title]=\"'configurationTitle' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.configurationTitle\"\n [required]=\"true\"\n [tooltip]=\"'configurationTitleTooltip' | pluginTranslate: pluginId | async\"\n [widthPx]=\"350\"\n placeholder=\"Mail Template Plugin\"\n >\n </v-input>\n</v-form>\n", dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { kind: "component", type: i1.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "smallMargin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$", "carbonTheme", "placeholder", "dataTestId", "trim"], outputs: ["valueChange"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.PluginTranslatePipe, name: "pluginTranslate" }] }); }
1194
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MailTemplateConfigurationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1195
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: MailTemplateConfigurationComponent, isStandalone: false, selector: "valtimo-mail-template-configuration", inputs: { save$: "save$", disabled$: "disabled$", pluginId: "pluginId", prefillConfiguration$: "prefillConfiguration$" }, outputs: { valid: "valid", configuration: "configuration" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2022 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<v-form\n (valueChange)=\"formValueChange($event)\"\n *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefillConfiguration$ ? (prefillConfiguration$ | async) : null\n } as obs\"\n>\n <v-input\n name=\"configurationTitle\"\n [title]=\"'configurationTitle' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.configurationTitle\"\n [required]=\"true\"\n [tooltip]=\"'configurationTitleTooltip' | pluginTranslate: pluginId | async\"\n [widthPx]=\"350\"\n placeholder=\"Mail Template Plugin\"\n >\n </v-input>\n</v-form>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { kind: "component", type: i3.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "smallMargin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$", "carbonTheme", "placeholder", "dataTestId", "trim"], outputs: ["valueChange"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.PluginTranslatePipe, name: "pluginTranslate" }] }); }
110
1196
  }
111
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MailTemplateConfigurationComponent, decorators: [{
1197
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MailTemplateConfigurationComponent, decorators: [{
112
1198
  type: Component,
113
1199
  args: [{ standalone: false, selector: 'valtimo-mail-template-configuration', template: "<!--\n ~ Copyright 2015-2022 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<v-form\n (valueChange)=\"formValueChange($event)\"\n *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefillConfiguration$ ? (prefillConfiguration$ | async) : null\n } as obs\"\n>\n <v-input\n name=\"configurationTitle\"\n [title]=\"'configurationTitle' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.configurationTitle\"\n [required]=\"true\"\n [tooltip]=\"'configurationTitleTooltip' | pluginTranslate: pluginId | async\"\n [widthPx]=\"350\"\n placeholder=\"Mail Template Plugin\"\n >\n </v-input>\n</v-form>\n" }]
114
1200
  }], ctorParameters: () => [], propDecorators: { save$: [{
@@ -125,100 +1211,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
125
1211
  type: Output
126
1212
  }] } });
127
1213
 
128
- /*
129
- * Copyright 2015-2024 Ritense BV, the Netherlands.
130
- *
131
- * Licensed under EUPL, Version 1.2 (the "License");
132
- * you may not use this file except in compliance with the License.
133
- * You may obtain a copy of the License at
134
- *
135
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
136
- *
137
- * Unless required by applicable law or agreed to in writing, software
138
- * distributed under the License is distributed on an "AS IS" basis,
139
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
140
- * See the License for the specific language governing permissions and
141
- * limitations under the License.
142
- */
143
- class FreemarkerTemplateManagementService {
144
- constructor(configService, http) {
145
- this.configService = configService;
146
- this.http = http;
147
- this.valtimoEndpointUri = `${this.configService.config.valtimoApi.endpointUri}management/`;
148
- }
149
- getAllMailTemplates(caseDefinitionKey, caseDefinitionVersionTag) {
150
- return this.getTemplates(caseDefinitionKey, caseDefinitionVersionTag, 'mail', undefined, 0, 10000);
151
- }
152
- getAllTextTemplates(caseDefinitionKey, caseDefinitionVersionTag) {
153
- return this.getTemplates(caseDefinitionKey, caseDefinitionVersionTag, 'text', undefined, 0, 10000);
154
- }
155
- getTemplates(caseDefinitionKey, caseDefinitionVersionTag, templateType, templateKey, page, pageSize) {
156
- const params = {
157
- caseDefinitionKey,
158
- caseDefinitionVersionTag,
159
- templateType,
160
- templateKey,
161
- page,
162
- size: pageSize
163
- };
164
- Object.keys(params).forEach(key => {
165
- if (params[key] == undefined) {
166
- delete params[key];
167
- }
168
- });
169
- return this.http.get(`${this.valtimoEndpointUri}v1/template`, { params });
170
- }
171
- getMailTemplate(caseDefinitionKey, caseDefinitionVersionTag, key) {
172
- return this.getTemplate(caseDefinitionKey, caseDefinitionVersionTag, 'mail', key);
173
- }
174
- getTextTemplate(caseDefinitionKey, caseDefinitionVersionTag, key) {
175
- return this.getTemplate(caseDefinitionKey, caseDefinitionVersionTag, 'text', key);
176
- }
177
- getTemplate(caseDefinitionKey, caseDefinitionVersionTag, templateType, key) {
178
- return this.http.get(`${this.valtimoEndpointUri}v1/case-definition/${caseDefinitionKey}/version/${caseDefinitionVersionTag}/template-type/${templateType}/template/${key}`);
179
- }
180
- addTemplate(template) {
181
- return this.http.post(`${this.valtimoEndpointUri}v1/template`, template);
182
- }
183
- deleteTemplates(request) {
184
- return this.http.delete(`${this.valtimoEndpointUri}v1/template`, { body: request });
185
- }
186
- updateTemplate(template) {
187
- return this.http.put(`${this.valtimoEndpointUri}v1/template`, template);
188
- }
189
- isFinal(caseDefinitionKey, caseDefinitionVersionTag) {
190
- return this.http
191
- .get(`${this.valtimoEndpointUri}v1/case-definition/${caseDefinitionKey}/version/${caseDefinitionVersionTag}`, {
192
- headers: new HttpHeaders().set(InterceptorSkip, '403'),
193
- })
194
- .pipe(map(caseDefinition => caseDefinition.final));
195
- }
196
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FreemarkerTemplateManagementService, deps: [{ token: i3.ConfigService }, { token: i2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
197
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FreemarkerTemplateManagementService, providedIn: 'root' }); }
198
- }
199
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FreemarkerTemplateManagementService, decorators: [{
200
- type: Injectable,
201
- args: [{
202
- providedIn: 'root',
203
- }]
204
- }], ctorParameters: () => [{ type: i3.ConfigService }, { type: i2.HttpClient }] });
205
-
206
- /*
207
- * Copyright 2015-2024 Ritense BV, the Netherlands.
208
- *
209
- * Licensed under EUPL, Version 1.2 (the "License");
210
- * you may not use this file except in compliance with the License.
211
- * You may obtain a copy of the License at
212
- *
213
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
214
- *
215
- * Unless required by applicable law or agreed to in writing, software
216
- * distributed under the License is distributed on an "AS IS" basis,
217
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
218
- * See the License for the specific language governing permissions and
219
- * limitations under the License.
220
- */
221
-
222
1214
  /*
223
1215
  * Copyright 2015-2022 Ritense BV, the Netherlands.
224
1216
  *
@@ -235,34 +1227,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
235
1227
  * limitations under the License.
236
1228
  */
237
1229
  class GenerateMailContentComponent {
238
- constructor(modalService, documentService, templateService) {
239
- this.modalService = modalService;
240
- this.documentService = documentService;
1230
+ constructor(templateService) {
241
1231
  this.templateService = templateService;
242
1232
  this.valid = new EventEmitter();
243
1233
  this.configuration = new EventEmitter();
244
1234
  this.formValue$ = new BehaviorSubject(null);
245
1235
  this.valid$ = new BehaviorSubject(false);
1236
+ this._subscriptions = new Subscription();
246
1237
  this.loading$ = new BehaviorSubject(true);
247
- this.mailTemplateItems$ = this.modalService.modalData$.pipe(switchMap(params => this.documentService.findProcessDocumentDefinitionsByProcessDefinitionKey(params?.processDefinitionKey)), switchMap(processDocumentDefinitions => combineLatest([
248
- of({ content: [] }),
249
- ...processDocumentDefinitions.map(processDocumentDefinition => this.templateService.getAllMailTemplates(processDocumentDefinition.id.documentDefinitionId.name)),
250
- ])), map(results => {
251
- return results
252
- .flatMap(result => result.content)
253
- .map(template => ({
254
- id: template.key,
255
- text: template.key,
256
- }));
257
- }), tap(() => {
258
- this.loading$.next(false);
259
- }));
1238
+ this.mailTemplateItems$ = new BehaviorSubject([]);
260
1239
  }
261
1240
  ngOnInit() {
262
1241
  this.openSaveSubscription();
1242
+ this.initContextHandling();
263
1243
  }
264
1244
  ngOnDestroy() {
265
- this.saveSubscription?.unsubscribe();
1245
+ this._subscriptions.unsubscribe();
266
1246
  }
267
1247
  formValueChange(formValue) {
268
1248
  this.formValue$.next(formValue);
@@ -274,7 +1254,7 @@ class GenerateMailContentComponent {
274
1254
  this.valid.emit(valid);
275
1255
  }
276
1256
  openSaveSubscription() {
277
- this.saveSubscription = this.save$?.subscribe(save => {
1257
+ const saveSubscription = this.save$?.subscribe(save => {
278
1258
  combineLatest([this.formValue$, this.valid$])
279
1259
  .pipe(take(1))
280
1260
  .subscribe(([formValue, valid]) => {
@@ -283,19 +1263,41 @@ class GenerateMailContentComponent {
283
1263
  }
284
1264
  });
285
1265
  });
1266
+ this._subscriptions.add(saveSubscription);
286
1267
  }
287
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GenerateMailContentComponent, deps: [{ token: i1.ModalService }, { token: i2$1.DocumentService }, { token: FreemarkerTemplateManagementService }], target: i0.ɵɵFactoryTarget.Component }); }
288
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: GenerateMailContentComponent, isStandalone: false, selector: "valtimo-generate-mail-content-configuration", inputs: { save$: "save$", disabled$: "disabled$", pluginId: "pluginId", prefillConfiguration$: "prefillConfiguration$" }, outputs: { valid: "valid", configuration: "configuration" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2022 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefillConfiguration$ ? (prefillConfiguration$ | async) : null,\n mailTemplateItems: mailTemplateItems$ | async,\n loading: loading$ | async,\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <v-paragraph [margin]=\"true\" [italic]=\"true\">\n {{ 'generateMailContentDescription' | pluginTranslate: pluginId | async }}\n </v-paragraph>\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-select\n [items]=\"obs.mailTemplateItems\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"mailTemplateKey\"\n [title]=\"'mailTemplateKey' | pluginTranslate: pluginId | async\"\n [disabled]=\"obs.disabled\"\n [defaultSelectionId]=\"obs.prefill?.mailTemplateKey\"\n [required]=\"true\"\n [loading]=\"!obs.mailTemplateItems\"\n [tooltip]=\"'mailTemplateKeyTooltip' | pluginTranslate: pluginId | async\"\n ></v-select>\n <v-input\n name=\"processVariableName\"\n [title]=\"'processVariableName' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.prefill?.processVariableName || 'content'\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'processVariableNameTooltip' | pluginTranslate: pluginId | async\"\n ></v-input>\n </v-form>\n </ng-container>\n</ng-container>\n\n<ng-template #loading>\n <div class=\"loading-container\">\n <cds-loading></cds-loading>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { kind: "component", type: i1.ParagraphComponent, selector: "v-paragraph", inputs: ["center", "fullWidth", "margin", "italic", "loading", "dataTestId"] }, { kind: "component", type: i1.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "disabled", "dropUp", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "clearText", "clearable", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder", "smallMargin", "carbonTheme", "appendInline", "dataTestId"], outputs: ["selectedChange"] }, { kind: "component", type: i1.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "smallMargin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$", "carbonTheme", "placeholder", "dataTestId", "trim"], outputs: ["valueChange"] }, { kind: "component", type: i4$1.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.PluginTranslatePipe, name: "pluginTranslate" }] }); }
1268
+ initContextHandling() {
1269
+ if (!this.context$) {
1270
+ return;
1271
+ }
1272
+ const contextSub = this.context$.pipe(switchMap(([managementContext, caseDefinitionId]) => {
1273
+ if (managementContext == 'case') {
1274
+ return this.templateService.getAllMailTemplates(caseDefinitionId?.caseDefinitionKey, caseDefinitionId?.caseDefinitionVersionTag);
1275
+ }
1276
+ else {
1277
+ console.error('Freemarker plugin does not support global templates');
1278
+ return of(null);
1279
+ }
1280
+ }), map(results => results?.content.map(template => ({
1281
+ id: template.key,
1282
+ text: template.key,
1283
+ })) || []), tap(() => this.loading$.next(false)))
1284
+ .subscribe(results => this.mailTemplateItems$.next(results));
1285
+ this._subscriptions.add(contextSub);
1286
+ }
1287
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GenerateMailContentComponent, deps: [{ token: FreemarkerTemplateManagementService }], target: i0.ɵɵFactoryTarget.Component }); }
1288
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: GenerateMailContentComponent, isStandalone: false, selector: "valtimo-generate-mail-content-configuration", inputs: { save$: "save$", disabled$: "disabled$", pluginId: "pluginId", context$: "context$", prefillConfiguration$: "prefillConfiguration$" }, outputs: { valid: "valid", configuration: "configuration" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2022 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefillConfiguration$ ? (prefillConfiguration$ | async) : null,\n mailTemplateItems: mailTemplateItems$ | async,\n loading: loading$ | async,\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <v-paragraph [margin]=\"true\" [italic]=\"true\">\n {{ 'generateMailContentDescription' | pluginTranslate: pluginId | async }}\n </v-paragraph>\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-select\n [items]=\"obs.mailTemplateItems\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"mailTemplateKey\"\n [title]=\"'mailTemplateKey' | pluginTranslate: pluginId | async\"\n [disabled]=\"obs.disabled\"\n [defaultSelectionId]=\"obs.prefill?.mailTemplateKey\"\n [required]=\"true\"\n [loading]=\"!obs.mailTemplateItems\"\n [tooltip]=\"'mailTemplateKeyTooltip' | pluginTranslate: pluginId | async\"\n ></v-select>\n <v-input\n name=\"processVariableName\"\n [title]=\"'processVariableName' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.prefill?.processVariableName || 'content'\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'processVariableNameTooltip' | pluginTranslate: pluginId | async\"\n ></v-input>\n </v-form>\n </ng-container>\n</ng-container>\n\n<ng-template #loading>\n <div class=\"loading-container\">\n <cds-loading></cds-loading>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { kind: "component", type: i3.ParagraphComponent, selector: "v-paragraph", inputs: ["center", "fullWidth", "margin", "italic", "loading", "dataTestId"] }, { kind: "component", type: i3.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "disabled", "dropUp", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "clearText", "clearable", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder", "smallMargin", "carbonTheme", "appendInline", "dataTestId"], outputs: ["selectedChange"] }, { kind: "component", type: i3.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "smallMargin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$", "carbonTheme", "placeholder", "dataTestId", "trim"], outputs: ["valueChange"] }, { kind: "component", type: i4.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.PluginTranslatePipe, name: "pluginTranslate" }] }); }
289
1289
  }
290
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GenerateMailContentComponent, decorators: [{
1290
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GenerateMailContentComponent, decorators: [{
291
1291
  type: Component,
292
1292
  args: [{ standalone: false, selector: 'valtimo-generate-mail-content-configuration', template: "<!--\n ~ Copyright 2015-2022 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefillConfiguration$ ? (prefillConfiguration$ | async) : null,\n mailTemplateItems: mailTemplateItems$ | async,\n loading: loading$ | async,\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <v-paragraph [margin]=\"true\" [italic]=\"true\">\n {{ 'generateMailContentDescription' | pluginTranslate: pluginId | async }}\n </v-paragraph>\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-select\n [items]=\"obs.mailTemplateItems\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"mailTemplateKey\"\n [title]=\"'mailTemplateKey' | pluginTranslate: pluginId | async\"\n [disabled]=\"obs.disabled\"\n [defaultSelectionId]=\"obs.prefill?.mailTemplateKey\"\n [required]=\"true\"\n [loading]=\"!obs.mailTemplateItems\"\n [tooltip]=\"'mailTemplateKeyTooltip' | pluginTranslate: pluginId | async\"\n ></v-select>\n <v-input\n name=\"processVariableName\"\n [title]=\"'processVariableName' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.prefill?.processVariableName || 'content'\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'processVariableNameTooltip' | pluginTranslate: pluginId | async\"\n ></v-input>\n </v-form>\n </ng-container>\n</ng-container>\n\n<ng-template #loading>\n <div class=\"loading-container\">\n <cds-loading></cds-loading>\n </div>\n</ng-template>\n" }]
293
- }], ctorParameters: () => [{ type: i1.ModalService }, { type: i2$1.DocumentService }, { type: FreemarkerTemplateManagementService }], propDecorators: { save$: [{
1293
+ }], ctorParameters: () => [{ type: FreemarkerTemplateManagementService }], propDecorators: { save$: [{
294
1294
  type: Input
295
1295
  }], disabled$: [{
296
1296
  type: Input
297
1297
  }], pluginId: [{
298
1298
  type: Input
1299
+ }], context$: [{
1300
+ type: Input
299
1301
  }], prefillConfiguration$: [{
300
1302
  type: Input
301
1303
  }], valid: [{
@@ -320,34 +1322,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
320
1322
  * limitations under the License.
321
1323
  */
322
1324
  class GenerateMailFileComponent {
323
- constructor(modalService, documentService, templateService) {
324
- this.modalService = modalService;
325
- this.documentService = documentService;
1325
+ constructor(templateService) {
326
1326
  this.templateService = templateService;
327
1327
  this.valid = new EventEmitter();
328
1328
  this.configuration = new EventEmitter();
329
1329
  this.formValue$ = new BehaviorSubject(null);
330
1330
  this.valid$ = new BehaviorSubject(false);
1331
+ this._subscriptions = new Subscription();
331
1332
  this.loading$ = new BehaviorSubject(true);
332
- this.mailTemplateItems$ = this.modalService.modalData$.pipe(switchMap(params => this.documentService.findProcessDocumentDefinitionsByProcessDefinitionKey(params?.processDefinitionKey)), switchMap(processDocumentDefinitions => combineLatest([
333
- of({ content: [] }),
334
- ...processDocumentDefinitions.map(processDocumentDefinition => this.templateService.getAllMailTemplates(processDocumentDefinition.id.documentDefinitionId.name)),
335
- ])), map(results => {
336
- return results
337
- .flatMap(result => result.content)
338
- .map(template => ({
339
- id: template.key,
340
- text: template.key,
341
- }));
342
- }), tap(() => {
343
- this.loading$.next(false);
344
- }));
1333
+ this.mailTemplateItems$ = new BehaviorSubject([]);
345
1334
  }
346
1335
  ngOnInit() {
347
1336
  this.openSaveSubscription();
1337
+ this.initContextHandling();
348
1338
  }
349
1339
  ngOnDestroy() {
350
- this.saveSubscription?.unsubscribe();
1340
+ this._subscriptions.unsubscribe();
351
1341
  }
352
1342
  formValueChange(formValue) {
353
1343
  this.formValue$.next(formValue);
@@ -359,7 +1349,7 @@ class GenerateMailFileComponent {
359
1349
  this.valid.emit(valid);
360
1350
  }
361
1351
  openSaveSubscription() {
362
- this.saveSubscription = this.save$?.subscribe(save => {
1352
+ const saveSubscription = this.save$?.subscribe(save => {
363
1353
  combineLatest([this.formValue$, this.valid$])
364
1354
  .pipe(take(1))
365
1355
  .subscribe(([formValue, valid]) => {
@@ -368,19 +1358,41 @@ class GenerateMailFileComponent {
368
1358
  }
369
1359
  });
370
1360
  });
1361
+ this._subscriptions.add(saveSubscription);
371
1362
  }
372
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GenerateMailFileComponent, deps: [{ token: i1.ModalService }, { token: i2$1.DocumentService }, { token: FreemarkerTemplateManagementService }], target: i0.ɵɵFactoryTarget.Component }); }
373
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: GenerateMailFileComponent, isStandalone: false, selector: "valtimo-generate-mail-file-configuration", inputs: { save$: "save$", disabled$: "disabled$", pluginId: "pluginId", prefillConfiguration$: "prefillConfiguration$" }, outputs: { valid: "valid", configuration: "configuration" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2022 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefillConfiguration$ ? (prefillConfiguration$ | async) : null,\n mailTemplateItems: mailTemplateItems$ | async,\n loading: loading$ | async,\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <v-paragraph [margin]=\"true\" [italic]=\"true\">\n {{ 'generateMailFileDescription' | pluginTranslate: pluginId | async }}\n </v-paragraph>\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-select\n [items]=\"obs.mailTemplateItems\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"mailTemplateKey\"\n [title]=\"'mailTemplateKey' | pluginTranslate: pluginId | async\"\n [disabled]=\"obs.disabled\"\n [defaultSelectionId]=\"obs.prefill?.mailTemplateKey\"\n [required]=\"true\"\n [loading]=\"!obs.mailTemplateItems\"\n [tooltip]=\"'mailTemplateKeyTooltip' | pluginTranslate: pluginId | async\"\n ></v-select>\n <v-input\n name=\"processVariableName\"\n [title]=\"'processVariableName' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.prefill?.processVariableName || 'contentId'\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'processVariableNameTooltip' | pluginTranslate: pluginId | async\"\n ></v-input>\n </v-form>\n </ng-container>\n</ng-container>\n\n<ng-template #loading>\n <div class=\"loading-container\">\n <cds-loading></cds-loading>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { kind: "component", type: i1.ParagraphComponent, selector: "v-paragraph", inputs: ["center", "fullWidth", "margin", "italic", "loading", "dataTestId"] }, { kind: "component", type: i1.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "disabled", "dropUp", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "clearText", "clearable", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder", "smallMargin", "carbonTheme", "appendInline", "dataTestId"], outputs: ["selectedChange"] }, { kind: "component", type: i1.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "smallMargin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$", "carbonTheme", "placeholder", "dataTestId", "trim"], outputs: ["valueChange"] }, { kind: "component", type: i4$1.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.PluginTranslatePipe, name: "pluginTranslate" }] }); }
1363
+ initContextHandling() {
1364
+ if (!this.context$) {
1365
+ return;
1366
+ }
1367
+ const contextSub = this.context$.pipe(switchMap(([managementContext, caseDefinitionId]) => {
1368
+ if (managementContext == 'case') {
1369
+ return this.templateService.getAllMailTemplates(caseDefinitionId?.caseDefinitionKey, caseDefinitionId?.caseDefinitionVersionTag);
1370
+ }
1371
+ else {
1372
+ console.error('Freemarker plugin does not support global templates');
1373
+ return of(null);
1374
+ }
1375
+ }), map(results => results?.content.map(template => ({
1376
+ id: template.key,
1377
+ text: template.key,
1378
+ })) || []), tap(() => this.loading$.next(false)))
1379
+ .subscribe(results => this.mailTemplateItems$.next(results));
1380
+ this._subscriptions.add(contextSub);
1381
+ }
1382
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GenerateMailFileComponent, deps: [{ token: FreemarkerTemplateManagementService }], target: i0.ɵɵFactoryTarget.Component }); }
1383
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: GenerateMailFileComponent, isStandalone: false, selector: "valtimo-generate-mail-file-configuration", inputs: { save$: "save$", disabled$: "disabled$", pluginId: "pluginId", context$: "context$", prefillConfiguration$: "prefillConfiguration$" }, outputs: { valid: "valid", configuration: "configuration" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2022 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefillConfiguration$ ? (prefillConfiguration$ | async) : null,\n mailTemplateItems: mailTemplateItems$ | async,\n loading: loading$ | async,\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <v-paragraph [margin]=\"true\" [italic]=\"true\">\n {{ 'generateMailFileDescription' | pluginTranslate: pluginId | async }}\n </v-paragraph>\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-select\n [items]=\"obs.mailTemplateItems\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"mailTemplateKey\"\n [title]=\"'mailTemplateKey' | pluginTranslate: pluginId | async\"\n [disabled]=\"obs.disabled\"\n [defaultSelectionId]=\"obs.prefill?.mailTemplateKey\"\n [required]=\"true\"\n [loading]=\"!obs.mailTemplateItems\"\n [tooltip]=\"'mailTemplateKeyTooltip' | pluginTranslate: pluginId | async\"\n ></v-select>\n <v-input\n name=\"processVariableName\"\n [title]=\"'processVariableName' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.prefill?.processVariableName || 'contentId'\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'processVariableNameTooltip' | pluginTranslate: pluginId | async\"\n ></v-input>\n </v-form>\n </ng-container>\n</ng-container>\n\n<ng-template #loading>\n <div class=\"loading-container\">\n <cds-loading></cds-loading>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { kind: "component", type: i3.ParagraphComponent, selector: "v-paragraph", inputs: ["center", "fullWidth", "margin", "italic", "loading", "dataTestId"] }, { kind: "component", type: i3.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "disabled", "dropUp", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "clearText", "clearable", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder", "smallMargin", "carbonTheme", "appendInline", "dataTestId"], outputs: ["selectedChange"] }, { kind: "component", type: i3.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "smallMargin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$", "carbonTheme", "placeholder", "dataTestId", "trim"], outputs: ["valueChange"] }, { kind: "component", type: i4.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.PluginTranslatePipe, name: "pluginTranslate" }] }); }
374
1384
  }
375
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GenerateMailFileComponent, decorators: [{
1385
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GenerateMailFileComponent, decorators: [{
376
1386
  type: Component,
377
1387
  args: [{ standalone: false, selector: 'valtimo-generate-mail-file-configuration', template: "<!--\n ~ Copyright 2015-2022 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefillConfiguration$ ? (prefillConfiguration$ | async) : null,\n mailTemplateItems: mailTemplateItems$ | async,\n loading: loading$ | async,\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <v-paragraph [margin]=\"true\" [italic]=\"true\">\n {{ 'generateMailFileDescription' | pluginTranslate: pluginId | async }}\n </v-paragraph>\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-select\n [items]=\"obs.mailTemplateItems\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"mailTemplateKey\"\n [title]=\"'mailTemplateKey' | pluginTranslate: pluginId | async\"\n [disabled]=\"obs.disabled\"\n [defaultSelectionId]=\"obs.prefill?.mailTemplateKey\"\n [required]=\"true\"\n [loading]=\"!obs.mailTemplateItems\"\n [tooltip]=\"'mailTemplateKeyTooltip' | pluginTranslate: pluginId | async\"\n ></v-select>\n <v-input\n name=\"processVariableName\"\n [title]=\"'processVariableName' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.prefill?.processVariableName || 'contentId'\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'processVariableNameTooltip' | pluginTranslate: pluginId | async\"\n ></v-input>\n </v-form>\n </ng-container>\n</ng-container>\n\n<ng-template #loading>\n <div class=\"loading-container\">\n <cds-loading></cds-loading>\n </div>\n</ng-template>\n" }]
378
- }], ctorParameters: () => [{ type: i1.ModalService }, { type: i2$1.DocumentService }, { type: FreemarkerTemplateManagementService }], propDecorators: { save$: [{
1388
+ }], ctorParameters: () => [{ type: FreemarkerTemplateManagementService }], propDecorators: { save$: [{
379
1389
  type: Input
380
1390
  }], disabled$: [{
381
1391
  type: Input
382
1392
  }], pluginId: [{
383
1393
  type: Input
1394
+ }], context$: [{
1395
+ type: Input
384
1396
  }], prefillConfiguration$: [{
385
1397
  type: Input
386
1398
  }], valid: [{
@@ -411,10 +1423,10 @@ class MailTemplateDeleteModalComponent {
411
1423
  onDelete(templates) {
412
1424
  this.deleteEvent.emit(templates);
413
1425
  }
414
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MailTemplateDeleteModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
415
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: MailTemplateDeleteModalComponent, isStandalone: true, selector: "valtimo-mail-template-delete-modal", inputs: { deleteRowKeys: "deleteRowKeys", showDeleteModal$: "showDeleteModal$" }, outputs: { deleteEvent: "deleteEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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=\"template.deleteModalContent\"\n [outputOnConfirm]=\"deleteRowKeys\"\n [showModalSubject$]=\"showDeleteModal$\"\n titleTranslationKey=\"interface.delete\"\n (confirmEvent)=\"onDelete($event)\"\n></valtimo-confirmation-modal>\n", dependencies: [{ kind: "ngmodule", type: ConfirmationModalModule }, { kind: "component", type: i1.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "confirmButtonType", "showOptionalButton", "optionalButtonText", "optionalButtonTextTranslationKey", "optionalButtonType", "cancelButtonText", "cancelButtonTextTranslationKey", "cancelButtonType", "showModalSubject$", "outputOnConfirm", "outputOnOptional", "spacerAfterCancelButton"], outputs: ["confirmEvent", "optionalEvent", "cancelEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1426
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MailTemplateDeleteModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1427
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: MailTemplateDeleteModalComponent, isStandalone: true, selector: "valtimo-mail-template-delete-modal", inputs: { deleteRowKeys: "deleteRowKeys", showDeleteModal$: "showDeleteModal$" }, outputs: { deleteEvent: "deleteEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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=\"template.deleteModalContent\"\n [outputOnConfirm]=\"deleteRowKeys\"\n [showModalSubject$]=\"showDeleteModal$\"\n titleTranslationKey=\"interface.delete\"\n (confirmEvent)=\"onDelete($event)\"\n></valtimo-confirmation-modal>\n", dependencies: [{ kind: "ngmodule", type: ConfirmationModalModule }, { kind: "component", type: i3.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 }); }
416
1428
  }
417
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MailTemplateDeleteModalComponent, decorators: [{
1429
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MailTemplateDeleteModalComponent, decorators: [{
418
1430
  type: Component,
419
1431
  args: [{ standalone: true, selector: 'valtimo-mail-template-delete-modal', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
420
1432
  ConfirmationModalModule
@@ -489,10 +1501,10 @@ class MailTemplateAddEditModalComponent {
489
1501
  }
490
1502
  }, CARBON_CONSTANTS.modalAnimationMs);
491
1503
  }
492
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MailTemplateAddEditModalComponent, deps: [{ token: i1$1.FormBuilder }, { token: i1.KeyGeneratorService }], target: i0.ɵɵFactoryTarget.Component }); }
493
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: MailTemplateAddEditModalComponent, isStandalone: true, selector: "valtimo-mail-template-add-edit-modal", inputs: { open: "open", type: "type", defaultKeyValue: "defaultKeyValue" }, outputs: { closeEvent: "closeEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<cds-modal\n *ngIf=\"{\n isAdd: type === 'add'\n } as vars\"\n [open]=\"open\"\n showFooter=\"true\"\n [title]=\"vars.title\"\n valtimoCdsModal\n>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"onCancel()\">\n <h3 cdsModalHeaderHeading>\n {{\n vars.isAdd\n ? 'Add'\n : 'Edit'\n }}\n </h3>\n </cds-modal-header>\n\n <section cdsModalContent>\n <form [formGroup]=\"form\">\n <cds-label [invalid]=\"key.dirty && key.invalid\">\n {{ 'Key' }}\n\n <input\n formControlName=\"key\"\n cdsText\n placeholder=\"{{ 'key' }}\"\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 {{ vars.isAdd ? ('interface.create' | translate) : ('interface.save' | translate) }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ModalModule }, { kind: "component", type: i4$1.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i4$1.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i4$1.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i4$1.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i4$1.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { 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: InputModule }, { kind: "component", type: i4$1.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i4$1.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1504
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MailTemplateAddEditModalComponent, deps: [{ token: i1.FormBuilder }, { token: i3.KeyGeneratorService }], target: i0.ɵɵFactoryTarget.Component }); }
1505
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: MailTemplateAddEditModalComponent, isStandalone: true, selector: "valtimo-mail-template-add-edit-modal", inputs: { open: "open", type: "type", defaultKeyValue: "defaultKeyValue" }, outputs: { closeEvent: "closeEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<cds-modal\n *ngIf=\"{\n isAdd: type === 'add'\n } as vars\"\n [open]=\"open\"\n showFooter=\"true\"\n [title]=\"vars.title\"\n valtimoCdsModal\n>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"onCancel()\">\n <h3 cdsModalHeaderHeading>\n {{\n vars.isAdd\n ? 'Add'\n : 'Edit'\n }}\n </h3>\n </cds-modal-header>\n\n <section cdsModalContent>\n <form [formGroup]=\"form\">\n <cds-label [invalid]=\"key.dirty && key.invalid\">\n {{ 'Key' }}\n\n <input\n formControlName=\"key\"\n cdsText\n placeholder=\"{{ 'key' }}\"\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 {{ vars.isAdd ? ('interface.create' | translate) : ('interface.save' | translate) }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ModalModule }, { kind: "component", type: i4.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i4.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i4.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i4.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i4.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: InputModule }, { kind: "component", type: i4.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i4.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
494
1506
  }
495
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MailTemplateAddEditModalComponent, decorators: [{
1507
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MailTemplateAddEditModalComponent, decorators: [{
496
1508
  type: Component,
497
1509
  args: [{ standalone: true, selector: 'valtimo-mail-template-add-edit-modal', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
498
1510
  CommonModule,
@@ -502,7 +1514,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
502
1514
  ReactiveFormsModule,
503
1515
  InputModule
504
1516
  ], template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<cds-modal\n *ngIf=\"{\n isAdd: type === 'add'\n } as vars\"\n [open]=\"open\"\n showFooter=\"true\"\n [title]=\"vars.title\"\n valtimoCdsModal\n>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"onCancel()\">\n <h3 cdsModalHeaderHeading>\n {{\n vars.isAdd\n ? 'Add'\n : 'Edit'\n }}\n </h3>\n </cds-modal-header>\n\n <section cdsModalContent>\n <form [formGroup]=\"form\">\n <cds-label [invalid]=\"key.dirty && key.invalid\">\n {{ 'Key' }}\n\n <input\n formControlName=\"key\"\n cdsText\n placeholder=\"{{ 'key' }}\"\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 {{ vars.isAdd ? ('interface.create' | translate) : ('interface.save' | translate) }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n" }]
505
- }], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: i1.KeyGeneratorService }], propDecorators: { open: [{
1517
+ }], ctorParameters: () => [{ type: i1.FormBuilder }, { type: i3.KeyGeneratorService }], propDecorators: { open: [{
506
1518
  type: Input
507
1519
  }], type: [{
508
1520
  type: Input
@@ -580,7 +1592,6 @@ class MailTemplateListComponent {
580
1592
  this._caseDefinitionId$.pipe(take(1), switchMap(caseDefinitionId => this.templateService.deleteTemplates({
581
1593
  caseDefinitionKey: caseDefinitionId.caseDefinitionKey,
582
1594
  caseDefinitionVersionTag: caseDefinitionId.caseDefinitionVersionTag,
583
- type: 'mail',
584
1595
  templates
585
1596
  }))).subscribe(_ => {
586
1597
  this.reloadTemplateList();
@@ -600,12 +1611,12 @@ class MailTemplateListComponent {
600
1611
  });
601
1612
  }
602
1613
  setSelectedTemplateKeys() {
603
- this.selectedRowKeys$.next(this.carbonList.selectedItems.map((template) => template.key));
1614
+ this.selectedRowKeys$.next(this.carbonList.selectedItems.map((template) => ({ key: template.key, type: template.type })));
604
1615
  }
605
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MailTemplateListComponent, deps: [{ token: FreemarkerTemplateManagementService }, { token: i2$2.Router }, { token: i2$2.ActivatedRoute }, { token: i3.EnvironmentService }], target: i0.ɵɵFactoryTarget.Component }); }
606
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: MailTemplateListComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "carbonList", first: true, predicate: CarbonListComponent, descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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 [header]=\"false\"\n [items]=\"templates$ | async\"\n [fields]=\"fields\"\n [loading]=\"loading$ | async\"\n [showSelectionColumn]=\"!(readOnly$ | async)\"\n (rowClicked)=\"onRowClick($event)\"\n>\n <ng-container header> {{ 'Title' }}</ng-container>\n\n <div carbonToolbarContent>\n <ng-container [ngTemplateOutlet]=\"addTemplateButton\"></ng-container>\n </div>\n\n <ng-container carbonToolbarActions>\n <button cdsButton=\"primary\" (click)=\"showDeleteModal()\">\n {{ 'interface.delete' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n </ng-container>\n\n <valtimo-no-results\n [action]=\"addTemplateButton\"\n description=\"{{ 'Come back later.' }}\"\n title=\"{{ 'No templates found' }}\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n\n<valtimo-mail-template-add-edit-modal\n [open]=\"showAddModal$ | async\"\n (closeEvent)=\"onAdd($event)\"\n></valtimo-mail-template-add-edit-modal>\n\n<ng-container *ngIf=\"{selectedRowKeys: selectedRowKeys$ | async} as obs\">\n <valtimo-mail-template-delete-modal\n [deleteRowKeys]=\"obs.selectedRowKeys\"\n [showDeleteModal$]=\"showDeleteModal$\"\n (deleteEvent)=\"onDelete($event)\"\n >\n </valtimo-mail-template-delete-modal>\n</ng-container>\n\n<ng-template #addTemplateButton>\n <button cdsButton=\"primary\"\n [disabled]=\"readOnly$ | async\"\n (click)=\"openAddModal()\">\n {{ 'Add' }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i1.CarbonListComponent, selector: "valtimo-carbon-list", inputs: ["items", "fields", "tableTranslations", "paginatorConfig", "pagination", "loading", "actions", "actionItems", "showActionItems", "header", "hideColumnHeader", "initialSortState", "sortState", "isSearchable", "enableSingleSelection", "lastColumnTemplate", "paginationIdentifier", "showSelectionColumn", "striped", "hideToolbar", "lockedTooltipTranslationKey", "movingRowsEnabled", "dragAndDrop", "dragAndDropDisabled"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged", "moveRow", "itemsReordered"] }, { kind: "component", type: i1.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "component", type: MailTemplateDeleteModalComponent, selector: "valtimo-mail-template-delete-modal", inputs: ["deleteRowKeys", "showDeleteModal$"], outputs: ["deleteEvent"] }, { kind: "component", type: MailTemplateAddEditModalComponent, selector: "valtimo-mail-template-add-edit-modal", inputs: ["open", "type", "defaultKeyValue"], outputs: ["closeEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1616
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MailTemplateListComponent, deps: [{ token: FreemarkerTemplateManagementService }, { token: i2$2.Router }, { token: i2$2.ActivatedRoute }, { token: i3$1.EnvironmentService }], target: i0.ɵɵFactoryTarget.Component }); }
1617
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: MailTemplateListComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "carbonList", first: true, predicate: CarbonListComponent, descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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 [header]=\"false\"\n [items]=\"templates$ | async\"\n [fields]=\"fields\"\n [loading]=\"loading$ | async\"\n [showSelectionColumn]=\"!(readOnly$ | async)\"\n (rowClicked)=\"onRowClick($event)\"\n>\n <ng-container header> {{ 'Title' }}</ng-container>\n\n <div carbonToolbarContent>\n <ng-container [ngTemplateOutlet]=\"addTemplateButton\"></ng-container>\n </div>\n\n <ng-container carbonToolbarActions>\n <button cdsButton=\"primary\" (click)=\"showDeleteModal()\">\n {{ 'interface.delete' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n </ng-container>\n\n <valtimo-no-results\n [action]=\"addTemplateButton\"\n description=\"{{ 'Come back later.' }}\"\n title=\"{{ 'No templates found' }}\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n\n<valtimo-mail-template-add-edit-modal\n [open]=\"showAddModal$ | async\"\n (closeEvent)=\"onAdd($event)\"\n></valtimo-mail-template-add-edit-modal>\n\n<ng-container *ngIf=\"{selectedRowKeys: selectedRowKeys$ | async} as obs\">\n <valtimo-mail-template-delete-modal\n [deleteRowKeys]=\"obs.selectedRowKeys\"\n [showDeleteModal$]=\"showDeleteModal$\"\n (deleteEvent)=\"onDelete($event)\"\n >\n </valtimo-mail-template-delete-modal>\n</ng-container>\n\n<ng-template #addTemplateButton>\n <button cdsButton=\"primary\"\n [disabled]=\"readOnly$ | async\"\n (click)=\"openAddModal()\">\n {{ 'Add' }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i3.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: i3.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }, { kind: "component", type: MailTemplateDeleteModalComponent, selector: "valtimo-mail-template-delete-modal", inputs: ["deleteRowKeys", "showDeleteModal$"], outputs: ["deleteEvent"] }, { kind: "component", type: MailTemplateAddEditModalComponent, selector: "valtimo-mail-template-add-edit-modal", inputs: ["open", "type", "defaultKeyValue"], outputs: ["closeEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
607
1618
  }
608
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MailTemplateListComponent, decorators: [{
1619
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MailTemplateListComponent, decorators: [{
609
1620
  type: Component,
610
1621
  args: [{ standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
611
1622
  CommonModule,
@@ -615,7 +1626,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
615
1626
  MailTemplateDeleteModalComponent,
616
1627
  MailTemplateAddEditModalComponent
617
1628
  ], template: "<!--\n ~ Copyright 2015-2023 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 [header]=\"false\"\n [items]=\"templates$ | async\"\n [fields]=\"fields\"\n [loading]=\"loading$ | async\"\n [showSelectionColumn]=\"!(readOnly$ | async)\"\n (rowClicked)=\"onRowClick($event)\"\n>\n <ng-container header> {{ 'Title' }}</ng-container>\n\n <div carbonToolbarContent>\n <ng-container [ngTemplateOutlet]=\"addTemplateButton\"></ng-container>\n </div>\n\n <ng-container carbonToolbarActions>\n <button cdsButton=\"primary\" (click)=\"showDeleteModal()\">\n {{ 'interface.delete' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n </ng-container>\n\n <valtimo-no-results\n [action]=\"addTemplateButton\"\n description=\"{{ 'Come back later.' }}\"\n title=\"{{ 'No templates found' }}\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n\n<valtimo-mail-template-add-edit-modal\n [open]=\"showAddModal$ | async\"\n (closeEvent)=\"onAdd($event)\"\n></valtimo-mail-template-add-edit-modal>\n\n<ng-container *ngIf=\"{selectedRowKeys: selectedRowKeys$ | async} as obs\">\n <valtimo-mail-template-delete-modal\n [deleteRowKeys]=\"obs.selectedRowKeys\"\n [showDeleteModal$]=\"showDeleteModal$\"\n (deleteEvent)=\"onDelete($event)\"\n >\n </valtimo-mail-template-delete-modal>\n</ng-container>\n\n<ng-template #addTemplateButton>\n <button cdsButton=\"primary\"\n [disabled]=\"readOnly$ | async\"\n (click)=\"openAddModal()\">\n {{ 'Add' }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n" }]
618
- }], ctorParameters: () => [{ type: FreemarkerTemplateManagementService }, { type: i2$2.Router }, { type: i2$2.ActivatedRoute }, { type: i3.EnvironmentService }], propDecorators: { carbonList: [{
1629
+ }], ctorParameters: () => [{ type: FreemarkerTemplateManagementService }, { type: i2$2.Router }, { type: i2$2.ActivatedRoute }, { type: i3$1.EnvironmentService }], propDecorators: { carbonList: [{
619
1630
  type: ViewChild,
620
1631
  args: [CarbonListComponent]
621
1632
  }] } });
@@ -709,7 +1720,6 @@ class MailTemplateEditorComponent {
709
1720
  this._caseDefinitionId$.pipe(take(1)).subscribe(caseDefinitionId => this.templateService.deleteTemplates({
710
1721
  caseDefinitionKey: caseDefinitionId.caseDefinitionKey,
711
1722
  caseDefinitionVersionTag: caseDefinitionId.caseDefinitionVersionTag,
712
- type: 'mail',
713
1723
  templates
714
1724
  }).pipe(take(1)).subscribe(_ => this.router.navigate([`/case-management/case/${caseDefinitionId.caseDefinitionKey}/version/${caseDefinitionId.caseDefinitionVersionTag}/mail-template`])));
715
1725
  }
@@ -789,10 +1799,10 @@ class MailTemplateEditorComponent {
789
1799
  title: this.translateService.instant('Saved successfully'),
790
1800
  });
791
1801
  }
792
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MailTemplateEditorComponent, deps: [{ token: FreemarkerTemplateManagementService }, { token: i2$2.ActivatedRoute }, { token: i1.PageTitleService }, { token: i2$2.Router }, { token: i4$1.NotificationService }, { token: i5.TranslateService }, { token: i1.BreadcrumbService }, { token: i3.EnvironmentService }], target: i0.ɵɵFactoryTarget.Component }); }
793
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: MailTemplateEditorComponent, isStandalone: true, selector: "ng-component", providers: [NotificationService], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n *ngIf=\"{\n model: model$ | async,\n updatedModelValue: updatedModelValue$ | async,\n template: template$ | async,\n } as obs\">\n\n <div class=\"template-explanation\">\n Mail templates use <a target=\"_blank\" href=\"https://www.w3schools.com/html/html_intro.asp\">HTML</a> for the mail\n layout. <a target=\"_blank\" href=\"https://freemarker.apache.org/docs/dgui_quickstart_basics.html\">FreeMarker</a>\n can be used to create placeholders inside the HTML. The data-model for FreeMarker is based upon <a\n target=\"_blank\" href=\"https://docs.valtimo.nl/reference/modules/value-resolver\">Valtimo value-resolvers</a>\n with a slightly different notation. For example: $&#123;doc.firstName&#125;. Retrieves\n the `firstName` from the case.\n </div>\n\n <cds-tabs type=\"contained\">\n <cds-tab [active]=\"true\" [heading]=\"'Editor'\">\n <valtimo-editor\n [model]=\"obs.model\"\n [disabled]=\"(editorDisabled$ | async) || (readOnly$ | async)\"\n (validEvent)=\"onValid($event)\"\n (valueChangeEvent)=\"onValueChange($event)\"\n [fitPage]=\"true\"\n [fitPageExtraSpace]=\"80\"\n ></valtimo-editor>\n </cds-tab>\n <cds-tab [heading]=\"'Viewer'\" (selected)=\"onSelectedTabViewer()\">\n <iframe title=\"HTML Viewer\" id=\"html-viewer-iframe\">\n </iframe>\n </cds-tab>\n </cds-tabs>\n</ng-container>\n\n<ng-container renderInPageHeader>\n <ng-template>\n <div *ngIf=\"{\n model: model$ | async,\n moreDisabled: moreDisabled$ | async,\n template: template$ | async,\n } as obs\"\n class=\"buttons-container\"\n >\n <cds-overflow-menu class=\"overflow-button\">\n <cds-overflow-menu-option\n [disabled]=\"obs.moreDisabled || (readOnly$ | async)\"\n type=\"danger\"\n (selected)=\"showDeleteModal()\"\n >{{ 'interface.delete' | translate }}\n </cds-overflow-menu-option\n >\n </cds-overflow-menu>\n\n <button\n [disabled]=\"(saveDisabled$ | async) || (readOnly$ | async)\"\n cdsButton=\"primary\"\n size=\"md\"\n (click)=\"updateTemplate()\"\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<ng-container *ngIf=\"{templateKey: templateKey$ | async} as obs\">\n <valtimo-mail-template-delete-modal\n [deleteRowKeys]=\"[obs.templateKey]\"\n [showDeleteModal$]=\"showDeleteModal$\"\n (deleteEvent)=\"onDelete($event)\"\n >\n </valtimo-mail-template-delete-modal>\n</ng-container>\n", styles: ["::ng-deep .cds--tab-content{background:var(--cds-layer)!important}::ng-deep #html-viewer-iframe{width:100%;height:calc(100vh - 219px)}.loading-container{display:flex;width:100%;justify-content:center}.overflow-button{margin-right:16px}.buttons-container{display:flex;flex-direction:row}.template-explanation{margin-top:16px;margin-bottom:24px}\n/*!\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: TabsModule }, { kind: "component", type: i4$1.Tabs, selector: "cds-tabs, ibm-tabs", inputs: ["position", "cacheActive", "followFocus", "isNavigation", "ariaLabel", "ariaLabelledby", "type", "theme", "skeleton"] }, { kind: "component", type: i4$1.Tab, selector: "cds-tab, ibm-tab", inputs: ["heading", "title", "context", "active", "disabled", "tabIndex", "id", "cacheActive", "tabContent", "templateContext"], outputs: ["selected"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i4$1.OverflowMenu, selector: "cds-overflow-menu, ibm-overflow-menu", inputs: ["buttonLabel", "description", "flip", "placement", "open", "customTrigger", "offset", "wrapperClass", "triggerClass"], outputs: ["openChange"] }, { kind: "component", type: i4$1.OverflowMenuOption, selector: "cds-overflow-menu-option, ibm-overflow-menu-option", inputs: ["divider", "type", "disabled", "href", "target", "innerClass"], outputs: ["selected"] }, { kind: "component", type: MailTemplateDeleteModalComponent, selector: "valtimo-mail-template-delete-modal", inputs: ["deleteRowKeys", "showDeleteModal$"], outputs: ["deleteEvent"] }, { kind: "ngmodule", type: CarbonListModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: EditorModule }, { kind: "component", type: i1.EditorComponent, selector: "valtimo-editor", inputs: ["editorOptions", "model", "disabled", "formatOnLoad", "widthPx", "heightPx", "heightStyle", "jsonSchema", "fitPage", "fitPageExtraSpace"], outputs: ["validEvent", "valueChangeEvent"] }, { kind: "directive", type: RenderInPageHeaderDirective, selector: "[renderInPageHeader]", inputs: ["fullWidth"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i4$1.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1802
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MailTemplateEditorComponent, deps: [{ token: FreemarkerTemplateManagementService }, { token: i2$2.ActivatedRoute }, { token: i3.PageTitleService }, { token: i2$2.Router }, { token: i4.NotificationService }, { token: i5$1.TranslateService }, { token: i3.BreadcrumbService }, { token: i3$1.EnvironmentService }], target: i0.ɵɵFactoryTarget.Component }); }
1803
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: MailTemplateEditorComponent, isStandalone: true, selector: "ng-component", providers: [NotificationService], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n *ngIf=\"{\n model: model$ | async,\n updatedModelValue: updatedModelValue$ | async,\n template: template$ | async,\n } as obs\">\n\n <div class=\"template-explanation\">\n Mail templates use <a target=\"_blank\" href=\"https://www.w3schools.com/html/html_intro.asp\">HTML</a> for the mail\n layout. <a target=\"_blank\" href=\"https://freemarker.apache.org/docs/dgui_quickstart_basics.html\">FreeMarker</a>\n can be used to create placeholders inside the HTML. The data-model for FreeMarker is based upon <a\n target=\"_blank\" href=\"https://docs.valtimo.nl/features/value-resolvers\">Valtimo value-resolvers</a>\n with a slightly different notation. For example: $&#123;doc.firstName&#125;. Retrieves\n the `firstName` from the case.\n </div>\n\n <cds-tabs type=\"contained\">\n <cds-tab [active]=\"true\" [heading]=\"'Editor'\">\n <valtimo-editor\n [model]=\"obs.model\"\n [disabled]=\"(editorDisabled$ | async) || (readOnly$ | async)\"\n (validEvent)=\"onValid($event)\"\n (valueChangeEvent)=\"onValueChange($event)\"\n [fitPage]=\"true\"\n [fitPageExtraSpace]=\"80\"\n ></valtimo-editor>\n </cds-tab>\n <cds-tab [heading]=\"'Viewer'\" (selected)=\"onSelectedTabViewer()\">\n <iframe title=\"HTML Viewer\" id=\"html-viewer-iframe\">\n </iframe>\n </cds-tab>\n </cds-tabs>\n</ng-container>\n\n<ng-container renderInPageHeader>\n <ng-template>\n <div *ngIf=\"{\n model: model$ | async,\n moreDisabled: moreDisabled$ | async,\n template: template$ | async,\n } as obs\"\n class=\"buttons-container\"\n >\n <cds-overflow-menu class=\"overflow-button\">\n <cds-overflow-menu-option\n [disabled]=\"obs.moreDisabled || (readOnly$ | async)\"\n type=\"danger\"\n (selected)=\"showDeleteModal()\"\n >{{ 'interface.delete' | translate }}\n </cds-overflow-menu-option\n >\n </cds-overflow-menu>\n\n <button\n [disabled]=\"(saveDisabled$ | async) || (readOnly$ | async)\"\n cdsButton=\"primary\"\n size=\"md\"\n (click)=\"updateTemplate()\"\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<ng-container *ngIf=\"{templateKey: templateKey$ | async} as obs\">\n <valtimo-mail-template-delete-modal\n [deleteRowKeys]=\"[{key: obs.templateKey, type: 'mail'}]\"\n [showDeleteModal$]=\"showDeleteModal$\"\n (deleteEvent)=\"onDelete($event)\"\n >\n </valtimo-mail-template-delete-modal>\n</ng-container>\n", styles: ["::ng-deep .cds--tab-content{background:var(--cds-layer)!important}::ng-deep #html-viewer-iframe{width:100%;height:calc(100vh - 219px)}.loading-container{display:flex;width:100%;justify-content:center}.overflow-button{margin-right:16px}.buttons-container{display:flex;flex-direction:row}.template-explanation{margin-top:16px;margin-bottom:24px}\n/*!\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: TabsModule }, { kind: "component", type: i4.Tabs, selector: "cds-tabs, ibm-tabs", inputs: ["position", "cacheActive", "followFocus", "isNavigation", "ariaLabel", "ariaLabelledby", "type", "theme", "skeleton"] }, { kind: "component", type: i4.Tab, selector: "cds-tab, ibm-tab", inputs: ["heading", "title", "context", "active", "disabled", "tabIndex", "id", "cacheActive", "tabContent", "templateContext"], outputs: ["selected"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i4.OverflowMenu, selector: "cds-overflow-menu, ibm-overflow-menu", inputs: ["buttonLabel", "description", "flip", "placement", "open", "customTrigger", "offset", "wrapperClass", "triggerClass"], outputs: ["openChange"] }, { kind: "component", type: i4.OverflowMenuOption, selector: "cds-overflow-menu-option, ibm-overflow-menu-option", inputs: ["divider", "type", "disabled", "href", "target", "innerClass"], outputs: ["selected"] }, { kind: "component", type: MailTemplateDeleteModalComponent, selector: "valtimo-mail-template-delete-modal", inputs: ["deleteRowKeys", "showDeleteModal$"], outputs: ["deleteEvent"] }, { kind: "ngmodule", type: CarbonListModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: EditorModule }, { kind: "component", type: i3.EditorComponent, selector: "valtimo-editor", inputs: ["editorOptions", "model", "disabled", "formatOnLoad", "widthPx", "heightPx", "heightStyle", "jsonSchema", "fitPage", "fitPageExtraSpace"], outputs: ["validEvent", "valueChangeEvent"] }, { kind: "directive", type: RenderInPageHeaderDirective, selector: "[renderInPageHeader]", inputs: ["fullWidth"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i4.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
794
1804
  }
795
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MailTemplateEditorComponent, decorators: [{
1805
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MailTemplateEditorComponent, decorators: [{
796
1806
  type: Component,
797
1807
  args: [{ standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, providers: [NotificationService], imports: [
798
1808
  CommonModule,
@@ -805,8 +1815,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
805
1815
  EditorModule,
806
1816
  RenderInPageHeaderDirective,
807
1817
  IconModule,
808
- ], template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n *ngIf=\"{\n model: model$ | async,\n updatedModelValue: updatedModelValue$ | async,\n template: template$ | async,\n } as obs\">\n\n <div class=\"template-explanation\">\n Mail templates use <a target=\"_blank\" href=\"https://www.w3schools.com/html/html_intro.asp\">HTML</a> for the mail\n layout. <a target=\"_blank\" href=\"https://freemarker.apache.org/docs/dgui_quickstart_basics.html\">FreeMarker</a>\n can be used to create placeholders inside the HTML. The data-model for FreeMarker is based upon <a\n target=\"_blank\" href=\"https://docs.valtimo.nl/reference/modules/value-resolver\">Valtimo value-resolvers</a>\n with a slightly different notation. For example: $&#123;doc.firstName&#125;. Retrieves\n the `firstName` from the case.\n </div>\n\n <cds-tabs type=\"contained\">\n <cds-tab [active]=\"true\" [heading]=\"'Editor'\">\n <valtimo-editor\n [model]=\"obs.model\"\n [disabled]=\"(editorDisabled$ | async) || (readOnly$ | async)\"\n (validEvent)=\"onValid($event)\"\n (valueChangeEvent)=\"onValueChange($event)\"\n [fitPage]=\"true\"\n [fitPageExtraSpace]=\"80\"\n ></valtimo-editor>\n </cds-tab>\n <cds-tab [heading]=\"'Viewer'\" (selected)=\"onSelectedTabViewer()\">\n <iframe title=\"HTML Viewer\" id=\"html-viewer-iframe\">\n </iframe>\n </cds-tab>\n </cds-tabs>\n</ng-container>\n\n<ng-container renderInPageHeader>\n <ng-template>\n <div *ngIf=\"{\n model: model$ | async,\n moreDisabled: moreDisabled$ | async,\n template: template$ | async,\n } as obs\"\n class=\"buttons-container\"\n >\n <cds-overflow-menu class=\"overflow-button\">\n <cds-overflow-menu-option\n [disabled]=\"obs.moreDisabled || (readOnly$ | async)\"\n type=\"danger\"\n (selected)=\"showDeleteModal()\"\n >{{ 'interface.delete' | translate }}\n </cds-overflow-menu-option\n >\n </cds-overflow-menu>\n\n <button\n [disabled]=\"(saveDisabled$ | async) || (readOnly$ | async)\"\n cdsButton=\"primary\"\n size=\"md\"\n (click)=\"updateTemplate()\"\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<ng-container *ngIf=\"{templateKey: templateKey$ | async} as obs\">\n <valtimo-mail-template-delete-modal\n [deleteRowKeys]=\"[obs.templateKey]\"\n [showDeleteModal$]=\"showDeleteModal$\"\n (deleteEvent)=\"onDelete($event)\"\n >\n </valtimo-mail-template-delete-modal>\n</ng-container>\n", styles: ["::ng-deep .cds--tab-content{background:var(--cds-layer)!important}::ng-deep #html-viewer-iframe{width:100%;height:calc(100vh - 219px)}.loading-container{display:flex;width:100%;justify-content:center}.overflow-button{margin-right:16px}.buttons-container{display:flex;flex-direction:row}.template-explanation{margin-top:16px;margin-bottom:24px}\n/*!\n * Copyright 2015-2023 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"] }]
809
- }], ctorParameters: () => [{ type: FreemarkerTemplateManagementService }, { type: i2$2.ActivatedRoute }, { type: i1.PageTitleService }, { type: i2$2.Router }, { type: i4$1.NotificationService }, { type: i5.TranslateService }, { type: i1.BreadcrumbService }, { type: i3.EnvironmentService }] });
1818
+ ], template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n *ngIf=\"{\n model: model$ | async,\n updatedModelValue: updatedModelValue$ | async,\n template: template$ | async,\n } as obs\">\n\n <div class=\"template-explanation\">\n Mail templates use <a target=\"_blank\" href=\"https://www.w3schools.com/html/html_intro.asp\">HTML</a> for the mail\n layout. <a target=\"_blank\" href=\"https://freemarker.apache.org/docs/dgui_quickstart_basics.html\">FreeMarker</a>\n can be used to create placeholders inside the HTML. The data-model for FreeMarker is based upon <a\n target=\"_blank\" href=\"https://docs.valtimo.nl/features/value-resolvers\">Valtimo value-resolvers</a>\n with a slightly different notation. For example: $&#123;doc.firstName&#125;. Retrieves\n the `firstName` from the case.\n </div>\n\n <cds-tabs type=\"contained\">\n <cds-tab [active]=\"true\" [heading]=\"'Editor'\">\n <valtimo-editor\n [model]=\"obs.model\"\n [disabled]=\"(editorDisabled$ | async) || (readOnly$ | async)\"\n (validEvent)=\"onValid($event)\"\n (valueChangeEvent)=\"onValueChange($event)\"\n [fitPage]=\"true\"\n [fitPageExtraSpace]=\"80\"\n ></valtimo-editor>\n </cds-tab>\n <cds-tab [heading]=\"'Viewer'\" (selected)=\"onSelectedTabViewer()\">\n <iframe title=\"HTML Viewer\" id=\"html-viewer-iframe\">\n </iframe>\n </cds-tab>\n </cds-tabs>\n</ng-container>\n\n<ng-container renderInPageHeader>\n <ng-template>\n <div *ngIf=\"{\n model: model$ | async,\n moreDisabled: moreDisabled$ | async,\n template: template$ | async,\n } as obs\"\n class=\"buttons-container\"\n >\n <cds-overflow-menu class=\"overflow-button\">\n <cds-overflow-menu-option\n [disabled]=\"obs.moreDisabled || (readOnly$ | async)\"\n type=\"danger\"\n (selected)=\"showDeleteModal()\"\n >{{ 'interface.delete' | translate }}\n </cds-overflow-menu-option\n >\n </cds-overflow-menu>\n\n <button\n [disabled]=\"(saveDisabled$ | async) || (readOnly$ | async)\"\n cdsButton=\"primary\"\n size=\"md\"\n (click)=\"updateTemplate()\"\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<ng-container *ngIf=\"{templateKey: templateKey$ | async} as obs\">\n <valtimo-mail-template-delete-modal\n [deleteRowKeys]=\"[{key: obs.templateKey, type: 'mail'}]\"\n [showDeleteModal$]=\"showDeleteModal$\"\n (deleteEvent)=\"onDelete($event)\"\n >\n </valtimo-mail-template-delete-modal>\n</ng-container>\n", styles: ["::ng-deep .cds--tab-content{background:var(--cds-layer)!important}::ng-deep #html-viewer-iframe{width:100%;height:calc(100vh - 219px)}.loading-container{display:flex;width:100%;justify-content:center}.overflow-button{margin-right:16px}.buttons-container{display:flex;flex-direction:row}.template-explanation{margin-top:16px;margin-bottom:24px}\n/*!\n * Copyright 2015-2023 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"] }]
1819
+ }], ctorParameters: () => [{ type: FreemarkerTemplateManagementService }, { type: i2$2.ActivatedRoute }, { type: i3.PageTitleService }, { type: i2$2.Router }, { type: i4.NotificationService }, { type: i5$1.TranslateService }, { type: i3.BreadcrumbService }, { type: i3$1.EnvironmentService }] });
810
1820
 
811
1821
  /*
812
1822
  * Copyright 2015-2023 Ritense BV, the Netherlands.
@@ -836,11 +1846,11 @@ const routes$1 = [
836
1846
  },
837
1847
  ];
838
1848
  let TemplateManagementRoutingModule$1 = class TemplateManagementRoutingModule {
839
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TemplateManagementRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
840
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: TemplateManagementRoutingModule, imports: [CommonModule, i2$2.RouterModule], exports: [RouterModule] }); }
841
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TemplateManagementRoutingModule, imports: [CommonModule, RouterModule.forChild(routes$1), RouterModule] }); }
1849
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TemplateManagementRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1850
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TemplateManagementRoutingModule, imports: [CommonModule, i2$2.RouterModule], exports: [RouterModule] }); }
1851
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TemplateManagementRoutingModule, imports: [CommonModule, RouterModule.forChild(routes$1), RouterModule] }); }
842
1852
  };
843
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TemplateManagementRoutingModule$1, decorators: [{
1853
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TemplateManagementRoutingModule$1, decorators: [{
844
1854
  type: NgModule,
845
1855
  args: [{
846
1856
  imports: [CommonModule, RouterModule.forChild(routes$1)],
@@ -864,8 +1874,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
864
1874
  * limitations under the License.
865
1875
  */
866
1876
  class MailTemplatePluginModule {
867
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MailTemplatePluginModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
868
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: MailTemplatePluginModule, declarations: [MailTemplateConfigurationComponent,
1877
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MailTemplatePluginModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1878
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: MailTemplatePluginModule, declarations: [MailTemplateConfigurationComponent,
869
1879
  GenerateMailFileComponent,
870
1880
  GenerateMailContentComponent], imports: [CommonModule,
871
1881
  PluginTranslatePipeModule,
@@ -892,7 +1902,7 @@ class MailTemplatePluginModule {
892
1902
  MailTemplateDeleteModalComponent], exports: [MailTemplateConfigurationComponent,
893
1903
  GenerateMailFileComponent,
894
1904
  GenerateMailContentComponent] }); }
895
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MailTemplatePluginModule, providers: [
1905
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MailTemplatePluginModule, providers: [
896
1906
  {
897
1907
  provide: CASE_MANAGEMENT_TAB_TOKEN,
898
1908
  useValue: {
@@ -924,7 +1934,7 @@ class MailTemplatePluginModule {
924
1934
  TabsModule,
925
1935
  MailTemplateDeleteModalComponent] }); }
926
1936
  }
927
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MailTemplatePluginModule, decorators: [{
1937
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MailTemplatePluginModule, decorators: [{
928
1938
  type: NgModule,
929
1939
  args: [{
930
1940
  declarations: [
@@ -1049,12 +2059,12 @@ const mailTemplatePluginSpecification = {
1049
2059
  en: {
1050
2060
  title: 'Mail Templates',
1051
2061
  'generate-mail-file': 'Generate Mail File',
1052
- 'generate-mail-content': 'Generate Mail Content',
2062
+ 'generate-mail-content': 'Generate Mail Content (deprecated)',
1053
2063
  description: 'Create mail templates with Freemarker.',
1054
2064
  configurationTitle: 'Configuration Name',
1055
2065
  configurationTitleTooltip: 'The name of the current plug-in configuration. The configuration can be found under this name in the rest of the application.',
1056
- generateMailContentDescription: 'This action generates the content of an mail based on a template. The mail text is stored in a Process Variable.',
1057
- generateMailFileDescription: 'This action generates the content of an mail and saves the result in a temporary file. The file ID is stored in a Process Variable.',
2066
+ generateMailContentDescription: 'This action generates the content of an mail based on a template. The mail text is then stored in a Process Variable. This action is deprecated because the mail text can be bigger than a Process Variable can store. Please use action "Generate Mail File" instead',
2067
+ generateMailFileDescription: 'This action generates the content of an mail and saves the result in a temporary file. The file ID is then stored in a Process Variable.',
1058
2068
  mailTemplateKey: 'Mail Template',
1059
2069
  mailTemplateKeyTooltip: 'The mail will be generated based on this template.',
1060
2070
  processVariableName: 'Process Variable Name',
@@ -1160,10 +2170,10 @@ class TextTemplateConfigurationComponent {
1160
2170
  }
1161
2171
  injectCaseTab() {
1162
2172
  }
1163
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TextTemplateConfigurationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1164
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: TextTemplateConfigurationComponent, isStandalone: false, selector: "valtimo-text-template-configuration", inputs: { save$: "save$", disabled$: "disabled$", pluginId: "pluginId", prefillConfiguration$: "prefillConfiguration$" }, outputs: { valid: "valid", configuration: "configuration" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2022 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<v-form\n (valueChange)=\"formValueChange($event)\"\n *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefillConfiguration$ ? (prefillConfiguration$ | async) : null\n } as obs\"\n>\n <v-input\n name=\"configurationTitle\"\n [title]=\"'configurationTitle' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.configurationTitle\"\n [required]=\"true\"\n [tooltip]=\"'configurationTitleTooltip' | pluginTranslate: pluginId | async\"\n [widthPx]=\"350\"\n placeholder=\"Text Template Plugin\"\n >\n </v-input>\n</v-form>\n", dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { kind: "component", type: i1.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "smallMargin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$", "carbonTheme", "placeholder", "dataTestId", "trim"], outputs: ["valueChange"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.PluginTranslatePipe, name: "pluginTranslate" }] }); }
2173
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TextTemplateConfigurationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2174
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TextTemplateConfigurationComponent, isStandalone: false, selector: "valtimo-text-template-configuration", inputs: { save$: "save$", disabled$: "disabled$", pluginId: "pluginId", prefillConfiguration$: "prefillConfiguration$" }, outputs: { valid: "valid", configuration: "configuration" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2022 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<v-form\n (valueChange)=\"formValueChange($event)\"\n *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefillConfiguration$ ? (prefillConfiguration$ | async) : null\n } as obs\"\n>\n <v-input\n name=\"configurationTitle\"\n [title]=\"'configurationTitle' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.configurationTitle\"\n [required]=\"true\"\n [tooltip]=\"'configurationTitleTooltip' | pluginTranslate: pluginId | async\"\n [widthPx]=\"350\"\n placeholder=\"Text Template Plugin\"\n >\n </v-input>\n</v-form>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { kind: "component", type: i3.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "smallMargin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$", "carbonTheme", "placeholder", "dataTestId", "trim"], outputs: ["valueChange"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.PluginTranslatePipe, name: "pluginTranslate" }] }); }
1165
2175
  }
1166
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TextTemplateConfigurationComponent, decorators: [{
2176
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TextTemplateConfigurationComponent, decorators: [{
1167
2177
  type: Component,
1168
2178
  args: [{ standalone: false, selector: 'valtimo-text-template-configuration', template: "<!--\n ~ Copyright 2015-2022 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<v-form\n (valueChange)=\"formValueChange($event)\"\n *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefillConfiguration$ ? (prefillConfiguration$ | async) : null\n } as obs\"\n>\n <v-input\n name=\"configurationTitle\"\n [title]=\"'configurationTitle' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.configurationTitle\"\n [required]=\"true\"\n [tooltip]=\"'configurationTitleTooltip' | pluginTranslate: pluginId | async\"\n [widthPx]=\"350\"\n placeholder=\"Text Template Plugin\"\n >\n </v-input>\n</v-form>\n" }]
1169
2179
  }], ctorParameters: () => [], propDecorators: { save$: [{
@@ -1202,10 +2212,10 @@ class TextTemplateDeleteModalComponent {
1202
2212
  onDelete(templates) {
1203
2213
  this.deleteEvent.emit(templates);
1204
2214
  }
1205
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TextTemplateDeleteModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1206
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: TextTemplateDeleteModalComponent, isStandalone: true, selector: "valtimo-text-template-delete-modal", inputs: { deleteRowKeys: "deleteRowKeys", showDeleteModal$: "showDeleteModal$" }, outputs: { deleteEvent: "deleteEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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=\"template.deleteModalContent\"\n [outputOnConfirm]=\"deleteRowKeys\"\n [showModalSubject$]=\"showDeleteModal$\"\n titleTranslationKey=\"interface.delete\"\n (confirmEvent)=\"onDelete($event)\"\n></valtimo-confirmation-modal>\n", dependencies: [{ kind: "ngmodule", type: ConfirmationModalModule }, { kind: "component", type: i1.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "confirmButtonType", "showOptionalButton", "optionalButtonText", "optionalButtonTextTranslationKey", "optionalButtonType", "cancelButtonText", "cancelButtonTextTranslationKey", "cancelButtonType", "showModalSubject$", "outputOnConfirm", "outputOnOptional", "spacerAfterCancelButton"], outputs: ["confirmEvent", "optionalEvent", "cancelEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2215
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TextTemplateDeleteModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2216
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TextTemplateDeleteModalComponent, isStandalone: true, selector: "valtimo-text-template-delete-modal", inputs: { deleteRowKeys: "deleteRowKeys", showDeleteModal$: "showDeleteModal$" }, outputs: { deleteEvent: "deleteEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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=\"template.deleteModalContent\"\n [outputOnConfirm]=\"deleteRowKeys\"\n [showModalSubject$]=\"showDeleteModal$\"\n titleTranslationKey=\"interface.delete\"\n (confirmEvent)=\"onDelete($event)\"\n></valtimo-confirmation-modal>\n", dependencies: [{ kind: "ngmodule", type: ConfirmationModalModule }, { kind: "component", type: i3.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 }); }
1207
2217
  }
1208
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TextTemplateDeleteModalComponent, decorators: [{
2218
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TextTemplateDeleteModalComponent, decorators: [{
1209
2219
  type: Component,
1210
2220
  args: [{ standalone: true, selector: 'valtimo-text-template-delete-modal', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
1211
2221
  ConfirmationModalModule
@@ -1280,10 +2290,10 @@ class TextTemplateAddEditModalComponent {
1280
2290
  }
1281
2291
  }, CARBON_CONSTANTS.modalAnimationMs);
1282
2292
  }
1283
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TextTemplateAddEditModalComponent, deps: [{ token: i1$1.FormBuilder }, { token: i1.KeyGeneratorService }], target: i0.ɵɵFactoryTarget.Component }); }
1284
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: TextTemplateAddEditModalComponent, isStandalone: true, selector: "valtimo-text-template-add-edit-modal", inputs: { open: "open", type: "type", defaultKeyValue: "defaultKeyValue" }, outputs: { closeEvent: "closeEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<cds-modal\n *ngIf=\"{\n isAdd: type === 'add'\n } as vars\"\n [open]=\"open\"\n showFooter=\"true\"\n [title]=\"vars.title\"\n valtimoCdsModal\n>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"onCancel()\">\n <h3 cdsModalHeaderHeading>\n {{\n vars.isAdd\n ? 'Add'\n : 'Edit'\n }}\n </h3>\n </cds-modal-header>\n\n <section cdsModalContent>\n <form [formGroup]=\"form\">\n <cds-label [invalid]=\"key.dirty && key.invalid\">\n {{ 'Key' }}\n\n <input\n formControlName=\"key\"\n cdsText\n placeholder=\"{{ 'key' }}\"\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 {{ vars.isAdd ? ('interface.create' | translate) : ('interface.save' | translate) }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ModalModule }, { kind: "component", type: i4$1.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i4$1.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i4$1.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i4$1.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i4$1.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { 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: InputModule }, { kind: "component", type: i4$1.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i4$1.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2293
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TextTemplateAddEditModalComponent, deps: [{ token: i1.FormBuilder }, { token: i3.KeyGeneratorService }], target: i0.ɵɵFactoryTarget.Component }); }
2294
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TextTemplateAddEditModalComponent, isStandalone: true, selector: "valtimo-text-template-add-edit-modal", inputs: { open: "open", type: "type", defaultKeyValue: "defaultKeyValue" }, outputs: { closeEvent: "closeEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<cds-modal\n *ngIf=\"{\n isAdd: type === 'add'\n } as vars\"\n [open]=\"open\"\n showFooter=\"true\"\n [title]=\"vars.title\"\n valtimoCdsModal\n>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"onCancel()\">\n <h3 cdsModalHeaderHeading>\n {{\n vars.isAdd\n ? 'Add'\n : 'Edit'\n }}\n </h3>\n </cds-modal-header>\n\n <section cdsModalContent>\n <form [formGroup]=\"form\">\n <cds-label [invalid]=\"key.dirty && key.invalid\">\n {{ 'Key' }}\n\n <input\n formControlName=\"key\"\n cdsText\n placeholder=\"{{ 'key' }}\"\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 {{ vars.isAdd ? ('interface.create' | translate) : ('interface.save' | translate) }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ModalModule }, { kind: "component", type: i4.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i4.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i4.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i4.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i4.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: InputModule }, { kind: "component", type: i4.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i4.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1285
2295
  }
1286
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TextTemplateAddEditModalComponent, decorators: [{
2296
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TextTemplateAddEditModalComponent, decorators: [{
1287
2297
  type: Component,
1288
2298
  args: [{ standalone: true, selector: 'valtimo-text-template-add-edit-modal', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
1289
2299
  CommonModule,
@@ -1293,7 +2303,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
1293
2303
  ReactiveFormsModule,
1294
2304
  InputModule
1295
2305
  ], template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<cds-modal\n *ngIf=\"{\n isAdd: type === 'add'\n } as vars\"\n [open]=\"open\"\n showFooter=\"true\"\n [title]=\"vars.title\"\n valtimoCdsModal\n>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"onCancel()\">\n <h3 cdsModalHeaderHeading>\n {{\n vars.isAdd\n ? 'Add'\n : 'Edit'\n }}\n </h3>\n </cds-modal-header>\n\n <section cdsModalContent>\n <form [formGroup]=\"form\">\n <cds-label [invalid]=\"key.dirty && key.invalid\">\n {{ 'Key' }}\n\n <input\n formControlName=\"key\"\n cdsText\n placeholder=\"{{ 'key' }}\"\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 {{ vars.isAdd ? ('interface.create' | translate) : ('interface.save' | translate) }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n" }]
1296
- }], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: i1.KeyGeneratorService }], propDecorators: { open: [{
2306
+ }], ctorParameters: () => [{ type: i1.FormBuilder }, { type: i3.KeyGeneratorService }], propDecorators: { open: [{
1297
2307
  type: Input
1298
2308
  }], type: [{
1299
2309
  type: Input
@@ -1376,7 +2386,6 @@ class TextTemplateListComponent {
1376
2386
  this._caseDefinitionId$.pipe(take(1), switchMap(caseDefinitionId => this.templateService.deleteTemplates({
1377
2387
  caseDefinitionKey: caseDefinitionId.caseDefinitionKey,
1378
2388
  caseDefinitionVersionTag: caseDefinitionId.caseDefinitionVersionTag,
1379
- type: 'text',
1380
2389
  templates
1381
2390
  }))).subscribe(_ => {
1382
2391
  this.reloadTemplateList();
@@ -1396,12 +2405,12 @@ class TextTemplateListComponent {
1396
2405
  });
1397
2406
  }
1398
2407
  setSelectedTemplateKeys() {
1399
- this.selectedRowKeys$.next(this.carbonList.selectedItems.map((template) => template.key));
2408
+ this.selectedRowKeys$.next(this.carbonList.selectedItems.map((template) => ({ key: template.key, type: template.type })));
1400
2409
  }
1401
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TextTemplateListComponent, deps: [{ token: FreemarkerTemplateManagementService }, { token: i2$2.Router }, { token: i2$2.ActivatedRoute }, { token: i3.EnvironmentService }], target: i0.ɵɵFactoryTarget.Component }); }
1402
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: TextTemplateListComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "carbonList", first: true, predicate: CarbonListComponent, descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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 [header]=\"false\"\n [items]=\"templates$ | async\"\n [fields]=\"fields\"\n [loading]=\"loading$ | async\"\n [showSelectionColumn]=\"!(readOnly$ | async)\"\n (rowClicked)=\"onRowClick($event)\"\n>\n <ng-container header> {{ 'Title' }}</ng-container>\n\n <div carbonToolbarContent>\n <ng-container [ngTemplateOutlet]=\"addTemplateButton\"></ng-container>\n </div>\n\n <ng-container carbonToolbarActions>\n <button cdsButton=\"primary\" (click)=\"showDeleteModal()\">\n {{ 'interface.delete' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n </ng-container>\n\n <valtimo-no-results\n [action]=\"addTemplateButton\"\n description=\"{{ 'Come back later.' }}\"\n title=\"{{ 'No templates found' }}\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n\n<valtimo-text-template-add-edit-modal\n [open]=\"showAddModal$ | async\"\n (closeEvent)=\"onAdd($event)\"\n></valtimo-text-template-add-edit-modal>\n\n<ng-container *ngIf=\"{selectedRowKeys: selectedRowKeys$ | async} as obs\">\n <valtimo-text-template-delete-modal\n [deleteRowKeys]=\"obs.selectedRowKeys\"\n [showDeleteModal$]=\"showDeleteModal$\"\n (deleteEvent)=\"onDelete($event)\"\n >\n </valtimo-text-template-delete-modal>\n</ng-container>\n\n<ng-template #addTemplateButton>\n <button cdsButton=\"primary\"\n [disabled]=\"readOnly$ | async\"\n (click)=\"openAddModal()\">\n {{ 'Add' }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i1.CarbonListComponent, selector: "valtimo-carbon-list", inputs: ["items", "fields", "tableTranslations", "paginatorConfig", "pagination", "loading", "actions", "actionItems", "showActionItems", "header", "hideColumnHeader", "initialSortState", "sortState", "isSearchable", "enableSingleSelection", "lastColumnTemplate", "paginationIdentifier", "showSelectionColumn", "striped", "hideToolbar", "lockedTooltipTranslationKey", "movingRowsEnabled", "dragAndDrop", "dragAndDropDisabled"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged", "moveRow", "itemsReordered"] }, { kind: "component", type: i1.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "component", type: TextTemplateDeleteModalComponent, selector: "valtimo-text-template-delete-modal", inputs: ["deleteRowKeys", "showDeleteModal$"], outputs: ["deleteEvent"] }, { kind: "component", type: TextTemplateAddEditModalComponent, selector: "valtimo-text-template-add-edit-modal", inputs: ["open", "type", "defaultKeyValue"], outputs: ["closeEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2410
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TextTemplateListComponent, deps: [{ token: FreemarkerTemplateManagementService }, { token: i2$2.Router }, { token: i2$2.ActivatedRoute }, { token: i3$1.EnvironmentService }], target: i0.ɵɵFactoryTarget.Component }); }
2411
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TextTemplateListComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "carbonList", first: true, predicate: CarbonListComponent, descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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 [header]=\"false\"\n [items]=\"templates$ | async\"\n [fields]=\"fields\"\n [loading]=\"loading$ | async\"\n [showSelectionColumn]=\"!(readOnly$ | async)\"\n (rowClicked)=\"onRowClick($event)\"\n>\n <ng-container header> {{ 'Title' }}</ng-container>\n\n <div carbonToolbarContent>\n <ng-container [ngTemplateOutlet]=\"addTemplateButton\"></ng-container>\n </div>\n\n <ng-container carbonToolbarActions>\n <button cdsButton=\"primary\" (click)=\"showDeleteModal()\">\n {{ 'interface.delete' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n </ng-container>\n\n <valtimo-no-results\n [action]=\"addTemplateButton\"\n description=\"{{ 'Come back later.' }}\"\n title=\"{{ 'No templates found' }}\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n\n<valtimo-text-template-add-edit-modal\n [open]=\"showAddModal$ | async\"\n (closeEvent)=\"onAdd($event)\"\n></valtimo-text-template-add-edit-modal>\n\n<ng-container *ngIf=\"{selectedRowKeys: selectedRowKeys$ | async} as obs\">\n <valtimo-text-template-delete-modal\n [deleteRowKeys]=\"obs.selectedRowKeys\"\n [showDeleteModal$]=\"showDeleteModal$\"\n (deleteEvent)=\"onDelete($event)\"\n >\n </valtimo-text-template-delete-modal>\n</ng-container>\n\n<ng-template #addTemplateButton>\n <button cdsButton=\"primary\"\n [disabled]=\"readOnly$ | async\"\n (click)=\"openAddModal()\">\n {{ 'Add' }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i3.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: i3.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }, { kind: "component", type: TextTemplateDeleteModalComponent, selector: "valtimo-text-template-delete-modal", inputs: ["deleteRowKeys", "showDeleteModal$"], outputs: ["deleteEvent"] }, { kind: "component", type: TextTemplateAddEditModalComponent, selector: "valtimo-text-template-add-edit-modal", inputs: ["open", "type", "defaultKeyValue"], outputs: ["closeEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1403
2412
  }
1404
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TextTemplateListComponent, decorators: [{
2413
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TextTemplateListComponent, decorators: [{
1405
2414
  type: Component,
1406
2415
  args: [{ standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
1407
2416
  CommonModule,
@@ -1411,7 +2420,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
1411
2420
  TextTemplateDeleteModalComponent,
1412
2421
  TextTemplateAddEditModalComponent
1413
2422
  ], template: "<!--\n ~ Copyright 2015-2023 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 [header]=\"false\"\n [items]=\"templates$ | async\"\n [fields]=\"fields\"\n [loading]=\"loading$ | async\"\n [showSelectionColumn]=\"!(readOnly$ | async)\"\n (rowClicked)=\"onRowClick($event)\"\n>\n <ng-container header> {{ 'Title' }}</ng-container>\n\n <div carbonToolbarContent>\n <ng-container [ngTemplateOutlet]=\"addTemplateButton\"></ng-container>\n </div>\n\n <ng-container carbonToolbarActions>\n <button cdsButton=\"primary\" (click)=\"showDeleteModal()\">\n {{ 'interface.delete' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n </ng-container>\n\n <valtimo-no-results\n [action]=\"addTemplateButton\"\n description=\"{{ 'Come back later.' }}\"\n title=\"{{ 'No templates found' }}\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n\n<valtimo-text-template-add-edit-modal\n [open]=\"showAddModal$ | async\"\n (closeEvent)=\"onAdd($event)\"\n></valtimo-text-template-add-edit-modal>\n\n<ng-container *ngIf=\"{selectedRowKeys: selectedRowKeys$ | async} as obs\">\n <valtimo-text-template-delete-modal\n [deleteRowKeys]=\"obs.selectedRowKeys\"\n [showDeleteModal$]=\"showDeleteModal$\"\n (deleteEvent)=\"onDelete($event)\"\n >\n </valtimo-text-template-delete-modal>\n</ng-container>\n\n<ng-template #addTemplateButton>\n <button cdsButton=\"primary\"\n [disabled]=\"readOnly$ | async\"\n (click)=\"openAddModal()\">\n {{ 'Add' }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n" }]
1414
- }], ctorParameters: () => [{ type: FreemarkerTemplateManagementService }, { type: i2$2.Router }, { type: i2$2.ActivatedRoute }, { type: i3.EnvironmentService }], propDecorators: { carbonList: [{
2423
+ }], ctorParameters: () => [{ type: FreemarkerTemplateManagementService }, { type: i2$2.Router }, { type: i2$2.ActivatedRoute }, { type: i3$1.EnvironmentService }], propDecorators: { carbonList: [{
1415
2424
  type: ViewChild,
1416
2425
  args: [CarbonListComponent]
1417
2426
  }] } });
@@ -1448,7 +2457,6 @@ class TextTemplateEditorComponent {
1448
2457
  this.moreDisabled$ = new BehaviorSubject(true);
1449
2458
  this.showDeleteModal$ = new BehaviorSubject(false);
1450
2459
  this.updatedModelValue$ = new BehaviorSubject('');
1451
- this.canUpdateGlobalConfiguration$ = this.environmentService.canUpdateGlobalConfiguration();
1452
2460
  this._caseDefinitionId$ = getCaseManagementRouteParams(this.route).pipe(filter((params) => !!params?.caseDefinitionKey));
1453
2461
  this.templateKey$ = combineLatest([this.route.params, this.route.parent.params]).pipe(map(([params, parentParams]) => params?.templateKey || parentParams?.templateKey), filter(templateKey => !!templateKey));
1454
2462
  this.readOnly$ = this._caseDefinitionId$.pipe(switchMap(caseDefinitionId => combineLatest([
@@ -1506,7 +2514,6 @@ class TextTemplateEditorComponent {
1506
2514
  this._caseDefinitionId$.pipe(take(1)).subscribe(caseDefinitionId => this.templateService.deleteTemplates({
1507
2515
  caseDefinitionKey: caseDefinitionId.caseDefinitionKey,
1508
2516
  caseDefinitionVersionTag: caseDefinitionId.caseDefinitionVersionTag,
1509
- type: 'text',
1510
2517
  templates
1511
2518
  }).pipe(take(1)).subscribe(_ => this.router.navigate([`/case-management/case/${caseDefinitionId.caseDefinitionKey}/version/${caseDefinitionId.caseDefinitionVersionTag}/text-template`])));
1512
2519
  }
@@ -1574,10 +2581,10 @@ class TextTemplateEditorComponent {
1574
2581
  title: this.translateService.instant('Saved successfully'),
1575
2582
  });
1576
2583
  }
1577
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TextTemplateEditorComponent, deps: [{ token: FreemarkerTemplateManagementService }, { token: i2$2.ActivatedRoute }, { token: i1.PageTitleService }, { token: i2$2.Router }, { token: i4$1.NotificationService }, { token: i5.TranslateService }, { token: i1.BreadcrumbService }, { token: i3.EnvironmentService }], target: i0.ɵɵFactoryTarget.Component }); }
1578
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: TextTemplateEditorComponent, isStandalone: true, selector: "ng-component", providers: [NotificationService], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n *ngIf=\"{\n model: model$ | async,\n updatedModelValue: updatedModelValue$ | async,\n template: template$ | async,\n } as obs\">\n\n <div class=\"template-explanation\">\n Text Templates use <a target=\"_blank\" href=\"https://freemarker.apache.org/docs/dgui_quickstart_basics.html\">FreeMarker</a>\n to create placeholders inside the text. The data-model for FreeMarker is based upon nested <a\n target=\"_blank\" href=\"https://docs.valtimo.nl/reference/modules/value-resolver\">Valtimo value-resolvers</a>\n with a slightly different notation. For example: $&#123;doc.firstName&#125;. Retrieves\n the `firstName` from the case.\n\n Text Templates can be used as value resolvers. For example: $&#123;template.my-text-template&#125; or\n `template:my-text-template`.\n </div>\n\n <valtimo-editor\n [model]=\"obs.model\"\n [disabled]=\"(editorDisabled$ | async) || (readOnly$ | async)\"\n (validEvent)=\"onValid($event)\"\n (valueChangeEvent)=\"onValueChange($event)\"\n [fitPage]=\"true\"\n [fitPageExtraSpace]=\"80\"\n ></valtimo-editor>\n</ng-container>\n\n<ng-container renderInPageHeader>\n <ng-template>\n <div *ngIf=\"{\n model: model$ | async,\n moreDisabled: moreDisabled$ | async,\n template: template$ | async,\n } as obs\"\n class=\"buttons-container\"\n >\n <cds-overflow-menu class=\"overflow-button\">\n <cds-overflow-menu-option\n [disabled]=\"obs.moreDisabled || (readOnly$ | async)\"\n type=\"danger\"\n (selected)=\"showDeleteModal()\"\n >{{ 'interface.delete' | translate }}\n </cds-overflow-menu-option\n >\n </cds-overflow-menu>\n\n <button\n [disabled]=\"(saveDisabled$ | async) || (readOnly$ | async)\"\n cdsButton=\"primary\"\n size=\"md\"\n (click)=\"updateTemplate()\"\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<ng-container *ngIf=\"{templateKey: templateKey$ | async} as obs\">\n <valtimo-text-template-delete-modal\n [deleteRowKeys]=\"[obs.templateKey]\"\n [showDeleteModal$]=\"showDeleteModal$\"\n (deleteEvent)=\"onDelete($event)\"\n >\n </valtimo-text-template-delete-modal>\n</ng-container>\n", styles: [".loading-container{display:flex;width:100%;justify-content:center}.overflow-button{margin-right:16px}.buttons-container{display:flex;flex-direction:row}.template-explanation{margin-top:16px;margin-bottom:24px}\n/*!\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: TabsModule }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i4$1.OverflowMenu, selector: "cds-overflow-menu, ibm-overflow-menu", inputs: ["buttonLabel", "description", "flip", "placement", "open", "customTrigger", "offset", "wrapperClass", "triggerClass"], outputs: ["openChange"] }, { kind: "component", type: i4$1.OverflowMenuOption, selector: "cds-overflow-menu-option, ibm-overflow-menu-option", inputs: ["divider", "type", "disabled", "href", "target", "innerClass"], outputs: ["selected"] }, { kind: "component", type: TextTemplateDeleteModalComponent, selector: "valtimo-text-template-delete-modal", inputs: ["deleteRowKeys", "showDeleteModal$"], outputs: ["deleteEvent"] }, { kind: "ngmodule", type: CarbonListModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: EditorModule }, { kind: "component", type: i1.EditorComponent, selector: "valtimo-editor", inputs: ["editorOptions", "model", "disabled", "formatOnLoad", "widthPx", "heightPx", "heightStyle", "jsonSchema", "fitPage", "fitPageExtraSpace"], outputs: ["validEvent", "valueChangeEvent"] }, { kind: "directive", type: RenderInPageHeaderDirective, selector: "[renderInPageHeader]", inputs: ["fullWidth"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i4$1.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2584
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TextTemplateEditorComponent, deps: [{ token: FreemarkerTemplateManagementService }, { token: i2$2.ActivatedRoute }, { token: i3.PageTitleService }, { token: i2$2.Router }, { token: i4.NotificationService }, { token: i5$1.TranslateService }, { token: i3.BreadcrumbService }, { token: i3$1.EnvironmentService }], target: i0.ɵɵFactoryTarget.Component }); }
2585
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TextTemplateEditorComponent, isStandalone: true, selector: "ng-component", providers: [NotificationService], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n *ngIf=\"{\n model: model$ | async,\n updatedModelValue: updatedModelValue$ | async,\n template: template$ | async,\n } as obs\">\n\n <div class=\"template-explanation\">\n Text Templates use <a target=\"_blank\" href=\"https://freemarker.apache.org/docs/dgui_quickstart_basics.html\">FreeMarker</a>\n to create placeholders inside the text. The data-model for FreeMarker is based upon nested <a\n target=\"_blank\" href=\"https://docs.valtimo.nl/features/value-resolvers\">Valtimo value-resolvers</a>\n with a slightly different notation. For example: $&#123;doc.firstName&#125;. Retrieves\n the `firstName` from the case.\n\n Text Templates can be used as value resolvers. For example: $&#123;template.my-text-template&#125; or\n `template:my-text-template`.\n </div>\n\n <valtimo-editor\n [model]=\"obs.model\"\n [disabled]=\"(editorDisabled$ | async) || (readOnly$ | async)\"\n (validEvent)=\"onValid($event)\"\n (valueChangeEvent)=\"onValueChange($event)\"\n [fitPage]=\"true\"\n [fitPageExtraSpace]=\"80\"\n ></valtimo-editor>\n</ng-container>\n\n<ng-container renderInPageHeader>\n <ng-template>\n <div *ngIf=\"{\n model: model$ | async,\n moreDisabled: moreDisabled$ | async,\n template: template$ | async,\n } as obs\"\n class=\"buttons-container\"\n >\n <cds-overflow-menu class=\"overflow-button\">\n <cds-overflow-menu-option\n [disabled]=\"obs.moreDisabled || (readOnly$ | async)\"\n type=\"danger\"\n (selected)=\"showDeleteModal()\"\n >{{ 'interface.delete' | translate }}\n </cds-overflow-menu-option\n >\n </cds-overflow-menu>\n\n <button\n [disabled]=\"(saveDisabled$ | async) || (readOnly$ | async)\"\n cdsButton=\"primary\"\n size=\"md\"\n (click)=\"updateTemplate()\"\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<ng-container *ngIf=\"{templateKey: templateKey$ | async} as obs\">\n <valtimo-text-template-delete-modal\n [deleteRowKeys]=\"[{key: obs.templateKey, type: 'text'}]\"\n [showDeleteModal$]=\"showDeleteModal$\"\n (deleteEvent)=\"onDelete($event)\"\n >\n </valtimo-text-template-delete-modal>\n</ng-container>\n", styles: [".loading-container{display:flex;width:100%;justify-content:center}.overflow-button{margin-right:16px}.buttons-container{display:flex;flex-direction:row}.template-explanation{margin-top:16px;margin-bottom:24px}\n/*!\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: TabsModule }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i4.OverflowMenu, selector: "cds-overflow-menu, ibm-overflow-menu", inputs: ["buttonLabel", "description", "flip", "placement", "open", "customTrigger", "offset", "wrapperClass", "triggerClass"], outputs: ["openChange"] }, { kind: "component", type: i4.OverflowMenuOption, selector: "cds-overflow-menu-option, ibm-overflow-menu-option", inputs: ["divider", "type", "disabled", "href", "target", "innerClass"], outputs: ["selected"] }, { kind: "component", type: TextTemplateDeleteModalComponent, selector: "valtimo-text-template-delete-modal", inputs: ["deleteRowKeys", "showDeleteModal$"], outputs: ["deleteEvent"] }, { kind: "ngmodule", type: CarbonListModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: EditorModule }, { kind: "component", type: i3.EditorComponent, selector: "valtimo-editor", inputs: ["editorOptions", "model", "disabled", "formatOnLoad", "widthPx", "heightPx", "heightStyle", "jsonSchema", "fitPage", "fitPageExtraSpace"], outputs: ["validEvent", "valueChangeEvent"] }, { kind: "directive", type: RenderInPageHeaderDirective, selector: "[renderInPageHeader]", inputs: ["fullWidth"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i4.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1579
2586
  }
1580
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TextTemplateEditorComponent, decorators: [{
2587
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TextTemplateEditorComponent, decorators: [{
1581
2588
  type: Component,
1582
2589
  args: [{ standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, providers: [NotificationService], imports: [
1583
2590
  CommonModule,
@@ -1590,8 +2597,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
1590
2597
  EditorModule,
1591
2598
  RenderInPageHeaderDirective,
1592
2599
  IconModule,
1593
- ], template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n *ngIf=\"{\n model: model$ | async,\n updatedModelValue: updatedModelValue$ | async,\n template: template$ | async,\n } as obs\">\n\n <div class=\"template-explanation\">\n Text Templates use <a target=\"_blank\" href=\"https://freemarker.apache.org/docs/dgui_quickstart_basics.html\">FreeMarker</a>\n to create placeholders inside the text. The data-model for FreeMarker is based upon nested <a\n target=\"_blank\" href=\"https://docs.valtimo.nl/reference/modules/value-resolver\">Valtimo value-resolvers</a>\n with a slightly different notation. For example: $&#123;doc.firstName&#125;. Retrieves\n the `firstName` from the case.\n\n Text Templates can be used as value resolvers. For example: $&#123;template.my-text-template&#125; or\n `template:my-text-template`.\n </div>\n\n <valtimo-editor\n [model]=\"obs.model\"\n [disabled]=\"(editorDisabled$ | async) || (readOnly$ | async)\"\n (validEvent)=\"onValid($event)\"\n (valueChangeEvent)=\"onValueChange($event)\"\n [fitPage]=\"true\"\n [fitPageExtraSpace]=\"80\"\n ></valtimo-editor>\n</ng-container>\n\n<ng-container renderInPageHeader>\n <ng-template>\n <div *ngIf=\"{\n model: model$ | async,\n moreDisabled: moreDisabled$ | async,\n template: template$ | async,\n } as obs\"\n class=\"buttons-container\"\n >\n <cds-overflow-menu class=\"overflow-button\">\n <cds-overflow-menu-option\n [disabled]=\"obs.moreDisabled || (readOnly$ | async)\"\n type=\"danger\"\n (selected)=\"showDeleteModal()\"\n >{{ 'interface.delete' | translate }}\n </cds-overflow-menu-option\n >\n </cds-overflow-menu>\n\n <button\n [disabled]=\"(saveDisabled$ | async) || (readOnly$ | async)\"\n cdsButton=\"primary\"\n size=\"md\"\n (click)=\"updateTemplate()\"\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<ng-container *ngIf=\"{templateKey: templateKey$ | async} as obs\">\n <valtimo-text-template-delete-modal\n [deleteRowKeys]=\"[obs.templateKey]\"\n [showDeleteModal$]=\"showDeleteModal$\"\n (deleteEvent)=\"onDelete($event)\"\n >\n </valtimo-text-template-delete-modal>\n</ng-container>\n", styles: [".loading-container{display:flex;width:100%;justify-content:center}.overflow-button{margin-right:16px}.buttons-container{display:flex;flex-direction:row}.template-explanation{margin-top:16px;margin-bottom:24px}\n/*!\n * Copyright 2015-2023 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"] }]
1594
- }], ctorParameters: () => [{ type: FreemarkerTemplateManagementService }, { type: i2$2.ActivatedRoute }, { type: i1.PageTitleService }, { type: i2$2.Router }, { type: i4$1.NotificationService }, { type: i5.TranslateService }, { type: i1.BreadcrumbService }, { type: i3.EnvironmentService }] });
2600
+ ], template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n *ngIf=\"{\n model: model$ | async,\n updatedModelValue: updatedModelValue$ | async,\n template: template$ | async,\n } as obs\">\n\n <div class=\"template-explanation\">\n Text Templates use <a target=\"_blank\" href=\"https://freemarker.apache.org/docs/dgui_quickstart_basics.html\">FreeMarker</a>\n to create placeholders inside the text. The data-model for FreeMarker is based upon nested <a\n target=\"_blank\" href=\"https://docs.valtimo.nl/features/value-resolvers\">Valtimo value-resolvers</a>\n with a slightly different notation. For example: $&#123;doc.firstName&#125;. Retrieves\n the `firstName` from the case.\n\n Text Templates can be used as value resolvers. For example: $&#123;template.my-text-template&#125; or\n `template:my-text-template`.\n </div>\n\n <valtimo-editor\n [model]=\"obs.model\"\n [disabled]=\"(editorDisabled$ | async) || (readOnly$ | async)\"\n (validEvent)=\"onValid($event)\"\n (valueChangeEvent)=\"onValueChange($event)\"\n [fitPage]=\"true\"\n [fitPageExtraSpace]=\"80\"\n ></valtimo-editor>\n</ng-container>\n\n<ng-container renderInPageHeader>\n <ng-template>\n <div *ngIf=\"{\n model: model$ | async,\n moreDisabled: moreDisabled$ | async,\n template: template$ | async,\n } as obs\"\n class=\"buttons-container\"\n >\n <cds-overflow-menu class=\"overflow-button\">\n <cds-overflow-menu-option\n [disabled]=\"obs.moreDisabled || (readOnly$ | async)\"\n type=\"danger\"\n (selected)=\"showDeleteModal()\"\n >{{ 'interface.delete' | translate }}\n </cds-overflow-menu-option\n >\n </cds-overflow-menu>\n\n <button\n [disabled]=\"(saveDisabled$ | async) || (readOnly$ | async)\"\n cdsButton=\"primary\"\n size=\"md\"\n (click)=\"updateTemplate()\"\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<ng-container *ngIf=\"{templateKey: templateKey$ | async} as obs\">\n <valtimo-text-template-delete-modal\n [deleteRowKeys]=\"[{key: obs.templateKey, type: 'text'}]\"\n [showDeleteModal$]=\"showDeleteModal$\"\n (deleteEvent)=\"onDelete($event)\"\n >\n </valtimo-text-template-delete-modal>\n</ng-container>\n", styles: [".loading-container{display:flex;width:100%;justify-content:center}.overflow-button{margin-right:16px}.buttons-container{display:flex;flex-direction:row}.template-explanation{margin-top:16px;margin-bottom:24px}\n/*!\n * Copyright 2015-2023 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"] }]
2601
+ }], ctorParameters: () => [{ type: FreemarkerTemplateManagementService }, { type: i2$2.ActivatedRoute }, { type: i3.PageTitleService }, { type: i2$2.Router }, { type: i4.NotificationService }, { type: i5$1.TranslateService }, { type: i3.BreadcrumbService }, { type: i3$1.EnvironmentService }] });
1595
2602
 
1596
2603
  /*
1597
2604
  * Copyright 2015-2023 Ritense BV, the Netherlands.
@@ -1621,11 +2628,11 @@ const routes = [
1621
2628
  },
1622
2629
  ];
1623
2630
  class TemplateManagementRoutingModule {
1624
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TemplateManagementRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1625
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: TemplateManagementRoutingModule, imports: [CommonModule, i2$2.RouterModule], exports: [RouterModule] }); }
1626
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TemplateManagementRoutingModule, imports: [CommonModule, RouterModule.forChild(routes), RouterModule] }); }
2631
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TemplateManagementRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2632
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TemplateManagementRoutingModule, imports: [CommonModule, i2$2.RouterModule], exports: [RouterModule] }); }
2633
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TemplateManagementRoutingModule, imports: [CommonModule, RouterModule.forChild(routes), RouterModule] }); }
1627
2634
  }
1628
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TemplateManagementRoutingModule, decorators: [{
2635
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TemplateManagementRoutingModule, decorators: [{
1629
2636
  type: NgModule,
1630
2637
  args: [{
1631
2638
  imports: [CommonModule, RouterModule.forChild(routes)],
@@ -1649,34 +2656,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
1649
2656
  * limitations under the License.
1650
2657
  */
1651
2658
  class GenerateTextFileComponent {
1652
- constructor(modalService, documentService, templateService) {
1653
- this.modalService = modalService;
1654
- this.documentService = documentService;
2659
+ constructor(templateService) {
1655
2660
  this.templateService = templateService;
1656
2661
  this.valid = new EventEmitter();
1657
2662
  this.configuration = new EventEmitter();
1658
2663
  this.formValue$ = new BehaviorSubject(null);
1659
2664
  this.valid$ = new BehaviorSubject(false);
2665
+ this._subscriptions = new Subscription();
1660
2666
  this.loading$ = new BehaviorSubject(true);
1661
- this.textTemplateItems$ = this.modalService.modalData$.pipe(switchMap(params => this.documentService.findProcessDocumentDefinitionsByProcessDefinitionKey(params?.processDefinitionKey)), switchMap(processDocumentDefinitions => combineLatest([
1662
- of({ content: [] }),
1663
- ...processDocumentDefinitions.map(processDocumentDefinition => this.templateService.getAllTextTemplates(processDocumentDefinition.id.documentDefinitionId.name)),
1664
- ])), map(results => {
1665
- return results
1666
- .flatMap(result => result.content)
1667
- .map(template => ({
1668
- id: template.key,
1669
- text: template.key,
1670
- }));
1671
- }), tap(() => {
1672
- this.loading$.next(false);
1673
- }));
2667
+ this.textTemplateItems$ = new BehaviorSubject([]);
1674
2668
  }
1675
2669
  ngOnInit() {
1676
2670
  this.openSaveSubscription();
2671
+ this.initContextHandling();
1677
2672
  }
1678
2673
  ngOnDestroy() {
1679
- this.saveSubscription?.unsubscribe();
2674
+ this._subscriptions.unsubscribe();
1680
2675
  }
1681
2676
  formValueChange(formValue) {
1682
2677
  this.formValue$.next(formValue);
@@ -1688,7 +2683,7 @@ class GenerateTextFileComponent {
1688
2683
  this.valid.emit(valid);
1689
2684
  }
1690
2685
  openSaveSubscription() {
1691
- this.saveSubscription = this.save$?.subscribe(save => {
2686
+ const saveSubscription = this.save$?.subscribe(save => {
1692
2687
  combineLatest([this.formValue$, this.valid$])
1693
2688
  .pipe(take(1))
1694
2689
  .subscribe(([formValue, valid]) => {
@@ -1697,19 +2692,41 @@ class GenerateTextFileComponent {
1697
2692
  }
1698
2693
  });
1699
2694
  });
2695
+ this._subscriptions.add(saveSubscription);
1700
2696
  }
1701
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GenerateTextFileComponent, deps: [{ token: i1.ModalService }, { token: i2$1.DocumentService }, { token: FreemarkerTemplateManagementService }], target: i0.ɵɵFactoryTarget.Component }); }
1702
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: GenerateTextFileComponent, isStandalone: false, selector: "valtimo-generate-text-file-configuration", inputs: { save$: "save$", disabled$: "disabled$", pluginId: "pluginId", prefillConfiguration$: "prefillConfiguration$" }, outputs: { valid: "valid", configuration: "configuration" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2022 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefillConfiguration$ ? (prefillConfiguration$ | async) : null,\n textTemplateItems: textTemplateItems$ | async,\n loading: loading$ | async,\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <v-paragraph [margin]=\"true\" [italic]=\"true\">\n {{ 'generateTextFileDescription' | pluginTranslate: pluginId | async }}\n </v-paragraph>\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-select\n [items]=\"obs.textTemplateItems\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"textTemplateKey\"\n [title]=\"'textTemplateKey' | pluginTranslate: pluginId | async\"\n [disabled]=\"obs.disabled\"\n [defaultSelectionId]=\"obs.prefill?.textTemplateKey\"\n [required]=\"true\"\n [loading]=\"!obs.textTemplateItems\"\n [tooltip]=\"'textTemplateKeyTooltip' | pluginTranslate: pluginId | async\"\n ></v-select>\n <v-input\n name=\"processVariableName\"\n [title]=\"'processVariableName' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.prefill?.processVariableName || 'contentId'\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'processVariableNameTooltip' | pluginTranslate: pluginId | async\"\n ></v-input>\n </v-form>\n </ng-container>\n</ng-container>\n\n<ng-template #loading>\n <div class=\"loading-container\">\n <cds-loading></cds-loading>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { kind: "component", type: i1.ParagraphComponent, selector: "v-paragraph", inputs: ["center", "fullWidth", "margin", "italic", "loading", "dataTestId"] }, { kind: "component", type: i1.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "disabled", "dropUp", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "clearText", "clearable", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder", "smallMargin", "carbonTheme", "appendInline", "dataTestId"], outputs: ["selectedChange"] }, { kind: "component", type: i1.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "smallMargin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$", "carbonTheme", "placeholder", "dataTestId", "trim"], outputs: ["valueChange"] }, { kind: "component", type: i4$1.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.PluginTranslatePipe, name: "pluginTranslate" }] }); }
2697
+ initContextHandling() {
2698
+ if (!this.context$) {
2699
+ return;
2700
+ }
2701
+ const contextSub = this.context$.pipe(switchMap(([managementContext, caseDefinitionId]) => {
2702
+ if (managementContext == 'case') {
2703
+ return this.templateService.getAllTextTemplates(caseDefinitionId?.caseDefinitionKey, caseDefinitionId?.caseDefinitionVersionTag);
2704
+ }
2705
+ else {
2706
+ console.error('Freemarker plugin does not support global templates');
2707
+ return of(null);
2708
+ }
2709
+ }), map(results => results?.content.map(template => ({
2710
+ id: template.key,
2711
+ text: template.key,
2712
+ })) || []), tap(() => this.loading$.next(false)))
2713
+ .subscribe(results => this.textTemplateItems$.next(results));
2714
+ this._subscriptions.add(contextSub);
2715
+ }
2716
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GenerateTextFileComponent, deps: [{ token: FreemarkerTemplateManagementService }], target: i0.ɵɵFactoryTarget.Component }); }
2717
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: GenerateTextFileComponent, isStandalone: false, selector: "valtimo-generate-text-file-configuration", inputs: { save$: "save$", disabled$: "disabled$", pluginId: "pluginId", context$: "context$", prefillConfiguration$: "prefillConfiguration$" }, outputs: { valid: "valid", configuration: "configuration" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2022 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefillConfiguration$ ? (prefillConfiguration$ | async) : null,\n textTemplateItems: textTemplateItems$ | async,\n loading: loading$ | async,\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <v-paragraph [margin]=\"true\" [italic]=\"true\">\n {{ 'generateTextFileDescription' | pluginTranslate: pluginId | async }}\n </v-paragraph>\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-select\n [items]=\"obs.textTemplateItems\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"textTemplateKey\"\n [title]=\"'textTemplateKey' | pluginTranslate: pluginId | async\"\n [disabled]=\"obs.disabled\"\n [defaultSelectionId]=\"obs.prefill?.textTemplateKey\"\n [required]=\"true\"\n [loading]=\"!obs.textTemplateItems\"\n [tooltip]=\"'textTemplateKeyTooltip' | pluginTranslate: pluginId | async\"\n ></v-select>\n <v-input\n name=\"processVariableName\"\n [title]=\"'processVariableName' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.prefill?.processVariableName || 'contentId'\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'processVariableNameTooltip' | pluginTranslate: pluginId | async\"\n ></v-input>\n </v-form>\n </ng-container>\n</ng-container>\n\n<ng-template #loading>\n <div class=\"loading-container\">\n <cds-loading></cds-loading>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { kind: "component", type: i3.ParagraphComponent, selector: "v-paragraph", inputs: ["center", "fullWidth", "margin", "italic", "loading", "dataTestId"] }, { kind: "component", type: i3.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "disabled", "dropUp", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "clearText", "clearable", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder", "smallMargin", "carbonTheme", "appendInline", "dataTestId"], outputs: ["selectedChange"] }, { kind: "component", type: i3.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "smallMargin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$", "carbonTheme", "placeholder", "dataTestId", "trim"], outputs: ["valueChange"] }, { kind: "component", type: i4.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.PluginTranslatePipe, name: "pluginTranslate" }] }); }
1703
2718
  }
1704
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GenerateTextFileComponent, decorators: [{
2719
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GenerateTextFileComponent, decorators: [{
1705
2720
  type: Component,
1706
2721
  args: [{ standalone: false, selector: 'valtimo-generate-text-file-configuration', template: "<!--\n ~ Copyright 2015-2022 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefillConfiguration$ ? (prefillConfiguration$ | async) : null,\n textTemplateItems: textTemplateItems$ | async,\n loading: loading$ | async,\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <v-paragraph [margin]=\"true\" [italic]=\"true\">\n {{ 'generateTextFileDescription' | pluginTranslate: pluginId | async }}\n </v-paragraph>\n <v-form (valueChange)=\"formValueChange($event)\">\n <v-select\n [items]=\"obs.textTemplateItems\"\n [margin]=\"true\"\n [widthInPx]=\"350\"\n name=\"textTemplateKey\"\n [title]=\"'textTemplateKey' | pluginTranslate: pluginId | async\"\n [disabled]=\"obs.disabled\"\n [defaultSelectionId]=\"obs.prefill?.textTemplateKey\"\n [required]=\"true\"\n [loading]=\"!obs.textTemplateItems\"\n [tooltip]=\"'textTemplateKeyTooltip' | pluginTranslate: pluginId | async\"\n ></v-select>\n <v-input\n name=\"processVariableName\"\n [title]=\"'processVariableName' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.prefill?.processVariableName || 'contentId'\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'processVariableNameTooltip' | pluginTranslate: pluginId | async\"\n ></v-input>\n </v-form>\n </ng-container>\n</ng-container>\n\n<ng-template #loading>\n <div class=\"loading-container\">\n <cds-loading></cds-loading>\n </div>\n</ng-template>\n" }]
1707
- }], ctorParameters: () => [{ type: i1.ModalService }, { type: i2$1.DocumentService }, { type: FreemarkerTemplateManagementService }], propDecorators: { save$: [{
2722
+ }], ctorParameters: () => [{ type: FreemarkerTemplateManagementService }], propDecorators: { save$: [{
1708
2723
  type: Input
1709
2724
  }], disabled$: [{
1710
2725
  type: Input
1711
2726
  }], pluginId: [{
1712
2727
  type: Input
2728
+ }], context$: [{
2729
+ type: Input
1713
2730
  }], prefillConfiguration$: [{
1714
2731
  type: Input
1715
2732
  }], valid: [{
@@ -1734,8 +2751,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
1734
2751
  * limitations under the License.
1735
2752
  */
1736
2753
  class TextTemplatePluginModule {
1737
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TextTemplatePluginModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1738
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: TextTemplatePluginModule, declarations: [GenerateTextFileComponent,
2754
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TextTemplatePluginModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2755
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TextTemplatePluginModule, declarations: [GenerateTextFileComponent,
1739
2756
  TextTemplateConfigurationComponent], imports: [CommonModule,
1740
2757
  PluginTranslatePipeModule,
1741
2758
  TemplateManagementRoutingModule,
@@ -1758,7 +2775,7 @@ class TextTemplatePluginModule {
1758
2775
  NotificationModule,
1759
2776
  RenderInPageHeaderDirective,
1760
2777
  TabsModule], exports: [GenerateTextFileComponent] }); }
1761
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TextTemplatePluginModule, providers: [
2778
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TextTemplatePluginModule, providers: [
1762
2779
  {
1763
2780
  provide: CASE_MANAGEMENT_TAB_TOKEN,
1764
2781
  useValue: {
@@ -1789,7 +2806,7 @@ class TextTemplatePluginModule {
1789
2806
  NotificationModule,
1790
2807
  TabsModule] }); }
1791
2808
  }
1792
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TextTemplatePluginModule, decorators: [{
2809
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TextTemplatePluginModule, decorators: [{
1793
2810
  type: NgModule,
1794
2811
  args: [{
1795
2812
  declarations: [
@@ -1947,12 +2964,12 @@ const textTemplatePluginSpecification = {
1947
2964
  * limitations under the License.
1948
2965
  */
1949
2966
  /*
1950
- * Public API Surface of mail-template
2967
+ * Public API Surface of document-generator
1951
2968
  */
1952
2969
 
1953
2970
  /**
1954
2971
  * Generated bundle index. Do not edit.
1955
2972
  */
1956
2973
 
1957
- export { GenerateMailContentComponent, GenerateMailFileComponent, GenerateTextFileComponent, MailTemplateAddEditModalComponent, MailTemplateConfigurationComponent, MailTemplateDeleteModalComponent, MailTemplateEditorComponent, MailTemplateListComponent, MailTemplatePluginModule, TextTemplateAddEditModalComponent, TextTemplateConfigurationComponent, TextTemplateDeleteModalComponent, TextTemplateEditorComponent, TextTemplateListComponent, TextTemplatePluginModule, mailTemplatePluginSpecification, textTemplatePluginSpecification };
2974
+ export { DOCUMENT_TYPES, DocumentGeneratorConfigurationComponent, DocumentGeneratorPluginModule, DocumentTemplateAddEditModalComponent, DocumentTemplateDeleteModalComponent, DocumentTemplateEditorComponent, DocumentTemplateListComponent, GenerateCsvComponent, GenerateMailContentComponent, GenerateMailFileComponent, GeneratePdfComponent, GenerateTextFileComponent, MailTemplateAddEditModalComponent, MailTemplateConfigurationComponent, MailTemplateDeleteModalComponent, MailTemplateEditorComponent, MailTemplateListComponent, MailTemplatePluginModule, TextTemplateAddEditModalComponent, TextTemplateConfigurationComponent, TextTemplateDeleteModalComponent, TextTemplateEditorComponent, TextTemplateListComponent, TextTemplatePluginModule, documentGeneratorPluginSpecification, mailTemplatePluginSpecification, textTemplatePluginSpecification };
1958
2975
  //# sourceMappingURL=valtimo-plugins-freemarker.mjs.map