@valtimo/admin-settings 13.37.0 → 13.39.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 +360 -27
- package/fesm2022/valtimo-admin-settings.mjs.map +1 -1
- package/lib/components/admin-settings-feature-toggles/admin-settings-feature-toggles.component.d.ts +2 -0
- package/lib/components/admin-settings-opensearch/admin-settings-opensearch.component.d.ts +41 -0
- package/lib/components/start-reindex-modal/start-reindex-modal.component.d.ts +21 -0
- package/lib/models/index.d.ts +2 -0
- package/lib/models/reindex.model.d.ts +37 -0
- package/lib/models/search-engine.model.d.ts +7 -0
- package/lib/services/admin-settings-management-api.service.d.ts +8 -2
- package/package.json +1 -1
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Input, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
2
|
+
import { Injectable, Input, ChangeDetectionStrategy, Component, EventEmitter, Output, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1$1 from '@angular/router';
|
|
4
4
|
import { RouterModule } from '@angular/router';
|
|
5
|
-
import * as
|
|
6
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i6 from '@angular/common';
|
|
6
|
+
import { CommonModule, DatePipe } from '@angular/common';
|
|
7
7
|
import { AuthGuardService } from '@valtimo/security';
|
|
8
8
|
import * as i2 from '@valtimo/shared';
|
|
9
9
|
import { BaseApiService, ROLE_ADMIN } from '@valtimo/shared';
|
|
10
|
-
import * as
|
|
10
|
+
import * as i3$1 from '@ngx-translate/core';
|
|
11
11
|
import { TranslatePipe, TranslateModule } from '@ngx-translate/core';
|
|
12
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';
|
|
13
|
+
import { LayerModule, ButtonModule, FileUploaderModule, LoadingModule, IconModule, LinkModule, NotificationModule, ToggleModule, TabsModule, ModalModule, CheckboxModule, DatePickerInputModule, DatePickerModule, DropdownModule, ProgressBarModule, TagModule } from 'carbon-components-angular';
|
|
14
|
+
import { catchError, of, BehaviorSubject, switchMap, map, tap, Subscription, Subject, merge, finalize, shareReplay, startWith, interval, takeWhile, takeUntil, take } from 'rxjs';
|
|
15
15
|
import * as i2$1 from '@valtimo/components';
|
|
16
|
-
import { ConfirmationModalModule, RenderInBodyComponent, ColorPickerComponent, MuuriDirectiveModule } from '@valtimo/components';
|
|
16
|
+
import { ConfirmationModalModule, RenderInBodyComponent, ColorPickerComponent, MuuriDirectiveModule, ValtimoCdsModalDirective, TooltipIconModule, ViewType, CarbonListModule } from '@valtimo/components';
|
|
17
17
|
import * as i3 from '@angular/forms';
|
|
18
18
|
import { Validators, ReactiveFormsModule } from '@angular/forms';
|
|
19
|
-
import { Upload16, TrashCan16, Reset16 } from '@carbon/icons';
|
|
19
|
+
import { Upload16, TrashCan16, Reset16, Launch16 } from '@carbon/icons';
|
|
20
20
|
import * as i1 from '@angular/common/http';
|
|
21
|
+
import { HttpParams } from '@angular/common/http';
|
|
22
|
+
import * as i2$2 from '@valtimo/document';
|
|
21
23
|
|
|
22
24
|
/*
|
|
23
25
|
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
@@ -98,19 +100,21 @@ const ADMIN_SETTINGS_TABS = {
|
|
|
98
100
|
};
|
|
99
101
|
|
|
100
102
|
/*
|
|
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
103
|
*
|
|
107
|
-
*
|
|
104
|
+
* * Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
105
|
+
* *
|
|
106
|
+
* * Licensed under EUPL, Version 1.2 (the "License");
|
|
107
|
+
* * you may not use this file except in compliance with the License.
|
|
108
|
+
* * You may obtain a copy of the License at
|
|
109
|
+
* *
|
|
110
|
+
* * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
111
|
+
* *
|
|
112
|
+
* * Unless required by applicable law or agreed to in writing, software
|
|
113
|
+
* * distributed under the License is distributed on an "AS IS" basis,
|
|
114
|
+
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
115
|
+
* * See the License for the specific language governing permissions and
|
|
116
|
+
* * limitations under the License.
|
|
108
117
|
*
|
|
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
118
|
*/
|
|
115
119
|
const FEATURE_TOGGLE_DEFINITIONS = [
|
|
116
120
|
{ key: 'allowUserThemeSwitching' },
|
|
@@ -135,6 +139,7 @@ const FEATURE_TOGGLE_DEFINITIONS = [
|
|
|
135
139
|
{ key: 'enableSuppressDocumentError' },
|
|
136
140
|
{ key: 'enableIkoType' },
|
|
137
141
|
{ key: 'menuCollapsedByDefault' },
|
|
142
|
+
{ key: 'enableGenericCaseList' },
|
|
138
143
|
];
|
|
139
144
|
|
|
140
145
|
/*
|
|
@@ -182,6 +187,29 @@ class AdminSettingsManagementApiService extends BaseApiService {
|
|
|
182
187
|
updateAccentColors(dto) {
|
|
183
188
|
return this.httpClient.put(this.getApiUrl('/management/v1/admin-settings/accent-colors'), dto);
|
|
184
189
|
}
|
|
190
|
+
getSearchEngine() {
|
|
191
|
+
return this.httpClient
|
|
192
|
+
.get(this.getApiUrl('/management/v1/search-engine'))
|
|
193
|
+
.pipe(catchError(() => of(null)));
|
|
194
|
+
}
|
|
195
|
+
updateSearchEngine(useOpenSearch) {
|
|
196
|
+
return this.httpClient.put(this.getApiUrl('/management/v1/search-engine'), { active: useOpenSearch ? 'OPENSEARCH' : 'POSTGRES' });
|
|
197
|
+
}
|
|
198
|
+
startReindex(request = {}) {
|
|
199
|
+
return this.httpClient.post(this.getApiUrl('/management/v1/document-opensearch/reindex'), request);
|
|
200
|
+
}
|
|
201
|
+
getReindexStatus() {
|
|
202
|
+
return this.httpClient
|
|
203
|
+
.get(this.getApiUrl('/management/v1/document-opensearch/reindex/status'))
|
|
204
|
+
.pipe(catchError(() => of(null)));
|
|
205
|
+
}
|
|
206
|
+
getReindexRuns(page, size) {
|
|
207
|
+
const params = new HttpParams().set('page', page.toString()).set('size', size.toString());
|
|
208
|
+
return this.httpClient.get(this.getApiUrl('/management/v1/document-opensearch/reindex/runs'), { params });
|
|
209
|
+
}
|
|
210
|
+
getReindexRun(runId) {
|
|
211
|
+
return this.httpClient.get(this.getApiUrl(`/management/v1/document-opensearch/reindex/${runId}`));
|
|
212
|
+
}
|
|
185
213
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AdminSettingsManagementApiService, deps: [{ token: i1.HttpClient }, { token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
186
214
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AdminSettingsManagementApiService, providedIn: 'root' }); }
|
|
187
215
|
}
|
|
@@ -289,7 +317,7 @@ class AdminSettingsLogoComponent {
|
|
|
289
317
|
});
|
|
290
318
|
}
|
|
291
319
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", 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.25", 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:
|
|
320
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i6.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
321
|
}
|
|
294
322
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AdminSettingsLogoComponent, decorators: [{
|
|
295
323
|
type: Component,
|
|
@@ -422,8 +450,8 @@ class AdminSettingsColorComponent {
|
|
|
422
450
|
}
|
|
423
451
|
return value;
|
|
424
452
|
}
|
|
425
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AdminSettingsColorComponent, deps: [{ token: AdminSettingsManagementApiService }, { token: i2$1.AdminSettingsService }, { token: i3.FormBuilder }, { token: i4.IconService }, { token:
|
|
426
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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:
|
|
453
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AdminSettingsColorComponent, deps: [{ token: AdminSettingsManagementApiService }, { token: i2$1.AdminSettingsService }, { token: i3.FormBuilder }, { token: i4.IconService }, { token: i3$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
454
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$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
455
|
}
|
|
428
456
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AdminSettingsColorComponent, decorators: [{
|
|
429
457
|
type: Component,
|
|
@@ -439,7 +467,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
439
467
|
NotificationModule,
|
|
440
468
|
ColorPickerComponent,
|
|
441
469
|
], 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:
|
|
470
|
+
}], ctorParameters: () => [{ type: AdminSettingsManagementApiService }, { type: i2$1.AdminSettingsService }, { type: i3.FormBuilder }, { type: i4.IconService }, { type: i3$1.TranslateService }] });
|
|
443
471
|
|
|
444
472
|
/*
|
|
445
473
|
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
@@ -487,6 +515,7 @@ class AdminSettingsFeatureTogglesComponent {
|
|
|
487
515
|
this._configService = _configService;
|
|
488
516
|
this.TOGGLE_DEFINITIONS = FEATURE_TOGGLE_DEFINITIONS;
|
|
489
517
|
this.featureToggles$ = this._configService.featureToggles$;
|
|
518
|
+
this.searchEngine$ = this._adminSettingsManagementApiService.getSearchEngine();
|
|
490
519
|
}
|
|
491
520
|
getEffectiveValue(definition, toggles) {
|
|
492
521
|
return !!toggles[definition.key];
|
|
@@ -498,8 +527,11 @@ class AdminSettingsFeatureTogglesComponent {
|
|
|
498
527
|
this._adminSettingsService.refreshFeatureToggles();
|
|
499
528
|
});
|
|
500
529
|
}
|
|
530
|
+
onSearchEngineChange(useOpenSearch) {
|
|
531
|
+
this._adminSettingsManagementApiService.updateSearchEngine(useOpenSearch).subscribe();
|
|
532
|
+
}
|
|
501
533
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", 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.25", 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:
|
|
534
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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 @if (searchEngine$ | async; as searchEngine) {\n <div class=\"feature-toggles__item\" [class.feature-toggles__item--disabled]=\"!searchEngine.available\">\n <div class=\"feature-toggles__info\">\n <span class=\"feature-toggles__title\">\n {{ 'adminSettings.featureToggles.searchEngine.useOpenSearch.title' | translate }}\n </span>\n <span class=\"feature-toggles__description\">\n @if (searchEngine.available) {\n {{ 'adminSettings.featureToggles.searchEngine.useOpenSearch.description' | translate }}\n } @else {\n {{ 'adminSettings.featureToggles.searchEngine.useOpenSearch.unavailable' | translate }}\n }\n </span>\n </div>\n <div class=\"feature-toggles__control\">\n <cds-toggle\n [checked]=\"searchEngine.active === 'OPENSEARCH'\"\n [onText]=\"'interface.on' | translate\"\n [offText]=\"'interface.off' | translate\"\n [size]=\"'sm'\"\n [disabled]=\"!searchEngine.available\"\n (checkedChange)=\"onSearchEngineChange($event)\"\n ></cds-toggle>\n </div>\n </div>\n }\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__item--disabled{opacity:.5}.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: i6.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
535
|
}
|
|
504
536
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AdminSettingsFeatureTogglesComponent, decorators: [{
|
|
505
537
|
type: Component,
|
|
@@ -507,7 +539,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
507
539
|
CommonModule,
|
|
508
540
|
TranslatePipe,
|
|
509
541
|
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"] }]
|
|
542
|
+
], 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 @if (searchEngine$ | async; as searchEngine) {\n <div class=\"feature-toggles__item\" [class.feature-toggles__item--disabled]=\"!searchEngine.available\">\n <div class=\"feature-toggles__info\">\n <span class=\"feature-toggles__title\">\n {{ 'adminSettings.featureToggles.searchEngine.useOpenSearch.title' | translate }}\n </span>\n <span class=\"feature-toggles__description\">\n @if (searchEngine.available) {\n {{ 'adminSettings.featureToggles.searchEngine.useOpenSearch.description' | translate }}\n } @else {\n {{ 'adminSettings.featureToggles.searchEngine.useOpenSearch.unavailable' | translate }}\n }\n </span>\n </div>\n <div class=\"feature-toggles__control\">\n <cds-toggle\n [checked]=\"searchEngine.active === 'OPENSEARCH'\"\n [onText]=\"'interface.on' | translate\"\n [offText]=\"'interface.off' | translate\"\n [size]=\"'sm'\"\n [disabled]=\"!searchEngine.available\"\n (checkedChange)=\"onSearchEngineChange($event)\"\n ></cds-toggle>\n </div>\n </div>\n }\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__item--disabled{opacity:.5}.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
543
|
}], ctorParameters: () => [{ type: AdminSettingsManagementApiService }, { type: i2$1.AdminSettingsService }, { type: i2.ConfigService }] });
|
|
512
544
|
|
|
513
545
|
/*
|
|
@@ -536,7 +568,7 @@ class AdminSettingsComponent {
|
|
|
536
568
|
this._router.navigate(['..', tabKey], { relativeTo: this._route });
|
|
537
569
|
}
|
|
538
570
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", 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.25", type: AdminSettingsComponent, isStandalone: true, selector: "valtimo-admin-settings", ngImport: i0, template: "<!--\n ~ Copyright 2015-2026 Ritense BV, the Netherlands.\n
|
|
571
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: AdminSettingsComponent, isStandalone: true, selector: "valtimo-admin-settings", ngImport: i0, template: "<!--\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 -->\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\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: i6.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
572
|
}
|
|
541
573
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AdminSettingsComponent, decorators: [{
|
|
542
574
|
type: Component,
|
|
@@ -546,7 +578,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
546
578
|
TabsModule,
|
|
547
579
|
AdminSettingsAppearanceComponent,
|
|
548
580
|
AdminSettingsFeatureTogglesComponent,
|
|
549
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2026 Ritense BV, the Netherlands.\n
|
|
581
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\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 -->\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\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
582
|
}], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }] });
|
|
551
583
|
|
|
552
584
|
/*
|
|
@@ -564,6 +596,267 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
564
596
|
* See the License for the specific language governing permissions and
|
|
565
597
|
* limitations under the License.
|
|
566
598
|
*/
|
|
599
|
+
class StartReindexModalComponent {
|
|
600
|
+
constructor(_fb) {
|
|
601
|
+
this._fb = _fb;
|
|
602
|
+
this.open = false;
|
|
603
|
+
this.documentDefinitions = [];
|
|
604
|
+
this.closeEvent = new EventEmitter();
|
|
605
|
+
this.formGroup = this._fb.group({
|
|
606
|
+
pruneOrphans: [false],
|
|
607
|
+
documentDefinitionName: [null],
|
|
608
|
+
modifiedAfter: [null],
|
|
609
|
+
});
|
|
610
|
+
}
|
|
611
|
+
onDateSelected(event) {
|
|
612
|
+
const dateValue = event?.[0] || null;
|
|
613
|
+
this.formGroup.patchValue({ modifiedAfter: dateValue });
|
|
614
|
+
}
|
|
615
|
+
onCancel() {
|
|
616
|
+
this._resetForm();
|
|
617
|
+
this.closeEvent.emit(null);
|
|
618
|
+
}
|
|
619
|
+
onSubmit() {
|
|
620
|
+
const request = this._buildRequest();
|
|
621
|
+
this._resetForm();
|
|
622
|
+
this.closeEvent.emit(request);
|
|
623
|
+
}
|
|
624
|
+
_buildRequest() {
|
|
625
|
+
const formValue = this.formGroup.value;
|
|
626
|
+
const request = {};
|
|
627
|
+
if (formValue.pruneOrphans) {
|
|
628
|
+
request.pruneOrphans = true;
|
|
629
|
+
}
|
|
630
|
+
if (formValue.documentDefinitionName?.value) {
|
|
631
|
+
request.documentDefinitionName = formValue.documentDefinitionName.value;
|
|
632
|
+
}
|
|
633
|
+
if (formValue.modifiedAfter) {
|
|
634
|
+
request.modifiedAfter = this._formatDateToIso(formValue.modifiedAfter);
|
|
635
|
+
}
|
|
636
|
+
return request;
|
|
637
|
+
}
|
|
638
|
+
_formatDateToIso(date) {
|
|
639
|
+
if (date instanceof Date) {
|
|
640
|
+
const year = date.getFullYear();
|
|
641
|
+
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
642
|
+
const day = String(date.getDate()).padStart(2, '0');
|
|
643
|
+
return `${year}-${month}-${day}T00:00:00`;
|
|
644
|
+
}
|
|
645
|
+
const parts = date.split('-');
|
|
646
|
+
if (parts.length === 3) {
|
|
647
|
+
const [day, month, year] = parts;
|
|
648
|
+
return `${year}-${month}-${day}T00:00:00`;
|
|
649
|
+
}
|
|
650
|
+
return date;
|
|
651
|
+
}
|
|
652
|
+
_resetForm() {
|
|
653
|
+
this.formGroup.reset({
|
|
654
|
+
pruneOrphans: false,
|
|
655
|
+
documentDefinitionName: null,
|
|
656
|
+
modifiedAfter: null,
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: StartReindexModalComponent, deps: [{ token: i3.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
660
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: StartReindexModalComponent, isStandalone: true, selector: "valtimo-start-reindex-modal", inputs: { open: "open", documentDefinitions: "documentDefinitions" }, outputs: { closeEvent: "closeEvent" }, 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<cds-modal valtimoCdsModal *ngIf=\"open\" [open]=\"open\" size=\"sm\" (close)=\"onCancel()\">\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"onCancel()\">\n <h3 cdsModalHeaderHeading>{{ 'adminSettings.opensearch.reindex.startModalTitle' | translate }}</h3>\n </cds-modal-header>\n\n <section cdsModalContent [cdsLayer]=\"1\" [formGroup]=\"formGroup\" class=\"start-reindex-form\">\n <cds-checkbox formControlName=\"pruneOrphans\">\n <span class=\"label-with-tooltip\">\n {{ 'adminSettings.opensearch.reindex.pruneOrphans' | translate }}\n <v-tooltip-icon [tooltip]=\"'adminSettings.opensearch.reindex.tooltips.pruneOrphans' | translate\"></v-tooltip-icon>\n </span>\n </cds-checkbox>\n\n <cds-dropdown\n [label]=\"'adminSettings.opensearch.reindex.documentDefinitionName' | translate\"\n [placeholder]=\"'adminSettings.opensearch.reindex.documentDefinitionPlaceholder' | translate\"\n formControlName=\"documentDefinitionName\"\n >\n <cds-dropdown-list [items]=\"documentDefinitions\"></cds-dropdown-list>\n </cds-dropdown>\n\n <cds-date-picker\n [label]=\"'adminSettings.opensearch.reindex.modifiedAfter' | translate\"\n placeholder=\"DD-MM-YYYY\"\n [dateFormat]=\"'d-m-Y'\"\n (valueChange)=\"onDateSelected($event)\"\n ></cds-date-picker>\n </section>\n\n <cds-modal-footer>\n <button cdsButton=\"secondary\" (click)=\"onCancel()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button cdsButton=\"primary\" (click)=\"onSubmit()\">\n {{ 'adminSettings.opensearch.reindex.startButton' | translate }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", styles: [".start-reindex-form{display:flex;flex-direction:column;gap:1rem}.start-reindex-form .label-with-tooltip{display:inline-flex;align-items:center;gap:4px}\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: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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: ModalModule }, { kind: "component", type: i4.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i4.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i4.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i4.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "directive", type: i4.ModalHeaderHeading, selector: "[cdsModalHeaderHeading], [ibmModalHeaderHeading]" }, { kind: "directive", type: ValtimoCdsModalDirective, selector: "[valtimoCdsModal]", inputs: ["minContentHeight"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i4.Checkbox, selector: "cds-checkbox, ibm-checkbox", inputs: ["disabled", "skeleton", "hideLabel", "name", "id", "required", "value", "ariaLabel", "ariaLabelledby", "indeterminate", "checked"], outputs: ["click", "checkedChange", "indeterminateChange"] }, { kind: "ngmodule", type: DatePickerInputModule }, { kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i4.DatePicker, selector: "cds-date-picker, ibm-date-picker", inputs: ["range", "dateFormat", "language", "label", "helperText", "rangeHelperText", "rangeLabel", "placeholder", "ariaLabel", "inputPattern", "id", "value", "theme", "disabled", "readonly", "invalid", "invalidText", "warn", "warnText", "size", "rangeInvalid", "rangeInvalidText", "rangeWarn", "rangeWarnText", "skeleton", "plugins", "flatpickrOptions"], outputs: ["valueChange", "onClose"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i4.Dropdown, selector: "cds-dropdown, ibm-dropdown", inputs: ["id", "label", "hideLabel", "helperText", "placeholder", "displayValue", "clearText", "size", "type", "theme", "disabled", "readonly", "skeleton", "inline", "disableArrowKeys", "invalid", "invalidText", "warn", "warnText", "appendInline", "scrollableContainer", "itemValueKey", "selectionFeedback", "menuButtonLabel", "selectedLabel", "dropUp", "fluid"], outputs: ["selected", "onClose", "close"] }, { kind: "component", type: i4.DropdownList, selector: "cds-dropdown-list, ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }, { kind: "ngmodule", type: LayerModule }, { kind: "directive", type: i4.LayerDirective, selector: "[cdsLayer], [ibmLayer]", inputs: ["ibmLayer", "cdsLayer"], exportAs: ["layer"] }, { kind: "ngmodule", type: TooltipIconModule }, { kind: "component", type: i2$1.TooltipIconComponent, selector: "v-tooltip-icon", inputs: ["tooltip", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
661
|
+
}
|
|
662
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: StartReindexModalComponent, decorators: [{
|
|
663
|
+
type: Component,
|
|
664
|
+
args: [{ standalone: true, selector: 'valtimo-start-reindex-modal', imports: [
|
|
665
|
+
CommonModule,
|
|
666
|
+
TranslateModule,
|
|
667
|
+
ReactiveFormsModule,
|
|
668
|
+
ModalModule,
|
|
669
|
+
ValtimoCdsModalDirective,
|
|
670
|
+
ButtonModule,
|
|
671
|
+
CheckboxModule,
|
|
672
|
+
DatePickerInputModule,
|
|
673
|
+
DatePickerModule,
|
|
674
|
+
DropdownModule,
|
|
675
|
+
LayerModule,
|
|
676
|
+
TooltipIconModule,
|
|
677
|
+
], 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<cds-modal valtimoCdsModal *ngIf=\"open\" [open]=\"open\" size=\"sm\" (close)=\"onCancel()\">\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"onCancel()\">\n <h3 cdsModalHeaderHeading>{{ 'adminSettings.opensearch.reindex.startModalTitle' | translate }}</h3>\n </cds-modal-header>\n\n <section cdsModalContent [cdsLayer]=\"1\" [formGroup]=\"formGroup\" class=\"start-reindex-form\">\n <cds-checkbox formControlName=\"pruneOrphans\">\n <span class=\"label-with-tooltip\">\n {{ 'adminSettings.opensearch.reindex.pruneOrphans' | translate }}\n <v-tooltip-icon [tooltip]=\"'adminSettings.opensearch.reindex.tooltips.pruneOrphans' | translate\"></v-tooltip-icon>\n </span>\n </cds-checkbox>\n\n <cds-dropdown\n [label]=\"'adminSettings.opensearch.reindex.documentDefinitionName' | translate\"\n [placeholder]=\"'adminSettings.opensearch.reindex.documentDefinitionPlaceholder' | translate\"\n formControlName=\"documentDefinitionName\"\n >\n <cds-dropdown-list [items]=\"documentDefinitions\"></cds-dropdown-list>\n </cds-dropdown>\n\n <cds-date-picker\n [label]=\"'adminSettings.opensearch.reindex.modifiedAfter' | translate\"\n placeholder=\"DD-MM-YYYY\"\n [dateFormat]=\"'d-m-Y'\"\n (valueChange)=\"onDateSelected($event)\"\n ></cds-date-picker>\n </section>\n\n <cds-modal-footer>\n <button cdsButton=\"secondary\" (click)=\"onCancel()\">\n {{ 'interface.cancel' | translate }}\n </button>\n\n <button cdsButton=\"primary\" (click)=\"onSubmit()\">\n {{ 'adminSettings.opensearch.reindex.startButton' | translate }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", styles: [".start-reindex-form{display:flex;flex-direction:column;gap:1rem}.start-reindex-form .label-with-tooltip{display:inline-flex;align-items:center;gap:4px}\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"] }]
|
|
678
|
+
}], ctorParameters: () => [{ type: i3.FormBuilder }], propDecorators: { open: [{
|
|
679
|
+
type: Input
|
|
680
|
+
}], documentDefinitions: [{
|
|
681
|
+
type: Input
|
|
682
|
+
}], closeEvent: [{
|
|
683
|
+
type: Output
|
|
684
|
+
}] } });
|
|
685
|
+
|
|
686
|
+
/*
|
|
687
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
688
|
+
*
|
|
689
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
690
|
+
* you may not use this file except in compliance with the License.
|
|
691
|
+
* You may obtain a copy of the License at
|
|
692
|
+
*
|
|
693
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
694
|
+
*
|
|
695
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
696
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
697
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
698
|
+
* See the License for the specific language governing permissions and
|
|
699
|
+
* limitations under the License.
|
|
700
|
+
*/
|
|
701
|
+
class AdminSettingsOpensearchComponent {
|
|
702
|
+
constructor(_apiService, _documentService, _translateService, _router, _iconService) {
|
|
703
|
+
this._apiService = _apiService;
|
|
704
|
+
this._documentService = _documentService;
|
|
705
|
+
this._translateService = _translateService;
|
|
706
|
+
this._router = _router;
|
|
707
|
+
this._iconService = _iconService;
|
|
708
|
+
this._destroy$ = new Subject();
|
|
709
|
+
this._manualRefresh$ = new BehaviorSubject(undefined);
|
|
710
|
+
this._silentRefresh$ = new Subject();
|
|
711
|
+
this.fields = [
|
|
712
|
+
{ key: 'statusTag', label: 'adminSettings.opensearch.reindex.columns.status', viewType: ViewType.TAGS },
|
|
713
|
+
{ key: 'startedOn', label: 'adminSettings.opensearch.reindex.columns.startedOn', viewType: ViewType.DATE },
|
|
714
|
+
{ key: 'finishedOn', label: 'adminSettings.opensearch.reindex.columns.finishedOn', viewType: ViewType.DATE },
|
|
715
|
+
{ key: 'progress', label: 'adminSettings.opensearch.reindex.columns.progress', viewType: ViewType.TEXT },
|
|
716
|
+
];
|
|
717
|
+
this.pagination = {
|
|
718
|
+
collectionSize: 0,
|
|
719
|
+
page: 1,
|
|
720
|
+
size: 10,
|
|
721
|
+
};
|
|
722
|
+
this.showModal$ = new BehaviorSubject(false);
|
|
723
|
+
this.startingReindex$ = new BehaviorSubject(false);
|
|
724
|
+
this.loading$ = new BehaviorSubject(false);
|
|
725
|
+
this.runs$ = merge(this._manualRefresh$.pipe(switchMap(() => {
|
|
726
|
+
this.loading$.next(true);
|
|
727
|
+
return this._apiService.getReindexRuns(this.pagination.page - 1, this.pagination.size).pipe(finalize(() => this.loading$.next(false)));
|
|
728
|
+
})), this._silentRefresh$.pipe(switchMap(() => this._apiService.getReindexRuns(this.pagination.page - 1, this.pagination.size)))).pipe(shareReplay(1));
|
|
729
|
+
this.tableItems$ = this.runs$.pipe(switchMap(page => {
|
|
730
|
+
this.pagination = { ...this.pagination, collectionSize: page.totalElements };
|
|
731
|
+
if (page.content.length === 0) {
|
|
732
|
+
return of([]);
|
|
733
|
+
}
|
|
734
|
+
const statusKeys = page.content.map(run => `adminSettings.opensearch.reindex.statuses.${run.status}`);
|
|
735
|
+
return this._translateService.get(statusKeys).pipe(map(translations => page.content.map(run => ({
|
|
736
|
+
...run,
|
|
737
|
+
progress: `${run.processedCount} / ${run.totalCount}`,
|
|
738
|
+
statusTag: {
|
|
739
|
+
content: translations[`adminSettings.opensearch.reindex.statuses.${run.status}`],
|
|
740
|
+
type: this._getStatusTagType(run.status),
|
|
741
|
+
},
|
|
742
|
+
}))));
|
|
743
|
+
}));
|
|
744
|
+
this.hasRunningRun$ = this.runs$.pipe(map(page => page.content.some(run => run.status === 'RUNNING')));
|
|
745
|
+
this._iconService.register(Launch16);
|
|
746
|
+
}
|
|
747
|
+
ngOnInit() {
|
|
748
|
+
this.documentDefinitions$ = this._documentService.queryDefinitionsForManagement().pipe(switchMap(page => this._translateService.get('adminSettings.opensearch.reindex.allDocumentDefinitions').pipe(map(allLabel => [
|
|
749
|
+
{ content: allLabel, value: null, selected: false },
|
|
750
|
+
...page.content.map(def => ({
|
|
751
|
+
content: def.id.name,
|
|
752
|
+
value: def.id.name,
|
|
753
|
+
selected: false,
|
|
754
|
+
})),
|
|
755
|
+
]))), startWith([]));
|
|
756
|
+
this.hasRunningRun$
|
|
757
|
+
.pipe(switchMap(hasRunning => {
|
|
758
|
+
if (!hasRunning)
|
|
759
|
+
return [];
|
|
760
|
+
return interval(3000).pipe(takeWhile(() => true), takeUntil(this._destroy$));
|
|
761
|
+
}), takeUntil(this._destroy$))
|
|
762
|
+
.subscribe(() => this._silentRefresh$.next());
|
|
763
|
+
}
|
|
764
|
+
onPageChange(page) {
|
|
765
|
+
this.pagination = { ...this.pagination, page };
|
|
766
|
+
this._manualRefresh$.next();
|
|
767
|
+
}
|
|
768
|
+
onPageSizeChange(size) {
|
|
769
|
+
this.pagination = { ...this.pagination, size, page: 1 };
|
|
770
|
+
this._manualRefresh$.next();
|
|
771
|
+
}
|
|
772
|
+
openModal() {
|
|
773
|
+
this.showModal$.next(true);
|
|
774
|
+
}
|
|
775
|
+
onModalClose(request) {
|
|
776
|
+
this.showModal$.next(false);
|
|
777
|
+
if (!request)
|
|
778
|
+
return;
|
|
779
|
+
this.startingReindex$.next(true);
|
|
780
|
+
this._apiService
|
|
781
|
+
.startReindex(request)
|
|
782
|
+
.pipe(take(1), finalize(() => this.startingReindex$.next(false)))
|
|
783
|
+
.subscribe({
|
|
784
|
+
next: () => this._manualRefresh$.next(),
|
|
785
|
+
error: err => {
|
|
786
|
+
if (err.status === 409) {
|
|
787
|
+
this._manualRefresh$.next();
|
|
788
|
+
}
|
|
789
|
+
},
|
|
790
|
+
});
|
|
791
|
+
}
|
|
792
|
+
_getStatusTagType(status) {
|
|
793
|
+
switch (status) {
|
|
794
|
+
case 'RUNNING':
|
|
795
|
+
return 'blue';
|
|
796
|
+
case 'COMPLETED':
|
|
797
|
+
return 'green';
|
|
798
|
+
case 'FAILED':
|
|
799
|
+
return 'red';
|
|
800
|
+
case 'STOPPED':
|
|
801
|
+
return 'gray';
|
|
802
|
+
default:
|
|
803
|
+
return 'gray';
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
navigateToLogs(run) {
|
|
807
|
+
const afterTimestamp = new Date(new Date(run.startedOn).getTime() - 5000).toISOString();
|
|
808
|
+
const beforeTimestamp = run.finishedOn
|
|
809
|
+
? new Date(new Date(run.finishedOn).getTime() + 5000).toISOString()
|
|
810
|
+
: new Date().toISOString();
|
|
811
|
+
this._router.navigate(['/logging'], {
|
|
812
|
+
queryParams: {
|
|
813
|
+
level: 'ERROR',
|
|
814
|
+
afterTimestamp,
|
|
815
|
+
beforeTimestamp,
|
|
816
|
+
},
|
|
817
|
+
});
|
|
818
|
+
}
|
|
819
|
+
ngOnDestroy() {
|
|
820
|
+
this._destroy$.next();
|
|
821
|
+
this._destroy$.complete();
|
|
822
|
+
}
|
|
823
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AdminSettingsOpensearchComponent, deps: [{ token: AdminSettingsManagementApiService }, { token: i2$2.DocumentService }, { token: i3$1.TranslateService }, { token: i1$1.Router }, { token: i4.IconService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
824
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: AdminSettingsOpensearchComponent, isStandalone: true, selector: "valtimo-admin-settings-opensearch", 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\n class=\"opensearch-reindex\"\n *ngIf=\"{\n items: tableItems$ | async,\n loading: loading$ | async,\n starting: startingReindex$ | async,\n documentDefinitions: documentDefinitions$ | async,\n showModal: showModal$ | async,\n hasRunning: hasRunningRun$ | async\n } as obs\"\n>\n <valtimo-carbon-list\n [header]=\"false\"\n [items]=\"obs.items || []\"\n [fields]=\"fields\"\n [loading]=\"obs.loading\"\n [pagination]=\"pagination\"\n [expandedRowTemplate]=\"expandedRowTemplate\"\n [expandedRowKey]=\"'runId'\"\n (paginationClicked)=\"onPageChange($event)\"\n (paginationSet)=\"onPageSizeChange($event)\"\n >\n <ng-container header>\n {{ 'adminSettings.opensearch.reindex.title' | translate }}\n </ng-container>\n\n <div carbonToolbarContent>\n <button\n cdsButton=\"primary\"\n [disabled]=\"obs.hasRunning || obs.starting\"\n (click)=\"openModal()\"\n >\n @if (obs.starting) {\n <cds-loading size=\"sm\"></cds-loading>\n }\n {{ 'adminSettings.opensearch.reindex.startButton' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n </div>\n\n <valtimo-no-results\n title=\"{{ 'adminSettings.opensearch.reindex.noResults.title' | translate }}\"\n description=\"{{ 'adminSettings.opensearch.reindex.noResults.description' | translate }}\"\n ></valtimo-no-results>\n </valtimo-carbon-list>\n\n <valtimo-start-reindex-modal\n [open]=\"obs.showModal\"\n [documentDefinitions]=\"obs.documentDefinitions\"\n (closeEvent)=\"onModalClose($event)\"\n ></valtimo-start-reindex-modal>\n</div>\n\n<ng-template #expandedRowTemplate let-data=\"data\">\n <div class=\"opensearch-reindex__expanded\">\n <span class=\"opensearch-reindex__label\">{{ 'adminSettings.opensearch.reindex.started' | translate }}</span>\n <span class=\"opensearch-reindex__value\">{{ data.startedOn | date:'medium' }}</span>\n\n <span class=\"opensearch-reindex__label\">{{ 'adminSettings.opensearch.reindex.finished' | translate }}</span>\n <span class=\"opensearch-reindex__value\">{{ data.finishedOn ? (data.finishedOn | date:'medium') : '-' }}</span>\n\n <span class=\"opensearch-reindex__label\">{{ 'adminSettings.opensearch.reindex.documentDefinitionName' | translate }}</span>\n <span class=\"opensearch-reindex__value\">{{ data.scope?.documentDefinitionName || '-' }}</span>\n\n <span class=\"opensearch-reindex__label\">{{ 'adminSettings.opensearch.reindex.pruneOrphans' | translate }}</span>\n <span class=\"opensearch-reindex__value opensearch-reindex__value-with-tooltip\">\n {{ data.scope?.pruneOrphans ? ('interface.yes' | translate) : ('interface.no' | translate) }}\n <v-tooltip-icon [tooltip]=\"'adminSettings.opensearch.reindex.tooltips.pruneOrphans' | translate\"></v-tooltip-icon>\n </span>\n\n <span class=\"opensearch-reindex__label\">{{ 'adminSettings.opensearch.reindex.modifiedAfter' | translate }}</span>\n <span class=\"opensearch-reindex__value\">{{ data.scope?.modifiedAfter ? (data.scope.modifiedAfter | date:'medium') : '-' }}</span>\n\n <div class=\"opensearch-reindex__results-column\">\n <div class=\"opensearch-reindex__progress\">\n <span class=\"opensearch-reindex__progress-label\">\n {{ 'adminSettings.opensearch.reindex.reindexing' | translate }}\n </span>\n <cds-progress-bar\n [value]=\"data.totalCount > 0 ? (data.processedCount / data.totalCount) * 100 : 0\"\n [status]=\"data.status === 'RUNNING' && !data.pruningPhase ? 'active' : (data.status === 'COMPLETED' ? 'finished' : (data.status === 'RUNNING' ? 'finished' : 'error'))\"\n ></cds-progress-bar>\n <div class=\"opensearch-reindex__progress-footer\">\n <span>{{ 'adminSettings.opensearch.reindex.processed' | translate:{current: data.processedCount, total: data.totalCount} }}</span>\n <span>{{ 'adminSettings.opensearch.reindex.skipped' | translate }}: {{ data.skippedCount || 0 }}</span>\n </div>\n </div>\n\n @if (data.pruningPhase || data.pruneTotalCount) {\n <div class=\"opensearch-reindex__progress\">\n <span class=\"opensearch-reindex__progress-label\">\n {{ 'adminSettings.opensearch.reindex.pruning' | translate }}\n <v-tooltip-icon [tooltip]=\"'adminSettings.opensearch.reindex.tooltips.pruned' | translate\"></v-tooltip-icon>\n </span>\n <cds-progress-bar\n [value]=\"data.pruneTotalCount > 0 ? (data.pruneCheckedCount / data.pruneTotalCount) * 100 : 0\"\n [status]=\"data.pruningPhase ? 'active' : (data.status === 'COMPLETED' ? 'finished' : 'error')\"\n ></cds-progress-bar>\n <div class=\"opensearch-reindex__progress-footer\">\n <span>{{ 'adminSettings.opensearch.reindex.processed' | translate:{current: data.pruneCheckedCount, total: data.pruneTotalCount || 0} }}</span>\n <span>{{ 'adminSettings.opensearch.reindex.pruningProgress' | translate:{removed: data.prunedCount || 0} }}</span>\n </div>\n </div>\n }\n\n @if (data.status === 'FAILED') {\n <a class=\"opensearch-reindex__error-link\" (click)=\"navigateToLogs(data)\">\n {{ 'adminSettings.opensearch.reindex.viewErrorLogs' | translate }}\n <svg cdsIcon=\"launch\" size=\"16\"></svg>\n </a>\n }\n </div>\n </div>\n</ng-template>\n", styles: [".opensearch-reindex{width:100%;display:flex;flex-direction:column;gap:24px}.opensearch-reindex ::ng-deep .cds--data-table{table-layout:fixed}.opensearch-reindex ::ng-deep .cds--data-table th.cds--table-expand{width:3.5rem}.opensearch-reindex ::ng-deep .cds--data-table thead th:not(.cds--table-expand){width:25%}.opensearch-reindex ::ng-deep tr[data-child-row]>td{padding-inline:3.5rem 0}.opensearch-reindex__expanded{padding:8px 0 16px;display:grid;grid-template-columns:repeat(4,1fr);column-gap:0;row-gap:8px;align-items:start}.opensearch-reindex__label{grid-column:1;padding-inline:1rem;font-size:14px;font-weight:600;color:var(--cds-text-primary)}.opensearch-reindex__value{grid-column:2;padding-inline:1rem;font-size:14px;color:var(--cds-text-primary)}.opensearch-reindex__results-column{grid-column:3/span 2;grid-row:1/6;padding-inline:1rem;display:flex;flex-direction:column;gap:16px}.opensearch-reindex__value-with-tooltip{display:inline-flex;align-items:center;gap:4px}.opensearch-reindex__progress-label{display:inline-flex;align-items:center;gap:4px;margin-bottom:4px;font-size:14px;font-weight:600;color:var(--cds-text-secondary)}.opensearch-reindex__progress-footer{display:flex;justify-content:space-between;align-items:center;margin-top:4px;font-size:12px;color:var(--cds-text-secondary)}.opensearch-reindex__progress{padding:8px 0}.opensearch-reindex__progress ::ng-deep .cds--progress-bar__track{background-color:var(--cds-border-subtle)}.opensearch-reindex__error-link{display:inline-flex;align-items:center;gap:4px;color:var(--cds-link-primary);font-size:14px;cursor:pointer;text-decoration:none}.opensearch-reindex__error-link:hover{text-decoration:underline}\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: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.DatePipe, name: "date" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { 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: ProgressBarModule }, { kind: "component", type: i4.ProgressBar, selector: "cds-progress-bar, ibm-progress-bar", inputs: ["value", "id", "label", "helperText", "max", "type", "status", "size"] }, { kind: "ngmodule", type: TagModule }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i2$1.CarbonListComponent, selector: "valtimo-carbon-list", inputs: ["items", "fields", "tableTranslations", "paginatorConfig", "pagination", "loading", "skeletonRowCount", "actions", "actionItems", "showActionItems", "header", "hideColumnHeader", "initialSortState", "sortState", "isSearchable", "initialSearchValue", "searchDebounceMs", "invalidSearchFields", "searchFields", "enableSingleSelection", "lastColumnTemplate", "paginationIdentifier", "showSelectionColumn", "striped", "hideToolbar", "lockedTooltipTranslationKey", "movingRowsEnabled", "dragAndDrop", "dragAndDropDisabled", "expandedRowTemplate", "expandedRowKey", "trackByKey"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged", "moveRow", "itemsReordered"] }, { kind: "component", type: i2$1.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "component", type: StartReindexModalComponent, selector: "valtimo-start-reindex-modal", inputs: ["open", "documentDefinitions"], outputs: ["closeEvent"] }, { kind: "ngmodule", type: TooltipIconModule }, { kind: "component", type: i2$1.TooltipIconComponent, selector: "v-tooltip-icon", inputs: ["tooltip", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
825
|
+
}
|
|
826
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AdminSettingsOpensearchComponent, decorators: [{
|
|
827
|
+
type: Component,
|
|
828
|
+
args: [{ standalone: true, selector: 'valtimo-admin-settings-opensearch', imports: [
|
|
829
|
+
CommonModule,
|
|
830
|
+
DatePipe,
|
|
831
|
+
TranslateModule,
|
|
832
|
+
ButtonModule,
|
|
833
|
+
IconModule,
|
|
834
|
+
LoadingModule,
|
|
835
|
+
ProgressBarModule,
|
|
836
|
+
TagModule,
|
|
837
|
+
CarbonListModule,
|
|
838
|
+
StartReindexModalComponent,
|
|
839
|
+
TooltipIconModule,
|
|
840
|
+
], 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\n class=\"opensearch-reindex\"\n *ngIf=\"{\n items: tableItems$ | async,\n loading: loading$ | async,\n starting: startingReindex$ | async,\n documentDefinitions: documentDefinitions$ | async,\n showModal: showModal$ | async,\n hasRunning: hasRunningRun$ | async\n } as obs\"\n>\n <valtimo-carbon-list\n [header]=\"false\"\n [items]=\"obs.items || []\"\n [fields]=\"fields\"\n [loading]=\"obs.loading\"\n [pagination]=\"pagination\"\n [expandedRowTemplate]=\"expandedRowTemplate\"\n [expandedRowKey]=\"'runId'\"\n (paginationClicked)=\"onPageChange($event)\"\n (paginationSet)=\"onPageSizeChange($event)\"\n >\n <ng-container header>\n {{ 'adminSettings.opensearch.reindex.title' | translate }}\n </ng-container>\n\n <div carbonToolbarContent>\n <button\n cdsButton=\"primary\"\n [disabled]=\"obs.hasRunning || obs.starting\"\n (click)=\"openModal()\"\n >\n @if (obs.starting) {\n <cds-loading size=\"sm\"></cds-loading>\n }\n {{ 'adminSettings.opensearch.reindex.startButton' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n </button>\n </div>\n\n <valtimo-no-results\n title=\"{{ 'adminSettings.opensearch.reindex.noResults.title' | translate }}\"\n description=\"{{ 'adminSettings.opensearch.reindex.noResults.description' | translate }}\"\n ></valtimo-no-results>\n </valtimo-carbon-list>\n\n <valtimo-start-reindex-modal\n [open]=\"obs.showModal\"\n [documentDefinitions]=\"obs.documentDefinitions\"\n (closeEvent)=\"onModalClose($event)\"\n ></valtimo-start-reindex-modal>\n</div>\n\n<ng-template #expandedRowTemplate let-data=\"data\">\n <div class=\"opensearch-reindex__expanded\">\n <span class=\"opensearch-reindex__label\">{{ 'adminSettings.opensearch.reindex.started' | translate }}</span>\n <span class=\"opensearch-reindex__value\">{{ data.startedOn | date:'medium' }}</span>\n\n <span class=\"opensearch-reindex__label\">{{ 'adminSettings.opensearch.reindex.finished' | translate }}</span>\n <span class=\"opensearch-reindex__value\">{{ data.finishedOn ? (data.finishedOn | date:'medium') : '-' }}</span>\n\n <span class=\"opensearch-reindex__label\">{{ 'adminSettings.opensearch.reindex.documentDefinitionName' | translate }}</span>\n <span class=\"opensearch-reindex__value\">{{ data.scope?.documentDefinitionName || '-' }}</span>\n\n <span class=\"opensearch-reindex__label\">{{ 'adminSettings.opensearch.reindex.pruneOrphans' | translate }}</span>\n <span class=\"opensearch-reindex__value opensearch-reindex__value-with-tooltip\">\n {{ data.scope?.pruneOrphans ? ('interface.yes' | translate) : ('interface.no' | translate) }}\n <v-tooltip-icon [tooltip]=\"'adminSettings.opensearch.reindex.tooltips.pruneOrphans' | translate\"></v-tooltip-icon>\n </span>\n\n <span class=\"opensearch-reindex__label\">{{ 'adminSettings.opensearch.reindex.modifiedAfter' | translate }}</span>\n <span class=\"opensearch-reindex__value\">{{ data.scope?.modifiedAfter ? (data.scope.modifiedAfter | date:'medium') : '-' }}</span>\n\n <div class=\"opensearch-reindex__results-column\">\n <div class=\"opensearch-reindex__progress\">\n <span class=\"opensearch-reindex__progress-label\">\n {{ 'adminSettings.opensearch.reindex.reindexing' | translate }}\n </span>\n <cds-progress-bar\n [value]=\"data.totalCount > 0 ? (data.processedCount / data.totalCount) * 100 : 0\"\n [status]=\"data.status === 'RUNNING' && !data.pruningPhase ? 'active' : (data.status === 'COMPLETED' ? 'finished' : (data.status === 'RUNNING' ? 'finished' : 'error'))\"\n ></cds-progress-bar>\n <div class=\"opensearch-reindex__progress-footer\">\n <span>{{ 'adminSettings.opensearch.reindex.processed' | translate:{current: data.processedCount, total: data.totalCount} }}</span>\n <span>{{ 'adminSettings.opensearch.reindex.skipped' | translate }}: {{ data.skippedCount || 0 }}</span>\n </div>\n </div>\n\n @if (data.pruningPhase || data.pruneTotalCount) {\n <div class=\"opensearch-reindex__progress\">\n <span class=\"opensearch-reindex__progress-label\">\n {{ 'adminSettings.opensearch.reindex.pruning' | translate }}\n <v-tooltip-icon [tooltip]=\"'adminSettings.opensearch.reindex.tooltips.pruned' | translate\"></v-tooltip-icon>\n </span>\n <cds-progress-bar\n [value]=\"data.pruneTotalCount > 0 ? (data.pruneCheckedCount / data.pruneTotalCount) * 100 : 0\"\n [status]=\"data.pruningPhase ? 'active' : (data.status === 'COMPLETED' ? 'finished' : 'error')\"\n ></cds-progress-bar>\n <div class=\"opensearch-reindex__progress-footer\">\n <span>{{ 'adminSettings.opensearch.reindex.processed' | translate:{current: data.pruneCheckedCount, total: data.pruneTotalCount || 0} }}</span>\n <span>{{ 'adminSettings.opensearch.reindex.pruningProgress' | translate:{removed: data.prunedCount || 0} }}</span>\n </div>\n </div>\n }\n\n @if (data.status === 'FAILED') {\n <a class=\"opensearch-reindex__error-link\" (click)=\"navigateToLogs(data)\">\n {{ 'adminSettings.opensearch.reindex.viewErrorLogs' | translate }}\n <svg cdsIcon=\"launch\" size=\"16\"></svg>\n </a>\n }\n </div>\n </div>\n</ng-template>\n", styles: [".opensearch-reindex{width:100%;display:flex;flex-direction:column;gap:24px}.opensearch-reindex ::ng-deep .cds--data-table{table-layout:fixed}.opensearch-reindex ::ng-deep .cds--data-table th.cds--table-expand{width:3.5rem}.opensearch-reindex ::ng-deep .cds--data-table thead th:not(.cds--table-expand){width:25%}.opensearch-reindex ::ng-deep tr[data-child-row]>td{padding-inline:3.5rem 0}.opensearch-reindex__expanded{padding:8px 0 16px;display:grid;grid-template-columns:repeat(4,1fr);column-gap:0;row-gap:8px;align-items:start}.opensearch-reindex__label{grid-column:1;padding-inline:1rem;font-size:14px;font-weight:600;color:var(--cds-text-primary)}.opensearch-reindex__value{grid-column:2;padding-inline:1rem;font-size:14px;color:var(--cds-text-primary)}.opensearch-reindex__results-column{grid-column:3/span 2;grid-row:1/6;padding-inline:1rem;display:flex;flex-direction:column;gap:16px}.opensearch-reindex__value-with-tooltip{display:inline-flex;align-items:center;gap:4px}.opensearch-reindex__progress-label{display:inline-flex;align-items:center;gap:4px;margin-bottom:4px;font-size:14px;font-weight:600;color:var(--cds-text-secondary)}.opensearch-reindex__progress-footer{display:flex;justify-content:space-between;align-items:center;margin-top:4px;font-size:12px;color:var(--cds-text-secondary)}.opensearch-reindex__progress{padding:8px 0}.opensearch-reindex__progress ::ng-deep .cds--progress-bar__track{background-color:var(--cds-border-subtle)}.opensearch-reindex__error-link{display:inline-flex;align-items:center;gap:4px;color:var(--cds-link-primary);font-size:14px;cursor:pointer;text-decoration:none}.opensearch-reindex__error-link:hover{text-decoration:underline}\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"] }]
|
|
841
|
+
}], ctorParameters: () => [{ type: AdminSettingsManagementApiService }, { type: i2$2.DocumentService }, { type: i3$1.TranslateService }, { type: i1$1.Router }, { type: i4.IconService }] });
|
|
842
|
+
|
|
843
|
+
/*
|
|
844
|
+
*
|
|
845
|
+
* * Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
846
|
+
* *
|
|
847
|
+
* * Licensed under EUPL, Version 1.2 (the "License");
|
|
848
|
+
* * you may not use this file except in compliance with the License.
|
|
849
|
+
* * You may obtain a copy of the License at
|
|
850
|
+
* *
|
|
851
|
+
* * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
852
|
+
* *
|
|
853
|
+
* * Unless required by applicable law or agreed to in writing, software
|
|
854
|
+
* * distributed under the License is distributed on an "AS IS" basis,
|
|
855
|
+
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
856
|
+
* * See the License for the specific language governing permissions and
|
|
857
|
+
* * limitations under the License.
|
|
858
|
+
*
|
|
859
|
+
*/
|
|
567
860
|
const routes = [
|
|
568
861
|
{
|
|
569
862
|
path: 'admin-settings',
|
|
@@ -576,6 +869,12 @@ const routes = [
|
|
|
576
869
|
canActivate: [AuthGuardService],
|
|
577
870
|
data: { title: 'adminSettings.title', roles: [ROLE_ADMIN] },
|
|
578
871
|
},
|
|
872
|
+
{
|
|
873
|
+
path: 'opensearch',
|
|
874
|
+
component: AdminSettingsOpensearchComponent,
|
|
875
|
+
canActivate: [AuthGuardService],
|
|
876
|
+
data: { title: 'adminSettings.opensearch.title', roles: [ROLE_ADMIN] },
|
|
877
|
+
},
|
|
579
878
|
];
|
|
580
879
|
class AdminSettingsRouting {
|
|
581
880
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AdminSettingsRouting, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
@@ -684,6 +983,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
684
983
|
* limitations under the License.
|
|
685
984
|
*/
|
|
686
985
|
|
|
986
|
+
/*
|
|
987
|
+
*
|
|
988
|
+
* * Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
989
|
+
* *
|
|
990
|
+
* * Licensed under EUPL, Version 1.2 (the "License");
|
|
991
|
+
* * you may not use this file except in compliance with the License.
|
|
992
|
+
* * You may obtain a copy of the License at
|
|
993
|
+
* *
|
|
994
|
+
* * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
995
|
+
* *
|
|
996
|
+
* * Unless required by applicable law or agreed to in writing, software
|
|
997
|
+
* * distributed under the License is distributed on an "AS IS" basis,
|
|
998
|
+
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
999
|
+
* * See the License for the specific language governing permissions and
|
|
1000
|
+
* * limitations under the License.
|
|
1001
|
+
*
|
|
1002
|
+
*/
|
|
1003
|
+
|
|
1004
|
+
/*
|
|
1005
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
1006
|
+
*
|
|
1007
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1008
|
+
* you may not use this file except in compliance with the License.
|
|
1009
|
+
* You may obtain a copy of the License at
|
|
1010
|
+
*
|
|
1011
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1012
|
+
*
|
|
1013
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1014
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1015
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1016
|
+
* See the License for the specific language governing permissions and
|
|
1017
|
+
* limitations under the License.
|
|
1018
|
+
*/
|
|
1019
|
+
|
|
687
1020
|
/**
|
|
688
1021
|
* Generated bundle index. Do not edit.
|
|
689
1022
|
*/
|