@syncfusion/ej2-dropdowns 21.2.8 → 22.1.34

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 (162) hide show
  1. package/.eslintrc.json +1 -0
  2. package/CHANGELOG.md +35 -6
  3. package/README.md +201 -103
  4. package/dist/ej2-dropdowns.min.js +2 -2
  5. package/dist/ej2-dropdowns.umd.min.js +2 -2
  6. package/dist/ej2-dropdowns.umd.min.js.map +1 -1
  7. package/dist/es6/ej2-dropdowns.es2015.js +158 -41
  8. package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
  9. package/dist/es6/ej2-dropdowns.es5.js +158 -41
  10. package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
  11. package/dist/global/ej2-dropdowns.min.js +2 -2
  12. package/dist/global/ej2-dropdowns.min.js.map +1 -1
  13. package/dist/global/index.d.ts +1 -1
  14. package/package.json +11 -11
  15. package/src/auto-complete/auto-complete-model.d.ts +2 -1
  16. package/src/auto-complete/auto-complete.d.ts +2 -1
  17. package/src/auto-complete/auto-complete.js +1 -1
  18. package/src/combo-box/combo-box-model.d.ts +6 -3
  19. package/src/combo-box/combo-box.d.ts +6 -3
  20. package/src/drop-down-base/drop-down-base-model.d.ts +8 -4
  21. package/src/drop-down-base/drop-down-base.d.ts +8 -4
  22. package/src/drop-down-base/drop-down-base.js +21 -7
  23. package/src/drop-down-list/drop-down-list-model.d.ts +6 -3
  24. package/src/drop-down-list/drop-down-list.d.ts +6 -3
  25. package/src/drop-down-list/drop-down-list.js +23 -14
  26. package/src/drop-down-tree/drop-down-tree-model.d.ts +21 -6
  27. package/src/drop-down-tree/drop-down-tree.d.ts +55 -62
  28. package/src/drop-down-tree/drop-down-tree.js +1 -1
  29. package/src/list-box/list-box.d.ts +15 -0
  30. package/src/list-box/list-box.js +53 -3
  31. package/src/mention/mention-model.d.ts +4 -2
  32. package/src/mention/mention.d.ts +4 -2
  33. package/src/multi-select/multi-select-model.d.ts +15 -8
  34. package/src/multi-select/multi-select.d.ts +15 -7
  35. package/src/multi-select/multi-select.js +59 -15
  36. package/styles/auto-complete/_material3-dark-definition.scss +1 -0
  37. package/styles/auto-complete/_material3-definition.scss +2 -0
  38. package/styles/auto-complete/material3-dark.css +198 -0
  39. package/styles/auto-complete/material3-dark.scss +5 -0
  40. package/styles/auto-complete/material3.css +254 -0
  41. package/styles/auto-complete/material3.scss +5 -0
  42. package/styles/bootstrap-dark.css +212 -100
  43. package/styles/bootstrap.css +214 -101
  44. package/styles/bootstrap4.css +214 -101
  45. package/styles/bootstrap5-dark.css +212 -100
  46. package/styles/bootstrap5.css +212 -100
  47. package/styles/combo-box/_material3-dark-definition.scss +1 -0
  48. package/styles/combo-box/_material3-definition.scss +2 -0
  49. package/styles/combo-box/material3-dark.css +198 -0
  50. package/styles/combo-box/material3-dark.scss +5 -0
  51. package/styles/combo-box/material3.css +254 -0
  52. package/styles/combo-box/material3.scss +5 -0
  53. package/styles/drop-down-base/_layout.scss +3 -1
  54. package/styles/drop-down-base/_material3-dark-definition.scss +1 -0
  55. package/styles/drop-down-base/_material3-definition.scss +87 -0
  56. package/styles/drop-down-base/_theme.scss +10 -0
  57. package/styles/drop-down-base/bootstrap-dark.css +4 -0
  58. package/styles/drop-down-base/bootstrap.css +4 -0
  59. package/styles/drop-down-base/bootstrap4.css +4 -0
  60. package/styles/drop-down-base/bootstrap5-dark.css +4 -0
  61. package/styles/drop-down-base/bootstrap5.css +4 -0
  62. package/styles/drop-down-base/fabric-dark.css +4 -0
  63. package/styles/drop-down-base/fabric.css +4 -0
  64. package/styles/drop-down-base/fluent-dark.css +4 -0
  65. package/styles/drop-down-base/fluent.css +4 -0
  66. package/styles/drop-down-base/highcontrast-light.css +4 -0
  67. package/styles/drop-down-base/highcontrast.css +4 -0
  68. package/styles/drop-down-base/material-dark.css +4 -0
  69. package/styles/drop-down-base/material.css +4 -0
  70. package/styles/drop-down-base/material3-dark.css +439 -0
  71. package/styles/drop-down-base/material3-dark.scss +4 -0
  72. package/styles/drop-down-base/material3.css +495 -0
  73. package/styles/drop-down-base/material3.scss +4 -0
  74. package/styles/drop-down-base/tailwind-dark.css +4 -0
  75. package/styles/drop-down-base/tailwind.css +4 -0
  76. package/styles/drop-down-list/_layout.scss +15 -1
  77. package/styles/drop-down-list/_material3-dark-definition.scss +1 -0
  78. package/styles/drop-down-list/_material3-definition.scss +180 -0
  79. package/styles/drop-down-list/icons/_material3-dark.scss +1 -0
  80. package/styles/drop-down-list/material3-dark.css +503 -0
  81. package/styles/drop-down-list/material3-dark.scss +9 -0
  82. package/styles/drop-down-list/material3.css +559 -0
  83. package/styles/drop-down-list/material3.scss +9 -0
  84. package/styles/drop-down-tree/_layout.scss +13 -7
  85. package/styles/drop-down-tree/_material3-dark-definition.scss +1 -0
  86. package/styles/drop-down-tree/_material3-definition.scss +76 -0
  87. package/styles/drop-down-tree/_theme.scss +14 -2
  88. package/styles/drop-down-tree/icons/_material3-dark.scss +1 -0
  89. package/styles/drop-down-tree/icons/_material3.scss +1 -1
  90. package/styles/drop-down-tree/material3-dark.css +466 -0
  91. package/styles/drop-down-tree/material3-dark.scss +10 -0
  92. package/styles/drop-down-tree/material3.css +522 -0
  93. package/styles/drop-down-tree/material3.scss +10 -0
  94. package/styles/fabric-dark.css +212 -100
  95. package/styles/fabric.css +214 -101
  96. package/styles/fluent-dark.css +214 -101
  97. package/styles/fluent.css +214 -101
  98. package/styles/highcontrast-light.css +212 -100
  99. package/styles/highcontrast.css +214 -101
  100. package/styles/list-box/_layout.scss +17 -3
  101. package/styles/list-box/_material3-dark-definition.scss +1 -0
  102. package/styles/list-box/_material3-definition.scss +117 -0
  103. package/styles/list-box/_theme.scss +2 -1
  104. package/styles/list-box/bootstrap-dark.css +207 -99
  105. package/styles/list-box/bootstrap.css +209 -100
  106. package/styles/list-box/bootstrap4.css +209 -100
  107. package/styles/list-box/bootstrap5-dark.css +207 -99
  108. package/styles/list-box/bootstrap5.css +207 -99
  109. package/styles/list-box/fabric-dark.css +207 -99
  110. package/styles/list-box/fabric.css +209 -100
  111. package/styles/list-box/fluent-dark.css +209 -100
  112. package/styles/list-box/fluent.css +209 -100
  113. package/styles/list-box/highcontrast-light.css +207 -99
  114. package/styles/list-box/highcontrast.css +209 -100
  115. package/styles/list-box/icons/_material3-dark.scss +1 -0
  116. package/styles/list-box/material-dark.css +207 -99
  117. package/styles/list-box/material.css +209 -100
  118. package/styles/list-box/material3-dark.css +956 -0
  119. package/styles/list-box/material3-dark.scss +6 -0
  120. package/styles/list-box/material3.css +1012 -0
  121. package/styles/list-box/material3.scss +6 -0
  122. package/styles/list-box/tailwind-dark.css +209 -100
  123. package/styles/list-box/tailwind.css +209 -100
  124. package/styles/material-dark.css +212 -100
  125. package/styles/material.css +214 -101
  126. package/styles/material3-dark.css +4664 -0
  127. package/styles/material3-dark.scss +10 -0
  128. package/styles/material3.css +4720 -0
  129. package/styles/material3.scss +10 -0
  130. package/styles/mention/_material3-dark-definition.scss +1 -0
  131. package/styles/mention/_material3-definition.scss +1 -0
  132. package/styles/mention/material3-dark.css +87 -0
  133. package/styles/mention/material3-dark.scss +7 -0
  134. package/styles/mention/material3.css +143 -0
  135. package/styles/mention/material3.scss +7 -0
  136. package/styles/multi-select/_layout.scss +160 -7
  137. package/styles/multi-select/_material3-dark-definition.scss +1 -0
  138. package/styles/multi-select/_material3-definition.scss +246 -0
  139. package/styles/multi-select/_theme.scss +6 -0
  140. package/styles/multi-select/bootstrap-dark.css +1 -1
  141. package/styles/multi-select/bootstrap.css +1 -1
  142. package/styles/multi-select/bootstrap4.css +1 -1
  143. package/styles/multi-select/bootstrap5-dark.css +1 -1
  144. package/styles/multi-select/bootstrap5.css +1 -1
  145. package/styles/multi-select/fabric-dark.css +1 -1
  146. package/styles/multi-select/fabric.css +1 -1
  147. package/styles/multi-select/fluent-dark.css +1 -1
  148. package/styles/multi-select/fluent.css +1 -1
  149. package/styles/multi-select/highcontrast-light.css +1 -1
  150. package/styles/multi-select/highcontrast.css +1 -1
  151. package/styles/multi-select/icons/_material3-dark.scss +1 -0
  152. package/styles/multi-select/icons/_material3.scss +3 -4
  153. package/styles/multi-select/material-dark.css +1 -1
  154. package/styles/multi-select/material.css +1 -1
  155. package/styles/multi-select/material3-dark.css +2547 -0
  156. package/styles/multi-select/material3-dark.scss +10 -0
  157. package/styles/multi-select/material3.css +2603 -0
  158. package/styles/multi-select/material3.scss +10 -0
  159. package/styles/multi-select/tailwind-dark.css +1 -1
  160. package/styles/multi-select/tailwind.css +1 -1
  161. package/styles/tailwind-dark.css +214 -101
  162. package/styles/tailwind.css +214 -101
@@ -5,19 +5,15 @@ import { KeyboardEventArgs } from '@syncfusion/ej2-base';
5
5
  import { DataManager, Query } from '@syncfusion/ej2-data';
6
6
  import { Popup } from '@syncfusion/ej2-popups';
7
7
  import { DropDownTreeModel, FieldsModel, TreeSettingsModel } from './drop-down-tree-model';
8
- export declare type TreeFilterType =
9
8
  /**
10
- * Checks whether a value begins with the specified value.
11
- */
12
- 'StartsWith' |
13
- /**
14
- * Checks whether a value ends with the specified value.
15
- */
16
- 'EndsWith' |
17
- /**
18
- * Checks whether a value contains with specified value.
19
- */
20
- 'Contains';
9
+ * Specifies the different ways to filter values
10
+ * ```props
11
+ * StartsWith :- Checks whether a value begins with the specified value.
12
+ * EndsWith :- Checks whether a value ends with the specified value.
13
+ * Contains :- Checks whether a value contains with specified value.
14
+ * ```
15
+ */
16
+ export declare type TreeFilterType = 'StartsWith' | 'EndsWith' | 'Contains';
21
17
  export declare class Fields extends ChildProperty<Fields> {
22
18
  /**
23
19
  * This field specifies the child items or mapping field for the nested child items that contains an array of JSON objects.
@@ -222,53 +218,35 @@ export interface DdtKeyPressEventArgs {
222
218
  */
223
219
  event: KeyboardEventArgs;
224
220
  }
225
- export declare type Mode =
226
- /**
227
- * On blur component will act in the delimiter mode.
228
- */
229
- 'Default' |
230
- /**
231
- * Selected items will be visualized in the text content.
232
- */
233
- 'Delimiter' |
234
- /**
235
- * Selected items will be visualized in chip.
236
- */
237
- 'Box' |
238
- /**
239
- * Selected items will be visualized with the given custom template value
240
- */
241
- 'Custom';
242
- export declare type SortOrder =
243
- /**
244
- * Indicates that the nodes are not sorted.
245
- */
246
- 'None' |
247
221
  /**
248
- * Indicates that the nodes are sorted in the ascending order.
249
- */
250
- 'Ascending' |
251
- /**
252
- * Indicates that the nodes are sorted in the descending order
253
- */
254
- 'Descending';
255
- export declare type ExpandOn =
256
- /**
257
- * Determines automatically whether to trigger the single click or double-click event.
258
- */
259
- 'Auto' |
260
- /**
261
- * Triggers the single click event when an item is double-clicekd.
262
- */
263
- 'Click' |
222
+ * Configures visibility mode for component interaction when allowMultiSelection or checkbox is enabled.
223
+ * ```props
224
+ * Default :- On blur component will act in the delimiter mode.
225
+ * Delimiter :- Selected items will be visualized in the text content.
226
+ * Box :- Selected items will be visualized in chip.
227
+ * Custom :- Selected items will be visualized with the given custom template value.
228
+ * ```
229
+ */
230
+ export declare type Mode = 'Default' | 'Delimiter' | 'Box' | 'Custom';
264
231
  /**
265
- * Triggers the double-click event when an item is double-clicekd.
266
- */
267
- 'DblClick' |
232
+ * Specifies a value that indicates whether the items are sorted in the ascending or descending order, or not sorted at all.
233
+ * ```props
234
+ * None :- Indicates that the nodes are not sorted.
235
+ * Ascending :- Indicates that the nodes are sorted in the ascending order.
236
+ * Descending :- Indicates that the nodes are sorted in the descending order.
237
+ * ```
238
+ */
239
+ export declare type SortOrder = 'None' | 'Ascending' | 'Descending';
268
240
  /**
269
- * Does not trigger any event when the user double-clicks on an item.
270
- */
271
- 'None';
241
+ * Specifies the expansion of tree nodes within the Dropdown Tree.
242
+ * ```props
243
+ * Auto :- In desktop, the expand or collapse operation happens when you double-click the node, and in mobile devices it happens on single-tap.
244
+ * Click :- The expand or collapse operation happens when you perform single-click/tap on the pop-up item in both desktop and mobile devices.
245
+ * DblClick :- The expand or collapse operation happens when you perform a double-click/tap on the pop-up item in both desktop and mobile devices.
246
+ * None :- The expand or collapse operation will not happen when you perform single-click/tap or double-click/tap on the pop-up items in both desktop and mobile devices.
247
+ * ```
248
+ */
249
+ export declare type ExpandOn = 'Auto' | 'Click' | 'DblClick' | 'None';
272
250
  /**
273
251
  * The Dropdown Tree control allows you to select single or multiple values from hierarchical data in a tree-like structure.
274
252
  * It has several out-of-the-box features, such as data binding, check boxes, templates, filter,
@@ -351,8 +329,9 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
351
329
  * Dropdown Tree component when the data fetch request from the remote server fails.
352
330
  *
353
331
  * @default 'The Request Failed'
332
+ * @aspType string
354
333
  */
355
- actionFailureTemplate: string;
334
+ actionFailureTemplate: string | Function;
356
335
  /**
357
336
  * When allowFiltering is set to true, it shows the filter bar (search text box) of the component.
358
337
  * The filter action retrieves matched items through the **filtering** event based on the characters typed in the search text box.
@@ -388,8 +367,9 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
388
367
  * added to the input instead of the selected item text in the Dropdown Tree when the multi-selection or checkbox support is enabled.
389
368
  *
390
369
  * @default "${value.length} item(s) selected"
370
+ * @aspType string
391
371
  */
392
- customTemplate: string;
372
+ customTemplate: string | Function;
393
373
  /**
394
374
  * Defines the value separator character in the input element when multi-selection or checkbox is enabled in the Dropdown Tree.
395
375
  * The delimiter character is applicable only for **default** and **delimiter** visibility modes.
@@ -466,8 +446,12 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
466
446
  * By default, the footerTemplate will be null and there will be no footer container for the pop-up list.
467
447
  *
468
448
  * @default null
449
+ * @angularType string | object
450
+ * @reactType string | function | JSX.Element
451
+ * @vueType string | function
452
+ * @aspType string
469
453
  */
470
- footerTemplate: string;
454
+ footerTemplate: string | Function;
471
455
  /**
472
456
  * When **ignoreAccent** is set to true, then it ignores the diacritic characters or accents when filtering.
473
457
  */
@@ -483,8 +467,12 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
483
467
  * By default, the headerTemplate will be null and there will be no header container for the pop-up list.
484
468
  *
485
469
  * @default null
470
+ * @angularType string | object
471
+ * @reactType string | function | JSX.Element
472
+ * @vueType string | function
473
+ * @aspType string
486
474
  */
487
- headerTemplate: string;
475
+ headerTemplate: string | Function;
488
476
  /**
489
477
  * Allows additional HTML attributes such as title, name, etc., and accepts n number of attributes in a key-value pair format.
490
478
  *
@@ -500,8 +488,12 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
500
488
  * or HTML element ID holding the content.
501
489
  *
502
490
  * @default null
491
+ * @angularType string | object
492
+ * @reactType string | function | JSX.Element
493
+ * @vueType string | function
494
+ * @aspType string
503
495
  */
504
- itemTemplate: string;
496
+ itemTemplate: string | Function;
505
497
  /**
506
498
  * Configures visibility mode for component interaction when allowMultiSelection or checkbox is enabled.
507
499
  * Different modes are:
@@ -517,8 +509,9 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
517
509
  * to be displayed within the pop-up.
518
510
  *
519
511
  * @default 'No Records Found'
512
+ * @aspType string
520
513
  */
521
- noRecordsTemplate: string;
514
+ noRecordsTemplate: string | Function;
522
515
  /**
523
516
  * Specifies a short hint that describes the expected value of the Dropdown Tree component.
524
517
  *
@@ -2372,7 +2372,7 @@ var DropDownTree = /** @class */ (function (_super) {
2372
2372
  // eslint-disable-next-line
2373
2373
  var e = void 0;
2374
2374
  try {
2375
- if (document.querySelectorAll(template).length) {
2375
+ if (typeof template !== 'function' && document.querySelectorAll(template).length) {
2376
2376
  return compile(document.querySelector(template).innerHTML.trim());
2377
2377
  }
2378
2378
  else {
@@ -132,6 +132,7 @@ export declare class ListBox extends DropDownBase {
132
132
  private toolbarAction;
133
133
  private isDataSourceUpdate;
134
134
  private dragValue;
135
+ private customDraggedItem;
135
136
  /**
136
137
  * Sets the CSS classes to root element of this component, which helps to customize the
137
138
  * complete styles.
@@ -457,6 +458,20 @@ export declare class ListBox extends DropDownBase {
457
458
  * @returns {void}
458
459
  */
459
460
  moveDown(value?: string[] | number[] | boolean[]): void;
461
+ /**
462
+ * Moves the given value(s) / selected value(s) in Top of the list.
463
+ *
464
+ * @param { string[] | number[] | boolean[] } value - Specifies the value(s).
465
+ * @returns {void}
466
+ */
467
+ moveTop(value?: string[] | number[] | boolean[]): void;
468
+ /**
469
+ * Moves the given value(s) / selected value(s) in bottom of the list.
470
+ *
471
+ * @param { string[] | number[] | boolean[] } value - Specifies the value(s).
472
+ * @returns {void}
473
+ */
474
+ moveBottom(value?: string[] | number[] | boolean[]): void;
460
475
  /**
461
476
  * Moves the given value(s) / selected value(s) to the given / default scoped ListBox.
462
477
  *
@@ -472,6 +472,7 @@ var ListBox = /** @class */ (function (_super) {
472
472
  this.trigger('drag', this.getDragArgs(args));
473
473
  };
474
474
  ListBox.prototype.beforeDragEnd = function (args) {
475
+ var items = [];
475
476
  this.dragValue = this.getFormattedValue(args.droppedElement.getAttribute('data-value'));
476
477
  if (this.value.indexOf(this.dragValue) > -1) {
477
478
  args.items = this.getDataByValues(this.value);
@@ -479,7 +480,11 @@ var ListBox = /** @class */ (function (_super) {
479
480
  else {
480
481
  args.items = this.getDataByValues([this.dragValue]);
481
482
  }
483
+ extend(items, args.items);
482
484
  this.trigger('beforeDrop', args);
485
+ if (args.items !== items) {
486
+ this.customDraggedItem = args.items;
487
+ }
483
488
  };
484
489
  ListBox.prototype.dragEnd = function (args) {
485
490
  var _this = this;
@@ -527,6 +532,12 @@ var ListBox = /** @class */ (function (_super) {
527
532
  liColl.splice(toIdx_1, 0, liColl.splice(rIdx, 1)[0]);
528
533
  if (this.allowDragAll) {
529
534
  selectedOptions = this.value && Array.prototype.indexOf.call(this.value, dropValue) > -1 ? this.value : [dropValue];
535
+ if (!isNullOrUndefined(this.customDraggedItem)) {
536
+ selectedOptions = [];
537
+ this.customDraggedItem.forEach(function (item) {
538
+ selectedOptions.push(getValue(_this.fields.value, item));
539
+ });
540
+ }
530
541
  selectedOptions.forEach(function (value) {
531
542
  if (value !== dropValue) {
532
543
  var idx = listData.indexOf(_this.getDataByValue(value));
@@ -559,6 +570,12 @@ var ListBox = /** @class */ (function (_super) {
559
570
  sortedData = [].slice.call(listObj.sortedData);
560
571
  selectedOptions = (this.value && Array.prototype.indexOf.call(this.value, dropValue) > -1 && this.allowDragAll)
561
572
  ? this.value : [dropValue];
573
+ if (!isNullOrUndefined(this.customDraggedItem)) {
574
+ selectedOptions = [];
575
+ this.customDraggedItem.forEach(function (item) {
576
+ selectedOptions.push(getValue(_this.fields.value, item));
577
+ });
578
+ }
562
579
  var fListData_1 = [].slice.call(this.listData);
563
580
  var fSortData_1 = [].slice.call(this.sortedData);
564
581
  selectedOptions.forEach(function (value, index) {
@@ -629,6 +646,9 @@ var ListBox = /** @class */ (function (_super) {
629
646
  var dragArgs1 = extend(destArgs, { currentData: listData });
630
647
  dragArgs = extend(dragArgs, { destination: dragArgs1 });
631
648
  }
649
+ if (!isNullOrUndefined(this.customDraggedItem)) {
650
+ dragArgs.items = this.customDraggedItem;
651
+ }
632
652
  this.trigger('drop', dragArgs);
633
653
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
634
654
  var liCollElem = dragArgs.elements;
@@ -890,6 +910,26 @@ var ListBox = /** @class */ (function (_super) {
890
910
  var elem = (value) ? this.getElemByValue(value) : this.getSelectedItems();
891
911
  this.moveUpDown(false, false, elem);
892
912
  };
913
+ /**
914
+ * Moves the given value(s) / selected value(s) in Top of the list.
915
+ *
916
+ * @param { string[] | number[] | boolean[] } value - Specifies the value(s).
917
+ * @returns {void}
918
+ */
919
+ ListBox.prototype.moveTop = function (value) {
920
+ var elem = (value) ? this.getElemByValue(value) : this.getSelectedItems();
921
+ this.moveUpDown(null, false, elem, true);
922
+ };
923
+ /**
924
+ * Moves the given value(s) / selected value(s) in bottom of the list.
925
+ *
926
+ * @param { string[] | number[] | boolean[] } value - Specifies the value(s).
927
+ * @returns {void}
928
+ */
929
+ ListBox.prototype.moveBottom = function (value) {
930
+ var elem = (value) ? this.getElemByValue(value) : this.getSelectedItems();
931
+ this.moveUpDown(true, false, elem, false, true);
932
+ };
893
933
  /**
894
934
  * Moves the given value(s) / selected value(s) to the given / default scoped ListBox.
895
935
  *
@@ -1348,7 +1388,7 @@ var ListBox = /** @class */ (function (_super) {
1348
1388
  }
1349
1389
  }
1350
1390
  };
1351
- ListBox.prototype.moveUpDown = function (isUp, isKey, value) {
1391
+ ListBox.prototype.moveUpDown = function (isUp, isKey, value, isTop, isBottom) {
1352
1392
  var _this = this;
1353
1393
  var elems = this.getSelectedItems();
1354
1394
  if (value) {
@@ -1367,8 +1407,18 @@ var ListBox = /** @class */ (function (_super) {
1367
1407
  (isUp ? elems : elems.reverse()).forEach(function (ele) {
1368
1408
  var jsonToIdx = Array.prototype.indexOf.call(_this.ulElement.querySelectorAll('.e-list-item'), ele);
1369
1409
  var idx = Array.prototype.indexOf.call(_this.ulElement.children, ele);
1370
- moveTo(_this.ulElement, _this.ulElement, [idx], isUp ? idx - 1 : idx + 2);
1371
- _this.changeData(idx, isUp ? idx - 1 : idx + 1, isUp ? jsonToIdx - 1 : jsonToIdx + 1, ele);
1410
+ if (isTop) {
1411
+ moveTo(_this.ulElement, _this.ulElement, [idx], 0);
1412
+ _this.changeData(idx, 0, jsonToIdx, ele);
1413
+ }
1414
+ else if (isBottom) {
1415
+ moveTo(_this.ulElement, _this.ulElement, [idx], _this.ulElement.querySelectorAll('.e-list-item').length);
1416
+ _this.changeData(idx, _this.ulElement.querySelectorAll('.e-list-item').length, jsonToIdx, ele);
1417
+ }
1418
+ else {
1419
+ moveTo(_this.ulElement, _this.ulElement, [idx], isUp ? idx - 1 : idx + 2);
1420
+ _this.changeData(idx, isUp ? idx - 1 : idx + 1, isUp ? jsonToIdx - 1 : jsonToIdx + 1, ele);
1421
+ }
1372
1422
  });
1373
1423
  this.trigger('actionComplete', { items: tempItems, eventName: this.toolbarAction });
1374
1424
  elems[0].focus();
@@ -112,8 +112,9 @@ export interface MentionModel {
112
112
  * Specifies the template for the selected value from the suggestion list.
113
113
  *
114
114
  * @default null
115
+ * @aspType string
115
116
  */
116
- displayTemplate?: string;
117
+ displayTemplate?: string | Function;
117
118
 
118
119
  /**
119
120
  * Specifies the template for the suggestion list.
@@ -133,8 +134,9 @@ export interface MentionModel {
133
134
  * Specifies the template for showing until data is loaded in the popup.
134
135
  *
135
136
  * @default null
137
+ * @aspType string
136
138
  */
137
- spinnerTemplate?: string;
139
+ spinnerTemplate?: string | Function;
138
140
 
139
141
  /**
140
142
  * Specifies the target selector where the mention component needs to be displayed.
@@ -149,8 +149,9 @@ export declare class Mention extends DropDownBase {
149
149
  * Specifies the template for the selected value from the suggestion list.
150
150
  *
151
151
  * @default null
152
+ * @aspType string
152
153
  */
153
- displayTemplate: string;
154
+ displayTemplate: string | Function;
154
155
  /**
155
156
  * Specifies the template for the suggestion list.
156
157
  *
@@ -167,8 +168,9 @@ export declare class Mention extends DropDownBase {
167
168
  * Specifies the template for showing until data is loaded in the popup.
168
169
  *
169
170
  * @default null
171
+ * @aspType string
170
172
  */
171
- spinnerTemplate: string;
173
+ spinnerTemplate: string | Function;
172
174
  /**
173
175
  * Specifies the target selector where the mention component needs to be displayed.
174
176
  * The mention component listens to the target's user input and displays suggestions as soon as the user inputs the mention character.
@@ -1,4 +1,4 @@
1
- import { DropDownBase, SelectEventArgs, dropDownBaseClasses, PopupEventArgs, FilteringEventArgs } from '../drop-down-base/drop-down-base';import { FocusEventArgs, BeforeOpenEventArgs, FilterType, FieldSettings, ResultData } from '../drop-down-base/drop-down-base';import { FieldSettingsModel } from '../drop-down-base/drop-down-base-model';import { Popup, createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';import { IInput, FloatLabelType, Input } from '@syncfusion/ej2-inputs';import { attributes, setValue, SanitizeHtmlHelper, getValue } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, extend } from '@syncfusion/ej2-base';import { EventHandler, Property, Event, compile, L10n, EmitType, KeyboardEventArgs } from '@syncfusion/ej2-base';import { Animation, AnimationModel, Browser, prepend, Complex } from '@syncfusion/ej2-base';import { Search } from '../common/incremental-search';import { append, addClass, removeClass, closest, detach, remove, select, selectAll } from '@syncfusion/ej2-base';import { getUniqueID, formatUnit, isNullOrUndefined, isUndefined, ModuleDeclaration } from '@syncfusion/ej2-base';import { DataManager, Query, Predicate } from '@syncfusion/ej2-data';import { SortOrder } from '@syncfusion/ej2-lists';import { createFloatLabel, removeFloating, floatLabelFocus, floatLabelBlur, encodePlaceholder } from './float-label';
1
+ import { DropDownBase, SelectEventArgs, dropDownBaseClasses, PopupEventArgs, FilteringEventArgs } from '../drop-down-base/drop-down-base';import { FocusEventArgs, BeforeOpenEventArgs, FilterType, FieldSettings, ResultData } from '../drop-down-base/drop-down-base';import { FieldSettingsModel } from '../drop-down-base/drop-down-base-model';import { Popup, createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';import { IInput, FloatLabelType, Input } from '@syncfusion/ej2-inputs';import { attributes, setValue, SanitizeHtmlHelper, getValue } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, extend } from '@syncfusion/ej2-base';import { EventHandler, Property, Event, compile, L10n, EmitType, KeyboardEventArgs } from '@syncfusion/ej2-base';import { Animation, AnimationModel, Browser, prepend, Complex } from '@syncfusion/ej2-base';import { Search } from '../common/incremental-search';import { append, addClass, removeClass, closest, detach, remove, select, selectAll } from '@syncfusion/ej2-base';import { getUniqueID, formatUnit, isNullOrUndefined, isUndefined, ModuleDeclaration } from '@syncfusion/ej2-base';import { DataManager, Query, Predicate, JsonAdaptor } from '@syncfusion/ej2-data';import { SortOrder } from '@syncfusion/ej2-lists';import { createFloatLabel, removeFloating, floatLabelFocus, floatLabelBlur, encodePlaceholder } from './float-label';
2
2
  import {visualMode,MultiSelectChangeEventArgs,RemoveEventArgs,ISelectAllEventArgs,TaggingEventArgs,CustomValueEventArgs} from "./multi-select";
3
3
  import {DropDownBaseModel} from "../drop-down-base/drop-down-base-model";
4
4
 
@@ -43,24 +43,27 @@ export interface MultiSelectModel extends DropDownBaseModel{
43
43
  * Accepts the template design and assigns it to the group headers present in the MultiSelect popup list.
44
44
  *
45
45
  * @default null
46
+ * @aspType string
46
47
  */
47
- groupTemplate?: string;
48
+ groupTemplate?: string | Function;
48
49
 
49
50
  /**
50
51
  * Accepts the template design and assigns it to popup list of MultiSelect component
51
52
  * when no data is available on the component.
52
53
  *
53
54
  * @default 'No records found'
55
+ * @aspType string
54
56
  */
55
- noRecordsTemplate?: string;
57
+ noRecordsTemplate?: string | Function;
56
58
 
57
59
  /**
58
60
  * Accepts the template and assigns it to the popup list content of the MultiSelect component
59
61
  * when the data fetch request from the remote server fails.
60
62
  *
61
63
  * @default 'Request failed'
64
+ * @aspType string
62
65
  */
63
- actionFailureTemplate?: string;
66
+ actionFailureTemplate?: string | Function;
64
67
 
65
68
  /**
66
69
  * Specifies the `sortOrder` to sort the data source. The available type of sort orders are
@@ -240,24 +243,27 @@ export interface MultiSelectModel extends DropDownBaseModel{
240
243
  * For EX: We have expression evolution as like ES6 expression string literals.
241
244
  *
242
245
  * @default null
246
+ * @aspType string
243
247
  */
244
- valueTemplate?: string;
248
+ valueTemplate?: string | Function;
245
249
 
246
250
  /**
247
251
  * Accepts the template design and assigns it to the header container of the popup list.
248
252
  * > For more details about the available template options refer to [`Template`](../../multi-select/templates) documentation.
249
253
  *
250
254
  * @default null
255
+ * @aspType string
251
256
  */
252
- headerTemplate?: string;
257
+ headerTemplate?: string | Function;
253
258
 
254
259
  /**
255
260
  * Accepts the template design and assigns it to the footer container of the popup list.
256
261
  * > For more details about the available template options refer to [`Template`](../../multi-select/templates) documentation.
257
262
  *
258
263
  * @default null
264
+ * @aspType string
259
265
  */
260
- footerTemplate?: string;
266
+ footerTemplate?: string | Function;
261
267
 
262
268
  /**
263
269
  * Accepts the template design and assigns it to each list item present in the popup.
@@ -268,8 +274,9 @@ export interface MultiSelectModel extends DropDownBaseModel{
268
274
  * For EX: We have expression evolution as like ES6 expression string literals.
269
275
  *
270
276
  * @default null
277
+ * @aspType string
271
278
  */
272
- itemTemplate?: string;
279
+ itemTemplate?: string | Function;
273
280
 
274
281
  /**
275
282
  * To enable the filtering option in this component.
@@ -48,6 +48,7 @@ export declare class MultiSelect extends DropDownBase implements IInput {
48
48
  private clearIconWidth;
49
49
  private previousFilterText;
50
50
  private selectedElementID;
51
+ private focusFirstListItem;
51
52
  /**
52
53
  * The `fields` property maps the columns of the data table and binds the data to the component.
53
54
  * * text - Maps the text column from data table for each list item.
@@ -82,22 +83,25 @@ export declare class MultiSelect extends DropDownBase implements IInput {
82
83
  * Accepts the template design and assigns it to the group headers present in the MultiSelect popup list.
83
84
  *
84
85
  * @default null
86
+ * @aspType string
85
87
  */
86
- groupTemplate: string;
88
+ groupTemplate: string | Function;
87
89
  /**
88
90
  * Accepts the template design and assigns it to popup list of MultiSelect component
89
91
  * when no data is available on the component.
90
92
  *
91
93
  * @default 'No records found'
94
+ * @aspType string
92
95
  */
93
- noRecordsTemplate: string;
96
+ noRecordsTemplate: string | Function;
94
97
  /**
95
98
  * Accepts the template and assigns it to the popup list content of the MultiSelect component
96
99
  * when the data fetch request from the remote server fails.
97
100
  *
98
101
  * @default 'Request failed'
102
+ * @aspType string
99
103
  */
100
- actionFailureTemplate: string;
104
+ actionFailureTemplate: string | Function;
101
105
  /**
102
106
  * Specifies the `sortOrder` to sort the data source. The available type of sort orders are
103
107
  * * `None` - The data source is not sorting.
@@ -263,22 +267,25 @@ export declare class MultiSelect extends DropDownBase implements IInput {
263
267
  * For EX: We have expression evolution as like ES6 expression string literals.
264
268
  *
265
269
  * @default null
270
+ * @aspType string
266
271
  */
267
- valueTemplate: string;
272
+ valueTemplate: string | Function;
268
273
  /**
269
274
  * Accepts the template design and assigns it to the header container of the popup list.
270
275
  * > For more details about the available template options refer to [`Template`](../../multi-select/templates) documentation.
271
276
  *
272
277
  * @default null
278
+ * @aspType string
273
279
  */
274
- headerTemplate: string;
280
+ headerTemplate: string | Function;
275
281
  /**
276
282
  * Accepts the template design and assigns it to the footer container of the popup list.
277
283
  * > For more details about the available template options refer to [`Template`](../../multi-select/templates) documentation.
278
284
  *
279
285
  * @default null
286
+ * @aspType string
280
287
  */
281
- footerTemplate: string;
288
+ footerTemplate: string | Function;
282
289
  /**
283
290
  * Accepts the template design and assigns it to each list item present in the popup.
284
291
  * > For more details about the available template options refer to [`Template`](../../multi-select/templates) documentation.
@@ -288,8 +295,9 @@ export declare class MultiSelect extends DropDownBase implements IInput {
288
295
  * For EX: We have expression evolution as like ES6 expression string literals.
289
296
  *
290
297
  * @default null
298
+ * @aspType string
291
299
  */
292
- itemTemplate: string;
300
+ itemTemplate: string | Function;
293
301
  /**
294
302
  * To enable the filtering option in this component.
295
303
  * Filter action performs when type in search box and collect the matched item through `filtering` event.