Skip to content

Commit 6454233

Browse files
authored
Merge branch 'master' into vslavov/combo-remote-clear
2 parents d8ce58a + 13ac9af commit 6454233

Some content is hidden

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

44 files changed

+1646
-154
lines changed

CHANGELOG.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,26 @@ For more information about the theming please read our [documentation](https://w
3232
- `uniqueColumnValuesStrategy` input is added. This property provides a callback for loading unique column values on demand. If this property is provided, the unique values it generates will be used by the Excel Style Filtering (instead of using the unique values from the data that is bound to the grid).
3333
- `igxExcelStyleLoading` directive is added, which can be used to provide a custom loading template for the Excel Style Filtering. If this property is not provided, a default loading template will be used instead.
3434
- introduced new properties `cellSelection` and `rowSelection` which accept GridSelection mode enumeration. Grid selection mode could be none, single or multiple. Also `hideRowSelectors` property is added, which allows you to show and hide row selectors when row selection is enabled.
35+
- introduced functionality for templating row and header selectors - [spec](https://github.com/IgniteUI/igniteui-angular/wiki/Row-Selection-Templating-(Grid-feature))
36+
```html
37+
<igx-grid [data]="data", [rowSelection]="'multiple'" primaryKey="ID">
38+
<igx-column field="Name"></igx-column>
39+
<igx-column field="Age"></igx-column>
40+
41+
<ng-template igxHeadSelector let-headSelector>
42+
<igx-icon>done_all</igx-icon>
43+
</ng-template>
44+
<ng-template igxRowSelector let-rowContext>
45+
<igx-switch [checked]="rowContext.selected"></igx-switch>
46+
</ng-template>
47+
</igx-grid>
48+
```
3549
- `IgxHierarchicalGrid`
3650
- Row Islands now emit child grid events with an additional argument - `owner`, which holds reference to the related child grid component instance.
3751
- `IgxDrag`
3852
- Dragging without ghost. Now it is possible to drag the base element `igxDrag` is instanced on by setting the new input `ghost` to false.
3953
- Ghost template. A custom ghost template reference can be provided on the new `ghostTemplate` input.
40-
- Dragging using a single or multiple handles. New `igxDragHandle` directive is exposed to specify a handle by which and element can be interacted with instead of the whole element `igxDrag` is instanced on.
54+
- Dragging using a single or multiple handles. New `igxDragHandle` directive is exposed to specify a handle by which an element can be interacted with instead of the whole element `igxDrag` is instanced on.
4155
- Linking of drag and drop elements. This can be achieved by using the new provided `dragChannel` input, specifying each element to which channel it corresponds.
4256
- Drag animation improvements. Three new methods have been exposed in place of the old `animateToOrigin` input in order to provide more flexibility when wanting to have transition animation to specific position when dropping. `setLocation`, `transitionToOrigin` and `transitionTo` are all methods that provide a various way to animate a transition to a specific location for the dragged element.
4357
- New getters - `location` and `originLocation` to aid in applying transition animations.
@@ -47,6 +61,8 @@ For more information about the theming please read our [documentation](https://w
4761
- Drop strategies. Three new drop strategies have been provided - Append, Prepend and Insert. Also an input `dropStrategy` to the `igxDrop` which specify which strategy should be used when dropping an element inside the drop area. Custom one can be specified as well.
4862
- `IgxCheckbox`
4963
- introduced a new `readonly` property that doesn't allow user interaction to change the state, but keeps the default active style. Intended for integration in complex controls that handle the interaction and control the checkbox instead through binding.
64+
- `IgxOverlay`
65+
- introduced a new `ContainerPositionStrategy`. The new strategy positions the element inside the containing outlet based on the directions passed in trough PositionSettings.
5066

5167
### General
5268
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`
@@ -78,10 +94,6 @@ For more information about the theming please read our [documentation](https://w
7894
```
7995
- **Breaking Change** When using `[valueKey]`, combo methods, events and outputs **cannot** be handled with *data item references*.
8096
- For more information, visit the component's [readme](https://github.com/IgniteUI/igniteui-angular/tree/master/projects/igniteui-angular/src/lib/combo/README.md)
81-
82-
## 8.1.4
83-
- `IgxDialog` new @Input `positionSettings` is now available. It provides the ability to get/set both position and animation settings of the Dialog component.
84-
8597
- `IgxDrag`
8698
- Deprecated inputs - `hideBaseOnDrag`, `animateOnRelease`, `visible`.
8799
- Deprecated methods - `dropFinished`.
@@ -97,10 +109,13 @@ For more information about the theming please read our [documentation](https://w
97109
- **Breaking Change** `onOver` output is renamed to `over`.
98110
- **Breaking Change** `onLeave` output is renamed to `leave`.
99111
- **Breaking Change** `onDrop` output is renamed to `dropped`.
100-
- **Breaking Change** Interfaces `IgxDropEnterEventArgs`, `IgxDropLeaveEventArgs` are both now called `IDragBaseEventArgs`.
112+
- **Breaking Change** Interfaces `IgxDropEnterEventArgs`, `IgxDropLeaveEventArgs` are both now called `IDropBaseEventArgs`.
101113
- **Breaking Change** Interfaces `IgxDropEventArgs` is renamed to `IDropDroppedEventArgs`.
102114
- **Breaking Change** Outputs `enter`, `over`, `leave`(former `onEnter`, `onOver`, `onLeave`) now have arguments of type `IDropBaseEventArgs`
103115
- **Breaking Change** Output `dropped` (former `onDrop`) now have arguments of type `IDropDroppedEventArgs`
116+
117+
## 8.1.4
118+
- `IgxDialog` new @Input `positionSettings` is now available. It provides the ability to get/set both position and animation settings of the Dialog component.
104119

105120
## 8.1.3
106121
- `IgxCombo`

ROADMAP.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
## Milestone 9 (Due by September, 2019)
66

77
1. IgxGrid Advanced Filtering [#5496](https://github.com/IgniteUI/igniteui-angular/issues/5496)
8-
2. IgxGrid row and cell selection modes [#4989](https://github.com/IgniteUI/igniteui-angular/issues/4989)
9-
3. Fluent Theme [#5335](https://github.com/IgniteUI/igniteui-angular/issues/5335)
10-
4. Drag and Drop enhancements [#5319](https://github.com/IgniteUI/igniteui-angular/issues/5319)
8+
2. **[DONE]** IgxGrid row and cell selection modes [#4989](https://github.com/IgniteUI/igniteui-angular/issues/4989)
9+
3. **[DONE]** Fluent Theme [#5335](https://github.com/IgniteUI/igniteui-angular/issues/5335)
10+
4. **[DONE]** Drag and Drop enhancements [#5319](https://github.com/IgniteUI/igniteui-angular/issues/5319)
1111
5. Multi-View Calendar + Range DatePicker [#4282](https://github.com/IgniteUI/igniteui-angular/issues/4282)
1212
6. Custom grid row selector templates [#4998](https://github.com/IgniteUI/igniteui-angular/issues/4998)
1313
7. Per-column Filtering Strategies [#5323](https://github.com/IgniteUI/igniteui-angular/issues/5323)
@@ -25,7 +25,7 @@
2525
1. **[DONE]** Grid Multi-Row Layout keyboard nav [#4708](https://github.com/IgniteUI/igniteui-angular/issues/4708) Released in [8.0.0](https://github.com/IgniteUI/igniteui-angular/releases/tag/8.0.0), [7.3.4](https://github.com/IgniteUI/igniteui-angular/releases/tag/7.3.4)
2626
2. **[DONE]** Angular 8 compatibility [#4908](https://github.com/IgniteUI/igniteui-angular/issues/4908) Released in [8.0.0](https://github.com/IgniteUI/igniteui-angular/releases/tag/8.0.0)
2727
3. **[DONE]** Display density for Drop Downs [#2960](https://github.com/IgniteUI/igniteui-angular/issues/2960) Released in [8.0.1](https://github.com/IgniteUI/igniteui-angular/releases/tag/8.0.1), [7.3.4](https://github.com/IgniteUI/igniteui-angular/releases/tag/7.3.4), [7.2.12](https://github.com/IgniteUI/igniteui-angular/releases/tag/7.2.12)
28-
4. **[DONE]** Slider custom labels [#4594](https://github.com/IgniteUI/igniteui-angular/issues/4594)
28+
4. **[DONE]** Slider custom thumb labels [#3449](https://github.com/IgniteUI/igniteui-angular/issues/3449)
2929
5. **[DONE]** Copy data from the igxGrid [#4907](https://github.com/IgniteUI/igniteui-angular/issues/4907)
3030
6. **[DONE]** BottomNav and Tabs integration with router outlet container [#4297](https://github.com/IgniteUI/igniteui-angular/issues/4297)
3131
7. **[DONE]** Date/Time pickers action buttons customization [#4647](https://github.com/IgniteUI/igniteui-angular/issues/4647) Released in [8.0.0](https://github.com/IgniteUI/igniteui-angular/releases/tag/8.0.0)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "../../common/schema/class.schema.json",
3+
"changes": [
4+
{
5+
"name": "IgxDropEnterEventArgs",
6+
"replaceWith": "IDropBaseEventArgs"
7+
},
8+
{
9+
"name": "IgxDropLeaveEventArgs",
10+
"replaceWith": "IDropBaseEventArgs"
11+
},
12+
{
13+
"name": "IgxDropEventArgs",
14+
"replaceWith": "IDropDroppedEventArgs"
15+
}
16+
]
17+
}

projects/igniteui-angular/migrations/update-8_2_0/index.spec.ts

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,52 @@ describe('Update 8.2.0', () => {
6666
it('should update igxDrag and igxDrop outputs bindings', done => {
6767
appTree.create(
6868
'/testSrc/appPrefix/component/custom.component.html',
69-
`<div igxDrag (onGhostCreate)="ghostCreateHandler($event)" (onGhostDestroy)="ghostDestroyHandler($event)" (returnMoveEnd)="moveEndHandler($event)" (dragClicked)="clickHandler($event)">Drag me</div>
69+
`<div igxDrag (onGhostCreate)="ghostCreateHandler($event)"
70+
(onGhostDestroy)="ghostDestroyHandler($event)"
71+
(returnMoveEnd)="moveEndHandler($event)"
72+
(dragClicked)="clickHandler($event)">
73+
Drag me
74+
</div>
7075
<div igxDrop (onEnter)="enterHandler($event)" (onLeave)="leaveHandler($event)" (onDrop)="dropHandler($event)">drop area</div>
7176
`);
72-
const tree = schematicRunner.runSchematic('migration-10', {}, appTree);
7377

78+
const tree = schematicRunner.runSchematic('migration-10', {}, appTree);
7479
expect(tree.readContent('/testSrc/appPrefix/component/custom.component.html'))
7580
.toEqual(
76-
`<div igxDrag (ghostCreate)="ghostCreateHandler($event)" (ghostDestroy)="ghostDestroyHandler($event)" (transitioned)="moveEndHandler($event)" (click)="clickHandler($event)">Drag me</div>
81+
`<div igxDrag (ghostCreate)="ghostCreateHandler($event)"
82+
(ghostDestroy)="ghostDestroyHandler($event)"
83+
(transitioned)="moveEndHandler($event)"
84+
(click)="clickHandler($event)">
85+
Drag me
86+
</div>
7787
<div igxDrop (enter)="enterHandler($event)" (leave)="leaveHandler($event)" (dropped)="dropHandler($event)">drop area</div>
7888
`);
7989
done();
8090
});
91+
92+
it('should update igxDrag and igxDrop event argument interfaces', done => {
93+
appTree.create(
94+
'/testSrc/appPrefix/component/test.component.ts',
95+
`import { IgxDragDirective, IgxDropDirective, IgxDropEnterEventArgs,
96+
IgxDropLeaveEventArgs, IgxDropEventArgs } from 'igniteui-angular';
97+
98+
export class DragDropSampleComponent {
99+
public onEnterHandler(event: IgxDropEnterEventArgs) {}
100+
public onLeaveHandler(event: IgxDropLeaveEventArgs) {}
101+
public onDropHandler(event: IgxDropEventArgs) {}
102+
}`);
103+
104+
const tree = schematicRunner.runSchematic('migration-10', {}, appTree);
105+
expect(tree.readContent('/testSrc/appPrefix/component/test.component.ts'))
106+
.toEqual(
107+
`import { IgxDragDirective, IgxDropDirective, IDropBaseEventArgs,
108+
IDropBaseEventArgs, IDropDroppedEventArgs } from 'igniteui-angular';
109+
110+
export class DragDropSampleComponent {
111+
public onEnterHandler(event: IDropBaseEventArgs) {}
112+
public onLeaveHandler(event: IDropBaseEventArgs) {}
113+
public onDropHandler(event: IDropDroppedEventArgs) {}
114+
}`);
115+
done();
116+
});
81117
});

projects/igniteui-angular/src/lib/core/grid-selection.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,11 @@ export class IgxGridSelectionService {
272272
* Adds a single node.
273273
* Single clicks | Ctrl + single clicks on cells is the usual case.
274274
*/
275-
add(node: ISelectionNode): void {
275+
add(node: ISelectionNode, addToRange = true): void {
276276
this.selection.has(node.row) ? this.selection.get(node.row).add(node.column) :
277277
this.selection.set(node.row, new Set<number>()).get(node.row).add(node.column);
278278

279-
this._ranges.add(JSON.stringify(this.generateRange(node)));
279+
if (addToRange) { this._ranges.add(JSON.stringify(this.generateRange(node))); }
280280
}
281281

282282
/**
@@ -307,10 +307,10 @@ export class IgxGridSelectionService {
307307
return (this.isActiveNode(node) && this.grid.isCellSelectable) || this.isInMap(node);
308308
}
309309

310-
isActiveNode(node: ISelectionNode, mrl = false): boolean {
310+
isActiveNode(node: ISelectionNode): boolean {
311311
if (this.activeElement) {
312312
const isActive = this.activeElement.column === node.column && this.activeElement.row === node.row;
313-
if (mrl) {
313+
if (this.grid.hasColumnLayouts) {
314314
const layout = this.activeElement.layout;
315315
return isActive && this.isActiveLayout(layout, node.layout);
316316
}
@@ -635,6 +635,12 @@ export class IgxGridSelectionService {
635635
return this.rowSelection.size > 0 && filteredData && !this.areAllRowSelected();
636636
}
637637

638+
public get filteredSelectedRowIds(): any[] {
639+
return this.isFilteringApplied() ?
640+
this.getRowIDs(this.allData).filter(rowID => this.isRowSelected(rowID)) :
641+
this.getSelectedRows().filter(rowID => !this.isRowDeleted(rowID));
642+
}
643+
638644
public emitRowSelectionEvent(newSelection, added, removed, event?): boolean {
639645
const currSelection = this.getSelectedRows();
640646
if (this.areEqualCollections(currSelection, newSelection)) { return; }

projects/igniteui-angular/src/lib/core/styles/components/overlay/_overlay-component.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
@extend %overlay-wrapper--flex !optional;
2626
}
2727

28+
@include e(wrapper, $m: flex-container) {
29+
@extend %overlay-wrapper !optional;
30+
@extend %overlay-wrapper--flex-container !optional;
31+
}
32+
2833
@include e(content) {
2934
@extend %overlay-content !optional;
3035
}

projects/igniteui-angular/src/lib/core/styles/components/overlay/_overlay-theme.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@
7070
display: flex;
7171
}
7272

73+
%overlay-wrapper--flex-container {
74+
display: flex;
75+
position: absolute;
76+
}
77+
7378
%overlay-content {
7479
position: absolute;
7580
pointer-events: all;

projects/igniteui-angular/src/lib/directives/drag-drop/README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ The `ghost` input is set to `true` by default which means that the base element
6161

6262
#### Dragging without ghost
6363

64-
If `renderGhost` input is set to false the dragging logic for the `igxDrag` provides dragging ability for the initialized element itself. This means that it can freely move an element around by click and hold and when released it will keep its position where it was dragged.
64+
If `ghost` input is set to false the dragging logic for the `igxDrag` provides dragging ability for the initialized element itself. This means that it can freely move an element around by click and hold and when released it will keep its position where it was dragged.
6565

6666
#### Dragging using a handle
6767

@@ -119,11 +119,10 @@ If the user want to have other types of animations that involve element transfor
119119

120120
| Name | Type | Default Value | Description |
121121
| :--- | :--- | :--- | :--- |
122-
| igxDrag | any | - | Input used to save data inside the `igxDrag` directive. This can be set when instancing `igxDrag` on an element. |
123-
| dragTolerance | number | 5 | Indicates when the drag should start (in pixels). By default the drag starts after the draggable element is moved by 5px |
124-
| dragGhostHost | any | null | Sets the element to which the dragged element will be appended.
125-
| ghostImageClass | string | '' | Sets a custom class that will be added to the `dragGhost` element. |
126-
| animateOnRelease | boolean | false | Enables/disables the draggable element animation when the element is released. |
122+
| `igxDrag` | any | - | Input used to save data inside the `igxDrag` directive. This can be set when instancing `igxDrag` on an element. |
123+
| `dragTolerance` | number | 5 | Indicates when the drag should start (in pixels). By default the drag starts after the draggable element is moved by 5px |
124+
| `ghostHost` | any | null | Sets the element to which the dragged element will be appended.
125+
| `ghostClass` | string | '' | Sets a custom class that will be added to the `igxDrag` element. |
127126

128127
### Outputs
129128

@@ -185,7 +184,7 @@ public onAreaLeave() {
185184

186185
For achieving a drop functionality with the `igxDrag` directive the `igxDrop` directive should be used. It can be applied on any kind of element and it specifies an area where the `igxDrag` can be dropped.
187186

188-
By default the `igxDrop` does not apply any logic to the dragged element when it is dropped onto it. The user could choose between a few different drop strategies if he would like the `igxDrop` to perform some action or he could implement his own drop logic using the provided `onDragDrop` events.
187+
By default the `igxDrop` does not apply any logic to the dragged element when it is dropped onto it. The user could choose between a few different drop strategies if he would like the `igxDrop` to perform some action or he could implement his own drop logic using the provided `dropped` event.
189188

190189
#### Drop Strategies
191190

@@ -215,7 +214,7 @@ HTML:
215214

216215
#### Canceling a Drop Strategy
217216

218-
When using a specific drop strategy, its behavior can be canceled in the `onDrop` or `onDragDrop` events by setting the cancel property to true. The `onDrop` event is specific to the `igxDrag` and the `onDragDrop` event to the `igxDrop`. If the user does not have drop strategy applied to the `igxDrop` canceling the event would have no side effects.
217+
When using a specific drop strategy, its behavior can be canceled in the [`dropped`]({environment:angularApiUrl}/classes/igxdropdirective.html#dropped) events by setting the `cancel` property to true. The `dropped` event is specific to the `igxDrop`. If you does not have drop strategy applied to the `igxDrop` canceling the event would have no side effects.
219218

220219
*Example:*
221220

projects/igniteui-angular/src/lib/directives/drag-drop/drag-drop.directive.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,6 +1459,31 @@ export class IgxDropDirective implements OnInit, OnDestroy {
14591459
@Input()
14601460
public dropChannel: number | string | number[] | string[];
14611461

1462+
/**
1463+
* An @Input property that specifies a drop strategy type that will be executed when an `IgxDrag` element is released inside
1464+
* the current drop area. The provided strategies are:
1465+
* - IgxDefaultDropStrategy - This is the default base strategy and it doesn't perform any actions.
1466+
* - IgxAppendDropStrategy - Appends the dropped element to last position as a direct child to the `igxDrop`.
1467+
* - IgxPrependDropStrategy - Prepends the dropped element to first position as a direct child to the `igxDrop`.
1468+
* - IgxInsertDropStrategy - If the dropped element is released above a child element of the `igxDrop`, it will be inserted
1469+
* at that position. Otherwise the dropped element will be appended if released outside any child of the `igxDrop`.
1470+
* ```html
1471+
* <div igxDrag>
1472+
* <span>DragMe</span>
1473+
* </div>
1474+
* <div igxDrop [dropStrategy]="myDropStrategy">
1475+
* <span>Numbers drop area!</span>
1476+
* </div>
1477+
* ```
1478+
* ```typescript
1479+
* import { IgxAppendDropStrategy } from 'igniteui-angular';
1480+
*
1481+
* export class App {
1482+
* public myDropStrategy = IgxAppendDropStrategy;
1483+
* }
1484+
* ```
1485+
* @memberof IgxDropDirective
1486+
*/
14621487
@Input()
14631488
public set dropStrategy(classRef: any) {
14641489
this._dropStrategy = new classRef(this._renderer);

0 commit comments

Comments
 (0)