@syncfusion/ej2-dropdowns 20.2.39 → 20.2.40

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.39
3
+ * version : 20.2.40
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@20.2.38",
3
+ "_id": "@syncfusion/ej2-dropdowns@20.2.39",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-esARP7N6ozJ55pHM3IbwOPxXLAUr4JQJ1F41XQ28cikHPb6zwS+zxbQQpRMDLAsGyxjdOKKdQnp9IV14f6vNEA==",
5
+ "_integrity": "sha512-PoCt2o2HN19B0msREq8czIzWbMVqo8swH4cqk4Vc54NQcYMuiIzYum8cZwzY20GOQvx8oR6ObeGXcp/rmAObuA==",
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": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-20.2.38.tgz",
37
- "_shasum": "a070ae0bc672b289eb8090a0168168e9fd45decf",
36
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-20.2.39.tgz",
37
+ "_shasum": "6cde197c74db9e63e4af98dbd2ca48359b3ada05",
38
38
  "_spec": "@syncfusion/ej2-dropdowns@*",
39
39
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
40
40
  "author": {
@@ -42,12 +42,12 @@
42
42
  },
43
43
  "bundleDependencies": false,
44
44
  "dependencies": {
45
- "@syncfusion/ej2-base": "~20.2.38",
45
+ "@syncfusion/ej2-base": "~20.2.39",
46
46
  "@syncfusion/ej2-data": "~20.2.38",
47
47
  "@syncfusion/ej2-inputs": "~20.2.38",
48
48
  "@syncfusion/ej2-lists": "~20.2.39",
49
49
  "@syncfusion/ej2-navigations": "~20.2.39",
50
- "@syncfusion/ej2-popups": "~20.2.39"
50
+ "@syncfusion/ej2-popups": "~20.2.40"
51
51
  },
52
52
  "deprecated": false,
53
53
  "description": "Essential JS 2 DropDown Components",
@@ -72,6 +72,6 @@
72
72
  "module": "./index.js",
73
73
  "name": "@syncfusion/ej2-dropdowns",
74
74
  "typings": "index.d.ts",
75
- "version": "20.2.39",
75
+ "version": "20.2.40",
76
76
  "sideEffects": false
77
77
  }
@@ -1522,6 +1522,27 @@ var DropDownList = /** @class */ (function (_super) {
1522
1522
  }
1523
1523
  this.initial = false;
1524
1524
  }
1525
+ else if (this.getModuleName() === 'autocomplete' && this.value && this.typedString === '' && !(this.dataSource instanceof DataManager)) {
1526
+ var checkFields_1 = this.typeOfData(this.dataSource).typeof === 'string' ? '' : this.fields.value;
1527
+ var checkValue = list.some(function (x) { return x[checkFields_1] === _this.value; });
1528
+ var query = new Query();
1529
+ if (!checkValue) {
1530
+ new DataManager(this.dataSource).executeQuery(query.where(new Predicate(checkFields_1, 'equal', this.value)))
1531
+ .then(function (e) {
1532
+ if (e.result.length > 0) {
1533
+ _this.value = checkFields_1 !== '' ? e.result[0][_this.fields.value].toString() : e.result[0].toString();
1534
+ _this.addItem(e.result, list.length);
1535
+ _this.updateValues();
1536
+ }
1537
+ else {
1538
+ _this.updateValues();
1539
+ }
1540
+ });
1541
+ }
1542
+ else {
1543
+ this.updateValues();
1544
+ }
1545
+ }
1525
1546
  if (this.getModuleName() !== 'autocomplete' && this.isFiltering() && !this.isTyped) {
1526
1547
  if (!this.actionCompleteData.isUpdated || ((!this.isCustomFilter
1527
1548
  && !this.isFilterFocus) || (isNullOrUndefined(this.itemData) && this.allowFiltering)
@@ -1803,7 +1803,8 @@ var DropDownTree = /** @class */ (function (_super) {
1803
1803
  }
1804
1804
  return 2;
1805
1805
  }
1806
- this.fields.dataSource = isNOU(this.fields.dataSource) ? [] : this.fields.dataSource;
1806
+ if (isNOU(this.fields.dataSource))
1807
+ this.fields.dataSource = [];
1807
1808
  for (var i = 0, len = this.fields.dataSource.length; i < len; i++) {
1808
1809
  if ((typeof field.child === 'string') && !isNOU(getValue(field.child, this.fields.dataSource[i]))) {
1809
1810
  return 2;
@@ -320,7 +320,7 @@ export declare class ListBox extends DropDownBase {
320
320
  private initDraggable;
321
321
  protected updateActionCompleteData(li: HTMLElement, item: {
322
322
  [key: string]: Object;
323
- }, index: number): void;
323
+ }): void;
324
324
  private initToolbar;
325
325
  private createButtons;
326
326
  protected validationAttribute(input: HTMLInputElement, hiddenSelect: HTMLSelectElement): void;
@@ -210,8 +210,8 @@ var ListBox = /** @class */ (function (_super) {
210
210
  });
211
211
  }
212
212
  };
213
- ListBox.prototype.updateActionCompleteData = function (li, item, index) {
214
- this.jsonData.splice(index, 0, item);
213
+ ListBox.prototype.updateActionCompleteData = function (li, item) {
214
+ this.jsonData.push(item);
215
215
  };
216
216
  ListBox.prototype.initToolbar = function () {
217
217
  var pos = this.toolbarSettings.position;
@@ -756,7 +756,7 @@ var ListBox = /** @class */ (function (_super) {
756
756
  var objValue = void 0;
757
757
  var dupData = [];
758
758
  var itemIdx = void 0;
759
- extend(dupData, [], this.jsonData);
759
+ extend(dupData, [], this.listData);
760
760
  var removeIdxes = [];
761
761
  var removeLiIdxes = [];
762
762
  for (var j = 0; j < items.length; j++) {
@@ -1545,7 +1545,19 @@ var ListBox = /** @class */ (function (_super) {
1545
1545
  .filter(function (data) { return data.isHeader !== true; });
1546
1546
  tListBox.listData = listData;
1547
1547
  tListBox.jsonData = jsonData;
1548
- fListBox.listData = fListBox.sortedData = fListBox.jsonData = [];
1548
+ if (this.listData.length == this.jsonData.length) {
1549
+ fListBox.listData = fListBox.sortedData = fListBox.jsonData = [];
1550
+ }
1551
+ else if (this.allowFiltering) {
1552
+ for (var i = 0; i < fListBox.listData.length; i++) {
1553
+ for (var j = 0; j < fListBox.jsonData.length; j++) {
1554
+ if (fListBox.listData[i] === fListBox.jsonData[j]) {
1555
+ fListBox.jsonData.splice(j, 1);
1556
+ }
1557
+ }
1558
+ }
1559
+ fListBox.listData = fListBox.sortedData = [];
1560
+ }
1549
1561
  if (isRefresh) {
1550
1562
  var sourceElem = tListBox.renderItems(listData, tListBox.fields);
1551
1563
  tListBox.updateListItems(sourceElem, tListBox.ulElement);
@@ -2472,7 +2472,7 @@ var MultiSelect = /** @class */ (function (_super) {
2472
2472
  }
2473
2473
  };
2474
2474
  MultiSelect.prototype.updateDataList = function () {
2475
- if (this.mainList && this.ulElement && !(this.isFiltered || this.filterAction)) {
2475
+ if (this.mainList && this.ulElement && !(this.isFiltered || this.filterAction || this.targetElement().trim())) {
2476
2476
  var isDynamicGroupItemUpdate = this.mainList.childElementCount < this.ulElement.childElementCount;
2477
2477
  var isReactTemplateUpdate = ((this.ulElement.childElementCount > 0 && this.ulElement.children[0].childElementCount > 0) && (this.mainList.children[0].childElementCount < this.ulElement.children[0].childElementCount));
2478
2478
  var isAngularTemplateUpdate = this.itemTemplate && this.ulElement.childElementCount > 0 && !(this.ulElement.childElementCount < this.mainList.childElementCount) && (this.ulElement.children[0].childElementCount > 0 || (this.fields.groupBy && this.ulElement.children[1] && this.ulElement.children[1].childElementCount > 0));