@angular-wave/angular.ts 0.0.73 → 0.1.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.
- package/.github/workflows/types.yml +19 -0
- package/dist/angular-ts.esm.js +2 -2
- package/dist/angular-ts.umd.js +2 -2
- package/package.json +1 -1
- package/src/animations/animate.js +1 -8
- package/src/core/compile/attributes.js +3 -3
- package/src/core/compile/compile.js +432 -368
- package/src/core/interpolate/interpolate.js +14 -10
- package/src/router/resolve/resolve-context.js +1 -0
- package/src/router/state/state-builder.js +38 -13
- package/src/router/state/state-object.js +12 -22
- package/src/router/state/state-queue-manager.js +1 -1
- package/src/router/state/state-registry.js +2 -1
- package/src/router/transition/transition.js +3 -1
- package/src/router/url/url-rule.js +14 -2
- package/src/router/view/view.spec.js +1 -1
- package/src/shared/predicates.js +3 -0
- package/tsconfig.json +1 -1
- package/types/core/compile/attributes.d.ts +5 -5
- package/types/core/interpolate/interpolate.d.ts +5 -5
- package/types/router/state/state-object.d.ts +12 -9
- package/types/router/state/state-registry.d.ts +2 -2
- package/types/router/transition/transition.d.ts +1 -1
- package/types/router/url/url-rule.d.ts +6 -1
- package/types/shared/predicates.d.ts +2 -0
- package/src/router/injectables.js +0 -263
- package/types/router/injectables.d.ts +0 -1
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The current (or pending) State Parameters
|
|
3
|
-
*
|
|
4
|
-
* An injectable global **Service Object** which holds the state parameters for the latest **SUCCESSFUL** transition.
|
|
5
|
-
*
|
|
6
|
-
* The values are not updated until *after* a `Transition` successfully completes.
|
|
7
|
-
*
|
|
8
|
-
* **Also:** an injectable **Per-Transition Object** object which holds the pending state parameters for the pending `Transition` currently running.
|
|
9
|
-
*
|
|
10
|
-
* ### Deprecation warning:
|
|
11
|
-
*
|
|
12
|
-
* The value injected for `$stateParams` is different depending on where it is injected.
|
|
13
|
-
*
|
|
14
|
-
* - When injected into an angular service, the object injected is the global **Service Object** with the parameter values for the latest successful `Transition`.
|
|
15
|
-
* - When injected into transition hooks, resolves, or view controllers, the object is the **Per-Transition Object** with the parameter values for the running `Transition`.
|
|
16
|
-
*
|
|
17
|
-
* Because of these confusing details, this service is deprecated.
|
|
18
|
-
*
|
|
19
|
-
* ### Instead of using the global `$stateParams` service object,
|
|
20
|
-
* inject [[$routerGlobals]] and use [[UIRouterGlobals.params]]
|
|
21
|
-
*
|
|
22
|
-
* ```js
|
|
23
|
-
* MyService.$inject = ['$routerGlobals'];
|
|
24
|
-
* function MyService($routerGlobals) {
|
|
25
|
-
* return {
|
|
26
|
-
* paramValues: function () {
|
|
27
|
-
* return $routerGlobals.params;
|
|
28
|
-
* }
|
|
29
|
-
* }
|
|
30
|
-
* }
|
|
31
|
-
* ```
|
|
32
|
-
*
|
|
33
|
-
* ### Instead of using the per-transition `$stateParams` object,
|
|
34
|
-
* inject the current `Transition` (as [[$transition$]]) and use [[Transition.params]]
|
|
35
|
-
*
|
|
36
|
-
* ```js
|
|
37
|
-
* MyController.$inject = ['$transition$'];
|
|
38
|
-
* function MyController($transition$) {
|
|
39
|
-
* var username = $transition$.params().username;
|
|
40
|
-
* // .. do something with username
|
|
41
|
-
* }
|
|
42
|
-
* ```
|
|
43
|
-
*
|
|
44
|
-
* ---
|
|
45
|
-
*
|
|
46
|
-
* This object can be injected into other services.
|
|
47
|
-
*
|
|
48
|
-
* #### Deprecated Example:
|
|
49
|
-
* ```js
|
|
50
|
-
* SomeService.$inject = ['$http', '$stateParams'];
|
|
51
|
-
* function SomeService($http, $stateParams) {
|
|
52
|
-
* return {
|
|
53
|
-
* getUser: function() {
|
|
54
|
-
* return $http.get('/api/users/' + $stateParams.username);
|
|
55
|
-
* }
|
|
56
|
-
* }
|
|
57
|
-
* };
|
|
58
|
-
* angular.service('SomeService', SomeService);
|
|
59
|
-
* ```
|
|
60
|
-
* @deprecated
|
|
61
|
-
*/
|
|
62
|
-
let $stateParams;
|
|
63
|
-
/**
|
|
64
|
-
* Global ng-router variables
|
|
65
|
-
*
|
|
66
|
-
* The router global state as a **Service Object** (injectable during runtime).
|
|
67
|
-
*
|
|
68
|
-
* This object contains globals such as the current state and current parameter values.
|
|
69
|
-
*/
|
|
70
|
-
let $routerGlobals;
|
|
71
|
-
/**
|
|
72
|
-
* The ng-router instance
|
|
73
|
-
*
|
|
74
|
-
* The [[UIRouter]] singleton (the router instance) as a **Service Object** (injectable during runtime).
|
|
75
|
-
*
|
|
76
|
-
* This object is the ng-router singleton instance, created by angular dependency injection during application bootstrap.
|
|
77
|
-
* It has references to the other ng-router services
|
|
78
|
-
*
|
|
79
|
-
* #### Note: This object is also exposed as [[$routerProvider]] for injection during angular config time.
|
|
80
|
-
*/
|
|
81
|
-
let $router;
|
|
82
|
-
/**
|
|
83
|
-
* The ng-router instance
|
|
84
|
-
*
|
|
85
|
-
* The [[UIRouter]] singleton (the router instance) as a **Provider Object** (injectable during config phase).
|
|
86
|
-
*
|
|
87
|
-
* This object is the ng-router singleton instance, created by angular dependency injection during application bootstrap.
|
|
88
|
-
* It has references to the other ng-router services
|
|
89
|
-
*
|
|
90
|
-
* #### Note: This object is also exposed as [[$router]] for injection during runtime.
|
|
91
|
-
*/
|
|
92
|
-
let $routerProvider;
|
|
93
|
-
/**
|
|
94
|
-
* Transition debug/tracing
|
|
95
|
-
*
|
|
96
|
-
* The [[Trace]] singleton as a **Service Object** (injectable during runtime).
|
|
97
|
-
*
|
|
98
|
-
* Enables or disables Transition tracing which can help to debug issues.
|
|
99
|
-
*/
|
|
100
|
-
let $trace;
|
|
101
|
-
/**
|
|
102
|
-
* The Transition Service
|
|
103
|
-
*
|
|
104
|
-
* The [[TransitionService]] singleton as a **Service Object** (injectable during runtime).
|
|
105
|
-
*
|
|
106
|
-
* This angular service exposes the [[TransitionService]] singleton, which is primarily
|
|
107
|
-
* used to register global transition hooks.
|
|
108
|
-
*
|
|
109
|
-
* #### Note: This object is also exposed as [[$transitionsProvider]] for injection during the config phase.
|
|
110
|
-
*/
|
|
111
|
-
let $transitions;
|
|
112
|
-
/**
|
|
113
|
-
* The Transition Service
|
|
114
|
-
*
|
|
115
|
-
* The [[TransitionService]] singleton as a **Provider Object** (injectable during config phase)
|
|
116
|
-
*
|
|
117
|
-
* This angular service exposes the [[TransitionService]] singleton, which is primarily
|
|
118
|
-
* used to register global transition hooks.
|
|
119
|
-
*
|
|
120
|
-
* #### Note: This object is also exposed as [[$transitions]] for injection during runtime.
|
|
121
|
-
*/
|
|
122
|
-
let $transitionsProvider;
|
|
123
|
-
/**
|
|
124
|
-
* The current [[Transition]] object
|
|
125
|
-
*
|
|
126
|
-
* The current [[Transition]] object as a **Per-Transition Object** (injectable into Resolve, Hooks, Controllers)
|
|
127
|
-
*
|
|
128
|
-
* This object returns information about the current transition, including:
|
|
129
|
-
*
|
|
130
|
-
* - To/from states
|
|
131
|
-
* - To/from parameters
|
|
132
|
-
* - Transition options
|
|
133
|
-
* - States being entered, exited, and retained
|
|
134
|
-
* - Resolve data
|
|
135
|
-
* - A Promise for the transition
|
|
136
|
-
* - Any transition failure information
|
|
137
|
-
* - An injector for both Service and Per-Transition Objects
|
|
138
|
-
*/
|
|
139
|
-
let $transition$;
|
|
140
|
-
/**
|
|
141
|
-
* The State Service
|
|
142
|
-
*
|
|
143
|
-
* The [[StateService]] singleton as a **Service Object** (injectable during runtime).
|
|
144
|
-
*
|
|
145
|
-
* This service used to manage and query information on registered states.
|
|
146
|
-
* It exposes state related APIs including:
|
|
147
|
-
*
|
|
148
|
-
* - Start a [[Transition]]
|
|
149
|
-
* - Imperatively lazy load states
|
|
150
|
-
* - Check if a state is currently active
|
|
151
|
-
* - Look up states by name
|
|
152
|
-
* - Build URLs for a state+parameters
|
|
153
|
-
* - Configure the global Transition error handler
|
|
154
|
-
*
|
|
155
|
-
* This angular service exposes the [[StateService]] singleton.
|
|
156
|
-
*/
|
|
157
|
-
let $state;
|
|
158
|
-
/**
|
|
159
|
-
* The State Registry
|
|
160
|
-
*
|
|
161
|
-
* The [[StateRegistry]] singleton as a **Service Object** (injectable during runtime).
|
|
162
|
-
*
|
|
163
|
-
* This service is used to register/deregister states.
|
|
164
|
-
* It has state registration related APIs including:
|
|
165
|
-
*
|
|
166
|
-
* - Register/deregister states
|
|
167
|
-
* - Listen for state registration/deregistration
|
|
168
|
-
* - Get states by name
|
|
169
|
-
* - Add state decorators (to customize the state creation process)
|
|
170
|
-
*
|
|
171
|
-
* #### Note: This object is also exposed as [[$stateRegistryProvider]] for injection during the config phase.
|
|
172
|
-
*/
|
|
173
|
-
let $stateRegistry;
|
|
174
|
-
/**
|
|
175
|
-
* The State Registry
|
|
176
|
-
*
|
|
177
|
-
* The [[StateRegistry]] singleton as a **Provider Object** (injectable during config time).
|
|
178
|
-
*
|
|
179
|
-
* This service is used to register/deregister states.
|
|
180
|
-
* It has state registration related APIs including:
|
|
181
|
-
*
|
|
182
|
-
* - Register/deregister states
|
|
183
|
-
* - Listen for state registration/deregistration
|
|
184
|
-
* - Get states by name
|
|
185
|
-
* - Add state decorators (to customize the state creation process)
|
|
186
|
-
*
|
|
187
|
-
* #### Note: This object is also exposed as [[$stateRegistry]] for injection during runtime.
|
|
188
|
-
*/
|
|
189
|
-
let $stateRegistryProvider;
|
|
190
|
-
/**
|
|
191
|
-
* The View Scroll provider
|
|
192
|
-
*
|
|
193
|
-
* The [[UIViewScrollProvider]] as a **Provider Object** (injectable during config time).
|
|
194
|
-
*
|
|
195
|
-
* This angular service exposes the [[UIViewScrollProvider]] singleton and is
|
|
196
|
-
* used to disable ng-router's scroll behavior.
|
|
197
|
-
*/
|
|
198
|
-
let $ngViewScrollProvider;
|
|
199
|
-
/**
|
|
200
|
-
* The View Scroll function
|
|
201
|
-
*
|
|
202
|
-
* The View Scroll function as a **Service Object** (injectable during runtime).
|
|
203
|
-
*
|
|
204
|
-
* This is a function that scrolls an element into view.
|
|
205
|
-
* The element is scrolled after a `$timeout` so the DOM has time to refresh.
|
|
206
|
-
*
|
|
207
|
-
* If you prefer to rely on `$anchorScroll` to scroll the view to the anchor,
|
|
208
|
-
* this can be enabled by calling [[UIViewScrollProvider.useAnchorScroll]].
|
|
209
|
-
*
|
|
210
|
-
* Note: this function is used by the [[directives.ngView]] when the `autoscroll` expression evaluates to true.
|
|
211
|
-
*/
|
|
212
|
-
let $ngViewScroll;
|
|
213
|
-
/**
|
|
214
|
-
* The StateProvider
|
|
215
|
-
*
|
|
216
|
-
* An angular1-only [[StateProvider]] as a **Provider Object** (injectable during config time).
|
|
217
|
-
*
|
|
218
|
-
* This angular service exposes the [[StateProvider]] singleton.
|
|
219
|
-
*
|
|
220
|
-
* The `StateProvider` is primarily used to register states or add custom state decorators.
|
|
221
|
-
*
|
|
222
|
-
* ##### Note: This provider is a ng1 vestige.
|
|
223
|
-
* It is a passthrough to [[$stateRegistry]] and [[$state]].
|
|
224
|
-
*/
|
|
225
|
-
let $stateProvider;
|
|
226
|
-
/**
|
|
227
|
-
* The URL Service Provider
|
|
228
|
-
*
|
|
229
|
-
* The [[UrlService]] singleton as a **Provider Object** (injectable during the angular config phase).
|
|
230
|
-
*
|
|
231
|
-
* A service used to configure and interact with the URL.
|
|
232
|
-
* It has URL related APIs including:
|
|
233
|
-
*
|
|
234
|
-
* - register custom Parameter types `UrlService.config.type` ([[UrlConfigApi.type]])
|
|
235
|
-
* - add URL rules: `UrlService.rules.when` ([[UrlRulesApi.when]])
|
|
236
|
-
* - configure behavior when no url matches: `UrlService.rules.otherwise` ([[UrlRulesApi.otherwise]])
|
|
237
|
-
* - delay initial URL synchronization [[UrlService.deferIntercept]].
|
|
238
|
-
* - get or set the current url: [[UrlService.url]]
|
|
239
|
-
*
|
|
240
|
-
* ##### Note: This service can also be injected during runtime as [[$urlService]].
|
|
241
|
-
*/
|
|
242
|
-
let $urlServiceProvider;
|
|
243
|
-
/**
|
|
244
|
-
* The URL Service
|
|
245
|
-
*
|
|
246
|
-
* The [[UrlService]] singleton as a **Service Object** (injectable during runtime).
|
|
247
|
-
*
|
|
248
|
-
* Note: This service can also be injected during the config phase as [[$urlServiceProvider]].
|
|
249
|
-
*
|
|
250
|
-
* Used to configure the URL.
|
|
251
|
-
* It has URL related APIs including:
|
|
252
|
-
*
|
|
253
|
-
* - register custom Parameter types `UrlService.config.type` ([[UrlConfigApi.type]])
|
|
254
|
-
* - add URL rules: `UrlService.rules.when` ([[UrlRulesApi.when]])
|
|
255
|
-
* - configure behavior when no url matches: `UrlService.rules.otherwise` ([[UrlRulesApi.otherwise]])
|
|
256
|
-
* - delay initial URL synchronization [[UrlService.deferIntercept]].
|
|
257
|
-
* - get or set the current url: [[UrlService.url]]
|
|
258
|
-
*
|
|
259
|
-
* ##### Note: This service can also be injected during the config phase as [[$urlServiceProvider]].
|
|
260
|
-
*/
|
|
261
|
-
let $urlService;
|
|
262
|
-
|
|
263
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|