@indigina/ui-kit 1.1.602 → 1.1.603
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.
|
@@ -9207,14 +9207,33 @@ class KitGlobalSearchComponent {
|
|
|
9207
9207
|
this.searchResults = signal([], /* @ts-ignore */
|
|
9208
9208
|
...(ngDevMode ? [{ debugName: "searchResults" }] : /* istanbul ignore next */ []));
|
|
9209
9209
|
this.searchValue = '';
|
|
9210
|
-
this.
|
|
9211
|
-
...(ngDevMode ? [{ debugName: "
|
|
9212
|
-
this.userPermissions
|
|
9210
|
+
this.showPrompts = signal(true, /* @ts-ignore */
|
|
9211
|
+
...(ngDevMode ? [{ debugName: "showPrompts" }] : /* istanbul ignore next */ []));
|
|
9212
|
+
this.userPermissions = this.store.selectSignal(KIT_USER_PERMISSIONS_STATE_TOKEN);
|
|
9213
9213
|
this.selectedFilters$ = new BehaviorSubject([]);
|
|
9214
9214
|
this.isLoading = signal(false, /* @ts-ignore */
|
|
9215
9215
|
...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
|
|
9216
|
+
this.searchResultsContainerWidth = signal(0, /* @ts-ignore */
|
|
9217
|
+
...(ngDevMode ? [{ debugName: "searchResultsContainerWidth" }] : /* istanbul ignore next */ []));
|
|
9216
9218
|
this.expandedFilters = new Set();
|
|
9217
9219
|
this.isClearing = false;
|
|
9220
|
+
this.mainContentColumnOrder = [
|
|
9221
|
+
'title',
|
|
9222
|
+
'status',
|
|
9223
|
+
'subtitle',
|
|
9224
|
+
'routePath',
|
|
9225
|
+
'firstDate',
|
|
9226
|
+
'secondDate',
|
|
9227
|
+
];
|
|
9228
|
+
this.columnTemplates = {
|
|
9229
|
+
title: 'minmax(170px, max-content)',
|
|
9230
|
+
status: 'minmax(115px, max-content)',
|
|
9231
|
+
subtitle: 'minmax(70px, 1fr)',
|
|
9232
|
+
routePath: 'minmax(99px, 2fr)',
|
|
9233
|
+
firstDate: 'minmax(50px, 1fr)',
|
|
9234
|
+
secondDate: 'minmax(50px, 1fr)',
|
|
9235
|
+
additionalContent: 'minmax(90px, max-content)',
|
|
9236
|
+
};
|
|
9218
9237
|
}
|
|
9219
9238
|
documentClick(event) {
|
|
9220
9239
|
if (!this.popup()?.isPopupOpen) {
|
|
@@ -9225,6 +9244,12 @@ class KitGlobalSearchComponent {
|
|
|
9225
9244
|
this.clearSearch();
|
|
9226
9245
|
}
|
|
9227
9246
|
}
|
|
9247
|
+
onWindowResize() {
|
|
9248
|
+
if (!this.popup()?.isPopupOpen) {
|
|
9249
|
+
return;
|
|
9250
|
+
}
|
|
9251
|
+
this.updateSearchResultsContainerWidth();
|
|
9252
|
+
}
|
|
9228
9253
|
ngOnInit() {
|
|
9229
9254
|
combineLatest([
|
|
9230
9255
|
this.textbox().valueChange.pipe(debounceTime(500), distinctUntilChanged(), map((text) => text.trim())),
|
|
@@ -9232,10 +9257,11 @@ class KitGlobalSearchComponent {
|
|
|
9232
9257
|
]).pipe(filter(([text, _,]) => text.length > 2 && !this.isClearing)).subscribe(([text, filters,]) => {
|
|
9233
9258
|
this.searchValue = text;
|
|
9234
9259
|
this.isLoading.set(true);
|
|
9235
|
-
this.
|
|
9260
|
+
this.showPrompts.set(false);
|
|
9236
9261
|
this.searchFn()(text, filters).subscribe(searchResult => {
|
|
9237
9262
|
this.searchResults.set(searchResult.filter(Boolean));
|
|
9238
9263
|
this.isLoading.set(false);
|
|
9264
|
+
this.updateSearchResultsContainerWidth();
|
|
9239
9265
|
});
|
|
9240
9266
|
});
|
|
9241
9267
|
}
|
|
@@ -9254,7 +9280,7 @@ class KitGlobalSearchComponent {
|
|
|
9254
9280
|
this.textbox().valueChange.emit('');
|
|
9255
9281
|
this.textbox().clearValue();
|
|
9256
9282
|
this.searchResults.set([]);
|
|
9257
|
-
this.
|
|
9283
|
+
this.showPrompts.set(true);
|
|
9258
9284
|
this.selectedFilters$.next([]);
|
|
9259
9285
|
this.popup()?.close();
|
|
9260
9286
|
requestAnimationFrame(() => {
|
|
@@ -9271,6 +9297,7 @@ class KitGlobalSearchComponent {
|
|
|
9271
9297
|
if (popupContent) {
|
|
9272
9298
|
popupContent.style.maxHeight = `calc(100vh - ${popupHTMLElement?.style.top} - 40px)`;
|
|
9273
9299
|
}
|
|
9300
|
+
this.updateSearchResultsContainerWidth();
|
|
9274
9301
|
}
|
|
9275
9302
|
}
|
|
9276
9303
|
navigate(routeConfig) {
|
|
@@ -9344,9 +9371,62 @@ class KitGlobalSearchComponent {
|
|
|
9344
9371
|
hasPermissionToShowPrompt(userPermissions, promptPermissions) {
|
|
9345
9372
|
return kitHasPermission(promptPermissions, userPermissions);
|
|
9346
9373
|
}
|
|
9374
|
+
getVisiblePrompts(userPermissions) {
|
|
9375
|
+
return this.prompts().filter(prompt => this.hasPermissionToShowPrompt(userPermissions, prompt.permissions));
|
|
9376
|
+
}
|
|
9377
|
+
isColumnVisible(category, key) {
|
|
9378
|
+
const config = this.getCategoryColumnConfig(category, key);
|
|
9379
|
+
const hideBelowContainerWidthPx = config?.hideBelowContainerWidthPx;
|
|
9380
|
+
if (!hideBelowContainerWidthPx) {
|
|
9381
|
+
return true;
|
|
9382
|
+
}
|
|
9383
|
+
const width = this.searchResultsContainerWidth();
|
|
9384
|
+
if (!width) {
|
|
9385
|
+
return true;
|
|
9386
|
+
}
|
|
9387
|
+
return width >= hideBelowContainerWidthPx;
|
|
9388
|
+
}
|
|
9389
|
+
getMainContentGridTemplate(category, lineItem) {
|
|
9390
|
+
if (!category.layoutConfig) {
|
|
9391
|
+
return null;
|
|
9392
|
+
}
|
|
9393
|
+
const visibleColumns = this.mainContentColumnOrder.filter(key => this.isMainContentColumnVisible(category, lineItem, key));
|
|
9394
|
+
const gridTemplateColumns = visibleColumns.map(key => this.columnTemplates[key]).filter(Boolean);
|
|
9395
|
+
return gridTemplateColumns.length ? gridTemplateColumns.join(' ') : this.columnTemplates.title;
|
|
9396
|
+
}
|
|
9347
9397
|
findFilter(filterField) {
|
|
9348
9398
|
return this.selectedFilters.find(selectedFilter => selectedFilter.field === filterField) || null;
|
|
9349
9399
|
}
|
|
9400
|
+
getCategoryColumnConfig(category, key) {
|
|
9401
|
+
return category.layoutConfig?.columns.find(column => column.key === key) || null;
|
|
9402
|
+
}
|
|
9403
|
+
isMainContentColumnVisible(category, lineItem, key) {
|
|
9404
|
+
if (!this.mainContentColumnOrder.includes(key)) {
|
|
9405
|
+
return false;
|
|
9406
|
+
}
|
|
9407
|
+
if (key === 'routePath') {
|
|
9408
|
+
return !!lineItem.routePath && !!(lineItem.routePath.from || lineItem.routePath.to);
|
|
9409
|
+
}
|
|
9410
|
+
if (!this.isColumnVisible(category, key)) {
|
|
9411
|
+
return false;
|
|
9412
|
+
}
|
|
9413
|
+
if (key === 'status') {
|
|
9414
|
+
return !!lineItem.status;
|
|
9415
|
+
}
|
|
9416
|
+
if (key === 'firstDate') {
|
|
9417
|
+
return !!lineItem.dates?.firstDate?.value;
|
|
9418
|
+
}
|
|
9419
|
+
if (key === 'secondDate') {
|
|
9420
|
+
return !!lineItem.dates?.secondDate?.value;
|
|
9421
|
+
}
|
|
9422
|
+
return true;
|
|
9423
|
+
}
|
|
9424
|
+
updateSearchResultsContainerWidth() {
|
|
9425
|
+
const popupHTMLElement = this.popup()?.popupHTMLElement;
|
|
9426
|
+
const searchResultsContainer = popupHTMLElement?.querySelector('.search-results');
|
|
9427
|
+
const width = searchResultsContainer?.getBoundingClientRect().width || 0;
|
|
9428
|
+
this.searchResultsContainerWidth.set(width);
|
|
9429
|
+
}
|
|
9350
9430
|
isIsoLikeDateString(value) {
|
|
9351
9431
|
if (value.length < 10 || value[4] !== '-' || value[7] !== '-') {
|
|
9352
9432
|
return false;
|
|
@@ -9354,9 +9434,9 @@ class KitGlobalSearchComponent {
|
|
|
9354
9434
|
return !Number.isNaN(Date.parse(value));
|
|
9355
9435
|
}
|
|
9356
9436
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: KitGlobalSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9357
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: KitGlobalSearchComponent, isStandalone: true, selector: "kit-global-search", inputs: { searchFn: { classPropertyName: "searchFn", publicName: "searchFn", isSignal: true, isRequired: true, transformFunction: null }, displayedLineItemsNumber: { classPropertyName: "displayedLineItemsNumber", publicName: "displayedLineItemsNumber", isSignal: true, isRequired: false, transformFunction: null }, prompts: { classPropertyName: "prompts", publicName: "prompts", isSignal: true, isRequired: true, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "document:click": "documentClick($event)" } }, providers: [
|
|
9437
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: KitGlobalSearchComponent, isStandalone: true, selector: "kit-global-search", inputs: { searchFn: { classPropertyName: "searchFn", publicName: "searchFn", isSignal: true, isRequired: true, transformFunction: null }, displayedLineItemsNumber: { classPropertyName: "displayedLineItemsNumber", publicName: "displayedLineItemsNumber", isSignal: true, isRequired: false, transformFunction: null }, prompts: { classPropertyName: "prompts", publicName: "prompts", isSignal: true, isRequired: true, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "document:click": "documentClick($event)", "window:resize": "onWindowResize()" } }, providers: [
|
|
9358
9438
|
DatePipe,
|
|
9359
|
-
], viewQueries: [{ propertyName: "textbox", first: true, predicate: TextBoxComponent, descendants: true, isSignal: true }, { propertyName: "anchor", first: true, predicate: TextBoxComponent, descendants: true, read: ElementRef, isSignal: true }, { propertyName: "popup", first: true, predicate: ["popup"], descendants: true, read: KitPopupComponent, isSignal: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: "<div #container\n class=\"global-search\"\n [class.expanded]=\"isPopupOpen\">\n <kendo-textbox class=\"textbox\"\n [placeholder]=\"'kit.globalSearch.placeholder' | translate\"\n [(ngModel)]=\"searchValue\"\n (click)=\"openPopup()\">\n <ng-template kendoTextBoxPrefixTemplate>\n <kit-svg-icon [icon]=\"kitSvgIcon.SEARCH\" />\n </ng-template>\n <ng-template kendoTextBoxSuffixTemplate>\n <kit-svg-icon [icon]=\"kitSvgIcon.CIRCLE_CROSS_THIN\"\n (click)=\"clearSearch()\" />\n </ng-template>\n </kendo-textbox>\n\n <kit-popup #popup\n [popupClass]=\"popupClass\"\n [anchor]=\"anchor()\"\n [content]=\"content\"\n [closeOnOutsideClick]=\"false\" />\n\n <ng-template #content>\n @if (userPermissions$ | async; as userPermissions) {\n <div class=\"popup-content\">\n @if (showPropmts()) {\n <div class=\"prompts\">\n @for (prompt of prompts(); track prompt) {\n @if (hasPermissionToShowPrompt(userPermissions, prompt.permissions)) {\n <kit-pill [theme]=\"kitPillTheme.MAIN\"\n [selectable]=\"true\"\n (clicked)=\"onSelectPrompt(prompt)\">\n {{ prompt.label }}\n </kit-pill>\n }\n }\n </div>\n } @else {\n @if (isLoading()) {\n <div class=\"search-results\">\n <kendo-loader class=\"loader\" />\n </div>\n } @else if (searchResults().length) {\n <div class=\"search-results\">\n @for (category of searchResults(); track category?.name) {\n @if (category) {\n <div class=\"category\">\n <div class=\"header\"\n [class.empty]=\"!category.total\">\n <div class=\"header-main\">\n <kit-svg-icon class=\"header-main-icon\"\n [icon]=\"kitSvgIcon.CHECK_STICKER\" />\n <span class=\"header-main-title\">{{ category.name.toUpperCase() }} ({{ category.total }})</span>\n </div>\n\n @if (category.total > this.displayedLineItemsNumber()) {\n <kit-button [label]=\"'kit.globalSearch.showResults' | translate\"\n [type]=\"kitButtonType.GHOST\"\n [kind]=\"kitButtonKind.SMALL\"\n (clicked)=\"navigate(category.routeConfig)\" />\n }\n </div>\n\n @for (lineItem of category.items.slice(0, this.displayedLineItemsNumber()); track lineItem) {\n <div class=\"line-item\"\n [class.has-link]=\"lineItem.routeConfig\"\n (click)=\"navigate(lineItem.routeConfig)\">\n <div class=\"main-content\">\n <div class=\"title\">\n <span [innerHTML]=\"lineItem.title | highlight:searchValue\"></span>\n </div>\n @if (lineItem.status) {\n <div>\n <kit-pill class=\"status\"\n [theme]=\"kitPillTheme.MAIN\">\n {{ lineItem.status }}\n </kit-pill>\n </div>\n }\n <div class=\"subtitle\"\n kitHideBelowWidthClass=\"hide\"\n [kitHideBelowWidth]=\"61\">\n <kit-truncate-text>\n <span [innerHTML]=\"lineItem.subtitle || '' | highlight:searchValue\"></span>\n </kit-truncate-text>\n </div>\n\n @if (lineItem.routePath; as routePath) {\n @if (routePath.from || routePath.to) {\n <kit-route-path class=\"route\"\n kitHideBelowWidthClass=\"hide\"\n [kitHideBelowWidth]=\"132\"\n [containerMode]=\"routePath.containerMode ?? ''\"\n [destinationPort]=\"routePath.to ?? ''\"\n [originPort]=\"routePath.from ?? ''\"\n [type]=\"routePath.type ?? ''\" />\n }\n }\n @if (lineItem.dates; as dates) {\n @if (dates.firstDate.value) {\n <div class=\"dates\">\n <div class=\"date-wrapper first-date\">\n <p class=\"date-label\">\n <kit-svg-icon [icon]=\"kitSvgIcon.CALENDAR\" />\n <span>{{ dates.firstDate.label }}</span>\n </p>\n <span class=\"date\">{{ dates.firstDate.value | date: dateFormat : 'UTC' }}</span>\n </div>\n </div>\n }\n @if (dates.secondDate.value) {\n <div class=\"dates\">\n <div class=\"date-wrapper second-date\">\n <p class=\"date-label\">\n <kit-svg-icon [icon]=\"kitSvgIcon.CALENDAR\" />\n <span>{{ dates.secondDate.label }}</span>\n </p>\n <span class=\"date\">{{ dates.secondDate.value | date: dateFormat : 'UTC' }}</span>\n </div>\n </div>\n }\n }\n </div>\n\n <div class=\"additional-content\">\n @for (item of lineItem.additionalContent; track item.key) {\n <div>\n <span class=\"label\">{{ item.translateKey | translate }} </span>\n <span class=\"value\"\n [innerHTML]=\"formatValue(item.value) | highlight:searchValue\"></span>\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n }\n </div>\n } @else {\n <kit-empty-section class=\"empty-section\"\n [text]=\"'kit.globalSearch.noData' | translate\" />\n }\n\n @if (filters().length) {\n <div class=\"filters\">\n @for (filter of filters(); track $index) {\n <div>\n <p class=\"label\">{{ filter.label }}</p>\n @for (value of filter.values.slice(0, isFilterExpanded($index) ? filter.values.length : 3); track $index) {\n <kit-pill @heightExpandCollapseAnimation\n class=\"filter-value\"\n [theme]=\"kitPillTheme.MAIN\"\n [selectable]=\"true\"\n [selected]=\"isFilterSelected(value)\"\n (clicked)=\"onSelectFilter(value, filter.appliedTo)\">\n {{ value.title | translate }}\n </kit-pill>\n }\n @if (filter.values.length > 3) {\n <kit-button class=\"toggle-btn\"\n [label]=\"`kit.globalSearch.${isFilterExpanded($index) ? 'showLess' : 'showMore'}` | translate\"\n [icon]=\"isFilterExpanded($index) ? kitSvgIcon.CHEVRON_UP : kitSvgIcon.CHEVRON_DOWN\"\n [iconPosition]=\"kitButtonIconPosition.LEADING\"\n [kind]=\"kitButtonKind.SMALL\"\n [type]=\"kitButtonType.GHOST\"\n (clicked)=\"toggleFilterExpanded($index)\" />\n }\n </div>\n }\n </div>\n }\n }\n </div>\n }\n </ng-template>\n</div>\n", styles: [":host{flex:1}:host .global-search{max-width:360px}:host .global-search.expanded{max-width:100%}:host .global-search .textbox{border-color:var(--ui-kit-color-grey-11);box-shadow:none;border-radius:8px}:host .global-search .textbox.k-focus{border-color:var(--ui-kit-color-main)}:host ::ng-deep .k-animation-container{width:calc(100% - 145px)}:host ::ng-deep .kit-global-search-popup{overflow:auto;margin-top:10px;padding:0}:host ::ng-deep .kit-global-search-popup .popup-content{display:flex;justify-content:space-between}:host ::ng-deep .global-search .k-textbox.k-input .k-input-inner{padding:0 8px;height:40px}:host ::ng-deep .global-search .k-textbox.k-input .kit-svg-icon .search-icon{width:37px;height:37px;fill:none;stroke:var(--ui-kit-color-grey-10);padding-left:12px}:host ::ng-deep .global-search .k-textbox.k-input .kit-svg-icon .circle-cross-thin-icon{width:30px;height:30px;fill:none;stroke:var(--ui-kit-color-grey-12);padding-right:12px;cursor:pointer}:host ::ng-deep .search-results{padding:24px;flex:1}:host ::ng-deep .search-results .loader{display:flex;justify-content:center;height:100%;align-items:center;color:var(--ui-kit-color-main)}:host ::ng-deep .search-results .category:not(:last-child){margin-bottom:20px}:host ::ng-deep .search-results .category .header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin:0 0 20px}:host ::ng-deep .search-results .category .header-main{display:flex;align-items:center}:host ::ng-deep .search-results .category .header-main-icon{width:16px;height:16px;fill:var(--ui-kit-color-main);margin-right:10px}:host ::ng-deep .search-results .category .header-main-title{color:var(--ui-kit-color-main)}:host ::ng-deep .search-results .category .header.empty{margin:0}:host ::ng-deep .search-results .category .header.empty .header-main-icon{fill:var(--ui-kit-color-grey-12)}:host ::ng-deep .search-results .category .header.empty .header-main-title{color:var(--ui-kit-color-grey-12)}:host ::ng-deep .search-results .category .line-item{min-width:575px;padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid var(--ui-kit-color-grey-11)}:host ::ng-deep .search-results .category .line-item.has-link{cursor:pointer}:host ::ng-deep .search-results .category .line-item.has-link:hover{opacity:.7}:host ::ng-deep .search-results .category .line-item .highlighted{color:var(--ui-kit-color-main)}:host ::ng-deep .search-results .category .line-item .main-content{display:grid;grid-template-columns:minmax(170px,max-content) minmax(115px,max-content) repeat(auto-fit,minmax(60px,1fr));gap:20px;align-items:center;grid-auto-flow:column}:host ::ng-deep .search-results .category .line-item .main-content .title{font-size:16px;line-height:22px;font-weight:500}:host ::ng-deep .search-results .category .line-item .main-content .subtitle{width:100%}:host ::ng-deep .search-results .category .line-item .main-content .subtitle.hide{display:none}:host ::ng-deep .search-results .category .line-item .main-content .title,:host ::ng-deep .search-results .category .line-item .main-content .subtitle{color:var(--ui-kit-color-grey-10)}:host ::ng-deep .search-results .category .line-item .main-content .icon.calendar-icon{width:18px;height:18px;fill:var(--ui-kit-color-grey-12);margin-right:3px}:host ::ng-deep .search-results .category .line-item .main-content .route{container:route/inline-size;width:100%}:host ::ng-deep .search-results .category .line-item .main-content .route.hide{display:none;container:none}:host ::ng-deep .search-results .category .line-item .main-content .route .route-path{justify-content:left}:host ::ng-deep .search-results .category .line-item .main-content .status{white-space:nowrap;display:block;margin:auto}:host ::ng-deep .search-results .category .line-item .main-content .kit-pill-content{margin:auto}:host ::ng-deep .search-results .category .line-item .main-content .dates{display:flex;align-items:center;font-size:12px;line-height:14px;container:dates/inline-size;width:100%}:host ::ng-deep .search-results .category .line-item .main-content .dates .date-wrapper{display:flex;justify-content:left;align-items:center;flex-wrap:wrap;text-align:center}:host ::ng-deep .search-results .category .line-item .main-content .dates .date-wrapper .date{text-wrap:nowrap}:host ::ng-deep .search-results .category .line-item .main-content .dates .date-label{display:flex;align-items:center;justify-content:center;margin-right:5px;text-wrap:nowrap}:host ::ng-deep .search-results .category .line-item .main-content .dates.first-date{color:var(--ui-kit-color-grey-14)}:host ::ng-deep .search-results .category .line-item .main-content .dates.second-date{color:var(--ui-kit-color-grey-10)}:host ::ng-deep .search-results .category .line-item .main-content:has(.route:not(.hide)){grid-template-columns:minmax(170px,max-content) minmax(115px,max-content) minmax(70px,1fr) minmax(99px,2fr) repeat(auto-fit,minmax(50px,1fr))}:host ::ng-deep .search-results .category .line-item .main-content:not(:has(.status)){grid-template-columns:minmax(170px,max-content) minmax(70px,1fr) repeat(auto-fit,minmax(50px,1fr))}:host ::ng-deep .search-results .category .line-item .main-content:not(:has(.status)):has(.route:not(.hide)){grid-template-columns:minmax(170px,max-content) minmax(70px,1fr) minmax(99px,2fr) repeat(auto-fit,minmax(50px,1fr))}:host ::ng-deep .search-results .category .line-item .main-content>.dates:last-child{justify-self:end;justify-content:end;text-align:right}:host ::ng-deep .search-results .category .line-item .main-content>.dates:last-child .date-wrapper{justify-content:end}:host ::ng-deep .search-results .category .line-item .additional-content{text-align:right}:host ::ng-deep .search-results .category .line-item .additional-content .label{color:var(--ui-kit-color-grey-14)}:host ::ng-deep .search-results .category .line-item .additional-content .value{color:var(--ui-kit-color-grey-10)}@container route (max-width: 190px){:host ::ng-deep .search-results .category .route-origin-port,:host ::ng-deep .search-results .category .icon.arrow{display:none}:host ::ng-deep .search-results .category .line-item .main-content .route .route-path{grid-template-columns:minmax(0,auto) min-content;justify-content:stretch}}@container route (max-width: 150px){:host ::ng-deep .search-results .category .route-mode{display:none}}@container dates (max-width: 120px){:host ::ng-deep .search-results .category .date-wrapper{flex-direction:column}:host ::ng-deep .search-results .category .date-label{margin-right:0}}:host ::ng-deep .filters{background-color:var(--ui-kit-color-grey-13);padding:24px;min-width:175px}:host ::ng-deep .filters .label{font-size:12px;line-height:14px;color:var(--ui-kit-color-grey-10);margin-bottom:10px;text-transform:uppercase}:host ::ng-deep .filters .filter-value{margin-bottom:10px;display:block}:host ::ng-deep .filters .filter-value .kit-pill{line-height:16px;text-align:left;display:inline-block;padding:7px 16px;font-size:13px}:host ::ng-deep .filters .toggle-btn{margin-bottom:40px;display:block}:host ::ng-deep .filters .toggle-btn .k-button{min-width:125px;padding:6px 16px;min-height:32px}:host ::ng-deep .prompts{display:flex;gap:10px;padding:24px}:host ::ng-deep .empty-section{container:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: KitSvgIconComponent, selector: "kit-svg-icon", inputs: ["icon", "iconClass"] }, { kind: "component", type: i1$4.TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "type", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength", "inputAttributes"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }, { kind: "directive", type: i1$4.TextBoxSuffixTemplateDirective, selector: "[kendoTextBoxSuffixTemplate]", inputs: ["showSeparator"] }, { kind: "directive", type: i1$4.TextBoxPrefixTemplateDirective, selector: "[kendoTextBoxPrefixTemplate]", inputs: ["showSeparator"] }, { kind: "component", type: i1$b.LoaderComponent, selector: "kendo-loader", inputs: ["type", "themeColor", "size"] }, { kind: "component", type: KitPopupComponent, selector: "kit-popup", inputs: ["anchor", "content", "closeOnOutsideClick", "showFooter", "cancelButtonLabel", "applyButtonLabel", "isApplyButtonDisabled", "positionMode", "popupClass", "closePopupOnCancel", "extraInsideSelectors"], outputs: ["cancelAction", "applyAction", "opened", "closed"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: KitRoutePathComponent, selector: "kit-route-path", inputs: ["originPort", "destinationPort", "type", "containerMode"] }, { kind: "component", type: KitButtonComponent, selector: "kit-button", inputs: ["disabled", "label", "type", "icon", "iconType", "kind", "state", "iconPosition", "buttonClass", "active"], outputs: ["clicked"] }, { kind: "component", type: KitTruncateTextComponent, selector: "kit-truncate-text", inputs: ["tooltipText", "lines", "innerHtml"] }, { kind: "component", type: KitEmptySectionComponent, selector: "kit-empty-section", inputs: ["text", "size"] }, { kind: "component", type: KitPillComponent, selector: "kit-pill", inputs: ["removable", "selectable", "selected", "type", "theme", "icon", "iconType"], outputs: ["clicked", "removed"] }, { kind: "directive", type: KitHideBelowWidthDirective, selector: "[kitHideBelowWidth]", inputs: ["kitHideBelowWidth", "kitHideBelowWidthClass"] }, { kind: "pipe", type: i1$7.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$7.DatePipe, name: "date" }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: HighlightPipe, name: "highlight" }], animations: [
|
|
9439
|
+
], viewQueries: [{ propertyName: "textbox", first: true, predicate: TextBoxComponent, descendants: true, isSignal: true }, { propertyName: "anchor", first: true, predicate: TextBoxComponent, descendants: true, read: ElementRef, isSignal: true }, { propertyName: "popup", first: true, predicate: ["popup"], descendants: true, read: KitPopupComponent, isSignal: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: "<div #container\n class=\"global-search\"\n [class.expanded]=\"isPopupOpen\">\n <kendo-textbox class=\"textbox\"\n [placeholder]=\"'kit.globalSearch.placeholder' | translate\"\n [(ngModel)]=\"searchValue\"\n (click)=\"openPopup()\">\n <ng-template kendoTextBoxPrefixTemplate>\n <kit-svg-icon [icon]=\"kitSvgIcon.SEARCH\" />\n </ng-template>\n <ng-template kendoTextBoxSuffixTemplate>\n <kit-svg-icon [icon]=\"kitSvgIcon.CIRCLE_CROSS_THIN\"\n (click)=\"clearSearch()\" />\n </ng-template>\n </kendo-textbox>\n\n <kit-popup #popup\n [popupClass]=\"popupClass\"\n [anchor]=\"anchor()\"\n [content]=\"content\"\n [closeOnOutsideClick]=\"false\" />\n\n <ng-template #content>\n @if (userPermissions(); as userPermissions) {\n <div class=\"popup-content\">\n @if (showPrompts()) {\n @if (getVisiblePrompts(userPermissions); as visiblePrompts) {\n @if (visiblePrompts.length) {\n <div class=\"prompts\">\n @for (prompt of visiblePrompts; track prompt) {\n <kit-pill [theme]=\"kitPillTheme.MAIN\"\n [selectable]=\"true\"\n (clicked)=\"onSelectPrompt(prompt)\">\n {{ prompt.label }}\n </kit-pill>\n }\n </div>\n }\n }\n } @else {\n @if (isLoading()) {\n <div class=\"search-results\">\n <kendo-loader class=\"loader\" />\n </div>\n } @else if (searchResults().length) {\n <div class=\"search-results\">\n @for (category of searchResults(); track category?.name) {\n @if (category) {\n <div class=\"category\">\n <div class=\"header\"\n [class.empty]=\"!category.total\">\n <div class=\"header-main\">\n <kit-svg-icon class=\"header-main-icon\"\n [icon]=\"kitSvgIcon.CHECK_STICKER\" />\n <span class=\"header-main-title\">{{ category.name.toUpperCase() }} ({{ category.total }})</span>\n </div>\n\n @if (category.total > this.displayedLineItemsNumber()) {\n <kit-button [label]=\"'kit.globalSearch.showResults' | translate\"\n [type]=\"kitButtonType.GHOST\"\n [kind]=\"kitButtonKind.SMALL\"\n (clicked)=\"navigate(category.routeConfig)\" />\n }\n </div>\n\n @for (lineItem of category.items.slice(0, this.displayedLineItemsNumber()); track lineItem) {\n <div class=\"line-item\"\n [class.has-link]=\"lineItem.routeConfig\"\n (click)=\"navigate(lineItem.routeConfig)\">\n <div class=\"main-content\"\n [style.grid-template-columns]=\"getMainContentGridTemplate(category, lineItem)\">\n @if (isColumnVisible(category, 'title')) {\n <div class=\"title\">\n <span [innerHTML]=\"lineItem.title | highlight:searchValue\"></span>\n </div>\n }\n @if (lineItem.status && isColumnVisible(category, 'status')) {\n <div>\n <kit-pill class=\"status\"\n [theme]=\"kitPillTheme.MAIN\">\n {{ lineItem.status }}\n </kit-pill>\n </div>\n }\n @if (isColumnVisible(category, 'subtitle')) {\n <div class=\"subtitle\">\n <kit-truncate-text>\n <span [innerHTML]=\"lineItem.subtitle || '' | highlight:searchValue\"></span>\n </kit-truncate-text>\n </div>\n }\n\n @if (lineItem.routePath; as routePath) {\n @if (routePath.from || routePath.to) {\n <kit-route-path class=\"route\"\n kitHideBelowWidthClass=\"hide\"\n [kitHideBelowWidth]=\"132\"\n [containerMode]=\"routePath.containerMode ?? ''\"\n [destinationPort]=\"routePath.to ?? ''\"\n [originPort]=\"routePath.from ?? ''\"\n [type]=\"routePath.type ?? ''\" />\n }\n }\n @if (lineItem.dates; as dates) {\n @if (isColumnVisible(category, 'firstDate') && dates.firstDate.value) {\n <div class=\"dates\">\n <div class=\"date-wrapper first-date\">\n <p class=\"date-label\">\n <kit-svg-icon [icon]=\"kitSvgIcon.CALENDAR\" />\n <span>{{ dates.firstDate.label }}</span>\n </p>\n <span class=\"date\">{{ dates.firstDate.value | date: dateFormat : 'UTC' }}</span>\n </div>\n </div>\n }\n @if (isColumnVisible(category, 'secondDate') && dates.secondDate.value) {\n <div class=\"dates\">\n <div class=\"date-wrapper second-date\">\n <p class=\"date-label\">\n <kit-svg-icon [icon]=\"kitSvgIcon.CALENDAR\" />\n <span>{{ dates.secondDate.label }}</span>\n </p>\n <span class=\"date\">{{ dates.secondDate.value | date: dateFormat : 'UTC' }}</span>\n </div>\n </div>\n }\n }\n </div>\n\n @if (isColumnVisible(category, 'additionalContent')) {\n <div class=\"additional-content\">\n @for (item of lineItem.additionalContent; track item.key) {\n <div>\n <span class=\"label\">{{ item.translateKey | translate }} </span>\n <span class=\"value\"\n [innerHTML]=\"formatValue(item.value) | highlight:searchValue\"></span>\n </div>\n }\n </div>\n }\n </div>\n }\n </div>\n }\n }\n </div>\n } @else {\n <kit-empty-section class=\"empty-section\"\n [text]=\"'kit.globalSearch.noData' | translate\" />\n }\n\n @if (filters().length) {\n <div class=\"filters\">\n @for (filter of filters(); track $index) {\n <div>\n <p class=\"label\">{{ filter.label }}</p>\n @for (value of filter.values.slice(0, isFilterExpanded($index) ? filter.values.length : 3); track $index) {\n <kit-pill @heightExpandCollapseAnimation\n class=\"filter-value\"\n [theme]=\"kitPillTheme.MAIN\"\n [selectable]=\"true\"\n [selected]=\"isFilterSelected(value)\"\n (clicked)=\"onSelectFilter(value, filter.appliedTo)\">\n {{ value.title | translate }}\n </kit-pill>\n }\n @if (filter.values.length > 3) {\n <kit-button class=\"toggle-btn\"\n [label]=\"`kit.globalSearch.${isFilterExpanded($index) ? 'showLess' : 'showMore'}` | translate\"\n [icon]=\"isFilterExpanded($index) ? kitSvgIcon.CHEVRON_UP : kitSvgIcon.CHEVRON_DOWN\"\n [iconPosition]=\"kitButtonIconPosition.LEADING\"\n [kind]=\"kitButtonKind.SMALL\"\n [type]=\"kitButtonType.GHOST\"\n (clicked)=\"toggleFilterExpanded($index)\" />\n }\n </div>\n }\n </div>\n }\n }\n </div>\n }\n </ng-template>\n</div>\n", styles: [":host{flex:1}:host .global-search{max-width:360px}:host .global-search.expanded{max-width:100%}:host .global-search .textbox{border-color:var(--ui-kit-color-grey-11);box-shadow:none;border-radius:8px}:host .global-search .textbox.k-focus{border-color:var(--ui-kit-color-main)}:host ::ng-deep .k-animation-container{width:calc(100% - 145px)}:host ::ng-deep .kit-global-search-popup{overflow:auto;margin-top:10px;padding:0}:host ::ng-deep .kit-global-search-popup .popup-content{display:flex;justify-content:space-between}:host ::ng-deep .global-search .k-textbox.k-input .k-input-inner{padding:0 8px;height:40px}:host ::ng-deep .global-search .k-textbox.k-input .kit-svg-icon .search-icon{width:37px;height:37px;fill:none;stroke:var(--ui-kit-color-grey-10);padding-left:12px}:host ::ng-deep .global-search .k-textbox.k-input .kit-svg-icon .circle-cross-thin-icon{width:30px;height:30px;fill:none;stroke:var(--ui-kit-color-grey-12);padding-right:12px;cursor:pointer}:host ::ng-deep .search-results{padding:24px;flex:1}:host ::ng-deep .search-results .loader{display:flex;justify-content:center;height:100%;align-items:center;color:var(--ui-kit-color-main)}:host ::ng-deep .search-results .category:not(:last-child){margin-bottom:20px}:host ::ng-deep .search-results .category .header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin:0 0 20px}:host ::ng-deep .search-results .category .header-main{display:flex;align-items:center}:host ::ng-deep .search-results .category .header-main-icon{width:16px;height:16px;fill:var(--ui-kit-color-main);margin-right:10px}:host ::ng-deep .search-results .category .header-main-title{color:var(--ui-kit-color-main)}:host ::ng-deep .search-results .category .header.empty{margin:0}:host ::ng-deep .search-results .category .header.empty .header-main-icon{fill:var(--ui-kit-color-grey-12)}:host ::ng-deep .search-results .category .header.empty .header-main-title{color:var(--ui-kit-color-grey-12)}:host ::ng-deep .search-results .category .line-item{min-width:575px;padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid var(--ui-kit-color-grey-11)}:host ::ng-deep .search-results .category .line-item.has-link{cursor:pointer}:host ::ng-deep .search-results .category .line-item.has-link:hover{opacity:.7}:host ::ng-deep .search-results .category .line-item .highlighted{color:var(--ui-kit-color-main)}:host ::ng-deep .search-results .category .line-item .main-content{display:grid;grid-template-columns:minmax(170px,max-content) minmax(115px,max-content) repeat(auto-fit,minmax(60px,1fr));gap:20px;align-items:center;grid-auto-flow:column}:host ::ng-deep .search-results .category .line-item .main-content .title{font-size:16px;line-height:22px;font-weight:500}:host ::ng-deep .search-results .category .line-item .main-content .subtitle{width:100%}:host ::ng-deep .search-results .category .line-item .main-content .subtitle.hide{display:none}:host ::ng-deep .search-results .category .line-item .main-content .title,:host ::ng-deep .search-results .category .line-item .main-content .subtitle{color:var(--ui-kit-color-grey-10)}:host ::ng-deep .search-results .category .line-item .main-content .icon.calendar-icon{width:18px;height:18px;fill:var(--ui-kit-color-grey-12);margin-right:3px}:host ::ng-deep .search-results .category .line-item .main-content .route{container:route/inline-size;width:100%}:host ::ng-deep .search-results .category .line-item .main-content .route.hide{display:none;container:none}:host ::ng-deep .search-results .category .line-item .main-content .route .route-path{justify-content:left}:host ::ng-deep .search-results .category .line-item .main-content .status{white-space:nowrap;display:block;margin:auto}:host ::ng-deep .search-results .category .line-item .main-content .kit-pill-content{margin:auto}:host ::ng-deep .search-results .category .line-item .main-content .dates{display:flex;align-items:center;font-size:12px;line-height:14px;container:dates/inline-size;width:100%}:host ::ng-deep .search-results .category .line-item .main-content .dates .date-wrapper{display:flex;justify-content:left;align-items:center;flex-wrap:wrap;text-align:center}:host ::ng-deep .search-results .category .line-item .main-content .dates .date-wrapper .date{text-wrap:nowrap}:host ::ng-deep .search-results .category .line-item .main-content .dates .date-label{display:flex;align-items:center;justify-content:center;margin-right:5px;text-wrap:nowrap}:host ::ng-deep .search-results .category .line-item .main-content .dates.first-date{color:var(--ui-kit-color-grey-14)}:host ::ng-deep .search-results .category .line-item .main-content .dates.second-date{color:var(--ui-kit-color-grey-10)}:host ::ng-deep .search-results .category .line-item .main-content:has(.route:not(.hide)){grid-template-columns:minmax(170px,max-content) minmax(115px,max-content) minmax(70px,1fr) minmax(99px,2fr) repeat(auto-fit,minmax(50px,1fr))}:host ::ng-deep .search-results .category .line-item .main-content:not(:has(.status)){grid-template-columns:minmax(170px,max-content) minmax(70px,1fr) repeat(auto-fit,minmax(50px,1fr))}:host ::ng-deep .search-results .category .line-item .main-content:not(:has(.status)):has(.route:not(.hide)){grid-template-columns:minmax(170px,max-content) minmax(70px,1fr) minmax(99px,2fr) repeat(auto-fit,minmax(50px,1fr))}:host ::ng-deep .search-results .category .line-item .main-content>.dates:last-child{justify-self:end;justify-content:end;text-align:right}:host ::ng-deep .search-results .category .line-item .main-content>.dates:last-child .date-wrapper{justify-content:end}:host ::ng-deep .search-results .category .line-item .additional-content{text-align:right}:host ::ng-deep .search-results .category .line-item .additional-content .label{color:var(--ui-kit-color-grey-14)}:host ::ng-deep .search-results .category .line-item .additional-content .value{color:var(--ui-kit-color-grey-10)}@container route (max-width: 190px){:host ::ng-deep .search-results .category .route-origin-port,:host ::ng-deep .search-results .category .icon.arrow{display:none}:host ::ng-deep .search-results .category .line-item .main-content .route .route-path{grid-template-columns:minmax(0,auto) min-content;justify-content:stretch}}@container route (max-width: 150px){:host ::ng-deep .search-results .category .route-mode{display:none}}@container dates (max-width: 120px){:host ::ng-deep .search-results .category .date-wrapper{flex-direction:column}:host ::ng-deep .search-results .category .date-label{margin-right:0}}:host ::ng-deep .filters{background-color:var(--ui-kit-color-grey-13);padding:24px;min-width:175px}:host ::ng-deep .filters .label{font-size:12px;line-height:14px;color:var(--ui-kit-color-grey-10);margin-bottom:10px;text-transform:uppercase}:host ::ng-deep .filters .filter-value{margin-bottom:10px;display:block}:host ::ng-deep .filters .filter-value .kit-pill{line-height:16px;text-align:left;display:inline-block;padding:7px 16px;font-size:13px}:host ::ng-deep .filters .toggle-btn{margin-bottom:40px;display:block}:host ::ng-deep .filters .toggle-btn .k-button{min-width:125px;padding:6px 16px;min-height:32px}:host ::ng-deep .prompts{display:flex;gap:10px;padding:24px}:host ::ng-deep .empty-section{container:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: KitSvgIconComponent, selector: "kit-svg-icon", inputs: ["icon", "iconClass"] }, { kind: "component", type: i1$4.TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "type", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength", "inputAttributes"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }, { kind: "directive", type: i1$4.TextBoxSuffixTemplateDirective, selector: "[kendoTextBoxSuffixTemplate]", inputs: ["showSeparator"] }, { kind: "directive", type: i1$4.TextBoxPrefixTemplateDirective, selector: "[kendoTextBoxPrefixTemplate]", inputs: ["showSeparator"] }, { kind: "component", type: i1$b.LoaderComponent, selector: "kendo-loader", inputs: ["type", "themeColor", "size"] }, { kind: "component", type: KitPopupComponent, selector: "kit-popup", inputs: ["anchor", "content", "closeOnOutsideClick", "showFooter", "cancelButtonLabel", "applyButtonLabel", "isApplyButtonDisabled", "positionMode", "popupClass", "closePopupOnCancel", "extraInsideSelectors"], outputs: ["cancelAction", "applyAction", "opened", "closed"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: KitRoutePathComponent, selector: "kit-route-path", inputs: ["originPort", "destinationPort", "type", "containerMode"] }, { kind: "component", type: KitButtonComponent, selector: "kit-button", inputs: ["disabled", "label", "type", "icon", "iconType", "kind", "state", "iconPosition", "buttonClass", "active"], outputs: ["clicked"] }, { kind: "component", type: KitTruncateTextComponent, selector: "kit-truncate-text", inputs: ["tooltipText", "lines", "innerHtml"] }, { kind: "component", type: KitEmptySectionComponent, selector: "kit-empty-section", inputs: ["text", "size"] }, { kind: "component", type: KitPillComponent, selector: "kit-pill", inputs: ["removable", "selectable", "selected", "type", "theme", "icon", "iconType"], outputs: ["clicked", "removed"] }, { kind: "directive", type: KitHideBelowWidthDirective, selector: "[kitHideBelowWidth]", inputs: ["kitHideBelowWidth", "kitHideBelowWidthClass"] }, { kind: "pipe", type: i1$7.DatePipe, name: "date" }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: HighlightPipe, name: "highlight" }], animations: [
|
|
9360
9440
|
expandCollapseAnimation('height'),
|
|
9361
9441
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9362
9442
|
}
|
|
@@ -9383,13 +9463,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
|
|
|
9383
9463
|
expandCollapseAnimation('height'),
|
|
9384
9464
|
], providers: [
|
|
9385
9465
|
DatePipe,
|
|
9386
|
-
], template: "<div #container\n class=\"global-search\"\n [class.expanded]=\"isPopupOpen\">\n <kendo-textbox class=\"textbox\"\n [placeholder]=\"'kit.globalSearch.placeholder' | translate\"\n [(ngModel)]=\"searchValue\"\n (click)=\"openPopup()\">\n <ng-template kendoTextBoxPrefixTemplate>\n <kit-svg-icon [icon]=\"kitSvgIcon.SEARCH\" />\n </ng-template>\n <ng-template kendoTextBoxSuffixTemplate>\n <kit-svg-icon [icon]=\"kitSvgIcon.CIRCLE_CROSS_THIN\"\n (click)=\"clearSearch()\" />\n </ng-template>\n </kendo-textbox>\n\n <kit-popup #popup\n [popupClass]=\"popupClass\"\n [anchor]=\"anchor()\"\n [content]=\"content\"\n [closeOnOutsideClick]=\"false\" />\n\n <ng-template #content>\n @if (userPermissions$ | async; as userPermissions) {\n <div class=\"popup-content\">\n @if (showPropmts()) {\n <div class=\"prompts\">\n @for (prompt of prompts(); track prompt) {\n @if (hasPermissionToShowPrompt(userPermissions, prompt.permissions)) {\n <kit-pill [theme]=\"kitPillTheme.MAIN\"\n [selectable]=\"true\"\n (clicked)=\"onSelectPrompt(prompt)\">\n {{ prompt.label }}\n </kit-pill>\n }\n }\n </div>\n } @else {\n @if (isLoading()) {\n <div class=\"search-results\">\n <kendo-loader class=\"loader\" />\n </div>\n } @else if (searchResults().length) {\n <div class=\"search-results\">\n @for (category of searchResults(); track category?.name) {\n @if (category) {\n <div class=\"category\">\n <div class=\"header\"\n [class.empty]=\"!category.total\">\n <div class=\"header-main\">\n <kit-svg-icon class=\"header-main-icon\"\n [icon]=\"kitSvgIcon.CHECK_STICKER\" />\n <span class=\"header-main-title\">{{ category.name.toUpperCase() }} ({{ category.total }})</span>\n </div>\n\n @if (category.total > this.displayedLineItemsNumber()) {\n <kit-button [label]=\"'kit.globalSearch.showResults' | translate\"\n [type]=\"kitButtonType.GHOST\"\n [kind]=\"kitButtonKind.SMALL\"\n (clicked)=\"navigate(category.routeConfig)\" />\n }\n </div>\n\n @for (lineItem of category.items.slice(0, this.displayedLineItemsNumber()); track lineItem) {\n <div class=\"line-item\"\n [class.has-link]=\"lineItem.routeConfig\"\n (click)=\"navigate(lineItem.routeConfig)\">\n <div class=\"main-content\">\n <div class=\"title\">\n <span [innerHTML]=\"lineItem.title | highlight:searchValue\"></span>\n </div>\n @if (lineItem.status) {\n <div>\n <kit-pill class=\"status\"\n [theme]=\"kitPillTheme.MAIN\">\n {{ lineItem.status }}\n </kit-pill>\n </div>\n }\n <div class=\"subtitle\"\n kitHideBelowWidthClass=\"hide\"\n [kitHideBelowWidth]=\"61\">\n <kit-truncate-text>\n <span [innerHTML]=\"lineItem.subtitle || '' | highlight:searchValue\"></span>\n </kit-truncate-text>\n </div>\n\n @if (lineItem.routePath; as routePath) {\n @if (routePath.from || routePath.to) {\n <kit-route-path class=\"route\"\n kitHideBelowWidthClass=\"hide\"\n [kitHideBelowWidth]=\"132\"\n [containerMode]=\"routePath.containerMode ?? ''\"\n [destinationPort]=\"routePath.to ?? ''\"\n [originPort]=\"routePath.from ?? ''\"\n [type]=\"routePath.type ?? ''\" />\n }\n }\n @if (lineItem.dates; as dates) {\n @if (dates.firstDate.value) {\n <div class=\"dates\">\n <div class=\"date-wrapper first-date\">\n <p class=\"date-label\">\n <kit-svg-icon [icon]=\"kitSvgIcon.CALENDAR\" />\n <span>{{ dates.firstDate.label }}</span>\n </p>\n <span class=\"date\">{{ dates.firstDate.value | date: dateFormat : 'UTC' }}</span>\n </div>\n </div>\n }\n @if (dates.secondDate.value) {\n <div class=\"dates\">\n <div class=\"date-wrapper second-date\">\n <p class=\"date-label\">\n <kit-svg-icon [icon]=\"kitSvgIcon.CALENDAR\" />\n <span>{{ dates.secondDate.label }}</span>\n </p>\n <span class=\"date\">{{ dates.secondDate.value | date: dateFormat : 'UTC' }}</span>\n </div>\n </div>\n }\n }\n </div>\n\n <div class=\"additional-content\">\n @for (item of lineItem.additionalContent; track item.key) {\n <div>\n <span class=\"label\">{{ item.translateKey | translate }} </span>\n <span class=\"value\"\n [innerHTML]=\"formatValue(item.value) | highlight:searchValue\"></span>\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n }\n </div>\n } @else {\n <kit-empty-section class=\"empty-section\"\n [text]=\"'kit.globalSearch.noData' | translate\" />\n }\n\n @if (filters().length) {\n <div class=\"filters\">\n @for (filter of filters(); track $index) {\n <div>\n <p class=\"label\">{{ filter.label }}</p>\n @for (value of filter.values.slice(0, isFilterExpanded($index) ? filter.values.length : 3); track $index) {\n <kit-pill @heightExpandCollapseAnimation\n class=\"filter-value\"\n [theme]=\"kitPillTheme.MAIN\"\n [selectable]=\"true\"\n [selected]=\"isFilterSelected(value)\"\n (clicked)=\"onSelectFilter(value, filter.appliedTo)\">\n {{ value.title | translate }}\n </kit-pill>\n }\n @if (filter.values.length > 3) {\n <kit-button class=\"toggle-btn\"\n [label]=\"`kit.globalSearch.${isFilterExpanded($index) ? 'showLess' : 'showMore'}` | translate\"\n [icon]=\"isFilterExpanded($index) ? kitSvgIcon.CHEVRON_UP : kitSvgIcon.CHEVRON_DOWN\"\n [iconPosition]=\"kitButtonIconPosition.LEADING\"\n [kind]=\"kitButtonKind.SMALL\"\n [type]=\"kitButtonType.GHOST\"\n (clicked)=\"toggleFilterExpanded($index)\" />\n }\n </div>\n }\n </div>\n }\n }\n </div>\n }\n </ng-template>\n</div>\n", styles: [":host{flex:1}:host .global-search{max-width:360px}:host .global-search.expanded{max-width:100%}:host .global-search .textbox{border-color:var(--ui-kit-color-grey-11);box-shadow:none;border-radius:8px}:host .global-search .textbox.k-focus{border-color:var(--ui-kit-color-main)}:host ::ng-deep .k-animation-container{width:calc(100% - 145px)}:host ::ng-deep .kit-global-search-popup{overflow:auto;margin-top:10px;padding:0}:host ::ng-deep .kit-global-search-popup .popup-content{display:flex;justify-content:space-between}:host ::ng-deep .global-search .k-textbox.k-input .k-input-inner{padding:0 8px;height:40px}:host ::ng-deep .global-search .k-textbox.k-input .kit-svg-icon .search-icon{width:37px;height:37px;fill:none;stroke:var(--ui-kit-color-grey-10);padding-left:12px}:host ::ng-deep .global-search .k-textbox.k-input .kit-svg-icon .circle-cross-thin-icon{width:30px;height:30px;fill:none;stroke:var(--ui-kit-color-grey-12);padding-right:12px;cursor:pointer}:host ::ng-deep .search-results{padding:24px;flex:1}:host ::ng-deep .search-results .loader{display:flex;justify-content:center;height:100%;align-items:center;color:var(--ui-kit-color-main)}:host ::ng-deep .search-results .category:not(:last-child){margin-bottom:20px}:host ::ng-deep .search-results .category .header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin:0 0 20px}:host ::ng-deep .search-results .category .header-main{display:flex;align-items:center}:host ::ng-deep .search-results .category .header-main-icon{width:16px;height:16px;fill:var(--ui-kit-color-main);margin-right:10px}:host ::ng-deep .search-results .category .header-main-title{color:var(--ui-kit-color-main)}:host ::ng-deep .search-results .category .header.empty{margin:0}:host ::ng-deep .search-results .category .header.empty .header-main-icon{fill:var(--ui-kit-color-grey-12)}:host ::ng-deep .search-results .category .header.empty .header-main-title{color:var(--ui-kit-color-grey-12)}:host ::ng-deep .search-results .category .line-item{min-width:575px;padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid var(--ui-kit-color-grey-11)}:host ::ng-deep .search-results .category .line-item.has-link{cursor:pointer}:host ::ng-deep .search-results .category .line-item.has-link:hover{opacity:.7}:host ::ng-deep .search-results .category .line-item .highlighted{color:var(--ui-kit-color-main)}:host ::ng-deep .search-results .category .line-item .main-content{display:grid;grid-template-columns:minmax(170px,max-content) minmax(115px,max-content) repeat(auto-fit,minmax(60px,1fr));gap:20px;align-items:center;grid-auto-flow:column}:host ::ng-deep .search-results .category .line-item .main-content .title{font-size:16px;line-height:22px;font-weight:500}:host ::ng-deep .search-results .category .line-item .main-content .subtitle{width:100%}:host ::ng-deep .search-results .category .line-item .main-content .subtitle.hide{display:none}:host ::ng-deep .search-results .category .line-item .main-content .title,:host ::ng-deep .search-results .category .line-item .main-content .subtitle{color:var(--ui-kit-color-grey-10)}:host ::ng-deep .search-results .category .line-item .main-content .icon.calendar-icon{width:18px;height:18px;fill:var(--ui-kit-color-grey-12);margin-right:3px}:host ::ng-deep .search-results .category .line-item .main-content .route{container:route/inline-size;width:100%}:host ::ng-deep .search-results .category .line-item .main-content .route.hide{display:none;container:none}:host ::ng-deep .search-results .category .line-item .main-content .route .route-path{justify-content:left}:host ::ng-deep .search-results .category .line-item .main-content .status{white-space:nowrap;display:block;margin:auto}:host ::ng-deep .search-results .category .line-item .main-content .kit-pill-content{margin:auto}:host ::ng-deep .search-results .category .line-item .main-content .dates{display:flex;align-items:center;font-size:12px;line-height:14px;container:dates/inline-size;width:100%}:host ::ng-deep .search-results .category .line-item .main-content .dates .date-wrapper{display:flex;justify-content:left;align-items:center;flex-wrap:wrap;text-align:center}:host ::ng-deep .search-results .category .line-item .main-content .dates .date-wrapper .date{text-wrap:nowrap}:host ::ng-deep .search-results .category .line-item .main-content .dates .date-label{display:flex;align-items:center;justify-content:center;margin-right:5px;text-wrap:nowrap}:host ::ng-deep .search-results .category .line-item .main-content .dates.first-date{color:var(--ui-kit-color-grey-14)}:host ::ng-deep .search-results .category .line-item .main-content .dates.second-date{color:var(--ui-kit-color-grey-10)}:host ::ng-deep .search-results .category .line-item .main-content:has(.route:not(.hide)){grid-template-columns:minmax(170px,max-content) minmax(115px,max-content) minmax(70px,1fr) minmax(99px,2fr) repeat(auto-fit,minmax(50px,1fr))}:host ::ng-deep .search-results .category .line-item .main-content:not(:has(.status)){grid-template-columns:minmax(170px,max-content) minmax(70px,1fr) repeat(auto-fit,minmax(50px,1fr))}:host ::ng-deep .search-results .category .line-item .main-content:not(:has(.status)):has(.route:not(.hide)){grid-template-columns:minmax(170px,max-content) minmax(70px,1fr) minmax(99px,2fr) repeat(auto-fit,minmax(50px,1fr))}:host ::ng-deep .search-results .category .line-item .main-content>.dates:last-child{justify-self:end;justify-content:end;text-align:right}:host ::ng-deep .search-results .category .line-item .main-content>.dates:last-child .date-wrapper{justify-content:end}:host ::ng-deep .search-results .category .line-item .additional-content{text-align:right}:host ::ng-deep .search-results .category .line-item .additional-content .label{color:var(--ui-kit-color-grey-14)}:host ::ng-deep .search-results .category .line-item .additional-content .value{color:var(--ui-kit-color-grey-10)}@container route (max-width: 190px){:host ::ng-deep .search-results .category .route-origin-port,:host ::ng-deep .search-results .category .icon.arrow{display:none}:host ::ng-deep .search-results .category .line-item .main-content .route .route-path{grid-template-columns:minmax(0,auto) min-content;justify-content:stretch}}@container route (max-width: 150px){:host ::ng-deep .search-results .category .route-mode{display:none}}@container dates (max-width: 120px){:host ::ng-deep .search-results .category .date-wrapper{flex-direction:column}:host ::ng-deep .search-results .category .date-label{margin-right:0}}:host ::ng-deep .filters{background-color:var(--ui-kit-color-grey-13);padding:24px;min-width:175px}:host ::ng-deep .filters .label{font-size:12px;line-height:14px;color:var(--ui-kit-color-grey-10);margin-bottom:10px;text-transform:uppercase}:host ::ng-deep .filters .filter-value{margin-bottom:10px;display:block}:host ::ng-deep .filters .filter-value .kit-pill{line-height:16px;text-align:left;display:inline-block;padding:7px 16px;font-size:13px}:host ::ng-deep .filters .toggle-btn{margin-bottom:40px;display:block}:host ::ng-deep .filters .toggle-btn .k-button{min-width:125px;padding:6px 16px;min-height:32px}:host ::ng-deep .prompts{display:flex;gap:10px;padding:24px}:host ::ng-deep .empty-section{container:none}\n"] }]
|
|
9466
|
+
], template: "<div #container\n class=\"global-search\"\n [class.expanded]=\"isPopupOpen\">\n <kendo-textbox class=\"textbox\"\n [placeholder]=\"'kit.globalSearch.placeholder' | translate\"\n [(ngModel)]=\"searchValue\"\n (click)=\"openPopup()\">\n <ng-template kendoTextBoxPrefixTemplate>\n <kit-svg-icon [icon]=\"kitSvgIcon.SEARCH\" />\n </ng-template>\n <ng-template kendoTextBoxSuffixTemplate>\n <kit-svg-icon [icon]=\"kitSvgIcon.CIRCLE_CROSS_THIN\"\n (click)=\"clearSearch()\" />\n </ng-template>\n </kendo-textbox>\n\n <kit-popup #popup\n [popupClass]=\"popupClass\"\n [anchor]=\"anchor()\"\n [content]=\"content\"\n [closeOnOutsideClick]=\"false\" />\n\n <ng-template #content>\n @if (userPermissions(); as userPermissions) {\n <div class=\"popup-content\">\n @if (showPrompts()) {\n @if (getVisiblePrompts(userPermissions); as visiblePrompts) {\n @if (visiblePrompts.length) {\n <div class=\"prompts\">\n @for (prompt of visiblePrompts; track prompt) {\n <kit-pill [theme]=\"kitPillTheme.MAIN\"\n [selectable]=\"true\"\n (clicked)=\"onSelectPrompt(prompt)\">\n {{ prompt.label }}\n </kit-pill>\n }\n </div>\n }\n }\n } @else {\n @if (isLoading()) {\n <div class=\"search-results\">\n <kendo-loader class=\"loader\" />\n </div>\n } @else if (searchResults().length) {\n <div class=\"search-results\">\n @for (category of searchResults(); track category?.name) {\n @if (category) {\n <div class=\"category\">\n <div class=\"header\"\n [class.empty]=\"!category.total\">\n <div class=\"header-main\">\n <kit-svg-icon class=\"header-main-icon\"\n [icon]=\"kitSvgIcon.CHECK_STICKER\" />\n <span class=\"header-main-title\">{{ category.name.toUpperCase() }} ({{ category.total }})</span>\n </div>\n\n @if (category.total > this.displayedLineItemsNumber()) {\n <kit-button [label]=\"'kit.globalSearch.showResults' | translate\"\n [type]=\"kitButtonType.GHOST\"\n [kind]=\"kitButtonKind.SMALL\"\n (clicked)=\"navigate(category.routeConfig)\" />\n }\n </div>\n\n @for (lineItem of category.items.slice(0, this.displayedLineItemsNumber()); track lineItem) {\n <div class=\"line-item\"\n [class.has-link]=\"lineItem.routeConfig\"\n (click)=\"navigate(lineItem.routeConfig)\">\n <div class=\"main-content\"\n [style.grid-template-columns]=\"getMainContentGridTemplate(category, lineItem)\">\n @if (isColumnVisible(category, 'title')) {\n <div class=\"title\">\n <span [innerHTML]=\"lineItem.title | highlight:searchValue\"></span>\n </div>\n }\n @if (lineItem.status && isColumnVisible(category, 'status')) {\n <div>\n <kit-pill class=\"status\"\n [theme]=\"kitPillTheme.MAIN\">\n {{ lineItem.status }}\n </kit-pill>\n </div>\n }\n @if (isColumnVisible(category, 'subtitle')) {\n <div class=\"subtitle\">\n <kit-truncate-text>\n <span [innerHTML]=\"lineItem.subtitle || '' | highlight:searchValue\"></span>\n </kit-truncate-text>\n </div>\n }\n\n @if (lineItem.routePath; as routePath) {\n @if (routePath.from || routePath.to) {\n <kit-route-path class=\"route\"\n kitHideBelowWidthClass=\"hide\"\n [kitHideBelowWidth]=\"132\"\n [containerMode]=\"routePath.containerMode ?? ''\"\n [destinationPort]=\"routePath.to ?? ''\"\n [originPort]=\"routePath.from ?? ''\"\n [type]=\"routePath.type ?? ''\" />\n }\n }\n @if (lineItem.dates; as dates) {\n @if (isColumnVisible(category, 'firstDate') && dates.firstDate.value) {\n <div class=\"dates\">\n <div class=\"date-wrapper first-date\">\n <p class=\"date-label\">\n <kit-svg-icon [icon]=\"kitSvgIcon.CALENDAR\" />\n <span>{{ dates.firstDate.label }}</span>\n </p>\n <span class=\"date\">{{ dates.firstDate.value | date: dateFormat : 'UTC' }}</span>\n </div>\n </div>\n }\n @if (isColumnVisible(category, 'secondDate') && dates.secondDate.value) {\n <div class=\"dates\">\n <div class=\"date-wrapper second-date\">\n <p class=\"date-label\">\n <kit-svg-icon [icon]=\"kitSvgIcon.CALENDAR\" />\n <span>{{ dates.secondDate.label }}</span>\n </p>\n <span class=\"date\">{{ dates.secondDate.value | date: dateFormat : 'UTC' }}</span>\n </div>\n </div>\n }\n }\n </div>\n\n @if (isColumnVisible(category, 'additionalContent')) {\n <div class=\"additional-content\">\n @for (item of lineItem.additionalContent; track item.key) {\n <div>\n <span class=\"label\">{{ item.translateKey | translate }} </span>\n <span class=\"value\"\n [innerHTML]=\"formatValue(item.value) | highlight:searchValue\"></span>\n </div>\n }\n </div>\n }\n </div>\n }\n </div>\n }\n }\n </div>\n } @else {\n <kit-empty-section class=\"empty-section\"\n [text]=\"'kit.globalSearch.noData' | translate\" />\n }\n\n @if (filters().length) {\n <div class=\"filters\">\n @for (filter of filters(); track $index) {\n <div>\n <p class=\"label\">{{ filter.label }}</p>\n @for (value of filter.values.slice(0, isFilterExpanded($index) ? filter.values.length : 3); track $index) {\n <kit-pill @heightExpandCollapseAnimation\n class=\"filter-value\"\n [theme]=\"kitPillTheme.MAIN\"\n [selectable]=\"true\"\n [selected]=\"isFilterSelected(value)\"\n (clicked)=\"onSelectFilter(value, filter.appliedTo)\">\n {{ value.title | translate }}\n </kit-pill>\n }\n @if (filter.values.length > 3) {\n <kit-button class=\"toggle-btn\"\n [label]=\"`kit.globalSearch.${isFilterExpanded($index) ? 'showLess' : 'showMore'}` | translate\"\n [icon]=\"isFilterExpanded($index) ? kitSvgIcon.CHEVRON_UP : kitSvgIcon.CHEVRON_DOWN\"\n [iconPosition]=\"kitButtonIconPosition.LEADING\"\n [kind]=\"kitButtonKind.SMALL\"\n [type]=\"kitButtonType.GHOST\"\n (clicked)=\"toggleFilterExpanded($index)\" />\n }\n </div>\n }\n </div>\n }\n }\n </div>\n }\n </ng-template>\n</div>\n", styles: [":host{flex:1}:host .global-search{max-width:360px}:host .global-search.expanded{max-width:100%}:host .global-search .textbox{border-color:var(--ui-kit-color-grey-11);box-shadow:none;border-radius:8px}:host .global-search .textbox.k-focus{border-color:var(--ui-kit-color-main)}:host ::ng-deep .k-animation-container{width:calc(100% - 145px)}:host ::ng-deep .kit-global-search-popup{overflow:auto;margin-top:10px;padding:0}:host ::ng-deep .kit-global-search-popup .popup-content{display:flex;justify-content:space-between}:host ::ng-deep .global-search .k-textbox.k-input .k-input-inner{padding:0 8px;height:40px}:host ::ng-deep .global-search .k-textbox.k-input .kit-svg-icon .search-icon{width:37px;height:37px;fill:none;stroke:var(--ui-kit-color-grey-10);padding-left:12px}:host ::ng-deep .global-search .k-textbox.k-input .kit-svg-icon .circle-cross-thin-icon{width:30px;height:30px;fill:none;stroke:var(--ui-kit-color-grey-12);padding-right:12px;cursor:pointer}:host ::ng-deep .search-results{padding:24px;flex:1}:host ::ng-deep .search-results .loader{display:flex;justify-content:center;height:100%;align-items:center;color:var(--ui-kit-color-main)}:host ::ng-deep .search-results .category:not(:last-child){margin-bottom:20px}:host ::ng-deep .search-results .category .header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin:0 0 20px}:host ::ng-deep .search-results .category .header-main{display:flex;align-items:center}:host ::ng-deep .search-results .category .header-main-icon{width:16px;height:16px;fill:var(--ui-kit-color-main);margin-right:10px}:host ::ng-deep .search-results .category .header-main-title{color:var(--ui-kit-color-main)}:host ::ng-deep .search-results .category .header.empty{margin:0}:host ::ng-deep .search-results .category .header.empty .header-main-icon{fill:var(--ui-kit-color-grey-12)}:host ::ng-deep .search-results .category .header.empty .header-main-title{color:var(--ui-kit-color-grey-12)}:host ::ng-deep .search-results .category .line-item{min-width:575px;padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid var(--ui-kit-color-grey-11)}:host ::ng-deep .search-results .category .line-item.has-link{cursor:pointer}:host ::ng-deep .search-results .category .line-item.has-link:hover{opacity:.7}:host ::ng-deep .search-results .category .line-item .highlighted{color:var(--ui-kit-color-main)}:host ::ng-deep .search-results .category .line-item .main-content{display:grid;grid-template-columns:minmax(170px,max-content) minmax(115px,max-content) repeat(auto-fit,minmax(60px,1fr));gap:20px;align-items:center;grid-auto-flow:column}:host ::ng-deep .search-results .category .line-item .main-content .title{font-size:16px;line-height:22px;font-weight:500}:host ::ng-deep .search-results .category .line-item .main-content .subtitle{width:100%}:host ::ng-deep .search-results .category .line-item .main-content .subtitle.hide{display:none}:host ::ng-deep .search-results .category .line-item .main-content .title,:host ::ng-deep .search-results .category .line-item .main-content .subtitle{color:var(--ui-kit-color-grey-10)}:host ::ng-deep .search-results .category .line-item .main-content .icon.calendar-icon{width:18px;height:18px;fill:var(--ui-kit-color-grey-12);margin-right:3px}:host ::ng-deep .search-results .category .line-item .main-content .route{container:route/inline-size;width:100%}:host ::ng-deep .search-results .category .line-item .main-content .route.hide{display:none;container:none}:host ::ng-deep .search-results .category .line-item .main-content .route .route-path{justify-content:left}:host ::ng-deep .search-results .category .line-item .main-content .status{white-space:nowrap;display:block;margin:auto}:host ::ng-deep .search-results .category .line-item .main-content .kit-pill-content{margin:auto}:host ::ng-deep .search-results .category .line-item .main-content .dates{display:flex;align-items:center;font-size:12px;line-height:14px;container:dates/inline-size;width:100%}:host ::ng-deep .search-results .category .line-item .main-content .dates .date-wrapper{display:flex;justify-content:left;align-items:center;flex-wrap:wrap;text-align:center}:host ::ng-deep .search-results .category .line-item .main-content .dates .date-wrapper .date{text-wrap:nowrap}:host ::ng-deep .search-results .category .line-item .main-content .dates .date-label{display:flex;align-items:center;justify-content:center;margin-right:5px;text-wrap:nowrap}:host ::ng-deep .search-results .category .line-item .main-content .dates.first-date{color:var(--ui-kit-color-grey-14)}:host ::ng-deep .search-results .category .line-item .main-content .dates.second-date{color:var(--ui-kit-color-grey-10)}:host ::ng-deep .search-results .category .line-item .main-content:has(.route:not(.hide)){grid-template-columns:minmax(170px,max-content) minmax(115px,max-content) minmax(70px,1fr) minmax(99px,2fr) repeat(auto-fit,minmax(50px,1fr))}:host ::ng-deep .search-results .category .line-item .main-content:not(:has(.status)){grid-template-columns:minmax(170px,max-content) minmax(70px,1fr) repeat(auto-fit,minmax(50px,1fr))}:host ::ng-deep .search-results .category .line-item .main-content:not(:has(.status)):has(.route:not(.hide)){grid-template-columns:minmax(170px,max-content) minmax(70px,1fr) minmax(99px,2fr) repeat(auto-fit,minmax(50px,1fr))}:host ::ng-deep .search-results .category .line-item .main-content>.dates:last-child{justify-self:end;justify-content:end;text-align:right}:host ::ng-deep .search-results .category .line-item .main-content>.dates:last-child .date-wrapper{justify-content:end}:host ::ng-deep .search-results .category .line-item .additional-content{text-align:right}:host ::ng-deep .search-results .category .line-item .additional-content .label{color:var(--ui-kit-color-grey-14)}:host ::ng-deep .search-results .category .line-item .additional-content .value{color:var(--ui-kit-color-grey-10)}@container route (max-width: 190px){:host ::ng-deep .search-results .category .route-origin-port,:host ::ng-deep .search-results .category .icon.arrow{display:none}:host ::ng-deep .search-results .category .line-item .main-content .route .route-path{grid-template-columns:minmax(0,auto) min-content;justify-content:stretch}}@container route (max-width: 150px){:host ::ng-deep .search-results .category .route-mode{display:none}}@container dates (max-width: 120px){:host ::ng-deep .search-results .category .date-wrapper{flex-direction:column}:host ::ng-deep .search-results .category .date-label{margin-right:0}}:host ::ng-deep .filters{background-color:var(--ui-kit-color-grey-13);padding:24px;min-width:175px}:host ::ng-deep .filters .label{font-size:12px;line-height:14px;color:var(--ui-kit-color-grey-10);margin-bottom:10px;text-transform:uppercase}:host ::ng-deep .filters .filter-value{margin-bottom:10px;display:block}:host ::ng-deep .filters .filter-value .kit-pill{line-height:16px;text-align:left;display:inline-block;padding:7px 16px;font-size:13px}:host ::ng-deep .filters .toggle-btn{margin-bottom:40px;display:block}:host ::ng-deep .filters .toggle-btn .k-button{min-width:125px;padding:6px 16px;min-height:32px}:host ::ng-deep .prompts{display:flex;gap:10px;padding:24px}:host ::ng-deep .empty-section{container:none}\n"] }]
|
|
9387
9467
|
}], propDecorators: { searchFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchFn", required: true }] }], displayedLineItemsNumber: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayedLineItemsNumber", required: false }] }], prompts: [{ type: i0.Input, args: [{ isSignal: true, alias: "prompts", required: true }] }], filters: [{ type: i0.Input, args: [{ isSignal: true, alias: "filters", required: false }] }], textbox: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TextBoxComponent), { isSignal: true }] }], anchor: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TextBoxComponent), { ...{ read: ElementRef }, isSignal: true }] }], popup: [{ type: i0.ViewChild, args: ['popup', { ...{ read: KitPopupComponent }, isSignal: true }] }], container: [{ type: i0.ViewChild, args: ['container', { ...{ read: ViewContainerRef }, isSignal: true }] }], documentClick: [{
|
|
9388
9468
|
type: HostListener,
|
|
9389
9469
|
args: ['document:click', ['$event']]
|
|
9470
|
+
}], onWindowResize: [{
|
|
9471
|
+
type: HostListener,
|
|
9472
|
+
args: ['window:resize']
|
|
9390
9473
|
}] } });
|
|
9391
9474
|
|
|
9392
|
-
const mapGlobalSearchResult = (store, requiredPermission, dataFetcher, categoryName, routeConfig, itemMapper) => {
|
|
9475
|
+
const mapGlobalSearchResult = (store, requiredPermission, dataFetcher, categoryName, routeConfig, itemMapper, layoutConfig) => {
|
|
9393
9476
|
return store.select(KIT_USER_PERMISSIONS_STATE_TOKEN).pipe(tap(permissions => !Object.keys(permissions).length && store.dispatch(new FetchUserPermissions())), filter(permissions => !!Object.keys(permissions).length), take(1), switchMap(permissions => {
|
|
9394
9477
|
if (!kitHasPermission(requiredPermission, permissions)) {
|
|
9395
9478
|
return of(null);
|
|
@@ -9398,11 +9481,13 @@ const mapGlobalSearchResult = (store, requiredPermission, dataFetcher, categoryN
|
|
|
9398
9481
|
name: categoryName,
|
|
9399
9482
|
total: data.total,
|
|
9400
9483
|
routeConfig,
|
|
9484
|
+
layoutConfig,
|
|
9401
9485
|
items: data.data.map(itemMapper),
|
|
9402
9486
|
})), catchError(() => of({
|
|
9403
9487
|
name: categoryName,
|
|
9404
9488
|
total: 0,
|
|
9405
9489
|
routeConfig,
|
|
9490
|
+
layoutConfig,
|
|
9406
9491
|
items: [],
|
|
9407
9492
|
})));
|
|
9408
9493
|
}));
|