Skip to content

Commit f7c7553

Browse files
authored
Merge branch 'master' into bpachilova/fix-12608
2 parents 1432c67 + 5a6bc0b commit f7c7553

File tree

15 files changed

+367
-45
lines changed

15 files changed

+367
-45
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,21 @@
22

33
All notable changes for each version of this project will be documented in this file.
44

5+
## 15.1.0
6+
7+
- `IgxPivotGrid`
8+
- The `IgxPivotDateDimension` properties `inBaseDimension` and `inOption` have been deprecated and renamed to `baseDimension` and `options` respectively.
9+
510
## 15.0.1
611

712
- `IgxGrid`
813
- Added new auto-sizing API `recalculateAutoSizes` that recalculates widths of columns that have size set to `auto`. Can be used in scenarios where you want to auto-size the columns again post initialization.
914
- `igxPivotGrid`
1015
- Adding `aggregatorName` for pivot value configuration as an alternative to setting `aggregator` function. If both are set `aggregatorName` takes precedent. If none are set an error is thrown.
1116
- `IgxSimpleCombo`
12-
- **Behavioral Change** - Keyboard navigation `ArrowUp` - when the combo is opened `ArrowUp` will close the dropdown if the search input is focused. If the active item is the first one in the list, the focus will be moved back to the search input while also selecting all of the text in the input. Otherwise `ArrowUp` will move to the previous list item.
17+
- **Behavioral Change**
18+
- When the user clicks on the combo's input, the dropdown opens up.
19+
- Keyboard navigation `ArrowUp` - when the combo is opened `ArrowUp` will close the dropdown if the search input is focused. If the active item is the first one in the list, the focus will be moved back to the search input while also selecting all of the text in the input. Otherwise `ArrowUp` will move to the previous list item.
1320

1421
## 15.0.0
1522

projects/igniteui-angular/src/lib/core/styles/themes/generators/_base.scss

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@
1010
@use 'igniteui-theming/sass/themes' as *;
1111
@use 'igniteui-theming/sass/themes/charts' as *;
1212

13+
////
1314
/// @group themes
1415
/// @access public
16+
/// @author <a href="https://github.com/simeonoff" target="_blank">Simeon Simeonoff</a>
17+
////
18+
1519
/// Generates an Ignite UI for Angular global theme.
1620
/// @param {Map} $palette - An palette to be used by the global theme.
1721
/// @param {Map} $schema [$light-schema] - The schema used as basis for styling the components.
@@ -442,11 +446,10 @@
442446
}
443447
}
444448

445-
/// @group themes
446-
/// @access public
447-
/// Creates a global material theme that can be used with light backgrounds.
449+
/// A wrapper around the theme mixin. Creates a global material theme that can be used with light backgrounds.
448450
/// @param {Map} $palette - An palette to be used by the global theme.
449451
/// @param {List} $exclude [( )] - A list of ig components to be excluded from the global theme styles.
452+
/// @see {mixin} theme
450453
@mixin light-theme(
451454
$palette,
452455
$exclude: (),
@@ -476,11 +479,10 @@
476479
);
477480
}
478481

479-
/// @group themes
480-
/// @access public
481-
/// Creates a global material theme that can be used with dark backgrounds.
482+
/// A wrapper around the theme mixin. Creates a global material theme that can be used with dark backgrounds.
482483
/// @param {Map} $palette - An palette to be used by the global theme.
483484
/// @param {List} $exclude [( )] - A list of igx components to be excluded from the global theme styles.
485+
/// @see {mixin} theme
484486
@mixin dark-theme(
485487
$palette,
486488
$exclude: (),

projects/igniteui-angular/src/lib/core/styles/themes/generators/_bootstrap.scss

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22
@use '../schemas' as *;
33
@use 'igniteui-theming/sass/color' as *;
44

5+
////
56
/// @group themes
67
/// @access public
7-
/// Creates a global bootstrap-like theme that can be used with light backgrounds.
8+
/// @author <a href="https://github.com/simeonoff" target="_blank">Simeon Simeonoff</a>
9+
////
10+
11+
/// A wrapper around the theme mixin. Creates a global bootstrap-like theme that can be used with light backgrounds.
812
/// @param {Map} $palette - An palette to be used by the global theme.
913
/// @param {List} $exclude [( )] - A list of ig components to be excluded from the global theme styles.
14+
/// @see {mixin} theme
1015
@mixin bootstrap-light-theme(
1116
$palette,
1217
$exclude: (),
@@ -39,11 +44,10 @@
3944
);
4045
}
4146

42-
/// @group themes
43-
/// @access public
44-
/// Creates a global bootstrap-like theme that can be used with dark backgrounds.
47+
/// A wrapper around the theme mixin. Creates a global bootstrap-like theme that can be used with dark backgrounds.
4548
/// @param {Map} $palette - An palette to be used by the global theme.
4649
/// @param {List} $exclude [( )] - A list of ig components to be excluded from the global theme styles.
50+
/// @see {mixin} theme
4751
@mixin bootstrap-dark-theme(
4852
$palette,
4953
$exclude: (),

projects/igniteui-angular/src/lib/core/styles/themes/generators/_fluent.scss

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22
@use '../schemas' as *;
33
@use 'igniteui-theming/sass/color' as *;
44

5+
////
56
/// @group themes
67
/// @access public
7-
/// Creates a global fluent theme that can be used with light backgrounds.
8+
/// @author <a href="https://github.com/simeonoff" target="_blank">Simeon Simeonoff</a>
9+
////
10+
11+
/// A wrapper around the theme mixin. Creates a global fluent theme that can be used with light backgrounds.
812
/// @param {Map} $palette - An palette to be used by the global theme.
913
/// @param {List} $exclude [( )] - A list of ig components to be excluded from the global theme styles.
14+
/// @see {mixin} theme
1015
@mixin fluent-light-theme(
1116
$palette,
1217
$exclude: (),
@@ -39,11 +44,10 @@
3944
);
4045
}
4146

42-
/// @group themes
43-
/// @access public
44-
/// Creates a global fluent theme that can be used with dark backgrounds.
47+
/// A wrapper around the theme mixin. Creates a global fluent theme that can be used with dark backgrounds.
4548
/// @param {Map} $palette - An palette to be used by the global theme.
4649
/// @param {List} $exclude [( )] - A list of ig components to be excluded from the global theme styles.
50+
/// @see {mixin} theme
4751
@mixin fluent-dark-theme(
4852
$palette,
4953
$exclude: (),

projects/igniteui-angular/src/lib/core/styles/themes/generators/_indigo.scss

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22
@use '../schemas' as *;
33
@use 'igniteui-theming/sass/color' as *;
44

5+
////
56
/// @group themes
67
/// @access public
7-
/// Creates a global indigo theme that can be used with light backgrounds.
8+
/// @author <a href="https://github.com/simeonoff" target="_blank">Simeon Simeonoff</a>
9+
////
10+
11+
/// A wrapper around the theme mixin. Creates a global indigo theme that can be used with light backgrounds.
812
/// @param {Map} $palette - An palette to be used by the global theme.
913
/// @param {List} $exclude [( )] - A list of ig components to be excluded from the global theme styles.
14+
/// @see {mixin} theme
1015
@mixin indigo-light-theme(
1116
$palette,
1217
$exclude: (),
@@ -39,11 +44,10 @@
3944
);
4045
}
4146

42-
/// @group themes
43-
/// @access public
44-
/// Creates a global indigo theme that can be used with dark backgrounds.
47+
/// A wrapper around the theme mixin. Creates a global indigo theme that can be used with dark backgrounds.
4548
/// @param {Map} $palette - An palette to be used by the global theme.
4649
/// @param {List} $exclude [( )] - A list of ig components to be excluded from the global theme styles.
50+
/// @see {mixin} theme
4751
@mixin indigo-dark-theme(
4852
$palette,
4953
$exclude: (),

projects/igniteui-angular/src/lib/grids/common/strategy.ts

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ export class IgxSorting implements IGridSortingStrategy {
4343
while (i < data.length) {
4444
const column = grid ? grid.getColumnByName(expressions[level].fieldName) : null;
4545
const isDate = column?.dataType === DATE_TYPE || column?.dataType === DATE_TIME_TYPE;
46-
const isTime = column?.dataType === TIME_TYPE;
46+
const isTime = column?.dataType === TIME_TYPE || column?.dataType === DATE_TIME_TYPE;
4747
const isString = column?.dataType === STRING_TYPE;
48-
const group = this.groupedRecordsByExpression(data, i, expressions[level], isDate, isString);
48+
const group = this.groupedRecordsByExpression(data, i, expressions[level], isDate, isTime, isString);
4949
const groupRow: IGroupByRecord = {
5050
expression: expressions[level],
5151
level,
@@ -93,11 +93,13 @@ export class IgxSorting implements IGridSortingStrategy {
9393

9494
protected getFieldValue<T>(obj: T, key: string, isDate: boolean = false, isTime: boolean = false) {
9595
let resolvedValue = resolveNestedPath(obj, key);
96-
if (isDate || isTime) {
97-
const date = parseDate(resolvedValue);
98-
resolvedValue = isTime && date ?
99-
new Date().setHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()) : date;
100-
96+
const date = parseDate(resolvedValue);
97+
if (date && isDate && isTime) {
98+
resolvedValue = date;
99+
} else if (date && isDate && !isTime) {
100+
resolvedValue = new Date(date.setHours(0, 0, 0, 0));
101+
} else if (date && isTime && !isDate) {
102+
resolvedValue = new Date().setHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
101103
}
102104
return resolvedValue;
103105
}
@@ -107,17 +109,18 @@ export class IgxSorting implements IGridSortingStrategy {
107109
index: number,
108110
expression: IGroupingExpression,
109111
isDate: boolean = false,
112+
isTime: boolean = false,
110113
isString: boolean
111114
): T[] {
112115
const res = [];
113116
const key = expression.fieldName;
114117
const len = data.length;
115-
let groupval = this.getFieldValue(data[index], key, isDate);
118+
let groupval = this.getFieldValue(data[index], key, isDate, isTime);
116119
res.push(data[index]);
117120
index++;
118121
const comparer = expression.groupingComparer || DefaultSortingStrategy.instance().compareValues;
119122
for (let i = index; i < len; i++) {
120-
let fieldValue = this.getFieldValue(data[i], key, isDate);
123+
let fieldValue = this.getFieldValue(data[i], key, isDate, isTime);
121124
if (expression.ignoreCase && isString) {
122125
// when column's dataType is string but the value is number
123126
fieldValue = fieldValue?.toString().toLowerCase();
@@ -155,15 +158,15 @@ export class IgxSorting implements IGridSortingStrategy {
155158
}
156159
const column = grid?.getColumnByName(expr.fieldName);
157160
const isDate = column?.dataType === DATE_TYPE || column?.dataType === DATE_TIME_TYPE;
158-
const isTime = column?.dataType === TIME_TYPE;
161+
const isTime = column?.dataType === TIME_TYPE || column?.dataType === DATE_TIME_TYPE;
159162
const isString = column?.dataType === STRING_TYPE;
160163
data = expr.strategy.sort(data, expr.fieldName, expr.dir, expr.ignoreCase, this.getFieldValue, isDate, isTime, grid);
161164
if (expressionIndex === exprsLen - 1) {
162165
return data;
163166
}
164167
// in case of multiple sorting
165168
for (i = 0; i < dataLen; i++) {
166-
gbData = this.groupedRecordsByExpression(data, i, expr, isDate, isString);
169+
gbData = this.groupedRecordsByExpression(data, i, expr, isDate, isTime, isString);
167170
gbDataLen = gbData.length;
168171
if (gbDataLen > 1) {
169172
gbData = this.sortDataRecursive(gbData, expressions, expressionIndex + 1, grid);

0 commit comments

Comments
 (0)