Skip to content

Commit c8448f2

Browse files
authored
Merge pull request #3259 from IgniteUI/vNext
Staging to Prod
2 parents b9bd60e + 6c76ff2 commit c8448f2

9 files changed

Lines changed: 91 additions & 23 deletions

File tree

projects/app-crm/src/app/grid-crm/grid-crm.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
position: relative;
5656
height: 100%;
5757
background: transparent;
58-
padding: 0.9375rem;
58+
padding: 1rem;
5959
}
6060

6161
.avatar-cell {

src/app/data/hierarchical-data.ts

Lines changed: 44 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -395,19 +395,28 @@ export const CUSTOMERS = [{
395395
ProductID: 11,
396396
UnitPrice: 14.0000,
397397
Quantity: 12,
398-
Discount: 0.0000000e+000
398+
Discount: 0.0000000e+000,
399+
Weight: 2.5,
400+
Length: 25.6,
401+
TotalPrice: 225.75
399402
},
400403
{
401404
ProductID: 42,
402405
UnitPrice: 9.8000,
403406
Quantity: 10,
404-
Discount: 0.0000000e+000
407+
Discount: 0.0000000e+000,
408+
Weight: 2.1,
409+
Length: 29.3,
410+
TotalPrice: 250.50
405411
},
406412
{
407413
ProductID: 72,
408414
UnitPrice: 34.8000,
409415
Quantity: 5,
410-
Discount: 0.0000000e+000
416+
Discount: 0.0000000e+000,
417+
Weight: 2.7,
418+
Length: 24.8,
419+
TotalPrice: 220.25
411420
}
412421
]
413422
}]
@@ -440,12 +449,18 @@ export const CUSTOMERS = [{
440449
ProductID: 14,
441450
UnitPrice: 18.6000,
442451
Quantity: 9,
443-
Discount: 0.0000000e+000
452+
Discount: 0.0000000e+000,
453+
Weight: 3.2,
454+
Length: 28.6,
455+
TotalPrice: 253.75
444456
}, {
445457
ProductID: 51,
446458
UnitPrice: 42.4000,
447459
Quantity: 40,
448-
Discount: 0.0000000e+000
460+
Discount: 0.0000000e+000,
461+
Weight: 2.5,
462+
Length: 25.6,
463+
TotalPrice: 225.75
449464
}]
450465
}]
451466
}, {
@@ -478,17 +493,26 @@ export const CUSTOMERS = [{
478493
ProductID: 41,
479494
UnitPrice: 7.7000,
480495
Quantity: 10,
481-
Discount: 0.0000000e+000
496+
Discount: 0.0000000e+000,
497+
Weight: 2.9,
498+
Length: 26.9,
499+
TotalPrice: 233.50
482500
}, {
483501
ProductID: 51,
484502
UnitPrice: 42.4000,
485503
Quantity: 35,
486-
Discount: 1.5000001e-001
504+
Discount: 1.5000001e-001,
505+
Weight: 3.5,
506+
Length: 27.4,
507+
TotalPrice: 261.25
487508
}, {
488509
ProductID: 65,
489510
UnitPrice: 16.8000,
490511
Quantity: 15,
491-
Discount: 1.5000001e-001
512+
Discount: 1.5000001e-001,
513+
Weight: 2.2,
514+
Length: 30.2,
515+
TotalPrice: 249.75
492516
}]
493517
}]
494518
}, {
@@ -519,17 +543,26 @@ export const CUSTOMERS = [{
519543
ProductID: 22,
520544
UnitPrice: 16.8000,
521545
Quantity: 6,
522-
Discount: 5.0000001e-002
546+
Discount: 5.0000001e-002,
547+
Weight: 2.6,
548+
Length: 26.8,
549+
TotalPrice: 226.50
523550
}, {
524551
ProductID: 57,
525552
UnitPrice: 15.6000,
526553
Quantity: 15,
527-
Discount: 5.0000001e-002
554+
Discount: 5.0000001e-002,
555+
Weight: 3.1,
556+
Length: 24.3,
557+
TotalPrice: 219.25
528558
}, {
529559
ProductID: 65,
530560
UnitPrice: 16.8000,
531561
Quantity: 20,
532-
Discount: 0.0000000e+000
562+
Discount: 0.0000000e+000,
563+
Weight: 2.4,
564+
Length: 23.7,
565+
TotalPrice: 207.00
533566
}]
534567
}]
535568
}, {

src/app/grid/grid-sample-pinning/grid-toolbar-pinning.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="grid__wrapper" style='width: 100%;'>
1+
<div [ngClass]="{'grid__wrapper': true, 'dark-theme': useDarkTheme }" style='width: 100%;'>
22
<igx-grid [igxPreventDocumentScroll]="true" #grid1 [data]="data" [width]="'100%'" [height]="'480px'">
33
<igx-grid-toolbar>
44
<igx-grid-toolbar-actions>

src/app/grid/grid-sample-pinning/grid-toolbar-pinning.component.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Component, ViewChild, ViewEncapsulation, OnInit } from '@angular/core';
22
import { IgxColumnComponent, IgxGridComponent } from 'igniteui-angular';
33
import { DATA } from '../../data/customers';
4+
import { ActivatedRoute } from '@angular/router';
45

56
@Component({
67
encapsulation: ViewEncapsulation.None,
@@ -14,8 +15,12 @@ import { DATA } from '../../data/customers';
1415
export class PinningToolbarSampleComponent implements OnInit{
1516
@ViewChild('grid1', { static: true }) public grid1: IgxGridComponent;
1617

18+
public useDarkTheme: boolean = false;
1719
public data: any[];
1820
public columns: any[];
21+
22+
constructor(private activatedRoute: ActivatedRoute) {}
23+
1924
public ngOnInit(): void {
2025
this.columns = [
2126
{ field: 'CompanyName', header: 'Company Name', width: 300 },
@@ -29,6 +34,10 @@ export class PinningToolbarSampleComponent implements OnInit{
2934
{ field: 'Fax', header: 'Fax', width: 150 }
3035
];
3136
this.data = DATA;
37+
38+
this.activatedRoute.queryParams.subscribe(params => {
39+
this.useDarkTheme = params.dark === 'true';
40+
});
3241
}
3342

3443
public toggleColumn(col: IgxColumnComponent) {

src/app/hierarchical-grid/hierarchical-grid-column-pinning/hierarchical-grid-toolbar-pinning.component.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="grid__wrapper">
1+
<div [ngClass]="{'grid__wrapper': true, 'dark-theme': useDarkTheme }">
22
<igx-hierarchical-grid [igxPreventDocumentScroll]="true" class="hierarchicalGrid" [data]="localdata" [autoGenerate]="false"
33
[height]="'100%'" [width]="'100%'" #hierarchicalGrid>
44
<igx-grid-toolbar>
@@ -31,6 +31,9 @@
3131
<igx-column field="UnitPrice" header="Unit Price" width="150px"></igx-column>
3232
<igx-column field="Quantity" width="150px"></igx-column>
3333
<igx-column field="Discount" width="150px"></igx-column>
34+
<igx-column field="Weight" width="150px"></igx-column>
35+
<igx-column field="Length" width="150px"></igx-column>
36+
<igx-column field="TotalPrice" width="150px"></igx-column>
3437
</igx-row-island>
3538
</igx-row-island>
3639
</igx-hierarchical-grid>

src/app/hierarchical-grid/hierarchical-grid-column-pinning/hierarchical-grid-toolbar-pinning.component.scss

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
width: 100%;
33
}
44

5+
:host {
6+
height: 110vh;
7+
}
8+
59
.grid__wrapper {
6-
margin: 0 auto;
7-
padding: 16px;
10+
margin: 0 auto 4rem;
11+
padding: 1rem;
12+
height: 100%;
813
}
Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
1-
import { Component } from '@angular/core';
1+
import { Component, OnInit } from '@angular/core';
22
import { CUSTOMERS } from '../../data/hierarchical-data';
3+
import { ActivatedRoute } from '@angular/router';
34

45
@Component({
56
selector: 'app-hierarchical-grid-toolbar-pinning',
67
styleUrls: ['./hierarchical-grid-toolbar-pinning.component.scss'],
78
templateUrl: 'hierarchical-grid-toolbar-pinning.component.html'
89
})
9-
export class HGridToolbarPinningComponent {
10+
export class HGridToolbarPinningComponent implements OnInit {
1011
public localdata;
12+
public useDarkTheme: boolean = false;
1113

12-
constructor() {
14+
constructor(private activatedRoute: ActivatedRoute) {
1315
this.localdata = CUSTOMERS;
1416
}
17+
18+
public ngOnInit(): void {
19+
this.activatedRoute.queryParams.subscribe(params => {
20+
this.useDarkTheme = params.dark === 'true';
21+
});
22+
}
23+
1524
}
25+

src/app/tree-grid/tree-grid-column-pinning-sample/tree-grid-toolbar-pinning.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="grid__wrapper">
1+
<div [ngClass]="{'grid__wrapper': true, 'dark-theme': useDarkTheme }">
22
<igx-tree-grid [igxPreventDocumentScroll]="true" #treeGrid [data]="data" primaryKey="ID" foreignKey="ParentID" [autoGenerate]="false" height="600px"
33
width="100%">
44
<igx-grid-toolbar>
Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { Component, ViewChild } from '@angular/core';
1+
import { Component, ViewChild, OnInit } from '@angular/core';
22
import { IgxTreeGridComponent } from 'igniteui-angular';
33
import { generateEmployeeDetailedFlatData } from '../data/employees-flat-detailed';
4+
import { ActivatedRoute } from '@angular/router';
45

56
@Component({
67
providers: [],
@@ -10,11 +11,18 @@ import { generateEmployeeDetailedFlatData } from '../data/employees-flat-detaile
1011

1112
})
1213

13-
export class TreeGridPinningToolbarSampleComponent {
14+
export class TreeGridPinningToolbarSampleComponent implements OnInit {
1415
@ViewChild('treeGrid', { static: true }) public treeGrid: IgxTreeGridComponent;
1516
public data: any[];
17+
public useDarkTheme: boolean = false;
1618

17-
constructor() {
19+
constructor(private activatedRoute: ActivatedRoute) {
1820
this.data = generateEmployeeDetailedFlatData();
1921
}
22+
23+
public ngOnInit(): void {
24+
this.activatedRoute.queryParams.subscribe(params => {
25+
this.useDarkTheme = params.dark === 'true';
26+
});
27+
}
2028
}

0 commit comments

Comments
 (0)