@indigina/ui-kit 1.1.512 → 1.1.513
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.
|
@@ -9103,52 +9103,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
9103
9103
|
type: Injectable
|
|
9104
9104
|
}], propDecorators: { setGridSkip: [], setGridTake: [], setGridSearch: [], removeGridSearch: [], setGridSort: [], setGridColumns: [], addGridFilter: [], removeGridFilter: [], updateGridFilter: [], setGridFilters: [], setGridArchive: [] } });
|
|
9105
9105
|
|
|
9106
|
-
var KitFilterType;
|
|
9107
|
-
(function (KitFilterType) {
|
|
9108
|
-
KitFilterType["CHECKBOX"] = "checkbox";
|
|
9109
|
-
KitFilterType["RADIO"] = "radio";
|
|
9110
|
-
KitFilterType["DATE"] = "date";
|
|
9111
|
-
KitFilterType["TEXT"] = "text";
|
|
9112
|
-
KitFilterType["NUMERIC"] = "numeric";
|
|
9113
|
-
KitFilterType["NULL"] = "null";
|
|
9114
|
-
KitFilterType["GUID"] = "guid";
|
|
9115
|
-
KitFilterType["CUSTOM_INPUT"] = "customInput";
|
|
9116
|
-
})(KitFilterType || (KitFilterType = {}));
|
|
9117
|
-
var KitFilterDateRange;
|
|
9118
|
-
(function (KitFilterDateRange) {
|
|
9119
|
-
KitFilterDateRange["TODAY"] = "today";
|
|
9120
|
-
KitFilterDateRange["LAST_24_HOURS"] = "last24Hours";
|
|
9121
|
-
KitFilterDateRange["LAST_THREE_DAYS"] = "lastThreeDays";
|
|
9122
|
-
KitFilterDateRange["LAST_WEEK"] = "lastWeek";
|
|
9123
|
-
KitFilterDateRange["LAST_MONTH"] = "lastMonth";
|
|
9124
|
-
KitFilterDateRange["CUSTOM_RANGE"] = "customRange";
|
|
9125
|
-
})(KitFilterDateRange || (KitFilterDateRange = {}));
|
|
9126
|
-
|
|
9127
|
-
const textFilterOperators = [
|
|
9128
|
-
KitFilterOperator.CONTAINS,
|
|
9129
|
-
KitFilterOperator.EQ,
|
|
9130
|
-
KitFilterOperator.IS_NOT_NULL,
|
|
9131
|
-
KitFilterOperator.IS_NULL,
|
|
9132
|
-
KitFilterOperator.NEQ,
|
|
9133
|
-
KitFilterOperator.STARTS_WITH,
|
|
9134
|
-
KitFilterOperator.ENDS_WITH,
|
|
9135
|
-
KitFilterOperator.DOES_NOT_CONTAIN,
|
|
9136
|
-
];
|
|
9137
|
-
const numericFilterOperators = [
|
|
9138
|
-
KitFilterOperator.EQ,
|
|
9139
|
-
KitFilterOperator.NEQ,
|
|
9140
|
-
KitFilterOperator.GTE,
|
|
9141
|
-
KitFilterOperator.GT,
|
|
9142
|
-
KitFilterOperator.LTE,
|
|
9143
|
-
KitFilterOperator.LT,
|
|
9144
|
-
KitFilterOperator.IS_NULL,
|
|
9145
|
-
KitFilterOperator.IS_NOT_NULL,
|
|
9146
|
-
];
|
|
9147
|
-
const noValueRequiredFilterOperators = [
|
|
9148
|
-
KitFilterOperator.IS_NOT_NULL,
|
|
9149
|
-
KitFilterOperator.IS_NULL,
|
|
9150
|
-
];
|
|
9151
|
-
|
|
9152
9106
|
const kitDataStateToODataString = (state, utcDates = false, columns) => {
|
|
9153
9107
|
const base = toODataString({ ...state, filter: undefined }, { utcDates });
|
|
9154
9108
|
const filter = state.filter && convertFiltersToOData(state.filter, utcDates, columns);
|
|
@@ -9188,6 +9142,52 @@ const convertCustomFiltersToOData = (filter, columns) => {
|
|
|
9188
9142
|
return '';
|
|
9189
9143
|
};
|
|
9190
9144
|
|
|
9145
|
+
const textFilterOperators = [
|
|
9146
|
+
KitFilterOperator.CONTAINS,
|
|
9147
|
+
KitFilterOperator.EQ,
|
|
9148
|
+
KitFilterOperator.IS_NOT_NULL,
|
|
9149
|
+
KitFilterOperator.IS_NULL,
|
|
9150
|
+
KitFilterOperator.NEQ,
|
|
9151
|
+
KitFilterOperator.STARTS_WITH,
|
|
9152
|
+
KitFilterOperator.ENDS_WITH,
|
|
9153
|
+
KitFilterOperator.DOES_NOT_CONTAIN,
|
|
9154
|
+
];
|
|
9155
|
+
const numericFilterOperators = [
|
|
9156
|
+
KitFilterOperator.EQ,
|
|
9157
|
+
KitFilterOperator.NEQ,
|
|
9158
|
+
KitFilterOperator.GTE,
|
|
9159
|
+
KitFilterOperator.GT,
|
|
9160
|
+
KitFilterOperator.LTE,
|
|
9161
|
+
KitFilterOperator.LT,
|
|
9162
|
+
KitFilterOperator.IS_NULL,
|
|
9163
|
+
KitFilterOperator.IS_NOT_NULL,
|
|
9164
|
+
];
|
|
9165
|
+
const noValueRequiredFilterOperators = [
|
|
9166
|
+
KitFilterOperator.IS_NOT_NULL,
|
|
9167
|
+
KitFilterOperator.IS_NULL,
|
|
9168
|
+
];
|
|
9169
|
+
|
|
9170
|
+
var KitFilterType;
|
|
9171
|
+
(function (KitFilterType) {
|
|
9172
|
+
KitFilterType["CHECKBOX"] = "checkbox";
|
|
9173
|
+
KitFilterType["RADIO"] = "radio";
|
|
9174
|
+
KitFilterType["DATE"] = "date";
|
|
9175
|
+
KitFilterType["TEXT"] = "text";
|
|
9176
|
+
KitFilterType["NUMERIC"] = "numeric";
|
|
9177
|
+
KitFilterType["NULL"] = "null";
|
|
9178
|
+
KitFilterType["GUID"] = "guid";
|
|
9179
|
+
KitFilterType["CUSTOM_INPUT"] = "customInput";
|
|
9180
|
+
})(KitFilterType || (KitFilterType = {}));
|
|
9181
|
+
var KitFilterDateRange;
|
|
9182
|
+
(function (KitFilterDateRange) {
|
|
9183
|
+
KitFilterDateRange["TODAY"] = "today";
|
|
9184
|
+
KitFilterDateRange["LAST_24_HOURS"] = "last24Hours";
|
|
9185
|
+
KitFilterDateRange["LAST_THREE_DAYS"] = "lastThreeDays";
|
|
9186
|
+
KitFilterDateRange["LAST_WEEK"] = "lastWeek";
|
|
9187
|
+
KitFilterDateRange["LAST_MONTH"] = "lastMonth";
|
|
9188
|
+
KitFilterDateRange["CUSTOM_RANGE"] = "customRange";
|
|
9189
|
+
})(KitFilterDateRange || (KitFilterDateRange = {}));
|
|
9190
|
+
|
|
9191
9191
|
const convertFilterStringDate = (filters, columns, userTimeZone) => filters.map(filter => {
|
|
9192
9192
|
if (filter.type == KitFilterType.DATE && filter.value) {
|
|
9193
9193
|
const column = columns?.find(col => col.field === filter.field);
|
|
@@ -9228,11 +9228,13 @@ const kitBuildFilterBooleanOptions = (trueLabelKey, falseLabelKey) => {
|
|
|
9228
9228
|
];
|
|
9229
9229
|
};
|
|
9230
9230
|
const getTimeZoneOffset = (userTimeZone, column) => {
|
|
9231
|
-
let timeZoneOffset = 'UTC';
|
|
9232
9231
|
if (column?.type === 'dateZone' || column?.type === 'dateTimeZone') {
|
|
9233
|
-
|
|
9232
|
+
return userTimeZone;
|
|
9233
|
+
}
|
|
9234
|
+
if (column?.type === 'dateLocal' || column?.type === 'dateTimeLocal') {
|
|
9235
|
+
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
9234
9236
|
}
|
|
9235
|
-
return
|
|
9237
|
+
return 'UTC';
|
|
9236
9238
|
};
|
|
9237
9239
|
const removeFilterPrefix = (value) => value.split('$filter=')[1];
|
|
9238
9240
|
const filterEmptyValues = (filters) => ({
|
|
@@ -12351,6 +12353,100 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
12351
12353
|
], 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 {{ displayedValues[0] }}\n <span class=\"kit-filter-checkbox-tooltip-count\">+{{ displayedValues.length - 1 }}</span>\n </div>\n } @else {\n {{ displayedValues[0] ?? '' }}\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 [isApplyButtonDisabled]=\"applyButtonDisabled()\"\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-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}::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"] }]
|
|
12352
12354
|
}], 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 }] }] } });
|
|
12353
12355
|
|
|
12356
|
+
class KitFilterCustomInputComponent {
|
|
12357
|
+
constructor() {
|
|
12358
|
+
this.filter = input.required(...(ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []));
|
|
12359
|
+
this.filterRemoved = output();
|
|
12360
|
+
this.filterChanged = output();
|
|
12361
|
+
this.anchor = viewChild.required('toggleButton', { read: ElementRef });
|
|
12362
|
+
this.popup = viewChild('popup', { ...(ngDevMode ? { debugName: "popup" } : /* istanbul ignore next */ {}), read: KitPopupComponent });
|
|
12363
|
+
this.kitTextboxSize = KitTextboxSize;
|
|
12364
|
+
this.kitPillTheme = KitPillTheme;
|
|
12365
|
+
this.rafId = null;
|
|
12366
|
+
this.inputValue = signal('', ...(ngDevMode ? [{ debugName: "inputValue" }] : /* istanbul ignore next */ []));
|
|
12367
|
+
this.selectedValue = signal('', ...(ngDevMode ? [{ debugName: "selectedValue" }] : /* istanbul ignore next */ []));
|
|
12368
|
+
}
|
|
12369
|
+
ngOnInit() {
|
|
12370
|
+
this.initializeValue();
|
|
12371
|
+
this.showPopupOnInit();
|
|
12372
|
+
}
|
|
12373
|
+
ngOnDestroy() {
|
|
12374
|
+
if (this.rafId) {
|
|
12375
|
+
cancelAnimationFrame(this.rafId);
|
|
12376
|
+
this.rafId = null;
|
|
12377
|
+
}
|
|
12378
|
+
}
|
|
12379
|
+
get applyButtonDisabled() {
|
|
12380
|
+
return !this.inputValue().trim();
|
|
12381
|
+
}
|
|
12382
|
+
onValueChange(value) {
|
|
12383
|
+
this.inputValue.set(value);
|
|
12384
|
+
}
|
|
12385
|
+
removeFilter() {
|
|
12386
|
+
this.popup()?.close();
|
|
12387
|
+
this.filterRemoved.emit();
|
|
12388
|
+
}
|
|
12389
|
+
onPopupToggle() {
|
|
12390
|
+
this.popup()?.toggle();
|
|
12391
|
+
}
|
|
12392
|
+
close() {
|
|
12393
|
+
if (this.selectedValue()) {
|
|
12394
|
+
this.inputValue.set(this.selectedValue());
|
|
12395
|
+
}
|
|
12396
|
+
else {
|
|
12397
|
+
this.removeFilter();
|
|
12398
|
+
}
|
|
12399
|
+
}
|
|
12400
|
+
clearAllFilters() {
|
|
12401
|
+
this.inputValue.set('');
|
|
12402
|
+
}
|
|
12403
|
+
onEnterKey() {
|
|
12404
|
+
if (!this.applyButtonDisabled) {
|
|
12405
|
+
this.popup()?.apply();
|
|
12406
|
+
}
|
|
12407
|
+
}
|
|
12408
|
+
applyFilter() {
|
|
12409
|
+
const value = this.inputValue().trim();
|
|
12410
|
+
this.selectedValue.set(value);
|
|
12411
|
+
const filterValue = {
|
|
12412
|
+
logic: KitFilterLogic.AND,
|
|
12413
|
+
filters: [{
|
|
12414
|
+
field: this.filter().field,
|
|
12415
|
+
operator: KitFilterOperator.EQ,
|
|
12416
|
+
value,
|
|
12417
|
+
}],
|
|
12418
|
+
};
|
|
12419
|
+
this.filterChanged.emit(filterValue);
|
|
12420
|
+
}
|
|
12421
|
+
initializeValue() {
|
|
12422
|
+
const filterValue = this.filter().value;
|
|
12423
|
+
if (filterValue?.filters?.[0]?.value) {
|
|
12424
|
+
const value = String(filterValue.filters[0].value);
|
|
12425
|
+
this.selectedValue.set(value);
|
|
12426
|
+
this.inputValue.set(value);
|
|
12427
|
+
}
|
|
12428
|
+
}
|
|
12429
|
+
showPopupOnInit() {
|
|
12430
|
+
if (!this.selectedValue()) {
|
|
12431
|
+
this.rafId = requestAnimationFrame(() => {
|
|
12432
|
+
this.rafId = null;
|
|
12433
|
+
this.onPopupToggle();
|
|
12434
|
+
});
|
|
12435
|
+
}
|
|
12436
|
+
}
|
|
12437
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitFilterCustomInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12438
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.4", 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 && !!(filter().removable ?? true)\"\n [theme]=\"filter().readonly && kitPillTheme.BLUE || kitPillTheme.DEFAULT\"\n (removed)=\"removeFilter()\"\n (clicked)=\"onPopupToggle()\">\n {{ filter().title | translate }}:\n {{ selectedValue() }}\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 (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>", styles: ["::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: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$e.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12439
|
+
}
|
|
12440
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitFilterCustomInputComponent, decorators: [{
|
|
12441
|
+
type: Component,
|
|
12442
|
+
args: [{ selector: 'kit-filter-custom-input', imports: [
|
|
12443
|
+
KitPillComponent,
|
|
12444
|
+
KitPopupComponent,
|
|
12445
|
+
KitTextboxComponent,
|
|
12446
|
+
TranslateModule,
|
|
12447
|
+
], 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 {{ selectedValue() }}\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 (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>", styles: ["::ng-deep .kit-filter-input-popup .popup-content{width:296px;box-sizing:border-box}\n"] }]
|
|
12448
|
+
}], 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 }] }] } });
|
|
12449
|
+
|
|
12354
12450
|
class KitFilterDateComponent {
|
|
12355
12451
|
constructor() {
|
|
12356
12452
|
this.store = inject(Store);
|
|
@@ -12371,7 +12467,15 @@ class KitFilterDateComponent {
|
|
|
12371
12467
|
this.selectedValues = signal({}, ...(ngDevMode ? [{ debugName: "selectedValues" }] : /* istanbul ignore next */ []));
|
|
12372
12468
|
this.pillDateFormat = 'dd/MM/yy';
|
|
12373
12469
|
this.kitPillTheme = KitPillTheme;
|
|
12374
|
-
this.timeZone = computed(() =>
|
|
12470
|
+
this.timeZone = computed(() => {
|
|
12471
|
+
if (this.useUserTimeZone()) {
|
|
12472
|
+
return this.store.selectSignal(KIT_USER_STATE_TOKEN)().data?.namedTimeZone ?? 'UTC';
|
|
12473
|
+
}
|
|
12474
|
+
if (this.useLocalTimeZone()) {
|
|
12475
|
+
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
12476
|
+
}
|
|
12477
|
+
return 'UTC';
|
|
12478
|
+
}, ...(ngDevMode ? [{ debugName: "timeZone" }] : /* istanbul ignore next */ []));
|
|
12375
12479
|
this.localStartDate = computed(() => {
|
|
12376
12480
|
const startDate = this.startDate();
|
|
12377
12481
|
return (!startDate || this.useLocalTimeZone()) ? startDate : toZonedTime(startDate, this.timeZone());
|
|
@@ -12448,7 +12552,8 @@ class KitFilterDateComponent {
|
|
|
12448
12552
|
onToDateChange(date) {
|
|
12449
12553
|
this.dateRange.set(undefined);
|
|
12450
12554
|
const isEndOfDay = !this.dateFilterConstraint();
|
|
12451
|
-
const
|
|
12555
|
+
const localDate = isEndOfDay ? endOfDay(date) : date;
|
|
12556
|
+
const endDate = this.useLocalTimeZone() ? localDate : kitNormalizeDateToUtc(date, this.timeZone(), isEndOfDay);
|
|
12452
12557
|
this.endDate.set(endDate);
|
|
12453
12558
|
}
|
|
12454
12559
|
onEnterKey() {
|
|
@@ -13023,100 +13128,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
13023
13128
|
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"kit-filter-selector\">\n <kit-pill #toggleButton\n [type]=\"kitPillType.DASHED\"\n [selectable]=\"true\"\n [selected]=\"popup.isPopupOpen\"\n [icon]=\"kitSvgIcon.PLUS\"\n [iconType]=\"kitSvgIconType.STROKE\"\n (clicked)=\"popup.toggle()\">\n {{ \"kit.filters.addNewFilter\" | translate }}\n </kit-pill>\n</div>\n\n<kit-popup #popup\n popupClass=\"kit-filter-selector-popup\"\n [anchor]=\"anchor()\"\n [content]=\"content\">\n</kit-popup>\n\n<ng-template #content>\n <div class=\"popup-content\">\n <div class=\"filter-search\">\n <kit-textbox [placeholder]=\"'kit.filters.search' | translate\"\n [size]=\"kitTextboxSize.SMALL\"\n [defaultValue]=\"searchTerm()\"\n (changed)=\"onSearchChange($event)\"\n ></kit-textbox>\n </div>\n <div class=\"filter-items\">\n @for (item of filterItems(); track item.field) {\n <div class=\"filter-item\"\n [class.disabled]=\"item.disabled\"\n (click)=\"onItemClick(item)\">\n {{ item.title | translate }}\n </div>\n }\n </div>\n </div>\n</ng-template>\n", styles: ["::ng-deep .kit-filter-selector-popup .popup-content{width:172px;box-sizing:border-box}::ng-deep .kit-filter-selector-popup .filter-search{margin-bottom:5px;padding-bottom:15px;border-bottom:1px solid var(--ui-kit-color-grey-11)}::ng-deep .kit-filter-selector-popup .filter-items{max-height:400px;overflow-y:auto}::ng-deep .kit-filter-selector-popup .filter-items::-webkit-scrollbar{width:4px}::ng-deep .kit-filter-selector-popup .filter-items::-webkit-scrollbar-thumb{background-color:var(--ui-kit-color-grey-17);border-radius:2px}::ng-deep .kit-filter-selector-popup .filter-items::-webkit-scrollbar-thumb:hover{background-color:var(--ui-kit-color-grey-10)}::ng-deep .kit-filter-selector-popup .filter-item{padding:6px 12px;color:var(--ui-kit-color-grey-10);font-size:14px;font-weight:400;line-height:20px;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}::ng-deep .kit-filter-selector-popup .filter-item:hover{color:var(--ui-kit-color-main)}::ng-deep .kit-filter-selector-popup .filter-item.disabled{color:var(--ui-kit-color-grey-12);pointer-events:none}\n"] }]
|
|
13024
13129
|
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], itemSelected: [{ type: i0.Output, args: ["itemSelected"] }], anchor: [{ type: i0.ViewChild, args: ['toggleButton', { ...{ read: ElementRef }, isSignal: true }] }], popup: [{ type: i0.ViewChild, args: ['popup', { ...{ read: KitPopupComponent }, isSignal: true }] }] } });
|
|
13025
13130
|
|
|
13026
|
-
class KitFilterCustomInputComponent {
|
|
13027
|
-
constructor() {
|
|
13028
|
-
this.filter = input.required(...(ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []));
|
|
13029
|
-
this.filterRemoved = output();
|
|
13030
|
-
this.filterChanged = output();
|
|
13031
|
-
this.anchor = viewChild.required('toggleButton', { read: ElementRef });
|
|
13032
|
-
this.popup = viewChild('popup', { ...(ngDevMode ? { debugName: "popup" } : /* istanbul ignore next */ {}), read: KitPopupComponent });
|
|
13033
|
-
this.kitTextboxSize = KitTextboxSize;
|
|
13034
|
-
this.kitPillTheme = KitPillTheme;
|
|
13035
|
-
this.rafId = null;
|
|
13036
|
-
this.inputValue = signal('', ...(ngDevMode ? [{ debugName: "inputValue" }] : /* istanbul ignore next */ []));
|
|
13037
|
-
this.selectedValue = signal('', ...(ngDevMode ? [{ debugName: "selectedValue" }] : /* istanbul ignore next */ []));
|
|
13038
|
-
}
|
|
13039
|
-
ngOnInit() {
|
|
13040
|
-
this.initializeValue();
|
|
13041
|
-
this.showPopupOnInit();
|
|
13042
|
-
}
|
|
13043
|
-
ngOnDestroy() {
|
|
13044
|
-
if (this.rafId) {
|
|
13045
|
-
cancelAnimationFrame(this.rafId);
|
|
13046
|
-
this.rafId = null;
|
|
13047
|
-
}
|
|
13048
|
-
}
|
|
13049
|
-
get applyButtonDisabled() {
|
|
13050
|
-
return !this.inputValue().trim();
|
|
13051
|
-
}
|
|
13052
|
-
onValueChange(value) {
|
|
13053
|
-
this.inputValue.set(value);
|
|
13054
|
-
}
|
|
13055
|
-
removeFilter() {
|
|
13056
|
-
this.popup()?.close();
|
|
13057
|
-
this.filterRemoved.emit();
|
|
13058
|
-
}
|
|
13059
|
-
onPopupToggle() {
|
|
13060
|
-
this.popup()?.toggle();
|
|
13061
|
-
}
|
|
13062
|
-
close() {
|
|
13063
|
-
if (this.selectedValue()) {
|
|
13064
|
-
this.inputValue.set(this.selectedValue());
|
|
13065
|
-
}
|
|
13066
|
-
else {
|
|
13067
|
-
this.removeFilter();
|
|
13068
|
-
}
|
|
13069
|
-
}
|
|
13070
|
-
clearAllFilters() {
|
|
13071
|
-
this.inputValue.set('');
|
|
13072
|
-
}
|
|
13073
|
-
onEnterKey() {
|
|
13074
|
-
if (!this.applyButtonDisabled) {
|
|
13075
|
-
this.popup()?.apply();
|
|
13076
|
-
}
|
|
13077
|
-
}
|
|
13078
|
-
applyFilter() {
|
|
13079
|
-
const value = this.inputValue().trim();
|
|
13080
|
-
this.selectedValue.set(value);
|
|
13081
|
-
const filterValue = {
|
|
13082
|
-
logic: KitFilterLogic.AND,
|
|
13083
|
-
filters: [{
|
|
13084
|
-
field: this.filter().field,
|
|
13085
|
-
operator: KitFilterOperator.EQ,
|
|
13086
|
-
value,
|
|
13087
|
-
}],
|
|
13088
|
-
};
|
|
13089
|
-
this.filterChanged.emit(filterValue);
|
|
13090
|
-
}
|
|
13091
|
-
initializeValue() {
|
|
13092
|
-
const filterValue = this.filter().value;
|
|
13093
|
-
if (filterValue?.filters?.[0]?.value) {
|
|
13094
|
-
const value = String(filterValue.filters[0].value);
|
|
13095
|
-
this.selectedValue.set(value);
|
|
13096
|
-
this.inputValue.set(value);
|
|
13097
|
-
}
|
|
13098
|
-
}
|
|
13099
|
-
showPopupOnInit() {
|
|
13100
|
-
if (!this.selectedValue()) {
|
|
13101
|
-
this.rafId = requestAnimationFrame(() => {
|
|
13102
|
-
this.rafId = null;
|
|
13103
|
-
this.onPopupToggle();
|
|
13104
|
-
});
|
|
13105
|
-
}
|
|
13106
|
-
}
|
|
13107
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitFilterCustomInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13108
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.4", 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 && !!(filter().removable ?? true)\"\n [theme]=\"filter().readonly && kitPillTheme.BLUE || kitPillTheme.DEFAULT\"\n (removed)=\"removeFilter()\"\n (clicked)=\"onPopupToggle()\">\n {{ filter().title | translate }}:\n {{ selectedValue() }}\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 (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>", styles: ["::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: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$e.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13109
|
-
}
|
|
13110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitFilterCustomInputComponent, decorators: [{
|
|
13111
|
-
type: Component,
|
|
13112
|
-
args: [{ selector: 'kit-filter-custom-input', imports: [
|
|
13113
|
-
KitPillComponent,
|
|
13114
|
-
KitPopupComponent,
|
|
13115
|
-
KitTextboxComponent,
|
|
13116
|
-
TranslateModule,
|
|
13117
|
-
], 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 {{ selectedValue() }}\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 (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>", styles: ["::ng-deep .kit-filter-input-popup .popup-content{width:296px;box-sizing:border-box}\n"] }]
|
|
13118
|
-
}], 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 }] }] } });
|
|
13119
|
-
|
|
13120
13131
|
class KitGridFiltersComponent {
|
|
13121
13132
|
constructor() {
|
|
13122
13133
|
this.store = inject(Store);
|
|
@@ -13175,6 +13186,10 @@ class KitGridFiltersComponent {
|
|
|
13175
13186
|
const columnType = this.columns().find(col => col.field === filter.field)?.type;
|
|
13176
13187
|
return columnType === 'dateZone' || columnType === 'dateTimeZone';
|
|
13177
13188
|
}
|
|
13189
|
+
isLocalDateColumn(filter) {
|
|
13190
|
+
const columnType = this.columns().find(col => col.field === filter.field)?.type;
|
|
13191
|
+
return columnType === 'dateLocal' || columnType === 'dateTimeLocal';
|
|
13192
|
+
}
|
|
13178
13193
|
getDateFilterConstraint(filter) {
|
|
13179
13194
|
return this.columns().find(col => col.field === filter.field)?.dateFilterConstraint;
|
|
13180
13195
|
}
|
|
@@ -13182,7 +13197,7 @@ class KitGridFiltersComponent {
|
|
|
13182
13197
|
return filters.some(filter => filter.field === item.field || filter.field === item.apiField);
|
|
13183
13198
|
}
|
|
13184
13199
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitGridFiltersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13185
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", 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()\"\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}\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 }); }
|
|
13200
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", 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}\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 }); }
|
|
13186
13201
|
}
|
|
13187
13202
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitGridFiltersComponent, decorators: [{
|
|
13188
13203
|
type: Component,
|
|
@@ -13194,7 +13209,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
13194
13209
|
KitFilterInputComponent,
|
|
13195
13210
|
KitFilterNullCheckComponent,
|
|
13196
13211
|
KitFilterCustomInputComponent,
|
|
13197
|
-
], 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()\"\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}\n"] }]
|
|
13212
|
+
], 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}\n"] }]
|
|
13198
13213
|
}], 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"] }] } });
|
|
13199
13214
|
|
|
13200
13215
|
class KitGridFiltersToggleComponent {
|