@syncfusion/ej2-lists 24.2.8 → 25.1.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -21
- package/dist/ej2-lists.min.js +2 -2
- package/dist/ej2-lists.umd.min.js +2 -2
- package/dist/ej2-lists.umd.min.js.map +1 -1
- package/dist/es6/ej2-lists.es2015.js +23 -12
- package/dist/es6/ej2-lists.es2015.js.map +1 -1
- package/dist/es6/ej2-lists.es5.js +20 -9
- package/dist/es6/ej2-lists.es5.js.map +1 -1
- package/dist/global/ej2-lists.min.js +2 -2
- package/dist/global/ej2-lists.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +10 -10
- package/src/common/list-base.js +1 -1
- package/src/list-view/list-view-model.d.ts +7 -7
- package/src/list-view/list-view.d.ts +8 -8
- package/src/list-view/list-view.js +10 -3
- package/src/list-view/virtualization.d.ts +1 -0
- package/src/list-view/virtualization.js +7 -3
- package/src/sortable/sortable.js +2 -2
- package/styles/list-view/_bds-definition.scss +138 -0
- package/styles/list-view/icons/_bds.scss +8 -0
- package/styles/sortable/_bds-definition.scss +1 -0
|
@@ -301,7 +301,7 @@ var ListBase;
|
|
|
301
301
|
if (fieldData.hasOwnProperty(fields.htmlAttributes) && fieldData[fields.htmlAttributes]) {
|
|
302
302
|
const htmlAttributes = fieldData[fields.htmlAttributes];
|
|
303
303
|
// Check if 'class' attribute is present and not an empty string
|
|
304
|
-
if (
|
|
304
|
+
if ('class' in htmlAttributes && typeof htmlAttributes['class'] === 'string' && htmlAttributes['class'].trim() === '') {
|
|
305
305
|
delete htmlAttributes['class'];
|
|
306
306
|
}
|
|
307
307
|
setAttribute(li, htmlAttributes);
|
|
@@ -1475,7 +1475,7 @@ let ListView = class ListView extends Component {
|
|
|
1475
1475
|
if (typeof this.dataSource[0] !== 'string' && typeof this.dataSource[0] !== 'number') {
|
|
1476
1476
|
fieldData = getFieldValues(args.curData, this.listBaseOption.fields);
|
|
1477
1477
|
if (this.enablePersistence && !isNullOrUndefined(this.selectedId)) {
|
|
1478
|
-
const index = this.selectedId.findIndex(e => e === fieldData[this.listBaseOption.fields.id].toString());
|
|
1478
|
+
const index = this.selectedId.findIndex((e) => e === fieldData[this.listBaseOption.fields.id].toString());
|
|
1479
1479
|
if (index !== -1) {
|
|
1480
1480
|
this.checkInternally(args, checkboxElement);
|
|
1481
1481
|
}
|
|
@@ -1960,11 +1960,13 @@ let ListView = class ListView extends Component {
|
|
|
1960
1960
|
}
|
|
1961
1961
|
}
|
|
1962
1962
|
unWireEvents() {
|
|
1963
|
+
EventHandler.remove(this.element, 'keydown', this.keyActionHandler);
|
|
1963
1964
|
EventHandler.remove(this.element, 'click', this.clickHandler);
|
|
1964
1965
|
EventHandler.remove(this.element, 'mouseover', this.hoverHandler);
|
|
1965
1966
|
EventHandler.remove(this.element, 'mouseout', this.leaveHandler);
|
|
1966
1967
|
EventHandler.remove(this.element, 'mouseover', this.hoverHandler);
|
|
1967
1968
|
EventHandler.remove(this.element, 'mouseout', this.leaveHandler);
|
|
1969
|
+
EventHandler.remove(this.element, 'focusout', this.focusout);
|
|
1968
1970
|
if (!isNullOrUndefined(this.scroll)) {
|
|
1969
1971
|
EventHandler.remove(this.element, 'scroll', this.onListScroll);
|
|
1970
1972
|
}
|
|
@@ -2058,7 +2060,12 @@ let ListView = class ListView extends Component {
|
|
|
2058
2060
|
const eventArgs = {};
|
|
2059
2061
|
merge(eventArgs, selectedItem);
|
|
2060
2062
|
if (e) {
|
|
2061
|
-
merge(eventArgs, {
|
|
2063
|
+
merge(eventArgs, {
|
|
2064
|
+
isInteracted: true,
|
|
2065
|
+
event: e,
|
|
2066
|
+
cancel: false,
|
|
2067
|
+
index: this.curUL && Array.prototype.indexOf.call(this.curUL.children, li)
|
|
2068
|
+
});
|
|
2062
2069
|
}
|
|
2063
2070
|
return eventArgs;
|
|
2064
2071
|
}
|
|
@@ -2997,7 +3004,7 @@ let ListView = class ListView extends Component {
|
|
|
2997
3004
|
requiredModules() {
|
|
2998
3005
|
const modules = [];
|
|
2999
3006
|
if (this.enableVirtualization) {
|
|
3000
|
-
modules.push({ args: [this], member: 'virtualization' });
|
|
3007
|
+
modules.push({ args: [this], member: 'virtualization', name: 'Virtualization' });
|
|
3001
3008
|
}
|
|
3002
3009
|
return modules;
|
|
3003
3010
|
}
|
|
@@ -3068,7 +3075,7 @@ __decorate([
|
|
|
3068
3075
|
Property(false)
|
|
3069
3076
|
], ListView.prototype, "showHeader", void 0);
|
|
3070
3077
|
__decorate([
|
|
3071
|
-
Property(
|
|
3078
|
+
Property(true)
|
|
3072
3079
|
], ListView.prototype, "enableHtmlSanitizer", void 0);
|
|
3073
3080
|
__decorate([
|
|
3074
3081
|
Property('')
|
|
@@ -3359,9 +3366,10 @@ class Virtualization {
|
|
|
3359
3366
|
}
|
|
3360
3367
|
if (this.listViewInstance.curViewDS[index][this.listViewInstance.fields.iconCss]) {
|
|
3361
3368
|
const textContent = element.querySelector('.' + classNames.textContent);
|
|
3369
|
+
const curViewDS = this.listViewInstance.curViewDS[index];
|
|
3370
|
+
const iconCss = curViewDS[this.listViewInstance.fields.iconCss].toString();
|
|
3362
3371
|
const target = this.listViewInstance.createElement('div', {
|
|
3363
|
-
className: classNames.listIcon + ' ' +
|
|
3364
|
-
this.listViewInstance.curViewDS[index][this.listViewInstance.fields.iconCss]
|
|
3372
|
+
className: classNames.listIcon + ' ' + iconCss
|
|
3365
3373
|
});
|
|
3366
3374
|
textContent.insertBefore(target, element.querySelector('.' + classNames.listItemText));
|
|
3367
3375
|
}
|
|
@@ -3872,7 +3880,9 @@ class Virtualization {
|
|
|
3872
3880
|
target = this.listViewInstance.getLiFromObjOrElement(this.listViewInstance.curViewDS[index + 1]) ||
|
|
3873
3881
|
this.listViewInstance.getLiFromObjOrElement(this.listViewInstance.curViewDS[index + 2]);
|
|
3874
3882
|
}
|
|
3875
|
-
if (this.listViewInstance.fields.groupBy
|
|
3883
|
+
if (this.listViewInstance.fields.groupBy
|
|
3884
|
+
&& this.listViewInstance.curViewDS[index + 1]
|
|
3885
|
+
&& this.listViewInstance.curViewDS[index + 1].isHeader) {
|
|
3876
3886
|
const targetEle = this.listViewInstance.getLiFromObjOrElement(this.listViewInstance.curViewDS[index - 1]);
|
|
3877
3887
|
if (targetEle) {
|
|
3878
3888
|
target = targetEle.nextElementSibling;
|
|
@@ -3925,7 +3935,7 @@ class Virtualization {
|
|
|
3925
3935
|
while (args.item.lastChild) {
|
|
3926
3936
|
args.item.removeChild(args.item.lastChild);
|
|
3927
3937
|
}
|
|
3928
|
-
[].slice.call(div.children).forEach(
|
|
3938
|
+
[].slice.call(div.children).forEach((ele) => {
|
|
3929
3939
|
args.item.appendChild(ele);
|
|
3930
3940
|
});
|
|
3931
3941
|
}
|
|
@@ -3969,6 +3979,7 @@ class Virtualization {
|
|
|
3969
3979
|
* @param {DataSource} newData - The new data source for the list view.
|
|
3970
3980
|
* @param {ElementContext} listElement - The HTML element context for the list view.
|
|
3971
3981
|
* @param {Virtualization} virtualThis - The virtualization context for the list view.
|
|
3982
|
+
* @returns {void}
|
|
3972
3983
|
*/
|
|
3973
3984
|
onChange(newData, listElement, virtualThis) {
|
|
3974
3985
|
const liItem = ListBase.createListItemFromJson(virtualThis.listViewInstance.createElement,
|
|
@@ -3980,7 +3991,7 @@ class Virtualization {
|
|
|
3980
3991
|
while (listElement.lastChild) {
|
|
3981
3992
|
listElement.removeChild(listElement.lastChild);
|
|
3982
3993
|
}
|
|
3983
|
-
[].slice.call(liItem[0].children).forEach(
|
|
3994
|
+
[].slice.call(liItem[0].children).forEach((ele) => {
|
|
3984
3995
|
listElement.appendChild(ele);
|
|
3985
3996
|
});
|
|
3986
3997
|
}
|
|
@@ -4064,7 +4075,7 @@ let Sortable = Sortable_1 = class Sortable extends Base {
|
|
|
4064
4075
|
this.trigger('drag', { event: e.event, element: this.element, target: e.target });
|
|
4065
4076
|
let newInst = this.getSortableInstance(e.target);
|
|
4066
4077
|
let target = this.getSortableElement(e.target, newInst);
|
|
4067
|
-
if ((this.isValidTarget(target, newInst) || e.target.className.indexOf('e-list-group-item') > -1) && (this.curTarget !== target ||
|
|
4078
|
+
if ((this.isValidTarget(target, newInst) || (e.target && typeof e.target.className === 'string' && e.target.className.indexOf('e-list-group-item') > -1)) && (this.curTarget !== target ||
|
|
4068
4079
|
!isNullOrUndefined(newInst.placeHolder)) && (newInst.placeHolderElement ? newInst.placeHolderElement !== e.target : true)) {
|
|
4069
4080
|
if (e.target.classList.contains('e-list-group-item')) {
|
|
4070
4081
|
target = e.target;
|
|
@@ -4205,7 +4216,7 @@ let Sortable = Sortable_1 = class Sortable extends Base {
|
|
|
4205
4216
|
target: e.target, droppedElement: this.target, helper: e.helper, cancel: false
|
|
4206
4217
|
};
|
|
4207
4218
|
this.trigger('beforeDrop', beforeDropArgs, (observedArgs) => {
|
|
4208
|
-
if ((dropInst.element === e.target || e.target.className.indexOf('e-list-nrt') > -1 || e.target.className.indexOf('e-list-nr-template') > -1
|
|
4219
|
+
if ((dropInst.element === e.target || (typeof e.target.className === 'string' && e.target.className.indexOf('e-list-nrt') > -1) || (typeof e.target.className === 'string' && e.target.className.indexOf('e-list-nr-template') > -1)
|
|
4209
4220
|
|| e.target.closest('.e-list-nr-template')) && !observedArgs.cancel) {
|
|
4210
4221
|
this.updateItemClass(dropInst);
|
|
4211
4222
|
dropInst.element.appendChild(this.target);
|