Skip to content

Commit 02c6dcf

Browse files
authored
Merge pull request #5976 from IgniteUI/8.2.x
Merging 8.2.x into master
2 parents 0efb3f6 + 5702bfb commit 02c6dcf

File tree

167 files changed

+4506
-2615
lines changed

Some content is hidden

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

167 files changed

+4506
-2615
lines changed

CHANGELOG.md

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,43 @@
11
# Ignite UI for Angular Change Log
22

33
All notable changes for each version of this project will be documented in this file.
4+
## 8.2.4
5+
6+
### RTL Support
7+
Most of the components in the framework now have full right-to-left (RTL) support via the newly included RTL themes.
8+
9+
For CSS-based projects add `node_modules/igniteui-angular/styles/igniteui-angular-rtl.css` to your angular.json styles collection.
10+
11+
For Sass-based projects pass `$direction` to the `igx-core` mixin in your root stylesheet.
12+
13+
Example:
14+
```scss
15+
// $direction defaults to ltr if it's omitted.
16+
@include igx-core($direction: rtl);
17+
```
18+
Currently the following components have only partial RTL support:
19+
- Grid (igx-grid)
20+
- Slider (igx-slider)
21+
- Tabs (igx-tabs)
22+
- Circular Progress Indicator (igx-circular-bar)
23+
24+
We plan on adding support for the aforementioned components in the upcoming releases.
25+
26+
### New Features
27+
28+
- Columns now expose the `cellStyles` property which allows conditional styling of the column cells. Similar to `cellClasses` it accepts an object literal where the keys are style properties and the values are expressions for evaluation.
29+
```typescript
30+
styles = {
31+
color: '#123456',
32+
'font-family': 'monospace'
33+
'font-weight': (_, __, value) => value.startsWith('!') : 'red' : 'inherit'
34+
};
35+
```
36+
The callback signature for both `cellStyles` and `cellClasses` is now changed to
37+
38+
```typescript
39+
(rowData: any, columnKey: string, cellValue: any, rowIndex: number) => boolean
40+
```
441

542
## 8.2.3
643
- `IgxTextHighlightDirective` - The default highlight directive styles have been moved to a Sass theme - `igx-highlight-theme`; You can modify the resting and active background and text color styles of the directive by passing the respective properties to the Sass theme. You can still pass your own CSS classes to the highlight directive via the cssClass and activeCssClass inputs.
@@ -10,10 +47,10 @@ All notable changes for each version of this project will be documented in this
1047

1148
## 8.2.0
1249
### New theme
13-
Ignite UI for angular now have a new theme that mimics Microsoft "Fluent" design system.
14-
Depending on your use case you can use one of the following mixins:
15-
`igx-fluent-theme` and `igx-fluent-dark-theme`
16-
50+
Ignite UI for angular now have a new theme that mimics Microsoft "Fluent" design system.
51+
Depending on your use case you can use one of the following mixins:
52+
`igx-fluent-theme` and `igx-fluent-dark-theme`
53+
1754
We also added two new pallets that go with the new theme, `$fluent-word-palette` and `$fluent-excel-palette`.
1855

1956
Next example shows how you can use the Fluent theme.
@@ -33,7 +70,7 @@ Next example shows how you can use the Fluent theme.
3370
### Theme Changes
3471
`igx-badge-theme` - Removed the `$disable-shadow` property to mitigate confusion when specifying `$shadow` explicitly.
3572

36-
For more information about the theming please read our [documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/themes/index.html)
73+
For more information about the theming please read our [documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/themes/index.html)
3774

3875
### New Features
3976
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`
@@ -127,7 +164,7 @@ For more information about the theming please read our [documentation](https://w
127164
- **Breaking Change** Interfaces `IgxDropEventArgs` is renamed to `IDropDroppedEventArgs`.
128165
- **Breaking Change** Outputs `enter`, `over`, `leave`(former `onEnter`, `onOver`, `onLeave`) now have arguments of type `IDropBaseEventArgs`
129166
- **Breaking Change** Output `dropped` (former `onDrop`) now have arguments of type `IDropDroppedEventArgs`
130-
167+
131168
## 8.1.4
132169
- `IgxDialog` new @Input `positionSettings` is now available. It provides the ability to get/set both position and animation settings of the Dialog component.
133170

extras/template/strings/shell-strings.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,20 @@
3535
"Requires": "必須",
3636
"Default value": "デフォルト値",
3737
"Optional": "オプション",
38-
"Rest": "残りの引数"
38+
"Rest": "残りの引数",
39+
"All": "すべて",
40+
"Public": "パブリック",
41+
"Public/Protected": "パブリック/保護",
42+
"Inherited": "継承",
43+
"Externals": "外部",
44+
"Only exported": "エクスポートされたのみ",
45+
"Search API": "検索 API...",
46+
"Classes": "クラス",
47+
"Interfaces": "インターフェイス",
48+
"Enumerations": "列挙体",
49+
"Variables": "変数",
50+
"Functions": "関数",
51+
"Object literals": "オブジェクト リテラル",
52+
"GLOBALS": "グローバル"
3953
}
4054
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050
"version": "8.2.0",
5151
"description": "Updates Ignite UI for Angular from v8.1.x to v8.2.0",
5252
"factory": "./update-8_2_0"
53+
},
54+
"migration-11": {
55+
"version": "8.2.3",
56+
"description": "Updates Ignite UI for Angular from v8.2.0 to v8.2.3",
57+
"factory": "./update-8_2_3"
5358
}
5459
}
5560
}
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"$schema": "../../common/schema/theme-props.schema.json",
33
"changes": [{
4-
"name": "$disable-shadow",
5-
"remove": true,
6-
"owner": "igx-badge-theme"
7-
}]
4+
"name": "$disable-shadow",
5+
"remove": true,
6+
"owner": "igx-badge-theme"
7+
}
8+
]
89
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"$schema": "../../common/schema/theme-props.schema.json",
3+
"changes": [{
4+
"name": "$disable-button-shadow",
5+
"replaceWith": "$button-shadow",
6+
"owner": "igx-carousel-theme"
7+
}
8+
]
9+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import * as path from 'path';
2+
3+
// tslint:disable:no-implicit-dependencies
4+
import { EmptyTree } from '@angular-devkit/schematics';
5+
// tslint:disable-next-line:no-submodule-imports
6+
import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
7+
8+
describe('Update 8.2.3', () => {
9+
let appTree: UnitTestTree;
10+
const schematicRunner = new SchematicTestRunner('ig-migrate', path.join(__dirname, '../migration-collection.json'));
11+
const configJson = {
12+
defaultProject: 'testProj',
13+
projects: {
14+
testProj: {
15+
sourceRoot: '/testSrc'
16+
}
17+
},
18+
schematics: {
19+
'@schematics/angular:component': {
20+
prefix: 'appPrefix'
21+
}
22+
}
23+
};
24+
25+
beforeEach(() => {
26+
appTree = new UnitTestTree(new EmptyTree());
27+
appTree.create('/angular.json', JSON.stringify(configJson));
28+
});
29+
30+
it('should update igx-carousel-theme prop', done => {
31+
appTree.create(
32+
'/testSrc/appPrefix/component/test.component.scss',
33+
`$my-carousel-theme: igx-carousel-theme(
34+
$button-background: black,
35+
$disable-button-shadow: black,
36+
$button-hover-background: white
37+
);`
38+
);
39+
const tree = schematicRunner.runSchematic('migration-11', {}, appTree);
40+
expect(tree.readContent('/testSrc/appPrefix/component/test.component.scss'))
41+
.toEqual(
42+
`$my-carousel-theme: igx-carousel-theme(
43+
$button-background: black,
44+
$button-shadow: black,
45+
$button-hover-background: white
46+
);`
47+
);
48+
done();
49+
});
50+
});
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import {
2+
Rule,
3+
SchematicContext,
4+
Tree
5+
} from '@angular-devkit/schematics';
6+
import { UpdateChanges } from '../common/UpdateChanges';
7+
8+
const version = '8.2.3';
9+
10+
export default function(): Rule {
11+
return (host: Tree, context: SchematicContext) => {
12+
context.logger.info(`Applying migration for Ignite UI for Angular to version ${version}`);
13+
14+
const update = new UpdateChanges(__dirname, host, context);
15+
update.applyChanges();
16+
};
17+
}

projects/igniteui-angular/src/lib/buttonGroup/buttonGroup.component.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,6 @@ export class IgxButtonGroupComponent extends DisplayDensityBase implements After
298298
const button = this.buttons[index];
299299
const buttonElement = button.nativeElement;
300300

301-
if (buttonElement.classList.contains('igx-button--disabled')) {
302-
return;
303-
}
304-
305301
this.selectedIndexes.push(index);
306302
button.selected = true;
307303

@@ -345,10 +341,6 @@ export class IgxButtonGroupComponent extends DisplayDensityBase implements After
345341
const button = this.buttons[index];
346342
const buttonElement = button.nativeElement;
347343

348-
if (buttonElement.classList.contains('igx-button--disabled')) {
349-
return;
350-
}
351-
352344
this.selectedIndexes.splice(this.selectedIndexes.indexOf(index), 1);
353345
button.selected = false;
354346

@@ -392,7 +384,7 @@ export class IgxButtonGroupComponent extends DisplayDensityBase implements After
392384
button.disabled = true;
393385
}
394386

395-
if (!button.disabled && button.selected) {
387+
if (button.selected) {
396388
this.selectButton(index);
397389
}
398390

projects/igniteui-angular/src/lib/buttonGroup/buttongroup.component.spec.ts

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { ButtonGroupAlignment, IgxButtonGroupComponent, IgxButtonGroupModule } f
77
import { IgxButtonModule } from '../directives/button/button.directive';
88
import { configureTestSuite } from '../test-utils/configure-suite';
99
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
10+
import { UIInteractions } from '../test-utils/ui-interactions.spec';
1011

1112
interface IButton {
1213
type?: string;
@@ -129,7 +130,27 @@ describe('IgxButtonGroup', () => {
129130
expect(buttongroup.selectedButtons.length).toBe(0);
130131
buttongroup.selectButton(0);
131132
buttongroup.selectButton(3);
132-
// Button 3 is disabled, so it isn't selected
133+
// Button 3 is disabled, but it can be selected
134+
expect(buttongroup.selectedButtons.length).toBe(2);
135+
});
136+
137+
it('Button Group multiple selection with mouse click', () => {
138+
const fixture = TestBed.createComponent(InitButtonGroupWithValuesComponent);
139+
fixture.detectChanges();
140+
141+
const buttongroup = fixture.componentInstance.buttonGroup;
142+
expect(buttongroup.multiSelection).toBeTruthy();
143+
144+
UIInteractions.simulateClickEvent(buttongroup.buttons[0].nativeElement);
145+
expect(buttongroup.selectedButtons.length).toBe(1);
146+
UIInteractions.simulateClickEvent(buttongroup.buttons[1].nativeElement);
147+
expect(buttongroup.selectedButtons.length).toBe(2);
148+
UIInteractions.simulateClickEvent(buttongroup.buttons[0].nativeElement);
149+
UIInteractions.simulateClickEvent(buttongroup.buttons[1].nativeElement);
150+
expect(buttongroup.selectedButtons.length).toBe(0);
151+
UIInteractions.simulateClickEvent(buttongroup.buttons[0].nativeElement);
152+
UIInteractions.simulateClickEvent(buttongroup.buttons[3].nativeElement);
153+
// Button 3 is disabled, and it should not be selected with mouse click
133154
expect(buttongroup.selectedButtons.length).toBe(1);
134155
});
135156

@@ -150,7 +171,9 @@ describe('IgxButtonGroup', () => {
150171
expect(buttongroup.selectedButtons.length).toBe(0);
151172
buttongroup.selectButton(0);
152173
buttongroup.selectButton(3);
153-
// Button 3 is disabled, so it isn't selected
174+
// It should be possible to select disabled buttons
175+
expect(buttongroup.selectedButtons.length).toBe(2);
176+
buttongroup.deselectButton(3);
154177
expect(buttongroup.selectedButtons.length).toBe(1);
155178
});
156179

@@ -178,8 +201,8 @@ describe('IgxButtonGroup', () => {
178201
buttongroup.selectButton(2);
179202
buttongroup.selectButton(3);
180203
expect(buttongroup.selectedButtons.length).toBe(1);
181-
// Button 3 is disabled, so it isn't selected
182-
expect(buttongroup.buttons.indexOf(buttongroup.selectedButtons[0])).toBe(2);
204+
// Button 3 is disabled, but it can be selected
205+
expect(buttongroup.buttons.indexOf(buttongroup.selectedButtons[0])).toBe(3);
183206
});
184207

185208
it('Button Group - selection handles wrong indexes gracefully', () => {

0 commit comments

Comments
 (0)