@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
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 20.3.60
3
+ * version : 20.4.40
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. 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@20.3.59",
3
+ "_id": "@syncfusion/ej2-dropdowns@20.4.38",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-3KOrC1GdJj32XxkzIJxQd8zP9Dbp7L/0/AWOUu3LZF+4B+6Xther2bXQ6t1Gt4nstmFHbiXDrrTVE8YJbsYKUA==",
5
+ "_integrity": "sha512-rAiQm0Rcd5vCy3J2y8nEDrU0uB+utV3odQhDB2dfiSB3n9XOjhhojtBUZ9q0dv4DM9/Y5ouMdaz7H/aK299erw==",
6
6
  "_location": "/@syncfusion/ej2-dropdowns",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -33,8 +33,8 @@
33
33
  "/@syncfusion/ej2-spreadsheet",
34
34
  "/@syncfusion/ej2-vue-dropdowns"
35
35
  ],
36
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-20.3.59.tgz",
37
- "_shasum": "9a67584709f1877eda262c63bf59a2c61d33f8de",
36
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-20.4.38.tgz",
37
+ "_shasum": "4be33a2afcb91461e4a7ccf53d2db9364f655411",
38
38
  "_spec": "@syncfusion/ej2-dropdowns@*",
39
39
  "_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
40
40
  "author": {
@@ -42,12 +42,12 @@
42
42
  },
43
43
  "bundleDependencies": false,
44
44
  "dependencies": {
45
- "@syncfusion/ej2-base": "~20.3.56",
46
- "@syncfusion/ej2-data": "~20.3.60",
47
- "@syncfusion/ej2-inputs": "~20.3.57",
48
- "@syncfusion/ej2-lists": "~20.3.56",
49
- "@syncfusion/ej2-navigations": "~20.3.60",
50
- "@syncfusion/ej2-popups": "~20.3.60"
45
+ "@syncfusion/ej2-base": "~20.4.40",
46
+ "@syncfusion/ej2-data": "~20.4.40",
47
+ "@syncfusion/ej2-inputs": "~20.4.40",
48
+ "@syncfusion/ej2-lists": "~20.4.40",
49
+ "@syncfusion/ej2-navigations": "~20.4.40",
50
+ "@syncfusion/ej2-popups": "~20.4.40"
51
51
  },
52
52
  "deprecated": false,
53
53
  "description": "Essential JS 2 DropDown Components",
@@ -72,6 +72,7 @@
72
72
  "module": "./index.js",
73
73
  "name": "@syncfusion/ej2-dropdowns",
74
74
  "typings": "index.d.ts",
75
- "version": "20.3.60",
76
- "sideEffects": false
75
+ "version": "20.4.40",
76
+ "sideEffects": false,
77
+ "homepage": "https://www.syncfusion.com/javascript-ui-controls"
77
78
  }
@@ -14,7 +14,7 @@ export interface AutoCompleteModel extends ComboBoxModel{
14
14
  * * groupBy - Group the list items with it's related items by mapping groupBy field
15
15
  *
16
16
  * {% codeBlock src='autocomplete/fields/index.md' %}{% endcodeBlock %}
17
- *
17
+ *
18
18
  * > For more details about the field mapping refer to [`Data binding`](../../auto-complete/data-binding) documentation.
19
19
  *
20
20
  * @default { value: null, iconCss: null, groupBy: null}
@@ -226,7 +226,7 @@ var ComboBox = /** @class */ (function (_super) {
226
226
  };
227
227
  ComboBox.prototype.getFocusElement = function () {
228
228
  var dataItem = this.isSelectCustom ? { text: '' } : this.getItemData();
229
- var selected = this.list.querySelector('.' + dropDownListClasses.selected);
229
+ var selected = !isNullOrUndefined(this.list) ? this.list.querySelector('.' + dropDownListClasses.selected) : this.list;
230
230
  var isSelected = dataItem.text === this.inputElement.value && !isNullOrUndefined(selected);
231
231
  if (isSelected) {
232
232
  return selected;
@@ -386,9 +386,11 @@ var ComboBox = /** @class */ (function (_super) {
386
386
  }
387
387
  else if (this.inputElement.value === '') {
388
388
  this.activeIndex = null;
389
- this.list.scrollTop = 0;
390
- var focusItem = this.list.querySelector('.' + dropDownListClasses.li);
391
- this.setHoverList(focusItem);
389
+ if (!isNullOrUndefined(this.list)) {
390
+ this.list.scrollTop = 0;
391
+ var focusItem = this.list.querySelector('.' + dropDownListClasses.li);
392
+ this.setHoverList(focusItem);
393
+ }
392
394
  }
393
395
  else {
394
396
  this.activeIndex = null;
@@ -687,7 +689,7 @@ var ComboBox = /** @class */ (function (_super) {
687
689
  this.removeFillSelection();
688
690
  }
689
691
  var dataItem = this.isSelectCustom ? { text: '' } : this.getItemData();
690
- var selected = this.list.querySelector('.' + dropDownListClasses.selected);
692
+ var selected = !isNullOrUndefined(this.list) ? this.list.querySelector('.' + dropDownListClasses.selected) : null;
691
693
  if (this.inputElement && dataItem.text === this.inputElement.value && !isNullOrUndefined(selected)) {
692
694
  if (this.isSelected) {
693
695
  this.onChangeEvent(e);
@@ -74,16 +74,6 @@ export interface DropDownBaseModel extends ComponentModel{
74
74
  */
75
75
  fields?: FieldSettingsModel;
76
76
 
77
- /**
78
- * Enable or disable persisting component's state between page reloads.
79
- * If enabled, following list of states will be persisted.
80
- * 1. value
81
- *
82
- * @default false
83
-
84
- */
85
- enablePersistence?: boolean;
86
-
87
77
  /**
88
78
  * Accepts the template design and assigns it to each list item present in the popup.
89
79
  * We have built-in `template engine`
@@ -135,14 +125,6 @@ export interface DropDownBaseModel extends ComponentModel{
135
125
  */
136
126
  sortOrder?: SortOrder;
137
127
 
138
- /**
139
- * Specifies a value that indicates whether the component is enabled or not.
140
- *
141
- * @default true
142
-
143
- */
144
- enabled?: boolean;
145
-
146
128
  /**
147
129
  * Accepts the list items either through local or remote service and binds it to the component.
148
130
  * It can be an array of JSON Objects or an instance of
@@ -239,15 +239,6 @@ export declare class DropDownBase extends Component<HTMLElement> implements INot
239
239
 
240
240
  */
241
241
  fields: FieldSettingsModel;
242
- /**
243
- * Enable or disable persisting component's state between page reloads.
244
- * If enabled, following list of states will be persisted.
245
- * 1. value
246
- *
247
- * @default false
248
-
249
- */
250
- enablePersistence: boolean;
251
242
  /**
252
243
  * Accepts the template design and assigns it to each list item present in the popup.
253
244
  * We have built-in `template engine`
@@ -294,13 +285,6 @@ export declare class DropDownBase extends Component<HTMLElement> implements INot
294
285
 
295
286
  */
296
287
  sortOrder: SortOrder;
297
- /**
298
- * Specifies a value that indicates whether the component is enabled or not.
299
- *
300
- * @default true
301
-
302
- */
303
- enabled: boolean;
304
288
  /**
305
289
  * Accepts the list items either through local or remote service and binds it to the component.
306
290
  * It can be an array of JSON Objects or an instance of
@@ -467,12 +451,6 @@ export declare class DropDownBase extends Component<HTMLElement> implements INot
467
451
  * @returns {string} Returns the persisted data of the component.
468
452
  */
469
453
  protected getPersistData(): string;
470
- /**
471
- * Sets the enabled state to DropDownBase.
472
- *
473
- * @returns {void}
474
- */
475
- protected setEnabled(): void;
476
454
  /**
477
455
  * Sets the enabled state to DropDownBase.
478
456
  *
@@ -273,7 +273,9 @@ var DropDownBase = /** @class */ (function (_super) {
273
273
  liElem.setAttribute('role', 'option');
274
274
  }
275
275
  else {
276
- ele.innerHTML = content;
276
+ if (!isNullOrUndefined(ele)) {
277
+ ele.innerHTML = content;
278
+ }
277
279
  }
278
280
  }
279
281
  };
@@ -304,14 +306,16 @@ var DropDownBase = /** @class */ (function (_super) {
304
306
  * @returns {void}
305
307
  */
306
308
  DropDownBase.prototype.setEnableRtl = function () {
307
- if (this.list) {
308
- this.enableRtlElements.push(this.list);
309
- }
310
- if (this.enableRtl) {
311
- addClass(this.enableRtlElements, dropDownBaseClasses.rtl);
312
- }
313
- else {
314
- removeClass(this.enableRtlElements, dropDownBaseClasses.rtl);
309
+ if (!isNullOrUndefined(this.enableRtlElements)) {
310
+ if (this.list) {
311
+ this.enableRtlElements.push(this.list);
312
+ }
313
+ if (this.enableRtl) {
314
+ addClass(this.enableRtlElements, dropDownBaseClasses.rtl);
315
+ }
316
+ else {
317
+ removeClass(this.enableRtlElements, dropDownBaseClasses.rtl);
318
+ }
315
319
  }
316
320
  };
317
321
  /**
@@ -349,14 +353,6 @@ var DropDownBase = /** @class */ (function (_super) {
349
353
  DropDownBase.prototype.getPersistData = function () {
350
354
  return this.addOnPersist([]);
351
355
  };
352
- /**
353
- * Sets the enabled state to DropDownBase.
354
- *
355
- * @returns {void}
356
- */
357
- DropDownBase.prototype.setEnabled = function () {
358
- this.element.setAttribute('aria-disabled', (this.enabled) ? 'false' : 'true');
359
- };
360
356
  /**
361
357
  * Sets the enabled state to DropDownBase.
362
358
  *
@@ -578,7 +574,9 @@ var DropDownBase = /** @class */ (function (_super) {
578
574
  this.liCollections = [];
579
575
  this.trigger('actionFailure', e);
580
576
  this.l10nUpdate(true);
581
- addClass([this.list], dropDownBaseClasses.noData);
577
+ if (!isNullOrUndefined(this.list)) {
578
+ addClass([this.list], dropDownBaseClasses.noData);
579
+ }
582
580
  };
583
581
  /* eslint-disable @typescript-eslint/no-unused-vars */
584
582
  DropDownBase.prototype.onActionComplete = function (ulElement, list, e) {
@@ -708,10 +706,12 @@ var DropDownBase = /** @class */ (function (_super) {
708
706
  if (!isNullOrUndefined(this.list) && !this.list.classList.contains(dropDownBaseClasses.noData)) {
709
707
  if (isNullOrUndefined(this.fixedHeaderElement)) {
710
708
  this.fixedHeaderElement = this.createElement('div', { className: dropDownBaseClasses.fixedHead });
711
- if (!this.list.querySelector('li').classList.contains(dropDownBaseClasses.group)) {
709
+ if (!isNullOrUndefined(this.list) && !this.list.querySelector('li').classList.contains(dropDownBaseClasses.group)) {
712
710
  this.fixedHeaderElement.style.display = 'none';
713
711
  }
714
- prepend([this.fixedHeaderElement], this.list);
712
+ if (!isNullOrUndefined(this.fixedHeaderElement) && !isNullOrUndefined(this.list)) {
713
+ prepend([this.fixedHeaderElement], this.list);
714
+ }
715
715
  this.setFixedHeader();
716
716
  }
717
717
  if (!isNullOrUndefined(this.fixedHeaderElement) && this.fixedHeaderElement.style.zIndex === '0') {
@@ -802,7 +802,9 @@ var DropDownBase = /** @class */ (function (_super) {
802
802
  return item;
803
803
  };
804
804
  DropDownBase.prototype.setFixedHeader = function () {
805
- this.list.parentElement.style.display = 'block';
805
+ if (!isNullOrUndefined(this.list)) {
806
+ this.list.parentElement.style.display = 'block';
807
+ }
806
808
  var borderWidth = 0;
807
809
  if (this.list && this.list.parentElement) {
808
810
  borderWidth = parseInt(document.defaultView.getComputedStyle(this.list.parentElement, null).getPropertyValue('border-width'), 10);
@@ -817,8 +819,10 @@ var DropDownBase = /** @class */ (function (_super) {
817
819
  borderWidth = (borderTopWidth + borderBottomWidth + borderLeftWidth + borderRightWidth);
818
820
  }
819
821
  }
820
- var liWidth = this.getValidLi().offsetWidth - borderWidth;
821
- this.fixedHeaderElement.style.width = liWidth.toString() + 'px';
822
+ if (!isNullOrUndefined(this.liCollections)) {
823
+ var liWidth = this.getValidLi().offsetWidth - borderWidth;
824
+ this.fixedHeaderElement.style.width = liWidth.toString() + 'px';
825
+ }
822
826
  setStyleAttribute(this.fixedHeaderElement, { zIndex: 10 });
823
827
  var firstLi = this.ulElement.querySelector('.' + dropDownBaseClasses.group + ':not(.e-hide-listitem)');
824
828
  this.fixedHeaderElement.innerHTML = firstLi.innerHTML;
@@ -962,9 +966,6 @@ var DropDownBase = /** @class */ (function (_super) {
962
966
  case 'enableRtl':
963
967
  this.setEnableRtl();
964
968
  break;
965
- case 'enabled':
966
- this.setEnabled();
967
- break;
968
969
  case 'groupTemplate':
969
970
  this.renderGroupTemplate(this.list);
970
971
  if (this.ulElement && this.fixedHeaderElement) {
@@ -1013,7 +1014,6 @@ var DropDownBase = /** @class */ (function (_super) {
1013
1014
  wrapperElement.appendChild(this.list);
1014
1015
  }
1015
1016
  this.setEnableRtl();
1016
- this.setEnabled();
1017
1017
  if (!isEmptyData) {
1018
1018
  this.initialize(e);
1019
1019
  }
@@ -1105,11 +1105,17 @@ var DropDownBase = /** @class */ (function (_super) {
1105
1105
  this.trigger('beforeItemRender', { element: li, item: item });
1106
1106
  }
1107
1107
  if (itemsCount === 0 && isNullOrUndefined(this.list.querySelector('ul'))) {
1108
- this.list.innerHTML = '';
1109
- this.list.classList.remove(dropDownBaseClasses.noData);
1110
- this.list.appendChild(this.ulElement);
1108
+ if (!isNullOrUndefined(this.list)) {
1109
+ this.list.innerHTML = '';
1110
+ this.list.classList.remove(dropDownBaseClasses.noData);
1111
+ if (!isNullOrUndefined(this.ulElement)) {
1112
+ this.list.appendChild(this.ulElement);
1113
+ }
1114
+ }
1111
1115
  this.liCollections = liCollections;
1112
- append(liCollections, this.ulElement);
1116
+ if (!isNullOrUndefined(liCollections) && !isNullOrUndefined(this.ulElement)) {
1117
+ append(liCollections, this.ulElement);
1118
+ }
1113
1119
  this.updateAddItemList(this.list, itemsCount);
1114
1120
  }
1115
1121
  else {
@@ -1230,14 +1236,16 @@ var DropDownBase = /** @class */ (function (_super) {
1230
1236
  }
1231
1237
  detach(this.list);
1232
1238
  }
1239
+ this.liCollections = null;
1240
+ this.ulElement = null;
1241
+ this.list = null;
1242
+ this.enableRtlElements = null;
1243
+ this.rippleFun = null;
1233
1244
  _super.prototype.destroy.call(this);
1234
1245
  };
1235
1246
  __decorate([
1236
1247
  Complex({ text: null, value: null, iconCss: null, groupBy: null }, FieldSettings)
1237
1248
  ], DropDownBase.prototype, "fields", void 0);
1238
- __decorate([
1239
- Property(false)
1240
- ], DropDownBase.prototype, "enablePersistence", void 0);
1241
1249
  __decorate([
1242
1250
  Property(null)
1243
1251
  ], DropDownBase.prototype, "itemTemplate", void 0);
@@ -1253,9 +1261,6 @@ var DropDownBase = /** @class */ (function (_super) {
1253
1261
  __decorate([
1254
1262
  Property('None')
1255
1263
  ], DropDownBase.prototype, "sortOrder", void 0);
1256
- __decorate([
1257
- Property(true)
1258
- ], DropDownBase.prototype, "enabled", void 0);
1259
1264
  __decorate([
1260
1265
  Property([])
1261
1266
  ], DropDownBase.prototype, "dataSource", void 0);
@@ -23,6 +23,24 @@ export interface DropDownListModel extends DropDownBaseModel{
23
23
  */
24
24
  width?: string | number;
25
25
 
26
+ /**
27
+ * Specifies a value that indicates whether the component is enabled or not.
28
+ *
29
+ * @default true
30
+
31
+ */
32
+ enabled?: boolean;
33
+
34
+ /**
35
+ * Enable or disable persisting component's state between page reloads.
36
+ * If enabled, following list of states will be persisted.
37
+ * 1. value
38
+ *
39
+ * @default false
40
+
41
+ */
42
+ enablePersistence?: boolean;
43
+
26
44
  /**
27
45
  * Specifies the height of the popup list.
28
46
  * > For more details about the popup configuration refer to
@@ -119,6 +119,22 @@ export declare class DropDownList extends DropDownBase implements IInput {
119
119
  * @aspType string
120
120
  */
121
121
  width: string | number;
122
+ /**
123
+ * Specifies a value that indicates whether the component is enabled or not.
124
+ *
125
+ * @default true
126
+
127
+ */
128
+ enabled: boolean;
129
+ /**
130
+ * Enable or disable persisting component's state between page reloads.
131
+ * If enabled, following list of states will be persisted.
132
+ * 1. value
133
+ *
134
+ * @default false
135
+
136
+ */
137
+ enablePersistence: boolean;
122
138
  /**
123
139
  * Specifies the height of the popup list.
124
140
  * > For more details about the popup configuration refer to
@@ -511,6 +527,12 @@ export declare class DropDownList extends DropDownBase implements IInput {
511
527
  render(): void;
512
528
  private setFooterTemplate;
513
529
  private setHeaderTemplate;
530
+ /**
531
+ * Sets the enabled state to DropDownBase.
532
+ *
533
+ * @returns {void}
534
+ */
535
+ protected setEnabled(): void;
514
536
  protected setOldText(text: string): void;
515
537
  protected setOldValue(value: string | number | boolean): void;
516
538
  protected refreshPopup(): void;