@syncfusion/ej2-dropdowns 30.2.6 → 31.1.18

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 : 30.2.6
3
+ * version : 31.1.18
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncfusion/ej2-dropdowns",
3
- "version": "30.2.6",
3
+ "version": "31.1.18",
4
4
  "description": "Essential JS 2 DropDown Components",
5
5
  "author": "Syncfusion Inc.",
6
6
  "license": "SEE LICENSE IN license",
@@ -8,13 +8,13 @@
8
8
  "module": "./index.js",
9
9
  "es2015": "./dist/es6/ej2-dropdowns.es5.js",
10
10
  "dependencies": {
11
- "@syncfusion/ej2-base": "~30.2.4",
12
- "@syncfusion/ej2-data": "~30.2.4",
13
- "@syncfusion/ej2-inputs": "~30.2.6",
14
- "@syncfusion/ej2-lists": "~30.2.4",
15
- "@syncfusion/ej2-navigations": "~30.2.5",
16
- "@syncfusion/ej2-notifications": "~30.2.4",
17
- "@syncfusion/ej2-popups": "~30.2.4"
11
+ "@syncfusion/ej2-base": "~31.1.17",
12
+ "@syncfusion/ej2-data": "~31.1.17",
13
+ "@syncfusion/ej2-inputs": "~31.1.17",
14
+ "@syncfusion/ej2-lists": "~31.1.17",
15
+ "@syncfusion/ej2-navigations": "~31.1.18",
16
+ "@syncfusion/ej2-notifications": "~31.1.17",
17
+ "@syncfusion/ej2-popups": "~31.1.17"
18
18
  },
19
19
  "devDependencies": {},
20
20
  "keywords": [
@@ -206,7 +206,7 @@ var ComboBox = /** @class */ (function (_super) {
206
206
  _this.itemData = e.result[0];
207
207
  var dataItem = _this.getItemData();
208
208
  var value = _this.allowObjectBinding ?
209
- _this.getDataByValue(dataItem.value) : dataItem.value;
209
+ _this.itemData : dataItem.value;
210
210
  var valueFieldValue = _this.allowObjectBinding &&
211
211
  !isNullOrUndefined(_this.value) ? getValue((_this.fields.value) ?
212
212
  _this.fields.value : '', _this.value) : _this.value;
@@ -261,7 +261,7 @@ var ComboBox = /** @class */ (function (_super) {
261
261
  this.customValue();
262
262
  }
263
263
  }
264
- else {
264
+ else if (!isNullOrUndefined(this.activeIndex) && !isNullOrUndefined(this.liCollections[this.activeIndex])) {
265
265
  this.setSelection(this.liCollections[this.activeIndex], null);
266
266
  }
267
267
  this.setHiddenValue();
@@ -544,11 +544,13 @@ var DropDownBase = /** @class */ (function (_super) {
544
544
  else {
545
545
  item = this.typeOfData(this.listData);
546
546
  }
547
- if (typeof getValue((this.fields.value ? this.fields.value : 'value'), item.item) === 'number' ||
547
+ if (!isNullOrUndefined(item.item) &&
548
+ typeof getValue((this.fields.value ? this.fields.value : 'value'), item.item) === 'number' ||
548
549
  item.typeof === 'number') {
549
550
  return parseFloat(value);
550
551
  }
551
- if (typeof getValue((this.fields.value ? this.fields.value : 'value'), item.item) === 'boolean' ||
552
+ if (!isNullOrUndefined(item.item) &&
553
+ typeof getValue((this.fields.value ? this.fields.value : 'value'), item.item) === 'boolean' ||
552
554
  item.typeof === 'boolean') {
553
555
  return ((value === 'true') || ('' + value === 'true'));
554
556
  }
@@ -1441,7 +1443,7 @@ var DropDownBase = /** @class */ (function (_super) {
1441
1443
  this.renderGroupTemplate(this.fixedHeaderElement);
1442
1444
  };
1443
1445
  DropDownBase.prototype.updateGroupFixedHeader = function (element, target) {
1444
- if (this.fixedHeaderElement) {
1446
+ if (this.fixedHeaderElement && this.list && this.list.parentElement) {
1445
1447
  if (!isNullOrUndefined(element.innerHTML)) {
1446
1448
  if (this.groupTemplate && this.isAngular && this.getModuleName() === 'multiselect') {
1447
1449
  this.updateFixedGroupTemplateHader(element);
@@ -2191,7 +2193,13 @@ var DropDownBase = /** @class */ (function (_super) {
2191
2193
  */
2192
2194
  DropDownBase.prototype.destroy = function () {
2193
2195
  if (document) {
2194
- EventHandler.remove(document, 'scroll', this.updateGroupFixedHeader);
2196
+ if (this.fields && this.fields.groupBy) {
2197
+ var elements = this.getScrollableParent();
2198
+ for (var i = 0; i < elements.length; i++) {
2199
+ var ele = elements[i];
2200
+ EventHandler.remove(ele, 'scroll', this.updateGroupFixedHeader);
2201
+ }
2202
+ }
2195
2203
  if (document.body.contains(this.list)) {
2196
2204
  EventHandler.remove(this.list, 'scroll', this.setFloatingHeader);
2197
2205
  if (!isNullOrUndefined(this.rippleFun)) {
@@ -30,6 +30,11 @@ export interface ChangeEventArgs extends SelectEventArgs {
30
30
  * Specifies the original event arguments.
31
31
  */
32
32
  event: MouseEvent | KeyboardEvent | TouchEvent;
33
+ /**
34
+ * Illustrates whether the current action needs to be prevented or not.
35
+
36
+ */
37
+ cancel?: boolean;
33
38
  }
34
39
  export interface GeneratedData {
35
40
  [key: string]: Object;
@@ -70,7 +75,6 @@ export declare class DropDownList extends DropDownBase implements IInput {
70
75
  private popupObj;
71
76
  private backIconElement;
72
77
  private clearIconElement;
73
- private containerStyle;
74
78
  protected previousValue: string | number | boolean | object;
75
79
  protected activeIndex: number;
76
80
  protected filterInput: HTMLInputElement;
@@ -710,6 +710,10 @@ var DropDownTree = /** @class */ (function (_super) {
710
710
  };
711
711
  /* Handles touch events specifically for iOS devices */
712
712
  DropDownTree.prototype.handleIosTouch = function (e) {
713
+ var target = e.target;
714
+ if (target && target.classList.contains('e-clear-icon')) {
715
+ return;
716
+ }
713
717
  e.preventDefault();
714
718
  this.dropDownClick(e);
715
719
  };
@@ -2494,12 +2498,16 @@ var DropDownTree = /** @class */ (function (_super) {
2494
2498
  if (!this.valueTemplate) {
2495
2499
  return null;
2496
2500
  }
2497
- if (this.valueTemplateContainer) {
2501
+ if (this.isReact && !isNOU(this.valueTemplateContainer)) {
2502
+ detach(this.valueTemplateContainer);
2503
+ this.valueTemplateContainer = null;
2504
+ }
2505
+ else if (this.valueTemplateContainer) {
2498
2506
  while (this.valueTemplateContainer.firstChild) {
2499
2507
  this.valueTemplateContainer.removeChild(this.valueTemplateContainer.firstChild);
2500
2508
  }
2501
2509
  }
2502
- else {
2510
+ if (isNOU(this.valueTemplateContainer)) {
2503
2511
  this.valueTemplateContainer = this.createElement('span', { className: OVERFLOW_VIEW + ' ' + SHOW_TEXT + ' ' + 'e-input-value' + ' ' + HIDEICON });
2504
2512
  }
2505
2513
  this.inputWrapper.insertBefore(this.valueTemplateContainer, this.inputEle);
@@ -1370,6 +1370,9 @@ var Mention = /** @class */ (function (_super) {
1370
1370
  if (Browser.isAndroid) {
1371
1371
  return '<span contenteditable="true" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : '&#8203;');
1372
1372
  }
1373
+ else if (Browser.info.name === 'mozilla') {
1374
+ return '<span>&#65279;<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>&#65279;</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : '&#8203;');
1375
+ }
1373
1376
  else {
1374
1377
  return '<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : '&#8203;');
1375
1378
  }