@progress/kendo-angular-treeview 17.0.0-develop.4 → 17.0.0-develop.41
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/README.md +30 -17
- package/check-mode.d.ts +1 -1
- package/check.directive.d.ts +1 -1
- package/checkbox/checked-state.d.ts +1 -1
- package/disable.directive.d.ts +1 -1
- package/drag-and-drop/drag-and-drop-editing.directive.d.ts +1 -1
- package/drag-and-drop/drag-and-drop.directive.d.ts +1 -1
- package/{esm2020 → esm2022}/check.directive.mjs +48 -27
- package/{esm2020 → esm2022}/data-bound-component.mjs +3 -3
- package/{esm2020 → esm2022}/data-change-notification.service.mjs +1 -3
- package/{esm2020 → esm2022}/disable.directive.mjs +18 -12
- package/{esm2020 → esm2022}/drag-and-drop/drag-and-drop-editing.directive.mjs +10 -9
- package/{esm2020 → esm2022}/drag-and-drop/drag-and-drop.directive.mjs +73 -52
- package/{esm2020 → esm2022}/drag-and-drop/drag-clue/drag-clue-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/drag-and-drop/drag-clue/drag-clue.component.mjs +30 -9
- package/{esm2020 → esm2022}/drag-and-drop/drag-clue/drag-clue.service.mjs +6 -3
- package/{esm2020 → esm2022}/drag-and-drop/drop-hint/drop-hint-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/drag-and-drop/drop-hint/drop-hint.component.mjs +24 -7
- package/{esm2020 → esm2022}/drag-and-drop/drop-hint/drop-hint.service.mjs +4 -3
- package/{esm2020 → esm2022}/drag-and-drop/editing-services/drag-and-drop-asset.service.mjs +4 -3
- package/{esm2020 → esm2022}/drag-and-drop/editing-services/flat-editing.service.mjs +2 -0
- package/{esm2020 → esm2022}/drag-and-drop/editing-services/hierarchy-editing.service.mjs +2 -0
- package/{esm2020 → esm2022}/drag-and-drop/models/preventable-event.mjs +1 -3
- package/{esm2020 → esm2022}/drag-and-drop/models/treeitem-drag-event.mjs +12 -0
- package/{esm2020 → esm2022}/drag-and-drop/models/treeitem-drag-start-event.mjs +8 -0
- package/{esm2020 → esm2022}/drag-and-drop/models/treeitem-drop-event.mjs +28 -4
- package/{esm2020 → esm2022}/expand-state.service.mjs +4 -6
- package/{esm2020 → esm2022}/expand.directive.mjs +67 -54
- package/{esm2020 → esm2022}/expandable-component.mjs +3 -3
- package/{esm2020 → esm2022}/filtering-base.mjs +13 -8
- package/{esm2020 → esm2022}/flat-binding.directive.mjs +26 -16
- package/{esm2020 → esm2022}/hierarchy-binding.directive.mjs +19 -15
- package/{esm2020 → esm2022}/index-builder.service.mjs +4 -6
- package/{esm2020 → esm2022}/load-more/load-more-button-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/load-more/load-more.directive.mjs +38 -20
- package/{esm2020 → esm2022}/loading-indicator.directive.mjs +14 -9
- package/{esm2020 → esm2022}/loading-notification.service.mjs +4 -6
- package/{esm2020 → esm2022}/localization/custom-messages.component.mjs +9 -8
- package/{esm2020 → esm2022}/localization/localized-messages.directive.mjs +9 -8
- package/{esm2020 → esm2022}/localization/messages.mjs +7 -3
- package/{esm2020 → esm2022}/navigation/navigation-model.mjs +2 -4
- package/{esm2020 → esm2022}/navigation/navigation.service.mjs +38 -36
- package/{esm2020 → esm2022}/node-children.service.mjs +4 -6
- package/{esm2020 → esm2022}/node-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/package-metadata.mjs +2 -2
- package/{esm2020 → esm2022}/selection/select.directive.mjs +45 -25
- package/{esm2020 → esm2022}/selection/selection.service.mjs +5 -6
- package/{esm2020 → esm2022}/treeview-group.component.mjs +86 -56
- package/{esm2020 → esm2022}/treeview-item-content.directive.mjs +12 -6
- package/{esm2020 → esm2022}/treeview-item.directive.mjs +37 -21
- package/{esm2020 → esm2022}/treeview-lookup.service.mjs +4 -6
- package/{esm2020 → esm2022}/treeview.component.mjs +253 -194
- package/{esm2020 → esm2022}/treeview.module.mjs +12 -12
- package/expand.directive.d.ts +1 -1
- package/{fesm2020 → fesm2022}/progress-kendo-angular-treeview.mjs +1015 -694
- package/filtering-base.d.ts +1 -1
- package/flat-binding.directive.d.ts +1 -1
- package/hierarchy-binding.directive.d.ts +1 -1
- package/load-more/load-more.directive.d.ts +1 -1
- package/loading-indicator.directive.d.ts +1 -1
- package/localization/messages.d.ts +1 -1
- package/package.json +15 -21
- package/schematics/ngAdd/index.js +4 -4
- package/selection/select.directive.d.ts +1 -1
- package/selection/selection-mode.d.ts +1 -1
- package/size.d.ts +1 -1
- package/treeview-filter-settings.d.ts +1 -1
- package/treeview-group.component.d.ts +1 -1
- package/treeview-item-content.directive.d.ts +1 -1
- package/treeview-item.directive.d.ts +1 -1
- package/treeview.component.d.ts +1 -1
- package/fesm2015/progress-kendo-angular-treeview.mjs +0 -5545
- /package/{esm2020 → esm2022}/check-mode.mjs +0 -0
- /package/{esm2020 → esm2022}/checkable-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/checkbox/checked-state.mjs +0 -0
- /package/{esm2020 → esm2022}/default-callbacks.mjs +0 -0
- /package/{esm2020 → esm2022}/directives.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/drag-and-drop-utils.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/drop-action.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/drop-position.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/editing-service.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/scroll-direction.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/scroll-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/tree-item-filter-state.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/treeitem-add-remove-args.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models.mjs +0 -0
- /package/{esm2020 → esm2022}/filter-expand-settings.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/filter-state.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/funcs.mjs +0 -0
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/load-more/load-more-request-args.mjs +0 -0
- /package/{esm2020 → esm2022}/load-more/load-more-utils.mjs +0 -0
- /package/{esm2020 → esm2022}/load-more/load-more.service.mjs +0 -0
- /package/{esm2020 → esm2022}/navigation/navigation-item.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/navigation/navigation-state.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/node-click-event.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/progress-kendo-angular-treeview.mjs +0 -0
- /package/{esm2020 → esm2022}/selection/selectable-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/selection/selection-mode.mjs +0 -0
- /package/{esm2020 → esm2022}/size.mjs +0 -0
- /package/{esm2020 → esm2022}/treeitem-lookup.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/treeitem.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/treeview-filter-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/utils.mjs +0 -0
package/README.md
CHANGED
|
@@ -1,33 +1,46 @@
|
|
|
1
|
-
<a href="https://www.telerik.com/kendo-angular-ui/" target="_blank">
|
|
1
|
+
<a href="https://www.telerik.com/kendo-angular-ui/components/treeview" target="_blank">
|
|
2
2
|
<img width="631" src="https://www.telerik.com/kendo-angular-ui/npm-banner.svg">
|
|
3
3
|
</a>
|
|
4
4
|
|
|
5
5
|
## Kendo UI for Angular TreeView Component
|
|
6
6
|
|
|
7
|
-
>
|
|
8
|
-
> *
|
|
9
|
-
> *
|
|
10
|
-
> * To receive a license key, you need to either [purchase a license](https://www.telerik.com/purchase/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-treeview) or register for a [free trial](https://www.telerik.com/download-login-v2-kendo-angular-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-treeview). Doing so indicates that you [accept the Kendo UI for Angular License Agreement](https://www.telerik.com/purchase/license-agreement/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-treeview).
|
|
11
|
-
> * The 30-day free trial gives you access to all the Kendo UI for Angular components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the Kendo UI for Angular dev team!
|
|
12
|
-
>
|
|
13
|
-
> [Start using Kendo UI for Angular](https://www.telerik.com/download-login-v2-kendo-angular-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-treeview) and speed up your development process!
|
|
7
|
+
> * This package is part of the [Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui/)—a commercial UI library.
|
|
8
|
+
> * You must [install a license key](https://www.telerik.com/kendo-angular-ui/my-license) when adding the package to your project. To receive a license key, either [purchase a license](https://www.telerik.com/purchase/kendo-ui) or register for a [free trial](https://www.telerik.com/download-login-v2-kendo-angular-ui).
|
|
9
|
+
> * The 30-day free trial gives you access to all the Kendo UI for Angular components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the Kendo UI for Angular team!
|
|
14
10
|
|
|
15
|
-
Kendo UI for Angular
|
|
11
|
+
The Kendo UI for Angular TreeView includes a comprehensive set of ready-to-use features covering everything from filtering, node selection and rendering checkboxes to dragging and dropping of nodes and persisting the disabled and expanded states.
|
|
12
|
+
|
|
13
|
+
## Key Features
|
|
14
|
+
|
|
15
|
+
Among the many features which the Kendo UI for Angular TreeView delivers are:
|
|
16
|
+
|
|
17
|
+
* Data Binding—The TreeView features built-in data binding directives, which enable you to work with various types of collections and help you visualize a hierarchical list. [Read more about the data binding functionality of the TreeView...](https://www.telerik.com/kendo-angular-ui/components/treeview/data-binding)
|
|
18
|
+
* Filtering—The TreeView provides options for displaying only those nodes which meet specified criteria and for additionally customizing the filtering logic. [Read more about filtering the TreeView nodes...](https://www.telerik.com/kendo-angular-ui/components/treeview/filtering)
|
|
19
|
+
* Load More—The TreeView supports a **Load more** button, which means that the component can render the next portion of data on demand. This approach boosts the performance of the component when it has to display a large number of nodes. [Read more about the **Load more** button feature of the TreeView...](https://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button)
|
|
20
|
+
* Dragging and Dropping—The TreeView provides built-in directives, which enable you to drag and drop nodes inside the TreeView [Read more about the drag and drop feature of the TreeView...](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop)
|
|
21
|
+
* Selection and Checkboxes—The TreeView provides built-in directives, which allow you to select a single or multiple nodes either by using node checkboxes or clicking the nodes itself. Read more about the [selection feature](https://www.telerik.com/kendo-angular-ui/components/treeview/selection) and [checkbox feature](https://www.telerik.com/kendo-angular-ui/components/treeview/checkboxes) of the TreeView.
|
|
22
|
+
* Node Template—You can visually customize the content of the TreeView nodes by utilizing the ready-to-use node template. [Read more about the node template of the TreeView...](https://www.telerik.com/kendo-angular-ui/components/treeview/node-template)
|
|
23
|
+
* Persisting the State—You can control which nodes to be expanded and collapsed or to render the nodes in their disabled state so that the users will not be able to interact with them. Read more about how to persist the [disabled state](https://www.telerik.com/kendo-angular-ui/components/treeview/disabled-state) and [expanded state](https://www.telerik.com/kendo-angular-ui/components/treeview/expand-state) of the TreeView.
|
|
24
|
+
* Appearance—You can use the options provided by the TreeView component to customize its appearance. [Read more about the customizable appearance of the TreeView...](https://www.telerik.com/kendo-angular-ui/components/treeview/appearance)
|
|
25
|
+
* Globalization—The Kendo UI for Angular TreeView supports globalization to ensure that it can fit well in any application, no matter what languages and locales need to be supported. Additionally, the TreeView supports rendering in a right-to-left (RTL) direction. [Read more about the globalization of the TreeView...](https://www.telerik.com/kendo-angular-ui/components/treeview/globalization)
|
|
26
|
+
* Accessibility—The TreeView is accessible for screen readers and supports WAI-ARIA attributes. [Read more about the accessibility of the TreeView...](https://www.telerik.com/kendo-angular-ui/components/treeview/accessibility)
|
|
27
|
+
|
|
28
|
+
## Support Options
|
|
29
|
+
|
|
30
|
+
For any issues you might encounter while working with the Kendo UI for Angular TreeView, you have the following support channels available:
|
|
31
|
+
|
|
32
|
+
* Industry-leading technical support—Kendo UI for Angular paid license holders and users with an active (free) trial license can take advantage of our outstanding customer support. To submit a ticket, use the [dedicated Kendo UI for Angular support system](https://www.telerik.com/account/support-center/contact-us/technical-support).
|
|
33
|
+
* Product forums—The [Kendo UI for Angular forums](https://www.telerik.com/forums/kendo-angular-ui) are part of the free support you can get from the community and from the Kendo UI for Angular team.
|
|
34
|
+
* Feedback portal—The [Kendo UI for Angular feedback portal](https://feedback.telerik.com/kendo-angular-ui) is where you can request and vote for new features to be added.
|
|
16
35
|
|
|
17
36
|
## Resources
|
|
18
37
|
|
|
19
|
-
* [
|
|
38
|
+
* [Getting Started with Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui/getting-started)
|
|
39
|
+
* [Getting Started with the Kendo UI for Angular TreeView](https://www.telerik.com/kendo-angular-ui/components/treeview/installation/getting-started)
|
|
20
40
|
* [Demos, documentation, and component reference](https://www.telerik.com/kendo-angular-ui/components)
|
|
21
41
|
* [Blogs](http://www.telerik.com/blogs/kendo-ui)
|
|
22
42
|
* [Kendo UI for Angular pricing and licensing](https://www.telerik.com/purchase/kendo-ui)
|
|
23
43
|
|
|
24
|
-
## Questions and Feedback
|
|
25
|
-
|
|
26
|
-
* [Official Forums](https://www.telerik.com/forums/kendo-angular-ui)
|
|
27
|
-
* [GitHub Issues](https://github.com/telerik/kendo-angular/issues)
|
|
28
|
-
* [Feedback Portal](https://feedback.telerik.com/kendo-angular-ui)
|
|
29
|
-
* [StackOverflow](https://stackoverflow.com/questions/tagged/kendo-ui-angular2)
|
|
30
|
-
|
|
31
44
|
*Copyright © 2024 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.*
|
|
32
45
|
|
|
33
46
|
*Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries.*
|
package/check-mode.d.ts
CHANGED
package/check.directive.d.ts
CHANGED
|
@@ -69,5 +69,5 @@ export declare class CheckDirective implements OnChanges, OnDestroy {
|
|
|
69
69
|
private notify;
|
|
70
70
|
private addCheckedItemsChildren;
|
|
71
71
|
static ɵfac: i0.ɵɵFactoryDeclaration<CheckDirective, never>;
|
|
72
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CheckDirective, "[kendoTreeViewCheckable]", never, { "isChecked": "isChecked"; "checkKey": "checkBy"; "checkedKeys": "checkedKeys"; "checkable": "kendoTreeViewCheckable"; }, { "checkedKeysChange": "checkedKeysChange"; }, never, never, true, never>;
|
|
72
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CheckDirective, "[kendoTreeViewCheckable]", never, { "isChecked": { "alias": "isChecked"; "required": false; }; "checkKey": { "alias": "checkBy"; "required": false; }; "checkedKeys": { "alias": "checkedKeys"; "required": false; }; "checkable": { "alias": "kendoTreeViewCheckable"; "required": false; }; }, { "checkedKeysChange": "checkedKeysChange"; }, never, never, true, never>;
|
|
73
73
|
}
|
package/disable.directive.d.ts
CHANGED
|
@@ -29,5 +29,5 @@ export declare class DisableDirective implements OnChanges {
|
|
|
29
29
|
ngOnChanges(changes?: any): void;
|
|
30
30
|
protected itemKey(e: any): any;
|
|
31
31
|
static ɵfac: i0.ɵɵFactoryDeclaration<DisableDirective, never>;
|
|
32
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DisableDirective, "[kendoTreeViewDisable]", never, { "isDisabled": "isDisabled"; "disableKey": "kendoTreeViewDisable"; "disabledKeys": "disabledKeys"; }, {}, never, never, true, never>;
|
|
32
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DisableDirective, "[kendoTreeViewDisable]", never, { "isDisabled": { "alias": "isDisabled"; "required": false; }; "disableKey": { "alias": "kendoTreeViewDisable"; "required": false; }; "disabledKeys": { "alias": "disabledKeys"; "required": false; }; }, {}, never, never, true, never>;
|
|
33
33
|
}
|
|
@@ -28,5 +28,5 @@ export declare class DragAndDropEditingDirective implements OnDestroy {
|
|
|
28
28
|
private handleAdd;
|
|
29
29
|
private handleRemove;
|
|
30
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<DragAndDropEditingDirective, never>;
|
|
31
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DragAndDropEditingDirective, "[kendoTreeViewDragAndDropEditing]", never, { "editService": "editService"; }, {}, never, never, true, never>;
|
|
31
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DragAndDropEditingDirective, "[kendoTreeViewDragAndDropEditing]", never, { "editService": { "alias": "editService"; "required": false; }; }, {}, never, never, true, never>;
|
|
32
32
|
}
|
|
@@ -113,5 +113,5 @@ export declare class DragAndDropDirective implements AfterContentInit, OnDestroy
|
|
|
113
113
|
private shouldInitiateDragStart;
|
|
114
114
|
private initiateDragStart;
|
|
115
115
|
static ɵfac: i0.ɵɵFactoryDeclaration<DragAndDropDirective, never>;
|
|
116
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DragAndDropDirective, "[kendoTreeViewDragAndDrop]", never, { "allowCopy": "allowCopy"; "dropZoneTreeViews": "dropZoneTreeViews"; "startDragAfter": "startDragAfter"; "autoScroll": "autoScroll"; }, {}, ["dragClueTemplate", "dropHintTemplate"], never, true, never>;
|
|
116
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DragAndDropDirective, "[kendoTreeViewDragAndDrop]", never, { "allowCopy": { "alias": "allowCopy"; "required": false; }; "dropZoneTreeViews": { "alias": "dropZoneTreeViews"; "required": false; }; "startDragAfter": { "alias": "startDragAfter"; "required": false; }; "autoScroll": { "alias": "autoScroll"; "required": false; }; }, {}, ["dragClueTemplate", "dropHintTemplate"], never, true, never>;
|
|
117
117
|
}
|
|
@@ -32,36 +32,33 @@ const matchKey = index => k => {
|
|
|
32
32
|
* ([see example]({% slug checkboxes_treeview %})).
|
|
33
33
|
*/
|
|
34
34
|
export class CheckDirective {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
this.zone = zone;
|
|
38
|
-
/**
|
|
39
|
-
* Fires when the `checkedKeys` collection was updated.
|
|
40
|
-
*/
|
|
41
|
-
this.checkedKeysChange = new EventEmitter();
|
|
42
|
-
this.subscriptions = new Subscription();
|
|
43
|
-
this.checkActions = {
|
|
44
|
-
'multiple': (e) => this.checkMultiple(e),
|
|
45
|
-
'single': (e) => this.checkSingle(e)
|
|
46
|
-
};
|
|
47
|
-
/**
|
|
48
|
-
* Reflectes the internal `checkedKeys` state.
|
|
49
|
-
*/
|
|
50
|
-
this.state = new Set();
|
|
51
|
-
this.subscriptions.add(this.treeView.checkedChange
|
|
52
|
-
.subscribe((e) => this.check(e)));
|
|
53
|
-
const expandedItems = [];
|
|
54
|
-
this.subscriptions.add(this.treeView.childrenLoaded
|
|
55
|
-
.pipe(filter(() => this.options.checkChildren && this.treeView.loadOnDemand), tap(item => expandedItems.push(item)), switchMap(() => this.zone.onStable.pipe(take(1))))
|
|
56
|
-
.subscribe(() => this.addCheckedItemsChildren(expandedItems)));
|
|
57
|
-
this.treeView.isChecked = this.isItemChecked.bind(this);
|
|
58
|
-
}
|
|
35
|
+
treeView;
|
|
36
|
+
zone;
|
|
59
37
|
/**
|
|
60
38
|
* @hidden
|
|
61
39
|
*/
|
|
62
40
|
set isChecked(value) {
|
|
63
41
|
this.treeView.isChecked = value;
|
|
64
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Defines the item key that will be stored in the `checkedKeys` collection.
|
|
45
|
+
*/
|
|
46
|
+
checkKey;
|
|
47
|
+
/**
|
|
48
|
+
* Defines the collection that will store the checked keys
|
|
49
|
+
* ([see example]({% slug checkboxes_treeview %})).
|
|
50
|
+
*/
|
|
51
|
+
checkedKeys;
|
|
52
|
+
/**
|
|
53
|
+
* Defines the checkable settings ([see example]({% slug checkboxes_treeview %}#toc-setup)).
|
|
54
|
+
* If no value is provided, the default [`CheckableSettings`]({% slug api_treeview_checkablesettings %}) are applied.
|
|
55
|
+
*/
|
|
56
|
+
checkable;
|
|
57
|
+
/**
|
|
58
|
+
* Fires when the `checkedKeys` collection was updated.
|
|
59
|
+
*/
|
|
60
|
+
checkedKeysChange = new EventEmitter();
|
|
61
|
+
subscriptions = new Subscription();
|
|
65
62
|
get options() {
|
|
66
63
|
const defaultOptions = {
|
|
67
64
|
checkChildren: true,
|
|
@@ -78,6 +75,30 @@ export class CheckDirective {
|
|
|
78
75
|
: this.checkable;
|
|
79
76
|
return Object.assign(defaultOptions, checkSettings);
|
|
80
77
|
}
|
|
78
|
+
checkActions = {
|
|
79
|
+
'multiple': (e) => this.checkMultiple(e),
|
|
80
|
+
'single': (e) => this.checkSingle(e)
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Reflectes the internal `checkedKeys` state.
|
|
84
|
+
*/
|
|
85
|
+
state = new Set();
|
|
86
|
+
clickSubscription;
|
|
87
|
+
/**
|
|
88
|
+
* Holds the last emitted `checkedKeys` collection.
|
|
89
|
+
*/
|
|
90
|
+
lastChange;
|
|
91
|
+
constructor(treeView, zone) {
|
|
92
|
+
this.treeView = treeView;
|
|
93
|
+
this.zone = zone;
|
|
94
|
+
this.subscriptions.add(this.treeView.checkedChange
|
|
95
|
+
.subscribe((e) => this.check(e)));
|
|
96
|
+
const expandedItems = [];
|
|
97
|
+
this.subscriptions.add(this.treeView.childrenLoaded
|
|
98
|
+
.pipe(filter(() => this.options.checkChildren && this.treeView.loadOnDemand), tap(item => expandedItems.push(item)), switchMap(() => this.zone.onStable.pipe(take(1))))
|
|
99
|
+
.subscribe(() => this.addCheckedItemsChildren(expandedItems)));
|
|
100
|
+
this.treeView.isChecked = this.isItemChecked.bind(this);
|
|
101
|
+
}
|
|
81
102
|
ngOnChanges(changes) {
|
|
82
103
|
if (changes.checkable) {
|
|
83
104
|
this.treeView.checkboxes = this.options.enabled;
|
|
@@ -275,10 +296,10 @@ export class CheckDirective {
|
|
|
275
296
|
this.zone.run(() => this.notify());
|
|
276
297
|
}
|
|
277
298
|
}
|
|
299
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CheckDirective, deps: [{ token: i1.TreeViewComponent }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
300
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: CheckDirective, isStandalone: true, selector: "[kendoTreeViewCheckable]", inputs: { isChecked: "isChecked", checkKey: ["checkBy", "checkKey"], checkedKeys: "checkedKeys", checkable: ["kendoTreeViewCheckable", "checkable"] }, outputs: { checkedKeysChange: "checkedKeysChange" }, usesOnChanges: true, ngImport: i0 });
|
|
278
301
|
}
|
|
279
|
-
|
|
280
|
-
CheckDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: CheckDirective, isStandalone: true, selector: "[kendoTreeViewCheckable]", inputs: { isChecked: "isChecked", checkKey: ["checkBy", "checkKey"], checkedKeys: "checkedKeys", checkable: ["kendoTreeViewCheckable", "checkable"] }, outputs: { checkedKeysChange: "checkedKeysChange" }, usesOnChanges: true, ngImport: i0 });
|
|
281
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CheckDirective, decorators: [{
|
|
302
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CheckDirective, decorators: [{
|
|
282
303
|
type: Directive,
|
|
283
304
|
args: [{
|
|
284
305
|
selector: '[kendoTreeViewCheckable]',
|
|
@@ -11,9 +11,9 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
* the TreeView or the DropDownTree components.
|
|
12
12
|
*/
|
|
13
13
|
export class DataBoundComponent {
|
|
14
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataBoundComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
15
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataBoundComponent });
|
|
14
16
|
}
|
|
15
|
-
|
|
16
|
-
DataBoundComponent.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DataBoundComponent });
|
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DataBoundComponent, decorators: [{
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataBoundComponent, decorators: [{
|
|
18
18
|
type: Injectable
|
|
19
19
|
}] });
|
|
@@ -11,21 +11,27 @@ import * as i1 from "./treeview.component";
|
|
|
11
11
|
* ([see example]({% slug disabledstate_treeview %})).
|
|
12
12
|
*/
|
|
13
13
|
export class DisableDirective {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
this.cdr = cdr;
|
|
17
|
-
/**
|
|
18
|
-
* Defines the collection that will store the disabled keys.
|
|
19
|
-
*/
|
|
20
|
-
this.disabledKeys = [];
|
|
21
|
-
this.treeView.isDisabled = (dataItem, index) => (this.disabledKeys.indexOf(this.itemKey({ dataItem, index })) > -1);
|
|
22
|
-
}
|
|
14
|
+
treeView;
|
|
15
|
+
cdr;
|
|
23
16
|
/**
|
|
24
17
|
* @hidden
|
|
25
18
|
*/
|
|
26
19
|
set isDisabled(value) {
|
|
27
20
|
this.treeView.isDisabled = value;
|
|
28
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Defines the item key that will be stored in the `disabledKeys` collection.
|
|
24
|
+
*/
|
|
25
|
+
disableKey;
|
|
26
|
+
/**
|
|
27
|
+
* Defines the collection that will store the disabled keys.
|
|
28
|
+
*/
|
|
29
|
+
disabledKeys = [];
|
|
30
|
+
constructor(treeView, cdr) {
|
|
31
|
+
this.treeView = treeView;
|
|
32
|
+
this.cdr = cdr;
|
|
33
|
+
this.treeView.isDisabled = (dataItem, index) => (this.disabledKeys.indexOf(this.itemKey({ dataItem, index })) > -1);
|
|
34
|
+
}
|
|
29
35
|
ngOnChanges(changes = {}) {
|
|
30
36
|
const { disabledKeys } = changes;
|
|
31
37
|
if (disabledKeys && !disabledKeys.firstChange) {
|
|
@@ -43,10 +49,10 @@ export class DisableDirective {
|
|
|
43
49
|
return this.disableKey(e);
|
|
44
50
|
}
|
|
45
51
|
}
|
|
52
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DisableDirective, deps: [{ token: i1.TreeViewComponent }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
53
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DisableDirective, isStandalone: true, selector: "[kendoTreeViewDisable]", inputs: { isDisabled: "isDisabled", disableKey: ["kendoTreeViewDisable", "disableKey"], disabledKeys: "disabledKeys" }, usesOnChanges: true, ngImport: i0 });
|
|
46
54
|
}
|
|
47
|
-
|
|
48
|
-
DisableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: DisableDirective, isStandalone: true, selector: "[kendoTreeViewDisable]", inputs: { isDisabled: "isDisabled", disableKey: ["kendoTreeViewDisable", "disableKey"], disabledKeys: "disabledKeys" }, usesOnChanges: true, ngImport: i0 });
|
|
49
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DisableDirective, decorators: [{
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DisableDirective, decorators: [{
|
|
50
56
|
type: Directive,
|
|
51
57
|
args: [{
|
|
52
58
|
selector: '[kendoTreeViewDisable]',
|
|
@@ -18,12 +18,7 @@ import * as i1 from "../treeview.component";
|
|
|
18
18
|
* handlers when the corresponding events are triggered by the TreeView component.
|
|
19
19
|
*/
|
|
20
20
|
export class DragAndDropEditingDirective {
|
|
21
|
-
|
|
22
|
-
this.treeview = treeview;
|
|
23
|
-
this.subscriptions = new Subscription();
|
|
24
|
-
this.subscriptions.add(this.treeview.addItem.subscribe(this.handleAdd.bind(this)));
|
|
25
|
-
this.subscriptions.add(this.treeview.removeItem.subscribe(this.handleRemove.bind(this)));
|
|
26
|
-
}
|
|
21
|
+
treeview;
|
|
27
22
|
/**
|
|
28
23
|
* Specifies the handlers called on drag-and-drop [`addItem`]({% slug api_treeview_treeviewcomponent %}#toc-additem)
|
|
29
24
|
* and [`removeItem`]({% slug api_treeview_treeviewcomponent %}#toc-removeitem) events.
|
|
@@ -31,6 +26,12 @@ export class DragAndDropEditingDirective {
|
|
|
31
26
|
set editService(service) {
|
|
32
27
|
this.treeview.editService = service;
|
|
33
28
|
}
|
|
29
|
+
subscriptions = new Subscription();
|
|
30
|
+
constructor(treeview) {
|
|
31
|
+
this.treeview = treeview;
|
|
32
|
+
this.subscriptions.add(this.treeview.addItem.subscribe(this.handleAdd.bind(this)));
|
|
33
|
+
this.subscriptions.add(this.treeview.removeItem.subscribe(this.handleRemove.bind(this)));
|
|
34
|
+
}
|
|
34
35
|
ngOnDestroy() {
|
|
35
36
|
this.subscriptions.unsubscribe();
|
|
36
37
|
}
|
|
@@ -46,10 +47,10 @@ export class DragAndDropEditingDirective {
|
|
|
46
47
|
}
|
|
47
48
|
this.treeview.editService.remove(args);
|
|
48
49
|
}
|
|
50
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragAndDropEditingDirective, deps: [{ token: i1.TreeViewComponent }], target: i0.ɵɵFactoryTarget.Directive });
|
|
51
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DragAndDropEditingDirective, isStandalone: true, selector: "[kendoTreeViewDragAndDropEditing]", inputs: { editService: "editService" }, ngImport: i0 });
|
|
49
52
|
}
|
|
50
|
-
|
|
51
|
-
DragAndDropEditingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: DragAndDropEditingDirective, isStandalone: true, selector: "[kendoTreeViewDragAndDropEditing]", inputs: { editService: "editService" }, ngImport: i0 });
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragAndDropEditingDirective, decorators: [{
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragAndDropEditingDirective, decorators: [{
|
|
53
54
|
type: Directive,
|
|
54
55
|
args: [{
|
|
55
56
|
selector: '[kendoTreeViewDragAndDropEditing]',
|
|
@@ -35,60 +35,81 @@ const DEFAULT_SCROLL_SETTINGS = {
|
|
|
35
35
|
* events when the corresponding actions occur on the respective TreeView instance.
|
|
36
36
|
*/
|
|
37
37
|
export class DragAndDropDirective {
|
|
38
|
+
element;
|
|
39
|
+
zone;
|
|
40
|
+
treeview;
|
|
41
|
+
dragClueService;
|
|
42
|
+
dropHintService;
|
|
43
|
+
/**
|
|
44
|
+
* Specifies whether the `removeItem` event will be fired after an item is dropped when the `ctrl` key is pressed.
|
|
45
|
+
* If enabled, the `removeItem` event will not be fired on the source TreeView
|
|
46
|
+
* ([see example]({% slug draganddrop_treeview %}#toc-multiple-treeviews)).
|
|
47
|
+
*
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
allowCopy = false;
|
|
51
|
+
/**
|
|
52
|
+
* Specifes the TreeViewComponent instances into which dragged items from the current TreeViewComponent can be dropped
|
|
53
|
+
* ([see example]({% slug draganddrop_treeview %}#toc-multiple-treeviews)).
|
|
54
|
+
*/
|
|
55
|
+
dropZoneTreeViews = [];
|
|
56
|
+
/**
|
|
57
|
+
* Specifies the distance in pixels from the initial item pointerdown event, before the dragging is initiated.
|
|
58
|
+
* The `nodeDragStart` and all consequent TreeView drag events will not be fired until the actual dragging begins.
|
|
59
|
+
*
|
|
60
|
+
* @default 5
|
|
61
|
+
*/
|
|
62
|
+
startDragAfter = 5;
|
|
63
|
+
/**
|
|
64
|
+
* Controlls the auto-scrolling behavior during drag-and-drop ([see example]({% slug draganddrop_treeview %}#toc-auto-scrolling)).
|
|
65
|
+
* Enbaled by default. To turn the auto-scrolling off, set this prop to `false`.
|
|
66
|
+
*
|
|
67
|
+
* By default, the scrolling will be performed by 1 pixel at every 1 millisecond, when the dragged item reaches the top or the bottom of the scrollable container.
|
|
68
|
+
* The `step` and `interval` can be overridden by providing a `DragAndDropScrollSettings` object to this prop.
|
|
69
|
+
*
|
|
70
|
+
* @default true
|
|
71
|
+
*/
|
|
72
|
+
autoScroll = true;
|
|
73
|
+
/**
|
|
74
|
+
* @hidden
|
|
75
|
+
*/
|
|
76
|
+
dragClueTemplate;
|
|
77
|
+
/**
|
|
78
|
+
* @hidden
|
|
79
|
+
*/
|
|
80
|
+
dropHintTemplate;
|
|
81
|
+
/**
|
|
82
|
+
* @hidden
|
|
83
|
+
*/
|
|
84
|
+
userSelectStyle = 'none';
|
|
85
|
+
draggable;
|
|
86
|
+
draggedItem;
|
|
87
|
+
/**
|
|
88
|
+
* The pointer event of the last successful item pointerdown event (the draggable `press` event).
|
|
89
|
+
* Used for determining whether the `startDragAfter` distance is covered and for the `nodeDragStart` event args.
|
|
90
|
+
* Used also as a flag for whether a drag attempt is pending. Should be set to `null` once the dragging begins.
|
|
91
|
+
*/
|
|
92
|
+
pendingDragStartEvent;
|
|
93
|
+
get scrollSettings() {
|
|
94
|
+
const userProvidedSettings = typeof this.autoScroll === 'boolean' ?
|
|
95
|
+
{ enabled: this.autoScroll } :
|
|
96
|
+
this.autoScroll;
|
|
97
|
+
return Object.assign({}, DEFAULT_SCROLL_SETTINGS, userProvidedSettings);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Describes the offset of the parent element if the latter has the `transform` CSS prop applied.
|
|
101
|
+
* Transformed parents create new stacking context and the fixed children must be position based on the transformed parent.
|
|
102
|
+
* https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context
|
|
103
|
+
*/
|
|
104
|
+
containerOffset = { top: 0, left: 0 };
|
|
38
105
|
constructor(element, zone, treeview, dragClueService, dropHintService) {
|
|
39
106
|
this.element = element;
|
|
40
107
|
this.zone = zone;
|
|
41
108
|
this.treeview = treeview;
|
|
42
109
|
this.dragClueService = dragClueService;
|
|
43
110
|
this.dropHintService = dropHintService;
|
|
44
|
-
/**
|
|
45
|
-
* Specifies whether the `removeItem` event will be fired after an item is dropped when the `ctrl` key is pressed.
|
|
46
|
-
* If enabled, the `removeItem` event will not be fired on the source TreeView
|
|
47
|
-
* ([see example]({% slug draganddrop_treeview %}#toc-multiple-treeviews)).
|
|
48
|
-
*
|
|
49
|
-
* @default false
|
|
50
|
-
*/
|
|
51
|
-
this.allowCopy = false;
|
|
52
|
-
/**
|
|
53
|
-
* Specifes the TreeViewComponent instances into which dragged items from the current TreeViewComponent can be dropped
|
|
54
|
-
* ([see example]({% slug draganddrop_treeview %}#toc-multiple-treeviews)).
|
|
55
|
-
*/
|
|
56
|
-
this.dropZoneTreeViews = [];
|
|
57
|
-
/**
|
|
58
|
-
* Specifies the distance in pixels from the initial item pointerdown event, before the dragging is initiated.
|
|
59
|
-
* The `nodeDragStart` and all consequent TreeView drag events will not be fired until the actual dragging begins.
|
|
60
|
-
*
|
|
61
|
-
* @default 5
|
|
62
|
-
*/
|
|
63
|
-
this.startDragAfter = 5;
|
|
64
|
-
/**
|
|
65
|
-
* Controlls the auto-scrolling behavior during drag-and-drop ([see example]({% slug draganddrop_treeview %}#toc-auto-scrolling)).
|
|
66
|
-
* Enbaled by default. To turn the auto-scrolling off, set this prop to `false`.
|
|
67
|
-
*
|
|
68
|
-
* By default, the scrolling will be performed by 1 pixel at every 1 millisecond, when the dragged item reaches the top or the bottom of the scrollable container.
|
|
69
|
-
* The `step` and `interval` can be overridden by providing a `DragAndDropScrollSettings` object to this prop.
|
|
70
|
-
*
|
|
71
|
-
* @default true
|
|
72
|
-
*/
|
|
73
|
-
this.autoScroll = true;
|
|
74
|
-
/**
|
|
75
|
-
* @hidden
|
|
76
|
-
*/
|
|
77
|
-
this.userSelectStyle = 'none';
|
|
78
|
-
/**
|
|
79
|
-
* Describes the offset of the parent element if the latter has the `transform` CSS prop applied.
|
|
80
|
-
* Transformed parents create new stacking context and the fixed children must be position based on the transformed parent.
|
|
81
|
-
* https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context
|
|
82
|
-
*/
|
|
83
|
-
this.containerOffset = { top: 0, left: 0 };
|
|
84
111
|
this.treeview.touchActions = false;
|
|
85
112
|
}
|
|
86
|
-
get scrollSettings() {
|
|
87
|
-
const userProvidedSettings = typeof this.autoScroll === 'boolean' ?
|
|
88
|
-
{ enabled: this.autoScroll } :
|
|
89
|
-
this.autoScroll;
|
|
90
|
-
return Object.assign({}, DEFAULT_SCROLL_SETTINGS, userProvidedSettings);
|
|
91
|
-
}
|
|
92
113
|
ngAfterContentInit() {
|
|
93
114
|
this.initalizeDraggable();
|
|
94
115
|
this.dragClueService.initialize(this.treeview.assetsContainer, this.dragClueTemplate && this.dragClueTemplate.templateRef);
|
|
@@ -270,13 +291,13 @@ export class DragAndDropDirective {
|
|
|
270
291
|
this.containerOffset = getContainerOffset(this.draggedItem);
|
|
271
292
|
this.pendingDragStartEvent = null;
|
|
272
293
|
}
|
|
294
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragAndDropDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i1.TreeViewComponent }, { token: i2.DragClueService }, { token: i3.DropHintService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
295
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DragAndDropDirective, isStandalone: true, selector: "[kendoTreeViewDragAndDrop]", inputs: { allowCopy: "allowCopy", dropZoneTreeViews: "dropZoneTreeViews", startDragAfter: "startDragAfter", autoScroll: "autoScroll" }, host: { properties: { "style.user-select": "this.userSelectStyle", "style.-ms-user-select": "this.userSelectStyle", "style.-moz-user-select": "this.userSelectStyle", "style.-webkit-user-select": "this.userSelectStyle" } }, providers: [
|
|
296
|
+
DragClueService,
|
|
297
|
+
DropHintService
|
|
298
|
+
], queries: [{ propertyName: "dragClueTemplate", first: true, predicate: DragClueTemplateDirective, descendants: true }, { propertyName: "dropHintTemplate", first: true, predicate: DropHintTemplateDirective, descendants: true }], ngImport: i0 });
|
|
273
299
|
}
|
|
274
|
-
|
|
275
|
-
DragAndDropDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: DragAndDropDirective, isStandalone: true, selector: "[kendoTreeViewDragAndDrop]", inputs: { allowCopy: "allowCopy", dropZoneTreeViews: "dropZoneTreeViews", startDragAfter: "startDragAfter", autoScroll: "autoScroll" }, host: { properties: { "style.user-select": "this.userSelectStyle", "style.-ms-user-select": "this.userSelectStyle", "style.-moz-user-select": "this.userSelectStyle", "style.-webkit-user-select": "this.userSelectStyle" } }, providers: [
|
|
276
|
-
DragClueService,
|
|
277
|
-
DropHintService
|
|
278
|
-
], queries: [{ propertyName: "dragClueTemplate", first: true, predicate: DragClueTemplateDirective, descendants: true }, { propertyName: "dropHintTemplate", first: true, predicate: DropHintTemplateDirective, descendants: true }], ngImport: i0 });
|
|
279
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragAndDropDirective, decorators: [{
|
|
300
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragAndDropDirective, decorators: [{
|
|
280
301
|
type: Directive,
|
|
281
302
|
args: [{
|
|
282
303
|
selector: '[kendoTreeViewDragAndDrop]',
|
|
@@ -19,13 +19,14 @@ import * as i0 from "@angular/core";
|
|
|
19
19
|
* - `let-destinationItem="destinationItem"` ([`TreeItemLookup`]({% slug api_treeview_treeitemlookup %}))
|
|
20
20
|
*/
|
|
21
21
|
export class DragClueTemplateDirective {
|
|
22
|
+
templateRef;
|
|
22
23
|
constructor(templateRef) {
|
|
23
24
|
this.templateRef = templateRef;
|
|
24
25
|
}
|
|
26
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragClueTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
27
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DragClueTemplateDirective, isStandalone: true, selector: "[kendoTreeViewDragClueTemplate]", ngImport: i0 });
|
|
25
28
|
}
|
|
26
|
-
|
|
27
|
-
DragClueTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: DragClueTemplateDirective, isStandalone: true, selector: "[kendoTreeViewDragClueTemplate]", ngImport: i0 });
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragClueTemplateDirective, decorators: [{
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragClueTemplateDirective, decorators: [{
|
|
29
30
|
type: Directive,
|
|
30
31
|
args: [{
|
|
31
32
|
selector: '[kendoTreeViewDragClueTemplate]',
|
|
@@ -12,11 +12,29 @@ import * as i0 from "@angular/core";
|
|
|
12
12
|
* @hidden
|
|
13
13
|
*/
|
|
14
14
|
export class DragClueComponent {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
cdr;
|
|
16
|
+
hostClasses = true;
|
|
17
|
+
/**
|
|
18
|
+
* The text value of the dragged TreeView item.
|
|
19
|
+
*/
|
|
20
|
+
text;
|
|
21
|
+
/**
|
|
22
|
+
* The attempted operation according to the current drop target.
|
|
23
|
+
*/
|
|
24
|
+
action;
|
|
25
|
+
/**
|
|
26
|
+
* The look-up info for the currently dragged item.
|
|
27
|
+
*/
|
|
28
|
+
sourceItem;
|
|
29
|
+
/**
|
|
30
|
+
* The look-up info for the destination item (if hovering a valid drop target).
|
|
31
|
+
*/
|
|
32
|
+
destinationItem;
|
|
33
|
+
/**
|
|
34
|
+
* Defines the drag clue content template.
|
|
35
|
+
*/
|
|
36
|
+
template;
|
|
37
|
+
posistionStyle = 'fixed';
|
|
20
38
|
get statusIconClass() {
|
|
21
39
|
switch (this.action) {
|
|
22
40
|
case DropAction.Add: return 'plus';
|
|
@@ -37,13 +55,15 @@ export class DragClueComponent {
|
|
|
37
55
|
default: return cancelIcon;
|
|
38
56
|
}
|
|
39
57
|
}
|
|
58
|
+
constructor(cdr) {
|
|
59
|
+
this.cdr = cdr;
|
|
60
|
+
}
|
|
40
61
|
// exposed as a public method that can be called from outside as the component uses `OnPush` strategy
|
|
41
62
|
detectChanges() {
|
|
42
63
|
this.cdr.detectChanges();
|
|
43
64
|
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
DragClueComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DragClueComponent, isStandalone: true, selector: "kendo-treeview-drag-clue", host: { properties: { "class.k-header": "this.hostClasses", "class.k-drag-clue": "this.hostClasses", "style.position": "this.posistionStyle" } }, ngImport: i0, template: `
|
|
65
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragClueComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
66
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DragClueComponent, isStandalone: true, selector: "kendo-treeview-drag-clue", host: { properties: { "class.k-header": "this.hostClasses", "class.k-drag-clue": "this.hostClasses", "style.position": "this.posistionStyle" } }, ngImport: i0, template: `
|
|
47
67
|
<ng-container *ngIf="!template">
|
|
48
68
|
<kendo-icon-wrapper
|
|
49
69
|
innerCssClass="k-drag-status"
|
|
@@ -66,7 +86,8 @@ DragClueComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
|
66
86
|
>
|
|
67
87
|
</ng-template>
|
|
68
88
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
69
|
-
|
|
89
|
+
}
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragClueComponent, decorators: [{
|
|
70
91
|
type: Component,
|
|
71
92
|
args: [{
|
|
72
93
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -21,6 +21,9 @@ export const RETURN_ANIMATION_DURATION = 200;
|
|
|
21
21
|
* @hidden
|
|
22
22
|
*/
|
|
23
23
|
export class DragClueService extends DragAndDropAssetService {
|
|
24
|
+
componentFactoryResolver;
|
|
25
|
+
returnAnimation;
|
|
26
|
+
scrollInterval;
|
|
24
27
|
constructor(componentFactoryResolver) {
|
|
25
28
|
super();
|
|
26
29
|
this.componentFactoryResolver = componentFactoryResolver;
|
|
@@ -115,9 +118,9 @@ export class DragClueService extends DragAndDropAssetService {
|
|
|
115
118
|
this.scrollInterval = null;
|
|
116
119
|
}
|
|
117
120
|
}
|
|
121
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragClueService, deps: [{ token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
122
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragClueService });
|
|
118
123
|
}
|
|
119
|
-
|
|
120
|
-
DragClueService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragClueService });
|
|
121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragClueService, decorators: [{
|
|
124
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragClueService, decorators: [{
|
|
122
125
|
type: Injectable
|
|
123
126
|
}], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }]; } });
|
|
@@ -16,13 +16,14 @@ import * as i0 from "@angular/core";
|
|
|
16
16
|
* - `let-destinationItem="destinationItem"` ([`TreeItemLookup`]({% slug api_treeview_treeitemlookup %}))
|
|
17
17
|
*/
|
|
18
18
|
export class DropHintTemplateDirective {
|
|
19
|
+
templateRef;
|
|
19
20
|
constructor(templateRef) {
|
|
20
21
|
this.templateRef = templateRef;
|
|
21
22
|
}
|
|
23
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropHintTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
24
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DropHintTemplateDirective, isStandalone: true, selector: "[kendoTreeViewDropHintTemplate]", ngImport: i0 });
|
|
22
25
|
}
|
|
23
|
-
|
|
24
|
-
DropHintTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: DropHintTemplateDirective, isStandalone: true, selector: "[kendoTreeViewDropHintTemplate]", ngImport: i0 });
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DropHintTemplateDirective, decorators: [{
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropHintTemplateDirective, decorators: [{
|
|
26
27
|
type: Directive,
|
|
27
28
|
args: [{
|
|
28
29
|
selector: '[kendoTreeViewDropHintTemplate]',
|