angular-star-rating
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -101,2 +101,3 @@ /******/ (function(modules) { // webpackBootstrap | ||
var StarRatingController = (function () { | ||
// | ||
function StarRatingController() { | ||
@@ -131,4 +132,4 @@ /** | ||
this.classFilled = this.classFilled || "star-filled-icon"; | ||
this.pathEmpty = this.pathEmpty || "assets/images/icons.svg#star"; | ||
this.pathFilled = this.pathFilled || "assets/images/icons.svg#star-filled"; | ||
this.pathEmpty = this.pathEmpty || StarRatingController.DefaultSvgPath + "#" + StarRatingController.DefaultSvgEmptySymbolId; | ||
this.pathFilled = this.pathFilled || StarRatingController.DefaultSvgPath + "#" + StarRatingController.DefaultSvgFilledSymbolId; | ||
this.getColor = this.getColor || this.calculateColor; | ||
@@ -259,2 +260,6 @@ this.onUpdate = this.onUpdate || function () { }; | ||
StarRatingController.DefaultStarType = "svg"; | ||
StarRatingController.DefaultAssetsPath = "assets/images/"; | ||
StarRatingController.DefaultSvgPath = StarRatingController.DefaultAssetsPath + "star-rating.icons.svg"; | ||
StarRatingController.DefaultSvgEmptySymbolId = "star"; | ||
StarRatingController.DefaultSvgFilledSymbolId = "star-filled"; | ||
@@ -267,3 +272,3 @@ | ||
var path = 'src/star-rating.tpl.html'; | ||
var html = "<div id=\"{{$ctrl.id}}\"\r\n class=\"rating {{$ctrl.rating?'value-'+$ctrl.rating:0}} {{$ctrl.color?'color-'+$ctrl.color:''}} {{$ctrl.starType?'star-'+$ctrl.starType:''}} {{$ctrl.speed}} {{$ctrl.size}} {{$ctrl.labelPosition?'label-'+$ctrl.labelPosition:''}}\"\r\n ng-class=\"{'read-only':$ctrl.readOnly, 'disabled':$ctrl.disabled, 'spread':$ctrl.spread}\">\r\n <div ng-show=\"$ctrl.text\"\r\n class=\"label-value\">\r\n {{$ctrl.text}}\r\n </div>\r\n\r\n <div class=\"star-container\">\r\n <div class=\"star\"\r\n ng-repeat=\"star in $ctrl.stars track by $index\"\r\n ng-click=\"$ctrl.onStarClicked(star)\">\r\n\r\n <i class=\"star-empty {{$ctrl.classEmpty}}\"></i>\r\n <i class=\"star-filled {{$ctrl.classFilled}}\"></i>\r\n\r\n <svg class=\"star-empty {{$ctrl.classEmpty}}\">\r\n <use xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href={{$ctrl.pathEmpty}}></use>\r\n </svg>\r\n <svg class=\"star-filled {{$ctrl.classFilled}}\">\r\n <use xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href={{$ctrl.pathFilled}}></use>\r\n </svg>\r\n\r\n </div>\r\n </div>\r\n\r\n</div>\r\n\r\n"; | ||
var html = "<div id=\"{{$ctrl.id}}\"\r\n class=\"rating {{$ctrl.rating?'value-'+$ctrl.rating:0}} {{$ctrl.color?'color-'+$ctrl.color:''}} {{$ctrl.starType?'star-'+$ctrl.starType:''}} {{$ctrl.speed}} {{$ctrl.size}} {{$ctrl.labelPosition?'label-'+$ctrl.labelPosition:''}}\"\r\n ng-class=\"{'read-only':$ctrl.readOnly, 'disabled':$ctrl.disabled, 'spread':$ctrl.spread}\">\r\n <div ng-show=\"$ctrl.text\"\r\n class=\"label-value\">\r\n {{$ctrl.text}}\r\n </div>\r\n\r\n<img ng-src=\"{{$ctrl.test}}\" style=\"border:1px solid red;\">\r\n\r\n <div class=\"star-container\">\r\n <div class=\"star\"\r\n ng-repeat=\"star in $ctrl.stars track by $index\"\r\n ng-click=\"$ctrl.onStarClicked(star)\">\r\n\r\n <i class=\"star-empty {{$ctrl.classEmpty}}\"></i>\r\n <i class=\"star-filled {{$ctrl.classFilled}}\"></i>\r\n\r\n <svg class=\"star-empty {{$ctrl.classEmpty}}\">\r\n <use xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:ng-href=\"{{$ctrl.pathEmpty}}\"></use>\r\n </svg>\r\n <svg class=\"star-filled {{$ctrl.classFilled}}\">\r\n <use xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"{{$ctrl.pathFilled}}\"></use>\r\n </svg>\r\n\r\n </div>\r\n </div>\r\n\r\n</div>\r\n\r\n"; | ||
window.angular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]); | ||
@@ -622,7 +627,7 @@ module.exports = path; | ||
/* 8 */ | ||
/***/ function(module, exports) { | ||
/***/ function(module, exports, __webpack_require__) { | ||
module.exports = "data:image/svg+xml;base64,PHN2ZyBzdHlsZT0icG9zaXRpb246IGFic29sdXRlOyB3aWR0aDogMDsgaGVpZ2h0OiAwOyBvdmVyZmxvdzogaGlkZGVuOyIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4NCjxkZWZzPg0KDQo8c3ltYm9sIGlkPSJzdGFyIiB2aWV3Qm94PSIwIDAgMzQgMzIiPg0KPHRpdGxlPnN0YXI8L3RpdGxlPg0KPHBhdGggY2xhc3M9InBhdGgxIiBkPSJNMzMuNDEyIDEyLjM5NWwtMTEuODQyLTEuMDIxLTQuNjI4LTEwLjkwNC00LjYyOCAxMC45Mi0xMS44NDIgMS4wMDUgOC45OTMgNy43OTEtMi43MDEgMTEuNTc5IDEwLjE3OS02LjE0NCAxMC4xNzkgNi4xNDQtMi42ODUtMTEuNTc5IDguOTc2LTcuNzkxek0xNi45NDEgMjIuNTQxbC02LjE5MyAzLjczOSAxLjY0Ny03LjA0OS01LjQ2OC00Ljc0NCA3LjIxNC0wLjYyNiAyLjgtNi42MzggMi44MTYgNi42NTQgNy4yMTQgMC42MjYtNS40NjggNC43NDQgMS42NDcgNy4wNDktNi4yMDktMy43NTV6Ij48L3BhdGg+DQo8L3N5bWJvbD4NCg0KICAgIDxzeW1ib2wgaWQ9InN0YXItZmlsbGVkIiB2aWV3Qm94PSIwIDAgMzQgMzIiPg0KPHRpdGxlPnN0YXItZmlsbGVkPC90aXRsZT4NCjxwYXRoIGNsYXNzPSJwYXRoMSIgZD0iTTE2Ljk0MSAyNS42MjFsMTAuMTc5IDYuMTQ0LTIuNzAxLTExLjU3OSA4Ljk5My03Ljc5MS0xMS44NDItMS4wMDUtNC42MjgtMTAuOTItNC42MjggMTAuOTItMTEuODQyIDEuMDA1IDguOTkzIDcuNzkxLTIuNzAxIDExLjU3OXoiPjwvcGF0aD4NCjwvc3ltYm9sPg0KDQo8L2RlZnM+DQo8L3N2Zz4NCg==" | ||
module.exports = __webpack_require__.p + "assets/images/star-rating.icons.svg"; | ||
/***/ } | ||
/******/ ]); |
{ | ||
"name": "angular-star-rating", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"license": "MIT", | ||
"keywords": [ | ||
"Star-Rating", | ||
"Starrating", | ||
"Icon", | ||
"SVG", | ||
"PNG", | ||
"JPEG", | ||
"CSS", | ||
@@ -11,4 +17,3 @@ "CSS only", | ||
"Angular2", | ||
"Typescript", | ||
"SVG" | ||
"Typescript" | ||
], | ||
@@ -59,2 +64,3 @@ "description": "Angular star rating component. This project is based on a css only starrating implementation", | ||
"ntypescript": "^1.201609060105.1", | ||
"rimraf": "^2.5.4", | ||
"sass-loader": "^4.0.2", | ||
@@ -78,2 +84,3 @@ "sc5-styleguide": "^1.2.0", | ||
"postinstall": "typings install", | ||
"clean:dist": "rimraf dist", | ||
"webpack:compile": "webpack --progress --colors", | ||
@@ -80,0 +87,0 @@ "webpack:watch": "webpack --progress --colors --watch webpack-dev-server --content-base dist/", |
@@ -5,3 +5,3 @@ //import * as angular from 'angular'; | ||
import styles = require('./star-rating.sc5.scss'); | ||
import icons = require('./icons.svg'); | ||
import icons = require('./star-rating.icons.svg'); | ||
@@ -8,0 +8,0 @@ let styles = styles; |
@@ -19,2 +19,8 @@ export type starRatingSizes = "small" | "medium" | "large"; | ||
static DefaultAssetsPath:string = "assets/images/"; | ||
static DefaultSvgPath:string = StarRatingController.DefaultAssetsPath+"star-rating.icons.svg"; | ||
static DefaultSvgEmptySymbolId:string = "star"; | ||
static DefaultSvgFilledSymbolId:string = "star-filled"; | ||
/** | ||
@@ -64,7 +70,8 @@ * getStarsArray | ||
// | ||
constructor() { | ||
this.classEmpty = this.classEmpty || "star-empty-icon"; | ||
this.classFilled = this.classFilled || "star-filled-icon"; | ||
this.pathEmpty = this.pathEmpty || "assets/images/icons.svg#star"; | ||
this.pathFilled = this.pathFilled || "assets/images/icons.svg#star-filled"; | ||
this.pathEmpty = this.pathEmpty || StarRatingController.DefaultSvgPath+"#"+StarRatingController.DefaultSvgEmptySymbolId; | ||
this.pathFilled = this.pathFilled || StarRatingController.DefaultSvgPath+"#"+StarRatingController.DefaultSvgFilledSymbolId; | ||
this.getColor = this.getColor || this.calculateColor; | ||
@@ -123,3 +130,2 @@ this.onUpdate = this.onUpdate || function () {}; | ||
if (valueChanged('starType', changes)) { | ||
@@ -126,0 +132,0 @@ this.starType = changes.starType.currentValue || StarRatingController.DefaultStarType; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
85907
14
880
2
0
44