New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@syncfusion/ej2-lists

Package Overview
Dependencies
Maintainers
3
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-lists - npm Package Compare versions

Comparing version 17.4.41 to 17.4.43

8

CHANGELOG.md

@@ -5,2 +5,10 @@ # Changelog

### ListView
#### Bug Fixes
- The issue with `enabling the virtualization support in ListView component that throws script error in IE 11 browser` has been resolved.
## 17.4.41 (2020-01-07)
### ListBox

@@ -7,0 +15,0 @@

2

dist/global/index.d.ts
/*!
* filename: index.d.ts
* version : 17.4.41
* version : 17.4.43
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license.

{
"_from": "@syncfusion/ej2-lists@*",
"_id": "@syncfusion/ej2-lists@17.4.40",
"_id": "@syncfusion/ej2-lists@17.4.41",
"_inBundle": false,
"_integrity": "sha512-oI2/xkTLkuHENJF2mrFucP9c/Vf3ZcSLxO3/yvckN1ApetuV1mECGlS+wA2PSGGePIeeUSj6FkQpfmNHqNIiYg==",
"_integrity": "sha512-sa8BznRruZjw3ug5p+OqnadMP3PY/T9FLHpay98lOOf8tPY3BvZrV8z14DhhJW7ntXCFZCE/UYjZG9LcMBQZdA==",
"_location": "/@syncfusion/ej2-lists",

@@ -36,4 +36,4 @@ "_phantomChildren": {},

],
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-lists/-/ej2-lists-17.4.40.tgz",
"_shasum": "fabfe6bc2c99998985f2517a40ffb1dd25b8b490",
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-lists/-/ej2-lists-17.4.41.tgz",
"_shasum": "ed15b480bf098776e006f8a4fc2341b7eb1672a6",
"_spec": "@syncfusion/ej2-lists@*",

@@ -46,5 +46,5 @@ "_where": "/jenkins/workspace/ation_hotfix_17.2.0.34_Vol2-DDPJ6C2YEWTWLLKKNA7AG2JBE6DYTCTNGMHGORWGAYAVCL6L7OLQ/packages/included",

"dependencies": {
"@syncfusion/ej2-base": "~17.4.41",
"@syncfusion/ej2-buttons": "~17.4.41",
"@syncfusion/ej2-data": "~17.4.41"
"@syncfusion/ej2-base": "~17.4.43",
"@syncfusion/ej2-buttons": "~17.4.43",
"@syncfusion/ej2-data": "~17.4.43"
},

@@ -89,4 +89,4 @@ "deprecated": false,

"typings": "index.d.ts",
"version": "17.4.41",
"version": "17.4.43",
"sideEffects": false
}

@@ -75,16 +75,17 @@ import { classNames } from './list-view';

Virtualization.prototype.uiIndicesInitialization = function () {
var _this = this;
this.uiIndices = { 'activeIndices': [], 'disabledItemIndices': [], 'hiddenItemIndices': [] };
this.listViewInstance.curViewDS.forEach(function (ds, index) {
if (_this.listViewInstance.showCheckBox && ds[_this.listViewInstance.fields.isChecked]) {
_this.uiIndices.activeIndices.push(index);
var data = this.listViewInstance.curViewDS;
for (var i = 0; i < data.length; i++) {
if (this.listViewInstance.showCheckBox && data[i][this.listViewInstance.fields.isChecked]) {
this.uiIndices.activeIndices.push(i);
}
if (!isNullOrUndefined(ds[_this.listViewInstance.fields.enabled]) && !ds[_this.listViewInstance.fields.enabled]) {
_this.uiIndices.disabledItemIndices.push(index);
if (!isNullOrUndefined(data[i][this.listViewInstance.fields.enabled]) && !data[i][this.listViewInstance.fields.enabled]) {
this.uiIndices.disabledItemIndices.push(i);
}
});
}
if (this.isNgTemplate()) {
Array.prototype.forEach.call(this.listViewInstance.element.querySelectorAll('.' + classNames.listItem), function (item, index) {
item.context = _this.listViewInstance.viewContainerRef._embeddedViews[index].context;
});
var items = this.listViewInstance.element.querySelectorAll('.' + classNames.listItem);
for (var index = 0; index < items.length; index++) {
items[index].context = this.listViewInstance.viewContainerRef._embeddedViews[index].context;
}
}

@@ -151,8 +152,8 @@ };

Virtualization.prototype.onLongScroll = function (listDiff, isScrollingDown) {
var _this = this;
var index = isScrollingDown ? (this.uiFirstIndex + listDiff) : (this.uiFirstIndex - listDiff);
Array.prototype.forEach.call(this.listViewInstance.ulElement.querySelectorAll('li'), function (element) {
_this.updateUI(element, index);
var elements = this.listViewInstance.ulElement.querySelectorAll('li');
for (var i = 0; i < elements.length; i++) {
this.updateUI(elements[i], index);
index++;
});
}
this.uiLastIndex = isScrollingDown ? (this.uiLastIndex + listDiff) : (this.uiLastIndex - listDiff);

@@ -302,4 +303,4 @@ this.uiFirstIndex = isScrollingDown ? (this.uiFirstIndex + listDiff) : (this.uiFirstIndex - listDiff);

if (!isNullOrUndefined(this.activeIndex) || (this.listViewInstance.showCheckBox && this.uiIndices.activeIndices.length)) {
var dataCollection_1 = [];
var textCollection_1 = [];
var dataCollection = [];
var textCollection = [];
if (typeof this.listViewInstance.dataSource[0] === 'string' ||

@@ -309,8 +310,9 @@ typeof this.listViewInstance.dataSource[0] === 'number') {

if (this.listViewInstance.showCheckBox) {
this.uiIndices.activeIndices.forEach(function (index) {
dataCollection_1.push(curViewDS_1[index]);
});
var indices = this.uiIndices.activeIndices;
for (var i = 0; i < indices.length; i++) {
dataCollection.push(curViewDS_1[indices[i]]);
}
return {
text: dataCollection_1,
data: dataCollection_1,
text: dataCollection,
data: dataCollection,
index: this.uiIndices.activeIndices.map(function (index) {

@@ -331,13 +333,14 @@ return _this.listViewInstance.dataSource.indexOf(curViewDS_1[index]);

var curViewDS_2 = this.listViewInstance.curViewDS;
var text_1 = this.listViewInstance.fields.text;
var text = this.listViewInstance.fields.text;
if (this.listViewInstance.showCheckBox) {
this.uiIndices.activeIndices.forEach(function (index) {
textCollection_1.push(curViewDS_2[index][text_1]);
dataCollection_1.push(curViewDS_2[index]);
});
var indexArray = this.uiIndices.activeIndices;
for (var i = 0; i < indexArray.length; i++) {
textCollection.push(curViewDS_2[indexArray[i]][text]);
dataCollection.push(curViewDS_2[indexArray[i]]);
}
var dataSource_1 = this.listViewInstance.dataSource instanceof DataManager
? curViewDS_2 : this.listViewInstance.dataSource;
return {
text: textCollection_1,
data: dataCollection_1,
text: textCollection,
data: dataCollection,
index: this.uiIndices.activeIndices.map(function (index) {

@@ -491,11 +494,11 @@ return dataSource_1.indexOf(curViewDS_2[index]);

Virtualization.prototype.checkedItem = function (checked) {
var _this = this;
if (checked) {
this.uiIndices.activeIndices = [];
this.activeIndex = undefined;
this.listViewInstance.curViewDS.forEach(function (ds, index) {
if (!ds.isHeader) {
_this.uiIndices.activeIndices.push(index);
var data = this.listViewInstance.curViewDS;
for (var index = 0; index < data.length; index++) {
if (!data[index].isHeader) {
this.uiIndices.activeIndices.push(index);
}
});
}
}

@@ -613,5 +616,5 @@ else {

Virtualization.prototype.changeUiIndices = function (index, increment) {
var _this = this;
Object.keys(this.uiIndices).forEach(function (key) {
_this.uiIndices[key] = _this.uiIndices[key].map(function (i) {
var keys = Object.keys(this.uiIndices);
for (var ind = 0; ind < keys.length; ind++) {
this.uiIndices[keys[ind]] = this.uiIndices[keys[ind]].map(function (i) {
if (i >= index) {

@@ -624,31 +627,31 @@ return increment ? ++i : --i;

});
});
}
};
Virtualization.prototype.addItem = function (data, fields, dataSource) {
var _this = this;
data.forEach(function (currentItem) {
for (var i = 0; i < data.length; i++) {
var currentItem = data[i];
// push the given data to main data array
dataSource.push(currentItem);
// recalculate all the group data or other datasource related things
_this.listViewInstance.setViewDataSource(dataSource);
this.listViewInstance.setViewDataSource(dataSource);
// render list items for first time due to no datasource present earlier
if (!_this.domItemCount) {
if (!this.domItemCount) {
// fresh rendering for first time
if ((_this.listViewInstance.template || _this.listViewInstance.groupTemplate) && !_this.isNgTemplate()) {
_this.listViewInstance.listBaseOption.template = null;
_this.listViewInstance.listBaseOption.groupTemplate = null;
_this.listViewInstance.listBaseOption.itemCreated = _this.createUIItem.bind(_this);
if ((this.listViewInstance.template || this.listViewInstance.groupTemplate) && !this.isNgTemplate()) {
this.listViewInstance.listBaseOption.template = null;
this.listViewInstance.listBaseOption.groupTemplate = null;
this.listViewInstance.listBaseOption.itemCreated = this.createUIItem.bind(this);
}
_this.uiVirtualization();
this.uiVirtualization();
// when expected expected DOM count doesn't meet the condition we need to create and inject new item into DOM
}
else if (_this.domItemCount < _this.expectedDomItemCount) {
var ds = _this.listViewInstance.findItemFromDS(dataSource, fields);
else if (this.domItemCount < this.expectedDomItemCount) {
var ds = this.listViewInstance.findItemFromDS(dataSource, fields);
if (ds instanceof Array) {
if (_this.listViewInstance.ulElement) {
var index = _this.listViewInstance.curViewDS.indexOf(currentItem);
if (this.listViewInstance.ulElement) {
var index = this.listViewInstance.curViewDS.indexOf(currentItem);
// inject new list item into DOM
_this.createAndInjectNewItem(currentItem, index);
this.createAndInjectNewItem(currentItem, index);
// check for group header item
var curViewDS = _this.listViewInstance.curViewDS[index - 1];
var curViewDS = this.listViewInstance.curViewDS[index - 1];
if (curViewDS && curViewDS.isHeader && curViewDS.items.length === 1) {

@@ -658,21 +661,21 @@ // target group item index in datasource

// inject new group header into DOM for previously created list item
_this.createAndInjectNewItem(curViewDS, index);
this.createAndInjectNewItem(curViewDS, index);
}
}
// recollect all the list item into collection
_this.listViewInstance.liCollection =
_this.listViewInstance.curUL.querySelectorAll('li');
this.listViewInstance.liCollection =
this.listViewInstance.curUL.querySelectorAll('li');
}
}
else {
var index = _this.listViewInstance.curViewDS.indexOf(currentItem);
var index = this.listViewInstance.curViewDS.indexOf(currentItem);
// virtually new add list item based on the scollbar position
_this.addUiItem(index);
this.addUiItem(index);
// check for group header item needs to be added
var curViewDS = _this.listViewInstance.curViewDS[index - 1];
var curViewDS = this.listViewInstance.curViewDS[index - 1];
if (curViewDS && curViewDS.isHeader && curViewDS.items.length === 1) {
_this.addUiItem(index - 1);
this.addUiItem(index - 1);
}
}
});
}
};

@@ -749,3 +752,5 @@ Virtualization.prototype.createAndInjectNewItem = function (itemData, index) {

listElement.context.type = 'flatList';
groupTemplateNodes.forEach(function (node) { return node.onChange(newData); });
for (var i = 0; i < groupTemplateNodes.length; i++) {
groupTemplateNodes[i].onChange(newData);
}
}

@@ -758,9 +763,15 @@ else if (!newData.isHeader && listElement.context.type === 'flatList') {

listElement.context.type = 'groupList';
flatTemplateNodes.forEach(function (node) { return node.onChange(newData); });
for (var i = 0; i < flatTemplateNodes.length; i++) {
flatTemplateNodes[i].onChange(newData);
}
}
else if (!newData.isHeader) {
flatTemplateNodes.forEach(function (node) { return node.onChange(newData); });
for (var i = 0; i < flatTemplateNodes.length; i++) {
flatTemplateNodes[i].onChange(newData);
}
}
else {
groupTemplateNodes.forEach(function (node) { return node.onChange(newData); });
for (var i = 0; i < groupTemplateNodes.length; i++) {
groupTemplateNodes[i].onChange(newData);
}
}

@@ -777,3 +788,2 @@ };

Virtualization.prototype.classProperty = function (element, listElement, isHeader) {
var _this = this;
var regex = new RegExp('\\${([^}]*)}', 'g');

@@ -791,3 +801,4 @@ var resultantOutput = [];

if (resultantOutput && resultantOutput.length) {
resultantOutput.forEach(function (classNameMatch) {
var _loop_1 = function (i) {
var classNameMatch = resultantOutput[i];
var classFunction;

@@ -804,6 +815,6 @@ if (classNameMatch[1].indexOf('?') !== -1 && classNameMatch[1].indexOf(':') !== -1) {

if (isHeader) {
subNode.bindedvalue = classFunction(_this.headerData);
subNode.bindedvalue = classFunction(this_1.headerData);
}
else {
subNode.bindedvalue = classFunction(_this.templateData);
subNode.bindedvalue = classFunction(this_1.templateData);
}

@@ -820,14 +831,18 @@ subNode.onChange = function (value) {

};
classNameMatch[0].split(' ').forEach(function (className) {
element.classList.remove(className);
});
var className = classNameMatch[0].split(' ');
for (var i_1 = 0; i_1 < className.length; i_1++) {
element.classList.remove(className[i_1]);
}
if (subNode.bindedvalue) {
addClass([element], subNode.bindedvalue.split(' ').filter(function (css) { return css; }));
}
_this.updateContextData(listElement, subNode, isHeader);
});
this_1.updateContextData(listElement, subNode, isHeader);
};
var this_1 = this;
for (var i = 0; i < resultantOutput.length; i++) {
_loop_1(i);
}
}
};
Virtualization.prototype.attributeProperty = function (element, listElement, isHeader) {
var _this = this;
var attributeNames = [];

@@ -840,3 +855,4 @@ for (var i = 0; i < element.attributes.length; i++) {

}
attributeNames.forEach(function (attributeName) {
var _loop_2 = function (i) {
var attributeName = attributeNames[i];
var attrNameMatch = new RegExp('\\${([^}]*)}', 'g').exec(attributeName) || [];

@@ -864,8 +880,8 @@ var attrValueMatch = new RegExp('\\${([^}]*)}', 'g').exec(element.getAttribute(attributeName))

if (isHeader) {
subNode_1.bindedvalue = [attrNameMatch[1] === undefined ? undefined : attributeNameFunction(_this.headerData),
attrValueMatch[1] === undefined ? undefined : attributeValueFunction(_this.headerData)];
subNode_1.bindedvalue = [attrNameMatch[1] === undefined ? undefined : attributeNameFunction(this_2.headerData),
attrValueMatch[1] === undefined ? undefined : attributeValueFunction(this_2.headerData)];
}
else {
subNode_1.bindedvalue = [attrNameMatch[1] === undefined ? undefined : attributeNameFunction(_this.templateData),
attrValueMatch[1] === undefined ? undefined : attributeValueFunction(_this.templateData)];
subNode_1.bindedvalue = [attrNameMatch[1] === undefined ? undefined : attributeNameFunction(this_2.templateData),
attrValueMatch[1] === undefined ? undefined : attributeValueFunction(this_2.templateData)];
}

@@ -887,8 +903,11 @@ subNode_1.attrName = subNode_1.bindedvalue[0] === undefined ?

element.setAttribute(subNode_1.attrName, attributeValue);
_this.updateContextData(listElement, subNode_1, isHeader);
this_2.updateContextData(listElement, subNode_1, isHeader);
}
});
};
var this_2 = this;
for (var i = 0; i < attributeNames.length; i++) {
_loop_2(i);
}
};
Virtualization.prototype.textProperty = function (element, listElement, isHeader) {
var _this = this;
var regex = new RegExp('\\${([^}]*)}', 'g');

@@ -914,3 +933,4 @@ var resultantOutput = [];

if (resultantOutput && resultantOutput.length && !isChildHasTextContent) {
resultantOutput.forEach(function (textPropertyMatch) {
var _loop_3 = function (i) {
var textPropertyMatch = resultantOutput[i];
var subNode = {};

@@ -927,6 +947,6 @@ var textFunction;

if (isHeader) {
subNode.bindedvalue = textFunction(_this.headerData);
subNode.bindedvalue = textFunction(this_3.headerData);
}
else {
subNode.bindedvalue = textFunction(_this.templateData);
subNode.bindedvalue = textFunction(this_3.templateData);
}

@@ -938,4 +958,8 @@ subNode.onChange = function (value) {

element.innerText = element.innerText.replace(textPropertyMatch[0], subNode.bindedvalue);
_this.updateContextData(listElement, subNode, isHeader);
});
this_3.updateContextData(listElement, subNode, isHeader);
};
var this_3 = this;
for (var i = 0; i < resultantOutput.length; i++) {
_loop_3(i);
}
}

@@ -942,0 +966,0 @@ };

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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