1 | import { TreeChanges, TransitionHookPhase } from './interface';
|
2 | import { Transition } from './transition';
|
3 | import { TransitionHook } from './transitionHook';
|
4 | import { TransitionEventType } from './transitionEventType';
|
5 | import { RegisteredHook } from './hookRegistry';
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | export declare class HookBuilder {
|
20 | private transition;
|
21 | constructor(transition: Transition);
|
22 | buildHooksForPhase(phase: TransitionHookPhase): TransitionHook[];
|
23 | /**
|
24 | * Returns an array of newly built TransitionHook objects.
|
25 | *
|
26 | * - Finds all RegisteredHooks registered for the given `hookType` which matched the transition's [[TreeChanges]].
|
27 | * - Finds [[PathNode]] (or `PathNode[]`) to use as the TransitionHook context(s)
|
28 | * - For each of the [[PathNode]]s, creates a TransitionHook
|
29 | *
|
30 | * @param hookType the type of the hook registration function, e.g., 'onEnter', 'onFinish'.
|
31 | */
|
32 | buildHooks(hookType: TransitionEventType): TransitionHook[];
|
33 | /**
|
34 | * Finds all RegisteredHooks from:
|
35 | * - The Transition object instance hook registry
|
36 | * - The TransitionService ($transitions) global hook registry
|
37 | *
|
38 | * which matched:
|
39 | * - the eventType
|
40 | * - the matchCriteria (to, from, exiting, retained, entering)
|
41 | *
|
42 | * @returns an array of matched [[RegisteredHook]]s
|
43 | */
|
44 | getMatchingHooks(hookType: TransitionEventType, treeChanges: TreeChanges, transition: Transition): RegisteredHook[];
|
45 | }
|