Skip to content

Commit c96f015

Browse files
authored
Merge branch 'master' into typedoc-changes-master
2 parents 6c11f81 + b2f08b3 commit c96f015

35 files changed

+477
-266
lines changed

CHANGELOG.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,24 @@
22

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

5-
## 15.1.1
6-
- **Breaking Changes** - ` $label-floated-background` and `$label-floated-disabled-background` properties of `IgxInputGroupComponent` theme has been removed.
7-
- `IgxInputGroupComponent` The input group has been refactored so that the floating label for the input of `type="border"` does not require a background to match the surface background under the input field. Also, suffixes and prefixes are refactored to take the full height of the input which makes it easy to add background to them.
8-
-
9-
- **Breaking Changes** - `$size` property of `scrollbar-theme` theme has been renamed to `$scrollbar-size`.
10-
115
## 15.1.0
126

137
### New Features
148
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`:
159
- `GroupMemberCountSortingStrategy` is added, which can be used to sort the grid by number of items in each group in ASC or DESC order, if grouping is applied.
1610
- A new argument `primaryKey` has been introduced to `IRowDataEventArgs` Interface and part of the event arguments that are emitted by the `rowAdded` and `rowDeleted` events. When the grid has a primary key attribute added, then the emitted `primaryKey` event argument represents the row ID, otherwise it defaults to undefined.
11+
- Added the `autoGenerateExclude` property that accepts an array of strings for property names that are to be excluded from the generated column collection
1712
- `IgxColumnComponent`
1813
- Added `currRec` and `groupRec` parameters to the `groupingComparer` function that give access to the all properties of the compared records.
14+
- `IgxOverlayService`
15+
-A new event `contentAppending` is introduced - the event is emitted before the content is appended to the overlay. The event is emitted with `OverlayEventArgs` arguments and is not cancellable.
1916

2017
### General
2118
- `IgxPivotGrid`
2219
- The `IgxPivotDateDimension` properties `inBaseDimension` and `inOption` have been deprecated and renamed to `baseDimension` and `options` respectively.
2320
- `IgxGrid`
2421
- **Breaking Change** The `onGroupingDone` output has been renamed to `groupingDone` to not violate the no on-prefixed outputs convention. Automatic migrations are available and will be applied on `ng update`.
22+
- Column formatters are now applied to values shown group rows when using the default template. For custom formatters, the formatter function is called with the data from the first row in the group.
2523
- `DisplayDensity`
2624
- **Breaking Change** The `onDensityChanged` output has been renamed to `densityChanged` to not violate the no on-prefixed outputs convention. All components exposing this event are affected. Automatic migrations are available and will be applied on `ng update`.
2725
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`
@@ -35,12 +33,14 @@ All notable changes for each version of this project will be documented in this
3533
- `igxMask` directive
3634
- Added the capability to escape mask pattern literals.
3735
- `IgxBadge`
38-
- Added `shape` property that controls the shape of the badge and can be either `square` or `rounded`. The default shape of the badge is rounded.
36+
- Added `shape` property that controls the shape of the badge and can be either `square` or `rounded`. The default shape of the badge is rounded.
3937
- `IgxAvatar`
40-
- **Breaking Change** The `roundShape` property has been deprecated and will be removed in a future version. Users can control the shape of the avatar by the newly added `shape` attribute that can be `square`, `rounded` or `circle`. The default shape of the avatar is `square`.
38+
- **Breaking Change** The `roundShape` property has been deprecated and will be removed in a future version. Users can control the shape of the avatar by the newly added `shape` attribute that can be `square`, `rounded` or `circle`. The default shape of the avatar is `square`.
4139
- `IgxOverlayService`
4240
- `attach` method overload accepting `ComponentFactoryResolver` (trough `NgModuleRef`-like object) is now deprecated in line with API deprecated in Angular 13. New overload is added accepting `ViewComponentRef` that should be used instead.
43-
41+
- **Breaking Changes** - ` $label-floated-background` and `$label-floated-disabled-background` properties of `IgxInputGroupComponent` theme has been removed.
42+
- `IgxInputGroupComponent` The input group has been refactored so that the floating label for the input of `type="border"` does not require a background to match the surface background under the input field. Also, suffixes and prefixes are refactored to take the full height of the input which makes it easy to add background to them.
43+
- **Breaking Changes** - `$size` property of `scrollbar-theme` theme has been renamed to `$scrollbar-size`.
4444

4545
## 15.0.1
4646

projects/igniteui-angular/.eslintrc.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,14 @@
4141
],
4242
"id-blacklist": "off",
4343
"id-match": "off",
44-
"no-underscore-dangle": "off"
44+
"no-underscore-dangle": "off",
45+
"no-restricted-syntax": [
46+
"error",
47+
{
48+
"selector": "Decorator[expression.callee.name=HostBinding] Literal[value='attr.class']",
49+
"message": "Do not use `attr.class` HostBinding in public-facing components"
50+
}
51+
]
4552
}
4653
},
4754
{

projects/igniteui-angular/migrations/update-15_1_0/changes/members.json

Lines changed: 0 additions & 72 deletions
This file was deleted.

projects/igniteui-angular/migrations/update-15_1_0/index.spec.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,7 @@ describe(`Update to ${version}`, () => {
145145
`$custom-scrollbar: scrollbar-theme($size: 10px);`
146146
);
147147

148-
const tree = await schematicRunner
149-
.runSchematicAsync(migrationName, {}, appTree)
150-
.toPromise();
148+
const tree = await schematicRunner.runSchematic(migrationName, { shouldInvokeLS: false }, appTree);
151149

152150
expect(tree.readContent('/testSrc/appPrefix/component/test.component.scss')).toEqual(
153151
`$custom-scrollbar: scrollbar-theme($scrollbar-size: 10px);`
@@ -160,9 +158,7 @@ describe(`Update to ${version}`, () => {
160158
`$custom-input: input-group-theme($label-floated-background: transparent, $label-floated-disabled-background: transparent);`
161159
);
162160

163-
const tree = await schematicRunner
164-
.runSchematicAsync(migrationName, {}, appTree)
165-
.toPromise();
161+
const tree = await schematicRunner.runSchematic(migrationName, { shouldInvokeLS: false }, appTree);
166162

167163
expect(tree.readContent('/testSrc/appPrefix/component/test.component.scss')).toEqual(
168164
`$custom-input: input-group-theme();`

projects/igniteui-angular/src/lib/action-strip/action-strip.component.spec.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,26 @@ describe('igxActionStrip', () => {
9999
const asQuery = fixture.debugElement.query(By.css('igx-action-strip'));
100100
expect(asQuery.nativeElement.style.display).toBe('none');
101101
});
102+
103+
it('should change displayDensity runtime correctly', () => {
104+
// density with custom class applied
105+
actionStripElement.nativeElement.classList.add('custom');
106+
fixture.detectChanges();
107+
108+
expect(actionStripElement.nativeElement.classList).toEqual(jasmine.arrayWithExactContents(['custom', 'igx-action-strip']));
109+
110+
actionStrip.displayDensity = 'cosy';
111+
fixture.detectChanges();
112+
expect(actionStripElement.nativeElement.classList).toEqual(
113+
jasmine.arrayWithExactContents(['custom', 'igx-action-strip', 'igx-action-strip--cosy'])
114+
);
115+
116+
actionStrip.displayDensity = 'compact';
117+
fixture.detectChanges();
118+
expect(actionStripElement.nativeElement.classList).toEqual(
119+
jasmine.arrayWithExactContents(['custom', 'igx-action-strip', 'igx-action-strip--compact'])
120+
);
121+
});
102122
});
103123

104124
describe('render content as menu', () => {

projects/igniteui-angular/src/lib/action-strip/action-strip.component.ts

Lines changed: 23 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,6 @@ export class IgxActionStripComponent extends DisplayDensityBase implements After
107107
return this._hidden;
108108
}
109109

110-
/**
111-
* Host `class.igx-action-strip` binding.
112-
*
113-
* @hidden
114-
* @internal
115-
*/
116-
@Input('class')
117-
public hostClass: string;
118-
119110
/**
120111
* Gets/Sets the resource strings.
121112
*
@@ -136,7 +127,7 @@ export class IgxActionStripComponent extends DisplayDensityBase implements After
136127

137128
/**
138129
* Hide or not the Action Strip based on if it is a menu.
139-
*
130+
*
140131
* @hidden
141132
* @internal
142133
*/
@@ -180,34 +171,6 @@ export class IgxActionStripComponent extends DisplayDensityBase implements After
180171
super(_displayDensityOptions);
181172
}
182173

183-
/**
184-
* Getter for the 'display' property of the current `IgxActionStrip`
185-
*
186-
* @hidden
187-
* @internal
188-
*/
189-
@HostBinding('style.display')
190-
public get display(): string {
191-
return this._hidden ? 'none' : 'flex';
192-
}
193-
194-
/**
195-
* Host `attr.class` binding.
196-
*
197-
* @hidden
198-
* @internal
199-
*/
200-
@HostBinding('attr.class')
201-
public get hostClasses(): string {
202-
const classes = [this.getComponentDensityClass('igx-action-strip')];
203-
// The custom classes should be at the end.
204-
if (!classes.includes('igx-action-strip')) {
205-
classes.push('igx-action-strip');
206-
}
207-
classes.push(this.hostClass);
208-
return classes.join(' ');
209-
}
210-
211174
/**
212175
* Menu Items list.
213176
*
@@ -227,6 +190,28 @@ export class IgxActionStripComponent extends DisplayDensityBase implements After
227190
return [... this._menuItems.toArray(), ...actions];
228191
}
229192

193+
194+
/**
195+
* Getter for the 'display' property of the current `IgxActionStrip`
196+
*/
197+
@HostBinding('style.display')
198+
private get display(): string {
199+
return this._hidden ? 'none' : 'flex';
200+
}
201+
202+
/**
203+
* Host `attr.class` binding.
204+
*/
205+
@HostBinding('class')
206+
private get hostClasses(): string {
207+
let hostClass = this.getComponentDensityClass('igx-action-strip');
208+
if (hostClass !== 'igx-action-strip') {
209+
// action strip requires the base class to be always present:
210+
hostClass = `igx-action-strip ${hostClass}`;
211+
}
212+
return hostClass;
213+
}
214+
230215
/**
231216
* @hidden
232217
* @internal

projects/igniteui-angular/src/lib/card/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ Supporting directives and components:
4747
## igx-card-header
4848
| Name | Type | Description |
4949
|:----------|:-------------:|:------|
50-
| `role` | string | The role attribute of the card header. By default it's set to `header`. |
5150
| `vertical` | boolean | Sets the header layout direction. When set to `true` the card content is vertically layed out. |
5251

5352
## igx-card-media

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,6 @@ export class IgxCardHeaderComponent {
8888
@HostBinding('class.igx-card-header--vertical')
8989
@Input()
9090
public vertical = false;
91-
92-
/**
93-
* An @Input property that sets the value of the `role` attribute of the card header.
94-
* By default the value is set to `header`.
95-
*
96-
* @example
97-
* ```html
98-
* <igx-card-header role="header"></igx-card-header>
99-
* ```
100-
*/
101-
@HostBinding('attr.role')
102-
public role = 'header';
10391
}
10492

10593
/**

projects/igniteui-angular/src/lib/card/card.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ describe('Card', () => {
124124
const header = fixture.debugElement.query(By.css('igx-card-header')).nativeElement;
125125

126126
expect(header).toBeDefined();
127-
expect(header.getAttribute('role')).toEqual('header');
127+
// K.D. March 20th, 2023 #12792 Card header should have no role
128+
// expect(header.getAttribute('role')).toEqual('header');
129+
expect(header.getAttribute('role')).toBeNull();
128130

129131
expect(header).toHaveClass(classes.header.base);
130132
expect(header).not.toHaveClass(classes.header.vertical);

projects/igniteui-angular/src/lib/chips/chip.component.ts

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,6 @@ export class IgxChipComponent extends DisplayDensityBase {
219219
@Input()
220220
public selectIcon: TemplateRef<any>;
221221

222-
/**
223-
* @hidden
224-
* @internal
225-
*/
226-
@Input()
227-
public class = '';
228-
229222
/**
230223
* An @Input property that defines if the `IgxChipComponent` is disabled. When disabled it restricts user interactions
231224
* like focusing on click or tab, selection on click or Space, dragging.
@@ -464,26 +457,6 @@ export class IgxChipComponent extends DisplayDensityBase {
464457
@Output()
465458
public dragDrop = new EventEmitter<IChipEnterDragAreaEventArgs>();
466459

467-
/**
468-
* @hidden
469-
* @internal
470-
*/
471-
@HostBinding('attr.class')
472-
public get hostClass(): string {
473-
const classes = [this.getComponentDensityClass('igx-chip')];
474-
475-
// Add the base class first for each density
476-
if (!classes.includes('igx-chip')) {
477-
classes.unshift('igx-chip');
478-
}
479-
480-
classes.push(this.disabled ? 'igx-chip--disabled' : '');
481-
482-
// The custom classes should be at the end.
483-
classes.push(this.class);
484-
return classes.join(' ').toString().trim();
485-
}
486-
487460
/**
488461
* Property that contains a reference to the `IgxDragDirective` the `IgxChipComponent` uses for dragging behavior.
489462
*
@@ -574,6 +547,20 @@ export class IgxChipComponent extends DisplayDensityBase {
574547
super(_displayDensityOptions);
575548
}
576549

550+
@HostBinding('class')
551+
private get hostClass(): string {
552+
const classes = [this.getComponentDensityClass('igx-chip')];
553+
554+
// Add the base class first for each density
555+
if (!classes.includes('igx-chip')) {
556+
classes.unshift('igx-chip');
557+
}
558+
559+
classes.push(this.disabled ? 'igx-chip--disabled' : '');
560+
561+
return classes.join(' ').toString().trim();
562+
}
563+
577564
/**
578565
* @hidden
579566
* @internal

0 commit comments

Comments
 (0)