diff --git a/.angular-cli.json b/.angular-cli.json
new file mode 100644
index 0000000..a63f066
--- /dev/null
+++ b/.angular-cli.json
@@ -0,0 +1,108 @@
+{
+ "$schema": "./node_modules/@nrwl/schematics/src/schema.json",
+ "project": {
+ "name": "angular-star-rating-workspace",
+ "npmScope": "angular-star-rating-workspace",
+ "latestMigration": "20180313-add-tags"
+ },
+ "e2e": {
+ "protractor": {
+ "config": "./protractor.conf.js"
+ }
+ },
+ "lint": [
+ {
+ "project": "./tsconfig.spec.json",
+ "exclude": "**/node_modules/**"
+ },
+ {
+ "project": "apps/angular5-example/src/tsconfig.app.json",
+ "exclude": "**/node_modules/**"
+ },
+ {
+ "project": "apps/angular5-example/e2e/tsconfig.e2e.json",
+ "exclude": "**/node_modules/**"
+ }
+ ],
+ "test": {
+ "karma": {
+ "config": "./karma.conf.js"
+ }
+ },
+ "apps": [
+ {
+ "name": "angular5-example",
+ "root": "apps/angular5-example/src",
+ "outDir": "dist/apps/angular5-example",
+ "assets": [
+ "assets",
+ "favicon.ico"
+ ],
+ "index": "index.html",
+ "main": "main.ts",
+ "polyfills": "polyfills.ts",
+ "test": "../../../test.js",
+ "tsconfig": "tsconfig.app.json",
+ "testTsconfig": "../../../tsconfig.spec.json",
+ "prefix": "app",
+ "styles": [
+ "styles.css"
+ ],
+ "scripts": [],
+ "environmentSource": "environments/environment.ts",
+ "environments": {
+ "dev": "environments/environment.ts",
+ "prod": "environments/environment.prod.ts"
+ },
+ "tags": []
+ },
+ {
+ "name": "angular5-example-packaged",
+ "root": "apps/angular5-example/src",
+ "outDir": "dist/apps/angular5-example-packaged",
+ "assets": [
+ "assets",
+ "favicon.ico"
+ ],
+ "index": "index.html",
+ "main": "main.ts",
+ "polyfills": "polyfills.ts",
+ "test": "../../../test.js",
+ "tsconfig": "tsconfig.packaged.json",
+ "testTsconfig": "../../../tsconfig.spec.json",
+ "prefix": "app",
+ "styles": [
+ "styles.css"
+ ],
+ "scripts": [],
+ "environmentSource": "environments/environment.ts",
+ "environments": {
+ "dev": "environments/environment.ts",
+ "prod": "environments/environment.prod.ts"
+ },
+ "tags": []
+ },
+ {
+ "name": "angular-star-rating",
+ "root": "libs/angular-star-rating/src",
+ "test": "../../../test.js",
+ "appRoot": "",
+ "tags": []
+ },
+ {
+ "name": "$workspaceRoot",
+ "root": ".",
+ "appRoot": ""
+ }
+ ],
+ "defaults": {
+ "schematics": {
+ "collection": "@nrwl/schematics"
+ },
+ "styleExt": "css",
+ "component": {}
+ },
+ "warnings": {
+ "typescriptMismatch": false
+ }
+}
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..6e87a00
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,13 @@
+# Editor configuration, see http://editorconfig.org
+root = true
+
+[*]
+charset = utf-8
+indent_style = space
+indent_size = 2
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[*.md]
+max_line_length = off
+trim_trailing_whitespace = false
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..54bfd20
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,42 @@
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+
+# compiled output
+/dist
+/tmp
+/out-tsc
+
+# dependencies
+/node_modules
+
+# IDEs and editors
+/.idea
+.project
+.classpath
+.c9/
+*.launch
+.settings/
+*.sublime-workspace
+
+# IDE - VSCode
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+
+# misc
+/.sass-cache
+/connect.lock
+/coverage
+/libpeerconnection.log
+npm-debug.log
+testem.log
+/typings
+
+# e2e
+/e2e/*.js
+/e2e/*.map
+
+# System Files
+.DS_Store
+Thumbs.db
diff --git a/.npmignore b/.npmignore
new file mode 100644
index 0000000..fdb7f4f
--- /dev/null
+++ b/.npmignore
@@ -0,0 +1,34 @@
+# Node
+node_modules/*
+npm-debug.log
+docs/*
+# DO NOT IGNORE TYPESCRIPT FILES FOR NPM
+# TypeScript
+# *.js
+# *.map
+# *.d.ts
+
+# JetBrains
+.idea
+.project
+.settings
+.idea/*
+*.iml
+
+# VS Code
+.vscode/*
+
+# Windows
+Thumbs.db
+Desktop.ini
+
+# Mac
+.DS_Store
+**/.DS_Store
+
+# Ngc generated files
+**/*.ngfactory.ts
+
+# Library files
+src/*
+build/*
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 0000000..92cde39
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,3 @@
+{
+ "singleQuote": true
+}
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..ba41e18
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,17 @@
+language: node_js
+sudo: false
+node_js:
+- '6.11.0'
+
+cache:
+ directories:
+ - ./node_modules
+
+install:
+ - npm install
+
+before_script:
+
+script:
+ - npm run build:lib
+ - npm run start:packaged
diff --git a/@packaged/angular-star-rating.tgz b/@packaged/angular-star-rating.tgz
new file mode 100644
index 0000000..1908da5
Binary files /dev/null and b/@packaged/angular-star-rating.tgz differ
diff --git a/@packaged/angular-star-rating/angular-star-rating.d.ts b/@packaged/angular-star-rating/angular-star-rating.d.ts
new file mode 100644
index 0000000..67ff29a
--- /dev/null
+++ b/@packaged/angular-star-rating/angular-star-rating.d.ts
@@ -0,0 +1,4 @@
+/**
+ * Generated bundle index. Do not edit.
+ */
+export * from './index';
diff --git a/@packaged/angular-star-rating/angular-star-rating.metadata.json b/@packaged/angular-star-rating/angular-star-rating.metadata.json
new file mode 100644
index 0000000..b862a17
--- /dev/null
+++ b/@packaged/angular-star-rating/angular-star-rating.metadata.json
@@ -0,0 +1 @@
+{"__symbolic":"module","version":4,"metadata":{"ClickEvent":{"__symbolic":"interface"},"HoverRatingChangeEvent":{"__symbolic":"interface"},"RatingChangeEvent":{"__symbolic":"interface"},"StarRatingConfig":{"__symbolic":"class","members":{}},"StarRatingUtils":{"__symbolic":"class","members":{},"statics":{"getHalfStarVisible":{"__symbolic":"function","parameters":["rating"],"value":{"__symbolic":"binop","operator":">","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Math"},"member":"abs"},"arguments":[{"__symbolic":"binop","operator":"%","left":{"__symbolic":"reference","name":"rating"},"right":1}]},"right":0}},"isDigitKeyEventCode":{"__symbolic":"function","parameters":["eventCode"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"eventCode"},"member":"indexOf"},"arguments":["Digit"]},"right":0}}}},"StarRating":{"__symbolic":"class","members":{"setRating":[{"__symbolic":"method"}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"StarRatingConfigService"}]}],"svgVisible":[{"__symbolic":"method"}],"interactionPossible":[{"__symbolic":"method"}],"setColor":[{"__symbolic":"method"}],"setHalfStarVisible":[{"__symbolic":"method"}],"getComponentClassNames":[{"__symbolic":"method"}],"increment":[{"__symbolic":"method"}],"decrement":[{"__symbolic":"method"}],"reset":[{"__symbolic":"method"}]}},"StarRatingConfigService":{"__symbolic":"class","members":{"getColor":[{"__symbolic":"method"}],"getHalfStarVisible":[{"__symbolic":"method"}]}},"StarRatingComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"StarRating"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":15,"character":1},"arguments":[{"selector":"star-rating-comp","providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR","line":10,"character":11},"useExisting":{"__symbolic":"reference","name":"StarRatingComponent"},"multi":true}],"inputs":["getHalfStarVisible","getColor","showHalfStars","hoverEnabled","rating","step","disabled","readOnly","space","starType","size","speed","numOfStars","direction","staticColor","labelPosition","labelText","id"],"outputs":["clickEmitter","ratingChangeEmitter","hoverRatingChangeEmitter"],"styles":[],"template":"
\n
{{labelText}}
\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
"}]}],"members":{"saveOnClick":[{"__symbolic":"method"}],"saveOnRatingChange":[{"__symbolic":"method"}],"saveOnHover":[{"__symbolic":"method"}],"saveOnTouch":[{"__symbolic":"method"}],"saveOnModelChange":[{"__symbolic":"method"}],"onKeyDown":[{"__symbolic":"method"}],"onBlur":[{"__symbolic":"method"}],"onFocus":[{"__symbolic":"method"}],"onStarHover":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"StarRatingConfigService"}]}],"setRating":[{"__symbolic":"method"}],"onStarClicked":[{"__symbolic":"method"}]}},"StarRatingModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":8,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":9,"character":12}],"declarations":[[{"__symbolic":"reference","name":"StarRatingComponent"}]],"exports":[[[{"__symbolic":"reference","name":"StarRatingComponent"}]]]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"StarRatingModule"},"providers":[{"__symbolic":"reference","name":"StarRatingConfigService"}]}},"forChild":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"StarRatingModule"},"providers":[]}}}}},"origins":{"ClickEvent":"./src/interfaces/click-event.interface","HoverRatingChangeEvent":"./src/interfaces/hover-rating-change-event.interface","RatingChangeEvent":"./src/interfaces/rating-change-event.interface","StarRatingConfig":"./src/interfaces/star-rating-config.interface","StarRatingUtils":"./src/services/star-rating.utils","StarRating":"./src/services/star-rating","StarRatingConfigService":"./src/services/star-rating-config.service","StarRatingComponent":"./src/components/star-rating.component","StarRatingModule":"./src/angular-star-rating.module"},"importAs":"angular-star-rating"}
\ No newline at end of file
diff --git a/@packaged/angular-star-rating/bundles/angular-star-rating.umd.js b/@packaged/angular-star-rating/bundles/angular-star-rating.umd.js
new file mode 100644
index 0000000..d953786
--- /dev/null
+++ b/@packaged/angular-star-rating/bundles/angular-star-rating.umd.js
@@ -0,0 +1,769 @@
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@angular/common')) :
+ typeof define === 'function' && define.amd ? define('angular-star-rating', ['exports', '@angular/core', '@angular/forms', '@angular/common'], factory) :
+ (factory((global['angular-star-rating'] = {}),global.ng.core,global.ng.forms,global.ng.common));
+}(this, (function (exports,core,forms,common) { 'use strict';
+
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+/* global Reflect, Promise */
+var extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+function __extends(d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+}
+
+var StarRatingConfig = /** @class */ (function () {
+ function StarRatingConfig() {
+ }
+ return StarRatingConfig;
+}());
+var StarRatingUtils = /** @class */ (function () {
+ function StarRatingUtils() {
+ }
+ StarRatingUtils.getStarsArray = function (numOfStars) {
+ var stars = [];
+ for (var i = 0; i < numOfStars; i++) {
+ stars.push(i + 1);
+ }
+ return stars;
+ };
+ StarRatingUtils.getHalfStarVisible = function (rating) {
+ return Math.abs(rating % 1) > 0;
+ };
+ StarRatingUtils.getColor = function (rating, numOfStars, staticColor) {
+ rating = rating || 0;
+ if (staticColor) {
+ return staticColor;
+ }
+ var fractionSize = numOfStars / 3;
+ var color = 'default';
+ if (rating > 0) {
+ color = 'negative';
+ }
+ if (rating > fractionSize) {
+ color = 'ok';
+ }
+ if (rating > fractionSize * 2) {
+ color = 'positive';
+ }
+ return color;
+ };
+ StarRatingUtils.isDigitKeyEventCode = function (eventCode) {
+ return eventCode.indexOf('Digit') === 0;
+ };
+ return StarRatingUtils;
+}());
+var StarRating = /** @class */ (function () {
+ function StarRating(config) {
+ this.config = config;
+ this.classEmpty = this.config.classEmpty;
+ this.classHalf = this.config.classHalf;
+ this.classFilled = this.config.classFilled;
+ this.pathEmpty = this.config.svgPathEmpty;
+ this.pathHalf = this.config.svgPathHalf;
+ this.pathFilled = this.config.svgPathFilled;
+ if ('getColor' in this.config && typeof this.config.getColor === "function") {
+ this.getColor = this.config.getColor;
+ }
+ if ('getHalfStarVisible' in this.config && typeof this.config.getHalfStarVisible === "function") {
+ this.getHalfStarVisible = this.config.getHalfStarVisible;
+ }
+ this.numOfStars = this.config.numOfStars;
+ this.rating = 0;
+ this.step = 1;
+ }
+ Object.defineProperty(StarRating.prototype, "id", {
+ get: function () {
+ return this._id;
+ },
+ set: function (value) {
+ this._id = value || '';
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "focus", {
+ get: function () {
+ return this._focus;
+ },
+ set: function (value) {
+ this._focus = !!value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "labelText", {
+ get: function () {
+ return this._labelText;
+ },
+ set: function (value) {
+ this._labelText = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "labelPosition", {
+ get: function () {
+ return this._labelPosition;
+ },
+ set: function (value) {
+ this._labelPosition = value || this.config.labelPosition;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "labelVisible", {
+ get: function () {
+ return this._labelVisible;
+ },
+ set: function (value) {
+ this._labelVisible = !!value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "hoverEnabled", {
+ get: function () {
+ return this._hoverEnabled;
+ },
+ set: function (value) {
+ this._hoverEnabled = (value !== undefined) ? !!value : false;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "staticColor", {
+ get: function () {
+ return this._staticColor;
+ },
+ set: function (value) {
+ this._staticColor = value || this.config.staticColor || undefined;
+ this.setColor();
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "direction", {
+ get: function () {
+ return this._direction;
+ },
+ set: function (value) {
+ this._direction = value || undefined;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "numOfStars", {
+ get: function () {
+ return this._numOfStars;
+ },
+ set: function (value) {
+ this._numOfStars = (value > 0) ? value : this.config.numOfStars;
+ this.stars = StarRatingUtils.getStarsArray(this.numOfStars);
+ this.setColor();
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "hoverRating", {
+ get: function () {
+ return this._hoverRating;
+ },
+ set: function (value) {
+ this._hoverRating = (value > 0) ? value : 0;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "speed", {
+ get: function () {
+ return this._speed;
+ },
+ set: function (value) {
+ this._speed = value || this.config.speed;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "size", {
+ get: function () {
+ return this._size || this.config.size;
+ },
+ set: function (value) {
+ this._size = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "starType", {
+ get: function () {
+ return this._starType || this.config.starType;
+ },
+ set: function (value) {
+ this._starType = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "space", {
+ get: function () {
+ return this._space;
+ },
+ set: function (value) {
+ this._space = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "readOnly", {
+ get: function () {
+ return this._readOnly;
+ },
+ set: function (value) {
+ this._readOnly = !!value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "disabled", {
+ get: function () {
+ return this._disabled;
+ },
+ set: function (value) {
+ this._disabled = !!value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "step", {
+ get: function () {
+ return this._step;
+ },
+ set: function (value) {
+ this._step = (value > 0 ? value : 1);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "rating", {
+ get: function () {
+ return this._rating;
+ },
+ set: function (value) {
+ this.setRating(value);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ StarRating.prototype.setRating = function (value) {
+ var newRating = 0;
+ if (value >= 0
+ && value <= this.numOfStars) {
+ newRating = value;
+ }
+ if (value > this.numOfStars) {
+ newRating = this.numOfStars;
+ }
+ this._rating = newRating;
+ this.ratingAsInteger = parseInt(this._rating.toString());
+ this.setHalfStarVisible();
+ this.setColor();
+ };
+ Object.defineProperty(StarRating.prototype, "showHalfStars", {
+ get: function () {
+ return this._showHalfStars;
+ },
+ set: function (value) {
+ this._showHalfStars = !!value;
+ this.setHalfStarVisible();
+ },
+ enumerable: true,
+ configurable: true
+ });
+ StarRating.prototype.svgVisible = function () {
+ return this.starType === "svg";
+ };
+ StarRating.prototype.interactionPossible = function () {
+ return !this.readOnly && !this.disabled;
+ };
+ StarRating.prototype.setColor = function () {
+ if (typeof this.getColor === "function") {
+ this.color = this.getColor(this.rating, this.numOfStars, this.staticColor);
+ }
+ else {
+ this.color = StarRatingUtils.getColor(this.rating, this.numOfStars, this.staticColor);
+ }
+ };
+ StarRating.prototype.setHalfStarVisible = function () {
+ if (this.showHalfStars) {
+ if (typeof this.getHalfStarVisible === "function") {
+ this.halfStarVisible = this.getHalfStarVisible(this.rating);
+ }
+ else {
+ this.halfStarVisible = StarRatingUtils.getHalfStarVisible(this.rating);
+ }
+ }
+ else {
+ this.halfStarVisible = false;
+ }
+ };
+ StarRating.prototype.getComponentClassNames = function () {
+ var classNames = [];
+ classNames.push(this.rating ? 'value-' + this.ratingAsInteger : 'value-0');
+ classNames.push(this.halfStarVisible ? 'half' : '');
+ classNames.push(this.hoverEnabled ? 'hover' : '');
+ var hoverRating = (this.hoverRating ? 'hover-' + this.hoverRating : 'hover-0');
+ classNames.push(this.hoverEnabled ? hoverRating : '');
+ classNames.push(this.space ? 'space-' + this.space : '');
+ classNames.push(this.labelPosition ? 'label-' + this.labelPosition : '');
+ classNames.push(this.color ? 'color-' + this.color : '');
+ classNames.push(this.starType ? 'star-' + this.starType : '');
+ classNames.push(this.speed);
+ classNames.push(this.size);
+ classNames.push(this.readOnly ? 'read-only' : '');
+ classNames.push(this.disabled ? 'disabled' : '');
+ classNames.push(this.direction ? 'direction-' + this.direction : '');
+ return classNames.join(' ');
+ };
+ StarRating.prototype.increment = function () {
+ var absDiff = Math.abs(this.rating % this.step);
+ this.rating = this.rating + (absDiff > 0 ? this.step - absDiff : this.step);
+ };
+ StarRating.prototype.decrement = function () {
+ var absDiff = Math.abs(this.rating % this.step);
+ this.rating = this.rating - (absDiff > 0 ? absDiff : this.step);
+ };
+ StarRating.prototype.reset = function () {
+ this.rating = 0;
+ };
+ return StarRating;
+}());
+var StarRatingConfigService = /** @class */ (function () {
+ function StarRatingConfigService() {
+ this._classEmpty = "default-star-empty-icon";
+ this._classHalf = "default-star-half-icon";
+ this._classFilled = "default-star-filled-icon";
+ this._numOfStars = 5;
+ this._size = "medium";
+ this._labelPosition = "left";
+ this._speed = "noticeable";
+ this._starType = "svg";
+ this._assetsPath = "assets/images/";
+ this._svgPath = this.assetsPath + "star-rating.icons.svg";
+ this._svgEmptySymbolId = "star-empty";
+ this._svgHalfSymbolId = "star-half";
+ this._svgFilledSymbolId = "star-filled";
+ this._svgPathEmpty = this.svgPath + "#" + this.svgEmptySymbolId;
+ this._svgPathHalf = this.svgPath + "#" + this.svgHalfSymbolId;
+ this._svgPathFilled = this.svgPath + "#" + this.svgFilledSymbolId;
+ }
+ Object.defineProperty(StarRatingConfigService.prototype, "classEmpty", {
+ get: function () {
+ return this._classEmpty;
+ },
+ set: function (classEmpty) {
+ this._classEmpty = classEmpty;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "classHalf", {
+ get: function () {
+ return this._classHalf;
+ },
+ set: function (classHalf) {
+ this._classHalf = classHalf;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "classFilled", {
+ get: function () {
+ return this._classFilled;
+ },
+ set: function (classFilled) {
+ this._classFilled = classFilled;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "numOfStars", {
+ get: function () {
+ return this._numOfStars;
+ },
+ set: function (numOfStars) {
+ this._numOfStars = numOfStars;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "size", {
+ get: function () {
+ return this._size;
+ },
+ set: function (size) {
+ this._size = size;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "staticColor", {
+ get: function () {
+ return this._staticColor;
+ },
+ set: function (value) {
+ this._staticColor = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "labelPosition", {
+ get: function () {
+ return this._labelPosition;
+ },
+ set: function (labelPosition) {
+ this._labelPosition = labelPosition;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "speed", {
+ get: function () {
+ return this._speed;
+ },
+ set: function (speed) {
+ this._speed = speed;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "starType", {
+ get: function () {
+ return this._starType;
+ },
+ set: function (starType) {
+ this._starType = starType;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "assetsPath", {
+ get: function () {
+ return this._assetsPath;
+ },
+ set: function (assetsPath) {
+ this._assetsPath = assetsPath;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "svgPath", {
+ get: function () {
+ return this._svgPath;
+ },
+ set: function (svgPath) {
+ this._svgPath = svgPath;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "svgEmptySymbolId", {
+ get: function () {
+ return this._svgEmptySymbolId;
+ },
+ set: function (svgEmptySymbolId) {
+ this._svgEmptySymbolId = svgEmptySymbolId;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "svgHalfSymbolId", {
+ get: function () {
+ return this._svgHalfSymbolId;
+ },
+ set: function (svgHalfSymbolId) {
+ this._svgHalfSymbolId = svgHalfSymbolId;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "svgFilledSymbolId", {
+ get: function () {
+ return this._svgFilledSymbolId;
+ },
+ set: function (svgFilledSymbolId) {
+ this._svgFilledSymbolId = svgFilledSymbolId;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "svgPathEmpty", {
+ get: function () {
+ return this._svgPathEmpty;
+ },
+ set: function (svgPathEmpty) {
+ this._svgPathEmpty = svgPathEmpty;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "svgPathHalf", {
+ get: function () {
+ return this._svgPathHalf;
+ },
+ set: function (svgPathHalf) {
+ this._svgPathHalf = svgPathHalf;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "svgPathFilled", {
+ get: function () {
+ return this._svgPathFilled;
+ },
+ set: function (svgPathFilled) {
+ this._svgPathFilled = svgPathFilled;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ StarRatingConfigService.prototype.getColor = function (rating, numOfStars, staticColor) {
+ rating = rating || 0;
+ if (staticColor) {
+ return staticColor;
+ }
+ var fractionSize = numOfStars / 3;
+ var color = 'default';
+ if (rating > 0) {
+ color = 'negative';
+ }
+ if (rating > fractionSize) {
+ color = 'ok';
+ }
+ if (rating > fractionSize * 2) {
+ color = 'positive';
+ }
+ return color;
+ };
+ StarRatingConfigService.prototype.getHalfStarVisible = function (rating) {
+ return Math.abs(rating % 1) > 0;
+ };
+ return StarRatingConfigService;
+}());
+var STAR_RATING_CONTROL_ACCESSOR = {
+ provide: forms.NG_VALUE_ACCESSOR,
+ useExisting: core.forwardRef(function () { return StarRatingComponent; }),
+ multi: true
+};
+var StarRatingComponent = /** @class */ (function (_super) {
+ __extends(StarRatingComponent, _super);
+ function StarRatingComponent(config) {
+ var _this = _super.call(this, config) || this;
+ _this.clickEmitter = new core.EventEmitter();
+ _this.ratingChangeEmitter = new core.EventEmitter();
+ _this.hoverRatingChangeEmitter = new core.EventEmitter();
+ _this.onModelChangeRegistered = false;
+ _this.onTouchRegistered = false;
+ return _this;
+ }
+ StarRatingComponent.prototype.saveOnClick = function ($event) {
+ if (this.clickEmitter) {
+ this.clickEmitter.emit($event);
+ }
+ };
+ StarRatingComponent.prototype.saveOnRatingChange = function ($event) {
+ if (this.ratingChangeEmitter) {
+ this.ratingChangeEmitter.emit($event);
+ }
+ };
+ StarRatingComponent.prototype.saveOnHover = function ($event) {
+ if (this.hoverRatingChangeEmitter) {
+ this.hoverRatingChangeEmitter.emit($event);
+ }
+ };
+ StarRatingComponent.prototype.saveOnTouch = function () {
+ if (this.onTouchRegistered) {
+ this.onTouch();
+ }
+ };
+ StarRatingComponent.prototype.saveOnModelChange = function (value) {
+ if (this.onModelChangeRegistered) {
+ this.onModelChange(value);
+ }
+ };
+ StarRatingComponent.prototype.onKeyDown = function (event) {
+ var _this = this;
+ if (!this.interactionPossible()) {
+ return;
+ }
+ var handlers = {
+ Minus: function () { return _this.decrement(); },
+ ArrowDown: function () { return _this.decrement(); },
+ ArrowLeft: function () { return _this.decrement(); },
+ Plus: function () { return _this.increment(); },
+ ArrowRight: function () { return _this.increment(); },
+ ArrowUp: function () { return _this.increment(); },
+ Backspace: function () { return _this.reset(); },
+ Delete: function () { return _this.reset(); },
+ Digit0: function () { return _this.reset(); }
+ };
+ var handleDigits = function (eventCode) {
+ var dStr = "Digit";
+ var digit = parseInt(eventCode.substr(dStr.length, eventCode.length - 1));
+ _this.rating = digit;
+ };
+ if (handlers[event['code']] || StarRatingUtils.isDigitKeyEventCode(event['code'])) {
+ if (StarRatingUtils.isDigitKeyEventCode(event['code'])) {
+ handleDigits(event['code']);
+ }
+ else {
+ handlers[event['code']]();
+ }
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ this.saveOnTouch();
+ };
+ StarRatingComponent.prototype.onBlur = function (event) {
+ this.focus = false;
+ event.preventDefault();
+ event.stopPropagation();
+ this.saveOnTouch();
+ };
+ StarRatingComponent.prototype.onFocus = function (event) {
+ this.focus = true;
+ event.preventDefault();
+ event.stopPropagation();
+ this.saveOnTouch();
+ };
+ StarRatingComponent.prototype.onStarHover = function (rating) {
+ if (!this.interactionPossible() || !this.hoverEnabled) {
+ return;
+ }
+ this.hoverRating = rating ? parseInt(rating.toString()) : 0;
+ var $event = { hoverRating: this.hoverRating };
+ this.saveOnHover($event);
+ };
+ StarRatingComponent.prototype.writeValue = function (obj) {
+ this.rating = obj;
+ };
+ StarRatingComponent.prototype.registerOnChange = function (fn) {
+ this.onModelChange = fn;
+ this.onModelChangeRegistered = true;
+ };
+ StarRatingComponent.prototype.registerOnTouched = function (fn) {
+ this.onTouch = fn;
+ this.onTouchRegistered = true;
+ };
+ StarRatingComponent.prototype.setRating = function (value) {
+ var initValue = this.rating;
+ _super.prototype.setRating.call(this, value);
+ if (initValue !== this.rating) {
+ var $event = { rating: this.rating };
+ this.saveOnRatingChange($event);
+ this.saveOnModelChange(this.rating);
+ }
+ };
+ StarRatingComponent.prototype.onStarClicked = function (rating) {
+ if (!this.interactionPossible()) {
+ return;
+ }
+ this.rating = rating;
+ var onClickEventObject = {
+ rating: this.rating
+ };
+ this.saveOnClick(onClickEventObject);
+ };
+ return StarRatingComponent;
+}(StarRating));
+StarRatingComponent.decorators = [
+ { type: core.Component, args: [{
+ selector: 'star-rating-comp',
+ providers: [STAR_RATING_CONTROL_ACCESSOR],
+ inputs: [
+ 'getHalfStarVisible',
+ 'getColor',
+ 'showHalfStars',
+ 'hoverEnabled',
+ 'rating',
+ 'step',
+ 'disabled',
+ 'readOnly',
+ 'space',
+ 'starType',
+ 'size',
+ 'speed',
+ 'numOfStars',
+ 'direction',
+ 'staticColor',
+ 'labelPosition',
+ 'labelText',
+ 'id'
+ ],
+ outputs: [
+ 'clickEmitter',
+ 'ratingChangeEmitter',
+ 'hoverRatingChangeEmitter'
+ ],
+ styles: [],
+ template: "\n
{{labelText}}
\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
"
+ },] },
+];
+StarRatingComponent.ctorParameters = function () { return [
+ { type: StarRatingConfigService, },
+]; };
+var DECLARATIONS = [StarRatingComponent];
+var EXPORTS = [DECLARATIONS];
+var StarRatingModule = /** @class */ (function () {
+ function StarRatingModule() {
+ }
+ StarRatingModule.forRoot = function () {
+ return {
+ ngModule: StarRatingModule,
+ providers: [
+ StarRatingConfigService
+ ]
+ };
+ };
+ StarRatingModule.forChild = function () {
+ return {
+ ngModule: StarRatingModule,
+ providers: []
+ };
+ };
+ return StarRatingModule;
+}());
+StarRatingModule.decorators = [
+ { type: core.NgModule, args: [{
+ imports: [common.CommonModule],
+ declarations: [DECLARATIONS],
+ exports: [EXPORTS]
+ },] },
+];
+StarRatingModule.ctorParameters = function () { return []; };
+
+exports.StarRatingConfig = StarRatingConfig;
+exports.StarRatingUtils = StarRatingUtils;
+exports.StarRating = StarRating;
+exports.StarRatingConfigService = StarRatingConfigService;
+exports.StarRatingComponent = StarRatingComponent;
+exports.StarRatingModule = StarRatingModule;
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+})));
+//# sourceMappingURL=angular-star-rating.umd.js.map
diff --git a/@packaged/angular-star-rating/bundles/angular-star-rating.umd.js.map b/@packaged/angular-star-rating/bundles/angular-star-rating.umd.js.map
new file mode 100644
index 0000000..33a029e
--- /dev/null
+++ b/@packaged/angular-star-rating/bundles/angular-star-rating.umd.js.map
@@ -0,0 +1,32 @@
+{
+ "version": 3,
+ "file": "angular-star-rating.umd.js",
+ "sources": [
+ "ng://angular-star-rating/out/src/angular-star-rating.module.ts",
+ "ng://angular-star-rating/out/src/components/star-rating.component.ts",
+ "ng://angular-star-rating/out/src/services/star-rating-config.service.ts",
+ "ng://angular-star-rating/out/src/services/star-rating.ts",
+ "ng://angular-star-rating/out/src/services/star-rating.utils.ts",
+ "ng://angular-star-rating/out/src/interfaces/star-rating-config.interface.ts",
+ "ng://angular-star-rating/node_modules/tslib/tslib.es6.js"
+ ],
+ "sourcesContent": [
+ "import {CommonModule} from '@angular/common';\nimport {ModuleWithProviders, NgModule} from '@angular/core';\nimport {StarRatingComponent} from './components/star-rating.component';\nimport {StarRatingConfigService} from './services/star-rating-config.service';\n\nconst DECLARATIONS = [StarRatingComponent];\nconst EXPORTS = [DECLARATIONS];\n\n@NgModule({\n imports: [CommonModule],\n declarations: [DECLARATIONS],\n exports: [EXPORTS]\n})\nexport class StarRatingModule {\n static forRoot(): ModuleWithProviders {\n return {\n ngModule: StarRatingModule,\n providers: [\n StarRatingConfigService\n ]\n }\n }\n\n static forChild(): ModuleWithProviders {\n return {\n ngModule: StarRatingModule,\n providers: []\n }\n }\n}\n",
+ "import {Component, EventEmitter, forwardRef, Input} from '@angular/core';\r\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\r\nimport {ClickEvent} from '../interfaces/click-event.interface';\r\nimport {HoverRatingChangeEvent} from '../interfaces/hover-rating-change-event.interface';\r\nimport {RatingChangeEvent} from '../interfaces/rating-change-event.interface';\r\nimport {StarRating} from '../services/star-rating';\r\nimport {StarRatingConfigService} from '../services/star-rating-config.service';\r\nimport {StarRatingUtils} from '../services/star-rating.utils';\r\n\r\nconst STAR_RATING_CONTROL_ACCESSOR = {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => StarRatingComponent),\r\n multi: true\r\n};\r\n\r\n@Component({\r\n selector: 'star-rating-comp',\r\n providers: [STAR_RATING_CONTROL_ACCESSOR],\r\n inputs: [\r\n 'getHalfStarVisible'\r\n , 'getColor'\r\n , 'showHalfStars'\r\n , 'hoverEnabled'\r\n , 'rating'\r\n , 'step'\r\n , 'disabled'\r\n , 'readOnly'\r\n , 'space'\r\n , 'starType'\r\n , 'size'\r\n , 'speed'\r\n , 'numOfStars'\r\n , 'direction'\r\n , 'staticColor'\r\n //, 'labelVisible'\r\n , 'labelPosition'\r\n , 'labelText'\r\n , 'id'\r\n ],\r\n outputs: [\r\n 'clickEmitter'\r\n , 'ratingChangeEmitter'\r\n , 'hoverRatingChangeEmitter'\r\n ],\r\n styles: [],\r\n template: `\r\n
{{labelText}}
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
`\r\n})\r\nexport class StarRatingComponent extends StarRating implements ControlValueAccessor {\r\n\r\n //Outputs\r\n ///////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n clickEmitter: EventEmitter = new EventEmitter();\r\n\r\n saveOnClick($event: ClickEvent) {\r\n if (this.clickEmitter) {\r\n this.clickEmitter.emit($event);\r\n }\r\n }\r\n\r\n ratingChangeEmitter: EventEmitter = new EventEmitter();\r\n\r\n saveOnRatingChange($event: RatingChangeEvent) {\r\n if (this.ratingChangeEmitter) {\r\n this.ratingChangeEmitter.emit($event);\r\n }\r\n }\r\n\r\n hoverRatingChangeEmitter: EventEmitter = new EventEmitter();\r\n\r\n saveOnHover($event: HoverRatingChangeEvent) {\r\n if (this.hoverRatingChangeEmitter) {\r\n this.hoverRatingChangeEmitter.emit($event);\r\n }\r\n }\r\n\r\n onTouch: Function;\r\n onModelChange: Function;\r\n private onModelChangeRegistered: boolean = false;\r\n private onTouchRegistered: boolean = false;\r\n\r\n saveOnTouch() {\r\n if (this.onTouchRegistered) {\r\n this.onTouch();\r\n }\r\n }\r\n\r\n saveOnModelChange(value: number) {\r\n if (this.onModelChangeRegistered) {\r\n this.onModelChange(value);\r\n }\r\n }\r\n\r\n /**ACCESSIBILITY **/\r\n\r\n //Keyboard events\r\n onKeyDown(event: KeyboardEvent) {\r\n\r\n if (!this.interactionPossible()) {\r\n return;\r\n }\r\n\r\n const handlers: any = {\r\n //Decrement\r\n Minus: () => this.decrement(),\r\n ArrowDown: () => this.decrement(),\r\n ArrowLeft: () => this.decrement(),\r\n\r\n //Increment\r\n Plus: () => this.increment(),\r\n ArrowRight: () => this.increment(),\r\n ArrowUp: () => this.increment(),\r\n\r\n //Reset\r\n Backspace: () => this.reset(),\r\n Delete: () => this.reset(),\r\n Digit0: () => this.reset()\r\n };\r\n\r\n const handleDigits = (eventCode: string): void => {\r\n let dStr = \"Digit\";\r\n let digit: number = parseInt(eventCode.substr(dStr.length, eventCode.length - 1));\r\n this.rating = digit;\r\n };\r\n\r\n if (handlers[event['code']] || StarRatingUtils.isDigitKeyEventCode(event['code'])) {\r\n if (StarRatingUtils.isDigitKeyEventCode(event['code'])) {\r\n handleDigits(event['code']);\r\n } else {\r\n handlers[event['code']]();\r\n }\r\n event.preventDefault();\r\n event.stopPropagation();\r\n }\r\n\r\n this.saveOnTouch();\r\n }\r\n\r\n //Focus events\r\n onBlur(event: FocusEvent) {\r\n this.focus = false;\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this.saveOnTouch();\r\n }\r\n\r\n onFocus(event: FocusEvent) {\r\n this.focus = true;\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this.saveOnTouch();\r\n }\r\n\r\n //Hover events\r\n onStarHover(rating?: number): void {\r\n\r\n if (!this.interactionPossible() || !this.hoverEnabled) {\r\n return;\r\n }\r\n\r\n this.hoverRating = rating ? parseInt(rating.toString()) : 0;\r\n\r\n //fire onHoverRatingChange event\r\n let $event: HoverRatingChangeEvent = {hoverRating: this.hoverRating};\r\n this.saveOnHover($event);\r\n\r\n\r\n }\r\n\r\n /**Form Control - ControlValueAccessor implementation**/\r\n\r\n writeValue(obj: any): void {\r\n this.rating = obj;\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onModelChange = fn;\r\n this.onModelChangeRegistered = true;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouch = fn;\r\n this.onTouchRegistered = true;\r\n }\r\n\r\n constructor(config: StarRatingConfigService) {\r\n super(config);\r\n }\r\n\r\n //Overrides\r\n setRating(value: number): void {\r\n let initValue = this.rating;\r\n super.setRating(value);\r\n\r\n //if value changed trigger valueAccessor events and outputs\r\n if (initValue !== this.rating) {\r\n let $event: RatingChangeEvent = {rating: this.rating};\r\n this.saveOnRatingChange($event);\r\n\r\n this.saveOnModelChange(this.rating);\r\n }\r\n\r\n };\r\n\r\n /**\r\n * onStarClicked\r\n *\r\n * Is fired when a star is clicked. And updated the rating value.\r\n * This function returns if the disabled or readOnly\r\n * property is set. If provided it emits the onClick event\r\n * handler with the actual rating value.\r\n *\r\n * @param rating\r\n */\r\n onStarClicked(rating: number): void {\r\n\r\n //fire onClick event\r\n if (!this.interactionPossible()) {\r\n return;\r\n }\r\n\r\n this.rating = rating;\r\n\r\n let onClickEventObject: ClickEvent = {\r\n rating: this.rating\r\n };\r\n this.saveOnClick(onClickEventObject);\r\n\r\n }\r\n\r\n}\r\n",
+ "import {\r\n StarRatingConfig,\r\n starRatingColor,\r\n starRatingSizes,\r\n starRatingSpeed,\r\n starRatingStarTypes,\r\n starRatingLabelPosition\r\n} from '../interfaces/star-rating-config.interface';\r\n\r\n/**\r\n * Configuration service for the StarRating component.\r\n * You can inject this service, typically in your root component, and customize the values of its properties in\r\n * order to provide default values for all the star ratings used in the application.\r\n */\r\nexport class StarRatingConfigService implements StarRatingConfig {\r\n\r\n _classEmpty = \"default-star-empty-icon\";\r\n\r\n get classEmpty() {\r\n return this._classEmpty;\r\n }\r\n\r\n set classEmpty(classEmpty: string) {\r\n this._classEmpty = classEmpty;\r\n }\r\n\r\n private _classHalf = \"default-star-half-icon\";\r\n\r\n get classHalf(): string {\r\n return this._classHalf;\r\n }\r\n\r\n set classHalf(classHalf: string) {\r\n this._classHalf = classHalf;\r\n }\r\n\r\n private _classFilled = \"default-star-filled-icon\";\r\n\r\n get classFilled(): string {\r\n return this._classFilled;\r\n }\r\n\r\n set classFilled(classFilled: string) {\r\n this._classFilled = classFilled;\r\n }\r\n\r\n private _numOfStars = 5;\r\n\r\n get numOfStars(): number {\r\n return this._numOfStars;\r\n }\r\n\r\n set numOfStars(numOfStars: number) {\r\n this._numOfStars = numOfStars;\r\n }\r\n\r\n private _size: starRatingSizes = \"medium\";\r\n\r\n get size(): starRatingSizes {\r\n return this._size;\r\n }\r\n\r\n set size(size: starRatingSizes) {\r\n this._size = size;\r\n }\r\n\r\n private _staticColor: starRatingColor;\r\n\r\n get staticColor(): starRatingColor {\r\n return this._staticColor;\r\n }\r\n\r\n set staticColor(value: starRatingColor) {\r\n this._staticColor = value;\r\n }\r\n\r\n private _labelPosition: starRatingLabelPosition = \"left\";\r\n\r\n get labelPosition(): starRatingLabelPosition {\r\n return this._labelPosition;\r\n }\r\n\r\n set labelPosition(labelPosition: starRatingLabelPosition) {\r\n this._labelPosition = labelPosition;\r\n }\r\n\r\n private _speed: starRatingSpeed = \"noticeable\";\r\n\r\n get speed(): starRatingSpeed {\r\n return this._speed;\r\n }\r\n\r\n set speed(speed: starRatingSpeed) {\r\n this._speed = speed;\r\n }\r\n\r\n private _starType: starRatingStarTypes = \"svg\";\r\n\r\n get starType(): starRatingStarTypes {\r\n return this._starType;\r\n }\r\n\r\n set starType(starType: starRatingStarTypes) {\r\n this._starType = starType;\r\n }\r\n\r\n private _assetsPath = \"assets/images/\";\r\n\r\n get assetsPath(): string {\r\n return this._assetsPath;\r\n }\r\n\r\n set assetsPath(assetsPath: string) {\r\n this._assetsPath = assetsPath;\r\n }\r\n\r\n private _svgPath = this.assetsPath + \"star-rating.icons.svg\";\r\n\r\n get svgPath(): string {\r\n return this._svgPath;\r\n }\r\n\r\n set svgPath(svgPath: string) {\r\n this._svgPath = svgPath;\r\n }\r\n\r\n private _svgEmptySymbolId = \"star-empty\";\r\n\r\n get svgEmptySymbolId(): string {\r\n return this._svgEmptySymbolId;\r\n }\r\n\r\n set svgEmptySymbolId(svgEmptySymbolId: string) {\r\n this._svgEmptySymbolId = svgEmptySymbolId;\r\n }\r\n\r\n private _svgHalfSymbolId = \"star-half\";\r\n\r\n get svgHalfSymbolId(): string {\r\n return this._svgHalfSymbolId;\r\n }\r\n\r\n set svgHalfSymbolId(svgHalfSymbolId: string) {\r\n this._svgHalfSymbolId = svgHalfSymbolId;\r\n }\r\n\r\n private _svgFilledSymbolId = \"star-filled\";\r\n\r\n get svgFilledSymbolId(): string {\r\n return this._svgFilledSymbolId;\r\n }\r\n\r\n set svgFilledSymbolId(svgFilledSymbolId: string) {\r\n this._svgFilledSymbolId = svgFilledSymbolId;\r\n }\r\n\r\n private _svgPathEmpty: string = this.svgPath + \"#\" + this.svgEmptySymbolId;\r\n\r\n get svgPathEmpty(): string {\r\n return this._svgPathEmpty;\r\n }\r\n\r\n set svgPathEmpty(svgPathEmpty: string) {\r\n this._svgPathEmpty = svgPathEmpty;\r\n }\r\n\r\n private _svgPathHalf: string = this.svgPath + \"#\" + this.svgHalfSymbolId;\r\n\r\n get svgPathHalf(): string {\r\n return this._svgPathHalf;\r\n }\r\n\r\n set svgPathHalf(svgPathHalf: string) {\r\n this._svgPathHalf = svgPathHalf;\r\n }\r\n\r\n private _svgPathFilled: string = this.svgPath + \"#\" + this.svgFilledSymbolId;\r\n\r\n get svgPathFilled(): string {\r\n return this._svgPathFilled;\r\n }\r\n\r\n set svgPathFilled(svgPathFilled: string) {\r\n this._svgPathFilled = svgPathFilled;\r\n }\r\n\r\n getColor(rating: number, numOfStars: number, staticColor?: starRatingColor): starRatingColor {\r\n rating = rating || 0;\r\n\r\n // if a fix color is set use this one\r\n if (staticColor) {\r\n return staticColor;\r\n }\r\n\r\n // calculate size of smallest fraction\r\n const fractionSize = numOfStars / 3;\r\n\r\n // apply color by fraction\r\n let color: starRatingColor = 'default';\r\n if (rating > 0) {\r\n color = 'negative';\r\n }\r\n if (rating > fractionSize) {\r\n color = 'ok';\r\n }\r\n if (rating > fractionSize * 2) {\r\n color = 'positive';\r\n }\r\n\r\n return color;\r\n }\r\n\r\n getHalfStarVisible(rating: number): boolean {\r\n return Math.abs(rating % 1) > 0;\r\n }\r\n\r\n}\r\n",
+ "import {\r\n StarRatingConfig,\r\n starRatingColor,\r\n starRatingDirection,\r\n starRatingLabelPosition,\r\n starRatingSizes,\r\n starRatingSpeed,\r\n starRatingStarSpace,\r\n starRatingStarTypes\r\n} from '../interfaces/star-rating-config.interface';\r\nimport {StarRatingConfigService} from './star-rating-config.service';\r\nimport {StarRatingUtils} from './star-rating.utils';\r\n\r\nexport class StarRating {\r\n\r\n protected config: StarRatingConfig;\r\n\r\n //Inputs\r\n ///////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n /**\r\n * id property to identify the DOM element\r\n */\r\n protected _id: string;\r\n get id(): string {\r\n return this._id;\r\n }\r\n\r\n set id(value: string) {\r\n this._id = value || '';\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * focus\r\n */\r\n protected _focus: boolean;\r\n get focus(): boolean {\r\n return this._focus;\r\n }\r\n\r\n set focus(value: boolean) {\r\n this._focus = !!value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * labelText\r\n */\r\n protected _labelText: string;\r\n get labelText(): string {\r\n return this._labelText;\r\n }\r\n\r\n set labelText(value: string) {\r\n this._labelText = value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * labelPosition\r\n */\r\n protected _labelPosition: starRatingLabelPosition;\r\n get labelPosition(): starRatingLabelPosition {\r\n return this._labelPosition;\r\n }\r\n\r\n set labelPosition(value: starRatingLabelPosition) {\r\n this._labelPosition = value || this.config.labelPosition;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * labelVisible\r\n */\r\n protected _labelVisible: boolean;\r\n get labelVisible(): boolean {\r\n return this._labelVisible;\r\n }\r\n\r\n set labelVisible(value: boolean) {\r\n this._labelVisible = !!value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * hoverEnabled\r\n */\r\n protected _hoverEnabled: boolean;\r\n get hoverEnabled(): boolean {\r\n return this._hoverEnabled;\r\n }\r\n\r\n set hoverEnabled(value: boolean) {\r\n this._hoverEnabled = (value !== undefined) ? !!value : false;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * staticColor\r\n */\r\n protected _staticColor: starRatingColor;\r\n get staticColor(): starRatingColor {\r\n return this._staticColor;\r\n }\r\n\r\n set staticColor(value: starRatingColor) {\r\n this._staticColor = value || this.config.staticColor || undefined;\r\n\r\n //update color.\r\n this.setColor();\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * direction\r\n */\r\n protected _direction: starRatingDirection;\r\n get direction(): starRatingDirection {\r\n return this._direction;\r\n }\r\n\r\n set direction(value: starRatingDirection) {\r\n this._direction = value || undefined;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n\r\n /**\r\n * numOfStars\r\n */\r\n protected _numOfStars: number;\r\n get numOfStars(): number {\r\n return this._numOfStars;\r\n }\r\n\r\n set numOfStars(value: number) {\r\n this._numOfStars = (value > 0) ? value : this.config.numOfStars;\r\n\r\n //update stars array\r\n this.stars = StarRatingUtils.getStarsArray(this.numOfStars);\r\n\r\n //update color\r\n this.setColor();\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * hoverRating\r\n */\r\n protected _hoverRating: number;\r\n get hoverRating(): number {\r\n return this._hoverRating;\r\n }\r\n\r\n set hoverRating(value: number) {\r\n this._hoverRating = (value > 0) ? value : 0;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * speed\r\n */\r\n protected _speed: starRatingSpeed;\r\n get speed(): starRatingSpeed {\r\n return this._speed;\r\n }\r\n\r\n set speed(value: starRatingSpeed) {\r\n this._speed = value || this.config.speed;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * size\r\n */\r\n protected _size: starRatingSizes;\r\n get size(): starRatingSizes {\r\n return this._size || this.config.size;\r\n }\r\n\r\n set size(value: starRatingSizes) {\r\n this._size = value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * starType\r\n */\r\n protected _starType: starRatingStarTypes;\r\n get starType(): starRatingStarTypes {\r\n return this._starType || this.config.starType;\r\n }\r\n\r\n set starType(value: starRatingStarTypes) {\r\n this._starType = value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * space\r\n */\r\n protected _space: starRatingStarSpace;\r\n get space(): starRatingStarSpace {\r\n return this._space;\r\n }\r\n\r\n set space(value: starRatingStarSpace) {\r\n this._space = value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * readOnly\r\n */\r\n protected _readOnly: boolean;\r\n get readOnly(): boolean {\r\n return this._readOnly;\r\n }\r\n\r\n set readOnly(value: boolean) {\r\n this._readOnly = !!value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * disabled\r\n */\r\n protected _disabled: boolean;\r\n get disabled(): boolean {\r\n return this._disabled;\r\n }\r\n\r\n set disabled(value: boolean) {\r\n this._disabled = !!value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n private _step: number;\r\n get step(): number {\r\n return this._step;\r\n }\r\n\r\n set step(value: number) {\r\n this._step = (value > 0 ? value : 1);\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * rating\r\n */\r\n protected _rating: number;\r\n get rating(): number {\r\n return this._rating;\r\n }\r\n\r\n /**\r\n * setRating\r\n * I use a setter function instead of a set method to enable overrides for this function.\r\n * @param value\r\n */\r\n setRating(value: number) {\r\n //validate and apply newRating\r\n let newRating: number = 0;\r\n if (value >= 0\r\n && value <= this.numOfStars) {\r\n newRating = value;\r\n }\r\n\r\n //limit max value to max number of stars\r\n if (value > this.numOfStars) {\r\n newRating = this.numOfStars;\r\n }\r\n this._rating = newRating;\r\n\r\n //update ratingAsInteger. rating parsed to int for the value-[n] modifier\r\n this.ratingAsInteger = parseInt(this._rating.toString());\r\n\r\n //update halfStarsVisible\r\n this.setHalfStarVisible();\r\n\r\n //update calculated Color\r\n this.setColor();\r\n\r\n }\r\n\r\n set rating(value: number) {\r\n this.setRating(value);\r\n }\r\n\r\n /**\r\n * showHalfStars\r\n */\r\n protected _showHalfStars: boolean;\r\n get showHalfStars(): boolean {\r\n return this._showHalfStars;\r\n }\r\n\r\n set showHalfStars(value: boolean) {\r\n this._showHalfStars = !!value;\r\n\r\n //update halfStarVisible\r\n this.setHalfStarVisible();\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * getColor\r\n */\r\n getColor: (rating: number, numOfStars: number, staticColor?: starRatingColor) => starRatingColor;\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * getHalfStarVisible\r\n */\r\n getHalfStarVisible: (rating: number) => boolean;\r\n /////////////////////////////////////////////\r\n\r\n //CTRL ONLY\r\n ///////////////////////////////////////////////////////////////////////////////////////////\r\n classEmpty: string;\r\n classHalf: string;\r\n classFilled: string;\r\n\r\n pathEmpty: string;\r\n pathHalf: string;\r\n pathFilled: string;\r\n\r\n color: starRatingColor;\r\n stars: Array;\r\n ratingAsInteger: number;\r\n halfStarVisible: boolean;\r\n\r\n constructor(config: StarRatingConfigService) {\r\n\r\n this.config = config;\r\n\r\n //set default ctrl props\r\n this.classEmpty = this.config.classEmpty;\r\n this.classHalf = this.config.classHalf;\r\n this.classFilled = this.config.classFilled;\r\n this.pathEmpty = this.config.svgPathEmpty;\r\n this.pathHalf = this.config.svgPathHalf;\r\n this.pathFilled = this.config.svgPathFilled;\r\n\r\n //set default Component Inputs\r\n if ('getColor' in this.config && typeof this.config.getColor === \"function\") {\r\n this.getColor = this.config.getColor;\r\n }\r\n\r\n if ('getHalfStarVisible' in this.config && typeof this.config.getHalfStarVisible === \"function\") {\r\n this.getHalfStarVisible = this.config.getHalfStarVisible;\r\n }\r\n\r\n this.numOfStars = this.config.numOfStars;\r\n this.rating = 0;\r\n this.step = 1;\r\n\r\n }\r\n\r\n svgVisible(): boolean {\r\n return this.starType === \"svg\";\r\n }\r\n\r\n interactionPossible(): boolean {\r\n return !this.readOnly && !this.disabled;\r\n }\r\n\r\n setColor(): void {\r\n //check if custom function is given\r\n if (typeof this.getColor === \"function\") {\r\n this.color = this.getColor(this.rating, this.numOfStars, this.staticColor);\r\n }\r\n else {\r\n this.color = StarRatingUtils.getColor(this.rating, this.numOfStars, this.staticColor);\r\n }\r\n }\r\n\r\n setHalfStarVisible(): void {\r\n //update halfStarVisible\r\n if (this.showHalfStars) {\r\n //check if custom function is given\r\n if (typeof this.getHalfStarVisible === \"function\") {\r\n this.halfStarVisible = this.getHalfStarVisible(this.rating);\r\n } else {\r\n this.halfStarVisible = StarRatingUtils.getHalfStarVisible(this.rating);\r\n }\r\n\r\n }\r\n else {\r\n this.halfStarVisible = false;\r\n }\r\n }\r\n\r\n getComponentClassNames(): string {\r\n let classNames: string[] = [];\r\n\r\n classNames.push(this.rating ? 'value-' + this.ratingAsInteger : 'value-0');\r\n classNames.push(this.halfStarVisible ? 'half' : '');\r\n classNames.push(this.hoverEnabled ? 'hover' : '');\r\n\r\n let hoverRating = (this.hoverRating ? 'hover-' + this.hoverRating : 'hover-0');\r\n classNames.push(this.hoverEnabled ? hoverRating : '');\r\n\r\n classNames.push(this.space ? 'space-' + this.space : '');\r\n classNames.push(this.labelPosition ? 'label-' + this.labelPosition : '');\r\n classNames.push(this.color ? 'color-' + this.color : '');\r\n classNames.push(this.starType ? 'star-' + this.starType : '');\r\n classNames.push(this.speed);\r\n classNames.push(this.size);\r\n classNames.push(this.readOnly ? 'read-only' : '');\r\n classNames.push(this.disabled ? 'disabled' : '');\r\n classNames.push(this.direction ? 'direction-' + this.direction : '');\r\n\r\n return classNames.join(' ');\r\n }\r\n\r\n increment() {\r\n //increment to next higher step\r\n let absDiff = Math.abs(this.rating % this.step);\r\n this.rating = this.rating + (absDiff > 0 ? this.step - absDiff : this.step);\r\n }\r\n\r\n decrement() {\r\n //decrement to next lower step\r\n let absDiff = Math.abs(this.rating % this.step);\r\n this.rating = this.rating - (absDiff > 0 ? absDiff : this.step);\r\n }\r\n\r\n reset() {\r\n this.rating = 0;\r\n }\r\n\r\n}\r\n",
+ "import {starRatingColor} from '../interfaces/star-rating-config.interface';\r\nexport class StarRatingUtils {\r\n //Static methods\r\n ///////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n /*\r\n * getStarsArray\r\n *\r\n * returns an array of increasing numbers starting at 1\r\n *\r\n * @param numOfStars\r\n * @returns {Array}\r\n */\r\n static getStarsArray(numOfStars: number): Array {\r\n let stars: Array = [];\r\n for (let i = 0; i < numOfStars; i++) {\r\n stars.push(i + 1);\r\n }\r\n return stars;\r\n }\r\n\r\n /*\r\n * getHalfStarVisible\r\n *\r\n * Returns true if there should be a half star visible, and false if not.\r\n *\r\n * @param rating\r\n * @returns {boolean}\r\n */\r\n static getHalfStarVisible(rating: number): boolean {\r\n return Math.abs(rating % 1) > 0;\r\n }\r\n\r\n /*\r\n * getColor\r\n *\r\n * The default function for color calculation\r\n * based on the current rating and the the number of stars possible.\r\n * If a staticColor is set the function will use it as return value.\r\n *\r\n * @param rating\r\n * @param numOfStars\r\n * @param staticColor\r\n * @returns {starRatingColor}\r\n */\r\n static getColor(rating: number, numOfStars: number, staticColor?: starRatingColor): starRatingColor {\r\n rating = rating || 0;\r\n\r\n //if a fix color is set use this one\r\n if (staticColor) {\r\n return staticColor;\r\n }\r\n\r\n //calculate size of smallest fraction\r\n let fractionSize = numOfStars / 3;\r\n\r\n //apply color by fraction\r\n let color: starRatingColor = 'default';\r\n if (rating > 0) {\r\n color = 'negative';\r\n }\r\n if (rating > fractionSize) {\r\n color = 'ok';\r\n }\r\n if (rating > fractionSize * 2) {\r\n color = 'positive';\r\n }\r\n\r\n return color;\r\n }\r\n\r\n /*\r\n * isDigitKeyEventCode\r\n * detects digit key event sodes\r\n * @param eventCode\r\n * @returns {boolean}\r\n */\r\n static isDigitKeyEventCode(eventCode: string): boolean {\r\n return eventCode.indexOf('Digit') === 0;\r\n };\r\n\r\n}\r\n",
+ "export type starRatingSizes = 'small' | 'medium' | 'large';\r\nexport type starRatingColor = 'default' | 'negative' | 'ok' | 'positive';\r\nexport type starRatingSpeed = 'immediately' | 'noticeable' | 'slow';\r\nexport type starRatingLabelPosition = 'left' | 'right' | 'top' | 'bottom';\r\nexport type starRatingStarTypes = 'svg' | 'icon' | 'image';\r\nexport type starRatingStarSpace= 'no' | 'between' | 'around';\r\nexport type starRatingDirection= 'rtl' | 'ltr';\r\n\r\nexport class StarRatingConfig {\r\n // binding defaults\r\n numOfStars?: number;\r\n size?: starRatingSizes;\r\n speed?: starRatingSpeed;\r\n labelPosition?: starRatingLabelPosition;\r\n starType?: starRatingStarTypes;\r\n staticColor: starRatingColor;\r\n getColor?: (rating: number, numOfStars: number, staticColor?: starRatingColor)=> starRatingColor;\r\n getHalfStarVisible?:(rating: number) => boolean\r\n // statics\r\n classEmpty?: string;\r\n classHalf?: string;\r\n classFilled?: string;\r\n assetsPath?: string;\r\n svgPath?: string;\r\n svgEmptySymbolId?: string;\r\n svgHalfSymbolId?: string;\r\n svgFilledSymbolId?: string;\r\n svgPathEmpty?: string;\r\n svgPathHalf?: string;\r\n svgPathFilled?: string;\r\n}\r\n",
+ "/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [0, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { if (o[n]) i[n] = function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; }; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator];\r\n return m ? m.call(o) : typeof __values === \"function\" ? __values(o) : o[Symbol.iterator]();\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule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AA,EAAA,CAAW;gBACT,QAAQ,EAAE,kBAAkB;gBAC5B,SAAS,EAAE,CAAC,4BAA4B,CAAC;gBACzC,MAAM,EAAE;oBACN,oBAAoB;oBAClB,UAAU;oBACV,eAAe;oBACf,cAAc;oBACd,QAAQ;oBACR,MAAM;oBACN,UAAU;oBACV,UAAU;oBACV,OAAO;oBACP,UAAU;oBACV,MAAM;oBACN,OAAO;oBACP,YAAY;oBACZ,WAAW;oBACX,aAAa;oBAEb,eAAe;oBACf,WAAW;oBACX,IAAI;iBACP;gBACD,OAAO,EAAE;oBACP,cAAc;oBACZ,qBAAqB;oBACrB,0BAA0B;iBAC7B;gBACD,MAAM,EAAE,EAAE;gBACV,QAAQ,EAAE,43CA2BL;aACN,EAAD,EAAA;;;IAnEA,EAAA,IAAA,EAAQ,uBAAuB,GAA/B;;ADNA,IAKM,YAAY,GAAG,CAAC,mBAAmB,CAAC,CAAC;AAC3C,IAAM,OAAO,GAAG,CAAC,YAAY,CAAC,CAAC;AAO/B,IAAA,gBAAA,kBAAA,YAAA;IAAA,SAAA,gBAAA,GAAA;;IACS,gBAAT,CAAA,OAAgB,GAAd,YAAF;QACI,OAAO;YACL,QAAQ,EAAE,gBAAgB;YAC1B,SAAS,EAAE;gBACT,uBAAuB;aACxB;SACF,CAAA;KACF,CAAH;IAEU,gBAAV,CAAA,QAAkB,GAAhB,YAAF;QACI,OAAO;YACL,QAAQ,EAAE,gBAAgB;YAC1B,SAAS,EAAE,EAAE;SACd,CAAA;KACF,CAAH;;;;IApBA,EAAA,IAAA,EAACD,aAAQ,EAAT,IAAA,EAAA,CAAU;gBACR,OAAO,EAAE,CAACD,mBAAY,CAAC;gBACvB,YAAY,EAAE,CAAC,YAAY,CAAC;gBAC5B,OAAO,EAAE,CAAC,OAAO,CAAC;aACnB,EAAD,EAAA;;;;;;;;;;;;;;;;;;;"
+}
diff --git a/@packaged/angular-star-rating/bundles/angular-star-rating.umd.min.js b/@packaged/angular-star-rating/bundles/angular-star-rating.umd.min.js
new file mode 100644
index 0000000..6bf051f
--- /dev/null
+++ b/@packaged/angular-star-rating/bundles/angular-star-rating.umd.min.js
@@ -0,0 +1,2 @@
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/forms"),require("@angular/common")):"function"==typeof define&&define.amd?define("angular-star-rating",["exports","@angular/core","@angular/forms","@angular/common"],e):e(t["angular-star-rating"]={},t.ng.core,t.ng.forms,t.ng.common)}(this,function(t,i,e,n){"use strict";var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};var s=function(){},o=function(){function t(){}return t.getStarsArray=function(t){for(var e=[],i=0;ithis.numOfStars&&(e=this.numOfStars),this._rating=e,this.ratingAsInteger=parseInt(this._rating.toString()),this.setHalfStarVisible(),this.setColor()},Object.defineProperty(t.prototype,"showHalfStars",{get:function(){return this._showHalfStars},set:function(t){this._showHalfStars=!!t,this.setHalfStarVisible()},enumerable:!0,configurable:!0}),t.prototype.svgVisible=function(){return"svg"===this.starType},t.prototype.interactionPossible=function(){return!this.readOnly&&!this.disabled},t.prototype.setColor=function(){"function"==typeof this.getColor?this.color=this.getColor(this.rating,this.numOfStars,this.staticColor):this.color=o.getColor(this.rating,this.numOfStars,this.staticColor)},t.prototype.setHalfStarVisible=function(){this.showHalfStars?"function"==typeof this.getHalfStarVisible?this.halfStarVisible=this.getHalfStarVisible(this.rating):this.halfStarVisible=o.getHalfStarVisible(this.rating):this.halfStarVisible=!1},t.prototype.getComponentClassNames=function(){var t=[];t.push(this.rating?"value-"+this.ratingAsInteger:"value-0"),t.push(this.halfStarVisible?"half":""),t.push(this.hoverEnabled?"hover":"");var e=this.hoverRating?"hover-"+this.hoverRating:"hover-0";return t.push(this.hoverEnabled?e:""),t.push(this.space?"space-"+this.space:""),t.push(this.labelPosition?"label-"+this.labelPosition:""),t.push(this.color?"color-"+this.color:""),t.push(this.starType?"star-"+this.starType:""),t.push(this.speed),t.push(this.size),t.push(this.readOnly?"read-only":""),t.push(this.disabled?"disabled":""),t.push(this.direction?"direction-"+this.direction:""),t.join(" ")},t.prototype.increment=function(){var t=Math.abs(this.rating%this.step);this.rating=this.rating+(0\n {{labelText}}
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n'}]}],c.ctorParameters=function(){return[{type:l}]};var f=[c],h=[f],g=function(){function t(){}return t.forRoot=function(){return{ngModule:t,providers:[l]}},t.forChild=function(){return{ngModule:t,providers:[]}},t}();g.decorators=[{type:i.NgModule,args:[{imports:[n.CommonModule],declarations:[f],exports:[h]}]}],g.ctorParameters=function(){return[]},t.StarRatingConfig=s,t.StarRatingUtils=o,t.StarRating=a,t.StarRatingConfigService=l,t.StarRatingComponent=c,t.StarRatingModule=g,Object.defineProperty(t,"__esModule",{value:!0})});
+//# sourceMappingURL=angular-star-rating.umd.min.js.map
diff --git a/@packaged/angular-star-rating/bundles/angular-star-rating.umd.min.js.map b/@packaged/angular-star-rating/bundles/angular-star-rating.umd.min.js.map
new file mode 100644
index 0000000..ffd65c1
--- /dev/null
+++ b/@packaged/angular-star-rating/bundles/angular-star-rating.umd.min.js.map
@@ -0,0 +1,213 @@
+{
+ "version": 3,
+ "file": "angular-star-rating.umd.min.js",
+ "sources": [
+ "ng://angular-star-rating/node_modules/tslib/tslib.es6.js",
+ "ng://angular-star-rating/out/src/interfaces/star-rating-config.interface.ts",
+ "ng://angular-star-rating/out/src/services/star-rating.utils.ts",
+ "ng://angular-star-rating/out/src/services/star-rating.ts",
+ "ng://angular-star-rating/out/src/services/star-rating-config.service.ts",
+ "ng://angular-star-rating/out/src/components/star-rating.component.ts",
+ "ng://angular-star-rating/out/src/angular-star-rating.module.ts"
+ ],
+ "sourcesContent": [
+ "/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [0, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { if (o[n]) i[n] = function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; }; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator];\r\n return m ? m.call(o) : typeof __values === \"function\" ? __values(o) : o[Symbol.iterator]();\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n",
+ "export type starRatingSizes = 'small' | 'medium' | 'large';\r\nexport type starRatingColor = 'default' | 'negative' | 'ok' | 'positive';\r\nexport type starRatingSpeed = 'immediately' | 'noticeable' | 'slow';\r\nexport type starRatingLabelPosition = 'left' | 'right' | 'top' | 'bottom';\r\nexport type starRatingStarTypes = 'svg' | 'icon' | 'image';\r\nexport type starRatingStarSpace= 'no' | 'between' | 'around';\r\nexport type starRatingDirection= 'rtl' | 'ltr';\r\n\r\nexport class StarRatingConfig {\r\n // binding defaults\r\n numOfStars?: number;\r\n size?: starRatingSizes;\r\n speed?: starRatingSpeed;\r\n labelPosition?: starRatingLabelPosition;\r\n starType?: starRatingStarTypes;\r\n staticColor: starRatingColor;\r\n getColor?: (rating: number, numOfStars: number, staticColor?: starRatingColor)=> starRatingColor;\r\n getHalfStarVisible?:(rating: number) => boolean\r\n // statics\r\n classEmpty?: string;\r\n classHalf?: string;\r\n classFilled?: string;\r\n assetsPath?: string;\r\n svgPath?: string;\r\n svgEmptySymbolId?: string;\r\n svgHalfSymbolId?: string;\r\n svgFilledSymbolId?: string;\r\n svgPathEmpty?: string;\r\n svgPathHalf?: string;\r\n svgPathFilled?: string;\r\n}\r\n",
+ "import {starRatingColor} from '../interfaces/star-rating-config.interface';\r\nexport class StarRatingUtils {\r\n //Static methods\r\n ///////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n /*\r\n * getStarsArray\r\n *\r\n * returns an array of increasing numbers starting at 1\r\n *\r\n * @param numOfStars\r\n * @returns {Array}\r\n */\r\n static getStarsArray(numOfStars: number): Array {\r\n let stars: Array = [];\r\n for (let i = 0; i < numOfStars; i++) {\r\n stars.push(i + 1);\r\n }\r\n return stars;\r\n }\r\n\r\n /*\r\n * getHalfStarVisible\r\n *\r\n * Returns true if there should be a half star visible, and false if not.\r\n *\r\n * @param rating\r\n * @returns {boolean}\r\n */\r\n static getHalfStarVisible(rating: number): boolean {\r\n return Math.abs(rating % 1) > 0;\r\n }\r\n\r\n /*\r\n * getColor\r\n *\r\n * The default function for color calculation\r\n * based on the current rating and the the number of stars possible.\r\n * If a staticColor is set the function will use it as return value.\r\n *\r\n * @param rating\r\n * @param numOfStars\r\n * @param staticColor\r\n * @returns {starRatingColor}\r\n */\r\n static getColor(rating: number, numOfStars: number, staticColor?: starRatingColor): starRatingColor {\r\n rating = rating || 0;\r\n\r\n //if a fix color is set use this one\r\n if (staticColor) {\r\n return staticColor;\r\n }\r\n\r\n //calculate size of smallest fraction\r\n let fractionSize = numOfStars / 3;\r\n\r\n //apply color by fraction\r\n let color: starRatingColor = 'default';\r\n if (rating > 0) {\r\n color = 'negative';\r\n }\r\n if (rating > fractionSize) {\r\n color = 'ok';\r\n }\r\n if (rating > fractionSize * 2) {\r\n color = 'positive';\r\n }\r\n\r\n return color;\r\n }\r\n\r\n /*\r\n * isDigitKeyEventCode\r\n * detects digit key event sodes\r\n * @param eventCode\r\n * @returns {boolean}\r\n */\r\n static isDigitKeyEventCode(eventCode: string): boolean {\r\n return eventCode.indexOf('Digit') === 0;\r\n };\r\n\r\n}\r\n",
+ "import {\r\n StarRatingConfig,\r\n starRatingColor,\r\n starRatingDirection,\r\n starRatingLabelPosition,\r\n starRatingSizes,\r\n starRatingSpeed,\r\n starRatingStarSpace,\r\n starRatingStarTypes\r\n} from '../interfaces/star-rating-config.interface';\r\nimport {StarRatingConfigService} from './star-rating-config.service';\r\nimport {StarRatingUtils} from './star-rating.utils';\r\n\r\nexport class StarRating {\r\n\r\n protected config: StarRatingConfig;\r\n\r\n //Inputs\r\n ///////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n /**\r\n * id property to identify the DOM element\r\n */\r\n protected _id: string;\r\n get id(): string {\r\n return this._id;\r\n }\r\n\r\n set id(value: string) {\r\n this._id = value || '';\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * focus\r\n */\r\n protected _focus: boolean;\r\n get focus(): boolean {\r\n return this._focus;\r\n }\r\n\r\n set focus(value: boolean) {\r\n this._focus = !!value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * labelText\r\n */\r\n protected _labelText: string;\r\n get labelText(): string {\r\n return this._labelText;\r\n }\r\n\r\n set labelText(value: string) {\r\n this._labelText = value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * labelPosition\r\n */\r\n protected _labelPosition: starRatingLabelPosition;\r\n get labelPosition(): starRatingLabelPosition {\r\n return this._labelPosition;\r\n }\r\n\r\n set labelPosition(value: starRatingLabelPosition) {\r\n this._labelPosition = value || this.config.labelPosition;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * labelVisible\r\n */\r\n protected _labelVisible: boolean;\r\n get labelVisible(): boolean {\r\n return this._labelVisible;\r\n }\r\n\r\n set labelVisible(value: boolean) {\r\n this._labelVisible = !!value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * hoverEnabled\r\n */\r\n protected _hoverEnabled: boolean;\r\n get hoverEnabled(): boolean {\r\n return this._hoverEnabled;\r\n }\r\n\r\n set hoverEnabled(value: boolean) {\r\n this._hoverEnabled = (value !== undefined) ? !!value : false;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * staticColor\r\n */\r\n protected _staticColor: starRatingColor;\r\n get staticColor(): starRatingColor {\r\n return this._staticColor;\r\n }\r\n\r\n set staticColor(value: starRatingColor) {\r\n this._staticColor = value || this.config.staticColor || undefined;\r\n\r\n //update color.\r\n this.setColor();\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * direction\r\n */\r\n protected _direction: starRatingDirection;\r\n get direction(): starRatingDirection {\r\n return this._direction;\r\n }\r\n\r\n set direction(value: starRatingDirection) {\r\n this._direction = value || undefined;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n\r\n /**\r\n * numOfStars\r\n */\r\n protected _numOfStars: number;\r\n get numOfStars(): number {\r\n return this._numOfStars;\r\n }\r\n\r\n set numOfStars(value: number) {\r\n this._numOfStars = (value > 0) ? value : this.config.numOfStars;\r\n\r\n //update stars array\r\n this.stars = StarRatingUtils.getStarsArray(this.numOfStars);\r\n\r\n //update color\r\n this.setColor();\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * hoverRating\r\n */\r\n protected _hoverRating: number;\r\n get hoverRating(): number {\r\n return this._hoverRating;\r\n }\r\n\r\n set hoverRating(value: number) {\r\n this._hoverRating = (value > 0) ? value : 0;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * speed\r\n */\r\n protected _speed: starRatingSpeed;\r\n get speed(): starRatingSpeed {\r\n return this._speed;\r\n }\r\n\r\n set speed(value: starRatingSpeed) {\r\n this._speed = value || this.config.speed;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * size\r\n */\r\n protected _size: starRatingSizes;\r\n get size(): starRatingSizes {\r\n return this._size || this.config.size;\r\n }\r\n\r\n set size(value: starRatingSizes) {\r\n this._size = value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * starType\r\n */\r\n protected _starType: starRatingStarTypes;\r\n get starType(): starRatingStarTypes {\r\n return this._starType || this.config.starType;\r\n }\r\n\r\n set starType(value: starRatingStarTypes) {\r\n this._starType = value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * space\r\n */\r\n protected _space: starRatingStarSpace;\r\n get space(): starRatingStarSpace {\r\n return this._space;\r\n }\r\n\r\n set space(value: starRatingStarSpace) {\r\n this._space = value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * readOnly\r\n */\r\n protected _readOnly: boolean;\r\n get readOnly(): boolean {\r\n return this._readOnly;\r\n }\r\n\r\n set readOnly(value: boolean) {\r\n this._readOnly = !!value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * disabled\r\n */\r\n protected _disabled: boolean;\r\n get disabled(): boolean {\r\n return this._disabled;\r\n }\r\n\r\n set disabled(value: boolean) {\r\n this._disabled = !!value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n private _step: number;\r\n get step(): number {\r\n return this._step;\r\n }\r\n\r\n set step(value: number) {\r\n this._step = (value > 0 ? value : 1);\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * rating\r\n */\r\n protected _rating: number;\r\n get rating(): number {\r\n return this._rating;\r\n }\r\n\r\n /**\r\n * setRating\r\n * I use a setter function instead of a set method to enable overrides for this function.\r\n * @param value\r\n */\r\n setRating(value: number) {\r\n //validate and apply newRating\r\n let newRating: number = 0;\r\n if (value >= 0\r\n && value <= this.numOfStars) {\r\n newRating = value;\r\n }\r\n\r\n //limit max value to max number of stars\r\n if (value > this.numOfStars) {\r\n newRating = this.numOfStars;\r\n }\r\n this._rating = newRating;\r\n\r\n //update ratingAsInteger. rating parsed to int for the value-[n] modifier\r\n this.ratingAsInteger = parseInt(this._rating.toString());\r\n\r\n //update halfStarsVisible\r\n this.setHalfStarVisible();\r\n\r\n //update calculated Color\r\n this.setColor();\r\n\r\n }\r\n\r\n set rating(value: number) {\r\n this.setRating(value);\r\n }\r\n\r\n /**\r\n * showHalfStars\r\n */\r\n protected _showHalfStars: boolean;\r\n get showHalfStars(): boolean {\r\n return this._showHalfStars;\r\n }\r\n\r\n set showHalfStars(value: boolean) {\r\n this._showHalfStars = !!value;\r\n\r\n //update halfStarVisible\r\n this.setHalfStarVisible();\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * getColor\r\n */\r\n getColor: (rating: number, numOfStars: number, staticColor?: starRatingColor) => starRatingColor;\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * getHalfStarVisible\r\n */\r\n getHalfStarVisible: (rating: number) => boolean;\r\n /////////////////////////////////////////////\r\n\r\n //CTRL ONLY\r\n ///////////////////////////////////////////////////////////////////////////////////////////\r\n classEmpty: string;\r\n classHalf: string;\r\n classFilled: string;\r\n\r\n pathEmpty: string;\r\n pathHalf: string;\r\n pathFilled: string;\r\n\r\n color: starRatingColor;\r\n stars: Array;\r\n ratingAsInteger: number;\r\n halfStarVisible: boolean;\r\n\r\n constructor(config: StarRatingConfigService) {\r\n\r\n this.config = config;\r\n\r\n //set default ctrl props\r\n this.classEmpty = this.config.classEmpty;\r\n this.classHalf = this.config.classHalf;\r\n this.classFilled = this.config.classFilled;\r\n this.pathEmpty = this.config.svgPathEmpty;\r\n this.pathHalf = this.config.svgPathHalf;\r\n this.pathFilled = this.config.svgPathFilled;\r\n\r\n //set default Component Inputs\r\n if ('getColor' in this.config && typeof this.config.getColor === \"function\") {\r\n this.getColor = this.config.getColor;\r\n }\r\n\r\n if ('getHalfStarVisible' in this.config && typeof this.config.getHalfStarVisible === \"function\") {\r\n this.getHalfStarVisible = this.config.getHalfStarVisible;\r\n }\r\n\r\n this.numOfStars = this.config.numOfStars;\r\n this.rating = 0;\r\n this.step = 1;\r\n\r\n }\r\n\r\n svgVisible(): boolean {\r\n return this.starType === \"svg\";\r\n }\r\n\r\n interactionPossible(): boolean {\r\n return !this.readOnly && !this.disabled;\r\n }\r\n\r\n setColor(): void {\r\n //check if custom function is given\r\n if (typeof this.getColor === \"function\") {\r\n this.color = this.getColor(this.rating, this.numOfStars, this.staticColor);\r\n }\r\n else {\r\n this.color = StarRatingUtils.getColor(this.rating, this.numOfStars, this.staticColor);\r\n }\r\n }\r\n\r\n setHalfStarVisible(): void {\r\n //update halfStarVisible\r\n if (this.showHalfStars) {\r\n //check if custom function is given\r\n if (typeof this.getHalfStarVisible === \"function\") {\r\n this.halfStarVisible = this.getHalfStarVisible(this.rating);\r\n } else {\r\n this.halfStarVisible = StarRatingUtils.getHalfStarVisible(this.rating);\r\n }\r\n\r\n }\r\n else {\r\n this.halfStarVisible = false;\r\n }\r\n }\r\n\r\n getComponentClassNames(): string {\r\n let classNames: string[] = [];\r\n\r\n classNames.push(this.rating ? 'value-' + this.ratingAsInteger : 'value-0');\r\n classNames.push(this.halfStarVisible ? 'half' : '');\r\n classNames.push(this.hoverEnabled ? 'hover' : '');\r\n\r\n let hoverRating = (this.hoverRating ? 'hover-' + this.hoverRating : 'hover-0');\r\n classNames.push(this.hoverEnabled ? hoverRating : '');\r\n\r\n classNames.push(this.space ? 'space-' + this.space : '');\r\n classNames.push(this.labelPosition ? 'label-' + this.labelPosition : '');\r\n classNames.push(this.color ? 'color-' + this.color : '');\r\n classNames.push(this.starType ? 'star-' + this.starType : '');\r\n classNames.push(this.speed);\r\n classNames.push(this.size);\r\n classNames.push(this.readOnly ? 'read-only' : '');\r\n classNames.push(this.disabled ? 'disabled' : '');\r\n classNames.push(this.direction ? 'direction-' + this.direction : '');\r\n\r\n return classNames.join(' ');\r\n }\r\n\r\n increment() {\r\n //increment to next higher step\r\n let absDiff = Math.abs(this.rating % this.step);\r\n this.rating = this.rating + (absDiff > 0 ? this.step - absDiff : this.step);\r\n }\r\n\r\n decrement() {\r\n //decrement to next lower step\r\n let absDiff = Math.abs(this.rating % this.step);\r\n this.rating = this.rating - (absDiff > 0 ? absDiff : this.step);\r\n }\r\n\r\n reset() {\r\n this.rating = 0;\r\n }\r\n\r\n}\r\n",
+ "import {\r\n StarRatingConfig,\r\n starRatingColor,\r\n starRatingSizes,\r\n starRatingSpeed,\r\n starRatingStarTypes,\r\n starRatingLabelPosition\r\n} from '../interfaces/star-rating-config.interface';\r\n\r\n/**\r\n * Configuration service for the StarRating component.\r\n * You can inject this service, typically in your root component, and customize the values of its properties in\r\n * order to provide default values for all the star ratings used in the application.\r\n */\r\nexport class StarRatingConfigService implements StarRatingConfig {\r\n\r\n _classEmpty = \"default-star-empty-icon\";\r\n\r\n get classEmpty() {\r\n return this._classEmpty;\r\n }\r\n\r\n set classEmpty(classEmpty: string) {\r\n this._classEmpty = classEmpty;\r\n }\r\n\r\n private _classHalf = \"default-star-half-icon\";\r\n\r\n get classHalf(): string {\r\n return this._classHalf;\r\n }\r\n\r\n set classHalf(classHalf: string) {\r\n this._classHalf = classHalf;\r\n }\r\n\r\n private _classFilled = \"default-star-filled-icon\";\r\n\r\n get classFilled(): string {\r\n return this._classFilled;\r\n }\r\n\r\n set classFilled(classFilled: string) {\r\n this._classFilled = classFilled;\r\n }\r\n\r\n private _numOfStars = 5;\r\n\r\n get numOfStars(): number {\r\n return this._numOfStars;\r\n }\r\n\r\n set numOfStars(numOfStars: number) {\r\n this._numOfStars = numOfStars;\r\n }\r\n\r\n private _size: starRatingSizes = \"medium\";\r\n\r\n get size(): starRatingSizes {\r\n return this._size;\r\n }\r\n\r\n set size(size: starRatingSizes) {\r\n this._size = size;\r\n }\r\n\r\n private _staticColor: starRatingColor;\r\n\r\n get staticColor(): starRatingColor {\r\n return this._staticColor;\r\n }\r\n\r\n set staticColor(value: starRatingColor) {\r\n this._staticColor = value;\r\n }\r\n\r\n private _labelPosition: starRatingLabelPosition = \"left\";\r\n\r\n get labelPosition(): starRatingLabelPosition {\r\n return this._labelPosition;\r\n }\r\n\r\n set labelPosition(labelPosition: starRatingLabelPosition) {\r\n this._labelPosition = labelPosition;\r\n }\r\n\r\n private _speed: starRatingSpeed = \"noticeable\";\r\n\r\n get speed(): starRatingSpeed {\r\n return this._speed;\r\n }\r\n\r\n set speed(speed: starRatingSpeed) {\r\n this._speed = speed;\r\n }\r\n\r\n private _starType: starRatingStarTypes = \"svg\";\r\n\r\n get starType(): starRatingStarTypes {\r\n return this._starType;\r\n }\r\n\r\n set starType(starType: starRatingStarTypes) {\r\n this._starType = starType;\r\n }\r\n\r\n private _assetsPath = \"assets/images/\";\r\n\r\n get assetsPath(): string {\r\n return this._assetsPath;\r\n }\r\n\r\n set assetsPath(assetsPath: string) {\r\n this._assetsPath = assetsPath;\r\n }\r\n\r\n private _svgPath = this.assetsPath + \"star-rating.icons.svg\";\r\n\r\n get svgPath(): string {\r\n return this._svgPath;\r\n }\r\n\r\n set svgPath(svgPath: string) {\r\n this._svgPath = svgPath;\r\n }\r\n\r\n private _svgEmptySymbolId = \"star-empty\";\r\n\r\n get svgEmptySymbolId(): string {\r\n return this._svgEmptySymbolId;\r\n }\r\n\r\n set svgEmptySymbolId(svgEmptySymbolId: string) {\r\n this._svgEmptySymbolId = svgEmptySymbolId;\r\n }\r\n\r\n private _svgHalfSymbolId = \"star-half\";\r\n\r\n get svgHalfSymbolId(): string {\r\n return this._svgHalfSymbolId;\r\n }\r\n\r\n set svgHalfSymbolId(svgHalfSymbolId: string) {\r\n this._svgHalfSymbolId = svgHalfSymbolId;\r\n }\r\n\r\n private _svgFilledSymbolId = \"star-filled\";\r\n\r\n get svgFilledSymbolId(): string {\r\n return this._svgFilledSymbolId;\r\n }\r\n\r\n set svgFilledSymbolId(svgFilledSymbolId: string) {\r\n this._svgFilledSymbolId = svgFilledSymbolId;\r\n }\r\n\r\n private _svgPathEmpty: string = this.svgPath + \"#\" + this.svgEmptySymbolId;\r\n\r\n get svgPathEmpty(): string {\r\n return this._svgPathEmpty;\r\n }\r\n\r\n set svgPathEmpty(svgPathEmpty: string) {\r\n this._svgPathEmpty = svgPathEmpty;\r\n }\r\n\r\n private _svgPathHalf: string = this.svgPath + \"#\" + this.svgHalfSymbolId;\r\n\r\n get svgPathHalf(): string {\r\n return this._svgPathHalf;\r\n }\r\n\r\n set svgPathHalf(svgPathHalf: string) {\r\n this._svgPathHalf = svgPathHalf;\r\n }\r\n\r\n private _svgPathFilled: string = this.svgPath + \"#\" + this.svgFilledSymbolId;\r\n\r\n get svgPathFilled(): string {\r\n return this._svgPathFilled;\r\n }\r\n\r\n set svgPathFilled(svgPathFilled: string) {\r\n this._svgPathFilled = svgPathFilled;\r\n }\r\n\r\n getColor(rating: number, numOfStars: number, staticColor?: starRatingColor): starRatingColor {\r\n rating = rating || 0;\r\n\r\n // if a fix color is set use this one\r\n if (staticColor) {\r\n return staticColor;\r\n }\r\n\r\n // calculate size of smallest fraction\r\n const fractionSize = numOfStars / 3;\r\n\r\n // apply color by fraction\r\n let color: starRatingColor = 'default';\r\n if (rating > 0) {\r\n color = 'negative';\r\n }\r\n if (rating > fractionSize) {\r\n color = 'ok';\r\n }\r\n if (rating > fractionSize * 2) {\r\n color = 'positive';\r\n }\r\n\r\n return color;\r\n }\r\n\r\n getHalfStarVisible(rating: number): boolean {\r\n return Math.abs(rating % 1) > 0;\r\n }\r\n\r\n}\r\n",
+ "import {Component, EventEmitter, forwardRef, Input} from '@angular/core';\r\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\r\nimport {ClickEvent} from '../interfaces/click-event.interface';\r\nimport {HoverRatingChangeEvent} from '../interfaces/hover-rating-change-event.interface';\r\nimport {RatingChangeEvent} from '../interfaces/rating-change-event.interface';\r\nimport {StarRating} from '../services/star-rating';\r\nimport {StarRatingConfigService} from '../services/star-rating-config.service';\r\nimport {StarRatingUtils} from '../services/star-rating.utils';\r\n\r\nconst STAR_RATING_CONTROL_ACCESSOR = {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => StarRatingComponent),\r\n multi: true\r\n};\r\n\r\n@Component({\r\n selector: 'star-rating-comp',\r\n providers: [STAR_RATING_CONTROL_ACCESSOR],\r\n inputs: [\r\n 'getHalfStarVisible'\r\n , 'getColor'\r\n , 'showHalfStars'\r\n , 'hoverEnabled'\r\n , 'rating'\r\n , 'step'\r\n , 'disabled'\r\n , 'readOnly'\r\n , 'space'\r\n , 'starType'\r\n , 'size'\r\n , 'speed'\r\n , 'numOfStars'\r\n , 'direction'\r\n , 'staticColor'\r\n //, 'labelVisible'\r\n , 'labelPosition'\r\n , 'labelText'\r\n , 'id'\r\n ],\r\n outputs: [\r\n 'clickEmitter'\r\n , 'ratingChangeEmitter'\r\n , 'hoverRatingChangeEmitter'\r\n ],\r\n styles: [],\r\n template: `\r\n
{{labelText}}
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
`\r\n})\r\nexport class StarRatingComponent extends StarRating implements ControlValueAccessor {\r\n\r\n //Outputs\r\n ///////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n clickEmitter: EventEmitter = new EventEmitter();\r\n\r\n saveOnClick($event: ClickEvent) {\r\n if (this.clickEmitter) {\r\n this.clickEmitter.emit($event);\r\n }\r\n }\r\n\r\n ratingChangeEmitter: EventEmitter = new EventEmitter();\r\n\r\n saveOnRatingChange($event: RatingChangeEvent) {\r\n if (this.ratingChangeEmitter) {\r\n this.ratingChangeEmitter.emit($event);\r\n }\r\n }\r\n\r\n hoverRatingChangeEmitter: EventEmitter = new EventEmitter();\r\n\r\n saveOnHover($event: HoverRatingChangeEvent) {\r\n if (this.hoverRatingChangeEmitter) {\r\n this.hoverRatingChangeEmitter.emit($event);\r\n }\r\n }\r\n\r\n onTouch: Function;\r\n onModelChange: Function;\r\n private onModelChangeRegistered: boolean = false;\r\n private onTouchRegistered: boolean = false;\r\n\r\n saveOnTouch() {\r\n if (this.onTouchRegistered) {\r\n this.onTouch();\r\n }\r\n }\r\n\r\n saveOnModelChange(value: number) {\r\n if (this.onModelChangeRegistered) {\r\n this.onModelChange(value);\r\n }\r\n }\r\n\r\n /**ACCESSIBILITY **/\r\n\r\n //Keyboard events\r\n onKeyDown(event: KeyboardEvent) {\r\n\r\n if (!this.interactionPossible()) {\r\n return;\r\n }\r\n\r\n const handlers: any = {\r\n //Decrement\r\n Minus: () => this.decrement(),\r\n ArrowDown: () => this.decrement(),\r\n ArrowLeft: () => this.decrement(),\r\n\r\n //Increment\r\n Plus: () => this.increment(),\r\n ArrowRight: () => this.increment(),\r\n ArrowUp: () => this.increment(),\r\n\r\n //Reset\r\n Backspace: () => this.reset(),\r\n Delete: () => this.reset(),\r\n Digit0: () => this.reset()\r\n };\r\n\r\n const handleDigits = (eventCode: string): void => {\r\n let dStr = \"Digit\";\r\n let digit: number = parseInt(eventCode.substr(dStr.length, eventCode.length - 1));\r\n this.rating = digit;\r\n };\r\n\r\n if (handlers[event['code']] || StarRatingUtils.isDigitKeyEventCode(event['code'])) {\r\n if (StarRatingUtils.isDigitKeyEventCode(event['code'])) {\r\n handleDigits(event['code']);\r\n } else {\r\n handlers[event['code']]();\r\n }\r\n event.preventDefault();\r\n event.stopPropagation();\r\n }\r\n\r\n this.saveOnTouch();\r\n }\r\n\r\n //Focus events\r\n onBlur(event: FocusEvent) {\r\n this.focus = false;\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this.saveOnTouch();\r\n }\r\n\r\n onFocus(event: FocusEvent) {\r\n this.focus = true;\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this.saveOnTouch();\r\n }\r\n\r\n //Hover events\r\n onStarHover(rating?: number): void {\r\n\r\n if (!this.interactionPossible() || !this.hoverEnabled) {\r\n return;\r\n }\r\n\r\n this.hoverRating = rating ? parseInt(rating.toString()) : 0;\r\n\r\n //fire onHoverRatingChange event\r\n let $event: HoverRatingChangeEvent = {hoverRating: this.hoverRating};\r\n this.saveOnHover($event);\r\n\r\n\r\n }\r\n\r\n /**Form Control - ControlValueAccessor implementation**/\r\n\r\n writeValue(obj: any): void {\r\n this.rating = obj;\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onModelChange = fn;\r\n this.onModelChangeRegistered = true;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouch = fn;\r\n this.onTouchRegistered = true;\r\n }\r\n\r\n constructor(config: StarRatingConfigService) {\r\n super(config);\r\n }\r\n\r\n //Overrides\r\n setRating(value: number): void {\r\n let initValue = this.rating;\r\n super.setRating(value);\r\n\r\n //if value changed trigger valueAccessor events and outputs\r\n if (initValue !== this.rating) {\r\n let $event: RatingChangeEvent = {rating: this.rating};\r\n this.saveOnRatingChange($event);\r\n\r\n this.saveOnModelChange(this.rating);\r\n }\r\n\r\n };\r\n\r\n /**\r\n * onStarClicked\r\n *\r\n * Is fired when a star is clicked. And updated the rating value.\r\n * This function returns if the disabled or readOnly\r\n * property is set. If provided it emits the onClick event\r\n * handler with the actual rating value.\r\n *\r\n * @param rating\r\n */\r\n onStarClicked(rating: number): void {\r\n\r\n //fire onClick event\r\n if (!this.interactionPossible()) {\r\n return;\r\n }\r\n\r\n this.rating = rating;\r\n\r\n let onClickEventObject: ClickEvent = {\r\n rating: this.rating\r\n };\r\n this.saveOnClick(onClickEventObject);\r\n\r\n }\r\n\r\n}\r\n",
+ "import {CommonModule} from '@angular/common';\nimport {ModuleWithProviders, NgModule} from '@angular/core';\nimport {StarRatingComponent} from './components/star-rating.component';\nimport {StarRatingConfigService} from './services/star-rating-config.service';\n\nconst DECLARATIONS = [StarRatingComponent];\nconst EXPORTS = [DECLARATIONS];\n\n@NgModule({\n imports: [CommonModule],\n declarations: [DECLARATIONS],\n exports: [EXPORTS]\n})\nexport class StarRatingModule {\n static forRoot(): ModuleWithProviders {\n return {\n ngModule: StarRatingModule,\n providers: [\n StarRatingConfigService\n ]\n }\n }\n\n static forChild(): ModuleWithProviders {\n return {\n ngModule: StarRatingModule,\n providers: []\n }\n }\n}\n"
+ ],
+ "names": [
+ "extendStatics",
+ "Object",
+ "setPrototypeOf",
+ "__proto__",
+ "Array",
+ "d",
+ "b",
+ "p",
+ "hasOwnProperty",
+ "StarRatingConfig",
+ "StarRatingUtils",
+ "getStarsArray",
+ "numOfStars",
+ "stars",
+ "i",
+ "push",
+ "getHalfStarVisible",
+ "rating",
+ "Math",
+ "abs",
+ "getColor",
+ "staticColor",
+ "fractionSize",
+ "color",
+ "isDigitKeyEventCode",
+ "eventCode",
+ "indexOf",
+ "StarRating",
+ "config",
+ "this",
+ "classEmpty",
+ "classHalf",
+ "classFilled",
+ "pathEmpty",
+ "svgPathEmpty",
+ "pathHalf",
+ "svgPathHalf",
+ "pathFilled",
+ "svgPathFilled",
+ "step",
+ "defineProperty",
+ "prototype",
+ "get",
+ "_id",
+ "set",
+ "value",
+ "_focus",
+ "_labelText",
+ "_labelPosition",
+ "labelPosition",
+ "_labelVisible",
+ "_hoverEnabled",
+ "undefined",
+ "_staticColor",
+ "setColor",
+ "_direction",
+ "_numOfStars",
+ "_hoverRating",
+ "_speed",
+ "speed",
+ "_size",
+ "size",
+ "_starType",
+ "starType",
+ "_space",
+ "_readOnly",
+ "_disabled",
+ "_step",
+ "_rating",
+ "setRating",
+ "newRating",
+ "ratingAsInteger",
+ "parseInt",
+ "toString",
+ "setHalfStarVisible",
+ "_showHalfStars",
+ "svgVisible",
+ "interactionPossible",
+ "readOnly",
+ "disabled",
+ "showHalfStars",
+ "halfStarVisible",
+ "getComponentClassNames",
+ "classNames",
+ "hoverEnabled",
+ "hoverRating",
+ "space",
+ "direction",
+ "join",
+ "increment",
+ "absDiff",
+ "decrement",
+ "reset",
+ "StarRatingConfigService",
+ "_classEmpty",
+ "_classHalf",
+ "_classFilled",
+ "_assetsPath",
+ "_svgPath",
+ "assetsPath",
+ "_svgEmptySymbolId",
+ "_svgHalfSymbolId",
+ "_svgFilledSymbolId",
+ "_svgPathEmpty",
+ "svgPath",
+ "svgEmptySymbolId",
+ "_svgPathHalf",
+ "svgHalfSymbolId",
+ "_svgPathFilled",
+ "svgFilledSymbolId",
+ "STAR_RATING_CONTROL_ACCESSOR",
+ "provide",
+ "NG_VALUE_ACCESSOR",
+ "useExisting",
+ "forwardRef",
+ "StarRatingComponent",
+ "multi",
+ "_super",
+ "_this",
+ "call",
+ "clickEmitter",
+ "EventEmitter",
+ "ratingChangeEmitter",
+ "hoverRatingChangeEmitter",
+ "onModelChangeRegistered",
+ "onTouchRegistered",
+ "__",
+ "constructor",
+ "create",
+ "tslib_1.__extends",
+ "saveOnClick",
+ "$event",
+ "emit",
+ "saveOnRatingChange",
+ "saveOnHover",
+ "saveOnTouch",
+ "onTouch",
+ "saveOnModelChange",
+ "onModelChange",
+ "onKeyDown",
+ "event",
+ "digit",
+ "handlers",
+ "Minus",
+ "ArrowDown",
+ "ArrowLeft",
+ "Plus",
+ "ArrowRight",
+ "ArrowUp",
+ "Backspace",
+ "Delete",
+ "Digit0",
+ "substr",
+ "length",
+ "preventDefault",
+ "stopPropagation",
+ "onBlur",
+ "focus",
+ "onFocus",
+ "onStarHover",
+ "writeValue",
+ "obj",
+ "registerOnChange",
+ "fn",
+ "registerOnTouched",
+ "initValue",
+ "onStarClicked",
+ "onClickEventObject",
+ "type",
+ "Component",
+ "args",
+ "selector",
+ "providers",
+ "inputs",
+ "outputs",
+ "styles",
+ "template",
+ "DECLARATIONS",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rating/esm2015/angular-star-rating.js
new file mode 100644
index 0000000..08440dc
--- /dev/null
+++ b/@packaged/angular-star-rating/esm2015/angular-star-rating.js
@@ -0,0 +1,1072 @@
+import { Component, EventEmitter, forwardRef, NgModule } from '@angular/core';
+import { NG_VALUE_ACCESSOR } from '@angular/forms';
+import { CommonModule } from '@angular/common';
+
+/**
+ * @fileoverview added by tsickle
+ * @suppress {checkTypes} checked by tsc
+ */
+class StarRatingConfig {
+}
+
+/**
+ * @fileoverview added by tsickle
+ * @suppress {checkTypes} checked by tsc
+ */
+class StarRatingUtils {
+ /**
+ * @param {?} numOfStars
+ * @return {?}
+ */
+ static getStarsArray(numOfStars) {
+ let /** @type {?} */ stars = [];
+ for (let /** @type {?} */ i = 0; i < numOfStars; i++) {
+ stars.push(i + 1);
+ }
+ return stars;
+ }
+ /**
+ * @param {?} rating
+ * @return {?}
+ */
+ static getHalfStarVisible(rating) {
+ return Math.abs(rating % 1) > 0;
+ }
+ /**
+ * @param {?} rating
+ * @param {?} numOfStars
+ * @param {?=} staticColor
+ * @return {?}
+ */
+ static getColor(rating, numOfStars, staticColor) {
+ rating = rating || 0;
+ //if a fix color is set use this one
+ if (staticColor) {
+ return staticColor;
+ }
+ //calculate size of smallest fraction
+ let /** @type {?} */ fractionSize = numOfStars / 3;
+ //apply color by fraction
+ let /** @type {?} */ color = 'default';
+ if (rating > 0) {
+ color = 'negative';
+ }
+ if (rating > fractionSize) {
+ color = 'ok';
+ }
+ if (rating > fractionSize * 2) {
+ color = 'positive';
+ }
+ return color;
+ }
+ /**
+ * @param {?} eventCode
+ * @return {?}
+ */
+ static isDigitKeyEventCode(eventCode) {
+ return eventCode.indexOf('Digit') === 0;
+ }
+ ;
+}
+
+/**
+ * @fileoverview added by tsickle
+ * @suppress {checkTypes} checked by tsc
+ */
+class StarRating {
+ /**
+ * @return {?}
+ */
+ get id() {
+ return this._id;
+ }
+ /**
+ * @param {?} value
+ * @return {?}
+ */
+ set id(value) {
+ this._id = value || '';
+ }
+ /**
+ * @return {?}
+ */
+ get focus() {
+ return this._focus;
+ }
+ /**
+ * @param {?} value
+ * @return {?}
+ */
+ set focus(value) {
+ this._focus = !!value;
+ }
+ /**
+ * @return {?}
+ */
+ get labelText() {
+ return this._labelText;
+ }
+ /**
+ * @param {?} value
+ * @return {?}
+ */
+ set labelText(value) {
+ this._labelText = value;
+ }
+ /**
+ * @return {?}
+ */
+ get labelPosition() {
+ return this._labelPosition;
+ }
+ /**
+ * @param {?} value
+ * @return {?}
+ */
+ set labelPosition(value) {
+ this._labelPosition = value || this.config.labelPosition;
+ }
+ /**
+ * @return {?}
+ */
+ get labelVisible() {
+ return this._labelVisible;
+ }
+ /**
+ * @param {?} value
+ * @return {?}
+ */
+ set labelVisible(value) {
+ this._labelVisible = !!value;
+ }
+ /**
+ * @return {?}
+ */
+ get hoverEnabled() {
+ return this._hoverEnabled;
+ }
+ /**
+ * @param {?} value
+ * @return {?}
+ */
+ set hoverEnabled(value) {
+ this._hoverEnabled = (value !== undefined) ? !!value : false;
+ }
+ /**
+ * @return {?}
+ */
+ get staticColor() {
+ return this._staticColor;
+ }
+ /**
+ * @param {?} value
+ * @return {?}
+ */
+ set staticColor(value) {
+ this._staticColor = value || this.config.staticColor || undefined;
+ //update color.
+ this.setColor();
+ }
+ /**
+ * @return {?}
+ */
+ get direction() {
+ return this._direction;
+ }
+ /**
+ * @param {?} value
+ * @return {?}
+ */
+ set direction(value) {
+ this._direction = value || undefined;
+ }
+ /**
+ * @return {?}
+ */
+ get numOfStars() {
+ return this._numOfStars;
+ }
+ /**
+ * @param {?} value
+ * @return {?}
+ */
+ set numOfStars(value) {
+ this._numOfStars = (value > 0) ? value : this.config.numOfStars;
+ //update stars array
+ this.stars = StarRatingUtils.getStarsArray(this.numOfStars);
+ //update color
+ this.setColor();
+ }
+ /**
+ * @return {?}
+ */
+ get hoverRating() {
+ return this._hoverRating;
+ }
+ /**
+ * @param {?} value
+ * @return {?}
+ */
+ set hoverRating(value) {
+ this._hoverRating = (value > 0) ? value : 0;
+ }
+ /**
+ * @return {?}
+ */
+ get speed() {
+ return this._speed;
+ }
+ /**
+ * @param {?} value
+ * @return {?}
+ */
+ set speed(value) {
+ this._speed = value || this.config.speed;
+ }
+ /**
+ * @return {?}
+ */
+ get size() {
+ return this._size || this.config.size;
+ }
+ /**
+ * @param {?} value
+ * @return {?}
+ */
+ set size(value) {
+ this._size = value;
+ }
+ /**
+ * @return {?}
+ */
+ get starType() {
+ return this._starType || this.config.starType;
+ }
+ /**
+ * @param {?} value
+ * @return {?}
+ */
+ set starType(value) {
+ this._starType = value;
+ }
+ /**
+ * @return {?}
+ */
+ get space() {
+ return this._space;
+ }
+ /**
+ * @param {?} value
+ * @return {?}
+ */
+ set space(value) {
+ this._space = value;
+ }
+ /**
+ * @return {?}
+ */
+ get readOnly() {
+ return this._readOnly;
+ }
+ /**
+ * @param {?} value
+ * @return {?}
+ */
+ set readOnly(value) {
+ this._readOnly = !!value;
+ }
+ /**
+ * @return {?}
+ */
+ get disabled() {
+ return this._disabled;
+ }
+ /**
+ * @param {?} value
+ * @return {?}
+ */
+ set disabled(value) {
+ this._disabled = !!value;
+ }
+ /**
+ * @return {?}
+ */
+ get step() {
+ return this._step;
+ }
+ /**
+ * @param {?} value
+ * @return {?}
+ */
+ set step(value) {
+ this._step = (value > 0 ? value : 1);
+ }
+ /**
+ * @return {?}
+ */
+ get rating() {
+ return this._rating;
+ }
+ /**
+ * setRating
+ * I use a setter function instead of a set method to enable overrides for this function.
+ * @param {?} value
+ * @return {?}
+ */
+ setRating(value) {
+ //validate and apply newRating
+ let /** @type {?} */ newRating = 0;
+ if (value >= 0
+ && value <= this.numOfStars) {
+ newRating = value;
+ }
+ //limit max value to max number of stars
+ if (value > this.numOfStars) {
+ newRating = this.numOfStars;
+ }
+ this._rating = newRating;
+ //update ratingAsInteger. rating parsed to int for the value-[n] modifier
+ this.ratingAsInteger = parseInt(this._rating.toString());
+ //update halfStarsVisible
+ this.setHalfStarVisible();
+ //update calculated Color
+ this.setColor();
+ }
+ /**
+ * @param {?} value
+ * @return {?}
+ */
+ set rating(value) {
+ this.setRating(value);
+ }
+ /**
+ * @return {?}
+ */
+ get showHalfStars() {
+ return this._showHalfStars;
+ }
+ /**
+ * @param {?} value
+ * @return {?}
+ */
+ set showHalfStars(value) {
+ this._showHalfStars = !!value;
+ //update halfStarVisible
+ this.setHalfStarVisible();
+ }
+ /**
+ * @param {?} config
+ */
+ constructor(config) {
+ this.config = config;
+ //set default ctrl props
+ this.classEmpty = this.config.classEmpty;
+ this.classHalf = this.config.classHalf;
+ this.classFilled = this.config.classFilled;
+ this.pathEmpty = this.config.svgPathEmpty;
+ this.pathHalf = this.config.svgPathHalf;
+ this.pathFilled = this.config.svgPathFilled;
+ //set default Component Inputs
+ if ('getColor' in this.config && typeof this.config.getColor === "function") {
+ this.getColor = this.config.getColor;
+ }
+ if ('getHalfStarVisible' in this.config && typeof this.config.getHalfStarVisible === "function") {
+ this.getHalfStarVisible = this.config.getHalfStarVisible;
+ }
+ this.numOfStars = this.config.numOfStars;
+ this.rating = 0;
+ this.step = 1;
+ }
+ /**
+ * @return {?}
+ */
+ svgVisible() {
+ return this.starType === "svg";
+ }
+ /**
+ * @return {?}
+ */
+ interactionPossible() {
+ return !this.readOnly && !this.disabled;
+ }
+ /**
+ * @return {?}
+ */
+ setColor() {
+ //check if custom function is given
+ if (typeof this.getColor === "function") {
+ this.color = this.getColor(this.rating, this.numOfStars, this.staticColor);
+ }
+ else {
+ this.color = StarRatingUtils.getColor(this.rating, this.numOfStars, this.staticColor);
+ }
+ }
+ /**
+ * @return {?}
+ */
+ setHalfStarVisible() {
+ //update halfStarVisible
+ if (this.showHalfStars) {
+ //check if custom function is given
+ if (typeof this.getHalfStarVisible === "function") {
+ this.halfStarVisible = this.getHalfStarVisible(this.rating);
+ }
+ else {
+ this.halfStarVisible = StarRatingUtils.getHalfStarVisible(this.rating);
+ }
+ }
+ else {
+ this.halfStarVisible = false;
+ }
+ }
+ /**
+ * @return {?}
+ */
+ getComponentClassNames() {
+ let /** @type {?} */ classNames = [];
+ classNames.push(this.rating ? 'value-' + this.ratingAsInteger : 'value-0');
+ classNames.push(this.halfStarVisible ? 'half' : '');
+ classNames.push(this.hoverEnabled ? 'hover' : '');
+ let /** @type {?} */ hoverRating = (this.hoverRating ? 'hover-' + this.hoverRating : 'hover-0');
+ classNames.push(this.hoverEnabled ? hoverRating : '');
+ classNames.push(this.space ? 'space-' + this.space : '');
+ classNames.push(this.labelPosition ? 'label-' + this.labelPosition : '');
+ classNames.push(this.color ? 'color-' + this.color : '');
+ classNames.push(this.starType ? 'star-' + this.starType : '');
+ classNames.push(this.speed);
+ classNames.push(this.size);
+ classNames.push(this.readOnly ? 'read-only' : '');
+ classNames.push(this.disabled ? 'disabled' : '');
+ classNames.push(this.direction ? 'direction-' + this.direction : '');
+ return classNames.join(' ');
+ }
+ /**
+ * @return {?}
+ */
+ increment() {
+ //increment to next higher step
+ let /** @type {?} */ absDiff = Math.abs(this.rating % this.step);
+ this.rating = this.rating + (absDiff > 0 ? this.step - absDiff : this.step);
+ }
+ /**
+ * @return {?}
+ */
+ decrement() {
+ //decrement to next lower step
+ let /** @type {?} */ absDiff = Math.abs(this.rating % this.step);
+ this.rating = this.rating - (absDiff > 0 ? absDiff : this.step);
+ }
+ /**
+ * @return {?}
+ */
+ reset() {
+ this.rating = 0;
+ }
+}
+
+/**
+ * @fileoverview added by tsickle
+ * @suppress {checkTypes} checked by tsc
+ */
+/**
+ * Configuration service for the StarRating component.
+ * You can inject this service, typically in your root component, and customize the values of its properties in
+ * order to provide default values for all the star ratings used in the application.
+ */
+class StarRatingConfigService {
+ constructor() {
+ this._classEmpty = "default-star-empty-icon";
+ this._classHalf = "default-star-half-icon";
+ this._classFilled = "default-star-filled-icon";
+ this._numOfStars = 5;
+ this._size = "medium";
+ this._labelPosition = "left";
+ this._speed = "noticeable";
+ this._starType = "svg";
+ this._assetsPath = "assets/images/";
+ this._svgPath = this.assetsPath + "star-rating.icons.svg";
+ this._svgEmptySymbolId = "star-empty";
+ this._svgHalfSymbolId = "star-half";
+ this._svgFilledSymbolId = "star-filled";
+ this._svgPathEmpty = this.svgPath + "#" + this.svgEmptySymbolId;
+ this._svgPathHalf = this.svgPath + "#" + this.svgHalfSymbolId;
+ this._svgPathFilled = this.svgPath + "#" + this.svgFilledSymbolId;
+ }
+ /**
+ * @return {?}
+ */
+ get classEmpty() {
+ return this._classEmpty;
+ }
+ /**
+ * @param {?} classEmpty
+ * @return {?}
+ */
+ set classEmpty(classEmpty) {
+ this._classEmpty = classEmpty;
+ }
+ /**
+ * @return {?}
+ */
+ get classHalf() {
+ return this._classHalf;
+ }
+ /**
+ * @param {?} classHalf
+ * @return {?}
+ */
+ set classHalf(classHalf) {
+ this._classHalf = classHalf;
+ }
+ /**
+ * @return {?}
+ */
+ get classFilled() {
+ return this._classFilled;
+ }
+ /**
+ * @param {?} classFilled
+ * @return {?}
+ */
+ set classFilled(classFilled) {
+ this._classFilled = classFilled;
+ }
+ /**
+ * @return {?}
+ */
+ get numOfStars() {
+ return this._numOfStars;
+ }
+ /**
+ * @param {?} numOfStars
+ * @return {?}
+ */
+ set numOfStars(numOfStars) {
+ this._numOfStars = numOfStars;
+ }
+ /**
+ * @return {?}
+ */
+ get size() {
+ return this._size;
+ }
+ /**
+ * @param {?} size
+ * @return {?}
+ */
+ set size(size) {
+ this._size = size;
+ }
+ /**
+ * @return {?}
+ */
+ get staticColor() {
+ return this._staticColor;
+ }
+ /**
+ * @param {?} value
+ * @return {?}
+ */
+ set staticColor(value) {
+ this._staticColor = value;
+ }
+ /**
+ * @return {?}
+ */
+ get labelPosition() {
+ return this._labelPosition;
+ }
+ /**
+ * @param {?} labelPosition
+ * @return {?}
+ */
+ set labelPosition(labelPosition) {
+ this._labelPosition = labelPosition;
+ }
+ /**
+ * @return {?}
+ */
+ get speed() {
+ return this._speed;
+ }
+ /**
+ * @param {?} speed
+ * @return {?}
+ */
+ set speed(speed) {
+ this._speed = speed;
+ }
+ /**
+ * @return {?}
+ */
+ get starType() {
+ return this._starType;
+ }
+ /**
+ * @param {?} starType
+ * @return {?}
+ */
+ set starType(starType) {
+ this._starType = starType;
+ }
+ /**
+ * @return {?}
+ */
+ get assetsPath() {
+ return this._assetsPath;
+ }
+ /**
+ * @param {?} assetsPath
+ * @return {?}
+ */
+ set assetsPath(assetsPath) {
+ this._assetsPath = assetsPath;
+ }
+ /**
+ * @return {?}
+ */
+ get svgPath() {
+ return this._svgPath;
+ }
+ /**
+ * @param {?} svgPath
+ * @return {?}
+ */
+ set svgPath(svgPath) {
+ this._svgPath = svgPath;
+ }
+ /**
+ * @return {?}
+ */
+ get svgEmptySymbolId() {
+ return this._svgEmptySymbolId;
+ }
+ /**
+ * @param {?} svgEmptySymbolId
+ * @return {?}
+ */
+ set svgEmptySymbolId(svgEmptySymbolId) {
+ this._svgEmptySymbolId = svgEmptySymbolId;
+ }
+ /**
+ * @return {?}
+ */
+ get svgHalfSymbolId() {
+ return this._svgHalfSymbolId;
+ }
+ /**
+ * @param {?} svgHalfSymbolId
+ * @return {?}
+ */
+ set svgHalfSymbolId(svgHalfSymbolId) {
+ this._svgHalfSymbolId = svgHalfSymbolId;
+ }
+ /**
+ * @return {?}
+ */
+ get svgFilledSymbolId() {
+ return this._svgFilledSymbolId;
+ }
+ /**
+ * @param {?} svgFilledSymbolId
+ * @return {?}
+ */
+ set svgFilledSymbolId(svgFilledSymbolId) {
+ this._svgFilledSymbolId = svgFilledSymbolId;
+ }
+ /**
+ * @return {?}
+ */
+ get svgPathEmpty() {
+ return this._svgPathEmpty;
+ }
+ /**
+ * @param {?} svgPathEmpty
+ * @return {?}
+ */
+ set svgPathEmpty(svgPathEmpty) {
+ this._svgPathEmpty = svgPathEmpty;
+ }
+ /**
+ * @return {?}
+ */
+ get svgPathHalf() {
+ return this._svgPathHalf;
+ }
+ /**
+ * @param {?} svgPathHalf
+ * @return {?}
+ */
+ set svgPathHalf(svgPathHalf) {
+ this._svgPathHalf = svgPathHalf;
+ }
+ /**
+ * @return {?}
+ */
+ get svgPathFilled() {
+ return this._svgPathFilled;
+ }
+ /**
+ * @param {?} svgPathFilled
+ * @return {?}
+ */
+ set svgPathFilled(svgPathFilled) {
+ this._svgPathFilled = svgPathFilled;
+ }
+ /**
+ * @param {?} rating
+ * @param {?} numOfStars
+ * @param {?=} staticColor
+ * @return {?}
+ */
+ getColor(rating, numOfStars, staticColor) {
+ rating = rating || 0;
+ // if a fix color is set use this one
+ if (staticColor) {
+ return staticColor;
+ }
+ // calculate size of smallest fraction
+ const /** @type {?} */ fractionSize = numOfStars / 3;
+ // apply color by fraction
+ let /** @type {?} */ color = 'default';
+ if (rating > 0) {
+ color = 'negative';
+ }
+ if (rating > fractionSize) {
+ color = 'ok';
+ }
+ if (rating > fractionSize * 2) {
+ color = 'positive';
+ }
+ return color;
+ }
+ /**
+ * @param {?} rating
+ * @return {?}
+ */
+ getHalfStarVisible(rating) {
+ return Math.abs(rating % 1) > 0;
+ }
+}
+
+/**
+ * @fileoverview added by tsickle
+ * @suppress {checkTypes} checked by tsc
+ */
+const STAR_RATING_CONTROL_ACCESSOR = {
+ provide: NG_VALUE_ACCESSOR,
+ useExisting: forwardRef(() => StarRatingComponent),
+ multi: true
+};
+class StarRatingComponent extends StarRating {
+ /**
+ * @param {?} config
+ */
+ constructor(config) {
+ super(config);
+ //Outputs
+ this.clickEmitter = new EventEmitter();
+ this.ratingChangeEmitter = new EventEmitter();
+ this.hoverRatingChangeEmitter = new EventEmitter();
+ this.onModelChangeRegistered = false;
+ this.onTouchRegistered = false;
+ }
+ /**
+ * @param {?} $event
+ * @return {?}
+ */
+ saveOnClick($event) {
+ if (this.clickEmitter) {
+ this.clickEmitter.emit($event);
+ }
+ }
+ /**
+ * @param {?} $event
+ * @return {?}
+ */
+ saveOnRatingChange($event) {
+ if (this.ratingChangeEmitter) {
+ this.ratingChangeEmitter.emit($event);
+ }
+ }
+ /**
+ * @param {?} $event
+ * @return {?}
+ */
+ saveOnHover($event) {
+ if (this.hoverRatingChangeEmitter) {
+ this.hoverRatingChangeEmitter.emit($event);
+ }
+ }
+ /**
+ * @return {?}
+ */
+ saveOnTouch() {
+ if (this.onTouchRegistered) {
+ this.onTouch();
+ }
+ }
+ /**
+ * @param {?} value
+ * @return {?}
+ */
+ saveOnModelChange(value) {
+ if (this.onModelChangeRegistered) {
+ this.onModelChange(value);
+ }
+ }
+ /**
+ * ACCESSIBILITY *
+ * @param {?} event
+ * @return {?}
+ */
+ onKeyDown(event) {
+ if (!this.interactionPossible()) {
+ return;
+ }
+ const /** @type {?} */ handlers = {
+ //Decrement
+ Minus: () => this.decrement(),
+ ArrowDown: () => this.decrement(),
+ ArrowLeft: () => this.decrement(),
+ //Increment
+ Plus: () => this.increment(),
+ ArrowRight: () => this.increment(),
+ ArrowUp: () => this.increment(),
+ //Reset
+ Backspace: () => this.reset(),
+ Delete: () => this.reset(),
+ Digit0: () => this.reset()
+ };
+ const /** @type {?} */ handleDigits = (eventCode) => {
+ let /** @type {?} */ dStr = "Digit";
+ let /** @type {?} */ digit = parseInt(eventCode.substr(dStr.length, eventCode.length - 1));
+ this.rating = digit;
+ };
+ if (handlers[event['code']] || StarRatingUtils.isDigitKeyEventCode(event['code'])) {
+ if (StarRatingUtils.isDigitKeyEventCode(event['code'])) {
+ handleDigits(event['code']);
+ }
+ else {
+ handlers[event['code']]();
+ }
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ this.saveOnTouch();
+ }
+ /**
+ * @param {?} event
+ * @return {?}
+ */
+ onBlur(event) {
+ this.focus = false;
+ event.preventDefault();
+ event.stopPropagation();
+ this.saveOnTouch();
+ }
+ /**
+ * @param {?} event
+ * @return {?}
+ */
+ onFocus(event) {
+ this.focus = true;
+ event.preventDefault();
+ event.stopPropagation();
+ this.saveOnTouch();
+ }
+ /**
+ * @param {?=} rating
+ * @return {?}
+ */
+ onStarHover(rating) {
+ if (!this.interactionPossible() || !this.hoverEnabled) {
+ return;
+ }
+ this.hoverRating = rating ? parseInt(rating.toString()) : 0;
+ //fire onHoverRatingChange event
+ let /** @type {?} */ $event = { hoverRating: this.hoverRating };
+ this.saveOnHover($event);
+ }
+ /**
+ * Form Control - ControlValueAccessor implementation*
+ * @param {?} obj
+ * @return {?}
+ */
+ writeValue(obj) {
+ this.rating = obj;
+ }
+ /**
+ * @param {?} fn
+ * @return {?}
+ */
+ registerOnChange(fn) {
+ this.onModelChange = fn;
+ this.onModelChangeRegistered = true;
+ }
+ /**
+ * @param {?} fn
+ * @return {?}
+ */
+ registerOnTouched(fn) {
+ this.onTouch = fn;
+ this.onTouchRegistered = true;
+ }
+ /**
+ * @param {?} value
+ * @return {?}
+ */
+ setRating(value) {
+ let /** @type {?} */ initValue = this.rating;
+ super.setRating(value);
+ //if value changed trigger valueAccessor events and outputs
+ if (initValue !== this.rating) {
+ let /** @type {?} */ $event = { rating: this.rating };
+ this.saveOnRatingChange($event);
+ this.saveOnModelChange(this.rating);
+ }
+ }
+ ;
+ /**
+ * onStarClicked
+ *
+ * Is fired when a star is clicked. And updated the rating value.
+ * This function returns if the disabled or readOnly
+ * property is set. If provided it emits the onClick event
+ * handler with the actual rating value.
+ *
+ * @param {?} rating
+ * @return {?}
+ */
+ onStarClicked(rating) {
+ //fire onClick event
+ if (!this.interactionPossible()) {
+ return;
+ }
+ this.rating = rating;
+ let /** @type {?} */ onClickEventObject = {
+ rating: this.rating
+ };
+ this.saveOnClick(onClickEventObject);
+ }
+}
+StarRatingComponent.decorators = [
+ { type: Component, args: [{
+ selector: 'star-rating-comp',
+ providers: [STAR_RATING_CONTROL_ACCESSOR],
+ inputs: [
+ 'getHalfStarVisible',
+ 'getColor',
+ 'showHalfStars',
+ 'hoverEnabled',
+ 'rating',
+ 'step',
+ 'disabled',
+ 'readOnly',
+ 'space',
+ 'starType',
+ 'size',
+ 'speed',
+ 'numOfStars',
+ 'direction',
+ 'staticColor'
+ //, 'labelVisible'
+ ,
+ 'labelPosition',
+ 'labelText',
+ 'id'
+ ],
+ outputs: [
+ 'clickEmitter',
+ 'ratingChangeEmitter',
+ 'hoverRatingChangeEmitter'
+ ],
+ styles: [],
+ template: `
+
{{labelText}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
`
+ },] },
+];
+/** @nocollapse */
+StarRatingComponent.ctorParameters = () => [
+ { type: StarRatingConfigService, },
+];
+
+/**
+ * @fileoverview added by tsickle
+ * @suppress {checkTypes} checked by tsc
+ */
+const DECLARATIONS = [StarRatingComponent];
+const EXPORTS = [DECLARATIONS];
+class StarRatingModule {
+ /**
+ * @return {?}
+ */
+ static forRoot() {
+ return {
+ ngModule: StarRatingModule,
+ providers: [
+ StarRatingConfigService
+ ]
+ };
+ }
+ /**
+ * @return {?}
+ */
+ static forChild() {
+ return {
+ ngModule: StarRatingModule,
+ providers: []
+ };
+ }
+}
+StarRatingModule.decorators = [
+ { type: NgModule, args: [{
+ imports: [CommonModule],
+ declarations: [DECLARATIONS],
+ exports: [EXPORTS]
+ },] },
+];
+/** @nocollapse */
+StarRatingModule.ctorParameters = () => [];
+
+/**
+ * @fileoverview added by tsickle
+ * @suppress {checkTypes} checked by tsc
+ */
+
+/**
+ * @fileoverview added by tsickle
+ * @suppress {checkTypes} checked by tsc
+ */
+/**
+ * Generated bundle index. Do not edit.
+ */
+
+export { StarRatingConfig, StarRatingUtils, StarRating, StarRatingConfigService, StarRatingComponent, StarRatingModule };
+//# sourceMappingURL=angular-star-rating.js.map
diff --git a/@packaged/angular-star-rating/esm2015/angular-star-rating.js.map b/@packaged/angular-star-rating/esm2015/angular-star-rating.js.map
new file mode 100644
index 0000000..9d88e0d
--- /dev/null
+++ b/@packaged/angular-star-rating/esm2015/angular-star-rating.js.map
@@ -0,0 +1,22 @@
+{
+ "version": 3,
+ "file": "angular-star-rating.js",
+ "sources": [
+ "ng://angular-star-rating/out/src/angular-star-rating.module.ts",
+ "ng://angular-star-rating/out/src/components/star-rating.component.ts",
+ "ng://angular-star-rating/out/src/services/star-rating-config.service.ts",
+ "ng://angular-star-rating/out/src/services/star-rating.ts",
+ "ng://angular-star-rating/out/src/services/star-rating.utils.ts",
+ "ng://angular-star-rating/out/src/interfaces/star-rating-config.interface.ts"
+ ],
+ "sourcesContent": [
+ "import {CommonModule} from '@angular/common';\nimport {ModuleWithProviders, NgModule} from '@angular/core';\nimport {StarRatingComponent} from './components/star-rating.component';\nimport {StarRatingConfigService} from './services/star-rating-config.service';\n\nconst DECLARATIONS = [StarRatingComponent];\nconst EXPORTS = [DECLARATIONS];\n\n@NgModule({\n imports: [CommonModule],\n declarations: [DECLARATIONS],\n exports: [EXPORTS]\n})\nexport class StarRatingModule {\n static forRoot(): ModuleWithProviders {\n return {\n ngModule: StarRatingModule,\n providers: [\n StarRatingConfigService\n ]\n }\n }\n\n static forChild(): ModuleWithProviders {\n return {\n ngModule: StarRatingModule,\n providers: []\n }\n }\n}\n",
+ "import {Component, EventEmitter, forwardRef, Input} from '@angular/core';\r\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\r\nimport {ClickEvent} from '../interfaces/click-event.interface';\r\nimport {HoverRatingChangeEvent} from '../interfaces/hover-rating-change-event.interface';\r\nimport {RatingChangeEvent} from '../interfaces/rating-change-event.interface';\r\nimport {StarRating} from '../services/star-rating';\r\nimport {StarRatingConfigService} from '../services/star-rating-config.service';\r\nimport {StarRatingUtils} from '../services/star-rating.utils';\r\n\r\nconst STAR_RATING_CONTROL_ACCESSOR = {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => StarRatingComponent),\r\n multi: true\r\n};\r\n\r\n@Component({\r\n selector: 'star-rating-comp',\r\n providers: [STAR_RATING_CONTROL_ACCESSOR],\r\n inputs: [\r\n 'getHalfStarVisible'\r\n , 'getColor'\r\n , 'showHalfStars'\r\n , 'hoverEnabled'\r\n , 'rating'\r\n , 'step'\r\n , 'disabled'\r\n , 'readOnly'\r\n , 'space'\r\n , 'starType'\r\n , 'size'\r\n , 'speed'\r\n , 'numOfStars'\r\n , 'direction'\r\n , 'staticColor'\r\n //, 'labelVisible'\r\n , 'labelPosition'\r\n , 'labelText'\r\n , 'id'\r\n ],\r\n outputs: [\r\n 'clickEmitter'\r\n , 'ratingChangeEmitter'\r\n , 'hoverRatingChangeEmitter'\r\n ],\r\n styles: [],\r\n template: `\r\n
{{labelText}}
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
`\r\n})\r\nexport class StarRatingComponent extends StarRating implements ControlValueAccessor {\r\n\r\n //Outputs\r\n ///////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n clickEmitter: EventEmitter = new EventEmitter();\r\n\r\n saveOnClick($event: ClickEvent) {\r\n if (this.clickEmitter) {\r\n this.clickEmitter.emit($event);\r\n }\r\n }\r\n\r\n ratingChangeEmitter: EventEmitter = new EventEmitter();\r\n\r\n saveOnRatingChange($event: RatingChangeEvent) {\r\n if (this.ratingChangeEmitter) {\r\n this.ratingChangeEmitter.emit($event);\r\n }\r\n }\r\n\r\n hoverRatingChangeEmitter: EventEmitter = new EventEmitter();\r\n\r\n saveOnHover($event: HoverRatingChangeEvent) {\r\n if (this.hoverRatingChangeEmitter) {\r\n this.hoverRatingChangeEmitter.emit($event);\r\n }\r\n }\r\n\r\n onTouch: Function;\r\n onModelChange: Function;\r\n private onModelChangeRegistered: boolean = false;\r\n private onTouchRegistered: boolean = false;\r\n\r\n saveOnTouch() {\r\n if (this.onTouchRegistered) {\r\n this.onTouch();\r\n }\r\n }\r\n\r\n saveOnModelChange(value: number) {\r\n if (this.onModelChangeRegistered) {\r\n this.onModelChange(value);\r\n }\r\n }\r\n\r\n /**ACCESSIBILITY **/\r\n\r\n //Keyboard events\r\n onKeyDown(event: KeyboardEvent) {\r\n\r\n if (!this.interactionPossible()) {\r\n return;\r\n }\r\n\r\n const handlers: any = {\r\n //Decrement\r\n Minus: () => this.decrement(),\r\n ArrowDown: () => this.decrement(),\r\n ArrowLeft: () => this.decrement(),\r\n\r\n //Increment\r\n Plus: () => this.increment(),\r\n ArrowRight: () => this.increment(),\r\n ArrowUp: () => this.increment(),\r\n\r\n //Reset\r\n Backspace: () => this.reset(),\r\n Delete: () => this.reset(),\r\n Digit0: () => this.reset()\r\n };\r\n\r\n const handleDigits = (eventCode: string): void => {\r\n let dStr = \"Digit\";\r\n let digit: number = parseInt(eventCode.substr(dStr.length, eventCode.length - 1));\r\n this.rating = digit;\r\n };\r\n\r\n if (handlers[event['code']] || StarRatingUtils.isDigitKeyEventCode(event['code'])) {\r\n if (StarRatingUtils.isDigitKeyEventCode(event['code'])) {\r\n handleDigits(event['code']);\r\n } else {\r\n handlers[event['code']]();\r\n }\r\n event.preventDefault();\r\n event.stopPropagation();\r\n }\r\n\r\n this.saveOnTouch();\r\n }\r\n\r\n //Focus events\r\n onBlur(event: FocusEvent) {\r\n this.focus = false;\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this.saveOnTouch();\r\n }\r\n\r\n onFocus(event: FocusEvent) {\r\n this.focus = true;\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this.saveOnTouch();\r\n }\r\n\r\n //Hover events\r\n onStarHover(rating?: number): void {\r\n\r\n if (!this.interactionPossible() || !this.hoverEnabled) {\r\n return;\r\n }\r\n\r\n this.hoverRating = rating ? parseInt(rating.toString()) : 0;\r\n\r\n //fire onHoverRatingChange event\r\n let $event: HoverRatingChangeEvent = {hoverRating: this.hoverRating};\r\n this.saveOnHover($event);\r\n\r\n\r\n }\r\n\r\n /**Form Control - ControlValueAccessor implementation**/\r\n\r\n writeValue(obj: any): void {\r\n this.rating = obj;\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onModelChange = fn;\r\n this.onModelChangeRegistered = true;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouch = fn;\r\n this.onTouchRegistered = true;\r\n }\r\n\r\n constructor(config: StarRatingConfigService) {\r\n super(config);\r\n }\r\n\r\n //Overrides\r\n setRating(value: number): void {\r\n let initValue = this.rating;\r\n super.setRating(value);\r\n\r\n //if value changed trigger valueAccessor events and outputs\r\n if (initValue !== this.rating) {\r\n let $event: RatingChangeEvent = {rating: this.rating};\r\n this.saveOnRatingChange($event);\r\n\r\n this.saveOnModelChange(this.rating);\r\n }\r\n\r\n };\r\n\r\n /**\r\n * onStarClicked\r\n *\r\n * Is fired when a star is clicked. And updated the rating value.\r\n * This function returns if the disabled or readOnly\r\n * property is set. If provided it emits the onClick event\r\n * handler with the actual rating value.\r\n *\r\n * @param rating\r\n */\r\n onStarClicked(rating: number): void {\r\n\r\n //fire onClick event\r\n if (!this.interactionPossible()) {\r\n return;\r\n }\r\n\r\n this.rating = rating;\r\n\r\n let onClickEventObject: ClickEvent = {\r\n rating: this.rating\r\n };\r\n this.saveOnClick(onClickEventObject);\r\n\r\n }\r\n\r\n}\r\n",
+ "import {\r\n StarRatingConfig,\r\n starRatingColor,\r\n starRatingSizes,\r\n starRatingSpeed,\r\n starRatingStarTypes,\r\n starRatingLabelPosition\r\n} from '../interfaces/star-rating-config.interface';\r\n\r\n/**\r\n * Configuration service for the StarRating component.\r\n * You can inject this service, typically in your root component, and customize the values of its properties in\r\n * order to provide default values for all the star ratings used in the application.\r\n */\r\nexport class StarRatingConfigService implements StarRatingConfig {\r\n\r\n _classEmpty = \"default-star-empty-icon\";\r\n\r\n get classEmpty() {\r\n return this._classEmpty;\r\n }\r\n\r\n set classEmpty(classEmpty: string) {\r\n this._classEmpty = classEmpty;\r\n }\r\n\r\n private _classHalf = \"default-star-half-icon\";\r\n\r\n get classHalf(): string {\r\n return this._classHalf;\r\n }\r\n\r\n set classHalf(classHalf: string) {\r\n this._classHalf = classHalf;\r\n }\r\n\r\n private _classFilled = \"default-star-filled-icon\";\r\n\r\n get classFilled(): string {\r\n return this._classFilled;\r\n }\r\n\r\n set classFilled(classFilled: string) {\r\n this._classFilled = classFilled;\r\n }\r\n\r\n private _numOfStars = 5;\r\n\r\n get numOfStars(): number {\r\n return this._numOfStars;\r\n }\r\n\r\n set numOfStars(numOfStars: number) {\r\n this._numOfStars = numOfStars;\r\n }\r\n\r\n private _size: starRatingSizes = \"medium\";\r\n\r\n get size(): starRatingSizes {\r\n return this._size;\r\n }\r\n\r\n set size(size: starRatingSizes) {\r\n this._size = size;\r\n }\r\n\r\n private _staticColor: starRatingColor;\r\n\r\n get staticColor(): starRatingColor {\r\n return this._staticColor;\r\n }\r\n\r\n set staticColor(value: starRatingColor) {\r\n this._staticColor = value;\r\n }\r\n\r\n private _labelPosition: starRatingLabelPosition = \"left\";\r\n\r\n get labelPosition(): starRatingLabelPosition {\r\n return this._labelPosition;\r\n }\r\n\r\n set labelPosition(labelPosition: starRatingLabelPosition) {\r\n this._labelPosition = labelPosition;\r\n }\r\n\r\n private _speed: starRatingSpeed = \"noticeable\";\r\n\r\n get speed(): starRatingSpeed {\r\n return this._speed;\r\n }\r\n\r\n set speed(speed: starRatingSpeed) {\r\n this._speed = speed;\r\n }\r\n\r\n private _starType: starRatingStarTypes = \"svg\";\r\n\r\n get starType(): starRatingStarTypes {\r\n return this._starType;\r\n }\r\n\r\n set starType(starType: starRatingStarTypes) {\r\n this._starType = starType;\r\n }\r\n\r\n private _assetsPath = \"assets/images/\";\r\n\r\n get assetsPath(): string {\r\n return this._assetsPath;\r\n }\r\n\r\n set assetsPath(assetsPath: string) {\r\n this._assetsPath = assetsPath;\r\n }\r\n\r\n private _svgPath = this.assetsPath + \"star-rating.icons.svg\";\r\n\r\n get svgPath(): string {\r\n return this._svgPath;\r\n }\r\n\r\n set svgPath(svgPath: string) {\r\n this._svgPath = svgPath;\r\n }\r\n\r\n private _svgEmptySymbolId = \"star-empty\";\r\n\r\n get svgEmptySymbolId(): string {\r\n return this._svgEmptySymbolId;\r\n }\r\n\r\n set svgEmptySymbolId(svgEmptySymbolId: string) {\r\n this._svgEmptySymbolId = svgEmptySymbolId;\r\n }\r\n\r\n private _svgHalfSymbolId = \"star-half\";\r\n\r\n get svgHalfSymbolId(): string {\r\n return this._svgHalfSymbolId;\r\n }\r\n\r\n set svgHalfSymbolId(svgHalfSymbolId: string) {\r\n this._svgHalfSymbolId = svgHalfSymbolId;\r\n }\r\n\r\n private _svgFilledSymbolId = \"star-filled\";\r\n\r\n get svgFilledSymbolId(): string {\r\n return this._svgFilledSymbolId;\r\n }\r\n\r\n set svgFilledSymbolId(svgFilledSymbolId: string) {\r\n this._svgFilledSymbolId = svgFilledSymbolId;\r\n }\r\n\r\n private _svgPathEmpty: string = this.svgPath + \"#\" + this.svgEmptySymbolId;\r\n\r\n get svgPathEmpty(): string {\r\n return this._svgPathEmpty;\r\n }\r\n\r\n set svgPathEmpty(svgPathEmpty: string) {\r\n this._svgPathEmpty = svgPathEmpty;\r\n }\r\n\r\n private _svgPathHalf: string = this.svgPath + \"#\" + this.svgHalfSymbolId;\r\n\r\n get svgPathHalf(): string {\r\n return this._svgPathHalf;\r\n }\r\n\r\n set svgPathHalf(svgPathHalf: string) {\r\n this._svgPathHalf = svgPathHalf;\r\n }\r\n\r\n private _svgPathFilled: string = this.svgPath + \"#\" + this.svgFilledSymbolId;\r\n\r\n get svgPathFilled(): string {\r\n return this._svgPathFilled;\r\n }\r\n\r\n set svgPathFilled(svgPathFilled: string) {\r\n this._svgPathFilled = svgPathFilled;\r\n }\r\n\r\n getColor(rating: number, numOfStars: number, staticColor?: starRatingColor): starRatingColor {\r\n rating = rating || 0;\r\n\r\n // if a fix color is set use this one\r\n if (staticColor) {\r\n return staticColor;\r\n }\r\n\r\n // calculate size of smallest fraction\r\n const fractionSize = numOfStars / 3;\r\n\r\n // apply color by fraction\r\n let color: starRatingColor = 'default';\r\n if (rating > 0) {\r\n color = 'negative';\r\n }\r\n if (rating > fractionSize) {\r\n color = 'ok';\r\n }\r\n if (rating > fractionSize * 2) {\r\n color = 'positive';\r\n }\r\n\r\n return color;\r\n }\r\n\r\n getHalfStarVisible(rating: number): boolean {\r\n return Math.abs(rating % 1) > 0;\r\n }\r\n\r\n}\r\n",
+ "import {\r\n StarRatingConfig,\r\n starRatingColor,\r\n starRatingDirection,\r\n starRatingLabelPosition,\r\n starRatingSizes,\r\n starRatingSpeed,\r\n starRatingStarSpace,\r\n starRatingStarTypes\r\n} from '../interfaces/star-rating-config.interface';\r\nimport {StarRatingConfigService} from './star-rating-config.service';\r\nimport {StarRatingUtils} from './star-rating.utils';\r\n\r\nexport class StarRating {\r\n\r\n protected config: StarRatingConfig;\r\n\r\n //Inputs\r\n ///////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n /**\r\n * id property to identify the DOM element\r\n */\r\n protected _id: string;\r\n get id(): string {\r\n return this._id;\r\n }\r\n\r\n set id(value: string) {\r\n this._id = value || '';\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * focus\r\n */\r\n protected _focus: boolean;\r\n get focus(): boolean {\r\n return this._focus;\r\n }\r\n\r\n set focus(value: boolean) {\r\n this._focus = !!value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * labelText\r\n */\r\n protected _labelText: string;\r\n get labelText(): string {\r\n return this._labelText;\r\n }\r\n\r\n set labelText(value: string) {\r\n this._labelText = value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * labelPosition\r\n */\r\n protected _labelPosition: starRatingLabelPosition;\r\n get labelPosition(): starRatingLabelPosition {\r\n return this._labelPosition;\r\n }\r\n\r\n set labelPosition(value: starRatingLabelPosition) {\r\n this._labelPosition = value || this.config.labelPosition;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * labelVisible\r\n */\r\n protected _labelVisible: boolean;\r\n get labelVisible(): boolean {\r\n return this._labelVisible;\r\n }\r\n\r\n set labelVisible(value: boolean) {\r\n this._labelVisible = !!value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * hoverEnabled\r\n */\r\n protected _hoverEnabled: boolean;\r\n get hoverEnabled(): boolean {\r\n return this._hoverEnabled;\r\n }\r\n\r\n set hoverEnabled(value: boolean) {\r\n this._hoverEnabled = (value !== undefined) ? !!value : false;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * staticColor\r\n */\r\n protected _staticColor: starRatingColor;\r\n get staticColor(): starRatingColor {\r\n return this._staticColor;\r\n }\r\n\r\n set staticColor(value: starRatingColor) {\r\n this._staticColor = value || this.config.staticColor || undefined;\r\n\r\n //update color.\r\n this.setColor();\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * direction\r\n */\r\n protected _direction: starRatingDirection;\r\n get direction(): starRatingDirection {\r\n return this._direction;\r\n }\r\n\r\n set direction(value: starRatingDirection) {\r\n this._direction = value || undefined;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n\r\n /**\r\n * numOfStars\r\n */\r\n protected _numOfStars: number;\r\n get numOfStars(): number {\r\n return this._numOfStars;\r\n }\r\n\r\n set numOfStars(value: number) {\r\n this._numOfStars = (value > 0) ? value : this.config.numOfStars;\r\n\r\n //update stars array\r\n this.stars = StarRatingUtils.getStarsArray(this.numOfStars);\r\n\r\n //update color\r\n this.setColor();\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * hoverRating\r\n */\r\n protected _hoverRating: number;\r\n get hoverRating(): number {\r\n return this._hoverRating;\r\n }\r\n\r\n set hoverRating(value: number) {\r\n this._hoverRating = (value > 0) ? value : 0;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * speed\r\n */\r\n protected _speed: starRatingSpeed;\r\n get speed(): starRatingSpeed {\r\n return this._speed;\r\n }\r\n\r\n set speed(value: starRatingSpeed) {\r\n this._speed = value || this.config.speed;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * size\r\n */\r\n protected _size: starRatingSizes;\r\n get size(): starRatingSizes {\r\n return this._size || this.config.size;\r\n }\r\n\r\n set size(value: starRatingSizes) {\r\n this._size = value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * starType\r\n */\r\n protected _starType: starRatingStarTypes;\r\n get starType(): starRatingStarTypes {\r\n return this._starType || this.config.starType;\r\n }\r\n\r\n set starType(value: starRatingStarTypes) {\r\n this._starType = value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * space\r\n */\r\n protected _space: starRatingStarSpace;\r\n get space(): starRatingStarSpace {\r\n return this._space;\r\n }\r\n\r\n set space(value: starRatingStarSpace) {\r\n this._space = value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * readOnly\r\n */\r\n protected _readOnly: boolean;\r\n get readOnly(): boolean {\r\n return this._readOnly;\r\n }\r\n\r\n set readOnly(value: boolean) {\r\n this._readOnly = !!value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * disabled\r\n */\r\n protected _disabled: boolean;\r\n get disabled(): boolean {\r\n return this._disabled;\r\n }\r\n\r\n set disabled(value: boolean) {\r\n this._disabled = !!value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n private _step: number;\r\n get step(): number {\r\n return this._step;\r\n }\r\n\r\n set step(value: number) {\r\n this._step = (value > 0 ? value : 1);\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * rating\r\n */\r\n protected _rating: number;\r\n get rating(): number {\r\n return this._rating;\r\n }\r\n\r\n /**\r\n * setRating\r\n * I use a setter function instead of a set method to enable overrides for this function.\r\n * @param value\r\n */\r\n setRating(value: number) {\r\n //validate and apply newRating\r\n let newRating: number = 0;\r\n if (value >= 0\r\n && value <= this.numOfStars) {\r\n newRating = value;\r\n }\r\n\r\n //limit max value to max number of stars\r\n if (value > this.numOfStars) {\r\n newRating = this.numOfStars;\r\n }\r\n this._rating = newRating;\r\n\r\n //update ratingAsInteger. rating parsed to int for the value-[n] modifier\r\n this.ratingAsInteger = parseInt(this._rating.toString());\r\n\r\n //update halfStarsVisible\r\n this.setHalfStarVisible();\r\n\r\n //update calculated Color\r\n this.setColor();\r\n\r\n }\r\n\r\n set rating(value: number) {\r\n this.setRating(value);\r\n }\r\n\r\n /**\r\n * showHalfStars\r\n */\r\n protected _showHalfStars: boolean;\r\n get showHalfStars(): boolean {\r\n return this._showHalfStars;\r\n }\r\n\r\n set showHalfStars(value: boolean) {\r\n this._showHalfStars = !!value;\r\n\r\n //update halfStarVisible\r\n this.setHalfStarVisible();\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * getColor\r\n */\r\n getColor: (rating: number, numOfStars: number, staticColor?: starRatingColor) => starRatingColor;\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * getHalfStarVisible\r\n */\r\n getHalfStarVisible: (rating: number) => boolean;\r\n /////////////////////////////////////////////\r\n\r\n //CTRL ONLY\r\n ///////////////////////////////////////////////////////////////////////////////////////////\r\n classEmpty: string;\r\n classHalf: string;\r\n classFilled: string;\r\n\r\n pathEmpty: string;\r\n pathHalf: string;\r\n pathFilled: string;\r\n\r\n color: starRatingColor;\r\n stars: Array;\r\n ratingAsInteger: number;\r\n halfStarVisible: boolean;\r\n\r\n constructor(config: StarRatingConfigService) {\r\n\r\n this.config = config;\r\n\r\n //set default ctrl props\r\n this.classEmpty = this.config.classEmpty;\r\n this.classHalf = this.config.classHalf;\r\n this.classFilled = this.config.classFilled;\r\n this.pathEmpty = this.config.svgPathEmpty;\r\n this.pathHalf = this.config.svgPathHalf;\r\n this.pathFilled = this.config.svgPathFilled;\r\n\r\n //set default Component Inputs\r\n if ('getColor' in this.config && typeof this.config.getColor === \"function\") {\r\n this.getColor = this.config.getColor;\r\n }\r\n\r\n if ('getHalfStarVisible' in this.config && typeof this.config.getHalfStarVisible === \"function\") {\r\n this.getHalfStarVisible = this.config.getHalfStarVisible;\r\n }\r\n\r\n this.numOfStars = this.config.numOfStars;\r\n this.rating = 0;\r\n this.step = 1;\r\n\r\n }\r\n\r\n svgVisible(): boolean {\r\n return this.starType === \"svg\";\r\n }\r\n\r\n interactionPossible(): boolean {\r\n return !this.readOnly && !this.disabled;\r\n }\r\n\r\n setColor(): void {\r\n //check if custom function is given\r\n if (typeof this.getColor === \"function\") {\r\n this.color = this.getColor(this.rating, this.numOfStars, this.staticColor);\r\n }\r\n else {\r\n this.color = StarRatingUtils.getColor(this.rating, this.numOfStars, this.staticColor);\r\n }\r\n }\r\n\r\n setHalfStarVisible(): void {\r\n //update halfStarVisible\r\n if (this.showHalfStars) {\r\n //check if custom function is given\r\n if (typeof this.getHalfStarVisible === \"function\") {\r\n this.halfStarVisible = this.getHalfStarVisible(this.rating);\r\n } else {\r\n this.halfStarVisible = StarRatingUtils.getHalfStarVisible(this.rating);\r\n }\r\n\r\n }\r\n else {\r\n this.halfStarVisible = false;\r\n }\r\n }\r\n\r\n getComponentClassNames(): string {\r\n let classNames: string[] = [];\r\n\r\n classNames.push(this.rating ? 'value-' + this.ratingAsInteger : 'value-0');\r\n classNames.push(this.halfStarVisible ? 'half' : '');\r\n classNames.push(this.hoverEnabled ? 'hover' : '');\r\n\r\n let hoverRating = (this.hoverRating ? 'hover-' + this.hoverRating : 'hover-0');\r\n classNames.push(this.hoverEnabled ? hoverRating : '');\r\n\r\n classNames.push(this.space ? 'space-' + this.space : '');\r\n classNames.push(this.labelPosition ? 'label-' + this.labelPosition : '');\r\n classNames.push(this.color ? 'color-' + this.color : '');\r\n classNames.push(this.starType ? 'star-' + this.starType : '');\r\n classNames.push(this.speed);\r\n classNames.push(this.size);\r\n classNames.push(this.readOnly ? 'read-only' : '');\r\n classNames.push(this.disabled ? 'disabled' : '');\r\n classNames.push(this.direction ? 'direction-' + this.direction : '');\r\n\r\n return classNames.join(' ');\r\n }\r\n\r\n increment() {\r\n //increment to next higher step\r\n let absDiff = Math.abs(this.rating % this.step);\r\n this.rating = this.rating + (absDiff > 0 ? this.step - absDiff : this.step);\r\n }\r\n\r\n decrement() {\r\n //decrement to next lower step\r\n let absDiff = Math.abs(this.rating % this.step);\r\n this.rating = this.rating - (absDiff > 0 ? absDiff : this.step);\r\n }\r\n\r\n reset() {\r\n this.rating = 0;\r\n }\r\n\r\n}\r\n",
+ "import {starRatingColor} from '../interfaces/star-rating-config.interface';\r\nexport class StarRatingUtils {\r\n //Static methods\r\n ///////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n /*\r\n * getStarsArray\r\n *\r\n * returns an array of increasing numbers starting at 1\r\n *\r\n * @param numOfStars\r\n * @returns {Array}\r\n */\r\n static getStarsArray(numOfStars: number): Array {\r\n let stars: Array = [];\r\n for (let i = 0; i < numOfStars; i++) {\r\n stars.push(i + 1);\r\n }\r\n return stars;\r\n }\r\n\r\n /*\r\n * getHalfStarVisible\r\n *\r\n * Returns true if there should be a half star visible, and false if not.\r\n *\r\n * @param rating\r\n * @returns {boolean}\r\n */\r\n static getHalfStarVisible(rating: number): boolean {\r\n return Math.abs(rating % 1) > 0;\r\n }\r\n\r\n /*\r\n * getColor\r\n *\r\n * The default function for color calculation\r\n * based on the current rating and the the number of stars possible.\r\n * If a staticColor is set the function will use it as return value.\r\n *\r\n * @param rating\r\n * @param numOfStars\r\n * @param staticColor\r\n * @returns {starRatingColor}\r\n */\r\n static getColor(rating: number, numOfStars: number, staticColor?: starRatingColor): starRatingColor {\r\n rating = rating || 0;\r\n\r\n //if a fix color is set use this one\r\n if (staticColor) {\r\n return staticColor;\r\n }\r\n\r\n //calculate size of smallest fraction\r\n let fractionSize = numOfStars / 3;\r\n\r\n //apply color by fraction\r\n let color: starRatingColor = 'default';\r\n if (rating > 0) {\r\n color = 'negative';\r\n }\r\n if (rating > fractionSize) {\r\n color = 'ok';\r\n }\r\n if (rating > fractionSize * 2) {\r\n color = 'positive';\r\n }\r\n\r\n return color;\r\n }\r\n\r\n /*\r\n * isDigitKeyEventCode\r\n * detects digit key event sodes\r\n * @param eventCode\r\n * @returns {boolean}\r\n */\r\n static isDigitKeyEventCode(eventCode: string): boolean {\r\n return eventCode.indexOf('Digit') === 0;\r\n };\r\n\r\n}\r\n",
+ "export type starRatingSizes = 'small' | 'medium' | 'large';\r\nexport type starRatingColor = 'default' | 'negative' | 'ok' | 'positive';\r\nexport type starRatingSpeed = 'immediately' | 'noticeable' | 'slow';\r\nexport type starRatingLabelPosition = 'left' | 'right' | 'top' | 'bottom';\r\nexport type starRatingStarTypes = 'svg' | 'icon' | 'image';\r\nexport type starRatingStarSpace= 'no' | 'between' | 'around';\r\nexport type starRatingDirection= 'rtl' | 'ltr';\r\n\r\nexport class StarRatingConfig {\r\n // binding defaults\r\n numOfStars?: number;\r\n size?: starRatingSizes;\r\n speed?: starRatingSpeed;\r\n labelPosition?: starRatingLabelPosition;\r\n starType?: starRatingStarTypes;\r\n staticColor: starRatingColor;\r\n getColor?: (rating: number, numOfStars: number, staticColor?: starRatingColor)=> starRatingColor;\r\n getHalfStarVisible?:(rating: number) => boolean\r\n // statics\r\n classEmpty?: string;\r\n classHalf?: string;\r\n classFilled?: string;\r\n assetsPath?: string;\r\n svgPath?: string;\r\n svgEmptySymbolId?: string;\r\n svgHalfSymbolId?: string;\r\n svgFilledSymbolId?: string;\r\n svgPathEmpty?: string;\r\n svgPathHalf?: string;\r\n svgPathFilled?: string;\r\n}\r\n"
+ ],
+ "names": [],
+ "mappings": ";;;;;;;;AKQA,AAAA,MAAA,gBAAA,CAAA;CAsBC;;;;;;AD7BD,AAAA,MAAA,eAAA,CAAA;;;;;IAYI,OAAO,aAAa,CAAC,UAAkB,EAA3C;QACQ,qBAAI,KAAK,GAAkB,EAAE,CAAC;QAC9B,KAAK,qBAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,EAAE,EAAE;YACjC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;SACrB;QACD,OAAO,KAAK,CAAC;KAChB;;;;;IAUD,OAAO,kBAAkB,CAAC,MAAc,EAA5C;QACQ,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;KACnC;;;;;;;IAcD,OAAO,QAAQ,CAA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AA,EAAA,CAAU;gBACR,OAAO,EAAE,CAAC,YAAY,CAAC;gBACvB,YAAY,EAAE,CAAC,YAAY,CAAC;gBAC5B,OAAO,EAAE,CAAC,OAAO,CAAC;aACnB,EAAD,EAAA;;;;;;;;;;;;;;;;;;;;"
+}
diff --git a/@packaged/angular-star-rating/esm5/angular-star-rating.js b/@packaged/angular-star-rating/esm5/angular-star-rating.js
new file mode 100644
index 0000000..3d6888e
--- /dev/null
+++ b/@packaged/angular-star-rating/esm5/angular-star-rating.js
@@ -0,0 +1,739 @@
+import { __extends } from 'tslib';
+import { Component, EventEmitter, forwardRef, NgModule } from '@angular/core';
+import { NG_VALUE_ACCESSOR } from '@angular/forms';
+import { CommonModule } from '@angular/common';
+
+var StarRatingConfig = /** @class */ (function () {
+ function StarRatingConfig() {
+ }
+ return StarRatingConfig;
+}());
+var StarRatingUtils = /** @class */ (function () {
+ function StarRatingUtils() {
+ }
+ StarRatingUtils.getStarsArray = function (numOfStars) {
+ var stars = [];
+ for (var i = 0; i < numOfStars; i++) {
+ stars.push(i + 1);
+ }
+ return stars;
+ };
+ StarRatingUtils.getHalfStarVisible = function (rating) {
+ return Math.abs(rating % 1) > 0;
+ };
+ StarRatingUtils.getColor = function (rating, numOfStars, staticColor) {
+ rating = rating || 0;
+ if (staticColor) {
+ return staticColor;
+ }
+ var fractionSize = numOfStars / 3;
+ var color = 'default';
+ if (rating > 0) {
+ color = 'negative';
+ }
+ if (rating > fractionSize) {
+ color = 'ok';
+ }
+ if (rating > fractionSize * 2) {
+ color = 'positive';
+ }
+ return color;
+ };
+ StarRatingUtils.isDigitKeyEventCode = function (eventCode) {
+ return eventCode.indexOf('Digit') === 0;
+ };
+
+ return StarRatingUtils;
+}());
+var StarRating = /** @class */ (function () {
+ function StarRating(config) {
+ this.config = config;
+ this.classEmpty = this.config.classEmpty;
+ this.classHalf = this.config.classHalf;
+ this.classFilled = this.config.classFilled;
+ this.pathEmpty = this.config.svgPathEmpty;
+ this.pathHalf = this.config.svgPathHalf;
+ this.pathFilled = this.config.svgPathFilled;
+ if ('getColor' in this.config && typeof this.config.getColor === "function") {
+ this.getColor = this.config.getColor;
+ }
+ if ('getHalfStarVisible' in this.config && typeof this.config.getHalfStarVisible === "function") {
+ this.getHalfStarVisible = this.config.getHalfStarVisible;
+ }
+ this.numOfStars = this.config.numOfStars;
+ this.rating = 0;
+ this.step = 1;
+ }
+ Object.defineProperty(StarRating.prototype, "id", {
+ get: function () {
+ return this._id;
+ },
+ set: function (value) {
+ this._id = value || '';
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "focus", {
+ get: function () {
+ return this._focus;
+ },
+ set: function (value) {
+ this._focus = !!value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "labelText", {
+ get: function () {
+ return this._labelText;
+ },
+ set: function (value) {
+ this._labelText = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "labelPosition", {
+ get: function () {
+ return this._labelPosition;
+ },
+ set: function (value) {
+ this._labelPosition = value || this.config.labelPosition;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "labelVisible", {
+ get: function () {
+ return this._labelVisible;
+ },
+ set: function (value) {
+ this._labelVisible = !!value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "hoverEnabled", {
+ get: function () {
+ return this._hoverEnabled;
+ },
+ set: function (value) {
+ this._hoverEnabled = (value !== undefined) ? !!value : false;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "staticColor", {
+ get: function () {
+ return this._staticColor;
+ },
+ set: function (value) {
+ this._staticColor = value || this.config.staticColor || undefined;
+ this.setColor();
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "direction", {
+ get: function () {
+ return this._direction;
+ },
+ set: function (value) {
+ this._direction = value || undefined;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "numOfStars", {
+ get: function () {
+ return this._numOfStars;
+ },
+ set: function (value) {
+ this._numOfStars = (value > 0) ? value : this.config.numOfStars;
+ this.stars = StarRatingUtils.getStarsArray(this.numOfStars);
+ this.setColor();
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "hoverRating", {
+ get: function () {
+ return this._hoverRating;
+ },
+ set: function (value) {
+ this._hoverRating = (value > 0) ? value : 0;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "speed", {
+ get: function () {
+ return this._speed;
+ },
+ set: function (value) {
+ this._speed = value || this.config.speed;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "size", {
+ get: function () {
+ return this._size || this.config.size;
+ },
+ set: function (value) {
+ this._size = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "starType", {
+ get: function () {
+ return this._starType || this.config.starType;
+ },
+ set: function (value) {
+ this._starType = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "space", {
+ get: function () {
+ return this._space;
+ },
+ set: function (value) {
+ this._space = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "readOnly", {
+ get: function () {
+ return this._readOnly;
+ },
+ set: function (value) {
+ this._readOnly = !!value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "disabled", {
+ get: function () {
+ return this._disabled;
+ },
+ set: function (value) {
+ this._disabled = !!value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "step", {
+ get: function () {
+ return this._step;
+ },
+ set: function (value) {
+ this._step = (value > 0 ? value : 1);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRating.prototype, "rating", {
+ get: function () {
+ return this._rating;
+ },
+ set: function (value) {
+ this.setRating(value);
+ },
+ enumerable: true,
+ configurable: true
+ });
+ StarRating.prototype.setRating = function (value) {
+ var newRating = 0;
+ if (value >= 0
+ && value <= this.numOfStars) {
+ newRating = value;
+ }
+ if (value > this.numOfStars) {
+ newRating = this.numOfStars;
+ }
+ this._rating = newRating;
+ this.ratingAsInteger = parseInt(this._rating.toString());
+ this.setHalfStarVisible();
+ this.setColor();
+ };
+ Object.defineProperty(StarRating.prototype, "showHalfStars", {
+ get: function () {
+ return this._showHalfStars;
+ },
+ set: function (value) {
+ this._showHalfStars = !!value;
+ this.setHalfStarVisible();
+ },
+ enumerable: true,
+ configurable: true
+ });
+ StarRating.prototype.svgVisible = function () {
+ return this.starType === "svg";
+ };
+ StarRating.prototype.interactionPossible = function () {
+ return !this.readOnly && !this.disabled;
+ };
+ StarRating.prototype.setColor = function () {
+ if (typeof this.getColor === "function") {
+ this.color = this.getColor(this.rating, this.numOfStars, this.staticColor);
+ }
+ else {
+ this.color = StarRatingUtils.getColor(this.rating, this.numOfStars, this.staticColor);
+ }
+ };
+ StarRating.prototype.setHalfStarVisible = function () {
+ if (this.showHalfStars) {
+ if (typeof this.getHalfStarVisible === "function") {
+ this.halfStarVisible = this.getHalfStarVisible(this.rating);
+ }
+ else {
+ this.halfStarVisible = StarRatingUtils.getHalfStarVisible(this.rating);
+ }
+ }
+ else {
+ this.halfStarVisible = false;
+ }
+ };
+ StarRating.prototype.getComponentClassNames = function () {
+ var classNames = [];
+ classNames.push(this.rating ? 'value-' + this.ratingAsInteger : 'value-0');
+ classNames.push(this.halfStarVisible ? 'half' : '');
+ classNames.push(this.hoverEnabled ? 'hover' : '');
+ var hoverRating = (this.hoverRating ? 'hover-' + this.hoverRating : 'hover-0');
+ classNames.push(this.hoverEnabled ? hoverRating : '');
+ classNames.push(this.space ? 'space-' + this.space : '');
+ classNames.push(this.labelPosition ? 'label-' + this.labelPosition : '');
+ classNames.push(this.color ? 'color-' + this.color : '');
+ classNames.push(this.starType ? 'star-' + this.starType : '');
+ classNames.push(this.speed);
+ classNames.push(this.size);
+ classNames.push(this.readOnly ? 'read-only' : '');
+ classNames.push(this.disabled ? 'disabled' : '');
+ classNames.push(this.direction ? 'direction-' + this.direction : '');
+ return classNames.join(' ');
+ };
+ StarRating.prototype.increment = function () {
+ var absDiff = Math.abs(this.rating % this.step);
+ this.rating = this.rating + (absDiff > 0 ? this.step - absDiff : this.step);
+ };
+ StarRating.prototype.decrement = function () {
+ var absDiff = Math.abs(this.rating % this.step);
+ this.rating = this.rating - (absDiff > 0 ? absDiff : this.step);
+ };
+ StarRating.prototype.reset = function () {
+ this.rating = 0;
+ };
+ return StarRating;
+}());
+var StarRatingConfigService = /** @class */ (function () {
+ function StarRatingConfigService() {
+ this._classEmpty = "default-star-empty-icon";
+ this._classHalf = "default-star-half-icon";
+ this._classFilled = "default-star-filled-icon";
+ this._numOfStars = 5;
+ this._size = "medium";
+ this._labelPosition = "left";
+ this._speed = "noticeable";
+ this._starType = "svg";
+ this._assetsPath = "assets/images/";
+ this._svgPath = this.assetsPath + "star-rating.icons.svg";
+ this._svgEmptySymbolId = "star-empty";
+ this._svgHalfSymbolId = "star-half";
+ this._svgFilledSymbolId = "star-filled";
+ this._svgPathEmpty = this.svgPath + "#" + this.svgEmptySymbolId;
+ this._svgPathHalf = this.svgPath + "#" + this.svgHalfSymbolId;
+ this._svgPathFilled = this.svgPath + "#" + this.svgFilledSymbolId;
+ }
+ Object.defineProperty(StarRatingConfigService.prototype, "classEmpty", {
+ get: function () {
+ return this._classEmpty;
+ },
+ set: function (classEmpty) {
+ this._classEmpty = classEmpty;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "classHalf", {
+ get: function () {
+ return this._classHalf;
+ },
+ set: function (classHalf) {
+ this._classHalf = classHalf;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "classFilled", {
+ get: function () {
+ return this._classFilled;
+ },
+ set: function (classFilled) {
+ this._classFilled = classFilled;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "numOfStars", {
+ get: function () {
+ return this._numOfStars;
+ },
+ set: function (numOfStars) {
+ this._numOfStars = numOfStars;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "size", {
+ get: function () {
+ return this._size;
+ },
+ set: function (size) {
+ this._size = size;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "staticColor", {
+ get: function () {
+ return this._staticColor;
+ },
+ set: function (value) {
+ this._staticColor = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "labelPosition", {
+ get: function () {
+ return this._labelPosition;
+ },
+ set: function (labelPosition) {
+ this._labelPosition = labelPosition;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "speed", {
+ get: function () {
+ return this._speed;
+ },
+ set: function (speed) {
+ this._speed = speed;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "starType", {
+ get: function () {
+ return this._starType;
+ },
+ set: function (starType) {
+ this._starType = starType;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "assetsPath", {
+ get: function () {
+ return this._assetsPath;
+ },
+ set: function (assetsPath) {
+ this._assetsPath = assetsPath;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "svgPath", {
+ get: function () {
+ return this._svgPath;
+ },
+ set: function (svgPath) {
+ this._svgPath = svgPath;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "svgEmptySymbolId", {
+ get: function () {
+ return this._svgEmptySymbolId;
+ },
+ set: function (svgEmptySymbolId) {
+ this._svgEmptySymbolId = svgEmptySymbolId;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "svgHalfSymbolId", {
+ get: function () {
+ return this._svgHalfSymbolId;
+ },
+ set: function (svgHalfSymbolId) {
+ this._svgHalfSymbolId = svgHalfSymbolId;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "svgFilledSymbolId", {
+ get: function () {
+ return this._svgFilledSymbolId;
+ },
+ set: function (svgFilledSymbolId) {
+ this._svgFilledSymbolId = svgFilledSymbolId;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "svgPathEmpty", {
+ get: function () {
+ return this._svgPathEmpty;
+ },
+ set: function (svgPathEmpty) {
+ this._svgPathEmpty = svgPathEmpty;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "svgPathHalf", {
+ get: function () {
+ return this._svgPathHalf;
+ },
+ set: function (svgPathHalf) {
+ this._svgPathHalf = svgPathHalf;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(StarRatingConfigService.prototype, "svgPathFilled", {
+ get: function () {
+ return this._svgPathFilled;
+ },
+ set: function (svgPathFilled) {
+ this._svgPathFilled = svgPathFilled;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ StarRatingConfigService.prototype.getColor = function (rating, numOfStars, staticColor) {
+ rating = rating || 0;
+ if (staticColor) {
+ return staticColor;
+ }
+ var fractionSize = numOfStars / 3;
+ var color = 'default';
+ if (rating > 0) {
+ color = 'negative';
+ }
+ if (rating > fractionSize) {
+ color = 'ok';
+ }
+ if (rating > fractionSize * 2) {
+ color = 'positive';
+ }
+ return color;
+ };
+ StarRatingConfigService.prototype.getHalfStarVisible = function (rating) {
+ return Math.abs(rating % 1) > 0;
+ };
+ return StarRatingConfigService;
+}());
+var STAR_RATING_CONTROL_ACCESSOR = {
+ provide: NG_VALUE_ACCESSOR,
+ useExisting: forwardRef(function () { return StarRatingComponent; }),
+ multi: true
+};
+var StarRatingComponent = /** @class */ (function (_super) {
+ __extends(StarRatingComponent, _super);
+ function StarRatingComponent(config) {
+ var _this = _super.call(this, config) || this;
+ _this.clickEmitter = new EventEmitter();
+ _this.ratingChangeEmitter = new EventEmitter();
+ _this.hoverRatingChangeEmitter = new EventEmitter();
+ _this.onModelChangeRegistered = false;
+ _this.onTouchRegistered = false;
+ return _this;
+ }
+ StarRatingComponent.prototype.saveOnClick = function ($event) {
+ if (this.clickEmitter) {
+ this.clickEmitter.emit($event);
+ }
+ };
+ StarRatingComponent.prototype.saveOnRatingChange = function ($event) {
+ if (this.ratingChangeEmitter) {
+ this.ratingChangeEmitter.emit($event);
+ }
+ };
+ StarRatingComponent.prototype.saveOnHover = function ($event) {
+ if (this.hoverRatingChangeEmitter) {
+ this.hoverRatingChangeEmitter.emit($event);
+ }
+ };
+ StarRatingComponent.prototype.saveOnTouch = function () {
+ if (this.onTouchRegistered) {
+ this.onTouch();
+ }
+ };
+ StarRatingComponent.prototype.saveOnModelChange = function (value) {
+ if (this.onModelChangeRegistered) {
+ this.onModelChange(value);
+ }
+ };
+ StarRatingComponent.prototype.onKeyDown = function (event) {
+ var _this = this;
+ if (!this.interactionPossible()) {
+ return;
+ }
+ var handlers = {
+ Minus: function () { return _this.decrement(); },
+ ArrowDown: function () { return _this.decrement(); },
+ ArrowLeft: function () { return _this.decrement(); },
+ Plus: function () { return _this.increment(); },
+ ArrowRight: function () { return _this.increment(); },
+ ArrowUp: function () { return _this.increment(); },
+ Backspace: function () { return _this.reset(); },
+ Delete: function () { return _this.reset(); },
+ Digit0: function () { return _this.reset(); }
+ };
+ var handleDigits = function (eventCode) {
+ var dStr = "Digit";
+ var digit = parseInt(eventCode.substr(dStr.length, eventCode.length - 1));
+ _this.rating = digit;
+ };
+ if (handlers[event['code']] || StarRatingUtils.isDigitKeyEventCode(event['code'])) {
+ if (StarRatingUtils.isDigitKeyEventCode(event['code'])) {
+ handleDigits(event['code']);
+ }
+ else {
+ handlers[event['code']]();
+ }
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ this.saveOnTouch();
+ };
+ StarRatingComponent.prototype.onBlur = function (event) {
+ this.focus = false;
+ event.preventDefault();
+ event.stopPropagation();
+ this.saveOnTouch();
+ };
+ StarRatingComponent.prototype.onFocus = function (event) {
+ this.focus = true;
+ event.preventDefault();
+ event.stopPropagation();
+ this.saveOnTouch();
+ };
+ StarRatingComponent.prototype.onStarHover = function (rating) {
+ if (!this.interactionPossible() || !this.hoverEnabled) {
+ return;
+ }
+ this.hoverRating = rating ? parseInt(rating.toString()) : 0;
+ var $event = { hoverRating: this.hoverRating };
+ this.saveOnHover($event);
+ };
+ StarRatingComponent.prototype.writeValue = function (obj) {
+ this.rating = obj;
+ };
+ StarRatingComponent.prototype.registerOnChange = function (fn) {
+ this.onModelChange = fn;
+ this.onModelChangeRegistered = true;
+ };
+ StarRatingComponent.prototype.registerOnTouched = function (fn) {
+ this.onTouch = fn;
+ this.onTouchRegistered = true;
+ };
+ StarRatingComponent.prototype.setRating = function (value) {
+ var initValue = this.rating;
+ _super.prototype.setRating.call(this, value);
+ if (initValue !== this.rating) {
+ var $event = { rating: this.rating };
+ this.saveOnRatingChange($event);
+ this.saveOnModelChange(this.rating);
+ }
+ };
+
+ StarRatingComponent.prototype.onStarClicked = function (rating) {
+ if (!this.interactionPossible()) {
+ return;
+ }
+ this.rating = rating;
+ var onClickEventObject = {
+ rating: this.rating
+ };
+ this.saveOnClick(onClickEventObject);
+ };
+ return StarRatingComponent;
+}(StarRating));
+StarRatingComponent.decorators = [
+ { type: Component, args: [{
+ selector: 'star-rating-comp',
+ providers: [STAR_RATING_CONTROL_ACCESSOR],
+ inputs: [
+ 'getHalfStarVisible',
+ 'getColor',
+ 'showHalfStars',
+ 'hoverEnabled',
+ 'rating',
+ 'step',
+ 'disabled',
+ 'readOnly',
+ 'space',
+ 'starType',
+ 'size',
+ 'speed',
+ 'numOfStars',
+ 'direction',
+ 'staticColor',
+ 'labelPosition',
+ 'labelText',
+ 'id'
+ ],
+ outputs: [
+ 'clickEmitter',
+ 'ratingChangeEmitter',
+ 'hoverRatingChangeEmitter'
+ ],
+ styles: [],
+ template: "\n asfasfdasf
{{labelText}}
\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
"
+ },] },
+];
+StarRatingComponent.ctorParameters = function () { return [
+ { type: StarRatingConfigService, },
+]; };
+var DECLARATIONS = [StarRatingComponent];
+var EXPORTS = [DECLARATIONS];
+var StarRatingModule = /** @class */ (function () {
+ function StarRatingModule() {
+ }
+ StarRatingModule.forRoot = function () {
+ return {
+ ngModule: StarRatingModule,
+ providers: [
+ StarRatingConfigService
+ ]
+ };
+ };
+ StarRatingModule.forChild = function () {
+ return {
+ ngModule: StarRatingModule,
+ providers: []
+ };
+ };
+ return StarRatingModule;
+}());
+StarRatingModule.decorators = [
+ { type: NgModule, args: [{
+ imports: [CommonModule],
+ declarations: [DECLARATIONS],
+ exports: [EXPORTS]
+ },] },
+];
+StarRatingModule.ctorParameters = function () { return []; };
+
+export { StarRatingConfig, StarRatingUtils, StarRating, StarRatingConfigService, StarRatingComponent, StarRatingModule };
+//# sourceMappingURL=angular-star-rating.js.map
diff --git a/@packaged/angular-star-rating/esm5/angular-star-rating.js.map b/@packaged/angular-star-rating/esm5/angular-star-rating.js.map
new file mode 100644
index 0000000..b694366
--- /dev/null
+++ b/@packaged/angular-star-rating/esm5/angular-star-rating.js.map
@@ -0,0 +1,24 @@
+{
+ "version": 3,
+ "file": "angular-star-rating.js",
+ "sources": [
+ "ng://angular-star-rating/out/src/angular-star-rating.module.ts",
+ "ng://angular-star-rating/out/src/components/star-rating.component.ts",
+ "ng://angular-star-rating/out/src/services/star-rating-config.service.ts",
+ "ng://angular-star-rating/out/src/services/star-rating.ts",
+ "ng://angular-star-rating/out/src/services/star-rating.utils.ts",
+ "ng://angular-star-rating/out/src/interfaces/star-rating-config.interface.ts"
+ ],
+ "sourcesContent": [
+ "import {CommonModule} from '@angular/common';\nimport {ModuleWithProviders, NgModule} from '@angular/core';\nimport {StarRatingComponent} from './components/star-rating.component';\nimport {StarRatingConfigService} from './services/star-rating-config.service';\n\nconst DECLARATIONS = [StarRatingComponent];\nconst EXPORTS = [DECLARATIONS];\n\n@NgModule({\n imports: [CommonModule],\n declarations: [DECLARATIONS],\n exports: [EXPORTS]\n})\nexport class StarRatingModule {\n static forRoot(): ModuleWithProviders {\n return {\n ngModule: StarRatingModule,\n providers: [\n StarRatingConfigService\n ]\n }\n }\n\n static forChild(): ModuleWithProviders {\n return {\n ngModule: StarRatingModule,\n providers: []\n }\n }\n}\n",
+ "import {Component, EventEmitter, forwardRef, Input} from '@angular/core';\r\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\r\nimport {ClickEvent} from '../interfaces/click-event.interface';\r\nimport {HoverRatingChangeEvent} from '../interfaces/hover-rating-change-event.interface';\r\nimport {RatingChangeEvent} from '../interfaces/rating-change-event.interface';\r\nimport {StarRating} from '../services/star-rating';\r\nimport {StarRatingConfigService} from '../services/star-rating-config.service';\r\nimport {StarRatingUtils} from '../services/star-rating.utils';\r\n\r\nconst STAR_RATING_CONTROL_ACCESSOR = {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => StarRatingComponent),\r\n multi: true\r\n};\r\n\r\n@Component({\r\n selector: 'star-rating-comp',\r\n providers: [STAR_RATING_CONTROL_ACCESSOR],\r\n inputs: [\r\n 'getHalfStarVisible'\r\n , 'getColor'\r\n , 'showHalfStars'\r\n , 'hoverEnabled'\r\n , 'rating'\r\n , 'step'\r\n , 'disabled'\r\n , 'readOnly'\r\n , 'space'\r\n , 'starType'\r\n , 'size'\r\n , 'speed'\r\n , 'numOfStars'\r\n , 'direction'\r\n , 'staticColor'\r\n //, 'labelVisible'\r\n , 'labelPosition'\r\n , 'labelText'\r\n , 'id'\r\n ],\r\n outputs: [\r\n 'clickEmitter'\r\n , 'ratingChangeEmitter'\r\n , 'hoverRatingChangeEmitter'\r\n ],\r\n styles: [],\r\n template: `\r\n
{{labelText}}
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
`\r\n})\r\nexport class StarRatingComponent extends StarRating implements ControlValueAccessor {\r\n\r\n //Outputs\r\n ///////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n clickEmitter: EventEmitter = new EventEmitter();\r\n\r\n saveOnClick($event: ClickEvent) {\r\n if (this.clickEmitter) {\r\n this.clickEmitter.emit($event);\r\n }\r\n }\r\n\r\n ratingChangeEmitter: EventEmitter = new EventEmitter();\r\n\r\n saveOnRatingChange($event: RatingChangeEvent) {\r\n if (this.ratingChangeEmitter) {\r\n this.ratingChangeEmitter.emit($event);\r\n }\r\n }\r\n\r\n hoverRatingChangeEmitter: EventEmitter = new EventEmitter();\r\n\r\n saveOnHover($event: HoverRatingChangeEvent) {\r\n if (this.hoverRatingChangeEmitter) {\r\n this.hoverRatingChangeEmitter.emit($event);\r\n }\r\n }\r\n\r\n onTouch: Function;\r\n onModelChange: Function;\r\n private onModelChangeRegistered: boolean = false;\r\n private onTouchRegistered: boolean = false;\r\n\r\n saveOnTouch() {\r\n if (this.onTouchRegistered) {\r\n this.onTouch();\r\n }\r\n }\r\n\r\n saveOnModelChange(value: number) {\r\n if (this.onModelChangeRegistered) {\r\n this.onModelChange(value);\r\n }\r\n }\r\n\r\n /**ACCESSIBILITY **/\r\n\r\n //Keyboard events\r\n onKeyDown(event: KeyboardEvent) {\r\n\r\n if (!this.interactionPossible()) {\r\n return;\r\n }\r\n\r\n const handlers: any = {\r\n //Decrement\r\n Minus: () => this.decrement(),\r\n ArrowDown: () => this.decrement(),\r\n ArrowLeft: () => this.decrement(),\r\n\r\n //Increment\r\n Plus: () => this.increment(),\r\n ArrowRight: () => this.increment(),\r\n ArrowUp: () => this.increment(),\r\n\r\n //Reset\r\n Backspace: () => this.reset(),\r\n Delete: () => this.reset(),\r\n Digit0: () => this.reset()\r\n };\r\n\r\n const handleDigits = (eventCode: string): void => {\r\n let dStr = \"Digit\";\r\n let digit: number = parseInt(eventCode.substr(dStr.length, eventCode.length - 1));\r\n this.rating = digit;\r\n };\r\n\r\n if (handlers[event['code']] || StarRatingUtils.isDigitKeyEventCode(event['code'])) {\r\n if (StarRatingUtils.isDigitKeyEventCode(event['code'])) {\r\n handleDigits(event['code']);\r\n } else {\r\n handlers[event['code']]();\r\n }\r\n event.preventDefault();\r\n event.stopPropagation();\r\n }\r\n\r\n this.saveOnTouch();\r\n }\r\n\r\n //Focus events\r\n onBlur(event: FocusEvent) {\r\n this.focus = false;\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this.saveOnTouch();\r\n }\r\n\r\n onFocus(event: FocusEvent) {\r\n this.focus = true;\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this.saveOnTouch();\r\n }\r\n\r\n //Hover events\r\n onStarHover(rating?: number): void {\r\n\r\n if (!this.interactionPossible() || !this.hoverEnabled) {\r\n return;\r\n }\r\n\r\n this.hoverRating = rating ? parseInt(rating.toString()) : 0;\r\n\r\n //fire onHoverRatingChange event\r\n let $event: HoverRatingChangeEvent = {hoverRating: this.hoverRating};\r\n this.saveOnHover($event);\r\n\r\n\r\n }\r\n\r\n /**Form Control - ControlValueAccessor implementation**/\r\n\r\n writeValue(obj: any): void {\r\n this.rating = obj;\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onModelChange = fn;\r\n this.onModelChangeRegistered = true;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouch = fn;\r\n this.onTouchRegistered = true;\r\n }\r\n\r\n constructor(config: StarRatingConfigService) {\r\n super(config);\r\n }\r\n\r\n //Overrides\r\n setRating(value: number): void {\r\n let initValue = this.rating;\r\n super.setRating(value);\r\n\r\n //if value changed trigger valueAccessor events and outputs\r\n if (initValue !== this.rating) {\r\n let $event: RatingChangeEvent = {rating: this.rating};\r\n this.saveOnRatingChange($event);\r\n\r\n this.saveOnModelChange(this.rating);\r\n }\r\n\r\n };\r\n\r\n /**\r\n * onStarClicked\r\n *\r\n * Is fired when a star is clicked. And updated the rating value.\r\n * This function returns if the disabled or readOnly\r\n * property is set. If provided it emits the onClick event\r\n * handler with the actual rating value.\r\n *\r\n * @param rating\r\n */\r\n onStarClicked(rating: number): void {\r\n\r\n //fire onClick event\r\n if (!this.interactionPossible()) {\r\n return;\r\n }\r\n\r\n this.rating = rating;\r\n\r\n let onClickEventObject: ClickEvent = {\r\n rating: this.rating\r\n };\r\n this.saveOnClick(onClickEventObject);\r\n\r\n }\r\n\r\n}\r\n",
+ "import {\r\n StarRatingConfig,\r\n starRatingColor,\r\n starRatingSizes,\r\n starRatingSpeed,\r\n starRatingStarTypes,\r\n starRatingLabelPosition\r\n} from '../interfaces/star-rating-config.interface';\r\n\r\n/**\r\n * Configuration service for the StarRating component.\r\n * You can inject this service, typically in your root component, and customize the values of its properties in\r\n * order to provide default values for all the star ratings used in the application.\r\n */\r\nexport class StarRatingConfigService implements StarRatingConfig {\r\n\r\n _classEmpty = \"default-star-empty-icon\";\r\n\r\n get classEmpty() {\r\n return this._classEmpty;\r\n }\r\n\r\n set classEmpty(classEmpty: string) {\r\n this._classEmpty = classEmpty;\r\n }\r\n\r\n private _classHalf = \"default-star-half-icon\";\r\n\r\n get classHalf(): string {\r\n return this._classHalf;\r\n }\r\n\r\n set classHalf(classHalf: string) {\r\n this._classHalf = classHalf;\r\n }\r\n\r\n private _classFilled = \"default-star-filled-icon\";\r\n\r\n get classFilled(): string {\r\n return this._classFilled;\r\n }\r\n\r\n set classFilled(classFilled: string) {\r\n this._classFilled = classFilled;\r\n }\r\n\r\n private _numOfStars = 5;\r\n\r\n get numOfStars(): number {\r\n return this._numOfStars;\r\n }\r\n\r\n set numOfStars(numOfStars: number) {\r\n this._numOfStars = numOfStars;\r\n }\r\n\r\n private _size: starRatingSizes = \"medium\";\r\n\r\n get size(): starRatingSizes {\r\n return this._size;\r\n }\r\n\r\n set size(size: starRatingSizes) {\r\n this._size = size;\r\n }\r\n\r\n private _staticColor: starRatingColor;\r\n\r\n get staticColor(): starRatingColor {\r\n return this._staticColor;\r\n }\r\n\r\n set staticColor(value: starRatingColor) {\r\n this._staticColor = value;\r\n }\r\n\r\n private _labelPosition: starRatingLabelPosition = \"left\";\r\n\r\n get labelPosition(): starRatingLabelPosition {\r\n return this._labelPosition;\r\n }\r\n\r\n set labelPosition(labelPosition: starRatingLabelPosition) {\r\n this._labelPosition = labelPosition;\r\n }\r\n\r\n private _speed: starRatingSpeed = \"noticeable\";\r\n\r\n get speed(): starRatingSpeed {\r\n return this._speed;\r\n }\r\n\r\n set speed(speed: starRatingSpeed) {\r\n this._speed = speed;\r\n }\r\n\r\n private _starType: starRatingStarTypes = \"svg\";\r\n\r\n get starType(): starRatingStarTypes {\r\n return this._starType;\r\n }\r\n\r\n set starType(starType: starRatingStarTypes) {\r\n this._starType = starType;\r\n }\r\n\r\n private _assetsPath = \"assets/images/\";\r\n\r\n get assetsPath(): string {\r\n return this._assetsPath;\r\n }\r\n\r\n set assetsPath(assetsPath: string) {\r\n this._assetsPath = assetsPath;\r\n }\r\n\r\n private _svgPath = this.assetsPath + \"star-rating.icons.svg\";\r\n\r\n get svgPath(): string {\r\n return this._svgPath;\r\n }\r\n\r\n set svgPath(svgPath: string) {\r\n this._svgPath = svgPath;\r\n }\r\n\r\n private _svgEmptySymbolId = \"star-empty\";\r\n\r\n get svgEmptySymbolId(): string {\r\n return this._svgEmptySymbolId;\r\n }\r\n\r\n set svgEmptySymbolId(svgEmptySymbolId: string) {\r\n this._svgEmptySymbolId = svgEmptySymbolId;\r\n }\r\n\r\n private _svgHalfSymbolId = \"star-half\";\r\n\r\n get svgHalfSymbolId(): string {\r\n return this._svgHalfSymbolId;\r\n }\r\n\r\n set svgHalfSymbolId(svgHalfSymbolId: string) {\r\n this._svgHalfSymbolId = svgHalfSymbolId;\r\n }\r\n\r\n private _svgFilledSymbolId = \"star-filled\";\r\n\r\n get svgFilledSymbolId(): string {\r\n return this._svgFilledSymbolId;\r\n }\r\n\r\n set svgFilledSymbolId(svgFilledSymbolId: string) {\r\n this._svgFilledSymbolId = svgFilledSymbolId;\r\n }\r\n\r\n private _svgPathEmpty: string = this.svgPath + \"#\" + this.svgEmptySymbolId;\r\n\r\n get svgPathEmpty(): string {\r\n return this._svgPathEmpty;\r\n }\r\n\r\n set svgPathEmpty(svgPathEmpty: string) {\r\n this._svgPathEmpty = svgPathEmpty;\r\n }\r\n\r\n private _svgPathHalf: string = this.svgPath + \"#\" + this.svgHalfSymbolId;\r\n\r\n get svgPathHalf(): string {\r\n return this._svgPathHalf;\r\n }\r\n\r\n set svgPathHalf(svgPathHalf: string) {\r\n this._svgPathHalf = svgPathHalf;\r\n }\r\n\r\n private _svgPathFilled: string = this.svgPath + \"#\" + this.svgFilledSymbolId;\r\n\r\n get svgPathFilled(): string {\r\n return this._svgPathFilled;\r\n }\r\n\r\n set svgPathFilled(svgPathFilled: string) {\r\n this._svgPathFilled = svgPathFilled;\r\n }\r\n\r\n getColor(rating: number, numOfStars: number, staticColor?: starRatingColor): starRatingColor {\r\n rating = rating || 0;\r\n\r\n // if a fix color is set use this one\r\n if (staticColor) {\r\n return staticColor;\r\n }\r\n\r\n // calculate size of smallest fraction\r\n const fractionSize = numOfStars / 3;\r\n\r\n // apply color by fraction\r\n let color: starRatingColor = 'default';\r\n if (rating > 0) {\r\n color = 'negative';\r\n }\r\n if (rating > fractionSize) {\r\n color = 'ok';\r\n }\r\n if (rating > fractionSize * 2) {\r\n color = 'positive';\r\n }\r\n\r\n return color;\r\n }\r\n\r\n getHalfStarVisible(rating: number): boolean {\r\n return Math.abs(rating % 1) > 0;\r\n }\r\n\r\n}\r\n",
+ "import {\r\n StarRatingConfig,\r\n starRatingColor,\r\n starRatingDirection,\r\n starRatingLabelPosition,\r\n starRatingSizes,\r\n starRatingSpeed,\r\n starRatingStarSpace,\r\n starRatingStarTypes\r\n} from '../interfaces/star-rating-config.interface';\r\nimport {StarRatingConfigService} from './star-rating-config.service';\r\nimport {StarRatingUtils} from './star-rating.utils';\r\n\r\nexport class StarRating {\r\n\r\n protected config: StarRatingConfig;\r\n\r\n //Inputs\r\n ///////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n /**\r\n * id property to identify the DOM element\r\n */\r\n protected _id: string;\r\n get id(): string {\r\n return this._id;\r\n }\r\n\r\n set id(value: string) {\r\n this._id = value || '';\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * focus\r\n */\r\n protected _focus: boolean;\r\n get focus(): boolean {\r\n return this._focus;\r\n }\r\n\r\n set focus(value: boolean) {\r\n this._focus = !!value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * labelText\r\n */\r\n protected _labelText: string;\r\n get labelText(): string {\r\n return this._labelText;\r\n }\r\n\r\n set labelText(value: string) {\r\n this._labelText = value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * labelPosition\r\n */\r\n protected _labelPosition: starRatingLabelPosition;\r\n get labelPosition(): starRatingLabelPosition {\r\n return this._labelPosition;\r\n }\r\n\r\n set labelPosition(value: starRatingLabelPosition) {\r\n this._labelPosition = value || this.config.labelPosition;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * labelVisible\r\n */\r\n protected _labelVisible: boolean;\r\n get labelVisible(): boolean {\r\n return this._labelVisible;\r\n }\r\n\r\n set labelVisible(value: boolean) {\r\n this._labelVisible = !!value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * hoverEnabled\r\n */\r\n protected _hoverEnabled: boolean;\r\n get hoverEnabled(): boolean {\r\n return this._hoverEnabled;\r\n }\r\n\r\n set hoverEnabled(value: boolean) {\r\n this._hoverEnabled = (value !== undefined) ? !!value : false;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * staticColor\r\n */\r\n protected _staticColor: starRatingColor;\r\n get staticColor(): starRatingColor {\r\n return this._staticColor;\r\n }\r\n\r\n set staticColor(value: starRatingColor) {\r\n this._staticColor = value || this.config.staticColor || undefined;\r\n\r\n //update color.\r\n this.setColor();\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * direction\r\n */\r\n protected _direction: starRatingDirection;\r\n get direction(): starRatingDirection {\r\n return this._direction;\r\n }\r\n\r\n set direction(value: starRatingDirection) {\r\n this._direction = value || undefined;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n\r\n /**\r\n * numOfStars\r\n */\r\n protected _numOfStars: number;\r\n get numOfStars(): number {\r\n return this._numOfStars;\r\n }\r\n\r\n set numOfStars(value: number) {\r\n this._numOfStars = (value > 0) ? value : this.config.numOfStars;\r\n\r\n //update stars array\r\n this.stars = StarRatingUtils.getStarsArray(this.numOfStars);\r\n\r\n //update color\r\n this.setColor();\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * hoverRating\r\n */\r\n protected _hoverRating: number;\r\n get hoverRating(): number {\r\n return this._hoverRating;\r\n }\r\n\r\n set hoverRating(value: number) {\r\n this._hoverRating = (value > 0) ? value : 0;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * speed\r\n */\r\n protected _speed: starRatingSpeed;\r\n get speed(): starRatingSpeed {\r\n return this._speed;\r\n }\r\n\r\n set speed(value: starRatingSpeed) {\r\n this._speed = value || this.config.speed;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * size\r\n */\r\n protected _size: starRatingSizes;\r\n get size(): starRatingSizes {\r\n return this._size || this.config.size;\r\n }\r\n\r\n set size(value: starRatingSizes) {\r\n this._size = value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * starType\r\n */\r\n protected _starType: starRatingStarTypes;\r\n get starType(): starRatingStarTypes {\r\n return this._starType || this.config.starType;\r\n }\r\n\r\n set starType(value: starRatingStarTypes) {\r\n this._starType = value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * space\r\n */\r\n protected _space: starRatingStarSpace;\r\n get space(): starRatingStarSpace {\r\n return this._space;\r\n }\r\n\r\n set space(value: starRatingStarSpace) {\r\n this._space = value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * readOnly\r\n */\r\n protected _readOnly: boolean;\r\n get readOnly(): boolean {\r\n return this._readOnly;\r\n }\r\n\r\n set readOnly(value: boolean) {\r\n this._readOnly = !!value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * disabled\r\n */\r\n protected _disabled: boolean;\r\n get disabled(): boolean {\r\n return this._disabled;\r\n }\r\n\r\n set disabled(value: boolean) {\r\n this._disabled = !!value;\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n private _step: number;\r\n get step(): number {\r\n return this._step;\r\n }\r\n\r\n set step(value: number) {\r\n this._step = (value > 0 ? value : 1);\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * rating\r\n */\r\n protected _rating: number;\r\n get rating(): number {\r\n return this._rating;\r\n }\r\n\r\n /**\r\n * setRating\r\n * I use a setter function instead of a set method to enable overrides for this function.\r\n * @param value\r\n */\r\n setRating(value: number) {\r\n //validate and apply newRating\r\n let newRating: number = 0;\r\n if (value >= 0\r\n && value <= this.numOfStars) {\r\n newRating = value;\r\n }\r\n\r\n //limit max value to max number of stars\r\n if (value > this.numOfStars) {\r\n newRating = this.numOfStars;\r\n }\r\n this._rating = newRating;\r\n\r\n //update ratingAsInteger. rating parsed to int for the value-[n] modifier\r\n this.ratingAsInteger = parseInt(this._rating.toString());\r\n\r\n //update halfStarsVisible\r\n this.setHalfStarVisible();\r\n\r\n //update calculated Color\r\n this.setColor();\r\n\r\n }\r\n\r\n set rating(value: number) {\r\n this.setRating(value);\r\n }\r\n\r\n /**\r\n * showHalfStars\r\n */\r\n protected _showHalfStars: boolean;\r\n get showHalfStars(): boolean {\r\n return this._showHalfStars;\r\n }\r\n\r\n set showHalfStars(value: boolean) {\r\n this._showHalfStars = !!value;\r\n\r\n //update halfStarVisible\r\n this.setHalfStarVisible();\r\n }\r\n\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * getColor\r\n */\r\n getColor: (rating: number, numOfStars: number, staticColor?: starRatingColor) => starRatingColor;\r\n /////////////////////////////////////////////\r\n\r\n /**\r\n * getHalfStarVisible\r\n */\r\n getHalfStarVisible: (rating: number) => boolean;\r\n /////////////////////////////////////////////\r\n\r\n //CTRL ONLY\r\n ///////////////////////////////////////////////////////////////////////////////////////////\r\n classEmpty: string;\r\n classHalf: string;\r\n classFilled: string;\r\n\r\n pathEmpty: string;\r\n pathHalf: string;\r\n pathFilled: string;\r\n\r\n color: starRatingColor;\r\n stars: Array;\r\n ratingAsInteger: number;\r\n halfStarVisible: boolean;\r\n\r\n constructor(config: StarRatingConfigService) {\r\n\r\n this.config = config;\r\n\r\n //set default ctrl props\r\n this.classEmpty = this.config.classEmpty;\r\n this.classHalf = this.config.classHalf;\r\n this.classFilled = this.config.classFilled;\r\n this.pathEmpty = this.config.svgPathEmpty;\r\n this.pathHalf = this.config.svgPathHalf;\r\n this.pathFilled = this.config.svgPathFilled;\r\n\r\n //set default Component Inputs\r\n if ('getColor' in this.config && typeof this.config.getColor === \"function\") {\r\n this.getColor = this.config.getColor;\r\n }\r\n\r\n if ('getHalfStarVisible' in this.config && typeof this.config.getHalfStarVisible === \"function\") {\r\n this.getHalfStarVisible = this.config.getHalfStarVisible;\r\n }\r\n\r\n this.numOfStars = this.config.numOfStars;\r\n this.rating = 0;\r\n this.step = 1;\r\n\r\n }\r\n\r\n svgVisible(): boolean {\r\n return this.starType === \"svg\";\r\n }\r\n\r\n interactionPossible(): boolean {\r\n return !this.readOnly && !this.disabled;\r\n }\r\n\r\n setColor(): void {\r\n //check if custom function is given\r\n if (typeof this.getColor === \"function\") {\r\n this.color = this.getColor(this.rating, this.numOfStars, this.staticColor);\r\n }\r\n else {\r\n this.color = StarRatingUtils.getColor(this.rating, this.numOfStars, this.staticColor);\r\n }\r\n }\r\n\r\n setHalfStarVisible(): void {\r\n //update halfStarVisible\r\n if (this.showHalfStars) {\r\n //check if custom function is given\r\n if (typeof this.getHalfStarVisible === \"function\") {\r\n this.halfStarVisible = this.getHalfStarVisible(this.rating);\r\n } else {\r\n this.halfStarVisible = StarRatingUtils.getHalfStarVisible(this.rating);\r\n }\r\n\r\n }\r\n else {\r\n this.halfStarVisible = false;\r\n }\r\n }\r\n\r\n getComponentClassNames(): string {\r\n let classNames: string[] = [];\r\n\r\n classNames.push(this.rating ? 'value-' + this.ratingAsInteger : 'value-0');\r\n classNames.push(this.halfStarVisible ? 'half' : '');\r\n classNames.push(this.hoverEnabled ? 'hover' : '');\r\n\r\n let hoverRating = (this.hoverRating ? 'hover-' + this.hoverRating : 'hover-0');\r\n classNames.push(this.hoverEnabled ? hoverRating : '');\r\n\r\n classNames.push(this.space ? 'space-' + this.space : '');\r\n classNames.push(this.labelPosition ? 'label-' + this.labelPosition : '');\r\n classNames.push(this.color ? 'color-' + this.color : '');\r\n classNames.push(this.starType ? 'star-' + this.starType : '');\r\n classNames.push(this.speed);\r\n classNames.push(this.size);\r\n classNames.push(this.readOnly ? 'read-only' : '');\r\n classNames.push(this.disabled ? 'disabled' : '');\r\n classNames.push(this.direction ? 'direction-' + this.direction : '');\r\n\r\n return classNames.join(' ');\r\n }\r\n\r\n increment() {\r\n //increment to next higher step\r\n let absDiff = Math.abs(this.rating % this.step);\r\n this.rating = this.rating + (absDiff > 0 ? this.step - absDiff : this.step);\r\n }\r\n\r\n decrement() {\r\n //decrement to next lower step\r\n let absDiff = Math.abs(this.rating % this.step);\r\n this.rating = this.rating - (absDiff > 0 ? absDiff : this.step);\r\n }\r\n\r\n reset() {\r\n this.rating = 0;\r\n }\r\n\r\n}\r\n",
+ "import {starRatingColor} from '../interfaces/star-rating-config.interface';\r\nexport class StarRatingUtils {\r\n //Static methods\r\n ///////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n /*\r\n * getStarsArray\r\n *\r\n * returns an array of increasing numbers starting at 1\r\n *\r\n * @param numOfStars\r\n * @returns {Array}\r\n */\r\n static getStarsArray(numOfStars: number): Array {\r\n let stars: Array = [];\r\n for (let i = 0; i < numOfStars; i++) {\r\n stars.push(i + 1);\r\n }\r\n return stars;\r\n }\r\n\r\n /*\r\n * getHalfStarVisible\r\n *\r\n * Returns true if there should be a half star visible, and false if not.\r\n *\r\n * @param rating\r\n * @returns {boolean}\r\n */\r\n static getHalfStarVisible(rating: number): boolean {\r\n return Math.abs(rating % 1) > 0;\r\n }\r\n\r\n /*\r\n * getColor\r\n *\r\n * The default function for color calculation\r\n * based on the current rating and the the number of stars possible.\r\n * If a staticColor is set the function will use it as return value.\r\n *\r\n * @param rating\r\n * @param numOfStars\r\n * @param staticColor\r\n * @returns {starRatingColor}\r\n */\r\n static getColor(rating: number, numOfStars: number, staticColor?: starRatingColor): starRatingColor {\r\n rating = rating || 0;\r\n\r\n //if a fix color is set use this one\r\n if (staticColor) {\r\n return staticColor;\r\n }\r\n\r\n //calculate size of smallest fraction\r\n let fractionSize = numOfStars / 3;\r\n\r\n //apply color by fraction\r\n let color: starRatingColor = 'default';\r\n if (rating > 0) {\r\n color = 'negative';\r\n }\r\n if (rating > fractionSize) {\r\n color = 'ok';\r\n }\r\n if (rating > fractionSize * 2) {\r\n color = 'positive';\r\n }\r\n\r\n return color;\r\n }\r\n\r\n /*\r\n * isDigitKeyEventCode\r\n * detects digit key event sodes\r\n * @param eventCode\r\n * @returns {boolean}\r\n */\r\n static isDigitKeyEventCode(eventCode: string): boolean {\r\n return eventCode.indexOf('Digit') === 0;\r\n };\r\n\r\n}\r\n",
+ "export type starRatingSizes = 'small' | 'medium' | 'large';\r\nexport type starRatingColor = 'default' | 'negative' | 'ok' | 'positive';\r\nexport type starRatingSpeed = 'immediately' | 'noticeable' | 'slow';\r\nexport type starRatingLabelPosition = 'left' | 'right' | 'top' | 'bottom';\r\nexport type starRatingStarTypes = 'svg' | 'icon' | 'image';\r\nexport type starRatingStarSpace= 'no' | 'between' | 'around';\r\nexport type starRatingDirection= 'rtl' | 'ltr';\r\n\r\nexport class StarRatingConfig {\r\n // binding defaults\r\n numOfStars?: number;\r\n size?: starRatingSizes;\r\n speed?: starRatingSpeed;\r\n labelPosition?: starRatingLabelPosition;\r\n starType?: starRatingStarTypes;\r\n staticColor: starRatingColor;\r\n getColor?: (rating: number, numOfStars: number, staticColor?: starRatingColor)=> starRatingColor;\r\n getHalfStarVisible?:(rating: number) => boolean\r\n // statics\r\n classEmpty?: string;\r\n classHalf?: string;\r\n classFilled?: string;\r\n assetsPath?: string;\r\n svgPath?: string;\r\n svgEmptySymbolId?: string;\r\n svgHalfSymbolId?: string;\r\n svgFilledSymbolId?: string;\r\n svgPathEmpty?: string;\r\n svgPathHalf?: string;\r\n svgPathFilled?: string;\r\n}\r\n"
+ ],
+ "names": [
+ "tslib_1.__extends"
+ ],
+ "mappings": ";;;;;AKQA;IAAA;KAsBC;IAAD,uBAAC;CAAA,IAAA;AD7BD;IAAA;KAgFC;IApEU,6BAAa,GAApB,UAAqB,UAAkB;QACnC,IAAI,KAAK,GAAkB,EAAE,CAAC;QAC9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,EAAE,EAAE;YACjC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;SACrB;QACD,OAAO,KAAK,CAAC;KAChB;IAUM,kCAAkB,GAAzB,UAA0B,MAAc;QACpC,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;KACnC;IAcM,wBAAQ,GAAf,UAAgB,MAAc,EAAE,UAAkB,EAAE,WAA6B;QAC7E,MAAM,GAAG,MAAM,IAAI,CAAC,CAAC;QAGrB,IAAI,WAAW,EAAE;YACb,OAAO,WAAW,CAAC;SACtB;QAGD,IAAI,YAAY,GAAG,UAAU,GAA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A,IAKM,YAAY,GAAG,CAAC,mBAAmB,CAAC,CAAC;AAC3C,IAAM,OAAO,GAAG,CAAC,YAAY,CAAC,CAAC;AAO/B;IAAA;;IACS,wBAAO,GAAd;QACE,OAAO;YACL,QAAQ,EAAE,gBAAgB;YAC1B,SAAS,EAAE;gBACT,uBAAuB;aACxB;SACF,CAAA;KACF;IAEO,yBAAQ,GAAhB;QACE,OAAO;YACL,QAAQ,EAAE,gBAAgB;YAC1B,SAAS,EAAE,EAAE;SACd,CAAA;KACF;;;;IApBH,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;gBACR,OAAO,EAAE,CAAC,YAAY,CAAC;gBACvB,YAAY,EAAE,CAAC,YAAY,CAAC;gBAC5B,OAAO,EAAE,CAAC,OAAO,CAAC;aACnB,EAAD,EAAA;;;;;;"
+}
diff --git a/@packaged/angular-star-rating/index.d.ts b/@packaged/angular-star-rating/index.d.ts
new file mode 100644
index 0000000..e974d6b
--- /dev/null
+++ b/@packaged/angular-star-rating/index.d.ts
@@ -0,0 +1,9 @@
+export { ClickEvent } from './src/interfaces/click-event.interface';
+export { HoverRatingChangeEvent } from './src/interfaces/hover-rating-change-event.interface';
+export { RatingChangeEvent } from './src/interfaces/rating-change-event.interface';
+export { StarRatingConfig } from './src/interfaces/star-rating-config.interface';
+export { StarRatingUtils } from './src/services/star-rating.utils';
+export { StarRating } from './src/services/star-rating';
+export { StarRatingConfigService } from './src/services/star-rating-config.service';
+export { StarRatingComponent } from './src/components/star-rating.component';
+export { StarRatingModule } from './src/angular-star-rating.module';
diff --git a/@packaged/angular-star-rating/package.json b/@packaged/angular-star-rating/package.json
new file mode 100644
index 0000000..e748b22
--- /dev/null
+++ b/@packaged/angular-star-rating/package.json
@@ -0,0 +1,59 @@
+{
+ "$schema": "../../node_modules/ng-packagr/package.schema.json",
+ "name": "angular-star-rating",
+ "description": "Angular Star Rating is a fully featured and configurabel Angular UI component.",
+ "version": "4.0.0-beta.0",
+ "homepage": "https://github.com/BioPhoton/angular-star-rating#readme",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/BioPhoton/angular-star-rating"
+ },
+ "author": {
+ "name": "Michael Hladky",
+ "email": "michael@hladky.at"
+ },
+ "contributors": [
+ {
+ "name": "Michael Hladky",
+ "email": "michael@hladky.at"
+ }
+ ],
+ "keywords": [
+ "Rating",
+ "Stars",
+ "Star Rating",
+ "Star-Rating",
+ "star-rating",
+ "Starrating",
+ "Icon",
+ "SVG",
+ "CSS",
+ "Pure CSS",
+ "CSS only",
+ "JavaScript",
+ "Angular",
+ "Angular Component",
+ "Angular2",
+ "Angular2 Component",
+ "Typescript"
+ ],
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/BioPhoton/angular-star-rating/issues"
+ },
+ "module": "esm5/angular-star-rating.js",
+ "typings": "angular-star-rating.d.ts",
+ "peerDependencies": {
+ "@angular/core": "^4.0.0 || ^5.0.0",
+ "@angular/forms": "^4.0.0 || ^5.0.0",
+ "rxjs": "^5.1.0",
+ "zone.js": "^0.8.4",
+ "css-star-rating": "^2.4.1"
+ },
+ "main": "bundles/angular-star-rating.umd.js",
+ "es2015": "esm2015/angular-star-rating.js",
+ "metadata": "angular-star-rating.metadata.json",
+ "dependencies": {
+ "tslib": "^1.7.1"
+ }
+}
diff --git a/@packaged/angular-star-rating/src/angular-star-rating.module.d.ts b/@packaged/angular-star-rating/src/angular-star-rating.module.d.ts
new file mode 100644
index 0000000..ccf8e71
--- /dev/null
+++ b/@packaged/angular-star-rating/src/angular-star-rating.module.d.ts
@@ -0,0 +1,5 @@
+import { ModuleWithProviders } from '@angular/core';
+export declare class StarRatingModule {
+ static forRoot(): ModuleWithProviders;
+ static forChild(): ModuleWithProviders;
+}
diff --git a/@packaged/angular-star-rating/src/components/star-rating.component.d.ts b/@packaged/angular-star-rating/src/components/star-rating.component.d.ts
new file mode 100644
index 0000000..3703a6a
--- /dev/null
+++ b/@packaged/angular-star-rating/src/components/star-rating.component.d.ts
@@ -0,0 +1,43 @@
+import { EventEmitter } from '@angular/core';
+import { ControlValueAccessor } from '@angular/forms';
+import { ClickEvent } from '../interfaces/click-event.interface';
+import { HoverRatingChangeEvent } from '../interfaces/hover-rating-change-event.interface';
+import { RatingChangeEvent } from '../interfaces/rating-change-event.interface';
+import { StarRating } from '../services/star-rating';
+import { StarRatingConfigService } from '../services/star-rating-config.service';
+export declare class StarRatingComponent extends StarRating implements ControlValueAccessor {
+ clickEmitter: EventEmitter;
+ saveOnClick($event: ClickEvent): void;
+ ratingChangeEmitter: EventEmitter;
+ saveOnRatingChange($event: RatingChangeEvent): void;
+ hoverRatingChangeEmitter: EventEmitter;
+ saveOnHover($event: HoverRatingChangeEvent): void;
+ onTouch: Function;
+ onModelChange: Function;
+ private onModelChangeRegistered;
+ private onTouchRegistered;
+ saveOnTouch(): void;
+ saveOnModelChange(value: number): void;
+ /**ACCESSIBILITY **/
+ onKeyDown(event: KeyboardEvent): void;
+ onBlur(event: FocusEvent): void;
+ onFocus(event: FocusEvent): void;
+ onStarHover(rating?: number): void;
+ /**Form Control - ControlValueAccessor implementation**/
+ writeValue(obj: any): void;
+ registerOnChange(fn: any): void;
+ registerOnTouched(fn: any): void;
+ constructor(config: StarRatingConfigService);
+ setRating(value: number): void;
+ /**
+ * onStarClicked
+ *
+ * Is fired when a star is clicked. And updated the rating value.
+ * This function returns if the disabled or readOnly
+ * property is set. If provided it emits the onClick event
+ * handler with the actual rating value.
+ *
+ * @param rating
+ */
+ onStarClicked(rating: number): void;
+}
diff --git a/@packaged/angular-star-rating/src/interfaces/click-event.interface.d.ts b/@packaged/angular-star-rating/src/interfaces/click-event.interface.d.ts
new file mode 100644
index 0000000..47ca820
--- /dev/null
+++ b/@packaged/angular-star-rating/src/interfaces/click-event.interface.d.ts
@@ -0,0 +1,3 @@
+export interface ClickEvent {
+ rating: number;
+}
diff --git a/@packaged/angular-star-rating/src/interfaces/hover-rating-change-event.interface.d.ts b/@packaged/angular-star-rating/src/interfaces/hover-rating-change-event.interface.d.ts
new file mode 100644
index 0000000..4f2d2eb
--- /dev/null
+++ b/@packaged/angular-star-rating/src/interfaces/hover-rating-change-event.interface.d.ts
@@ -0,0 +1,3 @@
+export interface HoverRatingChangeEvent {
+ hoverRating: number;
+}
diff --git a/@packaged/angular-star-rating/src/interfaces/rating-change-event.interface.d.ts b/@packaged/angular-star-rating/src/interfaces/rating-change-event.interface.d.ts
new file mode 100644
index 0000000..95a7b4d
--- /dev/null
+++ b/@packaged/angular-star-rating/src/interfaces/rating-change-event.interface.d.ts
@@ -0,0 +1,3 @@
+export interface RatingChangeEvent {
+ rating: number;
+}
diff --git a/@packaged/angular-star-rating/src/interfaces/star-rating-config.interface.d.ts b/@packaged/angular-star-rating/src/interfaces/star-rating-config.interface.d.ts
new file mode 100644
index 0000000..a525282
--- /dev/null
+++ b/@packaged/angular-star-rating/src/interfaces/star-rating-config.interface.d.ts
@@ -0,0 +1,28 @@
+export declare type starRatingSizes = 'small' | 'medium' | 'large';
+export declare type starRatingColor = 'default' | 'negative' | 'ok' | 'positive';
+export declare type starRatingSpeed = 'immediately' | 'noticeable' | 'slow';
+export declare type starRatingLabelPosition = 'left' | 'right' | 'top' | 'bottom';
+export declare type starRatingStarTypes = 'svg' | 'icon' | 'image';
+export declare type starRatingStarSpace = 'no' | 'between' | 'around';
+export declare type starRatingDirection = 'rtl' | 'ltr';
+export declare class StarRatingConfig {
+ numOfStars?: number;
+ size?: starRatingSizes;
+ speed?: starRatingSpeed;
+ labelPosition?: starRatingLabelPosition;
+ starType?: starRatingStarTypes;
+ staticColor: starRatingColor;
+ getColor?: (rating: number, numOfStars: number, staticColor?: starRatingColor) => starRatingColor;
+ getHalfStarVisible?: (rating: number) => boolean;
+ classEmpty?: string;
+ classHalf?: string;
+ classFilled?: string;
+ assetsPath?: string;
+ svgPath?: string;
+ svgEmptySymbolId?: string;
+ svgHalfSymbolId?: string;
+ svgFilledSymbolId?: string;
+ svgPathEmpty?: string;
+ svgPathHalf?: string;
+ svgPathFilled?: string;
+}
diff --git a/@packaged/angular-star-rating/src/services/star-rating-config.service.d.ts b/@packaged/angular-star-rating/src/services/star-rating-config.service.d.ts
new file mode 100644
index 0000000..43fc6e8
--- /dev/null
+++ b/@packaged/angular-star-rating/src/services/star-rating-config.service.d.ts
@@ -0,0 +1,44 @@
+import { StarRatingConfig, starRatingColor, starRatingSizes, starRatingSpeed, starRatingStarTypes, starRatingLabelPosition } from '../interfaces/star-rating-config.interface';
+/**
+ * Configuration service for the StarRating component.
+ * You can inject this service, typically in your root component, and customize the values of its properties in
+ * order to provide default values for all the star ratings used in the application.
+ */
+export declare class StarRatingConfigService implements StarRatingConfig {
+ _classEmpty: string;
+ classEmpty: string;
+ private _classHalf;
+ classHalf: string;
+ private _classFilled;
+ classFilled: string;
+ private _numOfStars;
+ numOfStars: number;
+ private _size;
+ size: starRatingSizes;
+ private _staticColor;
+ staticColor: starRatingColor;
+ private _labelPosition;
+ labelPosition: starRatingLabelPosition;
+ private _speed;
+ speed: starRatingSpeed;
+ private _starType;
+ starType: starRatingStarTypes;
+ private _assetsPath;
+ assetsPath: string;
+ private _svgPath;
+ svgPath: string;
+ private _svgEmptySymbolId;
+ svgEmptySymbolId: string;
+ private _svgHalfSymbolId;
+ svgHalfSymbolId: string;
+ private _svgFilledSymbolId;
+ svgFilledSymbolId: string;
+ private _svgPathEmpty;
+ svgPathEmpty: string;
+ private _svgPathHalf;
+ svgPathHalf: string;
+ private _svgPathFilled;
+ svgPathFilled: string;
+ getColor(rating: number, numOfStars: number, staticColor?: starRatingColor): starRatingColor;
+ getHalfStarVisible(rating: number): boolean;
+}
diff --git a/@packaged/angular-star-rating/src/services/star-rating.d.ts b/@packaged/angular-star-rating/src/services/star-rating.d.ts
new file mode 100644
index 0000000..1628a0e
--- /dev/null
+++ b/@packaged/angular-star-rating/src/services/star-rating.d.ts
@@ -0,0 +1,130 @@
+import { StarRatingConfig, starRatingColor, starRatingDirection, starRatingLabelPosition, starRatingSizes, starRatingSpeed, starRatingStarSpace, starRatingStarTypes } from '../interfaces/star-rating-config.interface';
+import { StarRatingConfigService } from './star-rating-config.service';
+export declare class StarRating {
+ protected config: StarRatingConfig;
+ /**
+ * id property to identify the DOM element
+ */
+ protected _id: string;
+ id: string;
+ /**
+ * focus
+ */
+ protected _focus: boolean;
+ focus: boolean;
+ /**
+ * labelText
+ */
+ protected _labelText: string;
+ labelText: string;
+ /**
+ * labelPosition
+ */
+ protected _labelPosition: starRatingLabelPosition;
+ labelPosition: starRatingLabelPosition;
+ /**
+ * labelVisible
+ */
+ protected _labelVisible: boolean;
+ labelVisible: boolean;
+ /**
+ * hoverEnabled
+ */
+ protected _hoverEnabled: boolean;
+ hoverEnabled: boolean;
+ /**
+ * staticColor
+ */
+ protected _staticColor: starRatingColor;
+ staticColor: starRatingColor;
+ /**
+ * direction
+ */
+ protected _direction: starRatingDirection;
+ direction: starRatingDirection;
+ /**
+ * numOfStars
+ */
+ protected _numOfStars: number;
+ numOfStars: number;
+ /**
+ * hoverRating
+ */
+ protected _hoverRating: number;
+ hoverRating: number;
+ /**
+ * speed
+ */
+ protected _speed: starRatingSpeed;
+ speed: starRatingSpeed;
+ /**
+ * size
+ */
+ protected _size: starRatingSizes;
+ size: starRatingSizes;
+ /**
+ * starType
+ */
+ protected _starType: starRatingStarTypes;
+ starType: starRatingStarTypes;
+ /**
+ * space
+ */
+ protected _space: starRatingStarSpace;
+ space: starRatingStarSpace;
+ /**
+ * readOnly
+ */
+ protected _readOnly: boolean;
+ readOnly: boolean;
+ /**
+ * disabled
+ */
+ protected _disabled: boolean;
+ disabled: boolean;
+ private _step;
+ step: number;
+ /**
+ * rating
+ */
+ protected _rating: number;
+ rating: number;
+ /**
+ * setRating
+ * I use a setter function instead of a set method to enable overrides for this function.
+ * @param value
+ */
+ setRating(value: number): void;
+ /**
+ * showHalfStars
+ */
+ protected _showHalfStars: boolean;
+ showHalfStars: boolean;
+ /**
+ * getColor
+ */
+ getColor: (rating: number, numOfStars: number, staticColor?: starRatingColor) => starRatingColor;
+ /**
+ * getHalfStarVisible
+ */
+ getHalfStarVisible: (rating: number) => boolean;
+ classEmpty: string;
+ classHalf: string;
+ classFilled: string;
+ pathEmpty: string;
+ pathHalf: string;
+ pathFilled: string;
+ color: starRatingColor;
+ stars: Array;
+ ratingAsInteger: number;
+ halfStarVisible: boolean;
+ constructor(config: StarRatingConfigService);
+ svgVisible(): boolean;
+ interactionPossible(): boolean;
+ setColor(): void;
+ setHalfStarVisible(): void;
+ getComponentClassNames(): string;
+ increment(): void;
+ decrement(): void;
+ reset(): void;
+}
diff --git a/@packaged/angular-star-rating/src/services/star-rating.utils.d.ts b/@packaged/angular-star-rating/src/services/star-rating.utils.d.ts
new file mode 100644
index 0000000..c49c2cf
--- /dev/null
+++ b/@packaged/angular-star-rating/src/services/star-rating.utils.d.ts
@@ -0,0 +1,7 @@
+import { starRatingColor } from '../interfaces/star-rating-config.interface';
+export declare class StarRatingUtils {
+ static getStarsArray(numOfStars: number): Array;
+ static getHalfStarVisible(rating: number): boolean;
+ static getColor(rating: number, numOfStars: number, staticColor?: starRatingColor): starRatingColor;
+ static isDigitKeyEventCode(eventCode: string): boolean;
+}
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..58e79ec
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,203 @@
+
+# [4.0.0.0-beta](https://github.com/BioPhoton/angular-star-rating/compare/3.0.8...v) (2018-03-24)
+
+
+### Bug Fixes
+
+* **update package.json peerDependencies:** Update package deps for angular 5.x fixes [#67](https://github.com/BioPhoton/angular-star-rating/issues/67) ([bc30186](https://github.com/BioPhoton/angular-star-rating/commit/bc30186))
+
+
+### Features
+
+* **move packaging to ngPackagr <3:** Switch the release and bundle process to ngPackagr ([9b4929e](https://github.com/BioPhoton/angular-star-rating/commit/9b4929e)), closes [#76](https://github.com/BioPhoton/angular-star-rating/issues/76)
+* **setup automated release:** setup scripts implemented for [#78](https://github.com/BioPhoton/angular-star-rating/issues/78) ([49d9fec](https://github.com/BioPhoton/angular-star-rating/commit/49d9fec))
+
+
+
+
+
+
+## [3.0.8](https://github.com/BioPhoton/angular-star-rating/compare/3.0.7...3.0.8) (2017-08-23)
+
+
+
+
+## [3.0.7](https://github.com/BioPhoton/angular-star-rating/compare/3.0.6...3.0.7) (2017-08-22)
+
+
+### Bug Fixes
+
+* **dependencies:** add css-star-rating to dependencies ([591054b](https://github.com/BioPhoton/angular-star-rating/commit/591054b))
+
+
+
+
+## [3.0.6](https://github.com/BioPhoton/angular-star-rating/compare/3.0.5...3.0.6) (2017-08-22)
+
+
+
+
+## [3.0.5](https://github.com/BioPhoton/angular-star-rating/compare/3.0.4...3.0.5) (2017-08-22)
+
+
+### Bug Fixes
+
+* **dependencies:** added css to dependencies ([9c480c9](https://github.com/BioPhoton/angular-star-rating/commit/9c480c9))
+
+
+
+
+## [3.0.4](https://github.com/BioPhoton/angular-star-rating/compare/2.5.10...3.0.4) (2017-08-16)
+
+
+### Bug Fixes
+
+* **feature rollback:** removed input binding ([23806b0](https://github.com/BioPhoton/angular-star-rating/commit/23806b0))
+* **features rollback:** label visible property binding ([b3459ff](https://github.com/BioPhoton/angular-star-rating/commit/b3459ff))
+
+
+
+
+## [2.5.10](https://github.com/BioPhoton/angular-star-rating/compare/0.5.10...2.5.10) (2017-07-07)
+
+
+
+
+## [3.0.3](https://github.com/BioPhoton/angular-star-rating/compare/3.0.2...3.0.3) (2017-07-07)
+
+
+
+
+## [3.0.2](https://github.com/BioPhoton/angular-star-rating/compare/v3.0.0...3.0.2) (2017-07-07)
+
+
+### Bug Fixes
+
+* **module export:** implemented a forRoot method ([c5acad7](https://github.com/BioPhoton/angular-star-rating/commit/c5acad7))
+
+
+
+
+# [3.0.0](https://github.com/BioPhoton/angular-star-rating/compare/v2.0.4...v3.0.0) (2017-05-29)
+
+
+### Bug Fixes
+
+* **aot:** fixed build for AOT ([928bda8](https://github.com/BioPhoton/angular-star-rating/commit/928bda8)), closes [#22](https://github.com/BioPhoton/angular-star-rating/issues/22)
+* **renaming:** renamed controller ([8131351](https://github.com/BioPhoton/angular-star-rating/commit/8131351))
+
+
+
+
+## [2.0.4](https://github.com/BioPhoton/angular-star-rating/compare/v2.0.3...v2.0.4) (2017-05-28)
+
+
+
+
+## [2.0.3](https://github.com/BioPhoton/angular-star-rating/compare/v2.0.2...v2.0.3) (2017-04-29)
+
+
+
+
+## [2.0.2](https://github.com/BioPhoton/angular-star-rating/compare/v2.0.1...v2.0.2) (2017-04-29)
+
+
+### Bug Fixes
+
+* **increment:** fixed increment function ([0f0e911](https://github.com/BioPhoton/angular-star-rating/commit/0f0e911))
+* **refactoring:** code readebility improved ([3364cbb](https://github.com/BioPhoton/angular-star-rating/commit/3364cbb))
+
+
+### Features
+
+* **hover:** implement on hover events and styles ([e5f9f2c](https://github.com/BioPhoton/angular-star-rating/commit/e5f9f2c))
+* **hover:** implemented examples for hover feature ([df5a9a4](https://github.com/BioPhoton/angular-star-rating/commit/df5a9a4))
+* **hover:** removed unused imports ([1586c0b](https://github.com/BioPhoton/angular-star-rating/commit/1586c0b))
+* **hover:** renamed callback ([68c8939](https://github.com/BioPhoton/angular-star-rating/commit/68c8939))
+* **hover:** updated readme ([3916f05](https://github.com/BioPhoton/angular-star-rating/commit/3916f05))
+
+
+
+
+## [2.0.1](https://github.com/BioPhoton/angular-star-rating/compare/v2.0.0-rc.0...v2.0.1) (2017-04-12)
+
+
+
+
+# [2.0.0-rc.0](https://github.com/BioPhoton/angular-star-rating/compare/v2.0.0-beta.3...v2.0.0-rc.0) (2017-04-12)
+
+
+### Bug Fixes
+
+* **examples:** updated examples ([b05d28e](https://github.com/BioPhoton/angular-star-rating/commit/b05d28e))
+* **examples:** updated examples ([a44ef30](https://github.com/BioPhoton/angular-star-rating/commit/a44ef30))
+* **fixed binding names:** fixed binding names and class names ([73cc7d0](https://github.com/BioPhoton/angular-star-rating/commit/73cc7d0))
+* **typings:** updated typings ([f4a1dd7](https://github.com/BioPhoton/angular-star-rating/commit/f4a1dd7))
+* **versions:** updated versions of libs ([fc28c88](https://github.com/BioPhoton/angular-star-rating/commit/fc28c88))
+
+
+### Features
+
+* **controlValueAccessor:** finished implement control value accessor ([5cb28d1](https://github.com/BioPhoton/angular-star-rating/commit/5cb28d1)), closes [#11](https://github.com/BioPhoton/angular-star-rating/issues/11)
+* **controlValueAccessor:** updated examples ([2097b40](https://github.com/BioPhoton/angular-star-rating/commit/2097b40))
+* **direction and types:** added direction in component and changed type names ([c9ddaf5](https://github.com/BioPhoton/angular-star-rating/commit/c9ddaf5))
+* **keyboard:** finished keyboard implementation ([ca35e8a](https://github.com/BioPhoton/angular-star-rating/commit/ca35e8a))
+* **keybord interaction:** progress implementing keybord interaction ([b071567](https://github.com/BioPhoton/angular-star-rating/commit/b071567))
+* **keybord interaction:** star implementing keybord interaction ([a1a72ae](https://github.com/BioPhoton/angular-star-rating/commit/a1a72ae))
+* **labelVisible:** added labelVisible property ([16412dd](https://github.com/BioPhoton/angular-star-rating/commit/16412dd))
+* **refactoring:** enable overrides for set rating ([ae9749f](https://github.com/BioPhoton/angular-star-rating/commit/ae9749f))
+* **utils:** implement utils and controller class ([80ab369](https://github.com/BioPhoton/angular-star-rating/commit/80ab369)), closes [#12](https://github.com/BioPhoton/angular-star-rating/issues/12)
+* **valueAccessor:** created new example for value accessor ([20bd211](https://github.com/BioPhoton/angular-star-rating/commit/20bd211))
+* **valueAccessor:** progress implementation ([ba1c664](https://github.com/BioPhoton/angular-star-rating/commit/ba1c664))
+* **valueAccessor:** progress implementing the value accessor for reactive forms ([059a0f9](https://github.com/BioPhoton/angular-star-rating/commit/059a0f9))
+* **valueAccessor:** progress implementing the value accessor for reactive froms ([cd8136d](https://github.com/BioPhoton/angular-star-rating/commit/cd8136d))
+* **valueAccessor:** start implement the value accessor for reactive froms ([d7adcf3](https://github.com/BioPhoton/angular-star-rating/commit/d7adcf3))
+* **valueAccessor:** start progress implementing the value accessor for reactive froms ([5c4e9be](https://github.com/BioPhoton/angular-star-rating/commit/5c4e9be))
+* **valueAccessor:** start progress implementing the value accessor for reactive froms ([0f27794](https://github.com/BioPhoton/angular-star-rating/commit/0f27794))
+
+
+
+
+# [2.0.0-beta2](https://github.com/BioPhoton/angular-star-rating/compare/v2.0.0-beta.1...v2.0.0-beta2) (2017-04-06)
+
+
+
+
+# [2.0.0-beta.1](https://github.com/BioPhoton/angular-star-rating/compare/v2.0.0-beta.0...v2.0.0-beta.1) (2017-01-31)
+
+
+### Bug Fixes
+
+* **component:** updated component ([94ad8b6](https://github.com/BioPhoton/angular-star-rating/commit/94ad8b6))
+* **example:** updated angular2 example ([b89e3aa](https://github.com/BioPhoton/angular-star-rating/commit/b89e3aa))
+* **star rating:** progress star rating component ([a32a360](https://github.com/BioPhoton/angular-star-rating/commit/a32a360))
+
+
+### Features
+
+* **example:** added basic components ([8c2a50c](https://github.com/BioPhoton/angular-star-rating/commit/8c2a50c))
+* **example:** added test folder ([fece3b9](https://github.com/BioPhoton/angular-star-rating/commit/fece3b9))
+* **example:** start implementing star-rating component ([0856f9e](https://github.com/BioPhoton/angular-star-rating/commit/0856f9e))
+* **resources:** added resources ([18d0183](https://github.com/BioPhoton/angular-star-rating/commit/18d0183))
+
+
+
+
+# [2.0.0-beta.0](https://github.com/BioPhoton/angular-star-rating/compare/0939e67...v2.0.0-beta.0) (2017-01-13)
+
+
+### Features
+
+* **cli-migration:** migrate to webpack and sass ([dbc57ea](https://github.com/BioPhoton/angular-star-rating/commit/dbc57ea))
+* **cli-migration:** migrate to webpack and sass ([bf59f86](https://github.com/BioPhoton/angular-star-rating/commit/bf59f86))
+* **cli-migration:** migrate to webpack and sass ([e78d5a1](https://github.com/BioPhoton/angular-star-rating/commit/e78d5a1))
+* **cli-migration:** Start migration from systemJs to webpack ([51a31a4](https://github.com/BioPhoton/angular-star-rating/commit/51a31a4))
+* **component:** setup component and example folders ([7968d02](https://github.com/BioPhoton/angular-star-rating/commit/7968d02))
+* **created example folder:** created folder and gitignore [#1](https://github.com/BioPhoton/angular-star-rating/issues/1) ([0939e67](https://github.com/BioPhoton/angular-star-rating/commit/0939e67))
+* **formComponent:** started form component ([4516f89](https://github.com/BioPhoton/angular-star-rating/commit/4516f89))
+* **ngModule:** include third party css into project ([facbeab](https://github.com/BioPhoton/angular-star-rating/commit/facbeab))
+* **started example project:** initialized ng2 project over cli [#1](https://github.com/BioPhoton/angular-star-rating/issues/1) ([37dfa9a](https://github.com/BioPhoton/angular-star-rating/commit/37dfa9a))
+* **version bump:** bumped version to 2..0.0-beta.0 ([883ea1d](https://github.com/BioPhoton/angular-star-rating/commit/883ea1d))
+
+
+
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..5b94432
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 Michael Hladky
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.MD b/README.MD
new file mode 100644
index 0000000..a644fe5
--- /dev/null
+++ b/README.MD
@@ -0,0 +1,69 @@
+# Angular Star Rating ⭐⭐⭐⭐⭐
+#### ⭐ Angular Star Rating is a Angular 2+ component made with ❤, based on css only techniques. ⭐
+
+![License](https://img.shields.io/npm/l/angular-star-rating.svg)
+[![NPM Version](https://img.shields.io/npm/v/angular-star-rating.svg)](https://www.npmjs.com/package/angular-star-rating)
+[![Build Status](https://travis-ci.org/BioPhoton/angular-star-rating.svg?branch=master)](https://travis-ci.org/BioPhoton/angular-star-rating)
+
+[![NPM](https://img.shields.io/npm/dt/angular-star-rating.svg)](https://www.npmjs.com/package/angular-star-rating)
+
+Angular Star Rating is a Angular 2+ component made with ❤.
+
+It is based on best practice UX/UI methods, accessibility in mind and an eye for details.
+In love with reactive forms, the component is easy to control over the keyboard.
+It is a perfect fit for all angular projects with ⭐'s.
+
+To keep it as flexible as possible a major part of the logic is based on [css only techniques](https://github.com/BioPhoton/css-star-rating). The component simple applies the state depending css modifiers.
+
+![Angular-Star-Rating](https://raw.githubusercontent.com/BioPhoton/angular-star-rating/master/resources/examples/example-usage.gif)
+
+## Browser support
+
+
+| IE | Firefox | Chrome | Safari | Opera |
+|--- |--- |--- |--- |---|
+| >11 | >50 | >55 | >10 | >41 |
+| | | | | |
+
+
+## Features
+Fully featured this component is provided with:
+- [x] easy **configurable** and reasonable defaults
+- [x] all **12 css modifiers** of the awesome [css only star rating](https://github.com/BioPhoton/css-star-rating) library
+- [x] it integrates well with **reactive forms** and all it's states
+- [x] focus and blur events are handled for a **smooth keyboard navigation**
+- [x] it's **keyboard control** is even better than a native input once :-)
+- [x] mouse enter and leave events are used to generate a nice **on hover interaction**
+- [x] importable as a **angular ngModule** it is a plug and play to use
+- [x] and is tested for **AOT**
+
+## Related Projects
+| Css | Angular 1 | Angular | Ionic 1 |
+|--- |--- |--- |--- |
+| | | | |
+| [Css Star Rating](https://github.com/BioPhoton/css-star-rating) | [Angular1 Star Rating](https://github.com/BioPhoton/angular1-star-rating) | [Angular Star Rating](https://github.com/BioPhoton/angular-star-rating) |[Ionic1 Star Rating](https://github.com/BioPhoton/ionic1-star-rating) |
+
+## DEMO
+- [x] [Example-App](https://github.com/BioPhoton/angular-star-rating/tree/master/examples/angular4)
+
+## [Documentation](https://github.com/BioPhoton/angular-star-rating/wiki)
+- [[Installing|Installing]]
+- [[Customizing Styles|Customizing-Styles]]
+- [[Property bindings|Property bindings]]
+ - [[Implement property bindings|Implement property bindings]]
+- [[Event bindings|Event bindings]]
+ - [[Implement event bindings|Implement event bindings]]
+- [[Use it with reactive forms|Use it with reactive forms]]
+- [[Custom configuration |Custom configuration]]
+
+## License
+
+MIT © [Michael Hladky](mailto:michael@hladky.at)
+
+# Custom configuration
+
+## Globally
+
+## FeatureModules
+
+## Locally
diff --git a/SETUP-PROJECT.md b/SETUP-PROJECT.md
new file mode 100644
index 0000000..d78e53c
--- /dev/null
+++ b/SETUP-PROJECT.md
@@ -0,0 +1,152 @@
+# AngularStarRatingWorkspace
+
+This project was generated with [Angular CLI](https://github.com/angular/angular-cli) using [Nrwl Nx](https://nrwl.io/nx).
+
+**Create a workspace:**
+1. Open the console and run `create-nx-workspace [workspaceName]`
+2. cd into the folder [workspaceName]
+**Create an app:**
+1. Create new app in workspace `ng generate app [appName]`
+2. Test the created app by running `ng serve --app=[appName]`
+**Create a lib:**
+1. Create a new lib by running `ng generate lib [libName]`
+2. Create a component in the lib `ng generate component test --app=[libName] --export`
+3. In `./apps/[appName]/src/app/[appName].module.ts` add the module of your lib.
+```typescritp
+// /apps/[appName]/src/app/[appName].module.ts
+
+[...]
+import { [moduleClassName] } from '[workspaceName]/[libName]'
+
+@NgModule({
+ imports: [
+ [...]
+ [moduleClassName]
+ ],
+ [...]
+})
+export class AppModule {}
+
+```
+4. Use the component in `app.component.html`
+```html
+// /apps/[appName]/src/app/[appName].component.html
+<[componentSelector]>[componentSelector]>
+```
+5. Test that the app can be served.
+
+**Setup ng-packagr**
+1. Install ng-packagr locally `npm install --save-dev ng-packagr`
+2. Create a file `package.json` in `libs/[libName]` with following content.
+```json
+// libs/[libName]/package.json
+{
+ "$schema": "../../node_modules/ng-packagr/package.schema.json",
+ "name": "[libName]",
+ "version": "1.0.0",
+ "ngPackage": {
+ "lib": {
+ "entryFile": "index.ts"
+ },
+ "dest": "../../@packaged/[libName]"
+ }
+}
+```
+3. Implement a script in the roots `package.json` file.
+```json
+{
+[...],
+scripts: {
+[...],
+"build:lib": "ng-packagr -p libs/[libName]/package.json"
+}
+[...]
+}
+```
+4. Run the build script in the console `npm run build:lib`
+ You should see a new folder on your root folder called `@packaged`. If you import the lib from there it should also work.
+
+**Setting up typescript configuration files for serving the packaged lib**
+1. Create a new file called `tsconfig.packaged.json` in the root folder and insert following content.
+```json
+// tsconfig.packaged.json
+{
+ "extends": "./tsconfig.json",
+ "compilerOptions": {
+ "paths": {
+ "@[workspaceName]/*": [
+ "@packaged/*"
+ ]
+ }
+ }
+}
+```
+This overrides the path mapping to use the folder `@packaged/*` instead of `libs/*`
+2. Create a new file called `tsconfig.packaged.json` in your app folder and insert following content.
+```json
+// apps/[appName]/src/tsconfig.packaged.json
+{
+ "$schema": "../../node_modules/ng-packagr/package.schema.json",
+ "name": "[libNameForNPM]",
+ "version": "1.0.0",
+ "ngPackage": {
+ "lib": {
+ "entryFile": "index.ts"
+ },
+ "dest": "../../@packaged/[libName]"
+ }
+}
+```
+This configures the entry file of your lib as well as the output folder
+3. Create a new entry under `apps` in the `.angular-cli.json` to have a separate configuration for serving the packaged libs.
+```json
+// .angular-cli.json
+{
+[...]
+"apps": [
+ [...],
+ {
+ "name": "angular5-example-packaged",
+ "root": "apps/angular5-example/src",
+ "outDir": "dist/apps/angular5-example-packaged",
+ "assets": [
+ "assets",
+ "favicon.ico"
+ ],
+ "index": "index.html",
+ "main": "main.ts",
+ "polyfills": "polyfills.ts",
+ "test": "../../../test.js",
+ "tsconfig": "tsconfig.packaged.json",
+ "testTsconfig": "../../../tsconfig.spec.json",
+ "prefix": "app",
+ "styles": [
+ "styles.css"
+ ],
+ "scripts": [],
+ "environmentSource": "environments/environment.ts",
+ "environments": {
+ "dev": "environments/environment.ts",
+ "prod": "environments/environment.prod.ts"
+ },
+ "tags": []
+ }
+ ],
+[...]
+}
+```
+Notice the changes in the key "name", "outDir" and "tsconfig".
+The important change is under the "tsconfig" key. We now use the `tsconfig.packaged.json` file instead of `tsconfig.app.json`
+4. Add another script in you root `package.json`
+```json
+{
+ [...]
+ "scripts": [
+ [...]
+ "start:packaged":"ng serve --app=angular5-exmple-packaged",
+ [...]
+ ]
+}
+```
+This script will use the newly created settings in `.angular-cli.json` to serve the app with the packaged libs.
+5. Test it by running `npm run start:packaged`
diff --git a/apps/.gitkeep b/apps/.gitkeep
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/apps/.gitkeep
@@ -0,0 +1 @@
+
diff --git a/apps/angular5-example/e2e/app.e2e-spec.ts b/apps/angular5-example/e2e/app.e2e-spec.ts
new file mode 100644
index 0000000..c6b7e3e
--- /dev/null
+++ b/apps/angular5-example/e2e/app.e2e-spec.ts
@@ -0,0 +1,14 @@
+import { AppPage } from './app.po';
+
+describe('angular5-example App', () => {
+ let page: AppPage;
+
+ beforeEach(() => {
+ page = new AppPage();
+ });
+
+ it('should display welcome message', () => {
+ page.navigateTo();
+ expect(page.text()).toContain('Welcome');
+ });
+});
diff --git a/apps/angular5-example/e2e/app.po.ts b/apps/angular5-example/e2e/app.po.ts
new file mode 100644
index 0000000..531c349
--- /dev/null
+++ b/apps/angular5-example/e2e/app.po.ts
@@ -0,0 +1,11 @@
+import { browser, by, element } from 'protractor';
+
+export class AppPage {
+ navigateTo() {
+ return browser.get('/');
+ }
+
+ text() {
+ return browser.findElement(by.css('body')).getText();
+ }
+}
diff --git a/apps/angular5-example/e2e/tsconfig.e2e.json b/apps/angular5-example/e2e/tsconfig.e2e.json
new file mode 100644
index 0000000..ac048c8
--- /dev/null
+++ b/apps/angular5-example/e2e/tsconfig.e2e.json
@@ -0,0 +1,20 @@
+{
+ "extends": "../../../tsconfig.json",
+ "compilerOptions": {
+ "outDir": "../../../dist/out-tsc/e2e/angular5-example",
+ "module": "commonjs",
+ "target": "es5",
+ "types": [
+ "jasmine",
+ "jasminewd2",
+ "node"
+ ]
+ },
+ "include": [
+ "../**/*.ts"
+ /* add all lazy-loaded libraries here: "../../../libs/my-lib/index.ts" */
+ ],
+ "exclude": [
+ "**/*.spec.ts"
+ ]
+}
diff --git a/apps/angular5-example/src/app/app.component.css b/apps/angular5-example/src/app/app.component.css
new file mode 100644
index 0000000..e69de29
diff --git a/apps/angular5-example/src/app/app.component.html b/apps/angular5-example/src/app/app.component.html
new file mode 100644
index 0000000..fa1769c
--- /dev/null
+++ b/apps/angular5-example/src/app/app.component.html
@@ -0,0 +1,17 @@
+
+
+
+ Welcome to an Angular CLI app built with Nrwl Nx!
+
+
+
+
+Nx
+
+An open source toolkit for enterprise Angular applications.
+
+Nx is designed to help you create and build enterprise grade Angular applications. It provides an opinionated approach to application project structure and patterns.
+
+Quick Start & Documentation
+
+Watch a 5-minute video on how to get started with Nx.
diff --git a/apps/angular5-example/src/app/app.component.spec.ts b/apps/angular5-example/src/app/app.component.spec.ts
new file mode 100644
index 0000000..1b1c624
--- /dev/null
+++ b/apps/angular5-example/src/app/app.component.spec.ts
@@ -0,0 +1,26 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { AppComponent } from './app.component';
+
+describe('AppComponent', () => {
+ let component: AppComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(
+ async(() => {
+ TestBed.configureTestingModule({
+ declarations: [AppComponent]
+ }).compileComponents();
+ })
+ );
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(AppComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/apps/angular5-example/src/app/app.component.ts b/apps/angular5-example/src/app/app.component.ts
new file mode 100644
index 0000000..136e68f
--- /dev/null
+++ b/apps/angular5-example/src/app/app.component.ts
@@ -0,0 +1,12 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-root',
+ templateUrl: './app.component.html',
+ styleUrls: ['./app.component.css']
+})
+export class AppComponent implements OnInit {
+ constructor() {}
+
+ ngOnInit() {}
+}
diff --git a/apps/angular5-example/src/app/app.module.ts b/apps/angular5-example/src/app/app.module.ts
new file mode 100644
index 0000000..64f007a
--- /dev/null
+++ b/apps/angular5-example/src/app/app.module.ts
@@ -0,0 +1,12 @@
+import { NgModule } from '@angular/core';
+import { AppComponent } from './app.component';
+import { BrowserModule } from '@angular/platform-browser';
+import { NxModule } from '@nrwl/nx';
+import {StarRatingModule} from '@angular-star-rating-workspace/angular-star-rating'
+
+@NgModule({
+ imports: [BrowserModule, NxModule.forRoot(), StarRatingModule.forRoot()],
+ declarations: [AppComponent],
+ bootstrap: [AppComponent]
+})
+export class AppModule {}
diff --git a/apps/angular5-example/src/assets/.gitkeep b/apps/angular5-example/src/assets/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/apps/angular5-example/src/assets/images/star-rating.icons.svg b/apps/angular5-example/src/assets/images/star-rating.icons.svg
new file mode 100644
index 0000000..a64e7c2
--- /dev/null
+++ b/apps/angular5-example/src/assets/images/star-rating.icons.svg
@@ -0,0 +1,24 @@
+
+
+
+
+ star-empty
+
+
+
+
+ star-half
+
+
+
+
+ star-filled
+
+
+
+
+
diff --git a/apps/angular5-example/src/assets/nx-logo.png b/apps/angular5-example/src/assets/nx-logo.png
new file mode 100644
index 0000000..bed0370
Binary files /dev/null and b/apps/angular5-example/src/assets/nx-logo.png differ
diff --git a/apps/angular5-example/src/environments/environment.prod.ts b/apps/angular5-example/src/environments/environment.prod.ts
new file mode 100644
index 0000000..3612073
--- /dev/null
+++ b/apps/angular5-example/src/environments/environment.prod.ts
@@ -0,0 +1,3 @@
+export const environment = {
+ production: true
+};
diff --git a/apps/angular5-example/src/environments/environment.ts b/apps/angular5-example/src/environments/environment.ts
new file mode 100644
index 0000000..b7f639a
--- /dev/null
+++ b/apps/angular5-example/src/environments/environment.ts
@@ -0,0 +1,8 @@
+// The file contents for the current environment will overwrite these during build.
+// The build system defaults to the dev environment which uses `environment.ts`, but if you do
+// `ng build --env=prod` then `environment.prod.ts` will be used instead.
+// The list of which env maps to which file can be found in `.angular-cli.json`.
+
+export const environment = {
+ production: false
+};
diff --git a/apps/angular5-example/src/favicon.ico b/apps/angular5-example/src/favicon.ico
new file mode 100644
index 0000000..8081c7c
Binary files /dev/null and b/apps/angular5-example/src/favicon.ico differ
diff --git a/apps/angular5-example/src/index.html b/apps/angular5-example/src/index.html
new file mode 100644
index 0000000..62b3067
--- /dev/null
+++ b/apps/angular5-example/src/index.html
@@ -0,0 +1,14 @@
+
+
+
+
+ Angular5Example
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/angular5-example/src/main.ts b/apps/angular5-example/src/main.ts
new file mode 100644
index 0000000..5aa3bf0
--- /dev/null
+++ b/apps/angular5-example/src/main.ts
@@ -0,0 +1,13 @@
+import { enableProdMode } from '@angular/core';
+import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
+
+import { AppModule } from './app/app.module';
+import { environment } from './environments/environment';
+
+if (environment.production) {
+ enableProdMode();
+}
+
+platformBrowserDynamic()
+ .bootstrapModule(AppModule)
+ .catch(err => console.log(err));
diff --git a/apps/angular5-example/src/polyfills.ts b/apps/angular5-example/src/polyfills.ts
new file mode 100644
index 0000000..781b979
--- /dev/null
+++ b/apps/angular5-example/src/polyfills.ts
@@ -0,0 +1,70 @@
+/**
+ * This file includes polyfills needed by Angular and is loaded before the app.
+ * You can add your own extra polyfills to this file.
+ *
+ * This file is divided into 2 sections:
+ * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
+ * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
+ * file.
+ *
+ * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
+ * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
+ * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
+ *
+ * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
+ */
+
+/***************************************************************************************************
+ * BROWSER POLYFILLS
+ */
+
+/** IE9, IE10 and IE11 requires all of the following polyfills. **/
+// import 'core-js/es6/symbol';
+// import 'core-js/es6/object';
+// import 'core-js/es6/function';
+// import 'core-js/es6/parse-int';
+// import 'core-js/es6/parse-float';
+// import 'core-js/es6/number';
+// import 'core-js/es6/math';
+// import 'core-js/es6/string';
+// import 'core-js/es6/date';
+// import 'core-js/es6/array';
+// import 'core-js/es6/regexp';
+// import 'core-js/es6/map';
+// import 'core-js/es6/weak-map';
+// import 'core-js/es6/set';
+
+/** IE10 and IE11 requires the following for NgClass support on SVG elements */
+// import 'classlist.js'; // Run `npm install --save classlist.js`.
+
+/** IE10 and IE11 requires the following for the Reflect API. */
+// import 'core-js/es6/reflect';
+
+/** Evergreen browsers require these. **/
+// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
+import 'core-js/es7/reflect';
+
+/**
+ * Required to support Web Animations `@angular/platform-browser/animations`.
+ * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
+ **/
+// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
+
+/***************************************************************************************************
+ * Zone JS is required by Angular itself.
+ */
+import 'zone.js/dist/zone'; // Included with Angular CLI.
+
+/***************************************************************************************************
+ * APPLICATION IMPORTS
+ */
+
+/**
+ * Date, currency, decimal and percent pipes.
+ * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
+ */
+// import 'intl'; // Run `npm install --save intl`.
+/**
+ * Need to import at least one locale-data with intl.
+ */
+// import 'intl/locale-data/jsonp/en';
diff --git a/apps/angular5-example/src/styles.css b/apps/angular5-example/src/styles.css
new file mode 100644
index 0000000..54ab642
--- /dev/null
+++ b/apps/angular5-example/src/styles.css
@@ -0,0 +1,2 @@
+/* You can add global styles to this file, and also import other style files */
+@import '~css-star-rating';
diff --git a/apps/angular5-example/src/tsconfig.app.json b/apps/angular5-example/src/tsconfig.app.json
new file mode 100644
index 0000000..8fed5ae
--- /dev/null
+++ b/apps/angular5-example/src/tsconfig.app.json
@@ -0,0 +1,14 @@
+{
+ "extends": "../../../tsconfig.json",
+ "compilerOptions": {
+ "outDir": "../../../dist/out-tsc/apps/angular5-example",
+ "module": "es2015"
+ },
+ "include": [
+ "**/*.ts"
+ /* add all lazy-loaded libraries here: "../../../libs/my-lib/index.ts" */
+ ],
+ "exclude": [
+ "**/*.spec.ts"
+ ]
+}
diff --git a/apps/angular5-example/src/tsconfig.packaged.json b/apps/angular5-example/src/tsconfig.packaged.json
new file mode 100644
index 0000000..c3b2e96
--- /dev/null
+++ b/apps/angular5-example/src/tsconfig.packaged.json
@@ -0,0 +1,9 @@
+{
+ "extends": "../../../tsconfig.packaged.json",
+ "compilerOptions": {
+ "outDir": "../../../dist/apps/angular5-example-packaged",
+ "module": "es2015"
+ },
+ "include": ["**/*.ts"],
+ "exclude": ["**/*.spec.ts"]
+}
diff --git a/changelog/README.md b/changelog/README.md
new file mode 100644
index 0000000..ae49d85
--- /dev/null
+++ b/changelog/README.md
@@ -0,0 +1,86 @@
+#### Examples
+
+Appears under "Features" header, pencil subheader:
+
+```
+feat(pencil): add 'graphiteWidth' option
+```
+
+Appears under "Bug Fixes" header, graphite subheader, with a link to issue #28:
+
+```
+fix(graphite): stop graphite breaking when width < 0.1
+
+Closes #28
+```
+
+Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation:
+
+```
+perf(pencil): remove graphiteWidth option
+
+BREAKING CHANGE: The graphiteWidth option has been removed. The default graphite width of 10mm is always used for performance reason.
+```
+
+The following commit and commit `667ecc1` do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header.
+
+```
+revert: feat(pencil): add 'graphiteWidth' option
+
+This reverts commit 667ecc1654a317a13331b17617d973392f415f02.
+```
+
+### Commit Message Format
+
+A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:
+
+```
+():
+
+
+
+