@syncfusion/ej2-lists 19.2.49 → 19.3.44

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 (42) hide show
  1. package/.eslintrc.json +1 -1
  2. package/CHANGELOG.md +16 -0
  3. package/dist/ej2-lists.umd.min.js +2 -2
  4. package/dist/ej2-lists.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-lists.es2015.js +243 -685
  6. package/dist/es6/ej2-lists.es2015.js.map +1 -1
  7. package/dist/es6/ej2-lists.es5.js +243 -688
  8. package/dist/es6/ej2-lists.es5.js.map +1 -1
  9. package/dist/global/ej2-lists.min.js +2 -2
  10. package/dist/global/ej2-lists.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +8 -8
  13. package/src/common/list-base.d.ts +1 -16
  14. package/src/common/list-base.js +19 -12
  15. package/src/list-view/list-view-model.d.ts +1 -6
  16. package/src/list-view/list-view.d.ts +3 -19
  17. package/src/list-view/list-view.js +163 -460
  18. package/src/list-view/virtualization.js +56 -204
  19. package/src/sortable/sortable-model.d.ts +1 -1
  20. package/src/sortable/sortable.js +3 -9
  21. package/styles/bootstrap5-dark.css +533 -0
  22. package/styles/bootstrap5-dark.scss +2 -0
  23. package/styles/bootstrap5.css +533 -0
  24. package/styles/bootstrap5.scss +2 -0
  25. package/styles/list-view/_bootstrap5-dark-definition.scss +1 -0
  26. package/styles/list-view/_bootstrap5-definition.scss +129 -0
  27. package/styles/list-view/_layout.scss +26 -26
  28. package/styles/list-view/_tailwind-dark-definition.scss +1 -116
  29. package/styles/list-view/_tailwind-definition.scss +33 -29
  30. package/styles/list-view/_theme.scss +35 -10
  31. package/styles/list-view/bootstrap5-dark.css +506 -0
  32. package/styles/list-view/bootstrap5-dark.scss +5 -0
  33. package/styles/list-view/bootstrap5.css +506 -0
  34. package/styles/list-view/bootstrap5.scss +5 -0
  35. package/styles/list-view/icons/_bootstrap5-dark.scss +1 -0
  36. package/styles/list-view/icons/_bootstrap5.scss +8 -0
  37. package/styles/list-view/material-dark.css +1 -1
  38. package/styles/material-dark.css +1 -1
  39. package/styles/sortable/bootstrap5-dark.css +26 -0
  40. package/styles/sortable/bootstrap5-dark.scss +2 -0
  41. package/styles/sortable/bootstrap5.css +26 -0
  42. package/styles/sortable/bootstrap5.scss +2 -0
@@ -1,6 +1,5 @@
1
1
  import { classNames } from './list-view';
2
2
  import { EventHandler, append, isNullOrUndefined, detach, removeClass, addClass, compile, formatUnit } from '@syncfusion/ej2-base';
3
- import { isBlazor, debounce } from '@syncfusion/ej2-base';
4
3
  import { ListBase } from '../common/list-base';
5
4
  import { DataManager } from '@syncfusion/ej2-data';
6
5
  var listElementCount = 1.5;
@@ -27,66 +26,43 @@ var Virtualization = /** @class */ (function () {
27
26
  this.wireScrollEvent(false);
28
27
  var curViewDS = this.listViewInstance.curViewDS;
29
28
  var firstDs = curViewDS.slice(0, 1);
30
- if (!(isBlazor() || this.listViewInstance.isServerRendered)) {
31
- this.listViewInstance.ulElement = this.listViewInstance.curUL = ListBase.createList(
32
- // eslint-disable-next-line
33
- this.listViewInstance.createElement, firstDs, this.listViewInstance.listBaseOption, null, this.listViewInstance);
34
- this.listViewInstance.contentContainer = this.listViewInstance.createElement('div', { className: classNames.content });
35
- this.listViewInstance.element.appendChild(this.listViewInstance.contentContainer);
36
- this.listViewInstance.contentContainer.appendChild(this.listViewInstance.ulElement);
37
- }
29
+ this.listViewInstance.ulElement = this.listViewInstance.curUL = ListBase.createList(
30
+ // eslint-disable-next-line
31
+ this.listViewInstance.createElement, firstDs, this.listViewInstance.listBaseOption, null, this.listViewInstance);
32
+ this.listViewInstance.contentContainer = this.listViewInstance.createElement('div', { className: classNames.content });
33
+ this.listViewInstance.element.appendChild(this.listViewInstance.contentContainer);
34
+ this.listViewInstance.contentContainer.appendChild(this.listViewInstance.ulElement);
38
35
  this.listItemHeight = this.listViewInstance.ulElement.firstElementChild.getBoundingClientRect().height;
39
36
  this.expectedDomItemCount = this.ValidateItemCount(10000);
40
37
  this.domItemCount = this.ValidateItemCount(Object.keys(this.listViewInstance.curViewDS).length);
41
38
  this.uiFirstIndex = 0;
42
39
  this.uiLastIndex = this.domItemCount - 1;
43
40
  var otherDs = curViewDS.slice(1, this.domItemCount);
44
- if (!(isBlazor() || this.listViewInstance.isServerRendered)) {
45
- var listItems = ListBase.createListItemFromJson(
46
- // eslint-disable-next-line
47
- this.listViewInstance.createElement, otherDs, this.listViewInstance.listBaseOption, null, null, this.listViewInstance);
48
- append(listItems, this.listViewInstance.ulElement);
49
- this.listViewInstance.liCollection = this.listViewInstance.curUL.querySelectorAll('li');
50
- this.topElement = this.listViewInstance.createElement('div');
51
- this.listViewInstance.ulElement.insertBefore(this.topElement, this.listViewInstance.ulElement.firstElementChild);
52
- this.bottomElement = this.listViewInstance.createElement('div');
53
- this.listViewInstance.ulElement.insertBefore(this.bottomElement, null);
54
- this.totalHeight = (Object.keys(curViewDS).length * this.listItemHeight) - (this.domItemCount * this.listItemHeight);
55
- this.topElement.style.height = 0 + 'px';
56
- this.bottomElement.style.height = this.totalHeight + 'px';
57
- this.topElementHeight = 0;
58
- this.bottomElementHeight = this.totalHeight;
59
- }
60
- else {
61
- this.listViewInstance.contentContainer = this.listViewInstance.element.querySelector('.e-content');
62
- this.listViewInstance.liCollection = this.listViewInstance.curUL.querySelectorAll('li');
63
- }
41
+ var listItems = ListBase.createListItemFromJson(
42
+ // eslint-disable-next-line
43
+ this.listViewInstance.createElement, otherDs, this.listViewInstance.listBaseOption, null, null, this.listViewInstance);
44
+ append(listItems, this.listViewInstance.ulElement);
45
+ this.listViewInstance.liCollection = this.listViewInstance.curUL.querySelectorAll('li');
46
+ this.topElement = this.listViewInstance.createElement('div');
47
+ this.listViewInstance.ulElement.insertBefore(this.topElement, this.listViewInstance.ulElement.firstElementChild);
48
+ this.bottomElement = this.listViewInstance.createElement('div');
49
+ this.listViewInstance.ulElement.insertBefore(this.bottomElement, null);
50
+ this.totalHeight = (Object.keys(curViewDS).length * this.listItemHeight) - (this.domItemCount * this.listItemHeight);
51
+ this.topElement.style.height = 0 + 'px';
52
+ this.bottomElement.style.height = this.totalHeight + 'px';
53
+ this.topElementHeight = 0;
54
+ this.bottomElementHeight = this.totalHeight;
64
55
  this.listDiff = 0;
65
56
  this.uiIndicesInitialization();
66
57
  };
67
58
  Virtualization.prototype.wireScrollEvent = function (destroy) {
68
59
  if (!destroy) {
69
- if (!(isBlazor() && this.listViewInstance.isServerRendered)) {
70
- if (this.listViewInstance.isWindow) {
71
- this.onVirtualScroll = this.onVirtualUiScroll.bind(this);
72
- window.addEventListener('scroll', this.onVirtualScroll);
73
- }
74
- else {
75
- EventHandler.add(this.listViewInstance.element, 'scroll', this.onVirtualUiScroll, this);
76
- }
60
+ if (this.listViewInstance.isWindow) {
61
+ this.onVirtualScroll = this.onVirtualUiScroll.bind(this);
62
+ window.addEventListener('scroll', this.onVirtualScroll);
77
63
  }
78
64
  else {
79
- if (this.listViewInstance.isWindow) {
80
- // eslint-disable-next-line
81
- this.onVirtualScroll = debounce(this.onVirtualUiScroll.bind(this), 350);
82
- this.updateUl = this.updateUlContainer.bind(this);
83
- window.addEventListener('scroll', this.onVirtualScroll);
84
- window.addEventListener('scroll', this.updateUl);
85
- }
86
- else {
87
- EventHandler.add(this.listViewInstance.element, 'scroll', debounce(this.onVirtualUiScroll, 350), this);
88
- EventHandler.add(this.listViewInstance.element, 'scroll', this.updateUlContainer, this);
89
- }
65
+ EventHandler.add(this.listViewInstance.element, 'scroll', this.onVirtualUiScroll, this);
90
66
  }
91
67
  }
92
68
  else {
@@ -165,16 +141,10 @@ var Virtualization = /** @class */ (function () {
165
141
  Virtualization.prototype.refreshItemHeight = function () {
166
142
  if (this.listViewInstance.curViewDS.length) {
167
143
  var curViewDS = this.listViewInstance.curViewDS;
168
- if (isBlazor() && this.listViewInstance.isServerRendered) {
169
- this.listViewInstance.ulElement.children[0].style.height =
170
- (this.listViewInstance.liElementHeight * (Object.keys(curViewDS).length)) + 'px';
171
- }
172
- else {
173
- this.listItemHeight = this.topElement.nextSibling.getBoundingClientRect().height;
174
- this.totalHeight = (Object.keys(curViewDS).length * this.listItemHeight) - (this.domItemCount * this.listItemHeight);
175
- this.bottomElementHeight = this.totalHeight;
176
- this.bottomElement.style.height = this.totalHeight + 'px';
177
- }
144
+ this.listItemHeight = this.topElement.nextSibling.getBoundingClientRect().height;
145
+ this.totalHeight = (Object.keys(curViewDS).length * this.listItemHeight) - (this.domItemCount * this.listItemHeight);
146
+ this.bottomElementHeight = this.totalHeight;
147
+ this.bottomElement.style.height = this.totalHeight + 'px';
178
148
  }
179
149
  };
180
150
  Virtualization.prototype.getscrollerHeight = function (startingHeight) {
@@ -198,54 +168,31 @@ var Virtualization = /** @class */ (function () {
198
168
  this.bottomElementHeight = this.totalHeight - this.topElementHeight;
199
169
  _a = scroll <= this.totalHeight ?
200
170
  [this.topElementHeight, this.bottomElementHeight] : [this.totalHeight, 0], this.topElementHeight = _a[0], this.bottomElementHeight = _a[1];
201
- if (isBlazor() && this.listViewInstance.isServerRendered) {
202
- var listDiff = void 0;
203
- if (isNullOrUndefined(this.listViewInstance.liElementHeight)) {
204
- this.listViewInstance.updateLiElementHeight();
205
- }
206
- if (this.listViewInstance.isWindow) {
207
- listDiff = Math.round(document.documentElement.scrollTop / this.listViewInstance.liElementHeight);
208
- }
209
- else {
210
- // eslint-disable-next-line
211
- listDiff = Math.round(e.target.scrollTop / this.listViewInstance.liElementHeight);
212
- }
213
- if ((listDiff - 2) - this.elementDifference >= 3 || (listDiff - 2) - this.elementDifference <= -1) {
214
- var args = { listDiff: listDiff - 2, selectedItems: this.listViewInstance.previousSelectedItems };
215
- this.listViewInstance.interopAdaptor.invokeMethodAsync('VirtalScrolling', args);
216
- if (this.listViewInstance.ulElement.querySelector('.e-focused')) {
217
- this.listViewInstance.ulElement.querySelector('.e-focused').classList.remove('e-focused');
171
+ if (this.topElementHeight !== parseFloat(this.topElement.style.height)) {
172
+ this.topElement.style.height = this.topElementHeight + 'px';
173
+ this.bottomElement.style.height = this.bottomElementHeight + 'px';
174
+ if (scroll > this.scrollPosition) {
175
+ var listDiff = Math.round(((this.topElementHeight / this.listItemHeight) - this.listDiff));
176
+ if (listDiff > (this.expectedDomItemCount + 5)) {
177
+ this.onLongScroll(listDiff, true);
178
+ }
179
+ else {
180
+ this.onNormalScroll(listDiff, true);
218
181
  }
219
- this.elementDifference = listDiff - 2;
220
182
  }
221
- }
222
- else {
223
- if (this.topElementHeight !== parseFloat(this.topElement.style.height)) {
224
- this.topElement.style.height = this.topElementHeight + 'px';
225
- this.bottomElement.style.height = this.bottomElementHeight + 'px';
226
- if (scroll > this.scrollPosition) {
227
- var listDiff = Math.round(((this.topElementHeight / this.listItemHeight) - this.listDiff));
228
- if (listDiff > (this.expectedDomItemCount + 5)) {
229
- this.onLongScroll(listDiff, true);
230
- }
231
- else {
232
- this.onNormalScroll(listDiff, true);
233
- }
183
+ else {
184
+ var listDiff = Math.round((this.listDiff - (this.topElementHeight / this.listItemHeight)));
185
+ if (listDiff > (this.expectedDomItemCount + 5)) {
186
+ this.onLongScroll(listDiff, false);
234
187
  }
235
188
  else {
236
- var listDiff = Math.round((this.listDiff - (this.topElementHeight / this.listItemHeight)));
237
- if (listDiff > (this.expectedDomItemCount + 5)) {
238
- this.onLongScroll(listDiff, false);
239
- }
240
- else {
241
- this.onNormalScroll(listDiff, false);
242
- }
189
+ this.onNormalScroll(listDiff, false);
243
190
  }
244
191
  }
245
- this.listDiff = Math.round(this.topElementHeight / this.listItemHeight);
246
- if (typeof this.listViewInstance.onUIScrolled === 'function') {
247
- this.listViewInstance.onUIScrolled();
248
- }
192
+ }
193
+ this.listDiff = Math.round(this.topElementHeight / this.listItemHeight);
194
+ if (typeof this.listViewInstance.onUIScrolled === 'function') {
195
+ this.listViewInstance.onUIScrolled();
249
196
  }
250
197
  this.scrollPosition = scroll;
251
198
  };
@@ -433,14 +380,6 @@ var Virtualization = /** @class */ (function () {
433
380
  }
434
381
  }
435
382
  else {
436
- if (isBlazor() && this.listViewInstance.isServerRendered) {
437
- var scrollDiff = Math.round(this.listViewInstance.element.scrollTop /
438
- this.listViewInstance.liElementHeight) - 2;
439
- if (scrollDiff < 0) {
440
- scrollDiff = 0;
441
- }
442
- this.activeIndex += scrollDiff;
443
- }
444
383
  var curViewDS_2 = this.listViewInstance.curViewDS;
445
384
  var text = this.listViewInstance.fields.text;
446
385
  if (this.listViewInstance.showCheckBox) {
@@ -535,114 +474,35 @@ var Virtualization = /** @class */ (function () {
535
474
  this.listViewInstance.removeSelect();
536
475
  this.activeIndex = undefined;
537
476
  }
538
- if (isBlazor() && this.listViewInstance.isServerRendered) {
539
- // eslint-disable-next-line
540
- var elementId = resutJSON.data[this.listViewInstance.fields.id];
541
- if (this.listViewInstance.showCheckBox) {
542
- if (!this.listViewInstance.previousSelectedItems.includes(elementId)) {
543
- this.listViewInstance.previousSelectedItems.push(elementId);
544
- }
545
- else {
546
- var indexPosition = this.listViewInstance.previousSelectedItems.indexOf(elementId);
547
- if (indexPosition > -1) {
548
- this.listViewInstance.previousSelectedItems.splice(indexPosition, 1);
549
- }
550
- }
551
- }
552
- else {
553
- this.listViewInstance.previousSelectedItems[0] = elementId;
554
- }
555
- this.listViewInstance.removeActiveClass();
556
- }
557
477
  };
558
478
  Virtualization.prototype.enableItem = function (obj) {
559
479
  var resutJSON = this.findDSAndIndexFromId(this.listViewInstance.curViewDS, obj);
560
- if (isBlazor() && this.listViewInstance.isServerRendered) {
561
- // eslint-disable-next-line
562
- var itemId = resutJSON.data[this.listViewInstance.fields.id];
563
- if (!this.listViewInstance.enabledItems.includes(itemId)) {
564
- this.listViewInstance.enabledItems.push(itemId);
565
- this.listViewInstance.removeActiveClass();
566
- }
567
- if (this.listViewInstance.disabledItems.includes(itemId)) {
568
- var indexPosition = this.listViewInstance.disabledItems.indexOf(itemId);
569
- if (indexPosition > -1) {
570
- this.listViewInstance.disabledItems.splice(indexPosition, 1);
571
- }
572
- }
573
- }
574
- else {
575
- if (Object.keys(resutJSON).length) {
576
- this.uiIndices.disabledItemIndices.splice(this.uiIndices.disabledItemIndices.indexOf(resutJSON.index), 1);
577
- }
480
+ if (Object.keys(resutJSON).length) {
481
+ this.uiIndices.disabledItemIndices.splice(this.uiIndices.disabledItemIndices.indexOf(resutJSON.index), 1);
578
482
  }
579
483
  };
580
484
  Virtualization.prototype.disableItem = function (obj) {
581
485
  var resutJSON = this.findDSAndIndexFromId(this.listViewInstance.curViewDS, obj);
582
- if (isBlazor() && this.listViewInstance.isServerRendered) {
583
- // eslint-disable-next-line
584
- var liElementId = resutJSON.data[this.listViewInstance.fields.id];
585
- if (!this.listViewInstance.disabledItems.includes(liElementId)) {
586
- this.listViewInstance.disabledItems.push(liElementId);
587
- this.listViewInstance.removeActiveClass();
588
- }
589
- if (this.listViewInstance.enabledItems.includes(liElementId)) {
590
- var indexPosition = this.listViewInstance.enabledItems.indexOf(liElementId);
591
- if (indexPosition > -1) {
592
- this.listViewInstance.enabledItems.splice(indexPosition, 1);
593
- }
594
- }
595
- }
596
- else {
597
- if (Object.keys(resutJSON).length && this.uiIndices.disabledItemIndices.indexOf(resutJSON.index) === -1) {
598
- this.uiIndices.disabledItemIndices.push(resutJSON.index);
599
- }
486
+ if (Object.keys(resutJSON).length && this.uiIndices.disabledItemIndices.indexOf(resutJSON.index) === -1) {
487
+ this.uiIndices.disabledItemIndices.push(resutJSON.index);
600
488
  }
601
489
  };
602
490
  Virtualization.prototype.showItem = function (obj) {
603
491
  var resutJSON = this.findDSAndIndexFromId(this.listViewInstance.curViewDS, obj);
604
- if (isBlazor() && this.listViewInstance.isServerRendered) {
605
- // eslint-disable-next-line
606
- var hiddenElementId = resutJSON.data[this.listViewInstance.fields.id];
607
- if (this.listViewInstance.hiddenItems.includes(hiddenElementId)) {
608
- var indexPosition = this.listViewInstance.hiddenItems.indexOf(hiddenElementId);
609
- if (indexPosition > -1) {
610
- this.listViewInstance.previousSelectedItems.splice(indexPosition, 1);
611
- this.listViewInstance.removeActiveClass();
612
- }
613
- }
614
- }
615
- else {
616
- if (Object.keys(resutJSON).length) {
617
- this.uiIndices.hiddenItemIndices.splice(this.uiIndices.hiddenItemIndices.indexOf(resutJSON.index), 1);
618
- }
492
+ if (Object.keys(resutJSON).length) {
493
+ this.uiIndices.hiddenItemIndices.splice(this.uiIndices.hiddenItemIndices.indexOf(resutJSON.index), 1);
619
494
  }
620
495
  };
621
496
  Virtualization.prototype.hideItem = function (obj) {
622
497
  var resutJSON = this.findDSAndIndexFromId(this.listViewInstance.curViewDS, obj);
623
- if (isBlazor() && this.listViewInstance.isServerRendered) {
624
- // eslint-disable-next-line
625
- var elementId = resutJSON.data[this.listViewInstance.fields.id];
626
- if (!this.listViewInstance.hiddenItems.includes(elementId)) {
627
- this.listViewInstance.hiddenItems.push(elementId);
628
- this.listViewInstance.removeActiveClass();
629
- }
630
- }
631
- else {
632
- if (Object.keys(resutJSON).length && this.uiIndices.hiddenItemIndices.indexOf(resutJSON.index) === -1) {
633
- this.uiIndices.hiddenItemIndices.push(resutJSON.index);
634
- }
498
+ if (Object.keys(resutJSON).length && this.uiIndices.hiddenItemIndices.indexOf(resutJSON.index) === -1) {
499
+ this.uiIndices.hiddenItemIndices.push(resutJSON.index);
635
500
  }
636
501
  };
637
502
  Virtualization.prototype.removeItem = function (obj) {
638
503
  var dataSource;
639
504
  var curViewDS = this.listViewInstance.curViewDS;
640
505
  var resutJSON = this.findDSAndIndexFromId(curViewDS, obj);
641
- if (isBlazor() && this.listViewInstance.isServerRendered) {
642
- if (resutJSON.index !== undefined) {
643
- this.listViewInstance.interopAdaptor.invokeMethodAsync('RemoveItemPosition', resutJSON.index);
644
- }
645
- }
646
506
  if (Object.keys(resutJSON).length) {
647
507
  dataSource = resutJSON.data;
648
508
  if (curViewDS[resutJSON.index - 1] &&
@@ -653,9 +513,7 @@ var Virtualization = /** @class */ (function () {
653
513
  this.removeUiItem(resutJSON.index - 1);
654
514
  }
655
515
  else {
656
- if (!(isBlazor() && this.listViewInstance.isServerRendered)) {
657
- this.removeUiItem(resutJSON.index);
658
- }
516
+ this.removeUiItem(resutJSON.index);
659
517
  }
660
518
  }
661
519
  var listDataSource = this.listViewInstance.dataSource instanceof DataManager
@@ -671,12 +529,6 @@ var Virtualization = /** @class */ (function () {
671
529
  };
672
530
  // eslint-disable-next-line
673
531
  Virtualization.prototype.setCheckboxLI = function (li, e) {
674
- if (isBlazor() && this.listViewInstance.isServerRendered) {
675
- this.uiFirstIndex = Math.round(this.listViewInstance.element.scrollTop / 36) - 4;
676
- if (this.uiFirstIndex < 0) {
677
- this.uiFirstIndex = 0;
678
- }
679
- }
680
532
  var index = Array.prototype.indexOf.call(this.listViewInstance.curUL.querySelectorAll('li'), li) + this.uiFirstIndex;
681
533
  this.activeIndex = Array.prototype.indexOf.call(this.listViewInstance.curUL.querySelectorAll('li'), li) + this.uiFirstIndex;
682
534
  if (li.classList.contains(classNames.selected)) {
@@ -1,4 +1,4 @@
1
- import { Base, Event, getUniqueID, NotifyPropertyChanges, INotifyPropertyChanged, Property } from '@syncfusion/ej2-base';import { closest, Draggable, DragPosition, MouseEventArgs, remove, compareElementParent } from '@syncfusion/ej2-base';import { addClass, removeClass, isNullOrUndefined, getComponent, isBlazor, BlazorDragEventArgs } from '@syncfusion/ej2-base';
1
+ import { Base, Event, getUniqueID, NotifyPropertyChanges, INotifyPropertyChanged, Property } from '@syncfusion/ej2-base';import { closest, Draggable, DragPosition, MouseEventArgs, remove, compareElementParent } from '@syncfusion/ej2-base';import { addClass, isNullOrUndefined, getComponent, isBlazor, BlazorDragEventArgs } from '@syncfusion/ej2-base';
2
2
 
3
3
  /**
4
4
  * Interface for a class Sortable
@@ -20,7 +20,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
20
20
  /* eslint-disable @typescript-eslint/no-explicit-any */
21
21
  import { Base, Event, getUniqueID, NotifyPropertyChanges, Property } from '@syncfusion/ej2-base';
22
22
  import { closest, Draggable, remove, compareElementParent } from '@syncfusion/ej2-base';
23
- import { addClass, removeClass, isNullOrUndefined, getComponent, isBlazor } from '@syncfusion/ej2-base';
23
+ import { addClass, isNullOrUndefined, getComponent, isBlazor } from '@syncfusion/ej2-base';
24
24
  /**
25
25
  * Sortable Module provides support to enable sortable functionality in Dom Elements.
26
26
  * ```html
@@ -59,10 +59,6 @@ var Sortable = /** @class */ (function (_super) {
59
59
  element.style.height = target.offsetHeight + "px";
60
60
  }
61
61
  addClass([element], ['e-sortableclone']);
62
- removeClass([element], ['e-listboxtool-container']);
63
- if (element && element.className.indexOf("e-listbox-wrapper") < 0) {
64
- addClass([element], ['e-listbox-wrapper']);
65
- }
66
62
  document.body.appendChild(element);
67
63
  return element;
68
64
  };
@@ -175,9 +171,8 @@ var Sortable = /** @class */ (function (_super) {
175
171
  var isPlaceHolderPresent = _this.isPlaceHolderPresent(dropInst);
176
172
  if (isPlaceHolderPresent) {
177
173
  var curIdx_1 = _this.getIndex(dropInst.placeHolderElement, dropInst);
178
- var prevIndx = _this === dropInst && (prevIdx - curIdx_1) > 0 ? prevIdx - 1 : prevIdx;
179
174
  var args = {
180
- previousIndex: prevIndx, currentIndex: _this.curTarget === _this.target ? prevIndx : curIdx_1, target: e.target, droppedElement: _this.target,
175
+ previousIndex: prevIdx, currentIndex: curIdx_1, target: e.target, droppedElement: _this.target,
181
176
  helper: e.helper, cancel: false, handled: false
182
177
  };
183
178
  _this.trigger('beforeDrop', args, function (observedArgs) {
@@ -204,8 +199,7 @@ var Sortable = /** @class */ (function (_super) {
204
199
  // eslint-disable-next-line prefer-const
205
200
  curIdx = dropInst.element.childElementCount;
206
201
  prevIdx = _this.getIndex(_this.target);
207
- var target = (e.target.className.indexOf("e-list-nrt") > -1) ? e.target.parentElement : e.target;
208
- if (dropInst.element === target || (!isPlaceHolderPresent && _this.curTarget === _this.target)) {
202
+ if (dropInst.element === e.target || (!isPlaceHolderPresent && _this.curTarget === _this.target)) {
209
203
  var beforeDropArgs = {
210
204
  previousIndex: prevIdx, currentIndex: _this.curTarget === _this.target ? prevIdx : curIdx,
211
205
  target: e.target, droppedElement: _this.target, helper: e.helper, cancel: false