@syncfusion/ej2-dropdowns 20.4.38 → 20.4.42

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.4.38
3
+ * version : 20.4.42
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
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-dropdowns@*",
3
- "_id": "@syncfusion/ej2-dropdowns@18.58.2",
3
+ "_id": "@syncfusion/ej2-dropdowns@20.4.40",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-vD4WNwAbimAx0XnFNgwoknAKaacI0KCvCj3iJZxia/Z5DIsH9/2PiwIfquOgHBPaq+Nu0NEa0XDk1rNyce9EZg==",
5
+ "_integrity": "sha512-xqKXamW2NJjIi79drLYDBH8XJFR3EW6edMF0NDsisCPJ7lQyy6SUBTNDEnnoT62eOZxki7k6UYJ+KRhxOoWx1Q==",
6
6
  "_location": "/@syncfusion/ej2-dropdowns",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -33,8 +33,8 @@
33
33
  "/@syncfusion/ej2-spreadsheet",
34
34
  "/@syncfusion/ej2-vue-dropdowns"
35
35
  ],
36
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-18.58.2.tgz",
37
- "_shasum": "857b24b55c28406de45890a415c2b0e5c094e681",
36
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-20.4.40.tgz",
37
+ "_shasum": "1ec49b9c25595387e0213eccc971de4e7d5d4042",
38
38
  "_spec": "@syncfusion/ej2-dropdowns@*",
39
39
  "_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
40
40
  "author": {
@@ -42,12 +42,12 @@
42
42
  },
43
43
  "bundleDependencies": false,
44
44
  "dependencies": {
45
- "@syncfusion/ej2-base": "~20.4.38",
46
- "@syncfusion/ej2-data": "~20.4.38",
47
- "@syncfusion/ej2-inputs": "~20.4.38",
48
- "@syncfusion/ej2-lists": "~20.4.38",
49
- "@syncfusion/ej2-navigations": "~20.4.38",
50
- "@syncfusion/ej2-popups": "~20.4.38"
45
+ "@syncfusion/ej2-base": "~20.4.42",
46
+ "@syncfusion/ej2-data": "~20.4.42",
47
+ "@syncfusion/ej2-inputs": "~20.4.42",
48
+ "@syncfusion/ej2-lists": "~20.4.42",
49
+ "@syncfusion/ej2-navigations": "~20.4.42",
50
+ "@syncfusion/ej2-popups": "~20.4.42"
51
51
  },
52
52
  "deprecated": false,
53
53
  "description": "Essential JS 2 DropDown Components",
@@ -72,6 +72,7 @@
72
72
  "module": "./index.js",
73
73
  "name": "@syncfusion/ej2-dropdowns",
74
74
  "typings": "index.d.ts",
75
- "version": "20.4.38",
76
- "sideEffects": false
75
+ "version": "20.4.42",
76
+ "sideEffects": false,
77
+ "homepage": "https://www.syncfusion.com/javascript-ui-controls"
77
78
  }
@@ -469,10 +469,10 @@ var DropDownBase = /** @class */ (function (_super) {
469
469
  _this.isDataFetched = true;
470
470
  }
471
471
  ulElement = _this.renderItems(listItems, fields);
472
+ _this.onActionComplete(ulElement, listItems, e);
472
473
  if (_this.groupTemplate) {
473
474
  _this.renderGroupTemplate(ulElement);
474
475
  }
475
- _this.onActionComplete(ulElement, listItems, e);
476
476
  _this.isRequested = false;
477
477
  _this.bindChildItems(listItems, ulElement, fields, e);
478
478
  }
@@ -1684,6 +1684,9 @@ var DropDownTree = /** @class */ (function (_super) {
1684
1684
  }
1685
1685
  var eventArgs = { data: args.data };
1686
1686
  this.trigger('dataBound', eventArgs);
1687
+ if (this.filterObj === null) {
1688
+ this.isFilteredData = false;
1689
+ }
1687
1690
  if (this.isFilteredData) {
1688
1691
  this.treeObj.expandAll();
1689
1692
  }
@@ -102,13 +102,13 @@ export interface ListBoxModel extends DropDownBaseModel{
102
102
  enabled?: boolean;
103
103
 
104
104
  /**
105
- * Enable or disable persisting component's state between page reloads.
106
- * If enabled, following list of states will be persisted.
107
- * 1. value
108
- *
109
- * @default false
105
+ * Enable or disable persisting component's state between page reloads.
106
+ * If enabled, following list of states will be persisted.
107
+ * 1. value
108
+ *
109
+ * @default false
110
110
 
111
- */
111
+ */
112
112
  enablePersistence?: boolean;
113
113
 
114
114
  /**
@@ -615,6 +615,7 @@ var ListBox = /** @class */ (function (_super) {
615
615
  dragArgs = extend(dragArgs, { destination: dragArgs1 });
616
616
  }
617
617
  this.trigger('drop', dragArgs);
618
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
618
619
  var liCollElem = dragArgs.elements;
619
620
  if (liCollElem.length) {
620
621
  for (var i = 0; i < liCollElem.length; i++) {
@@ -1512,7 +1513,7 @@ var ListBox = /** @class */ (function (_super) {
1512
1513
  var isRefresh = tListBox.sortOrder !== 'None' || (tListBox.selectionSettings.showCheckbox !==
1513
1514
  fListBox.selectionSettings.showCheckbox) || tListBox.fields.groupBy || tListBox.itemTemplate || fListBox.itemTemplate;
1514
1515
  this.removeSelected(fListBox, fListBox.getSelectedItems());
1515
- var tempItems = [].slice.call(fListBox.jsonData);
1516
+ var tempItems = [].slice.call(fListBox.listData);
1516
1517
  var localDataArgs = { cancel: false, items: tempItems, eventName: this.toolbarAction };
1517
1518
  fListBox.trigger('actionBegin', localDataArgs);
1518
1519
  if (localDataArgs.cancel) {
@@ -1557,11 +1558,18 @@ var ListBox = /** @class */ (function (_super) {
1557
1558
  fListBox.value = [];
1558
1559
  listData = listData
1559
1560
  .filter(function (data) { return data.isHeader !== true; });
1560
- tListBox.listData = tListBox.jsonData = listData;
1561
+ var sortedData = listData.filter(function (val) {
1562
+ return tListBox.jsonData.indexOf(val) === -1;
1563
+ });
1564
+ for (var i = 0; i < sortedData.length; i++) {
1565
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1566
+ tListBox.jsonData.splice(index + i, 0, sortedData[i]);
1567
+ }
1568
+ tListBox.listData = listData;
1561
1569
  if (fListBox.listData.length === fListBox.jsonData.length) {
1562
1570
  fListBox.listData = fListBox.sortedData = fListBox.jsonData = [];
1563
1571
  }
1564
- else if (this.allowFiltering) {
1572
+ else if (fListBox.allowFiltering) {
1565
1573
  for (var i = 0; i < fListBox.listData.length; i++) {
1566
1574
  for (var j = 0; j < fListBox.jsonData.length; j++) {
1567
1575
  if (fListBox.listData[i] === fListBox.jsonData[j]) {
@@ -617,9 +617,18 @@ var Mention = /** @class */ (function (_super) {
617
617
  var args = { cancel: false };
618
618
  this.trigger('beforeOpen', args, function (args) {
619
619
  if (!args.cancel) {
620
- var popupEle_1 = isNullOrUndefined(_this.target) ? _this.createElement('div', {
621
- id: _this.inputElement.id + '_popup', className: 'e-mention e-popup ' + (_this.cssClass != null ? _this.cssClass : '')
622
- }) : _this.element;
620
+ var popupEle_1;
621
+ if (isNullOrUndefined(_this.target)) {
622
+ popupEle_1 = _this.createElement('div', {
623
+ id: _this.inputElement.id + '_popup', className: 'e-mention e-popup ' + (_this.cssClass != null ? _this.cssClass : '')
624
+ });
625
+ }
626
+ else {
627
+ popupEle_1 = _this.element;
628
+ if (_this.cssClass != null) {
629
+ addClass([popupEle_1], _this.cssClass.split(' '));
630
+ }
631
+ }
623
632
  if (!isNullOrUndefined(_this.target)) {
624
633
  popupEle_1.id = _this.inputElement.id + '_popup';
625
634
  addClass([popupEle_1], ['e-mention', 'e-popup', 'e-popup-close']);
@@ -576,6 +576,8 @@ export declare class MultiSelect extends DropDownBase implements IInput {
576
576
  private selectAllEventEle;
577
577
  private filterParent;
578
578
  private removeIndex;
579
+ private resetMainList;
580
+ private resetFilteredData;
579
581
  private enableRTL;
580
582
  requiredModules(): ModuleDeclaration[];
581
583
  private updateHTMLAttribute;
@@ -102,6 +102,8 @@ var MultiSelect = /** @class */ (function (_super) {
102
102
  _this.isValidKey = false;
103
103
  _this.selectAllEventData = [];
104
104
  _this.selectAllEventEle = [];
105
+ _this.resetMainList = null;
106
+ _this.resetFilteredData = false;
105
107
  _this.scrollFocusStatus = false;
106
108
  _this.keyDownStatus = false;
107
109
  return _this;
@@ -848,6 +850,10 @@ var MultiSelect = /** @class */ (function (_super) {
848
850
  }
849
851
  }
850
852
  this.updateDataList();
853
+ if (this.resetMainList) {
854
+ this.mainList = this.resetMainList;
855
+ this.resetMainList = null;
856
+ }
851
857
  this.refreshListItems(null);
852
858
  if (this.mode !== 'Box' && this.mode !== 'CheckBox') {
853
859
  this.updateDelimView();
@@ -2263,6 +2269,7 @@ var MultiSelect = /** @class */ (function (_super) {
2263
2269
  };
2264
2270
  MultiSelect.prototype.search = function (e) {
2265
2271
  var _this = this;
2272
+ this.resetFilteredData = true;
2266
2273
  if (!isNullOrUndefined(e)) {
2267
2274
  this.keyCode = e.keyCode;
2268
2275
  }
@@ -3457,6 +3464,11 @@ var MultiSelect = /** @class */ (function (_super) {
3457
3464
  MultiSelect.prototype.onPropertyChanged = function (newProp, oldProp) {
3458
3465
  if (newProp.dataSource && !isNullOrUndefined(Object.keys(newProp.dataSource))
3459
3466
  || newProp.query && !isNullOrUndefined(Object.keys(newProp.query))) {
3467
+ if (this.resetFilteredData) {
3468
+ // The filtered data is not being reset in the component after the user focuses out.
3469
+ this.resetMainList = !this.resetMainList ? this.mainList : this.resetMainList;
3470
+ this.resetFilteredData = false;
3471
+ }
3460
3472
  this.mainList = null;
3461
3473
  this.mainData = null;
3462
3474
  this.isFirstClick = false;