@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.
Files changed (134) hide show
  1. package/Makefile +1 -1
  2. package/TODO.md +14 -0
  3. package/dist/angular-ts.esm.js +1 -1
  4. package/dist/angular-ts.umd.js +1 -1
  5. package/index.html +8 -2
  6. package/package.json +1 -1
  7. package/src/animations/animate-css-driver.js +2 -2
  8. package/src/animations/animate-css.js +15 -6
  9. package/src/animations/animate-js.js +1 -1
  10. package/src/animations/animate-queue.js +1 -1
  11. package/src/animations/shared.js +0 -14
  12. package/src/core/compile.js +6 -3
  13. package/src/directive/if.js +0 -79
  14. package/src/directive/if.md +80 -0
  15. package/src/directive/include.js +0 -82
  16. package/src/directive/include.md +86 -0
  17. package/src/directive/repeat.js +0 -1
  18. package/src/filters/order-by.js +8 -8
  19. package/src/loader.js +0 -1
  20. package/src/router/common/trace.js +1 -1
  21. package/src/router/directives/stateDirectives.js +16 -14
  22. package/src/router/directives/viewDirective.js +5 -13
  23. package/src/router/hooks/resolve.js +3 -4
  24. package/src/router/hooks/views.js +3 -2
  25. package/src/router/state/stateService.js +1 -2
  26. package/src/router/stateProvider.js +8 -0
  27. package/src/router/templateFactory.js +13 -7
  28. package/src/router/transition/interface.js +14 -14
  29. package/src/router/transition/rejectFactory.js +29 -20
  30. package/src/router/transition/transition.js +5 -1
  31. package/src/router/transition/transitionHook.js +5 -5
  32. package/src/router/url/urlMatcher.js +1 -2
  33. package/src/router/url/urlRule.js +10 -2
  34. package/src/router/url/urlRules.js +1 -1
  35. package/src/services/browser.js +3 -18
  36. package/src/shared/common.js +0 -1
  37. package/test/module-test.html +44 -12
  38. package/test/router/ng-state-builder.spec.js +81 -0
  39. package/test/router/services.spec.js +70 -0
  40. package/test/router/state-directives.spec.js +1182 -0
  41. package/test/router/template-factory.spec.js +146 -0
  42. package/test/router/url-matcher-factory.spec.js +1313 -0
  43. package/test/router/view-directive.spec.js +2013 -0
  44. package/test/router/view-hook.spec.js +217 -0
  45. package/test/router/view-scroll.spec.js +77 -0
  46. package/test/router/view.spec.js +117 -0
  47. package/types/angular.d.ts +132 -124
  48. package/types/index.d.ts +2350 -2187
  49. package/types/jqlite.d.ts +463 -418
  50. package/types/router/core/common/common.d.ts +70 -24
  51. package/types/router/core/common/coreservices.d.ts +30 -32
  52. package/types/router/core/common/glob.d.ts +9 -9
  53. package/types/router/core/common/hof.d.ts +12 -4
  54. package/types/router/core/common/index.d.ts +8 -8
  55. package/types/router/core/common/predicates.d.ts +1 -1
  56. package/types/router/core/common/queue.d.ts +13 -13
  57. package/types/router/core/common/safeConsole.d.ts +3 -3
  58. package/types/router/core/common/strings.d.ts +4 -2
  59. package/types/router/core/common/trace.d.ts +94 -82
  60. package/types/router/core/globals.d.ts +37 -37
  61. package/types/router/core/hooks/coreResolvables.d.ts +5 -3
  62. package/types/router/core/hooks/ignoredTransition.d.ts +4 -2
  63. package/types/router/core/hooks/invalidTransition.d.ts +4 -2
  64. package/types/router/core/hooks/lazyLoad.d.ts +10 -5
  65. package/types/router/core/hooks/onEnterExitRetain.d.ts +10 -4
  66. package/types/router/core/hooks/redirectTo.d.ts +4 -2
  67. package/types/router/core/hooks/resolve.d.ts +10 -4
  68. package/types/router/core/hooks/updateGlobals.d.ts +4 -2
  69. package/types/router/core/hooks/url.d.ts +4 -2
  70. package/types/router/core/hooks/views.d.ts +7 -3
  71. package/types/router/core/index.d.ts +11 -12
  72. package/types/router/core/interface.d.ts +83 -81
  73. package/types/router/core/params/index.d.ts +5 -5
  74. package/types/router/core/params/interface.d.ts +439 -439
  75. package/types/router/core/params/param.d.ts +72 -60
  76. package/types/router/core/params/paramType.d.ts +40 -40
  77. package/types/router/core/params/paramTypes.d.ts +169 -165
  78. package/types/router/core/params/stateParams.d.ts +13 -13
  79. package/types/router/core/path/index.d.ts +2 -2
  80. package/types/router/core/path/pathNode.d.ts +49 -49
  81. package/types/router/core/path/pathUtils.d.ts +100 -74
  82. package/types/router/core/resolve/index.d.ts +3 -3
  83. package/types/router/core/resolve/interface.d.ts +137 -137
  84. package/types/router/core/resolve/resolvable.d.ts +60 -54
  85. package/types/router/core/resolve/resolveContext.d.ts +84 -79
  86. package/types/router/core/router.d.ts +95 -86
  87. package/types/router/core/state/index.d.ts +8 -8
  88. package/types/router/core/state/interface.d.ts +667 -643
  89. package/types/router/core/state/stateBuilder.d.ts +41 -38
  90. package/types/router/core/state/stateMatcher.d.ts +11 -9
  91. package/types/router/core/state/stateObject.d.ts +154 -139
  92. package/types/router/core/state/stateQueueManager.d.ts +26 -21
  93. package/types/router/core/state/stateRegistry.d.ts +124 -121
  94. package/types/router/core/state/stateService.d.ts +380 -343
  95. package/types/router/core/state/targetState.d.ts +74 -69
  96. package/types/router/core/transition/hookBuilder.d.ts +34 -30
  97. package/types/router/core/transition/hookRegistry.d.ts +96 -74
  98. package/types/router/core/transition/index.d.ts +8 -8
  99. package/types/router/core/transition/interface.d.ts +652 -609
  100. package/types/router/core/transition/rejectFactory.d.ts +97 -97
  101. package/types/router/core/transition/transition.d.ts +565 -517
  102. package/types/router/core/transition/transitionEventType.d.ts +20 -11
  103. package/types/router/core/transition/transitionHook.d.ts +90 -82
  104. package/types/router/core/transition/transitionService.d.ts +228 -161
  105. package/types/router/core/url/index.d.ts +8 -8
  106. package/types/router/core/url/interface.d.ts +100 -87
  107. package/types/router/core/url/urlConfig.d.ts +130 -126
  108. package/types/router/core/url/urlMatcher.d.ts +132 -127
  109. package/types/router/core/url/urlMatcherFactory.d.ts +46 -42
  110. package/types/router/core/url/urlRouter.d.ts +91 -75
  111. package/types/router/core/url/urlRule.d.ts +123 -100
  112. package/types/router/core/url/urlRules.d.ts +240 -232
  113. package/types/router/core/url/urlService.d.ts +201 -201
  114. package/types/router/core/view/index.d.ts +2 -2
  115. package/types/router/core/view/interface.d.ts +26 -26
  116. package/types/router/core/view/view.d.ts +152 -143
  117. package/types/router/directives/viewDirective.d.ts +12 -11
  118. package/types/router/index.d.ts +11 -12
  119. package/types/router/interface.d.ts +361 -351
  120. package/types/router/legacy/resolveService.d.ts +44 -40
  121. package/types/router/legacy/stateEvents.d.ts +1 -1
  122. package/types/router/locationServices.d.ts +45 -37
  123. package/types/router/services.d.ts +9 -9
  124. package/types/router/stateFilters.d.ts +3 -3
  125. package/types/router/stateProvider.d.ts +240 -235
  126. package/types/router/statebuilders/onEnterExitRetain.d.ts +4 -2
  127. package/types/router/statebuilders/views.d.ts +35 -22
  128. package/types/router/templateFactory.d.ts +99 -79
  129. package/types/router/viewScroll.d.ts +7 -7
  130. package/src/directive/a.js +0 -37
  131. package/types/router/angular.d.ts +0 -1
  132. package/types/router/core/vanilla.d.ts +0 -1
  133. package/types/router/directives/stateDirectives.d.ts +0 -3
  134. package/types/router/injectables.d.ts +0 -1
@@ -1,44 +1,48 @@
1
1
  /** @publicapi @module ng1 */ /** */
2
- import { Obj } from './core';
2
+ import { Obj } from "./core";
3
3
  /** @hidden */
4
4
  export declare const resolveFactory: () => {
5
- /**
6
- * Asynchronously injects a resolve block.
7
- *
8
- * This emulates most of the behavior of the ui-router 0.2.x $resolve.resolve() service API.
9
- *
10
- * ### Not bundled by default
11
- *
12
- * This API is no longer not part of the standard `@uirouter/angularjs` bundle.
13
- * For users of the prebuilt bundles, add the `release/resolveService.min.js` UMD bundle.
14
- * For bundlers (webpack, browserify, etc), add `@uirouter/angularjs/lib/legacy/resolveService`.
15
- *
16
- * ---
17
- *
18
- * Given an object `invocables`, where keys are strings and values are injectable functions,
19
- * injects each function, and waits for the resulting promise to resolve.
20
- * When all resulting promises are resolved, returns the results as an object.
21
- *
22
- * #### Example:
23
- * ```js
24
- * let invocables = {
25
- * foo: [ '$http', ($http) =>
26
- * $http.get('/api/foo').then(resp => resp.data) ],
27
- * bar: [ 'foo', '$http', (foo, $http) =>
28
- * $http.get('/api/bar/' + foo.barId).then(resp => resp.data) ]
29
- * }
30
- * $resolve.resolve(invocables)
31
- * .then(results => console.log(results.foo, results.bar))
32
- * // Logs foo and bar:
33
- * // { id: 123, barId: 456, fooData: 'foo data' }
34
- * // { id: 456, barData: 'bar data' }
35
- * ```
36
- *
37
- * @param invocables an object which looks like an [[StateDeclaration.resolve]] object; keys are resolve names and values are injectable functions
38
- * @param locals key/value pre-resolved data (locals)
39
- * @param parent a promise for a "parent resolve"
40
- */
41
- resolve: (invocables: {
42
- [key: string]: Function;
43
- }, locals?: {}, parent?: Promise<any>) => Promise<Obj>;
5
+ /**
6
+ * Asynchronously injects a resolve block.
7
+ *
8
+ * This emulates most of the behavior of the ui-router 0.2.x $resolve.resolve() service API.
9
+ *
10
+ * ### Not bundled by default
11
+ *
12
+ * This API is no longer not part of the standard `@uirouter/angularjs` bundle.
13
+ * For users of the prebuilt bundles, add the `release/resolveService.min.js` UMD bundle.
14
+ * For bundlers (webpack, browserify, etc), add `@uirouter/angularjs/lib/legacy/resolveService`.
15
+ *
16
+ * ---
17
+ *
18
+ * Given an object `invocables`, where keys are strings and values are injectable functions,
19
+ * injects each function, and waits for the resulting promise to resolve.
20
+ * When all resulting promises are resolved, returns the results as an object.
21
+ *
22
+ * #### Example:
23
+ * ```js
24
+ * let invocables = {
25
+ * foo: [ '$http', ($http) =>
26
+ * $http.get('/api/foo').then(resp => resp.data) ],
27
+ * bar: [ 'foo', '$http', (foo, $http) =>
28
+ * $http.get('/api/bar/' + foo.barId).then(resp => resp.data) ]
29
+ * }
30
+ * $resolve.resolve(invocables)
31
+ * .then(results => console.log(results.foo, results.bar))
32
+ * // Logs foo and bar:
33
+ * // { id: 123, barId: 456, fooData: 'foo data' }
34
+ * // { id: 456, barData: 'bar data' }
35
+ * ```
36
+ *
37
+ * @param invocables an object which looks like an [[StateDeclaration.resolve]] object; keys are resolve names and values are injectable functions
38
+ * @param locals key/value pre-resolved data (locals)
39
+ * @param parent a promise for a "parent resolve"
40
+ */
41
+ resolve: (
42
+ invocables: {
43
+ [key: string]: Function;
44
+ },
45
+ locals?: {},
46
+ parent?: Promise<any>,
47
+ ) => Promise<Obj>;
44
48
  };
@@ -1,4 +1,4 @@
1
- import { IAngularEvent } from 'angular';
1
+ import { IAngularEvent } from "angular";
2
2
  /**
3
3
  * An event broadcast on `$rootScope` when the state transition **begins**.
4
4
  *
@@ -1,43 +1,51 @@
1
1
  /** @publicapi @module ng1 */ /** */
2
- import { LocationConfig, LocationServices, UIRouter } from './core';
3
- import { ILocationService, ILocationProvider, IWindowService } from '../index';
2
+ import { LocationConfig, LocationServices, UIRouter } from "./core";
3
+ import { ILocationService, ILocationProvider, IWindowService } from "../index";
4
4
  /**
5
5
  * Implements UI-Router LocationServices and LocationConfig using Angular 1's $location service
6
6
  * @internalapi
7
7
  */
8
- export declare class Ng1LocationServices implements LocationConfig, LocationServices {
9
- private $locationProvider;
10
- private $location;
11
- private $sniffer;
12
- private $browser;
13
- private $window;
14
- path: any;
15
- search: any;
16
- hash: any;
17
- hashPrefix: any;
18
- port: any;
19
- protocol: any;
20
- host: any;
21
- private _baseHref;
22
- private _urlListeners;
23
- /**
24
- * Applys ng1-specific path parameter encoding
25
- *
26
- * The Angular 1 `$location` service is a bit weird.
27
- * It doesn't allow slashes to be encoded/decoded bi-directionally.
28
- *
29
- * See the writeup at https://github.com/angular-ui/ui-router/issues/2598
30
- *
31
- * This code patches the `path` parameter type so it encoded/decodes slashes as ~2F
32
- *
33
- * @param router
34
- */
35
- static monkeyPatchPathParameterType(router: UIRouter): void;
36
- dispose(): void;
37
- constructor($locationProvider: ILocationProvider);
38
- onChange(callback: Function): () => Function[];
39
- html5Mode(): any;
40
- baseHref(): any;
41
- url(newUrl?: string, replace?: boolean, state?: any): string;
42
- _runtimeServices($rootScope: any, $location: ILocationService, $sniffer: any, $browser: any, $window: IWindowService): void;
8
+ export declare class Ng1LocationServices
9
+ implements LocationConfig, LocationServices
10
+ {
11
+ private $locationProvider;
12
+ private $location;
13
+ private $sniffer;
14
+ private $browser;
15
+ private $window;
16
+ path: any;
17
+ search: any;
18
+ hash: any;
19
+ hashPrefix: any;
20
+ port: any;
21
+ protocol: any;
22
+ host: any;
23
+ private _baseHref;
24
+ private _urlListeners;
25
+ /**
26
+ * Applys ng1-specific path parameter encoding
27
+ *
28
+ * The Angular 1 `$location` service is a bit weird.
29
+ * It doesn't allow slashes to be encoded/decoded bi-directionally.
30
+ *
31
+ * See the writeup at https://github.com/angular-ui/ui-router/issues/2598
32
+ *
33
+ * This code patches the `path` parameter type so it encoded/decodes slashes as ~2F
34
+ *
35
+ * @param router
36
+ */
37
+ static monkeyPatchPathParameterType(router: UIRouter): void;
38
+ dispose(): void;
39
+ constructor($locationProvider: ILocationProvider);
40
+ onChange(callback: Function): () => Function[];
41
+ html5Mode(): any;
42
+ baseHref(): any;
43
+ url(newUrl?: string, replace?: boolean, state?: any): string;
44
+ _runtimeServices(
45
+ $rootScope: any,
46
+ $location: ILocationService,
47
+ $sniffer: any,
48
+ $browser: any,
49
+ $window: IWindowService,
50
+ ): void;
43
51
  }
@@ -1,15 +1,15 @@
1
- import { IRootScopeService } from '../';
2
- import { ResolveContext, TypedMap } from './core';
3
- import { StateProvider } from './stateProvider';
4
- declare module './core/lib/router' {
5
- interface UIRouter {
6
- /** @hidden */
7
- stateProvider: StateProvider;
8
- }
1
+ import { IRootScopeService } from "../";
2
+ import { ResolveContext, TypedMap } from "./core";
3
+ import { StateProvider } from "./stateProvider";
4
+ declare module "./core/lib/router" {
5
+ interface UIRouter {
6
+ /** @hidden */
7
+ stateProvider: StateProvider;
8
+ }
9
9
  }
10
10
  export declare function watchDigests($rootScope: IRootScopeService): void;
11
11
  export declare namespace watchDigests {
12
- var $inject: string[];
12
+ var $inject: string[];
13
13
  }
14
14
  /** @hidden TODO: find a place to move this */
15
15
  export declare const getLocals: (ctx: ResolveContext) => TypedMap<any>;
@@ -1,11 +1,11 @@
1
1
  /** @publicapi @module ng1 */ /** */
2
- import { StateService } from './core';
2
+ import { StateService } from "./core";
3
3
  declare function $IsStateFilter($state: StateService): any;
4
4
  declare namespace $IsStateFilter {
5
- var $inject: string[];
5
+ var $inject: string[];
6
6
  }
7
7
  declare function $IncludedByStateFilter($state: StateService): any;
8
8
  declare namespace $IncludedByStateFilter {
9
- var $inject: string[];
9
+ var $inject: string[];
10
10
  }
11
11
  export { $IsStateFilter, $IncludedByStateFilter };