Skip to content

Commit db4b9dc

Browse files
authored
Merge branch '18.2.x' into ganastasov/fix-15019-18.2.x
2 parents e93a5e2 + 087cef6 commit db4b9dc

File tree

13 files changed

+220
-79
lines changed

13 files changed

+220
-79
lines changed

projects/igniteui-angular/migrations/migration-collection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,11 @@
201201
"version": "18.2.0",
202202
"description": "Updates Ignite UI for Angular from v18.1.x to v18.2.0",
203203
"factory": "./update-18_2_0"
204+
},
205+
"migration-41": {
206+
"version": "18.2.3",
207+
"description": "Updates Ignite UI for Angular from v18.2.0 to v18.2.3",
208+
"factory": "./update-18_2_3"
204209
}
205210
}
206211
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "../../common/schema/theme-changes.schema.json",
3+
"changes": [
4+
{
5+
"name": "$header-time-period-color",
6+
"remove": true,
7+
"owner": "time-picker-theme",
8+
"type":"property"
9+
}
10+
]
11+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import * as path from 'path';
2+
3+
import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
4+
import { setupTestTree } from '../common/setup.spec';
5+
6+
const version = '18.2.3';
7+
8+
describe(`Update to ${version}`, () => {
9+
let appTree: UnitTestTree;
10+
const schematicRunner = new SchematicTestRunner('ig-migrate', path.join(__dirname, '../migration-collection.json'));
11+
12+
beforeEach(() => {
13+
appTree = setupTestTree();
14+
});
15+
16+
const migrationName = 'migration-41';
17+
18+
it('should remove the $header-time-period-color property from the time-picker-theme', async () => {
19+
appTree.create(
20+
`/testSrc/appPrefix/component/test.component.scss`,
21+
`$custom-time-picker: time-picker-theme(
22+
$text-color: red,
23+
$header-time-period-color: pink
24+
);`
25+
);
26+
27+
const tree = await schematicRunner
28+
.runSchematic(migrationName, {}, appTree);
29+
30+
expect(tree.readContent('/testSrc/appPrefix/component/test.component.scss')).toEqual(
31+
`$custom-time-picker: time-picker-theme(
32+
$text-color: red
33+
);`
34+
);
35+
});
36+
});
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import type {
2+
Rule,
3+
SchematicContext,
4+
Tree
5+
} from '@angular-devkit/schematics';
6+
import { UpdateChanges } from '../common/UpdateChanges';
7+
8+
const version = '18.2.3';
9+
10+
export default (): Rule => async (host: Tree, context: SchematicContext) => {
11+
context.logger.info(`Applying migration for Ignite UI for Angular to version ${version}`);
12+
const update = new UpdateChanges(__dirname, host, context);
13+
update.applyChanges();
14+
};

projects/igniteui-angular/src/lib/combo/combo.component.spec.ts

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1745,71 +1745,60 @@ describe('igxCombo', () => {
17451745
expect(dropdown).toBeDefined();
17461746
expect(dropdown.focusedItem).toBeFalsy();
17471747
expect(combo.virtualScrollContainer).toBeDefined();
1748+
combo.allowCustomValues = true;
17481749
const mockClick = jasmine.createSpyObj('event', ['preventDefault', 'stopPropagation']);
17491750
const virtualMockUP = spyOn<any>(dropdown, 'navigatePrev').and.callThrough();
17501751
const virtualMockDOWN = spyOn<any>(dropdown, 'navigateNext').and.callThrough();
17511752
expect(dropdown.focusedItem).toEqual(null);
17521753
expect(combo.collapsed).toBeTruthy();
17531754
combo.toggle();
1754-
await wait(30);
1755+
await wait();
17551756
fixture.detectChanges();
17561757
expect(combo.collapsed).toBeFalsy();
17571758
combo.virtualScrollContainer.scrollTo(51);
1758-
await wait(30);
1759+
await firstValueFrom(combo.virtualScrollContainer.chunkLoad);
17591760
fixture.detectChanges();
17601761
let items = fixture.debugElement.queryAll(By.css(`.${CSS_CLASS_DROPDOWNLISTITEM}`));
17611762
let lastItem = items[items.length - 1].componentInstance;
17621763
expect(lastItem).toBeDefined();
17631764
lastItem.clicked(mockClick);
1764-
await wait(30);
17651765
fixture.detectChanges();
17661766
expect(dropdown.focusedItem).toEqual(lastItem);
17671767
dropdown.navigateItem(-1);
1768-
await wait(30);
17691768
fixture.detectChanges();
17701769
expect(virtualMockDOWN).toHaveBeenCalledTimes(0);
17711770
lastItem.clicked(mockClick);
1772-
await wait(30);
17731771
fixture.detectChanges();
17741772
expect(dropdown.focusedItem).toEqual(lastItem);
17751773
dropdown.navigateNext();
1776-
await wait(30);
17771774
fixture.detectChanges();
17781775
expect(virtualMockDOWN).toHaveBeenCalledTimes(1);
17791776
combo.searchValue = 'New';
17801777
combo.handleInputChange();
17811778
fixture.detectChanges();
1782-
await wait(30);
1783-
items = fixture.debugElement.queryAll(By.css(`.${CSS_CLASS_DROPDOWNLISTITEM}`));
1784-
lastItem = items[items.length - 1].componentInstance;
1785-
(lastItem as IgxComboAddItemComponent).clicked(mockClick);
1786-
await wait(30);
1779+
await firstValueFrom(combo.virtualScrollContainer.chunkLoad);
1780+
const addItemButton = fixture.debugElement.query(By.directive(IgxComboAddItemComponent));
1781+
addItemButton.triggerEventHandler('click', UIInteractions.getMouseEvent('click'));
17871782
fixture.detectChanges();
17881783
// After `Add Item` is clicked, the input is focused and the item is added to the list
1789-
// expect(dropdown.focusedItem).toEqual(null);
1784+
expect(dropdown.focusedItem).toEqual(null);
17901785
expect(document.activeElement).toEqual(combo.searchInput.nativeElement);
17911786
expect(combo.customValueFlag).toBeFalsy();
17921787
expect(combo.searchInput.nativeElement.value).toBeTruthy();
17931788

17941789
// TEST move from first item
1795-
combo.virtualScrollContainer.scrollTo(0);
1796-
await wait();
1797-
fixture.detectChanges();
17981790
const firstItem = fixture.debugElement.queryAll(By.css(`.${CSS_CLASS_DROPDOWNLISTITEM}`))[0].componentInstance;
17991791
firstItem.clicked(mockClick);
1800-
await wait(30);
18011792
fixture.detectChanges();
18021793
expect(dropdown.focusedItem).toEqual(firstItem);
18031794
expect(dropdown.focusedItem.itemIndex).toEqual(0);
1804-
// spyOnProperty(dropdown, 'focusedItem', 'get').and.returnValue(firstItem);
18051795
dropdown.navigateFirst();
1806-
await wait(30);
18071796
fixture.detectChanges();
18081797
dropdown.navigatePrev();
1809-
await wait(30);
18101798
fixture.detectChanges();
1811-
// Called once before the `await` and called once more, because item @ index 0 is a header
1799+
// Called once manually and called once more, because item @ index 0 is a header
18121800
expect(virtualMockUP).toHaveBeenCalledTimes(2);
1801+
expect(dropdown.focusedItem).toBeNull();
18131802
}));
18141803
it('should properly get the first focusable item when focusing the component list', () => {
18151804
const expectedItemText = 'State: MichiganRegion: East North Central';

projects/igniteui-angular/src/lib/core/styles/components/time-picker/_time-picker-component.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@
2424
@extend %time-picker__wrapper !optional;
2525
}
2626

27-
@include e(header-ampm) {
28-
@extend %time-picker__header-ampm !optional;
29-
}
30-
3127
@include e(header-hour){
3228
@extend %time-picker__header-hour !optional;
3329
}

projects/igniteui-angular/src/lib/core/styles/components/time-picker/_time-picker-theme.scss

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
/// @param {Color} $disabled-item-background [null] - The background color for disabled values .
2424
/// @param {Color} $header-background [null] - The header background color of a time picker.
2525
/// @param {Color} $header-hour-text-color [null] - The header hour text color of a time picker.
26-
/// @param {Color} $header-time-period-color [null] - The header AM/PM text color of a time picker.
2726
/// @param {Color} $background-color [null] - The time-picker panel background color.
2827
/// @param {Number} $time-item-size [null] - The height of the time item.
2928
/// @param {Color} $divider-color [null] - The color for the actions area divider.
@@ -56,7 +55,6 @@
5655
$disabled-item-background: null,
5756
$header-background: null,
5857
$header-hour-text-color: null,
59-
$header-time-period-color: null,
6058
$background-color: null,
6159
$modal-shadow: null,
6260
$dropdown-shadow: null,
@@ -85,12 +83,6 @@
8583
$header-hour-text-color: text-contrast($header-background);
8684
}
8785

88-
@if not($header-time-period-color) and $header-background {
89-
@if meta.type-of($header-background) == 'color' {
90-
$header-time-period-color: rgba(text-contrast($header-background), .8);
91-
}
92-
}
93-
9486
@if not($selected-text-color) and $active-item-background {
9587
$selected-text-color: text-contrast($active-item-background);
9688
}
@@ -135,7 +127,6 @@
135127
disabled-item-background: $disabled-item-background,
136128
header-background: $header-background,
137129
header-hour-text-color: $header-hour-text-color,
138-
header-time-period-color: $header-time-period-color,
139130
background-color: $background-color,
140131
modal-shadow: $modal-shadow,
141132
dropdown-shadow: $dropdown-shadow,
@@ -162,15 +153,15 @@
162153
$picker-buttons-padding: map.get((
163154
'material': rem(8px),
164155
'fluent': rem(8px),
165-
'bootstrap': rem(16px),
156+
'bootstrap': rem(8px),
166157
'indigo': rem(8px) rem(16px),
167158
), $variant);
168159

169160
$picker-header-padding: map.get((
170-
'material': rem(24px) rem(16px),
161+
'material': rem(16px) rem(24px),
171162
'fluent': rem(16px),
172163
'bootstrap': rem(16px),
173-
'indigo': rem(16px) rem(24px) ,
164+
'indigo': rem(16px),
174165
), $variant);
175166

176167
%time-picker-display {
@@ -287,7 +278,7 @@
287278
}
288279

289280
%time-picker__item {
290-
width: if($variant == 'indigo', rem(46px), rem(54px));
281+
width: rem(46px);
291282
padding: rem(5px) rem(10px);
292283
border-radius: var-get($theme, 'active-item-border-radius');
293284
height: var-get($theme, 'time-item-size');
@@ -355,10 +346,6 @@
355346
}
356347
}
357348

358-
%time-picker__header-ampm {
359-
color: var-get($theme, 'header-time-period-color');
360-
}
361-
362349
%time-picker__header--vertical {
363350
@if $variant == 'indigo' {
364351
min-width: rem(136px);
@@ -371,18 +358,14 @@
371358
%time-picker__header-hour {
372359
display: flex;
373360
color: var-get($theme, 'header-hour-text-color');
361+
margin: 0;
374362

375363
[dir='rtl'] & {
376364
flex-direction: row-reverse;
377365
justify-content: flex-end;
378366
}
379367
}
380368

381-
%time-picker__header-ampm,
382-
%time-picker__header-hour {
383-
margin: 0;
384-
}
385-
386369
%time-picker__buttons {
387370
display: flex;
388371
min-height: sizable(rem(40px), rem(44px), rem(48px));
@@ -413,24 +396,20 @@
413396
header-hour: 'h4',
414397
selected-time: 'h5'
415398
)) {
416-
$time-period: map.get($categories, 'header-time-period');
417399
$header-hour: map.get($categories, 'header-hour');
418400
$selected-time: map.get($categories, 'selected-time');
419401

420-
421-
%time-picker__header-ampm {
422-
@include type-style($time-period, false);
423-
}
424-
425402
%time-picker__header-hour {
426403
@include type-style($header-hour, false) {
427404
margin-top: 0;
405+
margin-bottom: 0;
428406
}
429407
}
430408

431409
%time-picker__item--selected {
432410
@include type-style($selected-time) {
433411
margin-top: 0;
412+
margin-bottom: 0;
434413
}
435414
}
436415
}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@
103103
));
104104
@include tabs-typography();
105105
@include time-picker-typography($categories: (
106-
header-time-period: 'subtitle-1',
107106
header-hour: 'h4',
108107
selected-time: 'h4'
109108
));

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@
106106
label: 'subtitle-2',
107107
));
108108
@include time-picker-typography($categories: (
109-
header-time-period: 'subtitle-1',
110109
header-hour: 'h5',
111110
selected-time: 'h6'
112111
));

projects/igniteui-angular/src/lib/grids/filtering/excel-style/excel-style-filtering.component.ts

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -221,13 +221,13 @@ export class IgxGridExcelStyleFilteringComponent extends BaseFilteringComponent
221221

222222
/**
223223
* Gets the minimum height.
224-
*
225-
* Setting value in template:
224+
*
225+
* Setting value in template:
226226
* ```ts
227-
* [minHeight]="'<number><unit (px|rem|etc..)>'"
227+
* [minHeight]="'<number><unit (px|rem|etc..)>'"
228228
* ```
229-
*
230-
* Example for setting a value:
229+
*
230+
* Example for setting a value:
231231
* ```ts
232232
* [minHeight]="'700px'"
233233
* ```
@@ -258,13 +258,13 @@ export class IgxGridExcelStyleFilteringComponent extends BaseFilteringComponent
258258

259259
/**
260260
* Gets the maximum height.
261-
*
262-
* Setting value in template:
261+
*
262+
* Setting value in template:
263263
* ```ts
264-
* [maxHeight]="'<number><unit (px|rem|etc..)>'"
264+
* [maxHeight]="'<number><unit (px|rem|etc..)>'"
265265
* ```
266-
*
267-
* Example for setting a value:
266+
*
267+
* Example for setting a value:
268268
* ```ts
269269
* [maxHeight]="'700px'"
270270
* ```
@@ -509,6 +509,11 @@ export class IgxGridExcelStyleFilteringComponent extends BaseFilteringComponent
509509
private renderValues() {
510510
this.filterValues = this.generateFilterValues();
511511
this.generateListData();
512+
this.expressionsList.forEach(expr => {
513+
if (this.column.dataType === GridColumnDataType.String && this.column.filteringIgnoreCase && expr.expression.searchVal) {
514+
this.modifyExpression(expr);
515+
}
516+
});
512517
}
513518

514519
private generateFilterValues() {
@@ -539,6 +544,16 @@ export class IgxGridExcelStyleFilteringComponent extends BaseFilteringComponent
539544
return filterValues;
540545
}
541546

547+
private modifyExpression(expr: ExpressionUI) {
548+
const lowerCaseFilterValues = new Set(Array.from(expr.expression.searchVal).map((value: string) => value.toLowerCase()));
549+
550+
this.grid.data.forEach(item => {
551+
if (lowerCaseFilterValues.has(item[this.column.field]?.toLowerCase())) {
552+
expr.expression.searchVal.add(item[this.column.field]);
553+
}
554+
});
555+
}
556+
542557
private generateListData() {
543558
this.listData = new Array<FilterListItem>();
544559
const shouldUpdateSelection = this.areExpressionsSelectable();

0 commit comments

Comments
 (0)