@syncfusion/ej2-dropdowns 22.1.39 → 22.2.8

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.
@@ -3210,7 +3210,6 @@ let DropDownList = class DropDownList extends DropDownBase {
3210
3210
  this.getFocusElement();
3211
3211
  this.createPopup(popupEle, offsetValue, left);
3212
3212
  this.checkCollision(popupEle);
3213
- const popupLeft = this.enableRtl ? parseFloat(popupEle.style.left) - (this.ulElement.parentElement.offsetWidth - this.inputWrapper.container.offsetWidth) : 0;
3214
3213
  if (Browser.isDevice) {
3215
3214
  this.popupObj.element.classList.add(dropDownListClasses.device);
3216
3215
  if (this.getModuleName() === 'dropdownlist' || (this.getModuleName() === 'combobox'
@@ -3263,9 +3262,6 @@ let DropDownList = class DropDownList extends DropDownBase {
3263
3262
  this.beforePopupOpen = false;
3264
3263
  this.destroyPopup();
3265
3264
  }
3266
- if (this.enableRtl && popupLeft > 0) {
3267
- popupEle.style.left = popupLeft + "px";
3268
- }
3269
3265
  });
3270
3266
  }
3271
3267
  else {
@@ -3292,7 +3288,8 @@ let DropDownList = class DropDownList extends DropDownBase {
3292
3288
  this.popupObj = new Popup(element, {
3293
3289
  width: this.setWidth(), targetType: 'relative',
3294
3290
  relateTo: this.inputWrapper.container, collision: { X: 'flip', Y: 'flip' }, offsetY: offsetValue,
3295
- enableRtl: this.enableRtl, offsetX: left, position: { X: 'left', Y: 'bottom' },
3291
+ enableRtl: this.enableRtl, offsetX: left,
3292
+ position: this.enableRtl ? { X: 'right', Y: 'bottom' } : { X: 'left', Y: 'bottom' },
3296
3293
  zIndex: this.zIndex,
3297
3294
  close: () => {
3298
3295
  if (!this.isDocumentClick) {
@@ -3559,6 +3556,9 @@ let DropDownList = class DropDownList extends DropDownBase {
3559
3556
  }
3560
3557
  }
3561
3558
  });
3559
+ if (this.isReact && this.isFiltering() && this.itemTemplate != null) {
3560
+ this.actionCompleteData.ulElement = this.ulElement.cloneNode(true);
3561
+ }
3562
3562
  }
3563
3563
  destroyPopup() {
3564
3564
  this.isPopupOpen = false;
@@ -5304,7 +5304,7 @@ let DropDownTree = class DropDownTree extends Component {
5304
5304
  data += temp;
5305
5305
  temp = this.overFlowWrapper.innerHTML;
5306
5306
  if (this.enableHtmlSanitizer) {
5307
- this.overFlowWrapper.innerText = data;
5307
+ this.overFlowWrapper.innerText = SanitizeHtmlHelper.sanitize(data);
5308
5308
  }
5309
5309
  else {
5310
5310
  this.overFlowWrapper.innerHTML = data;
@@ -6025,7 +6025,7 @@ let DropDownTree = class DropDownTree extends Component {
6025
6025
  const isFooter = closest(target, '.' + FOOTER);
6026
6026
  const isScroller = target.classList.contains(DROPDOWN) ? true :
6027
6027
  (matches(target, '.e-ddt .e-popup') || matches(target, '.e-ddt .e-treeview'));
6028
- if ((this.isPopupOpen && (this.inputWrapper.contains(target) || isTree || isScroller || isHeader || isFooter)) ||
6028
+ if ((this.isPopupOpen && ((!isNullOrUndefined(this.inputWrapper) && this.inputWrapper.contains(target)) || isTree || isScroller || isHeader || isFooter)) ||
6029
6029
  ((this.allowMultiSelection || this.showCheckBox) && (this.isPopupOpen && target.classList.contains(CHIP_CLOSE) ||
6030
6030
  (this.isPopupOpen && (target.classList.contains(CHECKALLPARENT) || target.classList.contains(ALLTEXT)
6031
6031
  || target.classList.contains(CHECKBOXFRAME)))))) {
@@ -6663,7 +6663,7 @@ let DropDownTree = class DropDownTree extends Component {
6663
6663
  const chipContent = this.createElement('span', { className: CHIP_CONTENT });
6664
6664
  const chipClose = this.createElement('span', { className: CHIP_CLOSE + ' ' + ICONS });
6665
6665
  if (this.enableHtmlSanitizer) {
6666
- chipContent.innerText = text;
6666
+ chipContent.innerText = SanitizeHtmlHelper.sanitize(text);
6667
6667
  }
6668
6668
  else {
6669
6669
  chipContent.innerHTML = text;
@@ -7320,10 +7320,34 @@ let DropDownTree = class DropDownTree extends Component {
7320
7320
  Input.setValue(null, this.inputEle, this.floatLabelType);
7321
7321
  detach(this.inputWrapper);
7322
7322
  detach(this.popupDiv);
7323
+ detach(this.hiddenElement);
7323
7324
  this.element.classList.remove('e-input');
7324
7325
  if (this.showCheckBox || this.allowMultiSelection) {
7325
7326
  this.element.classList.remove(CHIP_INPUT);
7326
7327
  }
7328
+ this.inputObj = null;
7329
+ while (this.hiddenElement.options.length > 0) {
7330
+ this.hiddenElement.remove(0);
7331
+ }
7332
+ this.hiddenElement.innerHTML = '';
7333
+ this.hiddenElement = null;
7334
+ this.inputWrapper = null;
7335
+ this.popupDiv = null;
7336
+ this.tree = null;
7337
+ this.popupObj = null;
7338
+ this.treeObj = null;
7339
+ this.overAllClear = null;
7340
+ this.chipWrapper = null;
7341
+ this.chipCollection = null;
7342
+ this.checkAllParent = null;
7343
+ this.selectAllSpan = null;
7344
+ this.checkBoxElement = null;
7345
+ this.checkWrapper = null;
7346
+ this.popupEle = null;
7347
+ this.header = null;
7348
+ this.footer = null;
7349
+ this.overFlowWrapper = null;
7350
+ this.keyboardModule = null;
7327
7351
  super.destroy();
7328
7352
  }
7329
7353
  destroyFilter() {
@@ -9219,9 +9243,6 @@ let MultiSelect = class MultiSelect extends DropDownBase {
9219
9243
  if (this.isFirstClick) {
9220
9244
  this.loadTemplate();
9221
9245
  }
9222
- if (this.enableRtl) {
9223
- this.popupWrapper.style.visibility = 'hidden';
9224
- }
9225
9246
  }
9226
9247
  });
9227
9248
  }
@@ -11069,7 +11090,8 @@ let MultiSelect = class MultiSelect extends DropDownBase {
11069
11090
  this.list.style.maxHeight = formatUnit(this.popupHeight);
11070
11091
  }
11071
11092
  this.popupObj = new Popup(this.popupWrapper, {
11072
- width: this.calcPopupWidth(), targetType: 'relative', position: { X: 'left', Y: 'bottom' },
11093
+ width: this.calcPopupWidth(), targetType: 'relative',
11094
+ position: this.enableRtl ? { X: 'right', Y: 'bottom' } : { X: 'left', Y: 'bottom' },
11073
11095
  relateTo: this.overAllWrapper, collision: { X: 'flip', Y: 'flip' }, offsetY: 1,
11074
11096
  enableRtl: this.enableRtl, zIndex: this.zIndex,
11075
11097
  close: () => {
@@ -11085,11 +11107,6 @@ let MultiSelect = class MultiSelect extends DropDownBase {
11085
11107
  },
11086
11108
  open: () => {
11087
11109
  this.popupObj.resolveCollision();
11088
- if (this.enableRtl) {
11089
- const popupLeft = parseFloat(this.popupWrapper.style.left) - (this.popupWrapper.offsetWidth - this.overAllWrapper.offsetWidth);
11090
- this.popupWrapper.style.left = popupLeft > 0 ? popupLeft + "px" : this.popupWrapper.style.left;
11091
- this.popupWrapper.style.visibility = 'hidden';
11092
- }
11093
11110
  if (!this.isFirstClick) {
11094
11111
  const ulElement = this.list.querySelector('ul');
11095
11112
  if (ulElement) {