Skip to content

Commit 8767e3f

Browse files
authored
Merge pull request #3884 from IgniteUI/vnext
Updating prod with fixes before 21.1
2 parents 94b96f3 + a086136 commit 8767e3f

File tree

41 files changed

+728
-154
lines changed

Some content is hidden

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

41 files changed

+728
-154
lines changed

live-editing/configs/BadgeConfigGenerator.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ export class BadgeConfigGenerator implements IConfigGenerator {
4040
shortenComponentPathBy: "/data-display/badge/"
4141
}));
4242

43+
configs.push(new Config({
44+
component: 'BadgeDotSampleComponent',
45+
additionalFiles: ["src/app/data-display/badge/model/member.model.ts", "src/app/data-display/badge/badge-dot-sample/badge-dot-sample.component.scss"],
46+
appConfig: BaseAppConfig,
47+
shortenComponentPathBy: "/data-display/badge/"
48+
}));
49+
4350
return configs;
4451
}
4552
}

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
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<div class="wrapper">
2+
<igx-avatar icon="face" shape="rounded" size="small"></igx-avatar>
3+
<igx-badge dot type="success"></igx-badge>
4+
</div>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.wrapper {
2+
display: flex;
3+
position: relative;
4+
margin-top: 15px;
5+
6+
igx-avatar {
7+
anchor-name: --avatar;
8+
}
9+
10+
igx-badge {
11+
position: absolute;
12+
position-anchor: --avatar;
13+
bottom: anchor(--avatar top);
14+
left: anchor(right);
15+
transform: translate(-75%, 75%);
16+
}
17+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { Component } from '@angular/core';
2+
import { IgxAvatarComponent } from 'igniteui-angular/avatar';
3+
import { IgxBadgeComponent } from 'igniteui-angular/badge';
4+
5+
@Component({
6+
selector: 'app-badge-dot-sample',
7+
styleUrls: ['./badge-dot-sample.component.scss'],
8+
templateUrl: './badge-dot-sample.component.html',
9+
imports: [IgxAvatarComponent, IgxBadgeComponent]
10+
})
11+
export class BadgeDotSampleComponent { }

src/app/data-display/data-display-routes-data.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export const dataDisplayRoutesData = {
44
"badge-icon": { displayName: "Badge Icon Sample", parentName: "Badge" },
55
"badge-sample-2": { displayName: "Simple Badge", parentName: "Badge" },
66
"badge-sample-3": { displayName: "Badge for List Items", parentName: "Badge" },
7+
"badge-dot-sample": { displayName: "Badge Dot Sample", parentName: "Badge" },
78
"badge-styling-sample": { displayName: "Badge Styling Sample", parentName: "Badge" },
89
"badge-tailwind-styling-sample": { displayName: "Badge Tailwind Styling Sample", parentName: "Badge" },
910
"chip-simple": { displayName: "Chip Simple", parentName: "Chip" },

src/app/data-display/data-display.routes.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { BadgeIconComponent } from './badge/badge-icon/badge-icon.component';
22
import { BadgeSample2Component } from './badge/badge-sample-2/badge-sample-2.component';
33
import { BadgeSample3Component } from './badge/badge-sample-3/badge-sample-3.component';
4+
import { BadgeDotSampleComponent } from './badge/badge-dot-sample/badge-dot-sample.component';
45
import { BadgeStylingSampleComponent } from './badge/badge-styling-sample/badge-styling-sample.component';
56
import { BadgeTailwindStylingSampleComponent } from './badge/badge-tailwind-styling-sample/badge-tailwind-styling-sample.component';
67
import { ChipAreaSampleComponent } from './chip/chip-area-sample/chip-area-sample.component';
@@ -61,6 +62,11 @@ export const DataDisplayRoutes: Routes = [
6162
data: dataDisplayRoutesData['badge-sample-3'],
6263
path: 'badge-sample-3'
6364
},
65+
{
66+
component: BadgeDotSampleComponent,
67+
data: dataDisplayRoutesData['badge-dot-sample'],
68+
path: 'badge-dot-sample'
69+
},
6470
{
6571
component: BadgeStylingSampleComponent,
6672
data: dataDisplayRoutesData['badge-styling-sample'],

src/app/data/customers.ts

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const DATA = [
77
ContactTitle: "Sales Representative",
88
Address: "Obere Str. 57",
99
City: "Berlin",
10-
Region: null,
10+
Region: "East",
1111
PostalCode: "12209",
1212
Country: "Germany",
1313
Phone: "030-0074321",
@@ -19,7 +19,7 @@ export const DATA = [
1919
ContactTitle: "Owner",
2020
Address: "Avda. de la Constitución 2222",
2121
City: "México D.F.",
22-
Region: null,
22+
Region: "South",
2323
PostalCode: "05021",
2424
Country: "Mexico",
2525
Phone: "(5) 555-4729",
@@ -31,7 +31,7 @@ export const DATA = [
3131
ContactTitle: "Owner",
3232
Address: "Mataderos 2312",
3333
City: "México D.F.",
34-
Region: null,
34+
Region: "South",
3535
PostalCode: "05023",
3636
Country: "Mexico",
3737
Phone: "(5) 555-3932",
@@ -43,7 +43,7 @@ export const DATA = [
4343
ContactTitle: "Sales Representative",
4444
Address: "120 Hanover Sq.",
4545
City: "London",
46-
Region: null,
46+
Region: "East",
4747
PostalCode: "WA1 1DP",
4848
Country: "UK",
4949
Phone: "(171) 555-7788",
@@ -55,7 +55,7 @@ export const DATA = [
5555
ContactTitle: "Order Administrator",
5656
Address: "Berguvsvägen 8",
5757
City: "Luleå",
58-
Region: null,
58+
Region: "South",
5959
PostalCode: "S-958 22",
6060
Country: "Sweden",
6161
Phone: "0921-12 34 65",
@@ -67,7 +67,7 @@ export const DATA = [
6767
ContactTitle: "Sales Representative",
6868
Address: "Forsterstr. 57",
6969
City: "Mannheim",
70-
Region: null,
70+
Region: "East",
7171
PostalCode: "68306",
7272
Country: "Germany",
7373
Phone: "0621-08460",
@@ -79,7 +79,7 @@ export const DATA = [
7979
ContactTitle: "Marketing Manager",
8080
Address: "24, place Kléber",
8181
City: "Strasbourg",
82-
Region: null,
82+
Region: "East",
8383
PostalCode: "67000",
8484
Country: "France",
8585
Phone: "88.60.15.31",
@@ -91,7 +91,7 @@ export const DATA = [
9191
ContactTitle: "Owner",
9292
Address: "C/ Araquil, 67",
9393
City: "Madrid",
94-
Region: null,
94+
Region: "East",
9595
PostalCode: "28023",
9696
Country: "Spain",
9797
Phone: "(91) 555 22 82",
@@ -103,7 +103,7 @@ export const DATA = [
103103
ContactTitle: "Owner",
104104
Address: "12, rue des Bouchers",
105105
City: "Marseille",
106-
Region: null,
106+
Region: "West",
107107
PostalCode: "13008",
108108
Country: "France",
109109
Phone: "91.24.45.40",
@@ -127,7 +127,7 @@ export const DATA = [
127127
ContactTitle: "Sales Representative",
128128
Address: "Fauntleroy Circus",
129129
City: "London",
130-
Region: null,
130+
Region: "South",
131131
PostalCode: "EC2 5NT",
132132
Country: "UK",
133133
Phone: "(171) 555-1212",
@@ -139,7 +139,7 @@ export const DATA = [
139139
ContactTitle: "Sales Agent",
140140
Address: "Cerrito 333",
141141
City: "Buenos Aires",
142-
Region: null,
142+
Region: "East",
143143
PostalCode: "1010",
144144
Country: "Argentina",
145145
Phone: "(1) 135-5555",
@@ -151,7 +151,7 @@ export const DATA = [
151151
ContactTitle: "Marketing Manager",
152152
Address: "Sierras de Granada 9993",
153153
City: "México D.F.",
154-
Region: null,
154+
Region: "South",
155155
PostalCode: "05022",
156156
Country: "Mexico",
157157
Phone: "(5) 555-3392",
@@ -163,7 +163,7 @@ export const DATA = [
163163
ContactTitle: "Owner",
164164
Address: "Hauptstr. 29",
165165
City: "Bern",
166-
Region: null,
166+
Region: "East",
167167
PostalCode: "3012",
168168
Country: "Switzerland",
169169
Phone: "0452-076545",
@@ -187,7 +187,7 @@ export const DATA = [
187187
ContactTitle: "Sales Representative",
188188
Address: "Berkeley Gardens 12 Brewery",
189189
City: "London",
190-
Region: null,
190+
Region: "South",
191191
PostalCode: "WX1 6LT",
192192
Country: "UK",
193193
Phone: "(171) 555-2282",
@@ -199,7 +199,7 @@ export const DATA = [
199199
ContactTitle: "Order Administrator",
200200
Address: "Walserweg 21",
201201
City: "Aachen",
202-
Region: null,
202+
Region: "South",
203203
PostalCode: "52066",
204204
Country: "Germany",
205205
Phone: "0241-039123",
@@ -211,7 +211,7 @@ export const DATA = [
211211
ContactTitle: "Owner",
212212
Address: "67, rue des Cinquante Otages",
213213
City: "Nantes",
214-
Region: null,
214+
Region: "East",
215215
PostalCode: "44000",
216216
Country: "France",
217217
Phone: "40.67.88.88",
@@ -223,7 +223,7 @@ export const DATA = [
223223
ContactTitle: "Sales Agent",
224224
Address: "35 King George",
225225
City: "London",
226-
Region: null,
226+
Region: "East",
227227
PostalCode: "WX3 6FW",
228228
Country: "UK",
229229
Phone: "(171) 555-0297",
@@ -235,7 +235,7 @@ export const DATA = [
235235
ContactTitle: "Sales Manager",
236236
Address: "Kirchgasse 6",
237237
City: "Graz",
238-
Region: null,
238+
Region: "South",
239239
PostalCode: "8010",
240240
Country: "Austria",
241241
Phone: "7675-3425",
@@ -259,7 +259,7 @@ export const DATA = [
259259
ContactTitle: "Accounting Manager",
260260
Address: "C/ Moralzarzal, 86",
261261
City: "Madrid",
262-
Region: null,
262+
Region: "East",
263263
PostalCode: "28034",
264264
Country: "Spain",
265265
Phone: "(91) 555 94 44",
@@ -271,7 +271,7 @@ export const DATA = [
271271
ContactTitle: "Assistant Sales Agent",
272272
Address: "184, chaussée de Tournai",
273273
City: "Lille",
274-
Region: null,
274+
Region: "South",
275275
PostalCode: "59000",
276276
Country: "France",
277277
Phone: "20.16.10.16",
@@ -283,7 +283,7 @@ export const DATA = [
283283
ContactTitle: "Owner",
284284
Address: "Åkergatan 24",
285285
City: "Bräcke",
286-
Region: null,
286+
Region: "East",
287287
PostalCode: "S-844 67",
288288
Country: "Sweden",
289289
Phone: "0695-34 67 21",
@@ -295,7 +295,7 @@ export const DATA = [
295295
ContactTitle: "Marketing Manager",
296296
Address: "Berliner Platz 43",
297297
City: "München",
298-
Region: null,
298+
Region: "East",
299299
PostalCode: "80805",
300300
Country: "Germany",
301301
Phone: "089-0877310",
@@ -307,7 +307,7 @@ export const DATA = [
307307
ContactTitle: "Marketing Manager",
308308
Address: "54, rue Royale",
309309
City: "Nantes",
310-
Region: null,
310+
Region: "South",
311311
PostalCode: "44000",
312312
Country: "France",
313313
Phone: "40.32.21.21",
@@ -319,7 +319,7 @@ export const DATA = [
319319
ContactTitle: "Sales Representative",
320320
Address: "Via Monte Bianco 34",
321321
City: "Torino",
322-
Region: null,
322+
Region: "East",
323323
PostalCode: "10100",
324324
Country: "Italy",
325325
Phone: "011-4988260",

0 commit comments

Comments
 (0)