Socket
Socket
Sign inDemoInstall

raty-js

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

raty-js - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

.github/FUNDING.yml

9

bower.json

@@ -31,4 +31,9 @@ {

"license": "MIT",
"main": "lib/jquery.raty.js",
"name": "raty"
"main": [
"lib/jquery.raty.js",
"lib/jquery.raty.css",
"lib/fonts/*",
"lib/images/*"
],
"name": "raty",
}

@@ -0,1 +1,11 @@

## 3.1.0
### News
- Adds `iconRangeSame` option where the previous stars will be the same as the selected one; [#135](https://github.com/wbotelhos/raty/issues/135) by [viniciusjl](https://github.com/viniciusjl)
### Update
- Adds CSS, Images and Fonts to Bower; [#161](https://github.com/wbotelhos/raty/pull/161) by [juriejan](https://github.com/juriejan)
## 3.0.0

@@ -2,0 +12,0 @@

@@ -8,3 +8,3 @@ /*!

* github: wbotelhos/raty
* version: 3.0.0
* version: 3.1.0
*

@@ -36,2 +36,3 @@ */

iconRange: undefined,
iconRangeSame: false,
mouseout: undefined,

@@ -419,2 +420,8 @@ mouseover: undefined,

if (this.opt.iconRangeSame && this.opt.iconRange) {
while (hash < this.opt.iconRange.length && this.opt.iconRange[hash].range < score) {
hash++;
}
}
for (var i = 1; i <= this.stars.length; i++) {

@@ -421,0 +428,0 @@ var icon;

@@ -13,12 +13,12 @@ {

"dependencies": {
"jquery": "^3.5.1"
"jquery": "^3.6"
},
"description": "Raty - A Star Rating Plugin",
"devDependencies": {
"eslint": "^7.11.0",
"jasmine-core": "^3.6.0",
"karma": "^5.2.3",
"karma-chrome-launcher": "^3.1.0",
"karma-firefox-launcher": "^1.3.0",
"karma-jasmine": "^4.0.1"
"eslint": "^7.32",
"jasmine-core": "^3.9",
"karma": "^6.3",
"karma-chrome-launcher": "^3.1",
"karma-firefox-launcher": "^2.1",
"karma-jasmine": "^4.0"
},

@@ -57,3 +57,3 @@ "directories": {

},
"version": "3.0.0"
"version": "3.1.0"
}
# Raty - A Star Rating Plugin
[![CI](https://github.com/wbotelhos/raty/workflows/CI/badge.svg?)](https://github.com/wbotelhos/raty/actions?query=workflow%3ACI)
[![CI](https://github.com/wbotelhos/raty/workflows/CI/badge.svg)](https://github.com/wbotelhos/raty/actions)
[![NPM Version](https://badge.fury.io/js/raty-js.svg)](https://badge.fury.io/js/raty-js)
[![Code Climate](https://codeclimate.com/github/wbotelhos/raty.png)](https://codeclimate.com/github/wbotelhos/raty)
[![Patreon](https://img.shields.io/badge/donate-%3C3-brightgreen.svg)](https://www.patreon.com/wbotelhos)
[![Maintainability](https://codeclimate.com/github/wbotelhos/raty.png)](https://codeclimate.com/github/wbotelhos/raty)
[![Sponsor](https://img.shields.io/badge/sponsor-%3C3-green)](https://www.patreon.com/wbotelhos)

@@ -47,38 +47,39 @@ ## Rails Rating?

| Property | Default |Description |
|--------------|------------------------------------------------|-----------------------------------------------------------------|
|`cancel` |`false` |Creates a cancel button to cancel the rating. |
|`cancelClass` |`'raty-cancel'` |Name of cancel's class. |
|`cancelHint` |`'Cancel this rating!'` |The cancel's button hint. |
|`cancelOff` |`'cancel-off.png'` |Icon used on active cancel. |
|`cancelOn` |`'cancel-on.png'` |Icon used inactive cancel. |
|`cancelPlace` |`'left'` |Cancel's button position. |
|`click` |`undefined` |Callback executed on rating click. |
|`half` |`false` |Enables half star selection. |
|`halfShow` |`true` |Enables half star display. |
|`hints` |`['bad', 'poor', 'regular', 'good', 'gorgeous']`|Hints used on each star. |
|`iconRange` |`undefined` |Object list with position and icon on and off to do a mixed icons|
|`mouseout` |`undefined` |Callback executed on mouseout. |
|`mouseover` |`undefined` |Callback executed on mouseover. |
|`noRatedMsg` |`'Not rated yet!'` |Hint for non rated elements when it's readOnly. |
|`number` |`5` |The number of stars that will be presented. |
|`numberMax` |`20` |Max number of stars star the option number will create. |
|`path` |`undefined` |A global path where the icon will be found. |
|`precision` |`false` |Enables the selection of a precise score. |
|`readOnly` |`false` |Turns the rating read-only. |
|`round` |`{ down: .25, full: .6, up: .76 }` |Includes value attributes to do the score rounding math. |
|`score` |`undefined` |Initial rating. |
|`scoreName` |`'score'` |Name of the hidden field that holds the score value. |
|`single` |`false` |Enables single star selection. |
|`space` |`true` |Puts space between the icons. |
|`starHalf` |`'star-half.png'` |The name of the half star image. |
|`starOff` |`'star-off.png'` |Name of the star image off. |
|`starOn` |`'star-on.png'` |Name of the star image on. |
|`target` |`undefined` |Element selector where the score will be displayed. |
|`targetFormat`|`'{score}'` |Template to interpolate the score in. |
|`targetKeep` |`false` |If the last rating value will be kept on mouseout. |
|`targetScore` |`undefined` |Score field target avoiding hidden field creation |
|`targetText` |`''` |Default text in a target. |
|`targetType` |`'hint'` |Choose if target will receive a hint or the score number |
|`starType` |`'img'` |Element used to represent a star. |
| Property | Default |Description |
|----------------|------------------------------------------------|-----------------------------------------------------------------|
|`cancel` |`false` |Creates a cancel button to cancel the rating. |
|`cancelClass` |`'raty-cancel'` |Name of cancel's class. |
|`cancelHint` |`'Cancel this rating!'` |The cancel's button hint. |
|`cancelOff` |`'cancel-off.png'` |Icon used on active cancel. |
|`cancelOn` |`'cancel-on.png'` |Icon used inactive cancel. |
|`cancelPlace` |`'left'` |Cancel's button position. |
|`click` |`undefined` |Callback executed on rating click. |
|`half` |`false` |Enables half star selection. |
|`halfShow` |`true` |Enables half star display. |
|`hints` |`['bad', 'poor', 'regular', 'good', 'gorgeous']`|Hints used on each star. |
|`iconRange` |`undefined` |Object list with position and icon on and off to do a mixed icons|
|`iconRangeSame` |`false` |All icons prior to selection will be the same as the selection. |
|`mouseout` |`undefined` |Callback executed on mouseout. |
|`mouseover` |`undefined` |Callback executed on mouseover. |
|`noRatedMsg` |`'Not rated yet!'` |Hint for non rated elements when it's readOnly. |
|`number` |`5` |The number of stars that will be presented. |
|`numberMax` |`20` |Max number of stars star the option number will create. |
|`path` |`undefined` |A global path where the icon will be found. |
|`precision` |`false` |Enables the selection of a precise score. |
|`readOnly` |`false` |Turns the rating read-only. |
|`round` |`{ down: .25, full: .6, up: .76 }` |Includes value attributes to do the score rounding math. |
|`score` |`undefined` |Initial rating. |
|`scoreName` |`'score'` |Name of the hidden field that holds the score value. |
|`single` |`false` |Enables single star selection. |
|`space` |`true` |Puts space between the icons. |
|`starHalf` |`'star-half.png'` |The name of the half star image. |
|`starOff` |`'star-off.png'` |Name of the star image off. |
|`starOn` |`'star-on.png'` |Name of the star image on. |
|`target` |`undefined` |Element selector where the score will be displayed. |
|`targetFormat` |`'{score}'` |Template to interpolate the score in. |
|`targetKeep` |`false` |If the last rating value will be kept on mouseout. |
|`targetScore` |`undefined` |Score field target avoiding hidden field creation |
|`targetText` |`''` |Default text in a target. |
|`targetType` |`'hint'` |Choose if target will receive a hint or the score number |
|`starType` |`'img'` |Element used to represent a star. |

@@ -85,0 +86,0 @@ ## Functions

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc