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