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

@prof-dev/improved-select

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prof-dev/improved-select - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

2

lib/ImprovedSelect.d.ts

@@ -42,3 +42,3 @@ import { EventEmitter } from "@prof-dev/event-emitter";

updateDisabledOptions(): void;
reset(): void;
reset: () => void;
clear(): void;

@@ -45,0 +45,0 @@ static create(element: HTMLElement): ImprovedSelect;

@@ -65,2 +65,28 @@ "use strict";

_this.isHtmlValue = false;
_this.reset = function () {
var e_1, _a;
if (_this.select) {
Array.from(_this.select.options).forEach(function (option) {
option.selected = false;
});
try {
for (var _b = __values(_this.initialSelection), _c = _b.next(); !_c.done; _c = _b.next()) {
var index = _c.value;
if (_this.select.options[index] !== undefined) {
_this.select.options[index].selected = true;
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
_this.select.dispatchEvent(new Event("change", {
bubbles: true,
}));
}
};
_this.isActive = _this.element.classList.contains("is-active");

@@ -88,3 +114,3 @@ _this.isHtmlValue = _this.element.hasAttribute("data-select-html-value");

ImprovedSelect.prototype.initChangeStateBehavior = function () {
var e_1, _a, e_2, _b;
var e_2, _a, e_3, _b;
if (this.select) {

@@ -97,3 +123,3 @@ try {

}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {

@@ -103,3 +129,3 @@ try {

}
finally { if (e_1) throw e_1.error; }
finally { if (e_2) throw e_2.error; }
}

@@ -114,3 +140,3 @@ try {

}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {

@@ -120,3 +146,3 @@ try {

}
finally { if (e_2) throw e_2.error; }
finally { if (e_3) throw e_3.error; }
}

@@ -314,28 +340,2 @@ if (this.defaultSelection.length === 0 &&

};
ImprovedSelect.prototype.reset = function () {
var e_3, _a;
if (this.select) {
Array.from(this.select.options).forEach(function (option) {
option.selected = false;
});
try {
for (var _b = __values(this.initialSelection), _c = _b.next(); !_c.done; _c = _b.next()) {
var index = _c.value;
if (this.select.options[index] !== undefined) {
this.select.options[index].selected = true;
}
}
}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_3) throw e_3.error; }
}
this.select.dispatchEvent(new Event("change", {
bubbles: true,
}));
}
};
ImprovedSelect.prototype.clear = function () {

@@ -342,0 +342,0 @@ if (this.select) {

{
"name": "@prof-dev/improved-select",
"version": "1.0.6",
"version": "1.0.7",
"description": "Helper for live clicks events management",

@@ -5,0 +5,0 @@ "main": "lib/ImprovedSelect.js",

@@ -325,3 +325,3 @@ import { EventEmitter } from "@prof-dev/event-emitter";

reset() {
reset = () => {
if (this.select) {

@@ -344,3 +344,3 @@ Array.from(this.select.options).forEach((option) => {

}
}
};

@@ -347,0 +347,0 @@ clear() {

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