@indigina/ui-kit 1.1.184 → 1.1.185

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.
@@ -6533,6 +6533,7 @@ class KitGlobalSearchComponent {
6533
6533
  this.router = router;
6534
6534
  this.searchFn = input.required();
6535
6535
  this.displayedLineItemsNumber = input(3);
6536
+ this.prompts = input.required();
6536
6537
  this.textbox = viewChild.required(TextBoxComponent);
6537
6538
  this.anchor = viewChild.required(TextBoxComponent, { read: ElementRef });
6538
6539
  this.popup = viewChild('popup', { read: KitPopupComponent });
@@ -6547,20 +6548,25 @@ class KitGlobalSearchComponent {
6547
6548
  this.popupClass = 'kit-global-search-popup';
6548
6549
  this.searchResults = signal([]);
6549
6550
  this.value = '';
6551
+ this.showPropmts = signal(true);
6550
6552
  }
6551
6553
  ngOnInit() {
6552
6554
  this.textbox().valueChange.pipe(debounceTime(500), distinctUntilChanged(), filter((val) => val.length > 2)).subscribe(searchText => {
6553
6555
  this.searchFn()(searchText).subscribe(searchRusult => {
6554
- this.openPopup();
6556
+ this.showPropmts.set(false);
6555
6557
  this.searchResults.set(searchRusult.filter(Boolean));
6556
6558
  });
6557
6559
  });
6558
6560
  }
6561
+ get isPopupOpen() {
6562
+ return !!this.popup()?.isPopupOpen;
6563
+ }
6559
6564
  clearSearch() {
6560
6565
  this.value = '';
6561
6566
  this.textbox().valueChange.emit('');
6562
6567
  this.textbox().clearValue();
6563
6568
  this.searchResults.set([]);
6569
+ this.showPropmts.set(true);
6564
6570
  this.popup()?.close();
6565
6571
  }
6566
6572
  openPopup() {
@@ -6582,8 +6588,13 @@ class KitGlobalSearchComponent {
6582
6588
  this.router.navigate(link);
6583
6589
  this.clearSearch();
6584
6590
  }
6591
+ onSelectPrompt(prompt) {
6592
+ prompt.searchFn().subscribe(searchRusult => {
6593
+ this.searchResults.set(searchRusult.filter(Boolean));
6594
+ });
6595
+ }
6585
6596
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: KitGlobalSearchComponent, deps: [{ token: i1$7.Router }], target: i0.ɵɵFactoryTarget.Component }); }
6586
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", 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 } }, host: { listeners: { "document:click": "documentClick($event)" } }, 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 <kendo-textbox #textbox\n class=\"textbox\"\n [placeholder]=\"'kit.globalSearch.placeholder' | translate\"\n [size]=\"'none'\"\n [(ngModel)]=\"value\">\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 <div class=\"popup-content\">\n <div class=\"search-results\">\n @if (searchResults().length) {\n @for (category of searchResults(); track category?.name) {\n @if (category) {\n <div class=\"category\">\n <p class=\"header\"\n [class.empty]=\"!category.total\">\n <kit-svg-icon [icon]=\"kitSvgIcon.CHECK_STICKER\"/>\n <span class=\"title\">{{ category.name.toUpperCase() }} ({{ category.total }})</span>\n </p>\n\n @for (lineItem of category.items.slice(0, this.displayedLineItemsNumber()); track lineItem) {\n <div class=\"line-item\"\n [class.has-link]=\"lineItem.link\"\n (click)=\"navigate(lineItem.link)\">\n <div class=\"title\">\n <kit-truncate-text>{{ lineItem.title }}</kit-truncate-text>\n </div>\n <div class=\"subtitle\">\n <kit-truncate-text>{{ lineItem.subtitle }}</kit-truncate-text>\n </div>\n @if (lineItem.routePath?.from || lineItem.routePath?.to) {\n <kit-route-path class=\"route\"\n [containerMode]=\"lineItem.routePath?.containerMode\"\n [destinationPort]=\"lineItem.routePath?.to\"\n [originPort]=\"lineItem.routePath?.from\"\n [type]=\"lineItem.routePath?.type\"/>\n }\n @if (lineItem.dates?.firstDate.value) {\n <div class=\"dates first-date\">\n <kit-svg-icon [icon]=\"kitSvgIcon.CALENDAR\"/>\n <kit-truncate-text>{{ lineItem.dates?.firstDate.label }} \n <span class=\"date\">{{ lineItem.dates?.firstDate.value | date: dateFormat : 'UTC' }}</span>\n </kit-truncate-text>\n </div>\n }\n @if (lineItem.dates?.secondDate.value) {\n <div class=\"dates second-date\">\n <kit-svg-icon [icon]=\"kitSvgIcon.CALENDAR\"/>\n <kit-truncate-text>{{ lineItem.dates?.secondDate.label }} \n <span class=\"date\">{{ lineItem.dates?.secondDate.value | date: dateFormat : 'UTC' }}</span>\n </kit-truncate-text>\n </div>\n }\n </div>\n }\n \n @if (category.total > this.displayedLineItemsNumber()) {\n <kit-button [label]=\"'kit.globalSearch.showMore' | translate\"\n [type]=\"kitButtonType.GHOST\"\n [kind]=\"kitButtonKind.SMALL\"\n (clicked)=\"navigate(category.categoryLink)\"/>\n }\n </div>\n }\n }\n } @else {\n <kit-empty-section class=\"empty-section\"\n [text]=\"'kit.globalSearch.noData' | translate\"/>\n }\n </div>\n </div>\n </ng-template>\n</div>\n", styles: [":host{position:relative}:host .global-search{max-width:360px}:host .global-search:has(.textbox.k-focus){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:has(.textbox.k-focus) .kit-global-search-popup{display:inherit}:host ::ng-deep .k-animation-container{width:100%}:host ::ng-deep .kit-global-search-popup{overflow-y:auto}:host ::ng-deep .global-search .k-textbox.k-input .k-input-inner{padding:11px 8px}: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 .category:not(:last-child){margin-bottom:20px}:host ::ng-deep .search-results .category .header{display:flex;align-items:center;margin:0 0 20px}:host ::ng-deep .search-results .category .header .icon.check-sticker-icon{width:16px;height:16px;fill:var(--ui-kit-color-main);margin-right:10px}:host ::ng-deep .search-results .category .header .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 .icon.check-sticker-icon{fill:var(--ui-kit-color-grey-12)}:host ::ng-deep .search-results .category .header.empty .title{color:var(--ui-kit-color-grey-12)}:host ::ng-deep .search-results .category .line-item{display:grid;grid-template-columns:minmax(50px,190px) minmax(50px,190px) minmax(200px,300px) minmax(65px,130px) minmax(65px,130px);justify-content:space-between;gap:20px;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 .title{font-size:16px;line-height:22px;font-weight:500}:host ::ng-deep .search-results .category .line-item .title,:host ::ng-deep .search-results .category .line-item .subtitle{color:var(--ui-kit-color-grey-10)}:host ::ng-deep .search-results .category .line-item .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 .dates{display:flex;align-items:center;font-size:12px;line-height:14px}:host ::ng-deep .search-results .category .line-item .dates .date{font-size:14px;line-height:20px;font-weight:500}:host ::ng-deep .search-results .category .line-item .dates.first-date{color:var(--ui-kit-color-grey-14)}:host ::ng-deep .search-results .category .line-item .dates.second-date{color:var(--ui-kit-color-grey-10)}:host ::ng-deep .empty-section{container:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "ngmodule", type: KitTextboxModule }, { kind: "ngmodule", type: KitSvgIconModule }, { kind: "component", type: KitSvgIconComponent, selector: "kit-svg-icon", inputs: ["icon", "iconClass"] }, { kind: "component", type: i1$3.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$3.TextBoxSuffixTemplateDirective, selector: "[kendoTextBoxSuffixTemplate]", inputs: ["showSeparator"] }, { kind: "directive", type: i1$3.TextBoxPrefixTemplateDirective, selector: "[kendoTextBoxPrefixTemplate]", inputs: ["showSeparator"] }, { kind: "component", type: KitPopupComponent, selector: "kit-popup", inputs: ["anchor", "content", "closeOnOutsideClick", "showFooter", "cancelButtonLabel", "applyButtonLabel", "isApplyButtonDisabled", "positionMode", "popupClass", "closePopupOnCancel"], outputs: ["onCancel", "onApply", "onOpen", "onClose"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.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: "ngmodule", type: KitButtonModule }, { 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" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$a.TranslatePipe, name: "translate" }, { kind: "component", type: KitEmptySectionComponent, selector: "kit-empty-section", inputs: ["text"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6597
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", 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 } }, host: { listeners: { "document:click": "documentClick($event)" } }, 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 <kendo-textbox #textbox\n class=\"textbox\"\n [class.expanded]=\"isPopupOpen\"\n [placeholder]=\"'kit.globalSearch.placeholder' | translate\"\n [size]=\"'none'\"\n [(ngModel)]=\"value\"\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 <div class=\"popup-content\">\n <div class=\"search-results\">\n @if (searchResults().length) {\n @for (category of searchResults(); track category?.name) {\n @if (category) {\n <div class=\"category\">\n <p class=\"header\"\n [class.empty]=\"!category.total\">\n <kit-svg-icon [icon]=\"kitSvgIcon.CHECK_STICKER\"/>\n <span class=\"title\">{{ category.name.toUpperCase() }} ({{ category.total }})</span>\n </p>\n\n @for (lineItem of category.items.slice(0, this.displayedLineItemsNumber()); track $index) {\n <div class=\"line-item\"\n [class.has-link]=\"lineItem.link\"\n (click)=\"navigate(lineItem.link)\">\n <div class=\"title\">\n <kit-truncate-text>{{ lineItem.title }}</kit-truncate-text>\n </div>\n <div class=\"subtitle\">\n <kit-truncate-text>{{ lineItem.subtitle }}</kit-truncate-text>\n </div>\n @if (lineItem.routePath?.from || lineItem.routePath?.to) {\n <kit-route-path class=\"route\"\n [containerMode]=\"lineItem.routePath?.containerMode\"\n [destinationPort]=\"lineItem.routePath?.to\"\n [originPort]=\"lineItem.routePath?.from\"\n [type]=\"lineItem.routePath?.type\"/>\n }\n @if (lineItem.dates?.firstDate.value) {\n <div class=\"dates first-date\">\n <kit-svg-icon [icon]=\"kitSvgIcon.CALENDAR\"/>\n <kit-truncate-text>{{ lineItem.dates?.firstDate.label }} \n <span class=\"date\">{{ lineItem.dates?.firstDate.value | date: dateFormat : 'UTC' }}</span>\n </kit-truncate-text>\n </div>\n }\n @if (lineItem.dates?.secondDate.value) {\n <div class=\"dates second-date\">\n <kit-svg-icon [icon]=\"kitSvgIcon.CALENDAR\"/>\n <kit-truncate-text>{{ lineItem.dates?.secondDate.label }} \n <span class=\"date\">{{ lineItem.dates?.secondDate.value | date: dateFormat : 'UTC' }}</span>\n </kit-truncate-text>\n </div>\n }\n </div>\n }\n \n @if (category.total > this.displayedLineItemsNumber()) {\n <kit-button [label]=\"'kit.globalSearch.showMore' | translate\"\n [type]=\"kitButtonType.GHOST\"\n [kind]=\"kitButtonKind.SMALL\"\n (clicked)=\"navigate(category.categoryLink)\"/>\n }\n </div>\n }\n }\n } @else if (showPropmts()) {\n <div class=\"prompts\">\n @for (prompt of prompts(); 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 } @else {\n <kit-empty-section class=\"empty-section\"\n [text]=\"'kit.globalSearch.noData' | translate\"/>\n }\n </div>\n </div>\n </ng-template>\n</div>\n", styles: [":host{position:relative}:host .global-search{max-width:360px}:host .global-search:has(.textbox.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:has(.textbox.k-focus) .kit-global-search-popup{display:inherit}:host ::ng-deep .k-animation-container{width:100%}:host ::ng-deep .kit-global-search-popup{overflow-y:auto}:host ::ng-deep .global-search .k-textbox.k-input .k-input-inner{padding:11px 8px}: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 .category:not(:last-child){margin-bottom:20px}:host ::ng-deep .search-results .category .header{display:flex;align-items:center;margin:0 0 20px}:host ::ng-deep .search-results .category .header .icon.check-sticker-icon{width:16px;height:16px;fill:var(--ui-kit-color-main);margin-right:10px}:host ::ng-deep .search-results .category .header .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 .icon.check-sticker-icon{fill:var(--ui-kit-color-grey-12)}:host ::ng-deep .search-results .category .header.empty .title{color:var(--ui-kit-color-grey-12)}:host ::ng-deep .search-results .category .line-item{display:grid;grid-template-columns:minmax(50px,190px) minmax(50px,190px) minmax(200px,300px) minmax(65px,130px) minmax(65px,130px);justify-content:space-between;gap:20px;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 .title{font-size:16px;line-height:22px;font-weight:500}:host ::ng-deep .search-results .category .line-item .title,:host ::ng-deep .search-results .category .line-item .subtitle{color:var(--ui-kit-color-grey-10)}:host ::ng-deep .search-results .category .line-item .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 .dates{display:flex;align-items:center;font-size:12px;line-height:14px}:host ::ng-deep .search-results .category .line-item .dates .date{font-size:14px;line-height:20px;font-weight:500}:host ::ng-deep .search-results .category .line-item .dates.first-date{color:var(--ui-kit-color-grey-14)}:host ::ng-deep .search-results .category .line-item .dates.second-date{color:var(--ui-kit-color-grey-10)}:host ::ng-deep .search-results .prompts{display:flex;gap:10px}:host ::ng-deep .empty-section{container:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "ngmodule", type: KitTextboxModule }, { kind: "ngmodule", type: KitSvgIconModule }, { kind: "component", type: KitSvgIconComponent, selector: "kit-svg-icon", inputs: ["icon", "iconClass"] }, { kind: "component", type: i1$3.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$3.TextBoxSuffixTemplateDirective, selector: "[kendoTextBoxSuffixTemplate]", inputs: ["showSeparator"] }, { kind: "directive", type: i1$3.TextBoxPrefixTemplateDirective, selector: "[kendoTextBoxPrefixTemplate]", inputs: ["showSeparator"] }, { kind: "component", type: KitPopupComponent, selector: "kit-popup", inputs: ["anchor", "content", "closeOnOutsideClick", "showFooter", "cancelButtonLabel", "applyButtonLabel", "isApplyButtonDisabled", "positionMode", "popupClass", "closePopupOnCancel"], outputs: ["onCancel", "onApply", "onOpen", "onClose"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.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: "ngmodule", type: KitButtonModule }, { 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" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$a.TranslatePipe, name: "translate" }, { kind: "component", type: KitEmptySectionComponent, selector: "kit-empty-section", inputs: ["text"] }, { kind: "component", type: KitPillComponent, selector: "kit-pill", inputs: ["removable", "selectable", "selected", "type", "theme", "icon", "iconType"], outputs: ["clicked", "removed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6587
6598
  }
6588
6599
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: KitGlobalSearchComponent, decorators: [{
6589
6600
  type: Component,
@@ -6601,7 +6612,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
6601
6612
  DatePipe,
6602
6613
  TranslateModule,
6603
6614
  KitEmptySectionComponent,
6604
- ], template: "<div #container\n class=\"global-search\">\n <kendo-textbox #textbox\n class=\"textbox\"\n [placeholder]=\"'kit.globalSearch.placeholder' | translate\"\n [size]=\"'none'\"\n [(ngModel)]=\"value\">\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 <div class=\"popup-content\">\n <div class=\"search-results\">\n @if (searchResults().length) {\n @for (category of searchResults(); track category?.name) {\n @if (category) {\n <div class=\"category\">\n <p class=\"header\"\n [class.empty]=\"!category.total\">\n <kit-svg-icon [icon]=\"kitSvgIcon.CHECK_STICKER\"/>\n <span class=\"title\">{{ category.name.toUpperCase() }} ({{ category.total }})</span>\n </p>\n\n @for (lineItem of category.items.slice(0, this.displayedLineItemsNumber()); track lineItem) {\n <div class=\"line-item\"\n [class.has-link]=\"lineItem.link\"\n (click)=\"navigate(lineItem.link)\">\n <div class=\"title\">\n <kit-truncate-text>{{ lineItem.title }}</kit-truncate-text>\n </div>\n <div class=\"subtitle\">\n <kit-truncate-text>{{ lineItem.subtitle }}</kit-truncate-text>\n </div>\n @if (lineItem.routePath?.from || lineItem.routePath?.to) {\n <kit-route-path class=\"route\"\n [containerMode]=\"lineItem.routePath?.containerMode\"\n [destinationPort]=\"lineItem.routePath?.to\"\n [originPort]=\"lineItem.routePath?.from\"\n [type]=\"lineItem.routePath?.type\"/>\n }\n @if (lineItem.dates?.firstDate.value) {\n <div class=\"dates first-date\">\n <kit-svg-icon [icon]=\"kitSvgIcon.CALENDAR\"/>\n <kit-truncate-text>{{ lineItem.dates?.firstDate.label }} \n <span class=\"date\">{{ lineItem.dates?.firstDate.value | date: dateFormat : 'UTC' }}</span>\n </kit-truncate-text>\n </div>\n }\n @if (lineItem.dates?.secondDate.value) {\n <div class=\"dates second-date\">\n <kit-svg-icon [icon]=\"kitSvgIcon.CALENDAR\"/>\n <kit-truncate-text>{{ lineItem.dates?.secondDate.label }} \n <span class=\"date\">{{ lineItem.dates?.secondDate.value | date: dateFormat : 'UTC' }}</span>\n </kit-truncate-text>\n </div>\n }\n </div>\n }\n \n @if (category.total > this.displayedLineItemsNumber()) {\n <kit-button [label]=\"'kit.globalSearch.showMore' | translate\"\n [type]=\"kitButtonType.GHOST\"\n [kind]=\"kitButtonKind.SMALL\"\n (clicked)=\"navigate(category.categoryLink)\"/>\n }\n </div>\n }\n }\n } @else {\n <kit-empty-section class=\"empty-section\"\n [text]=\"'kit.globalSearch.noData' | translate\"/>\n }\n </div>\n </div>\n </ng-template>\n</div>\n", styles: [":host{position:relative}:host .global-search{max-width:360px}:host .global-search:has(.textbox.k-focus){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:has(.textbox.k-focus) .kit-global-search-popup{display:inherit}:host ::ng-deep .k-animation-container{width:100%}:host ::ng-deep .kit-global-search-popup{overflow-y:auto}:host ::ng-deep .global-search .k-textbox.k-input .k-input-inner{padding:11px 8px}: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 .category:not(:last-child){margin-bottom:20px}:host ::ng-deep .search-results .category .header{display:flex;align-items:center;margin:0 0 20px}:host ::ng-deep .search-results .category .header .icon.check-sticker-icon{width:16px;height:16px;fill:var(--ui-kit-color-main);margin-right:10px}:host ::ng-deep .search-results .category .header .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 .icon.check-sticker-icon{fill:var(--ui-kit-color-grey-12)}:host ::ng-deep .search-results .category .header.empty .title{color:var(--ui-kit-color-grey-12)}:host ::ng-deep .search-results .category .line-item{display:grid;grid-template-columns:minmax(50px,190px) minmax(50px,190px) minmax(200px,300px) minmax(65px,130px) minmax(65px,130px);justify-content:space-between;gap:20px;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 .title{font-size:16px;line-height:22px;font-weight:500}:host ::ng-deep .search-results .category .line-item .title,:host ::ng-deep .search-results .category .line-item .subtitle{color:var(--ui-kit-color-grey-10)}:host ::ng-deep .search-results .category .line-item .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 .dates{display:flex;align-items:center;font-size:12px;line-height:14px}:host ::ng-deep .search-results .category .line-item .dates .date{font-size:14px;line-height:20px;font-weight:500}:host ::ng-deep .search-results .category .line-item .dates.first-date{color:var(--ui-kit-color-grey-14)}:host ::ng-deep .search-results .category .line-item .dates.second-date{color:var(--ui-kit-color-grey-10)}:host ::ng-deep .empty-section{container:none}\n"] }]
6615
+ KitPillComponent,
6616
+ ], template: "<div #container\n class=\"global-search\">\n <kendo-textbox #textbox\n class=\"textbox\"\n [class.expanded]=\"isPopupOpen\"\n [placeholder]=\"'kit.globalSearch.placeholder' | translate\"\n [size]=\"'none'\"\n [(ngModel)]=\"value\"\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 <div class=\"popup-content\">\n <div class=\"search-results\">\n @if (searchResults().length) {\n @for (category of searchResults(); track category?.name) {\n @if (category) {\n <div class=\"category\">\n <p class=\"header\"\n [class.empty]=\"!category.total\">\n <kit-svg-icon [icon]=\"kitSvgIcon.CHECK_STICKER\"/>\n <span class=\"title\">{{ category.name.toUpperCase() }} ({{ category.total }})</span>\n </p>\n\n @for (lineItem of category.items.slice(0, this.displayedLineItemsNumber()); track $index) {\n <div class=\"line-item\"\n [class.has-link]=\"lineItem.link\"\n (click)=\"navigate(lineItem.link)\">\n <div class=\"title\">\n <kit-truncate-text>{{ lineItem.title }}</kit-truncate-text>\n </div>\n <div class=\"subtitle\">\n <kit-truncate-text>{{ lineItem.subtitle }}</kit-truncate-text>\n </div>\n @if (lineItem.routePath?.from || lineItem.routePath?.to) {\n <kit-route-path class=\"route\"\n [containerMode]=\"lineItem.routePath?.containerMode\"\n [destinationPort]=\"lineItem.routePath?.to\"\n [originPort]=\"lineItem.routePath?.from\"\n [type]=\"lineItem.routePath?.type\"/>\n }\n @if (lineItem.dates?.firstDate.value) {\n <div class=\"dates first-date\">\n <kit-svg-icon [icon]=\"kitSvgIcon.CALENDAR\"/>\n <kit-truncate-text>{{ lineItem.dates?.firstDate.label }} \n <span class=\"date\">{{ lineItem.dates?.firstDate.value | date: dateFormat : 'UTC' }}</span>\n </kit-truncate-text>\n </div>\n }\n @if (lineItem.dates?.secondDate.value) {\n <div class=\"dates second-date\">\n <kit-svg-icon [icon]=\"kitSvgIcon.CALENDAR\"/>\n <kit-truncate-text>{{ lineItem.dates?.secondDate.label }} \n <span class=\"date\">{{ lineItem.dates?.secondDate.value | date: dateFormat : 'UTC' }}</span>\n </kit-truncate-text>\n </div>\n }\n </div>\n }\n \n @if (category.total > this.displayedLineItemsNumber()) {\n <kit-button [label]=\"'kit.globalSearch.showMore' | translate\"\n [type]=\"kitButtonType.GHOST\"\n [kind]=\"kitButtonKind.SMALL\"\n (clicked)=\"navigate(category.categoryLink)\"/>\n }\n </div>\n }\n }\n } @else if (showPropmts()) {\n <div class=\"prompts\">\n @for (prompt of prompts(); 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 } @else {\n <kit-empty-section class=\"empty-section\"\n [text]=\"'kit.globalSearch.noData' | translate\"/>\n }\n </div>\n </div>\n </ng-template>\n</div>\n", styles: [":host{position:relative}:host .global-search{max-width:360px}:host .global-search:has(.textbox.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:has(.textbox.k-focus) .kit-global-search-popup{display:inherit}:host ::ng-deep .k-animation-container{width:100%}:host ::ng-deep .kit-global-search-popup{overflow-y:auto}:host ::ng-deep .global-search .k-textbox.k-input .k-input-inner{padding:11px 8px}: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 .category:not(:last-child){margin-bottom:20px}:host ::ng-deep .search-results .category .header{display:flex;align-items:center;margin:0 0 20px}:host ::ng-deep .search-results .category .header .icon.check-sticker-icon{width:16px;height:16px;fill:var(--ui-kit-color-main);margin-right:10px}:host ::ng-deep .search-results .category .header .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 .icon.check-sticker-icon{fill:var(--ui-kit-color-grey-12)}:host ::ng-deep .search-results .category .header.empty .title{color:var(--ui-kit-color-grey-12)}:host ::ng-deep .search-results .category .line-item{display:grid;grid-template-columns:minmax(50px,190px) minmax(50px,190px) minmax(200px,300px) minmax(65px,130px) minmax(65px,130px);justify-content:space-between;gap:20px;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 .title{font-size:16px;line-height:22px;font-weight:500}:host ::ng-deep .search-results .category .line-item .title,:host ::ng-deep .search-results .category .line-item .subtitle{color:var(--ui-kit-color-grey-10)}:host ::ng-deep .search-results .category .line-item .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 .dates{display:flex;align-items:center;font-size:12px;line-height:14px}:host ::ng-deep .search-results .category .line-item .dates .date{font-size:14px;line-height:20px;font-weight:500}:host ::ng-deep .search-results .category .line-item .dates.first-date{color:var(--ui-kit-color-grey-14)}:host ::ng-deep .search-results .category .line-item .dates.second-date{color:var(--ui-kit-color-grey-10)}:host ::ng-deep .search-results .prompts{display:flex;gap:10px}:host ::ng-deep .empty-section{container:none}\n"] }]
6605
6617
  }], ctorParameters: () => [{ type: i1$7.Router }], propDecorators: { documentClick: [{
6606
6618
  type: HostListener,
6607
6619
  args: ['document:click', ['$event']]