@flexilla/custom-range
Advanced tools
Comparing version 2.0.1 to 2.0.2
var l = Object.defineProperty; | ||
var d = (i, e, t) => e in i ? l(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t; | ||
var n = (i, e, t) => (d(i, typeof e != "symbol" ? e + "" : e, t), t); | ||
var d = (n, e, t) => e in n ? l(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t; | ||
var i = (n, e, t) => (d(n, typeof e != "symbol" ? e + "" : e, t), t); | ||
const s = class s { | ||
constructor(e, t) { | ||
n(this, "rangeContainer"); | ||
n(this, "rangeElement"); | ||
n(this, "indicatorElement"); | ||
n(this, "indicatorClassname"); | ||
n(this, "updateIndicatorSize", () => { | ||
i(this, "rangeContainer"); | ||
i(this, "rangeElement"); | ||
i(this, "indicatorElement"); | ||
i(this, "indicatorClassname"); | ||
i(this, "updateIndicatorSize", () => { | ||
let e = "0px"; | ||
@@ -15,3 +15,3 @@ const t = (parseFloat(this.rangeElement.value) - parseFloat(this.rangeElement.min)) / (parseFloat(this.rangeElement.max) - parseFloat(this.rangeElement.min)) * 100; | ||
}); | ||
var r; | ||
var o; | ||
const a = typeof e == "string" ? document.querySelector(`${e}`) : e; | ||
@@ -22,3 +22,3 @@ if (!(a instanceof HTMLElement)) | ||
throw new Error("The provided element doesn't have a valid HTMLInputElement. Make sure to add data-input-range to the input element"); | ||
this.indicatorClassname = (t == null ? void 0 : t.split(" ")) || ((r = this.rangeContainer.dataset.rangeIndicator) == null ? void 0 : r.split(" ")) || [], this.indicatorElement = this.initIndicator(), this.init(), this.updateIndicatorSize(); | ||
this.indicatorClassname = (t == null ? void 0 : t.split(" ")) || ((o = this.rangeContainer.dataset.rangeIndicator) == null ? void 0 : o.split(" ")) || [], this.indicatorElement = this.initIndicator(), this.init(), this.updateIndicatorSize(); | ||
} | ||
@@ -37,3 +37,3 @@ initIndicator() { | ||
*/ | ||
n(s, "autoInit", (e = "[data-fx-custom-range]") => { | ||
i(s, "autoInit", (e = "[data-fx-custom-range]") => { | ||
const t = Array.from(document.querySelectorAll(e)); | ||
@@ -43,5 +43,7 @@ for (const a of t) | ||
}); | ||
let o = s; | ||
let r = s; | ||
const m = (n, e) => new r(n, e); | ||
export { | ||
o as CustomRange | ||
r as CustomRange, | ||
m as fCustomRange | ||
}; |
@@ -17,2 +17,4 @@ export declare class CustomRange { | ||
export declare const fCustomRange: (containerElement_: string | HTMLElement, rangeIndicator?: string) => CustomRange; | ||
export { } |
{ | ||
"name": "@flexilla/custom-range", | ||
"private": false, | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"type": "module", | ||
@@ -65,3 +65,3 @@ "description": "A lightweight JavaScript component to add range indicator to a custom range component", | ||
"author": "johnkat-mj", | ||
"gitHead": "8435693ee1ff8e2f9d279b5d4026949530d7d05d" | ||
"gitHead": "98932fa7279389be90368e974e58fab0fb1ba654" | ||
} |
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
7568
71