@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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 24.2.8
3
+ * version : 25.1.41
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-lists@*",
3
- "_id": "@syncfusion/ej2-lists@24.2.4",
3
+ "_id": "@syncfusion/ej2-lists@25.1.39",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-RCMbuzBfpZPE89dDS+11qs6n4T3K7zlW1zNkiIoRDlaFTBKpr9SPODmmLYauCkSvj6SYrGvWDoZGH0GPJSjuqA==",
5
+ "_integrity": "sha512-I1Q257ceQxqo7UHcrv3r9XGCW+Xomxh1QHOCu0V0g6oou48Ieph0Sbc0ScgtgXu7TYpKqIv0cc1EJYXvex0EUQ==",
6
6
  "_location": "/@syncfusion/ej2-lists",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -35,19 +35,19 @@
35
35
  "/@syncfusion/ej2-schedule",
36
36
  "/@syncfusion/ej2-vue-lists"
37
37
  ],
38
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-lists/-/ej2-lists-24.2.4.tgz",
39
- "_shasum": "6111ea6805342dacadab51c6ed0c6cf575cf351d",
38
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-lists/-/ej2-lists-25.1.39.tgz",
39
+ "_shasum": "80283ddecbd264a24b1363f8d40ca30501095616",
40
40
  "_spec": "@syncfusion/ej2-lists@*",
41
- "_where": "/jenkins/workspace/elease-automation_release_24.1.1/packages/included",
41
+ "_where": "/jenkins/workspace/elease-automation_release_25.1.1/packages/included",
42
42
  "author": {
43
43
  "name": "Syncfusion Inc."
44
44
  },
45
45
  "bundleDependencies": false,
46
46
  "dependencies": {
47
- "@syncfusion/ej2-base": "~24.2.7",
48
- "@syncfusion/ej2-buttons": "~24.2.7",
49
- "@syncfusion/ej2-data": "~24.2.3",
50
- "@syncfusion/ej2-popups": "~24.2.8"
47
+ "@syncfusion/ej2-base": "25.1.35-579988",
48
+ "@syncfusion/ej2-buttons": "25.1.35-579988",
49
+ "@syncfusion/ej2-data": "~25.1.35",
50
+ "@syncfusion/ej2-popups": "25.1.35-579988"
51
51
  },
52
52
  "deprecated": false,
53
53
  "description": "The listview control allows you to select an item or multiple items from a list-like interface and represents the data in interactive hierarchical structure across different layouts or views.",
@@ -87,7 +87,7 @@
87
87
  "url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/lists"
88
88
  },
89
89
  "typings": "index.d.ts",
90
- "version": "24.2.8",
90
+ "version": "25.1.35-579988",
91
91
  "sideEffects": false,
92
92
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
93
93
  }
@@ -301,7 +301,7 @@ export 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 (htmlAttributes.hasOwnProperty('class') && typeof htmlAttributes['class'] === 'string' && htmlAttributes['class'].trim() === '') {
304
+ if ('class' in htmlAttributes && typeof htmlAttributes['class'] === 'string' && htmlAttributes['class'].trim() === '') {
305
305
  delete htmlAttributes['class'];
306
306
  }
307
307
  setAttribute(li, htmlAttributes);
@@ -218,12 +218,12 @@ export interface ListViewModel extends ComponentModel{
218
218
  showHeader?: boolean;
219
219
 
220
220
  /**
221
- * Specifies whether HTML content should be sanitized or escaped.
222
- * When set to `true`, any HTML content will be sanitized to remove potentially harmful elements.
221
+ * Specifies whether to display or remove the untrusted HTML values in the ListView component.
222
+ * If 'enableHtmlSanitizer' set to true, the component will sanitize any suspected untrusted strings and scripts before rendering them.
223
223
  *
224
224
  * {% codeBlock src='listview/enableHtmlSanitizer/index.md' %}{% endcodeBlock %}
225
225
  *
226
- * @default false
226
+ * @default true
227
227
  */
228
228
  enableHtmlSanitizer?: boolean;
229
229
 
@@ -315,10 +315,10 @@ export interface ListViewModel extends ComponentModel{
315
315
  actionFailure?: EmitType<MouseEvent>;
316
316
 
317
317
  /**
318
- * Triggers when scrollbar of the ListView component reaches to the top or bottom.
319
- *
320
- * @event 'object'
321
- */
318
+ * Triggers when scrollbar of the ListView component reaches to the top or bottom.
319
+ *
320
+ * @event 'object'
321
+ */
322
322
  scroll?: EmitType<ScrolledEventArgs>;
323
323
 
324
324
  }
@@ -299,12 +299,12 @@ export declare class ListView extends Component<HTMLElement> implements INotifyP
299
299
  */
300
300
  showHeader: boolean;
301
301
  /**
302
- * Specifies whether HTML content should be sanitized or escaped.
303
- * When set to `true`, any HTML content will be sanitized to remove potentially harmful elements.
302
+ * Specifies whether to display or remove the untrusted HTML values in the ListView component.
303
+ * If 'enableHtmlSanitizer' set to true, the component will sanitize any suspected untrusted strings and scripts before rendering them.
304
304
  *
305
305
  * {% codeBlock src='listview/enableHtmlSanitizer/index.md' %}{% endcodeBlock %}
306
306
  *
307
- * @default false
307
+ * @default true
308
308
  */
309
309
  enableHtmlSanitizer: boolean;
310
310
  /**
@@ -385,10 +385,10 @@ export declare class ListView extends Component<HTMLElement> implements INotifyP
385
385
  */
386
386
  actionFailure: EmitType<MouseEvent>;
387
387
  /**
388
- * Triggers when scrollbar of the ListView component reaches to the top or bottom.
389
- *
390
- * @event 'object'
391
- */
388
+ * Triggers when scrollbar of the ListView component reaches to the top or bottom.
389
+ *
390
+ * @event 'object'
391
+ */
392
392
  scroll: EmitType<ScrolledEventArgs>;
393
393
  /**
394
394
  * Constructor for creating the widget
@@ -445,7 +445,7 @@ export declare class ListView extends Component<HTMLElement> implements INotifyP
445
445
  * Refresh the height of the list item only on enabling the virtualization property.
446
446
  */
447
447
  refreshItemHeight(): void;
448
- targetElement: any;
448
+ targetElement: Element;
449
449
  private clickHandler;
450
450
  private removeElement;
451
451
  private hoverHandler;
@@ -877,8 +877,8 @@ var ListView = /** @class */ (function (_super) {
877
877
  }
878
878
  };
879
879
  ListView.prototype.spaceKeyHandler = function (e) {
880
- e.preventDefault();
881
880
  if (this.enable && this.showCheckBox && Object.keys(this.dataSource).length && this.curUL) {
881
+ e.preventDefault();
882
882
  var li = this.curUL.querySelector('.' + classNames.focused);
883
883
  var checkboxElement = void 0;
884
884
  var checkIcon = void 0;
@@ -961,11 +961,13 @@ var ListView = /** @class */ (function (_super) {
961
961
  }
962
962
  };
963
963
  ListView.prototype.unWireEvents = function () {
964
+ EventHandler.remove(this.element, 'keydown', this.keyActionHandler);
964
965
  EventHandler.remove(this.element, 'click', this.clickHandler);
965
966
  EventHandler.remove(this.element, 'mouseover', this.hoverHandler);
966
967
  EventHandler.remove(this.element, 'mouseout', this.leaveHandler);
967
968
  EventHandler.remove(this.element, 'mouseover', this.hoverHandler);
968
969
  EventHandler.remove(this.element, 'mouseout', this.leaveHandler);
970
+ EventHandler.remove(this.element, 'focusout', this.focusout);
969
971
  if (!isNullOrUndefined(this.scroll)) {
970
972
  EventHandler.remove(this.element, 'scroll', this.onListScroll);
971
973
  }
@@ -1061,7 +1063,12 @@ var ListView = /** @class */ (function (_super) {
1061
1063
  var eventArgs = {};
1062
1064
  merge(eventArgs, selectedItem);
1063
1065
  if (e) {
1064
- merge(eventArgs, { isInteracted: true, event: e, cancel: false, index: this.curUL && Array.prototype.indexOf.call(this.curUL.children, li) });
1066
+ merge(eventArgs, {
1067
+ isInteracted: true,
1068
+ event: e,
1069
+ cancel: false,
1070
+ index: this.curUL && Array.prototype.indexOf.call(this.curUL.children, li)
1071
+ });
1065
1072
  }
1066
1073
  return eventArgs;
1067
1074
  };
@@ -2011,7 +2018,7 @@ var ListView = /** @class */ (function (_super) {
2011
2018
  ListView.prototype.requiredModules = function () {
2012
2019
  var modules = [];
2013
2020
  if (this.enableVirtualization) {
2014
- modules.push({ args: [this], member: 'virtualization' });
2021
+ modules.push({ args: [this], member: 'virtualization', name: 'Virtualization' });
2015
2022
  }
2016
2023
  return modules;
2017
2024
  };
@@ -2081,7 +2088,7 @@ var ListView = /** @class */ (function (_super) {
2081
2088
  Property(false)
2082
2089
  ], ListView.prototype, "showHeader", void 0);
2083
2090
  __decorate([
2084
- Property(false)
2091
+ Property(true)
2085
2092
  ], ListView.prototype, "enableHtmlSanitizer", void 0);
2086
2093
  __decorate([
2087
2094
  Property('')
@@ -84,6 +84,7 @@ export declare class Virtualization {
84
84
  * @param {DataSource} newData - The new data source for the list view.
85
85
  * @param {ElementContext} listElement - The HTML element context for the list view.
86
86
  * @param {Virtualization} virtualThis - The virtualization context for the list view.
87
+ * @returns {void}
87
88
  */
88
89
  private onChange;
89
90
  private onNgChange;
@@ -258,9 +258,10 @@ var Virtualization = /** @class */ (function () {
258
258
  }
259
259
  if (this.listViewInstance.curViewDS[index][this.listViewInstance.fields.iconCss]) {
260
260
  var textContent = element.querySelector('.' + classNames.textContent);
261
+ var curViewDS = this.listViewInstance.curViewDS[index];
262
+ var iconCss = curViewDS[this.listViewInstance.fields.iconCss].toString();
261
263
  var target = this.listViewInstance.createElement('div', {
262
- className: classNames.listIcon + ' ' +
263
- this.listViewInstance.curViewDS[index][this.listViewInstance.fields.iconCss]
264
+ className: classNames.listIcon + ' ' + iconCss
264
265
  });
265
266
  textContent.insertBefore(target, element.querySelector('.' + classNames.listItemText));
266
267
  }
@@ -777,7 +778,9 @@ var Virtualization = /** @class */ (function () {
777
778
  target = this.listViewInstance.getLiFromObjOrElement(this.listViewInstance.curViewDS[index + 1]) ||
778
779
  this.listViewInstance.getLiFromObjOrElement(this.listViewInstance.curViewDS[index + 2]);
779
780
  }
780
- if (this.listViewInstance.fields.groupBy && this.listViewInstance.curViewDS[index + 1] && this.listViewInstance.curViewDS[index + 1].isHeader) {
781
+ if (this.listViewInstance.fields.groupBy
782
+ && this.listViewInstance.curViewDS[index + 1]
783
+ && this.listViewInstance.curViewDS[index + 1].isHeader) {
781
784
  var targetEle = this.listViewInstance.getLiFromObjOrElement(this.listViewInstance.curViewDS[index - 1]);
782
785
  if (targetEle) {
783
786
  target = targetEle.nextElementSibling;
@@ -874,6 +877,7 @@ var Virtualization = /** @class */ (function () {
874
877
  * @param {DataSource} newData - The new data source for the list view.
875
878
  * @param {ElementContext} listElement - The HTML element context for the list view.
876
879
  * @param {Virtualization} virtualThis - The virtualization context for the list view.
880
+ * @returns {void}
877
881
  */
878
882
  Virtualization.prototype.onChange = function (newData, listElement, virtualThis) {
879
883
  var liItem = ListBase.createListItemFromJson(virtualThis.listViewInstance.createElement,
@@ -67,7 +67,7 @@ var Sortable = /** @class */ (function (_super) {
67
67
  _this.trigger('drag', { event: e.event, element: _this.element, target: e.target });
68
68
  var newInst = _this.getSortableInstance(e.target);
69
69
  var target = _this.getSortableElement(e.target, newInst);
70
- if ((_this.isValidTarget(target, newInst) || e.target.className.indexOf('e-list-group-item') > -1) && (_this.curTarget !== target ||
70
+ if ((_this.isValidTarget(target, newInst) || (e.target && typeof e.target.className === 'string' && e.target.className.indexOf('e-list-group-item') > -1)) && (_this.curTarget !== target ||
71
71
  !isNullOrUndefined(newInst.placeHolder)) && (newInst.placeHolderElement ? newInst.placeHolderElement !== e.target : true)) {
72
72
  if (e.target.classList.contains('e-list-group-item')) {
73
73
  target = e.target;
@@ -90,7 +90,7 @@ var Sortable = /** @class */ (function (_super) {
90
90
  remove(newInst.placeHolderElement);
91
91
  }
92
92
  newInst.placeHolderElement = placeHolder;
93
- if (e.target.className.indexOf('e-list-group-item') > -1) {
93
+ if (e.target && typeof e.target.className === 'string' && e.target.className.indexOf('e-list-group-item') > -1) {
94
94
  newInst.element.insertBefore(newInst.placeHolderElement, newInst.element.children[newIdx]);
95
95
  }
96
96
  else if (newInst.element !== _this.element && newIdx === newInst.element.childElementCount) {
@@ -208,7 +208,7 @@ var Sortable = /** @class */ (function (_super) {
208
208
  target: e.target, droppedElement: _this.target, helper: e.helper, cancel: false
209
209
  };
210
210
  _this.trigger('beforeDrop', beforeDropArgs, function (observedArgs) {
211
- if ((dropInst.element === e.target || e.target.className.indexOf('e-list-nrt') > -1 || e.target.className.indexOf('e-list-nr-template') > -1
211
+ 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)
212
212
  || e.target.closest('.e-list-nr-template')) && !observedArgs.cancel) {
213
213
  _this.updateItemClass(dropInst);
214
214
  dropInst.element.appendChild(_this.target);
@@ -0,0 +1,138 @@
1
+ //layout
2
+ $listview-icon-margin-right: 2px !default;
3
+ $listview-item-height: 40px !default;
4
+ $listview-item-line-height: 22px !default;
5
+ $listview-item-padding: 8px 9px 8px 12px !default;
6
+ $listview-rtl-item-padding: 8px 12px 8px 9px !default;
7
+ $listview-header-padding: 6px 12px !default;
8
+ $listview-root-border-radius: 0 !default;
9
+ $listview-nested-icon-collapsible: 20px !default;
10
+ $listview-icon-size: 20px !default;
11
+ $listview-header-text-padding: 12px !default;
12
+ $listview-header-font-size: $text-xs !default;
13
+ $listview-header-height: 30px !default;
14
+ $listview-header-font-weight: $font-weight-medium !default;
15
+ $listview-header-line-height: 18px !default;
16
+ $listview-border-bottom: 0 !default;
17
+ $listview-border-top: 0 !default;
18
+ $listview-border-left: 0 !default;
19
+ $listview-border-right: 0 !default;
20
+ $listview-group-border-top: 0 !default;
21
+ $listview-group-border-bottom: 0 !default;
22
+ $listview-group-first-border-bottom: 0 !default;
23
+
24
+ $listview-groupheader-item-height: 30px !default;
25
+ $listview-groupheader-item-line-height: 18px !default;
26
+ $listview-groupheader-font-size: $text-xs !default;
27
+ $listview-border-size: 0 !default;
28
+ $listview-font-size: $text-sm !default;
29
+ $listview-back-padding-right: 8px !default;
30
+ $listview-back-icon-size: 20px !default;
31
+ $listview-back-icon-font-size: $text-base !default;
32
+ $listview-touch-item-height: 48px !default;
33
+ $listview-touch-item-line-height: 24px !default;
34
+ $listview-touch-item-size: 24px !default;
35
+ $listview-touch-item-padding: 12px 14px 12px 16px !default;
36
+ $listview-rtl-touch-item-padding: 12px 16px 12px 14px !default;
37
+ $listview-touch-item-font-size: $text-base !default;
38
+ $listview-touch-groupheader-height: 38px !default;
39
+ $listview-touch-groupheader-line-height: 22px !default;
40
+ $listview-touch-header-height: 38px !default;
41
+ $listview-touch-header-font-weight: $font-weight-medium !default;
42
+ $listview-touch-header-font-size: $text-sm !default;
43
+ $listview-touch-header-line-height: 22px !default;
44
+ $listview-touch-header-icon-margin-top: 2px !default;
45
+ $listview-touch-icon-margin-right: 5px !default;
46
+ $listview-touch-checkbox-right-margin: -2px 0 0 12px !default;
47
+ $listview-touch-checkbox-left-margin: -2px 12px 0 0 !default;
48
+ $listview-touch-rtl-checkbox-left-margin: -2px 0 0 12px !default;
49
+ $listview-touch-rtl-checkbox-right-margin: -2px 12px 0 0 !default;
50
+ $listview-checkbox-right-margin: -2px 0 0 8px !default;
51
+ $listview-checkbox-left-margin: -2px 8px 0 0 !default;
52
+ $listview-rtl-checkbox-left-margin: -2px 0 0 8px !default;
53
+ $listview-rtl-checkbox-right-margin: -2px 8px 0 0 !default;
54
+
55
+ //ListView In-built template variables
56
+ $listview-template-padding: 8px 16px !default;
57
+ $listview-template-avatar-padding-right: 16px !default;
58
+ $listview-template-avatar-padding-left: 68px !default;
59
+ $listview-template-avatar-rightposition-padding-right: 68px !default;
60
+ $listview-template-avatar-rightposition-padding-left: 16px !default;
61
+ $listview-template-avatar-size: 40px !default;
62
+ $listview-template-avatar-top: 0 !default;
63
+ $listview-template-avatar-left: 0 !default;
64
+ $listview-template-avatar-margin: 7px 16px 7px 12px !default;
65
+ $listview-template-avatar-rightposition-right: 0 !default;
66
+ $listview-template-badge-height: 18px !default;
67
+ $listview-template-badge-width: 32px !default;
68
+ $listview-template-badge-line-height: 18px !default;
69
+ $listview-template-badge-font-size: $text-xxs !default;
70
+ $listview-template-badge-right: 12px !default;
71
+ $listview-template-avatar-badge-padding-right: 10px !default;
72
+ $listview-template-avatar-badge-padding-left: 68px !default;
73
+ $listview-template-badgewithoutavatar-padding-right: 10px !default;
74
+ $listview-template-badgewithoutavatar-padding-left: 16px !default;
75
+ $listview-template-item-padding: 8px 0 !default;
76
+ $listview-template-multiline-header-padding: 0 !default;
77
+ $listview-template-multiline-content-padding: 2px 0 0 0 !default;
78
+ $listview-template-multiline-header-font-size: $text-sm !default;
79
+ $listview-template-multiline-padding: 4px !default;
80
+ $listview-template-multiline-content-font-size: $text-sm !default;
81
+ $listview-template-multiline-avatar-top: 0 !default;
82
+ $listview-touch-template-padding: 12px 16px !default;
83
+ $listview-touch-template-multiline-padding: 7px !default;
84
+ $listview-touch-template-avatar-padding-left: 88px !default;
85
+ $listview-touch-template-avatar-size: 48px !default;
86
+ $listview-touch-template-multiline-header-font-size: $text-base !default;
87
+ $listview-touch-template-multiline-header-line-height: 24px !default;
88
+ $listview-touch-template-avatar-margin: 8px 24px 8px 16px !default;
89
+ $listview-touch-template-badge-height: 20px !default;
90
+ $listview-touch-template-badge-width: 34px !default;
91
+ $listview-touch-template-badge-line-height: 18px !default;
92
+ $listview-touch-template-badge-font-size: $text-xs !default;
93
+
94
+ //color
95
+ $listview-font-family: $font-family !default;
96
+ $listview-text-color: $content-text-color-alt1 !default;
97
+ $listview-text-disabled: $content-text-color-disabled !default;
98
+ $listview-icon-color: $icon-color !default;
99
+ $listview-icon-disabled: $icon-color-disabled !default;
100
+ $listview-background: $transparent !default;
101
+ $listview-line-color: $border-light !default;
102
+ $listview-item-hover-bg: $content-bg-color-hover !default;
103
+ $listview-text-hover-color: $content-text-color-hover !default;
104
+ $listview-item-active-bg: $content-bg-color-selected !default;
105
+ $listview-root-border-color: none !default;
106
+ $listview-text-active-color: $content-text-color-selected !default;
107
+ $listview-header-text-color: $content-text-color !default;
108
+ $listview-header-text-disabled: $content-text-color-disabled !default;
109
+ $listview-header-bg: $content-bg-color-alt2 !default;
110
+ $listview-header-icon-color: $icon-color !default;
111
+ $listview-header-icon-disabled: $icon-color-disabled !default;
112
+ $listview-header-border: $transparent !default;
113
+ $listview-hover-border-color: transparent !default;
114
+ $listview-border-bottom-color: transparent !default;
115
+ $listview-border-top-color: transparent !default;
116
+ $listview-border-right-color: transparent !default;
117
+ $listview-border-left-color: transparent !default;
118
+ $listview-groupheader-text-color: $content-text-color-alt2 !default;
119
+ $listview-groupheader-bg: $content-bg-color-alt2 !default;
120
+ $listview-groupheader-icon: $icon-color !default;
121
+
122
+ //ListView In-built template variables
123
+ $listview-template-multiline-header-color: $content-text-color !default;
124
+ $listview-template-multiline-content-color: $content-text-color-alt2 !default;
125
+
126
+ /* stylelint-disable */
127
+ .e-listview {
128
+ & .e-list-parent {
129
+ margin: 0 12px !important;
130
+ padding: 0;
131
+ }
132
+ }
133
+
134
+ .e-listview {
135
+ &:not(.e-list-template) .e-list-item {
136
+ border-radius: 6px !important;
137
+ }
138
+ }
@@ -0,0 +1,8 @@
1
+ .e-icon-collapsible::before {
2
+ content: '\e748';
3
+ }
4
+
5
+ .e-icon-back::before {
6
+ content: '\e773';
7
+ font-size: $listview-back-icon-font-size;
8
+ }
@@ -0,0 +1 @@
1
+ /* stylelint-disable-line no-empty-source */