@indigina/ui-kit 1.1.593 → 1.1.595
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.
|
@@ -10251,9 +10251,21 @@ const getTimeZoneOffset = (userTimeZone, column) => {
|
|
|
10251
10251
|
return 'UTC';
|
|
10252
10252
|
};
|
|
10253
10253
|
const removeFilterPrefix = (value) => value.split('$filter=')[1];
|
|
10254
|
+
const hasEffectiveFilterValue = (value) => {
|
|
10255
|
+
if (value === null || value === undefined) {
|
|
10256
|
+
return false;
|
|
10257
|
+
}
|
|
10258
|
+
if (typeof value === 'string') {
|
|
10259
|
+
return value.trim().length > 0;
|
|
10260
|
+
}
|
|
10261
|
+
if (Array.isArray(value)) {
|
|
10262
|
+
return value.length > 0;
|
|
10263
|
+
}
|
|
10264
|
+
return true;
|
|
10265
|
+
};
|
|
10254
10266
|
const filterEmptyValues = (filters) => ({
|
|
10255
10267
|
logic: filters?.logic ?? KitFilterLogic.AND,
|
|
10256
|
-
filters: filters?.filters.filter(item => noValueRequiredFilterOperators.includes(item.operator) || (item.value
|
|
10268
|
+
filters: filters?.filters.filter(item => noValueRequiredFilterOperators.includes(item.operator) || hasEffectiveFilterValue(item.value)) ?? [],
|
|
10257
10269
|
});
|
|
10258
10270
|
const normalizeGuidFilter = (filter) => {
|
|
10259
10271
|
const guidFormat = /'((\{)?[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}(\})?)'/g;
|
|
@@ -10324,16 +10336,30 @@ const getValueFilters = (value) => {
|
|
|
10324
10336
|
});
|
|
10325
10337
|
};
|
|
10326
10338
|
const kitBuildOdataFilter = (filter, columns) => removeFilterPrefix(normalizeGuidFilter(kitDataStateToODataString({ filter }, true, columns)));
|
|
10339
|
+
const isEffectiveFilterValue = (cleanedFilter) => cleanedFilter.filters.length > 0;
|
|
10340
|
+
const buildFilterByType = (filter, cleanedFilter) => {
|
|
10341
|
+
if (!isEffectiveFilterValue(cleanedFilter)) {
|
|
10342
|
+
return null;
|
|
10343
|
+
}
|
|
10344
|
+
return {
|
|
10345
|
+
...cleanedFilter,
|
|
10346
|
+
field: filter.field,
|
|
10347
|
+
...(filter.type === KitFilterType.CUSTOM_INPUT
|
|
10348
|
+
? { isCustomField: true }
|
|
10349
|
+
: {}),
|
|
10350
|
+
};
|
|
10351
|
+
};
|
|
10327
10352
|
const kitBuildFilters = (filters) => ({
|
|
10328
10353
|
logic: KitFilterLogic.AND,
|
|
10329
|
-
filters: filters.
|
|
10354
|
+
filters: filters.reduce((acc, filter) => {
|
|
10330
10355
|
const cleanedFilter = filterEmptyValues(filter.value);
|
|
10331
|
-
|
|
10332
|
-
|
|
10333
|
-
|
|
10334
|
-
|
|
10335
|
-
|
|
10336
|
-
|
|
10356
|
+
const normalizedFilter = buildFilterByType(filter, cleanedFilter);
|
|
10357
|
+
if (!normalizedFilter) {
|
|
10358
|
+
return acc;
|
|
10359
|
+
}
|
|
10360
|
+
acc.push(normalizedFilter);
|
|
10361
|
+
return acc;
|
|
10362
|
+
}, []),
|
|
10337
10363
|
});
|
|
10338
10364
|
|
|
10339
10365
|
const kitFormatStringForSearch = (inputString) => {
|
|
@@ -13838,21 +13864,24 @@ class KitGridUrlStateService {
|
|
|
13838
13864
|
};
|
|
13839
13865
|
}
|
|
13840
13866
|
setGridStateToUrl(state, defaultColumns = state?.columns ?? []) {
|
|
13841
|
-
const queryParams =
|
|
13842
|
-
skip: state?.skip,
|
|
13843
|
-
take: state?.take,
|
|
13844
|
-
search: state?.search,
|
|
13845
|
-
sort: JSON.stringify(state?.sort),
|
|
13846
|
-
filter: JSON.stringify(state?.filter),
|
|
13847
|
-
columns: JSON.stringify(buildGridViewColumns(defaultColumns)),
|
|
13848
|
-
archive: state?.archive,
|
|
13849
|
-
};
|
|
13867
|
+
const queryParams = this.buildGridQueryParams(state, defaultColumns);
|
|
13850
13868
|
this.router.navigate([], {
|
|
13851
13869
|
relativeTo: this.activatedRoute,
|
|
13852
13870
|
queryParams,
|
|
13853
13871
|
queryParamsHandling: 'merge',
|
|
13854
13872
|
});
|
|
13855
13873
|
}
|
|
13874
|
+
replaceGridStateInUrl(state, defaultColumns = state?.columns ?? []) {
|
|
13875
|
+
const queryParams = this.buildGridQueryParams(state, defaultColumns);
|
|
13876
|
+
const urlTree = this.router.createUrlTree([], {
|
|
13877
|
+
relativeTo: this.activatedRoute,
|
|
13878
|
+
queryParams: {
|
|
13879
|
+
...this.activatedRoute.snapshot.queryParams,
|
|
13880
|
+
...queryParams,
|
|
13881
|
+
},
|
|
13882
|
+
});
|
|
13883
|
+
this.location.replaceState(this.router.serializeUrl(urlTree));
|
|
13884
|
+
}
|
|
13856
13885
|
getFiltersVisible(filterDetailsSetting) {
|
|
13857
13886
|
const filterDetailsParam = this.activatedRoute.snapshot.queryParams['filtersDetails'];
|
|
13858
13887
|
const isFilterHiddenByParam = filterDetailsParam === 'true';
|
|
@@ -13870,6 +13899,17 @@ class KitGridUrlStateService {
|
|
|
13870
13899
|
});
|
|
13871
13900
|
this.location.replaceState(this.router.serializeUrl(urlTree));
|
|
13872
13901
|
}
|
|
13902
|
+
buildGridQueryParams(state, defaultColumns) {
|
|
13903
|
+
return {
|
|
13904
|
+
skip: state?.skip,
|
|
13905
|
+
take: state?.take,
|
|
13906
|
+
search: state?.search,
|
|
13907
|
+
sort: JSON.stringify(state?.sort),
|
|
13908
|
+
filter: JSON.stringify(state?.filter),
|
|
13909
|
+
columns: JSON.stringify(buildGridViewColumns(defaultColumns)),
|
|
13910
|
+
archive: state?.archive,
|
|
13911
|
+
};
|
|
13912
|
+
}
|
|
13873
13913
|
}
|
|
13874
13914
|
|
|
13875
13915
|
class FetchGridViews extends KitAbstractPayloadAction {
|
|
@@ -14768,14 +14808,13 @@ class KitFilterCheckboxComponent {
|
|
|
14768
14808
|
this.kitTooltipPosition = KitTooltipPosition;
|
|
14769
14809
|
this.kitPillTheme = KitPillTheme;
|
|
14770
14810
|
this.kitTextboxSize = KitTextboxSize;
|
|
14811
|
+
this.popupToggleRafId = null;
|
|
14771
14812
|
effect(() => this.allSelected.set(this.groupedItems().every(item => item.checked)));
|
|
14772
14813
|
}
|
|
14773
14814
|
ngOnInit() {
|
|
14774
14815
|
this.initializeSelectedValues();
|
|
14775
14816
|
this.updateItemsState();
|
|
14776
|
-
|
|
14777
|
-
requestAnimationFrame(() => this.onPopupToggle());
|
|
14778
|
-
}
|
|
14817
|
+
this.openPopupOnInit();
|
|
14779
14818
|
}
|
|
14780
14819
|
ngOnChanges({ filter }) {
|
|
14781
14820
|
if (!filter?.isFirstChange()) {
|
|
@@ -14783,6 +14822,12 @@ class KitFilterCheckboxComponent {
|
|
|
14783
14822
|
this.updateItemsState();
|
|
14784
14823
|
}
|
|
14785
14824
|
}
|
|
14825
|
+
ngOnDestroy() {
|
|
14826
|
+
if (this.popupToggleRafId !== null) {
|
|
14827
|
+
cancelAnimationFrame(this.popupToggleRafId);
|
|
14828
|
+
this.popupToggleRafId = null;
|
|
14829
|
+
}
|
|
14830
|
+
}
|
|
14786
14831
|
removeFilter() {
|
|
14787
14832
|
this.popup()?.close();
|
|
14788
14833
|
this.filterRemoved.emit();
|
|
@@ -14800,16 +14845,10 @@ class KitFilterCheckboxComponent {
|
|
|
14800
14845
|
this.selectedValues.set(checkedItems);
|
|
14801
14846
|
}
|
|
14802
14847
|
onPopupToggle() {
|
|
14803
|
-
|
|
14848
|
+
this.popup()?.toggle();
|
|
14804
14849
|
}
|
|
14805
14850
|
close() {
|
|
14806
|
-
|
|
14807
|
-
if (selectedValues.length) {
|
|
14808
|
-
this.updateItemsState();
|
|
14809
|
-
}
|
|
14810
|
-
else {
|
|
14811
|
-
this.applyFilter();
|
|
14812
|
-
}
|
|
14851
|
+
this.updateItemsState();
|
|
14813
14852
|
}
|
|
14814
14853
|
buildTranslateKey(value) {
|
|
14815
14854
|
return `${this.translateKeyPrefix()}${value}`;
|
|
@@ -14903,8 +14942,17 @@ class KitFilterCheckboxComponent {
|
|
|
14903
14942
|
checked: this.selectedValues().some(selectedValue => selectedValue.value === item.value) ?? false,
|
|
14904
14943
|
})));
|
|
14905
14944
|
}
|
|
14945
|
+
openPopupOnInit() {
|
|
14946
|
+
if (!this.showPopupOnInit() || this.selectedValues().length > 0) {
|
|
14947
|
+
return;
|
|
14948
|
+
}
|
|
14949
|
+
this.popupToggleRafId = requestAnimationFrame(() => {
|
|
14950
|
+
this.popupToggleRafId = null;
|
|
14951
|
+
this.onPopupToggle();
|
|
14952
|
+
});
|
|
14953
|
+
}
|
|
14906
14954
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: KitFilterCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14907
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: KitFilterCheckboxComponent, isStandalone: true, selector: "kit-filter-checkbox", inputs: { filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: true, transformFunction: null }, translateKeyPrefix: { classPropertyName: "translateKeyPrefix", publicName: "translateKeyPrefix", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, showPopupOnInit: { classPropertyName: "showPopupOnInit", publicName: "showPopupOnInit", isSignal: true, isRequired: false, transformFunction: null }, guidField: { classPropertyName: "guidField", publicName: "guidField", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { items: "itemsChange", filterRemoved: "filterRemoved", filterChanged: "filterChanged" }, viewQueries: [{ propertyName: "anchor", first: true, predicate: ["toggleButton"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "popupContent", first: true, predicate: ["popupContent"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "popup", first: true, predicate: ["popup"], descendants: true, read: KitPopupComponent, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"kit-filter-checkbox\">\n <kit-pill #toggleButton\n [selectable]=\"!filter().readonly\"\n [selected]=\"popup.isPopupOpen\"\n [removable]=\"!filter().readonly &&
|
|
14955
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: KitFilterCheckboxComponent, isStandalone: true, selector: "kit-filter-checkbox", inputs: { filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: true, transformFunction: null }, translateKeyPrefix: { classPropertyName: "translateKeyPrefix", publicName: "translateKeyPrefix", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, showPopupOnInit: { classPropertyName: "showPopupOnInit", publicName: "showPopupOnInit", isSignal: true, isRequired: false, transformFunction: null }, guidField: { classPropertyName: "guidField", publicName: "guidField", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { items: "itemsChange", filterRemoved: "filterRemoved", filterChanged: "filterChanged" }, viewQueries: [{ propertyName: "anchor", first: true, predicate: ["toggleButton"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "popupContent", first: true, predicate: ["popupContent"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "popup", first: true, predicate: ["popup"], descendants: true, read: KitPopupComponent, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"kit-filter-checkbox\">\n <kit-pill #toggleButton\n [selectable]=\"!filter().readonly\"\n [selected]=\"popup.isPopupOpen\"\n [removable]=\"!filter().readonly && (filter().removable ?? true)\"\n [theme]=\"filter().readonly && kitPillTheme.BLUE || kitPillTheme.DEFAULT\"\n (removed)=\"removeFilter()\"\n (clicked)=\"onPopupToggle()\">\n {{ filter().title | translate }}:\n @if (allSelected()) {\n <div class=\"kit-filter-checkbox-tooltip\"\n kitTooltip\n kitTooltipFilter=\".kit-filter-checkbox-tooltip\"\n [kitTooltipPosition]=\"kitTooltipPosition.RIGHT\"\n [kitTooltipTemplateRef]=\"tooltipTemplate\">\n {{ 'kit.filters.all' | translate }}\n </div>\n } @else if (displayedValues.length > 1) {\n <div class=\"kit-filter-checkbox-tooltip\"\n kitTooltip\n kitTooltipFilter=\".kit-filter-checkbox-tooltip\"\n [kitTooltipPosition]=\"kitTooltipPosition.RIGHT\"\n [kitTooltipTemplateRef]=\"tooltipTemplate\">\n <span class=\"kit-filter-checkbox-single-item\">{{ displayedValues[0] }}</span>\n <span class=\"kit-filter-checkbox-tooltip-count\">+{{ displayedValues.length - 1 }}</span>\n </div>\n } @else {\n <span class=\"kit-filter-checkbox-single-item\">{{ displayedValues[0] ?? '' }}</span>\n }\n </kit-pill>\n</div>\n\n<kit-popup #popup\n popupClass=\"kit-filter-checkbox-popup\"\n [anchor]=\"anchor()\"\n [content]=\"content\"\n [showFooter]=\"true\"\n [applyButtonLabel]=\"'kit.filters.apply' | translate\"\n [cancelButtonLabel]=\"'kit.filters.clear' | translate\"\n [closePopupOnCancel]=\"false\"\n (applyAction)=\"applyFilter()\"\n (cancelAction)=\"clearAllFilters()\"\n (closed)=\"close()\">\n</kit-popup>\n\n<ng-template #content>\n <div class=\"popup-search\"\n [hidden]=\"!isContentOverflowing && !searchTerm()\">\n <kit-textbox [placeholder]=\"'kit.filters.search' | translate\"\n [size]=\"kitTextboxSize.SMALL\"\n [defaultValue]=\"searchTerm()\"\n (changed)=\"searchTerm.set($event)\"\n ></kit-textbox>\n </div>\n\n <div #popupContent\n class=\"popup-content\">\n @if (!searchTerm()) {\n <kit-checkbox class=\"checkbox-item\"\n [label]=\"'kit.filters.all' | translate\"\n [(ngModel)]=\"allSelected\"\n (changed)=\"toggleAll($event)\">\n </kit-checkbox>\n }\n\n @for (item of visibleItems(); track $index) {\n <kit-checkbox class=\"checkbox-item\"\n [label]=\"buildTranslateKey(item.title) | translate\"\n [(ngModel)]=\"item.checked\"\n (changed)=\"onChange($event, item.value)\"\n ></kit-checkbox>\n }\n\n @if (!visibleItems().length) {\n {{ ('kit.filters.noDataFound' | translate) }}\n }\n </div>\n</ng-template>\n\n<ng-template #tooltipTemplate>\n @for (item of (displayedValues.length > 1 && !allSelected() ? displayedValues.slice(1) : displayedValues); track item) {\n <div class=\"kit-filter-checkbox-tooltip-item\">{{ item }}</div>\n }\n</ng-template>\n", styles: [".kit-filter-checkbox-tooltip{display:flex;align-items:center;gap:3px}.kit-filter-checkbox-tooltip-count{color:var(--ui-kit-color-main)}.kit-filter-checkbox-tooltip-item{color:var(--ui-kit-color-grey-10);font-size:12px;font-weight:500;line-height:20px}.kit-filter-checkbox-single-item{display:block;max-width:180px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}::ng-deep .kit-filter-checkbox-popup .popup-search{margin-bottom:5px;padding-bottom:15px;border-bottom:1px solid var(--ui-kit-color-grey-11)}::ng-deep .kit-filter-checkbox-popup .popup-content{width:172px;max-height:400px;overflow-y:auto}::ng-deep .kit-filter-checkbox-popup .popup-content::-webkit-scrollbar{width:4px;height:4px}::ng-deep .kit-filter-checkbox-popup .popup-content::-webkit-scrollbar-thumb{background-color:var(--ui-kit-color-grey-17);border-radius:2px}::ng-deep .kit-filter-checkbox-popup .popup-content::-webkit-scrollbar-thumb:hover{background-color:var(--ui-kit-color-grey-10)}::ng-deep .kit-filter-checkbox-popup .checkbox-item{display:block;padding:6px 0}\n"], dependencies: [{ kind: "component", type: KitPillComponent, selector: "kit-pill", inputs: ["removable", "selectable", "selected", "type", "theme", "icon", "iconType"], outputs: ["clicked", "removed"] }, { kind: "component", type: KitCheckboxComponent, selector: "kit-checkbox", inputs: ["label", "disabled", "checked", "readonly", "state", "messageIcon", "messageText", "indeterminate"], outputs: ["changed"] }, { kind: "directive", type: KitTooltipDirective, selector: "[kitTooltip]", inputs: ["kitTooltipPosition", "kitTooltipFilter", "kitTooltipTemplateRef", "kitTooltipVisible", "kitTooltipOffset"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: KitPopupComponent, selector: "kit-popup", inputs: ["anchor", "content", "closeOnOutsideClick", "showFooter", "cancelButtonLabel", "applyButtonLabel", "isApplyButtonDisabled", "positionMode", "popupClass", "closePopupOnCancel", "extraInsideSelectors"], outputs: ["cancelAction", "applyAction", "opened", "closed"] }, { kind: "component", type: KitTextboxComponent, selector: "kit-textbox", inputs: ["placeholder", "label", "labelTooltip", "defaultValue", "messageIcon", "messageText", "messageTemplate", "disabled", "maxlength", "state", "size", "icon", "clearButton", "showStateIcon", "readonly", "customStateIcon", "type"], outputs: ["defaultValueChange", "disabledChange", "blured", "focused", "changed"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14908
14956
|
}
|
|
14909
14957
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: KitFilterCheckboxComponent, decorators: [{
|
|
14910
14958
|
type: Component,
|
|
@@ -14916,13 +14964,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
|
|
|
14916
14964
|
FormsModule,
|
|
14917
14965
|
KitPopupComponent,
|
|
14918
14966
|
KitTextboxComponent,
|
|
14919
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"kit-filter-checkbox\">\n <kit-pill #toggleButton\n [selectable]=\"!filter().readonly\"\n [selected]=\"popup.isPopupOpen\"\n [removable]=\"!filter().readonly &&
|
|
14967
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"kit-filter-checkbox\">\n <kit-pill #toggleButton\n [selectable]=\"!filter().readonly\"\n [selected]=\"popup.isPopupOpen\"\n [removable]=\"!filter().readonly && (filter().removable ?? true)\"\n [theme]=\"filter().readonly && kitPillTheme.BLUE || kitPillTheme.DEFAULT\"\n (removed)=\"removeFilter()\"\n (clicked)=\"onPopupToggle()\">\n {{ filter().title | translate }}:\n @if (allSelected()) {\n <div class=\"kit-filter-checkbox-tooltip\"\n kitTooltip\n kitTooltipFilter=\".kit-filter-checkbox-tooltip\"\n [kitTooltipPosition]=\"kitTooltipPosition.RIGHT\"\n [kitTooltipTemplateRef]=\"tooltipTemplate\">\n {{ 'kit.filters.all' | translate }}\n </div>\n } @else if (displayedValues.length > 1) {\n <div class=\"kit-filter-checkbox-tooltip\"\n kitTooltip\n kitTooltipFilter=\".kit-filter-checkbox-tooltip\"\n [kitTooltipPosition]=\"kitTooltipPosition.RIGHT\"\n [kitTooltipTemplateRef]=\"tooltipTemplate\">\n <span class=\"kit-filter-checkbox-single-item\">{{ displayedValues[0] }}</span>\n <span class=\"kit-filter-checkbox-tooltip-count\">+{{ displayedValues.length - 1 }}</span>\n </div>\n } @else {\n <span class=\"kit-filter-checkbox-single-item\">{{ displayedValues[0] ?? '' }}</span>\n }\n </kit-pill>\n</div>\n\n<kit-popup #popup\n popupClass=\"kit-filter-checkbox-popup\"\n [anchor]=\"anchor()\"\n [content]=\"content\"\n [showFooter]=\"true\"\n [applyButtonLabel]=\"'kit.filters.apply' | translate\"\n [cancelButtonLabel]=\"'kit.filters.clear' | translate\"\n [closePopupOnCancel]=\"false\"\n (applyAction)=\"applyFilter()\"\n (cancelAction)=\"clearAllFilters()\"\n (closed)=\"close()\">\n</kit-popup>\n\n<ng-template #content>\n <div class=\"popup-search\"\n [hidden]=\"!isContentOverflowing && !searchTerm()\">\n <kit-textbox [placeholder]=\"'kit.filters.search' | translate\"\n [size]=\"kitTextboxSize.SMALL\"\n [defaultValue]=\"searchTerm()\"\n (changed)=\"searchTerm.set($event)\"\n ></kit-textbox>\n </div>\n\n <div #popupContent\n class=\"popup-content\">\n @if (!searchTerm()) {\n <kit-checkbox class=\"checkbox-item\"\n [label]=\"'kit.filters.all' | translate\"\n [(ngModel)]=\"allSelected\"\n (changed)=\"toggleAll($event)\">\n </kit-checkbox>\n }\n\n @for (item of visibleItems(); track $index) {\n <kit-checkbox class=\"checkbox-item\"\n [label]=\"buildTranslateKey(item.title) | translate\"\n [(ngModel)]=\"item.checked\"\n (changed)=\"onChange($event, item.value)\"\n ></kit-checkbox>\n }\n\n @if (!visibleItems().length) {\n {{ ('kit.filters.noDataFound' | translate) }}\n }\n </div>\n</ng-template>\n\n<ng-template #tooltipTemplate>\n @for (item of (displayedValues.length > 1 && !allSelected() ? displayedValues.slice(1) : displayedValues); track item) {\n <div class=\"kit-filter-checkbox-tooltip-item\">{{ item }}</div>\n }\n</ng-template>\n", styles: [".kit-filter-checkbox-tooltip{display:flex;align-items:center;gap:3px}.kit-filter-checkbox-tooltip-count{color:var(--ui-kit-color-main)}.kit-filter-checkbox-tooltip-item{color:var(--ui-kit-color-grey-10);font-size:12px;font-weight:500;line-height:20px}.kit-filter-checkbox-single-item{display:block;max-width:180px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}::ng-deep .kit-filter-checkbox-popup .popup-search{margin-bottom:5px;padding-bottom:15px;border-bottom:1px solid var(--ui-kit-color-grey-11)}::ng-deep .kit-filter-checkbox-popup .popup-content{width:172px;max-height:400px;overflow-y:auto}::ng-deep .kit-filter-checkbox-popup .popup-content::-webkit-scrollbar{width:4px;height:4px}::ng-deep .kit-filter-checkbox-popup .popup-content::-webkit-scrollbar-thumb{background-color:var(--ui-kit-color-grey-17);border-radius:2px}::ng-deep .kit-filter-checkbox-popup .popup-content::-webkit-scrollbar-thumb:hover{background-color:var(--ui-kit-color-grey-10)}::ng-deep .kit-filter-checkbox-popup .checkbox-item{display:block;padding:6px 0}\n"] }]
|
|
14920
14968
|
}], ctorParameters: () => [], propDecorators: { filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: true }] }], translateKeyPrefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "translateKeyPrefix", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }, { type: i0.Output, args: ["itemsChange"] }], showPopupOnInit: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPopupOnInit", required: false }] }], guidField: [{ type: i0.Input, args: [{ isSignal: true, alias: "guidField", required: false }] }], filterRemoved: [{ type: i0.Output, args: ["filterRemoved"] }], filterChanged: [{ type: i0.Output, args: ["filterChanged"] }], anchor: [{ type: i0.ViewChild, args: ['toggleButton', { ...{ read: ElementRef }, isSignal: true }] }], popupContent: [{ type: i0.ViewChild, args: ['popupContent', { ...{ read: ElementRef }, isSignal: true }] }], popup: [{ type: i0.ViewChild, args: ['popup', { ...{ read: KitPopupComponent }, isSignal: true }] }] } });
|
|
14921
14969
|
|
|
14922
14970
|
class KitFilterCustomInputComponent {
|
|
14923
14971
|
constructor() {
|
|
14924
14972
|
this.filter = input.required(/* @ts-ignore */
|
|
14925
14973
|
...(ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []));
|
|
14974
|
+
this.showPopupOnInit = input(true, /* @ts-ignore */
|
|
14975
|
+
...(ngDevMode ? [{ debugName: "showPopupOnInit" }] : /* istanbul ignore next */ []));
|
|
14926
14976
|
this.filterRemoved = output();
|
|
14927
14977
|
this.filterChanged = output();
|
|
14928
14978
|
this.anchor = viewChild.required('toggleButton', { ...(ngDevMode ? { debugName: "anchor" } : /* istanbul ignore next */ {}), read: ElementRef });
|
|
@@ -14937,7 +14987,7 @@ class KitFilterCustomInputComponent {
|
|
|
14937
14987
|
}
|
|
14938
14988
|
ngOnInit() {
|
|
14939
14989
|
this.initializeValue();
|
|
14940
|
-
this.
|
|
14990
|
+
this.openPopupOnInit();
|
|
14941
14991
|
}
|
|
14942
14992
|
ngOnDestroy() {
|
|
14943
14993
|
if (this.rafId) {
|
|
@@ -14945,9 +14995,6 @@ class KitFilterCustomInputComponent {
|
|
|
14945
14995
|
this.rafId = null;
|
|
14946
14996
|
}
|
|
14947
14997
|
}
|
|
14948
|
-
get applyButtonDisabled() {
|
|
14949
|
-
return !this.inputValue().trim();
|
|
14950
|
-
}
|
|
14951
14998
|
onValueChange(value) {
|
|
14952
14999
|
this.inputValue.set(value);
|
|
14953
15000
|
}
|
|
@@ -14961,18 +15008,15 @@ class KitFilterCustomInputComponent {
|
|
|
14961
15008
|
close() {
|
|
14962
15009
|
if (this.selectedValue()) {
|
|
14963
15010
|
this.inputValue.set(this.selectedValue());
|
|
15011
|
+
return;
|
|
14964
15012
|
}
|
|
14965
|
-
|
|
14966
|
-
this.removeFilter();
|
|
14967
|
-
}
|
|
15013
|
+
this.inputValue.set(this.selectedValue());
|
|
14968
15014
|
}
|
|
14969
15015
|
clearAllFilters() {
|
|
14970
15016
|
this.inputValue.set('');
|
|
14971
15017
|
}
|
|
14972
15018
|
onEnterKey() {
|
|
14973
|
-
|
|
14974
|
-
this.popup()?.apply();
|
|
14975
|
-
}
|
|
15019
|
+
this.popup()?.apply();
|
|
14976
15020
|
}
|
|
14977
15021
|
applyFilter() {
|
|
14978
15022
|
const value = this.inputValue().trim();
|
|
@@ -14995,16 +15039,17 @@ class KitFilterCustomInputComponent {
|
|
|
14995
15039
|
this.inputValue.set(value);
|
|
14996
15040
|
}
|
|
14997
15041
|
}
|
|
14998
|
-
|
|
14999
|
-
if (!this.selectedValue()) {
|
|
15000
|
-
|
|
15001
|
-
this.rafId = null;
|
|
15002
|
-
this.onPopupToggle();
|
|
15003
|
-
});
|
|
15042
|
+
openPopupOnInit() {
|
|
15043
|
+
if (!this.showPopupOnInit() || this.selectedValue()) {
|
|
15044
|
+
return;
|
|
15004
15045
|
}
|
|
15046
|
+
this.rafId = requestAnimationFrame(() => {
|
|
15047
|
+
this.rafId = null;
|
|
15048
|
+
this.onPopupToggle();
|
|
15049
|
+
});
|
|
15005
15050
|
}
|
|
15006
15051
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: KitFilterCustomInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15007
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.1", type: KitFilterCustomInputComponent, isStandalone: true, selector: "kit-filter-custom-input", inputs: { filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: true, 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: "<kit-pill #toggleButton\n [selectable]=\"!filter().readonly\"\n [selected]=\"popup.isPopupOpen\"\n [removable]=\"!filter().readonly &&
|
|
15052
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.1", type: KitFilterCustomInputComponent, isStandalone: true, selector: "kit-filter-custom-input", inputs: { filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: true, transformFunction: null }, showPopupOnInit: { classPropertyName: "showPopupOnInit", publicName: "showPopupOnInit", 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: "<kit-pill #toggleButton\n [selectable]=\"!filter().readonly\"\n [selected]=\"popup.isPopupOpen\"\n [removable]=\"!filter().readonly && (filter().removable ?? true)\"\n [theme]=\"filter().readonly && kitPillTheme.BLUE || kitPillTheme.DEFAULT\"\n (removed)=\"removeFilter()\"\n (clicked)=\"onPopupToggle()\">\n {{ filter().title | translate }}:\n <kit-truncate-text class=\"kit-custom-input-selected-values\">\n {{ selectedValue() }}\n </kit-truncate-text>\n</kit-pill>\n\n<kit-popup #popup\n popupClass=\"kit-filter-input-popup\"\n [anchor]=\"anchor()\"\n [content]=\"content\"\n [showFooter]=\"true\"\n [applyButtonLabel]=\"'kit.filters.apply' | translate\"\n [cancelButtonLabel]=\"'kit.filters.clear' | translate\"\n [closePopupOnCancel]=\"false\"\n (applyAction)=\"applyFilter()\"\n (cancelAction)=\"clearAllFilters()\"\n (closed)=\"close()\">\n</kit-popup>\n\n<ng-template #content>\n <div class=\"popup-content\">\n <kit-textbox [size]=\"kitTextboxSize.SMALL\"\n [defaultValue]=\"inputValue()\"\n (changed)=\"onValueChange($event)\"\n (keydown.enter)=\"onEnterKey()\"\n ></kit-textbox>\n </div>\n</ng-template>\n", styles: [".kit-custom-input-selected-values{max-width:180px}::ng-deep .kit-filter-input-popup .popup-content{width:296px;box-sizing:border-box}\n"], dependencies: [{ kind: "component", type: KitPillComponent, selector: "kit-pill", inputs: ["removable", "selectable", "selected", "type", "theme", "icon", "iconType"], outputs: ["clicked", "removed"] }, { kind: "component", type: KitPopupComponent, selector: "kit-popup", inputs: ["anchor", "content", "closeOnOutsideClick", "showFooter", "cancelButtonLabel", "applyButtonLabel", "isApplyButtonDisabled", "positionMode", "popupClass", "closePopupOnCancel", "extraInsideSelectors"], outputs: ["cancelAction", "applyAction", "opened", "closed"] }, { kind: "component", type: KitTextboxComponent, selector: "kit-textbox", inputs: ["placeholder", "label", "labelTooltip", "defaultValue", "messageIcon", "messageText", "messageTemplate", "disabled", "maxlength", "state", "size", "icon", "clearButton", "showStateIcon", "readonly", "customStateIcon", "type"], outputs: ["defaultValueChange", "disabledChange", "blured", "focused", "changed"] }, { kind: "component", type: KitTruncateTextComponent, selector: "kit-truncate-text", inputs: ["tooltipText", "lines", "innerHtml"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
15008
15053
|
}
|
|
15009
15054
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: KitFilterCustomInputComponent, decorators: [{
|
|
15010
15055
|
type: Component,
|
|
@@ -15014,14 +15059,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
|
|
|
15014
15059
|
KitTextboxComponent,
|
|
15015
15060
|
TranslatePipe,
|
|
15016
15061
|
KitTruncateTextComponent,
|
|
15017
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<kit-pill #toggleButton\n [selectable]=\"!filter().readonly\"\n [selected]=\"popup.isPopupOpen\"\n [removable]=\"!filter().readonly &&
|
|
15018
|
-
}], propDecorators: { filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: true }] }], filterRemoved: [{ type: i0.Output, args: ["filterRemoved"] }], filterChanged: [{ type: i0.Output, args: ["filterChanged"] }], anchor: [{ type: i0.ViewChild, args: ['toggleButton', { ...{ read: ElementRef }, isSignal: true }] }], popup: [{ type: i0.ViewChild, args: ['popup', { ...{ read: KitPopupComponent }, isSignal: true }] }] } });
|
|
15062
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<kit-pill #toggleButton\n [selectable]=\"!filter().readonly\"\n [selected]=\"popup.isPopupOpen\"\n [removable]=\"!filter().readonly && (filter().removable ?? true)\"\n [theme]=\"filter().readonly && kitPillTheme.BLUE || kitPillTheme.DEFAULT\"\n (removed)=\"removeFilter()\"\n (clicked)=\"onPopupToggle()\">\n {{ filter().title | translate }}:\n <kit-truncate-text class=\"kit-custom-input-selected-values\">\n {{ selectedValue() }}\n </kit-truncate-text>\n</kit-pill>\n\n<kit-popup #popup\n popupClass=\"kit-filter-input-popup\"\n [anchor]=\"anchor()\"\n [content]=\"content\"\n [showFooter]=\"true\"\n [applyButtonLabel]=\"'kit.filters.apply' | translate\"\n [cancelButtonLabel]=\"'kit.filters.clear' | translate\"\n [closePopupOnCancel]=\"false\"\n (applyAction)=\"applyFilter()\"\n (cancelAction)=\"clearAllFilters()\"\n (closed)=\"close()\">\n</kit-popup>\n\n<ng-template #content>\n <div class=\"popup-content\">\n <kit-textbox [size]=\"kitTextboxSize.SMALL\"\n [defaultValue]=\"inputValue()\"\n (changed)=\"onValueChange($event)\"\n (keydown.enter)=\"onEnterKey()\"\n ></kit-textbox>\n </div>\n</ng-template>\n", styles: [".kit-custom-input-selected-values{max-width:180px}::ng-deep .kit-filter-input-popup .popup-content{width:296px;box-sizing:border-box}\n"] }]
|
|
15063
|
+
}], propDecorators: { filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: true }] }], showPopupOnInit: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPopupOnInit", required: false }] }], filterRemoved: [{ type: i0.Output, args: ["filterRemoved"] }], filterChanged: [{ type: i0.Output, args: ["filterChanged"] }], anchor: [{ type: i0.ViewChild, args: ['toggleButton', { ...{ read: ElementRef }, isSignal: true }] }], popup: [{ type: i0.ViewChild, args: ['popup', { ...{ read: KitPopupComponent }, isSignal: true }] }] } });
|
|
15019
15064
|
|
|
15020
15065
|
class KitFilterDateComponent {
|
|
15021
15066
|
constructor() {
|
|
15022
15067
|
this.store = inject(Store);
|
|
15023
15068
|
this.filter = input.required(/* @ts-ignore */
|
|
15024
15069
|
...(ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []));
|
|
15070
|
+
this.showPopupOnInit = input(true, /* @ts-ignore */
|
|
15071
|
+
...(ngDevMode ? [{ debugName: "showPopupOnInit" }] : /* istanbul ignore next */ []));
|
|
15025
15072
|
this.useUserTimeZone = input(false, /* @ts-ignore */
|
|
15026
15073
|
...(ngDevMode ? [{ debugName: "useUserTimeZone" }] : /* istanbul ignore next */ []));
|
|
15027
15074
|
this.useLocalTimeZone = input(false, /* @ts-ignore */
|
|
@@ -15041,7 +15088,7 @@ class KitFilterDateComponent {
|
|
|
15041
15088
|
...(ngDevMode ? [{ debugName: "endDate" }] : /* istanbul ignore next */ []));
|
|
15042
15089
|
this.dateRange = signal(undefined, /* @ts-ignore */
|
|
15043
15090
|
...(ngDevMode ? [{ debugName: "dateRange" }] : /* istanbul ignore next */ []));
|
|
15044
|
-
this.selectedValues = signal(
|
|
15091
|
+
this.selectedValues = signal(null, /* @ts-ignore */
|
|
15045
15092
|
...(ngDevMode ? [{ debugName: "selectedValues" }] : /* istanbul ignore next */ []));
|
|
15046
15093
|
this.pillDateFormat = 'dd/MM/yy';
|
|
15047
15094
|
this.kitPillTheme = KitPillTheme;
|
|
@@ -15100,15 +15147,12 @@ class KitFilterDateComponent {
|
|
|
15100
15147
|
}
|
|
15101
15148
|
ngOnInit() {
|
|
15102
15149
|
this.initializeSelectedValues();
|
|
15103
|
-
this.
|
|
15150
|
+
this.openPopupOnInit();
|
|
15104
15151
|
this.addOutsideClickListener();
|
|
15105
15152
|
}
|
|
15106
15153
|
ngOnDestroy() {
|
|
15107
15154
|
this.removeOutsideClickListener();
|
|
15108
|
-
|
|
15109
|
-
cancelAnimationFrame(this.rafId);
|
|
15110
|
-
this.rafId = null;
|
|
15111
|
-
}
|
|
15155
|
+
this.cancelPendingAnimationFrame();
|
|
15112
15156
|
}
|
|
15113
15157
|
removeFilter() {
|
|
15114
15158
|
this.popup()?.close();
|
|
@@ -15118,14 +15162,15 @@ class KitFilterDateComponent {
|
|
|
15118
15162
|
this.popup()?.toggle();
|
|
15119
15163
|
}
|
|
15120
15164
|
close() {
|
|
15121
|
-
|
|
15122
|
-
|
|
15123
|
-
|
|
15124
|
-
|
|
15125
|
-
|
|
15126
|
-
|
|
15127
|
-
this.endDate.set(endFilter?.value);
|
|
15165
|
+
const selectedValues = this.selectedValues();
|
|
15166
|
+
if (!selectedValues?.start && !selectedValues?.end) {
|
|
15167
|
+
this.startDate.set(undefined);
|
|
15168
|
+
this.endDate.set(undefined);
|
|
15169
|
+
this.dateRange.set(undefined);
|
|
15170
|
+
return;
|
|
15128
15171
|
}
|
|
15172
|
+
this.startDate.set(selectedValues.start);
|
|
15173
|
+
this.endDate.set(selectedValues.end);
|
|
15129
15174
|
}
|
|
15130
15175
|
onFromDateChange(date) {
|
|
15131
15176
|
this.dateRange.set(undefined);
|
|
@@ -15140,12 +15185,7 @@ class KitFilterDateComponent {
|
|
|
15140
15185
|
this.endDate.set(endDate);
|
|
15141
15186
|
}
|
|
15142
15187
|
onEnterKey() {
|
|
15143
|
-
|
|
15144
|
-
this.popup()?.apply();
|
|
15145
|
-
}
|
|
15146
|
-
}
|
|
15147
|
-
applyButtonDisabled() {
|
|
15148
|
-
return !this.startDate() && !this.endDate();
|
|
15188
|
+
this.popup()?.apply();
|
|
15149
15189
|
}
|
|
15150
15190
|
clearAllFilters() {
|
|
15151
15191
|
this.startDate.set(undefined);
|
|
@@ -15183,9 +15223,14 @@ class KitFilterDateComponent {
|
|
|
15183
15223
|
this.endDate.set(endDate);
|
|
15184
15224
|
this.dateRange.set(range);
|
|
15185
15225
|
this.applyFilter();
|
|
15226
|
+
this.popup()?.close();
|
|
15186
15227
|
}
|
|
15187
15228
|
initializeSelectedValues() {
|
|
15188
15229
|
const filterValue = this.filter().value?.filters ?? null;
|
|
15230
|
+
if (!filterValue?.length) {
|
|
15231
|
+
this.selectedValues.set(null);
|
|
15232
|
+
return;
|
|
15233
|
+
}
|
|
15189
15234
|
this.selectedValues.set({
|
|
15190
15235
|
start: filterValue?.[0]?.value,
|
|
15191
15236
|
end: filterValue?.[1]?.value,
|
|
@@ -15194,12 +15239,14 @@ class KitFilterDateComponent {
|
|
|
15194
15239
|
this.endDate.set(this.selectedValues()?.end);
|
|
15195
15240
|
this.dateRange.set(this.filter().value?.dateRange);
|
|
15196
15241
|
}
|
|
15197
|
-
|
|
15198
|
-
if (!this.
|
|
15199
|
-
|
|
15200
|
-
this.onPopupToggle();
|
|
15201
|
-
});
|
|
15242
|
+
openPopupOnInit() {
|
|
15243
|
+
if (!this.showPopupOnInit() || this.selectedValues()) {
|
|
15244
|
+
return;
|
|
15202
15245
|
}
|
|
15246
|
+
this.rafId = requestAnimationFrame(() => {
|
|
15247
|
+
this.rafId = null;
|
|
15248
|
+
this.onPopupToggle();
|
|
15249
|
+
});
|
|
15203
15250
|
}
|
|
15204
15251
|
addOutsideClickListener() {
|
|
15205
15252
|
document.addEventListener('mousedown', this.onDocumentMouseDown, true);
|
|
@@ -15238,8 +15285,15 @@ class KitFilterDateComponent {
|
|
|
15238
15285
|
}
|
|
15239
15286
|
return {};
|
|
15240
15287
|
}
|
|
15288
|
+
cancelPendingAnimationFrame() {
|
|
15289
|
+
if (this.rafId === null) {
|
|
15290
|
+
return;
|
|
15291
|
+
}
|
|
15292
|
+
cancelAnimationFrame(this.rafId);
|
|
15293
|
+
this.rafId = null;
|
|
15294
|
+
}
|
|
15241
15295
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: KitFilterDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15242
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: KitFilterDateComponent, isStandalone: true, selector: "kit-filter-date", inputs: { filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: true, transformFunction: null }, useUserTimeZone: { classPropertyName: "useUserTimeZone", publicName: "useUserTimeZone", isSignal: true, isRequired: false, transformFunction: null }, useLocalTimeZone: { classPropertyName: "useLocalTimeZone", publicName: "useLocalTimeZone", isSignal: true, isRequired: false, transformFunction: null }, dateFilterConstraint: { classPropertyName: "dateFilterConstraint", publicName: "dateFilterConstraint", 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 &&
|
|
15296
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: KitFilterDateComponent, isStandalone: true, selector: "kit-filter-date", inputs: { filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: true, transformFunction: null }, showPopupOnInit: { classPropertyName: "showPopupOnInit", publicName: "showPopupOnInit", isSignal: true, isRequired: false, transformFunction: null }, useUserTimeZone: { classPropertyName: "useUserTimeZone", publicName: "useUserTimeZone", isSignal: true, isRequired: false, transformFunction: null }, useLocalTimeZone: { classPropertyName: "useLocalTimeZone", publicName: "useLocalTimeZone", isSignal: true, isRequired: false, transformFunction: null }, dateFilterConstraint: { classPropertyName: "dateFilterConstraint", publicName: "dateFilterConstraint", 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 && (filter().removable ?? true)\"\n [theme]=\"filter().readonly && kitPillTheme.BLUE || kitPillTheme.DEFAULT\"\n (removed)=\"removeFilter()\"\n (clicked)=\"onPopupToggle()\">\n {{ filter().title | translate }}:\n @if (localStartDate() || localEndDate()) {\n {{ localStartDate() | date: pillDateFormat }}\n @if (localStartDate() && localEndDate()) {\n -\n }\n {{ localEndDate() | date: pillDateFormat }}\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 [closePopupOnCancel]=\"false\"\n (applyAction)=\"applyFilter()\"\n (cancelAction)=\"clearAllFilters()\"\n (closed)=\"close()\">\n</kit-popup>\n\n<ng-template #content>\n <div class=\"popup-actions\">\n <kit-button [kind]=\"kitButtonKind.SMALL\"\n [type]=\"kitButtonType.GHOST\"\n [label]=\"'kit.filters.today' | translate\"\n [active]=\"dateRange() === kitFilterDateRange.TODAY\"\n (clicked)=\"selectDateRange(kitFilterDateRange.TODAY)\" />\n <kit-button [kind]=\"kitButtonKind.SMALL\"\n [type]=\"kitButtonType.GHOST\"\n [label]=\"'kit.filters.yesterday' | translate\"\n [active]=\"dateRange() === kitFilterDateRange.YESTERDAY\"\n (clicked)=\"selectDateRange(kitFilterDateRange.YESTERDAY)\" />\n <kit-button [kind]=\"kitButtonKind.SMALL\"\n [type]=\"kitButtonType.GHOST\"\n [label]=\"'kit.filters.lastWeek' | translate\"\n [active]=\"dateRange() === kitFilterDateRange.LAST_WEEK\"\n (clicked)=\"selectDateRange(kitFilterDateRange.LAST_WEEK)\" />\n <kit-button [kind]=\"kitButtonKind.SMALL\"\n [type]=\"kitButtonType.GHOST\"\n [label]=\"'kit.filters.lastMonth' | translate\"\n [active]=\"dateRange() === kitFilterDateRange.LAST_MONTH\"\n (clicked)=\"selectDateRange(kitFilterDateRange.LAST_MONTH)\" />\n </div>\n <div class=\"popup-content\">\n <div class=\"date-input\">\n <kit-datepicker [placeholder]=\"'kit.filters.chooseDateFrom' | translate\"\n [defaultDate]=\"localStartDate()\"\n [min]=\"minDateConstraint()\"\n [max]=\"localEndDate()\"\n (changed)=\"onFromDateChange($event)\"\n (keydown.enter)=\"onEnterKey()\"\n ></kit-datepicker>\n <kit-datepicker [placeholder]=\"'kit.filters.chooseDateTo' | translate\"\n [defaultDate]=\"localEndDate()\"\n [min]=\"localStartDate()\"\n [max]=\"maxDateConstraint()\"\n (changed)=\"onToDateChange($event)\"\n (keydown.enter)=\"onEnterKey()\"\n ></kit-datepicker>\n </div>\n </div>\n</ng-template>\n", styles: ["::ng-deep .kit-filter-date-popup{min-width:296px}::ng-deep .kit-filter-date-popup .popup-content{box-sizing:border-box}::ng-deep .kit-filter-date-popup .popup-actions{display:flex;justify-content:space-between;gap:8px;margin-bottom:15px}::ng-deep .kit-filter-date-popup .date-input{display:flex;flex-direction:column;width:100%;gap:10px}\n"], dependencies: [{ kind: "component", type: KitPillComponent, selector: "kit-pill", inputs: ["removable", "selectable", "selected", "type", "theme", "icon", "iconType"], outputs: ["clicked", "removed"] }, { kind: "component", type: KitDatepickerComponent, selector: "kit-datepicker", inputs: ["placeholder", "label", "labelTooltip", "defaultDate", "disabled", "format", "min", "max", "messageIcon", "messageText", "size", "readonly"], outputs: ["defaultDateChange", "disabledChange", "changed"] }, { kind: "component", type: KitPopupComponent, selector: "kit-popup", inputs: ["anchor", "content", "closeOnOutsideClick", "showFooter", "cancelButtonLabel", "applyButtonLabel", "isApplyButtonDisabled", "positionMode", "popupClass", "closePopupOnCancel", "extraInsideSelectors"], outputs: ["cancelAction", "applyAction", "opened", "closed"] }, { kind: "component", type: KitButtonComponent, selector: "kit-button", inputs: ["disabled", "label", "type", "icon", "iconType", "kind", "state", "iconPosition", "buttonClass", "active"], outputs: ["clicked"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
15243
15297
|
}
|
|
15244
15298
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: KitFilterDateComponent, decorators: [{
|
|
15245
15299
|
type: Component,
|
|
@@ -15250,14 +15304,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
|
|
|
15250
15304
|
DatePipe,
|
|
15251
15305
|
KitPopupComponent,
|
|
15252
15306
|
KitButtonComponent,
|
|
15253
|
-
], 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 &&
|
|
15254
|
-
}], propDecorators: { filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: true }] }], useUserTimeZone: [{ type: i0.Input, args: [{ isSignal: true, alias: "useUserTimeZone", required: false }] }], useLocalTimeZone: [{ type: i0.Input, args: [{ isSignal: true, alias: "useLocalTimeZone", required: false }] }], dateFilterConstraint: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFilterConstraint", required: false }] }], filterRemoved: [{ type: i0.Output, args: ["filterRemoved"] }], filterChanged: [{ type: i0.Output, args: ["filterChanged"] }], anchor: [{ type: i0.ViewChild, args: ['toggleButton', { ...{ read: ElementRef }, isSignal: true }] }], popup: [{ type: i0.ViewChild, args: ['popup', { ...{ read: KitPopupComponent }, isSignal: true }] }] } });
|
|
15307
|
+
], 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 && (filter().removable ?? true)\"\n [theme]=\"filter().readonly && kitPillTheme.BLUE || kitPillTheme.DEFAULT\"\n (removed)=\"removeFilter()\"\n (clicked)=\"onPopupToggle()\">\n {{ filter().title | translate }}:\n @if (localStartDate() || localEndDate()) {\n {{ localStartDate() | date: pillDateFormat }}\n @if (localStartDate() && localEndDate()) {\n -\n }\n {{ localEndDate() | date: pillDateFormat }}\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 [closePopupOnCancel]=\"false\"\n (applyAction)=\"applyFilter()\"\n (cancelAction)=\"clearAllFilters()\"\n (closed)=\"close()\">\n</kit-popup>\n\n<ng-template #content>\n <div class=\"popup-actions\">\n <kit-button [kind]=\"kitButtonKind.SMALL\"\n [type]=\"kitButtonType.GHOST\"\n [label]=\"'kit.filters.today' | translate\"\n [active]=\"dateRange() === kitFilterDateRange.TODAY\"\n (clicked)=\"selectDateRange(kitFilterDateRange.TODAY)\" />\n <kit-button [kind]=\"kitButtonKind.SMALL\"\n [type]=\"kitButtonType.GHOST\"\n [label]=\"'kit.filters.yesterday' | translate\"\n [active]=\"dateRange() === kitFilterDateRange.YESTERDAY\"\n (clicked)=\"selectDateRange(kitFilterDateRange.YESTERDAY)\" />\n <kit-button [kind]=\"kitButtonKind.SMALL\"\n [type]=\"kitButtonType.GHOST\"\n [label]=\"'kit.filters.lastWeek' | translate\"\n [active]=\"dateRange() === kitFilterDateRange.LAST_WEEK\"\n (clicked)=\"selectDateRange(kitFilterDateRange.LAST_WEEK)\" />\n <kit-button [kind]=\"kitButtonKind.SMALL\"\n [type]=\"kitButtonType.GHOST\"\n [label]=\"'kit.filters.lastMonth' | translate\"\n [active]=\"dateRange() === kitFilterDateRange.LAST_MONTH\"\n (clicked)=\"selectDateRange(kitFilterDateRange.LAST_MONTH)\" />\n </div>\n <div class=\"popup-content\">\n <div class=\"date-input\">\n <kit-datepicker [placeholder]=\"'kit.filters.chooseDateFrom' | translate\"\n [defaultDate]=\"localStartDate()\"\n [min]=\"minDateConstraint()\"\n [max]=\"localEndDate()\"\n (changed)=\"onFromDateChange($event)\"\n (keydown.enter)=\"onEnterKey()\"\n ></kit-datepicker>\n <kit-datepicker [placeholder]=\"'kit.filters.chooseDateTo' | translate\"\n [defaultDate]=\"localEndDate()\"\n [min]=\"localStartDate()\"\n [max]=\"maxDateConstraint()\"\n (changed)=\"onToDateChange($event)\"\n (keydown.enter)=\"onEnterKey()\"\n ></kit-datepicker>\n </div>\n </div>\n</ng-template>\n", styles: ["::ng-deep .kit-filter-date-popup{min-width:296px}::ng-deep .kit-filter-date-popup .popup-content{box-sizing:border-box}::ng-deep .kit-filter-date-popup .popup-actions{display:flex;justify-content:space-between;gap:8px;margin-bottom:15px}::ng-deep .kit-filter-date-popup .date-input{display:flex;flex-direction:column;width:100%;gap:10px}\n"] }]
|
|
15308
|
+
}], propDecorators: { filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: true }] }], showPopupOnInit: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPopupOnInit", required: false }] }], useUserTimeZone: [{ type: i0.Input, args: [{ isSignal: true, alias: "useUserTimeZone", required: false }] }], useLocalTimeZone: [{ type: i0.Input, args: [{ isSignal: true, alias: "useLocalTimeZone", required: false }] }], dateFilterConstraint: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFilterConstraint", required: false }] }], filterRemoved: [{ type: i0.Output, args: ["filterRemoved"] }], filterChanged: [{ type: i0.Output, args: ["filterChanged"] }], anchor: [{ type: i0.ViewChild, args: ['toggleButton', { ...{ read: ElementRef }, isSignal: true }] }], popup: [{ type: i0.ViewChild, args: ['popup', { ...{ read: KitPopupComponent }, isSignal: true }] }] } });
|
|
15255
15309
|
|
|
15256
15310
|
class KitFilterInputComponent {
|
|
15257
15311
|
constructor() {
|
|
15258
15312
|
this.translateService = inject(TranslateService);
|
|
15259
15313
|
this.filter = input.required(/* @ts-ignore */
|
|
15260
15314
|
...(ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []));
|
|
15315
|
+
this.showPopupOnInit = input(true, /* @ts-ignore */
|
|
15316
|
+
...(ngDevMode ? [{ debugName: "showPopupOnInit" }] : /* istanbul ignore next */ []));
|
|
15261
15317
|
this.filterInputType = input.required(/* @ts-ignore */
|
|
15262
15318
|
...(ngDevMode ? [{ debugName: "filterInputType" }] : /* istanbul ignore next */ []));
|
|
15263
15319
|
this.filterRemoved = output();
|
|
@@ -15292,7 +15348,7 @@ class KitFilterInputComponent {
|
|
|
15292
15348
|
}
|
|
15293
15349
|
ngOnInit() {
|
|
15294
15350
|
this.initializeSelectedValues();
|
|
15295
|
-
this.
|
|
15351
|
+
this.openPopupOnInit();
|
|
15296
15352
|
}
|
|
15297
15353
|
ngOnDestroy() {
|
|
15298
15354
|
this.cancelPendingAnimationFrame('popupToggleRafId');
|
|
@@ -15327,10 +15383,9 @@ class KitFilterInputComponent {
|
|
|
15327
15383
|
const selectedValues = this.selectedValues();
|
|
15328
15384
|
if (selectedValues) {
|
|
15329
15385
|
this.filterItems.set(selectedValues);
|
|
15386
|
+
return;
|
|
15330
15387
|
}
|
|
15331
|
-
|
|
15332
|
-
this.applyFilter();
|
|
15333
|
-
}
|
|
15388
|
+
this.resetFiltersItems();
|
|
15334
15389
|
}
|
|
15335
15390
|
clearAllFilters() {
|
|
15336
15391
|
this.resetFiltersItems();
|
|
@@ -15390,13 +15445,14 @@ class KitFilterInputComponent {
|
|
|
15390
15445
|
],
|
|
15391
15446
|
}));
|
|
15392
15447
|
}
|
|
15393
|
-
|
|
15394
|
-
if (!this.selectedValues()) {
|
|
15395
|
-
|
|
15396
|
-
this.popupToggleRafId = null;
|
|
15397
|
-
this.onPopupToggle();
|
|
15398
|
-
});
|
|
15448
|
+
openPopupOnInit() {
|
|
15449
|
+
if (!this.showPopupOnInit() || this.selectedValues()) {
|
|
15450
|
+
return;
|
|
15399
15451
|
}
|
|
15452
|
+
this.popupToggleRafId = requestAnimationFrame(() => {
|
|
15453
|
+
this.popupToggleRafId = null;
|
|
15454
|
+
this.onPopupToggle();
|
|
15455
|
+
});
|
|
15400
15456
|
}
|
|
15401
15457
|
scheduleFocusFirstInput() {
|
|
15402
15458
|
this.cancelPendingAnimationFrame('focusRafId');
|
|
@@ -15449,7 +15505,7 @@ class KitFilterInputComponent {
|
|
|
15449
15505
|
this.focusRafId = null;
|
|
15450
15506
|
}
|
|
15451
15507
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: KitFilterInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15452
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: KitFilterInputComponent, isStandalone: true, selector: "kit-filter-input", inputs: { filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: true, transformFunction: null }, filterInputType: { classPropertyName: "filterInputType", publicName: "filterInputType", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { filterRemoved: "filterRemoved", filterChanged: "filterChanged" }, viewQueries: [{ propertyName: "anchor", first: true, predicate: ["toggleButton"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "textboxComponents", predicate: KitTextboxComponent, descendants: true, isSignal: true }, { propertyName: "numericTextboxComponents", predicate: KitNumericTextboxComponent, descendants: true, isSignal: true }, { propertyName: "popup", first: true, predicate: ["popup"], descendants: true, read: KitPopupComponent, isSignal: true }], ngImport: i0, template: "<kit-pill #toggleButton\n [selectable]=\"!filter().readonly\"\n [selected]=\"popup.isPopupOpen\"\n [removable]=\"!filter().readonly &&
|
|
15508
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: KitFilterInputComponent, isStandalone: true, selector: "kit-filter-input", inputs: { filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: true, transformFunction: null }, showPopupOnInit: { classPropertyName: "showPopupOnInit", publicName: "showPopupOnInit", isSignal: true, isRequired: false, transformFunction: null }, filterInputType: { classPropertyName: "filterInputType", publicName: "filterInputType", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { filterRemoved: "filterRemoved", filterChanged: "filterChanged" }, viewQueries: [{ propertyName: "anchor", first: true, predicate: ["toggleButton"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "textboxComponents", predicate: KitTextboxComponent, descendants: true, isSignal: true }, { propertyName: "numericTextboxComponents", predicate: KitNumericTextboxComponent, descendants: true, isSignal: true }, { propertyName: "popup", first: true, predicate: ["popup"], descendants: true, read: KitPopupComponent, isSignal: true }], ngImport: i0, template: "<kit-pill #toggleButton\n [selectable]=\"!filter().readonly\"\n [selected]=\"popup.isPopupOpen\"\n [removable]=\"!filter().readonly && (filter().removable ?? true)\"\n [theme]=\"filter().readonly && kitPillTheme.BLUE || kitPillTheme.DEFAULT\"\n (removed)=\"removeFilter()\"\n (clicked)=\"onPopupToggle()\">\n {{ filter().title | translate }}:\n @if (selectedValues()?.filters; as selectedFilters) {\n <kit-truncate-text class=\"kit-filter-input-selected-values\">\n @for (filter of selectedFilters; track $index) {\n {{ getSelectedFilterText(filter) }}\n\n @if ($index === 0) {\n {{ getSelectedLogicText(selectedValues()) }}\n }\n }\n </kit-truncate-text>\n }\n</kit-pill>\n\n<kit-popup #popup\n popupClass=\"kit-filter-input-popup\"\n [anchor]=\"anchor()\"\n [content]=\"content\"\n [showFooter]=\"true\"\n [applyButtonLabel]=\"'kit.filters.apply' | translate\"\n [cancelButtonLabel]=\"'kit.filters.clear' | translate\"\n [isApplyButtonDisabled]=\"applyButtonDisabled\"\n [closePopupOnCancel]=\"false\"\n [extraInsideSelectors]=\"['.kit-dropdown-popup']\"\n (opened)=\"onPopupOpened()\"\n (applyAction)=\"applyFilter()\"\n (cancelAction)=\"clearAllFilters()\"\n (closed)=\"close()\">\n</kit-popup>\n\n<ng-template #content>\n <div class=\"popup-content\">\n @for (item of filterItems().filters; track $index) {\n <div class=\"filter-item\">\n <kit-dropdown [items]=\"getFilterOperatorDropdownItems()\"\n [size]=\"kitDropdownSize.SMALL\"\n [selectedItem]=\"$any(item.operator)\"\n (selected)=\"onOperatorSelect($event.value, $index)\"\n ></kit-dropdown>\n <div class=\"filter-controls\">\n @switch (filterInputType()) {\n @case (kitFilterType.TEXT) {\n <kit-textbox class=\"filter-item-value\"\n [size]=\"kitTextboxSize.SMALL\"\n [defaultValue]=\"item.value\"\n [disabled]=\"isFilterValueTextboxDisabled($index)\"\n (changed)=\"onValueChange($event, $index)\"\n (keydown.enter)=\"onEnterKey()\"\n ></kit-textbox>\n }\n @case (kitFilterType.NUMERIC) {\n <kit-numeric-textbox class=\"filter-item-value\"\n format=\"#.###\"\n [size]=\"kitNumericTextboxSize.SMALL\"\n [defaultValue]=\"item.value\"\n [min]=\"0\"\n [max]=\"maxIntegerValue\"\n [disabled]=\"isFilterValueTextboxDisabled($index)\"\n (changed)=\"onValueChange($event, $index)\"\n (keydown.enter)=\"onEnterKey()\"\n ></kit-numeric-textbox>\n }\n }\n @if ($index === 0) {\n <kit-dropdown class=\"logic-selector\"\n [selectedItem]=\"filterItems().logic\"\n [items]=\"filterLogicDropdownItems\"\n [size]=\"kitDropdownSize.SMALL\"\n (selected)=\"onLogicChange($event.value)\"\n ></kit-dropdown>\n }\n </div>\n </div>\n }\n </div>\n</ng-template>\n", styles: [".kit-filter-input-selected-values{max-width:180px}::ng-deep .kit-filter-input-popup .popup-content{display:flex;flex-direction:column;gap:10px;width:296px;box-sizing:border-box}::ng-deep .kit-filter-input-popup .filter-item{display:flex;flex-direction:column;gap:10px}::ng-deep .kit-filter-input-popup .filter-item-value{flex:1}::ng-deep .kit-filter-input-popup .filter-controls{display:flex;gap:10px}::ng-deep .kit-filter-input-popup .logic-selector{flex-shrink:0;width:100px}\n"], dependencies: [{ kind: "component", type: KitDropdownComponent, selector: "kit-dropdown", inputs: ["items", "selectedItem", "label", "disabled", "messageIcon", "messageText", "invalid", "defaultItem", "listHeight", "hideDefaultItem", "toggleIcon", "popupSettings", "isValuePrimitive", "footerTemplate", "noDataTemplate", "readonly", "size"], outputs: ["selectedItemChange", "disabledChange", "selected"] }, { kind: "component", type: KitPillComponent, selector: "kit-pill", inputs: ["removable", "selectable", "selected", "type", "theme", "icon", "iconType"], outputs: ["clicked", "removed"] }, { kind: "component", type: KitPopupComponent, selector: "kit-popup", inputs: ["anchor", "content", "closeOnOutsideClick", "showFooter", "cancelButtonLabel", "applyButtonLabel", "isApplyButtonDisabled", "positionMode", "popupClass", "closePopupOnCancel", "extraInsideSelectors"], outputs: ["cancelAction", "applyAction", "opened", "closed"] }, { kind: "component", type: KitTextboxComponent, selector: "kit-textbox", inputs: ["placeholder", "label", "labelTooltip", "defaultValue", "messageIcon", "messageText", "messageTemplate", "disabled", "maxlength", "state", "size", "icon", "clearButton", "showStateIcon", "readonly", "customStateIcon", "type"], outputs: ["defaultValueChange", "disabledChange", "blured", "focused", "changed"] }, { kind: "component", type: KitNumericTextboxComponent, selector: "kit-numeric-textbox", inputs: ["placeholder", "label", "defaultValue", "decimals", "min", "max", "maxlength", "messageIcon", "messageText", "disabled", "format", "state", "icon", "size", "showStateIcon", "readonly"], outputs: ["defaultValueChange", "disabledChange", "blured", "changed"] }, { kind: "component", type: KitTruncateTextComponent, selector: "kit-truncate-text", inputs: ["tooltipText", "lines", "innerHtml"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
15453
15509
|
}
|
|
15454
15510
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: KitFilterInputComponent, decorators: [{
|
|
15455
15511
|
type: Component,
|
|
@@ -15461,8 +15517,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
|
|
|
15461
15517
|
TranslatePipe,
|
|
15462
15518
|
KitNumericTextboxComponent,
|
|
15463
15519
|
KitTruncateTextComponent,
|
|
15464
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<kit-pill #toggleButton\n [selectable]=\"!filter().readonly\"\n [selected]=\"popup.isPopupOpen\"\n [removable]=\"!filter().readonly &&
|
|
15465
|
-
}], propDecorators: { filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: true }] }], filterInputType: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterInputType", required: true }] }], filterRemoved: [{ type: i0.Output, args: ["filterRemoved"] }], filterChanged: [{ type: i0.Output, args: ["filterChanged"] }], anchor: [{ type: i0.ViewChild, args: ['toggleButton', { ...{ read: ElementRef }, isSignal: true }] }], textboxComponents: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => KitTextboxComponent), { isSignal: true }] }], numericTextboxComponents: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => KitNumericTextboxComponent), { isSignal: true }] }], popup: [{ type: i0.ViewChild, args: ['popup', { ...{ read: KitPopupComponent }, isSignal: true }] }] } });
|
|
15520
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<kit-pill #toggleButton\n [selectable]=\"!filter().readonly\"\n [selected]=\"popup.isPopupOpen\"\n [removable]=\"!filter().readonly && (filter().removable ?? true)\"\n [theme]=\"filter().readonly && kitPillTheme.BLUE || kitPillTheme.DEFAULT\"\n (removed)=\"removeFilter()\"\n (clicked)=\"onPopupToggle()\">\n {{ filter().title | translate }}:\n @if (selectedValues()?.filters; as selectedFilters) {\n <kit-truncate-text class=\"kit-filter-input-selected-values\">\n @for (filter of selectedFilters; track $index) {\n {{ getSelectedFilterText(filter) }}\n\n @if ($index === 0) {\n {{ getSelectedLogicText(selectedValues()) }}\n }\n }\n </kit-truncate-text>\n }\n</kit-pill>\n\n<kit-popup #popup\n popupClass=\"kit-filter-input-popup\"\n [anchor]=\"anchor()\"\n [content]=\"content\"\n [showFooter]=\"true\"\n [applyButtonLabel]=\"'kit.filters.apply' | translate\"\n [cancelButtonLabel]=\"'kit.filters.clear' | translate\"\n [isApplyButtonDisabled]=\"applyButtonDisabled\"\n [closePopupOnCancel]=\"false\"\n [extraInsideSelectors]=\"['.kit-dropdown-popup']\"\n (opened)=\"onPopupOpened()\"\n (applyAction)=\"applyFilter()\"\n (cancelAction)=\"clearAllFilters()\"\n (closed)=\"close()\">\n</kit-popup>\n\n<ng-template #content>\n <div class=\"popup-content\">\n @for (item of filterItems().filters; track $index) {\n <div class=\"filter-item\">\n <kit-dropdown [items]=\"getFilterOperatorDropdownItems()\"\n [size]=\"kitDropdownSize.SMALL\"\n [selectedItem]=\"$any(item.operator)\"\n (selected)=\"onOperatorSelect($event.value, $index)\"\n ></kit-dropdown>\n <div class=\"filter-controls\">\n @switch (filterInputType()) {\n @case (kitFilterType.TEXT) {\n <kit-textbox class=\"filter-item-value\"\n [size]=\"kitTextboxSize.SMALL\"\n [defaultValue]=\"item.value\"\n [disabled]=\"isFilterValueTextboxDisabled($index)\"\n (changed)=\"onValueChange($event, $index)\"\n (keydown.enter)=\"onEnterKey()\"\n ></kit-textbox>\n }\n @case (kitFilterType.NUMERIC) {\n <kit-numeric-textbox class=\"filter-item-value\"\n format=\"#.###\"\n [size]=\"kitNumericTextboxSize.SMALL\"\n [defaultValue]=\"item.value\"\n [min]=\"0\"\n [max]=\"maxIntegerValue\"\n [disabled]=\"isFilterValueTextboxDisabled($index)\"\n (changed)=\"onValueChange($event, $index)\"\n (keydown.enter)=\"onEnterKey()\"\n ></kit-numeric-textbox>\n }\n }\n @if ($index === 0) {\n <kit-dropdown class=\"logic-selector\"\n [selectedItem]=\"filterItems().logic\"\n [items]=\"filterLogicDropdownItems\"\n [size]=\"kitDropdownSize.SMALL\"\n (selected)=\"onLogicChange($event.value)\"\n ></kit-dropdown>\n }\n </div>\n </div>\n }\n </div>\n</ng-template>\n", styles: [".kit-filter-input-selected-values{max-width:180px}::ng-deep .kit-filter-input-popup .popup-content{display:flex;flex-direction:column;gap:10px;width:296px;box-sizing:border-box}::ng-deep .kit-filter-input-popup .filter-item{display:flex;flex-direction:column;gap:10px}::ng-deep .kit-filter-input-popup .filter-item-value{flex:1}::ng-deep .kit-filter-input-popup .filter-controls{display:flex;gap:10px}::ng-deep .kit-filter-input-popup .logic-selector{flex-shrink:0;width:100px}\n"] }]
|
|
15521
|
+
}], propDecorators: { filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: true }] }], showPopupOnInit: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPopupOnInit", required: false }] }], filterInputType: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterInputType", required: true }] }], filterRemoved: [{ type: i0.Output, args: ["filterRemoved"] }], filterChanged: [{ type: i0.Output, args: ["filterChanged"] }], anchor: [{ type: i0.ViewChild, args: ['toggleButton', { ...{ read: ElementRef }, isSignal: true }] }], textboxComponents: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => KitTextboxComponent), { isSignal: true }] }], numericTextboxComponents: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => KitNumericTextboxComponent), { isSignal: true }] }], popup: [{ type: i0.ViewChild, args: ['popup', { ...{ read: KitPopupComponent }, isSignal: true }] }] } });
|
|
15466
15522
|
|
|
15467
15523
|
class KitFilterNullCheckComponent {
|
|
15468
15524
|
constructor() {
|
|
@@ -15489,23 +15545,16 @@ class KitFilterNullCheckComponent {
|
|
|
15489
15545
|
get isPopupOpen() {
|
|
15490
15546
|
return !!this.popup()?.isPopupOpen;
|
|
15491
15547
|
}
|
|
15492
|
-
get displayedValue() {
|
|
15493
|
-
return this.selectedOption()?.label ?? '';
|
|
15494
|
-
}
|
|
15495
15548
|
ngOnInit() {
|
|
15496
15549
|
this.options.set([
|
|
15497
15550
|
{ label: this.nullLabel(), value: KitFilterOperator.IS_NULL, checked: false },
|
|
15498
15551
|
{ label: this.notNullLabel(), value: KitFilterOperator.IS_NOT_NULL, checked: false },
|
|
15499
15552
|
]);
|
|
15500
15553
|
this.initializeSelectedOption();
|
|
15501
|
-
|
|
15502
|
-
this.rafId = requestAnimationFrame(() => {
|
|
15503
|
-
this.onPopupToggle();
|
|
15504
|
-
});
|
|
15505
|
-
}
|
|
15554
|
+
this.openPopupOnInit();
|
|
15506
15555
|
}
|
|
15507
15556
|
ngOnDestroy() {
|
|
15508
|
-
if (this.rafId) {
|
|
15557
|
+
if (this.rafId !== null) {
|
|
15509
15558
|
cancelAnimationFrame(this.rafId);
|
|
15510
15559
|
this.rafId = null;
|
|
15511
15560
|
}
|
|
@@ -15529,15 +15578,21 @@ class KitFilterNullCheckComponent {
|
|
|
15529
15578
|
this.filterChanged.emit(filter);
|
|
15530
15579
|
}
|
|
15531
15580
|
onPopupToggle() {
|
|
15532
|
-
|
|
15581
|
+
this.popup()?.toggle();
|
|
15533
15582
|
}
|
|
15534
15583
|
close() {
|
|
15535
15584
|
if (!this.filter().value && !this.selectedOption()) {
|
|
15536
|
-
this.
|
|
15537
|
-
|
|
15538
|
-
else {
|
|
15539
|
-
this.initializeSelectedOption();
|
|
15585
|
+
this.clearFilter();
|
|
15586
|
+
return;
|
|
15540
15587
|
}
|
|
15588
|
+
this.initializeSelectedOption();
|
|
15589
|
+
}
|
|
15590
|
+
onRadioButtonChange(option) {
|
|
15591
|
+
this.onOptionChange({
|
|
15592
|
+
label: option.label,
|
|
15593
|
+
value: option.value,
|
|
15594
|
+
checked: true,
|
|
15595
|
+
});
|
|
15541
15596
|
}
|
|
15542
15597
|
onOptionChange(option) {
|
|
15543
15598
|
this.selectedOption.set({ ...option, checked: true });
|
|
@@ -15555,8 +15610,17 @@ class KitFilterNullCheckComponent {
|
|
|
15555
15610
|
const option = this.options().find(opt => opt.value === currentFilter.operator);
|
|
15556
15611
|
this.onOptionChange(option ?? this.options()[0]);
|
|
15557
15612
|
}
|
|
15613
|
+
openPopupOnInit() {
|
|
15614
|
+
if (!this.showPopupOnInit() || this.selectedOption()) {
|
|
15615
|
+
return;
|
|
15616
|
+
}
|
|
15617
|
+
this.rafId = requestAnimationFrame(() => {
|
|
15618
|
+
this.rafId = null;
|
|
15619
|
+
this.onPopupToggle();
|
|
15620
|
+
});
|
|
15621
|
+
}
|
|
15558
15622
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: KitFilterNullCheckComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15559
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.1", type: KitFilterNullCheckComponent, isStandalone: true, selector: "kit-filter-null-check", inputs: { filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: true, transformFunction: null }, nullLabel: { classPropertyName: "nullLabel", publicName: "nullLabel", isSignal: true, isRequired: false, transformFunction: null }, notNullLabel: { classPropertyName: "notNullLabel", publicName: "notNullLabel", isSignal: true, isRequired: false, transformFunction: null }, showPopupOnInit: { classPropertyName: "showPopupOnInit", publicName: "showPopupOnInit", isSignal: true, isRequired: false, transformFunction: null }, selectedOption: { classPropertyName: "selectedOption", publicName: "selectedOption", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterRemoved: "filterRemoved", filterChanged: "filterChanged", selectedOption: "selectedOptionChange", options: "optionsChange" }, 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-null\">\n <kit-pill #toggleButton\n [selectable]=\"!filter().readonly\"\n [selected]=\"popup.isPopupOpen\"\n [removable]=\"!filter().readonly &&
|
|
15623
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.1", type: KitFilterNullCheckComponent, isStandalone: true, selector: "kit-filter-null-check", inputs: { filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: true, transformFunction: null }, nullLabel: { classPropertyName: "nullLabel", publicName: "nullLabel", isSignal: true, isRequired: false, transformFunction: null }, notNullLabel: { classPropertyName: "notNullLabel", publicName: "notNullLabel", isSignal: true, isRequired: false, transformFunction: null }, showPopupOnInit: { classPropertyName: "showPopupOnInit", publicName: "showPopupOnInit", isSignal: true, isRequired: false, transformFunction: null }, selectedOption: { classPropertyName: "selectedOption", publicName: "selectedOption", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterRemoved: "filterRemoved", filterChanged: "filterChanged", selectedOption: "selectedOptionChange", options: "optionsChange" }, 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-null\">\n <kit-pill #toggleButton\n [selectable]=\"!filter().readonly\"\n [selected]=\"popup.isPopupOpen\"\n [removable]=\"!filter().readonly && (filter().removable ?? true)\"\n [theme]=\"filter().readonly && kitPillTheme.BLUE || kitPillTheme.DEFAULT\"\n (removed)=\"removeFilter()\"\n (clicked)=\"onPopupToggle()\">\n {{ filter().title | translate }}: {{ selectedOption()?.label }}\n </kit-pill>\n</div>\n\n<kit-popup #popup\n popupClass=\"kit-filter-null-popup\"\n [anchor]=\"anchor()\"\n [content]=\"content\"\n [showFooter]=\"true\"\n [applyButtonLabel]=\"'kit.filters.apply' | translate\"\n [cancelButtonLabel]=\"'kit.filters.clear' | translate\"\n [closePopupOnCancel]=\"false\"\n (applyAction)=\"applyFilter()\"\n (cancelAction)=\"clearFilter()\"\n (closed)=\"close()\">\n</kit-popup>\n\n<ng-template #content>\n <div class=\"popup-content\">\n <kit-radio-button [items]=\"options()\"\n (changed)=\"onRadioButtonChange($event)\"\n ></kit-radio-button>\n </div>\n</ng-template>\n", styles: ["::ng-deep .kit-filter-null-popup .popup-content{width:172px}::ng-deep .kit-filter-null-popup .kit-radio-button .kit-radio-button-items{flex-direction:column;gap:0}\n"], dependencies: [{ kind: "component", type: KitPillComponent, selector: "kit-pill", inputs: ["removable", "selectable", "selected", "type", "theme", "icon", "iconType"], outputs: ["clicked", "removed"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: KitPopupComponent, selector: "kit-popup", inputs: ["anchor", "content", "closeOnOutsideClick", "showFooter", "cancelButtonLabel", "applyButtonLabel", "isApplyButtonDisabled", "positionMode", "popupClass", "closePopupOnCancel", "extraInsideSelectors"], outputs: ["cancelAction", "applyAction", "opened", "closed"] }, { kind: "component", type: KitRadioButtonComponent, selector: "kit-radio-button", inputs: ["items", "label", "name", "readonly", "type", "value", "checked", "icon", "disabled"], outputs: ["checkedChange", "disabledChange", "changed"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
15560
15624
|
}
|
|
15561
15625
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: KitFilterNullCheckComponent, decorators: [{
|
|
15562
15626
|
type: Component,
|
|
@@ -15566,7 +15630,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
|
|
|
15566
15630
|
FormsModule,
|
|
15567
15631
|
KitPopupComponent,
|
|
15568
15632
|
KitRadioButtonComponent,
|
|
15569
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"kit-filter-null\">\n <kit-pill #toggleButton\n [selectable]=\"!filter().readonly\"\n [selected]=\"popup.isPopupOpen\"\n [removable]=\"!filter().readonly &&
|
|
15633
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"kit-filter-null\">\n <kit-pill #toggleButton\n [selectable]=\"!filter().readonly\"\n [selected]=\"popup.isPopupOpen\"\n [removable]=\"!filter().readonly && (filter().removable ?? true)\"\n [theme]=\"filter().readonly && kitPillTheme.BLUE || kitPillTheme.DEFAULT\"\n (removed)=\"removeFilter()\"\n (clicked)=\"onPopupToggle()\">\n {{ filter().title | translate }}: {{ selectedOption()?.label }}\n </kit-pill>\n</div>\n\n<kit-popup #popup\n popupClass=\"kit-filter-null-popup\"\n [anchor]=\"anchor()\"\n [content]=\"content\"\n [showFooter]=\"true\"\n [applyButtonLabel]=\"'kit.filters.apply' | translate\"\n [cancelButtonLabel]=\"'kit.filters.clear' | translate\"\n [closePopupOnCancel]=\"false\"\n (applyAction)=\"applyFilter()\"\n (cancelAction)=\"clearFilter()\"\n (closed)=\"close()\">\n</kit-popup>\n\n<ng-template #content>\n <div class=\"popup-content\">\n <kit-radio-button [items]=\"options()\"\n (changed)=\"onRadioButtonChange($event)\"\n ></kit-radio-button>\n </div>\n</ng-template>\n", styles: ["::ng-deep .kit-filter-null-popup .popup-content{width:172px}::ng-deep .kit-filter-null-popup .kit-radio-button .kit-radio-button-items{flex-direction:column;gap:0}\n"] }]
|
|
15570
15634
|
}], propDecorators: { filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: true }] }], nullLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "nullLabel", required: false }] }], notNullLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "notNullLabel", required: false }] }], showPopupOnInit: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPopupOnInit", required: false }] }], filterRemoved: [{ type: i0.Output, args: ["filterRemoved"] }], filterChanged: [{ type: i0.Output, args: ["filterChanged"] }], anchor: [{ type: i0.ViewChild, args: ['toggleButton', { ...{ read: ElementRef }, isSignal: true }] }], popup: [{ type: i0.ViewChild, args: ['popup', { ...{ read: KitPopupComponent }, isSignal: true }] }], selectedOption: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedOption", required: false }] }, { type: i0.Output, args: ["selectedOptionChange"] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }, { type: i0.Output, args: ["optionsChange"] }] } });
|
|
15571
15635
|
|
|
15572
15636
|
class KitFilterRadioComponent {
|
|
@@ -15578,6 +15642,8 @@ class KitFilterRadioComponent {
|
|
|
15578
15642
|
...(ngDevMode ? [{ debugName: "translateKeyPrefix" }] : /* istanbul ignore next */ []));
|
|
15579
15643
|
this.items = model([], /* @ts-ignore */
|
|
15580
15644
|
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
15645
|
+
this.showPopupOnInit = input(true, /* @ts-ignore */
|
|
15646
|
+
...(ngDevMode ? [{ debugName: "showPopupOnInit" }] : /* istanbul ignore next */ []));
|
|
15581
15647
|
this.filterRemoved = output();
|
|
15582
15648
|
this.filterChanged = output();
|
|
15583
15649
|
this.anchor = viewChild.required('toggleButton', { ...(ngDevMode ? { debugName: "anchor" } : /* istanbul ignore next */ {}), read: ElementRef });
|
|
@@ -15587,11 +15653,18 @@ class KitFilterRadioComponent {
|
|
|
15587
15653
|
this.radioButtonValue = signal(null, /* @ts-ignore */
|
|
15588
15654
|
...(ngDevMode ? [{ debugName: "radioButtonValue" }] : /* istanbul ignore next */ []));
|
|
15589
15655
|
this.kitPillTheme = KitPillTheme;
|
|
15656
|
+
this.popupToggleRafId = null;
|
|
15590
15657
|
}
|
|
15591
15658
|
ngOnInit() {
|
|
15592
15659
|
this.initializeSelectedValue();
|
|
15593
15660
|
this.updateItemsState();
|
|
15594
|
-
this.
|
|
15661
|
+
this.openPopupOnInit();
|
|
15662
|
+
}
|
|
15663
|
+
ngOnDestroy() {
|
|
15664
|
+
if (this.popupToggleRafId !== null) {
|
|
15665
|
+
cancelAnimationFrame(this.popupToggleRafId);
|
|
15666
|
+
this.popupToggleRafId = null;
|
|
15667
|
+
}
|
|
15595
15668
|
}
|
|
15596
15669
|
get selectedFilterValue() {
|
|
15597
15670
|
return this.selectedValue()?.filters[0].value;
|
|
@@ -15613,10 +15686,10 @@ class KitFilterRadioComponent {
|
|
|
15613
15686
|
const selectedValue = this.selectedValue();
|
|
15614
15687
|
if (selectedValue) {
|
|
15615
15688
|
this.updateItemsState();
|
|
15689
|
+
return;
|
|
15616
15690
|
}
|
|
15617
|
-
|
|
15618
|
-
|
|
15619
|
-
}
|
|
15691
|
+
this.radioButtonValue.set(null);
|
|
15692
|
+
this.clearAllFilters();
|
|
15620
15693
|
}
|
|
15621
15694
|
applyFilter() {
|
|
15622
15695
|
const filterValue = {
|
|
@@ -15675,13 +15748,17 @@ class KitFilterRadioComponent {
|
|
|
15675
15748
|
checked: this.selectedFilterValue === item.value,
|
|
15676
15749
|
})));
|
|
15677
15750
|
}
|
|
15678
|
-
|
|
15679
|
-
if (!this.selectedValue()) {
|
|
15680
|
-
|
|
15751
|
+
openPopupOnInit() {
|
|
15752
|
+
if (!this.showPopupOnInit() || this.selectedValue()) {
|
|
15753
|
+
return;
|
|
15681
15754
|
}
|
|
15755
|
+
this.popupToggleRafId = requestAnimationFrame(() => {
|
|
15756
|
+
this.popupToggleRafId = null;
|
|
15757
|
+
this.onPopupToggle();
|
|
15758
|
+
});
|
|
15682
15759
|
}
|
|
15683
15760
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: KitFilterRadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15684
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: KitFilterRadioComponent, isStandalone: true, selector: "kit-filter-radio", inputs: { filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: true, transformFunction: null }, translateKeyPrefix: { classPropertyName: "translateKeyPrefix", publicName: "translateKeyPrefix", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { items: "itemsChange", 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-radio\">\n <kit-pill #toggleButton\n [selectable]=\"!filter().readonly\"\n [selected]=\"popup.isPopupOpen\"\n [removable]=\"!filter().readonly &&
|
|
15761
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: KitFilterRadioComponent, isStandalone: true, selector: "kit-filter-radio", inputs: { filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: true, transformFunction: null }, translateKeyPrefix: { classPropertyName: "translateKeyPrefix", publicName: "translateKeyPrefix", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, showPopupOnInit: { classPropertyName: "showPopupOnInit", publicName: "showPopupOnInit", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { items: "itemsChange", 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-radio\">\n <kit-pill #toggleButton\n [selectable]=\"!filter().readonly\"\n [selected]=\"popup.isPopupOpen\"\n [removable]=\"!filter().readonly && (filter().removable ?? true)\"\n [theme]=\"filter().readonly && kitPillTheme.BLUE || kitPillTheme.DEFAULT\"\n (removed)=\"removeFilter()\"\n (clicked)=\"onPopupToggle()\">\n {{ filter().title | translate }}:\n @if (hasSelectedFilters(selectedFilterValue)) {\n <kit-truncate-text class=\"kit-filter-radio-selected-values\">\n {{ getSelectedFilterText(selectedFilterValue) | translate }}\n </kit-truncate-text>\n }\n </kit-pill>\n</div>\n\n<kit-popup #popup\n popupClass=\"kit-filter-radio-popup\"\n [anchor]=\"anchor()\"\n [content]=\"content\"\n [showFooter]=\"true\"\n [applyButtonLabel]=\"'kit.filters.apply' | translate\"\n [cancelButtonLabel]=\"'kit.filters.clear' | translate\"\n [closePopupOnCancel]=\"false\"\n (applyAction)=\"applyFilter()\"\n (cancelAction)=\"clearAllFilters()\"\n (closed)=\"close()\">\n</kit-popup>\n\n<ng-template #content>\n <div class=\"popup-content\">\n <kit-radio-button [items]=\"buildRadioButtonItems(items())\"\n (changed)=\"onRadioButtonChange($event)\"\n ></kit-radio-button>\n </div>\n</ng-template>\n", styles: [".kit-filter-radio-selected-values{max-width:180px}::ng-deep .kit-filter-radio-popup .popup-content{width:172px;max-height:400px;overflow-y:auto}::ng-deep .kit-filter-radio-popup .kit-radio-button .kit-radio-button-items{flex-direction:column;gap:0}\n"], dependencies: [{ kind: "component", type: KitPillComponent, selector: "kit-pill", inputs: ["removable", "selectable", "selected", "type", "theme", "icon", "iconType"], outputs: ["clicked", "removed"] }, { kind: "component", type: KitPopupComponent, selector: "kit-popup", inputs: ["anchor", "content", "closeOnOutsideClick", "showFooter", "cancelButtonLabel", "applyButtonLabel", "isApplyButtonDisabled", "positionMode", "popupClass", "closePopupOnCancel", "extraInsideSelectors"], outputs: ["cancelAction", "applyAction", "opened", "closed"] }, { kind: "component", type: KitRadioButtonComponent, selector: "kit-radio-button", inputs: ["items", "label", "name", "readonly", "type", "value", "checked", "icon", "disabled"], outputs: ["checkedChange", "disabledChange", "changed"] }, { kind: "component", type: KitTruncateTextComponent, selector: "kit-truncate-text", inputs: ["tooltipText", "lines", "innerHtml"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
15685
15762
|
}
|
|
15686
15763
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: KitFilterRadioComponent, decorators: [{
|
|
15687
15764
|
type: Component,
|
|
@@ -15691,8 +15768,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
|
|
|
15691
15768
|
KitPopupComponent,
|
|
15692
15769
|
KitRadioButtonComponent,
|
|
15693
15770
|
KitTruncateTextComponent,
|
|
15694
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"kit-filter-radio\">\n <kit-pill #toggleButton\n [selectable]=\"!filter().readonly\"\n [selected]=\"popup.isPopupOpen\"\n [removable]=\"!filter().readonly &&
|
|
15695
|
-
}], propDecorators: { filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: true }] }], translateKeyPrefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "translateKeyPrefix", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }, { type: i0.Output, args: ["itemsChange"] }], filterRemoved: [{ type: i0.Output, args: ["filterRemoved"] }], filterChanged: [{ type: i0.Output, args: ["filterChanged"] }], anchor: [{ type: i0.ViewChild, args: ['toggleButton', { ...{ read: ElementRef }, isSignal: true }] }], popup: [{ type: i0.ViewChild, args: ['popup', { ...{ read: KitPopupComponent }, isSignal: true }] }] } });
|
|
15771
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"kit-filter-radio\">\n <kit-pill #toggleButton\n [selectable]=\"!filter().readonly\"\n [selected]=\"popup.isPopupOpen\"\n [removable]=\"!filter().readonly && (filter().removable ?? true)\"\n [theme]=\"filter().readonly && kitPillTheme.BLUE || kitPillTheme.DEFAULT\"\n (removed)=\"removeFilter()\"\n (clicked)=\"onPopupToggle()\">\n {{ filter().title | translate }}:\n @if (hasSelectedFilters(selectedFilterValue)) {\n <kit-truncate-text class=\"kit-filter-radio-selected-values\">\n {{ getSelectedFilterText(selectedFilterValue) | translate }}\n </kit-truncate-text>\n }\n </kit-pill>\n</div>\n\n<kit-popup #popup\n popupClass=\"kit-filter-radio-popup\"\n [anchor]=\"anchor()\"\n [content]=\"content\"\n [showFooter]=\"true\"\n [applyButtonLabel]=\"'kit.filters.apply' | translate\"\n [cancelButtonLabel]=\"'kit.filters.clear' | translate\"\n [closePopupOnCancel]=\"false\"\n (applyAction)=\"applyFilter()\"\n (cancelAction)=\"clearAllFilters()\"\n (closed)=\"close()\">\n</kit-popup>\n\n<ng-template #content>\n <div class=\"popup-content\">\n <kit-radio-button [items]=\"buildRadioButtonItems(items())\"\n (changed)=\"onRadioButtonChange($event)\"\n ></kit-radio-button>\n </div>\n</ng-template>\n", styles: [".kit-filter-radio-selected-values{max-width:180px}::ng-deep .kit-filter-radio-popup .popup-content{width:172px;max-height:400px;overflow-y:auto}::ng-deep .kit-filter-radio-popup .kit-radio-button .kit-radio-button-items{flex-direction:column;gap:0}\n"] }]
|
|
15772
|
+
}], propDecorators: { filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: true }] }], translateKeyPrefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "translateKeyPrefix", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }, { type: i0.Output, args: ["itemsChange"] }], showPopupOnInit: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPopupOnInit", required: false }] }], filterRemoved: [{ type: i0.Output, args: ["filterRemoved"] }], filterChanged: [{ type: i0.Output, args: ["filterChanged"] }], anchor: [{ type: i0.ViewChild, args: ['toggleButton', { ...{ read: ElementRef }, isSignal: true }] }], popup: [{ type: i0.ViewChild, args: ['popup', { ...{ read: KitPopupComponent }, isSignal: true }] }] } });
|
|
15696
15773
|
|
|
15697
15774
|
class KitFilterSelectorComponent {
|
|
15698
15775
|
constructor() {
|
|
@@ -15758,14 +15835,20 @@ class KitGridFiltersComponent {
|
|
|
15758
15835
|
.filter(item => !this.excludedColumns().includes(item.field))
|
|
15759
15836
|
.map(item => this.buildFilterSelectorItem(item, this.filters())), /* @ts-ignore */
|
|
15760
15837
|
...(ngDevMode ? [{ debugName: "filterSelectorItems" }] : /* istanbul ignore next */ []));
|
|
15838
|
+
this.filterToAutoOpen = signal(null, /* @ts-ignore */
|
|
15839
|
+
...(ngDevMode ? [{ debugName: "filterToAutoOpen" }] : /* istanbul ignore next */ []));
|
|
15761
15840
|
}
|
|
15762
15841
|
addFilter(item) {
|
|
15842
|
+
this.filterToAutoOpen.set(item.field);
|
|
15763
15843
|
this.store.dispatch(new AddGridFilter({
|
|
15764
15844
|
title: item.title,
|
|
15765
15845
|
field: item.field,
|
|
15766
15846
|
type: item.filterType,
|
|
15767
15847
|
value: null,
|
|
15768
|
-
}))
|
|
15848
|
+
})).subscribe(() => {
|
|
15849
|
+
this.kitGridUrlStateService.replaceGridStateInUrl(this.store.selectSnapshot(KIT_GRID_STATE_TOKEN));
|
|
15850
|
+
});
|
|
15851
|
+
requestAnimationFrame(() => this.filterToAutoOpen.set(null));
|
|
15769
15852
|
}
|
|
15770
15853
|
removeFilter(field) {
|
|
15771
15854
|
this.store.dispatch(new RemoveGridFilter(field)).subscribe(() => {
|
|
@@ -15809,7 +15892,7 @@ class KitGridFiltersComponent {
|
|
|
15809
15892
|
return filters.some(filter => filter.field === item.field || filter.field === item.apiField);
|
|
15810
15893
|
}
|
|
15811
15894
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: KitGridFiltersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15812
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: KitGridFiltersComponent, isStandalone: true, selector: "kit-grid-filters", inputs: { excludedColumns: { classPropertyName: "excludedColumns", publicName: "excludedColumns", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, filterListConfig: { classPropertyName: "filterListConfig", publicName: "filterListConfig", isSignal: true, isRequired: true, transformFunction: null }, useLocalTimeZone: { classPropertyName: "useLocalTimeZone", publicName: "useLocalTimeZone", isSignal: true, isRequired: false, transformFunction: null }, nullLabel: { classPropertyName: "nullLabel", publicName: "nullLabel", isSignal: true, isRequired: false, transformFunction: null }, notNullLabel: { classPropertyName: "notNullLabel", publicName: "notNullLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterChanged: "filterChanged" }, ngImport: i0, template: "<div class=\"kit-grid-filters\">\n @for (item of filters(); track item) {\n @switch (item.type) {\n @case (kitFilterType.CHECKBOX) {\n <kit-filter-checkbox [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [translateKeyPrefix]=\"filterListConfig()[item.field].translateKeyPrefix\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-checkbox>\n }\n @case (kitFilterType.GUID) {\n <kit-filter-checkbox [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [guidField]=\"filterListConfig()[item.field].guidField\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-checkbox>\n }\n @case (kitFilterType.RADIO) {\n <kit-filter-radio [filter]=\"item\"\n [items]=\"filterListConfig()?.[item.field].items\"\n [translateKeyPrefix]=\"filterListConfig()?.[item.field].translateKeyPrefix\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-radio>\n }\n @case (kitFilterType.DATE) {\n <kit-filter-date [filter]=\"item\"\n [useLocalTimeZone]=\"useLocalTimeZone() || isLocalDateColumn(item)\"\n [useUserTimeZone]=\"useUserTimeZone(item)\"\n [dateFilterConstraint]=\"getDateFilterConstraint(item)\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-date>\n }\n @case (kitFilterType.TEXT) {\n <kit-filter-input [filterInputType]=\"kitFilterType.TEXT\"\n [filter]=\"item\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-input>\n }\n @case (kitFilterType.NUMERIC) {\n <kit-filter-input [filterInputType]=\"kitFilterType.NUMERIC\"\n [filter]=\"item\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-input>\n }\n @case (kitFilterType.NULL) {\n <kit-filter-null-check [filter]=\"item\"\n [nullLabel]=\"nullLabel()\"\n [notNullLabel]=\"notNullLabel()\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-null-check>\n }\n @case (kitFilterType.CUSTOM_INPUT) {\n <kit-filter-custom-input [filter]=\"item\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-custom-input>\n }\n }\n }\n\n <kit-filter-selector [items]=\"filterSelectorItems()\"\n (itemSelected)=\"addFilter($event)\"\n ></kit-filter-selector>\n</div>\n", styles: [".kit-grid-filters{display:flex;flex-wrap:wrap;gap:10px}::ng-deep .kit-pill-content{white-space:nowrap}\n"], dependencies: [{ kind: "component", type: KitFilterSelectorComponent, selector: "kit-filter-selector", inputs: ["items"], outputs: ["itemSelected"] }, { kind: "component", type: KitFilterCheckboxComponent, selector: "kit-filter-checkbox", inputs: ["filter", "translateKeyPrefix", "items", "showPopupOnInit", "guidField"], outputs: ["itemsChange", "filterRemoved", "filterChanged"] }, { kind: "component", type: KitFilterDateComponent, selector: "kit-filter-date", inputs: ["filter", "useUserTimeZone", "useLocalTimeZone", "dateFilterConstraint"], outputs: ["filterRemoved", "filterChanged"] }, { kind: "component", type: KitFilterRadioComponent, selector: "kit-filter-radio", inputs: ["filter", "translateKeyPrefix", "items"], outputs: ["itemsChange", "filterRemoved", "filterChanged"] }, { kind: "component", type: KitFilterInputComponent, selector: "kit-filter-input", inputs: ["filter", "filterInputType"], outputs: ["filterRemoved", "filterChanged"] }, { kind: "component", type: KitFilterNullCheckComponent, selector: "kit-filter-null-check", inputs: ["filter", "nullLabel", "notNullLabel", "showPopupOnInit", "selectedOption", "options"], outputs: ["filterRemoved", "filterChanged", "selectedOptionChange", "optionsChange"] }, { kind: "component", type: KitFilterCustomInputComponent, selector: "kit-filter-custom-input", inputs: ["filter"], outputs: ["filterRemoved", "filterChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
15895
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: KitGridFiltersComponent, isStandalone: true, selector: "kit-grid-filters", inputs: { excludedColumns: { classPropertyName: "excludedColumns", publicName: "excludedColumns", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, filterListConfig: { classPropertyName: "filterListConfig", publicName: "filterListConfig", isSignal: true, isRequired: true, transformFunction: null }, useLocalTimeZone: { classPropertyName: "useLocalTimeZone", publicName: "useLocalTimeZone", isSignal: true, isRequired: false, transformFunction: null }, nullLabel: { classPropertyName: "nullLabel", publicName: "nullLabel", isSignal: true, isRequired: false, transformFunction: null }, notNullLabel: { classPropertyName: "notNullLabel", publicName: "notNullLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterChanged: "filterChanged" }, ngImport: i0, template: "<div class=\"kit-grid-filters\">\n @for (item of filters(); track item.field) {\n @switch (item.type) {\n @case (kitFilterType.CHECKBOX) {\n <kit-filter-checkbox [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [translateKeyPrefix]=\"filterListConfig()[item.field].translateKeyPrefix\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-checkbox>\n }\n @case (kitFilterType.GUID) {\n <kit-filter-checkbox [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [guidField]=\"filterListConfig()[item.field].guidField ?? ''\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-checkbox>\n }\n @case (kitFilterType.RADIO) {\n <kit-filter-radio [filter]=\"item\"\n [items]=\"filterListConfig()?.[item.field].items\"\n [translateKeyPrefix]=\"filterListConfig()?.[item.field].translateKeyPrefix\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-radio>\n }\n @case (kitFilterType.DATE) {\n <kit-filter-date [filter]=\"item\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n [useLocalTimeZone]=\"useLocalTimeZone() || isLocalDateColumn(item)\"\n [useUserTimeZone]=\"useUserTimeZone(item)\"\n [dateFilterConstraint]=\"getDateFilterConstraint(item)\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-date>\n }\n @case (kitFilterType.TEXT) {\n <kit-filter-input [filterInputType]=\"kitFilterType.TEXT\"\n [filter]=\"item\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-input>\n }\n @case (kitFilterType.NUMERIC) {\n <kit-filter-input [filterInputType]=\"kitFilterType.NUMERIC\"\n [filter]=\"item\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-input>\n }\n @case (kitFilterType.NULL) {\n <kit-filter-null-check [filter]=\"item\"\n [nullLabel]=\"nullLabel()\"\n [notNullLabel]=\"notNullLabel()\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-null-check>\n }\n @case (kitFilterType.CUSTOM_INPUT) {\n <kit-filter-custom-input [filter]=\"item\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-custom-input>\n }\n }\n }\n\n <kit-filter-selector [items]=\"filterSelectorItems()\"\n (itemSelected)=\"addFilter($event)\"\n ></kit-filter-selector>\n</div>\n", styles: [".kit-grid-filters{display:flex;flex-wrap:wrap;gap:10px}::ng-deep .kit-pill-content{white-space:nowrap}\n"], dependencies: [{ kind: "component", type: KitFilterSelectorComponent, selector: "kit-filter-selector", inputs: ["items"], outputs: ["itemSelected"] }, { kind: "component", type: KitFilterCheckboxComponent, selector: "kit-filter-checkbox", inputs: ["filter", "translateKeyPrefix", "items", "showPopupOnInit", "guidField"], outputs: ["itemsChange", "filterRemoved", "filterChanged"] }, { kind: "component", type: KitFilterDateComponent, selector: "kit-filter-date", inputs: ["filter", "showPopupOnInit", "useUserTimeZone", "useLocalTimeZone", "dateFilterConstraint"], outputs: ["filterRemoved", "filterChanged"] }, { kind: "component", type: KitFilterRadioComponent, selector: "kit-filter-radio", inputs: ["filter", "translateKeyPrefix", "items", "showPopupOnInit"], outputs: ["itemsChange", "filterRemoved", "filterChanged"] }, { kind: "component", type: KitFilterInputComponent, selector: "kit-filter-input", inputs: ["filter", "showPopupOnInit", "filterInputType"], outputs: ["filterRemoved", "filterChanged"] }, { kind: "component", type: KitFilterNullCheckComponent, selector: "kit-filter-null-check", inputs: ["filter", "nullLabel", "notNullLabel", "showPopupOnInit", "selectedOption", "options"], outputs: ["filterRemoved", "filterChanged", "selectedOptionChange", "optionsChange"] }, { kind: "component", type: KitFilterCustomInputComponent, selector: "kit-filter-custom-input", inputs: ["filter", "showPopupOnInit"], outputs: ["filterRemoved", "filterChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
15813
15896
|
}
|
|
15814
15897
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: KitGridFiltersComponent, decorators: [{
|
|
15815
15898
|
type: Component,
|
|
@@ -15821,7 +15904,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
|
|
|
15821
15904
|
KitFilterInputComponent,
|
|
15822
15905
|
KitFilterNullCheckComponent,
|
|
15823
15906
|
KitFilterCustomInputComponent,
|
|
15824
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"kit-grid-filters\">\n @for (item of filters(); track item) {\n @switch (item.type) {\n @case (kitFilterType.CHECKBOX) {\n <kit-filter-checkbox [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [translateKeyPrefix]=\"filterListConfig()[item.field].translateKeyPrefix\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-checkbox>\n }\n @case (kitFilterType.GUID) {\n <kit-filter-checkbox [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [guidField]=\"filterListConfig()[item.field].guidField\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-checkbox>\n }\n @case (kitFilterType.RADIO) {\n <kit-filter-radio [filter]=\"item\"\n [items]=\"filterListConfig()?.[item.field].items\"\n [translateKeyPrefix]=\"filterListConfig()?.[item.field].translateKeyPrefix\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-radio>\n }\n @case (kitFilterType.DATE) {\n <kit-filter-date [filter]=\"item\"\n [useLocalTimeZone]=\"useLocalTimeZone() || isLocalDateColumn(item)\"\n [useUserTimeZone]=\"useUserTimeZone(item)\"\n [dateFilterConstraint]=\"getDateFilterConstraint(item)\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-date>\n }\n @case (kitFilterType.TEXT) {\n <kit-filter-input [filterInputType]=\"kitFilterType.TEXT\"\n [filter]=\"item\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-input>\n }\n @case (kitFilterType.NUMERIC) {\n <kit-filter-input [filterInputType]=\"kitFilterType.NUMERIC\"\n [filter]=\"item\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-input>\n }\n @case (kitFilterType.NULL) {\n <kit-filter-null-check [filter]=\"item\"\n [nullLabel]=\"nullLabel()\"\n [notNullLabel]=\"notNullLabel()\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-null-check>\n }\n @case (kitFilterType.CUSTOM_INPUT) {\n <kit-filter-custom-input [filter]=\"item\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-custom-input>\n }\n }\n }\n\n <kit-filter-selector [items]=\"filterSelectorItems()\"\n (itemSelected)=\"addFilter($event)\"\n ></kit-filter-selector>\n</div>\n", styles: [".kit-grid-filters{display:flex;flex-wrap:wrap;gap:10px}::ng-deep .kit-pill-content{white-space:nowrap}\n"] }]
|
|
15907
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"kit-grid-filters\">\n @for (item of filters(); track item.field) {\n @switch (item.type) {\n @case (kitFilterType.CHECKBOX) {\n <kit-filter-checkbox [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [translateKeyPrefix]=\"filterListConfig()[item.field].translateKeyPrefix\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-checkbox>\n }\n @case (kitFilterType.GUID) {\n <kit-filter-checkbox [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [guidField]=\"filterListConfig()[item.field].guidField ?? ''\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-checkbox>\n }\n @case (kitFilterType.RADIO) {\n <kit-filter-radio [filter]=\"item\"\n [items]=\"filterListConfig()?.[item.field].items\"\n [translateKeyPrefix]=\"filterListConfig()?.[item.field].translateKeyPrefix\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-radio>\n }\n @case (kitFilterType.DATE) {\n <kit-filter-date [filter]=\"item\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n [useLocalTimeZone]=\"useLocalTimeZone() || isLocalDateColumn(item)\"\n [useUserTimeZone]=\"useUserTimeZone(item)\"\n [dateFilterConstraint]=\"getDateFilterConstraint(item)\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-date>\n }\n @case (kitFilterType.TEXT) {\n <kit-filter-input [filterInputType]=\"kitFilterType.TEXT\"\n [filter]=\"item\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-input>\n }\n @case (kitFilterType.NUMERIC) {\n <kit-filter-input [filterInputType]=\"kitFilterType.NUMERIC\"\n [filter]=\"item\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-input>\n }\n @case (kitFilterType.NULL) {\n <kit-filter-null-check [filter]=\"item\"\n [nullLabel]=\"nullLabel()\"\n [notNullLabel]=\"notNullLabel()\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-null-check>\n }\n @case (kitFilterType.CUSTOM_INPUT) {\n <kit-filter-custom-input [filter]=\"item\"\n [showPopupOnInit]=\"filterToAutoOpen() === item.field\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-custom-input>\n }\n }\n }\n\n <kit-filter-selector [items]=\"filterSelectorItems()\"\n (itemSelected)=\"addFilter($event)\"\n ></kit-filter-selector>\n</div>\n", styles: [".kit-grid-filters{display:flex;flex-wrap:wrap;gap:10px}::ng-deep .kit-pill-content{white-space:nowrap}\n"] }]
|
|
15825
15908
|
}], propDecorators: { excludedColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "excludedColumns", required: true }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], filterListConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterListConfig", required: true }] }], useLocalTimeZone: [{ type: i0.Input, args: [{ isSignal: true, alias: "useLocalTimeZone", required: false }] }], nullLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "nullLabel", required: false }] }], notNullLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "notNullLabel", required: false }] }], filterChanged: [{ type: i0.Output, args: ["filterChanged"] }] } });
|
|
15826
15909
|
|
|
15827
15910
|
class KitGridFiltersToggleComponent {
|