Skip to content

Commit f07ab82

Browse files
authored
Merge branch 'master' into simeonoff/merge-sassdocs
2 parents 28fc87a + 2ac452c commit f07ab82

38 files changed

+377
-75
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ All notable changes for each version of this project will be documented in this
2626
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`
2727
- **Behavioral Change** - When editing a row, `rowChangesCount` and `hiddenColumnsCount`would be displayed.
2828

29+
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`, `IgxPivotGrid`
30+
- Adding `Image` column data type
31+
2932
- `IgxCalendar`
3033

3134
Added support for shift key + mouse click interactions.

angular.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
"tsConfig": "src/tsconfig.spec.json",
111111
"karmaConfig": "src/karma.conf.js",
112112
"styles": [
113-
"src/styles.css"
113+
"src/styles/styles.scss"
114114
],
115115
"scripts": [],
116116
"assets": [

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"test:lib:azure:hgrid": "ng test igniteui-angular --watch=false --no-progress --karma-config=./projects/igniteui-angular/karma.azure.hierarchical-grid.conf.js",
2222
"test:lib:azure:pgrid": "ng test igniteui-angular --watch=false --no-progress --karma-config=./projects/igniteui-angular/karma.azure.pivot-grid.conf.js",
2323
"test:lib:azure:others": "ng test igniteui-angular --watch=false --no-progress --karma-config=./projects/igniteui-angular/karma.azure.non-grid.conf.js",
24-
"test:lib:watch": "ng test igniteui-angular --karma-config=./projects/igniteui-angular/karma.watch.conf.js",
24+
"test:lib:watch": "gulp buildStyle && ng test igniteui-angular --karma-config=./projects/igniteui-angular/karma.watch.conf.js",
2525
"test:schematics": "ts-node --project projects/igniteui-angular/migrations/tsconfig.json ./node_modules/jasmine/bin/jasmine.js ./projects/igniteui-angular/migrations/**/*.spec.ts ./projects/igniteui-angular/schematics/**/*.spec.ts",
2626
"test:styles": "ts-node --skip-project ./node_modules/jasmine/bin/jasmine.js ./projects/igniteui-angular/src/lib/core/styles/spec/tests.ts",
2727
"test:i18n": "ts-node --skip-project ./projects/igniteui-angular/src/lib/core/i18n/tests/tests.ts",

projects/igniteui-angular/src/lib/core/styles/components/grid/_grid-component.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,18 @@
241241
}
242242

243243
@include e(td, $m: bool) {
244+
@extend %igx-grid__td--centered !optional;
244245
@extend %igx-grid__td--bool !optional;
245246
}
246247

247248
@include e(td, $m: bool-true) {
248249
@extend %igx-grid__td--bool-true !optional;
249250
}
250251

252+
@include e(td, $m: image) {
253+
@extend %igx-grid__td--centered !optional;
254+
}
255+
251256
@include e(tr, $mods: (selected, filtered)) {
252257
@extend %grid-row--selected--filtered !optional;
253258
}

projects/igniteui-angular/src/lib/core/styles/components/grid/_grid-theme.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1123,9 +1123,11 @@
11231123
bottom: 0;
11241124
}
11251125

1126-
%igx-grid__td--bool {
1126+
%igx-grid__td--centered {
11271127
justify-content: center;
1128+
}
11281129

1130+
%igx-grid__td--bool {
11291131
igx-icon {
11301132
width: var(--igx-icon-size, #{rem(18px)});
11311133
height: var(--igx-icon-size, #{rem(18px)});

projects/igniteui-angular/src/lib/data-operations/data-util.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ import { DefaultDataCloneStrategy, IDataCloneStrategy } from '../data-operations
3434
DateTime: 'dateTime',
3535
Time: 'time',
3636
Currency: 'currency',
37-
Percent: 'percent'
37+
Percent: 'percent',
38+
Image: 'image'
3839
});
3940
export type DataType = (typeof DataType)[keyof typeof DataType];
4041

projects/igniteui-angular/src/lib/grids/cell.component.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
>
99
</ng-template>
1010
<ng-template #defaultCell>
11-
<div *ngIf="column.dataType !== 'boolean' || (column.dataType === 'boolean' && this.formatter)"
11+
<div *ngIf="column.dataType !== 'boolean' && column.dataType !== 'image' || (column.dataType === 'boolean' && this.formatter)"
1212
igxTextHighlight
1313
class="igx-grid__td-text"
1414
style="pointer-events: none;"
@@ -48,8 +48,8 @@
4848
<igx-icon
4949
*ngIf="column.dataType === 'boolean' && !this.formatter"
5050
[ngClass]="{ 'igx-icon--success': value, 'igx-icon--error': !value }"
51-
>{{ value ? "check" : "close" }}</igx-icon
52-
>
51+
>{{ value ? "check" : "close" }}</igx-icon>
52+
<img *ngIf="column.dataType === 'image'" [src]="value" [alt]="value | igxCellImageAlt" />
5353
</ng-template>
5454
<ng-template #addRowCell let-cell="cell">
5555
<div *ngIf="column.dataType !== 'boolean' || (column.dataType === 'boolean' && this.formatter)"
@@ -70,7 +70,7 @@
7070
}}</div>
7171
</ng-template>
7272
<ng-template #inlineEditor let-cell="cell">
73-
<ng-container *ngIf="column.dataType === 'string'" [formGroup]="formGroup">
73+
<ng-container *ngIf="column.dataType === 'string' || column.dataType === 'image'" [formGroup]="formGroup">
7474
<igx-input-group displayDensity="compact" >
7575
<input
7676
igxInput
@@ -92,7 +92,7 @@
9292
[igxFocus]="true"
9393
[step]="step"
9494
type="number"
95-
[formControl]="formControl"
95+
[formControl]="formControl"
9696
/>
9797
</igx-input-group>
9898
</ng-container>
@@ -137,7 +137,7 @@
137137
[attr.aria-invalid]="isInvalid"
138138
[formControl]="formControl"
139139
igxInput
140-
[igxDateTimeEditor]="column.defaultDateTimeFormat"
140+
[igxDateTimeEditor]="column.defaultDateTimeFormat"
141141
[igxFocus]="true"
142142
/>
143143
</igx-input-group>

projects/igniteui-angular/src/lib/grids/cell.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ export class IgxGridCellComponent implements OnInit, OnChanges, OnDestroy, CellT
893893
}
894894
}
895895

896-
896+
897897

898898
/**
899899
* @hidden @internal

projects/igniteui-angular/src/lib/grids/columns/column.component.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1810,10 +1810,6 @@ export class IgxColumnComponent implements AfterContentInit, OnDestroy, ColumnTy
18101810
}
18111811
if (!this.summaries) {
18121812
switch (this.dataType) {
1813-
case GridColumnDataType.String:
1814-
case GridColumnDataType.Boolean:
1815-
this.summaries = IgxSummaryOperand;
1816-
break;
18171813
case GridColumnDataType.Number:
18181814
case GridColumnDataType.Currency:
18191815
case GridColumnDataType.Percent:
@@ -1826,6 +1822,9 @@ export class IgxColumnComponent implements AfterContentInit, OnDestroy, ColumnTy
18261822
case GridColumnDataType.Time:
18271823
this.summaries = IgxTimeSummaryOperand;
18281824
break;
1825+
1826+
case GridColumnDataType.String:
1827+
case GridColumnDataType.Boolean:
18291828
default:
18301829
this.summaries = IgxSummaryOperand;
18311830
break;
@@ -1850,6 +1849,9 @@ export class IgxColumnComponent implements AfterContentInit, OnDestroy, ColumnTy
18501849
case GridColumnDataType.DateTime:
18511850
this.filters = IgxDateTimeFilteringOperand.instance();
18521851
break;
1852+
case GridColumnDataType.Image:
1853+
this.filterable = false;
1854+
break;
18531855
case GridColumnDataType.String:
18541856
default:
18551857
this.filters = IgxStringFilteringOperand.instance();

projects/igniteui-angular/src/lib/grids/common/grid-pipes.module.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
IgxGridAddRowPipe,
1919
IgxGridRowClassesPipe,
2020
IgxGridRowStylesPipe,
21+
IgxGridCellImageAltPipe,
2122
} from './pipes';
2223
export * from './pipes';
2324

@@ -29,6 +30,7 @@ export * from './pipes';
2930
IgxGridTopLevelColumns,
3031
IgxGridCellStylesPipe,
3132
IgxGridCellStyleClassesPipe,
33+
IgxGridCellImageAltPipe,
3234
IgxGridPaginatorOptionsPipe,
3335
IgxHasVisibleColumnsPipe,
3436
IgxGridRowPinningPipe,
@@ -48,6 +50,7 @@ export * from './pipes';
4850
IgxGridTopLevelColumns,
4951
IgxGridCellStylesPipe,
5052
IgxGridCellStyleClassesPipe,
53+
IgxGridCellImageAltPipe,
5154
IgxGridPaginatorOptionsPipe,
5255
IgxHasVisibleColumnsPipe,
5356
IgxGridRowPinningPipe,

0 commit comments

Comments
 (0)