-
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
74 changed files
with
11,309 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
apps/angular5-example/src/app/components/custom-stars/custom-stars.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
|
||
<div class="row"> | ||
<div class="col" [formGroup]="form"> | ||
<div class="form-group"> | ||
<label>Rating</label> | ||
<input type="number" class="form-control" placeholder="rating" | ||
step="0.5" formControlName="rating"> | ||
</div> | ||
<!-- | ||
<div class="form-group"> | ||
<label>Empty Star</label> | ||
<select class="form-control" formControlName="empty"> | ||
<option [ngValue]="">none</option> | ||
<ng-template ngFor let-opt [ngForOf]="icons"> | ||
<option [value]="opt">{{opt}}</option> | ||
</ng-template> | ||
</select> | ||
</div> | ||
<div class="form-group"> | ||
<label>Half Star</label> | ||
<select class="form-control" formControlName="half"> | ||
<option [ngValue]="">none</option> | ||
<ng-template ngFor let-opt [ngForOf]="icons"> | ||
<option [value]="opt">{{opt}}</option> | ||
</ng-template> | ||
</select> | ||
</div> | ||
<div class="form-group"> | ||
<label>Filled Star</label> | ||
<select class="form-control" formControlName="filled"> | ||
<option [ngValue]="">none</option> | ||
<ng-template ngFor let-opt [ngForOf]="icons"> | ||
<option [value]="opt">{{opt}}</option> | ||
</ng-template> | ||
</select> | ||
</div> | ||
</div> | ||
<div class="col"> | ||
<div class="form-group"> | ||
<label> </label> | ||
<star-rating-comp | ||
[hoverEnabled]="true" | ||
[showHalfStars]="true" | ||
[rating]="form.get('rating').value"> | ||
</star-rating-comp> | ||
</div> | ||
--> | ||
</div> | ||
</div> | ||
|
76 changes: 76 additions & 0 deletions
76
apps/angular5-example/src/app/components/custom-stars/custom-stars.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import {StarRatingConfigService} from '@angular-star-rating-lib/angular-star-rating'; | ||
import {Component, ViewEncapsulation} from '@angular/core'; | ||
import {FormBuilder, FormGroup} from '@angular/forms'; | ||
import {CustomIconsConfigService} from './custom-star-config.service'; | ||
|
||
@Component({ | ||
selector: 'app-custom-stars', | ||
templateUrl: './custom-stars.component.html', | ||
styles: [` | ||
.star .fas { | ||
font-size: 17px !important; | ||
} | ||
`], | ||
providers: [ | ||
{ | ||
provide: StarRatingConfigService, | ||
useClass: CustomIconsConfigService | ||
} | ||
], | ||
encapsulation: ViewEncapsulation.None | ||
}) | ||
export class CustomStarsComponent { | ||
|
||
form: FormGroup; | ||
|
||
icons: string[] = [ | ||
'fa-500px', | ||
'fa-accessible-icon', | ||
'fa-accusoft', | ||
'fa-address-book', | ||
'fa-address-card', | ||
'fa-adjust', | ||
'fa-adn', | ||
'fa-adversal', | ||
'fa-affiliatetheme', | ||
'fa-algolia', | ||
'fa-align-center', | ||
'fa-align-justify', | ||
'fa-align-left', | ||
'fa-align-right', | ||
'fa-allergies', | ||
'fa-amazon', | ||
'fa-amazon-pay', | ||
'fa-ambulance', | ||
'fa-american-sign-language-interpreting', | ||
'fa-amilia', | ||
'fa-anchor', | ||
'fa-android', | ||
'fa-angellist', | ||
'fa-angle-double-down', | ||
'fa-angle-double-left', | ||
'fa-angle-double-right', | ||
'fa-angle-double-up', | ||
'fa-angle-down' | ||
]; | ||
|
||
constructor(fb: FormBuilder, sRCS: StarRatingConfigService) { | ||
this.form = fb.group({ | ||
rating: [1.5], | ||
empty:[], | ||
half:[], | ||
filled:[] | ||
}); | ||
|
||
this.form.valueChanges | ||
.subscribe( | ||
(formValue) => { | ||
sRCS.classEmpty = formValue.half; | ||
sRCS.classHalf = formValue.half; | ||
sRCS.classFilled = formValue.half; | ||
} | ||
) | ||
} | ||
|
||
|
||
} |
10 changes: 10 additions & 0 deletions
10
apps/angular5-example/src/app/components/custom-style/custom-style.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
$color-negative-rating: #ffff00; | ||
$color-ok-rating: #00ff00; | ||
$color-positive-rating: #ff00ff; | ||
$color-default-rating: #00f; | ||
@import "~css-star-rating/scss/star-rating"; | ||
|
||
.rating.color-ok .star-container .star svg { | ||
fill: #000 !important; | ||
} | ||
|
11 changes: 11 additions & 0 deletions
11
apps/angular5-example/src/app/components/custom-style/custom-style.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import {Component, OnInit, ViewEncapsulation} from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-custom-style', | ||
template: ` | ||
Custom Style | ||
<star-rating-comp></star-rating-comp>`, | ||
styleUrls: ['./custom-style.component.scss'], | ||
//encapsulation: ViewEncapsulation.None | ||
}) | ||
export class CustomStyleComponent { } |
156 changes: 0 additions & 156 deletions
156
apps/angular5-example/src/app/components/kitchensink/kitchensink.component.ts
This file was deleted.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
apps/angular5-example/src/assets/fontawesome/fontawesome-all.min.css
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file added
BIN
+96.6 KB
apps/angular5-example/src/assets/fontawesome/webfonts/fa-brands-400.eot
Binary file not shown.
1,011 changes: 1,011 additions & 0 deletions
1,011
apps/angular5-example/src/assets/fontawesome/webfonts/fa-brands-400.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+96.4 KB
apps/angular5-example/src/assets/fontawesome/webfonts/fa-brands-400.ttf
Binary file not shown.
Binary file added
BIN
+62.4 KB
apps/angular5-example/src/assets/fontawesome/webfonts/fa-brands-400.woff
Binary file not shown.
Binary file added
BIN
+53.4 KB
apps/angular5-example/src/assets/fontawesome/webfonts/fa-brands-400.woff2
Binary file not shown.
Binary file added
BIN
+30.1 KB
apps/angular5-example/src/assets/fontawesome/webfonts/fa-regular-400.eot
Binary file not shown.
Oops, something went wrong.