@angular-wave/angular.ts 0.9.1 → 0.9.2
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/@types/angular.d.ts +150 -0
- package/@types/animations/animate-cache.d.ts +50 -0
- package/@types/animations/animate-children-directive.d.ts +10 -0
- package/@types/animations/animate-css-driver.d.ts +18 -0
- package/@types/animations/animate-css.d.ts +18 -0
- package/@types/animations/animate-js-driver.d.ts +14 -0
- package/@types/animations/animate-js.d.ts +23 -0
- package/@types/animations/animate-queue.d.ts +28 -0
- package/@types/animations/animate-runner.d.ts +31 -0
- package/@types/animations/animate-swap.d.ts +9 -0
- package/@types/animations/animate.d.ts +450 -0
- package/@types/animations/animation.d.ts +14 -0
- package/@types/animations/interface.d.ts +17 -0
- package/@types/animations/raf-scheduler.d.ts +37 -0
- package/@types/animations/shared.d.ts +74 -0
- package/@types/core/compile/compile.d.ts +201 -0
- package/@types/core/controller/controller.d.ts +54 -0
- package/@types/core/di/injector.d.ts +22 -0
- package/@types/core/filter/filter.d.ts +23 -0
- package/@types/core/interpolate/interpolate.d.ts +38 -0
- package/@types/core/parse/ast/ast-node.d.ts +56 -0
- package/@types/core/parse/ast/ast.d.ts +164 -0
- package/@types/core/parse/lexer/lexer.d.ts +119 -0
- package/@types/core/parse/lexer/token.d.ts +17 -0
- package/@types/core/parse/parse.d.ts +33 -0
- package/@types/core/parse/parser/parser.d.ts +41 -0
- package/@types/core/sanitize/sanitize-uri.d.ts +40 -0
- package/@types/directive/aria/aria.d.ts +104 -0
- package/@types/directive/attrs/attrs.d.ts +8 -0
- package/@types/directive/bind/bind.d.ts +18 -0
- package/@types/directive/channel/channel.d.ts +10 -0
- package/@types/directive/class/class.d.ts +3 -0
- package/@types/directive/cloak/cloak.d.ts +4 -0
- package/@types/directive/controller/controller.d.ts +4 -0
- package/@types/directive/events/events.d.ts +21 -0
- package/@types/directive/form/form.d.ts +264 -0
- package/@types/directive/http/http.d.ts +46 -0
- package/@types/directive/if/if.d.ts +10 -0
- package/@types/directive/include/include.d.ts +28 -0
- package/@types/directive/init/init.d.ts +4 -0
- package/@types/directive/input/input.d.ts +70 -0
- package/@types/directive/messages/messages.d.ts +63 -0
- package/@types/directive/model/model.d.ts +515 -0
- package/@types/directive/model-options/model-options.d.ts +56 -0
- package/@types/directive/non-bindable/non-bindable.d.ts +4 -0
- package/@types/directive/observe/observe.d.ts +9 -0
- package/@types/directive/options/options.d.ts +13 -0
- package/@types/directive/ref/ref.d.ts +11 -0
- package/@types/directive/repeat/repeat.d.ts +11 -0
- package/@types/directive/script/script.d.ts +10 -0
- package/@types/directive/select/select.d.ts +15 -0
- package/@types/directive/setter/setter.d.ts +12 -0
- package/@types/directive/show-hide/show-hide.d.ts +19 -0
- package/@types/directive/style/style.d.ts +4 -0
- package/@types/directive/switch/switch.d.ts +18 -0
- package/@types/directive/transclude/transclude.d.ts +10 -0
- package/@types/directive/validators/validators.d.ts +149 -0
- package/@types/filters/filter.d.ts +4 -0
- package/@types/filters/filters.d.ts +38 -0
- package/@types/filters/limit-to.d.ts +4 -0
- package/@types/filters/order-by.d.ts +7 -0
- package/@types/index.d.ts +2 -0
- package/@types/interface.d.ts +1 -0
- package/@types/ng.d.ts +8 -0
- package/@types/router/common/trace.d.ts +66 -0
- package/@types/router/directives/state-directives.d.ts +46 -0
- package/@types/router/directives/view-directive.d.ts +138 -0
- package/@types/router/glob/glob.d.ts +81 -0
- package/@types/router/hooks/core-resolvables.d.ts +2 -0
- package/@types/router/hooks/ignored-transition.d.ts +1 -0
- package/@types/router/hooks/invalid-transition.d.ts +1 -0
- package/@types/router/hooks/lazy-load.d.ts +42 -0
- package/@types/router/hooks/on-enter-exit-retain.d.ts +3 -0
- package/@types/router/hooks/redirect-to.d.ts +4 -0
- package/@types/router/hooks/resolve.d.ts +4 -0
- package/@types/router/hooks/update-globals.d.ts +1 -0
- package/@types/router/hooks/url.d.ts +5 -0
- package/@types/router/hooks/views.d.ts +5 -0
- package/@types/router/params/interface.d.ts +606 -0
- package/@types/router/params/param-factory.d.ts +16 -0
- package/@types/router/params/param-type.d.ts +59 -0
- package/@types/router/params/param.d.ts +71 -0
- package/@types/router/params/state-params.d.ts +12 -0
- package/@types/router/path/path-node.d.ts +38 -0
- package/@types/router/path/path-utils.d.ts +88 -0
- package/@types/router/resolve/interface.d.ts +200 -0
- package/@types/router/resolve/resolvable.d.ts +50 -0
- package/@types/router/resolve/resolve-context.d.ts +93 -0
- package/@types/router/router.d.ts +47 -0
- package/@types/router/state/interface.d.ts +983 -0
- package/@types/router/state/state-builder.d.ts +95 -0
- package/@types/router/state/state-matcher.d.ts +7 -0
- package/@types/router/state/state-object.d.ts +83 -0
- package/@types/router/state/state-queue-manager.d.ts +29 -0
- package/@types/router/state/state-registry.d.ts +133 -0
- package/@types/router/state/state-service.d.ts +425 -0
- package/@types/router/state/target-state.d.ts +102 -0
- package/@types/router/state/views.d.ts +58 -0
- package/@types/router/state-filters.d.ts +39 -0
- package/@types/router/template-factory.d.ts +117 -0
- package/@types/router/transition/hook-builder.d.ts +45 -0
- package/@types/router/transition/hook-registry.d.ts +102 -0
- package/@types/router/transition/interface.d.ts +880 -0
- package/@types/router/transition/reject-factory.d.ts +43 -0
- package/@types/router/transition/transition-event-type.d.ts +24 -0
- package/@types/router/transition/transition-hook.d.ts +86 -0
- package/@types/router/transition/transition-service.d.ts +116 -0
- package/@types/router/transition/transition.d.ts +331 -0
- package/@types/router/url/url-config.d.ts +99 -0
- package/@types/router/url/url-matcher.d.ts +174 -0
- package/@types/router/url/url-rule.d.ts +161 -0
- package/@types/router/url/url-rules.d.ts +249 -0
- package/@types/router/url/url-service.d.ts +254 -0
- package/@types/router/view/interface.d.ts +44 -0
- package/@types/router/view/view.d.ts +149 -0
- package/@types/router/view-scroll.d.ts +10 -0
- package/@types/services/anchor-scroll.d.ts +25 -0
- package/@types/services/cookie-reader.d.ts +4 -0
- package/@types/services/http/http.d.ts +134 -0
- package/@types/services/http-backend/http-backend.d.ts +58 -0
- package/@types/services/sce/sce.d.ts +238 -0
- package/@types/services/template-request.d.ts +55 -0
- package/@types/shared/common.d.ts +197 -0
- package/@types/shared/hof.d.ts +108 -0
- package/@types/shared/predicates.d.ts +17 -0
- package/@types/shared/queue.d.ts +64 -0
- package/@types/shared/strings.d.ts +58 -0
- package/dist/angular-ts.esm.js +2 -2
- package/dist/angular-ts.umd.js +2 -2
- package/dist/angular-ts.umd.min.js +1 -1
- package/docs/layouts/shortcodes/version.html +1 -1
- package/package.json +1 -1
- package/src/interface.ts +1 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
export function $ViewDirectiveFill(
|
|
2
|
+
$compile: any,
|
|
3
|
+
$controller: any,
|
|
4
|
+
$transitions: any,
|
|
5
|
+
): {
|
|
6
|
+
priority: number;
|
|
7
|
+
compile: (tElement: any) => (scope: any, $element: any) => void;
|
|
8
|
+
};
|
|
9
|
+
export namespace $ViewDirectiveFill {
|
|
10
|
+
let $inject: string[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* `ng-view`: A viewport directive which is filled in by a view from the active state.
|
|
14
|
+
*
|
|
15
|
+
* ### Attributes
|
|
16
|
+
*
|
|
17
|
+
* - `name`: (Optional) A view name.
|
|
18
|
+
* The name should be unique amongst the other views in the same state.
|
|
19
|
+
* You can have views of the same name that live in different states.
|
|
20
|
+
* The ng-view can be targeted in a View using the name ([[StateDeclaration.views]]).
|
|
21
|
+
*
|
|
22
|
+
* - `autoscroll`: an expression. When it evaluates to true, the `ng-view` will be scrolled into view when it is activated.
|
|
23
|
+
* Uses [[$viewScroll]] to do the scrolling.
|
|
24
|
+
*
|
|
25
|
+
* - `onload`: Expression to evaluate whenever the view updates.
|
|
26
|
+
*
|
|
27
|
+
* #### Example:
|
|
28
|
+
* A view can be unnamed or named.
|
|
29
|
+
* ```html
|
|
30
|
+
* <!-- Unnamed -->
|
|
31
|
+
* <div ng-view></div>
|
|
32
|
+
*
|
|
33
|
+
* <!-- Named -->
|
|
34
|
+
* <div ng-view="viewName"></div>
|
|
35
|
+
*
|
|
36
|
+
* <!-- Named (different style) -->
|
|
37
|
+
* <ng-view name="viewName"></ng-view>
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* You can only have one unnamed view within any template (or root html). If you are only using a
|
|
41
|
+
* single view and it is unnamed then you can populate it like so:
|
|
42
|
+
*
|
|
43
|
+
* ```html
|
|
44
|
+
* <div ng-view></div>
|
|
45
|
+
* $stateProvider.state("home", {
|
|
46
|
+
* template: "<h1>HELLO!</h1>"
|
|
47
|
+
* })
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* The above is a convenient shortcut equivalent to specifying your view explicitly with the
|
|
51
|
+
* [[StateDeclaration.views]] config property, by name, in this case an empty name:
|
|
52
|
+
*
|
|
53
|
+
* ```js
|
|
54
|
+
* $stateProvider.state("home", {
|
|
55
|
+
* views: {
|
|
56
|
+
* "": {
|
|
57
|
+
* template: "<h1>HELLO!</h1>"
|
|
58
|
+
* }
|
|
59
|
+
* }
|
|
60
|
+
* })
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* But typically you'll only use the views property if you name your view or have more than one view
|
|
64
|
+
* in the same template. There's not really a compelling reason to name a view if its the only one,
|
|
65
|
+
* but you could if you wanted, like so:
|
|
66
|
+
*
|
|
67
|
+
* ```html
|
|
68
|
+
* <div ng-view="main"></div>
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* ```js
|
|
72
|
+
* $stateProvider.state("home", {
|
|
73
|
+
* views: {
|
|
74
|
+
* "main": {
|
|
75
|
+
* template: "<h1>HELLO!</h1>"
|
|
76
|
+
* }
|
|
77
|
+
* }
|
|
78
|
+
* })
|
|
79
|
+
* ```
|
|
80
|
+
*
|
|
81
|
+
* Really though, you'll use views to set up multiple views:
|
|
82
|
+
*
|
|
83
|
+
* ```html
|
|
84
|
+
* <div ng-view></div>
|
|
85
|
+
* <div ng-view="chart"></div>
|
|
86
|
+
* <div ng-view="data"></div>
|
|
87
|
+
* ```
|
|
88
|
+
*
|
|
89
|
+
* ```js
|
|
90
|
+
* $stateProvider.state("home", {
|
|
91
|
+
* views: {
|
|
92
|
+
* "": {
|
|
93
|
+
* template: "<h1>HELLO!</h1>"
|
|
94
|
+
* },
|
|
95
|
+
* "chart": {
|
|
96
|
+
* template: "<chart_thing/>"
|
|
97
|
+
* },
|
|
98
|
+
* "data": {
|
|
99
|
+
* template: "<data_thing/>"
|
|
100
|
+
* }
|
|
101
|
+
* }
|
|
102
|
+
* })
|
|
103
|
+
* ```
|
|
104
|
+
*
|
|
105
|
+
* #### Examples for `autoscroll`:
|
|
106
|
+
* ```html
|
|
107
|
+
* <!-- If autoscroll present with no expression,
|
|
108
|
+
* then scroll ng-view into view -->
|
|
109
|
+
* <ng-view autoscroll/>
|
|
110
|
+
*
|
|
111
|
+
* <!-- If autoscroll present with valid expression,
|
|
112
|
+
* then scroll ng-view into view if expression evaluates to true -->
|
|
113
|
+
* <ng-view autoscroll='true'/>
|
|
114
|
+
* <ng-view autoscroll='false'/>
|
|
115
|
+
* <ng-view autoscroll='scopeVariable'/>
|
|
116
|
+
* ```
|
|
117
|
+
*
|
|
118
|
+
* Resolve data:
|
|
119
|
+
*
|
|
120
|
+
* The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this
|
|
121
|
+
* can be customized using [[ViewDeclaration.resolveAs]]). This can be then accessed from the template.
|
|
122
|
+
*
|
|
123
|
+
* Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the
|
|
124
|
+
* controller is instantiated. The `$onInit()` hook can be used to perform initialization code which
|
|
125
|
+
* depends on `$resolve` data.
|
|
126
|
+
*
|
|
127
|
+
* #### Example:
|
|
128
|
+
* ```js
|
|
129
|
+
* $stateProvider.state('home', {
|
|
130
|
+
* template: '<my-component user="$resolve.user"></my-component>',
|
|
131
|
+
* resolve: {
|
|
132
|
+
* user: function(UserService) { return UserService.fetchUser(); }
|
|
133
|
+
* }
|
|
134
|
+
* });
|
|
135
|
+
* ```
|
|
136
|
+
*/
|
|
137
|
+
/** @type {import("../../interface.js").AnnotatedDirectiveFactory} */
|
|
138
|
+
export let ngView: import("../../interface.js").AnnotatedDirectiveFactory;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/** Returns true if the string has glob-like characters in it
|
|
2
|
+
* @param {string} text
|
|
3
|
+
* @returns {boolean}
|
|
4
|
+
*/
|
|
5
|
+
export function hasGlobs(text: string): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Matches state names using glob-like pattern strings.
|
|
8
|
+
*
|
|
9
|
+
* Globs can be used in specific APIs including:
|
|
10
|
+
*
|
|
11
|
+
* - [[StateService.is]]
|
|
12
|
+
* - [[StateService.includes]]
|
|
13
|
+
* - The first argument to Hook Registration functions like [[TransitionService.onStart]]
|
|
14
|
+
* - [[HookMatchCriteria]] and [[HookMatchCriterion]]
|
|
15
|
+
*
|
|
16
|
+
* A `Glob` string is a pattern which matches state names.
|
|
17
|
+
* Nested state names are split into segments (separated by a dot) when processing.
|
|
18
|
+
* The state named `foo.bar.baz` is split into three segments ['foo', 'bar', 'baz']
|
|
19
|
+
*
|
|
20
|
+
* Globs work according to the following rules:
|
|
21
|
+
*
|
|
22
|
+
* ### Exact match:
|
|
23
|
+
*
|
|
24
|
+
* The glob `'A.B'` matches the state named exactly `'A.B'`.
|
|
25
|
+
*
|
|
26
|
+
* | Glob |Matches states named|Does not match state named|
|
|
27
|
+
* |:------------|:--------------------|:---------------------|
|
|
28
|
+
* | `'A'` | `'A'` | `'B'` , `'A.C'` |
|
|
29
|
+
* | `'A.B'` | `'A.B'` | `'A'` , `'A.B.C'` |
|
|
30
|
+
* | `'foo'` | `'foo'` | `'FOO'` , `'foo.bar'`|
|
|
31
|
+
*
|
|
32
|
+
* ### Single star (`*`)
|
|
33
|
+
*
|
|
34
|
+
* A single star (`*`) is a wildcard that matches exactly one segment.
|
|
35
|
+
*
|
|
36
|
+
* | Glob |Matches states named |Does not match state named |
|
|
37
|
+
* |:------------|:---------------------|:--------------------------|
|
|
38
|
+
* | `'*'` | `'A'` , `'Z'` | `'A.B'` , `'Z.Y.X'` |
|
|
39
|
+
* | `'A.*'` | `'A.B'` , `'A.C'` | `'A'` , `'A.B.C'` |
|
|
40
|
+
* | `'A.*.*'` | `'A.B.C'` , `'A.X.Y'`| `'A'`, `'A.B'` , `'Z.Y.X'`|
|
|
41
|
+
*
|
|
42
|
+
* ### Double star (`**`)
|
|
43
|
+
*
|
|
44
|
+
* A double star (`'**'`) is a wildcard that matches *zero or more segments*
|
|
45
|
+
*
|
|
46
|
+
* | Glob |Matches states named |Does not match state named |
|
|
47
|
+
* |:------------|:----------------------------------------------|:----------------------------------|
|
|
48
|
+
* | `'**'` | `'A'` , `'A.B'`, `'Z.Y.X'` | (matches all states) |
|
|
49
|
+
* | `'A.**'` | `'A'` , `'A.B'` , `'A.C.X'` | `'Z.Y.X'` |
|
|
50
|
+
* | `'**.X'` | `'X'` , `'A.X'` , `'Z.Y.X'` | `'A'` , `'A.login.Z'` |
|
|
51
|
+
* | `'A.**.X'` | `'A.X'` , `'A.B.X'` , `'A.B.C.X'` | `'A'` , `'A.B.C'` |
|
|
52
|
+
*
|
|
53
|
+
*/
|
|
54
|
+
export class Glob {
|
|
55
|
+
/** Returns a glob from the string, or null if the string isn't Glob-like
|
|
56
|
+
* @param {string} text
|
|
57
|
+
* @returns {?Glob}
|
|
58
|
+
*/
|
|
59
|
+
static fromString(text: string): Glob | null;
|
|
60
|
+
/**
|
|
61
|
+
* @param {string} text
|
|
62
|
+
*/
|
|
63
|
+
constructor(text: string);
|
|
64
|
+
/**
|
|
65
|
+
* @type {string}
|
|
66
|
+
*/
|
|
67
|
+
text: string;
|
|
68
|
+
/**
|
|
69
|
+
* @type {string[]}
|
|
70
|
+
*/
|
|
71
|
+
glob: string[];
|
|
72
|
+
/**
|
|
73
|
+
* @type {RegExp}
|
|
74
|
+
*/
|
|
75
|
+
regexp: RegExp;
|
|
76
|
+
/**
|
|
77
|
+
* @param {string} name
|
|
78
|
+
* @return {boolean}
|
|
79
|
+
*/
|
|
80
|
+
matches(name: string): boolean;
|
|
81
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function registerIgnoredTransitionHook(transitionService: any): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function registerInvalidTransitionHook(transitionService: any): any;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A [[TransitionHookFn]] that performs lazy loading
|
|
3
|
+
*
|
|
4
|
+
* When entering a state "abc" which has a `lazyLoad` function defined:
|
|
5
|
+
* - Invoke the `lazyLoad` function (unless it is already in process)
|
|
6
|
+
* - Flag the hook function as "in process"
|
|
7
|
+
* - The function should return a promise (that resolves when lazy loading is complete)
|
|
8
|
+
* - Wait for the promise to settle
|
|
9
|
+
* - If the promise resolves to a [[LazyLoadResult]], then register those states
|
|
10
|
+
* - Flag the hook function as "not in process"
|
|
11
|
+
* - If the hook was successful
|
|
12
|
+
* - Remove the `lazyLoad` function from the state declaration
|
|
13
|
+
* - If all the hooks were successful
|
|
14
|
+
* - Retry the transition (by returning a TargetState)
|
|
15
|
+
*
|
|
16
|
+
* ```
|
|
17
|
+
* .state('abc', {
|
|
18
|
+
* component: 'fooComponent',
|
|
19
|
+
* lazyLoad: () => import('./fooComponent')
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* See [[StateDeclaration.lazyLoad]]
|
|
24
|
+
*/
|
|
25
|
+
export function registerLazyLoadHook(
|
|
26
|
+
transitionService: any,
|
|
27
|
+
stateService: any,
|
|
28
|
+
urlService: any,
|
|
29
|
+
stateRegistry: any,
|
|
30
|
+
): any;
|
|
31
|
+
/**
|
|
32
|
+
* Invokes a state's lazy load function
|
|
33
|
+
*
|
|
34
|
+
* @param transition a Transition context
|
|
35
|
+
* @param state the state to lazy load
|
|
36
|
+
* @returns A promise for the lazy load result
|
|
37
|
+
*/
|
|
38
|
+
export function lazyLoadState(
|
|
39
|
+
transition: any,
|
|
40
|
+
state: any,
|
|
41
|
+
stateRegistry: any,
|
|
42
|
+
): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function registerUpdateGlobalState(transitionService: any): any;
|