Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@novemberizing/bootstrap

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@novemberizing/bootstrap - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

2

dist/js/main.js

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

(t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})})({});const t=(t,e)=>{for(;t&&t.nodeName&&t.nodeName.toLowerCase()!==e;)t=t.parentNode;return t},e=(t,e)=>{for(;t&&t.nodeName.toLowerCase()!==e;)t=t.previousElementSibling;return t};class r{static#t='<p class="d-inline-flex gap-1 star"></p>';static#e='<button type="button"></button>';static#r='<i class="fa-solid fa-star"></i>';static#n='<i class="fa-regular fa-star"></i>';static{const t=new DOMParser;r.#t=t.parseFromString(r.#t,"text/html").querySelector("p"),r.#e=t.parseFromString(r.#e,"text/html").querySelector("button"),r.#r=t.parseFromString(r.#r,"text/html").querySelector("i"),r.#n=t.parseFromString(r.#n,"text/html").querySelector("i")}#s=null;#o=null;#i=null;#a=null;#l=null;#u=null;#c=null;static load(t){const e=document.querySelectorAll("input[type='range'].form-control.star");for(const n of e)new r(n,"function"==typeof t?t(n):t)}static#p(){return r.#t.cloneNode(!0)}static#d(n,s){const o=r.#e.cloneNode(!0);return o.setAttribute("data-value",n+1),o.setAttribute("aria-pressed",s),s?o.appendChild(r.#r.cloneNode(!0)):o.appendChild(r.#n.cloneNode(!0)),o.addEventListener("click",(r=>{const n=t(r.target,"button"),s=t(n,"p"),o=e(s,"input"),i=parseInt(n.getAttribute("data-value")),a=n.getAttribute("aria-pressed"),l=n.nextElementSibling;"true"===a?l&&"true"===l.getAttribute("aria-pressed")?o.setAttribute("value",i):o.setAttribute("value",i-1):o.setAttribute("value",i);const u=parseInt(o.getAttribute("value")),c=s.querySelectorAll("button");for(const t of c){const e=t.querySelector("i");u<parseInt(t.getAttribute("data-value"))?(e.classList.contains("fa-solid")&&e.classList.replace("fa-solid","fa-regular"),t.setAttribute("aria-pressed","false")):(e.classList.contains("fa-regular")&&e.classList.replace("fa-regular","fa-solid"),t.setAttribute("aria-pressed","true"))}})),o}constructor(t,e){this.#i=t,this.#a=e,"string"==typeof this.#i&&(this.#i=document.getElementById(this.#i)),this.#s=this.#i.parentNode,this.#o=this.#i.nextSibling,this.#l=parseInt(this.#i.max),this.#u=parseInt(this.#i.min),this.#c=parseInt(this.#i.defaultValue);const n=r.#p();for(let t=this.#u;t<this.#l;t++){const e=r.#d(t,t<this.#c);n.appendChild(e)}this.#i.style.display="none",this.#s.insertBefore(n,this.#o)}}void 0===window.novemberizing?console.error("need to ..."):void 0===window.novemberizing.bootstrap?window.novemberizing.bootstrap={Star:r}:window.novemberizing.bootstrap.Star=r;
const t=(t,e)=>{for(;t&&t.nodeName&&t.nodeName.toLowerCase()!==e;)t=t.parentNode;return t},e=(t,e)=>{for(;t&&t.nodeName.toLowerCase()!==e;)t=t.previousElementSibling;return t};class r{static#t='<p class="d-inline-flex gap-1 star"></p>';static#e='<button type="button"></button>';static#r='<i class="fa-solid fa-star"></i>';static#s='<i class="fa-regular fa-star"></i>';static{const t=new DOMParser;r.#t=t.parseFromString(r.#t,"text/html").querySelector("p"),r.#e=t.parseFromString(r.#e,"text/html").querySelector("button"),r.#r=t.parseFromString(r.#r,"text/html").querySelector("i"),r.#s=t.parseFromString(r.#s,"text/html").querySelector("i")}#n=null;#o=null;#a=null;#i=null;#l=null;#u=null;#c=null;static load(t){const e=document.querySelectorAll("input[type='range'].form-control.star");for(const s of e)new r(s,"function"==typeof t?t(s):t)}static#p(){return r.#t.cloneNode(!0)}static#d(s,n){const o=r.#e.cloneNode(!0);return o.setAttribute("data-value",s+1),o.setAttribute("aria-pressed",n),n?o.appendChild(r.#r.cloneNode(!0)):o.appendChild(r.#s.cloneNode(!0)),o.addEventListener("click",(r=>{const s=t(r.target,"button"),n=t(s,"p"),o=e(n,"input"),a=parseInt(s.getAttribute("data-value")),i=s.getAttribute("aria-pressed"),l=s.nextElementSibling;"true"===i?l&&"true"===l.getAttribute("aria-pressed")?o.setAttribute("value",a):o.setAttribute("value",a-1):o.setAttribute("value",a);const u=parseInt(o.getAttribute("value")),c=n.querySelectorAll("button");for(const t of c){const e=t.querySelector("i");u<parseInt(t.getAttribute("data-value"))?(e.classList.contains("fa-solid")&&e.classList.replace("fa-solid","fa-regular"),t.setAttribute("aria-pressed","false")):(e.classList.contains("fa-regular")&&e.classList.replace("fa-regular","fa-solid"),t.setAttribute("aria-pressed","true"))}})),o}constructor(t,e){this.#a=t,this.#i=e,"string"==typeof this.#a&&(this.#a=document.getElementById(this.#a)),this.#n=this.#a.parentNode,this.#o=this.#a.nextSibling,this.#l=parseInt(this.#a.max),this.#u=parseInt(this.#a.min),this.#c=parseInt(this.#a.defaultValue);const s=r.#p();for(let t=this.#u;t<this.#l;t++){const e=r.#d(t,t<this.#c);s.appendChild(e)}this.#a.style.display="none",this.#n.insertBefore(s,this.#o)}}void 0===window.novemberizing?console.error("need to ..."):(console.log(1),void 0===window.novemberizing.bootstrap?window.novemberizing.bootstrap={Star:r}:window.novemberizing.bootstrap.Star=r);
{
"name": "@novemberizing/bootstrap",
"version": "0.0.5",
"version": "0.0.6",
"description": "novemberizing's bootstrap plugin",

@@ -5,0 +5,0 @@ "main": "./src/index.js",

@@ -6,2 +6,3 @@ import Star from "./Star.js";

} else {
console.log(1);
if(typeof window.novemberizing.bootstrap === 'undefined') {

@@ -8,0 +9,0 @@ window.novemberizing.bootstrap = { Star };

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