Skip to content

Commit 039297f

Browse files
committed
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular into nrobakova/fix-issue-5763
2 parents c27c307 + 8c707d8 commit 039297f

File tree

51 files changed

+6436
-772
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+6436
-772
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ For more information about the theming please read our [documentation](https://w
2929

3030
### New Features
3131
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`
32+
- Advanced Filtering functionality is added. In the advanced filtering dialog, you could create groups of conditions across all grid columns. The advanced filtering button is shown in the grid's toolbar when `allowAdvancedFiltering` and `showToolbar` properties are set to `true`. You could also open/close the advanced filtering dialog using the `openAdvancedFilteringDialog` and `closeAdvancedFilteringDialog` methods.
3233
- `uniqueColumnValuesStrategy` input is added. This property provides a callback for loading unique column values on demand. If this property is provided, the unique values it generates will be used by the Excel Style Filtering (instead of using the unique values from the data that is bound to the grid).
3334
- `igxExcelStyleLoading` directive is added, which can be used to provide a custom loading template for the Excel Style Filtering. If this property is not provided, a default loading template will be used instead.
3435
- introduced new properties `cellSelection` and `rowSelection` which accept GridSelection mode enumeration. Grid selection mode could be none, single or multiple. Also `hideRowSelectors` property is added, which allows you to show and hide row selectors when row selection is enabled.

projects/igniteui-angular/src/lib/core/i18n/grid-resources.ts

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,21 @@ export interface IGridResourceStrings {
7474
igx_grid_excel_boolean_filter?: string;
7575
igx_grid_excel_custom_filter?: string;
7676
igx_grid_paginator_label?: string;
77+
igx_grid_advanced_filter_title?: string;
78+
igx_grid_advanced_filter_and_group?: string;
79+
igx_grid_advanced_filter_or_group?: string;
80+
igx_grid_advanced_filter_end_group?: string;
81+
igx_grid_advanced_filter_create_and_group?: string;
82+
igx_grid_advanced_filter_create_or_group?: string;
83+
igx_grid_advanced_filter_and_label?: string;
84+
igx_grid_advanced_filter_or_label?: string;
85+
igx_grid_advanced_filter_add_condition?: string;
86+
igx_grid_advanced_filter_ungroup?: string;
87+
igx_grid_advanced_filter_delete?: string;
88+
igx_grid_advanced_filter_delete_filters?: string;
89+
igx_grid_advanced_filter_initial_text?: string;
90+
igx_grid_advanced_filter_column_placeholder?: string;
91+
igx_grid_advanced_filter_value_placeholder?: string;
7792
}
7893

7994
export const GridResourceStringsEN: IGridResourceStrings = {
@@ -151,5 +166,20 @@ export const GridResourceStringsEN: IGridResourceStrings = {
151166
igx_grid_excel_date_filter: 'Date filter',
152167
igx_grid_excel_boolean_filter: 'Boolean filter',
153168
igx_grid_excel_custom_filter: 'Custom filter...',
154-
igx_grid_paginator_label: 'Items per page'
169+
igx_grid_paginator_label: 'Items per page',
170+
igx_grid_advanced_filter_title: 'Advanced Filtering',
171+
igx_grid_advanced_filter_and_group: '"And" Group',
172+
igx_grid_advanced_filter_or_group: '"Or" Group',
173+
igx_grid_advanced_filter_end_group: 'End Group',
174+
igx_grid_advanced_filter_create_and_group: 'Create "And" Group',
175+
igx_grid_advanced_filter_create_or_group: 'Create "Or" Group',
176+
igx_grid_advanced_filter_and_label: 'and',
177+
igx_grid_advanced_filter_or_label: 'or',
178+
igx_grid_advanced_filter_add_condition: 'Condition',
179+
igx_grid_advanced_filter_ungroup: 'Ungroup',
180+
igx_grid_advanced_filter_delete: 'Delete',
181+
igx_grid_advanced_filter_delete_filters: 'Delete filters',
182+
igx_grid_advanced_filter_initial_text: 'Start with creating a group of conditions linked with "And" or "Or"',
183+
igx_grid_advanced_filter_column_placeholder: 'Select column',
184+
igx_grid_advanced_filter_value_placeholder: 'Value'
155185
};

projects/igniteui-angular/src/lib/core/styles/components/grid-toolbar/_grid-toolbar-component.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
@extend %igx-grid-toolbar__actions !optional;
2424
}
2525

26+
@include e(adv-filter, $m: 'filtered') {
27+
@extend %igx-grid-toolbar__adv-filter--filtered !optional;
28+
}
29+
2630
@include e(dropdown){
2731
@extend %igx-grid-toolbar__dropdown !optional;
2832
}

projects/igniteui-angular/src/lib/core/styles/components/grid-toolbar/_grid-toolbar-theme.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,10 @@
303303
}
304304
}
305305

306+
%igx-grid-toolbar__adv-filter--filtered {
307+
color: igx-color(map-get($theme, 'palette'), 'secondary') !important;
308+
}
309+
306310
%igx-grid-toolbar__dropdown {
307311
position: relative;
308312

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
////
2+
/// @access private
3+
/// @group components
4+
/// @author <a href="https://github.com/simeonoff" target="_blank">Simeon Simeonoff</a>
5+
/// @requires {mixin} bem-block
6+
/// @requires {mixin} bem-elem
7+
/// @requires {mixin} bem-mod
8+
////
9+
@mixin _advanced-filtering-partial {
10+
@include b(igx-advanced-filter) {
11+
@include _advanced-filtering-legend();
12+
@include _advanced-filtering-tree();
13+
@include _advanced-filtering-con-menu();
14+
@include _advanced-filtering-empty();
15+
16+
@extend %advanced-filter !optional;
17+
18+
@include e(header) {
19+
@extend %advanced-filter__header !optional;
20+
}
21+
22+
@include e(main) {
23+
@extend %advanced-filter__main !optional;
24+
}
25+
26+
@include e(outlet) {
27+
@extend %advanced-filter__outlet !optional;
28+
}
29+
30+
@include m('cosy') {
31+
@extend %advanced-filter--cosy !optional;
32+
}
33+
34+
@include m('compact') {
35+
@extend %advanced-filter--compact !optional;
36+
}
37+
}
38+
}
39+
40+
@mixin _advanced-filtering-legend {
41+
@include b(igx-filter-legend) {
42+
@extend %filter-legend !optional;
43+
44+
@include e(item) {
45+
@extend %filter-legend__item !optional;
46+
}
47+
48+
@include e(item, $m: 'and') {
49+
@extend %filter-legend__item !optional;
50+
@extend %filter-legend__item--and !optional;
51+
}
52+
53+
@include e(item, $m: 'or') {
54+
@extend %filter-legend__item !optional;
55+
@extend %filter-legend__item--or !optional;
56+
}
57+
}
58+
}
59+
60+
@mixin _advanced-filtering-tree {
61+
@include b(igx-filter-tree) {
62+
@extend %filter-tree !optional;
63+
64+
@include e(line) {
65+
@extend %filter-tree__line !optional;
66+
}
67+
68+
@include e(line, $m: 'and') {
69+
@extend %filter-tree__line--and !optional;
70+
}
71+
72+
@include e(line, $m: 'or') {
73+
@extend %filter-tree__line--or !optional;
74+
}
75+
76+
@include e(line, $mods: ('selected', 'and')) {
77+
@extend %filter-tree__line--and-selected !optional;
78+
}
79+
80+
@include e(line, $mods: ('selected', 'or')) {
81+
@extend %filter-tree__line--or-selected !optional;
82+
}
83+
84+
@include e(expression) {
85+
@extend %filter-tree__expression !optional;
86+
}
87+
88+
@include e(expression-item) {
89+
@extend %filter-tree__expression-item !optional;
90+
}
91+
92+
@include e(expression-column) {
93+
@extend %filter-tree__expression-column !optional;
94+
}
95+
96+
@include e(expression-actions) {
97+
@extend %filter-tree__expression-actions !optional;
98+
}
99+
100+
@include e(expression-condition) {
101+
@extend %filter-tree__expression-condition !optional;
102+
}
103+
104+
@include e(buttons) {
105+
@extend %filter-tree__buttons !optional;
106+
}
107+
108+
@include e(inputs) {
109+
@extend %filter-tree__inputs !optional;
110+
}
111+
112+
@include e(inputs-actions) {
113+
@extend %filter-tree__inputs-actions !optional;
114+
}
115+
}
116+
}
117+
118+
@mixin _advanced-filtering-con-menu {
119+
@include b(igx-filter-contextual-menu) {
120+
@extend %filter-con-menu !optional;
121+
122+
@include e(close-btn) {
123+
@extend %filter-con-menu__close-btn !optional;
124+
}
125+
126+
@include e(delete-btn) {
127+
@extend %filter-con-menu__delete-btn !optional;
128+
}
129+
130+
@include m('cosy') {
131+
@extend %filter-con-menu--cosy !optional;
132+
}
133+
134+
@include m('compact') {
135+
@extend %filter-con-menu--compact !optional;
136+
}
137+
}
138+
}
139+
140+
@mixin _advanced-filtering-empty {
141+
@include b(igx-filter-empty) {
142+
@extend %filter-empty !optional;
143+
144+
@include e(title) {
145+
@extend %filter-empty__title !optional;
146+
}
147+
}
148+
}

0 commit comments

Comments
 (0)