Skip to content

Commit

Permalink
Merge master into skrastev/hgrid-row-pinning
Browse files Browse the repository at this point in the history
  • Loading branch information
skrustev committed Mar 31, 2020
2 parents aff72cd + c105ddb commit 57c5955
Show file tree
Hide file tree
Showing 137 changed files with 5,486 additions and 4,332 deletions.
4,156 changes: 2,383 additions & 1,773 deletions package-lock.json

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"build:migration": "gulp copyMigrations && tsc --listEmittedFiles --project ./projects/igniteui-angular/migrations/tsconfig.json",
"build:schematics": "gulp copySchematics && tsc --listEmittedFiles --project ./projects/igniteui-angular/schematics/tsconfig.json",
"build:docs": "sassdoc projects/igniteui-angular/src/lib/core/styles && gulp typedocBuildTheme",
"lint:lib": "tslint 'projects/igniteui-angular/src/**/*.ts' && stylelint 'projects/igniteui-angular/src/lib/core/styles'",
"lint:lib": "tslint 'projects/igniteui-angular/src/**/*.ts' && stylelint \"projects/igniteui-angular/src/lib/core/styles\"",
"typedoc:dev": "gulp typedocServe",
"typedoc-build:export": "gulp exportTypedocJson ",
"typedoc-build:import": "gulp importTypedocJson",
Expand All @@ -44,14 +44,14 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^9.0.0",
"@angular/common": "^9.0.0",
"@angular/compiler": "^9.0.0",
"@angular/core": "^9.0.0",
"@angular/forms": "^9.0.0",
"@angular/platform-browser": "^9.0.0",
"@angular/platform-browser-dynamic": "^9.0.0",
"@angular/router": "^9.0.0",
"@angular/animations": "^9.1.0",
"@angular/common": "^9.1.0",
"@angular/compiler": "^9.1.0",
"@angular/core": "^9.1.0",
"@angular/forms": "^9.1.0",
"@angular/platform-browser": "^9.1.0",
"@angular/platform-browser-dynamic": "^9.1.0",
"@angular/router": "^9.1.0",
"@types/hammerjs": "^2.0.36",
"@types/source-map": "0.5.2",
"classlist.js": "^1.1.20150312",
Expand All @@ -65,12 +65,12 @@
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.900.1",
"@angular-devkit/build-ng-packagr": "~0.900.1",
"@angular-devkit/schematics": "^9.0.1",
"@angular/cli": "~9.0.1",
"@angular/compiler-cli": "^9.0.0",
"@angular/language-service": "^9.0.0",
"@angular-devkit/build-angular": "~0.901.0",
"@angular-devkit/build-ng-packagr": "~0.901.0",
"@angular-devkit/schematics": "^9.1.0",
"@angular/cli": "~9.1.0",
"@angular/compiler-cli": "^9.1.0",
"@angular/language-service": "^9.1.0",
"@angularclass/hmr": "^2.1.3",
"@types/jasmine": "~3.3.5",
"@types/jasminewd2": "~2.0.6",
Expand All @@ -91,7 +91,7 @@
"gulp-util": "^3.0.8",
"hammer-simulator": "0.0.1",
"igniteui-sassdoc-theme": "^1.1.2",
"igniteui-typedoc-theme": "^1.3.1",
"igniteui-typedoc-theme": "^1.3.2",
"jasmine": "~3.4.0",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ describe('Avatar', () => {
instance.size = IgxAvatarSize.MEDIUM;
fixture.detectChanges();
expect(instance.size).toEqual(IgxAvatarSize.MEDIUM);
expect(hostEl.classList).not.toContain(classes.medium);
expect(hostEl.classList).toContain(classes.medium);

instance.size = IgxAvatarSize.LARGE;
fixture.detectChanges();
expect(instance.size).toEqual(IgxAvatarSize.LARGE);
expect(hostEl.classList).not.toContain(classes.large);
expect(hostEl.classList).toContain(classes.large);

instance.size = 'nonsense' as any;
fixture.detectChanges();
Expand Down
50 changes: 36 additions & 14 deletions projects/igniteui-angular/src/lib/avatar/avatar.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import {
AfterViewInit,
Component,
ElementRef,
HostBinding,
Expand Down Expand Up @@ -53,7 +52,7 @@ export enum IgxAvatarType {
selector: 'igx-avatar',
templateUrl: 'avatar.component.html'
})
export class IgxAvatarComponent implements OnInit, AfterViewInit {
export class IgxAvatarComponent implements OnInit {

/**
* This is a reference to the avatar image element in the DOM.
Expand Down Expand Up @@ -160,9 +159,9 @@ export class IgxAvatarComponent implements OnInit, AfterViewInit {
* Sets the color of the avatar's initials or icon.
*
* @example
*```html
*<igx-avatar color="blue"></igx-avatar>
*```
* ```html
* <igx-avatar color="blue"></igx-avatar>
* ```
*/

@HostBinding('style.color')
Expand Down Expand Up @@ -256,6 +255,22 @@ export class IgxAvatarComponent implements OnInit, AfterViewInit {
}
}

/** @hidden @internal */
@HostBinding('class.igx-avatar--small')
get _isSmallSize(): boolean {
return this.size === 'small';
}
/** @hidden @internal */
@HostBinding('class.igx-avatar--medium')
get _isMediumSize(): boolean {
return this.size === 'medium';
}
/** @hidden @internal */
@HostBinding('class.igx-avatar--large')
get _isLargeSize(): boolean {
return this.size === 'large';
}

/**
* Returns the type of the avatar.
*
Expand All @@ -280,6 +295,22 @@ export class IgxAvatarComponent implements OnInit, AfterViewInit {
return IgxAvatarType.CUSTOM;
}

/** @hidden @internal */
@HostBinding('class.igx-avatar--image')
get _isImageType(): boolean {
return this.type === IgxAvatarType.IMAGE;
}
/** @hidden @internal */
@HostBinding('class.igx-avatar--icon')
get _isIconType(): boolean {
return this.type === IgxAvatarType.ICON;
}
/** @hidden @internal */
@HostBinding('class.igx-avatar--initials')
get _isInitialsType(): boolean {
return this.type === IgxAvatarType.INITIALS;
}

/**
* Returns the template of the avatar.
*
Expand All @@ -306,15 +337,6 @@ export class IgxAvatarComponent implements OnInit, AfterViewInit {
this.roleDescription = this.getRole();
}

/** @hidden @internal */
public ngAfterViewInit() {
if (this.type !== IgxAvatarType.CUSTOM) {
this.elementRef.nativeElement.classList.add(`igx-avatar--${this.type}`);
}

this.elementRef.nativeElement.classList.add(`igx-avatar--${this._size}`);
}

/** @hidden @internal */
private getRole(): string {
switch (this.type) {
Expand Down
6 changes: 3 additions & 3 deletions projects/igniteui-angular/src/lib/badge/badge.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export enum IgxBadgeType {
})
export class IgxBadgeComponent {

/**
/**
* Sets/gets the `id` of the badge.
*
* @remarks
Expand All @@ -57,7 +57,7 @@ export class IgxBadgeComponent {
@Input()
public id = `igx-badge-${NEXT_ID++}`;

/**
/**
* Sets/gets the type of the badge.
*
* @remarks
Expand All @@ -72,7 +72,7 @@ export class IgxBadgeComponent {
@Input()
public type: string | IgxBadgeType = IgxBadgeType.PRIMARY;

/**
/**
* Sets/gets the value to be displayed inside the badge.
*
* @remarks
Expand Down
Loading

0 comments on commit 57c5955

Please sign in to comment.