@progress/kendo-angular-filter 2.0.1-dev.202205171237 → 2.0.1-dev.202205191247
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/kendo-angular-filter.umd.js +1 -1
- package/editors/date-editor.component.d.ts +3 -5
- package/editors/numeric-editor.component.d.ts +3 -5
- package/editors/text-editor.component.d.ts +3 -5
- package/esm2015/editors/date-editor.component.js +11 -18
- package/esm2015/editors/numeric-editor.component.js +11 -18
- package/esm2015/editors/text-editor.component.js +11 -18
- package/esm2015/filter-expression-operators.component.js +31 -17
- package/esm2015/filter-expression.component.js +23 -10
- package/esm2015/filter-group.component.js +6 -3
- package/esm2015/filter.component.js +22 -10
- package/esm2015/filter.service.js +1 -3
- package/esm2015/package-metadata.js +1 -1
- package/fesm2015/kendo-angular-filter.js +108 -85
- package/filter-expression-operators.component.d.ts +7 -6
- package/filter-expression.component.d.ts +2 -1
- package/filter-group.component.d.ts +1 -0
- package/filter.component.d.ts +2 -0
- package/filter.service.d.ts +1 -2
- package/package.json +1 -1
- package/util.d.ts +2 -4
|
@@ -7,11 +7,11 @@ import { Injectable, Directive, Input, EventEmitter, Component, Output, forwardR
|
|
|
7
7
|
import * as i1 from '@progress/kendo-angular-l10n';
|
|
8
8
|
import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
9
9
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
10
|
-
import * as
|
|
10
|
+
import * as i2 from '@progress/kendo-angular-dropdowns';
|
|
11
11
|
import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
|
|
12
|
-
import * as
|
|
12
|
+
import * as i2$1 from '@progress/kendo-angular-inputs';
|
|
13
13
|
import { InputsModule } from '@progress/kendo-angular-inputs';
|
|
14
|
-
import * as
|
|
14
|
+
import * as i2$2 from '@progress/kendo-angular-dateinputs';
|
|
15
15
|
import { DateInputsModule } from '@progress/kendo-angular-dateinputs';
|
|
16
16
|
import * as i10 from '@angular/common';
|
|
17
17
|
import { CommonModule } from '@angular/common';
|
|
@@ -24,9 +24,7 @@ import { LabelModule } from '@progress/kendo-angular-label';
|
|
|
24
24
|
*/
|
|
25
25
|
class FilterService {
|
|
26
26
|
constructor() {
|
|
27
|
-
this.value = { filters: [], logic: 'or' };
|
|
28
27
|
this.filters = [];
|
|
29
|
-
this.isEditorDisabled = false;
|
|
30
28
|
}
|
|
31
29
|
addFilterGroup(item) {
|
|
32
30
|
let filterGroup = { logic: 'or', filters: [] };
|
|
@@ -38,7 +36,7 @@ class FilterService {
|
|
|
38
36
|
}
|
|
39
37
|
remove(item, positionIndex, parentItem) {
|
|
40
38
|
if (!parentItem) {
|
|
41
|
-
parentItem = this.
|
|
39
|
+
parentItem = this.normalizedValue;
|
|
42
40
|
}
|
|
43
41
|
if (item === parentItem) {
|
|
44
42
|
parentItem.filters = [];
|
|
@@ -202,7 +200,7 @@ const packageMetadata = {
|
|
|
202
200
|
name: '@progress/kendo-angular-filter',
|
|
203
201
|
productName: 'Kendo UI for Angular',
|
|
204
202
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
205
|
-
publishDate:
|
|
203
|
+
publishDate: 1652964392,
|
|
206
204
|
version: '',
|
|
207
205
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
208
206
|
};
|
|
@@ -234,8 +232,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
234
232
|
* @hidden
|
|
235
233
|
*/
|
|
236
234
|
class FilterExpressionOperatorsComponent {
|
|
237
|
-
constructor(
|
|
238
|
-
this.filterService = filterService;
|
|
235
|
+
constructor(localization) {
|
|
239
236
|
this.localization = localization;
|
|
240
237
|
this.valueChange = new EventEmitter();
|
|
241
238
|
this.operators = [];
|
|
@@ -243,13 +240,15 @@ class FilterExpressionOperatorsComponent {
|
|
|
243
240
|
messageFor(key) {
|
|
244
241
|
return this.localization.get(key);
|
|
245
242
|
}
|
|
243
|
+
getOperator(operatorValue) {
|
|
244
|
+
return this.messageFor(getKeyByValue(defaultOperators[this.editorType], operatorValue));
|
|
245
|
+
}
|
|
246
246
|
operatorValueChange(value) {
|
|
247
|
-
this.valueChange.emit();
|
|
248
|
-
this.filterService.isEditorDisabled = nullOperators.indexOf(value) >= 0;
|
|
247
|
+
this.valueChange.emit(value);
|
|
249
248
|
}
|
|
250
249
|
}
|
|
251
|
-
FilterExpressionOperatorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterExpressionOperatorsComponent, deps: [{ token:
|
|
252
|
-
FilterExpressionOperatorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterExpressionOperatorsComponent, selector: "kendo-filter-expression-operators", inputs: { currentItem: "currentItem", operators: "operators" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
|
|
250
|
+
FilterExpressionOperatorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterExpressionOperatorsComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
251
|
+
FilterExpressionOperatorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterExpressionOperatorsComponent, selector: "kendo-filter-expression-operators", inputs: { currentItem: "currentItem", editorType: "editorType", operators: "operators" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
|
|
253
252
|
<kendo-dropdownlist
|
|
254
253
|
[kendoAriaLabelValue]="messageFor('filterOperatorAriaLabel')"
|
|
255
254
|
[data]="operators"
|
|
@@ -259,13 +258,19 @@ FilterExpressionOperatorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersio
|
|
|
259
258
|
[valuePrimitive]="true"
|
|
260
259
|
textField="text"
|
|
261
260
|
valueField="value"
|
|
262
|
-
|
|
261
|
+
>
|
|
262
|
+
<ng-template kendoDropDownListValueTemplate let-dataItem>
|
|
263
|
+
{{ getOperator(dataItem.value) }}
|
|
264
|
+
</ng-template>
|
|
265
|
+
<ng-template kendoDropDownListItemTemplate let-dataItem>
|
|
266
|
+
{{ getOperator(dataItem.value) }}
|
|
267
|
+
</ng-template>
|
|
263
268
|
</kendo-dropdownlist>
|
|
264
|
-
|
|
269
|
+
`, isInline: true, components: [{ type: i2.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["iconClass", "loading", "data", "value", "textField", "valueField", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }], directives: [{ type: AriaLabelValueDirective, selector: "[kendoAriaLabelValue]", inputs: ["kendoAriaLabelValue"] }, { type: i2.ValueTemplateDirective, selector: "[kendoDropDownListValueTemplate],[kendoDropDownTreeValueTemplate]" }, { type: i2.ItemTemplateDirective, selector: "[kendoDropDownListItemTemplate],[kendoComboBoxItemTemplate],[kendoAutoCompleteItemTemplate],[kendoMultiSelectItemTemplate]" }] });
|
|
265
270
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterExpressionOperatorsComponent, decorators: [{
|
|
266
271
|
type: Component,
|
|
267
272
|
args: [{
|
|
268
|
-
selector:
|
|
273
|
+
selector: "kendo-filter-expression-operators",
|
|
269
274
|
template: `
|
|
270
275
|
<kendo-dropdownlist
|
|
271
276
|
[kendoAriaLabelValue]="messageFor('filterOperatorAriaLabel')"
|
|
@@ -276,11 +281,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
276
281
|
[valuePrimitive]="true"
|
|
277
282
|
textField="text"
|
|
278
283
|
valueField="value"
|
|
279
|
-
|
|
284
|
+
>
|
|
285
|
+
<ng-template kendoDropDownListValueTemplate let-dataItem>
|
|
286
|
+
{{ getOperator(dataItem.value) }}
|
|
287
|
+
</ng-template>
|
|
288
|
+
<ng-template kendoDropDownListItemTemplate let-dataItem>
|
|
289
|
+
{{ getOperator(dataItem.value) }}
|
|
290
|
+
</ng-template>
|
|
280
291
|
</kendo-dropdownlist>
|
|
281
|
-
|
|
292
|
+
`
|
|
282
293
|
}]
|
|
283
|
-
}], ctorParameters: function () { return [{ type:
|
|
294
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { currentItem: [{
|
|
295
|
+
type: Input
|
|
296
|
+
}], editorType: [{
|
|
284
297
|
type: Input
|
|
285
298
|
}], valueChange: [{
|
|
286
299
|
type: Output
|
|
@@ -292,32 +305,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
292
305
|
* @hidden
|
|
293
306
|
*/
|
|
294
307
|
class FilterTextEditorComponent {
|
|
295
|
-
constructor(localization
|
|
308
|
+
constructor(localization) {
|
|
296
309
|
this.localization = localization;
|
|
297
|
-
this.filterService = filterService;
|
|
298
310
|
this.valueChange = new EventEmitter();
|
|
299
311
|
}
|
|
300
|
-
isDisabled() {
|
|
301
|
-
const isDisabled = this.filterService.isEditorDisabled;
|
|
302
|
-
if (isDisabled) {
|
|
303
|
-
this.currentItem.value = null;
|
|
304
|
-
}
|
|
305
|
-
return isDisabled;
|
|
306
|
-
}
|
|
307
312
|
messageFor(key) {
|
|
308
313
|
return this.localization.get(key);
|
|
309
314
|
}
|
|
310
315
|
}
|
|
311
|
-
FilterTextEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterTextEditorComponent, deps: [{ token: i1.LocalizationService }
|
|
312
|
-
FilterTextEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterTextEditorComponent, selector: "kendo-filter-text-editor", inputs: { currentItem: "currentItem" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
|
|
316
|
+
FilterTextEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterTextEditorComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
317
|
+
FilterTextEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterTextEditorComponent, selector: "kendo-filter-text-editor", inputs: { currentItem: "currentItem", isDisabled: "isDisabled" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
|
|
313
318
|
<kendo-textbox
|
|
314
319
|
[kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
|
|
315
320
|
class="k-filter-toolbar-item k-filter-value"
|
|
316
321
|
[(value)]="currentItem.value"
|
|
317
322
|
(valueChange)="valueChange.emit()"
|
|
318
|
-
[disabled]="isDisabled
|
|
323
|
+
[disabled]="isDisabled">
|
|
319
324
|
</kendo-textbox>
|
|
320
|
-
`, isInline: true, components: [{ type:
|
|
325
|
+
`, isInline: true, components: [{ type: i2$1.TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "errorIcon", "clearButtonIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }], directives: [{ type: AriaLabelValueDirective, selector: "[kendoAriaLabelValue]", inputs: ["kendoAriaLabelValue"] }] });
|
|
321
326
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterTextEditorComponent, decorators: [{
|
|
322
327
|
type: Component,
|
|
323
328
|
args: [{
|
|
@@ -328,11 +333,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
328
333
|
class="k-filter-toolbar-item k-filter-value"
|
|
329
334
|
[(value)]="currentItem.value"
|
|
330
335
|
(valueChange)="valueChange.emit()"
|
|
331
|
-
[disabled]="isDisabled
|
|
336
|
+
[disabled]="isDisabled">
|
|
332
337
|
</kendo-textbox>
|
|
333
338
|
`
|
|
334
339
|
}]
|
|
335
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }
|
|
340
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { currentItem: [{
|
|
341
|
+
type: Input
|
|
342
|
+
}], isDisabled: [{
|
|
336
343
|
type: Input
|
|
337
344
|
}], valueChange: [{
|
|
338
345
|
type: Output
|
|
@@ -342,36 +349,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
342
349
|
* @hidden
|
|
343
350
|
*/
|
|
344
351
|
class FilterNumericEditorComponent {
|
|
345
|
-
constructor(localization
|
|
352
|
+
constructor(localization) {
|
|
346
353
|
this.localization = localization;
|
|
347
|
-
this.filterService = filterService;
|
|
348
354
|
this.valueChange = new EventEmitter();
|
|
349
355
|
}
|
|
350
356
|
messageFor(key) {
|
|
351
357
|
return this.localization.get(key);
|
|
352
358
|
}
|
|
353
|
-
isDisabled() {
|
|
354
|
-
const isDisabled = this.filterService.isEditorDisabled;
|
|
355
|
-
if (isDisabled) {
|
|
356
|
-
this.currentItem.value = null;
|
|
357
|
-
}
|
|
358
|
-
return isDisabled;
|
|
359
|
-
}
|
|
360
359
|
}
|
|
361
|
-
FilterNumericEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterNumericEditorComponent, deps: [{ token: i1.LocalizationService }
|
|
362
|
-
FilterNumericEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterNumericEditorComponent, selector: "kendo-filter-numeric-editor", inputs: { currentItem: "currentItem" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
|
|
360
|
+
FilterNumericEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterNumericEditorComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
361
|
+
FilterNumericEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterNumericEditorComponent, selector: "kendo-filter-numeric-editor", inputs: { currentItem: "currentItem", isDisabled: "isDisabled" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
|
|
363
362
|
<kendo-numerictextbox
|
|
364
363
|
[kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
|
|
365
364
|
class="k-filter-toolbar-item k-filter-value"
|
|
366
365
|
[(value)]="currentItem.value"
|
|
367
366
|
(valueChange)="valueChange.emit()"
|
|
368
|
-
[disabled]="isDisabled
|
|
367
|
+
[disabled]="isDisabled">
|
|
369
368
|
<kendo-numerictextbox-messages
|
|
370
369
|
[increment]="messageFor('editorNumericIncrement')"
|
|
371
370
|
[decrement]="messageFor('editorNumericDecrement')">
|
|
372
371
|
</kendo-numerictextbox-messages>
|
|
373
372
|
</kendo-numerictextbox>
|
|
374
|
-
`, isInline: true, components: [{ type:
|
|
373
|
+
`, isInline: true, components: [{ type: i2$1.NumericTextBoxComponent, selector: "kendo-numerictextbox", inputs: ["focusableId", "disabled", "readonly", "title", "autoCorrect", "format", "max", "min", "decimals", "placeholder", "step", "spinners", "rangeValidation", "tabindex", "tabIndex", "changeValueOnScroll", "selectOnFocus", "value", "maxlength", "size", "rounded", "fillMode"], outputs: ["valueChange", "focus", "blur"], exportAs: ["kendoNumericTextBox"] }, { type: i2$1.NumericTextBoxCustomMessagesComponent, selector: "kendo-numerictextbox-messages" }], directives: [{ type: AriaLabelValueDirective, selector: "[kendoAriaLabelValue]", inputs: ["kendoAriaLabelValue"] }] });
|
|
375
374
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterNumericEditorComponent, decorators: [{
|
|
376
375
|
type: Component,
|
|
377
376
|
args: [{
|
|
@@ -382,7 +381,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
382
381
|
class="k-filter-toolbar-item k-filter-value"
|
|
383
382
|
[(value)]="currentItem.value"
|
|
384
383
|
(valueChange)="valueChange.emit()"
|
|
385
|
-
[disabled]="isDisabled
|
|
384
|
+
[disabled]="isDisabled">
|
|
386
385
|
<kendo-numerictextbox-messages
|
|
387
386
|
[increment]="messageFor('editorNumericIncrement')"
|
|
388
387
|
[decrement]="messageFor('editorNumericDecrement')">
|
|
@@ -390,7 +389,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
390
389
|
</kendo-numerictextbox>
|
|
391
390
|
`
|
|
392
391
|
}]
|
|
393
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }
|
|
392
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { currentItem: [{
|
|
393
|
+
type: Input
|
|
394
|
+
}], isDisabled: [{
|
|
394
395
|
type: Input
|
|
395
396
|
}], valueChange: [{
|
|
396
397
|
type: Output
|
|
@@ -446,7 +447,7 @@ FilterBooleanEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12
|
|
|
446
447
|
valueField="value"
|
|
447
448
|
>
|
|
448
449
|
</kendo-dropdownlist>
|
|
449
|
-
`, isInline: true, components: [{ type:
|
|
450
|
+
`, isInline: true, components: [{ type: i2.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["iconClass", "loading", "data", "value", "textField", "valueField", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }], directives: [{ type: AriaLabelValueDirective, selector: "[kendoAriaLabelValue]", inputs: ["kendoAriaLabelValue"] }] });
|
|
450
451
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterBooleanEditorComponent, decorators: [{
|
|
451
452
|
type: Component,
|
|
452
453
|
args: [{
|
|
@@ -476,36 +477,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
476
477
|
* @hidden
|
|
477
478
|
*/
|
|
478
479
|
class FilterDateEditorComponent {
|
|
479
|
-
constructor(localization
|
|
480
|
+
constructor(localization) {
|
|
480
481
|
this.localization = localization;
|
|
481
|
-
this.filterService = filterService;
|
|
482
482
|
this.valueChange = new EventEmitter();
|
|
483
483
|
}
|
|
484
484
|
messageFor(key) {
|
|
485
485
|
return this.localization.get(key);
|
|
486
486
|
}
|
|
487
|
-
isDisabled() {
|
|
488
|
-
const isDisabled = this.filterService.isEditorDisabled;
|
|
489
|
-
if (isDisabled) {
|
|
490
|
-
this.currentItem.value = null;
|
|
491
|
-
}
|
|
492
|
-
return isDisabled;
|
|
493
|
-
}
|
|
494
487
|
}
|
|
495
|
-
FilterDateEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterDateEditorComponent, deps: [{ token: i1.LocalizationService }
|
|
496
|
-
FilterDateEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterDateEditorComponent, selector: "kendo-filter-date-editor", inputs: { currentItem: "currentItem" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
|
|
488
|
+
FilterDateEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterDateEditorComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
489
|
+
FilterDateEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterDateEditorComponent, selector: "kendo-filter-date-editor", inputs: { currentItem: "currentItem", isDisabled: "isDisabled" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
|
|
497
490
|
<kendo-datepicker
|
|
498
491
|
[kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
|
|
499
492
|
class="k-filter-toolbar-item k-filter-value"
|
|
500
493
|
[(value)]="currentItem.value"
|
|
501
494
|
(valueChange)="valueChange.emit()"
|
|
502
|
-
[disabled]="isDisabled
|
|
495
|
+
[disabled]="isDisabled">
|
|
503
496
|
<kendo-datepicker-messages
|
|
504
497
|
[toggle]="messageFor('editorDateToggleText')"
|
|
505
498
|
[today]="messageFor('editorDateTodayText')">
|
|
506
499
|
</kendo-datepicker-messages>
|
|
507
500
|
</kendo-datepicker>
|
|
508
|
-
`, isInline: true, components: [{ type:
|
|
501
|
+
`, isInline: true, components: [{ type: i2$2.DatePickerComponent, selector: "kendo-datepicker", inputs: ["cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "navigationItemTemplate", "focusableId", "activeView", "bottomView", "topView", "calendarType", "animateCalendarNavigation", "disabled", "readonly", "readOnlyInput", "popupSettings", "navigation", "min", "max", "incompleteDateValidation", "focusedDate", "value", "format", "twoDigitYearMax", "formatPlaceholder", "placeholder", "tabindex", "tabIndex", "disabledDates", "title", "rangeValidation", "disabledDatesValidation", "weekNumber", "size", "rounded", "fillMode"], outputs: ["valueChange", "focus", "blur", "open", "close"], exportAs: ["kendo-datepicker"] }, { type: i2$2.DatePickerCustomMessagesComponent, selector: "kendo-datepicker-messages" }], directives: [{ type: AriaLabelValueDirective, selector: "[kendoAriaLabelValue]", inputs: ["kendoAriaLabelValue"] }] });
|
|
509
502
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterDateEditorComponent, decorators: [{
|
|
510
503
|
type: Component,
|
|
511
504
|
args: [{
|
|
@@ -516,7 +509,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
516
509
|
class="k-filter-toolbar-item k-filter-value"
|
|
517
510
|
[(value)]="currentItem.value"
|
|
518
511
|
(valueChange)="valueChange.emit()"
|
|
519
|
-
[disabled]="isDisabled
|
|
512
|
+
[disabled]="isDisabled">
|
|
520
513
|
<kendo-datepicker-messages
|
|
521
514
|
[toggle]="messageFor('editorDateToggleText')"
|
|
522
515
|
[today]="messageFor('editorDateTodayText')">
|
|
@@ -524,7 +517,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
524
517
|
</kendo-datepicker>
|
|
525
518
|
`
|
|
526
519
|
}]
|
|
527
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }
|
|
520
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { currentItem: [{
|
|
521
|
+
type: Input
|
|
522
|
+
}], isDisabled: [{
|
|
528
523
|
type: Input
|
|
529
524
|
}], valueChange: [{
|
|
530
525
|
type: Output
|
|
@@ -545,6 +540,7 @@ class FilterExpressionComponent {
|
|
|
545
540
|
this.isEditorDisabled = false;
|
|
546
541
|
}
|
|
547
542
|
ngOnInit() {
|
|
543
|
+
this.isEditorDisabled = nullOperators.indexOf(this.currentItem.operator) >= 0;
|
|
548
544
|
this.filters = this.filterService.filters;
|
|
549
545
|
const foundFilter = this.getFilterExpressionByField(this.currentItem.field);
|
|
550
546
|
if (this.currentItem.field) {
|
|
@@ -633,6 +629,16 @@ class FilterExpressionComponent {
|
|
|
633
629
|
}
|
|
634
630
|
}
|
|
635
631
|
}
|
|
632
|
+
onOperatorChange(value) {
|
|
633
|
+
this.valueChange.emit();
|
|
634
|
+
if (nullOperators.indexOf(value) >= 0) {
|
|
635
|
+
this.currentItem.value = null;
|
|
636
|
+
this.isEditorDisabled = true;
|
|
637
|
+
}
|
|
638
|
+
else {
|
|
639
|
+
this.isEditorDisabled = false;
|
|
640
|
+
}
|
|
641
|
+
}
|
|
636
642
|
}
|
|
637
643
|
FilterExpressionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterExpressionComponent, deps: [{ token: FilterService }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
638
644
|
FilterExpressionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterExpressionComponent, selector: "kendo-filter-expression", inputs: { index: "index", currentItem: "currentItem" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
|
|
@@ -654,15 +660,16 @@ FilterExpressionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
|
|
|
654
660
|
<kendo-filter-expression-operators
|
|
655
661
|
[currentItem]="currentItem"
|
|
656
662
|
[operators]="operators"
|
|
657
|
-
|
|
663
|
+
[editorType]="getEditorType()"
|
|
664
|
+
(valueChange)="onOperatorChange($event);">
|
|
658
665
|
</kendo-filter-expression-operators>
|
|
659
666
|
</div>
|
|
660
667
|
|
|
661
668
|
<ng-container [ngSwitch]="getEditorType()">
|
|
662
|
-
<kendo-filter-text-editor *ngSwitchCase="'string'" [currentItem]="currentItem" (valueChange)="valueChange.emit()"></kendo-filter-text-editor>
|
|
663
|
-
<kendo-filter-numeric-editor *ngSwitchCase="'number'" [currentItem]="currentItem" (valueChange)="valueChange.emit()"></kendo-filter-numeric-editor>
|
|
669
|
+
<kendo-filter-text-editor *ngSwitchCase="'string'" [currentItem]="currentItem" [isDisabled]="isEditorDisabled" (valueChange)="valueChange.emit()"></kendo-filter-text-editor>
|
|
670
|
+
<kendo-filter-numeric-editor *ngSwitchCase="'number'" [currentItem]="currentItem" [isDisabled]="isEditorDisabled" (valueChange)="valueChange.emit()"></kendo-filter-numeric-editor>
|
|
664
671
|
<kendo-filter-boolean-editor *ngSwitchCase="'boolean'" [currentItem]="currentItem" (valueChange)="valueChange.emit()"></kendo-filter-boolean-editor>
|
|
665
|
-
<kendo-filter-date-editor *ngSwitchCase="'date'" [currentItem]="currentItem" (valueChange)="valueChange.emit()"></kendo-filter-date-editor>
|
|
672
|
+
<kendo-filter-date-editor *ngSwitchCase="'date'" [currentItem]="currentItem" [isDisabled]="isEditorDisabled" (valueChange)="valueChange.emit()"></kendo-filter-date-editor>
|
|
666
673
|
</ng-container>
|
|
667
674
|
|
|
668
675
|
<div class="k-filter-toolbar-item">
|
|
@@ -676,7 +683,7 @@ FilterExpressionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
|
|
|
676
683
|
</div>
|
|
677
684
|
</div>
|
|
678
685
|
</div>
|
|
679
|
-
`, isInline: true, components: [{ type:
|
|
686
|
+
`, isInline: true, components: [{ type: i2.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["iconClass", "loading", "data", "value", "textField", "valueField", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }, { type: FilterExpressionOperatorsComponent, selector: "kendo-filter-expression-operators", inputs: ["currentItem", "editorType", "operators"], outputs: ["valueChange"] }, { type: FilterTextEditorComponent, selector: "kendo-filter-text-editor", inputs: ["currentItem", "isDisabled"], outputs: ["valueChange"] }, { type: FilterNumericEditorComponent, selector: "kendo-filter-numeric-editor", inputs: ["currentItem", "isDisabled"], outputs: ["valueChange"] }, { type: FilterBooleanEditorComponent, selector: "kendo-filter-boolean-editor", inputs: ["currentItem"], outputs: ["valueChange"] }, { type: FilterDateEditorComponent, selector: "kendo-filter-date-editor", inputs: ["currentItem", "isDisabled"], outputs: ["valueChange"] }], directives: [{ type: AriaLabelValueDirective, selector: "[kendoAriaLabelValue]", inputs: ["kendoAriaLabelValue"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i10.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i11.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
|
|
680
687
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterExpressionComponent, decorators: [{
|
|
681
688
|
type: Component,
|
|
682
689
|
args: [{
|
|
@@ -700,15 +707,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
700
707
|
<kendo-filter-expression-operators
|
|
701
708
|
[currentItem]="currentItem"
|
|
702
709
|
[operators]="operators"
|
|
703
|
-
|
|
710
|
+
[editorType]="getEditorType()"
|
|
711
|
+
(valueChange)="onOperatorChange($event);">
|
|
704
712
|
</kendo-filter-expression-operators>
|
|
705
713
|
</div>
|
|
706
714
|
|
|
707
715
|
<ng-container [ngSwitch]="getEditorType()">
|
|
708
|
-
<kendo-filter-text-editor *ngSwitchCase="'string'" [currentItem]="currentItem" (valueChange)="valueChange.emit()"></kendo-filter-text-editor>
|
|
709
|
-
<kendo-filter-numeric-editor *ngSwitchCase="'number'" [currentItem]="currentItem" (valueChange)="valueChange.emit()"></kendo-filter-numeric-editor>
|
|
716
|
+
<kendo-filter-text-editor *ngSwitchCase="'string'" [currentItem]="currentItem" [isDisabled]="isEditorDisabled" (valueChange)="valueChange.emit()"></kendo-filter-text-editor>
|
|
717
|
+
<kendo-filter-numeric-editor *ngSwitchCase="'number'" [currentItem]="currentItem" [isDisabled]="isEditorDisabled" (valueChange)="valueChange.emit()"></kendo-filter-numeric-editor>
|
|
710
718
|
<kendo-filter-boolean-editor *ngSwitchCase="'boolean'" [currentItem]="currentItem" (valueChange)="valueChange.emit()"></kendo-filter-boolean-editor>
|
|
711
|
-
<kendo-filter-date-editor *ngSwitchCase="'date'" [currentItem]="currentItem" (valueChange)="valueChange.emit()"></kendo-filter-date-editor>
|
|
719
|
+
<kendo-filter-date-editor *ngSwitchCase="'date'" [currentItem]="currentItem" [isDisabled]="isEditorDisabled" (valueChange)="valueChange.emit()"></kendo-filter-date-editor>
|
|
712
720
|
</ng-container>
|
|
713
721
|
|
|
714
722
|
<div class="k-filter-toolbar-item">
|
|
@@ -766,6 +774,9 @@ class FilterGroupComponent {
|
|
|
766
774
|
messageFor(key) {
|
|
767
775
|
return this.localization.get(key);
|
|
768
776
|
}
|
|
777
|
+
getOperator(operatorValue) {
|
|
778
|
+
return this.messageFor(getKeyByValue(logicOperators, operatorValue));
|
|
779
|
+
}
|
|
769
780
|
selectedChange(logicOperator) {
|
|
770
781
|
if (this.currentItem.logic !== logicOperator) {
|
|
771
782
|
this.currentItem.logic = logicOperator;
|
|
@@ -799,7 +810,7 @@ FilterGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
|
799
810
|
[title]="operator.text"
|
|
800
811
|
(click)="selectedChange(operator.value)"
|
|
801
812
|
>
|
|
802
|
-
{{operator.
|
|
813
|
+
{{getOperator(operator.value)}}
|
|
803
814
|
</button>
|
|
804
815
|
</div>
|
|
805
816
|
</div>
|
|
@@ -867,7 +878,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
867
878
|
[title]="operator.text"
|
|
868
879
|
(click)="selectedChange(operator.value)"
|
|
869
880
|
>
|
|
870
|
-
{{operator.
|
|
881
|
+
{{getOperator(operator.value)}}
|
|
871
882
|
</button>
|
|
872
883
|
</div>
|
|
873
884
|
</div>
|
|
@@ -1086,6 +1097,7 @@ class FilterComponent {
|
|
|
1086
1097
|
* That is each time a Filter Group or Filter Expression is added, removed, or updated.
|
|
1087
1098
|
*/
|
|
1088
1099
|
this.valueChange = new EventEmitter();
|
|
1100
|
+
this._value = { filters: [], logic: 'and' };
|
|
1089
1101
|
validatePackage(packageMetadata);
|
|
1090
1102
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
1091
1103
|
}
|
|
@@ -1103,6 +1115,7 @@ class FilterComponent {
|
|
|
1103
1115
|
}
|
|
1104
1116
|
return clonedFilter;
|
|
1105
1117
|
});
|
|
1118
|
+
this.setValue(this.value);
|
|
1106
1119
|
}
|
|
1107
1120
|
get filters() {
|
|
1108
1121
|
return this.filterService.filters;
|
|
@@ -1112,11 +1125,11 @@ class FilterComponent {
|
|
|
1112
1125
|
*/
|
|
1113
1126
|
set value(value) {
|
|
1114
1127
|
const clonedValue = JSON.parse(JSON.stringify(value));
|
|
1115
|
-
this.
|
|
1116
|
-
this.
|
|
1128
|
+
this._value = clonedValue;
|
|
1129
|
+
this.setValue(this.value);
|
|
1117
1130
|
}
|
|
1118
1131
|
get value() {
|
|
1119
|
-
return this.
|
|
1132
|
+
return this._value;
|
|
1120
1133
|
}
|
|
1121
1134
|
ngOnInit() {
|
|
1122
1135
|
if (this.filters.length === 0) {
|
|
@@ -1136,13 +1149,13 @@ class FilterComponent {
|
|
|
1136
1149
|
* @hidden
|
|
1137
1150
|
*/
|
|
1138
1151
|
getCurrentFilter() {
|
|
1139
|
-
return this.
|
|
1152
|
+
return this.filterService.normalizedValue;
|
|
1140
1153
|
}
|
|
1141
1154
|
/**
|
|
1142
1155
|
* @hidden
|
|
1143
1156
|
*/
|
|
1144
1157
|
onValueChange() {
|
|
1145
|
-
this.valueChange.emit(this.filterService.
|
|
1158
|
+
this.valueChange.emit(this.filterService.normalizedValue);
|
|
1146
1159
|
}
|
|
1147
1160
|
normalizeFilter(filterDescriptor) {
|
|
1148
1161
|
const foundFilter = this.filterService.filters.find((filter) => filter.field === filterDescriptor.field);
|
|
@@ -1164,9 +1177,19 @@ class FilterComponent {
|
|
|
1164
1177
|
if (!isPresent(filterDescriptor.value)) {
|
|
1165
1178
|
filterDescriptor.value = null;
|
|
1166
1179
|
}
|
|
1180
|
+
if (nullOperators.indexOf(filterDescriptor.operator) >= 0) {
|
|
1181
|
+
filterDescriptor.value = null;
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
setValue(items) {
|
|
1185
|
+
this.normalizeValue(items);
|
|
1186
|
+
this.filterService.normalizedValue = items;
|
|
1167
1187
|
}
|
|
1168
|
-
normalizeValue(
|
|
1169
|
-
|
|
1188
|
+
normalizeValue(items) {
|
|
1189
|
+
if (!this.filterService.filters.length) {
|
|
1190
|
+
return;
|
|
1191
|
+
}
|
|
1192
|
+
items.filters.forEach((item) => {
|
|
1170
1193
|
if (item.filters) {
|
|
1171
1194
|
this.normalizeValue(item);
|
|
1172
1195
|
}
|
|
@@ -1309,7 +1332,7 @@ FilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
1309
1332
|
</li>
|
|
1310
1333
|
</ul>
|
|
1311
1334
|
</div>
|
|
1312
|
-
`, isInline: true, components: [{ type: FilterGroupComponent, selector: "kendo-filter-group", inputs: ["index", "currentItem"], outputs: ["valueChange"] }], directives: [{ type: LocalizedMessagesDirective, selector: "[kendoFilterLocalizedMessages]" }] });
|
|
1335
|
+
`, isInline: true, components: [{ type: FilterGroupComponent, selector: "kendo-filter-group", inputs: ["index", "currentItem"], outputs: ["valueChange"] }], directives: [{ type: LocalizedMessagesDirective, selector: "[kendoFilterLocalizedMessages]" }] });
|
|
1313
1336
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterComponent, decorators: [{
|
|
1314
1337
|
type: Component,
|
|
1315
1338
|
args: [{
|
|
@@ -1447,7 +1470,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1447
1470
|
</li>
|
|
1448
1471
|
</ul>
|
|
1449
1472
|
</div>
|
|
1450
|
-
`
|
|
1473
|
+
`
|
|
1451
1474
|
}]
|
|
1452
1475
|
}], ctorParameters: function () { return [{ type: FilterService }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { direction: [{
|
|
1453
1476
|
type: HostBinding,
|
|
@@ -5,23 +5,24 @@
|
|
|
5
5
|
import { EventEmitter } from '@angular/core';
|
|
6
6
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
7
|
import { FilterDescriptor } from '@progress/kendo-data-query';
|
|
8
|
-
import {
|
|
8
|
+
import { FilterEditor, FilterOperator } from './model/filter-expression';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
/**
|
|
11
11
|
* @hidden
|
|
12
12
|
*/
|
|
13
13
|
export declare class FilterExpressionOperatorsComponent {
|
|
14
|
-
private filterService;
|
|
15
14
|
private localization;
|
|
16
15
|
currentItem: FilterDescriptor;
|
|
17
|
-
|
|
16
|
+
editorType: FilterEditor;
|
|
17
|
+
valueChange: EventEmitter<FilterOperator>;
|
|
18
18
|
operators: {
|
|
19
19
|
text: string;
|
|
20
20
|
value: string;
|
|
21
21
|
}[];
|
|
22
|
-
constructor(
|
|
22
|
+
constructor(localization: LocalizationService);
|
|
23
23
|
messageFor(key: string): string;
|
|
24
|
-
|
|
24
|
+
getOperator(operatorValue: FilterOperator): string;
|
|
25
|
+
operatorValueChange(value: FilterOperator): void;
|
|
25
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<FilterExpressionOperatorsComponent, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FilterExpressionOperatorsComponent, "kendo-filter-expression-operators", never, { "currentItem": "currentItem"; "operators": "operators"; }, { "valueChange": "valueChange"; }, never, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FilterExpressionOperatorsComponent, "kendo-filter-expression-operators", never, { "currentItem": "currentItem"; "editorType": "editorType"; "operators": "operators"; }, { "valueChange": "valueChange"; }, never, never>;
|
|
27
28
|
}
|
|
@@ -23,8 +23,8 @@ export declare class FilterExpressionComponent implements OnInit, OnDestroy {
|
|
|
23
23
|
operators: any[];
|
|
24
24
|
filters: FilterExpression[];
|
|
25
25
|
isBoolean: boolean;
|
|
26
|
-
isEditorDisabled: boolean;
|
|
27
26
|
editorType: FilterEditor;
|
|
27
|
+
isEditorDisabled: boolean;
|
|
28
28
|
private localizationSubscription;
|
|
29
29
|
constructor(filterService: FilterService, localization: LocalizationService, cdr: ChangeDetectorRef);
|
|
30
30
|
ngOnInit(): void;
|
|
@@ -43,6 +43,7 @@ export declare class FilterExpressionComponent implements OnInit, OnDestroy {
|
|
|
43
43
|
getEditorType(): FilterEditor;
|
|
44
44
|
removeFilterExpression(): void;
|
|
45
45
|
private setOperators;
|
|
46
|
+
onOperatorChange(value: string): void;
|
|
46
47
|
static ɵfac: i0.ɵɵFactoryDeclaration<FilterExpressionComponent, never>;
|
|
47
48
|
static ɵcmp: i0.ɵɵComponentDeclaration<FilterExpressionComponent, "kendo-filter-expression", never, { "index": "index"; "currentItem": "currentItem"; }, { "valueChange": "valueChange"; }, never, never>;
|
|
48
49
|
}
|
|
@@ -32,6 +32,7 @@ export declare class FilterGroupComponent implements OnInit, OnDestroy {
|
|
|
32
32
|
value: 'and' | 'or';
|
|
33
33
|
}[];
|
|
34
34
|
messageFor(key: string): string;
|
|
35
|
+
getOperator(operatorValue: 'and' | 'or'): string;
|
|
35
36
|
selectedChange(logicOperator: 'or' | 'and'): void;
|
|
36
37
|
addFilterExpression(): void;
|
|
37
38
|
addFilterGroup(): void;
|
package/filter.component.d.ts
CHANGED
|
@@ -64,6 +64,7 @@ export declare class FilterComponent implements OnInit, OnDestroy {
|
|
|
64
64
|
*/
|
|
65
65
|
valueChange: EventEmitter<CompositeFilterDescriptor>;
|
|
66
66
|
private localizationSubscription;
|
|
67
|
+
private _value;
|
|
67
68
|
constructor(filterService: FilterService, localization: LocalizationService, cdr: ChangeDetectorRef);
|
|
68
69
|
ngOnInit(): void;
|
|
69
70
|
ngOnDestroy(): void;
|
|
@@ -76,6 +77,7 @@ export declare class FilterComponent implements OnInit, OnDestroy {
|
|
|
76
77
|
*/
|
|
77
78
|
onValueChange(): void;
|
|
78
79
|
private normalizeFilter;
|
|
80
|
+
private setValue;
|
|
79
81
|
private normalizeValue;
|
|
80
82
|
static ɵfac: i0.ɵɵFactoryDeclaration<FilterComponent, never>;
|
|
81
83
|
static ɵcmp: i0.ɵɵComponentDeclaration<FilterComponent, "kendo-filter", never, { "filters": "filters"; "value": "value"; }, { "valueChange": "valueChange"; }, never, never>;
|
package/filter.service.d.ts
CHANGED
|
@@ -9,9 +9,8 @@ import * as i0 from "@angular/core";
|
|
|
9
9
|
* @hidden
|
|
10
10
|
*/
|
|
11
11
|
export declare class FilterService {
|
|
12
|
-
|
|
12
|
+
normalizedValue: CompositeFilterDescriptor;
|
|
13
13
|
filters: FilterExpression[];
|
|
14
|
-
isEditorDisabled: boolean;
|
|
15
14
|
addFilterGroup(item: CompositeFilterDescriptor): void;
|
|
16
15
|
addFilterExpression(item: CompositeFilterDescriptor): void;
|
|
17
16
|
remove(item: CompositeFilterDescriptor | FilterDescriptor, positionIndex: number, parentItem?: CompositeFilterDescriptor): void;
|
package/package.json
CHANGED
package/util.d.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { FilterOperator } from "./model/filter-expression";
|
|
5
6
|
/**
|
|
6
7
|
* @hidden
|
|
7
8
|
*/
|
|
@@ -41,10 +42,7 @@ export declare const isArray: Function;
|
|
|
41
42
|
/**
|
|
42
43
|
* @hidden
|
|
43
44
|
*/
|
|
44
|
-
export declare const getKeyByValue: (object: object, value:
|
|
45
|
-
text: string;
|
|
46
|
-
value: string;
|
|
47
|
-
}) => string;
|
|
45
|
+
export declare const getKeyByValue: (object: object, value: FilterOperator | "and" | "or") => string;
|
|
48
46
|
/**
|
|
49
47
|
* @hidden
|
|
50
48
|
*/
|