@syncfusion/ej2-buttons
Advanced tools
@@ -0,1 +1,10 @@ | ||
| /*! | ||
| * filename: index.d.ts | ||
| * version : 32.1.21 | ||
| * Copyright Syncfusion Inc. 2001 - 2025. All rights reserved. | ||
| * Use of this code is subject to the terms of our license. | ||
| * A copy of the current license can be obtained at any time by e-mailing | ||
| * licensing@syncfusion.com. Any infringement will be prosecuted under | ||
| * applicable laws. | ||
| */ | ||
| import * as _buttons from '@syncfusion/ej2-buttons'; | ||
@@ -2,0 +11,0 @@ |
+1
-1
| { | ||
| "name": "@syncfusion/ej2-buttons", | ||
| "version": "32.1.19", | ||
| "version": "32.1.21", | ||
| "description": "A package of feature-rich Essential JS 2 components such as Button, CheckBox, RadioButton and Switch.", | ||
@@ -5,0 +5,0 @@ "author": "Syncfusion Inc.", |
@@ -478,2 +478,3 @@ import { Component, INotifyPropertyChanged } from '@syncfusion/ej2-base'; | ||
| private deleteHandler; | ||
| private getSelectedChipIndex; | ||
| /** | ||
@@ -480,0 +481,0 @@ * Removes the component from the DOM and detaches all its related event handlers. Also, it removes the attributes and classes. |
@@ -931,2 +931,12 @@ var __extends = (this && this.__extends) || (function () { | ||
| }; | ||
| ChipList.prototype.getSelectedChipIndex = function () { | ||
| var chips = this.element.querySelectorAll('.' + classNames.chip); | ||
| var indexes = []; | ||
| for (var i = 0; i < chips.length; i++) { | ||
| if (chips[i].classList.contains(classNames.active)) { | ||
| indexes.push(i); | ||
| } | ||
| } | ||
| return indexes; | ||
| }; | ||
| /** | ||
@@ -974,2 +984,3 @@ * Removes the component from the DOM and detaches all its related event handlers. Also, it removes the attributes and classes. | ||
| var prop = _a[_i]; | ||
| var indexes = void 0; | ||
| switch (prop) { | ||
@@ -982,3 +993,2 @@ case 'chips': | ||
| case 'trailingIconCss': | ||
| case 'selection': | ||
| case 'enableDelete': | ||
@@ -988,2 +998,26 @@ case 'enabled': | ||
| break; | ||
| case 'selection': | ||
| indexes = this.getSelectedChipIndex(); | ||
| if (newProp.selection === 'Single') { | ||
| var chipValue = null; | ||
| if (indexes && typeof (indexes) === 'number') { | ||
| chipValue = indexes; | ||
| } | ||
| else if (indexes && Array.isArray(indexes)) { | ||
| chipValue = indexes.length > 0 ? indexes[indexes.length - 1] : null; | ||
| } | ||
| this.setProperties({ selectedChips: chipValue }, true); | ||
| } | ||
| else if (newProp.selection === 'Multiple') { | ||
| var chipsValue = []; | ||
| if (Array.isArray(indexes)) { | ||
| chipsValue = indexes; | ||
| } | ||
| else { | ||
| chipsValue = [indexes]; | ||
| } | ||
| this.setProperties({ selectedChips: chipsValue }, true); | ||
| } | ||
| this.refresh(); | ||
| break; | ||
| case 'cssClass': | ||
@@ -1002,3 +1036,32 @@ if (!this.chipType()) { | ||
| this.multiSelectedChip = []; | ||
| this.multiSelection(newProp.selectedChips); | ||
| var isTextValue = false; | ||
| var newSelectedChips = []; | ||
| var items = this.element.querySelectorAll('.' + classNames.chip); | ||
| var selectedChips = Array.isArray(newProp.selectedChips) | ||
| ? newProp.selectedChips | ||
| : (isNullOrUndefined(newProp.selectedChips) ? [] | ||
| : [newProp.selectedChips]); | ||
| for (var i = 0; i < selectedChips.length; i++) { | ||
| var value = selectedChips[i]; | ||
| for (var k = 0; k < items.length; k++) { | ||
| var attrVal = items[k].attributes[5].value; | ||
| if (attrVal === String(value)) { | ||
| isTextValue = true; | ||
| } | ||
| } | ||
| } | ||
| if (!isTextValue) { | ||
| for (var i = 0; i < selectedChips.length; i++) { | ||
| var value = selectedChips[i]; | ||
| for (var k = 0; k < items.length; k++) { | ||
| if (k === parseInt(String(value), 10)) { | ||
| newSelectedChips.push(k); | ||
| } | ||
| } | ||
| } | ||
| this.multiSelection(newSelectedChips); | ||
| } | ||
| else { | ||
| this.multiSelection(newProp.selectedChips); | ||
| } | ||
| this.onSelect(this.multiSelectedChip, true); | ||
@@ -1005,0 +1068,0 @@ this.updateSelectedChips(); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
18275779
0.19%382401
0.06%0
-100%39
5.41%