@progress/kendo-angular-treelist 13.0.0-develop.2 → 13.0.0-develop.21
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/binding-directives/base-binding.directive.d.ts +5 -1
- package/binding-directives/data-bound-tree-component.d.ts +9 -0
- package/binding-directives/flat-binding.directive.d.ts +14 -3
- package/binding-directives/hierarchy-binding.directive.d.ts +12 -3
- package/column-menu/column-chooser.component.d.ts +10 -6
- package/column-menu/column-menu-chooser.component.d.ts +6 -10
- package/column-menu/column-menu-filter.component.d.ts +6 -10
- package/column-menu/column-menu-item-content-template.directive.d.ts +1 -1
- package/column-menu/column-menu-item.component.d.ts +8 -6
- package/column-menu/column-menu-lock.component.d.ts +5 -11
- package/column-menu/column-menu-settings.interface.d.ts +7 -10
- package/column-menu/column-menu-sort.component.d.ts +5 -11
- package/column-menu/column-menu.component.d.ts +1 -1
- package/column-menu/column-menu.service.d.ts +1 -1
- package/column-resizing/column-resize.interface.d.ts +1 -1
- package/columns/checkbox-column.component.d.ts +1 -1
- package/columns/column-base.d.ts +4 -0
- package/columns/column-group.component.d.ts +9 -6
- package/columns/column.component.d.ts +16 -66
- package/columns/command-column.component.d.ts +13 -15
- package/columns/rowreorder-column.component.d.ts +19 -0
- package/columns/span-column.component.d.ts +10 -81
- package/data/change-event-args.interface.d.ts +2 -2
- package/data/data.collection.d.ts +6 -0
- package/dragdrop/column-reorder-config.d.ts +1 -1
- package/editing/add-command.directive.d.ts +1 -1
- package/editing/cancel-command.directive.d.ts +1 -1
- package/editing/edit-command.directive.d.ts +1 -1
- package/editing/edit-event-args.interface.d.ts +1 -1
- package/editing/edit-template.directive.d.ts +11 -0
- package/editing/remove-command.directive.d.ts +1 -1
- package/editing/remove-event-args.interface.d.ts +1 -1
- package/editing/save-command.directive.d.ts +1 -1
- package/editing/save-event-args.interface.d.ts +1 -1
- package/esm2020/binding-directives/base-binding.directive.mjs +9 -3
- package/esm2020/binding-directives/flat-binding.directive.mjs +56 -6
- package/esm2020/binding-directives/hierarchy-binding.directive.mjs +46 -6
- package/esm2020/column-menu/column-chooser.component.mjs +10 -6
- package/esm2020/column-menu/column-menu-chooser.component.mjs +8 -12
- package/esm2020/column-menu/column-menu-filter.component.mjs +6 -10
- package/esm2020/column-menu/column-menu-item-content-template.directive.mjs +1 -1
- package/esm2020/column-menu/column-menu-item.component.mjs +9 -7
- package/esm2020/column-menu/column-menu-lock.component.mjs +5 -11
- package/esm2020/column-menu/column-menu-sort.component.mjs +5 -11
- package/esm2020/column-menu/column-menu.component.mjs +2 -2
- package/esm2020/column-menu/column-menu.service.mjs +1 -1
- package/esm2020/columns/checkbox-column.component.mjs +1 -1
- package/esm2020/columns/column-base.mjs +4 -0
- package/esm2020/columns/column-group.component.mjs +9 -6
- package/esm2020/columns/column.component.mjs +16 -39
- package/esm2020/columns/command-column.component.mjs +13 -15
- package/esm2020/columns/rowreorder-column.component.mjs +47 -0
- package/esm2020/columns/span-column.component.mjs +10 -81
- package/esm2020/data/data.collection.mjs +41 -28
- package/esm2020/editing/add-command.directive.mjs +2 -2
- package/esm2020/editing/base-command.directive.mjs +1 -1
- package/esm2020/editing/cancel-command.directive.mjs +2 -2
- package/esm2020/editing/edit-command.directive.mjs +2 -2
- package/esm2020/editing/edit-template.directive.mjs +11 -0
- package/esm2020/editing/remove-command.directive.mjs +2 -2
- package/esm2020/editing/save-command.directive.mjs +2 -2
- package/esm2020/excel/excel-command.directive.mjs +2 -2
- package/esm2020/filtering/cell/autocomplete-filter-cell.component.mjs +12 -1
- package/esm2020/filtering/cell/boolean-filter-cell.component.mjs +29 -12
- package/esm2020/filtering/cell/date-filter-cell.component.mjs +23 -12
- package/esm2020/filtering/cell/filter-cell-operators.component.mjs +36 -1
- package/esm2020/filtering/cell/filter-cell-wrapper.component.mjs +3 -1
- package/esm2020/filtering/cell/numeric-filter-cell.component.mjs +25 -13
- package/esm2020/filtering/cell/string-filter-cell.component.mjs +26 -14
- package/esm2020/filtering/date-filter.component.mjs +6 -1
- package/esm2020/filtering/filter-input.directive.mjs +29 -3
- package/esm2020/filtering/menu/boolean-filter-menu.component.mjs +33 -19
- package/esm2020/filtering/menu/date-filter-menu-input.component.mjs +1 -1
- package/esm2020/filtering/menu/date-filter-menu.component.mjs +12 -12
- package/esm2020/filtering/menu/filter-menu.component.mjs +1 -1
- package/esm2020/filtering/menu/numeric-filter-menu-input.component.mjs +1 -1
- package/esm2020/filtering/menu/numeric-filter-menu.component.mjs +12 -12
- package/esm2020/filtering/menu/string-filter-menu-input.component.mjs +19 -8
- package/esm2020/filtering/menu/string-filter-menu.component.mjs +15 -0
- package/esm2020/filtering/numeric-filter.component.mjs +4 -1
- package/esm2020/filtering/operators/after-eq-filter-operator.component.mjs +2 -5
- package/esm2020/filtering/operators/after-filter-operator.component.mjs +2 -5
- package/esm2020/filtering/operators/before-eq-filter-operator.component.mjs +2 -5
- package/esm2020/filtering/operators/before-filter-operator.component.mjs +3 -6
- package/esm2020/filtering/operators/contains-filter-operator.component.mjs +1 -4
- package/esm2020/filtering/operators/ends-with-filter-operator.component.mjs +1 -4
- package/esm2020/filtering/operators/eq-filter-operator.component.mjs +1 -4
- package/esm2020/filtering/operators/gt-filter-operator.component.mjs +1 -4
- package/esm2020/filtering/operators/gte-filter-operator.component.mjs +1 -4
- package/esm2020/filtering/operators/is-empty-filter-operator.component.mjs +1 -4
- package/esm2020/filtering/operators/is-not-empty-filter-operator.component.mjs +1 -4
- package/esm2020/filtering/operators/is-not-null-filter-operator.component.mjs +1 -4
- package/esm2020/filtering/operators/isnull-filter-operator.component.mjs +1 -4
- package/esm2020/filtering/operators/lt-filter-operator.component.mjs +2 -5
- package/esm2020/filtering/operators/lte-filter-operator.component.mjs +1 -4
- package/esm2020/filtering/operators/neq-filter-operator.component.mjs +1 -4
- package/esm2020/filtering/operators/not-contains-filter-operator.component.mjs +1 -4
- package/esm2020/filtering/operators/starts-with-filter-operator.component.mjs +1 -4
- package/esm2020/filtering/string-filter.component.mjs +2 -1
- package/esm2020/index.mjs +2 -0
- package/esm2020/localization/custom-messages.component.mjs +1 -1
- package/esm2020/localization/messages.mjs +13 -1
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/pager/pager-element.component.mjs +17 -0
- package/esm2020/pager/pager-next-buttons.component.mjs +8 -11
- package/esm2020/pager/pager-numeric-buttons.component.mjs +1 -1
- package/esm2020/pager/pager-page-sizes.component.mjs +1 -1
- package/esm2020/pager/pager-prev-buttons.component.mjs +8 -11
- package/esm2020/pager/pager-template.directive.mjs +1 -1
- package/esm2020/pdf/pdf-command.directive.mjs +2 -2
- package/esm2020/pdf/pdf-margin.component.mjs +9 -0
- package/esm2020/rendering/cell-template.directive.mjs +1 -1
- package/esm2020/rendering/cell.component.mjs +73 -20
- package/esm2020/rendering/common/spacer.component.mjs +1 -1
- package/esm2020/rendering/constants.mjs +4 -0
- package/esm2020/rendering/header/header.component.mjs +6 -1
- package/esm2020/rendering/list.component.mjs +20 -18
- package/esm2020/rendering/table-body.component.mjs +5 -3
- package/esm2020/row-reordering/flat-reorder.service.mjs +48 -0
- package/esm2020/row-reordering/hierarchical-reorder.service.mjs +55 -0
- package/esm2020/row-reordering/row-reorder.service.mjs +220 -0
- package/esm2020/row-reordering/types.mjs +5 -0
- package/esm2020/row-reordering/utils.mjs +129 -0
- package/esm2020/shared.module.mjs +8 -3
- package/esm2020/treelist.component.mjs +229 -321
- package/esm2020/treelist.module.mjs +71 -66
- package/excel/excel-command.directive.d.ts +1 -1
- package/excel/excel-export-data.interface.d.ts +1 -1
- package/excel/excel.component.d.ts +9 -8
- package/fesm2015/progress-kendo-angular-treelist.mjs +1434 -832
- package/fesm2020/progress-kendo-angular-treelist.mjs +1426 -833
- package/filtering/cell/autocomplete-filter-cell.component.d.ts +4 -0
- package/filtering/cell/boolean-filter-cell.component.d.ts +19 -11
- package/filtering/cell/date-filter-cell.component.d.ts +15 -11
- package/filtering/cell/filter-cell-operators.component.d.ts +29 -1
- package/filtering/cell/numeric-filter-cell.component.d.ts +17 -12
- package/filtering/cell/string-filter-cell.component.d.ts +16 -11
- package/filtering/date-filter.component.d.ts +7 -11
- package/filtering/filter-input.directive.d.ts +7 -1
- package/filtering/menu/boolean-filter-menu.component.d.ts +19 -13
- package/filtering/menu/date-filter-menu.component.d.ts +12 -12
- package/filtering/menu/numeric-filter-menu.component.d.ts +12 -12
- package/filtering/menu/string-filter-menu-input.component.d.ts +4 -0
- package/filtering/menu/string-filter-menu.component.d.ts +15 -0
- package/filtering/numeric-filter.component.d.ts +4 -1
- package/filtering/operators/after-eq-filter-operator.component.d.ts +4 -0
- package/filtering/operators/after-filter-operator.component.d.ts +4 -0
- package/filtering/operators/before-eq-filter-operator.component.d.ts +4 -0
- package/filtering/operators/before-filter-operator.component.d.ts +4 -0
- package/filtering/operators/contains-filter-operator.component.d.ts +1 -4
- package/filtering/operators/ends-with-filter-operator.component.d.ts +1 -4
- package/filtering/operators/eq-filter-operator.component.d.ts +1 -4
- package/filtering/operators/gte-filter-operator.component.d.ts +1 -4
- package/filtering/operators/is-empty-filter-operator.component.d.ts +1 -4
- package/filtering/operators/is-not-empty-filter-operator.component.d.ts +1 -4
- package/filtering/operators/is-not-null-filter-operator.component.d.ts +1 -4
- package/filtering/operators/isnull-filter-operator.component.d.ts +1 -4
- package/filtering/operators/lt-filter-operator.component.d.ts +4 -0
- package/filtering/operators/neq-filter-operator.component.d.ts +1 -4
- package/filtering/operators/not-contains-filter-operator.component.d.ts +1 -4
- package/filtering/operators/starts-with-filter-operator.component.d.ts +1 -4
- package/filtering/string-filter.component.d.ts +2 -1
- package/index.d.ts +2 -0
- package/localization/custom-messages.component.d.ts +1 -1
- package/localization/messages.d.ts +42 -2
- package/navigation/navigation-cell.interface.d.ts +1 -4
- package/navigation/navigation-row.interface.d.ts +1 -4
- package/package.json +16 -15
- package/pager/pager-element.component.d.ts +9 -0
- package/pager/pager-next-buttons.component.d.ts +0 -3
- package/pager/pager-numeric-buttons.component.d.ts +1 -1
- package/pager/pager-prev-buttons.component.d.ts +0 -3
- package/pager/pager-settings.d.ts +1 -15
- package/pager/pager-template.directive.d.ts +1 -1
- package/pdf/pdf-command.directive.d.ts +1 -1
- package/pdf/pdf-margin.component.d.ts +9 -0
- package/rendering/cell-template.directive.d.ts +1 -1
- package/rendering/cell.component.d.ts +10 -1
- package/rendering/common/spacer.component.d.ts +1 -1
- package/rendering/constants.d.ts +4 -0
- package/rendering/header/header.component.d.ts +1 -0
- package/row-reordering/flat-reorder.service.d.ts +16 -0
- package/row-reordering/hierarchical-reorder.service.d.ts +16 -0
- package/row-reordering/row-reorder.service.d.ts +61 -0
- package/row-reordering/types.d.ts +39 -0
- package/row-reordering/utils.d.ts +85 -0
- package/schematics/ngAdd/index.js +3 -3
- package/scrolling/content-scroll-event.d.ts +1 -1
- package/scrolling/scroll-bottom-event.d.ts +1 -1
- package/scrolling/scroll-request.service.d.ts +6 -0
- package/selection/selectable-settings.d.ts +5 -15
- package/selection/selectable.directive.d.ts +1 -1
- package/selection/selection-change-event.d.ts +1 -1
- package/shared.module.d.ts +5 -4
- package/treelist.component.d.ts +66 -289
- package/treelist.module.d.ts +68 -66
|
@@ -6,6 +6,7 @@ import { Component, Input } from '@angular/core';
|
|
|
6
6
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
7
|
import { FilterService } from '../filter.service';
|
|
8
8
|
import { StringFilterComponent } from '../string-filter.component';
|
|
9
|
+
import { replaceMessagePlaceholder } from '../../utils';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
11
|
import * as i1 from "../filter.service";
|
|
11
12
|
import * as i2 from "@progress/kendo-angular-l10n";
|
|
@@ -19,17 +20,16 @@ import * as i6 from "../filter-input.directive";
|
|
|
19
20
|
*
|
|
20
21
|
* @example
|
|
21
22
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* ```
|
|
23
|
+
* ```html
|
|
24
|
+
* <kendo-treelist-column field="ProductName">
|
|
25
|
+
* <ng-template kendoTreeListFilterCellTemplate let-filter let-column="column">
|
|
26
|
+
* <kendo-treelist-string-filter-cell
|
|
27
|
+
* [column]="column"
|
|
28
|
+
* [filter]="filter">
|
|
29
|
+
* </kendo-treelist-string-filter-cell>
|
|
30
|
+
* </ng-template>
|
|
31
|
+
* </kendo-treelist-column>
|
|
32
|
+
* ```
|
|
33
33
|
*/
|
|
34
34
|
export class StringFilterCellComponent extends StringFilterComponent {
|
|
35
35
|
constructor(filterService, localization) {
|
|
@@ -38,15 +38,25 @@ export class StringFilterCellComponent extends StringFilterComponent {
|
|
|
38
38
|
* Determines the delay time (in milliseconds) before the filter value is submitted.
|
|
39
39
|
* A value of `0` indicates no delay. The default value is `500`.
|
|
40
40
|
* @type {boolean}
|
|
41
|
+
* @default 500
|
|
41
42
|
*/
|
|
42
43
|
this.filterDelay = 500;
|
|
43
44
|
/**
|
|
44
45
|
* Determines if the drop-down filter operators will be displayed.
|
|
45
46
|
* The default value is `true`.
|
|
46
47
|
* @type {boolean}
|
|
48
|
+
* @default true
|
|
47
49
|
*/
|
|
48
50
|
this.showOperators = true;
|
|
49
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* @hidden
|
|
54
|
+
*/
|
|
55
|
+
get columnLabel() {
|
|
56
|
+
const localizationMsg = this.localization.get('filterInputLabel') || '';
|
|
57
|
+
const columnName = this.column.title || this.column.field;
|
|
58
|
+
return replaceMessagePlaceholder(localizationMsg, 'columnName', columnName);
|
|
59
|
+
}
|
|
50
60
|
}
|
|
51
61
|
StringFilterCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: StringFilterCellComponent, deps: [{ token: i1.FilterService }, { token: i2.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
52
62
|
StringFilterCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: StringFilterCellComponent, selector: "kendo-treelist-string-filter-cell", inputs: { filterDelay: "filterDelay", showOperators: "showOperators" }, usesInheritance: true, ngImport: i0, template: `
|
|
@@ -56,14 +66,15 @@ StringFilterCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
|
|
|
56
66
|
[operators]="operators"
|
|
57
67
|
[defaultOperator]="operator"
|
|
58
68
|
[showOperators]="showOperators">
|
|
59
|
-
<input
|
|
69
|
+
<input
|
|
60
70
|
class="k-textbox k-input k-input-md k-rounded-md k-input-solid"
|
|
61
71
|
kendoTreeListFocusable
|
|
62
72
|
kendoFilterInput
|
|
73
|
+
[columnLabel]="columnLabel"
|
|
63
74
|
[filterDelay]="filterDelay"
|
|
64
75
|
[ngModel]="currentFilter?.value" />
|
|
65
76
|
</kendo-treelist-filter-wrapper-cell>
|
|
66
|
-
`, isInline: true, components: [{ type: i3.FilterCellWrapperComponent, selector: "kendo-treelist-filter-wrapper-cell", inputs: ["showOperators"] }], directives: [{ type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5.FocusableDirective, selector: "[kendoTreeListFocusable],\n [kendoTreeListAddCommand],\n [kendoTreeListEditCommand],\n [kendoTreeListRemoveCommand],\n [kendoTreeListSaveCommand],\n [kendoTreeListCancelCommand]\n ", inputs: ["kendoTreeListFocusable", "enabled", "kendoTreeListAddCommand", "kendoTreeListEditCommand", "kendoTreeListRemoveCommand", "kendoTreeListSaveCommand", "kendoTreeListCancelCommand"] }, { type: i6.FilterInputDirective, selector: "[kendoFilterInput]", inputs: ["filterDelay", "value"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
77
|
+
`, isInline: true, components: [{ type: i3.FilterCellWrapperComponent, selector: "kendo-treelist-filter-wrapper-cell", inputs: ["showOperators"] }], directives: [{ type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5.FocusableDirective, selector: "[kendoTreeListFocusable],\n [kendoTreeListAddCommand],\n [kendoTreeListEditCommand],\n [kendoTreeListRemoveCommand],\n [kendoTreeListSaveCommand],\n [kendoTreeListCancelCommand]\n ", inputs: ["kendoTreeListFocusable", "enabled", "kendoTreeListAddCommand", "kendoTreeListEditCommand", "kendoTreeListRemoveCommand", "kendoTreeListSaveCommand", "kendoTreeListCancelCommand"] }, { type: i6.FilterInputDirective, selector: "[kendoFilterInput]", inputs: ["filterDelay", "columnLabel", "column", "value"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
67
78
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: StringFilterCellComponent, decorators: [{
|
|
68
79
|
type: Component,
|
|
69
80
|
args: [{
|
|
@@ -75,10 +86,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
75
86
|
[operators]="operators"
|
|
76
87
|
[defaultOperator]="operator"
|
|
77
88
|
[showOperators]="showOperators">
|
|
78
|
-
<input
|
|
89
|
+
<input
|
|
79
90
|
class="k-textbox k-input k-input-md k-rounded-md k-input-solid"
|
|
80
91
|
kendoTreeListFocusable
|
|
81
92
|
kendoFilterInput
|
|
93
|
+
[columnLabel]="columnLabel"
|
|
82
94
|
[filterDelay]="filterDelay"
|
|
83
95
|
[ngModel]="currentFilter?.value" />
|
|
84
96
|
</kendo-treelist-filter-wrapper-cell>
|
|
@@ -33,25 +33,30 @@ export class DateFilterComponent extends BaseFilterCellComponent {
|
|
|
33
33
|
/**
|
|
34
34
|
* The default filter operator. Defaults to `contains`.
|
|
35
35
|
* @type {string}
|
|
36
|
+
* @default 'gte'
|
|
36
37
|
*/
|
|
37
38
|
this.operator = "gte";
|
|
38
39
|
/**
|
|
39
40
|
* Defines the active view that the calendar initially renders.
|
|
40
41
|
* By default, the active view is `month`.
|
|
41
42
|
*
|
|
42
|
-
*
|
|
43
|
+
* You have to set `activeView` within the `topView`-`bottomView` range.
|
|
44
|
+
* @default 'month'
|
|
43
45
|
*/
|
|
44
46
|
this.activeView = "month";
|
|
45
47
|
/**
|
|
46
48
|
* Defines the bottommost calendar view, to which the user can navigate.
|
|
49
|
+
* @default 'month'
|
|
47
50
|
*/
|
|
48
51
|
this.bottomView = "month";
|
|
49
52
|
/**
|
|
50
53
|
* Defines the topmost calendar view, to which the user can navigate.
|
|
54
|
+
* @default 'century'
|
|
51
55
|
*/
|
|
52
56
|
this.topView = "century";
|
|
53
57
|
/**
|
|
54
58
|
* Determines whether to display a week number column in the `month` view of the Calendar.
|
|
59
|
+
* @default false
|
|
55
60
|
*/
|
|
56
61
|
this.weekNumber = false;
|
|
57
62
|
this.defaultOperators = dateOperators(this.localization);
|
|
@@ -2,17 +2,20 @@
|
|
|
2
2
|
* Copyright © 2023 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 { Directive, ElementRef, EventEmitter, Inject, Input, NgZone, Renderer2, Self } from '@angular/core';
|
|
5
|
+
import { Directive, ElementRef, EventEmitter, Inject, Input, NgZone, Renderer2, Self, ContentChild } from '@angular/core';
|
|
6
6
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
7
7
|
import { debounceTime, filter } from 'rxjs/operators';
|
|
8
8
|
import { Subject } from 'rxjs';
|
|
9
9
|
import { isChanged } from '../utils';
|
|
10
|
+
import { KendoInput, isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
10
11
|
import * as i0 from "@angular/core";
|
|
11
12
|
/**
|
|
12
13
|
* @hidden
|
|
13
14
|
*/
|
|
14
15
|
export class FilterInputDirective {
|
|
15
16
|
constructor(valueAccessors, ngZone, element, renderer) {
|
|
17
|
+
this.element = element;
|
|
18
|
+
this.renderer = renderer;
|
|
16
19
|
this.change = new EventEmitter();
|
|
17
20
|
this.composing = false;
|
|
18
21
|
this.filterDelay = 500;
|
|
@@ -34,6 +37,7 @@ export class FilterInputDirective {
|
|
|
34
37
|
this.accessor.setDisabledState(value);
|
|
35
38
|
}
|
|
36
39
|
ngAfterViewInit() {
|
|
40
|
+
this.addAriaAttributes();
|
|
37
41
|
this.accessor.registerOnChange(x => this.filterDelay > 0 ?
|
|
38
42
|
this.changeRequests.next(x) :
|
|
39
43
|
this.change.emit(x));
|
|
@@ -59,9 +63,24 @@ export class FilterInputDirective {
|
|
|
59
63
|
this.changeRequestsSubscription.unsubscribe();
|
|
60
64
|
}
|
|
61
65
|
}
|
|
66
|
+
addAriaAttributes() {
|
|
67
|
+
const ariaValue = this.columnLabel;
|
|
68
|
+
if (this.kendoInput && this.kendoInput.focusableId && isDocumentAvailable()) {
|
|
69
|
+
const focusableElement = this.element.nativeElement.querySelector(`#${this.kendoInput.focusableId}`) ||
|
|
70
|
+
this.element.nativeElement;
|
|
71
|
+
this.renderer.setAttribute(focusableElement, 'aria-label', ariaValue);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
const inputElement = this.element.nativeElement.querySelector('.k-input-inner');
|
|
75
|
+
const elementToSetLabel = inputElement ? inputElement : this.element.nativeElement;
|
|
76
|
+
if (ariaValue) {
|
|
77
|
+
this.renderer.setAttribute(elementToSetLabel, 'aria-label', ariaValue);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
62
81
|
}
|
|
63
82
|
FilterInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FilterInputDirective, deps: [{ token: NG_VALUE_ACCESSOR, self: true }, { token: i0.NgZone }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
64
|
-
FilterInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: FilterInputDirective, selector: "[kendoFilterInput]", inputs: { filterDelay: "filterDelay", value: "value" }, usesOnChanges: true, ngImport: i0 });
|
|
83
|
+
FilterInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: FilterInputDirective, selector: "[kendoFilterInput]", inputs: { filterDelay: "filterDelay", columnLabel: "columnLabel", column: "column", value: "value" }, queries: [{ propertyName: "kendoInput", first: true, predicate: KendoInput, descendants: true, static: true }], usesOnChanges: true, ngImport: i0 });
|
|
65
84
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FilterInputDirective, decorators: [{
|
|
66
85
|
type: Directive,
|
|
67
86
|
args: [{
|
|
@@ -72,7 +91,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
72
91
|
}, {
|
|
73
92
|
type: Inject,
|
|
74
93
|
args: [NG_VALUE_ACCESSOR]
|
|
75
|
-
}] }, { type: i0.NgZone }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: {
|
|
94
|
+
}] }, { type: i0.NgZone }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { kendoInput: [{
|
|
95
|
+
type: ContentChild,
|
|
96
|
+
args: [KendoInput, { static: true }]
|
|
97
|
+
}], filterDelay: [{
|
|
98
|
+
type: Input
|
|
99
|
+
}], columnLabel: [{
|
|
100
|
+
type: Input
|
|
101
|
+
}], column: [{
|
|
76
102
|
type: Input
|
|
77
103
|
}], value: [{
|
|
78
104
|
type: Input
|
|
@@ -2,35 +2,36 @@
|
|
|
2
2
|
* Copyright © 2023 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 { Component, Input, HostBinding } from '@angular/core';
|
|
5
|
+
import { Component, Input, HostBinding, ViewChild, ElementRef, Renderer2 } from '@angular/core';
|
|
6
6
|
import { FilterService } from '../filter.service';
|
|
7
7
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
8
|
import { BooleanFilterComponent } from '../boolean-filter.component';
|
|
9
9
|
import { guid } from '@progress/kendo-angular-common';
|
|
10
|
+
import { replaceMessagePlaceholder } from '../../utils';
|
|
10
11
|
import * as i0 from "@angular/core";
|
|
11
12
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
12
13
|
import * as i2 from "@angular/common";
|
|
13
14
|
import * as i3 from "@progress/kendo-angular-inputs";
|
|
14
15
|
/**
|
|
15
|
-
* Represents a Boolean-filter menu component.
|
|
16
|
+
* Represents a Boolean-filter menu component. [See example](slug:columnmenu_treelist#toc-customizing-the-content).
|
|
16
17
|
*
|
|
17
18
|
* @example
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* </kendo-treelist-column>
|
|
19
|
+
* ```html
|
|
20
|
+
* <kendo-treelist-column field="Discontinued" title="Discontinued">
|
|
21
|
+
* <ng-template kendoTreeListFilterMenuTemplate let-filter let-column="column" let-filterService="filterService">
|
|
22
|
+
* <kendo-treelist-boolean-filter-menu
|
|
23
|
+
* [column]="column"
|
|
24
|
+
* [filter]="filter"
|
|
25
|
+
* [filterService]="filterService">
|
|
26
|
+
* </kendo-treelist-boolean-filter-menu>
|
|
27
|
+
* </ng-template>
|
|
28
|
+
* </kendo-treelist-column>
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
31
|
export class BooleanFilterMenuComponent extends BooleanFilterComponent {
|
|
32
|
-
constructor(localization) {
|
|
32
|
+
constructor(renderer, localization) {
|
|
33
33
|
super(null, localization);
|
|
34
|
+
this.renderer = renderer;
|
|
34
35
|
/**
|
|
35
36
|
* The current menu filter.
|
|
36
37
|
* @type {CompositeFilterDescriptor}
|
|
@@ -66,12 +67,22 @@ export class BooleanFilterMenuComponent extends BooleanFilterComponent {
|
|
|
66
67
|
isSelected(radioValue) {
|
|
67
68
|
return this.filtersByField(this.column.field).some(({ value }) => value === radioValue);
|
|
68
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* @hidden
|
|
72
|
+
*/
|
|
73
|
+
columnLabel() {
|
|
74
|
+
const elem = this.inputElem.nativeElement;
|
|
75
|
+
const localizationMsg = this.localization.get('filterInputLabel') || '';
|
|
76
|
+
const columnName = this.column.title || this.column.field;
|
|
77
|
+
const fullMessage = replaceMessagePlaceholder(localizationMsg, 'columnName', columnName);
|
|
78
|
+
this.renderer.setAttribute(elem, 'aria-label', fullMessage);
|
|
79
|
+
}
|
|
69
80
|
}
|
|
70
|
-
BooleanFilterMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BooleanFilterMenuComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
71
|
-
BooleanFilterMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: BooleanFilterMenuComponent, selector: "kendo-treelist-boolean-filter-menu", inputs: { filter: "filter", filterService: "filterService" }, host: { properties: { "class.k-filtercell": "this.hostClasses" } }, usesInheritance: true, ngImport: i0, template: `
|
|
81
|
+
BooleanFilterMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: BooleanFilterMenuComponent, deps: [{ token: i0.Renderer2 }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
82
|
+
BooleanFilterMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: BooleanFilterMenuComponent, selector: "kendo-treelist-boolean-filter-menu", inputs: { filter: "filter", filterService: "filterService" }, host: { properties: { "class.k-filtercell": "this.hostClasses" } }, viewQueries: [{ propertyName: "inputElem", first: true, predicate: ["inputElem"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
72
83
|
<ul class="k-radio-list k-reset">
|
|
73
84
|
<li *ngFor="let item of items">
|
|
74
|
-
<input type="radio"
|
|
85
|
+
<input #inputElem type="radio"
|
|
75
86
|
kendoRadioButton
|
|
76
87
|
[name]="idPrefix"
|
|
77
88
|
[checked]="isSelected(item.value)"
|
|
@@ -89,7 +100,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
89
100
|
template: `
|
|
90
101
|
<ul class="k-radio-list k-reset">
|
|
91
102
|
<li *ngFor="let item of items">
|
|
92
|
-
<input type="radio"
|
|
103
|
+
<input #inputElem type="radio"
|
|
93
104
|
kendoRadioButton
|
|
94
105
|
[name]="idPrefix"
|
|
95
106
|
[checked]="isSelected(item.value)"
|
|
@@ -101,9 +112,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
101
112
|
</ul>
|
|
102
113
|
`
|
|
103
114
|
}]
|
|
104
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { hostClasses: [{
|
|
115
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i1.LocalizationService }]; }, propDecorators: { hostClasses: [{
|
|
105
116
|
type: HostBinding,
|
|
106
117
|
args: ['class.k-filtercell']
|
|
118
|
+
}], inputElem: [{
|
|
119
|
+
type: ViewChild,
|
|
120
|
+
args: ['inputElem']
|
|
107
121
|
}], filter: [{
|
|
108
122
|
type: Input
|
|
109
123
|
}], filterService: [{
|
|
@@ -59,7 +59,7 @@ DateFilterMenuInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12
|
|
|
59
59
|
>
|
|
60
60
|
</kendo-datepicker>
|
|
61
61
|
</kendo-treelist-filter-menu-input-wrapper>
|
|
62
|
-
`, isInline: true, components: [{ type: i2.FilterMenuInputWrapperComponent, selector: "kendo-treelist-filter-menu-input-wrapper", inputs: ["filterService", "currentFilter"] }, { type: i3.DatePickerComponent, selector: "kendo-datepicker", inputs: ["focusableId", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "navigationItemTemplate", "activeView", "bottomView", "topView", "calendarType", "animateCalendarNavigation", "disabled", "readonly", "readOnlyInput", "popupSettings", "navigation", "min", "max", "incompleteDateValidation", "focusedDate", "value", "format", "twoDigitYearMax", "formatPlaceholder", "placeholder", "tabindex", "tabIndex", "disabledDates", "title", "subtitle", "rangeValidation", "disabledDatesValidation", "weekNumber", "size", "rounded", "fillMode", "adaptiveMode"], outputs: ["valueChange", "focus", "blur", "open", "close"], exportAs: ["kendo-datepicker"] }], directives: [{ type: i4.FilterInputDirective, selector: "[kendoFilterInput]", inputs: ["filterDelay", "value"] }] });
|
|
62
|
+
`, isInline: true, components: [{ type: i2.FilterMenuInputWrapperComponent, selector: "kendo-treelist-filter-menu-input-wrapper", inputs: ["filterService", "currentFilter"] }, { type: i3.DatePickerComponent, selector: "kendo-datepicker", inputs: ["focusableId", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "navigationItemTemplate", "activeView", "bottomView", "topView", "calendarType", "animateCalendarNavigation", "disabled", "readonly", "readOnlyInput", "popupSettings", "navigation", "min", "max", "incompleteDateValidation", "focusedDate", "value", "format", "twoDigitYearMax", "formatPlaceholder", "placeholder", "tabindex", "tabIndex", "disabledDates", "title", "subtitle", "rangeValidation", "disabledDatesValidation", "weekNumber", "size", "rounded", "fillMode", "adaptiveMode"], outputs: ["valueChange", "focus", "blur", "open", "close"], exportAs: ["kendo-datepicker"] }], directives: [{ type: i4.FilterInputDirective, selector: "[kendoFilterInput]", inputs: ["filterDelay", "columnLabel", "column", "value"] }] });
|
|
63
63
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DateFilterMenuInputComponent, decorators: [{
|
|
64
64
|
type: Component,
|
|
65
65
|
args: [{
|
|
@@ -17,18 +17,17 @@ import * as i4 from "@angular/common";
|
|
|
17
17
|
* Represents a date-filter menu component.
|
|
18
18
|
*
|
|
19
19
|
* @example
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* ```
|
|
20
|
+
* ```html
|
|
21
|
+
* <kendo-treelist-column field="OrderDate" title="Order Date">
|
|
22
|
+
* <ng-template kendoTreeListFilterMenuTemplate let-filter let-column="column" let-filterService="filterService">
|
|
23
|
+
* <kendo-treelist-date-filter-menu
|
|
24
|
+
* [column]="column"
|
|
25
|
+
* [filter]="filter"
|
|
26
|
+
* [filterService]="filterService">
|
|
27
|
+
* </kendo-treelist-date-filter-menu>
|
|
28
|
+
* </ng-template>
|
|
29
|
+
* </kendo-treelist-column>
|
|
30
|
+
* ```
|
|
32
31
|
*/
|
|
33
32
|
export class DateFilterMenuComponent extends DateFilterComponent {
|
|
34
33
|
constructor(localization) {
|
|
@@ -41,6 +40,7 @@ export class DateFilterMenuComponent extends DateFilterComponent {
|
|
|
41
40
|
this.filter = { filters: [], logic: "and" };
|
|
42
41
|
/**
|
|
43
42
|
* Determines if the inputs of second criteria will be displayed.
|
|
43
|
+
* @default true
|
|
44
44
|
*/
|
|
45
45
|
this.extra = true;
|
|
46
46
|
}
|
|
@@ -60,7 +60,7 @@ FilterMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
60
60
|
>
|
|
61
61
|
</kendo-treelist-filter-menu-container>
|
|
62
62
|
</ng-template>
|
|
63
|
-
`, isInline: true, components: [{ type: i4.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }, { type: i5.FilterMenuContainerComponent, selector: "kendo-treelist-filter-menu-container", inputs: ["column", "filter", "actionsClass"], outputs: ["close"] }] });
|
|
63
|
+
`, isInline: true, components: [{ type: i4.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: i5.FilterMenuContainerComponent, selector: "kendo-treelist-filter-menu-container", inputs: ["column", "filter", "actionsClass"], outputs: ["close"] }] });
|
|
64
64
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FilterMenuComponent, decorators: [{
|
|
65
65
|
type: Component,
|
|
66
66
|
args: [{
|
|
@@ -50,7 +50,7 @@ NumericFilterMenuInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion:
|
|
|
50
50
|
[step]="step">
|
|
51
51
|
</kendo-numerictextbox>
|
|
52
52
|
</kendo-treelist-filter-menu-input-wrapper>
|
|
53
|
-
`, isInline: true, components: [{ type: i1.FilterMenuInputWrapperComponent, selector: "kendo-treelist-filter-menu-input-wrapper", inputs: ["filterService", "currentFilter"] }, { type: i2.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"] }], directives: [{ type: i3.FilterInputDirective, selector: "[kendoFilterInput]", inputs: ["filterDelay", "value"] }] });
|
|
53
|
+
`, isInline: true, components: [{ type: i1.FilterMenuInputWrapperComponent, selector: "kendo-treelist-filter-menu-input-wrapper", inputs: ["filterService", "currentFilter"] }, { type: i2.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"] }], directives: [{ type: i3.FilterInputDirective, selector: "[kendoFilterInput]", inputs: ["filterDelay", "columnLabel", "column", "value"] }] });
|
|
54
54
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: NumericFilterMenuInputComponent, decorators: [{
|
|
55
55
|
type: Component,
|
|
56
56
|
args: [{
|
|
@@ -17,18 +17,17 @@ import * as i4 from "@angular/common";
|
|
|
17
17
|
* Represents a numeric-filter menu component.
|
|
18
18
|
*
|
|
19
19
|
* @example
|
|
20
|
-
* ```html
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* ```
|
|
20
|
+
* ```html
|
|
21
|
+
* <kendo-treelist-column field="UnitPrice">
|
|
22
|
+
* <ng-template kendoTreeListFilterMenuTemplate let-filter let-column="column" let-filterService="filterService">
|
|
23
|
+
* <kendo-treelist-numeric-filter-menu
|
|
24
|
+
* [column]="column"
|
|
25
|
+
* [filter]="filter"
|
|
26
|
+
* [filterService]="filterService">
|
|
27
|
+
* </kendo-treelist-numeric-filter-menu>
|
|
28
|
+
* </ng-template>
|
|
29
|
+
* </kendo-treelist-column>
|
|
30
|
+
* ```
|
|
32
31
|
*/
|
|
33
32
|
export class NumericFilterMenuComponent extends NumericFilterComponent {
|
|
34
33
|
constructor(localization) {
|
|
@@ -41,6 +40,7 @@ export class NumericFilterMenuComponent extends NumericFilterComponent {
|
|
|
41
40
|
this.filter = { filters: [], logic: "and" };
|
|
42
41
|
/**
|
|
43
42
|
* Determines if the inputs of second criteria will displayed.
|
|
43
|
+
* @default true
|
|
44
44
|
*/
|
|
45
45
|
this.extra = true;
|
|
46
46
|
}
|
|
@@ -5,20 +5,29 @@
|
|
|
5
5
|
import { Component, Input } from '@angular/core';
|
|
6
6
|
import { ColumnComponent } from "../../columns/column.component";
|
|
7
7
|
import { FilterService } from '../filter.service';
|
|
8
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
9
|
+
import { replaceMessagePlaceholder } from '../../utils';
|
|
8
10
|
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "
|
|
10
|
-
import * as i2 from "
|
|
11
|
-
import * as i3 from "@angular
|
|
12
|
-
import * as i4 from "
|
|
11
|
+
import * as i1 from "@progress/kendo-angular-l10n";
|
|
12
|
+
import * as i2 from "./filter-menu-input-wrapper.component";
|
|
13
|
+
import * as i3 from "@progress/kendo-angular-inputs";
|
|
14
|
+
import * as i4 from "@angular/forms";
|
|
15
|
+
import * as i5 from "../filter-input.directive";
|
|
13
16
|
/**
|
|
14
17
|
* @hidden
|
|
15
18
|
*/
|
|
16
19
|
export class StringFilterMenuInputComponent {
|
|
17
|
-
constructor() {
|
|
20
|
+
constructor(localization) {
|
|
21
|
+
this.localization = localization;
|
|
18
22
|
this.operators = [];
|
|
19
23
|
}
|
|
24
|
+
get columnLabel() {
|
|
25
|
+
const localizationMsg = this.localization.get('filterInputLabel') || '';
|
|
26
|
+
const columnName = this.column ? this.column.title || this.column.field : '';
|
|
27
|
+
return replaceMessagePlaceholder(localizationMsg, 'columnName', columnName);
|
|
28
|
+
}
|
|
20
29
|
}
|
|
21
|
-
StringFilterMenuInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: StringFilterMenuInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
30
|
+
StringFilterMenuInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: StringFilterMenuInputComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
22
31
|
StringFilterMenuInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: StringFilterMenuInputComponent, selector: "kendo-treelist-string-filter-menu-input", inputs: { operators: "operators", column: "column", filter: "filter", operator: "operator", currentFilter: "currentFilter", filterService: "filterService" }, ngImport: i0, template: `
|
|
23
32
|
<kendo-treelist-filter-menu-input-wrapper
|
|
24
33
|
[column]="column"
|
|
@@ -31,10 +40,11 @@ StringFilterMenuInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
31
40
|
<input
|
|
32
41
|
kendoTextBox
|
|
33
42
|
kendoFilterInput
|
|
43
|
+
[columnLabel]="columnLabel"
|
|
34
44
|
[filterDelay]="0"
|
|
35
45
|
[ngModel]="currentFilter?.value" />
|
|
36
46
|
</kendo-treelist-filter-menu-input-wrapper>
|
|
37
|
-
`, isInline: true, components: [{ type:
|
|
47
|
+
`, isInline: true, components: [{ type: i2.FilterMenuInputWrapperComponent, selector: "kendo-treelist-filter-menu-input-wrapper", inputs: ["filterService", "currentFilter"] }], directives: [{ type: i3.TextBoxDirective, selector: "input[kendoTextBox]", inputs: ["value"] }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5.FilterInputDirective, selector: "[kendoFilterInput]", inputs: ["filterDelay", "columnLabel", "column", "value"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
38
48
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: StringFilterMenuInputComponent, decorators: [{
|
|
39
49
|
type: Component,
|
|
40
50
|
args: [{
|
|
@@ -51,12 +61,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
51
61
|
<input
|
|
52
62
|
kendoTextBox
|
|
53
63
|
kendoFilterInput
|
|
64
|
+
[columnLabel]="columnLabel"
|
|
54
65
|
[filterDelay]="0"
|
|
55
66
|
[ngModel]="currentFilter?.value" />
|
|
56
67
|
</kendo-treelist-filter-menu-input-wrapper>
|
|
57
68
|
`
|
|
58
69
|
}]
|
|
59
|
-
}], propDecorators: { operators: [{
|
|
70
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { operators: [{
|
|
60
71
|
type: Input
|
|
61
72
|
}], column: [{
|
|
62
73
|
type: Input
|
|
@@ -16,6 +16,20 @@ import * as i4 from "@angular/common";
|
|
|
16
16
|
/**
|
|
17
17
|
* Represents a string-filter menu component.
|
|
18
18
|
* ([see example]({% slug builtinfiltertemplate_treelist %}#toc-configuration-components-for-filter-templates)).
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```html
|
|
22
|
+
* <kendo-treelist-column field="name">
|
|
23
|
+
* <ng-template kendoTreeListFilterMenuTemplate let-filter let-column="column" let-filterService="filterService">
|
|
24
|
+
* <kendo-treelist-string-filter-menu
|
|
25
|
+
* [column]="column"
|
|
26
|
+
* [filter]="filter"
|
|
27
|
+
* [filterService]="filterService">
|
|
28
|
+
* </kendo-treelist-string-filter-menu>
|
|
29
|
+
* </ng-template>
|
|
30
|
+
* </kendo-treelist-column>
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
19
33
|
*/
|
|
20
34
|
export class StringFilterMenuComponent extends StringFilterComponent {
|
|
21
35
|
constructor(localization) {
|
|
@@ -28,6 +42,7 @@ export class StringFilterMenuComponent extends StringFilterComponent {
|
|
|
28
42
|
this.filter = { filters: [], logic: "and" };
|
|
29
43
|
/**
|
|
30
44
|
* Determines if the inputs of second criteria will displayed.
|
|
45
|
+
* @default true
|
|
31
46
|
*/
|
|
32
47
|
this.extra = true;
|
|
33
48
|
}
|
|
@@ -30,18 +30,21 @@ export class NumericFilterComponent extends BaseFilterCellComponent {
|
|
|
30
30
|
super(filterService);
|
|
31
31
|
this.localization = localization;
|
|
32
32
|
/**
|
|
33
|
-
* The default filter operator.
|
|
33
|
+
* The default filter operator.
|
|
34
34
|
* @type {string}
|
|
35
|
+
* @default 'eq'
|
|
35
36
|
*/
|
|
36
37
|
this.operator = "eq";
|
|
37
38
|
/**
|
|
38
39
|
* Specifies the value that is used to increment or decrement the component value.
|
|
39
40
|
* @type {numeric}
|
|
41
|
+
* @default 1
|
|
40
42
|
*/
|
|
41
43
|
this.step = 1;
|
|
42
44
|
/**
|
|
43
45
|
* Specifies whether the **Up** and **Down** spin buttons will be rendered.
|
|
44
46
|
* @type {boolean}
|
|
47
|
+
* @default true
|
|
45
48
|
*/
|
|
46
49
|
this.spinners = true;
|
|
47
50
|
this.defaultOperators = numericOperators(this.localization);
|
|
@@ -7,12 +7,9 @@ import { FilterOperatorBase } from './filter-operator.base';
|
|
|
7
7
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
11
|
* Represents the `GreaterOrEqualTo` (**Is after or equal to**) date filter operator.
|
|
12
|
-
*
|
|
13
|
-
* For more information and examples, refer to:
|
|
14
|
-
* * [Setting the default filter operators]({% slug builtinfiltertemplate_treelist %}#toc-setting-the-default-filter-operator)
|
|
15
|
-
* * [Setting the order of the filter operators]({% slug builtinfiltertemplate_treelist %}#toc-setting-the-order-of-the-filter-operators)
|
|
12
|
+
* [See example](slug:builtinfiltertemplate_treelist#toc-setting-the-order-of-the-filter-operators).
|
|
16
13
|
*/
|
|
17
14
|
export class AfterEqFilterOperatorComponent extends FilterOperatorBase {
|
|
18
15
|
constructor(localization) { super("after-eq", localization); }
|
|
@@ -7,12 +7,9 @@ import { FilterOperatorBase } from './filter-operator.base';
|
|
|
7
7
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
11
|
* Represents the `Greater` (**Is after**) date filter operator.
|
|
12
|
-
*
|
|
13
|
-
* For more information and examples, refer to:
|
|
14
|
-
* * [Setting the default filter operators]({% slug builtinfiltertemplate_treelist %}#toc-setting-the-default-filter-operator)
|
|
15
|
-
* * [Setting the order of the filter operators]({% slug builtinfiltertemplate_treelist %}#toc-setting-the-order-of-the-filter-operators)
|
|
12
|
+
* [See example](slug:builtinfiltertemplate_treelist#toc-setting-the-order-of-the-filter-operators).
|
|
16
13
|
*/
|
|
17
14
|
export class AfterFilterOperatorComponent extends FilterOperatorBase {
|
|
18
15
|
constructor(localization) { super("after", localization); }
|
|
@@ -7,12 +7,9 @@ import { FilterOperatorBase } from './filter-operator.base';
|
|
|
7
7
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
11
|
* Represents the `LessOrEqualTo` (**Is before or equal to**) date filter operator.
|
|
12
|
-
*
|
|
13
|
-
* For more information and examples, refer to:
|
|
14
|
-
* * [Setting the default filter operators]({% slug builtinfiltertemplate_treelist %}#toc-setting-the-default-filter-operator)
|
|
15
|
-
* * [Setting the order of the filter operators]({% slug builtinfiltertemplate_treelist %}#toc-setting-the-order-of-the-filter-operators)
|
|
12
|
+
* [See example](slug:builtinfiltertemplate_treelist#toc-setting-the-order-of-the-filter-operators).
|
|
16
13
|
*/
|
|
17
14
|
export class BeforeEqFilterOperatorComponent extends FilterOperatorBase {
|
|
18
15
|
constructor(localization) { super("before-eq", localization); }
|
|
@@ -7,12 +7,9 @@ import { FilterOperatorBase } from './filter-operator.base';
|
|
|
7
7
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
10
|
-
|
|
11
|
-
* Represents the `Less
|
|
12
|
-
*
|
|
13
|
-
* For more information and examples, refer to:
|
|
14
|
-
* * [Setting the default filter operators]({% slug builtinfiltertemplate_treelist %}#toc-setting-the-default-filter-operator)
|
|
15
|
-
* * [Setting the order of the filter operators]({% slug builtinfiltertemplate_treelist %}#toc-setting-the-order-of-the-filter-operators)
|
|
10
|
+
/**
|
|
11
|
+
* Represents the `Less than` (**Is before**) date filter operator.
|
|
12
|
+
* [See example](slug:builtinfiltertemplate_treelist#toc-setting-the-order-of-the-filter-operators).
|
|
16
13
|
*/
|
|
17
14
|
export class BeforeFilterOperatorComponent extends FilterOperatorBase {
|
|
18
15
|
constructor(localization) { super("before", localization); }
|
|
@@ -9,10 +9,7 @@ import * as i0 from "@angular/core";
|
|
|
9
9
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
10
10
|
/**
|
|
11
11
|
* Represents the `Contains` (**Contains**) filter operator.
|
|
12
|
-
*
|
|
13
|
-
* For more information and examples, refer to:
|
|
14
|
-
* * [Setting the default filter operators]({% slug builtinfiltertemplate_treelist %}#toc-setting-the-default-filter-operator)
|
|
15
|
-
* * [Setting the order of the filter operators]({% slug builtinfiltertemplate_treelist %}#toc-setting-the-order-of-the-filter-operators)
|
|
12
|
+
* [See example](slug:builtinfiltertemplate_treelist#toc-setting-the-order-of-the-filter-operators).
|
|
16
13
|
*/
|
|
17
14
|
export class ContainsFilterOperatorComponent extends FilterOperatorBase {
|
|
18
15
|
constructor(localization) { super("contains", localization); }
|