@syncfusion/ej2-dropdowns 20.3.60 → 20.4.40

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 (54) hide show
  1. package/.eslintrc.json +16 -1
  2. package/CHANGELOG.md +12 -31
  3. package/dist/ej2-dropdowns.min.js +2 -2
  4. package/dist/ej2-dropdowns.umd.min.js +2 -2
  5. package/dist/ej2-dropdowns.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-dropdowns.es2015.js +500 -314
  7. package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
  8. package/dist/es6/ej2-dropdowns.es5.js +485 -299
  9. package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
  10. package/dist/global/ej2-dropdowns.min.js +2 -2
  11. package/dist/global/ej2-dropdowns.min.js.map +1 -1
  12. package/dist/global/index.d.ts +1 -1
  13. package/package.json +13 -12
  14. package/src/auto-complete/auto-complete-model.d.ts +1 -1
  15. package/src/combo-box/combo-box.js +7 -5
  16. package/src/drop-down-base/drop-down-base-model.d.ts +0 -18
  17. package/src/drop-down-base/drop-down-base.d.ts +0 -22
  18. package/src/drop-down-base/drop-down-base.js +42 -37
  19. package/src/drop-down-list/drop-down-list-model.d.ts +18 -0
  20. package/src/drop-down-list/drop-down-list.d.ts +22 -0
  21. package/src/drop-down-list/drop-down-list.js +95 -41
  22. package/src/drop-down-tree/drop-down-tree-model.d.ts +15 -1
  23. package/src/drop-down-tree/drop-down-tree.d.ts +13 -1
  24. package/src/drop-down-tree/drop-down-tree.js +25 -5
  25. package/src/list-box/list-box-model.d.ts +18 -0
  26. package/src/list-box/list-box.d.ts +22 -0
  27. package/src/list-box/list-box.js +38 -17
  28. package/src/mention/mention-model.d.ts +2 -2
  29. package/src/mention/mention.d.ts +4 -1
  30. package/src/mention/mention.js +66 -27
  31. package/src/multi-select/checkbox-selection.js +10 -8
  32. package/src/multi-select/multi-select.js +203 -156
  33. package/styles/bootstrap5-dark.css +2 -2
  34. package/styles/bootstrap5.css +2 -2
  35. package/styles/drop-down-base/_bootstrap-dark-definition.scss +1 -0
  36. package/styles/drop-down-base/_bootstrap-definition.scss +1 -0
  37. package/styles/drop-down-base/_bootstrap4-definition.scss +1 -0
  38. package/styles/drop-down-base/_bootstrap5-definition.scss +1 -0
  39. package/styles/drop-down-base/_fabric-dark-definition.scss +1 -0
  40. package/styles/drop-down-base/_fabric-definition.scss +1 -0
  41. package/styles/drop-down-base/_fluent-definition.scss +1 -0
  42. package/styles/drop-down-base/_fusionnew-definition.scss +1 -0
  43. package/styles/drop-down-base/_highcontrast-definition.scss +1 -0
  44. package/styles/drop-down-base/_highcontrast-light-definition.scss +1 -0
  45. package/styles/drop-down-base/_layout.scss +1 -1
  46. package/styles/drop-down-base/_material-dark-definition.scss +1 -0
  47. package/styles/drop-down-base/_material-definition.scss +1 -0
  48. package/styles/drop-down-base/_material3-definition.scss +1 -0
  49. package/styles/drop-down-base/_tailwind-definition.scss +1 -0
  50. package/styles/drop-down-base/material-dark.css +1 -1
  51. package/styles/drop-down-tree/_layout.scss +3 -3
  52. package/styles/drop-down-tree/bootstrap5-dark.css +2 -2
  53. package/styles/drop-down-tree/bootstrap5.css +2 -2
  54. package/styles/material-dark.css +1 -1
@@ -215,8 +215,12 @@ var DropDownList = /** @class */ (function (_super) {
215
215
  this.resetFocusElement();
216
216
  }
217
217
  }
218
- this.hiddenElement.innerHTML = '';
219
- this.inputElement.value = '';
218
+ if (!isNullOrUndefined(this.hiddenElement)) {
219
+ this.hiddenElement.innerHTML = '';
220
+ }
221
+ if (!isNullOrUndefined(this.inputElement)) {
222
+ this.inputElement.value = '';
223
+ }
220
224
  this.value = null;
221
225
  this.itemData = null;
222
226
  this.text = null;
@@ -239,21 +243,21 @@ var DropDownList = /** @class */ (function (_super) {
239
243
  for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
240
244
  var htmlAttr = _a[_i];
241
245
  if (htmlAttr === 'class') {
242
- var updatedClassValue = (this.htmlAttributes[htmlAttr].replace(/\s+/g, ' ')).trim();
246
+ var updatedClassValue = (this.htmlAttributes["" + htmlAttr].replace(/\s+/g, ' ')).trim();
243
247
  if (updatedClassValue !== '') {
244
248
  addClass([this.inputWrapper.container], updatedClassValue.split(' '));
245
249
  }
246
250
  }
247
- else if (htmlAttr === 'disabled' && this.htmlAttributes[htmlAttr] === 'disabled') {
251
+ else if (htmlAttr === 'disabled' && this.htmlAttributes["" + htmlAttr] === 'disabled') {
248
252
  this.enabled = false;
249
253
  this.setEnable();
250
254
  }
251
- else if (htmlAttr === 'readonly' && !isNullOrUndefined(this.htmlAttributes[htmlAttr])) {
255
+ else if (htmlAttr === 'readonly' && !isNullOrUndefined(this.htmlAttributes["" + htmlAttr])) {
252
256
  this.readonly = true;
253
257
  this.dataBind();
254
258
  }
255
259
  else if (htmlAttr === 'style') {
256
- this.inputWrapper.container.setAttribute('style', this.htmlAttributes[htmlAttr]);
260
+ this.inputWrapper.container.setAttribute('style', this.htmlAttributes["" + htmlAttr]);
257
261
  }
258
262
  else {
259
263
  var defaultAttr = ['title', 'id', 'placeholder',
@@ -263,18 +267,18 @@ var DropDownList = /** @class */ (function (_super) {
263
267
  defaultAttr.push('tabindex');
264
268
  }
265
269
  if (validateAttr.indexOf(htmlAttr) > -1 || htmlAttr.indexOf('data') === 0) {
266
- this.hiddenElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
270
+ this.hiddenElement.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
267
271
  }
268
272
  else if (defaultAttr.indexOf(htmlAttr) > -1) {
269
273
  if (htmlAttr === 'placeholder') {
270
- Input.setPlaceholder(this.htmlAttributes[htmlAttr], this.inputElement);
274
+ Input.setPlaceholder(this.htmlAttributes["" + htmlAttr], this.inputElement);
271
275
  }
272
276
  else {
273
- this.inputElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
277
+ this.inputElement.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
274
278
  }
275
279
  }
276
280
  else {
277
- this.inputWrapper.container.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
281
+ this.inputWrapper.container.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
278
282
  }
279
283
  }
280
284
  }
@@ -330,7 +334,7 @@ var DropDownList = /** @class */ (function (_super) {
330
334
  }
331
335
  };
332
336
  DropDownList.prototype.targetElement = function () {
333
- return this.inputWrapper.container;
337
+ return !isNullOrUndefined(this.inputWrapper) ? this.inputWrapper.container : null;
334
338
  };
335
339
  DropDownList.prototype.getNgDirective = function () {
336
340
  return 'EJS-DROPDOWNLIST';
@@ -489,7 +493,7 @@ var DropDownList = /** @class */ (function (_super) {
489
493
  }
490
494
  };
491
495
  DropDownList.prototype.unBindCommonEvent = function () {
492
- if (this.targetElement()) {
496
+ if (!isNullOrUndefined(this.inputWrapper) && this.targetElement()) {
493
497
  EventHandler.remove(this.targetElement(), 'blur', this.onBlurHandler);
494
498
  }
495
499
  var formElement = this.inputElement && closest(this.inputElement, 'form');
@@ -519,9 +523,11 @@ var DropDownList = /** @class */ (function (_super) {
519
523
  * @returns {void}
520
524
  */
521
525
  DropDownList.prototype.wireListEvents = function () {
522
- EventHandler.add(this.list, 'click', this.onMouseClick, this);
523
- EventHandler.add(this.list, 'mouseover', this.onMouseOver, this);
524
- EventHandler.add(this.list, 'mouseout', this.onMouseLeave, this);
526
+ if (!isNullOrUndefined(this.list)) {
527
+ EventHandler.add(this.list, 'click', this.onMouseClick, this);
528
+ EventHandler.add(this.list, 'mouseover', this.onMouseOver, this);
529
+ EventHandler.add(this.list, 'mouseout', this.onMouseLeave, this);
530
+ }
525
531
  };
526
532
  DropDownList.prototype.onSearch = function (e) {
527
533
  if (e.charCode !== 32 && e.charCode !== 13) {
@@ -799,9 +805,11 @@ var DropDownList = /** @class */ (function (_super) {
799
805
  this.setSelection(previousItem, event);
800
806
  };
801
807
  DropDownList.prototype.unWireEvent = function () {
802
- EventHandler.remove(this.inputWrapper.container, 'mousedown', this.dropDownClick);
803
- EventHandler.remove(this.inputWrapper.container, 'keypress', this.onSearch);
804
- EventHandler.remove(this.inputWrapper.container, 'focus', this.focusIn);
808
+ if (!isNullOrUndefined(this.inputWrapper)) {
809
+ EventHandler.remove(this.inputWrapper.container, 'mousedown', this.dropDownClick);
810
+ EventHandler.remove(this.inputWrapper.container, 'keypress', this.onSearch);
811
+ EventHandler.remove(this.inputWrapper.container, 'focus', this.focusIn);
812
+ }
805
813
  this.unBindCommonEvent();
806
814
  };
807
815
  /**
@@ -810,9 +818,11 @@ var DropDownList = /** @class */ (function (_super) {
810
818
  * @returns {void}
811
819
  */
812
820
  DropDownList.prototype.unWireListEvents = function () {
813
- EventHandler.remove(this.list, 'click', this.onMouseClick);
814
- EventHandler.remove(this.list, 'mouseover', this.onMouseOver);
815
- EventHandler.remove(this.list, 'mouseout', this.onMouseLeave);
821
+ if (this.list) {
822
+ EventHandler.remove(this.list, 'click', this.onMouseClick);
823
+ EventHandler.remove(this.list, 'mouseover', this.onMouseOver);
824
+ EventHandler.remove(this.list, 'mouseout', this.onMouseLeave);
825
+ }
816
826
  };
817
827
  DropDownList.prototype.checkSelector = function (id) {
818
828
  return '[id="' + id.replace(/(:|\.|\[|\]|,|=|@|\\|\/|#)/g, '\\$1') + '"]';
@@ -820,7 +830,7 @@ var DropDownList = /** @class */ (function (_super) {
820
830
  DropDownList.prototype.onDocumentClick = function (e) {
821
831
  var target = e.target;
822
832
  if (!(!isNullOrUndefined(this.popupObj) && closest(target, this.checkSelector(this.popupObj.element.id))) &&
823
- !this.inputWrapper.container.contains(e.target)) {
833
+ !isNullOrUndefined(this.inputWrapper) && !this.inputWrapper.container.contains(e.target)) {
824
834
  if (this.inputWrapper.container.classList.contains(dropDownListClasses.inputFocus) || this.isPopupOpen) {
825
835
  this.isDocumentClick = true;
826
836
  var isActive = this.isRequested;
@@ -1018,9 +1028,11 @@ var DropDownList = /** @class */ (function (_super) {
1018
1028
  this.setScrollPosition(e);
1019
1029
  }
1020
1030
  if (Browser.info.name !== 'mozilla') {
1021
- attributes(this.targetElement(), { 'aria-label': this.inputElement.value });
1022
- attributes(this.targetElement(), { 'aria-describedby': this.inputElement.id != '' ? this.inputElement.id : this.element.id });
1023
- this.targetElement().removeAttribute('aria-live');
1031
+ attributes(this.inputElement, { 'aria-label': this.inputElement.value });
1032
+ if (this.targetElement()) {
1033
+ attributes(this.targetElement(), { 'aria-describedby': this.inputElement.id != '' ? this.inputElement.id : this.element.id });
1034
+ this.targetElement().removeAttribute('aria-live');
1035
+ }
1024
1036
  }
1025
1037
  if (this.isPopupOpen && !isNullOrUndefined(this.ulElement) && !isNullOrUndefined(this.ulElement.getElementsByClassName('e-item-focus')[0])) {
1026
1038
  attributes(this.targetElement(), { 'aria-activedescendant': this.ulElement.getElementsByClassName('e-item-focus')[0].id });
@@ -1191,9 +1203,11 @@ var DropDownList = /** @class */ (function (_super) {
1191
1203
  selectedElement.setAttribute('value', this.value.toString());
1192
1204
  }
1193
1205
  else {
1194
- this.hiddenElement.innerHTML = '<option selected>' + this.text + '</option>';
1195
- var selectedElement = this.hiddenElement.querySelector('option');
1196
- selectedElement.setAttribute('value', this.value.toString());
1206
+ if (!isNullOrUndefined(this.hiddenElement)) {
1207
+ this.hiddenElement.innerHTML = '<option selected>' + this.text + '</option>';
1208
+ var selectedElement = this.hiddenElement.querySelector('option');
1209
+ selectedElement.setAttribute('value', this.value.toString());
1210
+ }
1197
1211
  }
1198
1212
  }
1199
1213
  else {
@@ -1532,7 +1546,7 @@ var DropDownList = /** @class */ (function (_super) {
1532
1546
  && ((this.dataSource instanceof DataManager)
1533
1547
  || (!isNullOrUndefined(this.dataSource) && !isNullOrUndefined(this.dataSource.length) &&
1534
1548
  this.dataSource.length !== 0)))) {
1535
- if (this.itemTemplate && (this.element.tagName === 'EJS-COMBOBOX' || this.element.tagName === 'EJS-DROPDOWNLIST') && this.allowFiltering) {
1549
+ if (this.itemTemplate && this.element.tagName === 'EJS-COMBOBOX' && this.allowFiltering) {
1536
1550
  setTimeout(function () {
1537
1551
  _this.updateActionCompleteDataValues(ulElement, list);
1538
1552
  }, 0);
@@ -1683,9 +1697,11 @@ var DropDownList = /** @class */ (function (_super) {
1683
1697
  (_this.isDropDownClick && _this.getModuleName() === 'combobox')))) {
1684
1698
  offsetValue = _this.getOffsetValue(popupEle);
1685
1699
  var firstItem = _this.isEmptyList() ? _this.list : _this.liCollections[0];
1686
- left = -(parseInt(getComputedStyle(firstItem).textIndent, 10) -
1687
- parseInt(getComputedStyle(_this.inputElement).paddingLeft, 10) +
1688
- parseInt(getComputedStyle(_this.inputElement.parentElement).borderLeftWidth, 10));
1700
+ if (!isNullOrUndefined(_this.inputElement)) {
1701
+ left = -(parseInt(getComputedStyle(firstItem).textIndent, 10) -
1702
+ parseInt(getComputedStyle(_this.inputElement).paddingLeft, 10) +
1703
+ parseInt(getComputedStyle(_this.inputElement.parentElement).borderLeftWidth, 10));
1704
+ }
1689
1705
  }
1690
1706
  _this.getFocusElement();
1691
1707
  _this.createPopup(popupEle, offsetValue, left);
@@ -1731,9 +1747,13 @@ var DropDownList = /** @class */ (function (_super) {
1731
1747
  var eventArgs = { popup: popupInstance, event: e, cancel: false, animation: animModel };
1732
1748
  _this.trigger('open', eventArgs, function (eventArgs) {
1733
1749
  if (!eventArgs.cancel) {
1734
- addClass([_this.inputWrapper.container], [dropDownListClasses.iconAnimation]);
1750
+ if (!isNullOrUndefined(_this.inputWrapper)) {
1751
+ addClass([_this.inputWrapper.container], [dropDownListClasses.iconAnimation]);
1752
+ }
1735
1753
  _this.renderReactTemplates();
1736
- _this.popupObj.show(new Animation(eventArgs.animation), (_this.zIndex === 1000) ? _this.element : null);
1754
+ if (!isNullOrUndefined(_this.popupObj)) {
1755
+ _this.popupObj.show(new Animation(eventArgs.animation), (_this.zIndex === 1000) ? _this.element : null);
1756
+ }
1737
1757
  }
1738
1758
  else {
1739
1759
  _this.beforePopupOpen = false;
@@ -1992,11 +2012,13 @@ var DropDownList = /** @class */ (function (_super) {
1992
2012
  EventHandler.remove(this.backIconElement, 'click', this.clickOnBackIcon);
1993
2013
  EventHandler.remove(this.clearIconElement, 'click', this.clearText);
1994
2014
  }
1995
- EventHandler.remove(this.filterInput, 'input', this.onInput);
1996
- EventHandler.remove(this.filterInput, 'keyup', this.onFilterUp);
1997
- EventHandler.remove(this.filterInput, 'keydown', this.onFilterDown);
1998
- EventHandler.remove(this.filterInput, 'blur', this.onBlurHandler);
1999
- EventHandler.remove(this.filterInput, 'paste', this.pasteHandler);
2015
+ if (!isNullOrUndefined(this.filterInput)) {
2016
+ EventHandler.remove(this.filterInput, 'input', this.onInput);
2017
+ EventHandler.remove(this.filterInput, 'keyup', this.onFilterUp);
2018
+ EventHandler.remove(this.filterInput, 'keydown', this.onFilterDown);
2019
+ EventHandler.remove(this.filterInput, 'blur', this.onBlurHandler);
2020
+ EventHandler.remove(this.filterInput, 'paste', this.pasteHandler);
2021
+ }
2000
2022
  this.filterInput = null;
2001
2023
  }
2002
2024
  attributes(this.targetElement(), { 'aria-expanded': 'false' });
@@ -2131,6 +2153,7 @@ var DropDownList = /** @class */ (function (_super) {
2131
2153
  this.text = isNullOrUndefined(this.value) ? null : selectElement.options[selectElement.selectedIndex].textContent;
2132
2154
  this.initValue();
2133
2155
  }
2156
+ this.setEnabled();
2134
2157
  this.preventTabIndex(this.element);
2135
2158
  if (!this.enabled) {
2136
2159
  this.targetElement().tabIndex = -1;
@@ -2215,6 +2238,14 @@ var DropDownList = /** @class */ (function (_super) {
2215
2238
  var contentEle = popupEle.querySelector('div.e-content');
2216
2239
  popupEle.insertBefore(this.header, contentEle);
2217
2240
  };
2241
+ /**
2242
+ * Sets the enabled state to DropDownBase.
2243
+ *
2244
+ * @returns {void}
2245
+ */
2246
+ DropDownList.prototype.setEnabled = function () {
2247
+ this.element.setAttribute('aria-disabled', (this.enabled) ? 'false' : 'true');
2248
+ };
2218
2249
  DropDownList.prototype.setOldText = function (text) {
2219
2250
  this.text = text;
2220
2251
  };
@@ -2590,7 +2621,7 @@ var DropDownList = /** @class */ (function (_super) {
2590
2621
  };
2591
2622
  history.pushState({}, '');
2592
2623
  }
2593
- if (!isNullOrUndefined(this.list.children[0]) || this.list.classList.contains(dropDownBaseClasses.noData)) {
2624
+ if (!isNullOrUndefined(this.list) && (!isNullOrUndefined(this.list.children[0]) || this.list.classList.contains(dropDownBaseClasses.noData))) {
2594
2625
  this.renderPopup(e);
2595
2626
  }
2596
2627
  };
@@ -2606,7 +2637,9 @@ var DropDownList = /** @class */ (function (_super) {
2606
2637
  DropDownList.prototype.hidePopup = function (e) {
2607
2638
  /* eslint-enable valid-jsdoc, jsdoc/require-param */
2608
2639
  if (this.isEscapeKey && this.getModuleName() === 'dropdownlist') {
2609
- Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);
2640
+ if (!isNullOrUndefined(this.inputElement)) {
2641
+ Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);
2642
+ }
2610
2643
  this.isEscapeKey = false;
2611
2644
  if (!isNullOrUndefined(this.index)) {
2612
2645
  var element = this.findListElement(this.ulElement, 'li', 'data-value', this.value);
@@ -2716,6 +2749,21 @@ var DropDownList = /** @class */ (function (_super) {
2716
2749
  this.inputWrapper.container.parentElement.insertBefore(this.element, this.inputWrapper.container);
2717
2750
  detach(this.inputWrapper.container);
2718
2751
  }
2752
+ this.hiddenElement = null;
2753
+ this.inputWrapper = null;
2754
+ this.keyboardModule = null;
2755
+ this.ulElement = null;
2756
+ this.list = null;
2757
+ this.popupObj = null;
2758
+ this.rippleFun = null;
2759
+ this.selectedLI = null;
2760
+ this.liCollections = null;
2761
+ this.item = null;
2762
+ this.inputWrapper = null;
2763
+ this.footer = null;
2764
+ this.header = null;
2765
+ this.previousSelectedLI = null;
2766
+ this.valueTempElement = null;
2719
2767
  _super.prototype.destroy.call(this);
2720
2768
  };
2721
2769
  /* eslint-disable valid-jsdoc, jsdoc/require-returns-description */
@@ -2757,6 +2805,12 @@ var DropDownList = /** @class */ (function (_super) {
2757
2805
  __decorate([
2758
2806
  Property('100%')
2759
2807
  ], DropDownList.prototype, "width", void 0);
2808
+ __decorate([
2809
+ Property(true)
2810
+ ], DropDownList.prototype, "enabled", void 0);
2811
+ __decorate([
2812
+ Property(false)
2813
+ ], DropDownList.prototype, "enablePersistence", void 0);
2760
2814
  __decorate([
2761
2815
  Property('300px')
2762
2816
  ], DropDownList.prototype, "popupHeight", void 0);
@@ -58,6 +58,12 @@ export interface FieldsModel {
58
58
  */
59
59
  query?: Query;
60
60
 
61
+ /**
62
+ * Specifies whether the node can be selected by users or not
63
+ * When set to false, the user interaction is prevented for the corresponding node.
64
+ */
65
+ selectable?: string;
66
+
61
67
  /**
62
68
  * Specifies the mapping field for the selected state of the Dropdown Tree item.
63
69
  */
@@ -199,7 +205,7 @@ export interface DropDownTreeModel extends ComponentModel{
199
205
  *
200
206
  * @default {value: 'value', text: 'text', dataSource: [], child: 'child', parentValue: 'parentValue', hasChildren: 'hasChildren',
201
207
  * expanded: 'expanded', htmlAttributes: 'htmlAttributes', iconCss: 'iconCss', imageUrl: 'imageUrl',
202
- * query: null, selected: 'selected', tableName: null, tooltip: 'tooltip'}
208
+ * query: null, selected: 'selected', selectable: 'selectable', tableName: null, tooltip: 'tooltip' }
203
209
  */
204
210
  fields?: FieldsModel;
205
211
 
@@ -370,6 +376,14 @@ export interface DropDownTreeModel extends ComponentModel{
370
376
  */
371
377
  showCheckBox?: boolean;
372
378
 
379
+ /**
380
+ * Specifies whether to allow rendering of untrusted HTML values in the Dropdown Tree component.
381
+ * While enable this property, it sanitize suspected untrusted strings and script, and update in the Dropdown Tree component.
382
+ *
383
+ * @default false
384
+ */
385
+ enableHtmlSanitizer?: boolean;
386
+
373
387
  /**
374
388
  * Specifies whether to show or hide the clear icon in textbox.
375
389
  * When the clear button is clicked, `value`, `text` properties will be reset to null.
@@ -50,6 +50,11 @@ export declare class Fields extends ChildProperty<Fields> {
50
50
  * @default null
51
51
  */
52
52
  query: Query;
53
+ /**
54
+ * Specifies whether the node can be selected by users or not
55
+ * When set to false, the user interaction is prevented for the corresponding node.
56
+ */
57
+ selectable: string;
53
58
  /**
54
59
  * Specifies the mapping field for the selected state of the Dropdown Tree item.
55
60
  */
@@ -345,7 +350,7 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
345
350
  *
346
351
  * @default {value: 'value', text: 'text', dataSource: [], child: 'child', parentValue: 'parentValue', hasChildren: 'hasChildren',
347
352
  * expanded: 'expanded', htmlAttributes: 'htmlAttributes', iconCss: 'iconCss', imageUrl: 'imageUrl',
348
- * query: null, selected: 'selected', tableName: null, tooltip: 'tooltip'}
353
+ * query: null, selected: 'selected', selectable: 'selectable', tableName: null, tooltip: 'tooltip' }
349
354
  */
350
355
  fields: FieldsModel;
351
356
  /**
@@ -499,6 +504,13 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
499
504
  * @default false
500
505
  */
501
506
  showCheckBox: boolean;
507
+ /**
508
+ * Specifies whether to allow rendering of untrusted HTML values in the Dropdown Tree component.
509
+ * While enable this property, it sanitize suspected untrusted strings and script, and update in the Dropdown Tree component.
510
+ *
511
+ * @default false
512
+ */
513
+ enableHtmlSanitizer: boolean;
502
514
  /**
503
515
  * Specifies whether to show or hide the clear icon in textbox.
504
516
  * When the clear button is clicked, `value`, `text` properties will be reset to null.
@@ -107,6 +107,9 @@ var Fields = /** @class */ (function (_super) {
107
107
  __decorate([
108
108
  Property(null)
109
109
  ], Fields.prototype, "query", void 0);
110
+ __decorate([
111
+ Property('selectable')
112
+ ], Fields.prototype, "selectable", void 0);
110
113
  __decorate([
111
114
  Property('selected')
112
115
  ], Fields.prototype, "selected", void 0);
@@ -918,7 +921,12 @@ var DropDownTree = /** @class */ (function (_super) {
918
921
  temp = this.getOverflowVal(index);
919
922
  data += temp;
920
923
  temp = this.overFlowWrapper.innerHTML;
921
- this.overFlowWrapper.innerHTML = data;
924
+ if (this.enableHtmlSanitizer) {
925
+ this.overFlowWrapper.innerText = data;
926
+ }
927
+ else {
928
+ this.overFlowWrapper.innerHTML = data;
929
+ }
922
930
  wrapperleng = this.overFlowWrapper.offsetWidth;
923
931
  overAllContainer = this.inputWrapper.offsetWidth;
924
932
  if ((wrapperleng + downIconWidth + this.clearIconWidth) > overAllContainer) {
@@ -1450,6 +1458,7 @@ var DropDownTree = /** @class */ (function (_super) {
1450
1458
  nodeClicked: this.onNodeClicked.bind(this),
1451
1459
  dataBound: this.OnDataBound.bind(this),
1452
1460
  allowMultiSelection: this.allowMultiSelection,
1461
+ enableHtmlSanitizer: this.enableHtmlSanitizer,
1453
1462
  showCheckBox: this.showCheckBox,
1454
1463
  autoCheck: this.treeSettings.autoCheck,
1455
1464
  sortOrder: this.sortOrder,
@@ -1675,6 +1684,9 @@ var DropDownTree = /** @class */ (function (_super) {
1675
1684
  }
1676
1685
  var eventArgs = { data: args.data };
1677
1686
  this.trigger('dataBound', eventArgs);
1687
+ if (this.filterObj === null) {
1688
+ this.isFilteredData = false;
1689
+ }
1678
1690
  if (this.isFilteredData) {
1679
1691
  this.treeObj.expandAll();
1680
1692
  }
@@ -1742,7 +1754,7 @@ var DropDownTree = /** @class */ (function (_super) {
1742
1754
  dataSource: fields.dataSource, value: fields.value, text: fields.text, parentValue: fields.parentValue,
1743
1755
  child: this.cloneChildField(fields.child), hasChildren: fields.hasChildren, expanded: fields.expanded,
1744
1756
  iconCss: fields.iconCss, imageUrl: fields.imageUrl, htmlAttributes: fields.htmlAttributes, query: fields.query,
1745
- selected: fields.selected, tableName: fields.tableName, tooltip: fields.tooltip
1757
+ selected: fields.selected, selectable: fields.selectable, tableName: fields.tableName, tooltip: fields.tooltip
1746
1758
  };
1747
1759
  return clonedField;
1748
1760
  };
@@ -1755,7 +1767,7 @@ var DropDownTree = /** @class */ (function (_super) {
1755
1767
  dataSource: fields.dataSource, value: fields.value, text: fields.text, parentValue: fields.parentValue,
1756
1768
  child: (fields.child ? this.cloneChildField(fields.child) : null), hasChildren: fields.hasChildren,
1757
1769
  expanded: fields.expanded, iconCss: fields.iconCss, imageUrl: fields.imageUrl, htmlAttributes: fields.htmlAttributes,
1758
- query: fields.query, selected: fields.selected, tableName: fields.tableName, tooltip: fields.tooltip
1770
+ query: fields.query, selected: fields.selected, selectable: fields.selectable, tableName: fields.tableName, tooltip: fields.tooltip
1759
1771
  };
1760
1772
  return clonedField;
1761
1773
  }
@@ -1765,7 +1777,7 @@ var DropDownTree = /** @class */ (function (_super) {
1765
1777
  dataSource: fields.dataSource, id: fields.value, text: fields.text, parentID: fields.parentValue,
1766
1778
  child: this.getTreeChildren(fields.child), hasChildren: fields.hasChildren, expanded: fields.expanded,
1767
1779
  iconCss: fields.iconCss, imageUrl: fields.imageUrl, isChecked: fields.selected,
1768
- htmlAttributes: fields.htmlAttributes, query: fields.query, selected: fields.selected,
1780
+ htmlAttributes: fields.htmlAttributes, query: fields.query, selectable: fields.selectable, selected: fields.selected,
1769
1781
  tableName: fields.tableName, tooltip: fields.tooltip
1770
1782
  };
1771
1783
  return treeFields;
@@ -2260,7 +2272,12 @@ var DropDownTree = /** @class */ (function (_super) {
2260
2272
  });
2261
2273
  var chipContent = this.createElement('span', { className: CHIP_CONTENT });
2262
2274
  var chipClose = this.createElement('span', { className: CHIP_CLOSE + ' ' + ICONS });
2263
- chipContent.innerHTML = text;
2275
+ if (this.enableHtmlSanitizer) {
2276
+ chipContent.innerText = text;
2277
+ }
2278
+ else {
2279
+ chipContent.innerHTML = text;
2280
+ }
2264
2281
  chip.appendChild(chipContent);
2265
2282
  this.chipCollection.appendChild(chip);
2266
2283
  if (this.showClearButton) {
@@ -3083,6 +3100,9 @@ var DropDownTree = /** @class */ (function (_super) {
3083
3100
  __decorate([
3084
3101
  Property(false)
3085
3102
  ], DropDownTree.prototype, "showCheckBox", void 0);
3103
+ __decorate([
3104
+ Property(false)
3105
+ ], DropDownTree.prototype, "enableHtmlSanitizer", void 0);
3086
3106
  __decorate([
3087
3107
  Property(true)
3088
3108
  ], DropDownTree.prototype, "showClearButton", void 0);
@@ -93,6 +93,24 @@ export interface ListBoxModel extends DropDownBaseModel{
93
93
  */
94
94
  height?: number | string;
95
95
 
96
+ /**
97
+ * Specifies a value that indicates whether the component is enabled or not.
98
+ *
99
+ * @default true
100
+
101
+ */
102
+ enabled?: boolean;
103
+
104
+ /**
105
+ * Enable or disable persisting component's state between page reloads.
106
+ * If enabled, following list of states will be persisted.
107
+ * 1. value
108
+ *
109
+ * @default false
110
+
111
+ */
112
+ enablePersistence?: boolean;
113
+
96
114
  /**
97
115
  * If 'allowDragAndDrop' is set to true, then you can perform drag and drop of the list item.
98
116
  * ListBox contains same 'scope' property enables drag and drop between multiple ListBox.
@@ -141,6 +141,22 @@ export declare class ListBox extends DropDownBase {
141
141
  * @default ''
142
142
  */
143
143
  height: number | string;
144
+ /**
145
+ * Specifies a value that indicates whether the component is enabled or not.
146
+ *
147
+ * @default true
148
+
149
+ */
150
+ enabled: boolean;
151
+ /**
152
+ * Enable or disable persisting component's state between page reloads.
153
+ * If enabled, following list of states will be persisted.
154
+ * 1. value
155
+ *
156
+ * @default false
157
+
158
+ */
159
+ enablePersistence: boolean;
144
160
  /**
145
161
  * If 'allowDragAndDrop' is set to true, then you can perform drag and drop of the list item.
146
162
  * ListBox contains same 'scope' property enables drag and drop between multiple ListBox.
@@ -342,6 +358,12 @@ export declare class ListBox extends DropDownBase {
342
358
  private removeSelected;
343
359
  private getCurIdx;
344
360
  private getComponent;
361
+ /**
362
+ * Sets the enabled state to DropDownBase.
363
+ *
364
+ * @returns {void}
365
+ */
366
+ protected setEnabled(): void;
345
367
  protected listOption(dataSource: obj[] | string[] | number[] | boolean[], fields: FieldSettingsModel): FieldSettingsModel;
346
368
  private triggerBeforeItemRender;
347
369
  requiredModules(): ModuleDeclaration[];