@progress/kendo-angular-treeview 6.0.0-dev.202112021059 → 6.0.0-dev.202201111033
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.
- package/dist/cdn/js/kendo-angular-treeview.js +18 -18
- package/dist/cdn/main.js +1 -1
- package/dist/es/checkbox/checkbox.component.js +17 -1
- package/dist/es/drag-and-drop/drag-and-drop-utils.js +3 -3
- package/dist/es/drag-and-drop/drag-and-drop.directive.js +2 -2
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/size.js +4 -0
- package/dist/es/treeview-group.component.js +7 -2
- package/dist/es/treeview-item-content.directive.js +2 -2
- package/dist/es/treeview-item.directive.js +1 -1
- package/dist/es/treeview.component.js +36 -4
- package/dist/es/utils.js +17 -5
- package/dist/es2015/checkbox/checkbox.component.d.ts +6 -0
- package/dist/es2015/checkbox/checkbox.component.js +13 -1
- package/dist/es2015/drag-and-drop/drag-and-drop-utils.js +3 -3
- package/dist/es2015/drag-and-drop/drag-and-drop.directive.js +2 -2
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/size.d.ts +14 -0
- package/dist/es2015/size.js +4 -0
- package/dist/es2015/treeview-group.component.d.ts +2 -0
- package/dist/es2015/treeview-group.component.js +49 -35
- package/dist/es2015/treeview-item-content.directive.js +2 -2
- package/dist/es2015/treeview-item.directive.js +1 -1
- package/dist/es2015/treeview.component.d.ts +13 -0
- package/dist/es2015/treeview.component.js +46 -13
- package/dist/es2015/utils.d.ts +7 -1
- package/dist/es2015/utils.js +17 -5
- package/dist/fesm2015/index.js +132 -62
- package/dist/fesm5/index.js +84 -20
- package/dist/npm/checkbox/checkbox.component.js +17 -1
- package/dist/npm/drag-and-drop/drag-and-drop-utils.js +3 -3
- package/dist/npm/drag-and-drop/drag-and-drop.directive.js +2 -2
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/size.js +6 -0
- package/dist/npm/treeview-group.component.js +7 -2
- package/dist/npm/treeview-item-content.directive.js +2 -2
- package/dist/npm/treeview-item.directive.js +1 -1
- package/dist/npm/treeview.component.js +35 -3
- package/dist/npm/utils.js +17 -5
- package/dist/systemjs/kendo-angular-treeview.js +1 -1
- package/package.json +9 -8
package/dist/fesm2015/index.js
CHANGED
|
@@ -22,7 +22,7 @@ const packageMetadata = {
|
|
|
22
22
|
name: '@progress/kendo-angular-treeview',
|
|
23
23
|
productName: 'Kendo UI for Angular',
|
|
24
24
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
25
|
-
publishDate:
|
|
25
|
+
publishDate: 1641897008,
|
|
26
26
|
version: '',
|
|
27
27
|
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'
|
|
28
28
|
};
|
|
@@ -224,7 +224,7 @@ const isFocusable = (element) => {
|
|
|
224
224
|
* @hidden
|
|
225
225
|
*/
|
|
226
226
|
const isContent = (element) => {
|
|
227
|
-
const scopeSelector = '.k-
|
|
227
|
+
const scopeSelector = '.k-treeview-leaf:not(.k-treeview-load-more-button),.k-treeview-item,.k-treeview';
|
|
228
228
|
if (!isDocumentAvailable()) {
|
|
229
229
|
return null;
|
|
230
230
|
}
|
|
@@ -233,20 +233,20 @@ const isContent = (element) => {
|
|
|
233
233
|
node = node.parentNode;
|
|
234
234
|
}
|
|
235
235
|
if (node) {
|
|
236
|
-
return match(node, '.k-
|
|
236
|
+
return match(node, '.k-treeview-leaf:not(.k-treeview-load-more-button)');
|
|
237
237
|
}
|
|
238
238
|
};
|
|
239
239
|
/**
|
|
240
240
|
* @hidden
|
|
241
241
|
*
|
|
242
|
-
* Returns the nested .k-
|
|
242
|
+
* Returns the nested .k-treeview-leaf:not(.k-treeview-load-more-button) element.
|
|
243
243
|
* If the passed parent item is itself a content node, it is returned.
|
|
244
244
|
*/
|
|
245
245
|
const getContentElement = (parent) => {
|
|
246
246
|
if (!isPresent(parent)) {
|
|
247
247
|
return null;
|
|
248
248
|
}
|
|
249
|
-
const selector = '.k-
|
|
249
|
+
const selector = '.k-treeview-leaf:not(.k-treeview-load-more-button)';
|
|
250
250
|
if (match(parent, selector)) {
|
|
251
251
|
return parent;
|
|
252
252
|
}
|
|
@@ -256,7 +256,7 @@ const getContentElement = (parent) => {
|
|
|
256
256
|
* @hidden
|
|
257
257
|
*/
|
|
258
258
|
const isLoadMoreButton = (element) => {
|
|
259
|
-
return isPresent(closestWithMatch(element, '.k-
|
|
259
|
+
return isPresent(closestWithMatch(element, '.k-treeview-leaf.k-treeview-load-more-button'));
|
|
260
260
|
};
|
|
261
261
|
/**
|
|
262
262
|
* @hidden
|
|
@@ -415,6 +415,18 @@ const sameValues = (as, bs) => {
|
|
|
415
415
|
}
|
|
416
416
|
return Array.from(as).every(v => bs.has(v));
|
|
417
417
|
};
|
|
418
|
+
/**
|
|
419
|
+
* @hidden
|
|
420
|
+
* Returns the size class based on the component and size input.
|
|
421
|
+
*/
|
|
422
|
+
const getSizeClass = (component, size) => {
|
|
423
|
+
const SIZE_CLASSES = {
|
|
424
|
+
'small': `k-${component}-sm`,
|
|
425
|
+
'medium': `k-${component}-md`,
|
|
426
|
+
'large': `k-${component}-lg`
|
|
427
|
+
};
|
|
428
|
+
return SIZE_CLASSES[size];
|
|
429
|
+
};
|
|
418
430
|
|
|
419
431
|
const safe = node => (node || {});
|
|
420
432
|
const safeChildren = node => (safe(node).children || []);
|
|
@@ -1220,6 +1232,7 @@ let TreeViewComponent = class TreeViewComponent {
|
|
|
1220
1232
|
this.isActive = false;
|
|
1221
1233
|
this.data = new BehaviorSubject([]);
|
|
1222
1234
|
this._animate = true;
|
|
1235
|
+
this._size = 'medium';
|
|
1223
1236
|
this.subscriptions = new Subscription();
|
|
1224
1237
|
this.domSubscriptions = [];
|
|
1225
1238
|
validatePackage(packageMetadata);
|
|
@@ -1315,6 +1328,26 @@ let TreeViewComponent = class TreeViewComponent {
|
|
|
1315
1328
|
this._isSelected = callback;
|
|
1316
1329
|
this.selectable = Boolean(this._isSelected);
|
|
1317
1330
|
}
|
|
1331
|
+
/**
|
|
1332
|
+
* Sets the size of the component.
|
|
1333
|
+
*
|
|
1334
|
+
* The possible values are:
|
|
1335
|
+
* * `'small'`
|
|
1336
|
+
* * `'medium'` (default)
|
|
1337
|
+
* * `'large'`
|
|
1338
|
+
* * `null`
|
|
1339
|
+
*
|
|
1340
|
+
*/
|
|
1341
|
+
set size(size) {
|
|
1342
|
+
this.renderer.removeClass(this.element.nativeElement, getSizeClass('treeview', this.size));
|
|
1343
|
+
if (size) {
|
|
1344
|
+
this.renderer.addClass(this.element.nativeElement, getSizeClass('treeview', size));
|
|
1345
|
+
}
|
|
1346
|
+
this._size = size;
|
|
1347
|
+
}
|
|
1348
|
+
get size() {
|
|
1349
|
+
return this._size;
|
|
1350
|
+
}
|
|
1318
1351
|
ngOnChanges(changes) {
|
|
1319
1352
|
this.navigationService.navigable = Boolean(this.navigable);
|
|
1320
1353
|
// TODO: should react to changes.loadOnDemand as well - should preload the data or clear the already cached items
|
|
@@ -1349,6 +1382,9 @@ let TreeViewComponent = class TreeViewComponent {
|
|
|
1349
1382
|
this.attachDomHandlers();
|
|
1350
1383
|
});
|
|
1351
1384
|
}
|
|
1385
|
+
if (this.size) {
|
|
1386
|
+
this.renderer.addClass(this.element.nativeElement, getSizeClass('treeview', this.size));
|
|
1387
|
+
}
|
|
1352
1388
|
}
|
|
1353
1389
|
/**
|
|
1354
1390
|
* Blurs the focused TreeView item.
|
|
@@ -1505,7 +1541,7 @@ let TreeViewComponent = class TreeViewComponent {
|
|
|
1505
1541
|
return;
|
|
1506
1542
|
}
|
|
1507
1543
|
const index = nodeId(closestNode(target));
|
|
1508
|
-
// the disabled check is probably not needed due to the k-
|
|
1544
|
+
// the disabled check is probably not needed due to the k-disabled styles
|
|
1509
1545
|
if (!index || this.navigationService.isDisabled(index)) {
|
|
1510
1546
|
return;
|
|
1511
1547
|
}
|
|
@@ -1561,7 +1597,6 @@ let TreeViewComponent = class TreeViewComponent {
|
|
|
1561
1597
|
}
|
|
1562
1598
|
};
|
|
1563
1599
|
__decorate([
|
|
1564
|
-
HostBinding("class.k-widget"),
|
|
1565
1600
|
HostBinding("class.k-treeview"),
|
|
1566
1601
|
__metadata("design:type", Boolean)
|
|
1567
1602
|
], TreeViewComponent.prototype, "classNames", void 0);
|
|
@@ -1735,6 +1770,11 @@ __decorate([
|
|
|
1735
1770
|
Input(),
|
|
1736
1771
|
__metadata("design:type", String)
|
|
1737
1772
|
], TreeViewComponent.prototype, "filter", void 0);
|
|
1773
|
+
__decorate([
|
|
1774
|
+
Input(),
|
|
1775
|
+
__metadata("design:type", String),
|
|
1776
|
+
__metadata("design:paramtypes", [String])
|
|
1777
|
+
], TreeViewComponent.prototype, "size", null);
|
|
1738
1778
|
TreeViewComponent = __decorate([
|
|
1739
1779
|
Component({
|
|
1740
1780
|
changeDetection: ChangeDetectionStrategy.Default,
|
|
@@ -1742,21 +1782,26 @@ TreeViewComponent = __decorate([
|
|
|
1742
1782
|
providers: providers,
|
|
1743
1783
|
selector: 'kendo-treeview',
|
|
1744
1784
|
template: `
|
|
1745
|
-
<
|
|
1746
|
-
|
|
1785
|
+
<span
|
|
1786
|
+
class="k-treeview-filter"
|
|
1747
1787
|
*ngIf="filterable"
|
|
1748
|
-
[value]="filter"
|
|
1749
|
-
[clearButton]="true"
|
|
1750
|
-
(valueChange)="filterChange.emit($event)"
|
|
1751
|
-
[placeholder]="filterInputPlaceholder"
|
|
1752
1788
|
>
|
|
1753
|
-
<
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1789
|
+
<kendo-textbox
|
|
1790
|
+
[size]="size"
|
|
1791
|
+
[value]="filter"
|
|
1792
|
+
[clearButton]="true"
|
|
1793
|
+
(valueChange)="filterChange.emit($event)"
|
|
1794
|
+
[placeholder]="filterInputPlaceholder"
|
|
1795
|
+
>
|
|
1796
|
+
<ng-template kendoTextBoxPrefixTemplate>
|
|
1797
|
+
<span class="k-input-icon k-icon k-i-search"></span>
|
|
1798
|
+
</ng-template>
|
|
1799
|
+
</kendo-textbox>
|
|
1800
|
+
</span>
|
|
1757
1801
|
<ul class="k-treeview-lines"
|
|
1758
1802
|
kendoTreeViewGroup
|
|
1759
1803
|
role="group"
|
|
1804
|
+
[size]="size"
|
|
1760
1805
|
[loadOnDemand]="loadOnDemand"
|
|
1761
1806
|
[checkboxes]="checkboxes"
|
|
1762
1807
|
[expandIcons]="expandIcons"
|
|
@@ -1810,6 +1855,7 @@ let TreeViewGroupComponent = class TreeViewGroupComponent {
|
|
|
1810
1855
|
this.role = 'group';
|
|
1811
1856
|
this.loadOnDemand = true;
|
|
1812
1857
|
this.textField = "";
|
|
1858
|
+
this.size = 'medium';
|
|
1813
1859
|
this.initialNodesLoaded = false;
|
|
1814
1860
|
this.loadingMoreNodes = false;
|
|
1815
1861
|
this._data = [];
|
|
@@ -2010,7 +2056,7 @@ let TreeViewGroupComponent = class TreeViewGroupComponent {
|
|
|
2010
2056
|
}
|
|
2011
2057
|
};
|
|
2012
2058
|
__decorate([
|
|
2013
|
-
HostBinding("class.k-group"),
|
|
2059
|
+
HostBinding("class.k-treeview-group"),
|
|
2014
2060
|
__metadata("design:type", Boolean)
|
|
2015
2061
|
], TreeViewGroupComponent.prototype, "kGroupClass", void 0);
|
|
2016
2062
|
__decorate([
|
|
@@ -2073,6 +2119,10 @@ __decorate([
|
|
|
2073
2119
|
Input(),
|
|
2074
2120
|
__metadata("design:type", Object)
|
|
2075
2121
|
], TreeViewGroupComponent.prototype, "loadMoreService", void 0);
|
|
2122
|
+
__decorate([
|
|
2123
|
+
Input(),
|
|
2124
|
+
__metadata("design:type", String)
|
|
2125
|
+
], TreeViewGroupComponent.prototype, "size", void 0);
|
|
2076
2126
|
__decorate([
|
|
2077
2127
|
Input(),
|
|
2078
2128
|
__metadata("design:type", Function)
|
|
@@ -2119,7 +2169,7 @@ TreeViewGroupComponent = __decorate([
|
|
|
2119
2169
|
template: `
|
|
2120
2170
|
<li
|
|
2121
2171
|
*ngFor="let node of data; let index = index; trackBy: trackBy"
|
|
2122
|
-
class="k-
|
|
2172
|
+
class="k-treeview-item"
|
|
2123
2173
|
[class.k-display-none]="!isVisible(node, nodeIndex(index))"
|
|
2124
2174
|
kendoTreeViewItem
|
|
2125
2175
|
[attr.aria-setsize]="totalNodesCount"
|
|
@@ -2138,18 +2188,23 @@ TreeViewGroupComponent = __decorate([
|
|
|
2138
2188
|
[isSelected]="isSelected(node, nodeIndex(index))"
|
|
2139
2189
|
[attr.data-treeindex]="nodeIndex(index)"
|
|
2140
2190
|
>
|
|
2141
|
-
<div class="k-mid">
|
|
2191
|
+
<div class="k-treeview-mid">
|
|
2142
2192
|
<span
|
|
2143
|
-
class="k-
|
|
2144
|
-
[class.k-i-collapse]="isExpanded(node, nodeIndex(index))"
|
|
2145
|
-
[class.k-i-expand]="!isExpanded(node, nodeIndex(index))"
|
|
2193
|
+
class="k-treeview-toggle"
|
|
2146
2194
|
[kendoTreeViewLoading]="nodeIndex(index)"
|
|
2147
2195
|
(click)="expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))"
|
|
2148
2196
|
*ngIf="expandIcons && hasChildren(node)"
|
|
2149
2197
|
>
|
|
2198
|
+
<span
|
|
2199
|
+
class="k-icon"
|
|
2200
|
+
[class.k-i-collapse]="isExpanded(node, nodeIndex(index))"
|
|
2201
|
+
[class.k-i-expand]="!isExpanded(node, nodeIndex(index))"
|
|
2202
|
+
>
|
|
2203
|
+
</span>
|
|
2150
2204
|
</span>
|
|
2151
2205
|
<kendo-checkbox
|
|
2152
2206
|
*ngIf="checkboxes"
|
|
2207
|
+
[size]="size"
|
|
2153
2208
|
[node]="node"
|
|
2154
2209
|
[index]="nodeIndex(index)"
|
|
2155
2210
|
[isChecked]="isChecked"
|
|
@@ -2162,24 +2217,26 @@ TreeViewGroupComponent = __decorate([
|
|
|
2162
2217
|
[index]="nodeIndex(index)"
|
|
2163
2218
|
[initialSelection]="isSelected(node, nodeIndex(index))"
|
|
2164
2219
|
[isSelected]="isSelected"
|
|
2165
|
-
class="k-
|
|
2220
|
+
class="k-treeview-leaf"
|
|
2166
2221
|
[style.touch-action]="touchActions ? '' : 'none'"
|
|
2167
2222
|
>
|
|
2168
|
-
<
|
|
2169
|
-
<ng-container
|
|
2170
|
-
<ng-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2223
|
+
<span class="k-treeview-leaf-text">
|
|
2224
|
+
<ng-container [ngSwitch]="hasTemplate">
|
|
2225
|
+
<ng-container *ngSwitchCase="true">
|
|
2226
|
+
<ng-template
|
|
2227
|
+
[ngTemplateOutlet]="nodeTemplateRef"
|
|
2228
|
+
[ngTemplateOutletContext]="{
|
|
2229
|
+
$implicit: node,
|
|
2230
|
+
index: nodeIndex(index)
|
|
2231
|
+
}"
|
|
2232
|
+
>
|
|
2233
|
+
</ng-template>
|
|
2234
|
+
</ng-container>
|
|
2235
|
+
<ng-container *ngSwitchDefault>
|
|
2236
|
+
{{nodeText(node)}}
|
|
2237
|
+
</ng-container>
|
|
2178
2238
|
</ng-container>
|
|
2179
|
-
|
|
2180
|
-
{{nodeText(node)}}
|
|
2181
|
-
</ng-container>
|
|
2182
|
-
</ng-container>
|
|
2239
|
+
</span>
|
|
2183
2240
|
</span>
|
|
2184
2241
|
</div>
|
|
2185
2242
|
<ul
|
|
@@ -2213,7 +2270,7 @@ TreeViewGroupComponent = __decorate([
|
|
|
2213
2270
|
</li>
|
|
2214
2271
|
<li
|
|
2215
2272
|
*ngIf="initialNodesLoaded && moreNodesAvailable"
|
|
2216
|
-
class="k-
|
|
2273
|
+
class="k-treeview-item"
|
|
2217
2274
|
[class.k-treeview-load-more-checkboxes-container]="checkboxes"
|
|
2218
2275
|
kendoTreeViewItem
|
|
2219
2276
|
role="button"
|
|
@@ -2225,29 +2282,31 @@ TreeViewGroupComponent = __decorate([
|
|
|
2225
2282
|
[parentIndex]="parentIndex"
|
|
2226
2283
|
[attr.data-treeindex]="loadMoreButtonIndex"
|
|
2227
2284
|
>
|
|
2228
|
-
<div class="k-mid">
|
|
2285
|
+
<div class="k-treeview-mid">
|
|
2229
2286
|
<span
|
|
2230
2287
|
*ngIf="loadingMoreNodes"
|
|
2231
2288
|
class="k-icon k-i-loading k-i-expand"
|
|
2232
2289
|
>
|
|
2233
2290
|
</span>
|
|
2234
2291
|
<span
|
|
2235
|
-
class="k-
|
|
2292
|
+
class="k-treeview-leaf k-treeview-load-more-button"
|
|
2236
2293
|
[attr.data-treeindex]="loadMoreButtonIndex"
|
|
2237
2294
|
kendoTreeViewItemContent
|
|
2238
2295
|
[index]="loadMoreButtonIndex"
|
|
2239
2296
|
>
|
|
2240
|
-
<
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2297
|
+
<span class="k-treeview-leaf-text">
|
|
2298
|
+
<ng-template
|
|
2299
|
+
*ngIf="loadMoreButtonTemplateRef"
|
|
2300
|
+
[ngTemplateOutlet]="loadMoreButtonTemplateRef"
|
|
2301
|
+
[ngTemplateOutletContext]="{
|
|
2302
|
+
index: loadMoreButtonIndex
|
|
2303
|
+
}"
|
|
2304
|
+
>
|
|
2305
|
+
</ng-template>
|
|
2306
|
+
<ng-container *ngIf="!loadMoreButtonTemplateRef">
|
|
2307
|
+
Load more
|
|
2308
|
+
</ng-container>
|
|
2309
|
+
</span>
|
|
2251
2310
|
</span>
|
|
2252
2311
|
</div>
|
|
2253
2312
|
</li>
|
|
@@ -3079,12 +3138,12 @@ const getDropPosition = (draggedItem, target, clientY, targetTreeView, container
|
|
|
3079
3138
|
if (!(isPresent(draggedItem) && isPresent(target) && isPresent(targetTreeView) && isPresent(containerOffset))) {
|
|
3080
3139
|
return;
|
|
3081
3140
|
}
|
|
3082
|
-
// the .k-mid element starts just after the checkbox/expand arrow and stretches till the end of the treeview on the right
|
|
3083
|
-
const item = closestWithMatch(target, '.k-mid');
|
|
3141
|
+
// the .k-treeview-mid element starts just after the checkbox/expand arrow and stretches till the end of the treeview on the right
|
|
3142
|
+
const item = closestWithMatch(target, '.k-treeview-mid');
|
|
3084
3143
|
if (!isPresent(item)) {
|
|
3085
3144
|
return;
|
|
3086
3145
|
}
|
|
3087
|
-
// the content element (.k-
|
|
3146
|
+
// the content element (.k-treeview-leaf:not(.k-treeview-load-more-button)) holds just the treeview item text
|
|
3088
3147
|
const content = getContentElement(item);
|
|
3089
3148
|
const targetChildOfDraggedItem = hasParent(item, closestNode(draggedItem));
|
|
3090
3149
|
if (!isPresent(content) || (content === draggedItem) || targetChildOfDraggedItem) {
|
|
@@ -3797,7 +3856,7 @@ let DragAndDropDirective = class DragAndDropDirective {
|
|
|
3797
3856
|
return;
|
|
3798
3857
|
}
|
|
3799
3858
|
// store the drag target on press, show it only when it's actually dragged
|
|
3800
|
-
this.draggedItem = closestWithMatch(originalEvent.target, '.k-
|
|
3859
|
+
this.draggedItem = closestWithMatch(originalEvent.target, '.k-treeview-leaf');
|
|
3801
3860
|
// record the current pointer down coords - copared to the `startDragAfter` value to calculate whether to initiate dragging
|
|
3802
3861
|
this.pendingDragStartEvent = originalEvent;
|
|
3803
3862
|
}
|
|
@@ -3817,7 +3876,7 @@ let DragAndDropDirective = class DragAndDropDirective {
|
|
|
3817
3876
|
}
|
|
3818
3877
|
const targetTreeView = this.getTargetTreeView(dropTarget);
|
|
3819
3878
|
const dropPosition = getDropPosition(this.draggedItem, dropTarget, clientY, targetTreeView, this.containerOffset);
|
|
3820
|
-
const dropHintAnchor = closestWithMatch(dropTarget, '.k-mid');
|
|
3879
|
+
const dropHintAnchor = closestWithMatch(dropTarget, '.k-treeview-mid');
|
|
3821
3880
|
const dropAction = getDropAction(dropPosition, dropTarget);
|
|
3822
3881
|
const sourceItem = treeItemFromEventTarget(this.treeview, this.draggedItem);
|
|
3823
3882
|
const destinationItem = treeItemFromEventTarget(targetTreeView, dropTarget);
|
|
@@ -4681,7 +4740,7 @@ let TreeViewItemDirective = class TreeViewItemDirective {
|
|
|
4681
4740
|
this.setAttribute('aria-checked', this.checkable ? this.ariaChecked : null);
|
|
4682
4741
|
}
|
|
4683
4742
|
setDisabledClass() {
|
|
4684
|
-
this.setClass('k-
|
|
4743
|
+
this.setClass('k-disabled', this.isDisabled);
|
|
4685
4744
|
}
|
|
4686
4745
|
setClass(className, toggle) {
|
|
4687
4746
|
const action = toggle ? 'addClass' : 'removeClass';
|
|
@@ -4804,10 +4863,10 @@ let TreeViewItemContentDirective = class TreeViewItemContentDirective {
|
|
|
4804
4863
|
this.subscriptions.unsubscribe();
|
|
4805
4864
|
}
|
|
4806
4865
|
updateFocusClass() {
|
|
4807
|
-
this.render(this.navigationService.isActive(this.index), 'k-
|
|
4866
|
+
this.render(this.navigationService.isActive(this.index), 'k-focus');
|
|
4808
4867
|
}
|
|
4809
4868
|
updateSelectionClass(selected) {
|
|
4810
|
-
this.render(selected, 'k-
|
|
4869
|
+
this.render(selected, 'k-selected');
|
|
4811
4870
|
}
|
|
4812
4871
|
render(addClass, className) {
|
|
4813
4872
|
const action = addClass ? 'addClass' : 'removeClass';
|
|
@@ -4857,6 +4916,10 @@ let CheckBoxComponent = class CheckBoxComponent {
|
|
|
4857
4916
|
* Specifies the [`tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
|
|
4858
4917
|
*/
|
|
4859
4918
|
this.tabindex = 0;
|
|
4919
|
+
/**
|
|
4920
|
+
* Specifies the size of the component.
|
|
4921
|
+
*/
|
|
4922
|
+
this.size = 'medium';
|
|
4860
4923
|
/**
|
|
4861
4924
|
* Fires when the user changes the check state of the component.
|
|
4862
4925
|
*/
|
|
@@ -4872,6 +4935,9 @@ let CheckBoxComponent = class CheckBoxComponent {
|
|
|
4872
4935
|
get checked() {
|
|
4873
4936
|
return this.checkState === 'checked';
|
|
4874
4937
|
}
|
|
4938
|
+
get checkBoxClasses() {
|
|
4939
|
+
return `k-checkbox ${this.size ? getSizeClass('checkbox', this.size) : ''} k-rounded-md`;
|
|
4940
|
+
}
|
|
4875
4941
|
ngOnInit() {
|
|
4876
4942
|
this.renderer.removeAttribute(this.element.nativeElement, "tabindex");
|
|
4877
4943
|
}
|
|
@@ -4915,6 +4981,10 @@ __decorate([
|
|
|
4915
4981
|
Input(),
|
|
4916
4982
|
__metadata("design:type", Number)
|
|
4917
4983
|
], CheckBoxComponent.prototype, "tabindex", void 0);
|
|
4984
|
+
__decorate([
|
|
4985
|
+
Input(),
|
|
4986
|
+
__metadata("design:type", String)
|
|
4987
|
+
], CheckBoxComponent.prototype, "size", void 0);
|
|
4918
4988
|
__decorate([
|
|
4919
4989
|
Output(),
|
|
4920
4990
|
__metadata("design:type", EventEmitter)
|
|
@@ -4924,8 +4994,8 @@ CheckBoxComponent = __decorate([
|
|
|
4924
4994
|
selector: 'kendo-checkbox',
|
|
4925
4995
|
template: `
|
|
4926
4996
|
<input
|
|
4927
|
-
class="k-checkbox"
|
|
4928
4997
|
type="checkbox"
|
|
4998
|
+
[class]="checkBoxClasses"
|
|
4929
4999
|
[id]="id"
|
|
4930
5000
|
[checked]="checked"
|
|
4931
5001
|
[indeterminate]="indeterminate"
|