@angular-wave/angular.ts 0.0.21 → 0.0.23
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/Makefile +1 -1
- package/TODO.md +14 -0
- package/dist/angular-ts.esm.js +1 -1
- package/dist/angular-ts.umd.js +1 -1
- package/index.html +8 -2
- package/package.json +1 -1
- package/src/animations/animate-css-driver.js +2 -2
- package/src/animations/animate-css.js +15 -6
- package/src/animations/animate-js.js +1 -1
- package/src/animations/animate-queue.js +1 -1
- package/src/animations/shared.js +0 -14
- package/src/core/compile.js +6 -3
- package/src/directive/if.js +0 -79
- package/src/directive/if.md +80 -0
- package/src/directive/include.js +0 -82
- package/src/directive/include.md +86 -0
- package/src/directive/repeat.js +0 -1
- package/src/filters/order-by.js +8 -8
- package/src/loader.js +0 -1
- package/src/router/common/trace.js +1 -1
- package/src/router/directives/stateDirectives.js +16 -14
- package/src/router/directives/viewDirective.js +5 -13
- package/src/router/hooks/resolve.js +3 -4
- package/src/router/hooks/views.js +3 -2
- package/src/router/state/stateService.js +1 -2
- package/src/router/stateProvider.js +8 -0
- package/src/router/templateFactory.js +13 -7
- package/src/router/transition/interface.js +14 -14
- package/src/router/transition/rejectFactory.js +29 -20
- package/src/router/transition/transition.js +5 -1
- package/src/router/transition/transitionHook.js +5 -5
- package/src/router/url/urlMatcher.js +1 -2
- package/src/router/url/urlRule.js +10 -2
- package/src/router/url/urlRules.js +1 -1
- package/src/services/browser.js +3 -18
- package/src/shared/common.js +0 -1
- package/test/module-test.html +44 -12
- package/test/router/ng-state-builder.spec.js +81 -0
- package/test/router/services.spec.js +70 -0
- package/test/router/state-directives.spec.js +1182 -0
- package/test/router/template-factory.spec.js +146 -0
- package/test/router/url-matcher-factory.spec.js +1313 -0
- package/test/router/view-directive.spec.js +2013 -0
- package/test/router/view-hook.spec.js +217 -0
- package/test/router/view-scroll.spec.js +77 -0
- package/test/router/view.spec.js +117 -0
- package/types/angular.d.ts +132 -124
- package/types/index.d.ts +2350 -2187
- package/types/jqlite.d.ts +463 -418
- package/types/router/core/common/common.d.ts +70 -24
- package/types/router/core/common/coreservices.d.ts +30 -32
- package/types/router/core/common/glob.d.ts +9 -9
- package/types/router/core/common/hof.d.ts +12 -4
- package/types/router/core/common/index.d.ts +8 -8
- package/types/router/core/common/predicates.d.ts +1 -1
- package/types/router/core/common/queue.d.ts +13 -13
- package/types/router/core/common/safeConsole.d.ts +3 -3
- package/types/router/core/common/strings.d.ts +4 -2
- package/types/router/core/common/trace.d.ts +94 -82
- package/types/router/core/globals.d.ts +37 -37
- package/types/router/core/hooks/coreResolvables.d.ts +5 -3
- package/types/router/core/hooks/ignoredTransition.d.ts +4 -2
- package/types/router/core/hooks/invalidTransition.d.ts +4 -2
- package/types/router/core/hooks/lazyLoad.d.ts +10 -5
- package/types/router/core/hooks/onEnterExitRetain.d.ts +10 -4
- package/types/router/core/hooks/redirectTo.d.ts +4 -2
- package/types/router/core/hooks/resolve.d.ts +10 -4
- package/types/router/core/hooks/updateGlobals.d.ts +4 -2
- package/types/router/core/hooks/url.d.ts +4 -2
- package/types/router/core/hooks/views.d.ts +7 -3
- package/types/router/core/index.d.ts +11 -12
- package/types/router/core/interface.d.ts +83 -81
- package/types/router/core/params/index.d.ts +5 -5
- package/types/router/core/params/interface.d.ts +439 -439
- package/types/router/core/params/param.d.ts +72 -60
- package/types/router/core/params/paramType.d.ts +40 -40
- package/types/router/core/params/paramTypes.d.ts +169 -165
- package/types/router/core/params/stateParams.d.ts +13 -13
- package/types/router/core/path/index.d.ts +2 -2
- package/types/router/core/path/pathNode.d.ts +49 -49
- package/types/router/core/path/pathUtils.d.ts +100 -74
- package/types/router/core/resolve/index.d.ts +3 -3
- package/types/router/core/resolve/interface.d.ts +137 -137
- package/types/router/core/resolve/resolvable.d.ts +60 -54
- package/types/router/core/resolve/resolveContext.d.ts +84 -79
- package/types/router/core/router.d.ts +95 -86
- package/types/router/core/state/index.d.ts +8 -8
- package/types/router/core/state/interface.d.ts +667 -643
- package/types/router/core/state/stateBuilder.d.ts +41 -38
- package/types/router/core/state/stateMatcher.d.ts +11 -9
- package/types/router/core/state/stateObject.d.ts +154 -139
- package/types/router/core/state/stateQueueManager.d.ts +26 -21
- package/types/router/core/state/stateRegistry.d.ts +124 -121
- package/types/router/core/state/stateService.d.ts +380 -343
- package/types/router/core/state/targetState.d.ts +74 -69
- package/types/router/core/transition/hookBuilder.d.ts +34 -30
- package/types/router/core/transition/hookRegistry.d.ts +96 -74
- package/types/router/core/transition/index.d.ts +8 -8
- package/types/router/core/transition/interface.d.ts +652 -609
- package/types/router/core/transition/rejectFactory.d.ts +97 -97
- package/types/router/core/transition/transition.d.ts +565 -517
- package/types/router/core/transition/transitionEventType.d.ts +20 -11
- package/types/router/core/transition/transitionHook.d.ts +90 -82
- package/types/router/core/transition/transitionService.d.ts +228 -161
- package/types/router/core/url/index.d.ts +8 -8
- package/types/router/core/url/interface.d.ts +100 -87
- package/types/router/core/url/urlConfig.d.ts +130 -126
- package/types/router/core/url/urlMatcher.d.ts +132 -127
- package/types/router/core/url/urlMatcherFactory.d.ts +46 -42
- package/types/router/core/url/urlRouter.d.ts +91 -75
- package/types/router/core/url/urlRule.d.ts +123 -100
- package/types/router/core/url/urlRules.d.ts +240 -232
- package/types/router/core/url/urlService.d.ts +201 -201
- package/types/router/core/view/index.d.ts +2 -2
- package/types/router/core/view/interface.d.ts +26 -26
- package/types/router/core/view/view.d.ts +152 -143
- package/types/router/directives/viewDirective.d.ts +12 -11
- package/types/router/index.d.ts +11 -12
- package/types/router/interface.d.ts +361 -351
- package/types/router/legacy/resolveService.d.ts +44 -40
- package/types/router/legacy/stateEvents.d.ts +1 -1
- package/types/router/locationServices.d.ts +45 -37
- package/types/router/services.d.ts +9 -9
- package/types/router/stateFilters.d.ts +3 -3
- package/types/router/stateProvider.d.ts +240 -235
- package/types/router/statebuilders/onEnterExitRetain.d.ts +4 -2
- package/types/router/statebuilders/views.d.ts +35 -22
- package/types/router/templateFactory.d.ts +99 -79
- package/types/router/viewScroll.d.ts +7 -7
- package/src/directive/a.js +0 -37
- package/types/router/angular.d.ts +0 -1
- package/types/router/core/vanilla.d.ts +0 -1
- package/types/router/directives/stateDirectives.d.ts +0 -3
- package/types/router/injectables.d.ts +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { StateObject } from
|
|
2
|
-
import { StateMatcher } from
|
|
3
|
-
import { StateQueueManager } from
|
|
4
|
-
import { StateDeclaration, _StateDeclaration } from
|
|
5
|
-
import { BuilderFunction } from
|
|
6
|
-
import { StateOrName } from
|
|
7
|
-
import { UIRouter } from
|
|
1
|
+
import { StateObject } from "./stateObject";
|
|
2
|
+
import { StateMatcher } from "./stateMatcher";
|
|
3
|
+
import { StateQueueManager } from "./stateQueueManager";
|
|
4
|
+
import { StateDeclaration, _StateDeclaration } from "./interface";
|
|
5
|
+
import { BuilderFunction } from "./stateBuilder";
|
|
6
|
+
import { StateOrName } from "./interface";
|
|
7
|
+
import { UIRouter } from "../router";
|
|
8
8
|
/**
|
|
9
9
|
* The signature for the callback function provided to [[StateRegistry.onStatesChanged]].
|
|
10
10
|
*
|
|
@@ -13,124 +13,127 @@ import { UIRouter } from '../router';
|
|
|
13
13
|
* @param event a string; either "registered" or "deregistered"
|
|
14
14
|
* @param states the list of [[StateDeclaration]]s that were registered (or deregistered).
|
|
15
15
|
*/
|
|
16
|
-
export declare type StateRegistryListener = (
|
|
16
|
+
export declare type StateRegistryListener = (
|
|
17
|
+
event: "registered" | "deregistered",
|
|
18
|
+
states: StateDeclaration[],
|
|
19
|
+
) => void;
|
|
17
20
|
/**
|
|
18
21
|
* A registry for all of the application's [[StateDeclaration]]s
|
|
19
22
|
*
|
|
20
23
|
* This API is found at `router.stateRegistry` ([[UIRouter.stateRegistry]])
|
|
21
24
|
*/
|
|
22
25
|
export declare class StateRegistry {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
26
|
+
private router;
|
|
27
|
+
private _root;
|
|
28
|
+
private states;
|
|
29
|
+
/** @internal */
|
|
30
|
+
matcher: StateMatcher;
|
|
31
|
+
private builder;
|
|
32
|
+
/** @internal */
|
|
33
|
+
stateQueue: StateQueueManager;
|
|
34
|
+
/** @internal */
|
|
35
|
+
listeners: StateRegistryListener[];
|
|
36
|
+
/** @internal */
|
|
37
|
+
constructor(router: UIRouter);
|
|
38
|
+
/** @internal */
|
|
39
|
+
private _registerRoot;
|
|
40
|
+
/** @internal */
|
|
41
|
+
dispose(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Listen for a State Registry events
|
|
44
|
+
*
|
|
45
|
+
* Adds a callback that is invoked when states are registered or deregistered with the StateRegistry.
|
|
46
|
+
*
|
|
47
|
+
* #### Example:
|
|
48
|
+
* ```js
|
|
49
|
+
* let allStates = registry.get();
|
|
50
|
+
*
|
|
51
|
+
* // Later, invoke deregisterFn() to remove the listener
|
|
52
|
+
* let deregisterFn = registry.onStatesChanged((event, states) => {
|
|
53
|
+
* switch(event) {
|
|
54
|
+
* case: 'registered':
|
|
55
|
+
* states.forEach(state => allStates.push(state));
|
|
56
|
+
* break;
|
|
57
|
+
* case: 'deregistered':
|
|
58
|
+
* states.forEach(state => {
|
|
59
|
+
* let idx = allStates.indexOf(state);
|
|
60
|
+
* if (idx !== -1) allStates.splice(idx, 1);
|
|
61
|
+
* });
|
|
62
|
+
* break;
|
|
63
|
+
* }
|
|
64
|
+
* });
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* @param listener a callback function invoked when the registered states changes.
|
|
68
|
+
* The function receives two parameters, `event` and `state`.
|
|
69
|
+
* See [[StateRegistryListener]]
|
|
70
|
+
* @return a function that deregisters the listener
|
|
71
|
+
*/
|
|
72
|
+
onStatesChanged(listener: StateRegistryListener): () => void;
|
|
73
|
+
/**
|
|
74
|
+
* Gets the implicit root state
|
|
75
|
+
*
|
|
76
|
+
* Gets the root of the state tree.
|
|
77
|
+
* The root state is implicitly created by UI-Router.
|
|
78
|
+
* Note: this returns the internal [[StateObject]] representation, not a [[StateDeclaration]]
|
|
79
|
+
*
|
|
80
|
+
* @return the root [[StateObject]]
|
|
81
|
+
*/
|
|
82
|
+
root(): StateObject;
|
|
83
|
+
/**
|
|
84
|
+
* Adds a state to the registry
|
|
85
|
+
*
|
|
86
|
+
* Registers a [[StateDeclaration]] or queues it for registration.
|
|
87
|
+
*
|
|
88
|
+
* Note: a state will be queued if the state's parent isn't yet registered.
|
|
89
|
+
*
|
|
90
|
+
* @param stateDefinition the definition of the state to register.
|
|
91
|
+
* @returns the internal [[StateObject]] object.
|
|
92
|
+
* If the state was successfully registered, then the object is fully built (See: [[StateBuilder]]).
|
|
93
|
+
* If the state was only queued, then the object is not fully built.
|
|
94
|
+
*/
|
|
95
|
+
register(stateDefinition: _StateDeclaration): StateObject;
|
|
96
|
+
/** @internal */
|
|
97
|
+
private _deregisterTree;
|
|
98
|
+
/**
|
|
99
|
+
* Removes a state from the registry
|
|
100
|
+
*
|
|
101
|
+
* This removes a state from the registry.
|
|
102
|
+
* If the state has children, they are are also removed from the registry.
|
|
103
|
+
*
|
|
104
|
+
* @param stateOrName the state's name or object representation
|
|
105
|
+
* @returns {StateObject[]} a list of removed states
|
|
106
|
+
*/
|
|
107
|
+
deregister(stateOrName: StateOrName): StateObject[];
|
|
108
|
+
/**
|
|
109
|
+
* Gets all registered states
|
|
110
|
+
*
|
|
111
|
+
* Calling this method with no arguments will return a list of all the states that are currently registered.
|
|
112
|
+
* Note: this does not return states that are *queued* but not yet registered.
|
|
113
|
+
*
|
|
114
|
+
* @return a list of [[StateDeclaration]]s
|
|
115
|
+
*/
|
|
116
|
+
get(): StateDeclaration[];
|
|
117
|
+
/**
|
|
118
|
+
* Gets a registered state
|
|
119
|
+
*
|
|
120
|
+
* Given a state or a name, finds and returns the [[StateDeclaration]] from the registry.
|
|
121
|
+
* Note: this does not return states that are *queued* but not yet registered.
|
|
122
|
+
*
|
|
123
|
+
* @param stateOrName either the name of a state, or a state object.
|
|
124
|
+
* @param base the base state to use when stateOrName is relative.
|
|
125
|
+
* @return a registered [[StateDeclaration]] that matched the `stateOrName`, or null if the state isn't registered.
|
|
126
|
+
*/
|
|
127
|
+
get(stateOrName: StateOrName, base?: StateOrName): StateDeclaration;
|
|
128
|
+
/**
|
|
129
|
+
* Registers a [[BuilderFunction]] for a specific [[StateObject]] property (e.g., `parent`, `url`, or `path`).
|
|
130
|
+
* More than one BuilderFunction can be registered for a given property.
|
|
131
|
+
*
|
|
132
|
+
* The BuilderFunction(s) will be used to define the property on any subsequently built [[StateObject]] objects.
|
|
133
|
+
*
|
|
134
|
+
* @param property The name of the State property being registered for.
|
|
135
|
+
* @param builderFunction The BuilderFunction which will be used to build the State property
|
|
136
|
+
* @returns a function which deregisters the BuilderFunction
|
|
137
|
+
*/
|
|
138
|
+
decorator(property: string, builderFunction: BuilderFunction): Function;
|
|
136
139
|
}
|