@angular-wave/angular.ts 0.0.38 → 0.0.40

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 (263) hide show
  1. package/Makefile +8 -5
  2. package/README.md +1 -1
  3. package/dist/angular-ts.esm.js +2 -1
  4. package/dist/angular-ts.umd.js +2 -1
  5. package/package.json +2 -4
  6. package/rollup.config.js +11 -2
  7. package/src/angular.spec.js +25 -26
  8. package/src/animations/animate-css-driver.js +3 -3
  9. package/src/animations/animate-queue.js +7 -7
  10. package/src/animations/animation.js +2 -2
  11. package/src/animations/shared.js +6 -6
  12. package/src/binding.spec.js +7 -7
  13. package/src/core/animate/animate.js +5 -5
  14. package/src/core/animate/animate.spec.js +31 -31
  15. package/src/core/cache/cache-factory.html +18 -0
  16. package/src/core/cache/{cache-factor.test.js → cache-factory.test.js} +1 -1
  17. package/src/core/compile/compile.js +31 -25
  18. package/src/core/compile/compile.md +2 -2
  19. package/src/core/cookie-reader.spec.js +2 -2
  20. package/src/core/core.html +22 -0
  21. package/src/core/core.test.js +12 -0
  22. package/src/core/document.spec.js +4 -4
  23. package/src/core/exception-handler.js +30 -23
  24. package/src/core/interpolate/interpolate.js +7 -0
  25. package/src/core/{cache/cache-factor.html → location/location.html} +1 -1
  26. package/src/core/location/location.js +2 -2
  27. package/src/core/location/location.spec.js +17 -17
  28. package/src/core/location/location.test.js +12 -0
  29. package/src/core/on.spec.js +3 -3
  30. package/src/core/parser/parse.html +18 -0
  31. package/src/core/parser/parse.spec.js +1 -1
  32. package/src/core/parser/parse.test.js +12 -0
  33. package/src/core/prop.spec.js +3 -4
  34. package/src/core/pubsub/pubsub.html +18 -0
  35. package/src/core/pubsub/pubsub.spec.js +1 -1
  36. package/src/core/pubsub/pubsub.test.js +12 -0
  37. package/src/core/q/q.html +18 -0
  38. package/src/core/q/q.js +33 -0
  39. package/src/core/q/q.test.js +0 -0
  40. package/src/core/root-element.spec.js +4 -4
  41. package/src/core/sanitize/sanitize-uri.spec.js +1 -1
  42. package/src/core/sanitize/sanitize-uri.test.js +12 -0
  43. package/src/core/sanitize/sanitize.html +21 -0
  44. package/src/core/sce/sce.html +18 -0
  45. package/src/core/sce/sce.spec.js +2 -1
  46. package/src/core/sce/sce.test.js +12 -0
  47. package/src/core/scope/scope.html +18 -0
  48. package/src/core/scope/scope.js +5 -8
  49. package/src/core/scope/scope.spec.js +1 -1
  50. package/src/core/scope/scope.test.js +12 -0
  51. package/src/core/task-tracker-factory.js +9 -11
  52. package/src/core/timeout/timeout.html +18 -0
  53. package/src/core/timeout/timeout.js +9 -0
  54. package/src/core/timeout/timeout.spec.js +2 -2
  55. package/src/core/timeout/timout.test.js +12 -0
  56. package/src/core/url-utils/url-utils.html +18 -0
  57. package/src/core/url-utils/url-utils.spec.js +4 -2
  58. package/src/core/url-utils/url-utils.test.js +12 -0
  59. package/src/directive/attrs/attrs.spec.js +1 -2
  60. package/src/directive/attrs/boolean.spec.js +1 -2
  61. package/src/directive/attrs/element-style.spec.js +6 -7
  62. package/src/directive/attrs/src.spec.js +1 -2
  63. package/src/directive/bind/bind.spec.js +1 -2
  64. package/src/directive/class/class.spec.js +15 -16
  65. package/src/directive/cloak/cloak.spec.js +3 -4
  66. package/src/directive/controller/controller.spec.js +4 -5
  67. package/src/directive/events/click.spec.js +1 -2
  68. package/src/directive/events/event.spec.js +1 -1
  69. package/src/directive/events/events.js +7 -0
  70. package/src/directive/form/form.spec.js +17 -17
  71. package/src/directive/if/if.spec.js +2 -2
  72. package/src/directive/include/include.js +2 -2
  73. package/src/directive/include/include.spec.js +32 -32
  74. package/src/directive/init/init.spec.js +2 -3
  75. package/src/directive/input/input.spec.js +3 -3
  76. package/src/directive/list/list.spec.js +1 -2
  77. package/src/directive/model/model.js +13 -0
  78. package/src/directive/model/model.spec.js +4 -5
  79. package/src/directive/model-options/model-options.spec.js +3 -3
  80. package/src/directive/non-bindable/non-bindable.spec.js +1 -2
  81. package/src/directive/options/options.js +5 -5
  82. package/src/directive/options/options.spec.js +13 -13
  83. package/src/directive/ref/href.spec.js +1 -2
  84. package/src/directive/repeat/repeat.spec.js +12 -12
  85. package/src/directive/script/script.spec.js +2 -3
  86. package/src/directive/select/select.js +6 -6
  87. package/src/directive/select/select.spec.js +5 -5
  88. package/src/directive/show-hide/show-hide.spec.js +12 -13
  89. package/src/directive/style/style.spec.js +3 -4
  90. package/src/directive/switch/switch.spec.js +2 -3
  91. package/src/directive/validators/validators.spec.js +1 -1
  92. package/src/exts/aria/aria.spec.js +1 -2
  93. package/src/exts/messages/messages.spec.js +5 -5
  94. package/src/filters/filter.spec.js +5 -5
  95. package/src/filters/filters.html +21 -0
  96. package/src/filters/filters.spec.js +3 -3
  97. package/src/filters/filters.test.js +12 -0
  98. package/src/filters/limit-to.md +1 -1
  99. package/src/filters/limit-to.spec.js +4 -4
  100. package/src/filters/order-by.spec.js +2 -2
  101. package/src/index.js +462 -1
  102. package/src/loader.js +62 -17
  103. package/src/public.js +6 -2
  104. package/src/router/directives/state-directives.spec.js +90 -90
  105. package/src/router/directives/view-directive.js +2 -2
  106. package/src/router/directives/view-directive.spec.js +9 -9
  107. package/src/router/state/state.spec.js +2 -4
  108. package/src/router/template-factory.spec.js +2 -2
  109. package/src/router/transition/hook-registry.js +2 -2
  110. package/src/router/view/view.spec.js +1 -1
  111. package/src/services/browser.js +56 -39
  112. package/src/services/document.js +16 -13
  113. package/src/services/log.js +39 -43
  114. package/src/services/template-request.js +9 -0
  115. package/src/shared/common.js +0 -3
  116. package/src/shared/jqlite/jqlite.js +83 -89
  117. package/src/shared/jqlite/jqlite.spec.js +218 -222
  118. package/src/shared/strings.js +2 -2
  119. package/src/shared/test-utils.js +2 -2
  120. package/src/shared/utils.js +8 -11
  121. package/src/src.test.js +10 -0
  122. package/tsconfig.json +1 -1
  123. package/tsconfig.types.json +11 -0
  124. package/types/animations/animate-cache.d.ts +7 -7
  125. package/types/animations/animate-children-directive.d.ts +3 -6
  126. package/types/animations/animate-swap.d.ts +7 -16
  127. package/types/animations/animation.d.ts +2 -11
  128. package/types/animations/raf-scheduler.d.ts +3 -3
  129. package/types/animations/shared.d.ts +9 -24
  130. package/types/core/{animate-css.d.ts → animate/animate-css.d.ts} +2 -8
  131. package/types/core/{cache.d.ts → cache/cache.d.ts} +5 -5
  132. package/types/core/compile/compile.d.ts +173 -0
  133. package/types/core/controller/controller.d.ts +32 -0
  134. package/types/core/exception-handler.d.ts +9 -42
  135. package/types/core/filter/filter.d.ts +9 -0
  136. package/types/core/{interpolate.d.ts → interpolate/interpolate.d.ts} +23 -39
  137. package/types/core/interval/interval-factory.d.ts +4 -0
  138. package/types/core/{interval.d.ts → interval/interval.d.ts} +1 -1
  139. package/types/core/location/location.d.ts +209 -0
  140. package/types/core/pubsub/pubsub.d.ts +156 -0
  141. package/types/core/q/q.d.ts +65 -0
  142. package/types/core/sanitize/sanitize-uri.d.ts +53 -0
  143. package/types/core/{sce.d.ts → sce/sce.d.ts} +80 -86
  144. package/types/core/scope/scope.d.ts +727 -0
  145. package/types/core/task-tracker-factory.d.ts +45 -38
  146. package/types/core/timeout/timeout.d.ts +29 -0
  147. package/types/core/{urlUtils.d.ts → url-utils/url-utils.d.ts} +2 -7
  148. package/types/directive/{bind.d.ts → bind/bind.d.ts} +4 -10
  149. package/types/directive/{class.d.ts → class/class.d.ts} +12 -21
  150. package/types/directive/controller/controller.d.ts +6 -0
  151. package/types/directive/events/events.d.ts +5 -0
  152. package/types/directive/form/form.d.ts +200 -0
  153. package/types/directive/if/if.d.ts +8 -0
  154. package/types/directive/include/include.d.ts +14 -0
  155. package/types/directive/{input.d.ts → input/input.d.ts} +20 -69
  156. package/types/directive/{model.d.ts → model/model.d.ts} +281 -280
  157. package/types/directive/options/options.d.ts +9 -0
  158. package/types/directive/ref/ref.d.ts +5 -0
  159. package/types/directive/repeat/repeat.d.ts +8 -0
  160. package/types/directive/{script.d.ts → script/script.d.ts} +5 -8
  161. package/types/directive/{show-hide.d.ts → show-hide/show-hide.d.ts} +10 -16
  162. package/types/directive/switch/switch.d.ts +17 -0
  163. package/types/directive/transclude/transclude.d.ts +4 -0
  164. package/types/directive/{validators.d.ts → validators/validators.d.ts} +20 -35
  165. package/types/filters/filters.d.ts +10 -16
  166. package/types/filters/order-by.d.ts +2 -4
  167. package/types/index.d.ts +702 -0
  168. package/types/injector.d.ts +12 -0
  169. package/types/public.d.ts +5 -0
  170. package/types/router/common/coreservices.d.ts +2 -2
  171. package/types/router/common/glob.d.ts +9 -9
  172. package/types/router/common/queue.d.ts +13 -13
  173. package/types/router/common/trace.d.ts +43 -43
  174. package/types/router/directives/view-directive.d.ts +13 -32
  175. package/types/router/globals.d.ts +20 -20
  176. package/types/router/hooks/lazy-load.d.ts +2 -11
  177. package/types/router/hooks/redirect-to.d.ts +1 -4
  178. package/types/router/hooks/url.d.ts +1 -5
  179. package/types/router/hooks/views.d.ts +1 -4
  180. package/types/router/params/param-factory.d.ts +5 -5
  181. package/types/router/params/param-type.d.ts +35 -35
  182. package/types/router/params/param-types.d.ts +11 -11
  183. package/types/router/params/param.d.ts +38 -38
  184. package/types/router/params/state-params.d.ts +10 -10
  185. package/types/router/path/path-node.d.ts +34 -34
  186. package/types/router/path/path-utils.d.ts +73 -77
  187. package/types/router/resolve/resolvable.d.ts +32 -32
  188. package/types/router/resolve/resolve-context.d.ts +84 -84
  189. package/types/router/services.d.ts +4 -9
  190. package/types/router/state/state-builder.d.ts +27 -27
  191. package/types/router/state/state-matcher.d.ts +5 -5
  192. package/types/router/state/state-object.d.ts +58 -58
  193. package/types/router/state/state-queue-manager.d.ts +10 -16
  194. package/types/router/state/state-registry.d.ts +100 -107
  195. package/types/router/state/state-service.d.ts +411 -411
  196. package/types/router/state/target-state.d.ts +64 -69
  197. package/types/router/state/views.d.ts +31 -37
  198. package/types/router/state-filters.d.ts +7 -7
  199. package/types/router/state-provider.d.ts +105 -105
  200. package/types/router/template-factory.d.ts +83 -112
  201. package/types/router/transition/hook-builder.d.ts +25 -25
  202. package/types/router/transition/hook-registry.d.ts +68 -83
  203. package/types/router/transition/interface.d.ts +7 -7
  204. package/types/router/transition/reject-factory.d.ts +34 -34
  205. package/types/router/transition/transition-event-type.d.ts +9 -18
  206. package/types/router/transition/transition-hook.d.ts +77 -82
  207. package/types/router/transition/transition-service.d.ts +82 -99
  208. package/types/router/transition/transition.d.ts +369 -377
  209. package/types/router/url/url-config.d.ts +84 -84
  210. package/types/router/url/url-matcher.d.ts +115 -119
  211. package/types/router/url/url-rule.d.ts +114 -124
  212. package/types/router/url/url-rules.d.ts +217 -217
  213. package/types/router/url/url-service.d.ts +264 -269
  214. package/types/router/view/view.d.ts +114 -117
  215. package/types/router/view-scroll.d.ts +2 -2
  216. package/types/services/anchor-scroll.d.ts +2 -8
  217. package/types/services/browser.d.ts +157 -135
  218. package/types/services/cache-factory.d.ts +25 -25
  219. package/types/services/cookie-reader.d.ts +2 -2
  220. package/types/services/document.d.ts +13 -9
  221. package/types/services/http/http.d.ts +145 -0
  222. package/types/services/{http-backend.d.ts → http-backend/http-backend.d.ts} +3 -35
  223. package/types/services/log.d.ts +55 -52
  224. package/types/services/template-request.d.ts +44 -53
  225. package/types/shared/common.d.ts +4 -20
  226. package/types/{constants.d.ts → shared/constants.d.ts} +6 -6
  227. package/types/shared/hof.d.ts +1 -1
  228. package/types/{jqLite.d.ts → shared/jqlite/jqlite.d.ts} +16 -17
  229. package/types/shared/test-utils.d.ts +11 -0
  230. package/types/shared/utils.d.ts +29 -46
  231. package/types-back/global.d.ts +3 -1
  232. package/types-back/index.d.ts +3 -296
  233. package/types/core/compile.d.ts +0 -206
  234. package/types/core/controller.d.ts +0 -42
  235. package/types/core/filter.d.ts +0 -9
  236. package/types/core/interval-factory.d.ts +0 -21
  237. package/types/core/location.d.ts +0 -234
  238. package/types/core/pubsub.d.ts +0 -164
  239. package/types/core/q.d.ts +0 -33
  240. package/types/core/root-scope.d.ts +0 -754
  241. package/types/core/sanitize-uri.d.ts +0 -57
  242. package/types/core/timeout.d.ts +0 -31
  243. package/types/directive/controller.d.ts +0 -6
  244. package/types/directive/events.d.ts +0 -12
  245. package/types/directive/form.d.ts +0 -230
  246. package/types/directive/if.d.ts +0 -17
  247. package/types/directive/include.d.ts +0 -33
  248. package/types/directive/options.d.ts +0 -16
  249. package/types/directive/ref.d.ts +0 -11
  250. package/types/directive/repeat.d.ts +0 -23
  251. package/types/directive/switch.d.ts +0 -23
  252. package/types/directive/transclude.d.ts +0 -15
  253. package/types/services/http.d.ts +0 -157
  254. /package/src/core/cache/{cache-factor.spec.js → cache-factory.spec.js} +0 -0
  255. /package/types/directive/{attrs.d.ts → attrs/attrs.d.ts} +0 -0
  256. /package/types/directive/{change.d.ts → change/change.d.ts} +0 -0
  257. /package/types/directive/{cloak.d.ts → cloak/cloak.d.ts} +0 -0
  258. /package/types/directive/{init.d.ts → init/init.d.ts} +0 -0
  259. /package/types/directive/{list.d.ts → list/list.d.ts} +0 -0
  260. /package/types/directive/{non-bindable.d.ts → non-bindable/non-bindable.d.ts} +0 -0
  261. /package/types/directive/{style.d.ts → style/style.d.ts} +0 -0
  262. /package/types/exts/{aria.d.ts → aria/aria.d.ts} +0 -0
  263. /package/types/exts/{messages.d.ts → messages/messages.d.ts} +0 -0
@@ -1,3 +1,7 @@
1
+ export function $$TaskTrackerFactoryProvider(): void;
2
+ export class $$TaskTrackerFactoryProvider {
3
+ $get: (string | ((log: import("../services/log").angular.LogService) => TaskTracker))[];
4
+ }
1
5
  /**
2
6
  * ! This is a private undocumented service !
3
7
  *
@@ -7,44 +11,47 @@
7
11
  *
8
12
  * A `TaskTracker` can keep track of pending tasks (grouped by type) and can notify interested
9
13
  * parties when all pending tasks (or tasks of a specific type) have been completed.
10
- *
11
- * @param {$log} log - A logger instance (such as `$log`). Used to log error during callback
12
- * execution.
13
- *
14
- *
14
+ * @param {import('../services/log').angular.LogService} log
15
15
  */
16
- export function $$TaskTrackerFactoryProvider(): void;
17
- export class $$TaskTrackerFactoryProvider {
18
- $get: () => any;
19
- }
20
- export function TaskTracker(log: any): void;
16
+ export function TaskTracker(log: import("../services/log").angular.LogService): void;
21
17
  export class TaskTracker {
22
- constructor(log: any);
23
- ALL_TASKS_TYPE: string;
24
- DEFAULT_TASK_TYPE: string;
25
- /**
26
- * Execute the specified function and decrement the appropriate `taskCounts` counter.
27
- * If the counter reaches 0, all corresponding `taskCallbacks` are executed.
28
- *
29
- * @param {Function} fn - The function to execute.
30
- * @param {string=} [taskType=DEFAULT_TASK_TYPE] - The type of task that is being completed.
31
- */
32
- completeTask: (fn: any, taskType: any) => void;
33
- /**
34
- * Increase the task count for the specified task type (or the default task type if non is
35
- * specified).
36
- *
37
- * @param {string=} [taskType=DEFAULT_TASK_TYPE] - The type of task whose count will be increased.
38
- */
39
- incTaskCount: (taskType: any) => void;
40
- /**
41
- * Execute the specified callback when all pending tasks have been completed.
42
- *
43
- * If there are no pending tasks, the callback is executed immediately. You can optionally limit
44
- * the tasks that will be waited for to a specific type, by passing a `taskType`.
45
- *
46
- * @param {function} callback - The function to call when there are no pending tasks.
47
- * @param {string=} [taskType=ALL_TASKS_TYPE] - The type of tasks that will be waited for.
48
- */
49
- notifyWhenNoPendingTasks: (callback: any, taskType: any) => void;
18
+ /**
19
+ * ! This is a private undocumented service !
20
+ *
21
+ * @name $$taskTrackerFactory
22
+ * @description
23
+ * A function to create `TaskTracker` instances.
24
+ *
25
+ * A `TaskTracker` can keep track of pending tasks (grouped by type) and can notify interested
26
+ * parties when all pending tasks (or tasks of a specific type) have been completed.
27
+ * @param {import('../services/log').angular.LogService} log
28
+ */
29
+ constructor(log: import("../services/log").angular.LogService);
30
+ ALL_TASKS_TYPE: string;
31
+ DEFAULT_TASK_TYPE: string;
32
+ /**
33
+ * Execute the specified function and decrement the appropriate `taskCounts` counter.
34
+ * If the counter reaches 0, all corresponding `taskCallbacks` are executed.
35
+ *
36
+ * @param {Function} fn - The function to execute.
37
+ * @param {string=} [taskType=DEFAULT_TASK_TYPE] - The type of task that is being completed.
38
+ */
39
+ completeTask: (fn: any, taskType: any) => void;
40
+ /**
41
+ * Increase the task count for the specified task type (or the default task type if non is
42
+ * specified).
43
+ *
44
+ * @param {string=} [taskType=DEFAULT_TASK_TYPE] - The type of task whose count will be increased.
45
+ */
46
+ incTaskCount: (taskType: any) => void;
47
+ /**
48
+ * Execute the specified callback when all pending tasks have been completed.
49
+ *
50
+ * If there are no pending tasks, the callback is executed immediately. You can optionally limit
51
+ * the tasks that will be waited for to a specific type, by passing a `taskType`.
52
+ *
53
+ * @param {function} callback - The function to call when there are no pending tasks.
54
+ * @param {string=} [taskType=ALL_TASKS_TYPE] - The type of tasks that will be waited for.
55
+ */
56
+ notifyWhenNoPendingTasks: (callback: any, taskType: any) => void;
50
57
  }
@@ -0,0 +1,29 @@
1
+ /**
2
+ *
3
+ * @param {*} $rootScope
4
+ * @param {*} $browser
5
+ * @param {*} $q
6
+ * @param {*} $$q
7
+ * @param {import('../exception-handler').angular.ErrorHandler} $exceptionHandler
8
+ * @returns
9
+ */
10
+ export function $timeout($rootScope: any, $browser: any, $q: any, $$q: any, $exceptionHandler: import("../exception-handler").angular.ErrorHandler): {
11
+ (fn?: (() => any) | undefined, delay?: number | undefined, invokeApply?: boolean | undefined, ...args: any[]): Promise<any>;
12
+ /**
13
+ * @ngdoc method
14
+ * @name $timeout#cancel
15
+ *
16
+ * @description
17
+ * Cancels a task associated with the `promise`. As a result of this, the promise will be
18
+ * resolved with a rejection.
19
+ *
20
+ * @param {Promise=} promise Promise returned by the `$timeout` function.
21
+ * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully
22
+ * canceled.
23
+ */
24
+ cancel(promise?: Promise<any> | undefined): boolean;
25
+ };
26
+ export function $TimeoutProvider(): void;
27
+ export class $TimeoutProvider {
28
+ $get: (string | typeof $timeout)[];
29
+ }
@@ -74,9 +74,7 @@ export function urlIsSameOriginAsBaseUrl(requestUrl: string | object): boolean;
74
74
  * @returns {Function} - A function that receives a URL (string or parsed URL object) and returns
75
75
  * whether it is of an allowed origin.
76
76
  */
77
- export function urlIsAllowedOriginFactory(
78
- trustedOriginUrls: string[],
79
- ): Function;
77
+ export function urlIsAllowedOriginFactory(trustedOriginUrls: string[]): Function;
80
78
  /**
81
79
  * Determine if two URLs share the same origin.
82
80
  *
@@ -87,10 +85,7 @@ export function urlIsAllowedOriginFactory(
87
85
  *
88
86
  * @returns {boolean} - True if both URLs have the same origin, and false otherwise.
89
87
  */
90
- export function urlsAreSameOrigin(
91
- url1: string | any,
92
- url2: string | object,
93
- ): boolean;
88
+ export function urlsAreSameOrigin(url1: string | any, url2: string | object): boolean;
94
89
  /**
95
90
  * Returns the current document base URL.
96
91
  * @returns {string}
@@ -9,13 +9,7 @@ export function ngBindTemplateDirective(): angular.IDirective;
9
9
  /**
10
10
  * TODO: add type
11
11
  */
12
- export const ngBindHtmlDirective: (
13
- | string
14
- | (($parse: any) => {
15
- restrict: string;
16
- compile: (
17
- _tElement: any,
18
- tAttrs: any,
19
- ) => (scope: any, element: any) => void;
20
- })
21
- )[];
12
+ export const ngBindHtmlDirective: (string | (($parse: any) => {
13
+ restrict: string;
14
+ compile: (_tElement: any, tAttrs: any) => (scope: any, element: any) => void;
15
+ }))[];
@@ -53,13 +53,10 @@
53
53
  * element.
54
54
  *
55
55
  */
56
- export const ngClassDirective: (
57
- | string
58
- | (($parse: any) => {
59
- restrict: string;
60
- link(scope: any, element: any, attr: any): void;
61
- })
62
- )[];
56
+ export const ngClassDirective: (string | (($parse: any) => {
57
+ restrict: string;
58
+ link(scope: any, element: any, attr: any): void;
59
+ }))[];
63
60
  /**
64
61
  * @ngdoc directive
65
62
  * @name ngClassOdd
@@ -85,13 +82,10 @@ export const ngClassDirective: (
85
82
  *
86
83
  *
87
84
  */
88
- export const ngClassOddDirective: (
89
- | string
90
- | (($parse: any) => {
91
- restrict: string;
92
- link(scope: any, element: any, attr: any): void;
93
- })
94
- )[];
85
+ export const ngClassOddDirective: (string | (($parse: any) => {
86
+ restrict: string;
87
+ link(scope: any, element: any, attr: any): void;
88
+ }))[];
95
89
  /**
96
90
  * @ngdoc directive
97
91
  * @name ngClassEven
@@ -116,10 +110,7 @@ export const ngClassOddDirective: (
116
110
  * result of the evaluation can be a string representing space delimited class names or an array.
117
111
  *
118
112
  */
119
- export const ngClassEvenDirective: (
120
- | string
121
- | (($parse: any) => {
122
- restrict: string;
123
- link(scope: any, element: any, attr: any): void;
124
- })
125
- )[];
113
+ export const ngClassEvenDirective: (string | (($parse: any) => {
114
+ restrict: string;
115
+ link(scope: any, element: any, attr: any): void;
116
+ }))[];
@@ -0,0 +1,6 @@
1
+ export const ngControllerDirective: (() => {
2
+ restrict: string;
3
+ scope: boolean;
4
+ controller: string;
5
+ priority: number;
6
+ })[];
@@ -0,0 +1,5 @@
1
+ export function createEventDirective($parse: any, $rootScope: any, $exceptionHandler: any, directiveName: any, eventName: any, forceAsync: any): {
2
+ restrict: string;
3
+ compile(_element: any, attr: any): (scope: any, element: any) => void;
4
+ };
5
+ export const ngEventDirectives: {};
@@ -0,0 +1,200 @@
1
+ export function FormController($element: any, $attrs: any, $scope: any, $animate: any, $interpolate: any): void;
2
+ export class FormController {
3
+ constructor($element: any, $attrs: any, $scope: any, $animate: any, $interpolate: any);
4
+ $$controls: any[];
5
+ $error: {};
6
+ $$success: {};
7
+ $pending: any;
8
+ $name: any;
9
+ $dirty: boolean;
10
+ $pristine: boolean;
11
+ $valid: boolean;
12
+ $invalid: boolean;
13
+ $submitted: boolean;
14
+ $$parentForm: {
15
+ $addControl: () => void;
16
+ $getControls: () => any;
17
+ $$renameControl: typeof nullFormRenameControl;
18
+ $removeControl: () => void;
19
+ $setValidity: () => void;
20
+ $setDirty: () => void;
21
+ $setPristine: () => void;
22
+ $setSubmitted: () => void;
23
+ $$setSubmitted: () => void;
24
+ };
25
+ $$element: any;
26
+ $$animate: any;
27
+ /**
28
+ * @ngdoc method
29
+ * @name form.FormController#$rollbackViewValue
30
+ *
31
+ * @description
32
+ * Rollback all form controls pending updates to the `$modelValue`.
33
+ *
34
+ * Updates may be pending by a debounced event or because the input is waiting for a some future
35
+ * event defined in `ng-model-options`. This method is typically needed by the reset button of
36
+ * a form that uses `ng-model-options` to pend updates.
37
+ */
38
+ $rollbackViewValue(): void;
39
+ /**
40
+ * @ngdoc method
41
+ * @name form.FormController#$commitViewValue
42
+ *
43
+ * @description
44
+ * Commit all form controls pending updates to the `$modelValue`.
45
+ *
46
+ * Updates may be pending by a debounced event or because the input is waiting for a some future
47
+ * event defined in `ng-model-options`. This method is rarely needed as `NgModelController`
48
+ * usually handles calling this in response to input events.
49
+ */
50
+ $commitViewValue(): void;
51
+ /**
52
+ * @ngdoc method
53
+ * @name form.FormController#$addControl
54
+ * @param {object} control control object, either a {@link form.FormController} or an
55
+ * {@link ngModel.NgModelController}
56
+ *
57
+ * @description
58
+ * Register a control with the form. Input elements using ngModelController do this automatically
59
+ * when they are linked.
60
+ *
61
+ * Note that the current state of the control will not be reflected on the new parent form. This
62
+ * is not an issue with normal use, as freshly compiled and linked controls are in a `$pristine`
63
+ * state.
64
+ *
65
+ * However, if the method is used programmatically, for example by adding dynamically created controls,
66
+ * or controls that have been previously removed without destroying their corresponding DOM element,
67
+ * it's the developers responsibility to make sure the current state propagates to the parent form.
68
+ *
69
+ * For example, if an input control is added that is already `$dirty` and has `$error` properties,
70
+ * calling `$setDirty()` and `$validate()` afterwards will propagate the state to the parent form.
71
+ */
72
+ $addControl(control: object): void;
73
+ /**
74
+ * @ngdoc method
75
+ * @name form.FormController#$getControls
76
+ * @returns {Array} the controls that are currently part of this form
77
+ *
78
+ * @description
79
+ * This method returns a **shallow copy** of the controls that are currently part of this form.
80
+ * The controls can be instances of {@link form.FormController `FormController`}
81
+ * ({@link ngForm "child-forms"}) and of {@link ngModel.NgModelController `NgModelController`}.
82
+ * If you need access to the controls of child-forms, you have to call `$getControls()`
83
+ * recursively on them.
84
+ * This can be used for example to iterate over all controls to validate them.
85
+ *
86
+ * The controls can be accessed normally, but adding to, or removing controls from the array has
87
+ * no effect on the form. Instead, use {@link form.FormController#$addControl `$addControl()`} and
88
+ * {@link form.FormController#$removeControl `$removeControl()`} for this use-case.
89
+ * Likewise, adding a control to, or removing a control from the form is not reflected
90
+ * in the shallow copy. That means you should get a fresh copy from `$getControls()` every time
91
+ * you need access to the controls.
92
+ */
93
+ $getControls(): any[];
94
+ $$renameControl(control: any, newName: any): void;
95
+ /**
96
+ * @ngdoc method
97
+ * @name form.FormController#$removeControl
98
+ * @param {object} control control object, either a {@link form.FormController} or an
99
+ * {@link ngModel.NgModelController}
100
+ *
101
+ * @description
102
+ * Deregister a control from the form.
103
+ *
104
+ * Input elements using ngModelController do this automatically when they are destroyed.
105
+ *
106
+ * Note that only the removed control's validation state (`$errors`etc.) will be removed from the
107
+ * form. `$dirty`, `$submitted` states will not be changed, because the expected behavior can be
108
+ * different from case to case. For example, removing the only `$dirty` control from a form may or
109
+ * may not mean that the form is still `$dirty`.
110
+ */
111
+ $removeControl(control: object): void;
112
+ /**
113
+ * @ngdoc method
114
+ * @name form.FormController#$setDirty
115
+ *
116
+ * @description
117
+ * Sets the form to a dirty state.
118
+ *
119
+ * This method can be called to add the 'ng-dirty' class and set the form to a dirty
120
+ * state (ng-dirty class). This method will also propagate to parent forms.
121
+ */
122
+ $setDirty(): void;
123
+ /**
124
+ * @ngdoc method
125
+ * @name form.FormController#$setPristine
126
+ *
127
+ * @description
128
+ * Sets the form to its pristine state.
129
+ *
130
+ * This method sets the form's `$pristine` state to true, the `$dirty` state to false, removes
131
+ * the `ng-dirty` class and adds the `ng-pristine` class. Additionally, it sets the `$submitted`
132
+ * state to false.
133
+ *
134
+ * This method will also propagate to all the controls contained in this form.
135
+ *
136
+ * Setting a form back to a pristine state is often useful when we want to 'reuse' a form after
137
+ * saving or resetting it.
138
+ */
139
+ $setPristine(): void;
140
+ /**
141
+ * @ngdoc method
142
+ * @name form.FormController#$setUntouched
143
+ *
144
+ * @description
145
+ * Sets the form to its untouched state.
146
+ *
147
+ * This method can be called to remove the 'ng-touched' class and set the form controls to their
148
+ * untouched state (ng-untouched class).
149
+ *
150
+ * Setting a form controls back to their untouched state is often useful when setting the form
151
+ * back to its pristine state.
152
+ */
153
+ $setUntouched(): void;
154
+ /**
155
+ * @ngdoc method
156
+ * @name form.FormController#$setSubmitted
157
+ *
158
+ * @description
159
+ * Sets the form to its `$submitted` state. This will also set `$submitted` on all child and
160
+ * parent forms of the form.
161
+ */
162
+ $setSubmitted(): void;
163
+ $$setSubmitted(): void;
164
+ }
165
+ export namespace FormController {
166
+ let $inject: string[];
167
+ }
168
+ export function setupValidity(instance: any): void;
169
+ export function addSetValidityMethod(context: any): void;
170
+ export namespace nullFormCtrl {
171
+ export function $addControl(): void;
172
+ export let $getControls: () => any;
173
+ export { nullFormRenameControl as $$renameControl };
174
+ export function $removeControl(): void;
175
+ export function $setValidity(): void;
176
+ export function $setDirty(): void;
177
+ export function $setPristine(): void;
178
+ export function $setSubmitted(): void;
179
+ export function $$setSubmitted(): void;
180
+ }
181
+ export const formDirective: (string | (($timeout: any, $parse: any) => {
182
+ name: string;
183
+ restrict: string;
184
+ require: string[];
185
+ controller: typeof FormController;
186
+ compile: (formElement: any, attr: any) => {
187
+ pre: (scope: any, formElement: any, attr: any, ctrls: any) => void;
188
+ };
189
+ }))[];
190
+ export const ngFormDirective: (string | (($timeout: any, $parse: any) => {
191
+ name: string;
192
+ restrict: string;
193
+ require: string[];
194
+ controller: typeof FormController;
195
+ compile: (formElement: any, attr: any) => {
196
+ pre: (scope: any, formElement: any, attr: any, ctrls: any) => void;
197
+ };
198
+ }))[];
199
+ declare function nullFormRenameControl(control: any, name: any): void;
200
+ export {};
@@ -0,0 +1,8 @@
1
+ export const ngIfDirective: (string | (($animate: any) => {
2
+ multiElement: boolean;
3
+ transclude: string;
4
+ priority: number;
5
+ terminal: boolean;
6
+ restrict: string;
7
+ link($scope: any, $element: any, $attr: any, ctrl: any, $transclude: any): void;
8
+ }))[];
@@ -0,0 +1,14 @@
1
+ export const ngIncludeDirective: (string | (($templateRequest: any, $anchorScroll: any, $animate: any) => {
2
+ restrict: string;
3
+ priority: number;
4
+ terminal: boolean;
5
+ transclude: string;
6
+ controller: () => void;
7
+ compile(element: any, attr: any): (scope: any, $element: any, $attr: any, ctrl: any, $transclude: any) => void;
8
+ }))[];
9
+ export const ngIncludeFillContentDirective: (string | (($compile: any) => {
10
+ restrict: string;
11
+ priority: number;
12
+ require: string;
13
+ link(scope: any, $element: any, $attr: any, ctrl: any): void;
14
+ }))[];
@@ -1,61 +1,19 @@
1
1
  export function weekParser(isoWeek: any, existingDate: any): any;
2
- export function createDateParser(
3
- regexp: any,
4
- mapping: any,
5
- ): (iso: any, previousDate: any) => any;
6
- export function createDateInputType(
7
- type: any,
8
- regexp: any,
9
- parseDate: any,
10
- ): (
11
- scope: any,
12
- element: any,
13
- attr: any,
14
- ctrl: any,
15
- $browser: any,
16
- $filter: any,
17
- $parse: any,
18
- ) => void;
19
- export function badInputChecker(
20
- scope: any,
21
- element: any,
22
- attr: any,
23
- ctrl: any,
24
- parserName: any,
25
- ): void;
2
+ export function createDateParser(regexp: any, mapping: any): (iso: any, previousDate: any) => any;
3
+ export function createDateInputType(type: any, regexp: any, parseDate: any): (scope: any, element: any, attr: any, ctrl: any, $browser: any, $filter: any, $parse: any) => void;
4
+ export function badInputChecker(scope: any, element: any, attr: any, ctrl: any, parserName: any): void;
26
5
  export function numberFormatterParser(ctrl: any): void;
27
6
  export function isNumberInteger(num: any): boolean;
28
7
  export function countDecimals(num: any): number;
29
- export function isValidForStep(
30
- viewValue: any,
31
- stepBase: any,
32
- step: any,
33
- ): boolean;
34
- export function numberInputType(
35
- scope: any,
36
- element: any,
37
- attr: any,
38
- ctrl: any,
39
- $browser: any,
40
- $filter: any,
41
- $parse: any,
42
- ): void;
43
- export function rangeInputType(
44
- scope: any,
45
- element: any,
46
- attr: any,
47
- ctrl: any,
48
- $browser: any,
49
- ): void;
8
+ export function isValidForStep(viewValue: any, stepBase: any, step: any): boolean;
9
+ export function numberInputType(scope: any, element: any, attr: any, ctrl: any, $browser: any, $filter: any, $parse: any): void;
10
+ export function rangeInputType(scope: any, element: any, attr: any, ctrl: any, $browser: any): void;
50
11
  export function hiddenInputBrowserCacheDirective(): {
51
- restrict: string;
52
- priority: number;
53
- compile(
54
- _: any,
55
- attr: any,
56
- ): {
57
- pre(scope: any, element: any): void;
58
- };
12
+ restrict: string;
13
+ priority: number;
14
+ compile(_: any, attr: any): {
15
+ pre(scope: any, element: any): void;
16
+ };
59
17
  };
60
18
  /**
61
19
  * @ngdoc directive
@@ -80,9 +38,9 @@ export function hiddenInputBrowserCacheDirective(): {
80
38
  *
81
39
  */
82
40
  export function ngValueDirective(): {
83
- restrict: string;
84
- priority: number;
85
- compile(tpl: any, tplAttr: any): (scope: any, elm: any, attr: any) => void;
41
+ restrict: string;
42
+ priority: number;
43
+ compile(tpl: any, tplAttr: any): (scope: any, elm: any, attr: any) => void;
86
44
  };
87
45
  export const ISO_DATE_REGEXP: RegExp;
88
46
  export const URL_REGEXP: RegExp;
@@ -176,17 +134,10 @@ export const VALIDITY_STATE_PROPERTY: "validity";
176
134
  * input.
177
135
  *
178
136
  */
179
- export const inputDirective: (
180
- | string
181
- | ((
182
- $browser: any,
183
- $filter: any,
184
- $parse: any,
185
- ) => {
186
- restrict: string;
187
- require: string[];
188
- link: {
137
+ export const inputDirective: (string | (($browser: any, $filter: any, $parse: any) => {
138
+ restrict: string;
139
+ require: string[];
140
+ link: {
189
141
  pre(scope: any, element: any, attr: any, ctrls: any): void;
190
- };
191
- })
192
- )[];
142
+ };
143
+ }))[];