@igniteui/angular-templates 13.1.910-rc.1 → 13.1.911

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,7 +23,7 @@ export class <%=ClassName%>Component {
23
23
  }
24
24
 
25
25
  public get hasChildTransactions(): boolean {
26
- return this.layout1.hgridAPI.getChildGrids()
26
+ return this.layout1.gridAPI.getChildGrids()
27
27
  .find(c => c.transactions.getAggregatedChanges(false).length > 0) !== undefined;
28
28
  }
29
29
 
@@ -68,7 +68,7 @@ export class <%=ClassName%>Component {
68
68
 
69
69
  public commit(): void {
70
70
  this.hierarchicalGrid.transactions.commit(this.localdata);
71
- this.layout1.hgridAPI.getChildGrids().forEach((grid) => {
71
+ this.layout1.gridAPI.getChildGrids().forEach((grid) => {
72
72
  grid.transactions.commit(grid.data);
73
73
  });
74
74
  this.dialogChanges.close();
@@ -76,7 +76,7 @@ export class <%=ClassName%>Component {
76
76
 
77
77
  public discard(): void {
78
78
  this.hierarchicalGrid.transactions.clear();
79
- this.layout1.hgridAPI.getChildGrids().forEach((grid) => {
79
+ this.layout1.gridAPI.getChildGrids().forEach((grid) => {
80
80
  grid.transactions.clear();
81
81
  });
82
82
  this.dialogChanges.close();
@@ -84,7 +84,7 @@ export class <%=ClassName%>Component {
84
84
 
85
85
  public openCommitDialog(): void {
86
86
  this.transactionsDataAll = [...this.hierarchicalGrid.transactions.getAggregatedChanges(true)];
87
- this.layout1.hgridAPI.getChildGrids().forEach((grid) => {
87
+ this.layout1.gridAPI.getChildGrids().forEach((grid) => {
88
88
  this.transactionsDataAll = this.transactionsDataAll.concat(grid.transactions.getAggregatedChanges(true));
89
89
  });
90
90
  this.dialogChanges.open();
@@ -0,0 +1,7 @@
1
+ <p>Basic pivot grid.</p>
2
+ <p>You can read more about configuring the igx-pivot-grid component in the
3
+ <a href="https://www.infragistics.com/products/ignite-ui-angular/angular/components/pivotGrid/pivot-grid"
4
+ target="_blank">official documentation</a>.
5
+ </p>
6
+ <igx-pivot-grid #grid1 [data]="data" [pivotConfiguration]="pivotConfigHierarchy" height="500px">
7
+ </igx-pivot-grid>
@@ -0,0 +1,26 @@
1
+ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2
+ import { FormsModule } from '@angular/forms';
3
+ import { <%=ClassName%>Component } from './<%=filePrefix%>.component';
4
+
5
+ describe('<%=ClassName%>Component', () => {
6
+ let component: <%=ClassName%>Component;
7
+ let fixture: ComponentFixture<<%=ClassName%>Component>;
8
+
9
+ beforeEach(waitForAsync(() => {
10
+ TestBed.configureTestingModule({
11
+ declarations: [<%=ClassName%>Component],
12
+ imports: [IgxPivotGridModule]
13
+ })
14
+ .compileComponents();
15
+ }));
16
+
17
+ beforeEach(() => {
18
+ fixture = TestBed.createComponent(<%=ClassName%>Component);
19
+ component = fixture.componentInstance;
20
+ fixture.detectChanges();
21
+ });
22
+
23
+ it('should create', () => {
24
+ expect(component).toBeTruthy();
25
+ });
26
+ });
@@ -0,0 +1,44 @@
1
+ import { Component } from '@angular/core';
2
+ import { DATA } from './data';
3
+ import { IPivotConfiguration, IgxPivotNumericAggregate } from '<%=igxPackage%>';
4
+
5
+ @Component({
6
+ selector: 'app-<%=filePrefix%>',
7
+ templateUrl: './<%=filePrefix%>.component.html',
8
+ styleUrls: ['./<%=filePrefix%>.component.scss']
9
+ })
10
+ export class <%=ClassName%>Component {
11
+ public data = DATA;
12
+ public pivotConfigHierarchy: IPivotConfiguration = {
13
+ columns: [
14
+ {
15
+
16
+ memberName: 'Product',
17
+ memberFunction: (data) => data.Product.Name,
18
+ enabled: true
19
+ }
20
+
21
+ ],
22
+ rows: [
23
+ {
24
+ memberName: 'Seller',
25
+ memberFunction: (data) => data.Seller.Name,
26
+ enabled: true
27
+ }
28
+ ],
29
+ values: [
30
+ {
31
+ member: 'NumberOfUnits',
32
+ aggregate: {
33
+ aggregator: IgxPivotNumericAggregate.sum,
34
+ key: 'sum',
35
+ label: 'Sum'
36
+ },
37
+ enabled: true
38
+
39
+ }
40
+ ],
41
+ filters: null
42
+ };
43
+ }
44
+