@syncfusion/ej2-lists 24.2.8 → 25.1.35-579988
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 +7 -13
- 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 +25 -14
- package/dist/es6/ej2-lists.es2015.js.map +1 -1
- package/dist/es6/ej2-lists.es5.js +22 -11
- 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 +11 -4
- package/src/list-view/virtualization.d.ts +1 -0
- package/src/list-view/virtualization.js +7 -3
- package/src/sortable/sortable.js +3 -3
- 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
|
var 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);
|
|
@@ -1904,8 +1904,8 @@ var ListView = /** @__PURE__ @class */ (function (_super) {
|
|
|
1904
1904
|
}
|
|
1905
1905
|
};
|
|
1906
1906
|
ListView.prototype.spaceKeyHandler = function (e) {
|
|
1907
|
-
e.preventDefault();
|
|
1908
1907
|
if (this.enable && this.showCheckBox && Object.keys(this.dataSource).length && this.curUL) {
|
|
1908
|
+
e.preventDefault();
|
|
1909
1909
|
var li = this.curUL.querySelector('.' + classNames.focused);
|
|
1910
1910
|
var checkboxElement = void 0;
|
|
1911
1911
|
var checkIcon = void 0;
|
|
@@ -1988,11 +1988,13 @@ var ListView = /** @__PURE__ @class */ (function (_super) {
|
|
|
1988
1988
|
}
|
|
1989
1989
|
};
|
|
1990
1990
|
ListView.prototype.unWireEvents = function () {
|
|
1991
|
+
EventHandler.remove(this.element, 'keydown', this.keyActionHandler);
|
|
1991
1992
|
EventHandler.remove(this.element, 'click', this.clickHandler);
|
|
1992
1993
|
EventHandler.remove(this.element, 'mouseover', this.hoverHandler);
|
|
1993
1994
|
EventHandler.remove(this.element, 'mouseout', this.leaveHandler);
|
|
1994
1995
|
EventHandler.remove(this.element, 'mouseover', this.hoverHandler);
|
|
1995
1996
|
EventHandler.remove(this.element, 'mouseout', this.leaveHandler);
|
|
1997
|
+
EventHandler.remove(this.element, 'focusout', this.focusout);
|
|
1996
1998
|
if (!isNullOrUndefined(this.scroll)) {
|
|
1997
1999
|
EventHandler.remove(this.element, 'scroll', this.onListScroll);
|
|
1998
2000
|
}
|
|
@@ -2088,7 +2090,12 @@ var ListView = /** @__PURE__ @class */ (function (_super) {
|
|
|
2088
2090
|
var eventArgs = {};
|
|
2089
2091
|
merge(eventArgs, selectedItem);
|
|
2090
2092
|
if (e) {
|
|
2091
|
-
merge(eventArgs, {
|
|
2093
|
+
merge(eventArgs, {
|
|
2094
|
+
isInteracted: true,
|
|
2095
|
+
event: e,
|
|
2096
|
+
cancel: false,
|
|
2097
|
+
index: this.curUL && Array.prototype.indexOf.call(this.curUL.children, li)
|
|
2098
|
+
});
|
|
2092
2099
|
}
|
|
2093
2100
|
return eventArgs;
|
|
2094
2101
|
};
|
|
@@ -3035,7 +3042,7 @@ var ListView = /** @__PURE__ @class */ (function (_super) {
|
|
|
3035
3042
|
ListView.prototype.requiredModules = function () {
|
|
3036
3043
|
var modules = [];
|
|
3037
3044
|
if (this.enableVirtualization) {
|
|
3038
|
-
modules.push({ args: [this], member: 'virtualization' });
|
|
3045
|
+
modules.push({ args: [this], member: 'virtualization', name: 'Virtualization' });
|
|
3039
3046
|
}
|
|
3040
3047
|
return modules;
|
|
3041
3048
|
};
|
|
@@ -3105,7 +3112,7 @@ var ListView = /** @__PURE__ @class */ (function (_super) {
|
|
|
3105
3112
|
Property(false)
|
|
3106
3113
|
], ListView.prototype, "showHeader", void 0);
|
|
3107
3114
|
__decorate([
|
|
3108
|
-
Property(
|
|
3115
|
+
Property(true)
|
|
3109
3116
|
], ListView.prototype, "enableHtmlSanitizer", void 0);
|
|
3110
3117
|
__decorate([
|
|
3111
3118
|
Property('')
|
|
@@ -3399,9 +3406,10 @@ var Virtualization = /** @__PURE__ @class */ (function () {
|
|
|
3399
3406
|
}
|
|
3400
3407
|
if (this.listViewInstance.curViewDS[index][this.listViewInstance.fields.iconCss]) {
|
|
3401
3408
|
var textContent = element.querySelector('.' + classNames.textContent);
|
|
3409
|
+
var curViewDS = this.listViewInstance.curViewDS[index];
|
|
3410
|
+
var iconCss = curViewDS[this.listViewInstance.fields.iconCss].toString();
|
|
3402
3411
|
var target = this.listViewInstance.createElement('div', {
|
|
3403
|
-
className: classNames.listIcon + ' ' +
|
|
3404
|
-
this.listViewInstance.curViewDS[index][this.listViewInstance.fields.iconCss]
|
|
3412
|
+
className: classNames.listIcon + ' ' + iconCss
|
|
3405
3413
|
});
|
|
3406
3414
|
textContent.insertBefore(target, element.querySelector('.' + classNames.listItemText));
|
|
3407
3415
|
}
|
|
@@ -3918,7 +3926,9 @@ var Virtualization = /** @__PURE__ @class */ (function () {
|
|
|
3918
3926
|
target = this.listViewInstance.getLiFromObjOrElement(this.listViewInstance.curViewDS[index + 1]) ||
|
|
3919
3927
|
this.listViewInstance.getLiFromObjOrElement(this.listViewInstance.curViewDS[index + 2]);
|
|
3920
3928
|
}
|
|
3921
|
-
if (this.listViewInstance.fields.groupBy
|
|
3929
|
+
if (this.listViewInstance.fields.groupBy
|
|
3930
|
+
&& this.listViewInstance.curViewDS[index + 1]
|
|
3931
|
+
&& this.listViewInstance.curViewDS[index + 1].isHeader) {
|
|
3922
3932
|
var targetEle = this.listViewInstance.getLiFromObjOrElement(this.listViewInstance.curViewDS[index - 1]);
|
|
3923
3933
|
if (targetEle) {
|
|
3924
3934
|
target = targetEle.nextElementSibling;
|
|
@@ -4015,6 +4025,7 @@ var Virtualization = /** @__PURE__ @class */ (function () {
|
|
|
4015
4025
|
* @param {DataSource} newData - The new data source for the list view.
|
|
4016
4026
|
* @param {ElementContext} listElement - The HTML element context for the list view.
|
|
4017
4027
|
* @param {Virtualization} virtualThis - The virtualization context for the list view.
|
|
4028
|
+
* @returns {void}
|
|
4018
4029
|
*/
|
|
4019
4030
|
Virtualization.prototype.onChange = function (newData, listElement, virtualThis) {
|
|
4020
4031
|
var liItem = ListBase.createListItemFromJson(virtualThis.listViewInstance.createElement,
|
|
@@ -4124,7 +4135,7 @@ var Sortable = /** @__PURE__ @class */ (function (_super) {
|
|
|
4124
4135
|
_this.trigger('drag', { event: e.event, element: _this.element, target: e.target });
|
|
4125
4136
|
var newInst = _this.getSortableInstance(e.target);
|
|
4126
4137
|
var target = _this.getSortableElement(e.target, newInst);
|
|
4127
|
-
if ((_this.isValidTarget(target, newInst) || e.target.className.indexOf('e-list-group-item') > -1) && (_this.curTarget !== target ||
|
|
4138
|
+
if ((_this.isValidTarget(target, newInst) || (e.target && typeof e.target.className === 'string' && e.target.className.indexOf('e-list-group-item') > -1)) && (_this.curTarget !== target ||
|
|
4128
4139
|
!isNullOrUndefined(newInst.placeHolder)) && (newInst.placeHolderElement ? newInst.placeHolderElement !== e.target : true)) {
|
|
4129
4140
|
if (e.target.classList.contains('e-list-group-item')) {
|
|
4130
4141
|
target = e.target;
|
|
@@ -4147,7 +4158,7 @@ var Sortable = /** @__PURE__ @class */ (function (_super) {
|
|
|
4147
4158
|
remove(newInst.placeHolderElement);
|
|
4148
4159
|
}
|
|
4149
4160
|
newInst.placeHolderElement = placeHolder;
|
|
4150
|
-
if (e.target.className.indexOf('e-list-group-item') > -1) {
|
|
4161
|
+
if (e.target && typeof e.target.className === 'string' && e.target.className.indexOf('e-list-group-item') > -1) {
|
|
4151
4162
|
newInst.element.insertBefore(newInst.placeHolderElement, newInst.element.children[newIdx]);
|
|
4152
4163
|
}
|
|
4153
4164
|
else if (newInst.element !== _this.element && newIdx === newInst.element.childElementCount) {
|
|
@@ -4265,7 +4276,7 @@ var Sortable = /** @__PURE__ @class */ (function (_super) {
|
|
|
4265
4276
|
target: e.target, droppedElement: _this.target, helper: e.helper, cancel: false
|
|
4266
4277
|
};
|
|
4267
4278
|
_this.trigger('beforeDrop', beforeDropArgs, function (observedArgs) {
|
|
4268
|
-
if ((dropInst.element === e.target || e.target.className.indexOf('e-list-nrt') > -1 || e.target.className.indexOf('e-list-nr-template') > -1
|
|
4279
|
+
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)
|
|
4269
4280
|
|| e.target.closest('.e-list-nr-template')) && !observedArgs.cancel) {
|
|
4270
4281
|
_this.updateItemClass(dropInst);
|
|
4271
4282
|
dropInst.element.appendChild(_this.target);
|