Skip to content

Commit 8a0abf1

Browse files
authored
Merge branch 'vnext' into sivanova/badge-sample
2 parents 062cac4 + 4d8cf65 commit 8a0abf1

5 files changed

Lines changed: 94 additions & 49 deletions

File tree

projects/app-lob/src/app/grid-finjs/grid-finjs.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@
2121
<igx-grid-toolbar-actions>
2222
<igx-grid-toolbar-hiding title="Indicators"></igx-grid-toolbar-hiding>
2323
<igx-grid-toolbar-pinning></igx-grid-toolbar-pinning>
24-
<igx-grid-toolbar-exporter [exportCSV]="false">
24+
<igx-grid-toolbar-exporter [exportCSV]="false" (exportStarted)="exportStarted($event)">
2525
<span excelText>Export to Excel</span>
26+
<span pdfText>Export to PDF</span>
2627
</igx-grid-toolbar-exporter>
2728
</igx-grid-toolbar-actions>
2829
</igx-grid-toolbar>

projects/app-lob/src/app/grid-finjs/grid-finjs.component.ts

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable max-len */
22
import { AsyncPipe, CurrencyPipe } from '@angular/common';
33
import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild, DOCUMENT, inject } from '@angular/core';
4-
import { CellType, GridSelectionMode, IGridKeydownEventArgs, IRowSelectionEventArgs, IgxCellEditorTemplateDirective, IgxCellTemplateDirective, IgxColumnComponent, IgxExcelTextDirective, IgxGridToolbarActionsComponent, IgxGridToolbarComponent, IgxGridToolbarExporterComponent, IgxGridToolbarHidingComponent, IgxGridToolbarPinningComponent } from 'igniteui-angular/grids/core';
4+
import { CellType, GridSelectionMode, IColumnExportingEventArgs, IGridKeydownEventArgs, IRowSelectionEventArgs, IgxCellEditorTemplateDirective, IgxCellTemplateDirective, IgxColumnComponent, IgxExcelTextDirective, IgxExporterEvent, IgxGridToolbarActionsComponent, IgxGridToolbarComponent, IgxGridToolbarExporterComponent, IgxGridToolbarHidingComponent, IgxGridToolbarPinningComponent, IgxPdfExporterOptions, IgxPdfExporterService, IgxPdfTextDirective } from 'igniteui-angular/grids/core';
55
import { DefaultSortingStrategy, IgxOverlayOutletDirective, OverlaySettings, SortingDirection } from 'igniteui-angular/core';
66
import { IgxGridComponent } from 'igniteui-angular/grids/grid';
77
import { IgxSelectComponent, IgxSelectItemComponent } from 'igniteui-angular/select';
@@ -17,11 +17,12 @@ import { FormsModule } from '@angular/forms';
1717
selector: 'app-finjs-grid',
1818
templateUrl: './grid-finjs.component.html',
1919
styleUrls: ['./grid-finjs.component.scss'],
20-
imports: [IgxGridComponent, IgxPreventDocumentScrollDirective, IgxGridToolbarComponent, IgxGridToolbarActionsComponent, IgxGridToolbarHidingComponent, IgxGridToolbarPinningComponent, IgxGridToolbarExporterComponent, IgxExcelTextDirective, IgxColumnComponent, IgxCellEditorTemplateDirective, IgxSelectComponent, FormsModule, IgxFocusDirective, IgxSelectItemComponent, IgxCellTemplateDirective, IgxIconComponent, IgxIconButtonDirective, IgxOverlayOutletDirective, AsyncPipe, CurrencyPipe]
20+
imports: [IgxGridComponent, IgxPreventDocumentScrollDirective, IgxGridToolbarComponent, IgxGridToolbarActionsComponent, IgxGridToolbarHidingComponent, IgxGridToolbarPinningComponent, IgxGridToolbarExporterComponent, IgxExcelTextDirective, IgxPdfTextDirective, IgxColumnComponent, IgxCellEditorTemplateDirective, IgxSelectComponent, FormsModule, IgxFocusDirective, IgxSelectItemComponent, IgxCellTemplateDirective, IgxIconComponent, IgxIconButtonDirective, IgxOverlayOutletDirective, AsyncPipe, CurrencyPipe]
2121
})
2222
export class GridFinJSComponent implements OnInit {
2323
private el = inject(ElementRef);
2424
private document = inject<Document>(DOCUMENT);
25+
private pdfExportService = inject(IgxPdfExporterService);
2526
dataService = inject(SignalRService);
2627

2728
@ViewChild('grid1', { static: true }) public grid: IgxGridComponent;
@@ -116,6 +117,34 @@ export class GridFinJSComponent implements OnInit {
116117
this.chartColumnKeyDown.emit(target.row.data);
117118
}
118119

120+
public exportStarted(args: IgxExporterEvent) {
121+
(args.options as IgxPdfExporterOptions).pageSize = "A3";
122+
123+
const includedFields = new Set([
124+
'id',
125+
'category',
126+
'type',
127+
'contract',
128+
'settlement',
129+
'country',
130+
'region',
131+
'lastupdated',
132+
'openprice',
133+
'price',
134+
'change',
135+
'buy',
136+
'sell'
137+
]);
138+
139+
this.pdfExportService.columnExporting.subscribe((exportArgs: IColumnExportingEventArgs) => {
140+
const field = exportArgs.field.toLowerCase();
141+
if (!includedFields.has(field)) {
142+
exportArgs.cancel = true;
143+
}
144+
});
145+
146+
}
147+
119148
get gridWrapper(): HTMLElement {
120149
return this.el.nativeElement.querySelector('.grid__wrapper') as HTMLElement;
121150
}

src/app/interactions/query-builder/query-builder-request-sample/query-builder-request-sample.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
</igx-query-builder>
77

88
<div class="output-area">
9-
<igx-grid #grid [data]="data" [autoGenerate]="true"></igx-grid>
9+
<igx-grid #grid [data]="data" [autoGenerate]="true" height="420px"></igx-grid>
1010
</div>
11-
</div>
11+
</div>

src/app/layouts/tile-manager/tile-manager-sample/tile-manager.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<igc-tile-manager id="tile-manager1" column-count="3" gap="20px" resize-mode="hover" drag-mode="tile-header">
2-
<igc-tile row-span="3">
2+
<igc-tile row-span="2" class="order-info">
33
<span slot="title">Order info</span>
44
<igx-list>
55
<igx-list-item>
@@ -143,7 +143,7 @@ <h3 igxCardHeaderTitle>Carnavon Tigers</h3>
143143
</div>
144144
</div>
145145
</igc-tile>
146-
<igc-tile >
146+
<igc-tile col-span="2">
147147
<span slot="title">Order Value</span>
148148
<div class="string">
149149
<h3>$8.66K</h3>
Lines changed: 57 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,58 @@
11
igc-tile-manager {
2-
margin-bottom: 5px;
3-
}
4-
5-
.group {
6-
display: flex;
7-
flex-direction: row;
8-
flex-wrap: wrap;
9-
margin-top: 15px;
10-
}
11-
12-
.card {
13-
min-height: 30px;
14-
min-width: 250px;
15-
max-width: 320px;
16-
margin: 0 15px 15px 15px
17-
}
18-
19-
igx-card-content {
20-
color: var(--content-text-color);
21-
}
22-
23-
.body-content {
24-
width: 100%;
25-
display: flex;
26-
flex-direction: row;
27-
justify-content: space-between;
28-
align-items: center;
29-
}
30-
31-
.string {
32-
text-align: center;
33-
margin-top: 50px;
34-
color: var(--ig-gray-800);
35-
}
36-
37-
.sample {
38-
overflow: auto;
39-
}
40-
.content {
41-
display: flex;
42-
justify-content: space-between;
43-
}
2+
margin-bottom: 5px;
3+
}
4+
5+
.group {
6+
display: flex;
7+
flex-direction: row;
8+
flex-wrap: wrap;
9+
margin-top: 15px;
10+
}
11+
12+
.card {
13+
min-height: 30px;
14+
min-width: 250px;
15+
max-width: 320px;
16+
margin: 0 15px 15px 15px
17+
}
18+
19+
igx-card-content {
20+
color: var(--content-text-color);
21+
}
22+
23+
.body-content {
24+
width: 100%;
25+
display: flex;
26+
flex-direction: row;
27+
justify-content: space-between;
28+
align-items: center;
29+
}
30+
31+
.string {
32+
text-align: center;
33+
margin-top: 50px;
34+
color: var(--ig-gray-800);
35+
}
36+
37+
.sample {
38+
overflow: auto;
39+
}
40+
41+
.content {
42+
display: flex;
43+
justify-content: space-between;
44+
}
45+
46+
.order-info::part(base) {
47+
display: flex;
48+
flex-direction: column;
49+
}
50+
51+
.order-info::part(content-container) {
52+
flex: 1;
53+
min-height: 0;
54+
display: flex;
55+
flex-direction: column;
56+
box-sizing: border-box;
57+
overflow: hidden;
58+
}

0 commit comments

Comments
 (0)