@progress/kendo-angular-filter 2.0.0 → 2.0.1-dev.202205171507
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 +15 -19
- package/esm2015/filter-expression.component.js +21 -10
- package/esm2015/filter.component.js +23 -5
- package/esm2015/filter.module.js +2 -16
- package/esm2015/filter.service.js +0 -1
- package/esm2015/package-metadata.js +1 -1
- package/esm2015/util.js +4 -0
- package/fesm2015/kendo-angular-filter.js +92 -94
- package/filter-expression-operators.component.d.ts +2 -4
- package/filter-expression.component.d.ts +2 -1
- package/filter.service.d.ts +0 -1
- package/package.json +1 -1
- package/util.d.ts +4 -0
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
6
|
import { Injectable, Directive, Input, EventEmitter, Component, Output, forwardRef, isDevMode, HostBinding, NgModule } from '@angular/core';
|
|
7
|
-
import { validatePackage } from '@progress/kendo-licensing';
|
|
8
7
|
import * as i1 from '@progress/kendo-angular-l10n';
|
|
9
8
|
import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
10
|
-
import
|
|
9
|
+
import { validatePackage } from '@progress/kendo-licensing';
|
|
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';
|
|
@@ -26,7 +26,6 @@ class FilterService {
|
|
|
26
26
|
constructor() {
|
|
27
27
|
this.value = { filters: [], logic: 'or' };
|
|
28
28
|
this.filters = [];
|
|
29
|
-
this.isEditorDisabled = false;
|
|
30
29
|
}
|
|
31
30
|
addFilterGroup(item) {
|
|
32
31
|
let filterGroup = { logic: 'or', filters: [] };
|
|
@@ -190,6 +189,10 @@ const localizeOperators = operators => localization => Object.keys(operators).ma
|
|
|
190
189
|
text: localization.get(key),
|
|
191
190
|
value: operators[key]
|
|
192
191
|
}));
|
|
192
|
+
/**
|
|
193
|
+
* @hidden
|
|
194
|
+
*/
|
|
195
|
+
const isPresent = (value) => value !== null && value !== undefined;
|
|
193
196
|
|
|
194
197
|
/**
|
|
195
198
|
* @hidden
|
|
@@ -198,7 +201,7 @@ const packageMetadata = {
|
|
|
198
201
|
name: '@progress/kendo-angular-filter',
|
|
199
202
|
productName: 'Kendo UI for Angular',
|
|
200
203
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
201
|
-
publishDate:
|
|
204
|
+
publishDate: 1652799999,
|
|
202
205
|
version: '',
|
|
203
206
|
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'
|
|
204
207
|
};
|
|
@@ -230,21 +233,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
230
233
|
* @hidden
|
|
231
234
|
*/
|
|
232
235
|
class FilterExpressionOperatorsComponent {
|
|
233
|
-
constructor(
|
|
234
|
-
this.filterService = filterService;
|
|
236
|
+
constructor(localization) {
|
|
235
237
|
this.localization = localization;
|
|
236
|
-
this.valueChange = new EventEmitter();
|
|
237
238
|
this.operators = [];
|
|
239
|
+
this.valueChange = new EventEmitter();
|
|
238
240
|
}
|
|
239
241
|
messageFor(key) {
|
|
240
242
|
return this.localization.get(key);
|
|
241
243
|
}
|
|
242
244
|
operatorValueChange(value) {
|
|
243
|
-
this.valueChange.emit();
|
|
244
|
-
this.filterService.isEditorDisabled = nullOperators.indexOf(value) >= 0;
|
|
245
|
+
this.valueChange.emit(value);
|
|
245
246
|
}
|
|
246
247
|
}
|
|
247
|
-
FilterExpressionOperatorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterExpressionOperatorsComponent, deps: [{ token:
|
|
248
|
+
FilterExpressionOperatorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterExpressionOperatorsComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
248
249
|
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: `
|
|
249
250
|
<kendo-dropdownlist
|
|
250
251
|
[kendoAriaLabelValue]="messageFor('filterOperatorAriaLabel')"
|
|
@@ -255,13 +256,13 @@ FilterExpressionOperatorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersio
|
|
|
255
256
|
[valuePrimitive]="true"
|
|
256
257
|
textField="text"
|
|
257
258
|
valueField="value"
|
|
258
|
-
|
|
259
|
+
>
|
|
259
260
|
</kendo-dropdownlist>
|
|
260
|
-
|
|
261
|
+
`, 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"] }] });
|
|
261
262
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterExpressionOperatorsComponent, decorators: [{
|
|
262
263
|
type: Component,
|
|
263
264
|
args: [{
|
|
264
|
-
selector:
|
|
265
|
+
selector: "kendo-filter-expression-operators",
|
|
265
266
|
template: `
|
|
266
267
|
<kendo-dropdownlist
|
|
267
268
|
[kendoAriaLabelValue]="messageFor('filterOperatorAriaLabel')"
|
|
@@ -272,48 +273,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
272
273
|
[valuePrimitive]="true"
|
|
273
274
|
textField="text"
|
|
274
275
|
valueField="value"
|
|
275
|
-
|
|
276
|
+
>
|
|
276
277
|
</kendo-dropdownlist>
|
|
277
|
-
|
|
278
|
+
`
|
|
278
279
|
}]
|
|
279
|
-
}], ctorParameters: function () { return [{ type:
|
|
280
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { currentItem: [{
|
|
280
281
|
type: Input
|
|
281
|
-
}], valueChange: [{
|
|
282
|
-
type: Output
|
|
283
282
|
}], operators: [{
|
|
284
283
|
type: Input
|
|
284
|
+
}], valueChange: [{
|
|
285
|
+
type: Output
|
|
285
286
|
}] } });
|
|
286
287
|
|
|
287
288
|
/**
|
|
288
289
|
* @hidden
|
|
289
290
|
*/
|
|
290
291
|
class FilterTextEditorComponent {
|
|
291
|
-
constructor(localization
|
|
292
|
+
constructor(localization) {
|
|
292
293
|
this.localization = localization;
|
|
293
|
-
this.filterService = filterService;
|
|
294
294
|
this.valueChange = new EventEmitter();
|
|
295
295
|
}
|
|
296
|
-
isDisabled() {
|
|
297
|
-
const isDisabled = this.filterService.isEditorDisabled;
|
|
298
|
-
if (isDisabled) {
|
|
299
|
-
this.currentItem.value = null;
|
|
300
|
-
}
|
|
301
|
-
return isDisabled;
|
|
302
|
-
}
|
|
303
296
|
messageFor(key) {
|
|
304
297
|
return this.localization.get(key);
|
|
305
298
|
}
|
|
306
299
|
}
|
|
307
|
-
FilterTextEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterTextEditorComponent, deps: [{ token: i1.LocalizationService }
|
|
308
|
-
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: `
|
|
300
|
+
FilterTextEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterTextEditorComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
301
|
+
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: `
|
|
309
302
|
<kendo-textbox
|
|
310
303
|
[kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
|
|
311
304
|
class="k-filter-toolbar-item k-filter-value"
|
|
312
305
|
[(value)]="currentItem.value"
|
|
313
306
|
(valueChange)="valueChange.emit()"
|
|
314
|
-
[disabled]="isDisabled
|
|
307
|
+
[disabled]="isDisabled">
|
|
315
308
|
</kendo-textbox>
|
|
316
|
-
`, isInline: true, components: [{ type:
|
|
309
|
+
`, 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"] }] });
|
|
317
310
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterTextEditorComponent, decorators: [{
|
|
318
311
|
type: Component,
|
|
319
312
|
args: [{
|
|
@@ -324,11 +317,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
324
317
|
class="k-filter-toolbar-item k-filter-value"
|
|
325
318
|
[(value)]="currentItem.value"
|
|
326
319
|
(valueChange)="valueChange.emit()"
|
|
327
|
-
[disabled]="isDisabled
|
|
320
|
+
[disabled]="isDisabled">
|
|
328
321
|
</kendo-textbox>
|
|
329
322
|
`
|
|
330
323
|
}]
|
|
331
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }
|
|
324
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { currentItem: [{
|
|
325
|
+
type: Input
|
|
326
|
+
}], isDisabled: [{
|
|
332
327
|
type: Input
|
|
333
328
|
}], valueChange: [{
|
|
334
329
|
type: Output
|
|
@@ -338,36 +333,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
338
333
|
* @hidden
|
|
339
334
|
*/
|
|
340
335
|
class FilterNumericEditorComponent {
|
|
341
|
-
constructor(localization
|
|
336
|
+
constructor(localization) {
|
|
342
337
|
this.localization = localization;
|
|
343
|
-
this.filterService = filterService;
|
|
344
338
|
this.valueChange = new EventEmitter();
|
|
345
339
|
}
|
|
346
340
|
messageFor(key) {
|
|
347
341
|
return this.localization.get(key);
|
|
348
342
|
}
|
|
349
|
-
isDisabled() {
|
|
350
|
-
const isDisabled = this.filterService.isEditorDisabled;
|
|
351
|
-
if (isDisabled) {
|
|
352
|
-
this.currentItem.value = null;
|
|
353
|
-
}
|
|
354
|
-
return isDisabled;
|
|
355
|
-
}
|
|
356
343
|
}
|
|
357
|
-
FilterNumericEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterNumericEditorComponent, deps: [{ token: i1.LocalizationService }
|
|
358
|
-
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: `
|
|
344
|
+
FilterNumericEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterNumericEditorComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
345
|
+
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: `
|
|
359
346
|
<kendo-numerictextbox
|
|
360
347
|
[kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
|
|
361
348
|
class="k-filter-toolbar-item k-filter-value"
|
|
362
349
|
[(value)]="currentItem.value"
|
|
363
350
|
(valueChange)="valueChange.emit()"
|
|
364
|
-
[disabled]="isDisabled
|
|
351
|
+
[disabled]="isDisabled">
|
|
365
352
|
<kendo-numerictextbox-messages
|
|
366
353
|
[increment]="messageFor('editorNumericIncrement')"
|
|
367
354
|
[decrement]="messageFor('editorNumericDecrement')">
|
|
368
355
|
</kendo-numerictextbox-messages>
|
|
369
356
|
</kendo-numerictextbox>
|
|
370
|
-
`, isInline: true, components: [{ type:
|
|
357
|
+
`, 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"] }] });
|
|
371
358
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterNumericEditorComponent, decorators: [{
|
|
372
359
|
type: Component,
|
|
373
360
|
args: [{
|
|
@@ -378,7 +365,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
378
365
|
class="k-filter-toolbar-item k-filter-value"
|
|
379
366
|
[(value)]="currentItem.value"
|
|
380
367
|
(valueChange)="valueChange.emit()"
|
|
381
|
-
[disabled]="isDisabled
|
|
368
|
+
[disabled]="isDisabled">
|
|
382
369
|
<kendo-numerictextbox-messages
|
|
383
370
|
[increment]="messageFor('editorNumericIncrement')"
|
|
384
371
|
[decrement]="messageFor('editorNumericDecrement')">
|
|
@@ -386,7 +373,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
386
373
|
</kendo-numerictextbox>
|
|
387
374
|
`
|
|
388
375
|
}]
|
|
389
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }
|
|
376
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { currentItem: [{
|
|
377
|
+
type: Input
|
|
378
|
+
}], isDisabled: [{
|
|
390
379
|
type: Input
|
|
391
380
|
}], valueChange: [{
|
|
392
381
|
type: Output
|
|
@@ -442,7 +431,7 @@ FilterBooleanEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12
|
|
|
442
431
|
valueField="value"
|
|
443
432
|
>
|
|
444
433
|
</kendo-dropdownlist>
|
|
445
|
-
`, isInline: true, components: [{ type:
|
|
434
|
+
`, 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"] }] });
|
|
446
435
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterBooleanEditorComponent, decorators: [{
|
|
447
436
|
type: Component,
|
|
448
437
|
args: [{
|
|
@@ -472,36 +461,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
472
461
|
* @hidden
|
|
473
462
|
*/
|
|
474
463
|
class FilterDateEditorComponent {
|
|
475
|
-
constructor(localization
|
|
464
|
+
constructor(localization) {
|
|
476
465
|
this.localization = localization;
|
|
477
|
-
this.filterService = filterService;
|
|
478
466
|
this.valueChange = new EventEmitter();
|
|
479
467
|
}
|
|
480
468
|
messageFor(key) {
|
|
481
469
|
return this.localization.get(key);
|
|
482
470
|
}
|
|
483
|
-
isDisabled() {
|
|
484
|
-
const isDisabled = this.filterService.isEditorDisabled;
|
|
485
|
-
if (isDisabled) {
|
|
486
|
-
this.currentItem.value = null;
|
|
487
|
-
}
|
|
488
|
-
return isDisabled;
|
|
489
|
-
}
|
|
490
471
|
}
|
|
491
|
-
FilterDateEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterDateEditorComponent, deps: [{ token: i1.LocalizationService }
|
|
492
|
-
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: `
|
|
472
|
+
FilterDateEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterDateEditorComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
473
|
+
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: `
|
|
493
474
|
<kendo-datepicker
|
|
494
475
|
[kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
|
|
495
476
|
class="k-filter-toolbar-item k-filter-value"
|
|
496
477
|
[(value)]="currentItem.value"
|
|
497
478
|
(valueChange)="valueChange.emit()"
|
|
498
|
-
[disabled]="isDisabled
|
|
479
|
+
[disabled]="isDisabled">
|
|
499
480
|
<kendo-datepicker-messages
|
|
500
481
|
[toggle]="messageFor('editorDateToggleText')"
|
|
501
482
|
[today]="messageFor('editorDateTodayText')">
|
|
502
483
|
</kendo-datepicker-messages>
|
|
503
484
|
</kendo-datepicker>
|
|
504
|
-
`, isInline: true, components: [{ type:
|
|
485
|
+
`, 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"] }] });
|
|
505
486
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterDateEditorComponent, decorators: [{
|
|
506
487
|
type: Component,
|
|
507
488
|
args: [{
|
|
@@ -512,7 +493,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
512
493
|
class="k-filter-toolbar-item k-filter-value"
|
|
513
494
|
[(value)]="currentItem.value"
|
|
514
495
|
(valueChange)="valueChange.emit()"
|
|
515
|
-
[disabled]="isDisabled
|
|
496
|
+
[disabled]="isDisabled">
|
|
516
497
|
<kendo-datepicker-messages
|
|
517
498
|
[toggle]="messageFor('editorDateToggleText')"
|
|
518
499
|
[today]="messageFor('editorDateTodayText')">
|
|
@@ -520,7 +501,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
520
501
|
</kendo-datepicker>
|
|
521
502
|
`
|
|
522
503
|
}]
|
|
523
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }
|
|
504
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { currentItem: [{
|
|
505
|
+
type: Input
|
|
506
|
+
}], isDisabled: [{
|
|
524
507
|
type: Input
|
|
525
508
|
}], valueChange: [{
|
|
526
509
|
type: Output
|
|
@@ -541,6 +524,7 @@ class FilterExpressionComponent {
|
|
|
541
524
|
this.isEditorDisabled = false;
|
|
542
525
|
}
|
|
543
526
|
ngOnInit() {
|
|
527
|
+
this.isEditorDisabled = nullOperators.indexOf(this.currentItem.operator) >= 0;
|
|
544
528
|
this.filters = this.filterService.filters;
|
|
545
529
|
const foundFilter = this.getFilterExpressionByField(this.currentItem.field);
|
|
546
530
|
if (this.currentItem.field) {
|
|
@@ -629,6 +613,16 @@ class FilterExpressionComponent {
|
|
|
629
613
|
}
|
|
630
614
|
}
|
|
631
615
|
}
|
|
616
|
+
onOperatorChange(value) {
|
|
617
|
+
this.valueChange.emit();
|
|
618
|
+
if (nullOperators.indexOf(value) >= 0) {
|
|
619
|
+
this.currentItem.value = null;
|
|
620
|
+
this.isEditorDisabled = true;
|
|
621
|
+
}
|
|
622
|
+
else {
|
|
623
|
+
this.isEditorDisabled = false;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
632
626
|
}
|
|
633
627
|
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 });
|
|
634
628
|
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: `
|
|
@@ -650,15 +644,15 @@ FilterExpressionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
|
|
|
650
644
|
<kendo-filter-expression-operators
|
|
651
645
|
[currentItem]="currentItem"
|
|
652
646
|
[operators]="operators"
|
|
653
|
-
(valueChange)="
|
|
647
|
+
(valueChange)="onOperatorChange($event);">
|
|
654
648
|
</kendo-filter-expression-operators>
|
|
655
649
|
</div>
|
|
656
650
|
|
|
657
651
|
<ng-container [ngSwitch]="getEditorType()">
|
|
658
|
-
<kendo-filter-text-editor *ngSwitchCase="'string'" [currentItem]="currentItem" (valueChange)="valueChange.emit()"></kendo-filter-text-editor>
|
|
659
|
-
<kendo-filter-numeric-editor *ngSwitchCase="'number'" [currentItem]="currentItem" (valueChange)="valueChange.emit()"></kendo-filter-numeric-editor>
|
|
652
|
+
<kendo-filter-text-editor *ngSwitchCase="'string'" [currentItem]="currentItem" [isDisabled]="isEditorDisabled" (valueChange)="valueChange.emit()"></kendo-filter-text-editor>
|
|
653
|
+
<kendo-filter-numeric-editor *ngSwitchCase="'number'" [currentItem]="currentItem" [isDisabled]="isEditorDisabled" (valueChange)="valueChange.emit()"></kendo-filter-numeric-editor>
|
|
660
654
|
<kendo-filter-boolean-editor *ngSwitchCase="'boolean'" [currentItem]="currentItem" (valueChange)="valueChange.emit()"></kendo-filter-boolean-editor>
|
|
661
|
-
<kendo-filter-date-editor *ngSwitchCase="'date'" [currentItem]="currentItem" (valueChange)="valueChange.emit()"></kendo-filter-date-editor>
|
|
655
|
+
<kendo-filter-date-editor *ngSwitchCase="'date'" [currentItem]="currentItem" [isDisabled]="isEditorDisabled" (valueChange)="valueChange.emit()"></kendo-filter-date-editor>
|
|
662
656
|
</ng-container>
|
|
663
657
|
|
|
664
658
|
<div class="k-filter-toolbar-item">
|
|
@@ -672,7 +666,7 @@ FilterExpressionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
|
|
|
672
666
|
</div>
|
|
673
667
|
</div>
|
|
674
668
|
</div>
|
|
675
|
-
`, isInline: true, components: [{ type:
|
|
669
|
+
`, 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", "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"] }] });
|
|
676
670
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterExpressionComponent, decorators: [{
|
|
677
671
|
type: Component,
|
|
678
672
|
args: [{
|
|
@@ -696,15 +690,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
696
690
|
<kendo-filter-expression-operators
|
|
697
691
|
[currentItem]="currentItem"
|
|
698
692
|
[operators]="operators"
|
|
699
|
-
(valueChange)="
|
|
693
|
+
(valueChange)="onOperatorChange($event);">
|
|
700
694
|
</kendo-filter-expression-operators>
|
|
701
695
|
</div>
|
|
702
696
|
|
|
703
697
|
<ng-container [ngSwitch]="getEditorType()">
|
|
704
|
-
<kendo-filter-text-editor *ngSwitchCase="'string'" [currentItem]="currentItem" (valueChange)="valueChange.emit()"></kendo-filter-text-editor>
|
|
705
|
-
<kendo-filter-numeric-editor *ngSwitchCase="'number'" [currentItem]="currentItem" (valueChange)="valueChange.emit()"></kendo-filter-numeric-editor>
|
|
698
|
+
<kendo-filter-text-editor *ngSwitchCase="'string'" [currentItem]="currentItem" [isDisabled]="isEditorDisabled" (valueChange)="valueChange.emit()"></kendo-filter-text-editor>
|
|
699
|
+
<kendo-filter-numeric-editor *ngSwitchCase="'number'" [currentItem]="currentItem" [isDisabled]="isEditorDisabled" (valueChange)="valueChange.emit()"></kendo-filter-numeric-editor>
|
|
706
700
|
<kendo-filter-boolean-editor *ngSwitchCase="'boolean'" [currentItem]="currentItem" (valueChange)="valueChange.emit()"></kendo-filter-boolean-editor>
|
|
707
|
-
<kendo-filter-date-editor *ngSwitchCase="'date'" [currentItem]="currentItem" (valueChange)="valueChange.emit()"></kendo-filter-date-editor>
|
|
701
|
+
<kendo-filter-date-editor *ngSwitchCase="'date'" [currentItem]="currentItem" [isDisabled]="isEditorDisabled" (valueChange)="valueChange.emit()"></kendo-filter-date-editor>
|
|
708
702
|
</ng-container>
|
|
709
703
|
|
|
710
704
|
<div class="k-filter-toolbar-item">
|
|
@@ -1157,7 +1151,10 @@ class FilterComponent {
|
|
|
1157
1151
|
if (foundFilter.editor === 'date' && filterDescriptor.value) {
|
|
1158
1152
|
filterDescriptor.value = new Date(filterDescriptor.value);
|
|
1159
1153
|
}
|
|
1160
|
-
if (!filterDescriptor.value
|
|
1154
|
+
if (!isPresent(filterDescriptor.value)) {
|
|
1155
|
+
filterDescriptor.value = null;
|
|
1156
|
+
}
|
|
1157
|
+
if (nullOperators.indexOf(filterDescriptor.operator) >= 0) {
|
|
1161
1158
|
filterDescriptor.value = null;
|
|
1162
1159
|
}
|
|
1163
1160
|
}
|
|
@@ -1173,7 +1170,14 @@ class FilterComponent {
|
|
|
1173
1170
|
}
|
|
1174
1171
|
}
|
|
1175
1172
|
FilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterComponent, deps: [{ token: FilterService }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1176
|
-
FilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterComponent, selector: "kendo-filter", inputs: { filters: "filters", value: "value" }, outputs: { valueChange: "valueChange" }, host: { properties: { "attr.dir": "this.direction" } }, providers: [
|
|
1173
|
+
FilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterComponent, selector: "kendo-filter", inputs: { filters: "filters", value: "value" }, outputs: { valueChange: "valueChange" }, host: { properties: { "attr.dir": "this.direction" } }, providers: [
|
|
1174
|
+
LocalizationService,
|
|
1175
|
+
{
|
|
1176
|
+
provide: L10N_PREFIX,
|
|
1177
|
+
useValue: 'kendo.filter'
|
|
1178
|
+
},
|
|
1179
|
+
FilterService
|
|
1180
|
+
], ngImport: i0, template: `
|
|
1177
1181
|
<ng-container kendoFilterLocalizedMessages
|
|
1178
1182
|
i18n-editorDateTodayText="kendo.filter.editorDateTodayText|The text of the Today button of the Date editor"
|
|
1179
1183
|
editorDateTodayText="Today"
|
|
@@ -1302,6 +1306,14 @@ FilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
1302
1306
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterComponent, decorators: [{
|
|
1303
1307
|
type: Component,
|
|
1304
1308
|
args: [{
|
|
1309
|
+
providers: [
|
|
1310
|
+
LocalizationService,
|
|
1311
|
+
{
|
|
1312
|
+
provide: L10N_PREFIX,
|
|
1313
|
+
useValue: 'kendo.filter'
|
|
1314
|
+
},
|
|
1315
|
+
FilterService
|
|
1316
|
+
],
|
|
1305
1317
|
selector: 'kendo-filter',
|
|
1306
1318
|
template: `
|
|
1307
1319
|
<ng-container kendoFilterLocalizedMessages
|
|
@@ -1428,8 +1440,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1428
1440
|
</li>
|
|
1429
1441
|
</ul>
|
|
1430
1442
|
</div>
|
|
1431
|
-
|
|
1432
|
-
providers: [FilterService]
|
|
1443
|
+
`
|
|
1433
1444
|
}]
|
|
1434
1445
|
}], ctorParameters: function () { return [{ type: FilterService }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { direction: [{
|
|
1435
1446
|
type: HostBinding,
|
|
@@ -1570,13 +1581,7 @@ FilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
1570
1581
|
LocalizedMessagesDirective,
|
|
1571
1582
|
CustomMessagesComponent,
|
|
1572
1583
|
AriaLabelValueDirective] });
|
|
1573
|
-
FilterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterModule,
|
|
1574
|
-
LocalizationService,
|
|
1575
|
-
{
|
|
1576
|
-
provide: L10N_PREFIX,
|
|
1577
|
-
useValue: 'kendo.filter'
|
|
1578
|
-
}
|
|
1579
|
-
], imports: [[SharedModule]] });
|
|
1584
|
+
FilterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterModule, imports: [[SharedModule]] });
|
|
1580
1585
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterModule, decorators: [{
|
|
1581
1586
|
type: NgModule,
|
|
1582
1587
|
args: [{
|
|
@@ -1603,14 +1608,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1603
1608
|
FilterDateEditorComponent,
|
|
1604
1609
|
LocalizedMessagesDirective,
|
|
1605
1610
|
CustomMessagesComponent,
|
|
1606
|
-
AriaLabelValueDirective]
|
|
1607
|
-
providers: [
|
|
1608
|
-
LocalizationService,
|
|
1609
|
-
{
|
|
1610
|
-
provide: L10N_PREFIX,
|
|
1611
|
-
useValue: 'kendo.filter'
|
|
1612
|
-
}
|
|
1613
|
-
]
|
|
1611
|
+
AriaLabelValueDirective]
|
|
1614
1612
|
}]
|
|
1615
1613
|
}] });
|
|
1616
1614
|
|
|
@@ -5,21 +5,19 @@
|
|
|
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 { FilterService } from './filter.service';
|
|
9
8
|
import * as i0 from "@angular/core";
|
|
10
9
|
/**
|
|
11
10
|
* @hidden
|
|
12
11
|
*/
|
|
13
12
|
export declare class FilterExpressionOperatorsComponent {
|
|
14
|
-
private filterService;
|
|
15
13
|
private localization;
|
|
16
14
|
currentItem: FilterDescriptor;
|
|
17
|
-
valueChange: EventEmitter<void>;
|
|
18
15
|
operators: {
|
|
19
16
|
text: string;
|
|
20
17
|
value: string;
|
|
21
18
|
}[];
|
|
22
|
-
|
|
19
|
+
valueChange: EventEmitter<string>;
|
|
20
|
+
constructor(localization: LocalizationService);
|
|
23
21
|
messageFor(key: string): string;
|
|
24
22
|
operatorValueChange(value: string): void;
|
|
25
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<FilterExpressionOperatorsComponent, never>;
|
|
@@ -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
|
}
|
package/filter.service.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
export declare class FilterService {
|
|
12
12
|
value: 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