@valtimo/iko 13.25.0 → 13.26.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-iko.mjs +427 -48
- package/fesm2022/valtimo-iko.mjs.map +1 -1
- package/lib/components/iko-list/iko-list.component.d.ts +7 -2
- package/lib/components/iko-list/iko-list.component.d.ts.map +1 -1
- package/lib/components/iko-search/iko-search.component.d.ts +11 -6
- package/lib/components/iko-search/iko-search.component.d.ts.map +1 -1
- package/lib/components/iko-search-formio/iko-search-formio-edit-form.d.ts +81 -0
- package/lib/components/iko-search-formio/iko-search-formio-edit-form.d.ts.map +1 -0
- package/lib/components/iko-search-formio/iko-search-formio.component.d.ts +32 -0
- package/lib/components/iko-search-formio/iko-search-formio.component.d.ts.map +1 -0
- package/lib/components/iko-search-formio/iko-search-formio.formio.d.ts +3 -0
- package/lib/components/iko-search-formio/iko-search-formio.formio.d.ts.map +1 -0
- package/lib/components/iko-search-formio/index.d.ts +4 -0
- package/lib/components/iko-search-formio/index.d.ts.map +1 -0
- package/lib/models/iko-search-formio.model.d.ts +15 -0
- package/lib/models/iko-search-formio.model.d.ts.map +1 -0
- package/lib/models/iko-search-params.model.d.ts +7 -0
- package/lib/models/iko-search-params.model.d.ts.map +1 -0
- package/lib/models/index.d.ts +2 -0
- package/lib/models/index.d.ts.map +1 -1
- package/lib/services/iko-api.service.d.ts.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/public-api.d.ts.map +1 -1
package/fesm2022/valtimo-iko.mjs
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, ViewChild, ViewContainerRef, signal, computed, effect,
|
|
2
|
+
import { Injectable, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, ViewChild, ViewContainerRef, EventEmitter, Output, signal, computed, effect, Inject, HostBinding, NgModule } from '@angular/core';
|
|
3
3
|
import * as i4 from '@angular/common';
|
|
4
4
|
import { CommonModule, DOCUMENT, AsyncPipe, NgIf, NgClass } from '@angular/common';
|
|
5
5
|
import * as i2 from '@valtimo/shared';
|
|
6
|
-
import { BaseApiService, InterceptorSkipHeader, getDisplayTypeParametersView, validateBsn, ROLE_ADMIN, IKO_TOKEN } from '@valtimo/shared';
|
|
6
|
+
import { BaseApiService, InterceptorSkip, InterceptorSkipHeader, getDisplayTypeParametersView, validateBsn, ROLE_ADMIN, IKO_TOKEN } from '@valtimo/shared';
|
|
7
7
|
import * as i1$2 from '@angular/router';
|
|
8
8
|
import { RouterModule } from '@angular/router';
|
|
9
9
|
import { AuthGuardService } from '@valtimo/security';
|
|
10
10
|
import * as i2$2 from '@valtimo/components';
|
|
11
|
-
import { CarbonListModule, FormIoModule, FitPageDirective, RenderInPageHeaderDirective, SelectModule, CARBON_CONSTANTS, ValtimoCdsModalDirective, AutoKeyInputComponent, ConfirmationModalModule, ViewType, ValuePathSelectorPrefix, InputLabelModule, runAfterCarbonModalClosed, CarbonMultiInputModule, InputModule as InputModule$1, DatePickerModule, ParagraphModule, DateTimePickerComponent, FormModule } from '@valtimo/components';
|
|
11
|
+
import { CarbonListModule, FormIoModule, FitPageDirective, RenderInPageHeaderDirective, SelectModule, CARBON_CONSTANTS, ValtimoCdsModalDirective, AutoKeyInputComponent, ConfirmationModalModule, ViewType, ValuePathSelectorPrefix, InputLabelModule, runAfterCarbonModalClosed, CarbonMultiInputModule, InputModule as InputModule$1, DatePickerModule, ParagraphModule, DateTimePickerComponent, FormModule, registerCustomFormioComponent } from '@valtimo/components';
|
|
12
12
|
import * as i6 from 'carbon-components-angular';
|
|
13
13
|
import { InputModule, PaginationModule, TilesModule, ButtonModule, ModalModule, TabsModule, IconModule, LayerModule, TooltipModule, DropdownModule, ToggleModule, LoadingModule, NumberModule, ProgressBarModule, CheckboxModule, FileUploaderModule, NotificationModule, TimePickerModule } from 'carbon-components-angular';
|
|
14
|
-
import { BehaviorSubject, filter, of, switchMap, combineLatest, distinctUntilChanged, tap, map as map$1, startWith, take, Subscription, delay } from 'rxjs';
|
|
14
|
+
import { BehaviorSubject, filter, of, switchMap, combineLatest, distinctUntilChanged, tap, map as map$1, ReplaySubject, startWith, take, Subscription, delay, catchError } from 'rxjs';
|
|
15
15
|
import * as i2$1 from '@valtimo/layout';
|
|
16
16
|
import { WidgetCollectionComponent, WidgetCustomComponent, WidgetFieldComponent, WidgetFormioComponent, WidgetInteractiveTableComponent, WidgetTableComponent, WidgetMapComponent, WidgetType, WidgetContainerComponent, ManagementWidgetDetailsComponent, WIDGET_MANAGEMENT_SERVICE, WidgetManagementComponent } from '@valtimo/layout';
|
|
17
17
|
import * as i5 from '@ngx-translate/core';
|
|
18
18
|
import { TranslateModule, TranslatePipe } from '@ngx-translate/core';
|
|
19
19
|
import * as i1 from '@angular/common/http';
|
|
20
|
-
import { HttpParams } from '@angular/common/http';
|
|
20
|
+
import { HttpHeaders, HttpParams } from '@angular/common/http';
|
|
21
21
|
import { map, take as take$1 } from 'rxjs/operators';
|
|
22
22
|
import * as i1$1 from 'ngx-logger';
|
|
23
23
|
import { isEqual } from 'lodash';
|
|
24
24
|
import * as i3 from '@valtimo/case';
|
|
25
25
|
import { CaseListActionsComponent, CaseListService } from '@valtimo/case';
|
|
26
|
+
import { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
|
|
26
27
|
import * as i1$3 from '@angular/forms';
|
|
27
28
|
import { Validators, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
28
|
-
import { Information16, TrashCan16, InformationFilled16, Upload16, Search16 } from '@carbon/icons';
|
|
29
|
-
import { toObservable } from '@angular/core/rxjs-interop';
|
|
29
|
+
import { Information16, TrashCan16, InformationFilled16, Upload16, Search16, Launch16 } from '@carbon/icons';
|
|
30
30
|
|
|
31
31
|
/*
|
|
32
32
|
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
@@ -72,7 +72,7 @@ class IkoApiService extends BaseApiService {
|
|
|
72
72
|
return this.httpClient.get(this.getApiUrl(`/v1/iko-view/${ikoViewKey}/tab`));
|
|
73
73
|
}
|
|
74
74
|
getIkoSearchActions(ikoViewKey) {
|
|
75
|
-
return this.httpClient.get(this.getApiUrl(`/v1/iko-view/${ikoViewKey}/search-action`));
|
|
75
|
+
return this.httpClient.get(this.getApiUrl(`/v1/iko-view/${ikoViewKey}/search-action`), { headers: new HttpHeaders().set(InterceptorSkip, '404') });
|
|
76
76
|
}
|
|
77
77
|
getIkoWidget(ikoViewKey, tabKey) {
|
|
78
78
|
return this.httpClient.get(this.getApiUrl(`/v1/iko-view/${ikoViewKey}/tab/${tabKey}/widget`));
|
|
@@ -1221,7 +1221,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1221
1221
|
}] } });
|
|
1222
1222
|
|
|
1223
1223
|
/*
|
|
1224
|
-
* Copyright 2015-
|
|
1224
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
1225
1225
|
*
|
|
1226
1226
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1227
1227
|
* you may not use this file except in compliance with the License.
|
|
@@ -1236,27 +1236,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1236
1236
|
* limitations under the License.
|
|
1237
1237
|
*/
|
|
1238
1238
|
class IkoListComponent {
|
|
1239
|
+
set searchParams(params) {
|
|
1240
|
+
if (params)
|
|
1241
|
+
this._searchParams$.next(params);
|
|
1242
|
+
}
|
|
1239
1243
|
constructor(breadcrumbService, ikoApiService, route, router) {
|
|
1240
1244
|
this.breadcrumbService = breadcrumbService;
|
|
1241
1245
|
this.ikoApiService = ikoApiService;
|
|
1242
1246
|
this.route = route;
|
|
1243
1247
|
this.router = router;
|
|
1248
|
+
this.rowSelectedEvent = new EventEmitter();
|
|
1244
1249
|
this.loading$ = new BehaviorSubject(true);
|
|
1245
|
-
this.
|
|
1246
|
-
|
|
1247
|
-
this.
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1250
|
+
this._searchParams$ = new ReplaySubject(1);
|
|
1251
|
+
this.listConfig$ = this._searchParams$.pipe(switchMap(inputParams => {
|
|
1252
|
+
if (inputParams && this.ikoViewKey) {
|
|
1253
|
+
return of({
|
|
1254
|
+
ikoViewKey: this.ikoViewKey,
|
|
1255
|
+
searchKey: inputParams.paramKey,
|
|
1256
|
+
filters: inputParams.filters,
|
|
1257
|
+
});
|
|
1258
|
+
}
|
|
1259
|
+
return combineLatest([
|
|
1260
|
+
this.route.params,
|
|
1261
|
+
this.route.queryParams,
|
|
1262
|
+
this.ikoApiService.cachedMenuItems$,
|
|
1263
|
+
]).pipe(map$1(([params, queryParams, menuItems]) => {
|
|
1264
|
+
const currentMenuItem = menuItems.find(item => item.key === params.key);
|
|
1265
|
+
this.breadcrumbService.setSecondBreadcrumb({
|
|
1266
|
+
route: [`/iko/${params.key}`],
|
|
1267
|
+
content: currentMenuItem?.title ?? '',
|
|
1268
|
+
href: `/iko/${params.key}`,
|
|
1269
|
+
});
|
|
1270
|
+
return { ikoViewKey: params.key, searchKey: params.searchKey, filters: queryParams };
|
|
1271
|
+
}));
|
|
1272
|
+
}), tap(() => this.loading$.next(true)), switchMap(({ ikoViewKey, searchKey, filters }) => this.ikoApiService.searchIkoSearchAction(ikoViewKey, searchKey, { filters })), map$1(res => ({
|
|
1260
1273
|
fields: res.headers.reduce((acc, curr) => [
|
|
1261
1274
|
...acc,
|
|
1262
1275
|
...(curr.displayType.type === 'hidden'
|
|
@@ -1274,23 +1287,44 @@ class IkoListComponent {
|
|
|
1274
1287
|
], []),
|
|
1275
1288
|
items: res.rows.content.map(stuff => stuff.items.reduce((acc, curr) => ({ ...acc, [curr.key]: curr.value }), {})),
|
|
1276
1289
|
})), tap(() => this.loading$.next(false)));
|
|
1290
|
+
combineLatest([this.route.params, this.route.queryParams])
|
|
1291
|
+
.pipe(takeUntilDestroyed())
|
|
1292
|
+
.subscribe(([params, queryParams]) => {
|
|
1293
|
+
if (!this.ikoViewKey && params?.key && params?.searchKey) {
|
|
1294
|
+
this._searchParams$.next({ paramKey: params.searchKey, filters: queryParams });
|
|
1295
|
+
}
|
|
1296
|
+
});
|
|
1277
1297
|
}
|
|
1278
1298
|
ngOnDestroy() {
|
|
1279
|
-
this.
|
|
1299
|
+
if (!this.ikoViewKey) {
|
|
1300
|
+
this.breadcrumbService.clearSecondBreadcrumb();
|
|
1301
|
+
}
|
|
1280
1302
|
}
|
|
1281
1303
|
onRowClicked(item) {
|
|
1282
|
-
this.
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
}
|
|
1304
|
+
if (this.rowSelectedEvent.observed) {
|
|
1305
|
+
const keys = Object.keys(item).filter(k => k !== 'id');
|
|
1306
|
+
this.rowSelectedEvent.emit({ id: item.id, label: keys.length > 0 ? item[keys[0]] : item.id, rowData: item });
|
|
1307
|
+
}
|
|
1308
|
+
else {
|
|
1309
|
+
this.router.navigate([`details/${item.id}`], {
|
|
1310
|
+
relativeTo: this.route,
|
|
1311
|
+
queryParamsHandling: 'preserve',
|
|
1312
|
+
});
|
|
1313
|
+
}
|
|
1286
1314
|
}
|
|
1287
1315
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: IkoListComponent, deps: [{ token: i2$2.BreadcrumbService }, { token: IkoApiService }, { token: i1$2.ActivatedRoute }, { token: i1$2.Router }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1288
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: IkoListComponent, isStandalone: true, selector: "valtimo-iko-list", ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-carbon-list\n *ngIf=\"{\n listConfig: listConfig$ | async,\n loading: loading$ | async,\n } as obs\"\n [fields]=\"obs.listConfig?.fields\"\n [items]=\"obs.listConfig?.items\"\n [loading]=\"obs.loading\"\n [hideToolbar]=\"true\"\n (rowClicked)=\"onRowClicked($event)\"\n>\n <valtimo-no-results\n title=\"{{ 'ikoManagement.search.noResultsTitle' | translate }}\"\n illustration=\"valtimo-layout/img/emptystate-no-result.svg\"\n description=\"{{ 'ikoManagement.search.noResultsDescription' | translate }}\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i2$2.CarbonListComponent, selector: "valtimo-carbon-list", inputs: ["items", "fields", "tableTranslations", "paginatorConfig", "pagination", "loading", "skeletonRowCount", "actions", "actionItems", "showActionItems", "header", "hideColumnHeader", "initialSortState", "sortState", "isSearchable", "enableSingleSelection", "lastColumnTemplate", "paginationIdentifier", "showSelectionColumn", "striped", "hideToolbar", "lockedTooltipTranslationKey", "movingRowsEnabled", "dragAndDrop", "dragAndDropDisabled"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged", "moveRow", "itemsReordered"] }, { kind: "component", type: i2$2.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
1316
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: IkoListComponent, isStandalone: true, selector: "valtimo-iko-list", inputs: { ikoViewKey: "ikoViewKey", searchParams: "searchParams" }, outputs: { rowSelectedEvent: "rowSelectedEvent" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-carbon-list\n *ngIf=\"{\n listConfig: listConfig$ | async,\n loading: loading$ | async,\n } as obs\"\n [fields]=\"obs.listConfig?.fields\"\n [items]=\"obs.listConfig?.items\"\n [loading]=\"obs.loading\"\n [hideToolbar]=\"true\"\n (rowClicked)=\"onRowClicked($event)\"\n>\n <valtimo-no-results\n title=\"{{ 'ikoManagement.search.noResultsTitle' | translate }}\"\n illustration=\"valtimo-layout/img/emptystate-no-result.svg\"\n description=\"{{ 'ikoManagement.search.noResultsDescription' | translate }}\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i2$2.CarbonListComponent, selector: "valtimo-carbon-list", inputs: ["items", "fields", "tableTranslations", "paginatorConfig", "pagination", "loading", "skeletonRowCount", "actions", "actionItems", "showActionItems", "header", "hideColumnHeader", "initialSortState", "sortState", "isSearchable", "enableSingleSelection", "lastColumnTemplate", "paginationIdentifier", "showSelectionColumn", "striped", "hideToolbar", "lockedTooltipTranslationKey", "movingRowsEnabled", "dragAndDrop", "dragAndDropDisabled"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged", "moveRow", "itemsReordered"] }, { kind: "component", type: i2$2.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
1289
1317
|
}
|
|
1290
1318
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: IkoListComponent, decorators: [{
|
|
1291
1319
|
type: Component,
|
|
1292
1320
|
args: [{ selector: 'valtimo-iko-list', standalone: true, imports: [CommonModule, CarbonListModule, TranslatePipe], template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-carbon-list\n *ngIf=\"{\n listConfig: listConfig$ | async,\n loading: loading$ | async,\n } as obs\"\n [fields]=\"obs.listConfig?.fields\"\n [items]=\"obs.listConfig?.items\"\n [loading]=\"obs.loading\"\n [hideToolbar]=\"true\"\n (rowClicked)=\"onRowClicked($event)\"\n>\n <valtimo-no-results\n title=\"{{ 'ikoManagement.search.noResultsTitle' | translate }}\"\n illustration=\"valtimo-layout/img/emptystate-no-result.svg\"\n description=\"{{ 'ikoManagement.search.noResultsDescription' | translate }}\"\n ></valtimo-no-results>\n</valtimo-carbon-list>\n" }]
|
|
1293
|
-
}], ctorParameters: () => [{ type: i2$2.BreadcrumbService }, { type: IkoApiService }, { type: i1$2.ActivatedRoute }, { type: i1$2.Router }]
|
|
1321
|
+
}], ctorParameters: () => [{ type: i2$2.BreadcrumbService }, { type: IkoApiService }, { type: i1$2.ActivatedRoute }, { type: i1$2.Router }], propDecorators: { ikoViewKey: [{
|
|
1322
|
+
type: Input
|
|
1323
|
+
}], searchParams: [{
|
|
1324
|
+
type: Input
|
|
1325
|
+
}], rowSelectedEvent: [{
|
|
1326
|
+
type: Output
|
|
1327
|
+
}] } });
|
|
1294
1328
|
|
|
1295
1329
|
/*
|
|
1296
1330
|
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
@@ -1814,6 +1848,38 @@ var SearchDropdownDataProvider;
|
|
|
1814
1848
|
SearchDropdownDataProvider["JSON"] = "dropdownJsonFileDataProvider";
|
|
1815
1849
|
})(SearchDropdownDataProvider || (SearchDropdownDataProvider = {}));
|
|
1816
1850
|
|
|
1851
|
+
/*
|
|
1852
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
1853
|
+
*
|
|
1854
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1855
|
+
* you may not use this file except in compliance with the License.
|
|
1856
|
+
* You may obtain a copy of the License at
|
|
1857
|
+
*
|
|
1858
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1859
|
+
*
|
|
1860
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1861
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1862
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1863
|
+
* See the License for the specific language governing permissions and
|
|
1864
|
+
* limitations under the License.
|
|
1865
|
+
*/
|
|
1866
|
+
|
|
1867
|
+
/*
|
|
1868
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
1869
|
+
*
|
|
1870
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1871
|
+
* you may not use this file except in compliance with the License.
|
|
1872
|
+
* You may obtain a copy of the License at
|
|
1873
|
+
*
|
|
1874
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1875
|
+
*
|
|
1876
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1877
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1878
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1879
|
+
* See the License for the specific language governing permissions and
|
|
1880
|
+
* limitations under the License.
|
|
1881
|
+
*/
|
|
1882
|
+
|
|
1817
1883
|
/*
|
|
1818
1884
|
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
1819
1885
|
*
|
|
@@ -4276,13 +4342,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4276
4342
|
* limitations under the License.
|
|
4277
4343
|
*/
|
|
4278
4344
|
class IkoSearchComponent {
|
|
4279
|
-
|
|
4345
|
+
set ikoViewKey(key) {
|
|
4346
|
+
this._ikoViewKey$.next(key);
|
|
4347
|
+
}
|
|
4348
|
+
constructor(cdr, route, router, pageTitleService, iconService, ikoApiService, translateService) {
|
|
4349
|
+
this.cdr = cdr;
|
|
4280
4350
|
this.route = route;
|
|
4281
4351
|
this.router = router;
|
|
4282
4352
|
this.pageTitleService = pageTitleService;
|
|
4283
4353
|
this.iconService = iconService;
|
|
4284
4354
|
this.ikoApiService = ikoApiService;
|
|
4285
4355
|
this.translateService = translateService;
|
|
4356
|
+
this.embedded = false;
|
|
4357
|
+
this.searchSubmitEvent = new EventEmitter();
|
|
4358
|
+
this._ikoViewKey$ = new BehaviorSubject(null);
|
|
4286
4359
|
this.formValues = {};
|
|
4287
4360
|
this.dropdownSelectItemsMap = new Map();
|
|
4288
4361
|
this.values$ = new BehaviorSubject({});
|
|
@@ -4297,24 +4370,37 @@ class IkoSearchComponent {
|
|
|
4297
4370
|
id: type,
|
|
4298
4371
|
text: this.translateService.instant(`searchFields.${type}`),
|
|
4299
4372
|
}))));
|
|
4300
|
-
this._key$ = this.
|
|
4373
|
+
this._key$ = this._ikoViewKey$.pipe(switchMap(ikoViewKey => ikoViewKey
|
|
4374
|
+
? of(ikoViewKey)
|
|
4375
|
+
: this.route.params.pipe(map$1(params => params?.key), filter(key => !!key))));
|
|
4376
|
+
this.notFoundKey$ = new BehaviorSubject(null);
|
|
4301
4377
|
this.ikoSearchActions$ = this._key$.pipe(switchMap(key => combineLatest([
|
|
4302
4378
|
of(key),
|
|
4303
4379
|
this.ikoApiService.cachedMenuItems$,
|
|
4304
|
-
this.ikoApiService.getIkoSearchActions(key)
|
|
4380
|
+
this.ikoApiService.getIkoSearchActions(key).pipe(catchError((error) => {
|
|
4381
|
+
if (error.status === 404) {
|
|
4382
|
+
this.notFoundKey$.next(key);
|
|
4383
|
+
return of([]);
|
|
4384
|
+
}
|
|
4385
|
+
throw error;
|
|
4386
|
+
})),
|
|
4305
4387
|
])), map$1(([key, menuItems, ikoSearchActions]) => {
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4388
|
+
if (!this.embedded) {
|
|
4389
|
+
const currentMenuItem = menuItems.find(item => item.key === key);
|
|
4390
|
+
if (currentMenuItem && currentMenuItem?.title)
|
|
4391
|
+
this.pageTitleService.setCustomPageTitle(currentMenuItem.title, true);
|
|
4392
|
+
}
|
|
4309
4393
|
return ikoSearchActions;
|
|
4310
|
-
}));
|
|
4394
|
+
}), tap(() => this.cdr.detectChanges()));
|
|
4311
4395
|
this.iconService.register(Search16);
|
|
4312
4396
|
}
|
|
4313
4397
|
ngOnInit() {
|
|
4314
4398
|
this.openDropdownSubscription();
|
|
4315
4399
|
}
|
|
4316
4400
|
ngOnDestroy() {
|
|
4317
|
-
this.
|
|
4401
|
+
if (!this.embedded) {
|
|
4402
|
+
this.pageTitleService.enableReset();
|
|
4403
|
+
}
|
|
4318
4404
|
}
|
|
4319
4405
|
searchDisabled(params) {
|
|
4320
4406
|
const hasMissingRequired = params.some(param => {
|
|
@@ -4348,10 +4434,15 @@ class IkoSearchComponent {
|
|
|
4348
4434
|
queryParams[param.key] = value;
|
|
4349
4435
|
}
|
|
4350
4436
|
}
|
|
4351
|
-
this.
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4437
|
+
if (this.searchSubmitEvent.observed) {
|
|
4438
|
+
this.searchSubmitEvent.emit({ paramKey, filters: queryParams });
|
|
4439
|
+
}
|
|
4440
|
+
else {
|
|
4441
|
+
this.router.navigate([paramKey], {
|
|
4442
|
+
relativeTo: this.route,
|
|
4443
|
+
queryParams,
|
|
4444
|
+
});
|
|
4445
|
+
}
|
|
4355
4446
|
});
|
|
4356
4447
|
}
|
|
4357
4448
|
singleValueChange(searchFieldKey, value, dataType) {
|
|
@@ -4477,8 +4568,8 @@ class IkoSearchComponent {
|
|
|
4477
4568
|
}
|
|
4478
4569
|
return false;
|
|
4479
4570
|
}
|
|
4480
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: IkoSearchComponent, deps: [{ token: i1$2.ActivatedRoute }, { token: i1$2.Router }, { token: i2$2.PageTitleService }, { token: i6.IconService }, { token: IkoApiService }, { token: i5.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4481
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: IkoSearchComponent, isStandalone: true, selector: "valtimo-iko-search", ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n@if (ikoSearchActions$ | async; as ikoSearchActions) {\n @if (ikoSearchActions.length === 0) {\n <valtimo-no-results [title]=\"'iko.searchFieldsNoResults' | translate\"></valtimo-no-results>\n\n } @else {\n <h4>{{ 'iko.searchVia' | translate }}</h4>\n\n <cds-tabs class=\"iko-search-tabs\" type=\"line\">\n @for (param of ikoSearchActions; track param.key ?? param.fields?.[0]?.key) {\n <cds-tab\n (keyup.enter)=\"!searchDisabled(param.searchFields) && searchGroup(param.key, param.searchFields)\"\n class=\"query-group\"\n [heading]=\"param.title\"\n [cdsLayer]=\"1\"\n >\n <div class=\"query-group__row\">\n @for (field of param.searchFields; track field.key) {\n <div\n class=\"query-group__field\"\n [ngClass]=\"{\n 'query-group__field--time': field.dataType === 'time',\n 'query-group__field--date': field.dataType === 'date',\n 'query-group__field--datetime': field.dataType === 'datetime',\n }\"\n >\n <v-input-label *ngIf=\"field.title\" [title]=\"field.title\"></v-input-label>\n\n @if (field.dataType === 'text' && field.fieldType === 'single') {\n <v-input\n [dataTestId]=\"'iko-search-field-' + field.key\"\n [name]=\"field.key\"\n [placeholder]=\"'searchFields.textPlaceholder' | translate\"\n [defaultValue]=\"formValues[field.key]\"\n (valueChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n ></v-input>\n } @else if (field.dataType === 'text' && field.fieldType === 'range') {\n <v-form\n className=\"multiple-search-fields\"\n (valueChange)=\"multipleValueChange(field.key, $event, field.dataType)\"\n >\n <v-input\n name=\"start\"\n [placeholder]=\"'searchFields.textPlaceholder' | translate\"\n ></v-input>\n\n <div class=\"to-text\">\n <v-paragraph>{{ 'searchFields.to' | translate }}</v-paragraph>\n </div>\n\n <v-input\n name=\"end\"\n [placeholder]=\"'searchFields.textPlaceholder' | translate\"\n ></v-input>\n </v-form>\n } @else if (field.dataType === 'text' && (field.fieldType === 'single-select-dropdown' || field.fieldType === 'single_select_dropdown')) {\n <v-select\n *ngIf=\"dropdownSelectItemsMap[field.key]\"\n [items]=\"dropdownSelectItemsMap[field.key]\"\n [margin]=\"false\"\n [required]=\"field.required\"\n [name]=\"field.key\"\n [clearSelectionSubject$]=\"clear$\"\n (selectedChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n [appendInline]=\"false\"\n ></v-select>\n } @else if (field.dataType === 'text' && (field.fieldType === 'multi-select-dropdown' || field.fieldType === 'multi_select_dropdown')) {\n <v-select\n *ngIf=\"dropdownSelectItemsMap[field.key]\"\n [items]=\"dropdownSelectItemsMap[field.key]\"\n [margin]=\"false\"\n [multiple]=\"true\"\n [required]=\"field.required\"\n [name]=\"field.key\"\n [clearSelectionSubject$]=\"clear$\"\n (selectedChange)=\"multipleValueChange(field.key, $event, field.dataType)\"\n [appendInline]=\"false\"\n ></v-select>\n } @else if (field.dataType === 'number' && field.fieldType === 'single') {\n <v-input\n type=\"number\"\n [hideNumberSpinBox]=\"true\"\n [placeholder]=\"'searchFields.numberPlaceholder' | translate\"\n (valueChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n ></v-input>\n\n } @else if (field.dataType === 'number' && field.fieldType === 'range') {\n <v-form\n className=\"multiple-search-fields\"\n (valueChange)=\"multipleValueChange(field.key, $event, field.dataType)\"\n >\n <v-input\n type=\"number\"\n name=\"start\"\n [placeholder]=\"'searchFields.numberPlaceholder' | translate\"\n ></v-input>\n\n <div class=\"to-text\">\n <v-paragraph>{{ 'searchFields.to' | translate }}</v-paragraph>\n </div>\n\n <v-input\n type=\"number\"\n name=\"end\"\n [placeholder]=\"'searchFields.numberPlaceholder' | translate\"\n ></v-input>\n </v-form>\n } @else if (field.dataType === 'boolean' && field.fieldType === 'single') {\n <v-select\n *ngIf=\"booleanItems$ | async as booleanItems\"\n [items]=\"booleanItems\"\n (selectedChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n ></v-select>\n } @else if (field.dataType === 'time' && field.fieldType === 'single') {\n <cds-timepicker\n [placeholder]=\"'searchFields.timePlaceholder' | translate\"\n [ngModel]=\"formValues[field.key]\"\n (ngModelChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n ></cds-timepicker>\n\n } @else if (field.dataType === 'time' && field.fieldType === 'range') {\n <v-form\n className=\"multiple-search-fields\"\n (valueChange)=\"multipleValueChange(field.key, $event, field.dataType)\"\n >\n <cds-timepicker [(ngModel)]=\"formValues[field.key + '_start']\"></cds-timepicker>\n\n <div class=\"to-text\">\n <v-paragraph>{{ 'searchFields.to' | translate }}</v-paragraph>\n </div>\n\n <cds-timepicker [(ngModel)]=\"formValues[field.key + '_end']\"></cds-timepicker>\n </v-form>\n } @else if (field.dataType === 'date' && field.fieldType === 'single') {\n <valtimo-date-time-picker\n [defaultDate]=\"formValues[field.key] ?? ''\"\n [enableTime]=\"false\"\n [showFieldLabel]=\"false\"\n (valueChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n ></valtimo-date-time-picker>\n\n } @else if (field.dataType === 'date' && field.fieldType === 'range') {\n <v-form\n className=\"multiple-search-fields\"\n (valueChange)=\"multipleValueChange(field.key, $event, field.dataType)\"\n >\n <valtimo-date-time-picker\n name=\"start\"\n [enableTime]=\"false\"\n [showFieldLabel]=\"false\"\n ></valtimo-date-time-picker>\n\n <div class=\"to-text\">\n <v-paragraph>{{ 'searchFields.to' | translate }}</v-paragraph>\n </div>\n\n <valtimo-date-time-picker\n name=\"end\"\n [enableTime]=\"false\"\n [showFieldLabel]=\"false\"\n ></valtimo-date-time-picker>\n </v-form>\n } @else if (field.dataType === 'datetime' && field.fieldType === 'single') {\n <valtimo-date-time-picker\n [enableTime]=\"true\"\n [showFieldLabel]=\"false\"\n (valueChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n ></valtimo-date-time-picker>\n\n } @else if (field.dataType === 'datetime' && field.fieldType === 'range') {\n <v-form\n className=\"multiple-search-fields\"\n (valueChange)=\"multipleValueChange(field.key, $event, field.dataType)\"\n >\n <valtimo-date-time-picker\n name=\"start\"\n [enableTime]=\"true\"\n [showFieldLabel]=\"false\"\n ></valtimo-date-time-picker>\n\n <div class=\"to-text\">\n <v-paragraph>{{ 'searchFields.to' | translate }}</v-paragraph>\n </div>\n\n <valtimo-date-time-picker\n name=\"end\"\n [enableTime]=\"true\"\n [showFieldLabel]=\"false\"\n ></valtimo-date-time-picker>\n </v-form>\n }\n </div>\n }\n </div>\n\n <button\n cdsButton=\"primary\"\n class=\"query-group__search-button\"\n [disabled]=\"searchDisabled(param.searchFields)\"\n (click)=\"searchGroup(param.key, param.searchFields)\"\n >\n {{ 'searchFields.searchButtonText' | translate }}\n <svg cdsIcon=\"search\" size=\"16\"></svg>\n </button>\n </cds-tab>\n }\n </cds-tabs>\n }\n}\n", styles: [":host{display:flex;flex-direction:column;gap:24px}.query-group__row{display:flex;flex-wrap:wrap;gap:16px;align-items:flex-end}.query-group__field{display:flex;flex-direction:column;flex:1 1 200px;max-width:320px}.query-group__field input{width:100%}.query-group__field--time,.query-group__field--date,.query-group__field--datetime{flex:0 0 auto;max-width:none}.query-group__label{font-size:14px;font-weight:600;color:var(--cds-text-primary)}.query-group__search-button{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;height:40px;max-height:40px;min-height:40px;padding:8px 16px;min-width:120px;white-space:nowrap;overflow:hidden;margin-left:auto}:host ::ng-deep .cds--tab-content{display:flex;flex-direction:column;gap:16px;outline:none!important;background:var(--cds-layer-01)}v-input{width:100%}::ng-deep .multiple-search-fields{display:flex!important;flex-direction:row!important;align-items:center}.to-text{margin-inline-start:8px;margin-inline-end:8px}.iko-datetime{display:flex;gap:8px;align-items:flex-end}::ng-deep .iko-search-tabs .cds--tab-content{margin-top:24px}\n/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: InputModule$1 }, { kind: "component", type: i2$2.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "smallMargin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$", "carbonTheme", "placeholder", "dataTestId", "trim", "presetsTitle", "presetOptions"], outputs: ["valueChange"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: InputModule }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i6.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i2$2.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "ngmodule", type: TabsModule }, { kind: "component", type: i6.Tabs, selector: "cds-tabs, ibm-tabs", inputs: ["position", "cacheActive", "followFocus", "isNavigation", "ariaLabel", "ariaLabelledby", "type", "theme", "skeleton"] }, { kind: "component", type: i6.Tab, selector: "cds-tab, ibm-tab", inputs: ["heading", "title", "context", "active", "disabled", "tabIndex", "id", "cacheActive", "tabContent", "templateContext"], outputs: ["selected"] }, { kind: "ngmodule", type: LayerModule }, { kind: "directive", type: i6.LayerDirective, selector: "[cdsLayer], [ibmLayer]", inputs: ["ibmLayer", "cdsLayer"], exportAs: ["layer"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "ngmodule", type: ParagraphModule }, { kind: "component", type: i2$2.ParagraphComponent, selector: "v-paragraph", inputs: ["center", "fullWidth", "margin", "italic", "loading", "dataTestId"] }, { kind: "ngmodule", type: TimePickerModule }, { kind: "component", type: i6.TimePicker, selector: "cds-timepicker, ibm-timepicker", inputs: ["invalid", "invalidText", "label", "hideLabel", "placeholder", "pattern", "id", "disabled", "value", "maxLength", "skeleton", "theme", "size"], outputs: ["valueChange"] }, { kind: "component", type: DateTimePickerComponent, selector: "valtimo-date-time-picker", inputs: ["fullWidth", "margin", "name", "title", "placeholder", "titleTranslationKey", "disabled", "tooltip", "required", "smallLabel", "enableTime", "carbonTheme", "dateFormat", "showFieldLabel", "datePlaceholder", "timePlaceholder", "labelText", "defaultDate", "defaultDateIsToday", "clear$"], outputs: ["valueChange"] }, { kind: "ngmodule", type: InputLabelModule }, { kind: "component", type: i2$2.InputLabelComponent, selector: "v-input-label", inputs: ["name", "tooltip", "tooltipTranslationKey", "largeMargin", "small", "noMargin", "title", "titleTranslationKey", "required", "disabled", "carbonTheme"] }, { kind: "ngmodule", type: FormModule }, { kind: "component", type: i2$2.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i2$2.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "disabled", "dropUp", "invalid", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "clearText", "clearable", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder", "smallMargin", "carbonTheme", "appendInline", "warn", "warnText", "dataTestId"], outputs: ["selectedChange"] }] }); }
|
|
4571
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: IkoSearchComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$2.ActivatedRoute }, { token: i1$2.Router }, { token: i2$2.PageTitleService }, { token: i6.IconService }, { token: IkoApiService }, { token: i5.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4572
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: IkoSearchComponent, isStandalone: true, selector: "valtimo-iko-search", inputs: { searchTitle: "searchTitle", embedded: "embedded", ikoViewKey: "ikoViewKey" }, outputs: { searchSubmitEvent: "searchSubmitEvent" }, host: { properties: { "class.embedded": "this.embedded" } }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n@if (notFoundKey$ | async; as notFoundKey) {\n <p class=\"iko-search-not-found\">{{ 'iko.viewNotFound' | translate: {key: notFoundKey} }}</p>\n} @else {\n @if (ikoSearchActions$ | async; as ikoSearchActions) {\n @if (ikoSearchActions.length === 0) {\n <valtimo-no-results [title]=\"'iko.searchFieldsNoResults' | translate\"></valtimo-no-results>\n } @else {\n <h4>{{ searchTitle || ('iko.searchVia' | translate) }}</h4>\n\n <cds-tabs class=\"iko-search-tabs\" type=\"line\">\n @for (param of ikoSearchActions; track param.key ?? param.fields?.[0]?.key) {\n <cds-tab\n (keyup.enter)=\"\n !searchDisabled(param.searchFields) && searchGroup(param.key, param.searchFields)\n \"\n class=\"query-group\"\n [heading]=\"param.title\"\n [cdsLayer]=\"1\"\n >\n <div class=\"query-group__row\">\n @for (field of param.searchFields; track field.key) {\n <div\n class=\"query-group__field\"\n [ngClass]=\"{\n 'query-group__field--time': field.dataType === 'time',\n 'query-group__field--date': field.dataType === 'date',\n 'query-group__field--datetime': field.dataType === 'datetime',\n }\"\n >\n <v-input-label *ngIf=\"field.title\" [title]=\"field.title\"></v-input-label>\n\n @if (field.dataType === 'text' && field.fieldType === 'single') {\n <v-input\n [dataTestId]=\"'iko-search-field-' + field.key\"\n [name]=\"field.key\"\n [placeholder]=\"'searchFields.textPlaceholder' | translate\"\n [defaultValue]=\"formValues[field.key]\"\n (valueChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n ></v-input>\n } @else if (field.dataType === 'text' && field.fieldType === 'range') {\n <v-form\n className=\"multiple-search-fields\"\n (valueChange)=\"multipleValueChange(field.key, $event, field.dataType)\"\n >\n <v-input\n name=\"start\"\n [placeholder]=\"'searchFields.textPlaceholder' | translate\"\n ></v-input>\n\n <div class=\"to-text\">\n <v-paragraph>{{ 'searchFields.to' | translate }}</v-paragraph>\n </div>\n\n <v-input\n name=\"end\"\n [placeholder]=\"'searchFields.textPlaceholder' | translate\"\n ></v-input>\n </v-form>\n } @else if (\n field.dataType === 'text' &&\n (field.fieldType === 'single-select-dropdown' ||\n field.fieldType === 'single_select_dropdown')\n ) {\n <v-select\n *ngIf=\"dropdownSelectItemsMap[field.key]\"\n [items]=\"dropdownSelectItemsMap[field.key]\"\n [margin]=\"false\"\n [required]=\"field.required\"\n [name]=\"field.key\"\n [clearSelectionSubject$]=\"clear$\"\n (selectedChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n [appendInline]=\"false\"\n ></v-select>\n } @else if (\n field.dataType === 'text' &&\n (field.fieldType === 'multi-select-dropdown' ||\n field.fieldType === 'multi_select_dropdown')\n ) {\n <v-select\n *ngIf=\"dropdownSelectItemsMap[field.key]\"\n [items]=\"dropdownSelectItemsMap[field.key]\"\n [margin]=\"false\"\n [multiple]=\"true\"\n [required]=\"field.required\"\n [name]=\"field.key\"\n [clearSelectionSubject$]=\"clear$\"\n (selectedChange)=\"multipleValueChange(field.key, $event, field.dataType)\"\n [appendInline]=\"false\"\n ></v-select>\n } @else if (field.dataType === 'number' && field.fieldType === 'single') {\n <v-input\n type=\"number\"\n [hideNumberSpinBox]=\"true\"\n [placeholder]=\"'searchFields.numberPlaceholder' | translate\"\n (valueChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n ></v-input>\n } @else if (field.dataType === 'number' && field.fieldType === 'range') {\n <v-form\n className=\"multiple-search-fields\"\n (valueChange)=\"multipleValueChange(field.key, $event, field.dataType)\"\n >\n <v-input\n type=\"number\"\n name=\"start\"\n [placeholder]=\"'searchFields.numberPlaceholder' | translate\"\n ></v-input>\n\n <div class=\"to-text\">\n <v-paragraph>{{ 'searchFields.to' | translate }}</v-paragraph>\n </div>\n\n <v-input\n type=\"number\"\n name=\"end\"\n [placeholder]=\"'searchFields.numberPlaceholder' | translate\"\n ></v-input>\n </v-form>\n } @else if (field.dataType === 'boolean' && field.fieldType === 'single') {\n <v-select\n *ngIf=\"booleanItems$ | async as booleanItems\"\n [items]=\"booleanItems\"\n (selectedChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n ></v-select>\n } @else if (field.dataType === 'time' && field.fieldType === 'single') {\n <cds-timepicker\n [placeholder]=\"'searchFields.timePlaceholder' | translate\"\n [ngModel]=\"formValues[field.key]\"\n (ngModelChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n ></cds-timepicker>\n } @else if (field.dataType === 'time' && field.fieldType === 'range') {\n <v-form\n className=\"multiple-search-fields\"\n (valueChange)=\"multipleValueChange(field.key, $event, field.dataType)\"\n >\n <cds-timepicker\n [(ngModel)]=\"formValues[field.key + '_start']\"\n ></cds-timepicker>\n\n <div class=\"to-text\">\n <v-paragraph>{{ 'searchFields.to' | translate }}</v-paragraph>\n </div>\n\n <cds-timepicker [(ngModel)]=\"formValues[field.key + '_end']\"></cds-timepicker>\n </v-form>\n } @else if (field.dataType === 'date' && field.fieldType === 'single') {\n <valtimo-date-time-picker\n [defaultDate]=\"formValues[field.key] ?? ''\"\n [enableTime]=\"false\"\n [showFieldLabel]=\"false\"\n (valueChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n ></valtimo-date-time-picker>\n } @else if (field.dataType === 'date' && field.fieldType === 'range') {\n <v-form\n className=\"multiple-search-fields\"\n (valueChange)=\"multipleValueChange(field.key, $event, field.dataType)\"\n >\n <valtimo-date-time-picker\n name=\"start\"\n [enableTime]=\"false\"\n [showFieldLabel]=\"false\"\n ></valtimo-date-time-picker>\n\n <div class=\"to-text\">\n <v-paragraph>{{ 'searchFields.to' | translate }}</v-paragraph>\n </div>\n\n <valtimo-date-time-picker\n name=\"end\"\n [enableTime]=\"false\"\n [showFieldLabel]=\"false\"\n ></valtimo-date-time-picker>\n </v-form>\n } @else if (field.dataType === 'datetime' && field.fieldType === 'single') {\n <valtimo-date-time-picker\n [enableTime]=\"true\"\n [showFieldLabel]=\"false\"\n (valueChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n ></valtimo-date-time-picker>\n } @else if (field.dataType === 'datetime' && field.fieldType === 'range') {\n <v-form\n className=\"multiple-search-fields\"\n (valueChange)=\"multipleValueChange(field.key, $event, field.dataType)\"\n >\n <valtimo-date-time-picker\n name=\"start\"\n [enableTime]=\"true\"\n [showFieldLabel]=\"false\"\n ></valtimo-date-time-picker>\n\n <div class=\"to-text\">\n <v-paragraph>{{ 'searchFields.to' | translate }}</v-paragraph>\n </div>\n\n <valtimo-date-time-picker\n name=\"end\"\n [enableTime]=\"true\"\n [showFieldLabel]=\"false\"\n ></valtimo-date-time-picker>\n </v-form>\n }\n </div>\n }\n </div>\n\n <button\n cdsButton=\"primary\"\n class=\"query-group__search-button\"\n [disabled]=\"searchDisabled(param.searchFields)\"\n (click)=\"searchGroup(param.key, param.searchFields)\"\n >\n {{ 'searchFields.searchButtonText' | translate }}\n <svg cdsIcon=\"search\" size=\"16\"></svg>\n </button>\n </cds-tab>\n }\n </cds-tabs>\n }\n }\n}\n", styles: [":host{display:flex;flex-direction:column;gap:24px}.query-group__row{display:flex;flex-wrap:wrap;gap:16px;align-items:flex-end}.query-group__field{display:flex;flex-direction:column;flex:1 1 200px;max-width:320px}.query-group__field input{width:100%}.query-group__field--time,.query-group__field--date,.query-group__field--datetime{flex:0 0 auto;max-width:none}.query-group__label{font-size:14px;font-weight:600;color:var(--cds-text-primary)}.query-group__search-button{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;height:40px;max-height:40px;min-height:40px;padding:8px 16px;min-width:120px;white-space:nowrap;overflow:hidden;margin-left:auto}:host ::ng-deep .cds--tab-content{display:flex;flex-direction:column;gap:16px;outline:none!important;background:var(--cds-layer-01)}v-input{width:100%}::ng-deep .multiple-search-fields{display:flex!important;flex-direction:row!important;align-items:center}.to-text{margin-inline-start:8px;margin-inline-end:8px}.iko-datetime{display:flex;gap:8px;align-items:flex-end}::ng-deep .iko-search-tabs .cds--tab-content{margin-top:24px}:host.embedded{gap:8px}:host.embedded ::ng-deep .iko-search-tabs .cds--tab-content{padding:0}:host.embedded ::ng-deep .query-group__search-button{margin-left:auto}\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: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: InputModule$1 }, { kind: "component", type: i2$2.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "smallMargin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$", "carbonTheme", "placeholder", "dataTestId", "trim", "presetsTitle", "presetOptions"], outputs: ["valueChange"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: InputModule }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i6.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i2$2.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "ngmodule", type: TabsModule }, { kind: "component", type: i6.Tabs, selector: "cds-tabs, ibm-tabs", inputs: ["position", "cacheActive", "followFocus", "isNavigation", "ariaLabel", "ariaLabelledby", "type", "theme", "skeleton"] }, { kind: "component", type: i6.Tab, selector: "cds-tab, ibm-tab", inputs: ["heading", "title", "context", "active", "disabled", "tabIndex", "id", "cacheActive", "tabContent", "templateContext"], outputs: ["selected"] }, { kind: "ngmodule", type: LayerModule }, { kind: "directive", type: i6.LayerDirective, selector: "[cdsLayer], [ibmLayer]", inputs: ["ibmLayer", "cdsLayer"], exportAs: ["layer"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "ngmodule", type: ParagraphModule }, { kind: "component", type: i2$2.ParagraphComponent, selector: "v-paragraph", inputs: ["center", "fullWidth", "margin", "italic", "loading", "dataTestId"] }, { kind: "ngmodule", type: TimePickerModule }, { kind: "component", type: i6.TimePicker, selector: "cds-timepicker, ibm-timepicker", inputs: ["invalid", "invalidText", "label", "hideLabel", "placeholder", "pattern", "id", "disabled", "value", "maxLength", "skeleton", "theme", "size"], outputs: ["valueChange"] }, { kind: "component", type: DateTimePickerComponent, selector: "valtimo-date-time-picker", inputs: ["fullWidth", "margin", "name", "title", "placeholder", "titleTranslationKey", "disabled", "tooltip", "required", "smallLabel", "enableTime", "carbonTheme", "dateFormat", "showFieldLabel", "datePlaceholder", "timePlaceholder", "labelText", "defaultDate", "defaultDateIsToday", "clear$"], outputs: ["valueChange"] }, { kind: "ngmodule", type: InputLabelModule }, { kind: "component", type: i2$2.InputLabelComponent, selector: "v-input-label", inputs: ["name", "tooltip", "tooltipTranslationKey", "largeMargin", "small", "noMargin", "title", "titleTranslationKey", "required", "disabled", "carbonTheme"] }, { kind: "ngmodule", type: FormModule }, { kind: "component", type: i2$2.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i2$2.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "disabled", "dropUp", "invalid", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "clearText", "clearable", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder", "smallMargin", "carbonTheme", "appendInline", "warn", "warnText", "dataTestId"], outputs: ["selectedChange"] }] }); }
|
|
4482
4573
|
}
|
|
4483
4574
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: IkoSearchComponent, decorators: [{
|
|
4484
4575
|
type: Component,
|
|
@@ -4505,8 +4596,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4505
4596
|
InputModule$1,
|
|
4506
4597
|
FormModule,
|
|
4507
4598
|
SelectModule,
|
|
4508
|
-
], template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n@if (ikoSearchActions$ | async; as ikoSearchActions) {\n @if (ikoSearchActions.length === 0) {\n <valtimo-no-results [title]=\"'iko.searchFieldsNoResults' | translate\"></valtimo-no-results>\n\n } @else {\n <h4>{{ 'iko.searchVia' | translate }}</h4>\n\n <cds-tabs class=\"iko-search-tabs\" type=\"line\">\n @for (param of ikoSearchActions; track param.key ?? param.fields?.[0]?.key) {\n <cds-tab\n (keyup.enter)=\"!searchDisabled(param.searchFields) && searchGroup(param.key, param.searchFields)\"\n class=\"query-group\"\n [heading]=\"param.title\"\n [cdsLayer]=\"1\"\n >\n <div class=\"query-group__row\">\n @for (field of param.searchFields; track field.key) {\n <div\n class=\"query-group__field\"\n [ngClass]=\"{\n 'query-group__field--time': field.dataType === 'time',\n 'query-group__field--date': field.dataType === 'date',\n 'query-group__field--datetime': field.dataType === 'datetime',\n }\"\n >\n <v-input-label *ngIf=\"field.title\" [title]=\"field.title\"></v-input-label>\n\n @if (field.dataType === 'text' && field.fieldType === 'single') {\n <v-input\n [dataTestId]=\"'iko-search-field-' + field.key\"\n [name]=\"field.key\"\n [placeholder]=\"'searchFields.textPlaceholder' | translate\"\n [defaultValue]=\"formValues[field.key]\"\n (valueChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n ></v-input>\n } @else if (field.dataType === 'text' && field.fieldType === 'range') {\n <v-form\n className=\"multiple-search-fields\"\n (valueChange)=\"multipleValueChange(field.key, $event, field.dataType)\"\n >\n <v-input\n name=\"start\"\n [placeholder]=\"'searchFields.textPlaceholder' | translate\"\n ></v-input>\n\n <div class=\"to-text\">\n <v-paragraph>{{ 'searchFields.to' | translate }}</v-paragraph>\n </div>\n\n <v-input\n name=\"end\"\n [placeholder]=\"'searchFields.textPlaceholder' | translate\"\n ></v-input>\n </v-form>\n } @else if (field.dataType === 'text' && (field.fieldType === 'single-select-dropdown' || field.fieldType === 'single_select_dropdown')) {\n <v-select\n *ngIf=\"dropdownSelectItemsMap[field.key]\"\n [items]=\"dropdownSelectItemsMap[field.key]\"\n [margin]=\"false\"\n [required]=\"field.required\"\n [name]=\"field.key\"\n [clearSelectionSubject$]=\"clear$\"\n (selectedChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n [appendInline]=\"false\"\n ></v-select>\n } @else if (field.dataType === 'text' && (field.fieldType === 'multi-select-dropdown' || field.fieldType === 'multi_select_dropdown')) {\n <v-select\n *ngIf=\"dropdownSelectItemsMap[field.key]\"\n [items]=\"dropdownSelectItemsMap[field.key]\"\n [margin]=\"false\"\n [multiple]=\"true\"\n [required]=\"field.required\"\n [name]=\"field.key\"\n [clearSelectionSubject$]=\"clear$\"\n (selectedChange)=\"multipleValueChange(field.key, $event, field.dataType)\"\n [appendInline]=\"false\"\n ></v-select>\n } @else if (field.dataType === 'number' && field.fieldType === 'single') {\n <v-input\n type=\"number\"\n [hideNumberSpinBox]=\"true\"\n [placeholder]=\"'searchFields.numberPlaceholder' | translate\"\n (valueChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n ></v-input>\n\n } @else if (field.dataType === 'number' && field.fieldType === 'range') {\n <v-form\n className=\"multiple-search-fields\"\n (valueChange)=\"multipleValueChange(field.key, $event, field.dataType)\"\n >\n <v-input\n type=\"number\"\n name=\"start\"\n [placeholder]=\"'searchFields.numberPlaceholder' | translate\"\n ></v-input>\n\n <div class=\"to-text\">\n <v-paragraph>{{ 'searchFields.to' | translate }}</v-paragraph>\n </div>\n\n <v-input\n type=\"number\"\n name=\"end\"\n [placeholder]=\"'searchFields.numberPlaceholder' | translate\"\n ></v-input>\n </v-form>\n } @else if (field.dataType === 'boolean' && field.fieldType === 'single') {\n <v-select\n *ngIf=\"booleanItems$ | async as booleanItems\"\n [items]=\"booleanItems\"\n (selectedChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n ></v-select>\n } @else if (field.dataType === 'time' && field.fieldType === 'single') {\n <cds-timepicker\n [placeholder]=\"'searchFields.timePlaceholder' | translate\"\n [ngModel]=\"formValues[field.key]\"\n (ngModelChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n ></cds-timepicker>\n\n } @else if (field.dataType === 'time' && field.fieldType === 'range') {\n <v-form\n className=\"multiple-search-fields\"\n (valueChange)=\"multipleValueChange(field.key, $event, field.dataType)\"\n >\n <cds-timepicker [(ngModel)]=\"formValues[field.key + '_start']\"></cds-timepicker>\n\n <div class=\"to-text\">\n <v-paragraph>{{ 'searchFields.to' | translate }}</v-paragraph>\n </div>\n\n <cds-timepicker [(ngModel)]=\"formValues[field.key + '_end']\"></cds-timepicker>\n </v-form>\n } @else if (field.dataType === 'date' && field.fieldType === 'single') {\n <valtimo-date-time-picker\n [defaultDate]=\"formValues[field.key] ?? ''\"\n [enableTime]=\"false\"\n [showFieldLabel]=\"false\"\n (valueChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n ></valtimo-date-time-picker>\n\n } @else if (field.dataType === 'date' && field.fieldType === 'range') {\n <v-form\n className=\"multiple-search-fields\"\n (valueChange)=\"multipleValueChange(field.key, $event, field.dataType)\"\n >\n <valtimo-date-time-picker\n name=\"start\"\n [enableTime]=\"false\"\n [showFieldLabel]=\"false\"\n ></valtimo-date-time-picker>\n\n <div class=\"to-text\">\n <v-paragraph>{{ 'searchFields.to' | translate }}</v-paragraph>\n </div>\n\n <valtimo-date-time-picker\n name=\"end\"\n [enableTime]=\"false\"\n [showFieldLabel]=\"false\"\n ></valtimo-date-time-picker>\n </v-form>\n } @else if (field.dataType === 'datetime' && field.fieldType === 'single') {\n <valtimo-date-time-picker\n [enableTime]=\"true\"\n [showFieldLabel]=\"false\"\n (valueChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n ></valtimo-date-time-picker>\n\n } @else if (field.dataType === 'datetime' && field.fieldType === 'range') {\n <v-form\n className=\"multiple-search-fields\"\n (valueChange)=\"multipleValueChange(field.key, $event, field.dataType)\"\n >\n <valtimo-date-time-picker\n name=\"start\"\n [enableTime]=\"true\"\n [showFieldLabel]=\"false\"\n ></valtimo-date-time-picker>\n\n <div class=\"to-text\">\n <v-paragraph>{{ 'searchFields.to' | translate }}</v-paragraph>\n </div>\n\n <valtimo-date-time-picker\n name=\"end\"\n [enableTime]=\"true\"\n [showFieldLabel]=\"false\"\n ></valtimo-date-time-picker>\n </v-form>\n }\n </div>\n }\n </div>\n\n <button\n cdsButton=\"primary\"\n class=\"query-group__search-button\"\n [disabled]=\"searchDisabled(param.searchFields)\"\n (click)=\"searchGroup(param.key, param.searchFields)\"\n >\n {{ 'searchFields.searchButtonText' | translate }}\n <svg cdsIcon=\"search\" size=\"16\"></svg>\n </button>\n </cds-tab>\n }\n </cds-tabs>\n }\n}\n", styles: [":host{display:flex;flex-direction:column;gap:24px}.query-group__row{display:flex;flex-wrap:wrap;gap:16px;align-items:flex-end}.query-group__field{display:flex;flex-direction:column;flex:1 1 200px;max-width:320px}.query-group__field input{width:100%}.query-group__field--time,.query-group__field--date,.query-group__field--datetime{flex:0 0 auto;max-width:none}.query-group__label{font-size:14px;font-weight:600;color:var(--cds-text-primary)}.query-group__search-button{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;height:40px;max-height:40px;min-height:40px;padding:8px 16px;min-width:120px;white-space:nowrap;overflow:hidden;margin-left:auto}:host ::ng-deep .cds--tab-content{display:flex;flex-direction:column;gap:16px;outline:none!important;background:var(--cds-layer-01)}v-input{width:100%}::ng-deep .multiple-search-fields{display:flex!important;flex-direction:row!important;align-items:center}.to-text{margin-inline-start:8px;margin-inline-end:8px}.iko-datetime{display:flex;gap:8px;align-items:flex-end}::ng-deep .iko-search-tabs .cds--tab-content{margin-top:24px}\n/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
|
|
4509
|
-
}], ctorParameters: () => [{ type: i1$2.ActivatedRoute }, { type: i1$2.Router }, { type: i2$2.PageTitleService }, { type: i6.IconService }, { type: IkoApiService }, { type: i5.TranslateService }]
|
|
4599
|
+
], template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n@if (notFoundKey$ | async; as notFoundKey) {\n <p class=\"iko-search-not-found\">{{ 'iko.viewNotFound' | translate: {key: notFoundKey} }}</p>\n} @else {\n @if (ikoSearchActions$ | async; as ikoSearchActions) {\n @if (ikoSearchActions.length === 0) {\n <valtimo-no-results [title]=\"'iko.searchFieldsNoResults' | translate\"></valtimo-no-results>\n } @else {\n <h4>{{ searchTitle || ('iko.searchVia' | translate) }}</h4>\n\n <cds-tabs class=\"iko-search-tabs\" type=\"line\">\n @for (param of ikoSearchActions; track param.key ?? param.fields?.[0]?.key) {\n <cds-tab\n (keyup.enter)=\"\n !searchDisabled(param.searchFields) && searchGroup(param.key, param.searchFields)\n \"\n class=\"query-group\"\n [heading]=\"param.title\"\n [cdsLayer]=\"1\"\n >\n <div class=\"query-group__row\">\n @for (field of param.searchFields; track field.key) {\n <div\n class=\"query-group__field\"\n [ngClass]=\"{\n 'query-group__field--time': field.dataType === 'time',\n 'query-group__field--date': field.dataType === 'date',\n 'query-group__field--datetime': field.dataType === 'datetime',\n }\"\n >\n <v-input-label *ngIf=\"field.title\" [title]=\"field.title\"></v-input-label>\n\n @if (field.dataType === 'text' && field.fieldType === 'single') {\n <v-input\n [dataTestId]=\"'iko-search-field-' + field.key\"\n [name]=\"field.key\"\n [placeholder]=\"'searchFields.textPlaceholder' | translate\"\n [defaultValue]=\"formValues[field.key]\"\n (valueChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n ></v-input>\n } @else if (field.dataType === 'text' && field.fieldType === 'range') {\n <v-form\n className=\"multiple-search-fields\"\n (valueChange)=\"multipleValueChange(field.key, $event, field.dataType)\"\n >\n <v-input\n name=\"start\"\n [placeholder]=\"'searchFields.textPlaceholder' | translate\"\n ></v-input>\n\n <div class=\"to-text\">\n <v-paragraph>{{ 'searchFields.to' | translate }}</v-paragraph>\n </div>\n\n <v-input\n name=\"end\"\n [placeholder]=\"'searchFields.textPlaceholder' | translate\"\n ></v-input>\n </v-form>\n } @else if (\n field.dataType === 'text' &&\n (field.fieldType === 'single-select-dropdown' ||\n field.fieldType === 'single_select_dropdown')\n ) {\n <v-select\n *ngIf=\"dropdownSelectItemsMap[field.key]\"\n [items]=\"dropdownSelectItemsMap[field.key]\"\n [margin]=\"false\"\n [required]=\"field.required\"\n [name]=\"field.key\"\n [clearSelectionSubject$]=\"clear$\"\n (selectedChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n [appendInline]=\"false\"\n ></v-select>\n } @else if (\n field.dataType === 'text' &&\n (field.fieldType === 'multi-select-dropdown' ||\n field.fieldType === 'multi_select_dropdown')\n ) {\n <v-select\n *ngIf=\"dropdownSelectItemsMap[field.key]\"\n [items]=\"dropdownSelectItemsMap[field.key]\"\n [margin]=\"false\"\n [multiple]=\"true\"\n [required]=\"field.required\"\n [name]=\"field.key\"\n [clearSelectionSubject$]=\"clear$\"\n (selectedChange)=\"multipleValueChange(field.key, $event, field.dataType)\"\n [appendInline]=\"false\"\n ></v-select>\n } @else if (field.dataType === 'number' && field.fieldType === 'single') {\n <v-input\n type=\"number\"\n [hideNumberSpinBox]=\"true\"\n [placeholder]=\"'searchFields.numberPlaceholder' | translate\"\n (valueChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n ></v-input>\n } @else if (field.dataType === 'number' && field.fieldType === 'range') {\n <v-form\n className=\"multiple-search-fields\"\n (valueChange)=\"multipleValueChange(field.key, $event, field.dataType)\"\n >\n <v-input\n type=\"number\"\n name=\"start\"\n [placeholder]=\"'searchFields.numberPlaceholder' | translate\"\n ></v-input>\n\n <div class=\"to-text\">\n <v-paragraph>{{ 'searchFields.to' | translate }}</v-paragraph>\n </div>\n\n <v-input\n type=\"number\"\n name=\"end\"\n [placeholder]=\"'searchFields.numberPlaceholder' | translate\"\n ></v-input>\n </v-form>\n } @else if (field.dataType === 'boolean' && field.fieldType === 'single') {\n <v-select\n *ngIf=\"booleanItems$ | async as booleanItems\"\n [items]=\"booleanItems\"\n (selectedChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n ></v-select>\n } @else if (field.dataType === 'time' && field.fieldType === 'single') {\n <cds-timepicker\n [placeholder]=\"'searchFields.timePlaceholder' | translate\"\n [ngModel]=\"formValues[field.key]\"\n (ngModelChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n ></cds-timepicker>\n } @else if (field.dataType === 'time' && field.fieldType === 'range') {\n <v-form\n className=\"multiple-search-fields\"\n (valueChange)=\"multipleValueChange(field.key, $event, field.dataType)\"\n >\n <cds-timepicker\n [(ngModel)]=\"formValues[field.key + '_start']\"\n ></cds-timepicker>\n\n <div class=\"to-text\">\n <v-paragraph>{{ 'searchFields.to' | translate }}</v-paragraph>\n </div>\n\n <cds-timepicker [(ngModel)]=\"formValues[field.key + '_end']\"></cds-timepicker>\n </v-form>\n } @else if (field.dataType === 'date' && field.fieldType === 'single') {\n <valtimo-date-time-picker\n [defaultDate]=\"formValues[field.key] ?? ''\"\n [enableTime]=\"false\"\n [showFieldLabel]=\"false\"\n (valueChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n ></valtimo-date-time-picker>\n } @else if (field.dataType === 'date' && field.fieldType === 'range') {\n <v-form\n className=\"multiple-search-fields\"\n (valueChange)=\"multipleValueChange(field.key, $event, field.dataType)\"\n >\n <valtimo-date-time-picker\n name=\"start\"\n [enableTime]=\"false\"\n [showFieldLabel]=\"false\"\n ></valtimo-date-time-picker>\n\n <div class=\"to-text\">\n <v-paragraph>{{ 'searchFields.to' | translate }}</v-paragraph>\n </div>\n\n <valtimo-date-time-picker\n name=\"end\"\n [enableTime]=\"false\"\n [showFieldLabel]=\"false\"\n ></valtimo-date-time-picker>\n </v-form>\n } @else if (field.dataType === 'datetime' && field.fieldType === 'single') {\n <valtimo-date-time-picker\n [enableTime]=\"true\"\n [showFieldLabel]=\"false\"\n (valueChange)=\"singleValueChange(field.key, $event, field.dataType)\"\n ></valtimo-date-time-picker>\n } @else if (field.dataType === 'datetime' && field.fieldType === 'range') {\n <v-form\n className=\"multiple-search-fields\"\n (valueChange)=\"multipleValueChange(field.key, $event, field.dataType)\"\n >\n <valtimo-date-time-picker\n name=\"start\"\n [enableTime]=\"true\"\n [showFieldLabel]=\"false\"\n ></valtimo-date-time-picker>\n\n <div class=\"to-text\">\n <v-paragraph>{{ 'searchFields.to' | translate }}</v-paragraph>\n </div>\n\n <valtimo-date-time-picker\n name=\"end\"\n [enableTime]=\"true\"\n [showFieldLabel]=\"false\"\n ></valtimo-date-time-picker>\n </v-form>\n }\n </div>\n }\n </div>\n\n <button\n cdsButton=\"primary\"\n class=\"query-group__search-button\"\n [disabled]=\"searchDisabled(param.searchFields)\"\n (click)=\"searchGroup(param.key, param.searchFields)\"\n >\n {{ 'searchFields.searchButtonText' | translate }}\n <svg cdsIcon=\"search\" size=\"16\"></svg>\n </button>\n </cds-tab>\n }\n </cds-tabs>\n }\n }\n}\n", styles: [":host{display:flex;flex-direction:column;gap:24px}.query-group__row{display:flex;flex-wrap:wrap;gap:16px;align-items:flex-end}.query-group__field{display:flex;flex-direction:column;flex:1 1 200px;max-width:320px}.query-group__field input{width:100%}.query-group__field--time,.query-group__field--date,.query-group__field--datetime{flex:0 0 auto;max-width:none}.query-group__label{font-size:14px;font-weight:600;color:var(--cds-text-primary)}.query-group__search-button{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;height:40px;max-height:40px;min-height:40px;padding:8px 16px;min-width:120px;white-space:nowrap;overflow:hidden;margin-left:auto}:host ::ng-deep .cds--tab-content{display:flex;flex-direction:column;gap:16px;outline:none!important;background:var(--cds-layer-01)}v-input{width:100%}::ng-deep .multiple-search-fields{display:flex!important;flex-direction:row!important;align-items:center}.to-text{margin-inline-start:8px;margin-inline-end:8px}.iko-datetime{display:flex;gap:8px;align-items:flex-end}::ng-deep .iko-search-tabs .cds--tab-content{margin-top:24px}:host.embedded{gap:8px}:host.embedded ::ng-deep .iko-search-tabs .cds--tab-content{padding:0}:host.embedded ::ng-deep .query-group__search-button{margin-left:auto}\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"] }]
|
|
4600
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$2.ActivatedRoute }, { type: i1$2.Router }, { type: i2$2.PageTitleService }, { type: i6.IconService }, { type: IkoApiService }, { type: i5.TranslateService }], propDecorators: { searchTitle: [{
|
|
4601
|
+
type: Input
|
|
4602
|
+
}], embedded: [{
|
|
4603
|
+
type: HostBinding,
|
|
4604
|
+
args: ['class.embedded']
|
|
4605
|
+
}, {
|
|
4606
|
+
type: Input
|
|
4607
|
+
}], searchSubmitEvent: [{
|
|
4608
|
+
type: Output
|
|
4609
|
+
}], ikoViewKey: [{
|
|
4610
|
+
type: Input
|
|
4611
|
+
}] } });
|
|
4510
4612
|
|
|
4511
4613
|
/*
|
|
4512
4614
|
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
@@ -4678,6 +4780,283 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4678
4780
|
}]
|
|
4679
4781
|
}], ctorParameters: () => [{ type: IkoMenuService }, { type: i2$2.MenuService }] });
|
|
4680
4782
|
|
|
4783
|
+
/*
|
|
4784
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
4785
|
+
*
|
|
4786
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
4787
|
+
* you may not use this file except in compliance with the License.
|
|
4788
|
+
* You may obtain a copy of the License at
|
|
4789
|
+
*
|
|
4790
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
4791
|
+
*
|
|
4792
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4793
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
4794
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4795
|
+
* See the License for the specific language governing permissions and
|
|
4796
|
+
* limitations under the License.
|
|
4797
|
+
*/
|
|
4798
|
+
class IkoSearchFormioComponent {
|
|
4799
|
+
set value(val) {
|
|
4800
|
+
this._value = val;
|
|
4801
|
+
}
|
|
4802
|
+
get value() {
|
|
4803
|
+
return this._value;
|
|
4804
|
+
}
|
|
4805
|
+
constructor(iconService) {
|
|
4806
|
+
this.iconService = iconService;
|
|
4807
|
+
this.valueChange = new EventEmitter();
|
|
4808
|
+
this.searchParams = null;
|
|
4809
|
+
this.selectedItemLabel = null;
|
|
4810
|
+
this.iconService.register(Launch16);
|
|
4811
|
+
}
|
|
4812
|
+
onSearchSubmit(event) {
|
|
4813
|
+
this.searchParams = event;
|
|
4814
|
+
}
|
|
4815
|
+
onRowSelected(item) {
|
|
4816
|
+
const resolved = this.resolvePropertyMappings(item.rowData);
|
|
4817
|
+
this._value = { id: item.id, ...resolved };
|
|
4818
|
+
this.selectedItemLabel = item.label;
|
|
4819
|
+
this.valueChange.emit(this._value);
|
|
4820
|
+
}
|
|
4821
|
+
onOpenInNewTab() {
|
|
4822
|
+
if (this.openInNewTabUrl && this._value?.id) {
|
|
4823
|
+
const url = this.openInNewTabUrl.replace('{id}', this._value.id);
|
|
4824
|
+
window.open(url, '_blank');
|
|
4825
|
+
}
|
|
4826
|
+
}
|
|
4827
|
+
backToList() {
|
|
4828
|
+
this.selectedItemLabel = null;
|
|
4829
|
+
this._value = null;
|
|
4830
|
+
this.valueChange.emit(null);
|
|
4831
|
+
}
|
|
4832
|
+
backToSearch() {
|
|
4833
|
+
this.searchParams = null;
|
|
4834
|
+
this.selectedItemLabel = null;
|
|
4835
|
+
this._value = null;
|
|
4836
|
+
this.valueChange.emit(null);
|
|
4837
|
+
}
|
|
4838
|
+
resolvePropertyMappings(rowData) {
|
|
4839
|
+
if (!this.propertyMappings?.length)
|
|
4840
|
+
return {};
|
|
4841
|
+
const resolved = {};
|
|
4842
|
+
for (const mapping of this.propertyMappings) {
|
|
4843
|
+
if (mapping.propertyName && mapping.ikoProperty) {
|
|
4844
|
+
resolved[mapping.propertyName] = rowData[mapping.ikoProperty] ?? null;
|
|
4845
|
+
}
|
|
4846
|
+
}
|
|
4847
|
+
return resolved;
|
|
4848
|
+
}
|
|
4849
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: IkoSearchFormioComponent, deps: [{ token: i6.IconService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4850
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: IkoSearchFormioComponent, isStandalone: true, selector: "valtimo-iko-search-formio", inputs: { disabled: "disabled", ikoViewKey: "ikoViewKey", label: "label", resultListLabel: "resultListLabel", selectedLabel: "selectedLabel", openInNewTabLabel: "openInNewTabLabel", openInNewTabUrl: "openInNewTabUrl", propertyMappings: "propertyMappings", value: "value" }, outputs: { valueChange: "valueChange" }, 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 (selectedItemLabel) {\n <span class=\"iko-search-formio__label\">\n {{ selectedLabel || ('iko.formio.selectedResult' | translate) }}\n </span>\n\n <div class=\"iko-search-formio__selected-box\" [cdsLayer]=\"1\">\n <span class=\"iko-search-formio__selected-value\">{{ selectedItemLabel }}</span>\n\n @if (openInNewTabUrl) {\n <button\n [cdsLayer]=\"2\"\n cdsButton=\"ghost\"\n size=\"sm\"\n class=\"iko-search-formio__open-tab-button\"\n (click)=\"onOpenInNewTab()\"\n >\n {{ openInNewTabLabel || ('iko.formio.openInNewTab' | translate) }}\n <svg cdsIcon=\"launch\" size=\"16\"></svg>\n </button>\n }\n </div>\n\n <div class=\"iko-search-formio__footer\">\n <button cdsButton=\"tertiary\" size=\"sm\" (click)=\"backToList()\">\n {{ 'iko.formio.back' | translate }}\n </button>\n </div>\n} @else if (searchParams) {\n <span class=\"iko-search-formio__label\">\n {{ resultListLabel || ('iko.formio.selectResult' | translate) }}\n </span>\n\n <valtimo-iko-list\n [ikoViewKey]=\"ikoViewKey\"\n [searchParams]=\"searchParams\"\n (rowSelectedEvent)=\"onRowSelected($event)\"\n ></valtimo-iko-list>\n\n <div class=\"iko-search-formio__footer\">\n <button cdsButton=\"tertiary\" size=\"sm\" (click)=\"backToSearch()\">\n {{ 'iko.formio.back' | translate }}\n </button>\n </div>\n} @else {\n <valtimo-iko-search\n [ikoViewKey]=\"ikoViewKey\"\n [searchTitle]=\"label\"\n [embedded]=\"true\"\n (searchSubmitEvent)=\"onSearchSubmit($event)\"\n ></valtimo-iko-search>\n}\n", styles: [".iko-search-formio__label{display:block;font-size:14px;font-weight:600;color:var(--cds-text-primary);margin-bottom:8px}.iko-search-formio__selected-box{display:flex;align-items:center;justify-content:space-between;background-color:var(--cds-layer);padding:12px 16px;min-height:48px}.iko-search-formio__selected-value{font-size:14px;color:var(--cds-text-primary)}.iko-search-formio__open-tab-button{flex-shrink:0!important;margin-left:8px!important;display:flex!important;gap:8px!important;justify-content:center!important;align-items:center!important}.iko-search-formio__footer{display:flex;justify-content:flex-start;margin-top:16px}\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: "component", type: IkoSearchComponent, selector: "valtimo-iko-search", inputs: ["searchTitle", "embedded", "ikoViewKey"], outputs: ["searchSubmitEvent"] }, { kind: "component", type: IkoListComponent, selector: "valtimo-iko-list", inputs: ["ikoViewKey", "searchParams"], outputs: ["rowSelectedEvent"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i6.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: LayerModule }, { kind: "directive", type: i6.LayerDirective, selector: "[cdsLayer], [ibmLayer]", inputs: ["ibmLayer", "cdsLayer"], exportAs: ["layer"] }] }); }
|
|
4851
|
+
}
|
|
4852
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: IkoSearchFormioComponent, decorators: [{
|
|
4853
|
+
type: Component,
|
|
4854
|
+
args: [{ selector: 'valtimo-iko-search-formio', standalone: true, imports: [
|
|
4855
|
+
CommonModule,
|
|
4856
|
+
IkoSearchComponent,
|
|
4857
|
+
IkoListComponent,
|
|
4858
|
+
ButtonModule,
|
|
4859
|
+
IconModule,
|
|
4860
|
+
TranslateModule,
|
|
4861
|
+
LayerModule,
|
|
4862
|
+
], 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 (selectedItemLabel) {\n <span class=\"iko-search-formio__label\">\n {{ selectedLabel || ('iko.formio.selectedResult' | translate) }}\n </span>\n\n <div class=\"iko-search-formio__selected-box\" [cdsLayer]=\"1\">\n <span class=\"iko-search-formio__selected-value\">{{ selectedItemLabel }}</span>\n\n @if (openInNewTabUrl) {\n <button\n [cdsLayer]=\"2\"\n cdsButton=\"ghost\"\n size=\"sm\"\n class=\"iko-search-formio__open-tab-button\"\n (click)=\"onOpenInNewTab()\"\n >\n {{ openInNewTabLabel || ('iko.formio.openInNewTab' | translate) }}\n <svg cdsIcon=\"launch\" size=\"16\"></svg>\n </button>\n }\n </div>\n\n <div class=\"iko-search-formio__footer\">\n <button cdsButton=\"tertiary\" size=\"sm\" (click)=\"backToList()\">\n {{ 'iko.formio.back' | translate }}\n </button>\n </div>\n} @else if (searchParams) {\n <span class=\"iko-search-formio__label\">\n {{ resultListLabel || ('iko.formio.selectResult' | translate) }}\n </span>\n\n <valtimo-iko-list\n [ikoViewKey]=\"ikoViewKey\"\n [searchParams]=\"searchParams\"\n (rowSelectedEvent)=\"onRowSelected($event)\"\n ></valtimo-iko-list>\n\n <div class=\"iko-search-formio__footer\">\n <button cdsButton=\"tertiary\" size=\"sm\" (click)=\"backToSearch()\">\n {{ 'iko.formio.back' | translate }}\n </button>\n </div>\n} @else {\n <valtimo-iko-search\n [ikoViewKey]=\"ikoViewKey\"\n [searchTitle]=\"label\"\n [embedded]=\"true\"\n (searchSubmitEvent)=\"onSearchSubmit($event)\"\n ></valtimo-iko-search>\n}\n", styles: [".iko-search-formio__label{display:block;font-size:14px;font-weight:600;color:var(--cds-text-primary);margin-bottom:8px}.iko-search-formio__selected-box{display:flex;align-items:center;justify-content:space-between;background-color:var(--cds-layer);padding:12px 16px;min-height:48px}.iko-search-formio__selected-value{font-size:14px;color:var(--cds-text-primary)}.iko-search-formio__open-tab-button{flex-shrink:0!important;margin-left:8px!important;display:flex!important;gap:8px!important;justify-content:center!important;align-items:center!important}.iko-search-formio__footer{display:flex;justify-content:flex-start;margin-top:16px}\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"] }]
|
|
4863
|
+
}], ctorParameters: () => [{ type: i6.IconService }], propDecorators: { disabled: [{
|
|
4864
|
+
type: Input
|
|
4865
|
+
}], ikoViewKey: [{
|
|
4866
|
+
type: Input
|
|
4867
|
+
}], label: [{
|
|
4868
|
+
type: Input
|
|
4869
|
+
}], resultListLabel: [{
|
|
4870
|
+
type: Input
|
|
4871
|
+
}], selectedLabel: [{
|
|
4872
|
+
type: Input
|
|
4873
|
+
}], openInNewTabLabel: [{
|
|
4874
|
+
type: Input
|
|
4875
|
+
}], openInNewTabUrl: [{
|
|
4876
|
+
type: Input
|
|
4877
|
+
}], propertyMappings: [{
|
|
4878
|
+
type: Input
|
|
4879
|
+
}], value: [{
|
|
4880
|
+
type: Input
|
|
4881
|
+
}], valueChange: [{
|
|
4882
|
+
type: Output
|
|
4883
|
+
}] } });
|
|
4884
|
+
|
|
4885
|
+
/*
|
|
4886
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
4887
|
+
*
|
|
4888
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
4889
|
+
* you may not use this file except in compliance with the License.
|
|
4890
|
+
* You may obtain a copy of the License at
|
|
4891
|
+
*
|
|
4892
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
4893
|
+
*
|
|
4894
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4895
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
4896
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4897
|
+
* See the License for the specific language governing permissions and
|
|
4898
|
+
* limitations under the License.
|
|
4899
|
+
*/
|
|
4900
|
+
const ikoSearchFormioEditForm = () => ({
|
|
4901
|
+
components: [
|
|
4902
|
+
{ key: 'type', type: 'hidden' },
|
|
4903
|
+
{
|
|
4904
|
+
type: 'textfield',
|
|
4905
|
+
input: true,
|
|
4906
|
+
key: 'label',
|
|
4907
|
+
label: 'Label',
|
|
4908
|
+
placeholder: 'Label',
|
|
4909
|
+
defaultValue: 'IKO Search',
|
|
4910
|
+
validate: {
|
|
4911
|
+
required: true,
|
|
4912
|
+
},
|
|
4913
|
+
},
|
|
4914
|
+
{
|
|
4915
|
+
type: 'textfield',
|
|
4916
|
+
input: true,
|
|
4917
|
+
key: 'key',
|
|
4918
|
+
label: 'Property Name',
|
|
4919
|
+
placeholder: 'Property Name',
|
|
4920
|
+
tooltip: 'Document path for the result object (ID + mapped properties). Dot notation, no prefixes. Example: ikoSearchResult or person.ikoResult.',
|
|
4921
|
+
validate: {
|
|
4922
|
+
required: true,
|
|
4923
|
+
},
|
|
4924
|
+
},
|
|
4925
|
+
{
|
|
4926
|
+
type: 'textfield',
|
|
4927
|
+
input: true,
|
|
4928
|
+
key: 'customOptions.ikoViewKey',
|
|
4929
|
+
label: 'IKO Beeld Key',
|
|
4930
|
+
placeholder: 'IKO Beeld Key',
|
|
4931
|
+
tooltip: 'The IKO aggregate key used to load search actions.',
|
|
4932
|
+
validate: {
|
|
4933
|
+
required: true,
|
|
4934
|
+
},
|
|
4935
|
+
},
|
|
4936
|
+
{
|
|
4937
|
+
type: 'textfield',
|
|
4938
|
+
input: true,
|
|
4939
|
+
key: 'customOptions.resultListLabel',
|
|
4940
|
+
label: 'Result List Label',
|
|
4941
|
+
placeholder: 'Selecteer een persoon',
|
|
4942
|
+
tooltip: 'Label shown above the results table after searching. Defaults to: Selecteer een resultaat.',
|
|
4943
|
+
},
|
|
4944
|
+
{
|
|
4945
|
+
type: 'textfield',
|
|
4946
|
+
input: true,
|
|
4947
|
+
key: 'customOptions.selectedLabel',
|
|
4948
|
+
label: 'Selected Item Label',
|
|
4949
|
+
placeholder: 'Geselecteerd persoon',
|
|
4950
|
+
tooltip: 'Label shown above the selection box after selecting a result. Defaults to: Geselecteerd resultaat.',
|
|
4951
|
+
},
|
|
4952
|
+
{
|
|
4953
|
+
type: 'textfield',
|
|
4954
|
+
input: true,
|
|
4955
|
+
key: 'customOptions.openInNewTabLabel',
|
|
4956
|
+
label: 'Open in New Tab Button Text',
|
|
4957
|
+
placeholder: 'Open persoon in nieuw tabblad',
|
|
4958
|
+
tooltip: 'Text for the open-in-new-tab button. Defaults to: Open in nieuw tabblad. Leave empty to hide.',
|
|
4959
|
+
},
|
|
4960
|
+
{
|
|
4961
|
+
type: 'textfield',
|
|
4962
|
+
input: true,
|
|
4963
|
+
key: 'customOptions.openInNewTabUrl',
|
|
4964
|
+
label: 'Open in New Tab URL',
|
|
4965
|
+
placeholder: '/iko/personen/details/{id}',
|
|
4966
|
+
tooltip: 'URL template for the open-in-new-tab button. Use {id} as placeholder for the selected item ID. Leave empty to hide the button.',
|
|
4967
|
+
},
|
|
4968
|
+
{
|
|
4969
|
+
type: 'datagrid',
|
|
4970
|
+
input: true,
|
|
4971
|
+
key: 'customOptions.propertyMappings',
|
|
4972
|
+
label: 'Property Mappings',
|
|
4973
|
+
tooltip: 'Maps table column values to document properties, stored alongside the ID on selection.',
|
|
4974
|
+
reorder: false,
|
|
4975
|
+
components: [
|
|
4976
|
+
{
|
|
4977
|
+
type: 'textfield',
|
|
4978
|
+
input: true,
|
|
4979
|
+
key: 'ikoProperty',
|
|
4980
|
+
label: 'Table Column Key',
|
|
4981
|
+
placeholder: 'geboortedatum',
|
|
4982
|
+
tooltip: 'Exact column key from the IKO view config, no prefixes. Example: naam, adres.',
|
|
4983
|
+
},
|
|
4984
|
+
{
|
|
4985
|
+
type: 'textfield',
|
|
4986
|
+
input: true,
|
|
4987
|
+
key: 'propertyName',
|
|
4988
|
+
label: 'Document Property Name',
|
|
4989
|
+
placeholder: 'geboortedatum',
|
|
4990
|
+
tooltip: 'Property name in the document, relative to the component key. No prefixes. Example: geboortedatum stores at /ikoSearchResult/geboortedatum.',
|
|
4991
|
+
},
|
|
4992
|
+
],
|
|
4993
|
+
},
|
|
4994
|
+
{
|
|
4995
|
+
key: 'tableView',
|
|
4996
|
+
type: 'checkbox',
|
|
4997
|
+
label: 'Table View',
|
|
4998
|
+
tooltip: 'If checked, this value will show up in the table view of the submissions list.',
|
|
4999
|
+
},
|
|
5000
|
+
{
|
|
5001
|
+
key: 'hidden',
|
|
5002
|
+
type: 'checkbox',
|
|
5003
|
+
label: 'Hidden',
|
|
5004
|
+
tooltip: 'A hidden field is still a part of the form JSON, but is hidden when the form is rendered.',
|
|
5005
|
+
},
|
|
5006
|
+
],
|
|
5007
|
+
});
|
|
5008
|
+
|
|
5009
|
+
/*
|
|
5010
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
5011
|
+
*
|
|
5012
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
5013
|
+
* you may not use this file except in compliance with the License.
|
|
5014
|
+
* You may obtain a copy of the License at
|
|
5015
|
+
*
|
|
5016
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
5017
|
+
*
|
|
5018
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
5019
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
5020
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5021
|
+
* See the License for the specific language governing permissions and
|
|
5022
|
+
* limitations under the License.
|
|
5023
|
+
*/
|
|
5024
|
+
const COMPONENT_OPTIONS = {
|
|
5025
|
+
type: 'iko-search',
|
|
5026
|
+
selector: 'valtimo-iko-search-formio',
|
|
5027
|
+
title: 'IKO Search',
|
|
5028
|
+
group: 'advanced',
|
|
5029
|
+
icon: 'search',
|
|
5030
|
+
fieldOptions: ['label'],
|
|
5031
|
+
editForm: ikoSearchFormioEditForm,
|
|
5032
|
+
schema: {
|
|
5033
|
+
label: 'IKO Search',
|
|
5034
|
+
hideLabel: true,
|
|
5035
|
+
tableView: true,
|
|
5036
|
+
},
|
|
5037
|
+
};
|
|
5038
|
+
function registerIkoSearchFormioComponent(injector) {
|
|
5039
|
+
if (!customElements.get(COMPONENT_OPTIONS.selector)) {
|
|
5040
|
+
registerCustomFormioComponent(COMPONENT_OPTIONS, IkoSearchFormioComponent, injector);
|
|
5041
|
+
}
|
|
5042
|
+
}
|
|
5043
|
+
|
|
5044
|
+
/*
|
|
5045
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
5046
|
+
*
|
|
5047
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
5048
|
+
* you may not use this file except in compliance with the License.
|
|
5049
|
+
* You may obtain a copy of the License at
|
|
5050
|
+
*
|
|
5051
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
5052
|
+
*
|
|
5053
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
5054
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
5055
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5056
|
+
* See the License for the specific language governing permissions and
|
|
5057
|
+
* limitations under the License.
|
|
5058
|
+
*/
|
|
5059
|
+
|
|
4681
5060
|
/*
|
|
4682
5061
|
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
4683
5062
|
*
|
|
@@ -4701,5 +5080,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4701
5080
|
* Generated bundle index. Do not edit.
|
|
4702
5081
|
*/
|
|
4703
5082
|
|
|
4704
|
-
export { IkoModule };
|
|
5083
|
+
export { IkoModule, IkoSearchFormioComponent, ikoSearchFormioEditForm, registerIkoSearchFormioComponent };
|
|
4705
5084
|
//# sourceMappingURL=valtimo-iko.mjs.map
|