@angular-wave/angular.ts 0.0.21 → 0.0.22

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 (122) 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 +2 -0
  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/loader.js +0 -1
  19. package/src/router/common/trace.js +1 -1
  20. package/src/router/directives/stateDirectives.js +16 -14
  21. package/src/router/directives/viewDirective.js +2 -2
  22. package/src/router/hooks/resolve.js +3 -4
  23. package/src/router/hooks/views.js +3 -2
  24. package/src/router/state/stateService.js +1 -2
  25. package/src/router/transition/interface.js +14 -14
  26. package/src/router/transition/rejectFactory.js +29 -20
  27. package/src/router/transition/transitionHook.js +5 -5
  28. package/src/router/url/urlMatcher.js +1 -2
  29. package/src/router/url/urlRule.js +1 -1
  30. package/src/router/url/urlRules.js +1 -1
  31. package/src/shared/common.js +0 -1
  32. package/test/module-test.html +44 -12
  33. package/test/router/services.spec.js +71 -0
  34. package/test/router/state-directives.spec.js +1208 -0
  35. package/types/angular.d.ts +132 -124
  36. package/types/index.d.ts +2350 -2187
  37. package/types/jqlite.d.ts +463 -418
  38. package/types/router/core/common/common.d.ts +70 -24
  39. package/types/router/core/common/coreservices.d.ts +30 -32
  40. package/types/router/core/common/glob.d.ts +9 -9
  41. package/types/router/core/common/hof.d.ts +12 -4
  42. package/types/router/core/common/index.d.ts +8 -8
  43. package/types/router/core/common/predicates.d.ts +1 -1
  44. package/types/router/core/common/queue.d.ts +13 -13
  45. package/types/router/core/common/safeConsole.d.ts +3 -3
  46. package/types/router/core/common/strings.d.ts +4 -2
  47. package/types/router/core/common/trace.d.ts +94 -82
  48. package/types/router/core/globals.d.ts +37 -37
  49. package/types/router/core/hooks/coreResolvables.d.ts +5 -3
  50. package/types/router/core/hooks/ignoredTransition.d.ts +4 -2
  51. package/types/router/core/hooks/invalidTransition.d.ts +4 -2
  52. package/types/router/core/hooks/lazyLoad.d.ts +10 -5
  53. package/types/router/core/hooks/onEnterExitRetain.d.ts +10 -4
  54. package/types/router/core/hooks/redirectTo.d.ts +4 -2
  55. package/types/router/core/hooks/resolve.d.ts +10 -4
  56. package/types/router/core/hooks/updateGlobals.d.ts +4 -2
  57. package/types/router/core/hooks/url.d.ts +4 -2
  58. package/types/router/core/hooks/views.d.ts +7 -3
  59. package/types/router/core/index.d.ts +11 -12
  60. package/types/router/core/interface.d.ts +83 -81
  61. package/types/router/core/params/index.d.ts +5 -5
  62. package/types/router/core/params/interface.d.ts +439 -439
  63. package/types/router/core/params/param.d.ts +72 -60
  64. package/types/router/core/params/paramType.d.ts +40 -40
  65. package/types/router/core/params/paramTypes.d.ts +169 -165
  66. package/types/router/core/params/stateParams.d.ts +13 -13
  67. package/types/router/core/path/index.d.ts +2 -2
  68. package/types/router/core/path/pathNode.d.ts +49 -49
  69. package/types/router/core/path/pathUtils.d.ts +100 -74
  70. package/types/router/core/resolve/index.d.ts +3 -3
  71. package/types/router/core/resolve/interface.d.ts +137 -137
  72. package/types/router/core/resolve/resolvable.d.ts +60 -54
  73. package/types/router/core/resolve/resolveContext.d.ts +84 -79
  74. package/types/router/core/router.d.ts +95 -86
  75. package/types/router/core/state/index.d.ts +8 -8
  76. package/types/router/core/state/interface.d.ts +667 -643
  77. package/types/router/core/state/stateBuilder.d.ts +41 -38
  78. package/types/router/core/state/stateMatcher.d.ts +11 -9
  79. package/types/router/core/state/stateObject.d.ts +154 -139
  80. package/types/router/core/state/stateQueueManager.d.ts +26 -21
  81. package/types/router/core/state/stateRegistry.d.ts +124 -121
  82. package/types/router/core/state/stateService.d.ts +380 -343
  83. package/types/router/core/state/targetState.d.ts +74 -69
  84. package/types/router/core/transition/hookBuilder.d.ts +34 -30
  85. package/types/router/core/transition/hookRegistry.d.ts +96 -74
  86. package/types/router/core/transition/index.d.ts +8 -8
  87. package/types/router/core/transition/interface.d.ts +652 -609
  88. package/types/router/core/transition/rejectFactory.d.ts +97 -97
  89. package/types/router/core/transition/transition.d.ts +565 -517
  90. package/types/router/core/transition/transitionEventType.d.ts +20 -11
  91. package/types/router/core/transition/transitionHook.d.ts +90 -82
  92. package/types/router/core/transition/transitionService.d.ts +228 -161
  93. package/types/router/core/url/index.d.ts +8 -8
  94. package/types/router/core/url/interface.d.ts +100 -87
  95. package/types/router/core/url/urlConfig.d.ts +130 -126
  96. package/types/router/core/url/urlMatcher.d.ts +132 -127
  97. package/types/router/core/url/urlMatcherFactory.d.ts +46 -42
  98. package/types/router/core/url/urlRouter.d.ts +91 -75
  99. package/types/router/core/url/urlRule.d.ts +123 -100
  100. package/types/router/core/url/urlRules.d.ts +240 -232
  101. package/types/router/core/url/urlService.d.ts +201 -201
  102. package/types/router/core/view/index.d.ts +2 -2
  103. package/types/router/core/view/interface.d.ts +26 -26
  104. package/types/router/core/view/view.d.ts +152 -143
  105. package/types/router/directives/viewDirective.d.ts +12 -11
  106. package/types/router/index.d.ts +11 -12
  107. package/types/router/interface.d.ts +361 -351
  108. package/types/router/legacy/resolveService.d.ts +44 -40
  109. package/types/router/legacy/stateEvents.d.ts +1 -1
  110. package/types/router/locationServices.d.ts +45 -37
  111. package/types/router/services.d.ts +9 -9
  112. package/types/router/stateFilters.d.ts +3 -3
  113. package/types/router/stateProvider.d.ts +240 -235
  114. package/types/router/statebuilders/onEnterExitRetain.d.ts +4 -2
  115. package/types/router/statebuilders/views.d.ts +35 -22
  116. package/types/router/templateFactory.d.ts +99 -79
  117. package/types/router/viewScroll.d.ts +7 -7
  118. package/src/directive/a.js +0 -37
  119. package/types/router/angular.d.ts +0 -1
  120. package/types/router/core/vanilla.d.ts +0 -1
  121. package/types/router/directives/stateDirectives.d.ts +0 -3
  122. package/types/router/injectables.d.ts +0 -1
@@ -1,103 +1,103 @@
1
1
  /** An enum for Transition Rejection reasons */
2
2
  declare enum RejectType {
3
- /**
4
- * A new transition superseded this one.
5
- *
6
- * While this transition was running, a new transition started.
7
- * This transition is cancelled because it was superseded by new transition.
8
- */
9
- SUPERSEDED = 2,
10
- /**
11
- * The transition was aborted
12
- *
13
- * The transition was aborted by a hook which returned `false`
14
- */
15
- ABORTED = 3,
16
- /**
17
- * The transition was invalid
18
- *
19
- * The transition was never started because it was invalid
20
- */
21
- INVALID = 4,
22
- /**
23
- * The transition was ignored
24
- *
25
- * The transition was ignored because it would have no effect.
26
- *
27
- * Either:
28
- *
29
- * - The transition is targeting the current state and parameter values
30
- * - The transition is targeting the same state and parameter values as the currently running transition.
31
- */
32
- IGNORED = 5,
33
- /**
34
- * The transition errored.
35
- *
36
- * This generally means a hook threw an error or returned a rejected promise
37
- */
38
- ERROR = 6
3
+ /**
4
+ * A new transition superseded this one.
5
+ *
6
+ * While this transition was running, a new transition started.
7
+ * This transition is cancelled because it was superseded by new transition.
8
+ */
9
+ SUPERSEDED = 2,
10
+ /**
11
+ * The transition was aborted
12
+ *
13
+ * The transition was aborted by a hook which returned `false`
14
+ */
15
+ ABORTED = 3,
16
+ /**
17
+ * The transition was invalid
18
+ *
19
+ * The transition was never started because it was invalid
20
+ */
21
+ INVALID = 4,
22
+ /**
23
+ * The transition was ignored
24
+ *
25
+ * The transition was ignored because it would have no effect.
26
+ *
27
+ * Either:
28
+ *
29
+ * - The transition is targeting the current state and parameter values
30
+ * - The transition is targeting the same state and parameter values as the currently running transition.
31
+ */
32
+ IGNORED = 5,
33
+ /**
34
+ * The transition errored.
35
+ *
36
+ * This generally means a hook threw an error or returned a rejected promise
37
+ */
38
+ ERROR = 6,
39
39
  }
40
40
  export { RejectType };
41
41
  export declare class Rejection {
42
- /** @internal */
43
- $id: number;
44
- /**
45
- * The type of the rejection.
46
- *
47
- * This value is an number representing the type of transition rejection.
48
- * If using Typescript, this is a Typescript enum.
49
- *
50
- * - [[RejectType.SUPERSEDED]] (`2`)
51
- * - [[RejectType.ABORTED]] (`3`)
52
- * - [[RejectType.INVALID]] (`4`)
53
- * - [[RejectType.IGNORED]] (`5`)
54
- * - [[RejectType.ERROR]] (`6`)
55
- *
56
- */
57
- type: RejectType;
58
- /**
59
- * A message describing the rejection
60
- */
61
- message: string;
62
- /**
63
- * A detail object
64
- *
65
- * This value varies based on the mechanism for rejecting the transition.
66
- * For example, if an error was thrown from a hook, the `detail` will be the `Error` object.
67
- * If a hook returned a rejected promise, the `detail` will be the rejected value.
68
- */
69
- detail: any;
70
- /**
71
- * Indicates if the transition was redirected.
72
- *
73
- * When a transition is redirected, the rejection [[type]] will be [[RejectType.SUPERSEDED]] and this flag will be true.
74
- */
75
- redirected: boolean;
76
- /** Returns true if the obj is a rejected promise created from the `asPromise` factory */
77
- static isRejectionPromise(obj: any): boolean;
78
- /** Returns a Rejection due to transition superseded */
79
- static superseded(detail?: any, options?: any): Rejection;
80
- /** Returns a Rejection due to redirected transition */
81
- static redirected(detail?: any): Rejection;
82
- /** Returns a Rejection due to invalid transition */
83
- static invalid(detail?: any): Rejection;
84
- /** Returns a Rejection due to ignored transition */
85
- static ignored(detail?: any): Rejection;
86
- /** Returns a Rejection due to aborted transition */
87
- static aborted(detail?: any): Rejection;
88
- /** Returns a Rejection due to aborted transition */
89
- static errored(detail?: any): Rejection;
90
- /**
91
- * Returns a Rejection
92
- *
93
- * Normalizes a value as a Rejection.
94
- * If the value is already a Rejection, returns it.
95
- * Otherwise, wraps and returns the value as a Rejection (Rejection type: ERROR).
96
- *
97
- * @returns `detail` if it is already a `Rejection`, else returns an ERROR Rejection.
98
- */
99
- static normalize(detail?: Rejection | Error | any): Rejection;
100
- constructor(type: number, message?: string, detail?: any);
101
- toString(): string;
102
- toPromise(): Promise<any>;
42
+ /** @internal */
43
+ $id: number;
44
+ /**
45
+ * The type of the rejection.
46
+ *
47
+ * This value is an number representing the type of transition rejection.
48
+ * If using Typescript, this is a Typescript enum.
49
+ *
50
+ * - [[RejectType.SUPERSEDED]] (`2`)
51
+ * - [[RejectType.ABORTED]] (`3`)
52
+ * - [[RejectType.INVALID]] (`4`)
53
+ * - [[RejectType.IGNORED]] (`5`)
54
+ * - [[RejectType.ERROR]] (`6`)
55
+ *
56
+ */
57
+ type: RejectType;
58
+ /**
59
+ * A message describing the rejection
60
+ */
61
+ message: string;
62
+ /**
63
+ * A detail object
64
+ *
65
+ * This value varies based on the mechanism for rejecting the transition.
66
+ * For example, if an error was thrown from a hook, the `detail` will be the `Error` object.
67
+ * If a hook returned a rejected promise, the `detail` will be the rejected value.
68
+ */
69
+ detail: any;
70
+ /**
71
+ * Indicates if the transition was redirected.
72
+ *
73
+ * When a transition is redirected, the rejection [[type]] will be [[RejectType.SUPERSEDED]] and this flag will be true.
74
+ */
75
+ redirected: boolean;
76
+ /** Returns true if the obj is a rejected promise created from the `asPromise` factory */
77
+ static isRejectionPromise(obj: any): boolean;
78
+ /** Returns a Rejection due to transition superseded */
79
+ static superseded(detail?: any, options?: any): Rejection;
80
+ /** Returns a Rejection due to redirected transition */
81
+ static redirected(detail?: any): Rejection;
82
+ /** Returns a Rejection due to invalid transition */
83
+ static invalid(detail?: any): Rejection;
84
+ /** Returns a Rejection due to ignored transition */
85
+ static ignored(detail?: any): Rejection;
86
+ /** Returns a Rejection due to aborted transition */
87
+ static aborted(detail?: any): Rejection;
88
+ /** Returns a Rejection due to aborted transition */
89
+ static errored(detail?: any): Rejection;
90
+ /**
91
+ * Returns a Rejection
92
+ *
93
+ * Normalizes a value as a Rejection.
94
+ * If the value is already a Rejection, returns it.
95
+ * Otherwise, wraps and returns the value as a Rejection (Rejection type: ERROR).
96
+ *
97
+ * @returns `detail` if it is already a `Rejection`, else returns an ERROR Rejection.
98
+ */
99
+ static normalize(detail?: Rejection | Error | any): Rejection;
100
+ constructor(type: number, message?: string, detail?: any);
101
+ toString(): string;
102
+ toPromise(): Promise<any>;
103
103
  }