@syncfusion/ej2-lists
Advanced tools
Comparing version 22.2.11 to 23.1.36
@@ -7,40 +7,26 @@ # Changelog | ||
#### Bug Fixes | ||
#### Breaking Changes | ||
- `#I488100` `#F45810`- Facing a console error when clicking in an empty ListView component has been resolved. | ||
- Using a ternary operator within the string-type template is not supported and we suggest using a function type template in ListView. Refer to the below code for example | ||
## 22.2.8 (2023-08-08) | ||
**Previous** | ||
### ListBox | ||
```typescript | ||
#### Bug Fixes | ||
let template: string = '<div class="e-list-wrapper e-list-avatar" id = ${id}>' + | ||
'<span class="e-list-content">${name} ${$imgUrl ? $imgUrl : \'no image\' }</span></div>'; | ||
``` | ||
- `#F44817` - Issue with "Dragged item may be one that is adjacent to the item over which mouse down occurred in listbox." has been resolved. | ||
**Now** | ||
## 22.2.5 (2023-07-27) | ||
```typescript | ||
### ListView | ||
// data denotes the template data of each nodes from ListView data. | ||
let template: Function = (data: any) => { | ||
let result = `<div class="e-list-wrapper e-list-avatar" id = "${data.id}">`+ | ||
`<span class="e-list-content">${data.name} ${data.imgUrl ? data.imgUrl : 'no image' }</span></div>`; | ||
return result; | ||
} | ||
``` | ||
#### Bug Fixes | ||
- `#I481465` - Resolved the `enableHtmlSanitizer` property issue in the ListView component. | ||
## 22.1.34 (2023-06-21) | ||
### ListView | ||
#### Bug Fixes | ||
- `#I463091` - Resolved the CSS override issue of `e-content` class name with other components and changed the `e-content` class name into `e-list-container`. | ||
## 21.2.9 (2023-06-06) | ||
### ListView | ||
#### Bug Fixes | ||
- `#I466565` - The console error in the nested ListView component sample has been resolved. | ||
## 21.2.6 (2023-05-23) | ||
### ListBox | ||
@@ -52,10 +38,2 @@ | ||
## 21.1.41 (2023-04-18) | ||
### ListBox | ||
#### Bug Fixes | ||
- `#F181131` - Issue with "No Record Found text disappears while hovering the drag item on list box without drop" has been resolved. | ||
### ListView | ||
@@ -65,12 +43,6 @@ | ||
- `#I447633` - An issue with the primary button styles of the e-icons in the ListView component has been resolved. | ||
- `#I463091` - Resolved the CSS override issue in the ListView component, and changed the `e-content` class name into `e-list-container`. | ||
## 21.1.39 (2023-04-11) | ||
## 19.3.43 (2021-09-30) | ||
### ListBox | ||
#### Bug Fixes | ||
- Issue with Dragging the ListBox item when the end-user pressed the Escape key and the drag operation should be cancelled has been fixed. | ||
### ListView | ||
@@ -80,10 +52,2 @@ | ||
- `#I452079` - Resolved detached elements memory leak issue in the ListView component. | ||
## 21.1.35 (2023-03-23) | ||
### ListView | ||
#### Bug Fixes | ||
- `#F168185` - The issue with "Sorting is not applied properly when entering different values in the text field of the ListView component" has been resolved. | ||
@@ -90,0 +54,0 @@ |
/*! | ||
* filename: index.d.ts | ||
* version : 22.2.11 | ||
* version : 23.1.36 | ||
* Copyright Syncfusion Inc. 2001 - 2020. 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@22.2.9", | ||
"_id": "@syncfusion/ej2-lists@18.22.1", | ||
"_inBundle": false, | ||
"_integrity": "sha512-M2sqiCPq0S7Mkd17i/ZRH/Zjs7yDAclxD91FrYxyNzvnNK186NIp4bNNh8NKTeDqjRhRAomEFqjK8qZPRbZhqw==", | ||
"_integrity": "sha512-JFrpWovANLrajmaJBnTd1sYN4tNzGfUtg0iAOELaO/ArE8T5G9Kmnh+JUqfrpqzy4/3GX7YVRkW3veoLTE+9JQ==", | ||
"_location": "/@syncfusion/ej2-lists", | ||
@@ -38,6 +38,6 @@ "_phantomChildren": {}, | ||
], | ||
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-lists/-/ej2-lists-22.2.9.tgz", | ||
"_shasum": "17811e78c8706fb8eb6729421a9a9ab8f36bbde8", | ||
"_resolved": "https://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-lists/-/ej2-lists-18.22.1.tgz", | ||
"_shasum": "0e6368d9418ddf6e513951dc48b73eb3c4728667", | ||
"_spec": "@syncfusion/ej2-lists@*", | ||
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included", | ||
"_where": "/jenkins/workspace/elease-automation_release_23.1.1/packages/included", | ||
"author": { | ||
@@ -48,5 +48,5 @@ "name": "Syncfusion Inc." | ||
"dependencies": { | ||
"@syncfusion/ej2-base": "~22.2.10", | ||
"@syncfusion/ej2-buttons": "~22.2.9", | ||
"@syncfusion/ej2-data": "~22.2.5" | ||
"@syncfusion/ej2-base": "~23.1.36", | ||
"@syncfusion/ej2-buttons": "~23.1.36", | ||
"@syncfusion/ej2-data": "~23.1.36" | ||
}, | ||
@@ -91,5 +91,5 @@ "deprecated": false, | ||
"typings": "index.d.ts", | ||
"version": "22.2.11", | ||
"version": "23.1.36", | ||
"sideEffects": false, | ||
"homepage": "https://www.syncfusion.com/javascript-ui-controls" | ||
} |
@@ -322,4 +322,2 @@ import { Query } from '@syncfusion/ej2-data'; | ||
* Specifies the item template | ||
* | ||
* @aspType string | ||
*/ | ||
@@ -329,4 +327,2 @@ template?: string | Function; | ||
* Specifies the group header template | ||
* | ||
* @aspType string | ||
*/ | ||
@@ -336,4 +332,2 @@ groupTemplate?: string | Function; | ||
* Specifies the ListView header template | ||
* | ||
* @aspType string | ||
*/ | ||
@@ -340,0 +334,0 @@ headerTemplate?: string | Function; |
@@ -283,3 +283,3 @@ /* eslint-disable no-inner-declarations */ | ||
li.setAttribute('aria-level', ariaAttributes.level.toString()); | ||
if (ariaAttributes.groupItemRole == 'presentation') { | ||
if (ariaAttributes.groupItemRole == 'presentation' || ariaAttributes.itemRole == 'presentation') { | ||
li.removeAttribute('aria-level'); | ||
@@ -286,0 +286,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import { Virtualization } from './virtualization';import { merge, formatUnit, isNullOrUndefined, append, detach, ModuleDeclaration, extend } from '@syncfusion/ej2-base';import { attributes, addClass, removeClass, prepend, closest, remove } from '@syncfusion/ej2-base';import { Component, EventHandler, BaseEventArgs, Property, Complex, Event } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, INotifyPropertyChanged, ChildProperty } from '@syncfusion/ej2-base';import { KeyboardEventArgs, EmitType, compile, SanitizeHtmlHelper } from '@syncfusion/ej2-base';import { Animation, AnimationOptions, Effect, rippleEffect, Touch, SwipeEventArgs } from '@syncfusion/ej2-base';import { DataManager, Query } from '@syncfusion/ej2-data';import { createCheckBox } from '@syncfusion/ej2-buttons';import { ListBase, ListBaseOptions, SortOrder, getFieldValues, FieldsMapping } from '../common/list-base'; | ||
import { Virtualization } from './virtualization';import { merge, formatUnit, isNullOrUndefined, append, detach, ModuleDeclaration, extend } from '@syncfusion/ej2-base';import { attributes, addClass, removeClass, prepend, closest, remove } from '@syncfusion/ej2-base';import { Component, EventHandler, BaseEventArgs, Property, Complex, Event } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, INotifyPropertyChanged, ChildProperty } from '@syncfusion/ej2-base';import { KeyboardEventArgs, EmitType, compile, SanitizeHtmlHelper } from '@syncfusion/ej2-base';import { Animation, AnimationOptions, Effect, rippleEffect, Touch, SwipeEventArgs, animationMode } from '@syncfusion/ej2-base';import { DataManager, Query } from '@syncfusion/ej2-data';import { createCheckBox } from '@syncfusion/ej2-buttons';import { ListBase, ListBaseOptions, SortOrder, getFieldValues, FieldsMapping } from '../common/list-base'; | ||
import {AnimationSettings,checkBoxPosition,SelectEventArgs} from "./list-view"; | ||
@@ -257,5 +257,5 @@ import {ComponentModel} from '@syncfusion/ej2-base'; | ||
* @vueType string | function | ||
* @aspType string | ||
*/ | ||
template?: string; | ||
template?: string | Function; | ||
@@ -271,5 +271,5 @@ /** | ||
* @vueType string | function | ||
* @aspType string | ||
*/ | ||
headerTemplate?: string; | ||
headerTemplate?: string | Function; | ||
@@ -285,5 +285,5 @@ /** | ||
* @vueType string | function | ||
* @aspType string | ||
*/ | ||
groupTemplate?: string; | ||
groupTemplate?: string | Function; | ||
@@ -290,0 +290,0 @@ /** |
@@ -334,5 +334,5 @@ import { Virtualization } from './virtualization'; | ||
* @vueType string | function | ||
* @aspType string | ||
*/ | ||
template: string; | ||
template: string | Function; | ||
/** | ||
@@ -347,5 +347,5 @@ * The ListView has an option to custom design the ListView header title with the help of `headerTemplate` property. | ||
* @vueType string | function | ||
* @aspType string | ||
*/ | ||
headerTemplate: string; | ||
headerTemplate: string | Function; | ||
/** | ||
@@ -360,5 +360,5 @@ * The ListView has an option to custom design the group header title with the help of `groupTemplate` property. | ||
* @vueType string | function | ||
* @aspType string | ||
*/ | ||
groupTemplate: string; | ||
groupTemplate: string | Function; | ||
/** | ||
@@ -365,0 +365,0 @@ * Triggers when we select the list item in the component. |
@@ -34,2 +34,5 @@ import { ListView, ItemCreatedArgs, Fields, UISelectedItem } from './list-view'; | ||
private elementDifference; | ||
private templateFunction; | ||
private groupTemplateFunction; | ||
private commonTemplate; | ||
/** | ||
@@ -84,5 +87,2 @@ * For internal use only. | ||
private updateContextData; | ||
private classProperty; | ||
private attributeProperty; | ||
private textProperty; | ||
reRenderUiVirtualization(): void; | ||
@@ -89,0 +89,0 @@ private updateUI; |
@@ -34,2 +34,6 @@ import { classNames } from './list-view'; | ||
Virtualization.prototype.uiVirtualization = function () { | ||
this.commonTemplate = '<div class="e-text-content" role="presentation"> ' + | ||
'<span class="e-list-text"> ${' + this.listViewInstance.fields.text + '} </span></div>'; | ||
this.templateFunction = compile(this.listViewInstance.template || this.commonTemplate, this.listViewInstance); | ||
this.groupTemplateFunction = compile(this.listViewInstance.groupTemplate || this.commonTemplate, this.listViewInstance); | ||
this.wireScrollEvent(false); | ||
@@ -790,8 +794,7 @@ var curViewDS = this.listViewInstance.curViewDS; | ||
Virtualization.prototype.createUIItem = function (args) { | ||
var virtualTemplate = this.listViewInstance.template; | ||
var template = this.listViewInstance.createElement('div'); | ||
var commonTemplate = '<div class="e-text-content" role="presentation"> ' + | ||
'<span class="e-list-text"> ${' + this.listViewInstance.fields.text + '} </span></div>'; | ||
var template = document.createElement('div'); | ||
this.templateData = args.curData.isHeader ? args.curData.items[0] : | ||
args.curData; | ||
if (this.listViewInstance.isReact) { | ||
commonTemplate = null; | ||
this.commonTemplate = null; | ||
} | ||
@@ -803,54 +806,71 @@ if (this.listViewInstance.showCheckBox) { | ||
(!isNullOrUndefined(this.listViewInstance.virtualCheckBox.outerHTML))) { | ||
var div = document.createElement('div'); | ||
div.innerHTML = this.listViewInstance.template || commonTemplate; | ||
if (div.children && div.children[0]) { | ||
div.children[0].classList.add('e-checkbox'); | ||
var div_1 = document.createElement('div'); | ||
var nodes = this.templateFunction(this.templateData, this.listViewInstance); | ||
if (this.listViewInstance.template && this.listViewInstance.isReact) { | ||
this.listViewInstance.renderReactTemplates(); | ||
} | ||
[].slice.call(nodes).forEach(function (ele) { | ||
div_1.appendChild(ele); | ||
}); | ||
if (div_1.children && div_1.children[0]) { | ||
div_1.children[0].classList.add('e-checkbox'); | ||
if (this.listViewInstance.checkBoxPosition === 'Left') { | ||
div.children[0].classList.add('e-checkbox-left'); | ||
div_1.children[0].classList.add('e-checkbox-left'); | ||
} | ||
else { | ||
div.children[0].classList.add('e-checkbox-right'); | ||
div_1.children[0].classList.add('e-checkbox-right'); | ||
} | ||
if (this.listViewInstance.checkBoxPosition === 'Left') { | ||
div.children[0].insertBefore(this.listViewInstance.virtualCheckBox, div.childNodes[0].children[0]); | ||
div_1.children[0].insertBefore(this.listViewInstance.virtualCheckBox, div_1.childNodes[0].children[0]); | ||
} | ||
else { | ||
div.children[0].appendChild(this.listViewInstance.virtualCheckBox); | ||
div_1.children[0].appendChild(this.listViewInstance.virtualCheckBox); | ||
} | ||
this.listViewInstance.template = div.innerHTML; | ||
template.innerHTML = div_1.innerHTML; | ||
} | ||
} | ||
if (this.isVueFunctionTemplate()) | ||
return; | ||
template.innerHTML = this.listViewInstance.template; | ||
this.listViewInstance.template = virtualTemplate; | ||
else { | ||
var div_2 = document.createElement('div'); | ||
var nodes = this.templateFunction(this.templateData, this.listViewInstance); | ||
if (this.listViewInstance.template && this.listViewInstance.isReact) { | ||
this.listViewInstance.renderReactTemplates(); | ||
} | ||
[].slice.call(nodes).forEach(function (ele) { | ||
div_2.appendChild(ele); | ||
}); | ||
template.innerHTML = div_2.innerHTML; | ||
} | ||
} | ||
else { | ||
if (this.isVueFunctionTemplate()) | ||
return; | ||
template.innerHTML = this.listViewInstance.template || commonTemplate; | ||
var nodes = this.templateFunction(this.templateData, this.listViewInstance); | ||
if (this.listViewInstance.template && this.listViewInstance.isReact) { | ||
this.listViewInstance.renderReactTemplates(); | ||
} | ||
[].slice.call(nodes).forEach(function (ele) { | ||
template.appendChild(ele); | ||
}); | ||
} | ||
// eslint-disable-next-line | ||
var templateElements = template.getElementsByTagName('*'); | ||
if (args.curData.isHeader) { | ||
this.headerData = args.curData; | ||
} | ||
var groupTemplate = this.listViewInstance.createElement('div'); | ||
if (this.listViewInstance.fields.groupBy) { | ||
groupTemplate.innerHTML = this.listViewInstance.groupTemplate || commonTemplate; | ||
var nodes = this.groupTemplateFunction(this.headerData, this.listViewInstance); | ||
if (this.listViewInstance.template && this.listViewInstance.isReact) { | ||
this.listViewInstance.renderReactTemplates(); | ||
} | ||
[].slice.call(nodes).forEach(function (ele) { | ||
groupTemplate.appendChild(ele); | ||
}); | ||
} | ||
// eslint-disable-next-line | ||
var groupTemplateElements = groupTemplate.getElementsByTagName('*'); | ||
if (args.curData.isHeader) { | ||
this.headerData = args.curData; | ||
} | ||
this.templateData = args.curData.isHeader ? args.curData.items[0] : | ||
args.curData; | ||
if (!this.listViewInstance.isReact || (typeof this.listViewInstance.template == "string" && !args.item.classList.contains("e-list-group-item")) || | ||
(typeof this.listViewInstance.groupTemplate == "string" && args.item.classList.contains("e-list-group-item"))) { | ||
if ((!this.listViewInstance.isReact || (typeof this.listViewInstance.template == "string" && !args.item.classList.contains("e-list-group-item")) || | ||
(typeof this.listViewInstance.groupTemplate == "string" && args.item.classList.contains("e-list-group-item"))) && !this.listViewInstance.isVue) { | ||
args.item.innerHTML = ''; | ||
} | ||
args.item.context = { data: args.curData, nodes: { flatTemplateNodes: [], groupTemplateNodes: [] } }; | ||
for (var i = 0; i < templateElements.length; i++) { | ||
this.compileTemplate(templateElements[i], args.item, false); | ||
for (var i = 0; i < template.children.length; i++) { | ||
this.compileTemplate(template.children[i], args.item, false); | ||
} | ||
for (var i = 0; i < groupTemplateElements.length; i++) { | ||
this.compileTemplate(groupTemplateElements[i], args.item, true); | ||
for (var i = 0; i < groupTemplate.children.length; i++) { | ||
this.compileTemplate(groupTemplate.children[i], args.item, true); | ||
} | ||
@@ -861,3 +881,3 @@ args.item.context.template = args.curData.isHeader ? template.firstElementChild : | ||
var element = args.curData.isHeader ? groupTemplate : template; | ||
if (element.firstElementChild) { | ||
if (element.firstElementChild && !this.listViewInstance.isReact && !this.listViewInstance.isVue) { | ||
args.item.insertBefore(element.firstElementChild, null); | ||
@@ -867,5 +887,45 @@ } | ||
Virtualization.prototype.compileTemplate = function (element, item, isHeader) { | ||
this.textProperty(element, item, isHeader); | ||
this.classProperty(element, item, isHeader); | ||
this.attributeProperty(element, item, isHeader); | ||
var _this = this; | ||
var subNode = {}; | ||
subNode.onChange = function (value) { | ||
var groupTemplateElements; | ||
var templateElements; | ||
if (_this.listViewInstance.isVue) { | ||
groupTemplateElements = _this.groupTemplateFunction(value); | ||
templateElements = _this.templateFunction(value); | ||
} | ||
else { | ||
groupTemplateElements = _this.groupTemplateFunction(value, _this.listViewInstance); | ||
templateElements = _this.templateFunction(value, _this.listViewInstance); | ||
} | ||
if (_this.listViewInstance.template && _this.listViewInstance.isReact) { | ||
_this.listViewInstance.renderReactTemplates(); | ||
} | ||
var currentTemplate = templateElements; | ||
if (value.isHeader) { | ||
currentTemplate = groupTemplateElements; | ||
} | ||
[].slice.call(currentTemplate).forEach(function (currentElement) { | ||
var RemovableClass = element.classList.value.replace('e-checkbox', ''); | ||
RemovableClass = RemovableClass.replace('e-checkbox-left', ''); | ||
RemovableClass = RemovableClass.replace('e-checkbox-right', ''); | ||
removeClass([element], RemovableClass.split(' ').filter(function (css) { return css; })); | ||
addClass([element], Array.from(currentElement.classList)); | ||
for (var i = 0; i < element.attributes.length; i++) { | ||
if (element.attributes[i].name != 'class') { | ||
var newData = currentElement.getAttribute(element.attributes[i].name); | ||
element.setAttribute(element.attributes[i].name, newData); | ||
} | ||
} | ||
[].slice.call(element.children).forEach(function (ele) { | ||
if (!ele.classList.contains('e-listview-checkbox') && !(ele.classList.contains('e-checkbox-left') || ele.classList.contains('e-checkbox-right'))) { | ||
ele.remove(); | ||
} | ||
}); | ||
[].slice.call(currentElement.children).forEach(function (ele) { | ||
element.appendChild(ele); | ||
}); | ||
}); | ||
}; | ||
this.updateContextData(item, subNode, isHeader); | ||
}; | ||
@@ -924,179 +984,2 @@ Virtualization.prototype.onChange = function (newData, listElement) { | ||
}; | ||
Virtualization.prototype.classProperty = function (element, listElement, isHeader) { | ||
var regex = new RegExp('\\${([^}]*)}', 'g'); | ||
var resultantOutput = []; | ||
var regexMatch; | ||
while (regexMatch !== null) { | ||
var match = regex.exec(element.className); | ||
resultantOutput.push(match); | ||
regexMatch = match; | ||
if (regexMatch === null) { | ||
resultantOutput.pop(); | ||
} | ||
} | ||
if (resultantOutput && resultantOutput.length) { | ||
var _loop_1 = function (i) { | ||
var classNameMatch = resultantOutput[i]; | ||
// eslint-disable-next-line | ||
var classFunction; | ||
if (classNameMatch[1].indexOf('?') !== -1 && classNameMatch[1].indexOf(':') !== -1) { | ||
// tslint:disable-next-line:no-function-constructor-with-string-args | ||
classFunction = new Function('data', 'return ' + classNameMatch[1].replace(/\$/g, 'data.')); | ||
} | ||
else { | ||
// tslint:disable-next-line:no-function-constructor-with-string-args | ||
classFunction = new Function('data', 'return ' + 'data.' + classNameMatch[1]); | ||
} | ||
// eslint-disable-next-line | ||
var subNode = {}; | ||
if (isHeader) { | ||
subNode.bindedvalue = classFunction(this_1.headerData); | ||
} | ||
else { | ||
subNode.bindedvalue = classFunction(this_1.templateData); | ||
} | ||
subNode.onChange = function (value) { | ||
if (subNode.bindedvalue) { | ||
removeClass([element], subNode.bindedvalue.split(' ').filter(function (css) { return css; })); | ||
} | ||
var newCss = classFunction(value); | ||
if (newCss) { | ||
addClass([element], (newCss).split(' ').filter(function (css) { return css; })); | ||
} | ||
subNode.bindedvalue = newCss; | ||
}; | ||
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_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 attributeNames = []; | ||
for (var i = 0; i < element.attributes.length; i++) { | ||
attributeNames.push(element.attributes[i].nodeName); | ||
} | ||
if (attributeNames.indexOf('class') !== -1) { | ||
attributeNames.splice(attributeNames.indexOf('class'), 1); | ||
} | ||
var _loop_2 = function (i) { | ||
var attributeName = attributeNames[i]; | ||
var attrNameMatch = new RegExp('\\${([^}]*)}', 'g').exec(attributeName) || []; | ||
var attrValueMatch = new RegExp('\\${([^}]*)}', 'g').exec(element.getAttribute(attributeName)) | ||
|| []; | ||
// eslint-disable-next-line | ||
var attributeNameFunction; | ||
// eslint-disable-next-line | ||
var attributeValueFunction; | ||
if (attrNameMatch.length || attrValueMatch.length) { | ||
if (attrNameMatch[1]) { | ||
// tslint:disable-next-line:no-function-constructor-with-string-args | ||
attributeNameFunction = new Function('data', 'return ' + 'data.' + attrNameMatch[1]); | ||
} | ||
if (attrValueMatch[1]) { | ||
if (attrValueMatch[1].indexOf('?') !== -1 && attrValueMatch[1].indexOf(':') !== -1) { | ||
// tslint:disable-next-line:no-function-constructor-with-string-args | ||
attributeValueFunction = new Function('data', 'return ' + attrValueMatch[1].replace(/\$/g, 'data.')); | ||
} | ||
else { | ||
// tslint:disable-next-line:no-function-constructor-with-string-args | ||
attributeValueFunction = new Function('data', 'return ' + 'data.' + attrValueMatch[1]); | ||
} | ||
} | ||
// eslint-disable-next-line @typescript-eslint/ban-types | ||
var subNode_1 = {}; | ||
if (isHeader) { | ||
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_2.templateData), | ||
attrValueMatch[1] === undefined ? undefined : attributeValueFunction(this_2.templateData)]; | ||
} | ||
subNode_1.attrName = subNode_1.bindedvalue[0] === undefined ? | ||
attributeName : subNode_1.bindedvalue[0]; | ||
subNode_1.onChange = function (value) { | ||
var bindedvalue = subNode_1.bindedvalue[1] === undefined ? | ||
element.getAttribute(subNode_1.attrName) : attributeValueFunction(value); | ||
element.removeAttribute(subNode_1.attrName); | ||
subNode_1.attrName = subNode_1.bindedvalue[0] === undefined ? subNode_1.attrName : attributeNameFunction(value); | ||
element.setAttribute(subNode_1.attrName, bindedvalue); | ||
subNode_1.bindedvalue = [subNode_1.bindedvalue[0] === undefined ? undefined : attributeNameFunction(value), | ||
subNode_1.bindedvalue[1] === undefined ? undefined : attributeValueFunction(value)]; | ||
}; | ||
var attributeValue = subNode_1.bindedvalue[1] === undefined ? element.getAttribute(attributeName) : | ||
subNode_1.bindedvalue[1]; | ||
element.removeAttribute(attributeName); | ||
element.setAttribute(subNode_1.attrName, attributeValue); | ||
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 regex = new RegExp('\\${([^}]*)}', 'g'); | ||
var resultantOutput = []; | ||
var regexMatch; | ||
while (regexMatch !== null) { | ||
var match = regex.exec(element.innerText); | ||
resultantOutput.push(match); | ||
regexMatch = match; | ||
if (regexMatch === null) { | ||
resultantOutput.pop(); | ||
} | ||
} | ||
var isChildHasTextContent = Array.prototype.some.call(element.children, function (element) { | ||
if (new RegExp('\\${([^}]*)}', 'g').exec(element.innerText)) { | ||
return true; | ||
} | ||
else { | ||
return false; | ||
} | ||
}); | ||
if (resultantOutput && resultantOutput.length && !isChildHasTextContent) { | ||
var _loop_3 = function (i) { | ||
var textPropertyMatch = resultantOutput[i]; | ||
// eslint-disable-next-line | ||
var subNode = {}; | ||
// eslint-disable-next-line | ||
var textFunction; | ||
if (textPropertyMatch[1].indexOf('?') !== -1 && textPropertyMatch[1].indexOf(':') !== -1) { | ||
// tslint:disable-next-line:no-function-constructor-with-string-args | ||
textFunction = new Function('data', 'return ' + textPropertyMatch[1].replace(/\$/g, 'data.')); | ||
} | ||
else { | ||
// tslint:disable-next-line:no-function-constructor-with-string-args | ||
textFunction = new Function('data', 'return ' + 'data.' + textPropertyMatch[1]); | ||
} | ||
if (isHeader) { | ||
subNode.bindedvalue = textFunction(this_3.headerData); | ||
} | ||
else { | ||
subNode.bindedvalue = textFunction(this_3.templateData); | ||
} | ||
subNode.onChange = function (value) { | ||
element.innerText = element.innerText.replace(subNode.bindedvalue, textFunction(value)); | ||
subNode.bindedvalue = textFunction(value); | ||
}; | ||
element.innerText = element.innerText.replace(textPropertyMatch[0], subNode.bindedvalue); | ||
this_3.updateContextData(listElement, subNode, isHeader); | ||
}; | ||
var this_3 = this; | ||
for (var i = 0; i < resultantOutput.length; i++) { | ||
_loop_3(i); | ||
} | ||
} | ||
}; | ||
Virtualization.prototype.reRenderUiVirtualization = function () { | ||
@@ -1103,0 +986,0 @@ this.wireScrollEvent(true); |
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 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
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 not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Uses eval
Supply chain riskPackage uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
0
2967542
32849
+ Added@syncfusion/ej2-base@23.1.43(transitive)
+ Added@syncfusion/ej2-buttons@23.1.43(transitive)
+ Added@syncfusion/ej2-data@23.1.44(transitive)
+ Added@syncfusion/ej2-icons@23.1.36(transitive)
- Removed@syncfusion/ej2-base@22.2.12(transitive)
- Removed@syncfusion/ej2-buttons@22.2.9(transitive)
- Removed@syncfusion/ej2-data@22.2.5(transitive)
- Removed@syncfusion/ej2-icons@22.2.5(transitive)