@syncfusion/ej2-dropdowns 20.4.43 → 20.4.49

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.
Files changed (78) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/ej2-dropdowns.min.js +2 -2
  3. package/dist/ej2-dropdowns.umd.min.js +2 -2
  4. package/dist/ej2-dropdowns.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-dropdowns.es2015.js +28 -10
  6. package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
  7. package/dist/es6/ej2-dropdowns.es5.js +28 -10
  8. package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
  9. package/dist/global/ej2-dropdowns.min.js +2 -2
  10. package/dist/global/ej2-dropdowns.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +11 -11
  13. package/src/drop-down-list/drop-down-list.js +1 -1
  14. package/src/drop-down-tree/drop-down-tree-model.d.ts +1 -1
  15. package/src/drop-down-tree/drop-down-tree.d.ts +2 -0
  16. package/src/drop-down-tree/drop-down-tree.js +21 -6
  17. package/src/list-box/list-box.js +3 -0
  18. package/src/mention/mention.js +3 -3
  19. package/styles/bootstrap-dark.css +5 -2
  20. package/styles/bootstrap.css +5 -2
  21. package/styles/bootstrap4.css +5 -2
  22. package/styles/bootstrap5-dark.css +5 -2
  23. package/styles/bootstrap5.css +5 -2
  24. package/styles/drop-down-list/_layout.scss +3 -0
  25. package/styles/drop-down-list/bootstrap-dark.css +3 -0
  26. package/styles/drop-down-list/bootstrap.css +3 -0
  27. package/styles/drop-down-list/bootstrap4.css +3 -0
  28. package/styles/drop-down-list/bootstrap5-dark.css +3 -0
  29. package/styles/drop-down-list/bootstrap5.css +3 -0
  30. package/styles/drop-down-list/fabric-dark.css +3 -0
  31. package/styles/drop-down-list/fabric.css +3 -0
  32. package/styles/drop-down-list/fluent-dark.css +3 -0
  33. package/styles/drop-down-list/fluent.css +3 -0
  34. package/styles/drop-down-list/highcontrast-light.css +3 -0
  35. package/styles/drop-down-list/highcontrast.css +3 -0
  36. package/styles/drop-down-list/material-dark.css +3 -0
  37. package/styles/drop-down-list/material.css +3 -0
  38. package/styles/drop-down-list/tailwind-dark.css +3 -0
  39. package/styles/drop-down-list/tailwind.css +3 -0
  40. package/styles/fabric-dark.css +5 -2
  41. package/styles/fabric.css +5 -2
  42. package/styles/fluent-dark.css +5 -2
  43. package/styles/fluent.css +5 -2
  44. package/styles/highcontrast-light.css +5 -2
  45. package/styles/highcontrast.css +5 -2
  46. package/styles/material-dark.css +4 -1
  47. package/styles/material.css +4 -1
  48. package/styles/multi-select/_bootstrap-dark-definition.scss +1 -0
  49. package/styles/multi-select/_bootstrap-definition.scss +1 -0
  50. package/styles/multi-select/_bootstrap4-definition.scss +1 -0
  51. package/styles/multi-select/_bootstrap5-definition.scss +1 -0
  52. package/styles/multi-select/_fabric-dark-definition.scss +1 -0
  53. package/styles/multi-select/_fabric-definition.scss +1 -0
  54. package/styles/multi-select/_fluent-definition.scss +1 -0
  55. package/styles/multi-select/_fusionnew-definition.scss +1 -0
  56. package/styles/multi-select/_highcontrast-definition.scss +1 -0
  57. package/styles/multi-select/_highcontrast-light-definition.scss +1 -0
  58. package/styles/multi-select/_layout.scss +2 -2
  59. package/styles/multi-select/_material-dark-definition.scss +1 -0
  60. package/styles/multi-select/_material-definition.scss +1 -0
  61. package/styles/multi-select/_tailwind-definition.scss +1 -0
  62. package/styles/multi-select/bootstrap-dark.css +2 -2
  63. package/styles/multi-select/bootstrap.css +2 -2
  64. package/styles/multi-select/bootstrap4.css +2 -2
  65. package/styles/multi-select/bootstrap5-dark.css +2 -2
  66. package/styles/multi-select/bootstrap5.css +2 -2
  67. package/styles/multi-select/fabric-dark.css +2 -2
  68. package/styles/multi-select/fabric.css +2 -2
  69. package/styles/multi-select/fluent-dark.css +2 -2
  70. package/styles/multi-select/fluent.css +2 -2
  71. package/styles/multi-select/highcontrast-light.css +2 -2
  72. package/styles/multi-select/highcontrast.css +2 -2
  73. package/styles/multi-select/material-dark.css +1 -1
  74. package/styles/multi-select/material.css +1 -1
  75. package/styles/multi-select/tailwind-dark.css +2 -2
  76. package/styles/multi-select/tailwind.css +2 -2
  77. package/styles/tailwind-dark.css +5 -2
  78. package/styles/tailwind.css +5 -2
@@ -2520,8 +2520,8 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2520
2520
  this.setScrollPosition(e);
2521
2521
  }
2522
2522
  if (Browser.info.name !== 'mozilla') {
2523
- attributes(this.targetElement(), { 'aria-label': this.inputElement.value });
2524
2523
  if (this.targetElement()) {
2524
+ attributes(this.targetElement(), { 'aria-label': this.inputElement.value });
2525
2525
  attributes(this.targetElement(), { 'aria-describedby': this.inputElement.id != '' ? this.inputElement.id : this.element.id });
2526
2526
  this.targetElement().removeAttribute('aria-live');
2527
2527
  }
@@ -4541,6 +4541,8 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
4541
4541
  _this.selectedData = [];
4542
4542
  _this.filterDelayTime = 300;
4543
4543
  _this.isClicked = false;
4544
+ // Specifies if the checkAll method has been called
4545
+ _this.isCheckAllCalled = false;
4544
4546
  return _this;
4545
4547
  }
4546
4548
  /**
@@ -5469,7 +5471,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
5469
5471
  if (isValid && this.value !== null && (this.value && this.value.length !== 0)) {
5470
5472
  addClass([this.inputEle], CHIP_INPUT);
5471
5473
  }
5472
- else if (this.value === null || (this.value && this.value.length === 0)) {
5474
+ else if (this.value === null || (this.value && this.value.length === 0) || this.chipWrapper) {
5473
5475
  addClass([this.chipWrapper], HIDEICON);
5474
5476
  }
5475
5477
  }
@@ -5524,6 +5526,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
5524
5526
  frameSpan.classList.add(CHECK);
5525
5527
  ariaState = 'true';
5526
5528
  if (!this.isReverseUpdate) {
5529
+ this.isCheckAllCalled = true;
5527
5530
  this.treeObj.checkAll();
5528
5531
  if (!this.changeOnBlur) {
5529
5532
  this.triggerChangeEvent(e);
@@ -5827,6 +5830,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
5827
5830
  nodeSelected: this.onNodeSelected.bind(this),
5828
5831
  nodeChecked: this.onNodeChecked.bind(this),
5829
5832
  nodeChecking: this.beforeCheck.bind(this),
5833
+ nodeExpanded: this.onNodeExpanded.bind(this),
5830
5834
  actionFailure: this.onActionFailure.bind(this),
5831
5835
  nodeClicked: this.onNodeClicked.bind(this),
5832
5836
  dataBound: this.OnDataBound.bind(this),
@@ -5934,7 +5938,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
5934
5938
  var height = Math.round(this.header.getBoundingClientRect().height);
5935
5939
  popupHeight = formatUnit(parseInt(popupHeight, 10) - height + 'px');
5936
5940
  }
5937
- if (this.showCheckBox && this.showSelectAll) {
5941
+ if (this.showCheckBox && this.showSelectAll && (!this.popupDiv.classList.contains(NODATA))) {
5938
5942
  var height = Math.round(this.checkAllParent.getBoundingClientRect().height);
5939
5943
  popupHeight = formatUnit(parseInt(popupHeight, 10) - height + 'px');
5940
5944
  }
@@ -6328,13 +6332,14 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
6328
6332
  var nodes = this.treeObj.element.querySelectorAll('li');
6329
6333
  var checkedNodes = this.treeObj.element.querySelectorAll('li .e-checkbox-wrapper[aria-checked=true]');
6330
6334
  var wrap = closest(this.checkBoxElement, '.' + CHECKBOXWRAP);
6331
- if (wrap && args.action === 'uncheck') {
6335
+ if (wrap && args.action === 'uncheck' && (args.isInteracted || checkedNodes.length === 0)) {
6332
6336
  this.isReverseUpdate = true;
6333
6337
  this.changeState(wrap, 'uncheck');
6334
6338
  this.isReverseUpdate = false;
6335
6339
  }
6336
- else if (wrap && args.action === 'check' && checkedNodes.length === nodes.length) {
6340
+ else if (wrap && args.action === 'check' && checkedNodes.length === nodes.length && this.isCheckAllCalled) {
6337
6341
  this.isReverseUpdate = true;
6342
+ this.isCheckAllCalled = false;
6338
6343
  this.changeState(wrap, 'check');
6339
6344
  this.isReverseUpdate = false;
6340
6345
  }
@@ -6345,6 +6350,13 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
6345
6350
  this.oldValue = this.value ? this.value.slice() : this.value;
6346
6351
  }
6347
6352
  };
6353
+ DropDownTree.prototype.onNodeExpanded = function (args) {
6354
+ if (this.hasTemplate && this.portals) {
6355
+ this.portals = [].concat(this.treeObj.portals);
6356
+ /* eslint-enable */
6357
+ this.renderReactTemplates();
6358
+ }
6359
+ };
6348
6360
  DropDownTree.prototype.updateClearButton = function (state) {
6349
6361
  if (state) {
6350
6362
  if (!this.inputWrapper.contains(this.overAllClear)) {
@@ -6846,6 +6858,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
6846
6858
  DropDownTree.prototype.selectAllItems = function (state) {
6847
6859
  if (this.showCheckBox) {
6848
6860
  if (state) {
6861
+ this.isCheckAllCalled = true;
6849
6862
  this.treeObj.checkAll();
6850
6863
  }
6851
6864
  else {
@@ -6940,8 +6953,6 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
6940
6953
  }
6941
6954
  else {
6942
6955
  this.noRecord = this.createElement('div');
6943
- addClass([this.noRecord], NODATACONTAINER);
6944
- prepend([this.noRecord], this.popupDiv);
6945
6956
  }
6946
6957
  if (this.noRecordsTemplate !== 'No Records Found' || this.actionFailureTemplate !== 'The Request Failed') {
6947
6958
  var template = actionFailure ? this.actionFailureTemplate : this.noRecordsTemplate;
@@ -6953,6 +6964,8 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
6953
6964
  if (tempArr) {
6954
6965
  tempArr = Array.prototype.slice.call(tempArr);
6955
6966
  append(tempArr, this.noRecord);
6967
+ addClass([this.noRecord], NODATACONTAINER);
6968
+ prepend([this.noRecord], this.popupDiv);
6956
6969
  }
6957
6970
  }
6958
6971
  else {
@@ -6961,6 +6974,8 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
6961
6974
  this.l10n = new L10n(this.getLocaleName(), l10nLocale, this.locale);
6962
6975
  this.noRecord.innerHTML = actionFailure ?
6963
6976
  this.l10n.getConstant('actionFailureTemplate') : this.l10n.getConstant('noRecordsTemplate');
6977
+ addClass([this.noRecord], NODATACONTAINER);
6978
+ prepend([this.noRecord], this.popupDiv);
6964
6979
  }
6965
6980
  };
6966
6981
  DropDownTree.prototype.updateRecordTemplate = function (action) {
@@ -15702,6 +15717,9 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
15702
15717
  else {
15703
15718
  text = value;
15704
15719
  }
15720
+ if (typeof (text) === 'string') {
15721
+ text = text.split("\\").join("\\\\");
15722
+ }
15705
15723
  li = _this.list.querySelector('[data-value="' + text + '"]');
15706
15724
  if (li) {
15707
15725
  if (_this.selectionSettings.showCheckbox) {
@@ -16317,7 +16335,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
16317
16335
  var isNavigation = (e.action === 'down' || e.action === 'up' || e.action === 'pageUp' || e.action === 'pageDown'
16318
16336
  || e.action === 'home' || e.action === 'end');
16319
16337
  var isTabAction = e.action === 'tab' || e.action === 'close';
16320
- if (this.list === undefined && !this.isRequested && !isTabAction && e.action !== 'escape') {
16338
+ if (this.list === undefined && !this.isRequested && !isTabAction && e.action !== 'escape' && e.action !== 'space') {
16321
16339
  this.renderList();
16322
16340
  }
16323
16341
  if (isNullOrUndefined(this.list) || (!isNullOrUndefined(this.liCollections) &&
@@ -16461,11 +16479,11 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
16461
16479
  }
16462
16480
  }
16463
16481
  else if (this.allowSpaces && this.queryString !== '' && currentRange && currentRange.trim() !== '' && currentRange.replace('\u00a0', ' ').lastIndexOf(' ') < currentRange.length - 1 &&
16464
- e.keyCode !== 38 && e.keyCode !== 40 && e.keyCode !== 8) {
16482
+ e.keyCode !== 38 && e.keyCode !== 40 && e.keyCode !== 8 && this.mentionChar.charCodeAt(0) === lastWordRange.charCodeAt(0)) {
16465
16483
  this.queryString = currentRange.substring(currentRange.lastIndexOf(this.mentionChar) + 1).replace('\u00a0', ' ');
16466
16484
  this.searchLists(e);
16467
16485
  }
16468
- else if (this.queryString === '' && this.isPopupOpen && e.keyCode !== 38 && e.keyCode !== 40) {
16486
+ else if (this.queryString === '' && this.isPopupOpen && e.keyCode !== 38 && e.keyCode !== 40 && this.mentionChar.charCodeAt(0) === lastWordRange.charCodeAt(0)) {
16469
16487
  this.searchLists(e);
16470
16488
  if (!this.isListResetted) {
16471
16489
  this.resetList(this.dataSource, this.fields);