@valtimo/shared 13.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/README.md +31 -0
- package/assets/core/de.json +1850 -0
- package/assets/core/en.json +1826 -0
- package/assets/core/nl.json +1848 -0
- package/fesm2022/valtimo-shared.mjs +1653 -0
- package/fesm2022/valtimo-shared.mjs.map +1 -0
- package/index.d.ts +6 -0
- package/lib/components/global-notification.component.d.ts +13 -0
- package/lib/components/global-notification.component.d.ts.map +1 -0
- package/lib/config.module.d.ts +11 -0
- package/lib/config.module.d.ts.map +1 -0
- package/lib/constants/case-configuration-extensions-token.d.ts +4 -0
- package/lib/constants/case-configuration-extensions-token.d.ts.map +1 -0
- package/lib/constants/case-management-tab-token.d.ts +5 -0
- package/lib/constants/case-management-tab-token.d.ts.map +1 -0
- package/lib/constants/error.constants.d.ts +5 -0
- package/lib/constants/error.constants.d.ts.map +1 -0
- package/lib/constants/form-view-model-token.d.ts +5 -0
- package/lib/constants/form-view-model-token.d.ts.map +1 -0
- package/lib/constants/index.d.ts +6 -0
- package/lib/constants/index.d.ts.map +1 -0
- package/lib/constants/versions.d.ts +4 -0
- package/lib/constants/versions.d.ts.map +1 -0
- package/lib/extension/extension.component.d.ts +19 -0
- package/lib/extension/extension.component.d.ts.map +1 -0
- package/lib/models/case-management.model.d.ts +12 -0
- package/lib/models/case-management.model.d.ts.map +1 -0
- package/lib/models/config.d.ts +144 -0
- package/lib/models/config.d.ts.map +1 -0
- package/lib/models/email-notification-settings.model.d.ts +12 -0
- package/lib/models/email-notification-settings.model.d.ts.map +1 -0
- package/lib/models/extension.model.d.ts +33 -0
- package/lib/models/extension.model.d.ts.map +1 -0
- package/lib/models/form-view-model.model.d.ts +6 -0
- package/lib/models/form-view-model.model.d.ts.map +1 -0
- package/lib/models/global-configuration.model.d.ts +5 -0
- package/lib/models/global-configuration.model.d.ts.map +1 -0
- package/lib/models/http-loader.d.ts +4 -0
- package/lib/models/http-loader.d.ts.map +1 -0
- package/lib/models/index.d.ts +22 -0
- package/lib/models/index.d.ts.map +1 -0
- package/lib/models/localization.model.d.ts +10 -0
- package/lib/models/localization.model.d.ts.map +1 -0
- package/lib/models/management.model.d.ts +3 -0
- package/lib/models/management.model.d.ts.map +1 -0
- package/lib/models/menu-item.model.d.ts +19 -0
- package/lib/models/menu-item.model.d.ts.map +1 -0
- package/lib/models/menu.config.d.ts +5 -0
- package/lib/models/menu.config.d.ts.map +1 -0
- package/lib/models/page.d.ts +26 -0
- package/lib/models/page.d.ts.map +1 -0
- package/lib/models/roles.d.ts +4 -0
- package/lib/models/roles.d.ts.map +1 -0
- package/lib/models/search.model.d.ts +52 -0
- package/lib/models/search.model.d.ts.map +1 -0
- package/lib/models/security.config.d.ts +47 -0
- package/lib/models/security.config.d.ts.map +1 -0
- package/lib/models/tag-color.model.d.ts +16 -0
- package/lib/models/tag-color.model.d.ts.map +1 -0
- package/lib/models/translation.model.d.ts +7 -0
- package/lib/models/translation.model.d.ts.map +1 -0
- package/lib/models/user-management.model.d.ts +22 -0
- package/lib/models/user-management.model.d.ts.map +1 -0
- package/lib/models/user-settings.model.d.ts +9 -0
- package/lib/models/user-settings.model.d.ts.map +1 -0
- package/lib/models/versions.model.d.ts +5 -0
- package/lib/models/versions.model.d.ts.map +1 -0
- package/lib/models/window.model.d.ts +12 -0
- package/lib/models/window.model.d.ts.map +1 -0
- package/lib/services/base-api.service.d.ts +10 -0
- package/lib/services/base-api.service.d.ts.map +1 -0
- package/lib/services/config.service.d.ts +27 -0
- package/lib/services/config.service.d.ts.map +1 -0
- package/lib/services/draft-version.service.d.ts +14 -0
- package/lib/services/draft-version.service.d.ts.map +1 -0
- package/lib/services/edit-permissions.service.d.ts +19 -0
- package/lib/services/edit-permissions.service.d.ts.map +1 -0
- package/lib/services/environment.service.d.ts +14 -0
- package/lib/services/environment.service.d.ts.map +1 -0
- package/lib/services/global-notification.service.d.ts +22 -0
- package/lib/services/global-notification.service.d.ts.map +1 -0
- package/lib/services/index.d.ts +10 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/localization.service.d.ts +19 -0
- package/lib/services/localization.service.d.ts.map +1 -0
- package/lib/services/menu-include.service.d.ts +13 -0
- package/lib/services/menu-include.service.d.ts.map +1 -0
- package/lib/services/user-settings.service.d.ts +16 -0
- package/lib/services/user-settings.service.d.ts.map +1 -0
- package/lib/testing/index.d.ts +2 -0
- package/lib/testing/index.d.ts.map +1 -0
- package/lib/testing/services/index.d.ts +4 -0
- package/lib/testing/services/index.d.ts.map +1 -0
- package/lib/testing/services/mock-icon.service.d.ts +7 -0
- package/lib/testing/services/mock-icon.service.d.ts.map +1 -0
- package/lib/testing/services/mock-keycloak.service.d.ts +14 -0
- package/lib/testing/services/mock-keycloak.service.d.ts.map +1 -0
- package/lib/testing/services/mock-translate.service.d.ts +9 -0
- package/lib/testing/services/mock-translate.service.d.ts.map +1 -0
- package/lib/translation/custom-multi-translate-http-loader-factory.d.ts +6 -0
- package/lib/translation/custom-multi-translate-http-loader-factory.d.ts.map +1 -0
- package/lib/translation/custom-multi-translate-http-loader.d.ts +14 -0
- package/lib/translation/custom-multi-translate-http-loader.d.ts.map +1 -0
- package/lib/translation/index.d.ts +4 -0
- package/lib/translation/index.d.ts.map +1 -0
- package/lib/translation/multi-translate-http-loader-factory.d.ts +5 -0
- package/lib/translation/multi-translate-http-loader-factory.d.ts.map +1 -0
- package/lib/utils/global-notification.utils.d.ts +7 -0
- package/lib/utils/global-notification.utils.d.ts.map +1 -0
- package/lib/utils/index.d.ts +5 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/route-params.utils.d.ts +8 -0
- package/lib/utils/route-params.utils.d.ts.map +1 -0
- package/lib/utils/router.utils.d.ts +6 -0
- package/lib/utils/router.utils.d.ts.map +1 -0
- package/lib/utils/url.utils.d.ts +7 -0
- package/lib/utils/url.utils.d.ts.map +1 -0
- package/lib/zgw/constants/index.d.ts +3 -0
- package/lib/zgw/constants/index.d.ts.map +1 -0
- package/lib/zgw/constants/zgw-documenten-api-documents-component-token.d.ts +4 -0
- package/lib/zgw/constants/zgw-documenten-api-documents-component-token.d.ts.map +1 -0
- package/lib/zgw/constants/zgw-object-type-component-token.d.ts +4 -0
- package/lib/zgw/constants/zgw-object-type-component-token.d.ts.map +1 -0
- package/lib/zgw/index.d.ts +2 -0
- package/lib/zgw/index.d.ts.map +1 -0
- package/package.json +26 -0
- package/public-api.d.ts +11 -0
- package/public-api.d.ts.map +1 -0
- package/valtimo-shared.d.ts.map +1 -0
|
@@ -0,0 +1,1653 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { InjectionToken, Inject, Injectable, Component, ViewContainerRef, ViewChild, Input, NgModule } from '@angular/core';
|
|
4
|
+
import * as i2 from 'carbon-components-angular';
|
|
5
|
+
import { Notification, Toast, ActionableNotification, NotificationService } from 'carbon-components-angular';
|
|
6
|
+
import { of, combineLatest, map, filter, distinctUntilChanged, switchMap, take, forkJoin } from 'rxjs';
|
|
7
|
+
import { isEqual } from 'lodash';
|
|
8
|
+
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
|
9
|
+
import * as i1 from '@angular/common/http';
|
|
10
|
+
import { HttpHeaders, HttpClient } from '@angular/common/http';
|
|
11
|
+
import { catchError, switchMap as switchMap$1, map as map$1 } from 'rxjs/operators';
|
|
12
|
+
import { deepmerge } from 'deepmerge-ts';
|
|
13
|
+
import { MultiTranslateHttpLoader } from 'ngx-translate-multi-http-loader';
|
|
14
|
+
|
|
15
|
+
/*
|
|
16
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
17
|
+
*
|
|
18
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
19
|
+
* you may not use this file except in compliance with the License.
|
|
20
|
+
* You may obtain a copy of the License at
|
|
21
|
+
*
|
|
22
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
23
|
+
*
|
|
24
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
25
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
26
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
27
|
+
* See the License for the specific language governing permissions and
|
|
28
|
+
* limitations under the License.
|
|
29
|
+
*/
|
|
30
|
+
class RouterUtils {
|
|
31
|
+
static getRouterExtraOptions() {
|
|
32
|
+
return { canceledNavigationResolution: 'computed' };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/*
|
|
37
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
38
|
+
*
|
|
39
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
40
|
+
* you may not use this file except in compliance with the License.
|
|
41
|
+
* You may obtain a copy of the License at
|
|
42
|
+
*
|
|
43
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
44
|
+
*
|
|
45
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
46
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
47
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
48
|
+
* See the License for the specific language governing permissions and
|
|
49
|
+
* limitations under the License.
|
|
50
|
+
*/
|
|
51
|
+
class UrlUtils {
|
|
52
|
+
static formatUrlTrailingSlash(url, returnWithTrailingSlash) {
|
|
53
|
+
if (url && typeof url === 'string') {
|
|
54
|
+
const urlLastCharacter = url[url.length - 1];
|
|
55
|
+
const urlLastCharacterIsSlash = urlLastCharacter === '/';
|
|
56
|
+
if (!returnWithTrailingSlash && urlLastCharacterIsSlash) {
|
|
57
|
+
return url.slice(0, -1);
|
|
58
|
+
}
|
|
59
|
+
else if (returnWithTrailingSlash && !urlLastCharacterIsSlash) {
|
|
60
|
+
return `${url}/`;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return url;
|
|
64
|
+
}
|
|
65
|
+
static formatUrlStartWithSlash(url) {
|
|
66
|
+
if (url && typeof url === 'string' && url.length > 0 && url[0] !== '/') {
|
|
67
|
+
return `/${url}`;
|
|
68
|
+
}
|
|
69
|
+
return `${url}`;
|
|
70
|
+
}
|
|
71
|
+
static getUrlHost(urlString) {
|
|
72
|
+
let url;
|
|
73
|
+
try {
|
|
74
|
+
url = new URL(urlString);
|
|
75
|
+
}
|
|
76
|
+
catch (_) { }
|
|
77
|
+
return url ? url.host : '';
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/*
|
|
82
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
83
|
+
*
|
|
84
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
85
|
+
* you may not use this file except in compliance with the License.
|
|
86
|
+
* You may obtain a copy of the License at
|
|
87
|
+
*
|
|
88
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
89
|
+
*
|
|
90
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
91
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
92
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
93
|
+
* See the License for the specific language governing permissions and
|
|
94
|
+
* limitations under the License.
|
|
95
|
+
*/
|
|
96
|
+
const DEFAULT_NOTIFICATION_PARAMS = {
|
|
97
|
+
duration: 4000,
|
|
98
|
+
showClose: true,
|
|
99
|
+
};
|
|
100
|
+
const getNotificationObject = (content) => ({
|
|
101
|
+
...DEFAULT_NOTIFICATION_PARAMS,
|
|
102
|
+
...content,
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
const getCaseManagementRouteParams = (route, doFilter = false) => {
|
|
106
|
+
const rootParams$ = route.params ? route.params : of({});
|
|
107
|
+
const parentParams$ = route.parent?.params ? route.parent.params : of({});
|
|
108
|
+
return combineLatest([rootParams$, parentParams$]).pipe(map(([rootParams, parentParams]) => {
|
|
109
|
+
const caseDefinitionKey = rootParams['caseDefinitionKey'] || parentParams['caseDefinitionKey'];
|
|
110
|
+
const caseDefinitionVersionTag = rootParams['caseDefinitionVersionTag'] || parentParams['caseDefinitionVersionTag'];
|
|
111
|
+
if (caseDefinitionKey && caseDefinitionVersionTag) {
|
|
112
|
+
return { caseDefinitionKey, caseDefinitionVersionTag };
|
|
113
|
+
}
|
|
114
|
+
return null;
|
|
115
|
+
}), filter((params) => (doFilter ? params !== null : true)), distinctUntilChanged((previous, current) => isEqual(previous, current)));
|
|
116
|
+
};
|
|
117
|
+
function getContextObservable(route) {
|
|
118
|
+
return route.data.pipe(map(data => (data && data['context']) || null), distinctUntilChanged());
|
|
119
|
+
}
|
|
120
|
+
function getCaseManagementRouteParamsAndContext(route) {
|
|
121
|
+
const params$ = getCaseManagementRouteParams(route, true);
|
|
122
|
+
const context$ = getContextObservable(route);
|
|
123
|
+
return context$.pipe(switchMap(context => {
|
|
124
|
+
if (context === 'case') {
|
|
125
|
+
return combineLatest([of(context), params$]);
|
|
126
|
+
}
|
|
127
|
+
const fallbackParams = {
|
|
128
|
+
caseDefinitionKey: '',
|
|
129
|
+
caseDefinitionVersionTag: '',
|
|
130
|
+
};
|
|
131
|
+
return of([context, fallbackParams]);
|
|
132
|
+
}));
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/*
|
|
136
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
137
|
+
*
|
|
138
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
139
|
+
* you may not use this file except in compliance with the License.
|
|
140
|
+
* You may obtain a copy of the License at
|
|
141
|
+
*
|
|
142
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
143
|
+
*
|
|
144
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
145
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
146
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
147
|
+
* See the License for the specific language governing permissions and
|
|
148
|
+
* limitations under the License.
|
|
149
|
+
*/
|
|
150
|
+
|
|
151
|
+
/*
|
|
152
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
153
|
+
*
|
|
154
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
155
|
+
* you may not use this file except in compliance with the License.
|
|
156
|
+
* You may obtain a copy of the License at
|
|
157
|
+
*
|
|
158
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
159
|
+
*
|
|
160
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
161
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
162
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
163
|
+
* See the License for the specific language governing permissions and
|
|
164
|
+
* limitations under the License.
|
|
165
|
+
*/
|
|
166
|
+
class BaseApiService {
|
|
167
|
+
constructor(httpClient, configService) {
|
|
168
|
+
this.httpClient = httpClient;
|
|
169
|
+
this.configService = configService;
|
|
170
|
+
this._valtimoEndpointUri = configService.config.valtimoApi.endpointUri;
|
|
171
|
+
}
|
|
172
|
+
getApiUrl(urlPart) {
|
|
173
|
+
const urlWithStartSlash = UrlUtils.formatUrlStartWithSlash(urlPart);
|
|
174
|
+
const urlFormattedWithTrailingSlash = `${UrlUtils.formatUrlTrailingSlash(this._valtimoEndpointUri, false)}${urlWithStartSlash}`;
|
|
175
|
+
return urlFormattedWithTrailingSlash;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/*
|
|
180
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
181
|
+
*
|
|
182
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
183
|
+
* you may not use this file except in compliance with the License.
|
|
184
|
+
* You may obtain a copy of the License at
|
|
185
|
+
*
|
|
186
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
187
|
+
*
|
|
188
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
189
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
190
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
191
|
+
* See the License for the specific language governing permissions and
|
|
192
|
+
* limitations under the License.
|
|
193
|
+
*/
|
|
194
|
+
const VALTIMO_CONFIG = new InjectionToken('valtimoConfig');
|
|
195
|
+
// eslint-disable-next-line
|
|
196
|
+
const INITIALIZERS = new InjectionToken('initializers');
|
|
197
|
+
var UploadProvider;
|
|
198
|
+
(function (UploadProvider) {
|
|
199
|
+
UploadProvider[UploadProvider["S3"] = 0] = "S3";
|
|
200
|
+
/**@deprecated This upload provider will be removed in the future. */
|
|
201
|
+
UploadProvider[UploadProvider["OPEN_ZAAK"] = 1] = "OPEN_ZAAK";
|
|
202
|
+
UploadProvider[UploadProvider["DOCUMENTEN_API"] = 2] = "DOCUMENTEN_API";
|
|
203
|
+
})(UploadProvider || (UploadProvider = {}));
|
|
204
|
+
var TaskListTab;
|
|
205
|
+
(function (TaskListTab) {
|
|
206
|
+
TaskListTab["MINE"] = "mine";
|
|
207
|
+
TaskListTab["OPEN"] = "open";
|
|
208
|
+
TaskListTab["ALL"] = "all";
|
|
209
|
+
})(TaskListTab || (TaskListTab = {}));
|
|
210
|
+
var CaseListTab;
|
|
211
|
+
(function (CaseListTab) {
|
|
212
|
+
CaseListTab["MINE"] = "MINE";
|
|
213
|
+
CaseListTab["OPEN"] = "OPEN";
|
|
214
|
+
CaseListTab["ALL"] = "ALL";
|
|
215
|
+
})(CaseListTab || (CaseListTab = {}));
|
|
216
|
+
var Language;
|
|
217
|
+
(function (Language) {
|
|
218
|
+
Language["NL"] = "nl";
|
|
219
|
+
Language["EN"] = "en";
|
|
220
|
+
Language["DE"] = "de";
|
|
221
|
+
})(Language || (Language = {}));
|
|
222
|
+
|
|
223
|
+
/*
|
|
224
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
225
|
+
*
|
|
226
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
227
|
+
* you may not use this file except in compliance with the License.
|
|
228
|
+
* You may obtain a copy of the License at
|
|
229
|
+
*
|
|
230
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
231
|
+
*
|
|
232
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
233
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
234
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
235
|
+
* See the License for the specific language governing permissions and
|
|
236
|
+
* limitations under the License.
|
|
237
|
+
*/
|
|
238
|
+
|
|
239
|
+
/*
|
|
240
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
241
|
+
*
|
|
242
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
243
|
+
* you may not use this file except in compliance with the License.
|
|
244
|
+
* You may obtain a copy of the License at
|
|
245
|
+
*
|
|
246
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
247
|
+
*
|
|
248
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
249
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
250
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
251
|
+
* See the License for the specific language governing permissions and
|
|
252
|
+
* limitations under the License.
|
|
253
|
+
*/
|
|
254
|
+
var IncludeFunction;
|
|
255
|
+
(function (IncludeFunction) {
|
|
256
|
+
IncludeFunction[IncludeFunction["ObjectManagementEnabled"] = 0] = "ObjectManagementEnabled";
|
|
257
|
+
})(IncludeFunction || (IncludeFunction = {}));
|
|
258
|
+
|
|
259
|
+
/*
|
|
260
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
261
|
+
*
|
|
262
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
263
|
+
* you may not use this file except in compliance with the License.
|
|
264
|
+
* You may obtain a copy of the License at
|
|
265
|
+
*
|
|
266
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
267
|
+
*
|
|
268
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
269
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
270
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
271
|
+
* See the License for the specific language governing permissions and
|
|
272
|
+
* limitations under the License.
|
|
273
|
+
*/
|
|
274
|
+
|
|
275
|
+
/*
|
|
276
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
277
|
+
*
|
|
278
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
279
|
+
* you may not use this file except in compliance with the License.
|
|
280
|
+
* You may obtain a copy of the License at
|
|
281
|
+
*
|
|
282
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
283
|
+
*
|
|
284
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
285
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
286
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
287
|
+
* See the License for the specific language governing permissions and
|
|
288
|
+
* limitations under the License.
|
|
289
|
+
*/
|
|
290
|
+
class ValtimoUserIdentity {
|
|
291
|
+
constructor(email, firstName, lastName, roles, username, id) {
|
|
292
|
+
this._email = email;
|
|
293
|
+
this._firstName = firstName;
|
|
294
|
+
this._lastName = lastName;
|
|
295
|
+
this._roles = roles;
|
|
296
|
+
this._username = username;
|
|
297
|
+
this._id = id;
|
|
298
|
+
}
|
|
299
|
+
get email() {
|
|
300
|
+
return this._email;
|
|
301
|
+
}
|
|
302
|
+
get firstName() {
|
|
303
|
+
return this._firstName;
|
|
304
|
+
}
|
|
305
|
+
get lastName() {
|
|
306
|
+
return this._lastName;
|
|
307
|
+
}
|
|
308
|
+
get roles() {
|
|
309
|
+
return this._roles;
|
|
310
|
+
}
|
|
311
|
+
get username() {
|
|
312
|
+
return this._username;
|
|
313
|
+
}
|
|
314
|
+
get id() {
|
|
315
|
+
return this._id;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/*
|
|
320
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
321
|
+
*
|
|
322
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
323
|
+
* you may not use this file except in compliance with the License.
|
|
324
|
+
* You may obtain a copy of the License at
|
|
325
|
+
*
|
|
326
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
327
|
+
*
|
|
328
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
329
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
330
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
331
|
+
* See the License for the specific language governing permissions and
|
|
332
|
+
* limitations under the License.
|
|
333
|
+
*/
|
|
334
|
+
class ExtensionLoader {
|
|
335
|
+
constructor(componentFactoryResolver) {
|
|
336
|
+
this.componentFactoryResolver = null;
|
|
337
|
+
this.componentRef = null;
|
|
338
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
339
|
+
}
|
|
340
|
+
loadExtensionPoint(viewContainerRef, extensionPoint) {
|
|
341
|
+
const componentFactory = this.componentFactoryResolver.resolveComponentFactory(extensionPoint.component);
|
|
342
|
+
this.componentRef = viewContainerRef.createComponent(componentFactory);
|
|
343
|
+
}
|
|
344
|
+
loadAndClearExtensionPoint(viewContainerRef, extensionPoint) {
|
|
345
|
+
const componentFactory = this.componentFactoryResolver.resolveComponentFactory(extensionPoint.component);
|
|
346
|
+
viewContainerRef.clear();
|
|
347
|
+
return (this.componentRef = viewContainerRef.createComponent(componentFactory));
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
class Extension {
|
|
351
|
+
constructor(name, extensionPoint) {
|
|
352
|
+
this._name = name;
|
|
353
|
+
this._extensionPoint = extensionPoint;
|
|
354
|
+
}
|
|
355
|
+
get extensionPoint() {
|
|
356
|
+
return this._extensionPoint;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
class BasicExtensionPoint {
|
|
360
|
+
constructor(module, page, section, component) {
|
|
361
|
+
this._module = module;
|
|
362
|
+
this._page = page;
|
|
363
|
+
this._section = section;
|
|
364
|
+
this._component = component;
|
|
365
|
+
}
|
|
366
|
+
supports(module, page, section) {
|
|
367
|
+
return this._module === module && this._page === page && this._section === section;
|
|
368
|
+
}
|
|
369
|
+
get module() {
|
|
370
|
+
return this._module;
|
|
371
|
+
}
|
|
372
|
+
get page() {
|
|
373
|
+
return this._page;
|
|
374
|
+
}
|
|
375
|
+
get section() {
|
|
376
|
+
return this._section;
|
|
377
|
+
}
|
|
378
|
+
get component() {
|
|
379
|
+
return this._component;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
/*
|
|
384
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
385
|
+
*
|
|
386
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
387
|
+
* you may not use this file except in compliance with the License.
|
|
388
|
+
* You may obtain a copy of the License at
|
|
389
|
+
*
|
|
390
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
391
|
+
*
|
|
392
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
393
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
394
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
395
|
+
* See the License for the specific language governing permissions and
|
|
396
|
+
* limitations under the License.
|
|
397
|
+
*/
|
|
398
|
+
function HttpLoaderFactory(httpClient) {
|
|
399
|
+
return new TranslateHttpLoader(httpClient);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/*
|
|
403
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
404
|
+
*
|
|
405
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
406
|
+
* you may not use this file except in compliance with the License.
|
|
407
|
+
* You may obtain a copy of the License at
|
|
408
|
+
*
|
|
409
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
410
|
+
*
|
|
411
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
412
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
413
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
414
|
+
* See the License for the specific language governing permissions and
|
|
415
|
+
* limitations under the License.
|
|
416
|
+
*/
|
|
417
|
+
const ROLE_ADMIN = 'ROLE_ADMIN';
|
|
418
|
+
const ROLE_USER = 'ROLE_USER';
|
|
419
|
+
const ROLE_DEVELOPER = 'ROLE_DEVELOPER';
|
|
420
|
+
|
|
421
|
+
/*
|
|
422
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
423
|
+
*
|
|
424
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
425
|
+
* you may not use this file except in compliance with the License.
|
|
426
|
+
* You may obtain a copy of the License at
|
|
427
|
+
*
|
|
428
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
429
|
+
*
|
|
430
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
431
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
432
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
433
|
+
* See the License for the specific language governing permissions and
|
|
434
|
+
* limitations under the License.
|
|
435
|
+
*/
|
|
436
|
+
|
|
437
|
+
/*
|
|
438
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
439
|
+
*
|
|
440
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
441
|
+
* you may not use this file except in compliance with the License.
|
|
442
|
+
* You may obtain a copy of the License at
|
|
443
|
+
*
|
|
444
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
445
|
+
*
|
|
446
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
447
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
448
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
449
|
+
* See the License for the specific language governing permissions and
|
|
450
|
+
* limitations under the License.
|
|
451
|
+
*/
|
|
452
|
+
|
|
453
|
+
/*
|
|
454
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
455
|
+
*
|
|
456
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
457
|
+
* you may not use this file except in compliance with the License.
|
|
458
|
+
* You may obtain a copy of the License at
|
|
459
|
+
*
|
|
460
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
461
|
+
*
|
|
462
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
463
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
464
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
465
|
+
* See the License for the specific language governing permissions and
|
|
466
|
+
* limitations under the License.
|
|
467
|
+
*/
|
|
468
|
+
|
|
469
|
+
/*
|
|
470
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
471
|
+
*
|
|
472
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
473
|
+
* you may not use this file except in compliance with the License.
|
|
474
|
+
* You may obtain a copy of the License at
|
|
475
|
+
*
|
|
476
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
477
|
+
*
|
|
478
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
479
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
480
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
481
|
+
* See the License for the specific language governing permissions and
|
|
482
|
+
* limitations under the License.
|
|
483
|
+
*/
|
|
484
|
+
|
|
485
|
+
/*
|
|
486
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
487
|
+
*
|
|
488
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
489
|
+
* you may not use this file except in compliance with the License.
|
|
490
|
+
* You may obtain a copy of the License at
|
|
491
|
+
*
|
|
492
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
493
|
+
*
|
|
494
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
495
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
496
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
497
|
+
* See the License for the specific language governing permissions and
|
|
498
|
+
* limitations under the License.
|
|
499
|
+
*/
|
|
500
|
+
|
|
501
|
+
/*
|
|
502
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
503
|
+
*
|
|
504
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
505
|
+
* you may not use this file except in compliance with the License.
|
|
506
|
+
* You may obtain a copy of the License at
|
|
507
|
+
*
|
|
508
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
509
|
+
*
|
|
510
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
511
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
512
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
513
|
+
* See the License for the specific language governing permissions and
|
|
514
|
+
* limitations under the License.
|
|
515
|
+
*/
|
|
516
|
+
|
|
517
|
+
/*
|
|
518
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
519
|
+
*
|
|
520
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
521
|
+
* you may not use this file except in compliance with the License.
|
|
522
|
+
* You may obtain a copy of the License at
|
|
523
|
+
*
|
|
524
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
525
|
+
*
|
|
526
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
527
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
528
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
529
|
+
* See the License for the specific language governing permissions and
|
|
530
|
+
* limitations under the License.
|
|
531
|
+
*/
|
|
532
|
+
|
|
533
|
+
/*
|
|
534
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
535
|
+
*
|
|
536
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
537
|
+
* you may not use this file except in compliance with the License.
|
|
538
|
+
* You may obtain a copy of the License at
|
|
539
|
+
*
|
|
540
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
541
|
+
*
|
|
542
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
543
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
544
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
545
|
+
* See the License for the specific language governing permissions and
|
|
546
|
+
* limitations under the License.
|
|
547
|
+
*/
|
|
548
|
+
|
|
549
|
+
/*
|
|
550
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
551
|
+
*
|
|
552
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
553
|
+
* you may not use this file except in compliance with the License.
|
|
554
|
+
* You may obtain a copy of the License at
|
|
555
|
+
*
|
|
556
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
557
|
+
*
|
|
558
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
559
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
560
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
561
|
+
* See the License for the specific language governing permissions and
|
|
562
|
+
* limitations under the License.
|
|
563
|
+
*/
|
|
564
|
+
|
|
565
|
+
/*
|
|
566
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
567
|
+
*
|
|
568
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
569
|
+
* you may not use this file except in compliance with the License.
|
|
570
|
+
* You may obtain a copy of the License at
|
|
571
|
+
*
|
|
572
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
573
|
+
*
|
|
574
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
575
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
576
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
577
|
+
* See the License for the specific language governing permissions and
|
|
578
|
+
* limitations under the License.
|
|
579
|
+
*/
|
|
580
|
+
|
|
581
|
+
/*
|
|
582
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
583
|
+
*
|
|
584
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
585
|
+
* you may not use this file except in compliance with the License.
|
|
586
|
+
* You may obtain a copy of the License at
|
|
587
|
+
*
|
|
588
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
589
|
+
*
|
|
590
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
591
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
592
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
593
|
+
* See the License for the specific language governing permissions and
|
|
594
|
+
* limitations under the License.
|
|
595
|
+
*/
|
|
596
|
+
var TagColor;
|
|
597
|
+
(function (TagColor) {
|
|
598
|
+
TagColor["WarmGray"] = "WARMGRAY";
|
|
599
|
+
TagColor["Red"] = "RED";
|
|
600
|
+
TagColor["Magenta"] = "MAGENTA";
|
|
601
|
+
TagColor["Purple"] = "PURPLE";
|
|
602
|
+
TagColor["Blue"] = "BLUE";
|
|
603
|
+
TagColor["Cyan"] = "CYAN";
|
|
604
|
+
TagColor["Teal"] = "TEAL";
|
|
605
|
+
TagColor["Green"] = "GREEN";
|
|
606
|
+
TagColor["Gray"] = "GRAY";
|
|
607
|
+
TagColor["CoolGray"] = "COOLGRAY";
|
|
608
|
+
TagColor["HighContrast"] = "HIGHCONTRAST";
|
|
609
|
+
TagColor["Outline"] = "OUTLINE";
|
|
610
|
+
TagColor["Orange"] = "ORANGE";
|
|
611
|
+
})(TagColor || (TagColor = {}));
|
|
612
|
+
|
|
613
|
+
/*
|
|
614
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
615
|
+
*
|
|
616
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
617
|
+
* you may not use this file except in compliance with the License.
|
|
618
|
+
* You may obtain a copy of the License at
|
|
619
|
+
*
|
|
620
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
621
|
+
*
|
|
622
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
623
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
624
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
625
|
+
* See the License for the specific language governing permissions and
|
|
626
|
+
* limitations under the License.
|
|
627
|
+
*/
|
|
628
|
+
|
|
629
|
+
/*
|
|
630
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
631
|
+
*
|
|
632
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
633
|
+
* you may not use this file except in compliance with the License.
|
|
634
|
+
* You may obtain a copy of the License at
|
|
635
|
+
*
|
|
636
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
637
|
+
*
|
|
638
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
639
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
640
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
641
|
+
* See the License for the specific language governing permissions and
|
|
642
|
+
* limitations under the License.
|
|
643
|
+
*/
|
|
644
|
+
|
|
645
|
+
/*
|
|
646
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
647
|
+
*
|
|
648
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
649
|
+
* you may not use this file except in compliance with the License.
|
|
650
|
+
* You may obtain a copy of the License at
|
|
651
|
+
*
|
|
652
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
653
|
+
*
|
|
654
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
655
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
656
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
657
|
+
* See the License for the specific language governing permissions and
|
|
658
|
+
* limitations under the License.
|
|
659
|
+
*/
|
|
660
|
+
class ConfigService {
|
|
661
|
+
constructor(valtimoConfig, componentFactoryResolver) {
|
|
662
|
+
this.valtimoConfig = valtimoConfig;
|
|
663
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
664
|
+
this.extensions = [];
|
|
665
|
+
this.DEFAULT_APPLICATION_TITLE = 'Valtimo';
|
|
666
|
+
this.extensionLoader = new ExtensionLoader(componentFactoryResolver);
|
|
667
|
+
}
|
|
668
|
+
get config() {
|
|
669
|
+
const config = this.valtimoConfig;
|
|
670
|
+
const translationResourcesConfig = config.translationResources;
|
|
671
|
+
return {
|
|
672
|
+
...config,
|
|
673
|
+
initializers: config.initializers || [],
|
|
674
|
+
whitelistedDomains: config.whitelistedDomains.map(domain => UrlUtils.formatUrlTrailingSlash(domain, false)),
|
|
675
|
+
mockApi: {
|
|
676
|
+
...config.mockApi,
|
|
677
|
+
endpointUri: UrlUtils.formatUrlTrailingSlash(config.mockApi.endpointUri, true),
|
|
678
|
+
},
|
|
679
|
+
swagger: {
|
|
680
|
+
...config.swagger,
|
|
681
|
+
endpointUri: UrlUtils.formatUrlTrailingSlash(config.swagger.endpointUri, false),
|
|
682
|
+
},
|
|
683
|
+
valtimoApi: {
|
|
684
|
+
...config.valtimoApi,
|
|
685
|
+
endpointUri: UrlUtils.formatUrlTrailingSlash(config.valtimoApi.endpointUri, true),
|
|
686
|
+
},
|
|
687
|
+
...(translationResourcesConfig && {
|
|
688
|
+
translationResources: translationResourcesConfig.map(resource => UrlUtils.formatUrlTrailingSlash(resource, true)),
|
|
689
|
+
}),
|
|
690
|
+
applicationTitle: config.applicationTitle || this.DEFAULT_APPLICATION_TITLE,
|
|
691
|
+
};
|
|
692
|
+
}
|
|
693
|
+
get featureToggles() {
|
|
694
|
+
return this.config.featureToggles;
|
|
695
|
+
}
|
|
696
|
+
get config$() {
|
|
697
|
+
return of(this.config);
|
|
698
|
+
}
|
|
699
|
+
get featureToggles$() {
|
|
700
|
+
return of(this.config.featureToggles);
|
|
701
|
+
}
|
|
702
|
+
get initializers() {
|
|
703
|
+
return this.valtimoConfig?.initializers || [];
|
|
704
|
+
}
|
|
705
|
+
addExtension(extension) {
|
|
706
|
+
return this.extensions.push(extension);
|
|
707
|
+
}
|
|
708
|
+
getSupportedExtensionPoint(module, page, section) {
|
|
709
|
+
return this.extensions.find(extension => extension.extensionPoint.supports(module, page, section));
|
|
710
|
+
}
|
|
711
|
+
getSupportedExtensionPoints(module, page, section) {
|
|
712
|
+
return this.extensions.filter(extension => extension.extensionPoint.supports(module, page, section));
|
|
713
|
+
}
|
|
714
|
+
loadExtensionPoint(viewContainerRef, extensionPoint) {
|
|
715
|
+
this.extensionLoader.loadExtensionPoint(viewContainerRef, extensionPoint);
|
|
716
|
+
}
|
|
717
|
+
loadAndReturnExtensionPoint(viewContainerRef, extensionPoint) {
|
|
718
|
+
return this.extensionLoader.loadAndClearExtensionPoint(viewContainerRef, extensionPoint);
|
|
719
|
+
}
|
|
720
|
+
getFeatureToggleObservable(featureToggle) {
|
|
721
|
+
return this.featureToggles$.pipe(map(featureToggles => !!(featureToggles && featureToggles[featureToggle])));
|
|
722
|
+
}
|
|
723
|
+
getFeatureToggle(featureToggle) {
|
|
724
|
+
return !!(this.featureToggles && this.featureToggles[featureToggle]);
|
|
725
|
+
}
|
|
726
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ConfigService, deps: [{ token: VALTIMO_CONFIG }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
727
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ConfigService, providedIn: 'root' }); }
|
|
728
|
+
}
|
|
729
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ConfigService, decorators: [{
|
|
730
|
+
type: Injectable,
|
|
731
|
+
args: [{
|
|
732
|
+
providedIn: 'root',
|
|
733
|
+
}]
|
|
734
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
735
|
+
type: Inject,
|
|
736
|
+
args: [VALTIMO_CONFIG]
|
|
737
|
+
}] }, { type: i0.ComponentFactoryResolver }] });
|
|
738
|
+
|
|
739
|
+
/*
|
|
740
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
741
|
+
*
|
|
742
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
743
|
+
* you may not use this file except in compliance with the License.
|
|
744
|
+
* You may obtain a copy of the License at
|
|
745
|
+
*
|
|
746
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
747
|
+
*
|
|
748
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
749
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
750
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
751
|
+
* See the License for the specific language governing permissions and
|
|
752
|
+
* limitations under the License.
|
|
753
|
+
*/
|
|
754
|
+
class GlobalNotificationService {
|
|
755
|
+
constructor() {
|
|
756
|
+
this._notificationService = null;
|
|
757
|
+
this._notificationQueue = [];
|
|
758
|
+
}
|
|
759
|
+
setNotificationService(service) {
|
|
760
|
+
this._notificationService = service;
|
|
761
|
+
}
|
|
762
|
+
getNotificationService() {
|
|
763
|
+
return this._notificationService;
|
|
764
|
+
}
|
|
765
|
+
showNotification(notificationObj, notificationComp = Notification) {
|
|
766
|
+
if (!this._notificationService)
|
|
767
|
+
return null;
|
|
768
|
+
return this.handleNotificationRef(this._notificationService?.showNotification(getNotificationObject(notificationObj), notificationComp));
|
|
769
|
+
}
|
|
770
|
+
showToast(notificationObj, notificationComp = Toast) {
|
|
771
|
+
if (!this._notificationService)
|
|
772
|
+
return null;
|
|
773
|
+
return this.handleNotificationRef(this._notificationService?.showToast(getNotificationObject(notificationObj), notificationComp));
|
|
774
|
+
}
|
|
775
|
+
showActionable(notificationObj, notificationComp = ActionableNotification) {
|
|
776
|
+
if (!this._notificationService)
|
|
777
|
+
return null;
|
|
778
|
+
return this.handleNotificationRef(this._notificationService?.showActionable(getNotificationObject(notificationObj), notificationComp));
|
|
779
|
+
}
|
|
780
|
+
close(notificationRef) {
|
|
781
|
+
notificationRef.close.emit();
|
|
782
|
+
}
|
|
783
|
+
getSmartTimeout(notificationObj) {
|
|
784
|
+
if (!this._notificationService)
|
|
785
|
+
return null;
|
|
786
|
+
return this._notificationService?.getSmartTimeout(notificationObj);
|
|
787
|
+
}
|
|
788
|
+
getNotificationRefs() {
|
|
789
|
+
if (!this._notificationService)
|
|
790
|
+
return null;
|
|
791
|
+
return this._notificationService?.notificationRefs;
|
|
792
|
+
}
|
|
793
|
+
getOnCloseEmitter() {
|
|
794
|
+
if (!this._notificationService)
|
|
795
|
+
return null;
|
|
796
|
+
return this._notificationService?.onClose;
|
|
797
|
+
}
|
|
798
|
+
ngOnDestroy() {
|
|
799
|
+
this._notificationService?.ngOnDestroy();
|
|
800
|
+
this._notificationQueue.splice(0, this._notificationQueue.length);
|
|
801
|
+
}
|
|
802
|
+
handleNotificationRef(notificationRef) {
|
|
803
|
+
const notification = {
|
|
804
|
+
...notificationRef,
|
|
805
|
+
id: notificationRef.toastID ??
|
|
806
|
+
notificationRef.notificationID ??
|
|
807
|
+
notificationRef.actionableNotificationID,
|
|
808
|
+
};
|
|
809
|
+
if (this._notificationQueue.length > 3) {
|
|
810
|
+
this._notificationQueue.splice(0, 1);
|
|
811
|
+
this.close(notificationRef);
|
|
812
|
+
}
|
|
813
|
+
this._notificationQueue.push(notification);
|
|
814
|
+
setTimeout(() => this.removeNotificationInQueue(notification.id), 4000);
|
|
815
|
+
notificationRef.close
|
|
816
|
+
.pipe(take(1))
|
|
817
|
+
.subscribe(() => this.removeNotificationInQueue(notification.id));
|
|
818
|
+
return notificationRef;
|
|
819
|
+
}
|
|
820
|
+
removeNotificationInQueue(id) {
|
|
821
|
+
const index = this._notificationQueue.findIndex((notification) => notification.id === id);
|
|
822
|
+
if (index === -1)
|
|
823
|
+
return;
|
|
824
|
+
this._notificationQueue.splice(index, 1);
|
|
825
|
+
}
|
|
826
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GlobalNotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
827
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GlobalNotificationService, providedIn: 'root' }); }
|
|
828
|
+
}
|
|
829
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GlobalNotificationService, decorators: [{
|
|
830
|
+
type: Injectable,
|
|
831
|
+
args: [{
|
|
832
|
+
providedIn: 'root',
|
|
833
|
+
}]
|
|
834
|
+
}] });
|
|
835
|
+
|
|
836
|
+
/*
|
|
837
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
838
|
+
*
|
|
839
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
840
|
+
* you may not use this file except in compliance with the License.
|
|
841
|
+
* You may obtain a copy of the License at
|
|
842
|
+
*
|
|
843
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
844
|
+
*
|
|
845
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
846
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
847
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
848
|
+
* See the License for the specific language governing permissions and
|
|
849
|
+
* limitations under the License.
|
|
850
|
+
*/
|
|
851
|
+
class LocalizationService {
|
|
852
|
+
constructor(http, configService) {
|
|
853
|
+
this.http = http;
|
|
854
|
+
this.configService = configService;
|
|
855
|
+
this.valtimoApiUri = configService?.config?.valtimoApi?.endpointUri;
|
|
856
|
+
}
|
|
857
|
+
getLocalization(languageKey) {
|
|
858
|
+
return this.http
|
|
859
|
+
.get(`${this.valtimoApiUri}v1/localization/${languageKey}`, {
|
|
860
|
+
headers: new HttpHeaders().set('X-Skip-Interceptor', '403'),
|
|
861
|
+
})
|
|
862
|
+
.pipe(catchError(() => of({})));
|
|
863
|
+
}
|
|
864
|
+
getLocalizations() {
|
|
865
|
+
return this.http.get(`${this.valtimoApiUri}v1/localization`);
|
|
866
|
+
}
|
|
867
|
+
getMergedLocalizations() {
|
|
868
|
+
return this.getLocalizations().pipe(map(res => res.reduce((acc, curr) => ({ ...acc, [curr.languageKey]: curr.content }), {})));
|
|
869
|
+
}
|
|
870
|
+
updateLocalization(languageKey, updatedLocalizationContent) {
|
|
871
|
+
return this.http.put(`${this.valtimoApiUri}management/v1/localization/${languageKey}`, updatedLocalizationContent);
|
|
872
|
+
}
|
|
873
|
+
updateLocalizations(updatedLocalizations) {
|
|
874
|
+
return this.http.put(`${this.valtimoApiUri}management/v1/localization`, updatedLocalizations);
|
|
875
|
+
}
|
|
876
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LocalizationService, deps: [{ token: i1.HttpClient }, { token: ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
877
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LocalizationService, providedIn: 'root' }); }
|
|
878
|
+
}
|
|
879
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LocalizationService, decorators: [{
|
|
880
|
+
type: Injectable,
|
|
881
|
+
args: [{
|
|
882
|
+
providedIn: 'root',
|
|
883
|
+
}]
|
|
884
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: ConfigService }] });
|
|
885
|
+
|
|
886
|
+
/*
|
|
887
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
888
|
+
*
|
|
889
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
890
|
+
* you may not use this file except in compliance with the License.
|
|
891
|
+
* You may obtain a copy of the License at
|
|
892
|
+
*
|
|
893
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
894
|
+
*
|
|
895
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
896
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
897
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
898
|
+
* See the License for the specific language governing permissions and
|
|
899
|
+
* limitations under the License.
|
|
900
|
+
*/
|
|
901
|
+
class MenuIncludeService {
|
|
902
|
+
constructor(configService) {
|
|
903
|
+
this.configService = configService;
|
|
904
|
+
this.valtimoConfig = this.configService.config;
|
|
905
|
+
}
|
|
906
|
+
getIncludeFunction(includeFunction) {
|
|
907
|
+
switch (includeFunction) {
|
|
908
|
+
case IncludeFunction.ObjectManagementEnabled:
|
|
909
|
+
return of(!!this.valtimoConfig?.featureToggles?.enableObjectManagement || true);
|
|
910
|
+
default:
|
|
911
|
+
return of(true);
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MenuIncludeService, deps: [{ token: ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
915
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MenuIncludeService, providedIn: 'root' }); }
|
|
916
|
+
}
|
|
917
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MenuIncludeService, decorators: [{
|
|
918
|
+
type: Injectable,
|
|
919
|
+
args: [{
|
|
920
|
+
providedIn: 'root',
|
|
921
|
+
}]
|
|
922
|
+
}], ctorParameters: () => [{ type: ConfigService }] });
|
|
923
|
+
|
|
924
|
+
/*
|
|
925
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
926
|
+
*
|
|
927
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
928
|
+
* you may not use this file except in compliance with the License.
|
|
929
|
+
* You may obtain a copy of the License at
|
|
930
|
+
*
|
|
931
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
932
|
+
*
|
|
933
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
934
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
935
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
936
|
+
* See the License for the specific language governing permissions and
|
|
937
|
+
* limitations under the License.
|
|
938
|
+
*/
|
|
939
|
+
class UserSettingsService {
|
|
940
|
+
constructor(http, configService) {
|
|
941
|
+
this.http = http;
|
|
942
|
+
this.configService = configService;
|
|
943
|
+
this.valtimoApiUri = configService?.config?.valtimoApi?.endpointUri;
|
|
944
|
+
}
|
|
945
|
+
getUserSettings() {
|
|
946
|
+
return this.http.get(`${this.valtimoApiUri}v1/user/settings`);
|
|
947
|
+
}
|
|
948
|
+
saveUserSettings(settings) {
|
|
949
|
+
return this.http.put(`${this.valtimoApiUri}v1/user/settings`, settings);
|
|
950
|
+
}
|
|
951
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserSettingsService, deps: [{ token: i1.HttpClient }, { token: ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
952
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserSettingsService, providedIn: 'root' }); }
|
|
953
|
+
}
|
|
954
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserSettingsService, decorators: [{
|
|
955
|
+
type: Injectable,
|
|
956
|
+
args: [{
|
|
957
|
+
providedIn: 'root',
|
|
958
|
+
}]
|
|
959
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: ConfigService }] });
|
|
960
|
+
|
|
961
|
+
/*
|
|
962
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
963
|
+
*
|
|
964
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
965
|
+
* you may not use this file except in compliance with the License.
|
|
966
|
+
* You may obtain a copy of the License at
|
|
967
|
+
*
|
|
968
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
969
|
+
*
|
|
970
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
971
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
972
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
973
|
+
* See the License for the specific language governing permissions and
|
|
974
|
+
* limitations under the License.
|
|
975
|
+
*/
|
|
976
|
+
const VERSIONS = {
|
|
977
|
+
frontendLibraries: '13.0.0',
|
|
978
|
+
};
|
|
979
|
+
|
|
980
|
+
/*
|
|
981
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
982
|
+
*
|
|
983
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
984
|
+
* you may not use this file except in compliance with the License.
|
|
985
|
+
* You may obtain a copy of the License at
|
|
986
|
+
*
|
|
987
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
988
|
+
*
|
|
989
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
990
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
991
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
992
|
+
* See the License for the specific language governing permissions and
|
|
993
|
+
* limitations under the License.
|
|
994
|
+
*/
|
|
995
|
+
const CASE_MANAGEMENT_TAB_TOKEN = new InjectionToken('Specify a component to display per configured tab translation key.');
|
|
996
|
+
|
|
997
|
+
/*
|
|
998
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
999
|
+
*
|
|
1000
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1001
|
+
* you may not use this file except in compliance with the License.
|
|
1002
|
+
* You may obtain a copy of the License at
|
|
1003
|
+
*
|
|
1004
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1005
|
+
*
|
|
1006
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1007
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1008
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1009
|
+
* See the License for the specific language governing permissions and
|
|
1010
|
+
* limitations under the License.
|
|
1011
|
+
*/
|
|
1012
|
+
const FORM_VIEW_MODEL_TOKEN = new InjectionToken('Specify the form view model component.');
|
|
1013
|
+
|
|
1014
|
+
/*
|
|
1015
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
1016
|
+
*
|
|
1017
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1018
|
+
* you may not use this file except in compliance with the License.
|
|
1019
|
+
* You may obtain a copy of the License at
|
|
1020
|
+
*
|
|
1021
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1022
|
+
*
|
|
1023
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1024
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1025
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1026
|
+
* See the License for the specific language governing permissions and
|
|
1027
|
+
* limitations under the License.
|
|
1028
|
+
*/
|
|
1029
|
+
const InterceptorSkip = 'X-Skip-Interceptor';
|
|
1030
|
+
const InterceptorSkipHeader = new HttpHeaders().set(InterceptorSkip, 'all');
|
|
1031
|
+
|
|
1032
|
+
/*
|
|
1033
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
1034
|
+
*
|
|
1035
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1036
|
+
* you may not use this file except in compliance with the License.
|
|
1037
|
+
* You may obtain a copy of the License at
|
|
1038
|
+
*
|
|
1039
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1040
|
+
*
|
|
1041
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1042
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1043
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1044
|
+
* See the License for the specific language governing permissions and
|
|
1045
|
+
* limitations under the License.
|
|
1046
|
+
*/
|
|
1047
|
+
const CASE_CONFIGURATION_EXTENSIONS_TOKEN = new InjectionToken('Specify components to display on on the case management general page.');
|
|
1048
|
+
|
|
1049
|
+
/*
|
|
1050
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
1051
|
+
*
|
|
1052
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1053
|
+
* you may not use this file except in compliance with the License.
|
|
1054
|
+
* You may obtain a copy of the License at
|
|
1055
|
+
*
|
|
1056
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1057
|
+
*
|
|
1058
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1059
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1060
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1061
|
+
* See the License for the specific language governing permissions and
|
|
1062
|
+
* limitations under the License.
|
|
1063
|
+
*/
|
|
1064
|
+
|
|
1065
|
+
/*
|
|
1066
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
1067
|
+
*
|
|
1068
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1069
|
+
* you may not use this file except in compliance with the License.
|
|
1070
|
+
* You may obtain a copy of the License at
|
|
1071
|
+
*
|
|
1072
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1073
|
+
*
|
|
1074
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1075
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1076
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1077
|
+
* See the License for the specific language governing permissions and
|
|
1078
|
+
* limitations under the License.
|
|
1079
|
+
*/
|
|
1080
|
+
class EnvironmentService extends BaseApiService {
|
|
1081
|
+
constructor(httpClient, configService) {
|
|
1082
|
+
super(httpClient, configService);
|
|
1083
|
+
this.httpClient = httpClient;
|
|
1084
|
+
this.configService = configService;
|
|
1085
|
+
}
|
|
1086
|
+
canUpdateGlobalConfiguration() {
|
|
1087
|
+
return this.httpClient
|
|
1088
|
+
.get(this.getApiUrl('management/v1/case-definition/check'), {
|
|
1089
|
+
headers: new HttpHeaders().set(InterceptorSkip, '404'),
|
|
1090
|
+
})
|
|
1091
|
+
.pipe(map(response => response.canUpdateGlobalConfiguration), catchError(() => of(true)));
|
|
1092
|
+
}
|
|
1093
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EnvironmentService, deps: [{ token: i1.HttpClient }, { token: ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1094
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EnvironmentService, providedIn: 'root' }); }
|
|
1095
|
+
}
|
|
1096
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EnvironmentService, decorators: [{
|
|
1097
|
+
type: Injectable,
|
|
1098
|
+
args: [{
|
|
1099
|
+
providedIn: 'root',
|
|
1100
|
+
}]
|
|
1101
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: ConfigService }] });
|
|
1102
|
+
|
|
1103
|
+
/*
|
|
1104
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
1105
|
+
*
|
|
1106
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1107
|
+
* you may not use this file except in compliance with the License.
|
|
1108
|
+
* You may obtain a copy of the License at
|
|
1109
|
+
*
|
|
1110
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1111
|
+
*
|
|
1112
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1113
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1114
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1115
|
+
* See the License for the specific language governing permissions and
|
|
1116
|
+
* limitations under the License.
|
|
1117
|
+
*/
|
|
1118
|
+
class DraftVersionService extends BaseApiService {
|
|
1119
|
+
constructor(httpClient, configService) {
|
|
1120
|
+
super(httpClient, configService);
|
|
1121
|
+
this.httpClient = httpClient;
|
|
1122
|
+
this.configService = configService;
|
|
1123
|
+
}
|
|
1124
|
+
isDraftVersion(caseDefinitionKey, caseDefinitionVersionTag) {
|
|
1125
|
+
if (!caseDefinitionKey || !caseDefinitionVersionTag) {
|
|
1126
|
+
return of(false);
|
|
1127
|
+
}
|
|
1128
|
+
return this.httpClient
|
|
1129
|
+
.get(this.getApiUrl(`management/v1/case-definition/${caseDefinitionKey}/version/${caseDefinitionVersionTag}`), {
|
|
1130
|
+
headers: new HttpHeaders().set(InterceptorSkip, '403'),
|
|
1131
|
+
})
|
|
1132
|
+
.pipe(map(caseDefinition => !caseDefinition.final));
|
|
1133
|
+
}
|
|
1134
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DraftVersionService, deps: [{ token: i1.HttpClient }, { token: ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1135
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DraftVersionService, providedIn: 'root' }); }
|
|
1136
|
+
}
|
|
1137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DraftVersionService, decorators: [{
|
|
1138
|
+
type: Injectable,
|
|
1139
|
+
args: [{
|
|
1140
|
+
providedIn: 'root',
|
|
1141
|
+
}]
|
|
1142
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: ConfigService }] });
|
|
1143
|
+
|
|
1144
|
+
class EditPermissionsService extends BaseApiService {
|
|
1145
|
+
constructor(httpClient, configService, environmentService, draftVersionService) {
|
|
1146
|
+
super(httpClient, configService);
|
|
1147
|
+
this.httpClient = httpClient;
|
|
1148
|
+
this.configService = configService;
|
|
1149
|
+
this.environmentService = environmentService;
|
|
1150
|
+
this.draftVersionService = draftVersionService;
|
|
1151
|
+
}
|
|
1152
|
+
hasEditPermissions(caseDefinitionKey, caseDefinitionVersionTag) {
|
|
1153
|
+
return combineLatest([
|
|
1154
|
+
this.environmentService.canUpdateGlobalConfiguration(),
|
|
1155
|
+
this.draftVersionService.isDraftVersion(caseDefinitionKey, caseDefinitionVersionTag),
|
|
1156
|
+
]).pipe(map(([canUpdate, isDraftVersion]) => canUpdate && isDraftVersion));
|
|
1157
|
+
}
|
|
1158
|
+
hasPermissionsToEditBasedOnContext(caseDefinitionKey, caseDefinitionVersionTag, context) {
|
|
1159
|
+
if (context === 'case') {
|
|
1160
|
+
return this.hasEditPermissions(caseDefinitionKey, caseDefinitionVersionTag);
|
|
1161
|
+
}
|
|
1162
|
+
else if (context === 'independent') {
|
|
1163
|
+
return this.environmentService.canUpdateGlobalConfiguration();
|
|
1164
|
+
}
|
|
1165
|
+
return of(false);
|
|
1166
|
+
}
|
|
1167
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EditPermissionsService, deps: [{ token: i1.HttpClient }, { token: ConfigService }, { token: EnvironmentService }, { token: DraftVersionService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1168
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EditPermissionsService, providedIn: 'root' }); }
|
|
1169
|
+
}
|
|
1170
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EditPermissionsService, decorators: [{
|
|
1171
|
+
type: Injectable,
|
|
1172
|
+
args: [{
|
|
1173
|
+
providedIn: 'root',
|
|
1174
|
+
}]
|
|
1175
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: ConfigService }, { type: EnvironmentService }, { type: DraftVersionService }] });
|
|
1176
|
+
|
|
1177
|
+
/*
|
|
1178
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
1179
|
+
*
|
|
1180
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1181
|
+
* you may not use this file except in compliance with the License.
|
|
1182
|
+
* You may obtain a copy of the License at
|
|
1183
|
+
*
|
|
1184
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1185
|
+
*
|
|
1186
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1187
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1188
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1189
|
+
* See the License for the specific language governing permissions and
|
|
1190
|
+
* limitations under the License.
|
|
1191
|
+
*/
|
|
1192
|
+
|
|
1193
|
+
/*
|
|
1194
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
1195
|
+
*
|
|
1196
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1197
|
+
* you may not use this file except in compliance with the License.
|
|
1198
|
+
* You may obtain a copy of the License at
|
|
1199
|
+
*
|
|
1200
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1201
|
+
*
|
|
1202
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1203
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1204
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1205
|
+
* See the License for the specific language governing permissions and
|
|
1206
|
+
* limitations under the License.
|
|
1207
|
+
*/
|
|
1208
|
+
class GlobalNotificationComponent {
|
|
1209
|
+
constructor(globalNotificationService, notificationService) {
|
|
1210
|
+
this.globalNotificationService = globalNotificationService;
|
|
1211
|
+
this.notificationService = notificationService;
|
|
1212
|
+
}
|
|
1213
|
+
ngOnInit() {
|
|
1214
|
+
this.globalNotificationService.setNotificationService(this.notificationService);
|
|
1215
|
+
}
|
|
1216
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GlobalNotificationComponent, deps: [{ token: GlobalNotificationService }, { token: i2.NotificationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1217
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: GlobalNotificationComponent, isStandalone: true, selector: "valtimo-global-notification", providers: [NotificationService], ngImport: i0, template: ``, isInline: true, styles: ["::ng-deep .cds--toast-notification{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
1218
|
+
}
|
|
1219
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GlobalNotificationComponent, decorators: [{
|
|
1220
|
+
type: Component,
|
|
1221
|
+
args: [{ selector: 'valtimo-global-notification', template: ``, providers: [NotificationService], standalone: true, imports: [CommonModule], styles: ["::ng-deep .cds--toast-notification{width:100%}\n"] }]
|
|
1222
|
+
}], ctorParameters: () => [{ type: GlobalNotificationService }, { type: i2.NotificationService }] });
|
|
1223
|
+
|
|
1224
|
+
/*
|
|
1225
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
1226
|
+
*
|
|
1227
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1228
|
+
* you may not use this file except in compliance with the License.
|
|
1229
|
+
* You may obtain a copy of the License at
|
|
1230
|
+
*
|
|
1231
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1232
|
+
*
|
|
1233
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1234
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1235
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1236
|
+
* See the License for the specific language governing permissions and
|
|
1237
|
+
* limitations under the License.
|
|
1238
|
+
*/
|
|
1239
|
+
class ExtensionComponent {
|
|
1240
|
+
constructor(configService) {
|
|
1241
|
+
this.configService = configService;
|
|
1242
|
+
this.extensionLoader = null;
|
|
1243
|
+
}
|
|
1244
|
+
ngOnInit() {
|
|
1245
|
+
this.configService
|
|
1246
|
+
.getSupportedExtensionPoints(this.module, this.page, this.section)
|
|
1247
|
+
.forEach(extension => {
|
|
1248
|
+
this.configService.loadExtensionPoint(this.viewContainerRef, extension.extensionPoint);
|
|
1249
|
+
});
|
|
1250
|
+
}
|
|
1251
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ExtensionComponent, deps: [{ token: ConfigService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1252
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ExtensionComponent, isStandalone: false, selector: "valtimo-extension", inputs: { module: "module", page: "page", section: "section" }, viewQueries: [{ propertyName: "viewContainerRef", first: true, predicate: ["injectExtension"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-template #injectExtension></ng-template>\n", styles: [""] }); }
|
|
1253
|
+
}
|
|
1254
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ExtensionComponent, decorators: [{
|
|
1255
|
+
type: Component,
|
|
1256
|
+
args: [{ selector: 'valtimo-extension', standalone: false, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-template #injectExtension></ng-template>\n" }]
|
|
1257
|
+
}], ctorParameters: () => [{ type: ConfigService }], propDecorators: { module: [{
|
|
1258
|
+
type: Input
|
|
1259
|
+
}], page: [{
|
|
1260
|
+
type: Input
|
|
1261
|
+
}], section: [{
|
|
1262
|
+
type: Input
|
|
1263
|
+
}], viewContainerRef: [{
|
|
1264
|
+
type: ViewChild,
|
|
1265
|
+
args: ['injectExtension', { read: ViewContainerRef, static: true }]
|
|
1266
|
+
}] } });
|
|
1267
|
+
|
|
1268
|
+
/*
|
|
1269
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
1270
|
+
*
|
|
1271
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1272
|
+
* you may not use this file except in compliance with the License.
|
|
1273
|
+
* You may obtain a copy of the License at
|
|
1274
|
+
*
|
|
1275
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1276
|
+
*
|
|
1277
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1278
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1279
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1280
|
+
* See the License for the specific language governing permissions and
|
|
1281
|
+
* limitations under the License.
|
|
1282
|
+
*/
|
|
1283
|
+
class ConfigModule {
|
|
1284
|
+
static forRoot(config) {
|
|
1285
|
+
return {
|
|
1286
|
+
ngModule: ConfigModule,
|
|
1287
|
+
providers: [
|
|
1288
|
+
ConfigService,
|
|
1289
|
+
{
|
|
1290
|
+
provide: VALTIMO_CONFIG,
|
|
1291
|
+
useValue: config,
|
|
1292
|
+
},
|
|
1293
|
+
],
|
|
1294
|
+
};
|
|
1295
|
+
}
|
|
1296
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ConfigModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1297
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: ConfigModule, declarations: [ExtensionComponent], exports: [ExtensionComponent] }); }
|
|
1298
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ConfigModule }); }
|
|
1299
|
+
}
|
|
1300
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ConfigModule, decorators: [{
|
|
1301
|
+
type: NgModule,
|
|
1302
|
+
args: [{
|
|
1303
|
+
declarations: [ExtensionComponent],
|
|
1304
|
+
imports: [],
|
|
1305
|
+
exports: [ExtensionComponent],
|
|
1306
|
+
}]
|
|
1307
|
+
}] });
|
|
1308
|
+
|
|
1309
|
+
/*
|
|
1310
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
1311
|
+
*
|
|
1312
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1313
|
+
* you may not use this file except in compliance with the License.
|
|
1314
|
+
* You may obtain a copy of the License at
|
|
1315
|
+
*
|
|
1316
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1317
|
+
*
|
|
1318
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1319
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1320
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1321
|
+
* See the License for the specific language governing permissions and
|
|
1322
|
+
* limitations under the License.
|
|
1323
|
+
*/
|
|
1324
|
+
class MockTranslateService {
|
|
1325
|
+
stream(key) {
|
|
1326
|
+
return of(null);
|
|
1327
|
+
}
|
|
1328
|
+
instant(key) {
|
|
1329
|
+
return '';
|
|
1330
|
+
}
|
|
1331
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MockTranslateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1332
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MockTranslateService, providedIn: 'root' }); }
|
|
1333
|
+
}
|
|
1334
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MockTranslateService, decorators: [{
|
|
1335
|
+
type: Injectable,
|
|
1336
|
+
args: [{
|
|
1337
|
+
providedIn: 'root',
|
|
1338
|
+
}]
|
|
1339
|
+
}] });
|
|
1340
|
+
|
|
1341
|
+
/*
|
|
1342
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
1343
|
+
*
|
|
1344
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1345
|
+
* you may not use this file except in compliance with the License.
|
|
1346
|
+
* You may obtain a copy of the License at
|
|
1347
|
+
*
|
|
1348
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1349
|
+
*
|
|
1350
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1351
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1352
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1353
|
+
* See the License for the specific language governing permissions and
|
|
1354
|
+
* limitations under the License.
|
|
1355
|
+
*/
|
|
1356
|
+
class MockKeycloakService {
|
|
1357
|
+
constructor() {
|
|
1358
|
+
this.MOCK_USER_PROFILE = {
|
|
1359
|
+
id: '',
|
|
1360
|
+
username: '',
|
|
1361
|
+
email: '',
|
|
1362
|
+
firstName: '',
|
|
1363
|
+
lastName: '',
|
|
1364
|
+
enabled: true,
|
|
1365
|
+
emailVerified: true,
|
|
1366
|
+
totp: true,
|
|
1367
|
+
createdTimestamp: 0,
|
|
1368
|
+
};
|
|
1369
|
+
}
|
|
1370
|
+
get keycloakEvents$() {
|
|
1371
|
+
return of({ type: '' });
|
|
1372
|
+
}
|
|
1373
|
+
isLoggedIn() {
|
|
1374
|
+
return of(true);
|
|
1375
|
+
}
|
|
1376
|
+
async loadUserProfile() {
|
|
1377
|
+
return this.MOCK_USER_PROFILE;
|
|
1378
|
+
}
|
|
1379
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MockKeycloakService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1380
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MockKeycloakService, providedIn: 'root' }); }
|
|
1381
|
+
}
|
|
1382
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MockKeycloakService, decorators: [{
|
|
1383
|
+
type: Injectable,
|
|
1384
|
+
args: [{
|
|
1385
|
+
providedIn: 'root',
|
|
1386
|
+
}]
|
|
1387
|
+
}] });
|
|
1388
|
+
|
|
1389
|
+
/*
|
|
1390
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
1391
|
+
*
|
|
1392
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1393
|
+
* you may not use this file except in compliance with the License.
|
|
1394
|
+
* You may obtain a copy of the License at
|
|
1395
|
+
*
|
|
1396
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1397
|
+
*
|
|
1398
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1399
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1400
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1401
|
+
* See the License for the specific language governing permissions and
|
|
1402
|
+
* limitations under the License.
|
|
1403
|
+
*/
|
|
1404
|
+
class MockIconService {
|
|
1405
|
+
registerAll(value) {
|
|
1406
|
+
return;
|
|
1407
|
+
}
|
|
1408
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MockIconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1409
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MockIconService, providedIn: 'root' }); }
|
|
1410
|
+
}
|
|
1411
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MockIconService, decorators: [{
|
|
1412
|
+
type: Injectable,
|
|
1413
|
+
args: [{
|
|
1414
|
+
providedIn: 'root',
|
|
1415
|
+
}]
|
|
1416
|
+
}] });
|
|
1417
|
+
|
|
1418
|
+
/*
|
|
1419
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
1420
|
+
*
|
|
1421
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1422
|
+
* you may not use this file except in compliance with the License.
|
|
1423
|
+
* You may obtain a copy of the License at
|
|
1424
|
+
*
|
|
1425
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1426
|
+
*
|
|
1427
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1428
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1429
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1430
|
+
* See the License for the specific language governing permissions and
|
|
1431
|
+
* limitations under the License.
|
|
1432
|
+
*/
|
|
1433
|
+
|
|
1434
|
+
/*
|
|
1435
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
1436
|
+
*
|
|
1437
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1438
|
+
* you may not use this file except in compliance with the License.
|
|
1439
|
+
* You may obtain a copy of the License at
|
|
1440
|
+
*
|
|
1441
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1442
|
+
*
|
|
1443
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1444
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1445
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1446
|
+
* See the License for the specific language governing permissions and
|
|
1447
|
+
* limitations under the License.
|
|
1448
|
+
*/
|
|
1449
|
+
|
|
1450
|
+
/*
|
|
1451
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
1452
|
+
*
|
|
1453
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1454
|
+
* you may not use this file except in compliance with the License.
|
|
1455
|
+
* You may obtain a copy of the License at
|
|
1456
|
+
*
|
|
1457
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1458
|
+
*
|
|
1459
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1460
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1461
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1462
|
+
* See the License for the specific language governing permissions and
|
|
1463
|
+
* limitations under the License.
|
|
1464
|
+
*/
|
|
1465
|
+
class CustomMultiTranslateHttpLoader {
|
|
1466
|
+
constructor(_handler, _httpClient, _localizationService, _resourcesPrefix) {
|
|
1467
|
+
this._handler = _handler;
|
|
1468
|
+
this._httpClient = _httpClient;
|
|
1469
|
+
this._resourcesPrefix = _resourcesPrefix;
|
|
1470
|
+
this._localizationService = _localizationService;
|
|
1471
|
+
}
|
|
1472
|
+
getTranslation(lang) {
|
|
1473
|
+
const requests = this._resourcesPrefix.map(resource => {
|
|
1474
|
+
let path;
|
|
1475
|
+
if (resource.prefix)
|
|
1476
|
+
path = `${resource.prefix}${lang}${resource.suffix || '.json'}`;
|
|
1477
|
+
else
|
|
1478
|
+
path = `${resource}${lang}.json`;
|
|
1479
|
+
return new HttpClient(this._handler).get(path).pipe(catchError(res => {
|
|
1480
|
+
if (!resource.optional) {
|
|
1481
|
+
console.group();
|
|
1482
|
+
console.error('Something went wrong for the following translation file:', path);
|
|
1483
|
+
console.error(res);
|
|
1484
|
+
console.groupEnd();
|
|
1485
|
+
}
|
|
1486
|
+
return of({});
|
|
1487
|
+
}));
|
|
1488
|
+
});
|
|
1489
|
+
return forkJoin(requests).pipe(switchMap$1(localResourcesResponse => combineLatest([of(localResourcesResponse), this._localizationService.getLocalization(lang)])), map$1(([localResourcesResponse, localizationResponse]) => deepmerge(...[...localResourcesResponse, localizationResponse])));
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
/*
|
|
1494
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
1495
|
+
*
|
|
1496
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1497
|
+
* you may not use this file except in compliance with the License.
|
|
1498
|
+
* You may obtain a copy of the License at
|
|
1499
|
+
*
|
|
1500
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1501
|
+
*
|
|
1502
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1503
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1504
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1505
|
+
* See the License for the specific language governing permissions and
|
|
1506
|
+
* limitations under the License.
|
|
1507
|
+
*/
|
|
1508
|
+
function CustomMultiTranslateHttpLoaderFactory(http, httpClient, configService, localizationService) {
|
|
1509
|
+
const translationResources = configService?.config?.translationResources;
|
|
1510
|
+
return new CustomMultiTranslateHttpLoader(http, httpClient, localizationService, [
|
|
1511
|
+
'./valtimo-translation/core/',
|
|
1512
|
+
...(translationResources &&
|
|
1513
|
+
Array.isArray(translationResources) &&
|
|
1514
|
+
translationResources.length > 0
|
|
1515
|
+
? translationResources
|
|
1516
|
+
: []),
|
|
1517
|
+
]);
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
/*
|
|
1521
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
1522
|
+
*
|
|
1523
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1524
|
+
* you may not use this file except in compliance with the License.
|
|
1525
|
+
* You may obtain a copy of the License at
|
|
1526
|
+
*
|
|
1527
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1528
|
+
*
|
|
1529
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1530
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1531
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1532
|
+
* See the License for the specific language governing permissions and
|
|
1533
|
+
* limitations under the License.
|
|
1534
|
+
*/
|
|
1535
|
+
function MultiTranslateHttpLoaderFactory(http, configService) {
|
|
1536
|
+
const translationResources = configService.config.translationResources;
|
|
1537
|
+
return new MultiTranslateHttpLoader(http, [
|
|
1538
|
+
'./valtimo-translation/core/',
|
|
1539
|
+
...(translationResources &&
|
|
1540
|
+
Array.isArray(translationResources) &&
|
|
1541
|
+
translationResources.length > 0
|
|
1542
|
+
? translationResources
|
|
1543
|
+
: []),
|
|
1544
|
+
]);
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
/*
|
|
1548
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
1549
|
+
*
|
|
1550
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1551
|
+
* you may not use this file except in compliance with the License.
|
|
1552
|
+
* You may obtain a copy of the License at
|
|
1553
|
+
*
|
|
1554
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1555
|
+
*
|
|
1556
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1557
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1558
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1559
|
+
* See the License for the specific language governing permissions and
|
|
1560
|
+
* limitations under the License.
|
|
1561
|
+
*/
|
|
1562
|
+
|
|
1563
|
+
/*
|
|
1564
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
1565
|
+
*
|
|
1566
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1567
|
+
* you may not use this file except in compliance with the License.
|
|
1568
|
+
* You may obtain a copy of the License at
|
|
1569
|
+
*
|
|
1570
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1571
|
+
*
|
|
1572
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1573
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1574
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1575
|
+
* See the License for the specific language governing permissions and
|
|
1576
|
+
* limitations under the License.
|
|
1577
|
+
*/
|
|
1578
|
+
const ZGW_OBJECT_TYPE_COMPONENT_TOKEN = new InjectionToken('Specify a component to display ZGW object types.');
|
|
1579
|
+
|
|
1580
|
+
/*
|
|
1581
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
1582
|
+
*
|
|
1583
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1584
|
+
* you may not use this file except in compliance with the License.
|
|
1585
|
+
* You may obtain a copy of the License at
|
|
1586
|
+
*
|
|
1587
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1588
|
+
*
|
|
1589
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1590
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1591
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1592
|
+
* See the License for the specific language governing permissions and
|
|
1593
|
+
* limitations under the License.
|
|
1594
|
+
*/
|
|
1595
|
+
const ZGW_DOCUMENTEN_API_DOCUMENTS_COMPONENT_TOKEN = new InjectionToken('Specify a component to display on documents tab when Documenten API is set as the upload provider in the environment file.');
|
|
1596
|
+
|
|
1597
|
+
/*
|
|
1598
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
1599
|
+
*
|
|
1600
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1601
|
+
* you may not use this file except in compliance with the License.
|
|
1602
|
+
* You may obtain a copy of the License at
|
|
1603
|
+
*
|
|
1604
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1605
|
+
*
|
|
1606
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1607
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1608
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1609
|
+
* See the License for the specific language governing permissions and
|
|
1610
|
+
* limitations under the License.
|
|
1611
|
+
*/
|
|
1612
|
+
|
|
1613
|
+
/*
|
|
1614
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
1615
|
+
*
|
|
1616
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1617
|
+
* you may not use this file except in compliance with the License.
|
|
1618
|
+
* You may obtain a copy of the License at
|
|
1619
|
+
*
|
|
1620
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1621
|
+
*
|
|
1622
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1623
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1624
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1625
|
+
* See the License for the specific language governing permissions and
|
|
1626
|
+
* limitations under the License.
|
|
1627
|
+
*/
|
|
1628
|
+
|
|
1629
|
+
/*
|
|
1630
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
1631
|
+
*
|
|
1632
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1633
|
+
* you may not use this file except in compliance with the License.
|
|
1634
|
+
* You may obtain a copy of the License at
|
|
1635
|
+
*
|
|
1636
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1637
|
+
*
|
|
1638
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1639
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1640
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1641
|
+
* See the License for the specific language governing permissions and
|
|
1642
|
+
* limitations under the License.
|
|
1643
|
+
*/
|
|
1644
|
+
/*
|
|
1645
|
+
* Public API Surface of shared
|
|
1646
|
+
*/
|
|
1647
|
+
|
|
1648
|
+
/**
|
|
1649
|
+
* Generated bundle index. Do not edit.
|
|
1650
|
+
*/
|
|
1651
|
+
|
|
1652
|
+
export { BaseApiService, BasicExtensionPoint, CASE_CONFIGURATION_EXTENSIONS_TOKEN, CASE_MANAGEMENT_TAB_TOKEN, CaseListTab, ConfigModule, ConfigService, CustomMultiTranslateHttpLoader, CustomMultiTranslateHttpLoaderFactory, DEFAULT_NOTIFICATION_PARAMS, DraftVersionService, EditPermissionsService, EnvironmentService, Extension, ExtensionComponent, ExtensionLoader, FORM_VIEW_MODEL_TOKEN, GlobalNotificationComponent, GlobalNotificationService, HttpLoaderFactory, INITIALIZERS, IncludeFunction, InterceptorSkip, InterceptorSkipHeader, Language, LocalizationService, MenuIncludeService, MockIconService, MockKeycloakService, MockTranslateService, MultiTranslateHttpLoaderFactory, ROLE_ADMIN, ROLE_DEVELOPER, ROLE_USER, RouterUtils, TagColor, TaskListTab, UploadProvider, UrlUtils, UserSettingsService, VALTIMO_CONFIG, VERSIONS, ValtimoUserIdentity, ZGW_DOCUMENTEN_API_DOCUMENTS_COMPONENT_TOKEN, ZGW_OBJECT_TYPE_COMPONENT_TOKEN, getCaseManagementRouteParams, getCaseManagementRouteParamsAndContext, getContextObservable, getNotificationObject };
|
|
1653
|
+
//# sourceMappingURL=valtimo-shared.mjs.map
|