@progress/kendo-angular-sortable 4.0.2 → 4.0.4-dev.202110281510

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 (79) hide show
  1. package/dist/cdn/js/kendo-angular-sortable.js +2 -2
  2. package/dist/cdn/main.js +2 -2
  3. package/dist/es/binding.directive.js +2 -2
  4. package/dist/es/data-event-args.interface.js +1 -1
  5. package/dist/es/data-events.js +1 -1
  6. package/dist/es/draggable-event.js +1 -1
  7. package/dist/es/draggable.directive.js +1 -1
  8. package/dist/es/index.js +1 -1
  9. package/dist/es/item-template.directive.js +1 -1
  10. package/dist/es/main.js +1 -1
  11. package/dist/es/navigate-event.js +1 -1
  12. package/dist/es/package-metadata.js +2 -2
  13. package/dist/es/preventable-event.js +1 -1
  14. package/dist/es/sortable-container.js +1 -1
  15. package/dist/es/sortable-event-args.interface.js +1 -1
  16. package/dist/es/sortable-events.js +1 -1
  17. package/dist/es/sortable.component.js +6 -5
  18. package/dist/es/sortable.module.js +1 -1
  19. package/dist/es/sortable.service.js +1 -1
  20. package/dist/es/util.js +1 -1
  21. package/dist/es2015/binding.directive.d.ts +1 -1
  22. package/dist/es2015/binding.directive.js +2 -2
  23. package/dist/es2015/data-event-args.interface.d.ts +1 -1
  24. package/dist/es2015/data-event-args.interface.js +1 -1
  25. package/dist/es2015/data-events.d.ts +1 -1
  26. package/dist/es2015/data-events.js +1 -1
  27. package/dist/es2015/draggable-event.d.ts +1 -1
  28. package/dist/es2015/draggable-event.js +1 -1
  29. package/dist/es2015/draggable.directive.d.ts +1 -1
  30. package/dist/es2015/draggable.directive.js +1 -1
  31. package/dist/es2015/index.d.ts +1 -1
  32. package/dist/es2015/index.js +1 -1
  33. package/dist/es2015/index.metadata.json +1 -1
  34. package/dist/es2015/item-template.directive.d.ts +1 -1
  35. package/dist/es2015/item-template.directive.js +1 -1
  36. package/dist/es2015/main.d.ts +1 -1
  37. package/dist/es2015/main.js +1 -1
  38. package/dist/es2015/navigate-event.d.ts +1 -1
  39. package/dist/es2015/navigate-event.js +1 -1
  40. package/dist/es2015/package-metadata.d.ts +1 -1
  41. package/dist/es2015/package-metadata.js +2 -2
  42. package/dist/es2015/preventable-event.d.ts +1 -1
  43. package/dist/es2015/preventable-event.js +1 -1
  44. package/dist/es2015/sortable-container.d.ts +1 -1
  45. package/dist/es2015/sortable-container.js +1 -1
  46. package/dist/es2015/sortable-event-args.interface.d.ts +1 -1
  47. package/dist/es2015/sortable-event-args.interface.js +1 -1
  48. package/dist/es2015/sortable-events.d.ts +1 -1
  49. package/dist/es2015/sortable-events.js +1 -1
  50. package/dist/es2015/sortable.component.d.ts +2 -1
  51. package/dist/es2015/sortable.component.js +22 -21
  52. package/dist/es2015/sortable.module.d.ts +1 -1
  53. package/dist/es2015/sortable.module.js +1 -1
  54. package/dist/es2015/sortable.service.d.ts +1 -1
  55. package/dist/es2015/sortable.service.js +1 -1
  56. package/dist/es2015/util.d.ts +1 -1
  57. package/dist/es2015/util.js +1 -1
  58. package/dist/fesm2015/index.js +24 -23
  59. package/dist/fesm5/index.js +8 -7
  60. package/dist/npm/binding.directive.js +2 -2
  61. package/dist/npm/data-event-args.interface.js +1 -1
  62. package/dist/npm/data-events.js +1 -1
  63. package/dist/npm/draggable-event.js +1 -1
  64. package/dist/npm/draggable.directive.js +1 -1
  65. package/dist/npm/index.js +1 -1
  66. package/dist/npm/item-template.directive.js +1 -1
  67. package/dist/npm/main.js +1 -1
  68. package/dist/npm/navigate-event.js +1 -1
  69. package/dist/npm/package-metadata.js +2 -2
  70. package/dist/npm/preventable-event.js +1 -1
  71. package/dist/npm/sortable-container.js +1 -1
  72. package/dist/npm/sortable-event-args.interface.js +1 -1
  73. package/dist/npm/sortable-events.js +1 -1
  74. package/dist/npm/sortable.component.js +6 -5
  75. package/dist/npm/sortable.module.js +1 -1
  76. package/dist/npm/sortable.service.js +1 -1
  77. package/dist/npm/util.js +1 -1
  78. package/dist/systemjs/kendo-angular-sortable.js +2 -2
  79. package/package.json +4 -4
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as tslib_1 from "tslib";
@@ -581,9 +581,6 @@ class SortableComponent {
581
581
  this.animation = animation;
582
582
  }
583
583
  else {
584
- if (index + 1 === this.data.length && this.data.length > 1) {
585
- index++;
586
- }
587
584
  this.data.splice(index, 0, dataItem);
588
585
  this._localData.splice(index, 0, { item: dataItem, active: false, disabled: !this.itemEnabled(index), index: index, hidden: false });
589
586
  this.updateCacheIndices();
@@ -961,6 +958,10 @@ tslib_1.__decorate([
961
958
  ViewChildren(DraggableDirective),
962
959
  tslib_1.__metadata("design:type", QueryList)
963
960
  ], SortableComponent.prototype, "draggables", void 0);
961
+ tslib_1.__decorate([
962
+ ViewChild('noDataRef', { static: false }),
963
+ tslib_1.__metadata("design:type", ElementRef)
964
+ ], SortableComponent.prototype, "noDataContainer", void 0);
964
965
  tslib_1.__decorate([
965
966
  ViewChild('hint', { static: false }),
966
967
  tslib_1.__metadata("design:type", ElementRef)
@@ -1027,24 +1028,24 @@ SortableComponent = SortableComponent_1 = tslib_1.__decorate([
1027
1028
  ],
1028
1029
  selector: 'kendo-sortable',
1029
1030
  template: `
1030
- <div #itemWrapper *ngFor="let item of _localData;let i=index"
1031
- kendoDraggable
1032
- [attr.tabIndex]="itemEnabled(i)?(navigable?tabIndex||0:tabIndex):null"
1033
- [attr.aria-grabbed]="i===dragIndex"
1034
- [attr.aria-dropeffect]="ariaDropEffect(i)"
1035
- [attr.data-sortable-item] = "true"
1036
- [attr.data-sortable-index]="i"
1037
- [attr.data-sortable-id]="id"
1038
- [index]="i"
1039
- [hidden]="item.hidden"
1040
- [disabled]="!itemEnabled(i)"
1041
- [ngClass]="currentItemClass(i)"
1042
- [ngStyle]="currentItemStyle(i)"
1031
+ <div #itemWrapper *ngFor="let item of _localData;let i=index"
1032
+ kendoDraggable
1033
+ [attr.tabIndex]="itemEnabled(i)?(navigable?tabIndex||0:tabIndex):null"
1034
+ [attr.aria-grabbed]="i===dragIndex"
1035
+ [attr.aria-dropeffect]="ariaDropEffect(i)"
1036
+ [attr.data-sortable-item] = "true"
1037
+ [attr.data-sortable-index]="i"
1038
+ [attr.data-sortable-id]="id"
1039
+ [index]="i"
1040
+ [hidden]="item.hidden"
1041
+ [disabled]="!itemEnabled(i)"
1042
+ [ngClass]="currentItemClass(i)"
1043
+ [ngStyle]="currentItemStyle(i)"
1043
1044
 
1044
- (focus)="focusHandler(i)"
1045
- (blur)="blurHandler()"
1046
- (keydown)="keydownHandler($event)"
1047
- >
1045
+ (focus)="focusHandler(i)"
1046
+ (blur)="blurHandler()"
1047
+ (keydown)="keydownHandler($event)"
1048
+ >
1048
1049
  <ng-container *ngIf="itemTemplateRef"
1049
1050
  [ngTemplateOutlet]="itemTemplate(i)"
1050
1051
  [ngTemplateOutletContext]="item">
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as tslib_1 from "tslib";
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { NgZone, OnDestroy } from '@angular/core';
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as tslib_1 from "tslib";
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { isDocumentAvailable } from '@progress/kendo-angular-common';
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { __decorate, __metadata } from 'tslib';
@@ -152,7 +152,7 @@ const packageMetadata = {
152
152
  name: '@progress/kendo-angular-sortable',
153
153
  productName: 'Kendo UI for Angular',
154
154
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
155
- publishDate: 1620216298,
155
+ publishDate: 1635433806,
156
156
  version: '',
157
157
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
158
158
  };
@@ -1133,9 +1133,6 @@ class SortableComponent {
1133
1133
  this.animation = animation;
1134
1134
  }
1135
1135
  else {
1136
- if (index + 1 === this.data.length && this.data.length > 1) {
1137
- index++;
1138
- }
1139
1136
  this.data.splice(index, 0, dataItem);
1140
1137
  this._localData.splice(index, 0, { item: dataItem, active: false, disabled: !this.itemEnabled(index), index: index, hidden: false });
1141
1138
  this.updateCacheIndices();
@@ -1513,6 +1510,10 @@ __decorate([
1513
1510
  ViewChildren(DraggableDirective),
1514
1511
  __metadata("design:type", QueryList)
1515
1512
  ], SortableComponent.prototype, "draggables", void 0);
1513
+ __decorate([
1514
+ ViewChild('noDataRef', { static: false }),
1515
+ __metadata("design:type", ElementRef)
1516
+ ], SortableComponent.prototype, "noDataContainer", void 0);
1516
1517
  __decorate([
1517
1518
  ViewChild('hint', { static: false }),
1518
1519
  __metadata("design:type", ElementRef)
@@ -1579,24 +1580,24 @@ SortableComponent = SortableComponent_1 = __decorate([
1579
1580
  ],
1580
1581
  selector: 'kendo-sortable',
1581
1582
  template: `
1582
- <div #itemWrapper *ngFor="let item of _localData;let i=index"
1583
- kendoDraggable
1584
- [attr.tabIndex]="itemEnabled(i)?(navigable?tabIndex||0:tabIndex):null"
1585
- [attr.aria-grabbed]="i===dragIndex"
1586
- [attr.aria-dropeffect]="ariaDropEffect(i)"
1587
- [attr.data-sortable-item] = "true"
1588
- [attr.data-sortable-index]="i"
1589
- [attr.data-sortable-id]="id"
1590
- [index]="i"
1591
- [hidden]="item.hidden"
1592
- [disabled]="!itemEnabled(i)"
1593
- [ngClass]="currentItemClass(i)"
1594
- [ngStyle]="currentItemStyle(i)"
1583
+ <div #itemWrapper *ngFor="let item of _localData;let i=index"
1584
+ kendoDraggable
1585
+ [attr.tabIndex]="itemEnabled(i)?(navigable?tabIndex||0:tabIndex):null"
1586
+ [attr.aria-grabbed]="i===dragIndex"
1587
+ [attr.aria-dropeffect]="ariaDropEffect(i)"
1588
+ [attr.data-sortable-item] = "true"
1589
+ [attr.data-sortable-index]="i"
1590
+ [attr.data-sortable-id]="id"
1591
+ [index]="i"
1592
+ [hidden]="item.hidden"
1593
+ [disabled]="!itemEnabled(i)"
1594
+ [ngClass]="currentItemClass(i)"
1595
+ [ngStyle]="currentItemStyle(i)"
1595
1596
 
1596
- (focus)="focusHandler(i)"
1597
- (blur)="blurHandler()"
1598
- (keydown)="keydownHandler($event)"
1599
- >
1597
+ (focus)="focusHandler(i)"
1598
+ (blur)="blurHandler()"
1599
+ (keydown)="keydownHandler($event)"
1600
+ >
1600
1601
  <ng-container *ngIf="itemTemplateRef"
1601
1602
  [ngTemplateOutlet]="itemTemplate(i)"
1602
1603
  [ngTemplateOutletContext]="item">
@@ -1705,7 +1706,7 @@ let SortableBindingDirective = class SortableBindingDirective {
1705
1706
  const addEvent = new DataAddEvent({ index: index, dataItem: dataItem });
1706
1707
  sortable.dataAdd.emit(addEvent);
1707
1708
  if (!addEvent.isDefaultPrevented()) {
1708
- if (index === sortable.itemWrappers.length - 1) {
1709
+ if (index === sortable.itemWrappers.length - 1 && !sortable.noDataContainer) {
1709
1710
  index++;
1710
1711
  }
1711
1712
  sortable.addDataItem(dataItem, index);
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { __decorate, __metadata, __extends } from 'tslib';
@@ -156,7 +156,7 @@ var packageMetadata = {
156
156
  name: '@progress/kendo-angular-sortable',
157
157
  productName: 'Kendo UI for Angular',
158
158
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
159
- publishDate: 1620216298,
159
+ publishDate: 1635433806,
160
160
  version: '',
161
161
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
162
162
  };
@@ -1201,9 +1201,6 @@ var SortableComponent = /** @class */ (function () {
1201
1201
  this.animation = animation;
1202
1202
  }
1203
1203
  else {
1204
- if (index + 1 === this.data.length && this.data.length > 1) {
1205
- index++;
1206
- }
1207
1204
  this.data.splice(index, 0, dataItem);
1208
1205
  this._localData.splice(index, 0, { item: dataItem, active: false, disabled: !this.itemEnabled(index), index: index, hidden: false });
1209
1206
  this.updateCacheIndices();
@@ -1592,6 +1589,10 @@ var SortableComponent = /** @class */ (function () {
1592
1589
  ViewChildren(DraggableDirective),
1593
1590
  __metadata("design:type", QueryList)
1594
1591
  ], SortableComponent.prototype, "draggables", void 0);
1592
+ __decorate([
1593
+ ViewChild('noDataRef', { static: false }),
1594
+ __metadata("design:type", ElementRef)
1595
+ ], SortableComponent.prototype, "noDataContainer", void 0);
1595
1596
  __decorate([
1596
1597
  ViewChild('hint', { static: false }),
1597
1598
  __metadata("design:type", ElementRef)
@@ -1657,7 +1658,7 @@ var SortableComponent = /** @class */ (function () {
1657
1658
  }
1658
1659
  ],
1659
1660
  selector: 'kendo-sortable',
1660
- template: "\n <div #itemWrapper *ngFor=\"let item of _localData;let i=index\"\n kendoDraggable\n [attr.tabIndex]=\"itemEnabled(i)?(navigable?tabIndex||0:tabIndex):null\"\n [attr.aria-grabbed]=\"i===dragIndex\"\n [attr.aria-dropeffect]=\"ariaDropEffect(i)\"\n [attr.data-sortable-item] = \"true\"\n [attr.data-sortable-index]=\"i\"\n [attr.data-sortable-id]=\"id\"\n [index]=\"i\"\n [hidden]=\"item.hidden\"\n [disabled]=\"!itemEnabled(i)\"\n [ngClass]=\"currentItemClass(i)\"\n [ngStyle]=\"currentItemStyle(i)\"\n\n (focus)=\"focusHandler(i)\"\n (blur)=\"blurHandler()\"\n (keydown)=\"keydownHandler($event)\"\n >\n <ng-container *ngIf=\"itemTemplateRef\"\n [ngTemplateOutlet]=\"itemTemplate(i)\"\n [ngTemplateOutletContext]=\"item\">\n </ng-container>\n <ng-container *ngIf=\"!itemTemplateRef\">{{item.item}}</ng-container>\n </div>\n\n <ng-container #noDataRef *ngIf=\"!_data.length || _localData.length === 1 && _localData[0].hidden\">\n <div\n kendoDraggable\n [index]=\"0\"\n [disabled]=\"true\"\n [attr.data-sortable-id]=\"id\"\n [attr.data-sortable-index]=\"0\"\n [ngStyle]=\"currentItemStyle(-1)\"\n [ngClass]=\"currentItemClass(-1)\"\n >{{emptyText}}</div>\n </ng-container>\n <div *ngIf=\"hintVisible()\" [ngStyle]=\"hintStyle()\" [ngClass]=\"currentItemClass(dragIndex)\">\n <ng-container *ngIf=\"itemTemplateRef\"\n [ngTemplateOutlet]=\"itemTemplateRef\"\n [ngTemplateOutletContext]=\"{item: _localData[dragIndex].item}\">\n </ng-container>\n <ng-container *ngIf=\"!itemTemplateRef\">{{_localData[dragIndex].item}}</ng-container>\n </div>\n "
1661
+ template: "\n <div #itemWrapper *ngFor=\"let item of _localData;let i=index\"\n kendoDraggable\n [attr.tabIndex]=\"itemEnabled(i)?(navigable?tabIndex||0:tabIndex):null\"\n [attr.aria-grabbed]=\"i===dragIndex\"\n [attr.aria-dropeffect]=\"ariaDropEffect(i)\"\n [attr.data-sortable-item] = \"true\"\n [attr.data-sortable-index]=\"i\"\n [attr.data-sortable-id]=\"id\"\n [index]=\"i\"\n [hidden]=\"item.hidden\"\n [disabled]=\"!itemEnabled(i)\"\n [ngClass]=\"currentItemClass(i)\"\n [ngStyle]=\"currentItemStyle(i)\"\n\n (focus)=\"focusHandler(i)\"\n (blur)=\"blurHandler()\"\n (keydown)=\"keydownHandler($event)\"\n >\n <ng-container *ngIf=\"itemTemplateRef\"\n [ngTemplateOutlet]=\"itemTemplate(i)\"\n [ngTemplateOutletContext]=\"item\">\n </ng-container>\n <ng-container *ngIf=\"!itemTemplateRef\">{{item.item}}</ng-container>\n </div>\n\n <ng-container #noDataRef *ngIf=\"!_data.length || _localData.length === 1 && _localData[0].hidden\">\n <div\n kendoDraggable\n [index]=\"0\"\n [disabled]=\"true\"\n [attr.data-sortable-id]=\"id\"\n [attr.data-sortable-index]=\"0\"\n [ngStyle]=\"currentItemStyle(-1)\"\n [ngClass]=\"currentItemClass(-1)\"\n >{{emptyText}}</div>\n </ng-container>\n <div *ngIf=\"hintVisible()\" [ngStyle]=\"hintStyle()\" [ngClass]=\"currentItemClass(dragIndex)\">\n <ng-container *ngIf=\"itemTemplateRef\"\n [ngTemplateOutlet]=\"itemTemplateRef\"\n [ngTemplateOutletContext]=\"{item: _localData[dragIndex].item}\">\n </ng-container>\n <ng-container *ngIf=\"!itemTemplateRef\">{{_localData[dragIndex].item}}</ng-container>\n </div>\n "
1661
1662
  })
1662
1663
  /**
1663
1664
  * Represents the Kendo UI Sortable component for Angular.
@@ -1755,7 +1756,7 @@ var SortableBindingDirective = /** @class */ (function () {
1755
1756
  var addEvent = new DataAddEvent({ index: index, dataItem: dataItem });
1756
1757
  sortable.dataAdd.emit(addEvent);
1757
1758
  if (!addEvent.isDefaultPrevented()) {
1758
- if (index === sortable.itemWrappers.length - 1) {
1759
+ if (index === sortable.itemWrappers.length - 1 && !sortable.noDataContainer) {
1759
1760
  index++;
1760
1761
  }
1761
1762
  sortable.addDataItem(dataItem, index);
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use strict";
@@ -47,7 +47,7 @@ var SortableBindingDirective = /** @class */ (function () {
47
47
  var addEvent = new data_events_1.DataAddEvent({ index: index, dataItem: dataItem });
48
48
  sortable.dataAdd.emit(addEvent);
49
49
  if (!addEvent.isDefaultPrevented()) {
50
- if (index === sortable.itemWrappers.length - 1) {
50
+ if (index === sortable.itemWrappers.length - 1 && !sortable.noDataContainer) {
51
51
  index++;
52
52
  }
53
53
  sortable.addDataItem(dataItem, index);
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use strict";
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use strict";
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use strict";
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use strict";
package/dist/npm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use strict";
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use strict";
package/dist/npm/main.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use strict";
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use strict";
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use strict";
@@ -11,7 +11,7 @@ exports.packageMetadata = {
11
11
  name: '@progress/kendo-angular-sortable',
12
12
  productName: 'Kendo UI for Angular',
13
13
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
14
- publishDate: 1620216298,
14
+ publishDate: 1635433806,
15
15
  version: '',
16
16
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
17
17
  };
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use strict";
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use strict";
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use strict";
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use strict";
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use strict";
@@ -603,9 +603,6 @@ var SortableComponent = /** @class */ (function () {
603
603
  this.animation = animation;
604
604
  }
605
605
  else {
606
- if (index + 1 === this.data.length && this.data.length > 1) {
607
- index++;
608
- }
609
606
  this.data.splice(index, 0, dataItem);
610
607
  this._localData.splice(index, 0, { item: dataItem, active: false, disabled: !this.itemEnabled(index), index: index, hidden: false });
611
608
  this.updateCacheIndices();
@@ -994,6 +991,10 @@ var SortableComponent = /** @class */ (function () {
994
991
  core_1.ViewChildren(draggable_directive_1.DraggableDirective),
995
992
  tslib_1.__metadata("design:type", core_1.QueryList)
996
993
  ], SortableComponent.prototype, "draggables", void 0);
994
+ tslib_1.__decorate([
995
+ core_1.ViewChild('noDataRef', { static: false }),
996
+ tslib_1.__metadata("design:type", core_1.ElementRef)
997
+ ], SortableComponent.prototype, "noDataContainer", void 0);
997
998
  tslib_1.__decorate([
998
999
  core_1.ViewChild('hint', { static: false }),
999
1000
  tslib_1.__metadata("design:type", core_1.ElementRef)
@@ -1059,7 +1060,7 @@ var SortableComponent = /** @class */ (function () {
1059
1060
  }
1060
1061
  ],
1061
1062
  selector: 'kendo-sortable',
1062
- template: "\n <div #itemWrapper *ngFor=\"let item of _localData;let i=index\"\n kendoDraggable\n [attr.tabIndex]=\"itemEnabled(i)?(navigable?tabIndex||0:tabIndex):null\"\n [attr.aria-grabbed]=\"i===dragIndex\"\n [attr.aria-dropeffect]=\"ariaDropEffect(i)\"\n [attr.data-sortable-item] = \"true\"\n [attr.data-sortable-index]=\"i\"\n [attr.data-sortable-id]=\"id\"\n [index]=\"i\"\n [hidden]=\"item.hidden\"\n [disabled]=\"!itemEnabled(i)\"\n [ngClass]=\"currentItemClass(i)\"\n [ngStyle]=\"currentItemStyle(i)\"\n\n (focus)=\"focusHandler(i)\"\n (blur)=\"blurHandler()\"\n (keydown)=\"keydownHandler($event)\"\n >\n <ng-container *ngIf=\"itemTemplateRef\"\n [ngTemplateOutlet]=\"itemTemplate(i)\"\n [ngTemplateOutletContext]=\"item\">\n </ng-container>\n <ng-container *ngIf=\"!itemTemplateRef\">{{item.item}}</ng-container>\n </div>\n\n <ng-container #noDataRef *ngIf=\"!_data.length || _localData.length === 1 && _localData[0].hidden\">\n <div\n kendoDraggable\n [index]=\"0\"\n [disabled]=\"true\"\n [attr.data-sortable-id]=\"id\"\n [attr.data-sortable-index]=\"0\"\n [ngStyle]=\"currentItemStyle(-1)\"\n [ngClass]=\"currentItemClass(-1)\"\n >{{emptyText}}</div>\n </ng-container>\n <div *ngIf=\"hintVisible()\" [ngStyle]=\"hintStyle()\" [ngClass]=\"currentItemClass(dragIndex)\">\n <ng-container *ngIf=\"itemTemplateRef\"\n [ngTemplateOutlet]=\"itemTemplateRef\"\n [ngTemplateOutletContext]=\"{item: _localData[dragIndex].item}\">\n </ng-container>\n <ng-container *ngIf=\"!itemTemplateRef\">{{_localData[dragIndex].item}}</ng-container>\n </div>\n "
1063
+ template: "\n <div #itemWrapper *ngFor=\"let item of _localData;let i=index\"\n kendoDraggable\n [attr.tabIndex]=\"itemEnabled(i)?(navigable?tabIndex||0:tabIndex):null\"\n [attr.aria-grabbed]=\"i===dragIndex\"\n [attr.aria-dropeffect]=\"ariaDropEffect(i)\"\n [attr.data-sortable-item] = \"true\"\n [attr.data-sortable-index]=\"i\"\n [attr.data-sortable-id]=\"id\"\n [index]=\"i\"\n [hidden]=\"item.hidden\"\n [disabled]=\"!itemEnabled(i)\"\n [ngClass]=\"currentItemClass(i)\"\n [ngStyle]=\"currentItemStyle(i)\"\n\n (focus)=\"focusHandler(i)\"\n (blur)=\"blurHandler()\"\n (keydown)=\"keydownHandler($event)\"\n >\n <ng-container *ngIf=\"itemTemplateRef\"\n [ngTemplateOutlet]=\"itemTemplate(i)\"\n [ngTemplateOutletContext]=\"item\">\n </ng-container>\n <ng-container *ngIf=\"!itemTemplateRef\">{{item.item}}</ng-container>\n </div>\n\n <ng-container #noDataRef *ngIf=\"!_data.length || _localData.length === 1 && _localData[0].hidden\">\n <div\n kendoDraggable\n [index]=\"0\"\n [disabled]=\"true\"\n [attr.data-sortable-id]=\"id\"\n [attr.data-sortable-index]=\"0\"\n [ngStyle]=\"currentItemStyle(-1)\"\n [ngClass]=\"currentItemClass(-1)\"\n >{{emptyText}}</div>\n </ng-container>\n <div *ngIf=\"hintVisible()\" [ngStyle]=\"hintStyle()\" [ngClass]=\"currentItemClass(dragIndex)\">\n <ng-container *ngIf=\"itemTemplateRef\"\n [ngTemplateOutlet]=\"itemTemplateRef\"\n [ngTemplateOutletContext]=\"{item: _localData[dragIndex].item}\">\n </ng-container>\n <ng-container *ngIf=\"!itemTemplateRef\">{{_localData[dragIndex].item}}</ng-container>\n </div>\n "
1063
1064
  })
1064
1065
  /**
1065
1066
  * Represents the Kendo UI Sortable component for Angular.
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use strict";
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use strict";
package/dist/npm/util.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2020 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use strict";