@angular-wave/angular.ts 0.0.60 → 0.0.62

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 (128) 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 +2 -1
  5. package/src/angular.spec.js +2 -2
  6. package/src/core/parser/parse.js +14 -0
  7. package/src/core/parser/parse.spec.js +7 -5
  8. package/src/core/parser/parser.js +1 -1
  9. package/src/core/q/q.js +46 -289
  10. package/src/core/q/q.md +229 -0
  11. package/src/core/sanitize/sanitize-uri.js +2 -3
  12. package/src/core/scope/scope.js +18 -8
  13. package/src/directive/if/if.js +6 -1
  14. package/src/filters/limit-to.js +5 -2
  15. package/src/filters/order-by.js +1 -2
  16. package/src/index.js +1 -1
  17. package/src/loader.js +1 -55
  18. package/src/router/params/param-type.js +2 -1
  19. package/src/router/state/views.js +3 -0
  20. package/src/router/state-provider.js +1 -1
  21. package/src/router/transition/reject-factory.js +1 -0
  22. package/src/router/url/url-rule.js +1 -1
  23. package/src/router/url/url-service.js +4 -4
  24. package/src/router/url/url-service.spec.js +4 -3
  25. package/src/services/http/http.js +7 -5
  26. package/src/services/template-request.js +2 -7
  27. package/src/shared/common.js +1 -1
  28. package/src/shared/utils.js +2 -11
  29. package/src/types.js +9 -1
  30. package/types/core/parser/parse.d.ts +3 -4
  31. package/types/core/parser/parser.d.ts +1 -1
  32. package/types/core/q/q.d.ts +2 -2
  33. package/types/core/sanitize/sanitize-uri.d.ts +4 -5
  34. package/types/core/scope/scope.d.ts +19 -7
  35. package/types/index.d.ts +5 -1
  36. package/types/loader.d.ts +0 -52
  37. package/types/router/params/param-type.d.ts +2 -1
  38. package/types/router/state/views.d.ts +2 -0
  39. package/types/router/state-provider.d.ts +1 -1
  40. package/types/router/transition/reject-factory.d.ts +1 -0
  41. package/types/router/url/url-rule.d.ts +0 -1
  42. package/types/router/url/url-service.d.ts +7 -7
  43. package/types/services/template-request.d.ts +4 -9
  44. package/types/shared/utils.d.ts +1 -7
  45. package/types/types.d.ts +6 -1
  46. package/types-back/README.md +0 -2
  47. package/types-back/angular.d.ts +0 -146
  48. package/types-back/index.d.ts +0 -2126
  49. package/types-back/jqlite.d.ts +0 -374
  50. package/types-back/router/core/common/common.d.ts +0 -416
  51. package/types-back/router/core/common/coreservices.d.ts +0 -77
  52. package/types-back/router/core/common/glob.d.ts +0 -60
  53. package/types-back/router/core/common/hof.d.ts +0 -168
  54. package/types-back/router/core/common/index.d.ts +0 -8
  55. package/types-back/router/core/common/predicates.d.ts +0 -25
  56. package/types-back/router/core/common/queue.d.ts +0 -15
  57. package/types-back/router/core/common/safeConsole.d.ts +0 -5
  58. package/types-back/router/core/common/strings.d.ts +0 -66
  59. package/types-back/router/core/common/trace.d.ts +0 -126
  60. package/types-back/router/core/globals.d.ts +0 -43
  61. package/types-back/router/core/hooks/coreResolvables.d.ts +0 -6
  62. package/types-back/router/core/hooks/ignoredTransition.d.ts +0 -4
  63. package/types-back/router/core/hooks/invalidTransition.d.ts +0 -4
  64. package/types-back/router/core/hooks/lazyLoad.d.ts +0 -17
  65. package/types-back/router/core/hooks/onEnterExitRetain.d.ts +0 -10
  66. package/types-back/router/core/hooks/redirectTo.d.ts +0 -4
  67. package/types-back/router/core/hooks/resolve.d.ts +0 -11
  68. package/types-back/router/core/hooks/updateGlobals.d.ts +0 -4
  69. package/types-back/router/core/hooks/url.d.ts +0 -4
  70. package/types-back/router/core/hooks/views.d.ts +0 -7
  71. package/types-back/router/core/index.d.ts +0 -11
  72. package/types-back/router/core/interface.d.ts +0 -91
  73. package/types-back/router/core/params/index.d.ts +0 -12
  74. package/types-back/router/core/params/interface.d.ts +0 -606
  75. package/types-back/router/core/params/param.d.ts +0 -77
  76. package/types-back/router/core/params/paramType.d.ts +0 -65
  77. package/types-back/router/core/params/paramTypes.d.ts +0 -193
  78. package/types-back/router/core/params/stateParams.d.ts +0 -15
  79. package/types-back/router/core/path/index.d.ts +0 -2
  80. package/types-back/router/core/path/pathNode.d.ts +0 -60
  81. package/types-back/router/core/path/pathUtils.d.ts +0 -105
  82. package/types-back/router/core/resolve/index.d.ts +0 -3
  83. package/types-back/router/core/resolve/interface.d.ts +0 -210
  84. package/types-back/router/core/resolve/resolvable.d.ts +0 -75
  85. package/types-back/router/core/resolve/resolveContext.d.ts +0 -97
  86. package/types-back/router/core/router.d.ts +0 -57
  87. package/types-back/router/core/state/index.d.ts +0 -28
  88. package/types-back/router/core/state/interface.d.ts +0 -732
  89. package/types-back/router/core/state/stateBuilder.d.ts +0 -107
  90. package/types-back/router/core/state/stateMatcher.d.ts +0 -13
  91. package/types-back/router/core/state/stateObject.d.ts +0 -170
  92. package/types-back/router/core/state/stateQueueManager.d.ts +0 -27
  93. package/types-back/router/core/state/stateRegistry.d.ts +0 -138
  94. package/types-back/router/core/state/stateService.d.ts +0 -386
  95. package/types-back/router/core/state/targetState.d.ts +0 -105
  96. package/types-back/router/core/transition/hookBuilder.d.ts +0 -49
  97. package/types-back/router/core/transition/hookRegistry.d.ts +0 -115
  98. package/types-back/router/core/transition/index.d.ts +0 -20
  99. package/types-back/router/core/transition/interface.d.ts +0 -862
  100. package/types-back/router/core/transition/rejectFactory.d.ts +0 -103
  101. package/types-back/router/core/transition/transition.d.ts +0 -575
  102. package/types-back/router/core/transition/transitionEventType.d.ts +0 -26
  103. package/types-back/router/core/transition/transitionHook.d.ts +0 -96
  104. package/types-back/router/core/transition/transitionService.d.ts +0 -253
  105. package/types-back/router/core/url/index.d.ts +0 -8
  106. package/types-back/router/core/url/interface.d.ts +0 -169
  107. package/types-back/router/core/url/urlConfig.d.ts +0 -144
  108. package/types-back/router/core/url/urlMatcher.d.ts +0 -185
  109. package/types-back/router/core/url/urlMatcherFactory.d.ts +0 -56
  110. package/types-back/router/core/url/urlRouter.d.ts +0 -101
  111. package/types-back/router/core/url/urlRule.d.ts +0 -143
  112. package/types-back/router/core/url/urlRules.d.ts +0 -251
  113. package/types-back/router/core/url/urlService.d.ts +0 -205
  114. package/types-back/router/core/view/index.d.ts +0 -2
  115. package/types-back/router/core/view/interface.d.ts +0 -46
  116. package/types-back/router/core/view/view.d.ts +0 -176
  117. package/types-back/router/directives/viewDirective.d.ts +0 -144
  118. package/types-back/router/index.d.ts +0 -17
  119. package/types-back/router/interface.d.ts +0 -500
  120. package/types-back/router/legacy/resolveService.d.ts +0 -47
  121. package/types-back/router/legacy/stateEvents.d.ts +0 -124
  122. package/types-back/router/services.d.ts +0 -15
  123. package/types-back/router/stateFilters.d.ts +0 -10
  124. package/types-back/router/stateProvider.d.ts +0 -258
  125. package/types-back/router/statebuilders/onEnterExitRetain.d.ts +0 -13
  126. package/types-back/router/statebuilders/views.d.ts +0 -53
  127. package/types-back/router/templateFactory.d.ts +0 -104
  128. package/types-back/router/viewScroll.d.ts +0 -9
@@ -1,75 +0,0 @@
1
- import { ResolvePolicy, ResolvableLiteral } from "./interface";
2
- import { ResolveContext } from "./resolveContext";
3
- import { Transition } from "../transition/transition";
4
- import { StateObject } from "../state/stateObject";
5
- export declare let defaultResolvePolicy: ResolvePolicy;
6
- /**
7
- * The basic building block for the resolve system.
8
- *
9
- * Resolvables encapsulate a state's resolve's resolveFn, the resolveFn's declared dependencies, the wrapped (.promise),
10
- * and the unwrapped-when-complete (.data) result of the resolveFn.
11
- *
12
- * Resolvable.get() either retrieves the Resolvable's existing promise, or else invokes resolve() (which invokes the
13
- * resolveFn) and returns the resulting promise.
14
- *
15
- * Resolvable.get() and Resolvable.resolve() both execute within a context path, which is passed as the first
16
- * parameter to those fns.
17
- */
18
- export declare class Resolvable implements ResolvableLiteral {
19
- token: any;
20
- policy: ResolvePolicy;
21
- resolveFn: Function;
22
- deps: any[];
23
- data: any;
24
- resolved: boolean;
25
- promise: Promise<any>;
26
- static fromData: (token: any, data: any) => Resolvable;
27
- /** This constructor creates a Resolvable copy */
28
- constructor(resolvable: Resolvable);
29
- /** This constructor creates a new Resolvable from the plain old [[ResolvableLiteral]] javascript object */
30
- constructor(resolvable: ResolvableLiteral);
31
- /**
32
- * This constructor creates a new `Resolvable`
33
- *
34
- * #### Example:
35
- * ```js
36
- * var resolvable1 = new Resolvable('mytoken', http => http.get('foo.json').toPromise(), [Http]);
37
- *
38
- * var resolvable2 = new Resolvable(UserService, dep => new UserService(dep.data), [SomeDependency]);
39
- *
40
- * var resolvable1Clone = new Resolvable(resolvable1);
41
- * ```
42
- *
43
- * @param token The new resolvable's injection token, such as `"userList"` (a string) or `UserService` (a class).
44
- * When this token is used during injection, the resolved value will be injected.
45
- * @param resolveFn The function that returns the resolved value, or a promise for the resolved value
46
- * @param deps An array of dependencies, which will be injected into the `resolveFn`
47
- * @param policy the [[ResolvePolicy]] defines when and how the Resolvable is processed
48
- * @param data Pre-resolved data. If the resolve value is already known, it may be provided here.
49
- */
50
- constructor(
51
- token: any,
52
- resolveFn: Function,
53
- deps?: any[],
54
- policy?: ResolvePolicy,
55
- data?: any,
56
- );
57
- getPolicy(state: StateObject): ResolvePolicy;
58
- /**
59
- * Asynchronously resolve this Resolvable's data
60
- *
61
- * Given a ResolveContext that this Resolvable is found in:
62
- * Wait for this Resolvable's dependencies, then invoke this Resolvable's function
63
- * and update the Resolvable's state
64
- */
65
- resolve(resolveContext: ResolveContext, trans?: Transition): Promise<any>;
66
- /**
67
- * Gets a promise for this Resolvable's data.
68
- *
69
- * Fetches the data and returns a promise.
70
- * Returns the existing promise if it has already been fetched once.
71
- */
72
- get(resolveContext: ResolveContext, trans?: Transition): Promise<any>;
73
- toString(): string;
74
- clone(): Resolvable;
75
- }
@@ -1,97 +0,0 @@
1
- import { PolicyWhen, ResolvePolicy } from "./interface";
2
- import { PathNode } from "../path/pathNode";
3
- import { Resolvable } from "./resolvable";
4
- import { StateObject } from "../state/stateObject";
5
- import { Transition } from "../transition/transition";
6
- import { NGInjector } from "../interface";
7
- export declare const NATIVE_INJECTOR_TOKEN: string;
8
- /**
9
- * Encapsulates Dependency Injection for a path of nodes
10
- *
11
- * Router states are organized as a tree.
12
- * A nested state has a path of ancestors to the root of the tree.
13
- * When a state is being activated, each element in the path is wrapped as a [[PathNode]].
14
- * A `PathNode` is a stateful object that holds things like parameters and resolvables for the state being activated.
15
- *
16
- * The ResolveContext closes over the [[PathNode]]s, and provides DI for the last node in the path.
17
- */
18
- export declare class ResolveContext {
19
- private _path;
20
- _injector: NGInjector;
21
- constructor(_path: PathNode[]);
22
- /** Gets all the tokens found in the resolve context, de-duplicated */
23
- getTokens(): any[];
24
- /**
25
- * Gets the Resolvable that matches the token
26
- *
27
- * Gets the last Resolvable that matches the token in this context, or undefined.
28
- * Throws an error if it doesn't exist in the ResolveContext
29
- */
30
- getResolvable(token: any): Resolvable;
31
- /** Returns the [[ResolvePolicy]] for the given [[Resolvable]] */
32
- getPolicy(resolvable: Resolvable): ResolvePolicy;
33
- /**
34
- * Returns a ResolveContext that includes a portion of this one
35
- *
36
- * Given a state, this method creates a new ResolveContext from this one.
37
- * The new context starts at the first node (root) and stops at the node for the `state` parameter.
38
- *
39
- * #### Why
40
- *
41
- * When a transition is created, the nodes in the "To Path" are injected from a ResolveContext.
42
- * A ResolveContext closes over a path of [[PathNode]]s and processes the resolvables.
43
- * The "To State" can inject values from its own resolvables, as well as those from all its ancestor state's (node's).
44
- * This method is used to create a narrower context when injecting ancestor nodes.
45
- *
46
- * @example
47
- * `let ABCD = new ResolveContext([A, B, C, D]);`
48
- *
49
- * Given a path `[A, B, C, D]`, where `A`, `B`, `C` and `D` are nodes for states `a`, `b`, `c`, `d`:
50
- * When injecting `D`, `D` should have access to all resolvables from `A`, `B`, `C`, `D`.
51
- * However, `B` should only be able to access resolvables from `A`, `B`.
52
- *
53
- * When resolving for the `B` node, first take the full "To Path" Context `[A,B,C,D]` and limit to the subpath `[A,B]`.
54
- * `let AB = ABCD.subcontext(a)`
55
- */
56
- subContext(state: StateObject): ResolveContext;
57
- /**
58
- * Adds Resolvables to the node that matches the state
59
- *
60
- * This adds a [[Resolvable]] (generally one created on the fly; not declared on a [[StateDeclaration.resolve]] block).
61
- * The resolvable is added to the node matching the `state` parameter.
62
- *
63
- * These new resolvables are not automatically fetched.
64
- * The calling code should either fetch them, fetch something that depends on them,
65
- * or rely on [[resolvePath]] being called when some state is being entered.
66
- *
67
- * Note: each resolvable's [[ResolvePolicy]] is merged with the state's policy, and the global default.
68
- *
69
- * @param newResolvables the new Resolvables
70
- * @param state Used to find the node to put the resolvable on
71
- */
72
- addResolvables(newResolvables: Resolvable[], state: StateObject): void;
73
- /**
74
- * Returns a promise for an array of resolved path Element promises
75
- *
76
- * @param when
77
- * @param trans
78
- * @returns {Promise<any>|any}
79
- */
80
- resolvePath(
81
- when?: PolicyWhen,
82
- trans?: Transition,
83
- ): Promise<
84
- {
85
- token: any;
86
- value: any;
87
- }[]
88
- >;
89
- injector(): NGInjector;
90
- findNode(resolvable: Resolvable): PathNode;
91
- /**
92
- * Gets the async dependencies of a Resolvable
93
- *
94
- * Given a Resolvable, returns its dependencies as a Resolvable[]
95
- */
96
- getDependencies(resolvable: Resolvable): Resolvable[];
97
- }
@@ -1,57 +0,0 @@
1
- import { UrlMatcherFactory } from "./url/urlMatcherFactory";
2
- import { UrlRouter } from "./url/urlRouter";
3
- import { TransitionService } from "./transition/transitionService";
4
- import { ViewService } from "./view/view";
5
- import { StateRegistry } from "./state/stateRegistry";
6
- import { StateService } from "./state/stateService";
7
- import { RouterGlobals } from "./globals";
8
- import { UrlService } from "./url/urlService";
9
- import { LocationServices, LocationConfig } from "./common/coreservices";
10
- import { Trace } from "./common/trace";
11
- /**
12
- * An instance of Router.
13
- *
14
- * This object contains references to service APIs which define your application's routing behavior.
15
- */
16
- export declare class Router {
17
- locationService: LocationServices;
18
- locationConfig: LocationConfig;
19
- /** @internal */ $id: number;
20
- /** @internal */ _disposed: boolean;
21
- /** @internal */ private _disposables;
22
- /** Enable/disable tracing to the javascript console */
23
- trace: Trace;
24
- /** Provides services related to ui-view synchronization */
25
- viewService: ViewService;
26
- /** An object that contains global router state, such as the current state and params */
27
- globals: RouterGlobals;
28
- /** A service that exposes global Transition Hooks */
29
- transitionService: TransitionService;
30
- /**
31
- * Deprecated for public use. Use [[urlService]] instead.
32
- * @deprecated Use [[urlService]] instead
33
- */
34
- urlMatcherFactory: UrlMatcherFactory;
35
- /**
36
- * Deprecated for public use. Use [[urlService]] instead.
37
- * @deprecated Use [[urlService]] instead
38
- */
39
- urlRouter: UrlRouter;
40
- /** Provides services related to the URL */
41
- urlService: UrlService;
42
- /** Provides a registry for states, and related registration services */
43
- stateRegistry: StateRegistry;
44
- /** Provides services related to states */
45
- stateService: StateService;
46
- /**
47
- * Creates a new `Router` object
48
- *
49
- * @param locationService a [[LocationServices]] implementation
50
- * @param locationConfig a [[LocationConfig]] implementation
51
- * @internal
52
- */
53
- constructor(
54
- locationService?: LocationServices,
55
- locationConfig?: LocationConfig,
56
- );
57
- }
@@ -1,28 +0,0 @@
1
- /**
2
- * # The state subsystem
3
- *
4
- * This subsystem implements the ui-router state tree
5
- *
6
- * - The [[StateService]] has state-related service methods such as:
7
- * - [[StateService.get]]: Get a registered [[StateDeclaration]] object
8
- * - [[StateService.go]]: Transition from the current state to a new state
9
- * - [[StateService.reload]]: Reload the current state
10
- * - [[StateService.target]]: Get a [[TargetState]] (useful when redirecting from a Transition Hook)
11
- * - [[StateService.onInvalid]]: Register a callback for when a transition to an invalid state is started
12
- * - [[StateService.defaultErrorHandler]]: Register a global callback for when a transition errors
13
- * - The [[StateDeclaration]] interface defines the shape of a state declaration
14
- * - The [[StateRegistry]] contains all the registered states
15
- * - States can be added/removed using the [[StateRegistry.register]] and [[StateRegistry.deregister]]
16
- * - Note: Bootstrap state registration differs by front-end framework.
17
- * - Get notified of state registration/deregistration using [[StateRegistry.onStatesChanged]].
18
- *
19
- * @packageDocumentation
20
- */
21
- export * from "./interface";
22
- export * from "./stateBuilder";
23
- export * from "./stateObject";
24
- export * from "./stateMatcher";
25
- export * from "./stateQueueManager";
26
- export * from "./stateRegistry";
27
- export * from "./stateService";
28
- export * from "./targetState";