@progress/kendo-angular-sortable 19.1.2-develop.4 → 19.1.2-develop.6

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.
@@ -48,7 +48,7 @@ const closest = (node, predicate) => {
48
48
  return node;
49
49
  };
50
50
  /**
51
- * Returns an object specifiying whether there is a DraggableDirective under the cursor.
51
+ * Returns an object specifying whether there is a `DraggableDirective` under the cursor.
52
52
  * @hidden
53
53
  */
54
54
  const draggableFromPoint = (x, y) => {
@@ -193,8 +193,8 @@ const packageMetadata = {
193
193
  productName: 'Kendo UI for Angular',
194
194
  productCode: 'KENDOUIANGULAR',
195
195
  productCodes: ['KENDOUIANGULAR'],
196
- publishDate: 1750157233,
197
- version: '19.1.2-develop.4',
196
+ publishDate: 1750433967,
197
+ version: '19.1.2-develop.6',
198
198
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
199
199
  };
200
200
 
@@ -203,9 +203,8 @@ const allowDrag = (e) => {
203
203
  return target.hasAttribute('data-sortable-item') || !(isFocusable(target) || widgetTarget(target));
204
204
  };
205
205
  /**
206
- * The service that provides the drag-and-drop functionality for
207
- * transferring items between Sortable components within the same page.
208
- *
206
+ * The `SortableService` is a service that manages the drag-and-drop functionality
207
+ * for transferring items between Sortable components.
209
208
  */
210
209
  class SortableService {
211
210
  ngZone;
@@ -299,7 +298,7 @@ class SortableService {
299
298
  }
300
299
  }
301
300
  /**
302
- * Registers a `SortableComponent` with which the service operates.
301
+ * Registers a `SortableComponent` with the `SortableService` so that it can be managed by the service.
303
302
  *
304
303
  * @param sortableComponent - The `SortableComponent`.
305
304
  * @return - The unique key that the current `SortableComponent` gets when registered.
@@ -345,9 +344,7 @@ class SortableService {
345
344
  * Represents a single contact point (finger or stylus)
346
345
  * on a touch-sensitive device (touchscreen or trackpad).
347
346
  *
348
- * @return { component: SortableComponent, index: number } - An object
349
- * where the component is the `SortableComponent` that owns the item
350
- * and the index is the index of the touched item.
347
+ * @return { component: SortableComponent, index: number } - An object where the component is the `SortableComponent` that owns the item and the index is the index of the touched item.
351
348
  */
352
349
  getSortableComponentFromTouch(touch) {
353
350
  if (!isDocumentAvailable()) {
@@ -576,19 +573,19 @@ class PreventableEvent {
576
573
  }
577
574
 
578
575
  /**
579
- * The `navigate` event is emitted when using the keyboard arrows.
576
+ * Represents the event arguments for the `navigate` event, which is emitted when you use the keyboard arrows.
580
577
  */
581
578
  class NavigateEvent extends PreventableEvent {
582
579
  /**
583
- * The index of the draggable item.
580
+ * Specifies the index of the draggable item.
584
581
  */
585
582
  index;
586
583
  /**
587
- * The old index of the draggable item.
584
+ * Specifies the old index of the draggable item.
588
585
  */
589
586
  oldIndex;
590
587
  /**
591
- * Indicates whether the ctrl or meta keys are pressed.
588
+ * Indicates whether the `Ctrl` or meta keys are pressed.
592
589
  */
593
590
  ctrlKey;
594
591
  /**
@@ -601,16 +598,16 @@ class NavigateEvent extends PreventableEvent {
601
598
  }
602
599
 
603
600
  /**
604
- * The arguments for the `DraggableDirective` events.
601
+ * Represents the arguments for the `DraggableDirective` events.
605
602
  * @hidden
606
603
  */
607
604
  class DraggableEvent extends PreventableEvent {
608
605
  /**
609
- * The target DraggableDirective instance.
606
+ * Specifies the target `DraggableDirective` instance.
610
607
  */
611
608
  target;
612
609
  /**
613
- * The browser event emitted by the target's native element.
610
+ * Specifies the browser event emitted by the target's native element.
614
611
  */
615
612
  originalEvent; //DragEvent | TouchEvent;
616
613
  /**
@@ -623,15 +620,17 @@ class DraggableEvent extends PreventableEvent {
623
620
  }
624
621
 
625
622
  /**
626
- * Arguments for the `dragStart` event.
623
+ * Represents the arguments for the `dragStart` event.
627
624
  */
628
625
  class DragStartEvent extends PreventableEvent {
629
626
  /**
630
- * The index of the draggable item.
627
+ * Specifies the index of the draggable item.
631
628
  */
632
629
  index;
633
630
  /**
634
- * The old index of the draggable item.
631
+ * Specifies the previous index of the draggable item.
632
+ * This property is used for the `dragEnd and `dragOver` events to determine the original position of the item before dragging.
633
+ * It doesn't apply to the `dragStart` event as there is no previous position at that point.
635
634
  */
636
635
  oldIndex;
637
636
  /**
@@ -643,12 +642,12 @@ class DragStartEvent extends PreventableEvent {
643
642
  }
644
643
  }
645
644
  /**
646
- * Arguments for the `dragOver` event.
645
+ * Represents the arguments for the `dragOver` event.
647
646
  */
648
647
  class DragOverEvent extends DragStartEvent {
649
648
  }
650
649
  /**
651
- * Arguments for the `dragEnd` event.
650
+ * Represents the arguments for the `dragEnd` event.
652
651
  */
653
652
  class DragEndEvent extends DragOverEvent {
654
653
  }
@@ -658,7 +657,10 @@ const KEY_SHORTCUTS = 'Control+ArrowLeft Control+ArrowRight Meta+ArrowLeft Meta+
658
657
  /**
659
658
  * Represents the [Kendo UI Sortable component for Angular]({% slug overview_sortable %}).
660
659
  *
661
- * <demo metaUrl="sortable/sortable-api/" height="430"></demo>
660
+ * @example
661
+ * ```html
662
+ * <kendo-sortable [data]="['Item 1', 'Item 2', 'Item 3']"></kendo-sortable>
663
+ * ```
662
664
  */
663
665
  /**
664
666
  * Represents the Kendo UI Sortable component for Angular.
@@ -674,7 +676,7 @@ class SortableComponent {
674
676
  */
675
677
  tabIndex = null;
676
678
  /**
677
- * Configures how the Sortable component will track changes in its items collection.
679
+ * Configures how the Sortable component tracks changes in its items collection.
678
680
  */
679
681
  trackBy = (_, idx) => idx;
680
682
  /**
@@ -691,61 +693,33 @@ class SortableComponent {
691
693
  return this._data;
692
694
  }
693
695
  /**
694
- * Enables or disables the [keyboard navigation]({% slug keyboard_navigation_sortable %}).
696
+ * Sets a boolean value that determines whether the Sortable items are navigable using the keyboard. [See example]({% slug keyboard_navigation_sortable %}).
695
697
  * @default true
696
698
  */
697
699
  navigable = true;
698
700
  /**
699
- * Enables or disables the built-in animations.
701
+ * Enables or disables built-in animations.
700
702
  * @default false
701
703
  */
702
704
  animation = false;
703
705
  /**
704
- * Sets an array of integers, which represent the indexes of the disabled items from the data array
705
- * ([see example](slug:items_sortable#toc-disabling-items)).
706
+ * Sets an array of integers that represent the indexes of the disabled items from the data array. [See example](slug:items_sortable#toc-disabling-items).
706
707
  */
707
708
  disabledIndexes = [];
708
709
  /**
709
710
  * Sets a string that represents the name of the zone to which the Sortable belongs
710
711
  * ([see example](slug:items_sortable#toc-transferring-of-items)). Items can be transferred
711
- * between Sortables which belong to the same zone.
712
+ * between Sortables in the same zone.
712
713
  */
713
714
  zone = undefined;
714
715
  /**
715
716
  * Defines the zones from which items can be transferred onto the current Sortable component
716
717
  * ([see example](slug:items_sortable#toc-transferring-of-items)). If the `acceptZones` property
717
- * of the target Sortable is set, allows you to transfer items between Sortables which belong
718
- * to different zones.
718
+ * of the target Sortable is set, you can transfer items between Sortables in different zones.
719
719
  */
720
720
  acceptZones = undefined;
721
721
  /**
722
- * Represents the CSS styles which are applied to each Sortable item.
723
- *
724
- * @example
725
- * ```ts
726
- * import { Component } from '@angular/core';
727
- * import { SortableModule } from '@progress/kendo-angular-sortable';
728
- *
729
- * _@Component({
730
- * selector: 'my-app',
731
- * template: `
732
- * <kendo-sortable
733
- * [data]="['1','2','3','4','5','6','7']"
734
- * [itemStyle] ="{
735
- * 'display': 'inline-block',
736
- * 'background-color': '#51A0ED',
737
- * 'height':'50px',
738
- * 'width':'50px',
739
- * 'margin':'3px',
740
- * 'cursor':'move'
741
- * }"
742
- * >
743
- * </kendo-sortable>
744
- * `
745
- * })
746
- * export class AppComponent {
747
- * }
748
- * ```
722
+ * Represents the CSS styles applied to each Sortable item.
749
723
  */
750
724
  itemStyle = {};
751
725
  /**
@@ -778,23 +752,6 @@ class SortableComponent {
778
752
  disabledItemClass = null;
779
753
  /**
780
754
  * Sets the text message that will be displayed when the Sortable has no items.
781
- *
782
- * @example
783
- * ```ts
784
- * import { Component } from '@angular/core';
785
- * import { SortableModule } from '@progress/kendo-angular-sortable';
786
- *
787
- * _@Component({
788
- * selector: 'my-app',
789
- * template: `
790
- * <kendo-sortable [data]="[]"
791
- * [emptyText]="'No items - custom message and styles'"
792
- * [emptyItemStyle] = "{'height': '40px', 'width':'400px', 'border': '2px dashed black'}" >
793
- * </kendo-sortable>
794
- * `
795
- * })
796
- * export class AppComponent { }
797
- * ```
798
755
  */
799
756
  emptyText = "Empty";
800
757
  /**
@@ -1280,14 +1237,14 @@ class SortableComponent {
1280
1237
  this.updateCacheIndices();
1281
1238
  }
1282
1239
  /**
1283
- * Sets a Boolean value that indicates whether the item will be hidden or not.
1240
+ * Sets a boolean value that indicates whether the item will be hidden or not.
1284
1241
  * @hidden
1285
1242
  */
1286
1243
  hideItem(index, hidden = true) {
1287
1244
  this._localData[index].hidden = hidden;
1288
1245
  }
1289
1246
  /**
1290
- * Gets or sets a Boolean value that indicates whether the currently dragged item will be hidden.
1247
+ * Gets or sets a boolean value that indicates whether the currently dragged item will be hidden.
1291
1248
  *
1292
1249
  * If the currently dragged item is hidden, returns `true`.
1293
1250
  * If the currently dragged item is visible, returns `false`.
@@ -1301,7 +1258,7 @@ class SortableComponent {
1301
1258
  }
1302
1259
  /**
1303
1260
  * Clears the active item.
1304
- * An active item is the item which becomes focused when the user navigates with the keyboard.
1261
+ * An active item is the one that is currently focused when the user navigates with the keyboard.
1305
1262
  */
1306
1263
  clearActiveItem() {
1307
1264
  if (this.navigable) {
@@ -1322,7 +1279,7 @@ class SortableComponent {
1322
1279
  }
1323
1280
  }
1324
1281
  /**
1325
- * Adds a new data item to a particular index.
1282
+ * Inserts a new data item at a particular index in the Sortable component.
1326
1283
  * @param dataItem - The data item.
1327
1284
  * @param index - The index at which the data item is inserted.
1328
1285
  */
@@ -1350,7 +1307,7 @@ class SortableComponent {
1350
1307
  });
1351
1308
  }
1352
1309
  /**
1353
- * Moves data item to a particular index.
1310
+ * Moves a data item from one index to another in the Sortable component.
1354
1311
  * @param fromIndex - The data item's index.
1355
1312
  * @param toIndex - The index which the data item should be moved to. Item currently sitting at that index is pushed back one position.
1356
1313
  */
@@ -1850,15 +1807,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1850
1807
  }] } });
1851
1808
 
1852
1809
  /**
1853
- * The arguments for the `SortableComponent` `dataAdd` event.
1810
+ * Represents the arguments for the `SortableComponent` `dataAdd` event.
1854
1811
  */
1855
1812
  class DataAddEvent extends PreventableEvent {
1856
1813
  /**
1857
- * The index of the data item.
1814
+ * Specifies the index of the data item.
1858
1815
  */
1859
1816
  index;
1860
1817
  /**
1861
- * The data item that will be added.
1818
+ * Specifies the data item to add.
1862
1819
  */
1863
1820
  dataItem;
1864
1821
  /**
@@ -1870,15 +1827,15 @@ class DataAddEvent extends PreventableEvent {
1870
1827
  }
1871
1828
  }
1872
1829
  /**
1873
- * The arguments for the `SortableComponent` `dataRemove` event.
1830
+ * Represents the arguments for the `SortableComponent` `dataRemove` event.
1874
1831
  */
1875
1832
  class DataRemoveEvent extends PreventableEvent {
1876
1833
  /**
1877
- * The index of the data item.
1834
+ * Specifies the index of the data item.
1878
1835
  */
1879
1836
  index;
1880
1837
  /**
1881
- * The data item that will be removed.
1838
+ * Specifies the data item to remove.
1882
1839
  */
1883
1840
  dataItem;
1884
1841
  /**
@@ -1890,19 +1847,19 @@ class DataRemoveEvent extends PreventableEvent {
1890
1847
  }
1891
1848
  }
1892
1849
  /**
1893
- * The arguments for the `SortableComponent` `dataMove` event.
1850
+ * Represents the arguments for the `SortableComponent` `dataMove` event.
1894
1851
  */
1895
1852
  class DataMoveEvent extends PreventableEvent {
1896
1853
  /**
1897
- * The index of the data item.
1854
+ * Specifies the index of the data item.
1898
1855
  */
1899
1856
  index;
1900
1857
  /**
1901
- * The old index of the data item.
1858
+ * Specifies the old index of the data item.
1902
1859
  */
1903
1860
  oldIndex;
1904
1861
  /**
1905
- * The data item that will be removed.
1862
+ * Specifies the data item to move.
1906
1863
  */
1907
1864
  dataItem;
1908
1865
  /**
@@ -1915,8 +1872,23 @@ class DataMoveEvent extends PreventableEvent {
1915
1872
  }
1916
1873
 
1917
1874
  /**
1918
- * A Directive which handles the most common scenarios such reordering and moving items between Sortables, thus minimizng boilerplate code.
1919
- * This is achieved by subscribing to the Sortable's events and handling them using the API methods it provides.
1875
+ * Represents a directive that handles common scenarios such as reordering and moving items between Sortables, reducing boilerplate code.
1876
+ *
1877
+ * This directive subscribes to the Sortable's events and handles them using the provided API methods.
1878
+ *
1879
+ * @example
1880
+ * ```html
1881
+ * <kendo-sortable
1882
+ * [kendoSortableBinding]="items"
1883
+ * [navigable]="true"
1884
+ * [animation]="true"
1885
+ * itemClass="item col-xs-6 col-sm-3"
1886
+ * activeItemClass="item col-xs-6 col-sm-3 active">
1887
+ * </kendo-sortable>
1888
+ * ```
1889
+ *
1890
+ * @remarks
1891
+ * Applied to: {@link SortableComponent}
1920
1892
  */
1921
1893
  class SortableBindingDirective {
1922
1894
  sortable;
@@ -1926,10 +1898,7 @@ class SortableBindingDirective {
1926
1898
  navigateSubscription;
1927
1899
  lastTarget;
1928
1900
  /**
1929
- * Sets a data-bound array that is used as a data source for the Sortable.
1930
- *
1931
- * <demo metaUrl="sortable/overview/" height="430"></demo>
1932
- *
1901
+ * Sets a data-bound array that is used as a data source for the Sortable ([see example](slug:overview_sortable)).
1933
1902
  */
1934
1903
  set data(data) {
1935
1904
  this.sortable.data = data;
@@ -2081,7 +2050,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2081
2050
  }] } });
2082
2051
 
2083
2052
  /**
2084
- * Utility array that contains all `@progress/kendo-angular-sortable` related components and directives
2053
+ * Use this utility array to access all `@progress/kendo-angular-sortable`-related components and directives in a standalone Angular component.
2054
+ *
2055
+ * @example
2056
+ * ```typescript
2057
+ * import { Component } from '@angular/core';
2058
+ * import { KENDO_SORTABLE } from '@progress/kendo-angular-sortable';
2059
+ *
2060
+ * @Component({
2061
+ * selector: 'my-app',
2062
+ * standalone: true,
2063
+ * imports: [KENDO_SORTABLE],
2064
+ * template: `
2065
+ * <kendo-sortable [kendoSortableBinding]="items">
2066
+ * </kendo-sortable>
2067
+ * `
2068
+ * })
2069
+ *
2070
+ * export class AppComponent {
2071
+ * public items = ['Item 1', 'Item 2', 'Item 3'];
2072
+ * }
2073
+ * ```
2085
2074
  */
2086
2075
  const KENDO_SORTABLE = [
2087
2076
  SortableComponent,
@@ -2093,33 +2082,21 @@ const KENDO_SORTABLE = [
2093
2082
 
2094
2083
  //IMPORTANT: NgModule export kept for backwards compatibility
2095
2084
  /**
2096
- *
2097
- * Represents the [`NgModule`](link:site.data.urls.angular['ngmoduleapi'])
2098
- * definition for the Sortable component.
2085
+ * Represents the [`NgModule`](link:site.data.urls.angular['ngmoduleapi']) definition for the Sortable component.
2099
2086
  *
2100
2087
  * @example
2101
- *
2102
- * ```ts-no-run
2088
+ * ```typescript
2103
2089
  * import { NgModule } from '@angular/core';
2104
2090
  * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
2105
- *
2106
- * // Import the Sortable module
2107
2091
  * import { SortableModule } from '@progress/kendo-angular-sortable';
2108
- *
2109
- * // Import the app component
2110
2092
  * import { AppComponent } from './app.component';
2111
2093
  *
2112
- * // Define the app module
2113
- * _@NgModule({
2094
+ * @NgModule({
2114
2095
  * declarations: [AppComponent],
2115
2096
  * imports: [BrowserModule, SortableModule],
2116
2097
  * bootstrap: [AppComponent]
2117
2098
  * })
2118
2099
  * export class AppModule {}
2119
- *
2120
- * // Compile and launch the module
2121
- * platformBrowserDynamic().bootstrapModule(AppModule);
2122
- *
2123
2100
  * ```
2124
2101
  */
2125
2102
  class SortableModule {
@@ -5,19 +5,19 @@
5
5
  import { PreventableEvent } from './preventable-event';
6
6
  import { SortableEvent } from './sortable-event-args.interface';
7
7
  /**
8
- * The `navigate` event is emitted when using the keyboard arrows.
8
+ * Represents the event arguments for the `navigate` event, which is emitted when you use the keyboard arrows.
9
9
  */
10
10
  export declare class NavigateEvent extends PreventableEvent implements SortableEvent {
11
11
  /**
12
- * The index of the draggable item.
12
+ * Specifies the index of the draggable item.
13
13
  */
14
14
  index: number;
15
15
  /**
16
- * The old index of the draggable item.
16
+ * Specifies the old index of the draggable item.
17
17
  */
18
18
  oldIndex: number;
19
19
  /**
20
- * Indicates whether the ctrl or meta keys are pressed.
20
+ * Indicates whether the `Ctrl` or meta keys are pressed.
21
21
  */
22
22
  ctrlKey: boolean;
23
23
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-sortable",
3
- "version": "19.1.2-develop.4",
3
+ "version": "19.1.2-develop.6",
4
4
  "description": "A Sortable Component for Angular",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -19,7 +19,7 @@
19
19
  "package": {
20
20
  "productName": "Kendo UI for Angular",
21
21
  "productCode": "KENDOUIANGULAR",
22
- "publishDate": 1750157233,
22
+ "publishDate": 1750433967,
23
23
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
24
24
  }
25
25
  },
@@ -29,13 +29,13 @@
29
29
  "@angular/core": "16 - 20",
30
30
  "@angular/platform-browser": "16 - 20",
31
31
  "@progress/kendo-licensing": "^1.5.0",
32
- "@progress/kendo-angular-common": "19.1.2-develop.4",
33
- "@progress/kendo-angular-l10n": "19.1.2-develop.4",
32
+ "@progress/kendo-angular-common": "19.1.2-develop.6",
33
+ "@progress/kendo-angular-l10n": "19.1.2-develop.6",
34
34
  "rxjs": "^6.5.3 || ^7.0.0"
35
35
  },
36
36
  "dependencies": {
37
37
  "tslib": "^2.3.1",
38
- "@progress/kendo-angular-schematics": "19.1.2-develop.4",
38
+ "@progress/kendo-angular-schematics": "19.1.2-develop.6",
39
39
  "@progress/kendo-draggable": "^3.0.2"
40
40
  },
41
41
  "schematics": "./schematics/collection.json",
@@ -3,16 +3,16 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  /**
6
- * Arguments for the `dragStart`, `dragOver`, and `dragEnd` events.
6
+ * Represents the arguments for the `dragStart`, `dragOver`, and `dragEnd` events.
7
7
  * @hidden
8
8
  */
9
9
  export interface SortableEvent {
10
10
  /**
11
- * The index of the data item.
11
+ * Specifies the index of the data item.
12
12
  */
13
13
  index: number;
14
14
  /**
15
- * The data item that will be added or removed.
15
+ * Specifies the previous index of the data item.
16
16
  */
17
17
  oldIndex: number;
18
18
  }
@@ -5,15 +5,17 @@
5
5
  import { PreventableEvent } from './preventable-event';
6
6
  import { SortableEvent } from './sortable-event-args.interface';
7
7
  /**
8
- * Arguments for the `dragStart` event.
8
+ * Represents the arguments for the `dragStart` event.
9
9
  */
10
10
  export declare class DragStartEvent extends PreventableEvent implements SortableEvent {
11
11
  /**
12
- * The index of the draggable item.
12
+ * Specifies the index of the draggable item.
13
13
  */
14
14
  index: number;
15
15
  /**
16
- * The old index of the draggable item.
16
+ * Specifies the previous index of the draggable item.
17
+ * This property is used for the `dragEnd and `dragOver` events to determine the original position of the item before dragging.
18
+ * It doesn't apply to the `dragStart` event as there is no previous position at that point.
17
19
  */
18
20
  oldIndex: number;
19
21
  /**
@@ -22,12 +24,12 @@ export declare class DragStartEvent extends PreventableEvent implements Sortable
22
24
  constructor(options: any);
23
25
  }
24
26
  /**
25
- * Arguments for the `dragOver` event.
27
+ * Represents the arguments for the `dragOver` event.
26
28
  */
27
29
  export declare class DragOverEvent extends DragStartEvent {
28
30
  }
29
31
  /**
30
- * Arguments for the `dragEnd` event.
32
+ * Represents the arguments for the `dragEnd` event.
31
33
  */
32
34
  export declare class DragEndEvent extends DragOverEvent {
33
35
  }