@valtimo-plugins/freemarker 5.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.
- package/esm2022/lib/models/freemarker-template.mjs +17 -0
- package/esm2022/lib/models/index.mjs +17 -0
- package/esm2022/lib/plugins/mail-template/assets/index.mjs +17 -0
- package/esm2022/lib/plugins/mail-template/assets/mail-template-plugin-logo.mjs +18 -0
- package/esm2022/lib/plugins/mail-template/components/generate-mail-content/generate-mail-content.component.mjs +94 -0
- package/esm2022/lib/plugins/mail-template/components/generate-mail-file/generate-mail-file.component.mjs +94 -0
- package/esm2022/lib/plugins/mail-template/components/mail-template-add-edit-modal/mail-template-add-edit-modal.component.mjs +87 -0
- package/esm2022/lib/plugins/mail-template/components/mail-template-configuration/mail-template-configuration.component.mjs +77 -0
- package/esm2022/lib/plugins/mail-template/components/mail-template-delete-modal/mail-template-delete-modal.component.mjs +39 -0
- package/esm2022/lib/plugins/mail-template/components/mail-template-editor/mail-template-editor.component.mjs +168 -0
- package/esm2022/lib/plugins/mail-template/components/mail-template-list/mail-template-list.component.mjs +104 -0
- package/esm2022/lib/plugins/mail-template/mail-template-management-routing.module.mjs +48 -0
- package/esm2022/lib/plugins/mail-template/mail-template-plugin-module.mjs +158 -0
- package/esm2022/lib/plugins/mail-template/mail-template-plugin.specification.mjs +74 -0
- package/esm2022/lib/plugins/mail-template/models/config.mjs +17 -0
- package/esm2022/lib/plugins/mail-template/models/index.mjs +17 -0
- package/esm2022/lib/services/freemarker-template-management.service.mjs +68 -0
- package/esm2022/lib/services/index.mjs +17 -0
- package/esm2022/public_api.mjs +29 -0
- package/esm2022/valtimo-plugins-freemarker.mjs +5 -0
- package/fesm2022/valtimo-plugins-freemarker.mjs +1047 -0
- package/fesm2022/valtimo-plugins-freemarker.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/models/freemarker-template.d.ts +40 -0
- package/lib/models/index.d.ts +1 -0
- package/lib/plugins/mail-template/assets/index.d.ts +1 -0
- package/lib/plugins/mail-template/assets/mail-template-plugin-logo.d.ts +2 -0
- package/lib/plugins/mail-template/components/generate-mail-content/generate-mail-content.component.d.ts +33 -0
- package/lib/plugins/mail-template/components/generate-mail-file/generate-mail-file.component.d.ts +33 -0
- package/lib/plugins/mail-template/components/mail-template-add-edit-modal/mail-template-add-edit-modal.component.d.ts +29 -0
- package/lib/plugins/mail-template/components/mail-template-configuration/mail-template-configuration.component.d.ts +25 -0
- package/lib/plugins/mail-template/components/mail-template-delete-modal/mail-template-delete-modal.component.d.ts +11 -0
- package/lib/plugins/mail-template/components/mail-template-editor/mail-template-editor.component.d.ts +50 -0
- package/lib/plugins/mail-template/components/mail-template-list/mail-template-list.component.d.ts +32 -0
- package/lib/plugins/mail-template/mail-template-management-routing.module.d.ts +8 -0
- package/lib/plugins/mail-template/mail-template-plugin-module.d.ts +20 -0
- package/lib/plugins/mail-template/mail-template-plugin.specification.d.ts +3 -0
- package/lib/plugins/mail-template/models/config.d.ts +12 -0
- package/lib/plugins/mail-template/models/index.d.ts +1 -0
- package/lib/services/freemarker-template-management.service.d.ts +20 -0
- package/lib/services/index.d.ts +1 -0
- package/package.json +29 -0
- package/public_api.d.ts +10 -0
|
@@ -0,0 +1,1047 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Component, Input, Output, Injectable, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';
|
|
3
|
+
import { BehaviorSubject, combineLatest, take, switchMap, of, map, tap, filter } from 'rxjs';
|
|
4
|
+
import * as i4 from '@angular/common';
|
|
5
|
+
import { CommonModule } from '@angular/common';
|
|
6
|
+
import * as i1 from '@valtimo/components';
|
|
7
|
+
import { CARBON_CONSTANTS, ViewType, CarbonListComponent, FormModule, ParagraphModule, SelectModule, ConfirmationModalModule, CarbonListModule, EditorModule, InputModule, RenderInPageHeaderDirectiveModule } from '@valtimo/components';
|
|
8
|
+
import * as i6 from '@valtimo/plugin';
|
|
9
|
+
import { PluginTranslatePipeModule } from '@valtimo/plugin';
|
|
10
|
+
import * as i2$1 from '@valtimo/document';
|
|
11
|
+
import * as i1$1 from '@valtimo/config';
|
|
12
|
+
import { ROLE_ADMIN, CASE_MANAGEMENT_TAB_TOKEN } from '@valtimo/config';
|
|
13
|
+
import * as i2 from '@angular/common/http';
|
|
14
|
+
import * as i4$1 from 'carbon-components-angular';
|
|
15
|
+
import { NotificationService, ButtonModule, DialogModule, DropdownModule, IconModule, InputModule as InputModule$1, LoadingModule, ModalModule, NotificationModule, TabsModule } from 'carbon-components-angular';
|
|
16
|
+
import * as i2$2 from '@angular/router';
|
|
17
|
+
import { RouterModule } from '@angular/router';
|
|
18
|
+
import * as i1$2 from '@angular/forms';
|
|
19
|
+
import { Validators, ReactiveFormsModule } from '@angular/forms';
|
|
20
|
+
import * as i5 from '@ngx-translate/core';
|
|
21
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
22
|
+
import { AuthGuardService } from '@valtimo/security';
|
|
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
|
+
|
|
40
|
+
/*
|
|
41
|
+
* Copyright 2015-2022 Ritense BV, the Netherlands.
|
|
42
|
+
*
|
|
43
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
44
|
+
* you may not use this file except in compliance with the License.
|
|
45
|
+
* You may obtain a copy of the License at
|
|
46
|
+
*
|
|
47
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
48
|
+
*
|
|
49
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
50
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
51
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
52
|
+
* See the License for the specific language governing permissions and
|
|
53
|
+
* limitations under the License.
|
|
54
|
+
*/
|
|
55
|
+
|
|
56
|
+
/*
|
|
57
|
+
* Copyright 2015-2022 Ritense BV, the Netherlands.
|
|
58
|
+
*
|
|
59
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
60
|
+
* you may not use this file except in compliance with the License.
|
|
61
|
+
* You may obtain a copy of the License at
|
|
62
|
+
*
|
|
63
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
64
|
+
*
|
|
65
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
66
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
67
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
68
|
+
* See the License for the specific language governing permissions and
|
|
69
|
+
* limitations under the License.
|
|
70
|
+
*/
|
|
71
|
+
class MailTemplateConfigurationComponent {
|
|
72
|
+
constructor() {
|
|
73
|
+
this.valid = new EventEmitter();
|
|
74
|
+
this.configuration = new EventEmitter();
|
|
75
|
+
this.formValue$ = new BehaviorSubject(null);
|
|
76
|
+
this.valid$ = new BehaviorSubject(false);
|
|
77
|
+
}
|
|
78
|
+
ngOnInit() {
|
|
79
|
+
this.openSaveSubscription();
|
|
80
|
+
}
|
|
81
|
+
ngOnDestroy() {
|
|
82
|
+
this.saveSubscription?.unsubscribe();
|
|
83
|
+
}
|
|
84
|
+
formValueChange(formValue) {
|
|
85
|
+
this.formValue$.next(formValue);
|
|
86
|
+
this.handleValid(formValue);
|
|
87
|
+
}
|
|
88
|
+
handleValid(formValue) {
|
|
89
|
+
const valid = !!(formValue.configurationTitle);
|
|
90
|
+
this.valid$.next(valid);
|
|
91
|
+
this.valid.emit(valid);
|
|
92
|
+
}
|
|
93
|
+
openSaveSubscription() {
|
|
94
|
+
this.saveSubscription = this.save$?.subscribe(_ => {
|
|
95
|
+
combineLatest([this.formValue$, this.valid$])
|
|
96
|
+
.pipe(take(1))
|
|
97
|
+
.subscribe(([formValue, valid]) => {
|
|
98
|
+
if (valid) {
|
|
99
|
+
this.configuration.emit(formValue);
|
|
100
|
+
this.injectCaseTab();
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
injectCaseTab() {
|
|
106
|
+
}
|
|
107
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MailTemplateConfigurationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
108
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: MailTemplateConfigurationComponent, 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"], outputs: ["valueChange"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.PluginTranslatePipe, name: "pluginTranslate" }] }); }
|
|
109
|
+
}
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MailTemplateConfigurationComponent, decorators: [{
|
|
111
|
+
type: Component,
|
|
112
|
+
args: [{ 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" }]
|
|
113
|
+
}], ctorParameters: () => [], propDecorators: { save$: [{
|
|
114
|
+
type: Input
|
|
115
|
+
}], disabled$: [{
|
|
116
|
+
type: Input
|
|
117
|
+
}], pluginId: [{
|
|
118
|
+
type: Input
|
|
119
|
+
}], prefillConfiguration$: [{
|
|
120
|
+
type: Input
|
|
121
|
+
}], valid: [{
|
|
122
|
+
type: Output
|
|
123
|
+
}], configuration: [{
|
|
124
|
+
type: Output
|
|
125
|
+
}] } });
|
|
126
|
+
|
|
127
|
+
/*
|
|
128
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
129
|
+
*
|
|
130
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
131
|
+
* you may not use this file except in compliance with the License.
|
|
132
|
+
* You may obtain a copy of the License at
|
|
133
|
+
*
|
|
134
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
135
|
+
*
|
|
136
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
137
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
138
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
139
|
+
* See the License for the specific language governing permissions and
|
|
140
|
+
* limitations under the License.
|
|
141
|
+
*/
|
|
142
|
+
class FreemarkerTemplateManagementService {
|
|
143
|
+
constructor(configService, http) {
|
|
144
|
+
this.configService = configService;
|
|
145
|
+
this.http = http;
|
|
146
|
+
this.valtimoEndpointUri = `${this.configService.config.valtimoApi.endpointUri}management/`;
|
|
147
|
+
}
|
|
148
|
+
getAllMailTemplates(caseDefinitionName) {
|
|
149
|
+
return this.getTemplates(caseDefinitionName, 'mail', undefined, 0, 10000);
|
|
150
|
+
}
|
|
151
|
+
getTemplates(caseDefinitionName, templateType, templateKey, page, pageSize) {
|
|
152
|
+
const params = {
|
|
153
|
+
caseDefinitionName,
|
|
154
|
+
templateType,
|
|
155
|
+
templateKey,
|
|
156
|
+
page,
|
|
157
|
+
size: pageSize
|
|
158
|
+
};
|
|
159
|
+
Object.keys(params).forEach(key => {
|
|
160
|
+
if (params[key] == undefined) {
|
|
161
|
+
delete params[key];
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
return this.http.get(`${this.valtimoEndpointUri}v1/template`, { params });
|
|
165
|
+
}
|
|
166
|
+
getMailTemplate(caseDefinitionName, key) {
|
|
167
|
+
return this.getTemplate(caseDefinitionName, 'mail', key);
|
|
168
|
+
}
|
|
169
|
+
getTemplate(caseDefinitionName, templateType, key) {
|
|
170
|
+
return this.http.get(`${this.valtimoEndpointUri}v1/case-definition/${caseDefinitionName}/template-type/${templateType}/template/${key}`);
|
|
171
|
+
}
|
|
172
|
+
addTemplate(template) {
|
|
173
|
+
return this.http.post(`${this.valtimoEndpointUri}v1/template`, template);
|
|
174
|
+
}
|
|
175
|
+
deleteTemplates(request) {
|
|
176
|
+
return this.http.delete(`${this.valtimoEndpointUri}v1/template`, { body: request });
|
|
177
|
+
}
|
|
178
|
+
updateTemplate(template) {
|
|
179
|
+
return this.http.put(`${this.valtimoEndpointUri}v1/template`, template);
|
|
180
|
+
}
|
|
181
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FreemarkerTemplateManagementService, deps: [{ token: i1$1.ConfigService }, { token: i2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
182
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FreemarkerTemplateManagementService, providedIn: 'root' }); }
|
|
183
|
+
}
|
|
184
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FreemarkerTemplateManagementService, decorators: [{
|
|
185
|
+
type: Injectable,
|
|
186
|
+
args: [{
|
|
187
|
+
providedIn: 'root',
|
|
188
|
+
}]
|
|
189
|
+
}], ctorParameters: () => [{ type: i1$1.ConfigService }, { type: i2.HttpClient }] });
|
|
190
|
+
|
|
191
|
+
/*
|
|
192
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
193
|
+
*
|
|
194
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
195
|
+
* you may not use this file except in compliance with the License.
|
|
196
|
+
* You may obtain a copy of the License at
|
|
197
|
+
*
|
|
198
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
199
|
+
*
|
|
200
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
201
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
202
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
203
|
+
* See the License for the specific language governing permissions and
|
|
204
|
+
* limitations under the License.
|
|
205
|
+
*/
|
|
206
|
+
|
|
207
|
+
/*
|
|
208
|
+
* Copyright 2015-2022 Ritense BV, the Netherlands.
|
|
209
|
+
*
|
|
210
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
211
|
+
* you may not use this file except in compliance with the License.
|
|
212
|
+
* You may obtain a copy of the License at
|
|
213
|
+
*
|
|
214
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
215
|
+
*
|
|
216
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
217
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
218
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
219
|
+
* See the License for the specific language governing permissions and
|
|
220
|
+
* limitations under the License.
|
|
221
|
+
*/
|
|
222
|
+
class GenerateMailContentComponent {
|
|
223
|
+
constructor(modalService, documentService, templateService) {
|
|
224
|
+
this.modalService = modalService;
|
|
225
|
+
this.documentService = documentService;
|
|
226
|
+
this.templateService = templateService;
|
|
227
|
+
this.valid = new EventEmitter();
|
|
228
|
+
this.configuration = new EventEmitter();
|
|
229
|
+
this.formValue$ = new BehaviorSubject(null);
|
|
230
|
+
this.valid$ = new BehaviorSubject(false);
|
|
231
|
+
this.loading$ = new BehaviorSubject(true);
|
|
232
|
+
this.mailTemplateItems$ = this.modalService.modalData$.pipe(switchMap(params => this.documentService.findProcessDocumentDefinitionsByProcessDefinitionKey(params?.processDefinitionKey)), switchMap(processDocumentDefinitions => combineLatest([
|
|
233
|
+
of({ content: [] }),
|
|
234
|
+
...processDocumentDefinitions.map(processDocumentDefinition => this.templateService.getAllMailTemplates(processDocumentDefinition.id.documentDefinitionId.name)),
|
|
235
|
+
])), map(results => {
|
|
236
|
+
return results
|
|
237
|
+
.flatMap(result => result.content)
|
|
238
|
+
.map(template => ({
|
|
239
|
+
id: template.key,
|
|
240
|
+
text: template.key,
|
|
241
|
+
}));
|
|
242
|
+
}), tap(() => {
|
|
243
|
+
this.loading$.next(false);
|
|
244
|
+
}));
|
|
245
|
+
}
|
|
246
|
+
ngOnInit() {
|
|
247
|
+
this.openSaveSubscription();
|
|
248
|
+
}
|
|
249
|
+
ngOnDestroy() {
|
|
250
|
+
this.saveSubscription?.unsubscribe();
|
|
251
|
+
}
|
|
252
|
+
formValueChange(formValue) {
|
|
253
|
+
this.formValue$.next(formValue);
|
|
254
|
+
this.handleValid(formValue);
|
|
255
|
+
}
|
|
256
|
+
handleValid(formValue) {
|
|
257
|
+
const valid = !!(formValue.mailTemplateKey && formValue.processVariableName);
|
|
258
|
+
this.valid$.next(valid);
|
|
259
|
+
this.valid.emit(valid);
|
|
260
|
+
}
|
|
261
|
+
openSaveSubscription() {
|
|
262
|
+
this.saveSubscription = this.save$?.subscribe(save => {
|
|
263
|
+
combineLatest([this.formValue$, this.valid$])
|
|
264
|
+
.pipe(take(1))
|
|
265
|
+
.subscribe(([formValue, valid]) => {
|
|
266
|
+
if (valid) {
|
|
267
|
+
this.configuration.emit(formValue);
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GenerateMailContentComponent, deps: [{ token: i1.ModalService }, { token: i2$1.DocumentService }, { token: FreemarkerTemplateManagementService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
273
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: GenerateMailContentComponent, 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", "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"], 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" }] }); }
|
|
274
|
+
}
|
|
275
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GenerateMailContentComponent, decorators: [{
|
|
276
|
+
type: Component,
|
|
277
|
+
args: [{ 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" }]
|
|
278
|
+
}], ctorParameters: () => [{ type: i1.ModalService }, { type: i2$1.DocumentService }, { type: FreemarkerTemplateManagementService }], propDecorators: { save$: [{
|
|
279
|
+
type: Input
|
|
280
|
+
}], disabled$: [{
|
|
281
|
+
type: Input
|
|
282
|
+
}], pluginId: [{
|
|
283
|
+
type: Input
|
|
284
|
+
}], prefillConfiguration$: [{
|
|
285
|
+
type: Input
|
|
286
|
+
}], valid: [{
|
|
287
|
+
type: Output
|
|
288
|
+
}], configuration: [{
|
|
289
|
+
type: Output
|
|
290
|
+
}] } });
|
|
291
|
+
|
|
292
|
+
/*
|
|
293
|
+
* Copyright 2015-2022 Ritense BV, the Netherlands.
|
|
294
|
+
*
|
|
295
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
296
|
+
* you may not use this file except in compliance with the License.
|
|
297
|
+
* You may obtain a copy of the License at
|
|
298
|
+
*
|
|
299
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
300
|
+
*
|
|
301
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
302
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
303
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
304
|
+
* See the License for the specific language governing permissions and
|
|
305
|
+
* limitations under the License.
|
|
306
|
+
*/
|
|
307
|
+
class GenerateMailFileComponent {
|
|
308
|
+
constructor(modalService, documentService, templateService) {
|
|
309
|
+
this.modalService = modalService;
|
|
310
|
+
this.documentService = documentService;
|
|
311
|
+
this.templateService = templateService;
|
|
312
|
+
this.valid = new EventEmitter();
|
|
313
|
+
this.configuration = new EventEmitter();
|
|
314
|
+
this.formValue$ = new BehaviorSubject(null);
|
|
315
|
+
this.valid$ = new BehaviorSubject(false);
|
|
316
|
+
this.loading$ = new BehaviorSubject(true);
|
|
317
|
+
this.mailTemplateItems$ = this.modalService.modalData$.pipe(switchMap(params => this.documentService.findProcessDocumentDefinitionsByProcessDefinitionKey(params?.processDefinitionKey)), switchMap(processDocumentDefinitions => combineLatest([
|
|
318
|
+
of({ content: [] }),
|
|
319
|
+
...processDocumentDefinitions.map(processDocumentDefinition => this.templateService.getAllMailTemplates(processDocumentDefinition.id.documentDefinitionId.name)),
|
|
320
|
+
])), map(results => {
|
|
321
|
+
return results
|
|
322
|
+
.flatMap(result => result.content)
|
|
323
|
+
.map(template => ({
|
|
324
|
+
id: template.key,
|
|
325
|
+
text: template.key,
|
|
326
|
+
}));
|
|
327
|
+
}), tap(() => {
|
|
328
|
+
this.loading$.next(false);
|
|
329
|
+
}));
|
|
330
|
+
}
|
|
331
|
+
ngOnInit() {
|
|
332
|
+
this.openSaveSubscription();
|
|
333
|
+
}
|
|
334
|
+
ngOnDestroy() {
|
|
335
|
+
this.saveSubscription?.unsubscribe();
|
|
336
|
+
}
|
|
337
|
+
formValueChange(formValue) {
|
|
338
|
+
this.formValue$.next(formValue);
|
|
339
|
+
this.handleValid(formValue);
|
|
340
|
+
}
|
|
341
|
+
handleValid(formValue) {
|
|
342
|
+
const valid = !!(formValue.mailTemplateKey && formValue.processVariableName);
|
|
343
|
+
this.valid$.next(valid);
|
|
344
|
+
this.valid.emit(valid);
|
|
345
|
+
}
|
|
346
|
+
openSaveSubscription() {
|
|
347
|
+
this.saveSubscription = this.save$?.subscribe(save => {
|
|
348
|
+
combineLatest([this.formValue$, this.valid$])
|
|
349
|
+
.pipe(take(1))
|
|
350
|
+
.subscribe(([formValue, valid]) => {
|
|
351
|
+
if (valid) {
|
|
352
|
+
this.configuration.emit(formValue);
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GenerateMailFileComponent, deps: [{ token: i1.ModalService }, { token: i2$1.DocumentService }, { token: FreemarkerTemplateManagementService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
358
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: GenerateMailFileComponent, 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", "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"], 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" }] }); }
|
|
359
|
+
}
|
|
360
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GenerateMailFileComponent, decorators: [{
|
|
361
|
+
type: Component,
|
|
362
|
+
args: [{ 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" }]
|
|
363
|
+
}], ctorParameters: () => [{ type: i1.ModalService }, { type: i2$1.DocumentService }, { type: FreemarkerTemplateManagementService }], propDecorators: { save$: [{
|
|
364
|
+
type: Input
|
|
365
|
+
}], disabled$: [{
|
|
366
|
+
type: Input
|
|
367
|
+
}], pluginId: [{
|
|
368
|
+
type: Input
|
|
369
|
+
}], prefillConfiguration$: [{
|
|
370
|
+
type: Input
|
|
371
|
+
}], valid: [{
|
|
372
|
+
type: Output
|
|
373
|
+
}], configuration: [{
|
|
374
|
+
type: Output
|
|
375
|
+
}] } });
|
|
376
|
+
|
|
377
|
+
/*
|
|
378
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
379
|
+
*
|
|
380
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
381
|
+
* you may not use this file except in compliance with the License.
|
|
382
|
+
* You may obtain a copy of the License at
|
|
383
|
+
*
|
|
384
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
385
|
+
*
|
|
386
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
387
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
388
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
389
|
+
* See the License for the specific language governing permissions and
|
|
390
|
+
* limitations under the License.
|
|
391
|
+
*/
|
|
392
|
+
class MailTemplateAddEditModalComponent {
|
|
393
|
+
set defaultKeyValue(value) {
|
|
394
|
+
this._defaultKeyValue = value;
|
|
395
|
+
this.setDefaultKeyValue(value);
|
|
396
|
+
}
|
|
397
|
+
get key() {
|
|
398
|
+
const key = this.form?.get('key');
|
|
399
|
+
if (!key?.value) {
|
|
400
|
+
return key;
|
|
401
|
+
}
|
|
402
|
+
key.setValue(this.keyGeneratorService.getUniqueKey(key.value, []));
|
|
403
|
+
return key;
|
|
404
|
+
}
|
|
405
|
+
constructor(fb, keyGeneratorService) {
|
|
406
|
+
this.fb = fb;
|
|
407
|
+
this.keyGeneratorService = keyGeneratorService;
|
|
408
|
+
this.open = false;
|
|
409
|
+
this.type = 'add';
|
|
410
|
+
this.closeEvent = new EventEmitter();
|
|
411
|
+
this.form = this.fb.group({
|
|
412
|
+
key: this.fb.control('', Validators.required),
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
ngOnInit() {
|
|
416
|
+
}
|
|
417
|
+
onCancel() {
|
|
418
|
+
this.closeEvent.emit(null);
|
|
419
|
+
this.resetForm();
|
|
420
|
+
}
|
|
421
|
+
onConfirm() {
|
|
422
|
+
if (!this.key) {
|
|
423
|
+
return;
|
|
424
|
+
}
|
|
425
|
+
this.closeEvent.emit({ key: this.key.value });
|
|
426
|
+
this.resetForm();
|
|
427
|
+
}
|
|
428
|
+
setDefaultKeyValue(value) {
|
|
429
|
+
this.key.setValue(value);
|
|
430
|
+
}
|
|
431
|
+
resetForm() {
|
|
432
|
+
setTimeout(() => {
|
|
433
|
+
this.form.reset();
|
|
434
|
+
if (this.type === 'edit') {
|
|
435
|
+
this.setDefaultKeyValue(this._defaultKeyValue);
|
|
436
|
+
}
|
|
437
|
+
}, CARBON_CONSTANTS.modalAnimationMs);
|
|
438
|
+
}
|
|
439
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MailTemplateAddEditModalComponent, deps: [{ token: i1$2.FormBuilder }, { token: i1.KeyGeneratorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
440
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: MailTemplateAddEditModalComponent, 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: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i4$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { 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"] }, { 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: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
441
|
+
}
|
|
442
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MailTemplateAddEditModalComponent, decorators: [{
|
|
443
|
+
type: Component,
|
|
444
|
+
args: [{ selector: 'valtimo-mail-template-add-edit-modal', changeDetection: ChangeDetectionStrategy.OnPush, 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" }]
|
|
445
|
+
}], ctorParameters: () => [{ type: i1$2.FormBuilder }, { type: i1.KeyGeneratorService }], propDecorators: { open: [{
|
|
446
|
+
type: Input
|
|
447
|
+
}], type: [{
|
|
448
|
+
type: Input
|
|
449
|
+
}], defaultKeyValue: [{
|
|
450
|
+
type: Input
|
|
451
|
+
}], closeEvent: [{
|
|
452
|
+
type: Output
|
|
453
|
+
}] } });
|
|
454
|
+
|
|
455
|
+
/*
|
|
456
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
457
|
+
*
|
|
458
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
459
|
+
* you may not use this file except in compliance with the License.
|
|
460
|
+
* You may obtain a copy of the License at
|
|
461
|
+
*
|
|
462
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
463
|
+
*
|
|
464
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
465
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
466
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
467
|
+
* See the License for the specific language governing permissions and
|
|
468
|
+
* limitations under the License.
|
|
469
|
+
*/
|
|
470
|
+
class MailTemplateDeleteModalComponent {
|
|
471
|
+
constructor() {
|
|
472
|
+
this.deleteEvent = new EventEmitter();
|
|
473
|
+
}
|
|
474
|
+
onDelete(templates) {
|
|
475
|
+
this.deleteEvent.emit(templates);
|
|
476
|
+
}
|
|
477
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MailTemplateDeleteModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
478
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: MailTemplateDeleteModalComponent, 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: "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 }); }
|
|
479
|
+
}
|
|
480
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MailTemplateDeleteModalComponent, decorators: [{
|
|
481
|
+
type: Component,
|
|
482
|
+
args: [{ selector: 'valtimo-mail-template-delete-modal', changeDetection: ChangeDetectionStrategy.OnPush, 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" }]
|
|
483
|
+
}], propDecorators: { deleteRowKeys: [{
|
|
484
|
+
type: Input
|
|
485
|
+
}], showDeleteModal$: [{
|
|
486
|
+
type: Input
|
|
487
|
+
}], deleteEvent: [{
|
|
488
|
+
type: Output
|
|
489
|
+
}] } });
|
|
490
|
+
|
|
491
|
+
/*
|
|
492
|
+
* Copyright 2015-2024 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 MailTemplateListComponent {
|
|
507
|
+
constructor(templateService, router, route) {
|
|
508
|
+
this.templateService = templateService;
|
|
509
|
+
this.router = router;
|
|
510
|
+
this.route = route;
|
|
511
|
+
this.fields = [
|
|
512
|
+
{
|
|
513
|
+
viewType: ViewType.TEXT,
|
|
514
|
+
key: 'key',
|
|
515
|
+
label: 'Key',
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
viewType: ViewType.BOOLEAN,
|
|
519
|
+
key: 'readOnly',
|
|
520
|
+
label: 'Read only',
|
|
521
|
+
},
|
|
522
|
+
];
|
|
523
|
+
this._caseDefinitionName$ = this.route.params.pipe(map(params => params?.name), filter(caseDefinitionName => !!caseDefinitionName));
|
|
524
|
+
this.templates$ = new BehaviorSubject(null);
|
|
525
|
+
this.showAddModal$ = new BehaviorSubject(false);
|
|
526
|
+
this.showDeleteModal$ = new BehaviorSubject(false);
|
|
527
|
+
this.selectedRowKeys$ = new BehaviorSubject([]);
|
|
528
|
+
this.loading$ = new BehaviorSubject(true);
|
|
529
|
+
}
|
|
530
|
+
ngOnInit() {
|
|
531
|
+
this.reloadTemplateList();
|
|
532
|
+
}
|
|
533
|
+
openAddModal() {
|
|
534
|
+
this.showAddModal$.next(true);
|
|
535
|
+
}
|
|
536
|
+
onAdd(data) {
|
|
537
|
+
if (!data) {
|
|
538
|
+
this.showAddModal$.next(false);
|
|
539
|
+
return;
|
|
540
|
+
}
|
|
541
|
+
this._caseDefinitionName$.pipe(take(1), switchMap(caseDefinitionName => this.templateService.addTemplate({ caseDefinitionName, type: 'mail', ...data }))).subscribe(template => {
|
|
542
|
+
this.showAddModal$.next(false);
|
|
543
|
+
this.gotoMailTemplateEditor(template.caseDefinitionName, template.key);
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
showDeleteModal() {
|
|
547
|
+
this.setSelectedTemplateKeys();
|
|
548
|
+
this.showDeleteModal$.next(true);
|
|
549
|
+
}
|
|
550
|
+
onDelete(templates) {
|
|
551
|
+
this.loading$.next(true);
|
|
552
|
+
this._caseDefinitionName$.pipe(take(1), switchMap(caseDefinitionName => this.templateService.deleteTemplates({ caseDefinitionName, type: 'mail', templates }))).subscribe(_ => {
|
|
553
|
+
this.reloadTemplateList();
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
onRowClick(template) {
|
|
557
|
+
this._caseDefinitionName$.pipe(take(1)).subscribe(caseDefinitionName => this.gotoMailTemplateEditor(caseDefinitionName, template.key));
|
|
558
|
+
}
|
|
559
|
+
gotoMailTemplateEditor(caseDefinitionName, key) {
|
|
560
|
+
this.router.navigate([`/dossier-management/dossier/${caseDefinitionName}/mail-template/${key}`]);
|
|
561
|
+
}
|
|
562
|
+
reloadTemplateList() {
|
|
563
|
+
this.loading$.next(true);
|
|
564
|
+
this._caseDefinitionName$.pipe(switchMap(caseDefinitionName => this.templateService.getAllMailTemplates(caseDefinitionName)), map(templatePage => templatePage.content), take(1)).subscribe(templateListItems => {
|
|
565
|
+
this.templates$.next(templateListItems);
|
|
566
|
+
this.loading$.next(false);
|
|
567
|
+
});
|
|
568
|
+
}
|
|
569
|
+
setSelectedTemplateKeys() {
|
|
570
|
+
this.selectedRowKeys$.next(this.carbonList.selectedItems.map((template) => template.key));
|
|
571
|
+
}
|
|
572
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MailTemplateListComponent, deps: [{ token: FreemarkerTemplateManagementService }, { token: i2$2.Router }, { token: i2$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
573
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: MailTemplateListComponent, 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]=\"true\"\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\" (click)=\"openAddModal()\">\n {{ 'Add' }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i1.CarbonListComponent, selector: "valtimo-carbon-list", inputs: ["items", "fields", "tableTranslations", "paginatorConfig", "pagination", "loading", "actions", "actionItems", "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: "directive", type: i4$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i4$1.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: MailTemplateAddEditModalComponent, selector: "valtimo-mail-template-add-edit-modal", inputs: ["open", "type", "defaultKeyValue"], outputs: ["closeEvent"] }, { kind: "component", type: MailTemplateDeleteModalComponent, selector: "valtimo-mail-template-delete-modal", inputs: ["deleteRowKeys", "showDeleteModal$"], outputs: ["deleteEvent"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
574
|
+
}
|
|
575
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MailTemplateListComponent, decorators: [{
|
|
576
|
+
type: Component,
|
|
577
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, 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]=\"true\"\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\" (click)=\"openAddModal()\">\n {{ 'Add' }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n</ng-template>\n" }]
|
|
578
|
+
}], ctorParameters: () => [{ type: FreemarkerTemplateManagementService }, { type: i2$2.Router }, { type: i2$2.ActivatedRoute }], propDecorators: { carbonList: [{
|
|
579
|
+
type: ViewChild,
|
|
580
|
+
args: [CarbonListComponent]
|
|
581
|
+
}] } });
|
|
582
|
+
|
|
583
|
+
/*
|
|
584
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
585
|
+
*
|
|
586
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
587
|
+
* you may not use this file except in compliance with the License.
|
|
588
|
+
* You may obtain a copy of the License at
|
|
589
|
+
*
|
|
590
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
591
|
+
*
|
|
592
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
593
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
594
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
595
|
+
* See the License for the specific language governing permissions and
|
|
596
|
+
* limitations under the License.
|
|
597
|
+
*/
|
|
598
|
+
class MailTemplateEditorComponent {
|
|
599
|
+
constructor(templateService, route, pageTitleService, router, notificationService, translateService, breadcrumbService) {
|
|
600
|
+
this.templateService = templateService;
|
|
601
|
+
this.route = route;
|
|
602
|
+
this.pageTitleService = pageTitleService;
|
|
603
|
+
this.router = router;
|
|
604
|
+
this.notificationService = notificationService;
|
|
605
|
+
this.translateService = translateService;
|
|
606
|
+
this.breadcrumbService = breadcrumbService;
|
|
607
|
+
this.model$ = new BehaviorSubject(null);
|
|
608
|
+
this.template$ = new BehaviorSubject(null);
|
|
609
|
+
this.saveDisabled$ = new BehaviorSubject(true);
|
|
610
|
+
this.editorDisabled$ = new BehaviorSubject(false);
|
|
611
|
+
this.moreDisabled$ = new BehaviorSubject(true);
|
|
612
|
+
this.showDeleteModal$ = new BehaviorSubject(false);
|
|
613
|
+
this.updatedModelValue$ = new BehaviorSubject('');
|
|
614
|
+
this._caseDefinitionName$ = this.route.params.pipe(map(params => params?.name), filter(caseDefinitionName => !!caseDefinitionName));
|
|
615
|
+
this.templateKey$ = this.route.params.pipe(map(params => params?.key), filter(templateKey => !!templateKey));
|
|
616
|
+
}
|
|
617
|
+
ngOnInit() {
|
|
618
|
+
this.loadTemplate();
|
|
619
|
+
}
|
|
620
|
+
ngAfterViewInit() {
|
|
621
|
+
this.initBreadcrumb();
|
|
622
|
+
}
|
|
623
|
+
ngOnDestroy() {
|
|
624
|
+
this.pageTitleService.enableReset();
|
|
625
|
+
this.breadcrumbService.clearThirdBreadcrumb();
|
|
626
|
+
}
|
|
627
|
+
onValid(valid) {
|
|
628
|
+
this.saveDisabled$.next(valid === false);
|
|
629
|
+
}
|
|
630
|
+
onValueChange(value) {
|
|
631
|
+
this.updatedModelValue$.next(value);
|
|
632
|
+
}
|
|
633
|
+
updateTemplate() {
|
|
634
|
+
this.disableEditor();
|
|
635
|
+
this.disableSave();
|
|
636
|
+
this.disableMore();
|
|
637
|
+
combineLatest([this.updatedModelValue$, this._caseDefinitionName$, this.templateKey$]).pipe(switchMap(([updatedModelValue, caseDefinitionName, templateKey]) => this.templateService.updateTemplate({
|
|
638
|
+
key: templateKey,
|
|
639
|
+
caseDefinitionName,
|
|
640
|
+
type: 'mail',
|
|
641
|
+
content: updatedModelValue,
|
|
642
|
+
})), take(1)).subscribe({
|
|
643
|
+
next: result => {
|
|
644
|
+
this.enableMore();
|
|
645
|
+
this.enableSave();
|
|
646
|
+
this.enableEditor();
|
|
647
|
+
this.showSuccessMessage(result.key);
|
|
648
|
+
this.setModel(result.content);
|
|
649
|
+
this.template$.next(result);
|
|
650
|
+
},
|
|
651
|
+
error: () => {
|
|
652
|
+
this.enableMore();
|
|
653
|
+
this.enableSave();
|
|
654
|
+
this.enableEditor();
|
|
655
|
+
},
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
onDelete(templates) {
|
|
659
|
+
this.disableEditor();
|
|
660
|
+
this.disableSave();
|
|
661
|
+
this.disableMore();
|
|
662
|
+
this._caseDefinitionName$.pipe(take(1)).subscribe(caseDefinitionName => this.templateService.deleteTemplates({ caseDefinitionName, type: 'mail', templates }).pipe(take(1)).subscribe(_ => this.router.navigate([`/dossier-management/dossier/${caseDefinitionName}`])));
|
|
663
|
+
}
|
|
664
|
+
showDeleteModal() {
|
|
665
|
+
this.showDeleteModal$.next(true);
|
|
666
|
+
}
|
|
667
|
+
loadTemplate() {
|
|
668
|
+
combineLatest([this._caseDefinitionName$, this.templateKey$]).pipe(tap(([_, key]) => {
|
|
669
|
+
this.pageTitleService.setCustomPageTitle(`Mail template: ${key}`, true);
|
|
670
|
+
}), switchMap(([caseDefinitionName, key]) => this.templateService.getMailTemplate(caseDefinitionName, key)), take(1)).subscribe(result => {
|
|
671
|
+
this.enableMore();
|
|
672
|
+
this.enableSave();
|
|
673
|
+
this.enableEditor();
|
|
674
|
+
this.setModel(result.content);
|
|
675
|
+
this.refreshViewer(result.content);
|
|
676
|
+
this.template$.next(result);
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
setModel(content) {
|
|
680
|
+
this.model$.next({
|
|
681
|
+
value: content,
|
|
682
|
+
language: 'freemarker2',
|
|
683
|
+
});
|
|
684
|
+
this.updatedModelValue$.next(content);
|
|
685
|
+
}
|
|
686
|
+
disableMore() {
|
|
687
|
+
this.moreDisabled$.next(true);
|
|
688
|
+
}
|
|
689
|
+
enableMore() {
|
|
690
|
+
this.moreDisabled$.next(false);
|
|
691
|
+
}
|
|
692
|
+
disableSave() {
|
|
693
|
+
this.saveDisabled$.next(true);
|
|
694
|
+
}
|
|
695
|
+
enableSave() {
|
|
696
|
+
this.saveDisabled$.next(false);
|
|
697
|
+
}
|
|
698
|
+
disableEditor() {
|
|
699
|
+
this.editorDisabled$.next(true);
|
|
700
|
+
}
|
|
701
|
+
enableEditor() {
|
|
702
|
+
this.editorDisabled$.next(false);
|
|
703
|
+
}
|
|
704
|
+
onSelectedTabViewer() {
|
|
705
|
+
this.updatedModelValue$.pipe(take(1)).subscribe(html => this.refreshViewer(html));
|
|
706
|
+
}
|
|
707
|
+
refreshViewer(html) {
|
|
708
|
+
setTimeout(() => {
|
|
709
|
+
document.getElementById('html-viewer-iframe').srcdoc = html;
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
initBreadcrumb() {
|
|
713
|
+
this._caseDefinitionName$.subscribe(caseDefinitionName => {
|
|
714
|
+
this.breadcrumbService.setThirdBreadcrumb({
|
|
715
|
+
route: [`/dossier-management/dossier/${caseDefinitionName}`],
|
|
716
|
+
content: caseDefinitionName,
|
|
717
|
+
href: `/dossier-management/dossier/${caseDefinitionName}`,
|
|
718
|
+
});
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
showSuccessMessage(key) {
|
|
722
|
+
this.notificationService.showToast({
|
|
723
|
+
caption: this.translateService.instant(`${key} was saved successfully`, {
|
|
724
|
+
key,
|
|
725
|
+
}),
|
|
726
|
+
type: 'success',
|
|
727
|
+
duration: 4000,
|
|
728
|
+
showClose: true,
|
|
729
|
+
title: this.translateService.instant('Saved successfully'),
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", 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 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
733
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: MailTemplateEditorComponent, 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: ${doc.firstName}. 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) || obs.template.readOnly\"\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 || obs.template.readOnly\"\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) || obs.template.readOnly\"\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: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: i4$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "component", type: i4$1.OverflowMenu, selector: "cds-overflow-menu, ibm-overflow-menu", inputs: ["buttonLabel", "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: "directive", type: i4$1.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "directive", type: i1.RenderInPageHeaderDirective, selector: "[renderInPageHeader]", inputs: ["fullWidth"] }, { 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: "component", type: MailTemplateDeleteModalComponent, selector: "valtimo-mail-template-delete-modal", inputs: ["deleteRowKeys", "showDeleteModal$"], outputs: ["deleteEvent"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
734
|
+
}
|
|
735
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MailTemplateEditorComponent, decorators: [{
|
|
736
|
+
type: Component,
|
|
737
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, providers: [NotificationService], 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: ${doc.firstName}. 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) || obs.template.readOnly\"\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 || obs.template.readOnly\"\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) || obs.template.readOnly\"\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"] }]
|
|
738
|
+
}], ctorParameters: () => [{ type: FreemarkerTemplateManagementService }, { type: i2$2.ActivatedRoute }, { type: i1.PageTitleService }, { type: i2$2.Router }, { type: i4$1.NotificationService }, { type: i5.TranslateService }, { type: i1.BreadcrumbService }] });
|
|
739
|
+
|
|
740
|
+
/*
|
|
741
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
742
|
+
*
|
|
743
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
744
|
+
* you may not use this file except in compliance with the License.
|
|
745
|
+
* You may obtain a copy of the License at
|
|
746
|
+
*
|
|
747
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
748
|
+
*
|
|
749
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
750
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
751
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
752
|
+
* See the License for the specific language governing permissions and
|
|
753
|
+
* limitations under the License.
|
|
754
|
+
*/
|
|
755
|
+
const routes = [
|
|
756
|
+
{
|
|
757
|
+
path: 'dossier-management/dossier/:name/mail-template/:key',
|
|
758
|
+
component: MailTemplateEditorComponent,
|
|
759
|
+
canActivate: [AuthGuardService],
|
|
760
|
+
data: {
|
|
761
|
+
title: 'Mail Template Editor',
|
|
762
|
+
templates: [ROLE_ADMIN],
|
|
763
|
+
customPageTitle: true,
|
|
764
|
+
},
|
|
765
|
+
},
|
|
766
|
+
];
|
|
767
|
+
class TemplateManagementRoutingModule {
|
|
768
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TemplateManagementRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
769
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: TemplateManagementRoutingModule, imports: [CommonModule, i2$2.RouterModule], exports: [RouterModule] }); }
|
|
770
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TemplateManagementRoutingModule, imports: [CommonModule, RouterModule.forChild(routes), RouterModule] }); }
|
|
771
|
+
}
|
|
772
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TemplateManagementRoutingModule, decorators: [{
|
|
773
|
+
type: NgModule,
|
|
774
|
+
args: [{
|
|
775
|
+
imports: [CommonModule, RouterModule.forChild(routes)],
|
|
776
|
+
exports: [RouterModule],
|
|
777
|
+
}]
|
|
778
|
+
}] });
|
|
779
|
+
|
|
780
|
+
/*
|
|
781
|
+
* Copyright 2015-2022 Ritense BV, the Netherlands.
|
|
782
|
+
*
|
|
783
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
784
|
+
* you may not use this file except in compliance with the License.
|
|
785
|
+
* You may obtain a copy of the License at
|
|
786
|
+
*
|
|
787
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
788
|
+
*
|
|
789
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
790
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
791
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
792
|
+
* See the License for the specific language governing permissions and
|
|
793
|
+
* limitations under the License.
|
|
794
|
+
*/
|
|
795
|
+
class MailTemplatePluginModule {
|
|
796
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MailTemplatePluginModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
797
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: MailTemplatePluginModule, declarations: [MailTemplateConfigurationComponent,
|
|
798
|
+
GenerateMailFileComponent,
|
|
799
|
+
GenerateMailContentComponent,
|
|
800
|
+
MailTemplateAddEditModalComponent,
|
|
801
|
+
MailTemplateEditorComponent,
|
|
802
|
+
MailTemplateDeleteModalComponent,
|
|
803
|
+
MailTemplateListComponent], imports: [CommonModule,
|
|
804
|
+
PluginTranslatePipeModule,
|
|
805
|
+
TemplateManagementRoutingModule,
|
|
806
|
+
FormModule,
|
|
807
|
+
ParagraphModule,
|
|
808
|
+
SelectModule,
|
|
809
|
+
ConfirmationModalModule,
|
|
810
|
+
TranslateModule,
|
|
811
|
+
ReactiveFormsModule,
|
|
812
|
+
CarbonListModule,
|
|
813
|
+
EditorModule,
|
|
814
|
+
InputModule,
|
|
815
|
+
ButtonModule,
|
|
816
|
+
DialogModule,
|
|
817
|
+
DropdownModule,
|
|
818
|
+
IconModule,
|
|
819
|
+
InputModule$1,
|
|
820
|
+
LoadingModule,
|
|
821
|
+
ModalModule,
|
|
822
|
+
NotificationModule,
|
|
823
|
+
RenderInPageHeaderDirectiveModule,
|
|
824
|
+
TabsModule], exports: [MailTemplateConfigurationComponent,
|
|
825
|
+
GenerateMailFileComponent,
|
|
826
|
+
GenerateMailContentComponent,
|
|
827
|
+
MailTemplateAddEditModalComponent,
|
|
828
|
+
MailTemplateEditorComponent,
|
|
829
|
+
MailTemplateDeleteModalComponent,
|
|
830
|
+
MailTemplateListComponent] }); }
|
|
831
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MailTemplatePluginModule, providers: [
|
|
832
|
+
{
|
|
833
|
+
provide: CASE_MANAGEMENT_TAB_TOKEN,
|
|
834
|
+
useValue: {
|
|
835
|
+
translationKey: 'Mail templates',
|
|
836
|
+
component: MailTemplateListComponent,
|
|
837
|
+
},
|
|
838
|
+
multi: true,
|
|
839
|
+
}
|
|
840
|
+
], imports: [CommonModule,
|
|
841
|
+
PluginTranslatePipeModule,
|
|
842
|
+
TemplateManagementRoutingModule,
|
|
843
|
+
FormModule,
|
|
844
|
+
ParagraphModule,
|
|
845
|
+
SelectModule,
|
|
846
|
+
ConfirmationModalModule,
|
|
847
|
+
TranslateModule,
|
|
848
|
+
ReactiveFormsModule,
|
|
849
|
+
CarbonListModule,
|
|
850
|
+
EditorModule,
|
|
851
|
+
InputModule,
|
|
852
|
+
ButtonModule,
|
|
853
|
+
DialogModule,
|
|
854
|
+
DropdownModule,
|
|
855
|
+
IconModule,
|
|
856
|
+
InputModule$1,
|
|
857
|
+
LoadingModule,
|
|
858
|
+
ModalModule,
|
|
859
|
+
NotificationModule,
|
|
860
|
+
RenderInPageHeaderDirectiveModule,
|
|
861
|
+
TabsModule] }); }
|
|
862
|
+
}
|
|
863
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MailTemplatePluginModule, decorators: [{
|
|
864
|
+
type: NgModule,
|
|
865
|
+
args: [{
|
|
866
|
+
declarations: [
|
|
867
|
+
MailTemplateConfigurationComponent,
|
|
868
|
+
GenerateMailFileComponent,
|
|
869
|
+
GenerateMailContentComponent,
|
|
870
|
+
MailTemplateAddEditModalComponent,
|
|
871
|
+
MailTemplateEditorComponent,
|
|
872
|
+
MailTemplateDeleteModalComponent,
|
|
873
|
+
MailTemplateListComponent,
|
|
874
|
+
],
|
|
875
|
+
imports: [
|
|
876
|
+
CommonModule,
|
|
877
|
+
PluginTranslatePipeModule,
|
|
878
|
+
TemplateManagementRoutingModule,
|
|
879
|
+
FormModule,
|
|
880
|
+
ParagraphModule,
|
|
881
|
+
SelectModule,
|
|
882
|
+
ConfirmationModalModule,
|
|
883
|
+
TranslateModule,
|
|
884
|
+
ReactiveFormsModule,
|
|
885
|
+
CarbonListModule,
|
|
886
|
+
EditorModule,
|
|
887
|
+
InputModule,
|
|
888
|
+
ButtonModule,
|
|
889
|
+
DialogModule,
|
|
890
|
+
DropdownModule,
|
|
891
|
+
IconModule,
|
|
892
|
+
InputModule$1,
|
|
893
|
+
LoadingModule,
|
|
894
|
+
ModalModule,
|
|
895
|
+
NotificationModule,
|
|
896
|
+
RenderInPageHeaderDirectiveModule,
|
|
897
|
+
TabsModule,
|
|
898
|
+
],
|
|
899
|
+
exports: [
|
|
900
|
+
MailTemplateConfigurationComponent,
|
|
901
|
+
GenerateMailFileComponent,
|
|
902
|
+
GenerateMailContentComponent,
|
|
903
|
+
MailTemplateAddEditModalComponent,
|
|
904
|
+
MailTemplateEditorComponent,
|
|
905
|
+
MailTemplateDeleteModalComponent,
|
|
906
|
+
MailTemplateListComponent,
|
|
907
|
+
],
|
|
908
|
+
providers: [
|
|
909
|
+
{
|
|
910
|
+
provide: CASE_MANAGEMENT_TAB_TOKEN,
|
|
911
|
+
useValue: {
|
|
912
|
+
translationKey: 'Mail templates',
|
|
913
|
+
component: MailTemplateListComponent,
|
|
914
|
+
},
|
|
915
|
+
multi: true,
|
|
916
|
+
}
|
|
917
|
+
]
|
|
918
|
+
}]
|
|
919
|
+
}] });
|
|
920
|
+
|
|
921
|
+
/*
|
|
922
|
+
* Copyright 2015-2022 Ritense BV, the Netherlands.
|
|
923
|
+
*
|
|
924
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
925
|
+
* you may not use this file except in compliance with the License.
|
|
926
|
+
* You may obtain a copy of the License at
|
|
927
|
+
*
|
|
928
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
929
|
+
*
|
|
930
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
931
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
932
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
933
|
+
* See the License for the specific language governing permissions and
|
|
934
|
+
* limitations under the License.
|
|
935
|
+
*/
|
|
936
|
+
const FREEMARKER_PLUGIN_LOGO_BASE64 = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyBpZD0ic3ZnMiIgdmlld0JveD0iMCAwIDQwMCAyMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGggZD0iTSAzNDAuMzM3IDEzNS4zMjQgTCAzNTAuNTU1IDE1MC44MTUgTCAzODQuNiA5OS4xNzYgTCAzNTAuNTU1IDQ3LjUzNSBMIDM0MC4zMzcgNjMuMDI4IEwgMzY0LjE4MSA5OS4xNzYgTCAzNDAuMzM3IDEzNS4zMjQgWiIgc3R5bGU9ImZpbGw6IHJnYigwLCA4MCwgMTc4KTsiLz4KICA8cGF0aCBkPSJNIDU1LjQwNiA2My4wMjggTCA0NS4xODggNDcuNTM1IEwgMTEuMTQzIDk5LjE3NiBMIDQ1LjE4OCAxNTAuODE1IEwgNTUuNDA2IDEzNS4zMjQgTCAzMS41NjMgOTkuMTc2IEwgNTUuNDA2IDYzLjAyOCBaIiBzdHlsZT0iZmlsbDogcmdiKDAsIDgwLCAxNzgpOyIvPgogIDxwYXRoIGQ9Ik0gOTIuNzIxIDQ3LjUzNSBMIDExMy4zNzYgNDcuNTM1IEwgMTA5LjczMiA2OC4xOTEgTCAxMzAuMzg5IDY4LjE5MSBMIDEzNC4wMzIgNDcuNTM1IEwgMTU0LjY4OSA0Ny41MzUgTCAxNTEuMDQ1IDY4LjE5MSBMIDE3MS43MDEgNjguMTkxIEwgMTY4LjA0OSA4OC44NDggTCAxNDcuMzkzIDg4Ljg0OCBMIDE0My43NTYgMTA5LjUwNCBMIDE2NC40MTIgMTA5LjUwNCBMIDE2MC43NjcgMTMwLjE2IEwgMTQwLjExMSAxMzAuMTYgTCAxMzYuNDgyIDE1MC44MTUgTCAxMTUuODI2IDE1MC44MTUgTCAxMTkuNDYzIDEzMC4xNiBMIDk4LjgwNiAxMzAuMTYgTCA5NS4yMjkgMTUwLjgxNSBMIDc0LjUxMyAxNTAuODE1IEwgNzguMTUgMTMwLjE2IEwgNTcuNDk0IDEzMC4xNiBMIDYxLjEzOCAxMDkuNTA0IEwgODEuNzk1IDEwOS41MDQgTCA4NS40MzIgODguODk5IEwgNjQuNzc1IDg4Ljg5OSBMIDY4LjQyIDY4LjE5MSBMIDg5LjA3NiA2OC4xOTEgTCA5Mi43MjEgNDcuNTM1IFogTSAxMDIuNDUxIDEwOS41MDQgTCAxMjMuMTA3IDEwOS41MDQgTCAxMjYuNzUyIDg4Ljg0OCBMIDEwNi4wOTUgODguODQ4IEwgMTAyLjQ1MSAxMDkuNTA0IFoiIHN0eWxlPSJmaWxsOiByZ2IoMCwgODAsIDE3OCk7Ii8+CiAgPGcgdHJhbnNmb3JtPSJtYXRyaXgoMi4wMjgxNjQsIDAsIDAsIDIuMDI4MTY0LCAxNzkuMDc4MTg2LCAyNi4zMjE2NjcpIiBzdHlsZT0iIj4KICAgIDxwYXRoIGQ9Ik0gNjYuMDk3IDExLjUyOCBMIDkuMTk3IDExLjUyOCBDIDQuMTI2IDExLjUyOCAwIDE1LjY1NCAwIDIwLjcyNSBMIDAgNTMuNDQ3IEMgMCA1OC41MTggNC4xMjYgNjIuNjQ0IDkuMTk3IDYyLjY0NCBMIDY2LjA5NyA2Mi42NDQgQyA3MS4xNjggNjIuNjQ0IDc1LjI5NCA1OC41MTggNzUuMjk0IDUzLjQ0NyBMIDc1LjI5NCAyMC43MjYgQyA3NS4yOTUgMTUuNjU0IDcxLjE2OSAxMS41MjggNjYuMDk3IDExLjUyOCBaIE0gNjEuNjAzIDE3LjUyOCBMIDM3LjY0NyAzMi45NjIgTCAxMy42OTEgMTcuNTI4IEwgNjEuNjAzIDE3LjUyOCBaIE0gNjYuMDk3IDU2LjY0NSBMIDkuMTk3IDU2LjY0NSBDIDcuNDM0IDU2LjY0NSA2IDU1LjIxIDYgNTMuNDQ4IEwgNiAyMC44OTYgTCAzNS43OTYgNDAuMDU2IEMgMzUuODM2IDQwLjA4MSAzNS44NzkgNDAuMDk4IDM1LjkyIDQwLjEyMSBDIDM1Ljk2MyA0MC4xNDUgMzYuMDA3IDQwLjE2OCAzNi4wNTEgNDAuMTkgQyAzNi4yODIgNDAuMzA5IDM2LjUyIDQwLjQwNSAzNi43NjMgNDAuNDY4IEMgMzYuNzg4IDQwLjQ3NSAzNi44MTMgNDAuNDc4IDM2LjgzOCA0MC40ODQgQyAzNy4xMDUgNDAuNTQ3IDM3LjM3NSA0MC41ODYgMzcuNjQ1IDQwLjU4NiBDIDM3LjY0NiA0MC41ODYgMzcuNjQ3IDQwLjU4NiAzNy42NDcgNDAuNTg2IEMgMzcuNjQ5IDQwLjU4NiAzNy42NSA0MC41ODYgMzcuNjUxIDQwLjU4NiBDIDM3LjkyMSA0MC41ODYgMzguMTkxIDQwLjU0OCAzOC40NTggNDAuNDg0IEMgMzguNDgzIDQwLjQ3OCAzOC41MDggNDAuNDc1IDM4LjUzMyA0MC40NjggQyAzOC43NzYgNDAuNDA1IDM5LjAxMyA0MC4zMDkgMzkuMjQ1IDQwLjE5IEMgMzkuMjg5IDQwLjE2OCAzOS4zMzMgNDAuMTQ1IDM5LjM3NiA0MC4xMjEgQyAzOS40MTcgNDAuMDk4IDM5LjQ2IDQwLjA4MSAzOS41IDQwLjA1NiBMIDY5LjI5NiAyMC44OTYgTCA2OS4yOTYgNTMuNDQ3IEMgNjkuMjk1IDU1LjIxIDY3Ljg2IDU2LjY0NSA2Ni4wOTcgNTYuNjQ1IFoiLz4KICA8L2c+Cjwvc3ZnPg==';
|
|
937
|
+
|
|
938
|
+
/*
|
|
939
|
+
* Copyright 2015-2022 Ritense BV, the Netherlands.
|
|
940
|
+
*
|
|
941
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
942
|
+
* you may not use this file except in compliance with the License.
|
|
943
|
+
* You may obtain a copy of the License at
|
|
944
|
+
*
|
|
945
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
946
|
+
*
|
|
947
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
948
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
949
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
950
|
+
* See the License for the specific language governing permissions and
|
|
951
|
+
* limitations under the License.
|
|
952
|
+
*/
|
|
953
|
+
|
|
954
|
+
/*
|
|
955
|
+
* Copyright 2015-2022 Ritense BV, the Netherlands.
|
|
956
|
+
*
|
|
957
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
958
|
+
* you may not use this file except in compliance with the License.
|
|
959
|
+
* You may obtain a copy of the License at
|
|
960
|
+
*
|
|
961
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
962
|
+
*
|
|
963
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
964
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
965
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
966
|
+
* See the License for the specific language governing permissions and
|
|
967
|
+
* limitations under the License.
|
|
968
|
+
*/
|
|
969
|
+
const mailTemplatePluginSpecification = {
|
|
970
|
+
pluginId: 'mail-template',
|
|
971
|
+
pluginConfigurationComponent: MailTemplateConfigurationComponent,
|
|
972
|
+
pluginLogoBase64: FREEMARKER_PLUGIN_LOGO_BASE64,
|
|
973
|
+
functionConfigurationComponents: {
|
|
974
|
+
'generate-mail-file': GenerateMailFileComponent,
|
|
975
|
+
'generate-mail-content': GenerateMailContentComponent,
|
|
976
|
+
},
|
|
977
|
+
pluginTranslations: {
|
|
978
|
+
nl: {
|
|
979
|
+
title: 'Mail sjablonen',
|
|
980
|
+
'generate-mail-file': 'Genereer Mailbestand',
|
|
981
|
+
'generate-mail-content': 'Genereer Mailinhoud',
|
|
982
|
+
description: 'Maak Mail sjablonen met Freemarker.',
|
|
983
|
+
configurationTitle: 'Configuratienaam',
|
|
984
|
+
configurationTitleTooltip: 'De naam van de huidige plug-in configuratie. Onder deze naam kan de configuratie worden gevonden in de rest van de applicatie.',
|
|
985
|
+
generateMailContentDescription: 'Deze actie genereert de inhoud van een mail op basis van een sjabloon. De mail tekst wordt opgeslagen in een Proces Variabele.',
|
|
986
|
+
generateMailFileDescription: 'Deze actie genereert de inhoud van een mail en slaat het resultaat op in een tijdelijk bestand. Het ID van het bestand wordt opgeslagen in een Proces Variabele.',
|
|
987
|
+
mailTemplateKey: 'Mail sjabloon',
|
|
988
|
+
mailTemplateKeyTooltip: 'Op bases van deze sjabloon wordt de mail gegenereerd',
|
|
989
|
+
processVariableName: 'Procesvariabelenaam',
|
|
990
|
+
processVariableNameTooltip: 'Het resultaat wordt opgeslagen in een procesvariabele met deze naam',
|
|
991
|
+
},
|
|
992
|
+
en: {
|
|
993
|
+
title: 'Mail Templates',
|
|
994
|
+
'generate-mail-file': 'Generate Mail File',
|
|
995
|
+
'generate-mail-content': 'Generate Mail Content',
|
|
996
|
+
description: 'Create mail templates with Freemarker.',
|
|
997
|
+
configurationTitle: 'Configuration Name',
|
|
998
|
+
configurationTitleTooltip: 'The name of the current plug-in configuration. The configuration can be found under this name in the rest of the application.',
|
|
999
|
+
generateMailContentDescription: 'This action generates the content of an mail based on a template. The mail text is stored in a Process Variable.',
|
|
1000
|
+
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.',
|
|
1001
|
+
mailTemplateKey: 'Mail Template',
|
|
1002
|
+
mailTemplateKeyTooltip: 'The mail will be generated based on this template.',
|
|
1003
|
+
processVariableName: 'Process Variable Name',
|
|
1004
|
+
processVariableNameTooltip: 'The result will be stored in a process variable with this name.',
|
|
1005
|
+
},
|
|
1006
|
+
de: {
|
|
1007
|
+
title: 'Mail-Vorlagen',
|
|
1008
|
+
'generate-mail-file': 'Mail-Datei generieren',
|
|
1009
|
+
'generate-mail-content': 'Mail-Inhalt generieren',
|
|
1010
|
+
description: 'Erstellen Sie Mail-Vorlagen mit Freemarker.',
|
|
1011
|
+
configurationTitle: 'Konfigurationsname',
|
|
1012
|
+
configurationTitleTooltip: 'Der Name der aktuellen Plug-in-Konfiguration. Unter diesem Namen kann die Konfiguration im Rest der Anwendung gefunden werden.',
|
|
1013
|
+
generateMailContentDescription: 'Diese Aktion generiert den Inhalt einer Mail basierend auf einer Vorlage. Der Mail-Text wird in einer Prozessvariablen gespeichert.',
|
|
1014
|
+
generateMailFileDescription: 'Diese Aktion generiert den Inhalt einer Mail und speichert das Ergebnis in einer temporären Datei. Die Datei-ID wird in einer Prozessvariablen gespeichert.',
|
|
1015
|
+
mailTemplateKey: 'Mail-Vorlage',
|
|
1016
|
+
mailTemplateKeyTooltip: 'Die Mail wird basierend auf dieser Vorlage generiert.',
|
|
1017
|
+
processVariableName: 'Prozessvariablenname',
|
|
1018
|
+
processVariableNameTooltip: 'Das Ergebnis wird in einer Prozessvariablen mit diesem Namen gespeichert.',
|
|
1019
|
+
},
|
|
1020
|
+
},
|
|
1021
|
+
};
|
|
1022
|
+
|
|
1023
|
+
/*
|
|
1024
|
+
* Copyright 2015-2022 Ritense BV, the Netherlands.
|
|
1025
|
+
*
|
|
1026
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1027
|
+
* you may not use this file except in compliance with the License.
|
|
1028
|
+
* You may obtain a copy of the License at
|
|
1029
|
+
*
|
|
1030
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1031
|
+
*
|
|
1032
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1033
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1034
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1035
|
+
* See the License for the specific language governing permissions and
|
|
1036
|
+
* limitations under the License.
|
|
1037
|
+
*/
|
|
1038
|
+
/*
|
|
1039
|
+
* Public API Surface of mail-template
|
|
1040
|
+
*/
|
|
1041
|
+
|
|
1042
|
+
/**
|
|
1043
|
+
* Generated bundle index. Do not edit.
|
|
1044
|
+
*/
|
|
1045
|
+
|
|
1046
|
+
export { GenerateMailContentComponent, GenerateMailFileComponent, MailTemplateAddEditModalComponent, MailTemplateConfigurationComponent, MailTemplateDeleteModalComponent, MailTemplateEditorComponent, MailTemplateListComponent, MailTemplatePluginModule, mailTemplatePluginSpecification };
|
|
1047
|
+
//# sourceMappingURL=valtimo-plugins-freemarker.mjs.map
|