@angular-wave/angular.ts 0.0.60 → 0.0.61

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 (119) hide show
  1. package/README.md +1 -1
  2. package/dist/angular-ts.esm.js +2 -2
  3. package/dist/angular-ts.umd.js +2 -2
  4. package/package.json +1 -1
  5. package/src/core/parser/parse.js +14 -0
  6. package/src/core/parser/parser.js +1 -1
  7. package/src/core/q/q.js +46 -289
  8. package/src/core/q/q.md +229 -0
  9. package/src/core/sanitize/sanitize-uri.js +2 -3
  10. package/src/core/scope/scope.js +18 -8
  11. package/src/directive/if/if.js +6 -1
  12. package/src/filters/limit-to.js +5 -2
  13. package/src/loader.js +1 -5
  14. package/src/router/params/param-type.js +2 -1
  15. package/src/router/state/views.js +3 -0
  16. package/src/router/transition/reject-factory.js +1 -0
  17. package/src/router/url/url-rule.js +1 -1
  18. package/src/router/url/url-service.js +4 -4
  19. package/src/services/http/http.js +7 -5
  20. package/src/services/template-request.js +2 -7
  21. package/src/shared/common.js +1 -1
  22. package/src/shared/utils.js +1 -1
  23. package/src/types.js +9 -1
  24. package/types/core/parser/parse.d.ts +3 -4
  25. package/types/core/parser/parser.d.ts +1 -1
  26. package/types/core/q/q.d.ts +2 -2
  27. package/types/core/sanitize/sanitize-uri.d.ts +4 -5
  28. package/types/core/scope/scope.d.ts +19 -7
  29. package/types/loader.d.ts +0 -4
  30. package/types/router/params/param-type.d.ts +2 -1
  31. package/types/router/state/views.d.ts +2 -0
  32. package/types/router/transition/reject-factory.d.ts +1 -0
  33. package/types/router/url/url-rule.d.ts +0 -1
  34. package/types/router/url/url-service.d.ts +7 -7
  35. package/types/services/template-request.d.ts +4 -9
  36. package/types/types.d.ts +6 -1
  37. package/types-back/README.md +0 -2
  38. package/types-back/angular.d.ts +0 -146
  39. package/types-back/index.d.ts +0 -2126
  40. package/types-back/jqlite.d.ts +0 -374
  41. package/types-back/router/core/common/common.d.ts +0 -416
  42. package/types-back/router/core/common/coreservices.d.ts +0 -77
  43. package/types-back/router/core/common/glob.d.ts +0 -60
  44. package/types-back/router/core/common/hof.d.ts +0 -168
  45. package/types-back/router/core/common/index.d.ts +0 -8
  46. package/types-back/router/core/common/predicates.d.ts +0 -25
  47. package/types-back/router/core/common/queue.d.ts +0 -15
  48. package/types-back/router/core/common/safeConsole.d.ts +0 -5
  49. package/types-back/router/core/common/strings.d.ts +0 -66
  50. package/types-back/router/core/common/trace.d.ts +0 -126
  51. package/types-back/router/core/globals.d.ts +0 -43
  52. package/types-back/router/core/hooks/coreResolvables.d.ts +0 -6
  53. package/types-back/router/core/hooks/ignoredTransition.d.ts +0 -4
  54. package/types-back/router/core/hooks/invalidTransition.d.ts +0 -4
  55. package/types-back/router/core/hooks/lazyLoad.d.ts +0 -17
  56. package/types-back/router/core/hooks/onEnterExitRetain.d.ts +0 -10
  57. package/types-back/router/core/hooks/redirectTo.d.ts +0 -4
  58. package/types-back/router/core/hooks/resolve.d.ts +0 -11
  59. package/types-back/router/core/hooks/updateGlobals.d.ts +0 -4
  60. package/types-back/router/core/hooks/url.d.ts +0 -4
  61. package/types-back/router/core/hooks/views.d.ts +0 -7
  62. package/types-back/router/core/index.d.ts +0 -11
  63. package/types-back/router/core/interface.d.ts +0 -91
  64. package/types-back/router/core/params/index.d.ts +0 -12
  65. package/types-back/router/core/params/interface.d.ts +0 -606
  66. package/types-back/router/core/params/param.d.ts +0 -77
  67. package/types-back/router/core/params/paramType.d.ts +0 -65
  68. package/types-back/router/core/params/paramTypes.d.ts +0 -193
  69. package/types-back/router/core/params/stateParams.d.ts +0 -15
  70. package/types-back/router/core/path/index.d.ts +0 -2
  71. package/types-back/router/core/path/pathNode.d.ts +0 -60
  72. package/types-back/router/core/path/pathUtils.d.ts +0 -105
  73. package/types-back/router/core/resolve/index.d.ts +0 -3
  74. package/types-back/router/core/resolve/interface.d.ts +0 -210
  75. package/types-back/router/core/resolve/resolvable.d.ts +0 -75
  76. package/types-back/router/core/resolve/resolveContext.d.ts +0 -97
  77. package/types-back/router/core/router.d.ts +0 -57
  78. package/types-back/router/core/state/index.d.ts +0 -28
  79. package/types-back/router/core/state/interface.d.ts +0 -732
  80. package/types-back/router/core/state/stateBuilder.d.ts +0 -107
  81. package/types-back/router/core/state/stateMatcher.d.ts +0 -13
  82. package/types-back/router/core/state/stateObject.d.ts +0 -170
  83. package/types-back/router/core/state/stateQueueManager.d.ts +0 -27
  84. package/types-back/router/core/state/stateRegistry.d.ts +0 -138
  85. package/types-back/router/core/state/stateService.d.ts +0 -386
  86. package/types-back/router/core/state/targetState.d.ts +0 -105
  87. package/types-back/router/core/transition/hookBuilder.d.ts +0 -49
  88. package/types-back/router/core/transition/hookRegistry.d.ts +0 -115
  89. package/types-back/router/core/transition/index.d.ts +0 -20
  90. package/types-back/router/core/transition/interface.d.ts +0 -862
  91. package/types-back/router/core/transition/rejectFactory.d.ts +0 -103
  92. package/types-back/router/core/transition/transition.d.ts +0 -575
  93. package/types-back/router/core/transition/transitionEventType.d.ts +0 -26
  94. package/types-back/router/core/transition/transitionHook.d.ts +0 -96
  95. package/types-back/router/core/transition/transitionService.d.ts +0 -253
  96. package/types-back/router/core/url/index.d.ts +0 -8
  97. package/types-back/router/core/url/interface.d.ts +0 -169
  98. package/types-back/router/core/url/urlConfig.d.ts +0 -144
  99. package/types-back/router/core/url/urlMatcher.d.ts +0 -185
  100. package/types-back/router/core/url/urlMatcherFactory.d.ts +0 -56
  101. package/types-back/router/core/url/urlRouter.d.ts +0 -101
  102. package/types-back/router/core/url/urlRule.d.ts +0 -143
  103. package/types-back/router/core/url/urlRules.d.ts +0 -251
  104. package/types-back/router/core/url/urlService.d.ts +0 -205
  105. package/types-back/router/core/view/index.d.ts +0 -2
  106. package/types-back/router/core/view/interface.d.ts +0 -46
  107. package/types-back/router/core/view/view.d.ts +0 -176
  108. package/types-back/router/directives/viewDirective.d.ts +0 -144
  109. package/types-back/router/index.d.ts +0 -17
  110. package/types-back/router/interface.d.ts +0 -500
  111. package/types-back/router/legacy/resolveService.d.ts +0 -47
  112. package/types-back/router/legacy/stateEvents.d.ts +0 -124
  113. package/types-back/router/services.d.ts +0 -15
  114. package/types-back/router/stateFilters.d.ts +0 -10
  115. package/types-back/router/stateProvider.d.ts +0 -258
  116. package/types-back/router/statebuilders/onEnterExitRetain.d.ts +0 -13
  117. package/types-back/router/statebuilders/views.d.ts +0 -53
  118. package/types-back/router/templateFactory.d.ts +0 -104
  119. package/types-back/router/viewScroll.d.ts +0 -9
@@ -1,124 +0,0 @@
1
- import { IAngularEvent } from "../..";
2
-
3
- /**
4
- * An event broadcast on `$rootScope` when the state transition **begins**.
5
- *
6
- * ### Deprecation warning: use [[TransitionService.onStart]] instead
7
- *
8
- * You can use `event.preventDefault()`
9
- * to prevent the transition from happening and then the transition promise will be
10
- * rejected with a `'transition prevented'` value.
11
- *
12
- * Additional arguments to the event handler are provided:
13
- * - `toState`: the Transition Target state
14
- * - `toParams`: the Transition Target Params
15
- * - `fromState`: the state the transition is coming from
16
- * - `fromParams`: the parameters from the state the transition is coming from
17
- * - `options`: any Transition Options
18
- * - `$transition$`: the [[Transition]]
19
- *
20
- * #### Example:
21
- * ```js
22
- * $rootScope.$on('$stateChangeStart', function(event, transition) {
23
- * event.preventDefault();
24
- * // transitionTo() promise will be rejected with
25
- * // a 'transition prevented' error
26
- * })
27
- * ```
28
- *
29
- * @event $stateChangeStart
30
- * @deprecated
31
- */
32
- export declare let $stateChangeStart: IAngularEvent;
33
- /**
34
- * An event broadcast on `$rootScope` if a transition is **cancelled**.
35
- *
36
- * ### Deprecation warning: use [[TransitionService.onStart]] instead
37
- *
38
- * Additional arguments to the event handler are provided:
39
- * - `toState`: the Transition Target state
40
- * - `toParams`: the Transition Target Params
41
- * - `fromState`: the state the transition is coming from
42
- * - `fromParams`: the parameters from the state the transition is coming from
43
- * - `options`: any Transition Options
44
- * - `$transition$`: the [[Transition]] that was cancelled
45
- *
46
- * @event $stateChangeCancel
47
- * @deprecated
48
- */
49
- export declare let $stateChangeCancel: IAngularEvent;
50
- /**
51
- * An event broadcast on `$rootScope` once the state transition is **complete**.
52
- *
53
- * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onSuccess]]
54
- *
55
- * Additional arguments to the event handler are provided:
56
- * - `toState`: the Transition Target state
57
- * - `toParams`: the Transition Target Params
58
- * - `fromState`: the state the transition is coming from
59
- * - `fromParams`: the parameters from the state the transition is coming from
60
- * - `options`: any Transition Options
61
- * - `$transition$`: the [[Transition]] that just succeeded
62
- *
63
- * @event $stateChangeSuccess
64
- * @deprecated
65
- */
66
- export declare let $stateChangeSuccess: IAngularEvent;
67
- /**
68
- * An event broadcast on `$rootScope` when an **error occurs** during transition.
69
- *
70
- * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onError]]
71
- *
72
- * It's important to note that if you
73
- * have any errors in your resolve functions (javascript errors, non-existent services, etc)
74
- * they will not throw traditionally. You must listen for this $stateChangeError event to
75
- * catch **ALL** errors.
76
- *
77
- * Additional arguments to the event handler are provided:
78
- * - `toState`: the Transition Target state
79
- * - `toParams`: the Transition Target Params
80
- * - `fromState`: the state the transition is coming from
81
- * - `fromParams`: the parameters from the state the transition is coming from
82
- * - `error`: The reason the transition errored.
83
- * - `options`: any Transition Options
84
- * - `$transition$`: the [[Transition]] that errored
85
- *
86
- * @event $stateChangeError
87
- * @deprecated
88
- */
89
- export declare let $stateChangeError: IAngularEvent;
90
- /**
91
- * An event broadcast on `$rootScope` when a requested state **cannot be found** using the provided state name.
92
- *
93
- * ### Deprecation warning: use [[StateService.onInvalid]] instead
94
- *
95
- * The event is broadcast allowing any handlers a single chance to deal with the error (usually by
96
- * lazy-loading the unfound state). A `TargetState` object is passed to the listener handler,
97
- * you can see its properties in the example. You can use `event.preventDefault()` to abort the
98
- * transition and the promise returned from `transitionTo()` will be rejected with a
99
- * `'transition aborted'` error.
100
- *
101
- * Additional arguments to the event handler are provided:
102
- * - `unfoundState` Unfound State information. Contains: `to, toParams, options` properties.
103
- * - `fromState`: the state the transition is coming from
104
- * - `fromParams`: the parameters from the state the transition is coming from
105
- * - `options`: any Transition Options
106
- *
107
- * #### Example:
108
- * ```js
109
- * // somewhere, assume lazy.state has not been defined
110
- * $state.go("lazy.state", { a: 1, b: 2 }, { inherit: false });
111
- *
112
- * // somewhere else
113
- * $scope.$on('$stateNotFound', function(event, transition) {
114
- * function(event, unfoundState, fromState, fromParams){
115
- * console.log(unfoundState.to); // "lazy.state"
116
- * console.log(unfoundState.toParams); // {a:1, b:2}
117
- * console.log(unfoundState.options); // {inherit:false} + default options
118
- * });
119
- * ```
120
- *
121
- * @event $stateNotFound
122
- * @deprecated
123
- */
124
- export declare let $stateNotFound: IAngularEvent;
@@ -1,15 +0,0 @@
1
- import { IRootScopeService } from "../";
2
- import { ResolveContext, TypedMap } from "./core";
3
- import { StateProvider } from "./stateProvider";
4
- declare module "./core/lib/router" {
5
- interface Router {
6
- /** @hidden */
7
- stateProvider: StateProvider;
8
- }
9
- }
10
- export declare function watchDigests($rootScope: IRootScopeService): void;
11
- export declare namespace watchDigests {
12
- var $inject: string[];
13
- }
14
- /** @hidden TODO: find a place to move this */
15
- export declare const getLocals: (ctx: ResolveContext) => TypedMap<any>;
@@ -1,10 +0,0 @@
1
- import { StateService } from "./core";
2
- declare function $IsStateFilter($state: StateService): any;
3
- declare namespace $IsStateFilter {
4
- var $inject: string[];
5
- }
6
- declare function $IncludedByStateFilter($state: StateService): any;
7
- declare namespace $IncludedByStateFilter {
8
- var $inject: string[];
9
- }
10
- export { $IsStateFilter, $IncludedByStateFilter };
@@ -1,258 +0,0 @@
1
- import {
2
- BuilderFunction,
3
- StateRegistry,
4
- StateService,
5
- OnInvalidCallback,
6
- } from "./core";
7
- import { Ng1StateDeclaration } from "./interface";
8
- /**
9
- * The Angular 1 `StateProvider`
10
- *
11
- * The `$stateProvider` works similar to Angular's v1 router, but it focuses purely
12
- * on state.
13
- *
14
- * A state corresponds to a "place" in the application in terms of the overall NG and
15
- * navigation. A state describes (via the controller / template / view properties) what
16
- * the NG looks like and does at that place.
17
- *
18
- * States often have things in common, and the primary way of factoring out these
19
- * commonalities in this model is via the state hierarchy, i.e. parent/child states aka
20
- * nested states.
21
- *
22
- * The `$stateProvider` provides interfaces to declare these states for your app.
23
- */
24
- export declare class StateProvider {
25
- private stateRegistry;
26
- private stateService;
27
- constructor(stateRegistry: StateRegistry, stateService: StateService);
28
- /**
29
- * Decorates states when they are registered
30
- *
31
- * Allows you to extend (carefully) or override (at your own peril) the
32
- * `stateBuilder` object used internally by [[StateRegistry]].
33
- * This can be used to add custom functionality to ui-router,
34
- * for example inferring templateUrl based on the state name.
35
- *
36
- * When passing only a name, it returns the current (original or decorated) builder
37
- * function that matches `name`.
38
- *
39
- * The builder functions that can be decorated are listed below. Though not all
40
- * necessarily have a good use case for decoration, that is up to you to decide.
41
- *
42
- * In addition, users can attach custom decorators, which will generate new
43
- * properties within the state's internal definition. There is currently no clear
44
- * use-case for this beyond accessing internal states (i.e. $state.$current),
45
- * however, expect this to become increasingly relevant as we introduce additional
46
- * meta-programming features.
47
- *
48
- * **Warning**: Decorators should not be interdependent because the order of
49
- * execution of the builder functions in non-deterministic. Builder functions
50
- * should only be dependent on the state definition object and super function.
51
- *
52
- *
53
- * Existing builder functions and current return values:
54
- *
55
- * - **parent** `{object}` - returns the parent state object.
56
- * - **data** `{object}` - returns state data, including any inherited data that is not
57
- * overridden by own values (if any).
58
- * - **url** `{object}` - returns a {@link ng.router.util.type:UrlMatcher UrlMatcher}
59
- * or `null`.
60
- * - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is
61
- * navigable).
62
- * - **params** `{object}` - returns an array of state params that are ensured to
63
- * be a super-set of parent's params.
64
- * - **views** `{object}` - returns a views object where each key is an absolute view
65
- * name (i.e. "viewName@stateName") and each value is the config object
66
- * (template, controller) for the view. Even when you don't use the views object
67
- * explicitly on a state config, one is still created for you internally.
68
- * So by decorating this builder function you have access to decorating template
69
- * and controller properties.
70
- * - **ownParams** `{object}` - returns an array of params that belong to the state,
71
- * not including any params defined by ancestor states.
72
- * - **path** `{string}` - returns the full path from the root down to this state.
73
- * Needed for state activation.
74
- * - **includes** `{object}` - returns an object that includes every state that
75
- * would pass a `$state.includes()` test.
76
- *
77
- * #### Example:
78
- * Override the internal 'views' builder with a function that takes the state
79
- * definition, and a reference to the internal function being overridden:
80
- * ```js
81
- * $stateProvider.decorator('views', function (state, parent) {
82
- * let result = {},
83
- * views = parent(state);
84
- *
85
- * angular.forEach(views, function (config, name) {
86
- * let autoName = (state.name + '.' + name).replace('.', '/');
87
- * config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html';
88
- * result[name] = config;
89
- * });
90
- * return result;
91
- * });
92
- *
93
- * $stateProvider.state('home', {
94
- * views: {
95
- * 'contact.list': { controller: 'ListController' },
96
- * 'contact.item': { controller: 'ItemController' }
97
- * }
98
- * });
99
- * ```
100
- *
101
- *
102
- * ```js
103
- * // Auto-populates list and item views with /partials/home/contact/list.html,
104
- * // and /partials/home/contact/item.html, respectively.
105
- * $state.go('home');
106
- * ```
107
- *
108
- * @param {string} name The name of the builder function to decorate.
109
- * @param {object} func A function that is responsible for decorating the original
110
- * builder function. The function receives two parameters:
111
- *
112
- * - `{object}` - state - The state config object.
113
- * - `{object}` - super - The original builder function.
114
- *
115
- * @return {object} $stateProvider - $stateProvider instance
116
- */
117
- decorator(name: string, func: BuilderFunction): Function | this;
118
- /**
119
- * Registers a state
120
- *
121
- * ### This is a passthrough to [[StateRegistry.register]].
122
- *
123
- * Registers a state configuration under a given state name.
124
- * The stateConfig object has the following acceptable properties.
125
- *
126
- * <a id='template'></a>
127
- *
128
- * - **`template`** - {string|function=} - html template as a string or a function that returns
129
- * an html template as a string which should be used by the ngView directives. This property
130
- * takes precedence over templateUrl.
131
- *
132
- * If `template` is a function, it will be called with the following parameters:
133
- *
134
- * - {array.&lt;object&gt;} - state parameters extracted from the current $location.path() by
135
- * applying the current state
136
- *
137
- * <a id='templateUrl'></a>
138
- *
139
- * - **`templateUrl`** - {string|function=} - path or function that returns a path to an html
140
- * template that should be used by ngView.
141
- *
142
- * If `templateUrl` is a function, it will be called with the following parameters:
143
- *
144
- * - {array.&lt;object&gt;} - state parameters extracted from the current $location.path() by
145
- * applying the current state
146
- *
147
- * <a id='templateProvider'></a>
148
- *
149
- * - **`templateProvider`** - {function=} - Provider function that returns HTML content
150
- * string.
151
- *
152
- * <a id='controller'></a>
153
- *
154
- * - **`controller`** - {string|function=} - Controller fn that should be associated with newly
155
- * related scope or the name of a registered controller if passed as a string.
156
- *
157
- * <a id='controllerProvider'></a>
158
- *
159
- * - **`controllerProvider`** - {function=} - Injectable provider function that returns
160
- * the actual controller or string.
161
- *
162
- * <a id='controllerAs'></a>
163
- *
164
- * - **`controllerAs`** – {string=} – A controller alias name. If present the controller will be
165
- * published to scope under the controllerAs name.
166
- *
167
- * <a id='resolve'></a>
168
- *
169
- * - **`resolve`** - {object.&lt;string, function&gt;=} - An optional map of dependencies which
170
- * should be injected into the controller. If any of these dependencies are promises,
171
- * the router will wait for them all to be resolved or one to be rejected before the
172
- * controller is instantiated. If all the promises are resolved successfully, the values
173
- * of the resolved promises are injected and $stateChangeSuccess event is fired. If any
174
- * of the promises are rejected the $stateChangeError event is fired. The map object is:
175
- *
176
- * - key - {string}: name of dependency to be injected into controller
177
- * - factory - {string|function}: If string then it is alias for service. Otherwise if function,
178
- * it is injected and return value it treated as dependency. If result is a promise, it is
179
- * resolved before its value is injected into controller.
180
- *
181
- * <a id='url'></a>
182
- *
183
- * - **`url`** - {string=} - A url with optional parameters. When a state is navigated or
184
- * transitioned to, the `$stateParams` service will be populated with any
185
- * parameters that were passed.
186
- *
187
- * <a id='params'></a>
188
- *
189
- * - **`params`** - {object=} - An array of parameter names or regular expressions. Only
190
- * use this within a state if you are not using url. Otherwise you can specify your
191
- * parameters within the url. When a state is navigated or transitioned to, the
192
- * $stateParams service will be populated with any parameters that were passed.
193
- *
194
- * <a id='views'></a>
195
- *
196
- * - **`views`** - {object=} - Use the views property to set up multiple views or to target views
197
- * manually/explicitly.
198
- *
199
- * <a id='abstract'></a>
200
- *
201
- * - **`abstract`** - {boolean=} - An abstract state will never be directly activated,
202
- * but can provide inherited properties to its common children states.
203
- *
204
- * <a id='onEnter'></a>
205
- *
206
- * - **`onEnter`** - {object=} - Callback function for when a state is entered. Good way
207
- * to trigger an action or dispatch an event, such as opening a dialog.
208
- * If minifying your scripts, make sure to use the `['injection1', 'injection2', function(injection1, injection2){}]` syntax.
209
- *
210
- * <a id='onExit'></a>
211
- *
212
- * - **`onExit`** - {object=} - Callback function for when a state is exited. Good way to
213
- * trigger an action or dispatch an event, such as opening a dialog.
214
- * If minifying your scripts, make sure to use the `['injection1', 'injection2', function(injection1, injection2){}]` syntax.
215
- *
216
- * <a id='reloadOnSearch'></a>
217
- *
218
- * - **`reloadOnSearch = true`** - {boolean=} - If `false`, will not retrigger the same state
219
- * just because a search/query parameter has changed (via $location.search() or $location.hash()).
220
- * Useful for when you'd like to modify $location.search() without triggering a reload.
221
- *
222
- * <a id='data'></a>
223
- *
224
- * - **`data`** - {object=} - Arbitrary data object, useful for custom configuration.
225
- *
226
- * #### Example:
227
- * Some state name examples
228
- * ```js
229
- * // stateName can be a single top-level name (must be unique).
230
- * $stateProvider.state("home", {});
231
- *
232
- * // Or it can be a nested state name. This state is a child of the
233
- * // above "home" state.
234
- * $stateProvider.state("home.newest", {});
235
- *
236
- * // Nest states as deeply as needed.
237
- * $stateProvider.state("home.newest.abc.xyz.inception", {});
238
- *
239
- * // state() returns $stateProvider, so you can chain state declarations.
240
- * $stateProvider
241
- * .state("home", {})
242
- * .state("about", {})
243
- * .state("contacts", {});
244
- * ```
245
- *
246
- * @param {string} name A unique state name, e.g. "home", "about", "contacts".
247
- * To create a parent/child state use a dot, e.g. "about.sales", "home.newest".
248
- * @param {object} definition State configuration object.
249
- */
250
- state(name: string, definition: Ng1StateDeclaration): StateProvider;
251
- state(definition: Ng1StateDeclaration): StateProvider;
252
- /**
253
- * Registers an invalid state handler
254
- *
255
- * This is a passthrough to [[StateService.onInvalid]] for ng1.
256
- */
257
- onInvalid(callback: OnInvalidCallback): Function;
258
- }
@@ -1,13 +0,0 @@
1
- import { StateObject, TransitionStateHookFn } from "../core";
2
- /**
3
- * This is a [[StateBuilder.builder]] function for angular1 `onEnter`, `onExit`,
4
- * `onRetain` callback hooks on a [[Ng1StateDeclaration]].
5
- *
6
- * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder
7
- * ensures that those hooks are injectable for @uirouter/angularjs (ng1).
8
- *
9
- * @internalapi
10
- */
11
- export declare const getStateHookBuilder: (
12
- hookName: "onEnter" | "onExit" | "onRetain",
13
- ) => (stateObject: StateObject) => TransitionStateHookFn;
@@ -1,53 +0,0 @@
1
- import {
2
- StateObject,
3
- ViewConfig,
4
- ViewConfigFactory,
5
- PathNode,
6
- ResolveContext,
7
- IInjectable,
8
- } from "../core";
9
- import { Ng1ViewDeclaration } from "../interface";
10
- import { TemplateFactory } from "../templateFactory";
11
- /** @internalapi */
12
- export declare function getNg1ViewConfigFactory(): ViewConfigFactory;
13
- /**
14
- * This is a [[StateBuilder.builder]] function for angular1 `views`.
15
- *
16
- * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder
17
- * handles the `views` property with logic specific to @uirouter/angularjs (ng1).
18
- *
19
- * If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object
20
- * and applies the state-level configuration to a view named `$default`.
21
- *
22
- * @internalapi
23
- */
24
- export declare function ng1ViewsBuilder(state: StateObject): {
25
- [key: string]: Ng1ViewDeclaration;
26
- };
27
- /** @internalapi */
28
- export declare class Ng1ViewConfig implements ViewConfig {
29
- path: PathNode[];
30
- viewDecl: Ng1ViewDeclaration;
31
- factory: TemplateFactory;
32
- $id: number;
33
- loaded: boolean;
34
- controller: Function;
35
- template: string;
36
- component: string;
37
- locals: any;
38
- constructor(
39
- path: PathNode[],
40
- viewDecl: Ng1ViewDeclaration,
41
- factory: TemplateFactory,
42
- );
43
- load(): Promise<this>;
44
- getTemplate: (ngView: any, context: ResolveContext) => string;
45
- /**
46
- * Gets the controller for a view configuration.
47
- *
48
- * @returns {Function|Promise.<Function>} Returns a controller, or a promise that resolves to a controller.
49
- */
50
- getController(
51
- context: ResolveContext,
52
- ): IInjectable | string | Promise<IInjectable | string>;
53
- }
@@ -1,104 +0,0 @@
1
- import { IAugmentedJQuery } from "../";
2
- import { IInjectable, ResolveContext, RawParams } from "./core";
3
- import { Ng1ViewDeclaration, TemplateFactoryProvider } from "./interface";
4
- /**
5
- * Service which manages loading of templates from a ViewConfig.
6
- */
7
- export declare class TemplateFactory implements TemplateFactoryProvider {
8
- /** @hidden */ private _useHttp;
9
- /** @hidden */ private $templateRequest;
10
- /** @hidden */ private $templateCache;
11
- /** @hidden */ private $http;
12
- /** @hidden */ $get: (
13
- | string
14
- | (($http: any, $templateCache: any, $injector: any) => this)
15
- )[];
16
- /** @hidden */
17
- useHttpService(value: boolean): void;
18
- /**
19
- * Creates a template from a configuration object.
20
- *
21
- * @param config Configuration object for which to load a template.
22
- * The following properties are search in the specified order, and the first one
23
- * that is defined is used to create the template:
24
- *
25
- * @param params Parameters to pass to the template function.
26
- * @param context The resolve context associated with the template's view
27
- *
28
- * @return {string|object} The template html as a string, or a promise for
29
- * that string,or `null` if no template is configured.
30
- */
31
- fromConfig(
32
- config: Ng1ViewDeclaration,
33
- params: any,
34
- context: ResolveContext,
35
- ): Promise<{
36
- template?: string;
37
- component?: string;
38
- }>;
39
- /**
40
- * Creates a template from a string or a function returning a string.
41
- *
42
- * @param template html template as a string or function that returns an html template as a string.
43
- * @param params Parameters to pass to the template function.
44
- *
45
- * @return {string|object} The template html as a string, or a promise for that
46
- * string.
47
- */
48
- fromString(template: string | Function, params?: RawParams): any;
49
- /**
50
- * Loads a template from the a URL via `$http` and `$templateCache`.
51
- *
52
- * @param {string|Function} url url of the template to load, or a function
53
- * that returns a url.
54
- * @param {Object} params Parameters to pass to the url function.
55
- * @return {string|Promise.<string>} The template html as a string, or a promise
56
- * for that string.
57
- */
58
- fromUrl(url: string | Function, params: any): any;
59
- /**
60
- * Creates a template by invoking an injectable provider function.
61
- *
62
- * @param provider Function to invoke via `locals`
63
- * @param {Function} injectFn a function used to invoke the template provider
64
- * @return {string|Promise.<string>} The template html as a string, or a promise
65
- * for that string.
66
- */
67
- fromProvider(
68
- provider: IInjectable,
69
- params: any,
70
- context: ResolveContext,
71
- ): Promise<any>;
72
- /**
73
- * Creates a component's template by invoking an injectable provider function.
74
- *
75
- * @param provider Function to invoke via `locals`
76
- * @param {Function} injectFn a function used to invoke the template provider
77
- * @return {string} The template html as a string: "<component-name input1='::$resolve.foo'></component-name>".
78
- */
79
- fromComponentProvider(
80
- provider: IInjectable,
81
- params: any,
82
- context: ResolveContext,
83
- ): Promise<any>;
84
- /**
85
- * Creates a template from a component's name
86
- *
87
- * This implements route-to-component.
88
- * It works by retrieving the component (directive) metadata from the injector.
89
- * It analyses the component's bindings, then constructs a template that instantiates the component.
90
- * The template wires input and output bindings to resolves or from the parent component.
91
- *
92
- * @param ngView {object} The parent ui-view (for binding outputs to callbacks)
93
- * @param context The ResolveContext (for binding outputs to callbacks returned from resolves)
94
- * @param component {string} Component's name in camel case.
95
- * @param bindings An object defining the component's bindings: {foo: '<'}
96
- * @return {string} The template as a string: "<component-name input1='::$resolve.foo'></component-name>".
97
- */
98
- makeComponentTemplate(
99
- ngView: IAugmentedJQuery,
100
- context: ResolveContext,
101
- component: string,
102
- bindings?: any,
103
- ): string;
104
- }
@@ -1,9 +0,0 @@
1
- export interface NGViewScrollProvider {
2
- /**
3
- * Uses standard anchorScroll behavior
4
- *
5
- * Reverts [[$ngViewScroll]] back to using the core [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll)
6
- * service for scrolling based on the url anchor.
7
- */
8
- useAnchorScroll(): void;
9
- }