Skip to content

Commit 69c0e2c

Browse files
committed
Merge branch 'master' into simeonoff/toast-outlet
2 parents 3ab6cc7 + 300904f commit 69c0e2c

Some content is hidden

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

49 files changed

+728
-114
lines changed

CHANGELOG.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,29 @@ All notable changes for each version of this project will be documented in this
44
## 10.2.0
55

66
### General
7+
- `IgxDatePicker`
8+
- Added `aria-labelledby` property for the input field. This will ensure the users of assistive technologies will also know what component is used for, upon input focus.
79
- `IgxInputGroup`
8-
- **Breaking Change** - Removed `fluent`, `fluent_search`, `bootstrap`, and `indigo` as possible values for the `type` input property.
10+
- **Breaking Change** - Removed `fluent`, `fluent_search`, `bootstrap`, and `indigo` as possible values for the `type` input property.
911
- **Behavioral Change** - The styling of the input group is now dictated by the theme being used. The remaining `types` - `line`, `border`, and `box` will only have effect on the styling when used with the `material` theme. The `search` type will affect styling when used with all themes. Changing the theme at runtime will not change the styling of the input group, a page refresh is required.
1012
- `IgxOverlay`
1113
- **Breaking Change** - `target` property in `PositionSettings` has been deprecated. You can set the attaching target for the component to show in `OverlaySettings` instead.
1214
- `IgxSelect`
1315
- Added `aria-labelledby` property for the items list container(marked as `role="listbox"`). This will ensure the users of assistive technologies will also know what the list items container is used for, upon opening.
14-
- `IgxDatePicker`
15-
- **Breaking Change** - Deprecated the `label` and `labelVisibility` properties.
16+
- `IgxDatePicker`
17+
- **Breaking Change** - Deprecated the `label` property.
1618

1719

1820
### New Features
1921
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`
2022
- When triggering an export of the grid via the toolbar and the export takes more than 500 milliseconds, the export button becomes disabled and an indeterminate progress bar is shown at the bottom of the toolbar until the export is finished.
23+
- Added *getRowData(rowSelector)* method that returns an object that represents the data that is contained in the specified row component.
2124
- ` IGX_INPUT_GROUP_TYPE` injection token
2225
- Allows for setting an input group `type` on a global level, so all input-group instances, including components using such an instance as a template will have their input group type set to the one specified by the token. It can be overridden on a component level by explicitly setting a `type`.
2326
- ` IgxExcelExporterService`
2427
- Added `worksheetName` property to the `IgxExcelExporterOptions`, that allows setting the name of the worksheet.
2528
- `IgxDatePicker`
26-
- The `labelVisibility` and the `label` property have been deprecated and now a custom label is set by nesting a <label igxLabel></label> inside the <igx-date-picker><igx-date-picker> tags.
29+
- The the `label` property have been deprecated and a custom label can also be set by nesting a <label igxLabel></label> inside the <igx-date-picker><igx-date-picker> tags.
2730
- `IgxTimePicker`
2831
- Added a custom label functionality.
2932
- `IgxCalendar` and `IgxDatePicker` - new `showWeekNumbers` input, that allows showing of the week number at left side of content area.
@@ -56,7 +59,7 @@ All notable changes for each version of this project will be documented in this
5659
- `igxGrid`
5760
- **Behavioral Change** - For numeric columns, the onCellEdit arguments' newValue will now contain the numeric value that will be committed instead of the string input.
5861
- Added `onScroll` event, which is emitted when the grid is scrolled vertically or horizontally.
59-
- Each grid now expose a default handling for boolean column types. The column will display `check` or `close` icon, instead of true/false by default.
62+
- Each grid now expose a default handling for boolean column types. The column will display `check` or `close` icon, instead of true/false by default.
6063
- `igxTreeGrid`
6164
- Removed `onDataPreLoad` event as it is specific for remote virtualization implementation, which is not supported for the `igxTreeGrid`. A more generic `onScroll` event is exposed and can be used instead.
6265
- `IgxTimePicker`

package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"@angular/platform-browser": "^10.1.0",
5353
"@angular/platform-browser-dynamic": "^10.1.0",
5454
"@angular/router": "^10.1.0",
55+
"@igniteui/material-icons-extended": "^2.3.0",
5556
"@types/hammerjs": "^2.0.36",
5657
"@types/source-map": "0.5.2",
5758
"classlist.js": "^1.1.20150312",
@@ -62,8 +63,8 @@
6263
"lodash.merge": "^4.6.2",
6364
"resize-observer-polyfill": "^1.5.1",
6465
"rxjs": "^6.6.3",
65-
"tslib": "^2.0.0",
6666
"setimmediate": "^1.0.5",
67+
"tslib": "^2.0.0",
6768
"web-animations-js": "^2.3.2",
6869
"zone.js": "~0.10.3"
6970
},

projects/igniteui-angular/src/lib/action-strip/grid-actions/grid-actions-base.directive.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { Directive, Inject } from '@angular/core';
22
import { IgxActionStripComponent } from '../action-strip.component';
33
import { IgxRowDirective } from '../../grids/public_api';
4-
import { IgxGridIconService } from '../../grids/common/grid-icon.service';
4+
import { IgxIconService } from '../../icon/icon.service';
55

66
@Directive({
77
selector: '[igxGridActionsBase]'
88
})
99
export class IgxGridActionsBaseDirective {
10-
constructor(@Inject(IgxActionStripComponent) protected strip: IgxActionStripComponent, protected iconService: IgxGridIconService) { }
10+
constructor(@Inject(IgxActionStripComponent) protected strip: IgxActionStripComponent, protected iconService: IgxIconService) { }
1111

1212
/**
1313
* Getter to be used in template

projects/igniteui-angular/src/lib/action-strip/grid-actions/grid-editing-actions.component.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
<button igxButton="icon" [disabled]="disabled" igxRipple (click)="startEdit($event)">
33
<igx-icon>edit</igx-icon>
44
</button>
5+
<button *ngIf="addRow" igxButton="icon" [disabled]="disabled" igxRipple (click)="addChild($event)">
6+
<igx-icon fontSet="imx-icons" name="add-row"></igx-icon>
7+
</button>
58
<button igxButton="icon" [disabled]="disabled" class="igx-action-strip__delete" igxRipple (click)="deleteRow($event)">
6-
<igx-icon >delete</igx-icon>
9+
<igx-icon>delete</igx-icon>
710
</button>
811
</ng-container>

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

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { Component, HostBinding } from '@angular/core';
1+
import { Component, HostBinding, Input } from '@angular/core';
22
import { IgxGridActionsBaseDirective } from './grid-actions-base.directive';
33
import { showMessage } from '../../core/deprecateDecorators';
4+
import { addRow } from '@igniteui/material-icons-extended';
45

56
@Component({
67
selector: 'igx-grid-editing-actions',
@@ -18,6 +19,23 @@ export class IgxGridEditingActionsComponent extends IgxGridActionsBaseDirective
1819
public cssClass = 'igx-action-strip__editing-actions';
1920

2021
private isMessageShown = false;
22+
private _addRow = false;
23+
private iconsRendered = false;
24+
25+
/**
26+
* An input to enable/disable action strip row adding button
27+
*/
28+
@Input()
29+
public set addRow(value: boolean) {
30+
this._addRow = value;
31+
}
32+
public get addRow(): boolean {
33+
if (!this.iconsRendered) {
34+
this.registerIcons();
35+
this.iconsRendered = true;
36+
}
37+
return this._addRow;
38+
}
2139

2240
/**
2341
* Enter row or cell edit mode depending the grid rowEditable option
@@ -69,6 +87,23 @@ export class IgxGridEditingActionsComponent extends IgxGridActionsBaseDirective
6987
this.strip.hide();
7088
}
7189

90+
public addChild(event?): void {
91+
if (event) {
92+
event.stopPropagation();
93+
}
94+
if (!this.isRow(this.strip.context)) {
95+
return;
96+
}
97+
const context = this.strip.context;
98+
const grid = context.grid;
99+
if (!grid.rowEditable) {
100+
console.warn('The grid must be in row edit mode to perform row adding!');
101+
return;
102+
}
103+
grid.beginAddRowByIndex(context.rowID, context.index);
104+
this.strip.hide();
105+
}
106+
72107
/**
73108
* Getter if the row is disabled
74109
* @hidden
@@ -80,4 +115,12 @@ export class IgxGridEditingActionsComponent extends IgxGridActionsBaseDirective
80115
}
81116
return this.strip.context.disabled;
82117
}
118+
119+
/**
120+
* @hidden
121+
* @internal
122+
*/
123+
private registerIcons() {
124+
this.iconService.addSvgIconFromText(addRow.name, addRow.value, 'imx-icons');
125+
}
83126
}

projects/igniteui-angular/src/lib/action-strip/grid-actions/grid-pinning-actions-icons.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<ng-container *ngIf="isRowContext">
22
<button *ngIf="inPinnedArea && pinnedTop" igxRipple igxButton="icon" (click)="scrollToRow($event)">
3-
<igx-icon fontSet="pinning-actions-icons" name="jump_down"></igx-icon>
3+
<igx-icon fontSet="imx-icons" name="jump-down"></igx-icon>
44
</button>
55
<button *ngIf="inPinnedArea && !pinnedTop" igxRipple igxButton="icon" (click)="scrollToRow($event)">
6-
<igx-icon fontSet="pinning-actions-icons" name="jump_up"></igx-icon>
6+
<igx-icon fontSet="imx-icons" name="jump-up"></igx-icon>
77
</button>
88
<button *ngIf="!pinned" igxRipple igxButton="icon" (click)="pin($event)">
9-
<igx-icon fontSet="pinning-icons" name="pin"></igx-icon>
9+
<igx-icon fontSet="imx-icons" name="pin-left"></igx-icon>
1010
</button>
1111
<button *ngIf="pinned" igxRipple igxButton="icon" (click)="unpin($event)">
12-
<igx-icon fontSet="pinning-icons" name="unpin"></igx-icon>
12+
<igx-icon fontSet="imx-icons" name="unpin-left"></igx-icon>
1313
</button>
14-
</ng-container>
14+
</ng-container>

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ describe('igxGridPinningActions #grid ', () => {
3939
let pinIcon, unpinIcon;
4040
actionStrip.show(grid.rowList.first);
4141
fixture.detectChanges();
42-
pinIcon = fixture.debugElement.query(By.css(`igx-icon[name=pin]`));
43-
unpinIcon = fixture.debugElement.query(By.css(`igx-icon[name=unpin]`));
42+
pinIcon = fixture.debugElement.query(By.css(`igx-icon[name=pin-left]`));
43+
unpinIcon = fixture.debugElement.query(By.css(`igx-icon[name=unpin-left]`));
4444
expect(unpinIcon).toBeNull();
4545
pinIcon.parent.triggerEventHandler('click', new Event('click'));
4646
actionStrip.hide();
@@ -49,8 +49,8 @@ describe('igxGridPinningActions #grid ', () => {
4949

5050
actionStrip.show(grid.pinnedRows[0]);
5151
fixture.detectChanges();
52-
pinIcon = fixture.debugElement.query(By.css(`igx-icon[name=pin]`));
53-
unpinIcon = fixture.debugElement.query(By.css(`igx-icon[name=unpin]`));
52+
pinIcon = fixture.debugElement.query(By.css(`igx-icon[name=pin-left]`));
53+
unpinIcon = fixture.debugElement.query(By.css(`igx-icon[name=unpin-left]`));
5454
expect(pinIcon).toBe(null);
5555
unpinIcon.parent.triggerEventHandler('click', new Event('click'));
5656
actionStrip.hide();
@@ -65,7 +65,7 @@ describe('igxGridPinningActions #grid ', () => {
6565
actionStrip.show(grid.pinnedRows[0]);
6666
fixture.detectChanges();
6767

68-
const jumpIcon = fixture.debugElement.query(By.css(`igx-icon[name=jump_down]`));
68+
const jumpIcon = fixture.debugElement.query(By.css(`igx-icon[name=jump-down]`));
6969
jumpIcon.parent.triggerEventHandler('click', new Event('click'));
7070
await wait();
7171
fixture.detectChanges();

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { Component, HostBinding } from '@angular/core';
22
import { IgxGridActionsBaseDirective } from './grid-actions-base.directive';
3-
import { GridIconsFeature } from '../../grids/common/enums';
4-
import { PINNING_ACTIONS_ICONS_FONT_SET, PINNING_ACTIONS_ICONS, } from './grid-pinning-actions-icons';
5-
import { PINNING_ICONS_FONT_SET, PINNING_ICONS } from '../../grids/pinning/pinning-icons';
3+
import { pinLeft, unpinLeft, jumpDown, jumpUp } from '@igniteui/material-icons-extended';
64
@Component({
75
selector: 'igx-grid-pinning-actions',
86
templateUrl: 'grid-pinning-actions.component.html',
@@ -119,8 +117,10 @@ export class IgxGridPinningActionsComponent extends IgxGridActionsBaseDirective
119117
const context = this.strip.context;
120118
const grid = context.grid;
121119
if (grid) {
122-
this.iconService.registerSVGIcons(GridIconsFeature.RowPinning, PINNING_ICONS, PINNING_ICONS_FONT_SET);
123-
this.iconService.registerSVGIcons(GridIconsFeature.RowPinningActions, PINNING_ACTIONS_ICONS, PINNING_ACTIONS_ICONS_FONT_SET);
120+
this.iconService.addSvgIconFromText(pinLeft.name, pinLeft.value, 'imx-icons');
121+
this.iconService.addSvgIconFromText(unpinLeft.name, unpinLeft.value, 'imx-icons');
122+
this.iconService.addSvgIconFromText(jumpDown.name, jumpDown.value, 'imx-icons');
123+
this.iconService.addSvgIconFromText(jumpUp.name, jumpDown.value, 'imx-icons');
124124
}
125125
}
126126
}

0 commit comments

Comments
 (0)