Skip to content

Commit ccddf20

Browse files
committed
Merge branch 'drop-down-border-radius' of https://github.com/IgniteUI/igniteui-angular into drop-down-border-radius
2 parents 90d5e51 + 4ac115c commit ccddf20

27 files changed

+565
-520
lines changed

ROADMAP.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,20 @@
66
1. Dock Manger [#5980](https://github.com/IgniteUI/igniteui-angular/issues/5980)
77
2. Theming service for Ignite UI for Angular [#5999](https://github.com/IgniteUI/igniteui-angular/issues/5999)
88
3. Range Date Picker [#5732](https://github.com/IgniteUI/igniteui-angular/issues/5732)
9-
4. igxGrid overlay components exposed for instantiation in arbitrary container [#5878](https://github.com/IgniteUI/igniteui-angular/issues/5878)
9+
4. **[DONE]** igxGrid overlay components exposed for instantiation in arbitrary container [#5878](https://github.com/IgniteUI/igniteui-angular/issues/5878)
1010
5. RTL Support across Ignite UI for Angular components [#5958](https://github.com/IgniteUI/igniteui-angular/issues/5958)
11-
6. Carousel slide animations/transitions [#4268](https://github.com/IgniteUI/igniteui-angular/issues/4268)
12-
7. Access all data when calculating summary per column [#5754](https://github.com/IgniteUI/igniteui-angular/issues/5754)
11+
6. **[DONE]** Carousel slide animations/transitions [#4268](https://github.com/IgniteUI/igniteui-angular/issues/4268)
12+
7. **[DONE]** Access all data when calculating summary per column [#5754](https://github.com/IgniteUI/igniteui-angular/issues/5754)
1313
8. Angular 9 support [#5998](https://github.com/IgniteUI/igniteui-angular/issues/5998)
14-
9. Allow master-detail style visualization with igxHierarchicalGrid [#5880](https://github.com/IgniteUI/igniteui-angular/issues/5880)
15-
10. Collapsible column groups (column expansion state templates) [#3343](https://github.com/IgniteUI/igniteui-angular/issues/3343)
14+
9. **[DONE]** Allow master-detail style visualization with igxHierarchicalGrid [#5880](https://github.com/IgniteUI/igniteui-angular/issues/5880)
15+
10. **[DONE]** Collapsible column groups (column expansion state templates) [#3343](https://github.com/IgniteUI/igniteui-angular/issues/3343)
1616

1717
## Going down the road
1818

1919
1. Row-pinning
20-
2. Column Groups expand/collapse, with column grouping templates
21-
3. Visual Cell merging
22-
4. Splitter
23-
5. PDF Integration
20+
2. Visual Cell merging
21+
3. Splitter
22+
4. PDF Integration
2423

2524
# Previous Milestones
2625

package-lock.json

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

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@
4545
},
4646
"private": true,
4747
"dependencies": {
48-
"@angular/animations": "^9.0.0-rc.5",
49-
"@angular/common": "^9.0.0-rc.5",
50-
"@angular/compiler": "^9.0.0-rc.5",
51-
"@angular/core": "^9.0.0-rc.5",
52-
"@angular/forms": "^9.0.0-rc.5",
53-
"@angular/platform-browser": "^9.0.0-rc.5",
54-
"@angular/platform-browser-dynamic": "^9.0.0-rc.5",
55-
"@angular/router": "^9.0.0-rc.5",
48+
"@angular/animations": "^9.0.0-rc.7",
49+
"@angular/common": "^9.0.0-rc.7",
50+
"@angular/compiler": "^9.0.0-rc.7",
51+
"@angular/core": "^9.0.0-rc.7",
52+
"@angular/forms": "^9.0.0-rc.7",
53+
"@angular/platform-browser": "^9.0.0-rc.7",
54+
"@angular/platform-browser-dynamic": "^9.0.0-rc.7",
55+
"@angular/router": "^9.0.0-rc.7",
5656
"@types/hammerjs": "^2.0.36",
5757
"@types/source-map": "0.5.2",
5858
"classlist.js": "^1.1.20150312",
@@ -66,12 +66,12 @@
6666
"zone.js": "~0.10.2"
6767
},
6868
"devDependencies": {
69-
"@angular-devkit/build-angular": "~0.900.0-rc.5",
70-
"@angular-devkit/build-ng-packagr": "~0.900.0-rc.5",
69+
"@angular-devkit/build-angular": "~0.900.0-rc.7",
70+
"@angular-devkit/build-ng-packagr": "~0.900.0-rc.7",
7171
"@angular-devkit/schematics": "^7.2.1",
72-
"@angular/cli": "~9.0.0-rc.5",
73-
"@angular/compiler-cli": "^9.0.0-rc.5",
74-
"@angular/language-service": "^9.0.0-rc.5",
72+
"@angular/cli": "~9.0.0-rc.7",
73+
"@angular/compiler-cli": "^9.0.0-rc.7",
74+
"@angular/language-service": "^9.0.0-rc.7",
7575
"@angularclass/hmr": "^2.1.3",
7676
"@types/jasmine": "~3.3.5",
7777
"@types/jasminewd2": "~2.0.6",

projects/igniteui-angular/karma.grid.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module.exports = function (config) {
4242
colors: true,
4343
logLevel: config.LOG_INFO,
4444
autoWatch: true,
45-
browsers: ['Chrome'],
45+
browsers: ['ChromeHeadless'],
4646
singleRun: false
4747
});
4848
};

projects/igniteui-angular/karma.hierarchical-grid.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module.exports = function (config) {
4141
colors: true,
4242
logLevel: config.LOG_INFO,
4343
autoWatch: true,
44-
browsers: ['Chrome'],
44+
browsers: ['ChromeHeadless'],
4545
singleRun: false
4646
});
4747
};

projects/igniteui-angular/karma.non-grid.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module.exports = function (config) {
4141
colors: true,
4242
logLevel: config.LOG_INFO,
4343
autoWatch: true,
44-
browsers: ['Chrome'],
44+
browsers: ['ChromeHeadless'],
4545
singleRun: false
4646
});
4747
};

projects/igniteui-angular/karma.test-perf.conf.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ module.exports = function (config) {
3535
colors: true,
3636
logLevel: config.LOG_INFO,
3737
autoWatch: true,
38-
browsers: ['Chrome'],
38+
browsers: ['ChromeHeadless'],
3939
singleRun: false
4040
});
4141
};
42-

projects/igniteui-angular/karma.tree-grid.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module.exports = function (config) {
4141
colors: true,
4242
logLevel: config.LOG_INFO,
4343
autoWatch: true,
44-
browsers: ['Chrome'],
44+
browsers: ['ChromeHeadless'],
4545
singleRun: false
4646
});
4747
};

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

Lines changed: 12 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -563,33 +563,25 @@ export class IgxDragDirective implements AfterContentInit, OnDestroy {
563563
}
564564

565565
protected set ghostLeft(pageX: number) {
566-
// To Do: Remove requestAnimationFrame when deprecated animations inputs are removed as well.
567-
// We use requestAnimationFrame for the old drop animations in combination with updateDragRelativePos.
568-
requestAnimationFrame(() => {
569-
if (this.ghostElement) {
570-
// We need to take into account marginLeft, since top style does not include margin, but pageX includes the margin.
571-
const ghostMarginLeft = parseInt(document.defaultView.getComputedStyle(this.ghostElement)['margin-left'], 10);
572-
// If ghost host is defined it needs to be taken into account.
573-
this.ghostElement.style.left = (pageX - ghostMarginLeft - this._ghostHostX) + 'px';
574-
}
575-
});
566+
if (this.ghostElement) {
567+
// We need to take into account marginLeft, since top style does not include margin, but pageX includes the margin.
568+
const ghostMarginLeft = parseInt(document.defaultView.getComputedStyle(this.ghostElement)['margin-left'], 10);
569+
// If ghost host is defined it needs to be taken into account.
570+
this.ghostElement.style.left = (pageX - ghostMarginLeft - this._ghostHostX) + 'px';
571+
}
576572
}
577573

578574
protected get ghostLeft() {
579575
return parseInt(this.ghostElement.style.left, 10) + this._ghostHostX;
580576
}
581577

582578
protected set ghostTop(pageY: number) {
583-
// To Do: Remove requestAnimationFrame when deprecated animations inputs are removed as well.
584-
// We use requestAnimationFrame for the old drop animations in combination with updateDragRelativePos.
585-
requestAnimationFrame(() => {
586-
if (this.ghostElement) {
587-
// We need to take into account marginTop, since top style does not include margin, but pageY includes the margin.
588-
const ghostMarginTop = parseInt(document.defaultView.getComputedStyle(this.ghostElement)['margin-top'], 10);
589-
// If ghost host is defined it needs to be taken into account.
590-
this.ghostElement.style.top = (pageY - ghostMarginTop - this._ghostHostY) + 'px';
591-
}
592-
});
579+
if (this.ghostElement) {
580+
// We need to take into account marginTop, since top style does not include margin, but pageY includes the margin.
581+
const ghostMarginTop = parseInt(document.defaultView.getComputedStyle(this.ghostElement)['margin-top'], 10);
582+
// If ghost host is defined it needs to be taken into account.
583+
this.ghostElement.style.top = (pageY - ghostMarginTop - this._ghostHostY) + 'px';
584+
}
593585
}
594586

595587
protected get ghostTop() {
@@ -611,10 +603,6 @@ export class IgxDragDirective implements AfterContentInit, OnDestroy {
611603
*/
612604
public animInProgress = false;
613605

614-
protected _baseMarginLeft = 0;
615-
protected _baseMarginTop = 0;
616-
protected _baseOriginX;
617-
protected _baseOriginY;
618606
protected _startX = 0;
619607
protected _startY = 0;
620608
protected _lastX = 0;
@@ -712,12 +700,6 @@ export class IgxDragDirective implements AfterContentInit, OnDestroy {
712700
});
713701
});
714702

715-
this._baseMarginLeft = parseInt(document.defaultView.getComputedStyle(this.element.nativeElement)['margin-left'], 10);
716-
this._baseMarginTop = parseInt(document.defaultView.getComputedStyle(this.element.nativeElement)['margin-top'], 10);
717-
this._baseOriginX = this.baseLeft;
718-
this._baseOriginY = this.baseTop;
719-
this._ghostStartX = this.baseLeft;
720-
this._ghostStartY = this.baseTop;
721703
// Set transition duration to 0s. This also helps with setting `visibility: hidden` to the base to not lag.
722704
this.element.nativeElement.style.transitionDuration = '0.0s';
723705
}
@@ -877,11 +859,6 @@ export class IgxDragDirective implements AfterContentInit, OnDestroy {
877859
event.preventDefault();
878860
}
879861

880-
if (!this._baseOriginX && !this._baseOriginY) {
881-
this._baseOriginX = this.baseLeft;
882-
this._baseOriginY = this.baseTop;
883-
}
884-
885862
if (this.pointerEventsEnabled || !this.touchEventsEnabled) {
886863
// Check first for pointer events or non touch, because we can have pointer events and touch events at once.
887864
this._startX = event.pageX;
@@ -1239,57 +1216,6 @@ export class IgxDragDirective implements AfterContentInit, OnDestroy {
12391216
this._lastDropArea = null;
12401217
}
12411218

1242-
/**
1243-
* @hidden
1244-
* Update relative positions
1245-
*/
1246-
public updateDragRelativePos() {
1247-
let newPosX, newPosY;
1248-
if (this.ghost && this.ghostElement) {
1249-
// Calculate the new ghostElement position to remain where the mouse is, so it doesn't jump
1250-
const totalDraggedX = this.ghostLeft - this._ghostStartX;
1251-
const totalDraggedY = this.ghostTop - this._ghostStartY;
1252-
newPosX = this.baseLeft;
1253-
newPosY = this.baseTop;
1254-
const diffStartX = this._ghostStartX - newPosX;
1255-
const diffStartY = this._ghostStartY - newPosY;
1256-
this.ghostTop = newPosX + totalDraggedX - diffStartX;
1257-
this.ghostLeft = newPosY + totalDraggedY - diffStartY;
1258-
} else if (!this.ghost) {
1259-
const totalDraggedX = this.getTransformX(this.element.nativeElement);
1260-
const totalDraggedY = this.getTransformY(this.element.nativeElement);
1261-
newPosX = this.baseLeft - totalDraggedX;
1262-
newPosY = this.baseTop - totalDraggedY;
1263-
const deltaX = this._baseOriginX - newPosX;
1264-
const deltaY = this._baseOriginY - newPosY;
1265-
this.setTransformXY(totalDraggedX + deltaX, totalDraggedY + deltaY);
1266-
}
1267-
this._baseOriginX = newPosX !== undefined ? newPosX : this._baseOriginX;
1268-
this._baseOriginY = newPosY !== undefined ? newPosY : this._baseOriginY;
1269-
}
1270-
1271-
/**
1272-
* @deprecated This method will be removed in future major version. Please use `transitionToOrigin` or `transitionTo`.
1273-
* Informs the `igxDrag` directive that it has been dropped/released.
1274-
* This should usually be called when `animateOnRelease` is set to `true`.
1275-
* When canceling or defining custom drop logic this tells the igxDrag to update it's positions and
1276-
* animate correctly to the new position.
1277-
* ```typescript
1278-
* public onDropElem(event) {
1279-
* // Function bound to the igxDrop directive event `onDrop`
1280-
* // This cancels the default drop logic of the `igxDrop`
1281-
* event.cancel = true;
1282-
* event.drag.dropFinished();
1283-
* }
1284-
* ```
1285-
*/
1286-
public dropFinished() {
1287-
this.updateDragRelativePos();
1288-
if (this.animateOnRelease && this.ghostElement) {
1289-
this.transitionToOrigin();
1290-
}
1291-
}
1292-
12931219
/**
12941220
* @hidden
12951221
*/

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

Lines changed: 0 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,106 +1175,6 @@ describe('General igxDrag/igxDrop', () => {
11751175
expect(dragDirsRects[0].top + 50).toBeLessThan(currTop);
11761176
expect(currTop).toBeLessThanOrEqual(dragDirsRects[0].top + 100);
11771177
}));
1178-
1179-
it('should keep same base element page position when element is moved in the DOM after executing updateDragRelativePos.', (async() => {
1180-
const firstDrag = fix.componentInstance.dragElems.first;
1181-
const firstElement = firstDrag.element.nativeElement;
1182-
const startingX = (dragDirsRects[0].left + dragDirsRects[0].right) / 2;
1183-
const startingY = (dragDirsRects[0].top + dragDirsRects[0].bottom) / 2;
1184-
firstDrag.ghost = false;
1185-
1186-
// Step 1.
1187-
UIInteractions.simulatePointerEvent('pointerdown', firstElement, startingX, startingY);
1188-
fix.detectChanges();
1189-
await wait();
1190-
1191-
// Step 2.
1192-
UIInteractions.simulatePointerEvent('pointermove', firstElement, startingX + 10, startingY + 10);
1193-
fix.detectChanges();
1194-
await wait(100);
1195-
1196-
// Step 3.
1197-
UIInteractions.simulatePointerEvent('pointermove', firstElement, startingX + 20, startingY + 20);
1198-
fix.detectChanges();
1199-
await wait(100);
1200-
1201-
expect(firstDrag.element.nativeElement.getBoundingClientRect().left).toEqual(dragDirsRects[0].left + 20);
1202-
expect(firstDrag.element.nativeElement.getBoundingClientRect().top).toEqual(dragDirsRects[0].top + 20);
1203-
1204-
fix.componentInstance.renderer.removeChild(firstElement.parentNode, firstElement);
1205-
fix.componentInstance.renderer.appendChild(dropArea.element.nativeElement, firstElement);
1206-
fix.detectChanges();
1207-
1208-
firstDrag.updateDragRelativePos();
1209-
fix.detectChanges();
1210-
1211-
expect(firstDrag.element.nativeElement.getBoundingClientRect().left).toEqual(dragDirsRects[0].left + 20);
1212-
expect(firstDrag.element.nativeElement.getBoundingClientRect().top).toEqual(dragDirsRects[0].top + 20);
1213-
1214-
// Step 4.
1215-
UIInteractions.simulatePointerEvent('pointermove', firstElement, startingX + 30, startingY + 30);
1216-
fix.detectChanges();
1217-
await wait(100);
1218-
1219-
expect(firstDrag.element.nativeElement.getBoundingClientRect().left).toEqual(dragDirsRects[0].left + 30);
1220-
expect(firstDrag.element.nativeElement.getBoundingClientRect().top.toFixed(2)).toEqual((dragDirsRects[0].top + 30).toFixed(2));
1221-
1222-
// Step 5.
1223-
UIInteractions.simulatePointerEvent('pointerup', firstElement, startingX + 30, startingY + 30);
1224-
fix.detectChanges();
1225-
await wait();
1226-
1227-
expect(firstDrag.element.nativeElement.getBoundingClientRect().left).toEqual(dragDirsRects[0].left + 30);
1228-
expect(firstDrag.element.nativeElement.getBoundingClientRect().top.toFixed(2)).toEqual((dragDirsRects[0].top + 30).toFixed(2));
1229-
}));
1230-
1231-
it('should keep same ghost page position when element is moved in the DOM after executing updateDragRelativePos.', (async() => {
1232-
const firstDrag = fix.componentInstance.dragElems.first;
1233-
const firstElement = firstDrag.element.nativeElement;
1234-
const startingX = (dragDirsRects[0].left + dragDirsRects[0].right) / 2;
1235-
const startingY = (dragDirsRects[0].top + dragDirsRects[0].bottom) / 2;
1236-
1237-
// Step 1.
1238-
UIInteractions.simulatePointerEvent('pointerdown', firstElement, startingX, startingY);
1239-
fix.detectChanges();
1240-
await wait();
1241-
1242-
// Step 2.
1243-
UIInteractions.simulatePointerEvent('pointermove', firstElement, startingX + 10, startingY + 10);
1244-
fix.detectChanges();
1245-
await wait(100);
1246-
1247-
// Step 3.
1248-
UIInteractions.simulatePointerEvent('pointermove', firstDrag.ghostElement, startingX + 20, startingY + 20);
1249-
fix.detectChanges();
1250-
await wait(100);
1251-
1252-
expect(firstDrag.ghostElement.getBoundingClientRect().left).toEqual(dragDirsRects[0].left + 20);
1253-
expect(firstDrag.ghostElement.getBoundingClientRect().top).toEqual(dragDirsRects[0].top + 20);
1254-
1255-
fix.componentInstance.renderer.removeChild(firstDrag.ghostElement.parentNode, firstDrag.ghostElement);
1256-
fix.componentInstance.renderer.appendChild(dropArea.element.nativeElement, firstDrag.ghostElement);
1257-
fix.detectChanges();
1258-
1259-
firstDrag.updateDragRelativePos();
1260-
fix.detectChanges();
1261-
1262-
expect(firstDrag.ghostElement.getBoundingClientRect().left).toEqual(dragDirsRects[0].left + 20);
1263-
expect(firstDrag.ghostElement.getBoundingClientRect().top).toEqual(dragDirsRects[0].top + 20);
1264-
1265-
// Step 4.
1266-
UIInteractions.simulatePointerEvent('pointermove', firstDrag.ghostElement, startingX + 30, startingY + 30);
1267-
fix.detectChanges();
1268-
await wait(100);
1269-
1270-
expect(firstDrag.ghostElement.getBoundingClientRect().left).toEqual(dragDirsRects[0].left + 30);
1271-
expect(firstDrag.ghostElement.getBoundingClientRect().top).toEqual((dragDirsRects[0].top + 30));
1272-
1273-
// Step 5.
1274-
UIInteractions.simulatePointerEvent('pointerup', firstElement, startingX + 30, startingY + 30);
1275-
fix.detectChanges();
1276-
await wait();
1277-
}));
12781178
});
12791179

12801180
describe('Linked igxDrag/igxDrop ', () => {

0 commit comments

Comments
 (0)