@limble/limble-tree 6.1.0 → 7.0.0

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 (72) hide show
  1. package/README.md +21 -21
  2. package/fesm2022/limble-limble-tree.mjs +43 -43
  3. package/fesm2022/limble-limble-tree.mjs.map +1 -1
  4. package/index.d.ts +823 -3
  5. package/package.json +3 -3
  6. package/lib/components/branch/branch.component.d.ts +0 -26
  7. package/lib/components/branch/index.d.ts +0 -1
  8. package/lib/components/dragover-no-change-detect.d.ts +0 -18
  9. package/lib/components/dropzone/dropzone.component.d.ts +0 -13
  10. package/lib/components/dropzone/index.d.ts +0 -1
  11. package/lib/components/host-component.interface.d.ts +0 -6
  12. package/lib/components/index.d.ts +0 -6
  13. package/lib/components/node-component.interface.d.ts +0 -5
  14. package/lib/components/root/index.d.ts +0 -1
  15. package/lib/components/root/root.component.d.ts +0 -14
  16. package/lib/core/branch-options.interface.d.ts +0 -14
  17. package/lib/core/branchable.interface.d.ts +0 -8
  18. package/lib/core/component-container.interface.d.ts +0 -8
  19. package/lib/core/configuration/configuration.d.ts +0 -11
  20. package/lib/core/configuration/index.d.ts +0 -2
  21. package/lib/core/configuration/tree-options.interface.d.ts +0 -54
  22. package/lib/core/index.d.ts +0 -10
  23. package/lib/core/tree-branch/branch-controller.d.ts +0 -25
  24. package/lib/core/tree-branch/graftable.interface.d.ts +0 -7
  25. package/lib/core/tree-branch/index.d.ts +0 -3
  26. package/lib/core/tree-branch/tree-branch.d.ts +0 -223
  27. package/lib/core/tree-node-base.d.ts +0 -26
  28. package/lib/core/tree-node.interface.d.ts +0 -16
  29. package/lib/core/tree-plot.interface.d.ts +0 -1
  30. package/lib/core/tree-root/index.d.ts +0 -2
  31. package/lib/core/tree-root/root-controller.d.ts +0 -19
  32. package/lib/core/tree-root/tree-root.d.ts +0 -125
  33. package/lib/core/tree-service/index.d.ts +0 -1
  34. package/lib/core/tree-service/tree.service.d.ts +0 -15
  35. package/lib/errors/index.d.ts +0 -1
  36. package/lib/errors/tree-error.d.ts +0 -2
  37. package/lib/events/drag/drag-end-event.d.ts +0 -25
  38. package/lib/events/drag/drag-start-event.d.ts +0 -8
  39. package/lib/events/drag/drop-event.d.ts +0 -12
  40. package/lib/events/drag/index.d.ts +0 -3
  41. package/lib/events/general/destruction-event.d.ts +0 -8
  42. package/lib/events/general/index.d.ts +0 -1
  43. package/lib/events/index.d.ts +0 -4
  44. package/lib/events/relational/graft-event.d.ts +0 -15
  45. package/lib/events/relational/index.d.ts +0 -4
  46. package/lib/events/relational/prune-event.d.ts +0 -15
  47. package/lib/events/relational/relational-tree-event.interface.d.ts +0 -11
  48. package/lib/events/relational/tree-relationship.interface.d.ts +0 -6
  49. package/lib/events/tree-event.interface.d.ts +0 -5
  50. package/lib/extras/collapse/collapse.d.ts +0 -11
  51. package/lib/extras/collapse/collapse.module.d.ts +0 -7
  52. package/lib/extras/collapse/collapse.service.d.ts +0 -34
  53. package/lib/extras/collapse/index.d.ts +0 -3
  54. package/lib/extras/drag-and-drop/drag-and-drop.d.ts +0 -14
  55. package/lib/extras/drag-and-drop/drag-and-drop.module.d.ts +0 -11
  56. package/lib/extras/drag-and-drop/drag-and-drop.service.d.ts +0 -35
  57. package/lib/extras/drag-and-drop/drag-state.d.ts +0 -23
  58. package/lib/extras/drag-and-drop/draggable.directive.d.ts +0 -11
  59. package/lib/extras/drag-and-drop/dropzone-renderer.d.ts +0 -27
  60. package/lib/extras/drag-and-drop/index.d.ts +0 -6
  61. package/lib/legacy/index.d.ts +0 -6
  62. package/lib/legacy/legacy-component-obj.interface.d.ts +0 -13
  63. package/lib/legacy/legacy-tree-data.interface.d.ts +0 -18
  64. package/lib/legacy/legacy-tree-options.interface.d.ts +0 -34
  65. package/lib/legacy/legacy-tree.d.ts +0 -14
  66. package/lib/legacy/limble-tree-legacy.module.d.ts +0 -8
  67. package/lib/legacy/limble-tree-root/limble-tree-root.component.d.ts +0 -28
  68. package/lib/limble-tree.module.d.ts +0 -13
  69. package/public-api.d.ts +0 -8
  70. package/shared/assert.d.ts +0 -1
  71. package/shared/has-property.d.ts +0 -3
  72. package/shared/index.d.ts +0 -2
@@ -1,125 +0,0 @@
1
- import type { Observable } from "rxjs";
2
- import { TreeBranch } from "../tree-branch";
3
- import type { TreePlot } from "../tree-plot.interface";
4
- import type { TreeNode } from "../tree-node.interface";
5
- import type { BranchOptions } from "../branch-options.interface";
6
- import type { Type, ViewContainerRef, ViewRef } from "@angular/core";
7
- import { RootComponent } from "../../components";
8
- import { TreeEvent } from "../../events";
9
- /**
10
- * Represents the base of the tree. It renders a very simple container for child
11
- * branches. It has methods for creating and accessing those branches. It emits
12
- * events when things happen in the tree.
13
- */
14
- export declare class TreeRoot<UserlandComponent> implements TreeNode<UserlandComponent> {
15
- private readonly viewContainerRef;
16
- private readonly rootController;
17
- private readonly treeNodeBase;
18
- constructor(viewContainerRef: ViewContainerRef);
19
- /** @returns All child branches as an array of TreeBranch instances */
20
- branches(): Array<TreeBranch<UserlandComponent>>;
21
- /**
22
- * Recursively destroys all branches of the tree, as well as itself.
23
- *
24
- * @remarks
25
- * This releases all resources held or consumed by the tree.
26
- *
27
- * It is important to call this method when a tree is discarded, otherwise
28
- * the tree will remain in memory and continue to consume resources.
29
- */
30
- destroy(): void;
31
- /** Run Angular change detection on the root of the tree */
32
- detectChanges(): void;
33
- /**
34
- * Emits the specified TreeEvent.
35
- *
36
- * @remarks
37
- * Caution: It is not recommended to manually emit TreeEvents that are already
38
- * provided by the library. For example, it is not recommended to emit a
39
- * `GraftEvent`, `DestructionEvent`, etc. These events may be used by the tree,
40
- * and emitting them manually may cause unexpected behavior. Instead, we
41
- * recommend implementing the TreeEvent interface with your own custom events
42
- * and dispatching those.
43
- *
44
- * @param event - The TreeEvent that will be emitted.
45
- */
46
- dispatch(event: TreeEvent<UserlandComponent>): void;
47
- /**
48
- * @returns
49
- * An observable that emits TreeEvents whenever an event is dispatched
50
- * in the root or any of its descendant branches.
51
- */
52
- events(): Observable<TreeEvent<UserlandComponent>>;
53
- /**
54
- * @returns
55
- * The child branch at the specified index, or undefined if there is
56
- * no child branch at the specified index.
57
- */
58
- getBranch(index: number): TreeBranch<UserlandComponent> | undefined;
59
- /** @returns The ViewContainerRef in which child branches are rendered */
60
- getBranchesContainer(): ViewContainerRef | undefined;
61
- /**
62
- * Retrieves the RootComponent.
63
- *
64
- * @remarks
65
- * The RootComponent holds the BranchesContainer, as well as a single Dropzone
66
- * for drag-and-drop operations.
67
- *
68
- * @returns The instance of RootComponent that is rendered by this class.
69
- */
70
- getComponentInstance(): RootComponent;
71
- /** @returns The Host View in which the RootComponent is rendered */
72
- getHostView(): ViewRef;
73
- /** @returns The RootComponent as a native HTML Element */
74
- getNativeElement(): HTMLElement;
75
- /**
76
- * Appends a new child branch to this branch. The child branch will render
77
- * the specified component according to the (optional) configuration parameter.
78
- *
79
- * @param component - The component to render in the new child branch.
80
- * @param options - Configuration options for the new child branch.
81
- *
82
- * @returns
83
- * The newly-created child branch.
84
- */
85
- grow(component: Type<UserlandComponent>, options?: BranchOptions<UserlandComponent>): TreeBranch<UserlandComponent>;
86
- /** @returns `true` if the tree is destroyed, `false` otherwise */
87
- isDestroyed(): boolean;
88
- /**
89
- * Provides a model describing the shape of the tree.
90
- *
91
- * @returns A multi-dimensional Map which describes the shape of the tree.
92
- *
93
- * @example
94
- * For example, an empty tree will return an empty Map. A tree with a single
95
- * branch will return a Map with a single entry, where the key is the index
96
- * of the branch (zero) and the value is an empty Map. A Tree like this:
97
- *
98
- * ```
99
- * ---Branch-------Branch
100
- * /
101
- * Root-------Branch
102
- * \
103
- * ---Branch
104
- * ```
105
- * Will return a Map of matching shape:
106
- * ```
107
- * Map {
108
- * 0: Map { 0: Map {}},
109
- * 1: Map {},
110
- * 2: Map {}
111
- * }
112
- * ```
113
- */
114
- plot(): TreePlot;
115
- /** @returns Itself */
116
- root(): this;
117
- /**
118
- * Traverses the tree in depth-first pre-order, executing the provided
119
- * callback function on each node. Traversal includes the Root.
120
- *
121
- * @param callback - A function to execute on each node.
122
- */
123
- traverse(callback: (node: TreeNode<UserlandComponent>) => void): void;
124
- private handleUserlandError;
125
- }
@@ -1 +0,0 @@
1
- export * from "./tree.service";
@@ -1,15 +0,0 @@
1
- import { type ViewContainerRef } from "@angular/core";
2
- import { type TreeOptions } from "../configuration";
3
- import { TreeRoot } from "../tree-root";
4
- import * as i0 from "@angular/core";
5
- /** Responsible for the creation of new trees. */
6
- export declare class TreeService {
7
- /**
8
- * Creates a new, empty tree structure inside the provided container.
9
- *
10
- * @returns A `TreeRoot` representing the base of the new tree.
11
- */
12
- createEmptyTree<Component>(container: ViewContainerRef, options?: TreeOptions): TreeRoot<Component>;
13
- static ɵfac: i0.ɵɵFactoryDeclaration<TreeService, never>;
14
- static ɵprov: i0.ɵɵInjectableDeclaration<TreeService>;
15
- }
@@ -1 +0,0 @@
1
- export * from "./tree-error";
@@ -1,2 +0,0 @@
1
- export declare class TreeError extends Error {
2
- }
@@ -1,25 +0,0 @@
1
- import type { TreeNode } from "../../core";
2
- import type { TreeEvent } from "../../events";
3
- /** Emitted when a drag-and-drop operation has completed */
4
- export declare class DragEndEvent<T> implements TreeEvent<T> {
5
- private readonly _source;
6
- private readonly _newParent;
7
- private readonly _newIndex;
8
- private readonly _oldParent;
9
- private readonly _oldIndex;
10
- constructor(source: TreeNode<T>, endpoints: {
11
- oldParent: TreeNode<T>;
12
- oldIndex: number;
13
- newParent: TreeNode<T>;
14
- newIndex: number;
15
- });
16
- /** @returns The new index of the dropped branch */
17
- newIndex(): number;
18
- /** @returns The new parent of the dropped branch */
19
- newParent(): TreeNode<T>;
20
- /** @returns The index of the dropped branch before it was dragged */
21
- oldIndex(): number;
22
- /** @returns The parent of the dropped branch before it was dragged */
23
- oldParent(): TreeNode<T>;
24
- source(): TreeNode<T>;
25
- }
@@ -1,8 +0,0 @@
1
- import type { TreeNode } from "../../core";
2
- import type { TreeEvent } from "../../events";
3
- /** Emitted when a TreeBranch begins being dragged */
4
- export declare class DragStartEvent<T> implements TreeEvent<T> {
5
- private readonly _source;
6
- constructor(source: TreeNode<T>);
7
- source(): TreeNode<T>;
8
- }
@@ -1,12 +0,0 @@
1
- import type { TreeNode } from "../../core";
2
- import type { TreeEvent } from "../../events";
3
- /** Emitted when a TreeBranch is dropped into a valid Dropzone */
4
- export declare class DropEvent<T> implements TreeEvent<T> {
5
- private readonly _source;
6
- private readonly _parent;
7
- private readonly _index;
8
- constructor(source: TreeNode<T>, parent: TreeNode<T>, index: number);
9
- source(): TreeNode<T>;
10
- index(): number;
11
- parent(): TreeNode<T>;
12
- }
@@ -1,3 +0,0 @@
1
- export * from "./drag-end-event";
2
- export * from "./drag-start-event";
3
- export * from "./drop-event";
@@ -1,8 +0,0 @@
1
- import type { TreeNode } from "../../core";
2
- import type { TreeEvent } from "../../events";
3
- /** Emitted when a node is destroyed */
4
- export declare class DestructionEvent<T> implements TreeEvent<T> {
5
- private readonly _source;
6
- constructor(source: TreeNode<T>);
7
- source(): TreeNode<T>;
8
- }
@@ -1 +0,0 @@
1
- export * from "./destruction-event";
@@ -1,4 +0,0 @@
1
- export * from "./drag";
2
- export * from "./general";
3
- export * from "./relational";
4
- export type * from "./tree-event.interface";
@@ -1,15 +0,0 @@
1
- import type { RelationalTreeEvent } from "./relational-tree-event.interface";
2
- import type { TreeRelationship } from "./tree-relationship.interface";
3
- import type { TreeBranch, TreeNode } from "../../core";
4
- /** Emits when a branch is grafted to another tree node */
5
- export declare class GraftEvent<UserlandComponent> implements RelationalTreeEvent<UserlandComponent> {
6
- private readonly _source;
7
- private readonly _parent;
8
- private readonly _child;
9
- private readonly _index;
10
- constructor(source: TreeBranch<UserlandComponent>, relationship: TreeRelationship<UserlandComponent>);
11
- child(): TreeBranch<UserlandComponent>;
12
- index(): number;
13
- parent(): TreeNode<UserlandComponent>;
14
- source(): TreeBranch<UserlandComponent>;
15
- }
@@ -1,4 +0,0 @@
1
- export * from "./graft-event";
2
- export * from "./prune-event";
3
- export type * from "./relational-tree-event.interface";
4
- export type * from "./tree-relationship.interface";
@@ -1,15 +0,0 @@
1
- import type { RelationalTreeEvent } from "./relational-tree-event.interface";
2
- import type { TreeRelationship } from "./tree-relationship.interface";
3
- import type { TreeNode, TreeBranch } from "../../core";
4
- /** Emitted when a branch is pruned from its parent branch */
5
- export declare class PruneEvent<UserlandComponent> implements RelationalTreeEvent<UserlandComponent> {
6
- private readonly _source;
7
- private readonly _parent;
8
- private readonly _child;
9
- private readonly _index;
10
- constructor(source: TreeBranch<UserlandComponent>, relationship: TreeRelationship<UserlandComponent>);
11
- child(): TreeBranch<UserlandComponent>;
12
- index(): number;
13
- parent(): TreeNode<UserlandComponent>;
14
- source(): TreeBranch<UserlandComponent>;
15
- }
@@ -1,11 +0,0 @@
1
- import type { TreeBranch, TreeNode } from "../../core";
2
- import type { TreeEvent } from "../tree-event.interface";
3
- /** A TreeEvent which involves a parent/child relationship */
4
- export interface RelationalTreeEvent<UserlandComponent> extends TreeEvent<UserlandComponent> {
5
- /** @returns The parent branch of the relationship */
6
- parent: () => TreeNode<UserlandComponent>;
7
- /** @returns The child branch of the relationship */
8
- child: () => TreeBranch<UserlandComponent>;
9
- /** @returns The index location of the child */
10
- index: () => number;
11
- }
@@ -1,6 +0,0 @@
1
- import type { TreeBranch, TreeNode } from "../../core";
2
- export interface TreeRelationship<UserlandComponent> {
3
- parent: TreeNode<UserlandComponent>;
4
- child: TreeBranch<UserlandComponent>;
5
- index: number;
6
- }
@@ -1,5 +0,0 @@
1
- import type { TreeNode } from "../core";
2
- /** An event emitted by a node in the tree */
3
- export interface TreeEvent<UserlandComponent> {
4
- source: () => TreeNode<UserlandComponent>;
5
- }
@@ -1,11 +0,0 @@
1
- import type { TreeBranch } from "../../core";
2
- declare class TreeCollapser {
3
- private readonly tempStorage;
4
- constructor();
5
- collapse<T>(treeBranch: TreeBranch<T>): void;
6
- expand<T>(treeBranch: TreeBranch<T>): void;
7
- isCollapsed<T>(treeBranch: TreeBranch<T>): boolean;
8
- storePrecollapsedNode<T>(parent: TreeBranch<T>, branch: TreeBranch<T>): void;
9
- }
10
- export declare const treeCollapser: TreeCollapser;
11
- export {};
@@ -1,7 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- /** A module containing the entities which provide collapse functionality */
3
- export declare class TreeCollapseModule {
4
- static ɵfac: i0.ɵɵFactoryDeclaration<TreeCollapseModule, never>;
5
- static ɵmod: i0.ɵɵNgModuleDeclaration<TreeCollapseModule, never, never, never>;
6
- static ɵinj: i0.ɵɵInjectorDeclaration<TreeCollapseModule>;
7
- }
@@ -1,34 +0,0 @@
1
- import { TreeBranch } from "../../core";
2
- import * as i0 from "@angular/core";
3
- /** A service that collapses and expands tree branches */
4
- export declare class TreeCollapseService {
5
- /**
6
- * Causes a TreeBranch to collapse, temporarily pruning all of its children
7
- * from the tree.
8
- *
9
- * @param treeBranch - The branch to collapse.
10
- */
11
- collapse<T>(treeBranch: TreeBranch<T>): void;
12
- /**
13
- * Causes a TreeBranch to expand, restoring all of its children which were
14
- * previously pruned by a call to `collapse()`.
15
- *
16
- * @param treeBranch - The branch to expand.
17
- */
18
- expand<T>(treeBranch: TreeBranch<T>): void;
19
- /**
20
- * Determines whether a TreeBranch currently has any children which are
21
- * pruned from the tree due to a call to the `collapse()` method.
22
- *
23
- * @remarks
24
- * Child branches which are pruned manually from the tree, rather than
25
- * through the `collapse()` method, will not be considered.
26
- *
27
- * @param treeBranch - The branch to check.
28
- *
29
- * @returns `true` if the branch is currently collapsed; `false` if it is not.
30
- */
31
- isCollapsed<T>(treeBranch: TreeBranch<T>): boolean;
32
- static ɵfac: i0.ɵɵFactoryDeclaration<TreeCollapseService, never>;
33
- static ɵprov: i0.ɵɵInjectableDeclaration<TreeCollapseService>;
34
- }
@@ -1,3 +0,0 @@
1
- export * from "./collapse.module";
2
- export * from "./collapse.service";
3
- export * from "./collapse";
@@ -1,14 +0,0 @@
1
- import { Subject } from "rxjs";
2
- import { type TreeBranch, type TreeNode } from "../../core";
3
- declare class DragAndDrop {
4
- readonly dragAborted$: Subject<DragEvent>;
5
- dragStart<T>(treeBranch: TreeBranch<T>, event: DragEvent): void;
6
- drop<T>(parent: TreeNode<T>, index: number): void;
7
- private getDragImageOffsets;
8
- private setDragEffects;
9
- private watchForDragend;
10
- private draggingAllowed;
11
- private graftDraggedBranch;
12
- }
13
- export declare const dragAndDrop: DragAndDrop;
14
- export {};
@@ -1,11 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./draggable.directive";
3
- /**
4
- * An Angular module containing all of the entities which provide Drag-And-Drop
5
- * functionality.
6
- */
7
- export declare class TreeDragAndDropModule {
8
- static ɵfac: i0.ɵɵFactoryDeclaration<TreeDragAndDropModule, never>;
9
- static ɵmod: i0.ɵɵNgModuleDeclaration<TreeDragAndDropModule, never, [typeof i1.DraggableDirective], [typeof i1.DraggableDirective]>;
10
- static ɵinj: i0.ɵɵInjectorDeclaration<TreeDragAndDropModule>;
11
- }
@@ -1,35 +0,0 @@
1
- import type { Observable } from "rxjs";
2
- import type { TreeNode, TreeRoot } from "../../core";
3
- import { type DragStates } from "./drag-state";
4
- import * as i0 from "@angular/core";
5
- export declare class TreeDragAndDropService {
6
- /** Hides all Dropzones */
7
- clearDropzones(): void;
8
- /**
9
- * @returns An object that indicates which dropzones are currently being displayed.
10
- * If no dropzones are being displayed, then null is returned.
11
- */
12
- getCurrentlyDisplayedDropzoneFamily(): {
13
- treeBranch: TreeNode<any>;
14
- direction: "upper" | "lower";
15
- } | null;
16
- /**
17
- * Causes the dropzone of the TreeRoot to be displayed.
18
- *
19
- * @remarks
20
- * This is a useful function when you want to show the dropzone of a TreeRoot
21
- * that has no child branches.
22
- *
23
- * @param root - The TreeRoot whose dropzone you want to show.
24
- */
25
- showRootDropzone<T>(root: TreeRoot<T>): void;
26
- /**
27
- * @returns An observable that emits a number whenever the drag state changes.
28
- *
29
- * @remarks
30
- * See the `DragStates` enum for a list of possible states.
31
- */
32
- state(): Observable<DragStates>;
33
- static ɵfac: i0.ɵɵFactoryDeclaration<TreeDragAndDropService, never>;
34
- static ɵprov: i0.ɵɵInjectableDeclaration<TreeDragAndDropService>;
35
- }
@@ -1,23 +0,0 @@
1
- import { type Observable } from "rxjs";
2
- import { TreeBranch } from "../../core";
3
- export declare enum DragStates {
4
- Idle = 0,
5
- Starting = 1,
6
- Dragging = 2,
7
- Dropped = 3
8
- }
9
- declare class DragState {
10
- private dragData;
11
- private _state;
12
- private readonly state$;
13
- constructor();
14
- getDragData<T>(): TreeBranch<T> | undefined;
15
- starting<T>(treeBranch: TreeBranch<T>): void;
16
- dragging(): void;
17
- dropped(): void;
18
- restart(): void;
19
- events(): Observable<DragStates>;
20
- state(): DragStates;
21
- }
22
- export declare const dragState: DragState;
23
- export {};
@@ -1,11 +0,0 @@
1
- import { ElementRef, Renderer2 } from "@angular/core";
2
- import type { TreeBranch } from "../../core";
3
- import * as i0 from "@angular/core";
4
- /** Makes an TreeBranch draggable when the host element is dragged */
5
- export declare class DraggableDirective {
6
- limbleTreeDraggable?: TreeBranch<any> | undefined;
7
- constructor(renderer: Renderer2, hostElement: ElementRef<HTMLElement>);
8
- onDragstart(event: DragEvent): void;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<DraggableDirective, never>;
10
- static ɵdir: i0.ɵɵDirectiveDeclaration<DraggableDirective, "[limbleTreeDraggable]", never, { "limbleTreeDraggable": { "alias": "limbleTreeDraggable"; "required": false; }; }, {}, never, never, true, never>;
11
- }
@@ -1,27 +0,0 @@
1
- import { type DropzoneComponent } from "../../components";
2
- import { TreeBranch, type TreeNode } from "../../core";
3
- declare class DropzoneRenderer {
4
- private currentDisplay;
5
- private readonly registry;
6
- constructor();
7
- clearCurrentDisplay(): void;
8
- clearTreeFromRegistry(tree: TreeNode<any>): void;
9
- getCurrentDisplay(): {
10
- treeBranch: TreeNode<any>;
11
- direction: "upper" | "lower";
12
- } | null;
13
- getDropzoneLocation<T>(dropzone: DropzoneComponent): [TreeNode<T>, "inner" | "lateral"];
14
- handleDrop<T>(treeNode: TreeNode<T>, placement: "inner" | "lateral"): void;
15
- registerDropzone<T>(dropzone: DropzoneComponent, treeNode: TreeNode<T>): void;
16
- registerDropzones<T>(dropzones: Iterable<DropzoneComponent>, treeBranch: TreeBranch<T>): void;
17
- showLowerZones<T>(treeNode: TreeNode<T>): void;
18
- showUpperZones<T>(treeBranch: TreeBranch<T>): void;
19
- private loopThroughLowerZones;
20
- private loopThroughUpperZones;
21
- private nestingAllowed;
22
- private dropAllowed;
23
- private showInnerZone;
24
- private showLateralZone;
25
- }
26
- export declare const dropzoneRenderer: DropzoneRenderer;
27
- export {};
@@ -1,6 +0,0 @@
1
- export * from "./drag-and-drop.module";
2
- export * from "./drag-and-drop.service";
3
- export * from "./drag-and-drop";
4
- export * from "./drag-state";
5
- export * from "./draggable.directive";
6
- export * from "./dropzone-renderer";
@@ -1,6 +0,0 @@
1
- export type * from "./legacy-component-obj.interface";
2
- export type * from "./legacy-tree-data.interface";
3
- export type * from "./legacy-tree-options.interface";
4
- export * from "./legacy-tree";
5
- export * from "./limble-tree-root/limble-tree-root.component";
6
- export * from "./limble-tree-legacy.module";
@@ -1,13 +0,0 @@
1
- import type { Type } from "@angular/core";
2
- /**
3
- * An object that references the component to be rendered and its bindings
4
- * @deprecated
5
- */
6
- export interface ComponentObj {
7
- /** The component class */
8
- class: Type<unknown>;
9
- /** The bindings (inputs and outputs) of the class */
10
- bindings?: {
11
- [index: string]: unknown;
12
- };
13
- }
@@ -1,18 +0,0 @@
1
- import type { ComponentObj } from "./legacy-component-obj.interface";
2
- /**
3
- * An object describing a node of the tree
4
- * @deprecated
5
- */
6
- export interface LimbleTreeNode {
7
- /** A list of nodes to be rendered "under" this one, one level deeper in the tree. */
8
- nodes?: LimbleTreeData;
9
- /** An object that describes the component which will represent this node in the visual tree */
10
- component?: ComponentObj;
11
- collapsed?: boolean;
12
- [index: string]: unknown;
13
- }
14
- /**
15
- * An object that the limble-tree-root component uses to build the tree
16
- * @deprecated
17
- */
18
- export type LimbleTreeData = Array<LimbleTreeNode>;
@@ -1,34 +0,0 @@
1
- import type { TreeBranch, TreeRoot } from "../core";
2
- import type { ComponentObj } from "./legacy-component-obj.interface";
3
- /**
4
- * A group of settings for changing the functionality of the tree
5
- * @deprecated
6
- */
7
- export interface LimbleTreeOptions {
8
- /** The component object to use if one is not specified for a particular node */
9
- defaultComponent?: ComponentObj;
10
- /** The number of pixels to indent each level of the tree. Defaults to 45 */
11
- indent?: number;
12
- /**
13
- * Whether to allow "nesting" (placing a node one level deeper than currently exists on the branch).
14
- * When this is a boolean, it applies to all nodes. When this is a function, the node in question
15
- * is passed in. Defaults to true.
16
- */
17
- allowNesting?: boolean | (<T>(treeBranch: TreeBranch<T>) => boolean);
18
- /**
19
- * Whether to allow a node to be dragged. When this is a boolean, it applies to all nodes. When this
20
- * is a function, the node in question is passed in. Defaults to true.
21
- */
22
- allowDragging?: boolean | (<T>(treeBranch: TreeBranch<T>) => boolean);
23
- /** A callback to determine whether a sourceNode can be dropped at a particular location. */
24
- allowDrop?: <T>(sourceNode: TreeBranch<T>, proposedParent: TreeBranch<T> | TreeRoot<T>, proposedIndex: number) => boolean;
25
- /**
26
- * When set to true, list mode will enforce a flat tree structure, meaning there
27
- * can only be one level of the tree. `allowNesting` is automatically set to `false`.
28
- *
29
- * This mode can be used when the same dynamic drag and drop functionality of
30
- * the tree is desired, but the tree structure itself is not necessary. This
31
- * also opens up the pagination API on the limble-tree-root component.
32
- */
33
- listMode?: boolean;
34
- }
@@ -1,14 +0,0 @@
1
- import type { ViewContainerRef } from "@angular/core";
2
- import { TreeRoot, type TreeOptions } from "../core";
3
- import type { LimbleTreeOptions as LegacyLimbleTreeOptions } from "./legacy-tree-options.interface";
4
- import type { LimbleTreeData } from "./legacy-tree-data.interface";
5
- /**
6
- * A shim to help with the transition from v0 to v1.
7
- * @deprecated
8
- */
9
- export declare class LegacyTree {
10
- /** Creates a v1 tree structure from a v0 data array and v0 tree options. */
11
- createTreeFromLegacyArray<Component>(container: ViewContainerRef, data: LimbleTreeData, treeOptions?: LegacyLimbleTreeOptions): TreeRoot<Component>;
12
- upgradeOptions(legacyOptions: LegacyLimbleTreeOptions): TreeOptions;
13
- private renderTreeNode;
14
- }
@@ -1,8 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./limble-tree-root/limble-tree-root.component";
3
- /** @deprecated */
4
- export declare class LimbleTreeLegacyModule {
5
- static ɵfac: i0.ɵɵFactoryDeclaration<LimbleTreeLegacyModule, never>;
6
- static ɵmod: i0.ɵɵNgModuleDeclaration<LimbleTreeLegacyModule, never, [typeof i1.LimbleTreeRootComponent], [typeof i1.LimbleTreeRootComponent]>;
7
- static ɵinj: i0.ɵɵInjectorDeclaration<LimbleTreeLegacyModule>;
8
- }
@@ -1,28 +0,0 @@
1
- import { type AfterViewInit, EventEmitter, type OnChanges, type OnDestroy, ViewContainerRef } from "@angular/core";
2
- import type { LimbleTreeData } from "../legacy-tree-data.interface";
3
- import type { LimbleTreeOptions } from "../legacy-tree-options.interface";
4
- import type { TreeRoot } from "../../core";
5
- import { DragEndEvent } from "../../events";
6
- import * as i0 from "@angular/core";
7
- /** @deprecated */
8
- export declare class LimbleTreeRootComponent implements AfterViewInit, OnChanges, OnDestroy {
9
- data?: LimbleTreeData;
10
- options?: LimbleTreeOptions | undefined;
11
- itemsPerPage: number;
12
- page: number;
13
- host?: ViewContainerRef;
14
- readonly treeChange: EventEmitter<TreeRoot<any>>;
15
- readonly treeDrop: EventEmitter<DragEndEvent<any>>;
16
- private dropSubscription?;
17
- private readonly legacyTree;
18
- private root?;
19
- constructor();
20
- ngOnChanges(): void;
21
- ngAfterViewInit(): void;
22
- ngOnDestroy(): void;
23
- getRoot(): TreeRoot<any> | undefined;
24
- update(): void;
25
- private paginatedData;
26
- static ɵfac: i0.ɵɵFactoryDeclaration<LimbleTreeRootComponent, never>;
27
- static ɵcmp: i0.ɵɵComponentDeclaration<LimbleTreeRootComponent, "limble-tree-root", never, { "data": { "alias": "data"; "required": false; }; "options": { "alias": "options"; "required": false; }; "itemsPerPage": { "alias": "itemsPerPage"; "required": false; }; "page": { "alias": "page"; "required": false; }; }, { "treeChange": "treeChange"; "treeDrop": "treeDrop"; }, never, never, true, never>;
28
- }
@@ -1,13 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./legacy/limble-tree-legacy.module";
3
- import * as i2 from "./extras/collapse/collapse.module";
4
- import * as i3 from "./extras/drag-and-drop/drag-and-drop.module";
5
- /**
6
- * Import this Angular module into your application to gain access to the
7
- * components, directives, and services provided by Limble Tree.
8
- */
9
- export declare class LimbleTreeModule {
10
- static ɵfac: i0.ɵɵFactoryDeclaration<LimbleTreeModule, never>;
11
- static ɵmod: i0.ɵɵNgModuleDeclaration<LimbleTreeModule, never, [typeof i1.LimbleTreeLegacyModule, typeof i2.TreeCollapseModule, typeof i3.TreeDragAndDropModule], [typeof i1.LimbleTreeLegacyModule, typeof i2.TreeCollapseModule, typeof i3.TreeDragAndDropModule]>;
12
- static ɵinj: i0.ɵɵInjectorDeclaration<LimbleTreeModule>;
13
- }