@progress/kendo-angular-listview 3.0.2 → 4.0.0-next.202204010900

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 (152) hide show
  1. package/bundles/kendo-angular-listview.umd.js +5 -0
  2. package/{dist/es2015/data-binding → data-binding}/data-binding.directive.d.ts +5 -1
  3. package/{dist/es2015/editing → editing}/commands/add-command.directive.d.ts +3 -0
  4. package/{dist/es2015/editing → editing}/commands/cancel-command.directive.d.ts +3 -0
  5. package/{dist/es2015/editing → editing}/commands/edit-command.directive.d.ts +3 -0
  6. package/{dist/es2015/editing → editing}/commands/remove-command.directive.d.ts +3 -0
  7. package/{dist/es2015/editing → editing}/commands/save-command.directive.d.ts +3 -0
  8. package/{dist/es2015/editing → editing}/edit-template.directive.d.ts +3 -0
  9. package/{dist/es2015/editing → editing}/edit.service.d.ts +6 -3
  10. package/{dist/es2015/editing → editing}/events/add-event-args.interface.d.ts +0 -0
  11. package/{dist/es2015/editing → editing}/events/cancel-event-args.interface.d.ts +0 -0
  12. package/{dist/es2015/editing → editing}/events/edit-event-args.interface.d.ts +0 -0
  13. package/{dist/es2015/editing → editing}/events/remove-event-args.interface.d.ts +0 -0
  14. package/{dist/es2015/editing → editing}/events/save-event-args.interface.d.ts +0 -0
  15. package/{dist/es2015 → esm2015}/data-binding/data-binding.directive.js +15 -16
  16. package/esm2015/editing/commands/add-command.directive.js +49 -0
  17. package/{dist/es2015 → esm2015}/editing/commands/cancel-command.directive.js +17 -23
  18. package/{dist/es2015 → esm2015}/editing/commands/edit-command.directive.js +17 -23
  19. package/{dist/es2015 → esm2015}/editing/commands/remove-command.directive.js +17 -23
  20. package/{dist/es2015 → esm2015}/editing/commands/save-command.directive.js +17 -23
  21. package/{dist/es2015 → esm2015}/editing/edit-template.directive.js +14 -12
  22. package/{dist/es2015 → esm2015}/editing/edit.service.js +9 -13
  23. package/{dist/es → esm2015}/editing/events/add-event-args.interface.js +1 -0
  24. package/{dist/es2015 → esm2015}/editing/events/cancel-event-args.interface.js +1 -0
  25. package/{dist/es2015 → esm2015}/editing/events/edit-event-args.interface.js +1 -0
  26. package/{dist/es2015 → esm2015}/editing/events/remove-event-args.interface.js +1 -0
  27. package/{dist/es → esm2015}/editing/events/save-event-args.interface.js +1 -0
  28. package/{dist/es/editing/events/remove-event-args.interface.js → esm2015/kendo-angular-listview.js} +4 -0
  29. package/{dist/es2015 → esm2015}/listview.component.js +242 -155
  30. package/{dist/es2015 → esm2015}/listview.module.js +56 -26
  31. package/{dist/es → esm2015}/main.js +5 -0
  32. package/{dist/es → esm2015}/models/listview-data-result.js +1 -0
  33. package/{dist/es → esm2015}/models/page-change-event.js +1 -0
  34. package/{dist/es2015 → esm2015}/models/page-size-change-event.js +0 -0
  35. package/{dist/es → esm2015}/models/page-size-item.js +1 -0
  36. package/{dist/es → esm2015}/models/pager-position.js +1 -0
  37. package/{dist/es → esm2015}/models/pager-settings.js +1 -0
  38. package/{dist/es → esm2015}/models/pager-type.js +1 -0
  39. package/{dist/es → esm2015}/models/scroll-bottom-event.js +1 -0
  40. package/{dist/es2015 → esm2015}/navigation/listview-navigable-item.directive.js +15 -18
  41. package/{dist/es2015 → esm2015}/navigation/navigation.service.js +8 -13
  42. package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
  43. package/esm2015/templates/footer-template.directive.js +24 -0
  44. package/esm2015/templates/header-template.directive.js +24 -0
  45. package/{dist/es2015 → esm2015}/templates/item-template.directive.js +12 -11
  46. package/esm2015/templates/loader-template.directive.js +24 -0
  47. package/esm2015/templates/template-context.directive.js +33 -0
  48. package/{dist/es2015 → esm2015}/utils.js +0 -0
  49. package/{dist/fesm2015/index.js → fesm2015/kendo-angular-listview.js} +521 -417
  50. package/{dist/es/editing/events/cancel-event-args.interface.js → kendo-angular-listview.d.ts} +5 -0
  51. package/{dist/es2015/listview.component.d.ts → listview.component.d.ts} +13 -7
  52. package/listview.module.d.ts +39 -0
  53. package/{dist/es2015/main.d.ts → main.d.ts} +5 -0
  54. package/{dist/es2015/models → models}/listview-data-result.d.ts +0 -0
  55. package/{dist/es2015/models → models}/page-change-event.d.ts +0 -0
  56. package/{dist/es2015/models → models}/page-size-change-event.d.ts +0 -0
  57. package/{dist/es2015/models → models}/page-size-item.d.ts +0 -0
  58. package/{dist/es2015/models → models}/pager-position.d.ts +0 -0
  59. package/{dist/es2015/models → models}/pager-settings.d.ts +0 -0
  60. package/{dist/es2015/models → models}/pager-type.d.ts +0 -0
  61. package/{dist/es2015/models → models}/scroll-bottom-event.d.ts +0 -0
  62. package/{dist/es2015/navigation → navigation}/listview-navigable-item.directive.d.ts +3 -0
  63. package/{dist/es2015/navigation → navigation}/navigation.service.d.ts +5 -1
  64. package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
  65. package/package.json +36 -108
  66. package/schematics/ngAdd/index.js +5 -2
  67. package/schematics/ngAdd/index.js.map +1 -1
  68. package/{dist/es2015/templates → templates}/footer-template.directive.d.ts +3 -0
  69. package/{dist/es2015/templates → templates}/header-template.directive.d.ts +3 -0
  70. package/{dist/es2015/templates → templates}/item-template.directive.d.ts +3 -0
  71. package/{dist/es2015/templates → templates}/loader-template.directive.d.ts +3 -0
  72. package/{dist/es2015/templates → templates}/template-context.directive.d.ts +4 -1
  73. package/{dist/es2015/utils.d.ts → utils.d.ts} +0 -0
  74. package/dist/cdn/js/kendo-angular-listview.js +0 -20
  75. package/dist/cdn/main.js +0 -5
  76. package/dist/es/data-binding/data-binding.directive.js +0 -69
  77. package/dist/es/editing/commands/add-command.directive.js +0 -58
  78. package/dist/es/editing/commands/cancel-command.directive.js +0 -74
  79. package/dist/es/editing/commands/edit-command.directive.js +0 -62
  80. package/dist/es/editing/commands/remove-command.directive.js +0 -61
  81. package/dist/es/editing/commands/save-command.directive.js +0 -74
  82. package/dist/es/editing/edit-template.directive.js +0 -32
  83. package/dist/es/editing/edit.service.js +0 -136
  84. package/dist/es/editing/events/edit-event-args.interface.js +0 -4
  85. package/dist/es/index.js +0 -17
  86. package/dist/es/listview.component.js +0 -534
  87. package/dist/es/listview.module.js +0 -83
  88. package/dist/es/models/page-size-change-event.js +0 -18
  89. package/dist/es/navigation/listview-navigable-item.directive.js +0 -70
  90. package/dist/es/navigation/navigation.service.js +0 -162
  91. package/dist/es/package-metadata.js +0 -15
  92. package/dist/es/templates/footer-template.directive.js +0 -24
  93. package/dist/es/templates/header-template.directive.js +0 -24
  94. package/dist/es/templates/item-template.directive.js +0 -30
  95. package/dist/es/templates/loader-template.directive.js +0 -24
  96. package/dist/es/templates/template-context.directive.js +0 -40
  97. package/dist/es/utils.js +0 -103
  98. package/dist/es2015/editing/commands/add-command.directive.js +0 -55
  99. package/dist/es2015/editing/events/add-event-args.interface.js +0 -4
  100. package/dist/es2015/editing/events/save-event-args.interface.js +0 -4
  101. package/dist/es2015/index.d.ts +0 -17
  102. package/dist/es2015/index.js +0 -17
  103. package/dist/es2015/index.metadata.json +0 -1
  104. package/dist/es2015/listview.module.d.ts +0 -18
  105. package/dist/es2015/main.js +0 -13
  106. package/dist/es2015/models/listview-data-result.js +0 -4
  107. package/dist/es2015/models/page-change-event.js +0 -4
  108. package/dist/es2015/models/page-size-item.js +0 -4
  109. package/dist/es2015/models/pager-position.js +0 -4
  110. package/dist/es2015/models/pager-settings.js +0 -4
  111. package/dist/es2015/models/pager-type.js +0 -4
  112. package/dist/es2015/models/scroll-bottom-event.js +0 -4
  113. package/dist/es2015/templates/footer-template.directive.js +0 -23
  114. package/dist/es2015/templates/header-template.directive.js +0 -23
  115. package/dist/es2015/templates/loader-template.directive.js +0 -23
  116. package/dist/es2015/templates/template-context.directive.js +0 -35
  117. package/dist/fesm5/index.js +0 -1528
  118. package/dist/npm/data-binding/data-binding.directive.js +0 -71
  119. package/dist/npm/editing/commands/add-command.directive.js +0 -60
  120. package/dist/npm/editing/commands/cancel-command.directive.js +0 -76
  121. package/dist/npm/editing/commands/edit-command.directive.js +0 -64
  122. package/dist/npm/editing/commands/remove-command.directive.js +0 -63
  123. package/dist/npm/editing/commands/save-command.directive.js +0 -76
  124. package/dist/npm/editing/edit-template.directive.js +0 -34
  125. package/dist/npm/editing/edit.service.js +0 -140
  126. package/dist/npm/editing/events/add-event-args.interface.js +0 -6
  127. package/dist/npm/editing/events/cancel-event-args.interface.js +0 -6
  128. package/dist/npm/editing/events/edit-event-args.interface.js +0 -6
  129. package/dist/npm/editing/events/remove-event-args.interface.js +0 -6
  130. package/dist/npm/editing/events/save-event-args.interface.js +0 -6
  131. package/dist/npm/index.js +0 -29
  132. package/dist/npm/listview.component.js +0 -536
  133. package/dist/npm/listview.module.js +0 -85
  134. package/dist/npm/main.js +0 -24
  135. package/dist/npm/models/listview-data-result.js +0 -6
  136. package/dist/npm/models/page-change-event.js +0 -6
  137. package/dist/npm/models/page-size-change-event.js +0 -20
  138. package/dist/npm/models/page-size-item.js +0 -6
  139. package/dist/npm/models/pager-position.js +0 -6
  140. package/dist/npm/models/pager-settings.js +0 -6
  141. package/dist/npm/models/pager-type.js +0 -6
  142. package/dist/npm/models/scroll-bottom-event.js +0 -6
  143. package/dist/npm/navigation/listview-navigable-item.directive.js +0 -72
  144. package/dist/npm/navigation/navigation.service.js +0 -164
  145. package/dist/npm/package-metadata.js +0 -17
  146. package/dist/npm/templates/footer-template.directive.js +0 -26
  147. package/dist/npm/templates/header-template.directive.js +0 -26
  148. package/dist/npm/templates/item-template.directive.js +0 -32
  149. package/dist/npm/templates/loader-template.directive.js +0 -26
  150. package/dist/npm/templates/template-context.directive.js +0 -42
  151. package/dist/npm/utils.js +0 -105
  152. package/dist/systemjs/kendo-angular-listview.js +0 -5
@@ -1,20 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var kendo_angular_pager_1 = require("@progress/kendo-angular-pager");
9
- /**
10
- * The arguments of the [`pageSizeChange`]({% slug api_listview_listviewcomponent %}#toc-pagesizechange) event of the ListView
11
- * ([more details]({% slug paging_listview %}).
12
- */
13
- var PageSizeChangeEvent = /** @class */ (function (_super) {
14
- tslib_1.__extends(PageSizeChangeEvent, _super);
15
- function PageSizeChangeEvent() {
16
- return _super !== null && _super.apply(this, arguments) || this;
17
- }
18
- return PageSizeChangeEvent;
19
- }(kendo_angular_pager_1.PageSizeChangeEvent));
20
- exports.PageSizeChangeEvent = PageSizeChangeEvent;
@@ -1,6 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,72 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var core_1 = require("@angular/core");
9
- var navigation_service_1 = require("./navigation.service");
10
- var utils_1 = require("../utils");
11
- /**
12
- * @hidden
13
- */
14
- var ListViewNavigableItemDirective = /** @class */ (function () {
15
- function ListViewNavigableItemDirective(hostElement, renderer, navigationService) {
16
- this.hostElement = hostElement;
17
- this.renderer = renderer;
18
- this.navigationService = navigationService;
19
- }
20
- ListViewNavigableItemDirective.prototype.ngOnChanges = function () {
21
- this.updateNavigationState();
22
- };
23
- ListViewNavigableItemDirective.prototype.ngOnInit = function () {
24
- this.navigationSubscription = this.navigationService.changes
25
- .subscribe(this.updateNavigationState.bind(this));
26
- };
27
- ListViewNavigableItemDirective.prototype.ngOnDestroy = function () {
28
- if (utils_1.isPresent(this.navigationSubscription)) {
29
- this.navigationSubscription.unsubscribe();
30
- }
31
- };
32
- ListViewNavigableItemDirective.prototype.updateNavigationState = function () {
33
- this.updateTabIndex();
34
- this.updateFocusedState();
35
- };
36
- ListViewNavigableItemDirective.prototype.updateFocusedState = function () {
37
- var shouldFocus = this.navigationService.isActive(this.index) && this.navigationService.isFocused;
38
- var focusedCssClass = 'k-state-focused';
39
- if (shouldFocus) {
40
- this.renderer.addClass(this.hostElement.nativeElement, focusedCssClass);
41
- this.hostElement.nativeElement.focus();
42
- }
43
- else {
44
- this.renderer.removeClass(this.hostElement.nativeElement, focusedCssClass);
45
- }
46
- };
47
- ListViewNavigableItemDirective.prototype.updateTabIndex = function () {
48
- if (!this.navigationService.isEnabled) {
49
- this.renderer.removeAttribute(this.hostElement.nativeElement, 'tabindex');
50
- }
51
- else if (this.navigationService.isActive(this.index)) {
52
- this.renderer.setAttribute(this.hostElement.nativeElement, 'tabindex', '0');
53
- }
54
- else {
55
- this.renderer.setAttribute(this.hostElement.nativeElement, 'tabindex', '-1');
56
- }
57
- };
58
- tslib_1.__decorate([
59
- core_1.Input(),
60
- tslib_1.__metadata("design:type", Number)
61
- ], ListViewNavigableItemDirective.prototype, "index", void 0);
62
- ListViewNavigableItemDirective = tslib_1.__decorate([
63
- core_1.Directive({
64
- selector: '[kendoListViewNavigableItem]'
65
- }),
66
- tslib_1.__metadata("design:paramtypes", [core_1.ElementRef,
67
- core_1.Renderer2,
68
- navigation_service_1.NavigationService])
69
- ], ListViewNavigableItemDirective);
70
- return ListViewNavigableItemDirective;
71
- }());
72
- exports.ListViewNavigableItemDirective = ListViewNavigableItemDirective;
@@ -1,164 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var core_1 = require("@angular/core");
9
- var rxjs_1 = require("rxjs");
10
- var kendo_angular_common_1 = require("@progress/kendo-angular-common");
11
- var utils_1 = require("../utils");
12
- /**
13
- * @hidden
14
- *
15
- * Provided per ListView instance. Keeps the availability, active index and focused state of the current ListView.
16
- * Emits `changes` when any of the aforementioned states changes.
17
- */
18
- var NavigationService = /** @class */ (function () {
19
- function NavigationService() {
20
- /**
21
- * Emits every time a change in active index/focus/blur/navigation availability occurs.
22
- */
23
- this.changes = new rxjs_1.Subject();
24
- /**
25
- * Specifies if a ListView item currently holds focus.
26
- */
27
- this.isFocused = false;
28
- /**
29
- * Keeps track of the index of the items that should be the current focus target (tabindex="0").
30
- * When set to `null`/`undefined`, the navigation is disabled and the items should not render a tabindex.
31
- */
32
- this.activeIndex = null;
33
- }
34
- Object.defineProperty(NavigationService.prototype, "isEnabled", {
35
- /**
36
- * Sets or gets if the navigation is enabled.
37
- * When no activeIndex is present, the navigation is inferred as disabled.
38
- * Toggling the service availability clears the current active index or activates the first one.
39
- */
40
- get: function () {
41
- return utils_1.isPresent(this.activeIndex);
42
- },
43
- set: function (enabled) {
44
- if (enabled) {
45
- this.activeIndex = 0;
46
- }
47
- else {
48
- this.activeIndex = null;
49
- }
50
- this.changes.next();
51
- },
52
- enumerable: true,
53
- configurable: true
54
- });
55
- /**
56
- * Shows if the checked index should be the current available focus target (tabindex="0").
57
- */
58
- NavigationService.prototype.isActive = function (index) {
59
- return index === this.activeIndex;
60
- };
61
- NavigationService.prototype.handleKeyDown = function (event, totalItemsCount) {
62
- var keyCode = event.keyCode;
63
- switch (keyCode) {
64
- case kendo_angular_common_1.Keys.ArrowLeft:
65
- case kendo_angular_common_1.Keys.ArrowUp:
66
- this.navigateToPrevious();
67
- break;
68
- case kendo_angular_common_1.Keys.ArrowRight:
69
- case kendo_angular_common_1.Keys.ArrowDown:
70
- this.navigateToNext(totalItemsCount);
71
- break;
72
- case kendo_angular_common_1.Keys.Home:
73
- var firstIndex = 0;
74
- this.navigateTo(firstIndex);
75
- break;
76
- case kendo_angular_common_1.Keys.End:
77
- var lastIndex = totalItemsCount - 1;
78
- this.navigateTo(lastIndex);
79
- break;
80
- default: return;
81
- }
82
- // the following line is executed only if the pressed key matches one of the listview hotkeys -
83
- // they `break`, while the `default` case `return`s
84
- event.preventDefault();
85
- };
86
- NavigationService.prototype.handleFocusIn = function (event) {
87
- var target = event.target;
88
- if (!utils_1.isListViewItem(target)) {
89
- var listViewItemSelector = '.k-listview-item';
90
- var closestListViewItem = utils_1.closestWithMatch(target, listViewItemSelector);
91
- var isListViewItemChild = utils_1.isPresent(closestListViewItem);
92
- if (isListViewItemChild) {
93
- var itemIndex = utils_1.getListItemIndex(closestListViewItem);
94
- this.setActiveIndex(itemIndex);
95
- }
96
- return;
97
- }
98
- var targetIndex = utils_1.getListItemIndex(target);
99
- // don't emit if the no change in focused state has occurred and the targeted index is the same as the current activeIndex
100
- if (this.isFocused && targetIndex === this.activeIndex) {
101
- return;
102
- }
103
- this.activeIndex = targetIndex;
104
- this.isFocused = true;
105
- this.changes.next();
106
- };
107
- NavigationService.prototype.handleFocusOut = function (event) {
108
- // don't emit if the blurred item is not a listview item or if the new focus target is another listview item
109
- if (!utils_1.isListViewItem(event.target) || utils_1.isListViewItem(utils_1.relatedTarget(event))) {
110
- return;
111
- }
112
- this.isFocused = false;
113
- this.changes.next();
114
- };
115
- /**
116
- * Sets the `activeIndex` and triggers changes without focusing the corresponding ListView item.
117
- */
118
- NavigationService.prototype.setActiveIndex = function (index) {
119
- if (!this.isEnabled) {
120
- return;
121
- }
122
- if (index === this.activeIndex) {
123
- return;
124
- }
125
- this.activeIndex = index;
126
- this.changes.next();
127
- };
128
- /**
129
- * Focuses item at the targeted index. If no index is passed, the current `activeIndex` is used.
130
- * The passed target index is normalized to fit the min/max available indices bounds.
131
- */
132
- NavigationService.prototype.focusIndex = function (index, totalItemsCount) {
133
- if (!this.isEnabled) {
134
- return;
135
- }
136
- var parsed = parseInt(index, 10);
137
- var firstIndex = 0;
138
- var lastIndex = totalItemsCount - 1;
139
- var targetIndex = isNaN(parsed) ? this.activeIndex : utils_1.fitIntoRange(parsed, firstIndex, lastIndex);
140
- this.navigateTo(targetIndex);
141
- };
142
- NavigationService.prototype.navigateTo = function (index) {
143
- if (this.isFocused && this.activeIndex === index) {
144
- return;
145
- }
146
- this.isFocused = true;
147
- this.activeIndex = index;
148
- this.changes.next();
149
- };
150
- NavigationService.prototype.navigateToPrevious = function () {
151
- var previousIndex = Math.max(this.activeIndex - 1, 0);
152
- this.navigateTo(previousIndex);
153
- };
154
- NavigationService.prototype.navigateToNext = function (totalItemsCount) {
155
- var lastAvailableIndex = totalItemsCount - 1;
156
- var nextIndex = Math.min(this.activeIndex + 1, lastAvailableIndex);
157
- this.navigateTo(nextIndex);
158
- };
159
- NavigationService = tslib_1.__decorate([
160
- core_1.Injectable()
161
- ], NavigationService);
162
- return NavigationService;
163
- }());
164
- exports.NavigationService = NavigationService;
@@ -1,17 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- /**
8
- * @hidden
9
- */
10
- exports.packageMetadata = {
11
- name: '@progress/kendo-angular-listview',
12
- productName: 'Kendo UI for Angular',
13
- productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
14
- publishDate: 1646219074,
15
- version: '',
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
- };
@@ -1,26 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var core_1 = require("@angular/core");
9
- /**
10
- * Renders the footer content of the ListView. To define a footer template, nest an `<ng-template>` tag
11
- * with the `kendoListViewFooterTemplate` directive inside the `<kendo-listview>` tag
12
- * [see example]({% slug templates_listview %}#toc-footer-template).
13
- */
14
- var FooterTemplateDirective = /** @class */ (function () {
15
- function FooterTemplateDirective(templateRef) {
16
- this.templateRef = templateRef;
17
- }
18
- FooterTemplateDirective = tslib_1.__decorate([
19
- core_1.Directive({
20
- selector: '[kendoListViewFooterTemplate]'
21
- }),
22
- tslib_1.__metadata("design:paramtypes", [core_1.TemplateRef])
23
- ], FooterTemplateDirective);
24
- return FooterTemplateDirective;
25
- }());
26
- exports.FooterTemplateDirective = FooterTemplateDirective;
@@ -1,26 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var core_1 = require("@angular/core");
9
- /**
10
- * Renders the header content of the ListView. To define a header template, nest an `<ng-template>` tag
11
- * with the `kendoListViewHeaderTemplate` directive inside the `<kendo-listview>` tag
12
- * [see example]({% slug templates_listview %}#toc-header-template).
13
- */
14
- var HeaderTemplateDirective = /** @class */ (function () {
15
- function HeaderTemplateDirective(templateRef) {
16
- this.templateRef = templateRef;
17
- }
18
- HeaderTemplateDirective = tslib_1.__decorate([
19
- core_1.Directive({
20
- selector: '[kendoListViewHeaderTemplate]'
21
- }),
22
- tslib_1.__metadata("design:paramtypes", [core_1.TemplateRef])
23
- ], HeaderTemplateDirective);
24
- return HeaderTemplateDirective;
25
- }());
26
- exports.HeaderTemplateDirective = HeaderTemplateDirective;
@@ -1,32 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var core_1 = require("@angular/core");
9
- /**
10
- * Renders the list item content. To define an item template, nest an `<ng-template>` tag
11
- * with the `kendoListViewItemTemplate` directive inside the `<kendo-listview>` tag
12
- * [see example]({% slug templates_listview %}#toc-item-template).
13
- *
14
- * The following values are available as context variables:
15
- * - `let-dataItem="dataItem"` (`any`) - The current data item. Also available as implicit context variable.
16
- * - `let-index="index"` (`number`) - The current item index.
17
- * - `let-isFirst="isFirst"` (`boolean`) - Indicates whether the current data item will be rendered as the first item on the list.
18
- * - `let-isLast="isLast"` (`boolean`)- Indicates whether the current data item will be rendered as the last item on the list.
19
- */
20
- var ItemTemplateDirective = /** @class */ (function () {
21
- function ItemTemplateDirective(templateRef) {
22
- this.templateRef = templateRef;
23
- }
24
- ItemTemplateDirective = tslib_1.__decorate([
25
- core_1.Directive({
26
- selector: '[kendoListViewItemTemplate]'
27
- }),
28
- tslib_1.__metadata("design:paramtypes", [core_1.TemplateRef])
29
- ], ItemTemplateDirective);
30
- return ItemTemplateDirective;
31
- }());
32
- exports.ItemTemplateDirective = ItemTemplateDirective;
@@ -1,26 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var core_1 = require("@angular/core");
9
- /**
10
- * Overrides the default loader content of the ListView. To define a loader template, nest an `<ng-template>` tag
11
- * with the `kendoListViewLoaderTemplate` directive inside the `<kendo-listview>` tag
12
- * [see example]({% slug templates_listview %}#toc-loader-template).
13
- */
14
- var LoaderTemplateDirective = /** @class */ (function () {
15
- function LoaderTemplateDirective(templateRef) {
16
- this.templateRef = templateRef;
17
- }
18
- LoaderTemplateDirective = tslib_1.__decorate([
19
- core_1.Directive({
20
- selector: '[kendoListViewLoaderTemplate]'
21
- }),
22
- tslib_1.__metadata("design:paramtypes", [core_1.TemplateRef])
23
- ], LoaderTemplateDirective);
24
- return LoaderTemplateDirective;
25
- }());
26
- exports.LoaderTemplateDirective = LoaderTemplateDirective;
@@ -1,42 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var core_1 = require("@angular/core");
9
- /**
10
- * @hidden
11
- */
12
- var TemplateContextDirective = /** @class */ (function () {
13
- function TemplateContextDirective(viewContainerRef) {
14
- this.viewContainerRef = viewContainerRef;
15
- }
16
- Object.defineProperty(TemplateContextDirective.prototype, "templateContext", {
17
- set: function (context) {
18
- if (this.insertedViewRef) {
19
- this.viewContainerRef.remove(this.viewContainerRef.indexOf(this.insertedViewRef));
20
- this.insertedViewRef = undefined;
21
- }
22
- if (context.templateRef) {
23
- this.insertedViewRef = this.viewContainerRef.createEmbeddedView(context.templateRef, context);
24
- }
25
- },
26
- enumerable: true,
27
- configurable: true
28
- });
29
- tslib_1.__decorate([
30
- core_1.Input(),
31
- tslib_1.__metadata("design:type", Object),
32
- tslib_1.__metadata("design:paramtypes", [Object])
33
- ], TemplateContextDirective.prototype, "templateContext", null);
34
- TemplateContextDirective = tslib_1.__decorate([
35
- core_1.Directive({
36
- selector: '[templateContext]' // tslint:disable-line
37
- }),
38
- tslib_1.__metadata("design:paramtypes", [core_1.ViewContainerRef])
39
- ], TemplateContextDirective);
40
- return TemplateContextDirective;
41
- }());
42
- exports.TemplateContextDirective = TemplateContextDirective;
package/dist/npm/utils.js DELETED
@@ -1,105 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var kendo_angular_common_1 = require("@progress/kendo-angular-common");
8
- var LISTVIEW_ITEM_SELECTOR = '.k-listview-item';
9
- /**
10
- * @hidden
11
- */
12
- exports.isPresent = function (item) { return item !== null && item !== undefined; };
13
- /**
14
- * @hidden
15
- */
16
- exports.isObject = function (item) { return exports.isPresent(item) && typeof item === 'object'; };
17
- /**
18
- * @hidden
19
- *
20
- * Polyfill for `Element.matches`.
21
- * https://developer.mozilla.org/en-US/docs/Web/API/Element/matches
22
- */
23
- exports.match = function (element, selector) {
24
- var matcher = element.matches || element.msMatchesSelector || element.webkitMatchesSelector;
25
- if (!exports.isPresent(matcher)) {
26
- return false;
27
- }
28
- return matcher.call(element, selector);
29
- };
30
- /**
31
- * @hidden
32
- *
33
- * Checks if a target element has the `.k-listview-item` CSS class.
34
- */
35
- exports.isListViewItem = function (element) {
36
- if (!exports.isPresent(element)) {
37
- return false;
38
- }
39
- return exports.match(element, LISTVIEW_ITEM_SELECTOR);
40
- };
41
- /**
42
- * @hidden
43
- *
44
- * Extracts and parses to a number the `data-kendo-listview-item-index` attribute value from the targeted element.
45
- */
46
- exports.getListItemIndex = function (item) {
47
- if (!exports.isPresent(item)) {
48
- return null;
49
- }
50
- return Number(item.getAttribute('data-kendo-listview-item-index'));
51
- };
52
- /**
53
- * @hidden
54
- *
55
- * Gets the new focus target from a blur event.
56
- * Queries both event.relatedTarget and document.activeElement for compatibility with IE.
57
- */
58
- exports.relatedTarget = function (event) {
59
- if (!exports.isPresent(event.relatedTarget) || !kendo_angular_common_1.isDocumentAvailable()) {
60
- return null;
61
- }
62
- return event.relatedTarget || document.activeElement;
63
- };
64
- /**
65
- * @hidden
66
- *
67
- * If the given contender number is not defined or lower than the specified min - returns min, if its above the specified max - returns max.
68
- * If the number is in the given bounds, it is returned.
69
- */
70
- exports.fitIntoRange = function (contender, min, max) {
71
- if (!exports.isPresent(contender) || contender <= min) {
72
- return min;
73
- }
74
- else if (contender >= max) {
75
- return max;
76
- }
77
- else {
78
- return contender;
79
- }
80
- };
81
- /**
82
- * @hidden
83
- */
84
- exports.closestWithMatch = function (element, selector) {
85
- var parent = element;
86
- while (parent !== null && parent.nodeType === 1) {
87
- if (exports.match(parent, selector)) {
88
- return parent;
89
- }
90
- parent = parent.parentElement || parent.parentNode;
91
- }
92
- return null;
93
- };
94
- /**
95
- * @hidden
96
- *
97
- * Extracts and parses to a number the `data-kendo-listview-item-index` attribute value from the targeted element.
98
- */
99
- exports.getClosestListItemIndex = function (element) {
100
- if (!exports.isPresent(element)) {
101
- return null;
102
- }
103
- var closestListViewItem = exports.closestWithMatch(element, LISTVIEW_ITEM_SELECTOR);
104
- return exports.getListItemIndex(closestListViewItem);
105
- };