@progress/kendo-angular-treeview 21.1.1-develop.2 → 21.2.0-develop.2
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/esm2022/drag-and-drop/drag-clue/drag-clue.component.mjs +35 -33
- package/esm2022/drag-and-drop/drop-hint/drop-hint.component.mjs +42 -38
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/treeview-group.component.mjs +161 -147
- package/esm2022/treeview.component.mjs +102 -101
- package/fesm2022/progress-kendo-angular-treeview.mjs +340 -318
- package/package.json +7 -7
- package/schematics/ngAdd/index.js +4 -4
|
@@ -20,7 +20,7 @@ import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
|
20
20
|
import { TreeViewItemContentDirective } from './treeview-item-content.directive';
|
|
21
21
|
import { LoadingIndicatorDirective } from './loading-indicator.directive';
|
|
22
22
|
import { TreeViewItemDirective } from './treeview-item.directive';
|
|
23
|
-
import {
|
|
23
|
+
import { NgClass, NgTemplateOutlet } from '@angular/common';
|
|
24
24
|
import { IconWrapperComponent } from '@progress/kendo-angular-icons';
|
|
25
25
|
import { CheckBoxComponent } from '@progress/kendo-angular-inputs';
|
|
26
26
|
import * as i0 from "@angular/core";
|
|
@@ -352,9 +352,9 @@ export class TreeViewGroupComponent {
|
|
|
352
352
|
this.emitChildrenLoaded(mappedChildren);
|
|
353
353
|
}
|
|
354
354
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TreeViewGroupComponent, deps: [{ token: i1.ExpandStateService }, { token: i2.LoadingNotificationService }, { token: i3.IndexBuilderService }, { token: i4.TreeViewLookupService }, { token: i5.NavigationService }, { token: i6.NodeChildrenService }, { token: i7.DataChangeNotificationService }, { token: i0.ChangeDetectorRef }, { token: i8.LocalizationService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
355
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
356
|
-
|
|
357
|
-
|
|
355
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TreeViewGroupComponent, isStandalone: true, selector: "[kendoTreeViewGroup]", inputs: { checkboxes: "checkboxes", expandIcons: "expandIcons", disabled: "disabled", selectable: "selectable", touchActions: "touchActions", disableParentNodesOnly: "disableParentNodesOnly", loadOnDemand: "loadOnDemand", trackBy: "trackBy", nodes: "nodes", textField: "textField", parentDataItem: "parentDataItem", parentIndex: "parentIndex", nodeTemplateRef: "nodeTemplateRef", loadMoreButtonTemplateRef: "loadMoreButtonTemplateRef", loadMoreService: "loadMoreService", size: "size", expandDisabledNodes: "expandDisabledNodes", isChecked: "isChecked", isDisabled: "isDisabled", hasCheckbox: "hasCheckbox", isExpanded: "isExpanded", isVisible: "isVisible", isSelected: "isSelected", children: "children", hasChildren: "hasChildren" }, host: { properties: { "class.k-treeview-group": "this.kGroupClass", "attr.role": "this.role" } }, usesOnChanges: true, ngImport: i0, template: `
|
|
356
|
+
@for (node of data; track trackBy ? trackBy(index, node) : index; let index = $index) {
|
|
357
|
+
<li
|
|
358
358
|
class="k-treeview-item"
|
|
359
359
|
[class.k-hidden]="!isVisible(node, nodeIndex(index))"
|
|
360
360
|
kendoTreeViewItem
|
|
@@ -373,62 +373,64 @@ export class TreeViewGroupComponent {
|
|
|
373
373
|
[selectable]="selectable"
|
|
374
374
|
[isSelected]="isSelected(node, nodeIndex(index))"
|
|
375
375
|
[attr.data-treeindex]="nodeIndex(index)"
|
|
376
|
-
|
|
376
|
+
>
|
|
377
377
|
<div [ngClass]="setItemClasses(data.length, index)">
|
|
378
|
+
@if (expandIcons && hasChildren(node)) {
|
|
378
379
|
<span
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
</kendo-icon-wrapper>
|
|
380
|
+
[class.k-disabled]="!isItemExpandable(node, index)"
|
|
381
|
+
class="k-treeview-toggle"
|
|
382
|
+
[kendoTreeViewLoading]="nodeIndex(index)"
|
|
383
|
+
(click)="expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))"
|
|
384
|
+
>
|
|
385
|
+
<kendo-icon-wrapper
|
|
386
|
+
[name]="getFontIcon(node, nodeIndex(index))"
|
|
387
|
+
[svgIcon]="getSvgIcon(node, nodeIndex(index))">
|
|
388
|
+
</kendo-icon-wrapper>
|
|
389
389
|
</span>
|
|
390
|
+
}
|
|
391
|
+
@if (checkboxes && hasCheckbox(node, nodeIndex(index))) {
|
|
390
392
|
<kendo-checkbox
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
[inputAttributes]="getCheckboxAttributes(index)"
|
|
393
|
+
#checkbox
|
|
394
|
+
[disabled]="isItemDisabled(node, index)"
|
|
395
|
+
[size]="size"
|
|
396
|
+
[checkedState]="getCheckBoxState(node, nodeIndex(index))"
|
|
397
|
+
(checkedStateChange)="checkNode(nodeIndex(index), checkbox)"
|
|
398
|
+
[tabindex]="-1"
|
|
399
|
+
[inputAttributes]="getCheckboxAttributes(index)"
|
|
399
400
|
></kendo-checkbox>
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
401
|
+
}
|
|
402
|
+
<span kendoTreeViewItemContent
|
|
403
|
+
[id]="nodeIndex(index)"
|
|
404
|
+
[attr.data-treeindex]="nodeIndex(index)"
|
|
405
|
+
[dataItem]="node"
|
|
406
|
+
[index]="nodeIndex(index)"
|
|
407
|
+
[initialSelection]="isSelected(node, nodeIndex(index))"
|
|
408
|
+
[isSelected]="isSelected"
|
|
409
|
+
class="k-treeview-leaf"
|
|
410
|
+
[style.touch-action]="touchActions ? '' : 'none'"
|
|
411
|
+
[class.k-disabled]="isItemDisabled(node, index)"
|
|
410
412
|
>
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
413
|
+
<span class="k-treeview-leaf-text">
|
|
414
|
+
@switch (hasTemplate) {
|
|
415
|
+
@case (true) {
|
|
416
|
+
<ng-template
|
|
417
|
+
[ngTemplateOutlet]="nodeTemplateRef"
|
|
416
418
|
[ngTemplateOutletContext]="{
|
|
417
419
|
$implicit: node,
|
|
418
420
|
index: nodeIndex(index)
|
|
419
421
|
}"
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
</span>
|
|
422
|
+
>
|
|
423
|
+
</ng-template>
|
|
424
|
+
}
|
|
425
|
+
@default {
|
|
426
|
+
{{nodeText(node)}}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
428
429
|
</span>
|
|
430
|
+
</span>
|
|
429
431
|
</div>
|
|
430
|
-
|
|
431
|
-
|
|
432
|
+
@if (isExpanded(node, nodeIndex(index)) && hasChildren(node)) {
|
|
433
|
+
<ul
|
|
432
434
|
kendoTreeViewGroup
|
|
433
435
|
role="group"
|
|
434
436
|
[size]="size"
|
|
@@ -457,11 +459,13 @@ export class TreeViewGroupComponent {
|
|
|
457
459
|
[@toggle]="true"
|
|
458
460
|
[trackBy]="trackBy"
|
|
459
461
|
[disableParentNodesOnly]="disableParentNodesOnly"
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
462
|
+
>
|
|
463
|
+
</ul>
|
|
464
|
+
}
|
|
465
|
+
</li>
|
|
466
|
+
}
|
|
467
|
+
@if (initialNodesLoaded && moreNodesAvailable) {
|
|
468
|
+
<li
|
|
465
469
|
class="k-treeview-item"
|
|
466
470
|
[class.k-treeview-load-more-checkboxes-container]="checkboxes"
|
|
467
471
|
kendoTreeViewItem
|
|
@@ -473,36 +477,39 @@ export class TreeViewGroupComponent {
|
|
|
473
477
|
[parentDataItem]="parentDataItem"
|
|
474
478
|
[parentIndex]="parentIndex"
|
|
475
479
|
[attr.data-treeindex]="loadMoreButtonIndex"
|
|
476
|
-
|
|
480
|
+
>
|
|
477
481
|
<div class="k-treeview-bot">
|
|
482
|
+
@if (loadingMoreNodes) {
|
|
478
483
|
<span
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
>
|
|
484
|
+
class="k-icon k-i-loading"
|
|
485
|
+
>
|
|
482
486
|
</span>
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
487
|
+
}
|
|
488
|
+
<span
|
|
489
|
+
class="k-treeview-leaf k-treeview-load-more-button"
|
|
490
|
+
[attr.data-treeindex]="loadMoreButtonIndex"
|
|
491
|
+
kendoTreeViewItemContent
|
|
492
|
+
[index]="loadMoreButtonIndex"
|
|
488
493
|
>
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
494
|
+
<span class="k-treeview-leaf-text">
|
|
495
|
+
@if (loadMoreButtonTemplateRef) {
|
|
496
|
+
<ng-template
|
|
497
|
+
[ngTemplateOutlet]="loadMoreButtonTemplateRef"
|
|
493
498
|
[ngTemplateOutletContext]="{
|
|
494
499
|
index: loadMoreButtonIndex
|
|
495
500
|
}"
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
501
|
+
>
|
|
502
|
+
</ng-template>
|
|
503
|
+
}
|
|
504
|
+
@if (!loadMoreButtonTemplateRef) {
|
|
505
|
+
{{ loadMoreTitle }}
|
|
506
|
+
}
|
|
502
507
|
</span>
|
|
508
|
+
</span>
|
|
503
509
|
</div>
|
|
504
|
-
|
|
505
|
-
|
|
510
|
+
</li>
|
|
511
|
+
}
|
|
512
|
+
`, isInline: true, dependencies: [{ kind: "component", type: TreeViewGroupComponent, selector: "[kendoTreeViewGroup]", inputs: ["checkboxes", "expandIcons", "disabled", "selectable", "touchActions", "disableParentNodesOnly", "loadOnDemand", "trackBy", "nodes", "textField", "parentDataItem", "parentIndex", "nodeTemplateRef", "loadMoreButtonTemplateRef", "loadMoreService", "size", "expandDisabledNodes", "isChecked", "isDisabled", "hasCheckbox", "isExpanded", "isVisible", "isSelected", "children", "hasChildren"] }, { kind: "directive", type: TreeViewItemDirective, selector: "[kendoTreeViewItem]", inputs: ["dataItem", "index", "parentDataItem", "parentIndex", "role", "loadOnDemand", "checkable", "selectable", "expandable", "isChecked", "isDisabled", "isVisible", "isExpanded", "isSelected"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: LoadingIndicatorDirective, selector: "[kendoTreeViewLoading]", inputs: ["kendoTreeViewLoading"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: CheckBoxComponent, selector: "kendo-checkbox", inputs: ["checkedState", "rounded"], outputs: ["checkedStateChange"], exportAs: ["kendoCheckBox"] }, { kind: "directive", type: TreeViewItemContentDirective, selector: "[kendoTreeViewItemContent]", inputs: ["dataItem", "index", "initialSelection", "isSelected"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [
|
|
506
513
|
trigger('toggle', [
|
|
507
514
|
transition('void => *', [
|
|
508
515
|
style({ height: 0 }),
|
|
@@ -533,8 +540,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
533
540
|
// eslint-disable-next-line
|
|
534
541
|
selector: '[kendoTreeViewGroup]',
|
|
535
542
|
template: `
|
|
536
|
-
|
|
537
|
-
|
|
543
|
+
@for (node of data; track trackBy ? trackBy(index, node) : index; let index = $index) {
|
|
544
|
+
<li
|
|
538
545
|
class="k-treeview-item"
|
|
539
546
|
[class.k-hidden]="!isVisible(node, nodeIndex(index))"
|
|
540
547
|
kendoTreeViewItem
|
|
@@ -553,62 +560,64 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
553
560
|
[selectable]="selectable"
|
|
554
561
|
[isSelected]="isSelected(node, nodeIndex(index))"
|
|
555
562
|
[attr.data-treeindex]="nodeIndex(index)"
|
|
556
|
-
|
|
563
|
+
>
|
|
557
564
|
<div [ngClass]="setItemClasses(data.length, index)">
|
|
565
|
+
@if (expandIcons && hasChildren(node)) {
|
|
558
566
|
<span
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
</kendo-icon-wrapper>
|
|
567
|
+
[class.k-disabled]="!isItemExpandable(node, index)"
|
|
568
|
+
class="k-treeview-toggle"
|
|
569
|
+
[kendoTreeViewLoading]="nodeIndex(index)"
|
|
570
|
+
(click)="expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))"
|
|
571
|
+
>
|
|
572
|
+
<kendo-icon-wrapper
|
|
573
|
+
[name]="getFontIcon(node, nodeIndex(index))"
|
|
574
|
+
[svgIcon]="getSvgIcon(node, nodeIndex(index))">
|
|
575
|
+
</kendo-icon-wrapper>
|
|
569
576
|
</span>
|
|
577
|
+
}
|
|
578
|
+
@if (checkboxes && hasCheckbox(node, nodeIndex(index))) {
|
|
570
579
|
<kendo-checkbox
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
[inputAttributes]="getCheckboxAttributes(index)"
|
|
580
|
+
#checkbox
|
|
581
|
+
[disabled]="isItemDisabled(node, index)"
|
|
582
|
+
[size]="size"
|
|
583
|
+
[checkedState]="getCheckBoxState(node, nodeIndex(index))"
|
|
584
|
+
(checkedStateChange)="checkNode(nodeIndex(index), checkbox)"
|
|
585
|
+
[tabindex]="-1"
|
|
586
|
+
[inputAttributes]="getCheckboxAttributes(index)"
|
|
579
587
|
></kendo-checkbox>
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
588
|
+
}
|
|
589
|
+
<span kendoTreeViewItemContent
|
|
590
|
+
[id]="nodeIndex(index)"
|
|
591
|
+
[attr.data-treeindex]="nodeIndex(index)"
|
|
592
|
+
[dataItem]="node"
|
|
593
|
+
[index]="nodeIndex(index)"
|
|
594
|
+
[initialSelection]="isSelected(node, nodeIndex(index))"
|
|
595
|
+
[isSelected]="isSelected"
|
|
596
|
+
class="k-treeview-leaf"
|
|
597
|
+
[style.touch-action]="touchActions ? '' : 'none'"
|
|
598
|
+
[class.k-disabled]="isItemDisabled(node, index)"
|
|
590
599
|
>
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
600
|
+
<span class="k-treeview-leaf-text">
|
|
601
|
+
@switch (hasTemplate) {
|
|
602
|
+
@case (true) {
|
|
603
|
+
<ng-template
|
|
604
|
+
[ngTemplateOutlet]="nodeTemplateRef"
|
|
596
605
|
[ngTemplateOutletContext]="{
|
|
597
606
|
$implicit: node,
|
|
598
607
|
index: nodeIndex(index)
|
|
599
608
|
}"
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
</span>
|
|
609
|
+
>
|
|
610
|
+
</ng-template>
|
|
611
|
+
}
|
|
612
|
+
@default {
|
|
613
|
+
{{nodeText(node)}}
|
|
614
|
+
}
|
|
615
|
+
}
|
|
608
616
|
</span>
|
|
617
|
+
</span>
|
|
609
618
|
</div>
|
|
610
|
-
|
|
611
|
-
|
|
619
|
+
@if (isExpanded(node, nodeIndex(index)) && hasChildren(node)) {
|
|
620
|
+
<ul
|
|
612
621
|
kendoTreeViewGroup
|
|
613
622
|
role="group"
|
|
614
623
|
[size]="size"
|
|
@@ -637,11 +646,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
637
646
|
[@toggle]="true"
|
|
638
647
|
[trackBy]="trackBy"
|
|
639
648
|
[disableParentNodesOnly]="disableParentNodesOnly"
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
649
|
+
>
|
|
650
|
+
</ul>
|
|
651
|
+
}
|
|
652
|
+
</li>
|
|
653
|
+
}
|
|
654
|
+
@if (initialNodesLoaded && moreNodesAvailable) {
|
|
655
|
+
<li
|
|
645
656
|
class="k-treeview-item"
|
|
646
657
|
[class.k-treeview-load-more-checkboxes-container]="checkboxes"
|
|
647
658
|
kendoTreeViewItem
|
|
@@ -653,38 +664,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
653
664
|
[parentDataItem]="parentDataItem"
|
|
654
665
|
[parentIndex]="parentIndex"
|
|
655
666
|
[attr.data-treeindex]="loadMoreButtonIndex"
|
|
656
|
-
|
|
667
|
+
>
|
|
657
668
|
<div class="k-treeview-bot">
|
|
669
|
+
@if (loadingMoreNodes) {
|
|
658
670
|
<span
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
>
|
|
671
|
+
class="k-icon k-i-loading"
|
|
672
|
+
>
|
|
662
673
|
</span>
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
674
|
+
}
|
|
675
|
+
<span
|
|
676
|
+
class="k-treeview-leaf k-treeview-load-more-button"
|
|
677
|
+
[attr.data-treeindex]="loadMoreButtonIndex"
|
|
678
|
+
kendoTreeViewItemContent
|
|
679
|
+
[index]="loadMoreButtonIndex"
|
|
668
680
|
>
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
681
|
+
<span class="k-treeview-leaf-text">
|
|
682
|
+
@if (loadMoreButtonTemplateRef) {
|
|
683
|
+
<ng-template
|
|
684
|
+
[ngTemplateOutlet]="loadMoreButtonTemplateRef"
|
|
673
685
|
[ngTemplateOutletContext]="{
|
|
674
686
|
index: loadMoreButtonIndex
|
|
675
687
|
}"
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
688
|
+
>
|
|
689
|
+
</ng-template>
|
|
690
|
+
}
|
|
691
|
+
@if (!loadMoreButtonTemplateRef) {
|
|
692
|
+
{{ loadMoreTitle }}
|
|
693
|
+
}
|
|
682
694
|
</span>
|
|
695
|
+
</span>
|
|
683
696
|
</div>
|
|
684
|
-
|
|
685
|
-
|
|
697
|
+
</li>
|
|
698
|
+
}
|
|
699
|
+
`,
|
|
686
700
|
standalone: true,
|
|
687
|
-
imports: [
|
|
701
|
+
imports: [TreeViewItemDirective, NgClass, LoadingIndicatorDirective, IconWrapperComponent, CheckBoxComponent, TreeViewItemContentDirective, NgTemplateOutlet]
|
|
688
702
|
}]
|
|
689
703
|
}], ctorParameters: () => [{ type: i1.ExpandStateService }, { type: i2.LoadingNotificationService }, { type: i3.IndexBuilderService }, { type: i4.TreeViewLookupService }, { type: i5.NavigationService }, { type: i6.NodeChildrenService }, { type: i7.DataChangeNotificationService }, { type: i0.ChangeDetectorRef }, { type: i8.LocalizationService }, { type: i0.Renderer2 }], propDecorators: { kGroupClass: [{
|
|
690
704
|
type: HostBinding,
|