@manufosela/stars-rating
Advanced tools
Comparing version 3.3.1 to 3.3.2
{ | ||
"name": "@manufosela/stars-rating", | ||
"description": "Lit-Element webcomponent to draw stars rating with vote options", | ||
"version": "3.3.1", | ||
"version": "3.3.2", | ||
"main": "stars-rating.js", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -12,3 +12,3 @@ import { LitElement, html, css } from 'lit-element'; | ||
*/ | ||
class StarsRating extends LitElement { | ||
class StarsRating extends LitElement { | ||
static get properties() { | ||
@@ -33,3 +33,3 @@ return { | ||
type: String, | ||
value: "auto" | ||
value: 'auto' | ||
}, | ||
@@ -65,3 +65,3 @@ resetbtn: { | ||
display: inline-block; | ||
content: var(--start-unicode, "✩"); | ||
content: var(--start-unicode, "★"); | ||
} | ||
@@ -101,7 +101,7 @@ label { | ||
super.disconnectedCallback(); | ||
this.renderRoot.querySelector("#rating").removeEventListener('click', this._rate); | ||
this.renderRoot.querySelector('#rating').removeEventListener('click', this._rate); | ||
} | ||
updated(changedProperties, o) { | ||
if (changedProperties.get('manual') !==this.manual) { | ||
if (changedProperties.get('manual') !== this.manual) { | ||
this._manualChanged(); | ||
@@ -137,5 +137,5 @@ } | ||
if (this.manual) { | ||
this.renderRoot.querySelector("#rating").addEventListener('click', this._rate); | ||
this.renderRoot.querySelector('#rating').addEventListener('click', this._rate); | ||
} else { | ||
this.renderRoot.querySelector("#rating").removeEventListener('click', this._rate); | ||
this.renderRoot.querySelector('#rating').removeEventListener('click', this._rate); | ||
} | ||
@@ -154,3 +154,3 @@ } | ||
<fieldset id="rating"> | ||
${(this.resetbtn && this.manual)?html`<label class="resetbtn"><input @click="${this.reset}" type="radio" id="x" name="resetbtn" value="-1" /></label> `:html``} | ||
${(this.resetbtn && this.manual) ? html`<label class="resetbtn"><input @click="${this.reset}" type="radio" id="x" name="resetbtn" value="-1" /></label> ` : html``} | ||
${repeat( | ||
@@ -160,4 +160,4 @@ this._stars, | ||
(item, i) => html`<label for="star${i}" ?data-hightlight="${this._isHightlight(i)}"> | ||
<input type="radio" id="star${i}" name="rating" value="${i}" /> | ||
</label>` | ||
<input type="radio" id="star${i}" name="rating" value="${i}" /> | ||
</label>` | ||
)} | ||
@@ -164,0 +164,0 @@ </fieldset> |
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
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
12685