@syncfusion/ej2-dropdowns 31.2.16 → 31.2.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 : 31.2.16
3
+ * version : 31.2.18
4
4
  * Copyright Syncfusion Inc. 2001 - 2025. 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": "31.2.16",
3
+ "version": "31.2.18",
4
4
  "description": "Essential JS 2 DropDown Components",
5
5
  "author": "Syncfusion Inc.",
6
6
  "license": "SEE LICENSE IN license",
@@ -8,8 +8,8 @@
8
8
  "module": "./index.js",
9
9
  "es2015": "./dist/es6/ej2-dropdowns.es5.js",
10
10
  "dependencies": {
11
- "@syncfusion/ej2-base": "~31.2.12",
12
- "@syncfusion/ej2-data": "~31.2.16",
11
+ "@syncfusion/ej2-base": "~31.2.18",
12
+ "@syncfusion/ej2-data": "~31.2.18",
13
13
  "@syncfusion/ej2-inputs": "~31.2.15",
14
14
  "@syncfusion/ej2-lists": "~31.2.12",
15
15
  "@syncfusion/ej2-navigations": "~31.2.16",
@@ -2759,6 +2759,9 @@ var DropDownList = /** @class */ (function (_super) {
2759
2759
  EventHandler.add(_this.clearIconElement, 'click', _this.clearText, _this);
2760
2760
  }
2761
2761
  }
2762
+ if (_this.selectedLI && _this.fields.groupBy) {
2763
+ _this.setScrollPosition();
2764
+ }
2762
2765
  popupEle_1.style.visibility = 'visible';
2763
2766
  addClass([popupEle_1], 'e-popup-close');
2764
2767
  var scrollParentElements = _this.popupObj.getScrollableParent(_this.inputWrapper.container);
@@ -563,12 +563,38 @@ var ListBox = /** @class */ (function (_super) {
563
563
  this.stopTimer();
564
564
  var items = [];
565
565
  this.dragValue = this.getFormattedValue(args.droppedElement.getAttribute('data-value'));
566
- if (this.value.indexOf(this.dragValue) > -1) {
567
- args.items = this.getDataByValues(this.value);
566
+ if (this.allowDragAll) {
567
+ var selectedValues = [];
568
+ if (this.selectionSettings.showCheckbox && this.allowFiltering) {
569
+ var visibleSelected = [];
570
+ var selectedList = this.getSelectedItems();
571
+ for (var index = 0; index < selectedList.length; index++) {
572
+ var formattedValue = this.getFormattedValue(selectedList[index].getAttribute('data-value'));
573
+ visibleSelected.push(formattedValue);
574
+ }
575
+ selectedValues = visibleSelected.length ? visibleSelected
576
+ : ((this.value ? this.value.slice() : []));
577
+ }
578
+ else {
579
+ var selectedList = this.getSelectedItems();
580
+ for (var index = 0; index < selectedList.length; index++) {
581
+ var formattedValue = this.getFormattedValue(selectedList[index].getAttribute('data-value'));
582
+ selectedValues.push(formattedValue);
583
+ }
584
+ }
585
+ if (selectedValues.indexOf(this.dragValue) > -1) {
586
+ args.items = this.getDataByValues(selectedValues);
587
+ }
588
+ else {
589
+ args.items = this.getDataByValues([this.dragValue]);
590
+ }
568
591
  }
569
592
  else {
570
593
  args.items = this.getDataByValues([this.dragValue]);
571
594
  }
595
+ if (this.allowDragAll) {
596
+ this.customDraggedItem = args.items;
597
+ }
572
598
  extend(items, args.items);
573
599
  this.trigger('beforeDrop', args);
574
600
  if (JSON.stringify(args.items) !== JSON.stringify(items)) {
@@ -597,6 +623,9 @@ var ListBox = /** @class */ (function (_super) {
597
623
  if (Browser.isIos) {
598
624
  this.list.style.overflow = '';
599
625
  }
626
+ if (listObj && listObj !== this && !listObj.allowDragAndDrop) {
627
+ return;
628
+ }
600
629
  var targetListObj = this.getComponent(args.target);
601
630
  if (targetListObj && targetListObj.listData.length === 0) {
602
631
  var noRecElem = targetListObj.ulElement.childNodes[0];
@@ -353,6 +353,10 @@ var Mention = /** @class */ (function (_super) {
353
353
  this.isUpDownKey = false;
354
354
  return;
355
355
  }
356
+ if (!this.allowSpaces && e.code === 'Space' && this.beforePopupOpen && this.isPopupOpen) {
357
+ this.hidePopup();
358
+ return;
359
+ }
356
360
  this.isTyped = e.code !== 'Enter' && e.code !== 'Space' && e.code !== 'ArrowDown' && e.code !== 'ArrowUp' ? true : false;
357
361
  var isRteImage = document.activeElement.parentElement && document.activeElement.parentElement.querySelector('.e-rte-image') ? true : false;
358
362
  if (document.activeElement !== this.inputElement && !isRteImage) {
@@ -380,6 +384,9 @@ var Mention = /** @class */ (function (_super) {
380
384
  if (!this.requireLeadingSpace && lastWordRange && lastWordRange.includes(this.mentionChar)) {
381
385
  lastWordRange = this.mentionChar + lastWordRange.split(this.mentionChar).pop();
382
386
  }
387
+ if (lastWordRange.includes(' ')) {
388
+ return;
389
+ }
383
390
  }
384
391
  var lastTwoLetters = this.mentionChar.toString() + this.mentionChar.toString();
385
392
  // eslint-disable-next-line security/detect-non-literal-regexp
@@ -400,8 +407,7 @@ var Mention = /** @class */ (function (_super) {
400
407
  (rangetextContent.length === 1 || rangetextContent[rangetextContent.length - 2].indexOf('') === -1 ||
401
408
  this.range.startContainer.nodeType === 1))) {
402
409
  if (isValid && this.isPopupOpen && this.allowSpaces && currentRange && currentRange.trim() !== '' && charRegex.test(currentRange) && currentRange.indexOf(this.mentionChar) !== -1
403
- && !this.isMatchedText() && (currentRange.length > 1 && currentRange.replace(/\u00A0/g, ' ').charAt(currentRange.length - 2) !== ' ') &&
404
- (this.list && this.list.querySelectorAll('ul').length > 0) && e.code !== 'Enter') {
410
+ && !this.isMatchedText() && this.list && e.code !== 'ArrowDown' && e.code !== 'ArrowUp' && e.code !== 'Enter') {
405
411
  this.queryString = currentRange.substring(currentRange.lastIndexOf(this.mentionChar) + 1).replace('\u00a0', ' ');
406
412
  this.searchLists(e);
407
413
  }
@@ -677,7 +683,7 @@ var Mention = /** @class */ (function (_super) {
677
683
  return '';
678
684
  }
679
685
  var textValue = text.indexOf('\u200B') > -1 ? text.replace(/\u200B/g, '').replace(/\u00A0/g, ' ') : text.replace(/\u00A0/g, ' ');
680
- var words = textValue.split(/\s+/);
686
+ var words = this.allowSpaces && this.isPopupOpen ? [textValue] : textValue.split(/\s+/);
681
687
  var wordCnt = words.length - 1;
682
688
  return words[wordCnt].trim();
683
689
  };
@@ -1369,15 +1375,18 @@ var Mention = /** @class */ (function (_super) {
1369
1375
  if (!isNullOrUndefined(this.displayTemplate) && !isNullOrUndefined(this.displayTempElement)) {
1370
1376
  value = this.displayTempElement.innerHTML;
1371
1377
  }
1378
+ var rteRoot = this.inputElement.parentElement ? this.inputElement.parentElement.closest('.e-richtexteditor') : null;
1372
1379
  if (this.isContentEditable(this.inputElement)) {
1380
+ var suffix = typeof this.suffixText === 'string' ? this.suffixText : (rteRoot ? '&#8203;' : ' ');
1381
+ var chipContent = showChar + value;
1373
1382
  if (Browser.isAndroid) {
1374
- return '<span contenteditable="true" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : '&#8203;');
1383
+ return "<span contenteditable=\"true\" class=\"e-mention-chip\">" + chipContent + "</span>" + suffix;
1375
1384
  }
1376
1385
  else if (Browser.info.name === 'mozilla') {
1377
- return '<span>&#65279;<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>&#65279;</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : '&#8203;');
1386
+ return "<span>&#65279;<span contenteditable=\"false\" class=\"e-mention-chip\">" + chipContent + "</span>&#65279;</span>" + suffix;
1378
1387
  }
1379
1388
  else {
1380
- return '<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : '&#8203;');
1389
+ return "<span contenteditable=\"false\" class=\"e-mention-chip\">" + chipContent + "</span>" + suffix;
1381
1390
  }
1382
1391
  }
1383
1392
  else {
package/aceconfig.js DELETED
@@ -1,17 +0,0 @@
1
- //Config file for Accessibility-Checker
2
- module.exports = {
3
- ruleArchive: "18March2024",
4
- policies: ["WCAG_2_1","IBM_Accessibility"],
5
- failLevels: ["violation", "potentialviolation"],
6
- reportLevels: [
7
- "violation",
8
- "potentialviolation",
9
- "recommendation",
10
- "potentialrecommendation",
11
- "manual",
12
- "pass",
13
- ],
14
- outputFormat: ["html","json"],
15
- label: [process.env.TRAVIS_BRANCH],
16
- outputFolder:"accessibility-reports",
17
- };