@valtimo/admin-settings 13.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/valtimo-admin-settings.mjs +692 -0
- package/fesm2022/valtimo-admin-settings.mjs.map +1 -0
- package/index.d.ts +6 -0
- package/lib/admin-settings-routing.d.ts +9 -0
- package/lib/admin-settings-routing.d.ts.map +1 -0
- package/lib/admin-settings.module.d.ts +9 -0
- package/lib/admin-settings.module.d.ts.map +1 -0
- package/lib/components/admin-settings/admin-settings.component.d.ts +16 -0
- package/lib/components/admin-settings/admin-settings.component.d.ts.map +1 -0
- package/lib/components/admin-settings-appearance/admin-settings-appearance.component.d.ts +6 -0
- package/lib/components/admin-settings-appearance/admin-settings-appearance.component.d.ts.map +1 -0
- package/lib/components/admin-settings-color/admin-settings-color.component.d.ts +40 -0
- package/lib/components/admin-settings-color/admin-settings-color.component.d.ts.map +1 -0
- package/lib/components/admin-settings-feature-toggles/admin-settings-feature-toggles.component.d.ts +18 -0
- package/lib/components/admin-settings-feature-toggles/admin-settings-feature-toggles.component.d.ts.map +1 -0
- package/lib/components/admin-settings-logo/admin-settings-logo.component.d.ts +38 -0
- package/lib/components/admin-settings-logo/admin-settings-logo.component.d.ts.map +1 -0
- package/lib/constants/accent-colors.constants.d.ts +4 -0
- package/lib/constants/accent-colors.constants.d.ts.map +1 -0
- package/lib/constants/admin-settings.constants.d.ts +6 -0
- package/lib/constants/admin-settings.constants.d.ts.map +1 -0
- package/lib/constants/feature-toggle.constants.d.ts +4 -0
- package/lib/constants/feature-toggle.constants.d.ts.map +1 -0
- package/lib/constants/index.d.ts +4 -0
- package/lib/constants/index.d.ts.map +1 -0
- package/lib/models/accent-colors.model.d.ts +11 -0
- package/lib/models/accent-colors.model.d.ts.map +1 -0
- package/lib/models/feature-toggle.model.d.ts +15 -0
- package/lib/models/feature-toggle.model.d.ts.map +1 -0
- package/lib/models/index.d.ts +3 -0
- package/lib/models/index.d.ts.map +1 -0
- package/lib/services/admin-settings-management-api.service.d.ts +21 -0
- package/lib/services/admin-settings-management-api.service.d.ts.map +1 -0
- package/lib/services/index.d.ts +2 -0
- package/lib/services/index.d.ts.map +1 -0
- package/package.json +24 -0
- package/public-api.d.ts +5 -0
- package/public-api.d.ts.map +1 -0
- package/valtimo-admin-settings.d.ts.map +1 -0
|
@@ -0,0 +1,692 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, Input, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1$1 from '@angular/router';
|
|
4
|
+
import { RouterModule } from '@angular/router';
|
|
5
|
+
import * as i5 from '@angular/common';
|
|
6
|
+
import { CommonModule } from '@angular/common';
|
|
7
|
+
import { AuthGuardService } from '@valtimo/security';
|
|
8
|
+
import * as i2 from '@valtimo/shared';
|
|
9
|
+
import { BaseApiService, ROLE_ADMIN } from '@valtimo/shared';
|
|
10
|
+
import * as i5$1 from '@ngx-translate/core';
|
|
11
|
+
import { TranslatePipe, TranslateModule } from '@ngx-translate/core';
|
|
12
|
+
import * as i4 from 'carbon-components-angular';
|
|
13
|
+
import { LayerModule, ButtonModule, FileUploaderModule, LoadingModule, IconModule, LinkModule, NotificationModule, ToggleModule, TabsModule } from 'carbon-components-angular';
|
|
14
|
+
import { BehaviorSubject, switchMap, map, tap, Subscription } from 'rxjs';
|
|
15
|
+
import * as i2$1 from '@valtimo/components';
|
|
16
|
+
import { ConfirmationModalModule, RenderInBodyComponent, ColorPickerComponent, MuuriDirectiveModule } from '@valtimo/components';
|
|
17
|
+
import * as i3 from '@angular/forms';
|
|
18
|
+
import { Validators, ReactiveFormsModule } from '@angular/forms';
|
|
19
|
+
import { Upload16, TrashCan16, Reset16 } from '@carbon/icons';
|
|
20
|
+
import * as i1 from '@angular/common/http';
|
|
21
|
+
|
|
22
|
+
/*
|
|
23
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
24
|
+
*
|
|
25
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
26
|
+
* you may not use this file except in compliance with the License.
|
|
27
|
+
* You may obtain a copy of the License at
|
|
28
|
+
*
|
|
29
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
30
|
+
*
|
|
31
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
32
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
33
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
34
|
+
* See the License for the specific language governing permissions and
|
|
35
|
+
* limitations under the License.
|
|
36
|
+
*/
|
|
37
|
+
const ACCENT_COLOR_DEFINITIONS = [
|
|
38
|
+
{
|
|
39
|
+
cssVar: '--vcds-color-100',
|
|
40
|
+
labelTranslationKey: 'adminSettings.appearance.colors.color100',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
cssVar: '--vcds-color-90',
|
|
44
|
+
labelTranslationKey: 'adminSettings.appearance.colors.color90',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
cssVar: '--vcds-color-80',
|
|
48
|
+
labelTranslationKey: 'adminSettings.appearance.colors.color80',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
cssVar: '--vcds-color-70',
|
|
52
|
+
labelTranslationKey: 'adminSettings.appearance.colors.color70',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
cssVar: '--vcds-color-60',
|
|
56
|
+
labelTranslationKey: 'adminSettings.appearance.colors.color60',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
cssVar: '--vcds-color-50',
|
|
60
|
+
labelTranslationKey: 'adminSettings.appearance.colors.color50',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
cssVar: '--vcds-color-40',
|
|
64
|
+
labelTranslationKey: 'adminSettings.appearance.colors.color40',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
cssVar: '--vcds-color-30',
|
|
68
|
+
labelTranslationKey: 'adminSettings.appearance.colors.color30',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
cssVar: '--vcds-color-20',
|
|
72
|
+
labelTranslationKey: 'adminSettings.appearance.colors.color20',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
cssVar: '--vcds-color-10',
|
|
76
|
+
labelTranslationKey: 'adminSettings.appearance.colors.color10',
|
|
77
|
+
},
|
|
78
|
+
];
|
|
79
|
+
|
|
80
|
+
/*
|
|
81
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
82
|
+
*
|
|
83
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
84
|
+
* you may not use this file except in compliance with the License.
|
|
85
|
+
* You may obtain a copy of the License at
|
|
86
|
+
*
|
|
87
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
88
|
+
*
|
|
89
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
90
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
91
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
92
|
+
* See the License for the specific language governing permissions and
|
|
93
|
+
* limitations under the License.
|
|
94
|
+
*/
|
|
95
|
+
const ADMIN_SETTINGS_TABS = {
|
|
96
|
+
APPEARANCE: 'appearance',
|
|
97
|
+
FEATURE_TOGGLES: 'feature-toggles',
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
/*
|
|
101
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
102
|
+
*
|
|
103
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
104
|
+
* you may not use this file except in compliance with the License.
|
|
105
|
+
* You may obtain a copy of the License at
|
|
106
|
+
*
|
|
107
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
108
|
+
*
|
|
109
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
110
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
111
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
112
|
+
* See the License for the specific language governing permissions and
|
|
113
|
+
* limitations under the License.
|
|
114
|
+
*/
|
|
115
|
+
const FEATURE_TOGGLE_DEFINITIONS = [
|
|
116
|
+
{ key: 'allowUserThemeSwitching' },
|
|
117
|
+
{ key: 'enableCompactModeToggle' },
|
|
118
|
+
{ key: 'compactModeOnByDefault' },
|
|
119
|
+
{ key: 'enableUserNameInTopBarToggle' },
|
|
120
|
+
{ key: 'showUserNameInTopBar' },
|
|
121
|
+
{ key: 'showPlantATreeButton' },
|
|
122
|
+
{ key: 'largeLogoMargin' },
|
|
123
|
+
{ key: 'applicationTitleAsSuffix' },
|
|
124
|
+
{ key: 'experimentalDmnEditing' },
|
|
125
|
+
{ key: 'disableCaseCount' },
|
|
126
|
+
{ key: 'enableObjectManagement' },
|
|
127
|
+
{ key: 'sortFilesByDate' },
|
|
128
|
+
{ key: 'returnToLastUrlAfterTokenExpiration' },
|
|
129
|
+
{ key: 'enableTabManagement' },
|
|
130
|
+
{ key: 'hideValtimoVersionsForNonAdmins' },
|
|
131
|
+
{ key: 'useStartEventNameAsStartFormTitle' },
|
|
132
|
+
{ key: 'enableFormViewModel' },
|
|
133
|
+
{ key: 'enableIntermediateSave' },
|
|
134
|
+
{ key: 'enableFormFlowBreadcrumbs' },
|
|
135
|
+
{ key: 'enablePbacDocumentenApiDocuments' },
|
|
136
|
+
{ key: 'enableSuppressDocumentError' },
|
|
137
|
+
{ key: 'enableIkoType' },
|
|
138
|
+
];
|
|
139
|
+
|
|
140
|
+
/*
|
|
141
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
142
|
+
*
|
|
143
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
144
|
+
* you may not use this file except in compliance with the License.
|
|
145
|
+
* You may obtain a copy of the License at
|
|
146
|
+
*
|
|
147
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
148
|
+
*
|
|
149
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
150
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
151
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
152
|
+
* See the License for the specific language governing permissions and
|
|
153
|
+
* limitations under the License.
|
|
154
|
+
*/
|
|
155
|
+
class AdminSettingsManagementApiService extends BaseApiService {
|
|
156
|
+
constructor(httpClient, configService) {
|
|
157
|
+
super(httpClient, configService);
|
|
158
|
+
this.httpClient = httpClient;
|
|
159
|
+
this.configService = configService;
|
|
160
|
+
}
|
|
161
|
+
getLogos() {
|
|
162
|
+
return this.httpClient.get(this.getApiUrl('/v1/admin-settings/logos'));
|
|
163
|
+
}
|
|
164
|
+
uploadLogo(logoType, dto) {
|
|
165
|
+
return this.httpClient.post(this.getApiUrl(`/management/v1/admin-settings/logo/${logoType}`), dto);
|
|
166
|
+
}
|
|
167
|
+
deleteLogo(logoType) {
|
|
168
|
+
return this.httpClient.delete(this.getApiUrl(`/management/v1/admin-settings/logo/${logoType}`));
|
|
169
|
+
}
|
|
170
|
+
getFeatureToggleOverrides() {
|
|
171
|
+
return this.httpClient.get(this.getApiUrl('/v1/admin-settings/feature-toggles'));
|
|
172
|
+
}
|
|
173
|
+
updateFeatureToggle(dto) {
|
|
174
|
+
return this.httpClient.put(this.getApiUrl('/management/v1/admin-settings/feature-toggles'), dto);
|
|
175
|
+
}
|
|
176
|
+
removeFeatureToggle(key) {
|
|
177
|
+
return this.httpClient.delete(this.getApiUrl(`/management/v1/admin-settings/feature-toggles/${key}`));
|
|
178
|
+
}
|
|
179
|
+
getAccentColors() {
|
|
180
|
+
return this.httpClient.get(this.getApiUrl('/v1/admin-settings/accent-colors'));
|
|
181
|
+
}
|
|
182
|
+
updateAccentColors(dto) {
|
|
183
|
+
return this.httpClient.put(this.getApiUrl('/management/v1/admin-settings/accent-colors'), dto);
|
|
184
|
+
}
|
|
185
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AdminSettingsManagementApiService, deps: [{ token: i1.HttpClient }, { token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
186
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AdminSettingsManagementApiService, providedIn: 'root' }); }
|
|
187
|
+
}
|
|
188
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AdminSettingsManagementApiService, decorators: [{
|
|
189
|
+
type: Injectable,
|
|
190
|
+
args: [{
|
|
191
|
+
providedIn: 'root',
|
|
192
|
+
}]
|
|
193
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.ConfigService }] });
|
|
194
|
+
|
|
195
|
+
/*
|
|
196
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
197
|
+
*
|
|
198
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
199
|
+
* you may not use this file except in compliance with the License.
|
|
200
|
+
* You may obtain a copy of the License at
|
|
201
|
+
*
|
|
202
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
203
|
+
*
|
|
204
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
205
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
206
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
207
|
+
* See the License for the specific language governing permissions and
|
|
208
|
+
* limitations under the License.
|
|
209
|
+
*/
|
|
210
|
+
class AdminSettingsLogoComponent {
|
|
211
|
+
get previewTheme() {
|
|
212
|
+
return this.logoType === 'LOGO_DARK_MODE' ? 'g90' : 'g10';
|
|
213
|
+
}
|
|
214
|
+
get file() {
|
|
215
|
+
return this.formGroup.get('file');
|
|
216
|
+
}
|
|
217
|
+
constructor(_adminSettingsManagementApiService, _adminSettingsService, _formBuilder, _iconService) {
|
|
218
|
+
this._adminSettingsManagementApiService = _adminSettingsManagementApiService;
|
|
219
|
+
this._adminSettingsService = _adminSettingsService;
|
|
220
|
+
this._formBuilder = _formBuilder;
|
|
221
|
+
this._iconService = _iconService;
|
|
222
|
+
this.ACCEPTED_FILES = ['png', 'svg'];
|
|
223
|
+
this.formGroup = this._formBuilder.group({
|
|
224
|
+
file: this._formBuilder.control(new Set(), [Validators.required]),
|
|
225
|
+
});
|
|
226
|
+
this.loading$ = new BehaviorSubject(true);
|
|
227
|
+
this._refresh$ = new BehaviorSubject(null);
|
|
228
|
+
this.logo$ = this._refresh$.pipe(switchMap(() => this._adminSettingsManagementApiService.getLogos()), map(logos => (this.logoType === 'LOGO' ? logos.logo : logos.logoDarkMode) ?? null), tap(() => this.loading$.next(false)));
|
|
229
|
+
this.showDeleteConfirmationModal$ = new BehaviorSubject(false);
|
|
230
|
+
this._subscriptions = new Subscription();
|
|
231
|
+
this._iconService.registerAll([Upload16, TrashCan16]);
|
|
232
|
+
}
|
|
233
|
+
ngOnInit() {
|
|
234
|
+
this._subscriptions.add(this.logo$.subscribe());
|
|
235
|
+
}
|
|
236
|
+
ngOnDestroy() {
|
|
237
|
+
this._subscriptions.unsubscribe();
|
|
238
|
+
}
|
|
239
|
+
async onSave() {
|
|
240
|
+
const file = Array.from(this.file.value)[0]?.file;
|
|
241
|
+
const imageBase64 = await this._fileToBase64(file);
|
|
242
|
+
this.formGroup.disable();
|
|
243
|
+
this._adminSettingsManagementApiService.uploadLogo(this.logoType, { imageBase64 }).subscribe({
|
|
244
|
+
next: () => {
|
|
245
|
+
this.loading$.next(true);
|
|
246
|
+
this._refresh$.next(null);
|
|
247
|
+
this._adminSettingsService.refreshLogos();
|
|
248
|
+
this.formGroup.enable();
|
|
249
|
+
},
|
|
250
|
+
error: () => {
|
|
251
|
+
this.formGroup.enable();
|
|
252
|
+
},
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
getImageSrc(imageBase64) {
|
|
256
|
+
const mimeType = this._isSvg(imageBase64) ? 'image/svg+xml' : 'image/png';
|
|
257
|
+
return `data:${mimeType};base64,${imageBase64}`;
|
|
258
|
+
}
|
|
259
|
+
onDeleteButtonClick() {
|
|
260
|
+
this.showDeleteConfirmationModal$.next(true);
|
|
261
|
+
}
|
|
262
|
+
onDelete() {
|
|
263
|
+
this._adminSettingsManagementApiService.deleteLogo(this.logoType).subscribe(() => {
|
|
264
|
+
this.loading$.next(true);
|
|
265
|
+
this._refresh$.next(null);
|
|
266
|
+
this._adminSettingsService.refreshLogos();
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
_isSvg(base64) {
|
|
270
|
+
try {
|
|
271
|
+
const decoded = atob(base64.substring(0, 64));
|
|
272
|
+
const trimmed = decoded.trimStart();
|
|
273
|
+
return trimmed.startsWith('<?xml') || trimmed.startsWith('<svg');
|
|
274
|
+
}
|
|
275
|
+
catch {
|
|
276
|
+
return false;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
async _fileToBase64(file) {
|
|
280
|
+
return new Promise((resolve, reject) => {
|
|
281
|
+
const reader = new FileReader();
|
|
282
|
+
reader.readAsDataURL(file);
|
|
283
|
+
reader.onload = () => {
|
|
284
|
+
const result = reader.result;
|
|
285
|
+
const pureBase64 = result.split(',')[1];
|
|
286
|
+
resolve(pureBase64);
|
|
287
|
+
};
|
|
288
|
+
reader.onerror = error => reject(error);
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AdminSettingsLogoComponent, deps: [{ token: AdminSettingsManagementApiService }, { token: i2$1.AdminSettingsService }, { token: i3.FormBuilder }, { token: i4.IconService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
292
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: AdminSettingsLogoComponent, isStandalone: true, selector: "valtimo-admin-settings-logo", inputs: { logoType: "logoType", titleTranslationKey: "titleTranslationKey" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2026 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<form\n *ngIf=\"{\n logo: logo$ | async,\n loading: loading$ | async,\n } as obs\"\n class=\"admin-settings-logo\"\n [formGroup]=\"formGroup\"\n [cdsLayer]=\"1\"\n>\n <h4 class=\"admin-settings-logo__title\">\n {{ titleTranslationKey | translate }}\n </h4>\n\n @if (obs.loading) {\n <div class=\"loading-container\"><cds-loading></cds-loading></div>\n } @else if (obs.logo) {\n <div class=\"admin-settings-logo__preview\" [attr.data-carbon-theme]=\"previewTheme\">\n <img\n class=\"admin-settings-logo__image\"\n [src]=\"getImageSrc(obs.logo.imageBase64)\"\n />\n </div>\n\n <div class=\"admin-settings-logo__buttons\">\n <button cdsButton=\"danger\" (click)=\"onDeleteButtonClick()\" [disabled]=\"formGroup.disabled\">\n {{ 'interface.delete' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n </div>\n } @else {\n <cds-file-uploader\n [accept]=\"ACCEPTED_FILES\"\n [multiple]=\"false\"\n buttonType=\"primary\"\n [title]=\"'adminSettings.appearance.logo.fileUploaderTitle' | translate\"\n [description]=\"'adminSettings.appearance.logo.fileUploaderDescription' | translate\"\n [buttonText]=\"'adminSettings.appearance.logo.fileUploaderButton' | translate\"\n formControlName=\"file\"\n >\n </cds-file-uploader>\n\n <div class=\"admin-settings-logo__buttons\">\n <button\n cdsButton=\"primary\"\n [disabled]=\"formGroup.disabled || formGroup.invalid || formGroup.pristine\"\n (click)=\"onSave()\"\n >\n {{ 'interface.upload' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"upload\" size=\"16\"></svg>\n </button>\n </div>\n }\n</form>\n\n<valtimo-render-in-body>\n <valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"adminSettings.appearance.logo.deleteConfirmationModalText\"\n [showModalSubject$]=\"showDeleteConfirmationModal$\"\n titleTranslationKey=\"interface.delete\"\n (confirmEvent)=\"onDelete()\"\n ></valtimo-confirmation-modal>\n</valtimo-render-in-body>\n", styles: [".admin-settings-logo{display:flex;flex-direction:column;gap:16px;padding:16px;background-color:var(--cds-layer-01)}.admin-settings-logo__title{font-size:16px;line-height:24px;font-weight:600;margin-bottom:8px}.admin-settings-logo__preview{display:flex;justify-content:center;align-items:center;background-color:var(--cds-background);padding:24px;min-height:180px}.admin-settings-logo__image{max-width:100%;max-height:300px;object-fit:contain}.admin-settings-logo__buttons{display:flex;justify-content:flex-end;width:100%;margin-top:12px}.admin-settings-logo__buttons button[cdsButton]{min-width:100px}.loading-container{display:flex;width:100%;justify-content:center;align-items:center;min-height:180px}\n/*!\n * Copyright 2015-2026 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: LayerModule }, { kind: "directive", type: i4.LayerDirective, selector: "[cdsLayer], [ibmLayer]", inputs: ["ibmLayer", "cdsLayer"], exportAs: ["layer"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: FileUploaderModule }, { kind: "component", type: i4.FileUploader, selector: "cds-file-uploader, ibm-file-uploader", inputs: ["buttonText", "buttonType", "title", "description", "accept", "multiple", "skeleton", "size", "fileItemSize", "drop", "dropText", "fileUploaderId", "files", "disabled"], outputs: ["filesChange"] }, { kind: "ngmodule", type: LoadingModule }, { kind: "component", type: i4.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i4.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "ngmodule", type: ConfirmationModalModule }, { kind: "component", type: i2$1.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "confirmButtonType", "showOptionalButton", "optionalButtonText", "optionalButtonTextTranslationKey", "optionalButtonType", "cancelButtonText", "cancelButtonTextTranslationKey", "cancelButtonType", "showModalSubject$", "outputOnConfirm", "outputOnOptional", "spacerAfterCancelButton"], outputs: ["confirmEvent", "optionalEvent", "cancelEvent"] }, { kind: "component", type: RenderInBodyComponent, selector: "valtimo-render-in-body" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
293
|
+
}
|
|
294
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AdminSettingsLogoComponent, decorators: [{
|
|
295
|
+
type: Component,
|
|
296
|
+
args: [{ standalone: true, selector: 'valtimo-admin-settings-logo', imports: [
|
|
297
|
+
CommonModule,
|
|
298
|
+
TranslatePipe,
|
|
299
|
+
ReactiveFormsModule,
|
|
300
|
+
LayerModule,
|
|
301
|
+
ButtonModule,
|
|
302
|
+
FileUploaderModule,
|
|
303
|
+
LoadingModule,
|
|
304
|
+
IconModule,
|
|
305
|
+
ConfirmationModalModule,
|
|
306
|
+
RenderInBodyComponent,
|
|
307
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2026 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<form\n *ngIf=\"{\n logo: logo$ | async,\n loading: loading$ | async,\n } as obs\"\n class=\"admin-settings-logo\"\n [formGroup]=\"formGroup\"\n [cdsLayer]=\"1\"\n>\n <h4 class=\"admin-settings-logo__title\">\n {{ titleTranslationKey | translate }}\n </h4>\n\n @if (obs.loading) {\n <div class=\"loading-container\"><cds-loading></cds-loading></div>\n } @else if (obs.logo) {\n <div class=\"admin-settings-logo__preview\" [attr.data-carbon-theme]=\"previewTheme\">\n <img\n class=\"admin-settings-logo__image\"\n [src]=\"getImageSrc(obs.logo.imageBase64)\"\n />\n </div>\n\n <div class=\"admin-settings-logo__buttons\">\n <button cdsButton=\"danger\" (click)=\"onDeleteButtonClick()\" [disabled]=\"formGroup.disabled\">\n {{ 'interface.delete' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n </div>\n } @else {\n <cds-file-uploader\n [accept]=\"ACCEPTED_FILES\"\n [multiple]=\"false\"\n buttonType=\"primary\"\n [title]=\"'adminSettings.appearance.logo.fileUploaderTitle' | translate\"\n [description]=\"'adminSettings.appearance.logo.fileUploaderDescription' | translate\"\n [buttonText]=\"'adminSettings.appearance.logo.fileUploaderButton' | translate\"\n formControlName=\"file\"\n >\n </cds-file-uploader>\n\n <div class=\"admin-settings-logo__buttons\">\n <button\n cdsButton=\"primary\"\n [disabled]=\"formGroup.disabled || formGroup.invalid || formGroup.pristine\"\n (click)=\"onSave()\"\n >\n {{ 'interface.upload' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"upload\" size=\"16\"></svg>\n </button>\n </div>\n }\n</form>\n\n<valtimo-render-in-body>\n <valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"interface.delete\"\n confirmButtonType=\"danger\"\n contentTranslationKey=\"adminSettings.appearance.logo.deleteConfirmationModalText\"\n [showModalSubject$]=\"showDeleteConfirmationModal$\"\n titleTranslationKey=\"interface.delete\"\n (confirmEvent)=\"onDelete()\"\n ></valtimo-confirmation-modal>\n</valtimo-render-in-body>\n", styles: [".admin-settings-logo{display:flex;flex-direction:column;gap:16px;padding:16px;background-color:var(--cds-layer-01)}.admin-settings-logo__title{font-size:16px;line-height:24px;font-weight:600;margin-bottom:8px}.admin-settings-logo__preview{display:flex;justify-content:center;align-items:center;background-color:var(--cds-background);padding:24px;min-height:180px}.admin-settings-logo__image{max-width:100%;max-height:300px;object-fit:contain}.admin-settings-logo__buttons{display:flex;justify-content:flex-end;width:100%;margin-top:12px}.admin-settings-logo__buttons button[cdsButton]{min-width:100px}.loading-container{display:flex;width:100%;justify-content:center;align-items:center;min-height:180px}\n/*!\n * Copyright 2015-2026 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"] }]
|
|
308
|
+
}], ctorParameters: () => [{ type: AdminSettingsManagementApiService }, { type: i2$1.AdminSettingsService }, { type: i3.FormBuilder }, { type: i4.IconService }], propDecorators: { logoType: [{
|
|
309
|
+
type: Input
|
|
310
|
+
}], titleTranslationKey: [{
|
|
311
|
+
type: Input
|
|
312
|
+
}] } });
|
|
313
|
+
|
|
314
|
+
/*
|
|
315
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
316
|
+
*
|
|
317
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
318
|
+
* you may not use this file except in compliance with the License.
|
|
319
|
+
* You may obtain a copy of the License at
|
|
320
|
+
*
|
|
321
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
322
|
+
*
|
|
323
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
324
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
325
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
326
|
+
* See the License for the specific language governing permissions and
|
|
327
|
+
* limitations under the License.
|
|
328
|
+
*/
|
|
329
|
+
class AdminSettingsColorComponent {
|
|
330
|
+
constructor(_adminSettingsManagementApiService, _adminSettingsService, _formBuilder, _iconService, _translateService) {
|
|
331
|
+
this._adminSettingsManagementApiService = _adminSettingsManagementApiService;
|
|
332
|
+
this._adminSettingsService = _adminSettingsService;
|
|
333
|
+
this._formBuilder = _formBuilder;
|
|
334
|
+
this._iconService = _iconService;
|
|
335
|
+
this._translateService = _translateService;
|
|
336
|
+
this.ACCENT_COLOR_DEFINITIONS = ACCENT_COLOR_DEFINITIONS;
|
|
337
|
+
this.DOCS_URL = 'https://docs.valtimo.nl/customizing-valtimo/front-end-customization/customizing-carbon-theme';
|
|
338
|
+
this.loading$ = new BehaviorSubject(true);
|
|
339
|
+
this.saving$ = new BehaviorSubject(false);
|
|
340
|
+
this._refresh$ = new BehaviorSubject(null);
|
|
341
|
+
this._cssDefaults = {};
|
|
342
|
+
this.colors$ = this._refresh$.pipe(switchMap(() => this._adminSettingsManagementApiService.getAccentColors()), tap(dto => {
|
|
343
|
+
this._patchForm(dto.colors);
|
|
344
|
+
this.loading$.next(false);
|
|
345
|
+
}));
|
|
346
|
+
this.pickrI18n$ = this._translateService.stream('adminSettings.appearance.colors.pickr').pipe(map(pickr => ({
|
|
347
|
+
save: pickr?.save || 'OK',
|
|
348
|
+
cancel: pickr?.cancel || 'Cancel',
|
|
349
|
+
clear: pickr?.clear || 'Clear',
|
|
350
|
+
})));
|
|
351
|
+
this._subscriptions = new Subscription();
|
|
352
|
+
this._iconService.register(Reset16);
|
|
353
|
+
this._snapshotCssDefaults();
|
|
354
|
+
this.formGroup = this._buildForm();
|
|
355
|
+
}
|
|
356
|
+
ngOnInit() {
|
|
357
|
+
this._subscriptions.add(this.colors$.subscribe());
|
|
358
|
+
}
|
|
359
|
+
ngOnDestroy() {
|
|
360
|
+
this._subscriptions.unsubscribe();
|
|
361
|
+
}
|
|
362
|
+
onSave() {
|
|
363
|
+
const colors = {};
|
|
364
|
+
for (const def of ACCENT_COLOR_DEFINITIONS) {
|
|
365
|
+
const raw = this.formGroup.get(def.cssVar)?.value || this._getCssDefault(def.cssVar);
|
|
366
|
+
colors[def.cssVar] = this._normalizeHex(raw);
|
|
367
|
+
}
|
|
368
|
+
this.saving$.next(true);
|
|
369
|
+
this.formGroup.disable();
|
|
370
|
+
this._adminSettingsManagementApiService.updateAccentColors({ colors }).subscribe({
|
|
371
|
+
next: () => {
|
|
372
|
+
this._adminSettingsService.applyAccentColors(colors);
|
|
373
|
+
this.saving$.next(false);
|
|
374
|
+
this.formGroup.enable();
|
|
375
|
+
this.formGroup.markAsPristine();
|
|
376
|
+
this._adminSettingsService.refreshAccentColors();
|
|
377
|
+
},
|
|
378
|
+
error: () => {
|
|
379
|
+
this.saving$.next(false);
|
|
380
|
+
this.formGroup.enable();
|
|
381
|
+
},
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
isDefaultColor(def) {
|
|
385
|
+
const value = this.formGroup.get(def.cssVar)?.value || '';
|
|
386
|
+
return value.toLowerCase() === this._getCssDefault(def.cssVar).toLowerCase();
|
|
387
|
+
}
|
|
388
|
+
onReset(def) {
|
|
389
|
+
this.formGroup.get(def.cssVar)?.setValue(this._getCssDefault(def.cssVar));
|
|
390
|
+
this.formGroup.markAsDirty();
|
|
391
|
+
}
|
|
392
|
+
_buildForm() {
|
|
393
|
+
const controls = {};
|
|
394
|
+
for (const def of ACCENT_COLOR_DEFINITIONS) {
|
|
395
|
+
controls[def.cssVar] = this._formBuilder.control(this._getCssDefault(def.cssVar));
|
|
396
|
+
}
|
|
397
|
+
return this._formBuilder.group(controls);
|
|
398
|
+
}
|
|
399
|
+
_patchForm(colors) {
|
|
400
|
+
const patch = {};
|
|
401
|
+
for (const def of ACCENT_COLOR_DEFINITIONS) {
|
|
402
|
+
patch[def.cssVar] = colors[def.cssVar] || this._getCssDefault(def.cssVar);
|
|
403
|
+
}
|
|
404
|
+
this.formGroup.patchValue(patch, { emitEvent: false });
|
|
405
|
+
this.formGroup.markAsPristine();
|
|
406
|
+
}
|
|
407
|
+
_snapshotCssDefaults() {
|
|
408
|
+
for (const def of ACCENT_COLOR_DEFINITIONS) {
|
|
409
|
+
this._cssDefaults[def.cssVar] =
|
|
410
|
+
this._adminSettingsService.getDefaultAccentColor(def.cssVar);
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
_getCssDefault(cssVar) {
|
|
414
|
+
return this._cssDefaults[cssVar] || '';
|
|
415
|
+
}
|
|
416
|
+
_normalizeHex(value) {
|
|
417
|
+
if (!value)
|
|
418
|
+
return value;
|
|
419
|
+
const upper = value.toUpperCase();
|
|
420
|
+
if (upper.length === 9 && upper.endsWith('FF')) {
|
|
421
|
+
return value.substring(0, 7);
|
|
422
|
+
}
|
|
423
|
+
return value;
|
|
424
|
+
}
|
|
425
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AdminSettingsColorComponent, deps: [{ token: AdminSettingsManagementApiService }, { token: i2$1.AdminSettingsService }, { token: i3.FormBuilder }, { token: i4.IconService }, { token: i5$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
426
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: AdminSettingsColorComponent, isStandalone: true, selector: "valtimo-admin-settings-color", ngImport: i0, template: "<!--\n ~ Copyright 2015-2026 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<form\n *ngIf=\"{\n colors: colors$ | async,\n loading: loading$ | async,\n saving: saving$ | async,\n pickrI18n: pickrI18n$ | async,\n } as obs\"\n class=\"admin-settings-color\"\n [formGroup]=\"formGroup\"\n [cdsLayer]=\"1\"\n>\n <h4 class=\"admin-settings-color__title\">\n {{ 'adminSettings.appearance.colors.title' | translate }}\n </h4>\n\n <ng-template #infoNotification>\n <p>\n {{ 'adminSettings.appearance.colors.infoMessage' | translate }}\n\n <a [href]=\"DOCS_URL\" target=\"_blank\" rel=\"noopener noreferrer\" cdsLink>\n {{ 'adminSettings.appearance.colors.infoLinkText' | translate }}\n </a>\n </p>\n </ng-template>\n\n <cds-inline-notification\n [notificationObj]=\"{\n type: 'info',\n title: '',\n template: infoNotification,\n showClose: false,\n lowContrast: true,\n }\"\n ></cds-inline-notification>\n\n @if (obs.loading) {\n <div class=\"loading-container\"><cds-loading></cds-loading></div>\n } @else {\n <div class=\"admin-settings-color__grid\">\n @for (def of ACCENT_COLOR_DEFINITIONS; track def.cssVar) {\n <div class=\"admin-settings-color__field\">\n <valtimo-color-picker\n [formControlName]=\"def.cssVar\"\n [labelTranslationKey]=\"def.labelTranslationKey\"\n [config]=\"{opacity: false, lockOpacity: true}\"\n [i18n]=\"obs.pickrI18n\"\n (clearEvent)=\"onReset(def)\"\n ></valtimo-color-picker>\n\n <button\n cdsButton=\"ghost\"\n [disabled]=\"isDefaultColor(def)\"\n [iconOnly]=\"true\"\n size=\"sm\"\n (click)=\"onReset(def)\"\n class=\"admin-settings-color__reset\"\n >\n <svg cdsIcon=\"reset\" size=\"16\"></svg>\n </button>\n </div>\n }\n </div>\n\n <div class=\"admin-settings-color__buttons\">\n <button\n cdsButton=\"primary\"\n [disabled]=\"formGroup.disabled || formGroup.pristine || obs.saving\"\n (click)=\"onSave()\"\n >\n {{ 'interface.save' | translate }}\n </button>\n </div>\n }\n</form>\n", styles: [".admin-settings-color{display:flex;flex-direction:column;gap:16px;padding:16px;background-color:var(--cds-layer-01)}.admin-settings-color__title{font-size:16px;line-height:24px;font-weight:600;margin-bottom:8px}.admin-settings-color__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(64px,1fr));gap:16px}.admin-settings-color__field{display:flex;flex-direction:row;align-items:flex-end;gap:4px}.admin-settings-color__field valtimo-color-picker{flex:1;min-width:0}.admin-settings-color__reset{flex-shrink:0}.admin-settings-color__buttons{display:flex;justify-content:flex-end;width:100%;margin-top:12px}.admin-settings-color__buttons button[cdsButton]{min-width:100px}.loading-container{display:flex;width:100%;justify-content:center;align-items:center;min-height:180px}\n/*!\n * Copyright 2015-2026 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: LayerModule }, { kind: "directive", type: i4.LayerDirective, selector: "[cdsLayer], [ibmLayer]", inputs: ["ibmLayer", "cdsLayer"], exportAs: ["layer"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i4.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "ngmodule", type: LoadingModule }, { kind: "component", type: i4.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "ngmodule", type: LinkModule }, { kind: "directive", type: i4.Link, selector: "[cdsLink], [ibmLink]", inputs: ["inline", "disabled"] }, { kind: "ngmodule", type: NotificationModule }, { kind: "component", type: i4.Notification, selector: "cds-notification, cds-inline-notification, ibm-notification, ibm-inline-notification", inputs: ["notificationObj"] }, { kind: "component", type: ColorPickerComponent, selector: "valtimo-color-picker", inputs: ["labelTranslationKey", "config", "i18n"], outputs: ["colorChangeEvent", "clearEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
427
|
+
}
|
|
428
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AdminSettingsColorComponent, decorators: [{
|
|
429
|
+
type: Component,
|
|
430
|
+
args: [{ standalone: true, selector: 'valtimo-admin-settings-color', imports: [
|
|
431
|
+
CommonModule,
|
|
432
|
+
TranslateModule,
|
|
433
|
+
ReactiveFormsModule,
|
|
434
|
+
LayerModule,
|
|
435
|
+
ButtonModule,
|
|
436
|
+
IconModule,
|
|
437
|
+
LoadingModule,
|
|
438
|
+
LinkModule,
|
|
439
|
+
NotificationModule,
|
|
440
|
+
ColorPickerComponent,
|
|
441
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2026 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<form\n *ngIf=\"{\n colors: colors$ | async,\n loading: loading$ | async,\n saving: saving$ | async,\n pickrI18n: pickrI18n$ | async,\n } as obs\"\n class=\"admin-settings-color\"\n [formGroup]=\"formGroup\"\n [cdsLayer]=\"1\"\n>\n <h4 class=\"admin-settings-color__title\">\n {{ 'adminSettings.appearance.colors.title' | translate }}\n </h4>\n\n <ng-template #infoNotification>\n <p>\n {{ 'adminSettings.appearance.colors.infoMessage' | translate }}\n\n <a [href]=\"DOCS_URL\" target=\"_blank\" rel=\"noopener noreferrer\" cdsLink>\n {{ 'adminSettings.appearance.colors.infoLinkText' | translate }}\n </a>\n </p>\n </ng-template>\n\n <cds-inline-notification\n [notificationObj]=\"{\n type: 'info',\n title: '',\n template: infoNotification,\n showClose: false,\n lowContrast: true,\n }\"\n ></cds-inline-notification>\n\n @if (obs.loading) {\n <div class=\"loading-container\"><cds-loading></cds-loading></div>\n } @else {\n <div class=\"admin-settings-color__grid\">\n @for (def of ACCENT_COLOR_DEFINITIONS; track def.cssVar) {\n <div class=\"admin-settings-color__field\">\n <valtimo-color-picker\n [formControlName]=\"def.cssVar\"\n [labelTranslationKey]=\"def.labelTranslationKey\"\n [config]=\"{opacity: false, lockOpacity: true}\"\n [i18n]=\"obs.pickrI18n\"\n (clearEvent)=\"onReset(def)\"\n ></valtimo-color-picker>\n\n <button\n cdsButton=\"ghost\"\n [disabled]=\"isDefaultColor(def)\"\n [iconOnly]=\"true\"\n size=\"sm\"\n (click)=\"onReset(def)\"\n class=\"admin-settings-color__reset\"\n >\n <svg cdsIcon=\"reset\" size=\"16\"></svg>\n </button>\n </div>\n }\n </div>\n\n <div class=\"admin-settings-color__buttons\">\n <button\n cdsButton=\"primary\"\n [disabled]=\"formGroup.disabled || formGroup.pristine || obs.saving\"\n (click)=\"onSave()\"\n >\n {{ 'interface.save' | translate }}\n </button>\n </div>\n }\n</form>\n", styles: [".admin-settings-color{display:flex;flex-direction:column;gap:16px;padding:16px;background-color:var(--cds-layer-01)}.admin-settings-color__title{font-size:16px;line-height:24px;font-weight:600;margin-bottom:8px}.admin-settings-color__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(64px,1fr));gap:16px}.admin-settings-color__field{display:flex;flex-direction:row;align-items:flex-end;gap:4px}.admin-settings-color__field valtimo-color-picker{flex:1;min-width:0}.admin-settings-color__reset{flex-shrink:0}.admin-settings-color__buttons{display:flex;justify-content:flex-end;width:100%;margin-top:12px}.admin-settings-color__buttons button[cdsButton]{min-width:100px}.loading-container{display:flex;width:100%;justify-content:center;align-items:center;min-height:180px}\n/*!\n * Copyright 2015-2026 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"] }]
|
|
442
|
+
}], ctorParameters: () => [{ type: AdminSettingsManagementApiService }, { type: i2$1.AdminSettingsService }, { type: i3.FormBuilder }, { type: i4.IconService }, { type: i5$1.TranslateService }] });
|
|
443
|
+
|
|
444
|
+
/*
|
|
445
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
446
|
+
*
|
|
447
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
448
|
+
* you may not use this file except in compliance with the License.
|
|
449
|
+
* You may obtain a copy of the License at
|
|
450
|
+
*
|
|
451
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
452
|
+
*
|
|
453
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
454
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
455
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
456
|
+
* See the License for the specific language governing permissions and
|
|
457
|
+
* limitations under the License.
|
|
458
|
+
*/
|
|
459
|
+
class AdminSettingsAppearanceComponent {
|
|
460
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AdminSettingsAppearanceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
461
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: AdminSettingsAppearanceComponent, isStandalone: true, selector: "valtimo-admin-settings-appearance", ngImport: i0, template: "<!--\n ~ Copyright 2015-2026 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<div class=\"admin-settings-appearance\">\n <div muuri [columnMinWidth]=\"450\">\n <valtimo-muuri-item>\n <valtimo-admin-settings-logo\n logoType=\"LOGO\"\n titleTranslationKey=\"adminSettings.appearance.logo.title\"\n ></valtimo-admin-settings-logo>\n </valtimo-muuri-item>\n\n <valtimo-muuri-item>\n <valtimo-admin-settings-logo\n logoType=\"LOGO_DARK_MODE\"\n titleTranslationKey=\"adminSettings.appearance.logoDarkMode.title\"\n ></valtimo-admin-settings-logo>\n </valtimo-muuri-item>\n\n <valtimo-muuri-item>\n <valtimo-admin-settings-color></valtimo-admin-settings-color>\n </valtimo-muuri-item>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MuuriDirectiveModule }, { kind: "directive", type: i2$1.MuuriDirective, selector: "[muuri]", inputs: ["columnMinWidth"] }, { kind: "component", type: i2$1.MuuriItemComponent, selector: "valtimo-muuri-item" }, { kind: "component", type: AdminSettingsLogoComponent, selector: "valtimo-admin-settings-logo", inputs: ["logoType", "titleTranslationKey"] }, { kind: "component", type: AdminSettingsColorComponent, selector: "valtimo-admin-settings-color" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
462
|
+
}
|
|
463
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AdminSettingsAppearanceComponent, decorators: [{
|
|
464
|
+
type: Component,
|
|
465
|
+
args: [{ standalone: true, selector: 'valtimo-admin-settings-appearance', imports: [CommonModule, MuuriDirectiveModule, AdminSettingsLogoComponent, AdminSettingsColorComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2026 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<div class=\"admin-settings-appearance\">\n <div muuri [columnMinWidth]=\"450\">\n <valtimo-muuri-item>\n <valtimo-admin-settings-logo\n logoType=\"LOGO\"\n titleTranslationKey=\"adminSettings.appearance.logo.title\"\n ></valtimo-admin-settings-logo>\n </valtimo-muuri-item>\n\n <valtimo-muuri-item>\n <valtimo-admin-settings-logo\n logoType=\"LOGO_DARK_MODE\"\n titleTranslationKey=\"adminSettings.appearance.logoDarkMode.title\"\n ></valtimo-admin-settings-logo>\n </valtimo-muuri-item>\n\n <valtimo-muuri-item>\n <valtimo-admin-settings-color></valtimo-admin-settings-color>\n </valtimo-muuri-item>\n </div>\n</div>\n" }]
|
|
466
|
+
}] });
|
|
467
|
+
|
|
468
|
+
/*
|
|
469
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
470
|
+
*
|
|
471
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
472
|
+
* you may not use this file except in compliance with the License.
|
|
473
|
+
* You may obtain a copy of the License at
|
|
474
|
+
*
|
|
475
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
476
|
+
*
|
|
477
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
478
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
479
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
480
|
+
* See the License for the specific language governing permissions and
|
|
481
|
+
* limitations under the License.
|
|
482
|
+
*/
|
|
483
|
+
class AdminSettingsFeatureTogglesComponent {
|
|
484
|
+
constructor(_adminSettingsManagementApiService, _adminSettingsService, _configService) {
|
|
485
|
+
this._adminSettingsManagementApiService = _adminSettingsManagementApiService;
|
|
486
|
+
this._adminSettingsService = _adminSettingsService;
|
|
487
|
+
this._configService = _configService;
|
|
488
|
+
this.TOGGLE_DEFINITIONS = FEATURE_TOGGLE_DEFINITIONS;
|
|
489
|
+
this.featureToggles$ = this._configService.featureToggles$;
|
|
490
|
+
}
|
|
491
|
+
getEffectiveValue(definition, toggles) {
|
|
492
|
+
return !!toggles[definition.key];
|
|
493
|
+
}
|
|
494
|
+
onToggleChange(definition, newValue) {
|
|
495
|
+
this._adminSettingsManagementApiService
|
|
496
|
+
.updateFeatureToggle({ key: definition.key, enabled: newValue })
|
|
497
|
+
.subscribe(() => {
|
|
498
|
+
this._adminSettingsService.refreshFeatureToggles();
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AdminSettingsFeatureTogglesComponent, deps: [{ token: AdminSettingsManagementApiService }, { token: i2$1.AdminSettingsService }, { token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
502
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: AdminSettingsFeatureTogglesComponent, isStandalone: true, selector: "valtimo-admin-settings-feature-toggles", ngImport: i0, template: "<!--\n ~ Copyright 2015-2026 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n@if (featureToggles$ | async; as toggles) {\n <div class=\"feature-toggles\">\n <div class=\"feature-toggles__list\">\n @for (definition of TOGGLE_DEFINITIONS; track definition.key) {\n <div class=\"feature-toggles__item\">\n <div class=\"feature-toggles__info\">\n <span class=\"feature-toggles__title\">\n {{ 'adminSettings.featureToggles.toggles.' + definition.key + '.title' | translate }}\n </span>\n\n <span class=\"feature-toggles__description\">\n {{ 'adminSettings.featureToggles.toggles.' + definition.key + '.description' | translate }}\n </span>\n </div>\n\n <div class=\"feature-toggles__control\">\n <cds-toggle\n [checked]=\"getEffectiveValue(definition, toggles)\"\n [onText]=\"'interface.on' | translate\"\n [offText]=\"'interface.off' | translate\"\n [size]=\"'sm'\"\n (checkedChange)=\"onToggleChange(definition, $event)\"\n ></cds-toggle>\n </div>\n </div>\n }\n </div>\n </div>\n}\n", styles: [".feature-toggles{width:100%}.feature-toggles__list{display:flex;flex-direction:column}.feature-toggles__item{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:16px 0;border-bottom:1px solid var(--cds-border-subtle)}.feature-toggles__item:last-child{border-bottom:none}.feature-toggles__info{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}.feature-toggles__title{font-size:14px;font-weight:600;color:var(--cds-text-primary)}.feature-toggles__description{font-size:12px;color:var(--cds-text-secondary)}.feature-toggles__control{display:flex;align-items:center;gap:12px;flex-shrink:0}.loading-container{display:flex;justify-content:center;padding:48px 0}\n/*!\n * Copyright 2015-2026 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ToggleModule }, { kind: "component", type: i4.Toggle, selector: "cds-toggle, ibm-toggle", inputs: ["offText", "onText", "label", "size", "hideLabel", "ariaLabel", "skeleton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
503
|
+
}
|
|
504
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AdminSettingsFeatureTogglesComponent, decorators: [{
|
|
505
|
+
type: Component,
|
|
506
|
+
args: [{ standalone: true, selector: 'valtimo-admin-settings-feature-toggles', imports: [
|
|
507
|
+
CommonModule,
|
|
508
|
+
TranslatePipe,
|
|
509
|
+
ToggleModule,
|
|
510
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2026 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n@if (featureToggles$ | async; as toggles) {\n <div class=\"feature-toggles\">\n <div class=\"feature-toggles__list\">\n @for (definition of TOGGLE_DEFINITIONS; track definition.key) {\n <div class=\"feature-toggles__item\">\n <div class=\"feature-toggles__info\">\n <span class=\"feature-toggles__title\">\n {{ 'adminSettings.featureToggles.toggles.' + definition.key + '.title' | translate }}\n </span>\n\n <span class=\"feature-toggles__description\">\n {{ 'adminSettings.featureToggles.toggles.' + definition.key + '.description' | translate }}\n </span>\n </div>\n\n <div class=\"feature-toggles__control\">\n <cds-toggle\n [checked]=\"getEffectiveValue(definition, toggles)\"\n [onText]=\"'interface.on' | translate\"\n [offText]=\"'interface.off' | translate\"\n [size]=\"'sm'\"\n (checkedChange)=\"onToggleChange(definition, $event)\"\n ></cds-toggle>\n </div>\n </div>\n }\n </div>\n </div>\n}\n", styles: [".feature-toggles{width:100%}.feature-toggles__list{display:flex;flex-direction:column}.feature-toggles__item{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:16px 0;border-bottom:1px solid var(--cds-border-subtle)}.feature-toggles__item:last-child{border-bottom:none}.feature-toggles__info{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}.feature-toggles__title{font-size:14px;font-weight:600;color:var(--cds-text-primary)}.feature-toggles__description{font-size:12px;color:var(--cds-text-secondary)}.feature-toggles__control{display:flex;align-items:center;gap:12px;flex-shrink:0}.loading-container{display:flex;justify-content:center;padding:48px 0}\n/*!\n * Copyright 2015-2026 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"] }]
|
|
511
|
+
}], ctorParameters: () => [{ type: AdminSettingsManagementApiService }, { type: i2$1.AdminSettingsService }, { type: i2.ConfigService }] });
|
|
512
|
+
|
|
513
|
+
/*
|
|
514
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
515
|
+
*
|
|
516
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
517
|
+
* you may not use this file except in compliance with the License.
|
|
518
|
+
* You may obtain a copy of the License at
|
|
519
|
+
*
|
|
520
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
521
|
+
*
|
|
522
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
523
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
524
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
525
|
+
* See the License for the specific language governing permissions and
|
|
526
|
+
* limitations under the License.
|
|
527
|
+
*/
|
|
528
|
+
class AdminSettingsComponent {
|
|
529
|
+
constructor(_route, _router) {
|
|
530
|
+
this._route = _route;
|
|
531
|
+
this._router = _router;
|
|
532
|
+
this.ADMIN_SETTINGS_TABS = ADMIN_SETTINGS_TABS;
|
|
533
|
+
this.activeTabKey$ = this._route.params.pipe(map(params => params['tabKey'] || ADMIN_SETTINGS_TABS.APPEARANCE));
|
|
534
|
+
}
|
|
535
|
+
switchTab(tabKey) {
|
|
536
|
+
this._router.navigate(['..', tabKey], { relativeTo: this._route });
|
|
537
|
+
}
|
|
538
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AdminSettingsComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
539
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: AdminSettingsComponent, isStandalone: true, selector: "valtimo-admin-settings", ngImport: i0, template: "<!--\n ~ Copyright 2015-2026 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n@if (activeTabKey$ | async; as activeTabKey) {\n <cds-tabs type=\"line\">\n @if ({active: activeTabKey === ADMIN_SETTINGS_TABS.APPEARANCE}; as obs) {\n <cds-tab\n [active]=\"obs.active\"\n [heading]=\"'adminSettings.tabs.appearance' | translate\"\n (selected)=\"switchTab(ADMIN_SETTINGS_TABS.APPEARANCE)\"\n >\n @if (obs.active) {\n <valtimo-admin-settings-appearance></valtimo-admin-settings-appearance>\n }\n </cds-tab>\n }\n\n @if ({active: activeTabKey === ADMIN_SETTINGS_TABS.FEATURE_TOGGLES}; as obs) {\n <cds-tab\n [active]=\"obs.active\"\n [heading]=\"'adminSettings.tabs.featureToggles' | translate\"\n (selected)=\"switchTab(ADMIN_SETTINGS_TABS.FEATURE_TOGGLES)\"\n >\n @if (obs.active) {\n <valtimo-admin-settings-feature-toggles></valtimo-admin-settings-feature-toggles>\n }\n </cds-tab>\n }\n </cds-tabs>\n}\n", styles: [":host ::ng-deep .cds--tab-content{padding-left:0!important;padding-right:0!important;padding-bottom:0!important;outline:none!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "ngmodule", type: TabsModule }, { kind: "component", type: i4.Tabs, selector: "cds-tabs, ibm-tabs", inputs: ["position", "cacheActive", "followFocus", "isNavigation", "ariaLabel", "ariaLabelledby", "type", "theme", "skeleton"] }, { kind: "component", type: i4.Tab, selector: "cds-tab, ibm-tab", inputs: ["heading", "title", "context", "active", "disabled", "tabIndex", "id", "cacheActive", "tabContent", "templateContext"], outputs: ["selected"] }, { kind: "component", type: AdminSettingsAppearanceComponent, selector: "valtimo-admin-settings-appearance" }, { kind: "component", type: AdminSettingsFeatureTogglesComponent, selector: "valtimo-admin-settings-feature-toggles" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
540
|
+
}
|
|
541
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AdminSettingsComponent, decorators: [{
|
|
542
|
+
type: Component,
|
|
543
|
+
args: [{ standalone: true, selector: 'valtimo-admin-settings', imports: [
|
|
544
|
+
CommonModule,
|
|
545
|
+
TranslatePipe,
|
|
546
|
+
TabsModule,
|
|
547
|
+
AdminSettingsAppearanceComponent,
|
|
548
|
+
AdminSettingsFeatureTogglesComponent,
|
|
549
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2026 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n@if (activeTabKey$ | async; as activeTabKey) {\n <cds-tabs type=\"line\">\n @if ({active: activeTabKey === ADMIN_SETTINGS_TABS.APPEARANCE}; as obs) {\n <cds-tab\n [active]=\"obs.active\"\n [heading]=\"'adminSettings.tabs.appearance' | translate\"\n (selected)=\"switchTab(ADMIN_SETTINGS_TABS.APPEARANCE)\"\n >\n @if (obs.active) {\n <valtimo-admin-settings-appearance></valtimo-admin-settings-appearance>\n }\n </cds-tab>\n }\n\n @if ({active: activeTabKey === ADMIN_SETTINGS_TABS.FEATURE_TOGGLES}; as obs) {\n <cds-tab\n [active]=\"obs.active\"\n [heading]=\"'adminSettings.tabs.featureToggles' | translate\"\n (selected)=\"switchTab(ADMIN_SETTINGS_TABS.FEATURE_TOGGLES)\"\n >\n @if (obs.active) {\n <valtimo-admin-settings-feature-toggles></valtimo-admin-settings-feature-toggles>\n }\n </cds-tab>\n }\n </cds-tabs>\n}\n", styles: [":host ::ng-deep .cds--tab-content{padding-left:0!important;padding-right:0!important;padding-bottom:0!important;outline:none!important}\n"] }]
|
|
550
|
+
}], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }] });
|
|
551
|
+
|
|
552
|
+
/*
|
|
553
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
554
|
+
*
|
|
555
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
556
|
+
* you may not use this file except in compliance with the License.
|
|
557
|
+
* You may obtain a copy of the License at
|
|
558
|
+
*
|
|
559
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
560
|
+
*
|
|
561
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
562
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
563
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
564
|
+
* See the License for the specific language governing permissions and
|
|
565
|
+
* limitations under the License.
|
|
566
|
+
*/
|
|
567
|
+
const routes = [
|
|
568
|
+
{
|
|
569
|
+
path: 'admin-settings',
|
|
570
|
+
redirectTo: `admin-settings/${ADMIN_SETTINGS_TABS.APPEARANCE}`,
|
|
571
|
+
pathMatch: 'full',
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
path: 'admin-settings/:tabKey',
|
|
575
|
+
component: AdminSettingsComponent,
|
|
576
|
+
canActivate: [AuthGuardService],
|
|
577
|
+
data: { title: 'adminSettings.title', roles: [ROLE_ADMIN] },
|
|
578
|
+
},
|
|
579
|
+
];
|
|
580
|
+
class AdminSettingsRouting {
|
|
581
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AdminSettingsRouting, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
582
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: AdminSettingsRouting, imports: [CommonModule, i1$1.RouterModule], exports: [RouterModule] }); }
|
|
583
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AdminSettingsRouting, imports: [CommonModule, RouterModule.forChild(routes), RouterModule] }); }
|
|
584
|
+
}
|
|
585
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AdminSettingsRouting, decorators: [{
|
|
586
|
+
type: NgModule,
|
|
587
|
+
args: [{
|
|
588
|
+
declarations: [],
|
|
589
|
+
imports: [CommonModule, RouterModule.forChild(routes)],
|
|
590
|
+
exports: [RouterModule],
|
|
591
|
+
}]
|
|
592
|
+
}] });
|
|
593
|
+
|
|
594
|
+
/*
|
|
595
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
596
|
+
*
|
|
597
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
598
|
+
* you may not use this file except in compliance with the License.
|
|
599
|
+
* You may obtain a copy of the License at
|
|
600
|
+
*
|
|
601
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
602
|
+
*
|
|
603
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
604
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
605
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
606
|
+
* See the License for the specific language governing permissions and
|
|
607
|
+
* limitations under the License.
|
|
608
|
+
*/
|
|
609
|
+
class AdminSettingsModule {
|
|
610
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AdminSettingsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
611
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: AdminSettingsModule, imports: [AdminSettingsRouting, AdminSettingsComponent] }); }
|
|
612
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AdminSettingsModule, imports: [AdminSettingsRouting, AdminSettingsComponent] }); }
|
|
613
|
+
}
|
|
614
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AdminSettingsModule, decorators: [{
|
|
615
|
+
type: NgModule,
|
|
616
|
+
args: [{
|
|
617
|
+
declarations: [],
|
|
618
|
+
imports: [AdminSettingsRouting, AdminSettingsComponent],
|
|
619
|
+
providers: [],
|
|
620
|
+
}]
|
|
621
|
+
}] });
|
|
622
|
+
|
|
623
|
+
/*
|
|
624
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
625
|
+
*
|
|
626
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
627
|
+
* you may not use this file except in compliance with the License.
|
|
628
|
+
* You may obtain a copy of the License at
|
|
629
|
+
*
|
|
630
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
631
|
+
*
|
|
632
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
633
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
634
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
635
|
+
* See the License for the specific language governing permissions and
|
|
636
|
+
* limitations under the License.
|
|
637
|
+
*/
|
|
638
|
+
|
|
639
|
+
/*
|
|
640
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
641
|
+
*
|
|
642
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
643
|
+
* you may not use this file except in compliance with the License.
|
|
644
|
+
* You may obtain a copy of the License at
|
|
645
|
+
*
|
|
646
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
647
|
+
*
|
|
648
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
649
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
650
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
651
|
+
* See the License for the specific language governing permissions and
|
|
652
|
+
* limitations under the License.
|
|
653
|
+
*/
|
|
654
|
+
|
|
655
|
+
/*
|
|
656
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
657
|
+
*
|
|
658
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
659
|
+
* you may not use this file except in compliance with the License.
|
|
660
|
+
* You may obtain a copy of the License at
|
|
661
|
+
*
|
|
662
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
663
|
+
*
|
|
664
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
665
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
666
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
667
|
+
* See the License for the specific language governing permissions and
|
|
668
|
+
* limitations under the License.
|
|
669
|
+
*/
|
|
670
|
+
|
|
671
|
+
/*
|
|
672
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
673
|
+
*
|
|
674
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
675
|
+
* you may not use this file except in compliance with the License.
|
|
676
|
+
* You may obtain a copy of the License at
|
|
677
|
+
*
|
|
678
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
679
|
+
*
|
|
680
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
681
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
682
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
683
|
+
* See the License for the specific language governing permissions and
|
|
684
|
+
* limitations under the License.
|
|
685
|
+
*/
|
|
686
|
+
|
|
687
|
+
/**
|
|
688
|
+
* Generated bundle index. Do not edit.
|
|
689
|
+
*/
|
|
690
|
+
|
|
691
|
+
export { ACCENT_COLOR_DEFINITIONS, ADMIN_SETTINGS_TABS, AdminSettingsManagementApiService, AdminSettingsModule, FEATURE_TOGGLE_DEFINITIONS };
|
|
692
|
+
//# sourceMappingURL=valtimo-admin-settings.mjs.map
|