@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.
@@ -13,7 +13,10 @@ import * as i0 from "@angular/core";
13
13
  /**
14
14
  * Represents the [Kendo UI Sortable component for Angular]({% slug overview_sortable %}).
15
15
  *
16
- * <demo metaUrl="sortable/sortable-api/" height="430"></demo>
16
+ * @example
17
+ * ```html
18
+ * <kendo-sortable [data]="['Item 1', 'Item 2', 'Item 3']"></kendo-sortable>
19
+ * ```
17
20
  */
18
21
  export declare class SortableComponent implements OnInit, OnDestroy, OnChanges, AfterViewInit, AfterViewChecked, AfterContentInit, SortableContainer {
19
22
  private ngZone;
@@ -26,7 +29,7 @@ export declare class SortableComponent implements OnInit, OnDestroy, OnChanges,
26
29
  */
27
30
  tabIndex: number;
28
31
  /**
29
- * Configures how the Sortable component will track changes in its items collection.
32
+ * Configures how the Sortable component tracks changes in its items collection.
30
33
  */
31
34
  trackBy: TrackByFunction<any>;
32
35
  /**
@@ -35,61 +38,33 @@ export declare class SortableComponent implements OnInit, OnDestroy, OnChanges,
35
38
  set data(data: Array<any>);
36
39
  get data(): Array<any>;
37
40
  /**
38
- * Enables or disables the [keyboard navigation]({% slug keyboard_navigation_sortable %}).
41
+ * Sets a boolean value that determines whether the Sortable items are navigable using the keyboard. [See example]({% slug keyboard_navigation_sortable %}).
39
42
  * @default true
40
43
  */
41
44
  navigable: boolean;
42
45
  /**
43
- * Enables or disables the built-in animations.
46
+ * Enables or disables built-in animations.
44
47
  * @default false
45
48
  */
46
49
  animation: boolean;
47
50
  /**
48
- * Sets an array of integers, which represent the indexes of the disabled items from the data array
49
- * ([see example](slug:items_sortable#toc-disabling-items)).
51
+ * 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).
50
52
  */
51
53
  disabledIndexes: number[];
52
54
  /**
53
55
  * Sets a string that represents the name of the zone to which the Sortable belongs
54
56
  * ([see example](slug:items_sortable#toc-transferring-of-items)). Items can be transferred
55
- * between Sortables which belong to the same zone.
57
+ * between Sortables in the same zone.
56
58
  */
57
59
  zone: string;
58
60
  /**
59
61
  * Defines the zones from which items can be transferred onto the current Sortable component
60
62
  * ([see example](slug:items_sortable#toc-transferring-of-items)). If the `acceptZones` property
61
- * of the target Sortable is set, allows you to transfer items between Sortables which belong
62
- * to different zones.
63
+ * of the target Sortable is set, you can transfer items between Sortables in different zones.
63
64
  */
64
65
  acceptZones: string[];
65
66
  /**
66
- * Represents the CSS styles which are applied to each Sortable item.
67
- *
68
- * @example
69
- * ```ts
70
- * import { Component } from '@angular/core';
71
- * import { SortableModule } from '@progress/kendo-angular-sortable';
72
- *
73
- * _@Component({
74
- * selector: 'my-app',
75
- * template: `
76
- * <kendo-sortable
77
- * [data]="['1','2','3','4','5','6','7']"
78
- * [itemStyle] ="{
79
- * 'display': 'inline-block',
80
- * 'background-color': '#51A0ED',
81
- * 'height':'50px',
82
- * 'width':'50px',
83
- * 'margin':'3px',
84
- * 'cursor':'move'
85
- * }"
86
- * >
87
- * </kendo-sortable>
88
- * `
89
- * })
90
- * export class AppComponent {
91
- * }
92
- * ```
67
+ * Represents the CSS styles applied to each Sortable item.
93
68
  */
94
69
  itemStyle: {
95
70
  [key: string]: string;
@@ -130,23 +105,6 @@ export declare class SortableComponent implements OnInit, OnDestroy, OnChanges,
130
105
  disabledItemClass: string | string[] | Set<string>;
131
106
  /**
132
107
  * Sets the text message that will be displayed when the Sortable has no items.
133
- *
134
- * @example
135
- * ```ts
136
- * import { Component } from '@angular/core';
137
- * import { SortableModule } from '@progress/kendo-angular-sortable';
138
- *
139
- * _@Component({
140
- * selector: 'my-app',
141
- * template: `
142
- * <kendo-sortable [data]="[]"
143
- * [emptyText]="'No items - custom message and styles'"
144
- * [emptyItemStyle] = "{'height': '40px', 'width':'400px', 'border': '2px dashed black'}" >
145
- * </kendo-sortable>
146
- * `
147
- * })
148
- * export class AppComponent { }
149
- * ```
150
108
  */
151
109
  emptyText: string;
152
110
  /**
@@ -365,12 +323,12 @@ export declare class SortableComponent implements OnInit, OnDestroy, OnChanges,
365
323
  */
366
324
  removeDataItem(index: number): void;
367
325
  /**
368
- * Sets a Boolean value that indicates whether the item will be hidden or not.
326
+ * Sets a boolean value that indicates whether the item will be hidden or not.
369
327
  * @hidden
370
328
  */
371
329
  hideItem(index: number, hidden?: boolean): void;
372
330
  /**
373
- * Gets or sets a Boolean value that indicates whether the currently dragged item will be hidden.
331
+ * Gets or sets a boolean value that indicates whether the currently dragged item will be hidden.
374
332
  *
375
333
  * If the currently dragged item is hidden, returns `true`.
376
334
  * If the currently dragged item is visible, returns `false`.
@@ -379,7 +337,7 @@ export declare class SortableComponent implements OnInit, OnDestroy, OnChanges,
379
337
  set hideActiveItem(value: boolean);
380
338
  /**
381
339
  * Clears the active item.
382
- * An active item is the item which becomes focused when the user navigates with the keyboard.
340
+ * An active item is the one that is currently focused when the user navigates with the keyboard.
383
341
  */
384
342
  clearActiveItem(): void;
385
343
  /**
@@ -388,13 +346,13 @@ export declare class SortableComponent implements OnInit, OnDestroy, OnChanges,
388
346
  */
389
347
  getActiveItem(): any;
390
348
  /**
391
- * Adds a new data item to a particular index.
349
+ * Inserts a new data item at a particular index in the Sortable component.
392
350
  * @param dataItem - The data item.
393
351
  * @param index - The index at which the data item is inserted.
394
352
  */
395
353
  addDataItem(dataItem: any, index: number): void;
396
354
  /**
397
- * Moves data item to a particular index.
355
+ * Moves a data item from one index to another in the Sortable component.
398
356
  * @param fromIndex - The data item's index.
399
357
  * @param toIndex - The index which the data item should be moved to. Item currently sitting at that index is pushed back one position.
400
358
  */
@@ -8,33 +8,21 @@ import * as i2 from "./draggable.directive";
8
8
  import * as i3 from "./item-template.directive";
9
9
  import * as i4 from "./binding.directive";
10
10
  /**
11
- *
12
- * Represents the [`NgModule`](link:site.data.urls.angular['ngmoduleapi'])
13
- * definition for the Sortable component.
11
+ * Represents the [`NgModule`](link:site.data.urls.angular['ngmoduleapi']) definition for the Sortable component.
14
12
  *
15
13
  * @example
16
- *
17
- * ```ts-no-run
14
+ * ```typescript
18
15
  * import { NgModule } from '@angular/core';
19
16
  * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
20
- *
21
- * // Import the Sortable module
22
17
  * import { SortableModule } from '@progress/kendo-angular-sortable';
23
- *
24
- * // Import the app component
25
18
  * import { AppComponent } from './app.component';
26
19
  *
27
- * // Define the app module
28
- * _@NgModule({
20
+ * @NgModule({
29
21
  * declarations: [AppComponent],
30
22
  * imports: [BrowserModule, SortableModule],
31
23
  * bootstrap: [AppComponent]
32
24
  * })
33
25
  * export class AppModule {}
34
- *
35
- * // Compile and launch the module
36
- * platformBrowserDynamic().bootstrapModule(AppModule);
37
- *
38
26
  * ```
39
27
  */
40
28
  export declare class SortableModule {
@@ -8,9 +8,8 @@ import { DraggableDirective } from './draggable.directive';
8
8
  import { Subject } from 'rxjs';
9
9
  import * as i0 from "@angular/core";
10
10
  /**
11
- * The service that provides the drag-and-drop functionality for
12
- * transferring items between Sortable components within the same page.
13
- *
11
+ * The `SortableService` is a service that manages the drag-and-drop functionality
12
+ * for transferring items between Sortable components.
14
13
  */
15
14
  export declare class SortableService implements OnDestroy {
16
15
  private ngZone;
@@ -78,7 +77,7 @@ export declare class SortableService implements OnDestroy {
78
77
  */
79
78
  ngOnDestroy(): void;
80
79
  /**
81
- * Registers a `SortableComponent` with which the service operates.
80
+ * Registers a `SortableComponent` with the `SortableService` so that it can be managed by the service.
82
81
  *
83
82
  * @param sortableComponent - The `SortableComponent`.
84
83
  * @return - The unique key that the current `SortableComponent` gets when registered.
@@ -113,9 +112,7 @@ export declare class SortableService implements OnDestroy {
113
112
  * Represents a single contact point (finger or stylus)
114
113
  * on a touch-sensitive device (touchscreen or trackpad).
115
114
  *
116
- * @return { component: SortableComponent, index: number } - An object
117
- * where the component is the `SortableComponent` that owns the item
118
- * and the index is the index of the touched item.
115
+ * @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.
119
116
  */
120
117
  getSortableComponentFromTouch(touch: any): {
121
118
  component: SortableComponent;
package/util.d.ts CHANGED
@@ -19,7 +19,7 @@ export declare const matchesNodeAttr: (nodeAttr: string) => any;
19
19
  */
20
20
  export declare const closest: (node: any, predicate: any) => any;
21
21
  /**
22
- * Returns an object specifiying whether there is a DraggableDirective under the cursor.
22
+ * Returns an object specifying whether there is a `DraggableDirective` under the cursor.
23
23
  * @hidden
24
24
  */
25
25
  export declare const draggableFromPoint: Function;