@indigina/ui-kit 1.1.218 → 1.1.220
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/indigina-ui-kit.mjs +56 -32
- package/fesm2022/indigina-ui-kit.mjs.map +1 -1
- package/index.d.ts +6 -2
- package/package.json +1 -1
|
@@ -29,7 +29,7 @@ import * as i1$8 from '@progress/kendo-angular-dialog';
|
|
|
29
29
|
import { KENDO_DIALOGS, DialogActionsComponent, DialogContentBase, DialogCloseResult, DialogRef } from '@progress/kendo-angular-dialog';
|
|
30
30
|
export { DialogAction, DialogCloseResult, DialogContentBase, DialogRef } from '@progress/kendo-angular-dialog';
|
|
31
31
|
import * as i1$9 from '@progress/kendo-angular-indicators';
|
|
32
|
-
import { IndicatorsModule } from '@progress/kendo-angular-indicators';
|
|
32
|
+
import { IndicatorsModule, KENDO_INDICATORS } from '@progress/kendo-angular-indicators';
|
|
33
33
|
import * as i1$a from '@progress/kendo-angular-upload';
|
|
34
34
|
import { UploadModule } from '@progress/kendo-angular-upload';
|
|
35
35
|
import * as i1$d from '@angular/common/http';
|
|
@@ -4698,17 +4698,22 @@ class KitPopupComponent {
|
|
|
4698
4698
|
this.kitButtonKind = KitButtonKind;
|
|
4699
4699
|
this.kitButtonType = KitButtonType;
|
|
4700
4700
|
this.popupRef = null;
|
|
4701
|
+
this.onDocumentClick = (event) => {
|
|
4702
|
+
if (!this.popupRef) {
|
|
4703
|
+
return;
|
|
4704
|
+
}
|
|
4705
|
+
const target = event.target;
|
|
4706
|
+
if (target && !this.popupRef?.popupElement.contains(target) && !this.anchorElement?.contains(target)) {
|
|
4707
|
+
this.close();
|
|
4708
|
+
}
|
|
4709
|
+
};
|
|
4701
4710
|
}
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
return;
|
|
4705
|
-
}
|
|
4706
|
-
if (!this.popupRef?.popupElement.contains(event.target) && !this.anchorElement?.contains(event.target)) {
|
|
4707
|
-
this.close();
|
|
4708
|
-
}
|
|
4711
|
+
ngOnInit() {
|
|
4712
|
+
this.addOutsideClickListener();
|
|
4709
4713
|
}
|
|
4710
4714
|
ngOnDestroy() {
|
|
4711
4715
|
this.close();
|
|
4716
|
+
this.removeOutsideClickListener();
|
|
4712
4717
|
}
|
|
4713
4718
|
toggle(options) {
|
|
4714
4719
|
if (this.popupRef) {
|
|
@@ -4744,8 +4749,16 @@ class KitPopupComponent {
|
|
|
4744
4749
|
this.onApply.emit();
|
|
4745
4750
|
this.close();
|
|
4746
4751
|
}
|
|
4752
|
+
addOutsideClickListener() {
|
|
4753
|
+
if (this.closeOnOutsideClick()) {
|
|
4754
|
+
document.addEventListener('click', this.onDocumentClick, true);
|
|
4755
|
+
}
|
|
4756
|
+
}
|
|
4757
|
+
removeOutsideClickListener() {
|
|
4758
|
+
document.removeEventListener('click', this.onDocumentClick, true);
|
|
4759
|
+
}
|
|
4747
4760
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: KitPopupComponent, deps: [{ token: i1$c.PopupService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4748
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: KitPopupComponent, isStandalone: true, selector: "kit-popup", inputs: { anchor: { classPropertyName: "anchor", publicName: "anchor", isSignal: true, isRequired: true, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, closeOnOutsideClick: { classPropertyName: "closeOnOutsideClick", publicName: "closeOnOutsideClick", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, cancelButtonLabel: { classPropertyName: "cancelButtonLabel", publicName: "cancelButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, applyButtonLabel: { classPropertyName: "applyButtonLabel", publicName: "applyButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, isApplyButtonDisabled: { classPropertyName: "isApplyButtonDisabled", publicName: "isApplyButtonDisabled", isSignal: true, isRequired: false, transformFunction: null }, positionMode: { classPropertyName: "positionMode", publicName: "positionMode", isSignal: true, isRequired: false, transformFunction: null }, popupClass: { classPropertyName: "popupClass", publicName: "popupClass", isSignal: true, isRequired: false, transformFunction: null }, closePopupOnCancel: { classPropertyName: "closePopupOnCancel", publicName: "closePopupOnCancel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onCancel: "onCancel", onApply: "onApply", onOpen: "onOpen", onClose: "onClose" },
|
|
4761
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: KitPopupComponent, isStandalone: true, selector: "kit-popup", inputs: { anchor: { classPropertyName: "anchor", publicName: "anchor", isSignal: true, isRequired: true, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, closeOnOutsideClick: { classPropertyName: "closeOnOutsideClick", publicName: "closeOnOutsideClick", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, cancelButtonLabel: { classPropertyName: "cancelButtonLabel", publicName: "cancelButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, applyButtonLabel: { classPropertyName: "applyButtonLabel", publicName: "applyButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, isApplyButtonDisabled: { classPropertyName: "isApplyButtonDisabled", publicName: "isApplyButtonDisabled", isSignal: true, isRequired: false, transformFunction: null }, positionMode: { classPropertyName: "positionMode", publicName: "positionMode", isSignal: true, isRequired: false, transformFunction: null }, popupClass: { classPropertyName: "popupClass", publicName: "popupClass", isSignal: true, isRequired: false, transformFunction: null }, closePopupOnCancel: { classPropertyName: "closePopupOnCancel", publicName: "closePopupOnCancel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onCancel: "onCancel", onApply: "onApply", onOpen: "onOpen", onClose: "onClose" }, providers: [
|
|
4749
4762
|
PopupService,
|
|
4750
4763
|
{
|
|
4751
4764
|
provide: POPUP_CONTAINER,
|
|
@@ -4772,9 +4785,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
|
|
|
4772
4785
|
}], ctorParameters: () => [{ type: i1$c.PopupService }], propDecorators: { popupTemplate: [{
|
|
4773
4786
|
type: ViewChild,
|
|
4774
4787
|
args: ['popupTemplate']
|
|
4775
|
-
}], documentClick: [{
|
|
4776
|
-
type: HostListener,
|
|
4777
|
-
args: ['document:click', ['$event']]
|
|
4778
4788
|
}] } });
|
|
4779
4789
|
|
|
4780
4790
|
var KitDatepickerSize;
|
|
@@ -6774,6 +6784,7 @@ class KitGlobalSearchComponent {
|
|
|
6774
6784
|
this.showPropmts = signal(true, ...(ngDevMode ? [{ debugName: "showPropmts" }] : []));
|
|
6775
6785
|
this.userPermissions$ = this.store.select(KIT_USER_PERMISSIONS_STATE_TOKEN).pipe(map(data => data.permissions));
|
|
6776
6786
|
this.selectedFilters$ = new BehaviorSubject([]);
|
|
6787
|
+
this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
|
|
6777
6788
|
this.expandedFilters = new Set();
|
|
6778
6789
|
this.isClearing = false;
|
|
6779
6790
|
}
|
|
@@ -6782,9 +6793,11 @@ class KitGlobalSearchComponent {
|
|
|
6782
6793
|
this.textbox().valueChange.pipe(debounceTime(500), distinctUntilChanged()),
|
|
6783
6794
|
this.selectedFilters$,
|
|
6784
6795
|
]).pipe(filter(([text, _,]) => text.length > 2 && !this.isClearing)).subscribe(([text, filters,]) => {
|
|
6796
|
+
this.isLoading.set(true);
|
|
6797
|
+
this.showPropmts.set(false);
|
|
6785
6798
|
this.searchFn()(text, filters).subscribe(searchRusult => {
|
|
6786
|
-
this.showPropmts.set(false);
|
|
6787
6799
|
this.searchResults.set(searchRusult.filter(Boolean));
|
|
6800
|
+
this.isLoading.set(false);
|
|
6788
6801
|
});
|
|
6789
6802
|
});
|
|
6790
6803
|
}
|
|
@@ -6795,6 +6808,9 @@ class KitGlobalSearchComponent {
|
|
|
6795
6808
|
return this.selectedFilters$.value;
|
|
6796
6809
|
}
|
|
6797
6810
|
clearSearch() {
|
|
6811
|
+
if (this.isLoading()) {
|
|
6812
|
+
return;
|
|
6813
|
+
}
|
|
6798
6814
|
this.isClearing = true;
|
|
6799
6815
|
this.searchValue = '';
|
|
6800
6816
|
this.textbox().valueChange.emit('');
|
|
@@ -6891,7 +6907,7 @@ class KitGlobalSearchComponent {
|
|
|
6891
6907
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: KitGlobalSearchComponent, deps: [{ token: i1$7.Router }, { token: i1$e.Store }, { token: i1$1.DatePipe }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6892
6908
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", 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: [
|
|
6893
6909
|
DatePipe,
|
|
6894
|
-
], 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 #textbox\n class=\"textbox\"\n [placeholder]=\"'kit.globalSearch.placeholder' | translate\"\n [size]=\"'none'\"\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 (searchResults().length) {\n <div class=\"search-results\">\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.routeConfig\"\n (click)=\"navigate(lineItem.routeConfig)\">\n <div class=\"main-content\">\n <div class=\"title\">\n <kit-truncate-text>\n <span [innerHTML]=\"lineItem.title | highlight:searchValue\"></span>\n </kit-truncate-text>\n </div>\n <div>\n <kit-pill class=\"status\"\n [theme]=\"kitPillTheme.MAIN\">\n <kit-truncate-text>{{ lineItem.status }}</kit-truncate-text>\n </kit-pill>\n </div>\n <div class=\"subtitle\">\n <kit-truncate-text>\n <span [innerHTML]=\"lineItem.subtitle || '' | highlight:searchValue\"></span>\n </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 <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 \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 }\n </div>\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 [iconType]=\"kitSvgIconType.STROKE\"\n [kind]=\"kitButtonKind.SMALL\"\n [type]=\"kitButtonType.GHOST\"\n (clicked)=\"toggleFilterExpanded($index)\"/>\n }\n </div>\n }\n </div>\n }\n } @else {\n <kit-empty-section class=\"empty-section\"\n [text]=\"'kit.globalSearch.noData' | translate\"/>\n }\n }\n </div>\n }\n </ng-template>\n</div>\n", styles: [":host{position:relative;display:block}: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:100%}:host ::ng-deep .kit-global-search-popup{overflow:auto;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: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{padding:24px;flex:1}: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{min-width:700px;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(50px,1fr) minmax(50px,1fr) minmax(50px,1fr) repeat(auto-fit,minmax(65px,1.5fr));gap:20px;align-items:center}: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 .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-path{justify-content:center}:host ::ng-deep .search-results .category .line-item .main-content .status{white-space:nowrap;width:100%;max-width:150px;display:block;margin:auto}:host ::ng-deep .search-results .category .line-item .main-content .kit-pill-content{width:100%;margin:auto}:host ::ng-deep .search-results .category .line-item .main-content .dates{display:flex;align-items:center;justify-self:end;font-size:12px;line-height:14px;width:100%}:host ::ng-deep .search-results .category .line-item .main-content .dates.date{font-size:14px;line-height:20px;font-weight:500}: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){grid-template-columns:minmax(50px,1fr) minmax(50px,1fr) minmax(50px,1fr) minmax(200px,2fr) repeat(auto-fit,minmax(65px,1.5fr))}: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)}: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: "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: "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"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "pipe", type: i1$b.TranslatePipe, name: "translate" }, { kind: "pipe", type: HighlightPipe, name: "highlight" }], animations: [
|
|
6910
|
+
], 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 #textbox\n class=\"textbox\"\n [placeholder]=\"'kit.globalSearch.placeholder' | translate\"\n [size]=\"'none'\"\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 <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.routeConfig\"\n (click)=\"navigate(lineItem.routeConfig)\">\n <div class=\"main-content\">\n <div class=\"title\">\n <kit-truncate-text>\n <span [innerHTML]=\"lineItem.title | highlight:searchValue\"></span>\n </kit-truncate-text>\n </div>\n <div>\n <kit-pill class=\"status\"\n [theme]=\"kitPillTheme.MAIN\">\n <kit-truncate-text>{{ lineItem.status }}</kit-truncate-text>\n </kit-pill>\n </div>\n <div class=\"subtitle\">\n <kit-truncate-text>\n <span [innerHTML]=\"lineItem.subtitle || '' | highlight:searchValue\"></span>\n </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 <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 \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 }\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 [iconType]=\"kitSvgIconType.STROKE\"\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{position:relative;display:block}: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:100%}:host ::ng-deep .kit-global-search-popup{overflow:auto;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: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{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: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{min-width:700px;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(50px,1fr) minmax(50px,1fr) minmax(50px,1fr) repeat(auto-fit,minmax(65px,1.5fr));gap:20px;align-items:center}: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 .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-path{justify-content:center}:host ::ng-deep .search-results .category .line-item .main-content .status{white-space:nowrap;width:100%;max-width:150px;display:block;margin:auto}:host ::ng-deep .search-results .category .line-item .main-content .kit-pill-content{width:100%;margin:auto}:host ::ng-deep .search-results .category .line-item .main-content .dates{display:flex;align-items:center;justify-self:end;font-size:12px;line-height:14px;width:100%}:host ::ng-deep .search-results .category .line-item .main-content .dates.date{font-size:14px;line-height:20px;font-weight:500}: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){grid-template-columns:minmax(50px,1fr) minmax(50px,1fr) minmax(50px,1fr) minmax(200px,2fr) repeat(auto-fit,minmax(65px,1.5fr))}:host ::ng-deep .search-results .category .line-item .main-content>:last-child{justify-self: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)}: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: "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: i1$9.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"], 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: "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"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "pipe", type: i1$b.TranslatePipe, name: "translate" }, { kind: "pipe", type: HighlightPipe, name: "highlight" }], animations: [
|
|
6895
6911
|
expandCollapseAnimation('height'),
|
|
6896
6912
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6897
6913
|
}
|
|
@@ -6902,6 +6918,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
|
|
|
6902
6918
|
KitTextboxModule,
|
|
6903
6919
|
KitSvgIconModule,
|
|
6904
6920
|
KENDO_INPUTS,
|
|
6921
|
+
KENDO_INDICATORS,
|
|
6905
6922
|
KitPopupComponent,
|
|
6906
6923
|
FormsModule,
|
|
6907
6924
|
ReactiveFormsModule,
|
|
@@ -6917,7 +6934,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
|
|
|
6917
6934
|
expandCollapseAnimation('height'),
|
|
6918
6935
|
], providers: [
|
|
6919
6936
|
DatePipe,
|
|
6920
|
-
], template: "<div #container\n class=\"global-search\"\n [class.expanded]=\"isPopupOpen\">\n <kendo-textbox #textbox\n class=\"textbox\"\n [placeholder]=\"'kit.globalSearch.placeholder' | translate\"\n [size]=\"'none'\"\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 (searchResults().length) {\n <div class=\"search-results\">\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.routeConfig\"\n (click)=\"navigate(lineItem.routeConfig)\">\n <div class=\"main-content\">\n <div class=\"title\">\n <kit-truncate-text>\n <span [innerHTML]=\"lineItem.title | highlight:searchValue\"></span>\n </kit-truncate-text>\n </div>\n <div>\n <kit-pill class=\"status\"\n [theme]=\"kitPillTheme.MAIN\">\n <kit-truncate-text>{{ lineItem.status }}</kit-truncate-text>\n </kit-pill>\n </div>\n <div class=\"subtitle\">\n <kit-truncate-text>\n <span [innerHTML]=\"lineItem.subtitle || '' | highlight:searchValue\"></span>\n </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 <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 \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 }\n </div>\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 [iconType]=\"kitSvgIconType.STROKE\"\n [kind]=\"kitButtonKind.SMALL\"\n [type]=\"kitButtonType.GHOST\"\n (clicked)=\"toggleFilterExpanded($index)\"/>\n }\n </div>\n }\n </div>\n }\n } @else {\n <kit-empty-section class=\"empty-section\"\n [text]=\"'kit.globalSearch.noData' | translate\"/>\n }\n }\n </div>\n }\n </ng-template>\n</div>\n", styles: [":host{position:relative;display:block}: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:100%}:host ::ng-deep .kit-global-search-popup{overflow:auto;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: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{padding:24px;flex:1}: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{min-width:700px;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(50px,1fr) minmax(50px,1fr) minmax(50px,1fr) repeat(auto-fit,minmax(65px,1.5fr));gap:20px;align-items:center}: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 .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-path{justify-content:center}:host ::ng-deep .search-results .category .line-item .main-content .status{white-space:nowrap;width:100%;max-width:150px;display:block;margin:auto}:host ::ng-deep .search-results .category .line-item .main-content .kit-pill-content{width:100%;margin:auto}:host ::ng-deep .search-results .category .line-item .main-content .dates{display:flex;align-items:center;justify-self:end;font-size:12px;line-height:14px;width:100%}:host ::ng-deep .search-results .category .line-item .main-content .dates.date{font-size:14px;line-height:20px;font-weight:500}: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){grid-template-columns:minmax(50px,1fr) minmax(50px,1fr) minmax(50px,1fr) minmax(200px,2fr) repeat(auto-fit,minmax(65px,1.5fr))}: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)}: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"] }]
|
|
6937
|
+
], template: "<div #container\n class=\"global-search\"\n [class.expanded]=\"isPopupOpen\">\n <kendo-textbox #textbox\n class=\"textbox\"\n [placeholder]=\"'kit.globalSearch.placeholder' | translate\"\n [size]=\"'none'\"\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 <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.routeConfig\"\n (click)=\"navigate(lineItem.routeConfig)\">\n <div class=\"main-content\">\n <div class=\"title\">\n <kit-truncate-text>\n <span [innerHTML]=\"lineItem.title | highlight:searchValue\"></span>\n </kit-truncate-text>\n </div>\n <div>\n <kit-pill class=\"status\"\n [theme]=\"kitPillTheme.MAIN\">\n <kit-truncate-text>{{ lineItem.status }}</kit-truncate-text>\n </kit-pill>\n </div>\n <div class=\"subtitle\">\n <kit-truncate-text>\n <span [innerHTML]=\"lineItem.subtitle || '' | highlight:searchValue\"></span>\n </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 <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 \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 }\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 [iconType]=\"kitSvgIconType.STROKE\"\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{position:relative;display:block}: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:100%}:host ::ng-deep .kit-global-search-popup{overflow:auto;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: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{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: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{min-width:700px;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(50px,1fr) minmax(50px,1fr) minmax(50px,1fr) repeat(auto-fit,minmax(65px,1.5fr));gap:20px;align-items:center}: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 .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-path{justify-content:center}:host ::ng-deep .search-results .category .line-item .main-content .status{white-space:nowrap;width:100%;max-width:150px;display:block;margin:auto}:host ::ng-deep .search-results .category .line-item .main-content .kit-pill-content{width:100%;margin:auto}:host ::ng-deep .search-results .category .line-item .main-content .dates{display:flex;align-items:center;justify-self:end;font-size:12px;line-height:14px;width:100%}:host ::ng-deep .search-results .category .line-item .main-content .dates.date{font-size:14px;line-height:20px;font-weight:500}: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){grid-template-columns:minmax(50px,1fr) minmax(50px,1fr) minmax(50px,1fr) minmax(200px,2fr) repeat(auto-fit,minmax(65px,1.5fr))}:host ::ng-deep .search-results .category .line-item .main-content>:last-child{justify-self: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)}: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"] }]
|
|
6921
6938
|
}], ctorParameters: () => [{ type: i1$7.Router }, { type: i1$e.Store }, { type: i1$1.DatePipe }], propDecorators: { documentClick: [{
|
|
6922
6939
|
type: HostListener,
|
|
6923
6940
|
args: ['document:click', ['$event']]
|
|
@@ -8421,22 +8438,26 @@ class KitFilterDateComponent {
|
|
|
8421
8438
|
const endDate = this.endDate();
|
|
8422
8439
|
return (!endDate || this.useLocalTimeZone()) ? endDate : convertDateToLocal(endDate);
|
|
8423
8440
|
}, ...(ngDevMode ? [{ debugName: "localEndDate" }] : []));
|
|
8424
|
-
|
|
8425
|
-
|
|
8426
|
-
|
|
8427
|
-
|
|
8428
|
-
|
|
8429
|
-
|
|
8430
|
-
!event.target
|
|
8431
|
-
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
|
|
8435
|
-
}
|
|
8441
|
+
this.onDocumentClick = (event) => {
|
|
8442
|
+
const datePicker = document.querySelector('.kit-datepicker-popup');
|
|
8443
|
+
const popupElement = this.popup()?.popupHTMLElement;
|
|
8444
|
+
const isClickOutsideDatePicker = !datePicker?.contains(event.target) &&
|
|
8445
|
+
!event.target.matches('.k-link') &&
|
|
8446
|
+
!event.target?.parentElement?.parentElement?.matches('.k-calendar-nav');
|
|
8447
|
+
if (!popupElement?.contains(event.target)
|
|
8448
|
+
&& !this.anchor()?.nativeElement.contains(event.target)
|
|
8449
|
+
&& isClickOutsideDatePicker) {
|
|
8450
|
+
this.popup()?.close();
|
|
8451
|
+
}
|
|
8452
|
+
};
|
|
8436
8453
|
}
|
|
8437
8454
|
ngOnInit() {
|
|
8438
8455
|
this.initializeSelectedValues();
|
|
8439
8456
|
this.showPopupOnInit();
|
|
8457
|
+
this.addOutsideClickListener();
|
|
8458
|
+
}
|
|
8459
|
+
ngOnDestroy() {
|
|
8460
|
+
this.removeOutsideClickListener();
|
|
8440
8461
|
}
|
|
8441
8462
|
removeFilter() {
|
|
8442
8463
|
this.popup()?.close();
|
|
@@ -8507,8 +8528,14 @@ class KitFilterDateComponent {
|
|
|
8507
8528
|
requestAnimationFrame(() => this.onPopupToggle());
|
|
8508
8529
|
}
|
|
8509
8530
|
}
|
|
8531
|
+
addOutsideClickListener() {
|
|
8532
|
+
document.addEventListener('click', this.onDocumentClick, true);
|
|
8533
|
+
}
|
|
8534
|
+
removeOutsideClickListener() {
|
|
8535
|
+
document.removeEventListener('click', this.onDocumentClick, true);
|
|
8536
|
+
}
|
|
8510
8537
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: KitFilterDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8511
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: KitFilterDateComponent, isStandalone: true, selector: "kit-filter-date", inputs: { filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: true, transformFunction: null }, useLocalTimeZone: { classPropertyName: "useLocalTimeZone", publicName: "useLocalTimeZone", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterRemoved: "filterRemoved", filterChanged: "filterChanged" },
|
|
8538
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: KitFilterDateComponent, isStandalone: true, selector: "kit-filter-date", inputs: { filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: true, transformFunction: null }, useLocalTimeZone: { classPropertyName: "useLocalTimeZone", publicName: "useLocalTimeZone", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterRemoved: "filterRemoved", filterChanged: "filterChanged" }, viewQueries: [{ propertyName: "anchor", first: true, predicate: ["toggleButton"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "popup", first: true, predicate: ["popup"], descendants: true, read: KitPopupComponent, isSignal: true }], ngImport: i0, template: "<div class=\"kit-filter-date\">\n <kit-pill #toggleButton\n [selectable]=\"!filter().readonly\"\n [selected]=\"popup.isPopupOpen\"\n [removable]=\"!filter().readonly\"\n [theme]=\"filter().readonly && kitPillTheme.BLUE || kitPillTheme.DEFAULT\"\n (removed)=\"removeFilter()\"\n (clicked)=\"onPopupToggle()\">\n {{ filter().title | translate }}:\n @if (selectedValues(); as selectedValues) {\n {{ selectedValues?.start | date: pillDateFormat : (useLocalTimeZone() ? undefined : 'UTC') }}\n @if (selectedValues?.start && selectedValues?.end) {\n -\n }\n {{ selectedValues?.end | date: pillDateFormat : (useLocalTimeZone() ? undefined : 'UTC') }}\n }\n </kit-pill>\n</div>\n\n<kit-popup #popup\n popupClass=\"kit-filter-date-popup\"\n [anchor]=\"anchor()\"\n [content]=\"content\"\n [closeOnOutsideClick]=\"false\"\n [showFooter]=\"true\"\n [applyButtonLabel]=\"'kit.filters.apply' | translate\"\n [cancelButtonLabel]=\"'kit.filters.clear' | translate\"\n [isApplyButtonDisabled]=\"applyButtonDisabled()\"\n [closePopupOnCancel]=\"false\"\n (onApply)=\"applyFilter()\"\n (onCancel)=\"clearAllFilters()\"\n (onClose)=\"close()\">\n</kit-popup>\n\n<ng-template #content>\n <div class=\"popup-content\">\n <div class=\"date-input\">\n <kit-datepicker [placeholder]=\"'kit.filters.chooseDateFrom' | translate\"\n [defaultDate]=\"localStartDate()\"\n [max]=\"localEndDate()\"\n (changed)=\"onFromDateChange($event)\"\n ></kit-datepicker>\n <kit-datepicker [placeholder]=\"'kit.filters.chooseDateTo' | translate\"\n [defaultDate]=\"localEndDate()\"\n [min]=\"localStartDate()\"\n (changed)=\"onToDateChange($event)\"\n ></kit-datepicker>\n </div>\n </div>\n</ng-template>\n", styles: ["::ng-deep .kit-filter-date-popup .popup-content{width:296px;box-sizing:border-box}::ng-deep .kit-filter-date-popup .date-input{display:flex;flex-direction:column;gap:10px}\n"], dependencies: [{ kind: "component", type: KitPillComponent, selector: "kit-pill", inputs: ["removable", "selectable", "selected", "type", "theme", "icon", "iconType"], outputs: ["clicked", "removed"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: KitDatepickerModule }, { kind: "component", type: KitDatepickerComponent, selector: "kit-datepicker", inputs: ["placeholder", "label", "defaultDate", "disabled", "format", "min", "max", "messageIcon", "messageText", "size"], outputs: ["changed"] }, { kind: "component", type: KitPopupComponent, selector: "kit-popup", inputs: ["anchor", "content", "closeOnOutsideClick", "showFooter", "cancelButtonLabel", "applyButtonLabel", "isApplyButtonDisabled", "positionMode", "popupClass", "closePopupOnCancel"], outputs: ["onCancel", "onApply", "onOpen", "onClose"] }, { kind: "pipe", type: i1$b.TranslatePipe, name: "translate" }, { kind: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8512
8539
|
}
|
|
8513
8540
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: KitFilterDateComponent, decorators: [{
|
|
8514
8541
|
type: Component,
|
|
@@ -8519,10 +8546,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
|
|
|
8519
8546
|
DatePipe,
|
|
8520
8547
|
KitPopupComponent,
|
|
8521
8548
|
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"kit-filter-date\">\n <kit-pill #toggleButton\n [selectable]=\"!filter().readonly\"\n [selected]=\"popup.isPopupOpen\"\n [removable]=\"!filter().readonly\"\n [theme]=\"filter().readonly && kitPillTheme.BLUE || kitPillTheme.DEFAULT\"\n (removed)=\"removeFilter()\"\n (clicked)=\"onPopupToggle()\">\n {{ filter().title | translate }}:\n @if (selectedValues(); as selectedValues) {\n {{ selectedValues?.start | date: pillDateFormat : (useLocalTimeZone() ? undefined : 'UTC') }}\n @if (selectedValues?.start && selectedValues?.end) {\n -\n }\n {{ selectedValues?.end | date: pillDateFormat : (useLocalTimeZone() ? undefined : 'UTC') }}\n }\n </kit-pill>\n</div>\n\n<kit-popup #popup\n popupClass=\"kit-filter-date-popup\"\n [anchor]=\"anchor()\"\n [content]=\"content\"\n [closeOnOutsideClick]=\"false\"\n [showFooter]=\"true\"\n [applyButtonLabel]=\"'kit.filters.apply' | translate\"\n [cancelButtonLabel]=\"'kit.filters.clear' | translate\"\n [isApplyButtonDisabled]=\"applyButtonDisabled()\"\n [closePopupOnCancel]=\"false\"\n (onApply)=\"applyFilter()\"\n (onCancel)=\"clearAllFilters()\"\n (onClose)=\"close()\">\n</kit-popup>\n\n<ng-template #content>\n <div class=\"popup-content\">\n <div class=\"date-input\">\n <kit-datepicker [placeholder]=\"'kit.filters.chooseDateFrom' | translate\"\n [defaultDate]=\"localStartDate()\"\n [max]=\"localEndDate()\"\n (changed)=\"onFromDateChange($event)\"\n ></kit-datepicker>\n <kit-datepicker [placeholder]=\"'kit.filters.chooseDateTo' | translate\"\n [defaultDate]=\"localEndDate()\"\n [min]=\"localStartDate()\"\n (changed)=\"onToDateChange($event)\"\n ></kit-datepicker>\n </div>\n </div>\n</ng-template>\n", styles: ["::ng-deep .kit-filter-date-popup .popup-content{width:296px;box-sizing:border-box}::ng-deep .kit-filter-date-popup .date-input{display:flex;flex-direction:column;gap:10px}\n"] }]
|
|
8522
|
-
}]
|
|
8523
|
-
type: HostListener,
|
|
8524
|
-
args: ['document:click', ['$event']]
|
|
8525
|
-
}] } });
|
|
8549
|
+
}] });
|
|
8526
8550
|
|
|
8527
8551
|
class KitFilterRadioComponent {
|
|
8528
8552
|
constructor(translateService) {
|