@syncfusion/ej2-dropdowns 29.1.33 → 29.1.38

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.1.33
3
+ * version : 29.1.38
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,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-dropdowns@*",
3
- "_id": "@syncfusion/ej2-dropdowns@18.66.23",
3
+ "_id": "@syncfusion/ej2-dropdowns@29.1.37",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-PhzWIEYWpvDKE3IeAiNkQhtz/PprlJ+ZUAuA1GSU9pHlnWgAry4iQ9zSNVhZbu/8/WHFllz8OjMYiiZiK8fH7A==",
5
+ "_integrity": "sha512-r3gn2gBwg1IhYpoXFJqLpove3dfsTVIrIiPGXdtx7BWWu4LbUXAzkSUJZalDk7/MRAHZjRkIjTTpgryniucNaw==",
6
6
  "_location": "/@syncfusion/ej2-dropdowns",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -36,8 +36,8 @@
36
36
  "/@syncfusion/ej2-spreadsheet",
37
37
  "/@syncfusion/ej2-vue-dropdowns"
38
38
  ],
39
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-release/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-18.66.23.tgz",
40
- "_shasum": "9f243a29fe4b55da70191ea81a97d6239f57ee6b",
39
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-29.1.37.tgz",
40
+ "_shasum": "c901533d29dddd25627db065fccdef5ff80af126",
41
41
  "_spec": "@syncfusion/ej2-dropdowns@*",
42
42
  "_where": "/jenkins/workspace/elease-automation_release_29.1.1/packages/included",
43
43
  "author": {
@@ -45,13 +45,13 @@
45
45
  },
46
46
  "bundleDependencies": false,
47
47
  "dependencies": {
48
- "@syncfusion/ej2-base": "~29.1.33",
48
+ "@syncfusion/ej2-base": "~29.1.36",
49
49
  "@syncfusion/ej2-data": "~29.1.33",
50
- "@syncfusion/ej2-inputs": "~29.1.33",
51
- "@syncfusion/ej2-lists": "~29.1.33",
52
- "@syncfusion/ej2-navigations": "~29.1.33",
50
+ "@syncfusion/ej2-inputs": "~29.1.38",
51
+ "@syncfusion/ej2-lists": "~29.1.34",
52
+ "@syncfusion/ej2-navigations": "~29.1.38",
53
53
  "@syncfusion/ej2-notifications": "~29.1.33",
54
- "@syncfusion/ej2-popups": "~29.1.33"
54
+ "@syncfusion/ej2-popups": "~29.1.37"
55
55
  },
56
56
  "deprecated": false,
57
57
  "description": "Essential JS 2 DropDown Components",
@@ -76,7 +76,7 @@
76
76
  "module": "./index.js",
77
77
  "name": "@syncfusion/ej2-dropdowns",
78
78
  "typings": "index.d.ts",
79
- "version": "29.1.33",
79
+ "version": "29.1.38",
80
80
  "sideEffects": false,
81
81
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
82
82
  }
@@ -99,7 +99,8 @@ var ComboBox = /** @class */ (function (_super) {
99
99
  ComboBox.prototype.onBlurHandler = function (e) {
100
100
  var inputValue = this.inputElement && this.inputElement.value === '' ?
101
101
  null : this.inputElement && this.inputElement.value;
102
- if (!isNullOrUndefined(this.listData) && !isNullOrUndefined(inputValue) && inputValue !== this.text) {
102
+ var text = !isNullOrUndefined(this.text) ? this.text.replace(/\r\n|\n|\r/g, '') : this.text;
103
+ if (!isNullOrUndefined(this.listData) && !isNullOrUndefined(inputValue) && inputValue !== text) {
103
104
  this.customValue(e);
104
105
  }
105
106
  _super.prototype.onBlurHandler.call(this, e);
@@ -224,6 +225,9 @@ var ComboBox = /** @class */ (function (_super) {
224
225
  if ((this.value === dataItem.value && this.text !== dataItem.text)
225
226
  || (this.value !== dataItem.value && this.text === dataItem.text)) {
226
227
  this.setProperties({ 'text': dataItem.text ? dataItem.text.toString() : dataItem.text, 'value': value });
228
+ if (isNullOrUndefined(li)) {
229
+ this.previousValue = this.value;
230
+ }
227
231
  }
228
232
  }
229
233
  }
@@ -905,8 +909,9 @@ var ComboBox = /** @class */ (function (_super) {
905
909
  this.removeFillSelection();
906
910
  }
907
911
  var dataItem = this.isSelectCustom ? { text: '' } : this.getItemData();
912
+ var text = !isNullOrUndefined(dataItem.text) ? dataItem.text.replace(/\r\n|\n|\r/g, '') : dataItem.text;
908
913
  var selected = !isNullOrUndefined(this.list) ? this.list.querySelector('.' + dropDownListClasses.selected) : null;
909
- if (this.inputElement && dataItem.text === this.inputElement.value && !isNullOrUndefined(selected)) {
914
+ if (this.inputElement && text === this.inputElement.value && !isNullOrUndefined(selected)) {
910
915
  if (this.isSelected) {
911
916
  this.onChangeEvent(e);
912
917
  this.isSelectCustom = false;
@@ -1132,12 +1132,9 @@ var DropDownBase = /** @class */ (function (_super) {
1132
1132
  if (this.sortOrder !== 'None') {
1133
1133
  dataSource = this.getSortedDataSource(dataSource);
1134
1134
  }
1135
- if (this.element.querySelector('optgroup') && this.isGroupChecking && this.getModuleName() === 'multiselect') {
1136
- dataSource = ListBase.groupDataSource(dataSource, fields, this.sortOrder);
1137
- }
1138
- else {
1139
- dataSource = ListBase.groupDataSource(dataSource, fields.properties, this.sortOrder);
1140
- }
1135
+ var fieldSet = fields.properties ||
1136
+ fields;
1137
+ dataSource = ListBase.groupDataSource(dataSource, fieldSet, this.sortOrder);
1141
1138
  }
1142
1139
  addClass([this.list], dropDownBaseClasses.grouping);
1143
1140
  }
@@ -1638,6 +1638,9 @@ var DropDownList = /** @class */ (function (_super) {
1638
1638
  if ((this.value === dataItem.value && this.text !== dataItem.text) ||
1639
1639
  (this.value !== dataItem.value && this.text === dataItem.text)) {
1640
1640
  this.setProperties({ 'text': dataItem.text ? dataItem.text.toString() : dataItem.text, 'value': value });
1641
+ if (isNullOrUndefined(li)) {
1642
+ this.previousValue = this.value;
1643
+ }
1641
1644
  }
1642
1645
  }
1643
1646
  }
@@ -1659,6 +1659,9 @@ var DropDownTree = /** @class */ (function (_super) {
1659
1659
  this.trigger('beforeOpen', args, function (args) {
1660
1660
  if (!args.cancel) {
1661
1661
  addClass([_this.inputWrapper], [ICONANIMATION]);
1662
+ if (_this.isReact && _this.isFilterRestore) {
1663
+ _this.treeObj.refresh();
1664
+ }
1662
1665
  if (_this.isFirstRender) {
1663
1666
  _this.popupEle = _this.createElement('div', {
1664
1667
  id: _this.element.id + '_options', className: POPUP_CLASS + ' ' + (_this.cssClass != null ? _this.cssClass : '')
@@ -1671,7 +1674,6 @@ var DropDownTree = /** @class */ (function (_super) {
1671
1674
  else {
1672
1675
  _this.popupEle = _this.popupObj.element;
1673
1676
  if (_this.isReact && _this.isFilterRestore) {
1674
- _this.treeObj.refresh();
1675
1677
  _this.isFilteredData = true;
1676
1678
  _this.popupEle.removeChild(_this.filterContainer);
1677
1679
  }
@@ -2235,8 +2235,14 @@ var ListBox = /** @class */ (function (_super) {
2235
2235
  text = value;
2236
2236
  }
2237
2237
  if (typeof (text) === 'string') {
2238
- text = text.split('\\').join('\\\\');
2239
- li = _this.list.querySelector('[data-value="' + text.replace(/"/g, '\\"') + '"]');
2238
+ if (text.indexOf('\n') !== -1) {
2239
+ var txt = CSS.escape(text);
2240
+ li = _this.list.querySelector('[data-value="' + txt + '"]');
2241
+ }
2242
+ else {
2243
+ text = text.split('\\').join('\\\\');
2244
+ li = _this.list.querySelector('[data-value="' + text.replace(/"/g, '\\"') + '"]');
2245
+ }
2240
2246
  }
2241
2247
  else {
2242
2248
  li = _this.list.querySelector('[data-value="' + text + '"]');
@@ -717,6 +717,7 @@ export declare class MultiSelect extends DropDownBase implements IInput {
717
717
  private checkForCustomValue;
718
718
  protected getNgDirective(): string;
719
719
  private wrapperClick;
720
+ private checkAndScrollParent;
720
721
  private enable;
721
722
  private scrollFocusStatus;
722
723
  private keyDownStatus;
@@ -682,7 +682,7 @@ var MultiSelect = /** @class */ (function (_super) {
682
682
  if (!this.enableVirtualization || (this.enableVirtualization && (!(this.dataSource instanceof DataManager)))) {
683
683
  this.initialValueUpdate();
684
684
  }
685
- else {
685
+ else if (!this.isRemoveSelection) {
686
686
  this.initialValueUpdate(this.listData, true);
687
687
  }
688
688
  this.initialUpdate();
@@ -812,11 +812,10 @@ var MultiSelect = /** @class */ (function (_super) {
812
812
  }
813
813
  if ((!this.enableVirtualization && ((searchCount === searchActiveCount || searchActiveCount === this.maximumSelectionLength)
814
814
  && (this.mode === 'CheckBox' && this.showSelectAll))) || (this.enableVirtualization && this.mode === 'CheckBox' &&
815
- this.showSelectAll && this.virtualSelectAll && this.value && this.value.length === this.totalItemCount)) {
815
+ this.showSelectAll && this.value && this.value.length === this.totalItemCount)) {
816
816
  this.notify('checkSelectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', value: 'check' });
817
817
  }
818
- else if ((searchCount !== searchActiveCount) && (this.mode === 'CheckBox' && this.showSelectAll) &&
819
- ((!this.enableVirtualization) || (this.enableVirtualization && !this.virtualSelectAll))) {
818
+ else if ((searchCount !== searchActiveCount) && (this.mode === 'CheckBox' && this.showSelectAll)) {
820
819
  this.notify('checkSelectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', value: 'uncheck' });
821
820
  }
822
821
  if (this.enableGroupCheckBox && this.fields.groupBy && !this.enableSelectionOrder) {
@@ -1233,6 +1232,17 @@ var MultiSelect = /** @class */ (function (_super) {
1233
1232
  if (!(this.targetElement() && this.targetElement() !== '')) {
1234
1233
  e.preventDefault();
1235
1234
  }
1235
+ this.checkAndScrollParent();
1236
+ };
1237
+ MultiSelect.prototype.checkAndScrollParent = function () {
1238
+ var parentElement = this.overAllWrapper ? this.overAllWrapper.parentElement : null;
1239
+ if (parentElement) {
1240
+ var wrapperHeight = parseFloat(getComputedStyle(this.overAllWrapper).height);
1241
+ var parentMaxHeight = parseFloat(getComputedStyle(parentElement).maxHeight);
1242
+ if (!isNaN(parentMaxHeight) && wrapperHeight > parentMaxHeight) {
1243
+ parentElement.scrollTop = parentElement.scrollHeight;
1244
+ }
1245
+ }
1236
1246
  };
1237
1247
  MultiSelect.prototype.enable = function (state) {
1238
1248
  if (state) {
@@ -3993,6 +4003,7 @@ var MultiSelect = /** @class */ (function (_super) {
3993
4003
  else {
3994
4004
  this.removeValue(value, e, length);
3995
4005
  }
4006
+ this.checkAndScrollParent();
3996
4007
  };
3997
4008
  MultiSelect.prototype.updateListSelectEventCallback = function (value, li, e, currentText) {
3998
4009
  var _this = this;
@@ -4574,7 +4585,8 @@ var MultiSelect = /** @class */ (function (_super) {
4574
4585
  this.updateWrapperText(this.viewWrapper, data);
4575
4586
  }
4576
4587
  wrapperleng = this.viewWrapper.offsetWidth +
4577
- parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10);
4588
+ parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10) +
4589
+ parseInt(window.getComputedStyle(this.viewWrapper).paddingLeft, 10);
4578
4590
  overAllContainer = this.componentWrapper.offsetWidth -
4579
4591
  parseInt(window.getComputedStyle(this.componentWrapper).paddingLeft, 10) -
4580
4592
  parseInt(window.getComputedStyle(this.componentWrapper).paddingRight, 10);
@@ -4586,14 +4598,16 @@ var MultiSelect = /** @class */ (function (_super) {
4586
4598
  this.updateWrapperText(this.viewWrapper, temp);
4587
4599
  remaining = this.value.length - index;
4588
4600
  wrapperleng = this.viewWrapper.offsetWidth +
4589
- parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10);
4601
+ parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10) +
4602
+ parseInt(window.getComputedStyle(this.viewWrapper).paddingLeft, 10);
4590
4603
  while (((wrapperleng + remainSize + downIconWidth + this.clearIconWidth) > overAllContainer) && wrapperleng !== 0
4591
4604
  && this.viewWrapper.innerHTML !== '') {
4592
4605
  var textArr = [];
4593
4606
  this.viewWrapper.innerHTML = textArr.join(this.delimiterChar);
4594
4607
  remaining = this.value.length;
4595
4608
  wrapperleng = this.viewWrapper.offsetWidth +
4596
- parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10);
4609
+ parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10) +
4610
+ parseInt(window.getComputedStyle(this.viewWrapper).paddingLeft, 10);
4597
4611
  }
4598
4612
  break;
4599
4613
  }
@@ -4623,13 +4637,13 @@ var MultiSelect = /** @class */ (function (_super) {
4623
4637
  };
4624
4638
  MultiSelect.prototype.checkClearIconWidth = function () {
4625
4639
  if (this.showClearButton) {
4626
- this.clearIconWidth = this.overAllClear.offsetWidth;
4640
+ this.clearIconWidth = parseInt(window.getComputedStyle(this.overAllClear).width, 10);
4627
4641
  }
4628
4642
  };
4629
4643
  MultiSelect.prototype.updateRemainWidth = function (viewWrapper, totalWidth) {
4630
4644
  if (viewWrapper.classList.contains(TOTAL_COUNT_WRAPPER) && totalWidth < (viewWrapper.offsetWidth +
4631
4645
  parseInt(window.getComputedStyle(viewWrapper).paddingLeft, 10)
4632
- + parseInt(window.getComputedStyle(viewWrapper).paddingLeft, 10))) {
4646
+ + parseInt(window.getComputedStyle(viewWrapper).paddingRight, 10))) {
4633
4647
  viewWrapper.style.width = totalWidth + 'px';
4634
4648
  }
4635
4649
  };
@@ -4889,6 +4903,7 @@ var MultiSelect = /** @class */ (function (_super) {
4889
4903
  li[index - 1].classList.remove('e-item-focus');
4890
4904
  }
4891
4905
  }
4906
+ _this.checkSelectAll();
4892
4907
  }, 0);
4893
4908
  }
4894
4909
  }
@@ -4915,6 +4930,7 @@ var MultiSelect = /** @class */ (function (_super) {
4915
4930
  });
4916
4931
  }
4917
4932
  }
4933
+ this.checkSelectAll();
4918
4934
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4919
4935
  var virtualTrackElement = this.list.getElementsByClassName('e-virtual-ddl')[0];
4920
4936
  if (virtualTrackElement) {