Skip to content

Commit

Permalink
Merge branch '7.1.x' into indeterminate-progress
Browse files Browse the repository at this point in the history
  • Loading branch information
zdrawku authored Jan 7, 2019
2 parents e7dec59 + 0427320 commit 692d7eb
Show file tree
Hide file tree
Showing 29 changed files with 1,809 additions and 576 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes for each version of this project will be documented in this
- **Progress Indicators**:
- `igx-circular-bar` and `igx-linear-bar` now feature an indeterminate input property. When this property is set to true the indicator will be continually growing and shrinking along the track.


## 7.1.2
### Features
- `IgxTimePickerComponent`: in addition to the current dialog interaction mode, now the user can select or edit a time value, using an editable masked input with a dropdown.

## 7.1.1
### Bug Fixes

Expand All @@ -17,6 +22,7 @@ All notable changes for each version of this project will be documented in this
### Other
* update typedoc-plugin-localization version to 1.4.1 ([#3440](https://github.com/IgniteUI/igniteui-angular/issues/3440))


## 7.1.0
### Features
- **New component** `IgxBannerComponent`:
Expand All @@ -43,6 +49,7 @@ All notable changes for each version of this project will be documented in this
- `IgxOverlayService`:
- `ElasticPositioningStrategy` added. This strategy positions the element as in **Connected** positioning strategy and resize the element to fit in the view port in case the element is partially getting out of view.


## 7.0.5

### Bug Fixes
Expand All @@ -63,6 +70,7 @@ All notable changes for each version of this project will be documented in this
* update typedoc-plugin-localization version to 1.4.1 ([#3440](https://github.com/IgniteUI/igniteui-angular/issues/3440))
* Move all keyboard navigation tests in a separate file ([#2975](https://github.com/IgniteUI/igniteui-angular/issues/2975))


## 7.0.4
### Bug fixes
- Fix(igx-grid): revert row editing styles ([#2672](https://github.com/IgniteUI/igniteui-angular/issues/2672))
Expand Down
17 changes: 2 additions & 15 deletions projects/igniteui-angular/src/lib/chips/chip.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,14 +303,7 @@ export class IgxChipComponent extends DisplayDensityBase {
*/
@HostBinding('attr.class')
get hostClass(): string {
const classes = [];
if (this.isCosy()) {
classes.push('igx-chip--cosy');
} else if (this.isCompact()) {
classes.push('igx-chip--compact');
} else {
classes.push('igx-chip');
}
const classes = [this.getComponentDensityClass('igx-chip')];
classes.push(this.disabled ? 'igx-chip--disabled' : '');
// The custom classes should be at the end.
classes.push(this.class);
Expand Down Expand Up @@ -359,13 +352,7 @@ export class IgxChipComponent extends DisplayDensityBase {
* @hidden
*/
public get ghostClass(): string {
if (this.isCosy()) {
return 'igx-chip__ghost--cosy';
} else if (this.isCompact()) {
return 'igx-chip__ghost--compact';
} else {
return 'igx-chip__ghost';
}
return this.getComponentDensityClass('igx-chip__ghost');
}

public get chipTabindex() {
Expand Down
3 changes: 1 addition & 2 deletions projects/igniteui-angular/src/lib/chips/chip.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,7 @@ describe('IgxChip', () => {
const components = fix.debugElement.queryAll(By.directive(IgxChipComponent));
const firstComponent = components[0];

const isFirstChipComfortable = firstComponent.componentInstance.isComfortable();
expect(isFirstChipComfortable).toEqual(true);
expect(firstComponent.componentInstance.displayDensity).toEqual(DisplayDensity.comfortable);

// Assert default css class is applied
const comfortableComponents = fix.debugElement.queryAll(By.css('.igx-chip'));
Expand Down
60 changes: 24 additions & 36 deletions projects/igniteui-angular/src/lib/core/displayDensity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,74 +43,62 @@ export class DisplayDensityBase implements DoCheck {
*/
@Input()
public get displayDensity(): DisplayDensity | string {
return this._displayDensity;
return this._displayDensity ||
((this.displayDensityOptions && this.displayDensityOptions.displayDensity) || DisplayDensity.comfortable);
}

/**
* Sets the theme of the component.
*/
public set displayDensity(val: DisplayDensity | string) {
const currentDisplayDensity = this._displayDensity;
switch (val) {
case 'compact':
this._displayDensity = DisplayDensity.compact;
break;
case 'cosy':
this._displayDensity = DisplayDensity.cosy;
break;
case 'comfortable':
this._displayDensity = DisplayDensity.comfortable;
}
this._displayDensity = val as DisplayDensity;

if (currentDisplayDensity !== this._displayDensity) {
const densityChangedArgs: IDensityChangedEventArgs = {
oldDensity: currentDisplayDensity,
newDensity: this._displayDensity
};

this.onDensityChanged.emit(densityChangedArgs);
}
}

@Output()
public onDensityChanged = new EventEmitter<IDensityChangedEventArgs>();
protected oldDisplayDensityOptions: IDisplayDensityOptions = { displayDensity: DisplayDensity.comfortable };

/**
*@hidden
*/
public isCosy(): boolean {
return this._displayDensity === DisplayDensity.cosy ||
(!this._displayDensity && this.displayDensityOptions && this.displayDensityOptions.displayDensity === DisplayDensity.cosy);
}
protected oldDisplayDensityOptions: IDisplayDensityOptions = { displayDensity: DisplayDensity.comfortable };

/**
*@hidden
*/
public isComfortable(): boolean {
return this._displayDensity === DisplayDensity.comfortable ||
(!this._displayDensity && (!this.displayDensityOptions ||
this.displayDensityOptions.displayDensity === DisplayDensity.comfortable));
}

/**
*@hidden
*/
public isCompact(): boolean {
return this._displayDensity === DisplayDensity.compact ||
(!this._displayDensity && this.displayDensityOptions && this.displayDensityOptions.displayDensity === DisplayDensity.compact);
}
constructor(protected displayDensityOptions: IDisplayDensityOptions) {
Object.assign(this.oldDisplayDensityOptions, displayDensityOptions);
}

public ngDoCheck() {
if (this.oldDisplayDensityOptions && this.displayDensityOptions && !this._displayDensity &&
this.oldDisplayDensityOptions.displayDensity !== this.displayDensityOptions.displayDensity) {
if (!this._displayDensity && this.displayDensityOptions &&
this.oldDisplayDensityOptions.displayDensity !== this.displayDensityOptions.displayDensity) {
const densityChangedArgs: IDensityChangedEventArgs = {
oldDensity: this.oldDisplayDensityOptions.displayDensity,
newDensity: this.displayDensityOptions.displayDensity
};

this.onDensityChanged.emit(densityChangedArgs);
this.oldDisplayDensityOptions = Object.assign(this.oldDisplayDensityOptions, this.displayDensityOptions);
}
}

/**
* Given a style class of a component/element returns the modified version of it based
* on the current display density.
*/
protected getComponentDensityClass(baseStyleClass: string): string {
switch (this.displayDensity) {
case DisplayDensity.cosy:
return `${baseStyleClass}--${DisplayDensity.cosy}`;
case DisplayDensity.compact:
return `${baseStyleClass}--${DisplayDensity.compact}`;
default:
return baseStyleClass;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,90 +1,71 @@
@include b(igx-time-picker) {
@extend %time-picker-display !optional;

@include e(header) {
@extend %igx-time-picker__header !optional;
@extend %time-picker__header !optional;
}

@include e(header-ampm) {
@extend %igx-time-picker__header-ampm !optional;
@extend %time-picker__header-ampm !optional;
}

@include e(header-hour){
@extend %igx-time-picker__header-hour !optional;
@extend %time-picker__header-hour !optional;
}

@include e(main) {
@extend %time-picker__main !optional;
}

// COLUMN
@include e(column) {
@extend %igx-time-picker__column !optional;
@extend %time-picker__column !optional;
}

@include e(item) {
@extend %igx-time-picker__item !optional;
@extend %time-picker__item !optional;
}

@include e(item, $mod: selected) {
@extend %igx-time-picker__item--selected !optional;
@extend %time-picker__item--selected !optional;
}

@include e(item, $m: active) {
@extend %igx-time-picker__item--active !optional;
@extend %time-picker__item--active !optional;
}

// HOUR
@include e(hourList) {
@extend %igx-time-picker__hourList !optional;
@extend %time-picker__hourList !optional;
}


// MINUTE
@include e(minuteList) {
@extend %igx-time-picker__minuteList !optional;
@extend %time-picker__minuteList !optional;
}

// AM PM
@include e(ampmList) {
@extend %igx-time-picker__ampmList !optional;
@extend %time-picker__ampmList !optional;
}

@include e(body) {
@extend %igx-time-picker__body !optional;
@extend %time-picker__body !optional;
}

.igx-dialog__window {
@extend %time-picker-display !optional;
@include e(buttons) {
@extend %time-picker__buttons !optional;
}

@include m(vertical) {
.igx-dialog__window {
@extend %time-picker-display--vertical !optional;
}

.igx-time-picker__wrapper {
@extend %igx-time-picker__wrapper !optional;
}

.igx-time-picker__header {
@extend %igx-time-picker__header--vertical !optional;

&::after {
@extend %igx-time-picker__header--vertical-after !optional;
}
}

.igx-time-picker__body {
@extend %igx-time-picker__body--vertical !optional;
}
}

.igx-dialog__window,
.igx-dialog__window-content {
@extend %time-picker-content !optional;
@include m(dropdown) {
@extend %time-picker--dropdown !optional;
}

.igx-dialog__window-title {
@extend %time-picker-dialog-title !optional;
}
@include m(vertical) {
@extend %time-picker-display--vertical !optional;

.igx-dialog__window-actions {
@extend %time-picker-dialog-actions !optional;
@include e(header) {
@extend %time-picker__header--vertical !optional;
}
}
}
Loading

0 comments on commit 692d7eb

Please sign in to comment.