@syncfusion/ej2-lists 20.2.36 → 20.2.43

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 : 20.2.36
3
+ * version : 20.2.43
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. 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
@@ -1,6 +1,8 @@
1
- "use strict";
2
- function __export(m) {
3
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
4
- }
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- __export(require("./list-view"));
1
+ define(["require", "exports", "./list-view"], function (require, exports, list_view_1) {
2
+ "use strict";
3
+ function __export(m) {
4
+ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
5
+ }
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ __export(list_view_1);
8
+ });
@@ -1,23 +1,39 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const e2e_1 = require("@syncfusion/ej2-base/helpers/e2e");
4
- class ListViewHelper extends e2e_1.TestHelper {
5
- constructor(id, wrapperFn) {
6
- super();
7
- this.id = id;
8
- if (wrapperFn !== undefined) {
9
- this.wrapperFn = wrapperFn;
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ extendStatics(d, b);
10
+ function __() { this.constructor = d; }
11
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
+ };
13
+ })();
14
+ define(["require", "exports", "@syncfusion/ej2-base/helpers/e2e"], function (require, exports, e2e_1) {
15
+ "use strict";
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ var ListViewHelper = (function (_super) {
18
+ __extends(ListViewHelper, _super);
19
+ function ListViewHelper(id, wrapperFn) {
20
+ var _this = _super.call(this) || this;
21
+ _this.id = id;
22
+ if (wrapperFn !== undefined) {
23
+ _this.wrapperFn = wrapperFn;
24
+ }
25
+ return _this;
10
26
  }
11
- return this;
12
- }
13
- getElement() {
14
- return this.selector('#' + this.id);
15
- }
16
- getNestedULElement(parentId) {
17
- return this.selector(`[pid="${parentId}"]`);
18
- }
19
- getULElement() {
20
- return this.selector(`#${this.id} > div.e-content > ul:nth-child(1)`);
21
- }
22
- }
23
- exports.ListViewHelper = ListViewHelper;
27
+ ListViewHelper.prototype.getElement = function () {
28
+ return this.selector('#' + this.id);
29
+ };
30
+ ListViewHelper.prototype.getNestedULElement = function (parentId) {
31
+ return this.selector("[pid=\"" + parentId + "\"]");
32
+ };
33
+ ListViewHelper.prototype.getULElement = function () {
34
+ return this.selector("#" + this.id + " > div.e-content > ul:nth-child(1)");
35
+ };
36
+ return ListViewHelper;
37
+ }(e2e_1.TestHelper));
38
+ exports.ListViewHelper = ListViewHelper;
39
+ });
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-lists@*",
3
- "_id": "@syncfusion/ej2-lists@20.2.1",
3
+ "_id": "@syncfusion/ej2-lists@20.2.39",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-7+xY4GgPtJKXuzV943oXjxMzIWwfA/UH9gGbIp2T/MvDd2clZvCgmseOuvi+ov0Kf+hdKVBOqxnB/hzQ6TLz7g==",
5
+ "_integrity": "sha512-nOKgdsFypBthsRXdYIbGJ9NxUBXhDqPkNYjeH1SLqOaCGIoOuXTIRPHVKzsFDVyaalRnllT0q1LgmsFyWvZr+w==",
6
6
  "_location": "/@syncfusion/ej2-lists",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -34,8 +34,8 @@
34
34
  "/@syncfusion/ej2-schedule",
35
35
  "/@syncfusion/ej2-vue-lists"
36
36
  ],
37
- "_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-lists/-/ej2-lists-20.2.1.tgz",
38
- "_shasum": "2086c2762a7eb9bee8224d07abdc8c351891db3b",
37
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-lists/-/ej2-lists-20.2.39.tgz",
38
+ "_shasum": "f7270d02ba04d32d784565195d70e935dc1c0db7",
39
39
  "_spec": "@syncfusion/ej2-lists@*",
40
40
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
41
41
  "author": {
@@ -43,9 +43,9 @@
43
43
  },
44
44
  "bundleDependencies": false,
45
45
  "dependencies": {
46
- "@syncfusion/ej2-base": "~20.2.36",
47
- "@syncfusion/ej2-buttons": "~20.2.36",
48
- "@syncfusion/ej2-data": "~20.2.36"
46
+ "@syncfusion/ej2-base": "~20.2.43",
47
+ "@syncfusion/ej2-buttons": "~20.2.43",
48
+ "@syncfusion/ej2-data": "~20.2.43"
49
49
  },
50
50
  "deprecated": false,
51
51
  "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.",
@@ -85,6 +85,6 @@
85
85
  "url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/lists"
86
86
  },
87
87
  "typings": "index.d.ts",
88
- "version": "20.2.36",
88
+ "version": "20.2.43",
89
89
  "sideEffects": false
90
90
  }
@@ -755,6 +755,10 @@ export interface SelectEventArgs extends BaseEventArgs, SelectedItem {
755
755
  * It is used to check whether the element is checked or not.
756
756
  */
757
757
  isChecked?: boolean;
758
+ /**
759
+ * Cancels the item selection if the value is true.
760
+ */
761
+ cancel: boolean;
758
762
  }
759
763
  /**
760
764
  * An interface that holds item created event arguments
@@ -675,7 +675,6 @@ var ListView = /** @class */ (function (_super) {
675
675
  }
676
676
  else {
677
677
  this.setSelectLI(li, e);
678
- this.element.focus();
679
678
  }
680
679
  closestElement = closest(e.target, 'li');
681
680
  if (!isNullOrUndefined(closestElement)) {
@@ -1031,7 +1030,7 @@ var ListView = /** @class */ (function (_super) {
1031
1030
  var eventArgs = {};
1032
1031
  merge(eventArgs, selectedItem);
1033
1032
  if (e) {
1034
- merge(eventArgs, { isInteracted: true, event: e, index: this.curUL && Array.prototype.indexOf.call(this.curUL.children, li) });
1033
+ merge(eventArgs, { isInteracted: true, event: e, cancel: false, index: this.curUL && Array.prototype.indexOf.call(this.curUL.children, li) });
1035
1034
  }
1036
1035
  return eventArgs;
1037
1036
  };
@@ -1058,6 +1057,7 @@ var ListView = /** @class */ (function (_super) {
1058
1057
  }
1059
1058
  };
1060
1059
  ListView.prototype.setSelectLI = function (li, e) {
1060
+ var _this = this;
1061
1061
  if (this.isValidLI(li) && !li.classList.contains(classNames.selected) && this.enable) {
1062
1062
  if (!this.showCheckBox) {
1063
1063
  this.removeSelect();
@@ -1070,9 +1070,12 @@ var ListView = /** @class */ (function (_super) {
1070
1070
  this.virtualizationModule.setSelectLI(li, e);
1071
1071
  }
1072
1072
  var eventArgs = this.selectEventData(li, e);
1073
- this.trigger('select', eventArgs);
1074
- this.selectedLI = li;
1075
- this.renderSubList(li);
1073
+ this.trigger('select', eventArgs, function (observedArgs) {
1074
+ if (!observedArgs.cancel) {
1075
+ _this.selectedLI = li;
1076
+ _this.renderSubList(li);
1077
+ }
1078
+ });
1076
1079
  }
1077
1080
  };
1078
1081
  ListView.prototype.setHoverLI = function (li) {