@progress/kendo-angular-listview 19.1.2-develop.2 → 19.1.2-develop.4

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/data-binding/data-binding.directive.d.ts +19 -2
  2. package/editing/commands/add-command.directive.d.ts +5 -4
  3. package/editing/commands/cancel-command.directive.d.ts +6 -5
  4. package/editing/commands/edit-command.directive.d.ts +5 -5
  5. package/editing/commands/remove-command.directive.d.ts +6 -5
  6. package/editing/commands/save-command.directive.d.ts +6 -5
  7. package/editing/edit-template.directive.d.ts +23 -5
  8. package/editing/events/add-event-args.interface.d.ts +2 -1
  9. package/editing/events/cancel-event-args.interface.d.ts +2 -1
  10. package/editing/events/edit-event-args.interface.d.ts +6 -5
  11. package/editing/events/remove-event-args.interface.d.ts +2 -1
  12. package/editing/events/save-event-args.interface.d.ts +3 -2
  13. package/esm2022/data-binding/data-binding.directive.mjs +19 -2
  14. package/esm2022/editing/commands/add-command.directive.mjs +5 -4
  15. package/esm2022/editing/commands/cancel-command.directive.mjs +6 -5
  16. package/esm2022/editing/commands/edit-command.directive.mjs +5 -5
  17. package/esm2022/editing/commands/remove-command.directive.mjs +6 -5
  18. package/esm2022/editing/commands/save-command.directive.mjs +6 -5
  19. package/esm2022/editing/edit-template.directive.mjs +23 -5
  20. package/esm2022/listview.component.mjs +74 -41
  21. package/esm2022/models/page-size-change-event.mjs +2 -2
  22. package/esm2022/package-metadata.mjs +2 -2
  23. package/esm2022/templates/footer-template.directive.mjs +18 -2
  24. package/esm2022/templates/header-template.directive.mjs +19 -2
  25. package/esm2022/templates/item-template.directive.mjs +23 -6
  26. package/esm2022/templates/loader-template.directive.mjs +18 -1
  27. package/fesm2022/progress-kendo-angular-listview.mjs +226 -87
  28. package/listview.component.d.ts +74 -41
  29. package/models/listview-data-result.d.ts +3 -3
  30. package/models/page-change-event.d.ts +3 -2
  31. package/models/page-size-change-event.d.ts +2 -2
  32. package/models/page-size-item.d.ts +2 -2
  33. package/models/pager-position.d.ts +4 -2
  34. package/models/pager-settings.d.ts +4 -9
  35. package/models/pager-type.d.ts +2 -5
  36. package/models/scroll-bottom-event.d.ts +2 -2
  37. package/package.json +8 -8
  38. package/schematics/ngAdd/index.js +6 -6
  39. package/templates/footer-template.directive.d.ts +18 -2
  40. package/templates/header-template.directive.d.ts +19 -2
  41. package/templates/item-template.directive.d.ts +23 -6
  42. package/templates/loader-template.directive.d.ts +18 -1
@@ -36,6 +36,34 @@ const createControl = (source) => (acc, key) => {
36
36
  };
37
37
  /**
38
38
  * Represents the Kendo UI ListView component for Angular.
39
+ * Displays a list of data items and supports paging, editing, and custom templates
40
+ * ([see overview]({% slug overview_listview %})).
41
+ *
42
+ * @example
43
+ * ```typescript
44
+ * @Component({
45
+ * selector: 'my-app',
46
+ * template: `
47
+ * <kendo-listview
48
+ * [data]="items"
49
+ * [pageable]="true"
50
+ * [pageSize]="5">
51
+ * <ng-template kendoListViewItemTemplate let-dataItem>
52
+ * <div class="item">
53
+ * <h3>{{ dataItem.name }}</h3>
54
+ * <p>{{ dataItem.description }}</p>
55
+ * </div>
56
+ * </ng-template>
57
+ * </kendo-listview>
58
+ * `
59
+ * })
60
+ * export class AppComponent {
61
+ * items = [
62
+ * { name: 'Item 1', description: 'First item' },
63
+ * { name: 'Item 2', description: 'Second item' }
64
+ * ];
65
+ * }
66
+ * ```
39
67
  */
40
68
  export class ListViewComponent {
41
69
  ngZone;
@@ -83,7 +111,7 @@ export class ListViewComponent {
83
111
  */
84
112
  bordered = false;
85
113
  /**
86
- * The data collection that will be used to populate the ListView
114
+ * Specifies the data collection that populates the ListView
87
115
  * ([see data binding examples]({% slug paging_listview %})).
88
116
  */
89
117
  set data(value) {
@@ -94,28 +122,30 @@ export class ListViewComponent {
94
122
  return this._data;
95
123
  }
96
124
  /**
97
- * Specifies if the loading indicator of the ListView will be displayed
125
+ * Specifies whether the loading indicator of the ListView displays
98
126
  * ([see example]({% slug paging_listview %}#toc-remote-binding)).
127
+ *
128
+ * @default false
99
129
  */
100
130
  loading = false;
101
131
  /**
102
- * The CSS styles that will be rendered on the content container element of the ListView.
103
- * Supports the type of values that are supported by [`ngStyle`](link:site.data.urls.angular['ngstyleapi']).
132
+ * Specifies the CSS styles that render on the content container element of the ListView.
133
+ * Supports the type of values that [`ngStyle`](link:site.data.urls.angular['ngstyleapi']) supports.
104
134
  */
105
135
  containerStyle;
106
136
  /**
107
- * The CSS styles that will be rendered on each item element wrapper of the ListView.
108
- * Supports the type of values that are supported by [`ngStyle`](link:site.data.urls.angular['ngstyleapi']).
137
+ * Specifies the CSS styles that render on each item element wrapper of the ListView.
138
+ * Supports the type of values that [`ngStyle`](link:site.data.urls.angular['ngstyleapi']) supports.
109
139
  */
110
140
  itemStyle;
111
141
  /**
112
- * The CSS class that will be rendered on the content container element of the ListView.
113
- * Supports the type of values that are supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']).
142
+ * Specifies the CSS class that renders on the content container element of the ListView.
143
+ * Supports the type of values that [`ngClass`](link:site.data.urls.angular['ngclassapi']) supports.
114
144
  */
115
145
  containerClass;
116
146
  /**
117
- * The CSS class that will be rendered on each item element wrapper of the ListView.
118
- * Supports the type of values that are supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']).
147
+ * Specifies the CSS class that renders on each item element wrapper of the ListView.
148
+ * Supports the type of values that [`ngClass`](link:site.data.urls.angular['ngclassapi']) supports.
119
149
  */
120
150
  itemClass;
121
151
  /**
@@ -126,19 +156,22 @@ export class ListViewComponent {
126
156
  /**
127
157
  * Specifies the content container `role` attribute
128
158
  * ([more details]({% slug accessibility_listview %}#toc-wai-aria-support)).
129
- * By default, the container `role` is set to `list`.
159
+ *
160
+ * @default 'list'
130
161
  */
131
162
  containerRole = 'list';
132
163
  /**
133
164
  * Specifies the list item `role` attribute
134
165
  * ([more details]({% slug accessibility_listview %}#toc-wai-aria-support)).
135
- * By default, the list item `role` is set to `listitem`.
166
+ *
167
+ * @default 'listitem'
136
168
  */
137
169
  listItemRole = 'listitem';
138
170
  /**
139
- * Specifies whether the keyboard navigation is enabled
171
+ * Specifies whether keyboard navigation is enabled
140
172
  * ([see example]({% slug keyboard_navigation_listview %})).
141
- * By default, the navigation is enabled.
173
+ *
174
+ * @default true
142
175
  */
143
176
  set navigable(navigable) {
144
177
  if (!navigable && isPresent(this.removeNavigationListeners)) {
@@ -156,7 +189,7 @@ export class ListViewComponent {
156
189
  return this._navigable;
157
190
  }
158
191
  /**
159
- * Defines the page size used by the ListView pager
192
+ * Specifies the page size used by the ListView pager
160
193
  * ([more details]({% slug paging_listview %})).
161
194
  */
162
195
  pageSize;
@@ -173,9 +206,9 @@ export class ListViewComponent {
173
206
  return this._skip;
174
207
  }
175
208
  /**
176
- * Configures whether the ListView will render a pager
209
+ * Configures whether the ListView renders a pager
177
210
  * ([more details]({% slug paging_listview %})).
178
- * Providing a boolean value will render a pager with the default settings.
211
+ * When you provide a boolean value, it renders a pager with the default settings.
179
212
  */
180
213
  set pageable(pageable) {
181
214
  this._pageable = pageable;
@@ -185,50 +218,51 @@ export class ListViewComponent {
185
218
  return this._pageable;
186
219
  }
187
220
  /**
188
- * Defines the height (in pixels) of the ListView component.
189
- * If the content height exceeds the component height, a vertical scrollbar will be rendered.
221
+ * Specifies the height (in pixels) of the ListView component.
222
+ * When the content height exceeds the component height, a vertical scrollbar renders.
223
+ *
190
224
  * To set the height of the ListView, you can also use `style.height`. The `style.height`
191
225
  * option supports units such as `px`, `%`, `em`, `rem`, and others.
192
226
  */
193
227
  height;
194
228
  /**
195
- * Fires when the user scrolls to the last record on the page
229
+ * Fires when you scroll to the last record on the page
196
230
  * ([see endless scrolling example]({% slug scrollmodes_listview %}#toc-endless-scrolling)).
197
231
  */
198
232
  scrollBottom = new EventEmitter();
199
233
  /**
200
- * Fires when the page or the page size of the ListView is changed
234
+ * Fires when you change the page or the page size of the ListView
201
235
  * ([see example]({% slug paging_listview %}#toc-remote-binding)).
202
236
  * You have to handle the event yourself and page the data.
203
237
  */
204
238
  pageChange = new EventEmitter();
205
239
  /**
206
- * Fires when the page size of the ListView is changed. This event can be prevented (`$event.preventDefault()`).
207
- * If not prevented, the `pageChange` event will be fired subsequently.
240
+ * Fires when you change the page size of the ListView. You can prevent this event (`$event.preventDefault()`).
241
+ * When not prevented, the `pageChange` event fires subsequently.
208
242
  */
209
243
  pageSizeChange = new EventEmitter();
210
244
  /**
211
- * Fires when the user clicks the **Edit** command button to edit an item
245
+ * Fires when you click the **Edit** command button to edit an item
212
246
  * ([see example]({% slug editing_template_forms_listview %}#toc-editing-records)).
213
247
  */
214
248
  edit = new EventEmitter();
215
249
  /**
216
- * Fires when the user clicks the **Cancel** command button to close an item
250
+ * Fires when you click the **Cancel** command button to close an item
217
251
  * ([see example]({% slug editing_template_forms_listview %}#toc-cancelling-editing)).
218
252
  */
219
253
  cancel = new EventEmitter();
220
254
  /**
221
- * Fires when the user clicks the **Save** command button to save changes in an item
255
+ * Fires when you click the **Save** command button to save changes in an item
222
256
  * ([see example]({% slug editing_template_forms_listview %}#toc-saving-records)).
223
257
  */
224
258
  save = new EventEmitter();
225
259
  /**
226
- * Fires when the user clicks the **Remove** command button to remove an item
260
+ * Fires when you click the **Remove** command button to remove an item
227
261
  * ([see example]({% slug editing_template_forms_listview %}#toc-removing-records)).
228
262
  */
229
263
  remove = new EventEmitter();
230
264
  /**
231
- * Fires when the user clicks the **Add** command button to add a new item
265
+ * Fires when you click the **Add** command button to add a new item
232
266
  * ([see example]({% slug editing_template_forms_listview %}#toc-adding-records)).
233
267
  */
234
268
  add = new EventEmitter();
@@ -240,7 +274,7 @@ export class ListViewComponent {
240
274
  * @hidden
241
275
  *
242
276
  * Gets the data items passed to the ListView.
243
- * If a ListViewDataResult is passed, the data value is used. If an array is passed - it's directly used.
277
+ * If a `ListViewDataResult` is passed, the data value is used. If an array is passed - it's directly used.
244
278
  */
245
279
  get items() {
246
280
  if (!isPresent(this.data)) {
@@ -252,7 +286,7 @@ export class ListViewComponent {
252
286
  * @hidden
253
287
  *
254
288
  * Gets the total number of records passed to the ListView.
255
- * If a ListViewDataResult is passed, the total value is used. If an array is passed - its length is used.
289
+ * If a `ListViewDataResult` is passed, the total value is used. If an array is passed - its length is used.
256
290
  */
257
291
  get total() {
258
292
  if (!this.pageable) {
@@ -274,7 +308,7 @@ export class ListViewComponent {
274
308
  /**
275
309
  * Gets the current active item index
276
310
  * ([see example]({% slug keyboard_navigation_listview %}#toc-controlling-the-focus)).
277
- * Returns `null` when the keyboard navigation is disabled.
311
+ * Returns `null` when keyboard navigation is disabled.
278
312
  */
279
313
  get activeIndex() {
280
314
  return this.navigationService.activeIndex;
@@ -337,13 +371,13 @@ export class ListViewComponent {
337
371
  }
338
372
  /**
339
373
  * Focuses the item at the specified index ([see example]({% slug keyboard_navigation_listview %}#toc-controlling-the-focus)):
340
- * - If no index is specified, the current active index will be focused.
341
- * - If the passed value is below `0`, the first item receives focus.
342
- * - If the passed value is above the last available index, the last item receives focus.
374
+ * - When you specify no index, the current active index receives focus.
375
+ * - When the passed value is below `0`, the first item receives focus.
376
+ * - When the passed value is above the last available index, the last item receives focus.
343
377
  *
344
- * > The index param is based on the logical structure of the ListView and does not correspond to the data item index -
345
- * > i.e. the index `0` corresponds to the first rendered list item. Paging is not taken into account.
346
- * > Also, for the focusing to work, the `navigable` prop must first be set to `true`.
378
+ * > The `index` parameter is based on the logical structure of the ListView and does not correspond to the data item index&mdash
379
+ * > the index `0` corresponds to the first rendered list item. Paging is not taken into account.
380
+ * > Also, the `navigable` property must first be set to `true` for the method to work as expected.
347
381
  */
348
382
  focus(index) {
349
383
  const totalRenderedItems = this.listViewItems.length;
@@ -353,7 +387,7 @@ export class ListViewComponent {
353
387
  * Creates a new item editor ([see example]({% slug editing_template_forms_listview %}#toc-adding-records)).
354
388
  *
355
389
  * @param {FormGroup} group - The [`FormGroup`](link:site.data.urls.angular['formgroupapi']) that describes
356
- * the edit form. If called with a data item, it will build the `FormGroup` from the data item fields.
390
+ * the edit form. When called with a data item, it builds the `FormGroup` from the data item fields.
357
391
  */
358
392
  addItem(group) {
359
393
  const isFormGroup = group instanceof FormGroup;
@@ -366,7 +400,7 @@ export class ListViewComponent {
366
400
  /**
367
401
  * Switches the specified item to edit mode ([see example]({% slug editing_template_forms_listview %}#toc-editing-records)).
368
402
  *
369
- * @param index - The item index that will be switched to edit mode.
403
+ * @param index - The item index that switches to edit mode.
370
404
  * @param group - The [`FormGroup`](link:site.data.urls.angular['formgroupapi'])
371
405
  * that describes the edit form.
372
406
  */
@@ -377,8 +411,7 @@ export class ListViewComponent {
377
411
  /**
378
412
  * Closes the editor for a given item ([see example]({% slug editing_template_forms_listview %}#toc-cancelling-editing)).
379
413
  *
380
- * @param {number} index - The item index that will be switched out of the edit mode. If no index is provided, it is assumed
381
- * that the new item editor will be closed.
414
+ * @param {number} index - The item index that switches out of the edit mode. When you provide no index, the editor of the new item will close.
382
415
  */
383
416
  closeItem(index) {
384
417
  this.editService.close(index);
@@ -4,8 +4,8 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { PageSizeChangeEvent as PagerPageSizeChangeEvent } from "@progress/kendo-angular-pager";
6
6
  /**
7
- * The arguments of the [`pageSizeChange`]({% slug api_listview_listviewcomponent %}#toc-pagesizechange) event of the ListView
8
- * ([more details]({% slug paging_listview %}).
7
+ * Defines the arguments of the [`pageSizeChange`]({% slug api_listview_listviewcomponent %}#toc-pagesizechange) event of the ListView
8
+ * ([more details]({% slug paging_listview %})).
9
9
  */
10
10
  export class PageSizeChangeEvent extends PagerPageSizeChangeEvent {
11
11
  }
@@ -10,7 +10,7 @@ export const packageMetadata = {
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCode: 'KENDOUIANGULAR',
12
12
  productCodes: ['KENDOUIANGULAR'],
13
- publishDate: 1749820766,
14
- version: '19.1.2-develop.2',
13
+ publishDate: 1750157258,
14
+ version: '19.1.2-develop.4',
15
15
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
16
16
  };
@@ -5,9 +5,25 @@
5
5
  import { Directive, TemplateRef } from '@angular/core';
6
6
  import * as i0 from "@angular/core";
7
7
  /**
8
- * Renders the footer content of the ListView. To define a footer template, nest an `<ng-template>` tag
8
+ * Allows customizing the footer content of the ListView. To define a footer template, nest an `<ng-template>` tag
9
9
  * with the `kendoListViewFooterTemplate` directive inside the `<kendo-listview>` tag
10
- * [see example]({% slug templates_listview %}#toc-footer-template).
10
+ * ([see example]({% slug templates_listview %}#toc-footer-template)).
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * @Component({
15
+ * template: `
16
+ * <kendo-listview [data]="items">
17
+ * <ng-template kendoListViewFooterTemplate>
18
+ * <div class="footer-content">
19
+ * <p>Total items: {{ items.length }}</p>
20
+ * </div>
21
+ * </ng-template>
22
+ * </kendo-listview>
23
+ * `
24
+ * })
25
+ * export class AppComponent { }
26
+ * ```
11
27
  */
12
28
  export class FooterTemplateDirective {
13
29
  templateRef;
@@ -5,9 +5,26 @@
5
5
  import { Directive, TemplateRef } from '@angular/core';
6
6
  import * as i0 from "@angular/core";
7
7
  /**
8
- * Renders the header content of the ListView. To define a header template, nest an `<ng-template>` tag
8
+ * Allows customizing the header content of the ListView. To define a header template, nest an `<ng-template>` tag
9
9
  * with the `kendoListViewHeaderTemplate` directive inside the `<kendo-listview>` tag
10
- * [see example]({% slug templates_listview %}#toc-header-template).
10
+ * ([see example]({% slug templates_listview %}#toc-header-template)).
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * @Component({
15
+ * template: `
16
+ * <kendo-listview [data]="items">
17
+ * <ng-template kendoListViewHeaderTemplate>
18
+ * <div class="header-content">
19
+ * <h3>Product List</h3>
20
+ * <button kendoListViewAddCommand>Add New Item</button>
21
+ * </div>
22
+ * </ng-template>
23
+ * </kendo-listview>
24
+ * `
25
+ * })
26
+ * export class AppComponent { }
27
+ * ```
11
28
  */
12
29
  export class HeaderTemplateDirective {
13
30
  templateRef;
@@ -5,15 +5,32 @@
5
5
  import { Directive, TemplateRef } from '@angular/core';
6
6
  import * as i0 from "@angular/core";
7
7
  /**
8
- * Renders the list item content. To define an item template, nest an `<ng-template>` tag
8
+ * Allows customizing the list item content. To define an item template, nest an `<ng-template>` tag
9
9
  * with the `kendoListViewItemTemplate` directive inside the `<kendo-listview>` tag
10
- * [see example]({% slug templates_listview %}#toc-item-template).
10
+ * ([see example]({% slug templates_listview %}#toc-item-template)).
11
11
  *
12
12
  * The following values are available as context variables:
13
- * - `let-dataItem="dataItem"` (`any`) - The current data item. Also available as implicit context variable.
14
- * - `let-index="index"` (`number`) - The current item index.
15
- * - `let-isFirst="isFirst"` (`boolean`) - Indicates whether the current data item will be rendered as the first item on the list.
16
- * - `let-isLast="isLast"` (`boolean`)- Indicates whether the current data item will be rendered as the last item on the list.
13
+ * - `let-dataItem="dataItem"` (`any`)&mdashThe current data item. Also available as implicit context variable.
14
+ * - `let-index="index"` (`number`)&mdashThe current item index.
15
+ * - `let-isFirst="isFirst"` (`boolean`)&mdashIndicates whether the current data item renders as the first item on the list.
16
+ * - `let-isLast="isLast"` (`boolean`)&mdashIndicates whether the current data item renders as the last item on the list.
17
+ *
18
+ * @example
19
+ * ```typescript
20
+ * @Component({
21
+ * template: `
22
+ * <kendo-listview [data]="items">
23
+ * <ng-template kendoListViewItemTemplate let-dataItem let-index="index">
24
+ * <div class="item-wrapper">
25
+ * <h4>{{ dataItem.name }}</h4>
26
+ * <p>Item #{{ index + 1 }}: {{ dataItem.description }}</p>
27
+ * </div>
28
+ * </ng-template>
29
+ * </kendo-listview>
30
+ * `
31
+ * })
32
+ * export class AppComponent { }
33
+ * ```
17
34
  */
18
35
  export class ItemTemplateDirective {
19
36
  templateRef;
@@ -7,7 +7,24 @@ import * as i0 from "@angular/core";
7
7
  /**
8
8
  * Overrides the default loader content of the ListView. To define a loader template, nest an `<ng-template>` tag
9
9
  * with the `kendoListViewLoaderTemplate` directive inside the `<kendo-listview>` tag
10
- * [see example]({% slug templates_listview %}#toc-loader-template).
10
+ * ([see example]({% slug templates_listview %}#toc-loader-template)).
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * @Component({
15
+ * template: `
16
+ * <kendo-listview [data]="items" [loading]="isLoading">
17
+ * <ng-template kendoListViewLoaderTemplate>
18
+ * <div class="custom-loader">
19
+ * <kendo-loader></kendo-loader>
20
+ * <p>Loading data, please wait...</p>
21
+ * </div>
22
+ * </ng-template>
23
+ * </kendo-listview>
24
+ * `
25
+ * })
26
+ * export class AppComponent { }
27
+ * ```
11
28
  */
12
29
  export class LoaderTemplateDirective {
13
30
  templateRef;