Skip to content

Commit e212e5f

Browse files
authored
Merge branch 'master' into editing-cell-tab-ime
2 parents b359d09 + b1ef31b commit e212e5f

File tree

50 files changed

+1177
-433
lines changed

Some content is hidden

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

50 files changed

+1177
-433
lines changed

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ All notable changes for each version of this project will be documented in this
1515
- `IgxMonthPickerBase` -> `IgxMonthPickerBaseDirective`
1616

1717
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`
18+
- **Breaking Change** - Hierarchical grid children no longer use the same `IgxTransactionService` instance and transaction handling should be modified to address each grid's transactions separately.
1819
- **Behavioral Change** - Pinning columns is no longer automatically prevented when the pinning area would exceed the size of the grid.
1920
- `igxGridState` directive added to make it easy for developers to save and restore the grid state. The directive exposes the `getState` and `setState` methods to save/restore the state and an `options` input property to exclude features.
2021
- `IgxCarousel`:
@@ -81,6 +82,26 @@ All notable changes for each version of this project will be documented in this
8182
- `IgxSelect`:
8283
- adding `IgxSelectHeaderDirective` and `IgxSelectFooterDirective`. These can be used to provide a custom header, respectively footer templates for the `igxSelect` drop-down list. If there are no templates marked with these directives - no default templates will be used so the drop-down list will not have header nor footer.
8384

85+
- `IgxCircularProgressBar`:
86+
- added `IgxProgressBarGradientDirective` to allow providing custom circular progress SVG gradients. Providing a custom gradient via a template is as easy as writing:
87+
```html
88+
<igx-circular-bar [value]="77">
89+
<ng-template igxProgressBarGradient let-id>
90+
<svg:linearGradient [id]="id" gradientTransform="rotate(90)">
91+
<stop offset="0%" stop-color="#05a"/>
92+
<stop offset="100%" stop-color="#0a5"/>
93+
</svg:linearGradient>
94+
</ng-template>
95+
</igx-circular-bar>
96+
```
97+
- changed the `igx-progress-circular-theme` to accept a list of 2 colors for the `$progress-circle-color` argument, making it easier to modify the default gradient:
98+
```scss
99+
$theme: igx-progress-circular-theme(
100+
$progress-circle-color: red blue
101+
);
102+
103+
@include igx-progress-circular($theme);
104+
```
84105

85106
## 8.2.6
86107

projects/igniteui-angular/src/lib/carousel/carousel.component.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ import {
2121
Injectable
2222
} from '@angular/core';
2323
import { IgxIconModule } from '../icon/index';
24-
import { IBaseEventArgs } from '../core/utils';
24+
import { IBaseEventArgs, PlatformUtil } from '../core/utils';
2525
import { Subject, merge } from 'rxjs';
2626
import { takeUntil } from 'rxjs/operators';
2727
import { IgxCarouselIndicatorDirective, IgxCarouselNextButtonDirective, IgxCarouselPrevButtonDirective } from './carousel.directives';
2828
import { useAnimation, AnimationBuilder, AnimationPlayer, AnimationReferenceMetadata } from '@angular/animations';
29-
import { slideInLeft, fadeIn, rotateInCenter } from '../animations/main';
29+
import { slideInLeft, fadeIn } from '../animations/main';
3030
import { IgxSlideComponent, Direction } from './slide.component';
3131
import { ICarouselResourceStrings } from '../core/i18n/carousel-resources';
3232
import { CurrentResourceStrings } from '../core/i18n/resources';
@@ -436,7 +436,8 @@ export class IgxCarouselComponent implements OnDestroy, AfterContentInit {
436436
private animationPosition = 0;
437437
private newDuration = 0;
438438

439-
constructor(private element: ElementRef, private iterableDiffers: IterableDiffers, private builder: AnimationBuilder) {
439+
constructor(private element: ElementRef, private iterableDiffers: IterableDiffers,
440+
private builder: AnimationBuilder, private platformUtil: PlatformUtil) {
440441
this.differ = this.iterableDiffers.find([]).create(null);
441442
}
442443

@@ -887,7 +888,7 @@ export class IgxCarouselComponent implements OnDestroy, AfterContentInit {
887888
private restartInterval() {
888889
this.resetInterval();
889890

890-
if (!isNaN(this.interval) && this.interval > 0) {
891+
if (!isNaN(this.interval) && this.interval > 0 && this.platformUtil.isBrowser) {
891892
this.lastInterval = setInterval(() => {
892893
const tick = +this.interval;
893894
if (this.playing && this.total && !isNaN(tick) && tick > 0) {

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2064,6 +2064,10 @@
20642064
%igx-grid__loading-outlet {
20652065
z-index: 10003;
20662066

2067+
> %overlay-wrapper--modal {
2068+
background: none;
2069+
}
2070+
20672071
%circular-display {
20682072
width: rem(50);
20692073
height: rem(50);

projects/igniteui-angular/src/lib/core/styles/components/progress/_progress-component.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,14 @@
113113
@extend %circular-text !optional;
114114
}
115115

116+
@include e(gradient-start) {
117+
@extend %circular-gradient-start !optional;
118+
}
119+
120+
@include e(gradient-end) {
121+
@extend %circular-gradient-end !optional;
122+
}
123+
116124
@include m(indeterminate) {
117125
@extend %circular-display--indeterminate !optional;
118126

projects/igniteui-angular/src/lib/core/styles/components/progress/_progress-theme.scss

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@
206206
/// @param {Map} $schema [$light-schema] - The schema used as basis for styling the component.
207207
///
208208
/// @param {Color} $base-circle-color [null] - The base circle fill color.
209-
/// @param {Color} $progress-circle-color [null] - The progress circle fill color.
209+
/// @param {Color | List<Color>} $progress-circle-color [null] - The progress circle fill color.
210210
/// @param {Color} $text-color [null] - The value text color.
211211
///
212212
/// @requires $default-palette
@@ -226,11 +226,13 @@
226226
227227
$base-circle-color: null,
228228
$progress-circle-color: null,
229+
229230
$text-color: null
230231
) {
231232
$name: 'igx-circular-bar';
232233
$circular-bar-schema: ();
233234

235+
234236
@if map-has-key($schema, $name) {
235237
$circular-bar-schema: map-get($schema, $name);
236238
} @else {
@@ -239,11 +241,25 @@
239241

240242
$theme: apply-palette($circular-bar-schema, $palette);
241243

244+
$progress-circle-color-start: map-get($theme, 'progress-circle-color');
245+
$progress-circle-color-end: map-get($theme, 'progress-circle-color');
246+
247+
@if type-of($progress-circle-color) == 'color' {
248+
$progress-circle-color-start: $progress-circle-color;
249+
$progress-circle-color-end: $progress-circle-color;
250+
}
251+
252+
@if length($progress-circle-color) == 2 {
253+
$progress-circle-color-start: nth($progress-circle-color, 1);
254+
$progress-circle-color-end: nth($progress-circle-color, 2);
255+
}
256+
242257
@return extend($theme, (
243258
name: $name,
244259
palette: $palette,
245260
base-circle-color: $base-circle-color,
246-
progress-circle-color: $progress-circle-color,
261+
progress-circle-color-start: $progress-circle-color-start,
262+
progress-circle-color-end: $progress-circle-color-end,
247263
text-color: $text-color
248264
));
249265
}
@@ -260,6 +276,7 @@
260276

261277
// @debug $theme;
262278

279+
$palette: map-get($theme, 'palette');
263280
$circular-value-fs: rem(32px, 16px);
264281
$circular-value-fw: 600;
265282
$animation-direction: if-ltr(normal, reverse);
@@ -291,7 +308,6 @@
291308

292309
%circular-outer {
293310
fill: transparent;
294-
stroke: --var($theme, 'progress-circle-color');
295311
stroke-width: 4;
296312
stroke-dashoffset: 289;
297313
stroke-dasharray: 289;
@@ -315,6 +331,14 @@
315331
visibility: hidden;
316332
}
317333

334+
%circular-gradient-start {
335+
stop-color: --var($theme, 'progress-circle-color-start');
336+
}
337+
338+
%circular-gradient-end {
339+
stop-color: --var($theme, 'progress-circle-color-end');
340+
}
341+
318342
@include keyframes('indeterminate-accordion') {
319343
from {
320344
stroke-dashoffset: 578;

projects/igniteui-angular/src/lib/core/styles/components/time-picker/_time-picker-component.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@
4747
@extend %time-picker__minuteList !optional;
4848
}
4949

50+
// SECONDS
51+
@include e(secondsList) {
52+
@extend %time-picker__secondsList !optional;
53+
}
54+
5055
// AM PM
5156
@include e(ampmList) {
5257
@extend %time-picker__ampmList !optional;

projects/igniteui-angular/src/lib/core/styles/components/time-picker/_time-picker-theme.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,10 @@
203203
}
204204
}
205205

206+
%time-picker__secondsList {
207+
text-align: center;
208+
}
209+
206210
%time-picker__ampmList {
207211
display: flex;
208212
flex-direction: column;

projects/igniteui-angular/src/lib/directives/for-of/for_of.directive.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,13 @@ export class IgxForOfDirective<T> implements OnInit, OnChanges, DoCheck, OnDestr
181181
@Output()
182182
public onChunkLoad = new EventEmitter<IForOfState>();
183183

184+
/**
185+
* @hidden @internal
186+
* An event that is emitted when scrollbar visibility has changed.
187+
*/
188+
@Output()
189+
public onScrollbarVisibilityChanged = new EventEmitter<any>();
190+
184191
/**
185192
* An event that is emitted after the rendered content size of the igxForOf has been changed.
186193
*/
@@ -1155,10 +1162,11 @@ export class IgxForOfDirective<T> implements OnInit, OnChanges, DoCheck, OnDestr
11551162
protected _recalcScrollBarSize() {
11561163
const count = this.isRemote ? this.totalItemCount : (this.igxForOf ? this.igxForOf.length : 0);
11571164
this.dc.instance.notVirtual = !(this.igxForContainerSize && this.dc && this.state.chunkSize < count);
1165+
const scrollable = this.isScrollable();
11581166
if (this.igxForScrollOrientation === 'horizontal') {
11591167
const totalWidth = this.igxForContainerSize ? this.initSizesCache(this.igxForOf) : 0;
11601168
this.scrollComponent.nativeElement.style.width = this.igxForContainerSize + 'px';
1161-
this.scrollComponent.nativeElement.children[0].style.width = totalWidth + 'px';
1169+
this.scrollComponent.size = totalWidth;
11621170
if (totalWidth <= parseInt(this.igxForContainerSize, 10)) {
11631171
this.scrollPosition = 0;
11641172
}
@@ -1170,6 +1178,10 @@ export class IgxForOfDirective<T> implements OnInit, OnChanges, DoCheck, OnDestr
11701178
this.scrollPosition = 0;
11711179
}
11721180
}
1181+
if (scrollable !== this.isScrollable()) {
1182+
// scrollbar visibility has changed
1183+
this.onScrollbarVisibilityChanged.emit();
1184+
}
11731185
}
11741186

11751187
protected _calcHeight(): number {

projects/igniteui-angular/src/lib/grids/grid-base.directive.ts

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ import { IgxGridToolbarCustomContentDirective } from './toolbar/toolbar.directiv
132132
import { IgxColumnComponent } from './columns/column.component';
133133
import { IgxColumnGroupComponent } from './columns/column-group.component';
134134
import { IGridSortingStrategy } from '../data-operations/sorting-strategy';
135-
import { IgxRowDragGhostDirective } from './row-drag.directive';
135+
import { IgxRowDragGhostDirective, IgxDragIndicatorIconDirective } from './row-drag.directive';
136136

137137
const MINIMUM_COLUMN_WIDTH = 136;
138138
const FILTER_ROW_HEIGHT = 50;
@@ -154,6 +154,7 @@ export const IgxGridTransaction = new InjectionToken<string>('IgxGridTransaction
154154
export class IgxGridBaseDirective extends DisplayDensityBase implements
155155
OnInit, DoCheck, OnDestroy, AfterContentInit, AfterViewInit {
156156
private _scrollWidth: number;
157+
private _customDragIndicatorIconTemplate: TemplateRef<any>;
157158
protected _init = true;
158159
private _cdrRequests = false;
159160
protected _cdrRequestRepaint = false;
@@ -330,7 +331,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
330331
}
331332

332333
/**
333-
* Emitted before filtering is performed.
334+
* Emitted after filtering is performed.
334335
* Returns the filtering expressions tree of the column for which filtering was performed.
335336
* ```typescript
336337
* filteringExprTreeChange(event: IFilteringExpressionsTree){
@@ -347,7 +348,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
347348
public filteringExpressionsTreeChange = new EventEmitter<IFilteringExpressionsTree>();
348349

349350
/**
350-
* Emitted before advanced filtering is performed.
351+
* Emitted after advanced filtering is performed.
351352
* Returns the advanced filtering expressions tree.
352353
* ```typescript
353354
* advancedFilteringExprTreeChange(event: IFilteringExpressionsTree){
@@ -2089,6 +2090,24 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
20892090
@ContentChild(IgxHeaderCollapseIndicatorDirective, { read: TemplateRef })
20902091
public headerCollapseIndicatorTemplate: TemplateRef<any> = null;
20912092

2093+
/**
2094+
* @hidden
2095+
* @internal
2096+
*/
2097+
@ContentChildren(IgxDragIndicatorIconDirective, { read: TemplateRef, descendants: false })
2098+
public dragIndicatorIconTemplates: QueryList<TemplateRef<any>>;
2099+
2100+
/**
2101+
* The custom template, if any, that should be used when rendering the row drag indicator icon
2102+
*/
2103+
public get dragIndicatorIconTemplate(): TemplateRef<any> {
2104+
return this._customDragIndicatorIconTemplate || this.dragIndicatorIconTemplates.first;
2105+
}
2106+
2107+
public set dragIndicatorIconTemplate(val: TemplateRef<any>) {
2108+
this._customDragIndicatorIconTemplate = val;
2109+
}
2110+
20922111
/**
20932112
* @hidden
20942113
*/
@@ -3017,9 +3036,19 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
30173036
});
30183037

30193038
this.verticalScrollContainer.onDataChanging.pipe(destructor, filter(() => !this._init)).subscribe(($event) => {
3020-
this.calculateGridHeight();
3021-
$event.containerSize = this.calcHeight;
3039+
const shouldRecalcSize = this.isPercentHeight &&
3040+
( !this.calcHeight || this.calcHeight === this.getDataBasedBodyHeight() ||
3041+
this.calcHeight === this.renderedRowHeight * this._defaultTargetRecordNumber);
3042+
if (shouldRecalcSize) {
3043+
this.calculateGridHeight();
3044+
$event.containerSize = this.calcHeight;
3045+
}
30223046
this.evaluateLoadingState();
3047+
});
3048+
3049+
this.verticalScrollContainer.onScrollbarVisibilityChanged.pipe(destructor, filter(() => !this._init)).subscribe(() => {
3050+
// called to recalc all widths that may have changes as a result of
3051+
// the vert. scrollbar showing/hiding
30233052
this.notifyChanges(true);
30243053
});
30253054

projects/igniteui-angular/src/lib/grids/grid-navigation.service.ts

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -356,21 +356,15 @@ export class IgxGridNavigationService {
356356

357357
public goToFirstCell() {
358358
const verticalScroll = this.grid.verticalScrollContainer.getScroll();
359-
const horizontalScroll = this.grid.dataRowList.first.virtDirRow.getScroll();
360359
if (verticalScroll.scrollTop === 0) {
361360
this.onKeydownHome(this.grid.dataRowList.first.index);
362361
} else {
363-
if (!horizontalScroll.clientWidth || parseInt(horizontalScroll.scrollLeft, 10) <= 1 || this.grid.pinnedColumns.length) {
364-
this.navigateTop(0);
365-
} else {
366-
this.getFocusableGrid().nativeElement.focus({ preventScroll: true });
367-
this.horizontalScroll(this.grid.dataRowList.first.index).scrollTo(0);
368-
this.grid.parentVirtDir.onChunkLoad
369-
.pipe(first())
370-
.subscribe(() => {
371-
this.navigateTop(0);
372-
});
373-
}
362+
this.getFocusableGrid().nativeElement.focus({ preventScroll: true });
363+
this.grid.verticalScrollContainer.scrollTo(0);
364+
this.grid.verticalScrollContainer.onChunkLoad
365+
.pipe(first()).subscribe(() => {
366+
this.onKeydownHome(this.grid.dataRowList.first.index);
367+
});
374368
}
375369
}
376370

0 commit comments

Comments
 (0)