@syncfusion/ej2-dropdowns 29.2.7 → 29.2.10

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 : 29.2.7
3
+ * version : 29.2.10
4
4
  * Copyright Syncfusion Inc. 2001 - 2024. 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,62 +1,22 @@
1
1
  {
2
- "_from": "@syncfusion/ej2-dropdowns@*",
3
- "_id": "@syncfusion/ej2-dropdowns@29.2.5",
4
- "_inBundle": false,
5
- "_integrity": "sha512-IsEFxa88R9vq0rxkXFKbcEvdOoqOm5ylg2VOqzviJxv1+1il6HugrjpFGDconadN+HnRhW6nC539m8dj1CeRbg==",
6
- "_location": "/@syncfusion/ej2-dropdowns",
7
- "_phantomChildren": {},
8
- "_requested": {
9
- "type": "range",
10
- "registry": true,
11
- "raw": "@syncfusion/ej2-dropdowns@*",
12
- "name": "@syncfusion/ej2-dropdowns",
13
- "escapedName": "@syncfusion%2fej2-dropdowns",
14
- "scope": "@syncfusion",
15
- "rawSpec": "*",
16
- "saveSpec": null,
17
- "fetchSpec": "*"
18
- },
19
- "_requiredBy": [
20
- "/",
21
- "/@syncfusion/ej2",
22
- "/@syncfusion/ej2-angular-dropdowns",
23
- "/@syncfusion/ej2-documenteditor",
24
- "/@syncfusion/ej2-gantt",
25
- "/@syncfusion/ej2-grids",
26
- "/@syncfusion/ej2-image-editor",
27
- "/@syncfusion/ej2-inplace-editor",
28
- "/@syncfusion/ej2-kanban",
29
- "/@syncfusion/ej2-pdfviewer",
30
- "/@syncfusion/ej2-pivotview",
31
- "/@syncfusion/ej2-querybuilder",
32
- "/@syncfusion/ej2-react-dropdowns",
33
- "/@syncfusion/ej2-ribbon",
34
- "/@syncfusion/ej2-richtexteditor",
35
- "/@syncfusion/ej2-schedule",
36
- "/@syncfusion/ej2-spreadsheet",
37
- "/@syncfusion/ej2-vue-dropdowns"
38
- ],
39
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-29.2.5.tgz",
40
- "_shasum": "73cddd41df6eda7061648a90dd58f5f6d5a95a03",
41
- "_spec": "@syncfusion/ej2-dropdowns@*",
42
- "_where": "/jenkins/workspace/elease-automation_release_29.1.1/packages/included",
43
- "author": {
44
- "name": "Syncfusion Inc."
45
- },
46
- "bundleDependencies": false,
2
+ "name": "@syncfusion/ej2-dropdowns",
3
+ "version": "29.2.10",
4
+ "description": "Essential JS 2 DropDown Components",
5
+ "author": "Syncfusion Inc.",
6
+ "license": "SEE LICENSE IN license",
7
+ "main": "./dist/ej2-dropdowns.umd.min.js",
8
+ "module": "./index.js",
9
+ "es2015": "./dist/es6/ej2-dropdowns.es5.js",
47
10
  "dependencies": {
48
11
  "@syncfusion/ej2-base": "~29.2.4",
49
12
  "@syncfusion/ej2-data": "~29.2.4",
50
13
  "@syncfusion/ej2-inputs": "~29.2.5",
51
14
  "@syncfusion/ej2-lists": "~29.2.4",
52
- "@syncfusion/ej2-navigations": "~29.2.7",
15
+ "@syncfusion/ej2-navigations": "~29.2.8",
53
16
  "@syncfusion/ej2-notifications": "~29.2.4",
54
- "@syncfusion/ej2-popups": "~29.2.7"
17
+ "@syncfusion/ej2-popups": "~29.2.8"
55
18
  },
56
- "deprecated": false,
57
- "description": "Essential JS 2 DropDown Components",
58
19
  "devDependencies": {},
59
- "es2015": "./dist/es6/ej2-dropdowns.es5.js",
60
20
  "keywords": [
61
21
  "ej2",
62
22
  "syncfusion",
@@ -71,12 +31,7 @@
71
31
  "ej2-multiselect",
72
32
  "ej2-combobox"
73
33
  ],
74
- "license": "SEE LICENSE IN license",
75
- "main": "./dist/ej2-dropdowns.umd.min.js",
76
- "module": "./index.js",
77
- "name": "@syncfusion/ej2-dropdowns",
78
34
  "typings": "index.d.ts",
79
- "version": "29.2.7",
80
35
  "sideEffects": false,
81
36
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
82
37
  }
@@ -500,7 +500,7 @@ var DropDownBase = /** @class */ (function (_super) {
500
500
  isContainSkeleton.firstChild.insertBefore(liElement, isContainSkeleton.firstChild.children[0]);
501
501
  }
502
502
  }
503
- if (this.getModuleName() === 'multiselect') {
503
+ if (this.getModuleName() === 'multiselect' && !this.isVirtualReorder && !isContainSkeleton.firstChild.classList.contains('e-reorder')) {
504
504
  for (var i = 0; i < totalSkeletonCount && this.totalItemCount !== this.viewPortInfo.endIndex; i++) {
505
505
  var liElement = this.createElement('li', { className: dropDownBaseClasses.virtualList + " e-virtual-list-end", styles: 'overflow: inherit' });
506
506
  if (this.isVirtualizationEnabled && this.itemTemplate) {
@@ -331,10 +331,10 @@ var DropDownList = /** @class */ (function (_super) {
331
331
  this.hiddenElement.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
332
332
  }
333
333
  else if (defaultAttr.indexOf(htmlAttr) > -1) {
334
- if (htmlAttr === 'placeholder') {
334
+ if (htmlAttr === 'placeholder' && this.element.getAttribute('placeholder') !== this.htmlAttributes["" + htmlAttr]) {
335
335
  Input.setPlaceholder(this.htmlAttributes["" + htmlAttr], this.inputElement);
336
336
  }
337
- else {
337
+ else if (htmlAttr !== 'placeholder') {
338
338
  this.inputElement.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
339
339
  }
340
340
  }
@@ -336,6 +336,7 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
336
336
  private isCheckAllCalled;
337
337
  private isFromFilterChange;
338
338
  private valueTemplateContainer;
339
+ private previousFilterText;
339
340
  /**
340
341
  * Specifies the template that renders to the popup list content of the
341
342
  * Dropdown Tree component when the data fetch request from the remote server fails.
@@ -498,6 +498,11 @@ var DropDownTree = /** @class */ (function (_super) {
498
498
  }
499
499
  }
500
500
  _this.treeObj.fields = _this.getTreeFields(fields);
501
+ if ((_this.previousFilterText && _this.previousFilterText !== '' && args.text !== '' && _this.previousFilterText.indexOf(args.text) !== -1) ||
502
+ (args.text && args.text !== '' && _this.previousFilterText !== '' && args.text.indexOf(_this.previousFilterText) !== -1)) {
503
+ _this.isFilterRestore = true;
504
+ }
505
+ _this.previousFilterText = args.text;
501
506
  _this.treeObj.dataBind();
502
507
  if (_this.popupObj) {
503
508
  _this.popupObj.refreshPosition();
@@ -310,8 +310,8 @@ var MultiSelect = /** @class */ (function (_super) {
310
310
  else {
311
311
  this.resetList(this.dataSource, this.fields, query);
312
312
  }
313
- this.isVirtualReorder = false;
314
313
  this.UpdateSkeleton();
314
+ this.isVirtualReorder = false;
315
315
  this.liCollections = this.list.querySelectorAll('.' + dropDownBaseClasses.li);
316
316
  this.virtualItemCount = this.itemCount;
317
317
  if (this.mode !== 'CheckBox') {
@@ -614,8 +614,9 @@ var MultiSelect = /** @class */ (function (_super) {
614
614
  if (!isNullOrUndefined(this.value)) {
615
615
  valuecheck = this.presentItemValue(this.ulElement);
616
616
  }
617
+ var isContainsValue = valuecheck.some(function (item) { return item !== null; });
617
618
  if (valuecheck.length > 0 && this.dataSource instanceof DataManager && !isNullOrUndefined(this.value)
618
- && this.listData != null && !(valuecheck.length === 1 && valuecheck[0] == null)) {
619
+ && this.listData != null && isContainsValue) {
619
620
  this.isaddNonPresentItems = true;
620
621
  this.addNonPresentItems(valuecheck, this.ulElement, this.listData);
621
622
  this.isaddNonPresentItems = false;
@@ -899,9 +900,9 @@ var MultiSelect = /** @class */ (function (_super) {
899
900
  return this.virtualFilterQuery(filterQuery);
900
901
  }
901
902
  if (this.virtualSelectAll) {
902
- return query ? query.take(this.maximumSelectionLength).requiresCount() : this.query ?
903
- this.query.take(this.maximumSelectionLength).requiresCount() :
904
- new Query().take(this.maximumSelectionLength).requiresCount();
903
+ return query ? query.skip(0).take(this.maximumSelectionLength).requiresCount() : this.query ?
904
+ this.query.skip(0).take(this.maximumSelectionLength).requiresCount() :
905
+ new Query().skip(0).take(this.maximumSelectionLength).requiresCount();
905
906
  }
906
907
  return filterQuery;
907
908
  }
@@ -5460,8 +5461,13 @@ var MultiSelect = /** @class */ (function (_super) {
5460
5461
  });
5461
5462
  };
5462
5463
  MultiSelect.prototype.updateVal = function (newProp, oldProp, prop) {
5464
+ var _this = this;
5463
5465
  if (!this.list) {
5464
5466
  this.onLoadSelect();
5467
+ if (this.enableVirtualization) {
5468
+ this.setProperties({ text: '' }, true);
5469
+ this.checkInitialValue();
5470
+ }
5465
5471
  }
5466
5472
  else if ((this.dataSource instanceof DataManager) && (!this.listData || !(this.mainList && this.mainData))) {
5467
5473
  this.onLoadSelect();
@@ -5471,8 +5477,9 @@ var MultiSelect = /** @class */ (function (_super) {
5471
5477
  if (!isNullOrUndefined(this.value) && !this.allowCustomValue) {
5472
5478
  valuecheck = this.presentItemValue(this.ulElement);
5473
5479
  }
5480
+ var isContainsValue = valuecheck.some(function (item) { return item !== null; });
5474
5481
  if (prop === 'value' && valuecheck.length > 0 && this.dataSource instanceof DataManager && !isNullOrUndefined(this.value)
5475
- && this.listData != null) {
5482
+ && this.listData != null && isContainsValue) {
5476
5483
  this.mainData = null;
5477
5484
  this.setDynValue = true;
5478
5485
  this.isaddNonPresentItems = true;
@@ -5500,10 +5507,41 @@ var MultiSelect = /** @class */ (function (_super) {
5500
5507
  this.initialValueUpdate(this.dataSource, true);
5501
5508
  }
5502
5509
  else if (!this.isInitRemoteVirtualData) {
5503
- this.isDynamicRemoteVirtualData = true;
5504
- this.initialValueUpdate(this.listData, true);
5505
- this.isDynamicRemoteVirtualData = false;
5506
- this.initialUpdate();
5510
+ if (this.allowObjectBinding && !isContainsValue && this.value && this.value.length) {
5511
+ var fields = !this.isPrimitiveData ? this.fields.value : '';
5512
+ var predicate = void 0;
5513
+ for (var i = 0; i < this.value.length; i++) {
5514
+ var value = this.allowObjectBinding ?
5515
+ getValue((this.fields.value) ? this.fields.value : '', this.value[i]) :
5516
+ this.value[i];
5517
+ if (i === 0) {
5518
+ predicate = new Predicate(fields, 'equal', value);
5519
+ }
5520
+ else {
5521
+ predicate = predicate.or(fields, 'equal', value);
5522
+ }
5523
+ }
5524
+ if (this.dataSource instanceof DataManager) {
5525
+ this.dataSource.executeQuery(new Query().where(predicate))
5526
+ .then(function (e) {
5527
+ if (e.result.length > 0) {
5528
+ var listItems_2 = e.result;
5529
+ _this.isDynamicRemoteVirtualData = true;
5530
+ setTimeout(function () {
5531
+ _this.initialValueUpdate(listItems_2, true);
5532
+ _this.isDynamicRemoteVirtualData = false;
5533
+ _this.initialUpdate();
5534
+ }, 100);
5535
+ }
5536
+ });
5537
+ }
5538
+ }
5539
+ else {
5540
+ this.isDynamicRemoteVirtualData = true;
5541
+ this.initialValueUpdate(this.listData, true);
5542
+ this.isDynamicRemoteVirtualData = false;
5543
+ this.initialUpdate();
5544
+ }
5507
5545
  }
5508
5546
  if (this.mode !== 'Box' && !this.inputFocus) {
5509
5547
  this.updateDelimView();
@@ -6102,7 +6140,7 @@ var MultiSelect = /** @class */ (function (_super) {
6102
6140
  }
6103
6141
  if (this.value && this.value.length) {
6104
6142
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6105
- var listItems_2;
6143
+ var listItems_3;
6106
6144
  if (this.enableVirtualization) {
6107
6145
  var fields = !this.isPrimitiveData ? this.fields.value : '';
6108
6146
  var predicate = void 0;
@@ -6121,11 +6159,11 @@ var MultiSelect = /** @class */ (function (_super) {
6121
6159
  this.dataSource.executeQuery(new Query().where(predicate))
6122
6160
  .then(function (e) {
6123
6161
  if (e.result.length > 0) {
6124
- listItems_2 = e.result;
6162
+ listItems_3 = e.result;
6125
6163
  _this.initStatus = false;
6126
6164
  _this.isInitRemoteVirtualData = true;
6127
6165
  setTimeout(function () {
6128
- _this.initialValueUpdate(listItems_2, true);
6166
+ _this.initialValueUpdate(listItems_3, true);
6129
6167
  _this.initialUpdate();
6130
6168
  _this.isInitRemoteVirtualData = false;
6131
6169
  }, 100);
@@ -6134,18 +6172,18 @@ var MultiSelect = /** @class */ (function (_super) {
6134
6172
  });
6135
6173
  }
6136
6174
  else {
6137
- listItems_2 = new DataManager(this.dataSource).executeLocal(new Query().where(predicate));
6175
+ listItems_3 = new DataManager(this.dataSource).executeLocal(new Query().where(predicate));
6138
6176
  }
6139
6177
  }
6140
6178
  if (!(this.dataSource instanceof DataManager)) {
6141
- this.initialValueUpdate(listItems_2, true);
6179
+ this.initialValueUpdate(listItems_3, true);
6142
6180
  this.initialUpdate();
6143
6181
  }
6144
6182
  else {
6145
6183
  this.setInitialValue = function () {
6146
6184
  _this.initStatus = false;
6147
6185
  if (!_this.enableVirtualization || (_this.enableVirtualization && (!(_this.dataSource instanceof DataManager)))) {
6148
- _this.initialValueUpdate(listItems_2);
6186
+ _this.initialValueUpdate(listItems_3);
6149
6187
  }
6150
6188
  _this.initialUpdate();
6151
6189
  _this.setInitialValue = null;