@angular-wave/angular.ts 0.9.4 → 0.9.6

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 (645) hide show
  1. package/@types/index.d.ts +1 -84
  2. package/{src/index.ts → @types/namespace.d.ts} +4 -24
  3. package/@types/router/template-factory.d.ts +2 -2
  4. package/dist/angular-ts.esm.js +3 -3
  5. package/dist/angular-ts.umd.js +3 -3
  6. package/dist/angular-ts.umd.min.js +1 -1
  7. package/package.json +9 -2
  8. package/.github/workflows/ci.yml +0 -104
  9. package/.github/workflows/gh-pages.yml +0 -75
  10. package/.husky/pre-commit +0 -5
  11. package/.prettierignore +0 -9
  12. package/CHANGELOG.md +0 -17667
  13. package/CODE_OF_CONDUCT.md +0 -3
  14. package/CONTRIBUTING.md +0 -247
  15. package/DEVELOPERS.md +0 -499
  16. package/Makefile +0 -60
  17. package/RELEASE.md +0 -86
  18. package/TRIAGING.md +0 -127
  19. package/docs/.cspell.yml +0 -8
  20. package/docs/.github/dependabot.yml +0 -14
  21. package/docs/.nvmrc +0 -1
  22. package/docs/CONTRIBUTING.md +0 -28
  23. package/docs/Dockerfile +0 -4
  24. package/docs/LICENSE +0 -201
  25. package/docs/README.md +0 -217
  26. package/docs/assets/icons/logo.svg +0 -1
  27. package/docs/assets/scss/_variables_project.scss +0 -12
  28. package/docs/assets/scss/_variables_project_after_bs.scss +0 -8
  29. package/docs/assets/scss/index.scss +0 -48
  30. package/docs/config.yaml +0 -15
  31. package/docs/content/_index.md +0 -28
  32. package/docs/content/docs/_index.md +0 -61
  33. package/docs/content/docs/directive/_index.md +0 -4
  34. package/docs/content/docs/directive/app.md +0 -11
  35. package/docs/content/docs/directive/aria.md +0 -0
  36. package/docs/content/docs/directive/bind.md +0 -72
  37. package/docs/content/docs/directive/blur.md +0 -38
  38. package/docs/content/docs/directive/channel.md +0 -37
  39. package/docs/content/docs/directive/class-even.md +0 -47
  40. package/docs/content/docs/directive/class-odd.md +0 -48
  41. package/docs/content/docs/directive/class.md +0 -64
  42. package/docs/content/docs/directive/click.md +0 -41
  43. package/docs/content/docs/directive/cloak.md +0 -74
  44. package/docs/content/docs/directive/copy.md +0 -38
  45. package/docs/content/docs/directive/cut.md +0 -40
  46. package/docs/content/docs/directive/dblclick.md +0 -41
  47. package/docs/content/docs/directive/focus.md +0 -38
  48. package/docs/content/docs/directive/get.md +0 -203
  49. package/docs/content/docs/directive/include.md +0 -7
  50. package/docs/content/docs/directive/keydown.md +0 -38
  51. package/docs/content/docs/directive/keyup.md +0 -38
  52. package/docs/content/docs/directive/load.md +0 -43
  53. package/docs/content/docs/directive/mousedown.md +0 -38
  54. package/docs/content/docs/directive/mouseenter.md +0 -38
  55. package/docs/content/docs/directive/mouseleave.md +0 -38
  56. package/docs/content/docs/directive/mousemove.md +0 -38
  57. package/docs/content/docs/directive/mouseout.md +0 -38
  58. package/docs/content/docs/directive/mouseover.md +0 -38
  59. package/docs/content/docs/directive/mouseup.md +0 -38
  60. package/docs/content/docs/directive/non-bindable.md +0 -28
  61. package/docs/content/docs/filter/_index.md +0 -4
  62. package/docs/content/docs/filter/filter.md +0 -78
  63. package/docs/content/docs/filter/json.md +0 -19
  64. package/docs/content/docs/filter/limit-to.md +0 -30
  65. package/docs/content/docs/filter/order-by.md +0 -123
  66. package/docs/content/docs/provider/_index.md +0 -4
  67. package/docs/content/docs/provider/eventBusProvider.md +0 -35
  68. package/docs/content/docs/provider/locationProvider.md +0 -26
  69. package/docs/content/docs/provider/logProvider.md +0 -59
  70. package/docs/content/docs/provider/sceProvider.md +0 -194
  71. package/docs/content/docs/provider/templateCacheProvider.md +0 -100
  72. package/docs/content/docs/provider/templateRequestProvider.md +0 -5
  73. package/docs/content/docs/service/_index.md +0 -4
  74. package/docs/content/docs/service/compile.md +0 -5
  75. package/docs/content/docs/service/controller.md +0 -5
  76. package/docs/content/docs/service/eventBus.md +0 -56
  77. package/docs/content/docs/service/http.md +0 -161
  78. package/docs/content/docs/service/interpolation.md +0 -5
  79. package/docs/content/docs/service/location.md +0 -57
  80. package/docs/content/docs/service/log.md +0 -113
  81. package/docs/content/docs/service/parse.md +0 -5
  82. package/docs/content/docs/service/rootElement.md +0 -5
  83. package/docs/content/docs/service/rootScope.md +0 -5
  84. package/docs/content/docs/service/sce.md +0 -194
  85. package/docs/content/docs/service/templateCache.md +0 -64
  86. package/docs/content/docs/service/templateRequest.md +0 -5
  87. package/docs/content/docs/service/url.md +0 -5
  88. package/docs/content/docs/values/_index.md +0 -4
  89. package/docs/content/docs/values/document.md +0 -29
  90. package/docs/content/docs/values/window.md +0 -29
  91. package/docs/docker-compose.yaml +0 -12
  92. package/docs/docsy.work +0 -5
  93. package/docs/docsy.work.sum +0 -0
  94. package/docs/go.mod +0 -5
  95. package/docs/go.sum +0 -6
  96. package/docs/hugo-disabled.toml +0 -220
  97. package/docs/hugo.yaml +0 -200
  98. package/docs/layouts/404.html +0 -13
  99. package/docs/layouts/_markup/render-heading.html +0 -1
  100. package/docs/layouts/partials/hooks/head-end.html +0 -3
  101. package/docs/layouts/shortcodes/showcss.html +0 -2
  102. package/docs/layouts/shortcodes/showhtml.html +0 -2
  103. package/docs/layouts/shortcodes/showjs.html +0 -2
  104. package/docs/layouts/shortcodes/showraw.html +0 -1
  105. package/docs/layouts/shortcodes/version.html +0 -1
  106. package/docs/package-lock.json +0 -2293
  107. package/docs/package.json +0 -53
  108. package/docs/static/examples/counter/counter-test.html +0 -13
  109. package/docs/static/examples/counter/counter.html +0 -5
  110. package/docs/static/examples/counter/counter.test.js +0 -28
  111. package/docs/static/examples/document/document.html +0 -3
  112. package/docs/static/examples/eventbus/eventbus-test.html +0 -15
  113. package/docs/static/examples/eventbus/eventbus.html +0 -13
  114. package/docs/static/examples/eventbus/eventbus.js +0 -15
  115. package/docs/static/examples/eventbus/eventbus.test.js +0 -19
  116. package/docs/static/examples/i18n/i18n.html +0 -77
  117. package/docs/static/examples/ng-bind/ng-bind.html +0 -9
  118. package/docs/static/examples/ng-blur/ng-blur.html +0 -9
  119. package/docs/static/examples/ng-channel/ng-channel-test.html +0 -17
  120. package/docs/static/examples/ng-channel/ng-channel.html +0 -24
  121. package/docs/static/examples/ng-channel/ng-channel.test.js +0 -31
  122. package/docs/static/examples/ng-class/ng-class.html +0 -71
  123. package/docs/static/examples/ng-class-even/ng-class-even.html +0 -8
  124. package/docs/static/examples/ng-class-odd/ng-class-odd.html +0 -8
  125. package/docs/static/examples/ng-click/ng-click.html +0 -6
  126. package/docs/static/examples/ng-copy/ng-copy.html +0 -6
  127. package/docs/static/examples/ng-cut/ng-cut.html +0 -6
  128. package/docs/static/examples/ng-dblclick/ng-dblclick.html +0 -10
  129. package/docs/static/examples/ng-focus/ng-focus.html +0 -9
  130. package/docs/static/examples/ng-keydown/ng-keydown.html +0 -9
  131. package/docs/static/examples/ng-keyup/ng-keyup.html +0 -9
  132. package/docs/static/examples/ng-load/ng-load.html +0 -8
  133. package/docs/static/examples/ng-mousedown/ng-mousedown.html +0 -6
  134. package/docs/static/examples/ng-mouseenter/ng-mouseenter.html +0 -4
  135. package/docs/static/examples/ng-mouseleave/ng-mouseleave.html +0 -4
  136. package/docs/static/examples/ng-mousemove/ng-mousemove.html +0 -4
  137. package/docs/static/examples/ng-mouseout/ng-mouseout.html +0 -4
  138. package/docs/static/examples/ng-mouseover/ng-mouseover.html +0 -4
  139. package/docs/static/examples/ng-mouseup/ng-mouseup.html +0 -4
  140. package/docs/static/examples/ng-non-bindable/ng-non-bindable-test.html +0 -13
  141. package/docs/static/examples/ng-non-bindable/ng-non-bindable.html +0 -3
  142. package/docs/static/examples/ng-non-bindable/ng-non-bindable.test.js +0 -11
  143. package/docs/static/examples/window/window.html +0 -4
  144. package/docs/static/typedoc/.nojekyll +0 -1
  145. package/docs/static/typedoc/assets/hierarchy.js +0 -1
  146. package/docs/static/typedoc/assets/highlight.css +0 -29
  147. package/docs/static/typedoc/assets/icons.js +0 -18
  148. package/docs/static/typedoc/assets/icons.svg +0 -1
  149. package/docs/static/typedoc/assets/main.js +0 -60
  150. package/docs/static/typedoc/assets/navigation.js +0 -1
  151. package/docs/static/typedoc/assets/search.js +0 -1
  152. package/docs/static/typedoc/assets/style.css +0 -1633
  153. package/docs/static/typedoc/classes/Location.html +0 -55
  154. package/docs/static/typedoc/classes/LocationProvider.html +0 -20
  155. package/docs/static/typedoc/classes/LogProvider.html +0 -6
  156. package/docs/static/typedoc/classes/PubSub.html +0 -71
  157. package/docs/static/typedoc/classes/PubSubProvider.html +0 -4
  158. package/docs/static/typedoc/classes/TemplateCacheProvider.html +0 -5
  159. package/docs/static/typedoc/hierarchy.html +0 -1
  160. package/docs/static/typedoc/index.html +0 -1
  161. package/docs/static/typedoc/interfaces/DefaultPorts.html +0 -5
  162. package/docs/static/typedoc/interfaces/Html5Mode.html +0 -23
  163. package/docs/static/typedoc/interfaces/HttpHeadersGetter.html +0 -1
  164. package/docs/static/typedoc/interfaces/HttpProviderDefaults.html +0 -31
  165. package/docs/static/typedoc/interfaces/HttpRequestConfigHeaders.html +0 -6
  166. package/docs/static/typedoc/interfaces/HttpRequestTransformer.html +0 -1
  167. package/docs/static/typedoc/interfaces/HttpResponse.html +0 -7
  168. package/docs/static/typedoc/interfaces/HttpResponseTransformer.html +0 -1
  169. package/docs/static/typedoc/interfaces/HttpService.html +0 -38
  170. package/docs/static/typedoc/interfaces/LogService.html +0 -12
  171. package/docs/static/typedoc/interfaces/RequestConfig.html +0 -48
  172. package/docs/static/typedoc/interfaces/RequestShortcutConfig.html +0 -38
  173. package/docs/static/typedoc/interfaces/ServiceProvider.html +0 -5
  174. package/docs/static/typedoc/interfaces/UrlParts.html +0 -9
  175. package/docs/static/typedoc/types/HttpParamSerializer.html +0 -2
  176. package/docs/static/typedoc/types/HttpParams.html +0 -2
  177. package/docs/static/typedoc/types/HttpPromise.html +0 -1
  178. package/docs/static/typedoc/types/HttpResponseStatus.html +0 -1
  179. package/docs/static/typedoc/types/LogCall.html +0 -2
  180. package/docs/static/typedoc/types/LogServiceFactory.html +0 -2
  181. package/docs/static/typedoc/types/UrlChangeListener.html +0 -5
  182. package/docs/static/typedoc/variables/EventBus.html +0 -1
  183. package/docs/static/version.js +0 -13
  184. package/docs/test-results/.last-run.json +0 -4
  185. package/docs/test-results/static-examples-counter-counter-counter-example/error-context.md +0 -50
  186. package/eslint.config.js +0 -26
  187. package/images/android-chrome-192x192.png +0 -0
  188. package/images/android-chrome-512x512.png +0 -0
  189. package/images/apple-touch-icon.png +0 -0
  190. package/images/favicon-16x16.png +0 -0
  191. package/images/favicon-32x32.png +0 -0
  192. package/images/favicon.ico +0 -0
  193. package/images/site.webmanifest +0 -19
  194. package/index.html +0 -86
  195. package/legacy.d.ts +0 -1678
  196. package/playwright.config.ts +0 -81
  197. package/public/jasmine/boot0.js +0 -66
  198. package/public/jasmine/boot1.js +0 -134
  199. package/public/jasmine/jasmine-html.js +0 -970
  200. package/public/jasmine/jasmine.css +0 -323
  201. package/public/jasmine/jasmine.js +0 -11406
  202. package/public/public/README.md +0 -1
  203. package/public/public/circle.html +0 -1
  204. package/public/public/jasmine-helper.css +0 -9
  205. package/public/public/my_child_directive.html +0 -1
  206. package/public/public/my_directive.html +0 -1
  207. package/public/public/my_other_directive.html +0 -1
  208. package/public/public/test.html +0 -1
  209. package/rollup.config.js +0 -51
  210. package/src/angular.js +0 -286
  211. package/src/angular.spec.js +0 -1191
  212. package/src/animations/animate-cache.js +0 -80
  213. package/src/animations/animate-children-directive.js +0 -32
  214. package/src/animations/animate-children-directive.md +0 -80
  215. package/src/animations/animate-css-driver.js +0 -284
  216. package/src/animations/animate-css.html +0 -58
  217. package/src/animations/animate-css.js +0 -915
  218. package/src/animations/animate-css.md +0 -263
  219. package/src/animations/animate-js-driver.js +0 -60
  220. package/src/animations/animate-js.html +0 -47
  221. package/src/animations/animate-js.js +0 -371
  222. package/src/animations/animate-queue.js +0 -859
  223. package/src/animations/animate-runner.js +0 -193
  224. package/src/animations/animate-swap.js +0 -33
  225. package/src/animations/animate-swap.md +0 -88
  226. package/src/animations/animate.html +0 -19
  227. package/src/animations/animate.js +0 -546
  228. package/src/animations/animate.md +0 -933
  229. package/src/animations/animate.spec.js +0 -490
  230. package/src/animations/animation.js +0 -519
  231. package/src/animations/animations.test.js +0 -10
  232. package/src/animations/interface.ts +0 -19
  233. package/src/animations/raf-scheduler.html +0 -19
  234. package/src/animations/raf-scheduler.js +0 -92
  235. package/src/animations/raf-scheduler.spec.js +0 -98
  236. package/src/animations/shared.js +0 -341
  237. package/src/binding.html +0 -19
  238. package/src/binding.spec.js +0 -474
  239. package/src/binding.test.js +0 -10
  240. package/src/core/compile/attributes.js +0 -337
  241. package/src/core/compile/compile.html +0 -19
  242. package/src/core/compile/compile.js +0 -3271
  243. package/src/core/compile/compile.md +0 -1128
  244. package/src/core/compile/compile.spec.js +0 -15574
  245. package/src/core/compile/compile.test.js +0 -12
  246. package/src/core/controller/controller.html +0 -22
  247. package/src/core/controller/controller.js +0 -193
  248. package/src/core/controller/controller.spec.js +0 -334
  249. package/src/core/controller/controller.test.js +0 -12
  250. package/src/core/controller/interface.ts +0 -6
  251. package/src/core/core.html +0 -20
  252. package/src/core/core.test.js +0 -12
  253. package/src/core/di/injector.html +0 -19
  254. package/src/core/di/injector.js +0 -307
  255. package/src/core/di/injector.md +0 -740
  256. package/src/core/di/injector.spec.js +0 -2310
  257. package/src/core/di/injector.test.js +0 -12
  258. package/src/core/di/internal-injector.js +0 -286
  259. package/src/core/di/ng-module.html +0 -19
  260. package/src/core/di/ng-module.js +0 -229
  261. package/src/core/di/ng-module.spec.js +0 -263
  262. package/src/core/di/ng-module.test.js +0 -12
  263. package/src/core/filter/filter.html +0 -19
  264. package/src/core/filter/filter.js +0 -55
  265. package/src/core/filter/filter.md +0 -132
  266. package/src/core/filter/filter.spec.js +0 -149
  267. package/src/core/filter/filter.test.js +0 -12
  268. package/src/core/interpolate/interface.ts +0 -14
  269. package/src/core/interpolate/interpolate.html +0 -22
  270. package/src/core/interpolate/interpolate.js +0 -410
  271. package/src/core/interpolate/interpolate.spec.js +0 -601
  272. package/src/core/interpolate/interpolate.test.js +0 -12
  273. package/src/core/parse/ast/ast-node.ts +0 -81
  274. package/src/core/parse/ast/ast.html +0 -19
  275. package/src/core/parse/ast/ast.js +0 -574
  276. package/src/core/parse/ast/ast.spec.js +0 -1453
  277. package/src/core/parse/ast/ast.test.js +0 -10
  278. package/src/core/parse/ast-type.js +0 -23
  279. package/src/core/parse/interface.ts +0 -84
  280. package/src/core/parse/interpreter.js +0 -915
  281. package/src/core/parse/lexer/lexer.html +0 -19
  282. package/src/core/parse/lexer/lexer.js +0 -338
  283. package/src/core/parse/lexer/lexer.spec.js +0 -303
  284. package/src/core/parse/lexer/lexer.test.js +0 -10
  285. package/src/core/parse/lexer/token.ts +0 -22
  286. package/src/core/parse/parse.html +0 -19
  287. package/src/core/parse/parse.js +0 -337
  288. package/src/core/parse/parse.md +0 -57
  289. package/src/core/parse/parse.spec.js +0 -2107
  290. package/src/core/parse/parse.test.js +0 -10
  291. package/src/core/parse/parser/parser.html +0 -19
  292. package/src/core/parse/parser/parser.js +0 -64
  293. package/src/core/parse/parser/parser.spec.js +0 -8
  294. package/src/core/parse/parser/parser.test.js +0 -10
  295. package/src/core/prop.spec.js +0 -775
  296. package/src/core/root-element.spec.js +0 -14
  297. package/src/core/sanitize/interface.ts +0 -10
  298. package/src/core/sanitize/sanitize-uri.js +0 -75
  299. package/src/core/sanitize/sanitize-uri.spec.js +0 -249
  300. package/src/core/sanitize/sanitize-uri.test.js +0 -12
  301. package/src/core/sanitize/sanitize.html +0 -22
  302. package/src/core/scope/scope.html +0 -19
  303. package/src/core/scope/scope.js +0 -1252
  304. package/src/core/scope/scope.spec.js +0 -3000
  305. package/src/core/scope/scope.test.js +0 -12
  306. package/src/directive/aria/aria.html +0 -19
  307. package/src/directive/aria/aria.js +0 -382
  308. package/src/directive/aria/aria.md +0 -145
  309. package/src/directive/aria/aria.spec.js +0 -1241
  310. package/src/directive/aria/aria.test.js +0 -12
  311. package/src/directive/attrs/attrs.html +0 -19
  312. package/src/directive/attrs/attrs.js +0 -106
  313. package/src/directive/attrs/attrs.md +0 -224
  314. package/src/directive/attrs/attrs.spec.js +0 -71
  315. package/src/directive/attrs/attrs.test.js +0 -12
  316. package/src/directive/attrs/boolean.html +0 -19
  317. package/src/directive/attrs/boolean.spec.js +0 -137
  318. package/src/directive/attrs/boolean.test.js +0 -12
  319. package/src/directive/attrs/element-style.html +0 -22
  320. package/src/directive/attrs/element-style.spec.js +0 -85
  321. package/src/directive/attrs/element-style.test.js +0 -12
  322. package/src/directive/attrs/src.html +0 -19
  323. package/src/directive/attrs/src.spec.js +0 -163
  324. package/src/directive/attrs/src.test.js +0 -12
  325. package/src/directive/bind/bind-html.spec.js +0 -36
  326. package/src/directive/bind/bind.html +0 -20
  327. package/src/directive/bind/bind.js +0 -78
  328. package/src/directive/bind/bind.md +0 -142
  329. package/src/directive/bind/bind.spec.js +0 -314
  330. package/src/directive/bind/bind.test.js +0 -12
  331. package/src/directive/channel/channel.html +0 -19
  332. package/src/directive/channel/channel.js +0 -30
  333. package/src/directive/channel/channel.spec.js +0 -67
  334. package/src/directive/channel/channel.test.js +0 -10
  335. package/src/directive/class/class-test.html +0 -23
  336. package/src/directive/class/class.html +0 -19
  337. package/src/directive/class/class.js +0 -184
  338. package/src/directive/class/class.spec.js +0 -704
  339. package/src/directive/class/class.test.js +0 -12
  340. package/src/directive/cloak/cloak.html +0 -19
  341. package/src/directive/cloak/cloak.js +0 -11
  342. package/src/directive/cloak/cloak.spec.js +0 -44
  343. package/src/directive/cloak/cloak.test.js +0 -12
  344. package/src/directive/controller/controller.html +0 -22
  345. package/src/directive/controller/controller.js +0 -11
  346. package/src/directive/controller/controller.md +0 -46
  347. package/src/directive/controller/controller.spec.js +0 -175
  348. package/src/directive/controller/controller.test.js +0 -12
  349. package/src/directive/events/click.spec.js +0 -35
  350. package/src/directive/events/event.spec.js +0 -267
  351. package/src/directive/events/events-test.html +0 -36
  352. package/src/directive/events/events.html +0 -20
  353. package/src/directive/events/events.js +0 -65
  354. package/src/directive/events/events.md +0 -125
  355. package/src/directive/events/events.test.js +0 -12
  356. package/src/directive/form/form.html +0 -19
  357. package/src/directive/form/form.js +0 -669
  358. package/src/directive/form/form.spec.js +0 -1515
  359. package/src/directive/form/form.test.js +0 -12
  360. package/src/directive/http/delete.spec.js +0 -23
  361. package/src/directive/http/form-router-test.html +0 -44
  362. package/src/directive/http/form-test.html +0 -18
  363. package/src/directive/http/get.spec.js +0 -488
  364. package/src/directive/http/http.html +0 -22
  365. package/src/directive/http/http.js +0 -342
  366. package/src/directive/http/http.test.js +0 -12
  367. package/src/directive/http/interface.ts +0 -36
  368. package/src/directive/http/post-example.html +0 -30
  369. package/src/directive/http/post.spec.js +0 -521
  370. package/src/directive/http/put.spec.js +0 -23
  371. package/src/directive/if/if-animate-css.html +0 -57
  372. package/src/directive/if/if-animate-svg.html +0 -25
  373. package/src/directive/if/if.html +0 -19
  374. package/src/directive/if/if.js +0 -72
  375. package/src/directive/if/if.md +0 -76
  376. package/src/directive/if/if.spec.js +0 -293
  377. package/src/directive/if/if.test.js +0 -114
  378. package/src/directive/include/include.html +0 -19
  379. package/src/directive/include/include.js +0 -151
  380. package/src/directive/include/include.md +0 -87
  381. package/src/directive/include/include.spec.js +0 -734
  382. package/src/directive/include/include.test.js +0 -12
  383. package/src/directive/init/init.html +0 -19
  384. package/src/directive/init/init.js +0 -22
  385. package/src/directive/init/init.md +0 -41
  386. package/src/directive/init/init.spec.js +0 -68
  387. package/src/directive/init/init.test.js +0 -12
  388. package/src/directive/inject/inject.html +0 -19
  389. package/src/directive/inject/inject.js +0 -35
  390. package/src/directive/inject/inject.spec.js +0 -108
  391. package/src/directive/inject/inject.test.js +0 -12
  392. package/src/directive/input/input-example.html +0 -15
  393. package/src/directive/input/input.html +0 -19
  394. package/src/directive/input/input.js +0 -1078
  395. package/src/directive/input/input.md +0 -706
  396. package/src/directive/input/input.spec.js +0 -3700
  397. package/src/directive/input/input.test.js +0 -12
  398. package/src/directive/messages/messages.html +0 -22
  399. package/src/directive/messages/messages.js +0 -349
  400. package/src/directive/messages/messages.md +0 -543
  401. package/src/directive/messages/messages.spec.js +0 -1083
  402. package/src/directive/messages/messages.test.js +0 -12
  403. package/src/directive/model/change.md +0 -25
  404. package/src/directive/model/model.html +0 -19
  405. package/src/directive/model/model.js +0 -1170
  406. package/src/directive/model/model.spec.js +0 -1976
  407. package/src/directive/model/model.test.js +0 -12
  408. package/src/directive/model-options/model-option.test.js +0 -12
  409. package/src/directive/model-options/model-options.html +0 -22
  410. package/src/directive/model-options/model-options.js +0 -142
  411. package/src/directive/model-options/model-options.md +0 -407
  412. package/src/directive/model-options/model-options.spec.js +0 -1022
  413. package/src/directive/non-bindable/non-bindable.html +0 -22
  414. package/src/directive/non-bindable/non-bindable.js +0 -9
  415. package/src/directive/non-bindable/non-bindable.spec.js +0 -59
  416. package/src/directive/non-bindable/non-bindable.test.js +0 -12
  417. package/src/directive/observe/observe-demo.html +0 -184
  418. package/src/directive/observe/observe.html +0 -19
  419. package/src/directive/observe/observe.js +0 -41
  420. package/src/directive/observe/observe.spec.js +0 -106
  421. package/src/directive/observe/observe.test.js +0 -10
  422. package/src/directive/on/on.html +0 -19
  423. package/src/directive/on/on.spec.js +0 -215
  424. package/src/directive/on/on.test.js +0 -12
  425. package/src/directive/options/options-example.html +0 -17
  426. package/src/directive/options/options.html +0 -22
  427. package/src/directive/options/options.js +0 -542
  428. package/src/directive/options/options.md +0 -179
  429. package/src/directive/options/options.spec.js +0 -3554
  430. package/src/directive/options/options.test.js +0 -12
  431. package/src/directive/ref/href.html +0 -19
  432. package/src/directive/ref/href.spec.js +0 -141
  433. package/src/directive/ref/href.test.js +0 -19
  434. package/src/directive/ref/ref.html +0 -19
  435. package/src/directive/ref/ref.js +0 -89
  436. package/src/directive/ref/ref.spec.js +0 -546
  437. package/src/directive/repeat/repeat.html +0 -19
  438. package/src/directive/repeat/repeat.js +0 -333
  439. package/src/directive/repeat/repeat.md +0 -330
  440. package/src/directive/repeat/repeat.spec.js +0 -1209
  441. package/src/directive/repeat/repeat.test.js +0 -12
  442. package/src/directive/script/script.html +0 -19
  443. package/src/directive/script/script.js +0 -17
  444. package/src/directive/script/script.md +0 -11
  445. package/src/directive/script/script.spec.js +0 -47
  446. package/src/directive/script/script.test.js +0 -12
  447. package/src/directive/select/select.html +0 -19
  448. package/src/directive/select/select.js +0 -594
  449. package/src/directive/select/select.md +0 -74
  450. package/src/directive/select/select.spec.js +0 -2566
  451. package/src/directive/select/select.test.js +0 -12
  452. package/src/directive/setter/setter.html +0 -19
  453. package/src/directive/setter/setter.js +0 -59
  454. package/src/directive/setter/setter.spec.js +0 -100
  455. package/src/directive/setter/setter.test.js +0 -12
  456. package/src/directive/show-hide/show-hide.html +0 -22
  457. package/src/directive/show-hide/show-hide.js +0 -65
  458. package/src/directive/show-hide/show-hide.md +0 -255
  459. package/src/directive/show-hide/show-hide.spec.js +0 -268
  460. package/src/directive/show-hide/show-hide.test.js +0 -12
  461. package/src/directive/style/style.html +0 -19
  462. package/src/directive/style/style.js +0 -27
  463. package/src/directive/style/style.md +0 -23
  464. package/src/directive/style/style.spec.js +0 -183
  465. package/src/directive/style/style.test.js +0 -12
  466. package/src/directive/switch/switch.html +0 -19
  467. package/src/directive/switch/switch.js +0 -133
  468. package/src/directive/switch/switch.md +0 -66
  469. package/src/directive/switch/switch.spec.js +0 -509
  470. package/src/directive/switch/switch.test.js +0 -12
  471. package/src/directive/transclude/transclude.js +0 -122
  472. package/src/directive/validators/validators.html +0 -22
  473. package/src/directive/validators/validators.js +0 -346
  474. package/src/directive/validators/validators.spec.js +0 -740
  475. package/src/directive/validators/validators.test.js +0 -12
  476. package/src/filters/filter.js +0 -213
  477. package/src/filters/filter.spec.js +0 -719
  478. package/src/filters/filters.html +0 -22
  479. package/src/filters/filters.js +0 -239
  480. package/src/filters/filters.spec.js +0 -36
  481. package/src/filters/filters.test.js +0 -12
  482. package/src/filters/interface.ts +0 -9
  483. package/src/filters/limit-to.js +0 -55
  484. package/src/filters/limit-to.spec.js +0 -252
  485. package/src/filters/order-by.js +0 -181
  486. package/src/filters/order-by.spec.js +0 -883
  487. package/src/index.js +0 -6
  488. package/src/index.spec.js +0 -11
  489. package/src/injection-tokens.js +0 -81
  490. package/src/interface.ts +0 -430
  491. package/src/ng.js +0 -291
  492. package/src/ng.spec.js +0 -45
  493. package/src/router/common/trace.js +0 -240
  494. package/src/router/directives/component-example.html +0 -37
  495. package/src/router/directives/state-directives.html +0 -22
  496. package/src/router/directives/state-directives.js +0 -393
  497. package/src/router/directives/state-directives.md +0 -435
  498. package/src/router/directives/state-directives.spec.js +0 -1091
  499. package/src/router/directives/state-directives.test.js +0 -10
  500. package/src/router/directives/view-directive.js +0 -489
  501. package/src/router/directives/view-directive.spec.js +0 -1921
  502. package/src/router/directives/view-directive.test.js +0 -10
  503. package/src/router/directives/view-directives.html +0 -22
  504. package/src/router/glob/glob.html +0 -19
  505. package/src/router/glob/glob.js +0 -102
  506. package/src/router/glob/glob.spec.js +0 -108
  507. package/src/router/glob/glob.test.js +0 -12
  508. package/src/router/hooks/core-resolvables.js +0 -38
  509. package/src/router/hooks/ignored-transition.js +0 -25
  510. package/src/router/hooks/invalid-transition.js +0 -14
  511. package/src/router/hooks/lazy-load.js +0 -104
  512. package/src/router/hooks/on-enter-exit-retain.js +0 -55
  513. package/src/router/hooks/redirect-to.js +0 -38
  514. package/src/router/hooks/resolve.js +0 -57
  515. package/src/router/hooks/update-globals.js +0 -34
  516. package/src/router/hooks/url.js +0 -34
  517. package/src/router/hooks/views.js +0 -41
  518. package/src/router/params/interface.ts +0 -626
  519. package/src/router/params/param-factory.js +0 -23
  520. package/src/router/params/param-type.js +0 -133
  521. package/src/router/params/param-types.js +0 -153
  522. package/src/router/params/param.js +0 -243
  523. package/src/router/params/state-params.js +0 -36
  524. package/src/router/path/path-node.js +0 -78
  525. package/src/router/path/path-utils.js +0 -207
  526. package/src/router/resolve/interface.ts +0 -208
  527. package/src/router/resolve/resolvable.js +0 -123
  528. package/src/router/resolve/resolve-context.js +0 -190
  529. package/src/router/router-test-hashbang.html +0 -45
  530. package/src/router/router-test.html +0 -41
  531. package/src/router/router.html +0 -22
  532. package/src/router/router.js +0 -54
  533. package/src/router/router.test.js +0 -12
  534. package/src/router/services.spec.js +0 -52
  535. package/src/router/state/interface.ts +0 -1007
  536. package/src/router/state/state-builder.js +0 -376
  537. package/src/router/state/state-builder.spec.js +0 -86
  538. package/src/router/state/state-matcher.js +0 -64
  539. package/src/router/state/state-object.js +0 -118
  540. package/src/router/state/state-queue-manager.js +0 -95
  541. package/src/router/state/state-registry.js +0 -262
  542. package/src/router/state/state-service.js +0 -687
  543. package/src/router/state/state.html +0 -23
  544. package/src/router/state/state.spec.js +0 -1002
  545. package/src/router/state/state.test.js +0 -12
  546. package/src/router/state/target-state.js +0 -162
  547. package/src/router/state/views.js +0 -195
  548. package/src/router/state-filter.spec.js +0 -139
  549. package/src/router/state-filters.js +0 -46
  550. package/src/router/template-factory.html +0 -19
  551. package/src/router/template-factory.js +0 -249
  552. package/src/router/template-factory.spec.js +0 -146
  553. package/src/router/template-factory.test.js +0 -12
  554. package/src/router/transition/hook-builder.js +0 -137
  555. package/src/router/transition/hook-registry.js +0 -181
  556. package/src/router/transition/interface.js +0 -18
  557. package/src/router/transition/interface.ts +0 -922
  558. package/src/router/transition/reject-factory.js +0 -122
  559. package/src/router/transition/transition-event-type.js +0 -26
  560. package/src/router/transition/transition-hook.js +0 -199
  561. package/src/router/transition/transition-service.js +0 -297
  562. package/src/router/transition/transition.js +0 -653
  563. package/src/router/url/url-config.js +0 -155
  564. package/src/router/url/url-matcher.js +0 -532
  565. package/src/router/url/url-rule.js +0 -231
  566. package/src/router/url/url-rules.js +0 -350
  567. package/src/router/url/url-service.js +0 -446
  568. package/src/router/url/url-service.spec.js +0 -1288
  569. package/src/router/url/url.html +0 -19
  570. package/src/router/url/url.test.js +0 -12
  571. package/src/router/view/interface.ts +0 -51
  572. package/src/router/view/view.html +0 -19
  573. package/src/router/view/view.js +0 -262
  574. package/src/router/view/view.spec.js +0 -100
  575. package/src/router/view/view.test.js +0 -12
  576. package/src/router/view-hook.spec.js +0 -215
  577. package/src/router/view-scroll.js +0 -33
  578. package/src/router/view-scroll.spec.js +0 -72
  579. package/src/services/anchor-scroll/anchor-scroll.html +0 -76
  580. package/src/services/anchor-scroll/anchor-scroll.js +0 -147
  581. package/src/services/exception/exception-handler.js +0 -75
  582. package/src/services/exception/interface.ts +0 -7
  583. package/src/services/http/http.html +0 -23
  584. package/src/services/http/http.js +0 -1109
  585. package/src/services/http/http.spec.js +0 -4320
  586. package/src/services/http/http.test.js +0 -11
  587. package/src/services/http/interface.ts +0 -256
  588. package/src/services/http/template-request.spec.js +0 -220
  589. package/src/services/location/interface.ts +0 -70
  590. package/src/services/location/location.html +0 -22
  591. package/src/services/location/location.js +0 -1006
  592. package/src/services/location/location.spec.js +0 -3792
  593. package/src/services/location/location.test.js +0 -12
  594. package/src/services/log/interface.ts +0 -39
  595. package/src/services/log/log.html +0 -19
  596. package/src/services/log/log.js +0 -74
  597. package/src/services/log/log.spec.js +0 -64
  598. package/src/services/log/log.test.js +0 -12
  599. package/src/services/pubsub/pubsub.html +0 -19
  600. package/src/services/pubsub/pubsub.js +0 -349
  601. package/src/services/pubsub/pubsub.spec.js +0 -400
  602. package/src/services/pubsub/pubsub.test.js +0 -12
  603. package/src/services/sce/sce.html +0 -19
  604. package/src/services/sce/sce.js +0 -852
  605. package/src/services/sce/sce.spec.js +0 -617
  606. package/src/services/sce/sce.test.js +0 -12
  607. package/src/services/template-cache/template-cache.html +0 -22
  608. package/src/services/template-cache/template-cache.js +0 -15
  609. package/src/services/template-cache/template-cache.spec.js +0 -134
  610. package/src/services/template-cache/template-cache.test.js +0 -12
  611. package/src/services/template-request/interface.ts +0 -23
  612. package/src/services/template-request/template-request.js +0 -142
  613. package/src/shared/cache.js +0 -7
  614. package/src/shared/common.js +0 -365
  615. package/src/shared/common.spec.js +0 -294
  616. package/src/shared/constants.js +0 -21
  617. package/src/shared/dom.js +0 -716
  618. package/src/shared/hof.js +0 -157
  619. package/src/shared/hof.spec.js +0 -60
  620. package/src/shared/interface.ts +0 -21
  621. package/src/shared/min-err.spec.js +0 -178
  622. package/src/shared/noderef.js +0 -225
  623. package/src/shared/predicates.js +0 -34
  624. package/src/shared/queue.js +0 -105
  625. package/src/shared/queue.spec.js +0 -80
  626. package/src/shared/shared.html +0 -24
  627. package/src/shared/shared.test.js +0 -12
  628. package/src/shared/strings.js +0 -142
  629. package/src/shared/strings.spec.js +0 -40
  630. package/src/shared/test-utils.js +0 -47
  631. package/src/shared/url-utils/interface.ts +0 -54
  632. package/src/shared/url-utils/url-utils.html +0 -22
  633. package/src/shared/url-utils/url-utils.js +0 -122
  634. package/src/shared/url-utils/url-utils.spec.js +0 -148
  635. package/src/shared/url-utils/url-utils.test.js +0 -12
  636. package/src/shared/utils.js +0 -1255
  637. package/src/shared/utils.spec.js +0 -178
  638. package/src/src.html +0 -21
  639. package/src/src.test.js +0 -10
  640. package/tsconfig.json +0 -19
  641. package/tsconfig.types.json +0 -14
  642. package/typedoc.json +0 -8
  643. package/utils/express.js +0 -203
  644. package/utils/version.cjs +0 -23
  645. package/vite.config.js +0 -14
package/legacy.d.ts DELETED
@@ -1,1678 +0,0 @@
1
- declare namespace angular {
2
- // not directly implemented, but ensures that constructed class implements $get
3
-
4
- ///////////////////////////////////////////////////////////////////////////
5
- // Module
6
- // see http://docs.angularjs.org/api/angular.Module
7
- ///////////////////////////////////////////////////////////////////////////
8
- interface IModule {
9
- /**
10
- * Use this method to register a component.
11
- *
12
- * @param name The name of the component.
13
- * @param options A definition object passed into the component.
14
- */
15
- component(name: string, options: IComponentOptions): IModule;
16
- /**
17
- * Use this method to register a component.
18
- *
19
- * @param object Object map of components where the keys are the names and the values are the component definition objects
20
- */
21
- component(object: { [componentName: string]: IComponentOptions }): IModule;
22
- /**
23
- * Use this method to register work which needs to be performed on module loading.
24
- *
25
- * @param configFn Execute this function on module load. Useful for service configuration.
26
- */
27
- config(configFn: Function): IModule;
28
- /**
29
- * Use this method to register work which needs to be performed on module loading.
30
- *
31
- * @param inlineAnnotatedFunction Execute this function on module load. Useful for service configuration.
32
- */
33
- config(inlineAnnotatedFunction: any[]): IModule;
34
- config(object: Object): IModule;
35
- /**
36
- * Register a constant service, such as a string, a number, an array, an object or a function, with the $injector. Unlike value it can be injected into a module configuration function (see config) and it cannot be overridden by an Angular decorator.
37
- *
38
- * @param name The name of the constant.
39
- * @param value The constant value.
40
- */
41
- constant<T>(name: string, value: T): IModule;
42
- constant(object: Object): IModule;
43
- /**
44
- * The $controller service is used by Angular to create new controllers.
45
- *
46
- * This provider allows controller registration via the register method.
47
- *
48
- * @param name Controller name, or an object map of controllers where the keys are the names and the values are the constructors.
49
- * @param controllerConstructor Controller constructor fn (optionally decorated with DI annotations in the array notation).
50
- */
51
- controller(
52
- name: string,
53
- controllerConstructor: Injectable<IControllerConstructor>,
54
- ): IModule;
55
- controller(object: {
56
- [name: string]: Injectable<IControllerConstructor>;
57
- }): IModule;
58
- /**
59
- * Register a new directive with the compiler.
60
- *
61
- * @param name Name of the directive in camel-case (i.e. ngBind which will match as ng-bind)
62
- * @param directiveFactory An injectable directive factory function.
63
- */
64
- directive<
65
- TScope extends IScope = IScope,
66
- TElement extends JQLite = JQLite,
67
- TAttributes extends IAttributes = IAttributes,
68
- TController extends IDirectiveController = IController,
69
- >(
70
- name: string,
71
- directiveFactory: Injectable<
72
- IDirectiveFactory<TScope, TElement, TAttributes, TController>
73
- >,
74
- ): IModule;
75
- directive<
76
- TScope extends IScope = IScope,
77
- TElement extends JQLite = JQLite,
78
- TAttributes extends IAttributes = IAttributes,
79
- TController extends IDirectiveController = IController,
80
- >(object: {
81
- [directiveName: string]: Injectable<
82
- IDirectiveFactory<TScope, TElement, TAttributes, TController>
83
- >;
84
- }): IModule;
85
-
86
- /**
87
- * Register a service factory, which will be called to return the service instance. This is short for registering a service where its provider consists of only a $get property, which is the given service factory function. You should use $provide.factory(getFn) if you do not need to configure your service in a provider.
88
- *
89
- * @param name The name of the instance.
90
- * @param $getFn The $getFn for the instance creation. Internally this is a short hand for $provide.provider(name, {$get: $getFn}).
91
- */
92
- factory(name: string, $getFn: Injectable<Function>): IModule;
93
- factory(object: { [name: string]: Injectable<Function> }): IModule;
94
- filter(
95
- name: string,
96
- filterFactoryFunction: Injectable<FilterFactory>,
97
- ): IModule;
98
- filter(object: { [name: string]: Injectable<FilterFactory> }): IModule;
99
- provider(
100
- name: string,
101
- serviceProviderFactory: IServiceProviderFactory,
102
- ): IModule;
103
- provider(
104
- name: string,
105
- serviceProviderConstructor: IServiceProviderClass,
106
- ): IModule;
107
- provider(name: string, inlineAnnotatedConstructor: any[]): IModule;
108
- provider(name: string, providerObject: IServiceProvider): IModule;
109
- provider(object: Object): IModule;
110
- /**
111
- * Run blocks are the closest thing in Angular to the main method. A run block is the code which needs to run to kickstart the application. It is executed after all of the service have been configured and the injector has been created. Run blocks typically contain code which is hard to unit-test, and for this reason should be declared in isolated modules, so that they can be ignored in the unit-tests.
112
- */
113
- run(initializationFunction: Injectable<Function>): IModule;
114
- /**
115
- * Register a service constructor, which will be invoked with new to create the service instance. This is short for registering a service where its provider's $get property is a factory function that returns an instance instantiated by the injector from the service constructor function.
116
- *
117
- * @param name The name of the instance.
118
- * @param serviceConstructor An injectable class (constructor function) that will be instantiated.
119
- */
120
- service(name: string, serviceConstructor: Injectable<Function>): IModule;
121
- service(object: { [name: string]: Injectable<Function> }): IModule;
122
- /**
123
- * Register a value service with the $injector, such as a string, a number, an array, an object or a function. This is short for registering a service where its provider's $get property is a factory function that takes no arguments and returns the value service.
124
-
125
- Value services are similar to constant services, except that they cannot be injected into a module configuration function (see config) but they can be overridden by an Angular decorator.
126
- *
127
- * @param name The name of the instance.
128
- * @param value The value.
129
- */
130
- value<T>(name: string, value: T): IModule;
131
- value(object: Object): IModule;
132
-
133
- /**
134
- * Register a service decorator with the $injector. A service decorator intercepts the creation of a service, allowing it to override or modify the behaviour of the service. The object returned by the decorator may be the original service, or a new service object which replaces or wraps and delegates to the original service.
135
- * @param name The name of the service to decorate
136
- * @param decorator This function will be invoked when the service needs to be instantiated and should return the decorated service instance. The function is called using the injector.invoke method and is therefore fully injectable. Local injection arguments: $delegate - The original service instance, which can be monkey patched, configured, decorated or delegated to.
137
- */
138
- decorator(name: string, decorator: Injectable<Function>): IModule;
139
-
140
- // Properties
141
- name: string;
142
- requires: string[];
143
- }
144
-
145
- ///////////////////////////////////////////////////////////////////////////
146
- // Attributes
147
- // see http://docs.angularjs.org/api/ng/type/$compile.directive.Attributes
148
- ///////////////////////////////////////////////////////////////////////////
149
- interface IAttributes {
150
- /**
151
- * this is necessary to be able to access the scoped attributes. it's not very elegant
152
- * because you have to use attrs['foo'] instead of attrs.foo but I don't know of a better way
153
- * this should really be limited to return string but it creates this problem: http://stackoverflow.com/q/17201854/165656
154
- */
155
- [name: string]: any;
156
-
157
- /**
158
- * Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with x- or data-) to its normalized, camelCase form.
159
- *
160
- * Also there is special case for Moz prefix starting with upper case letter.
161
- *
162
- * For further information check out the guide on @see https://docs.angularjs.org/guide/directive#matching-directives
163
- */
164
- $normalize(name: string): string;
165
-
166
- /**
167
- * Adds the CSS class value specified by the classVal parameter to the
168
- * element. If animations are enabled then an animation will be triggered
169
- * for the class addition.
170
- */
171
- $addClass(classVal: string): void;
172
-
173
- /**
174
- * Removes the CSS class value specified by the classVal parameter from the
175
- * element. If animations are enabled then an animation will be triggered for
176
- * the class removal.
177
- */
178
- $removeClass(classVal: string): void;
179
-
180
- /**
181
- * Adds and removes the appropriate CSS class values to the element based on the difference between
182
- * the new and old CSS class values (specified as newClasses and oldClasses).
183
- */
184
- $updateClass(newClasses: string, oldClasses: string): void;
185
-
186
- /**
187
- * Set DOM element attribute value.
188
- */
189
- $set(key: string, value: any): void;
190
-
191
- /**
192
- * Observes an interpolated attribute.
193
- * The observer function will be invoked once during the next $digest
194
- * following compilation. The observer is then invoked whenever the
195
- * interpolated value changes.
196
- */
197
- $observe<T>(name: string, fn: (value?: T) => any): Function;
198
-
199
- /**
200
- * A map of DOM element attribute names to the normalized name. This is needed
201
- * to do reverse lookup from normalized name back to actual name.
202
- */
203
- $attr: Object;
204
- }
205
-
206
- /**
207
- * form.FormController - type in module ng
208
- * see https://docs.angularjs.org/api/ng/type/form.FormController
209
- */
210
- interface IFormController {
211
- /**
212
- * Indexer which should return ng.INgModelController for most properties but cannot because of "All named properties must be assignable to string indexer type" constraint - see https://github.com/Microsoft/TypeScript/issues/272
213
- */
214
- [name: string]: any;
215
-
216
- $pristine: boolean;
217
- $dirty: boolean;
218
- $valid: boolean;
219
- $invalid: boolean;
220
- $submitted: boolean;
221
- $error: {
222
- [validationErrorKey: string]: Array<INgModelController | IFormController>;
223
- };
224
- $name?: string | undefined;
225
- $pending?:
226
- | {
227
- [validationErrorKey: string]: Array<
228
- INgModelController | IFormController
229
- >;
230
- }
231
- | undefined;
232
- $addControl(control: INgModelController | IFormController): void;
233
- $getControls(): ReadonlyArray<INgModelController | IFormController>;
234
- $removeControl(control: INgModelController | IFormController): void;
235
- $setValidity(
236
- validationErrorKey: string,
237
- isValid: boolean,
238
- control: INgModelController | IFormController,
239
- ): void;
240
- $setDirty(): void;
241
- $setPristine(): void;
242
- $commitViewValue(): void;
243
- $rollbackViewValue(): void;
244
- $setSubmitted(): void;
245
- $setUntouched(): void;
246
- }
247
-
248
- ///////////////////////////////////////////////////////////////////////////
249
- // NgModelController
250
- // see http://docs.angularjs.org/api/ng/type/ngModel.NgModelController
251
- ///////////////////////////////////////////////////////////////////////////
252
- interface INgModelController {
253
- $render(): void;
254
- $setValidity(validationErrorKey: string, isValid: boolean): void;
255
- // Documentation states viewValue and modelValue to be a string but other
256
- // types do work and it's common to use them.
257
- $setViewValue(value: any, trigger?: string): void;
258
- $setPristine(): void;
259
- $setDirty(): void;
260
- $validate(): void;
261
- $setTouched(): void;
262
- $setUntouched(): void;
263
- $rollbackViewValue(): void;
264
- $commitViewValue(): void;
265
- $processModelValue(): void;
266
- $isEmpty(value: any): boolean;
267
- $overrideModelOptions(options: INgModelOptions): void;
268
-
269
- $viewValue: any;
270
-
271
- $modelValue: any;
272
-
273
- $parsers: IModelParser[];
274
- $formatters: IModelFormatter[];
275
- $viewChangeListeners: IModelViewChangeListener[];
276
- $error: { [validationErrorKey: string]: boolean };
277
- $name?: string | undefined;
278
-
279
- $touched: boolean;
280
- $untouched: boolean;
281
-
282
- $validators: IModelValidators;
283
- $asyncValidators: IAsyncModelValidators;
284
-
285
- $pending?: { [validationErrorKey: string]: boolean } | undefined;
286
- $pristine: boolean;
287
- $dirty: boolean;
288
- $valid: boolean;
289
- $invalid: boolean;
290
- }
291
-
292
- // Allows tuning how model updates are done.
293
- // https://docs.angularjs.org/api/ng/directive/ngModelOptions
294
- interface INgModelOptions {
295
- updateOn?: string | undefined;
296
- debounce?: number | { [key: string]: number } | undefined;
297
- allowInvalid?: boolean | undefined;
298
- getterSetter?: boolean | undefined;
299
- timezone?: string | undefined;
300
- /**
301
- * Defines if the time and datetime-local types should show seconds and milliseconds.
302
- * The option follows the format string of date filter.
303
- * By default, the options is undefined which is equal to 'ss.sss' (seconds and milliseconds)
304
- */
305
- timeSecondsFormat?: string | undefined;
306
- /**
307
- * Defines if the time and datetime-local types should strip the seconds and milliseconds
308
- * from the formatted value if they are zero. This option is applied after `timeSecondsFormat`
309
- */
310
- timeStripZeroSeconds?: boolean | undefined;
311
- }
312
-
313
- interface IModelValidators {
314
- /**
315
- * viewValue is any because it can be an object that is called in the view like $viewValue.name:$viewValue.subName
316
- */
317
- [index: string]: (modelValue: any, viewValue: any) => boolean;
318
- }
319
-
320
- interface IAsyncModelValidators {
321
- [index: string]: (modelValue: any, viewValue: any) => IPromise<any>;
322
- }
323
-
324
- interface IModelParser {
325
- (value: any): any;
326
- }
327
-
328
- interface IModelFormatter {
329
- (value: any): any;
330
- }
331
-
332
- interface IModelViewChangeListener {
333
- (): void;
334
- }
335
-
336
- /**
337
- * $scope for ngRepeat directive.
338
- * see https://docs.angularjs.org/api/ng/directive/ngRepeat
339
- */
340
- interface IRepeatScope extends IScope {
341
- /**
342
- * iterator offset of the repeated element (0..length-1).
343
- */
344
- $index: number;
345
-
346
- /**
347
- * true if the repeated element is first in the iterator.
348
- */
349
- $first: boolean;
350
-
351
- /**
352
- * true if the repeated element is between the first and last in the iterator.
353
- */
354
- $middle: boolean;
355
-
356
- /**
357
- * true if the repeated element is last in the iterator.
358
- */
359
- $last: boolean;
360
-
361
- /**
362
- * true if the iterator position $index is even (otherwise false).
363
- */
364
- $even: boolean;
365
-
366
- /**
367
- * true if the iterator position $index is odd (otherwise false).
368
- */
369
- $odd: boolean;
370
- }
371
-
372
- interface IAngularEvent {
373
- /**
374
- * the scope on which the event was $emit-ed or $broadcast-ed.
375
- */
376
- targetScope: IScope;
377
- /**
378
- * the scope that is currently handling the event. Once the event propagates through the scope hierarchy, this property is set to null.
379
- */
380
- currentScope: IScope;
381
- /**
382
- * name of the event.
383
- */
384
- name: string;
385
- /**
386
- * calling stopPropagation function will cancel further event propagation (available only for events that were $emit-ed).
387
- */
388
- stopPropagation?(): void;
389
- /**
390
- * calling preventDefault sets defaultPrevented flag to true.
391
- */
392
- preventDefault(): void;
393
- /**
394
- * true if preventDefault was called.
395
- */
396
- defaultPrevented: boolean;
397
- }
398
-
399
- /**
400
- * $filter - $filterProvider - service in module ng
401
- *
402
- * Filters are used for formatting data displayed to the user.
403
- *
404
- * see https://docs.angularjs.org/api/ng/service/$filter
405
- */
406
- interface IFilterService {
407
- (name: "filter"): IFilterFilter;
408
- (name: "currency"): IFilterCurrency;
409
- (name: "number"): IFilterNumber;
410
- (name: "date"): IFilterDate;
411
- (name: "json"): IFilterJson;
412
- (name: "lowercase"): IFilterLowercase;
413
- (name: "uppercase"): IFilterUppercase;
414
- (name: "limitTo"): IFilterLimitTo;
415
- (name: "orderBy"): IFilterOrderBy;
416
- /**
417
- * Usage:
418
- * $filter(name);
419
- *
420
- * @param name Name of the filter function to retrieve
421
- */
422
- <T>(name: string): T;
423
- }
424
-
425
- interface IFilterFilter {
426
- <T>(
427
- array: T[],
428
- expression:
429
- | string
430
- | IFilterFilterPatternObject
431
- | IFilterFilterPredicateFunc<T>,
432
- comparator?: IFilterFilterComparatorFunc<T> | boolean,
433
- ): T[];
434
- }
435
-
436
- interface IFilterFilterPatternObject {
437
- [name: string]: any;
438
- }
439
-
440
- interface IFilterFilterPredicateFunc<T> {
441
- (value: T, index: number, array: T[]): boolean;
442
- }
443
-
444
- interface IFilterFilterComparatorFunc<T> {
445
- (actual: T, expected: T): boolean;
446
- }
447
-
448
- interface IFilterOrderByItem {
449
- value: any;
450
- type: string;
451
- index: any;
452
- }
453
-
454
- interface IFilterOrderByComparatorFunc {
455
- (left: IFilterOrderByItem, right: IFilterOrderByItem): -1 | 0 | 1;
456
- }
457
-
458
- interface IFilterCurrency {
459
- /**
460
- * Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default symbol for current locale is used.
461
- * @param amount Input to filter.
462
- * @param symbol Currency symbol or identifier to be displayed.
463
- * @param fractionSize Number of decimal places to round the amount to, defaults to default max fraction size for current locale
464
- * @return Formatted number
465
- */
466
- (amount: number, symbol?: string, fractionSize?: number): string;
467
- }
468
-
469
- interface IFilterNumber {
470
- /**
471
- * Formats a number as text.
472
- * @param number Number to format.
473
- * @param fractionSize Number of decimal places to round the number to. If this is not provided then the fraction size is computed from the current locale's number formatting pattern. In the case of the default locale, it will be 3.
474
- * @return Number rounded to decimalPlaces and places a “,” after each third digit.
475
- */
476
- (value: number | string, fractionSize?: number | string): string;
477
- }
478
-
479
- interface IFilterDate {
480
- /**
481
- * Formats date to a string based on the requested format.
482
- *
483
- * @param date Date to format either as Date object, milliseconds (string or number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is specified in the string input, the time is considered to be in the local timezone.
484
- * @param format Formatting rules (see Description). If not specified, mediumDate is used.
485
- * @param timezone Timezone to be used for formatting. It understands UTC/GMT and the continental US time zone abbreviations, but for general use, use a time zone offset, for example, '+0430' (4 hours, 30 minutes east of the Greenwich meridian) If not specified, the timezone of the browser will be used.
486
- * @return Formatted string or the input if input is not recognized as date/millis.
487
- */
488
- (date: Date | number | string, format?: string, timezone?: string): string;
489
- }
490
-
491
- interface IFilterJson {
492
- /**
493
- * Allows you to convert a JavaScript object into JSON string.
494
- * @param object Any JavaScript object (including arrays and primitive types) to filter.
495
- * @param spacing The number of spaces to use per indentation, defaults to 2.
496
- * @return JSON string.
497
- */
498
- (object: any, spacing?: number): string;
499
- }
500
-
501
- interface IFilterLowercase {
502
- /**
503
- * Converts string to lowercase.
504
- */
505
- (value: string): string;
506
- }
507
-
508
- interface IFilterUppercase {
509
- /**
510
- * Converts string to uppercase.
511
- */
512
- (value: string): string;
513
- }
514
-
515
- interface IFilterLimitTo {
516
- /**
517
- * Creates a new array containing only a specified number of elements. The elements are taken from either the beginning or the end of the source array, string or number, as specified by the value and sign (positive or negative) of limit.
518
- * @param input Source array to be limited.
519
- * @param limit The length of the returned array. If the limit number is positive, limit number of items from the beginning of the source array/string are copied. If the number is negative, limit number of items from the end of the source array are copied. The limit will be trimmed if it exceeds array.length. If limit is undefined, the input will be returned unchanged.
520
- * @param begin Index at which to begin limitation. As a negative index, begin indicates an offset from the end of input. Defaults to 0.
521
- * @return A new sub-array of length limit or less if input array had less than limit elements.
522
- */
523
- <T>(input: T[], limit: string | number, begin?: string | number): T[];
524
- /**
525
- * Creates a new string containing only a specified number of elements. The elements are taken from either the beginning or the end of the source string or number, as specified by the value and sign (positive or negative) of limit. If a number is used as input, it is converted to a string.
526
- * @param input Source string or number to be limited.
527
- * @param limit The length of the returned string. If the limit number is positive, limit number of items from the beginning of the source string are copied. If the number is negative, limit number of items from the end of the source string are copied. The limit will be trimmed if it exceeds input.length. If limit is undefined, the input will be returned unchanged.
528
- * @param begin Index at which to begin limitation. As a negative index, begin indicates an offset from the end of input. Defaults to 0.
529
- * @return A new substring of length limit or less if input had less than limit elements.
530
- */
531
- (
532
- input: string | number,
533
- limit: string | number,
534
- begin?: string | number,
535
- ): string;
536
- }
537
-
538
- interface IFilterOrderBy {
539
- /**
540
- * Orders a specified array by the expression predicate. It is ordered alphabetically for strings and numerically for numbers. Note: if you notice numbers are not being sorted as expected, make sure they are actually being saved as numbers and not strings.
541
- * @param array The array to sort.
542
- * @param expression A predicate to be used by the comparator to determine the order of elements.
543
- * @param reverse Reverse the order of the array.
544
- * @param comparator Function used to determine the relative order of value pairs.
545
- * @return An array containing the items from the specified collection, ordered by a comparator function based on the values computed using the expression predicate.
546
- */
547
- <T>(
548
- array: T[],
549
- expression:
550
- | string
551
- | ((value: T) => any)
552
- | Array<((value: T) => any) | string>,
553
- reverse?: boolean,
554
- comparator?: IFilterOrderByComparatorFunc,
555
- ): T[];
556
- }
557
-
558
- /**
559
- * $filterProvider - $filter - provider in module ng
560
- *
561
- * Filters are just functions which transform input to an output. However filters need to be Dependency Injected. To achieve this a filter definition consists of a factory function which is annotated with dependencies and is responsible for creating a filter function.
562
- *
563
- * see https://docs.angularjs.org/api/ng/provider/$filterProvider
564
- */
565
- interface IFilterProvider extends IServiceProvider {
566
- /**
567
- * register(name);
568
- *
569
- * @param name Name of the filter function, or an object map of filters where the keys are the filter names and the values are the filter factories. Note: Filter names must be valid angular Expressions identifiers, such as uppercase or orderBy. Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace your filters, then you can use capitalization (myappSubsectionFilterx) or underscores (myapp_subsection_filterx).
570
- */
571
- register(name: string | {}): IServiceProvider;
572
- }
573
-
574
- ///////////////////////////////////////////////////////////////////////////
575
- // LocaleService
576
- // see http://docs.angularjs.org/api/ng/service/$locale
577
- ///////////////////////////////////////////////////////////////////////////
578
- interface ILocaleService {
579
- id: string;
580
-
581
- // These are not documented
582
- // Check angular's i18n files for exemples
583
- NUMBER_FORMATS: ILocaleNumberFormatDescriptor;
584
- DATETIME_FORMATS: ILocaleDateTimeFormatDescriptor;
585
- pluralCat(num: any): string;
586
- }
587
-
588
- interface ILocaleNumberFormatDescriptor {
589
- DECIMAL_SEP: string;
590
- GROUP_SEP: string;
591
- PATTERNS: ILocaleNumberPatternDescriptor[];
592
- CURRENCY_SYM: string;
593
- }
594
-
595
- interface ILocaleNumberPatternDescriptor {
596
- minInt: number;
597
- minFrac: number;
598
- maxFrac: number;
599
- posPre: string;
600
- posSuf: string;
601
- negPre: string;
602
- negSuf: string;
603
- gSize: number;
604
- lgSize: number;
605
- }
606
-
607
- interface ILocaleDateTimeFormatDescriptor {
608
- MONTH: string[];
609
- SHORTMONTH: string[];
610
- DAY: string[];
611
- SHORTDAY: string[];
612
- AMPMS: string[];
613
- medium: string;
614
- short: string;
615
- fullDate: string;
616
- longDate: string;
617
- mediumDate: string;
618
- shortDate: string;
619
- mediumTime: string;
620
- shortTime: string;
621
- }
622
-
623
- ///////////////////////////////////////////////////////////////////////////
624
- // LogService
625
- // see http://docs.angularjs.org/api/ng/service/$log
626
- // see http://docs.angularjs.org/api/ng/provider/$logProvider
627
- ///////////////////////////////////////////////////////////////////////////
628
- interface ILogService {
629
- debug: ILogCall;
630
- error: ILogCall;
631
- info: ILogCall;
632
- log: ILogCall;
633
- warn: ILogCall;
634
- }
635
-
636
- interface ILogProvider extends IServiceProvider {
637
- debugEnabled(): boolean;
638
- debugEnabled(enabled: boolean): ILogProvider;
639
- }
640
-
641
- // We define this as separate interface so we can reopen it later for
642
- // the ngMock module.
643
- interface ILogCall {
644
- (...args: any[]): void;
645
- }
646
-
647
- ///////////////////////////////////////////////////////////////////////////
648
- // ParseService
649
- // see http://docs.angularjs.org/api/ng/service/$parse
650
- // see http://docs.angularjs.org/api/ng/provider/$parseProvider
651
- ///////////////////////////////////////////////////////////////////////////
652
- interface IParseService {
653
- (
654
- expression: string,
655
- interceptorFn?: (value: any, scope: IScope, locals: any) => any,
656
- expensiveChecks?: boolean,
657
- ): ICompiledExpression;
658
- }
659
-
660
- interface IParseProvider {
661
- logPromiseWarnings(): boolean;
662
- logPromiseWarnings(value: boolean): IParseProvider;
663
-
664
- unwrapPromises(): boolean;
665
- unwrapPromises(value: boolean): IParseProvider;
666
-
667
- /**
668
- * Configure $parse service to add literal values that will be present as literal at expressions.
669
- *
670
- * @param literalName Token for the literal value. The literal name value must be a valid literal name.
671
- * @param literalValue Value for this literal. All literal values must be primitives or `undefined`.
672
- */
673
- addLiteral(literalName: string, literalValue: any): void;
674
-
675
- /**
676
- * Allows defining the set of characters that are allowed in Angular expressions. The function identifierStart will get called to know if a given character is a valid character to be the first character for an identifier. The function identifierContinue will get called to know if a given character is a valid character to be a follow-up identifier character. The functions identifierStart and identifierContinue will receive as arguments the single character to be identifier and the character code point. These arguments will be string and numeric. Keep in mind that the string parameter can be two characters long depending on the character representation. It is expected for the function to return true or false, whether that character is allowed or not.
677
- * Since this function will be called extensivelly, keep the implementation of these functions fast, as the performance of these functions have a direct impact on the expressions parsing speed.
678
- *
679
- * @param identifierStart The function that will decide whether the given character is a valid identifier start character.
680
- * @param identifierContinue The function that will decide whether the given character is a valid identifier continue character.
681
- */
682
- setIdentifierFns(
683
- identifierStart?: (character: string, codePoint: number) => boolean,
684
- identifierContinue?: (character: string, codePoint: number) => boolean,
685
- ): void;
686
- }
687
-
688
- interface ICompiledExpression {
689
- (context: any, locals?: any): any;
690
-
691
- literal: boolean;
692
- constant: boolean;
693
-
694
- // If value is not provided, undefined is gonna be used since the implementation
695
- // does not check the parameter. Let's force a value for consistency. If consumer
696
- // whants to undefine it, pass the undefined value explicitly.
697
- assign(context: any, value: any): any;
698
- }
699
-
700
- /**
701
- * $location - $locationProvider - service in module ng
702
- * see https://docs.angularjs.org/api/ng/service/$location
703
- */
704
- interface ILocationService {
705
- absUrl(): string;
706
-
707
- /**
708
- * Returns the hash fragment
709
- */
710
- hash(): string;
711
-
712
- /**
713
- * Changes the hash fragment and returns `$location`
714
- */
715
- hash(newHash: string | null): ILocationService;
716
-
717
- host(): string;
718
-
719
- /**
720
- * Return path of current url
721
- */
722
- path(): string;
723
-
724
- /**
725
- * Change path when called with parameter and return $location.
726
- * Note: Path should always begin with forward slash (/), this method will add the forward slash if it is missing.
727
- *
728
- * @param path New path
729
- */
730
- path(path: string): ILocationService;
731
-
732
- port(): number;
733
- protocol(): string;
734
- replace(): ILocationService;
735
-
736
- /**
737
- * Return search part (as object) of current url
738
- */
739
- search(): any;
740
-
741
- /**
742
- * Change search part when called with parameter and return $location.
743
- *
744
- * @param search When called with a single argument the method acts as a setter, setting the search component of $location to the specified value.
745
- *
746
- * If the argument is a hash object containing an array of values, these values will be encoded as duplicate search parameters in the url.
747
- */
748
- search(search: any): ILocationService;
749
-
750
- /**
751
- * Change search part when called with parameter and return $location.
752
- *
753
- * @param search New search params
754
- * @param paramValue If search is a string or a Number, then paramValue will override only a single search property. If paramValue is null, the property specified via the first argument will be deleted. If paramValue is an array, it will override the property of the search component of $location specified via the first argument. If paramValue is true, the property specified via the first argument will be added with no value nor trailing equal sign.
755
- */
756
- search(
757
- search: string,
758
- paramValue: string | number | null | string[] | boolean,
759
- ): ILocationService;
760
-
761
- state(): any;
762
- state(state: any): ILocationService;
763
- url(): string;
764
- url(url: string): ILocationService;
765
- }
766
-
767
- interface ILocationProvider extends IServiceProvider {
768
- hashPrefix(): string;
769
- hashPrefix(prefix: string): ILocationProvider;
770
- html5Mode(): boolean;
771
-
772
- // Documentation states that parameter is string, but
773
- // implementation tests it as boolean, which makes more sense
774
- // since this is a toggler
775
- html5Mode(active: boolean): ILocationProvider;
776
- html5Mode(mode: {
777
- enabled?: boolean | undefined;
778
- requireBase?: boolean | undefined;
779
- rewriteLinks?: boolean | undefined;
780
- }): ILocationProvider;
781
- }
782
-
783
- ///////////////////////////////////////////////////////////////////////////
784
- // ExceptionHandlerService
785
- // see http://docs.angularjs.org/api/ng/service/$exceptionHandler
786
- ///////////////////////////////////////////////////////////////////////////
787
- interface IExceptionHandlerService {
788
- (exception: Error, cause?: string): void;
789
- }
790
-
791
- ///////////////////////////////////////////////////////////////////////////
792
- // CompileService
793
- // see http://docs.angularjs.org/api/ng/service/$compile
794
- // see http://docs.angularjs.org/api/ng/provider/$compileProvider
795
- ///////////////////////////////////////////////////////////////////////////
796
- interface ICompileService {
797
- (
798
- element: string | Element | JQuery,
799
- transclude?: ITranscludeFunction,
800
- maxPriority?: number,
801
- ): ITemplateLinkingFunction;
802
- }
803
-
804
- interface ICompileProvider extends IServiceProvider {
805
- directive<
806
- TScope extends IScope = IScope,
807
- TElement extends JQLite = JQLite,
808
- TAttributes extends IAttributes = IAttributes,
809
- TController extends IDirectiveController = IController,
810
- >(
811
- name: string,
812
- directiveFactory: Injectable<
813
- IDirectiveFactory<TScope, TElement, TAttributes, TController>
814
- >,
815
- ): ICompileProvider;
816
- directive<
817
- TScope extends IScope = IScope,
818
- TElement extends JQLite = JQLite,
819
- TAttributes extends IAttributes = IAttributes,
820
- TController extends IDirectiveController = IController,
821
- >(object: {
822
- [directiveName: string]: Injectable<
823
- IDirectiveFactory<TScope, TElement, TAttributes, TController>
824
- >;
825
- }): ICompileProvider;
826
-
827
- component(name: string, options: IComponentOptions): ICompileProvider;
828
- component(object: {
829
- [componentName: string]: IComponentOptions;
830
- }): ICompileProvider;
831
-
832
- /** @deprecated The old name of aHrefSanitizationTrustedUrlList. Kept for compatibility. */
833
- aHrefSanitizationWhitelist(): RegExp;
834
- /** @deprecated The old name of aHrefSanitizationTrustedUrlList. Kept for compatibility. */
835
- aHrefSanitizationWhitelist(regexp: RegExp): ICompileProvider;
836
-
837
- aHrefSanitizationTrustedUrlList(): RegExp;
838
- aHrefSanitizationTrustedUrlList(regexp: RegExp): ICompileProvider;
839
-
840
- /** @deprecated The old name of imgSrcSanitizationTrustedUrlList. Kept for compatibility. */
841
- imgSrcSanitizationWhitelist(): RegExp;
842
- /** @deprecated The old name of imgSrcSanitizationTrustedUrlList. Kept for compatibility. */
843
- imgSrcSanitizationWhitelist(regexp: RegExp): ICompileProvider;
844
-
845
- imgSrcSanitizationTrustedUrlList(): RegExp;
846
- imgSrcSanitizationTrustedUrlList(regexp: RegExp): ICompileProvider;
847
-
848
- debugInfoEnabled(): boolean;
849
- debugInfoEnabled(enabled: boolean): ICompileProvider;
850
-
851
- /**
852
- * Sets the number of times $onChanges hooks can trigger new changes before giving up and assuming that the model is unstable.
853
- * Increasing the TTL could have performance implications, so you should not change it without proper justification.
854
- * Default: 10.
855
- * See: https://docs.angularjs.org/api/ng/provider/$compileProvider#onChangesTtl
856
- */
857
- onChangesTtl(): number;
858
- onChangesTtl(limit: number): ICompileProvider;
859
-
860
- /**
861
- * It indicates to the compiler whether or not directives on comments should be compiled.
862
- * It results in a compilation performance gain since the compiler doesn't have to check comments when looking for directives.
863
- * Defaults to true.
864
- * See: https://docs.angularjs.org/api/ng/provider/$compileProvider#commentDirectivesEnabled
865
- */
866
- commentDirectivesEnabled(): boolean;
867
- commentDirectivesEnabled(enabled: boolean): ICompileProvider;
868
-
869
- /**
870
- * It indicates to the compiler whether or not directives on element classes should be compiled.
871
- * It results in a compilation performance gain since the compiler doesn't have to check element classes when looking for directives.
872
- * Defaults to true.
873
- * See: https://docs.angularjs.org/api/ng/provider/$compileProvider#cssClassDirectivesEnabled
874
- */
875
- cssClassDirectivesEnabled(): boolean;
876
- cssClassDirectivesEnabled(enabled: boolean): ICompileProvider;
877
-
878
- /**
879
- * Call this method to enable/disable strict component bindings check.
880
- * If enabled, the compiler will enforce that for all bindings of a
881
- * component that are not set as optional with ?, an attribute needs
882
- * to be provided on the component's HTML tag.
883
- * Defaults to false.
884
- * See: https://docs.angularjs.org/api/ng/provider/$compileProvider#strictComponentBindingsEnabled
885
- */
886
- strictComponentBindingsEnabled(): boolean;
887
- strictComponentBindingsEnabled(enabled: boolean): ICompileProvider;
888
- }
889
-
890
- interface ICloneAttachFunction {
891
- // Let's hint but not force cloneAttachFn's signature
892
- (clonedElement?: JQLite, scope?: IScope): any;
893
- }
894
-
895
- // This corresponds to the "publicLinkFn" returned by $compile.
896
- interface ITemplateLinkingFunction {
897
- (
898
- scope: IScope,
899
- cloneAttachFn?: ICloneAttachFunction,
900
- options?: ITemplateLinkingFunctionOptions,
901
- ): JQLite;
902
- }
903
-
904
- interface ITemplateLinkingFunctionOptions {
905
- parentBoundTranscludeFn?: ITranscludeFunction | undefined;
906
- transcludeControllers?:
907
- | {
908
- [controller: string]: { instance: IController };
909
- }
910
- | undefined;
911
- futureParentElement?: JQuery | undefined;
912
- }
913
-
914
- /**
915
- * This corresponds to $transclude passed to controllers and to the transclude function passed to link functions.
916
- * https://docs.angularjs.org/api/ng/service/$compile#-controller-
917
- * http://teropa.info/blog/2015/06/09/transclusion.html
918
- */
919
- interface ITranscludeFunction {
920
- // If the scope is provided, then the cloneAttachFn must be as well.
921
- (
922
- scope: IScope,
923
- cloneAttachFn: ICloneAttachFunction,
924
- futureParentElement?: JQuery,
925
- slotName?: string,
926
- ): JQLite;
927
- // If one argument is provided, then it's assumed to be the cloneAttachFn.
928
- (
929
- cloneAttachFn?: ICloneAttachFunction,
930
- futureParentElement?: JQuery,
931
- slotName?: string,
932
- ): JQLite;
933
-
934
- /**
935
- * Returns true if the specified slot contains content (i.e. one or more DOM nodes)
936
- */
937
- isSlotFilled(slotName: string): boolean;
938
- }
939
-
940
- ///////////////////////////////////////////////////////////////////////////
941
- // ControllerService
942
- // see http://docs.angularjs.org/api/ng/service/$controller
943
- // see http://docs.angularjs.org/api/ng/provider/$controllerProvider
944
- ///////////////////////////////////////////////////////////////////////////
945
-
946
- interface IControllerService {
947
- // Although the documentation doesn't state this, locals are optional
948
- <T>(controllerConstructor: new (...args: any[]) => T, locals?: any): T;
949
- <T>(controllerConstructor: (...args: any[]) => T, locals?: any): T;
950
- <T>(controllerName: string, locals?: any): T;
951
- }
952
-
953
- interface IControllerProvider extends IServiceProvider {
954
- register(name: string, controllerConstructor: Function): void;
955
- register(name: string, dependencyAnnotatedConstructor: any[]): void;
956
- }
957
-
958
- /**
959
- * xhrFactory
960
- * Replace or decorate this service to create your own custom XMLHttpRequest objects.
961
- * see https://docs.angularjs.org/api/ng/service/$xhrFactory
962
- */
963
- interface IXhrFactory<T> {
964
- (method: string, url: string): T;
965
- }
966
-
967
- /**
968
- * HttpService
969
- * see http://docs.angularjs.org/api/ng/service/$http
970
- */
971
- interface IHttpService {
972
- /**
973
- * Object describing the request to be made and how it should be processed.
974
- */
975
- <T>(config: IRequestConfig): IHttpPromise<T>;
976
-
977
- /**
978
- * Shortcut method to perform GET request.
979
- *
980
- * @param url Relative or absolute URL specifying the destination of the request
981
- * @param config Optional configuration object
982
- */
983
- get<T>(url: string, config?: IRequestShortcutConfig): IHttpPromise<T>;
984
-
985
- /**
986
- * Shortcut method to perform DELETE request.
987
- *
988
- * @param url Relative or absolute URL specifying the destination of the request
989
- * @param config Optional configuration object
990
- */
991
- delete<T>(url: string, config?: IRequestShortcutConfig): IHttpPromise<T>;
992
-
993
- /**
994
- * Shortcut method to perform HEAD request.
995
- *
996
- * @param url Relative or absolute URL specifying the destination of the request
997
- * @param config Optional configuration object
998
- */
999
- head<T>(url: string, config?: IRequestShortcutConfig): IHttpPromise<T>;
1000
-
1001
- /**
1002
- * Shortcut method to perform POST request.
1003
- *
1004
- * @param url Relative or absolute URL specifying the destination of the request
1005
- * @param data Request content
1006
- * @param config Optional configuration object
1007
- */
1008
- post<T>(
1009
- url: string,
1010
- data: any,
1011
- config?: IRequestShortcutConfig,
1012
- ): IHttpPromise<T>;
1013
-
1014
- /**
1015
- * Shortcut method to perform PUT request.
1016
- *
1017
- * @param url Relative or absolute URL specifying the destination of the request
1018
- * @param data Request content
1019
- * @param config Optional configuration object
1020
- */
1021
- put<T>(
1022
- url: string,
1023
- data: any,
1024
- config?: IRequestShortcutConfig,
1025
- ): IHttpPromise<T>;
1026
-
1027
- /**
1028
- * Shortcut method to perform PATCH request.
1029
- *
1030
- * @param url Relative or absolute URL specifying the destination of the request
1031
- * @param data Request content
1032
- * @param config Optional configuration object
1033
- */
1034
- patch<T>(
1035
- url: string,
1036
- data: any,
1037
- config?: IRequestShortcutConfig,
1038
- ): IHttpPromise<T>;
1039
-
1040
- /**
1041
- * Runtime equivalent of the $httpProvider.defaults property. Allows configuration of default headers, withCredentials as well as request and response transformations.
1042
- */
1043
- defaults: IHttpProviderDefaults;
1044
-
1045
- /**
1046
- * Array of config objects for currently pending requests. This is primarily meant to be used for debugging purposes.
1047
- */
1048
- pendingRequests: IRequestConfig[];
1049
- }
1050
-
1051
- /**
1052
- * Object describing the request to be made and how it should be processed.
1053
- * see http://docs.angularjs.org/api/ng/service/$http#usage
1054
- */
1055
- interface IRequestShortcutConfig extends IHttpProviderDefaults {
1056
- /**
1057
- * {Object.<string|Object>}
1058
- * Map of strings or objects which will be turned to ?key1=value1&key2=value2 after the url. If the value is not a string, it will be JSONified.
1059
- */
1060
- params?: any;
1061
-
1062
- /**
1063
- * {string|Object}
1064
- * Data to be sent as the request message data.
1065
- */
1066
- data?: any;
1067
-
1068
- /**
1069
- * Timeout in milliseconds, or promise that should abort the request when resolved.
1070
- */
1071
- timeout?: number | IPromise<any> | undefined;
1072
-
1073
- /**
1074
- * See [XMLHttpRequest.responseType]https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#xmlhttprequest-responsetype
1075
- */
1076
- responseType?: string | undefined;
1077
-
1078
- /**
1079
- * Name of the parameter added (by AngularJS) to the request to specify the name (in the server response) of the JSON-P callback to invoke.
1080
- * If unspecified, $http.defaults.jsonpCallbackParam will be used by default. This property is only applicable to JSON-P requests.
1081
- */
1082
- jsonpCallbackParam?: string | undefined;
1083
- }
1084
-
1085
- /**
1086
- * Object describing the request to be made and how it should be processed.
1087
- * see http://docs.angularjs.org/api/ng/service/$http#usage
1088
- */
1089
- interface IRequestConfig extends IRequestShortcutConfig {
1090
- /**
1091
- * HTTP method (e.g. 'GET', 'POST', etc)
1092
- */
1093
- method: string;
1094
- /**
1095
- * Absolute or relative URL of the resource that is being requested.
1096
- */
1097
- url: string;
1098
- /**
1099
- * Event listeners to be bound to the XMLHttpRequest object.
1100
- * To bind events to the XMLHttpRequest upload object, use uploadEventHandlers. The handler will be called in the context of a $apply block.
1101
- */
1102
- eventHandlers?:
1103
- | { [type: string]: EventListenerOrEventListenerObject }
1104
- | undefined;
1105
- /**
1106
- * Event listeners to be bound to the XMLHttpRequest upload object.
1107
- * To bind events to the XMLHttpRequest object, use eventHandlers. The handler will be called in the context of a $apply block.
1108
- */
1109
- uploadEventHandlers?:
1110
- | { [type: string]: EventListenerOrEventListenerObject }
1111
- | undefined;
1112
- }
1113
-
1114
- interface IHttpHeadersGetter {
1115
- (): { [name: string]: string };
1116
- (headerName: string): string;
1117
- }
1118
-
1119
- interface IHttpPromiseCallback<T> {
1120
- (
1121
- data: T,
1122
- status: number,
1123
- headers: IHttpHeadersGetter,
1124
- config: IRequestConfig,
1125
- ): void;
1126
- }
1127
-
1128
- interface IHttpResponse<T> {
1129
- data: T;
1130
- status: number;
1131
- headers: IHttpHeadersGetter;
1132
- config: IRequestConfig;
1133
- statusText: string;
1134
- /** Added in AngularJS 1.6.6 */
1135
- xhrStatus: "complete" | "error" | "timeout" | "abort";
1136
- }
1137
-
1138
- /** @deprecated The old name of IHttpResponse. Kept for compatibility. */
1139
- type IHttpPromiseCallbackArg<T> = IHttpResponse<T>;
1140
-
1141
- type IHttpPromise<T> = IPromise<IHttpResponse<T>>;
1142
-
1143
- // See the jsdoc for transformData() at https://github.com/angular/angular.js/blob/master/src/ng/http.js#L228
1144
- interface IHttpRequestTransformer {
1145
- (data: any, headersGetter: IHttpHeadersGetter): any;
1146
- }
1147
-
1148
- // The definition of fields are the same as IHttpResponse
1149
- interface IHttpResponseTransformer {
1150
- (data: any, headersGetter: IHttpHeadersGetter, status: number): any;
1151
- }
1152
-
1153
- interface HttpHeaderType {
1154
- [requestType: string]: string | ((config: IRequestConfig) => string);
1155
- }
1156
-
1157
- interface IHttpRequestConfigHeaders {
1158
- [requestType: string]: any;
1159
- common?: any;
1160
- get?: any;
1161
- post?: any;
1162
- put?: any;
1163
- patch?: any;
1164
- }
1165
-
1166
- /**
1167
- * Object that controls the defaults for $http provider. Not all fields of IRequestShortcutConfig can be configured
1168
- * via defaults and the docs do not say which. The following is based on the inspection of the source code.
1169
- * https://docs.angularjs.org/api/ng/service/$http#defaults
1170
- * https://docs.angularjs.org/api/ng/service/$http#usage
1171
- * https://docs.angularjs.org/api/ng/provider/$httpProvider The properties section
1172
- */
1173
- interface IHttpProviderDefaults {
1174
- /**
1175
- * {boolean|Cache}
1176
- * If true, a default $http cache will be used to cache the GET request, otherwise if a cache instance built with $cacheFactory, this cache will be used for caching.
1177
- */
1178
- cache?: any;
1179
-
1180
- /**
1181
- * Transform function or an array of such functions. The transform function takes the http request body and
1182
- * headers and returns its transformed (typically serialized) version.
1183
- * @see {@link https://docs.angularjs.org/api/ng/service/$http#transforming-requests-and-responses}
1184
- */
1185
- transformRequest?:
1186
- | IHttpRequestTransformer
1187
- | IHttpRequestTransformer[]
1188
- | undefined;
1189
-
1190
- /**
1191
- * Transform function or an array of such functions. The transform function takes the http response body and
1192
- * headers and returns its transformed (typically deserialized) version.
1193
- */
1194
- transformResponse?:
1195
- | IHttpResponseTransformer
1196
- | IHttpResponseTransformer[]
1197
- | undefined;
1198
-
1199
- /**
1200
- * Map of strings or functions which return strings representing HTTP headers to send to the server. If the
1201
- * return value of a function is null, the header will not be sent.
1202
- * The key of the map is the request verb in lower case. The "common" key applies to all requests.
1203
- * @see {@link https://docs.angularjs.org/api/ng/service/$http#setting-http-headers}
1204
- */
1205
- headers?: IHttpRequestConfigHeaders | undefined;
1206
-
1207
- /** Name of HTTP header to populate with the XSRF token. */
1208
- xsrfHeaderName?: string | undefined;
1209
-
1210
- /** Name of cookie containing the XSRF token. */
1211
- xsrfCookieName?: string | undefined;
1212
-
1213
- /**
1214
- * whether to to set the withCredentials flag on the XHR object. See [requests with credentials]https://developer.mozilla.org/en/http_access_control#section_5 for more information.
1215
- */
1216
- withCredentials?: boolean | undefined;
1217
-
1218
- /**
1219
- * A function used to the prepare string representation of request parameters (specified as an object). If
1220
- * specified as string, it is interpreted as a function registered with the $injector. Defaults to
1221
- * $httpParamSerializer.
1222
- */
1223
- paramSerializer?: string | ((obj: any) => string) | undefined;
1224
- }
1225
-
1226
- interface IHttpInterceptor {
1227
- request?(config: IRequestConfig): IRequestConfig | IPromise<IRequestConfig>;
1228
- requestError?(rejection: any): IRequestConfig | IPromise<IRequestConfig>;
1229
- response?<T>(
1230
- response: IHttpResponse<T>,
1231
- ): IPromise<IHttpResponse<T>> | IHttpResponse<T>;
1232
- responseError?<T>(
1233
- rejection: any,
1234
- ): IPromise<IHttpResponse<T>> | IHttpResponse<T>;
1235
- }
1236
-
1237
- interface IHttpInterceptorFactory {
1238
- (...args: any[]): IHttpInterceptor;
1239
- }
1240
-
1241
- interface IHttpProvider extends IServiceProvider {
1242
- defaults: IHttpProviderDefaults;
1243
-
1244
- /**
1245
- * Register service factories (names or implementations) for interceptors which are called before and after
1246
- * each request.
1247
- */
1248
- interceptors: Array<string | Injectable<IHttpInterceptorFactory>>;
1249
- useApplyAsync(): boolean;
1250
- useApplyAsync(value: boolean): IHttpProvider;
1251
-
1252
- /** @deprecated The old name of xsrfTrustedOrigins. Kept for compatibility. */
1253
- xsrfWhitelistedOrigins: string[];
1254
- /**
1255
- * Array containing URLs whose origins are trusted to receive the XSRF token.
1256
- */
1257
- xsrfTrustedOrigins: string[];
1258
- }
1259
-
1260
- ///////////////////////////////////////////////////////////////////////////
1261
- // HttpBackendService
1262
- // see http://docs.angularjs.org/api/ng/service/$httpBackend
1263
- // You should never need to use this service directly.
1264
- ///////////////////////////////////////////////////////////////////////////
1265
- interface IHttpBackendService {
1266
- // XXX Perhaps define callback signature in the future
1267
- (
1268
- method: string,
1269
- url: string,
1270
- post?: any,
1271
- callback?: Function,
1272
- headers?: any,
1273
- timeout?: number,
1274
- withCredentials?: boolean,
1275
- ): void;
1276
- }
1277
-
1278
- ///////////////////////////////////////////////////////////////////////////
1279
- // SCEService
1280
- // see http://docs.angularjs.org/api/ng/service/$sce
1281
- ///////////////////////////////////////////////////////////////////////////
1282
- interface ISCEService {
1283
- getTrusted(type: string, mayBeTrusted: any): any;
1284
- getTrustedCss(value: any): any;
1285
- getTrustedHtml(value: any): any;
1286
- getTrustedJs(value: any): any;
1287
- getTrustedResourceUrl(value: any): any;
1288
- getTrustedUrl(value: any): any;
1289
- parse(type: string, expression: string): (context: any, locals: any) => any;
1290
- parseAsCss(expression: string): (context: any, locals: any) => any;
1291
- parseAsHtml(expression: string): (context: any, locals: any) => any;
1292
- parseAsJs(expression: string): (context: any, locals: any) => any;
1293
- parseAsResourceUrl(expression: string): (context: any, locals: any) => any;
1294
- parseAsUrl(expression: string): (context: any, locals: any) => any;
1295
- trustAs(type: string, value: any): any;
1296
- trustAsHtml(value: any): any;
1297
- trustAsJs(value: any): any;
1298
- trustAsResourceUrl(value: any): any;
1299
- trustAsUrl(value: any): any;
1300
- isEnabled(): boolean;
1301
- }
1302
-
1303
- ///////////////////////////////////////////////////////////////////////////
1304
- // SCEProvider
1305
- // see http://docs.angularjs.org/api/ng/provider/$sceProvider
1306
- ///////////////////////////////////////////////////////////////////////////
1307
- interface ISCEProvider extends IServiceProvider {
1308
- enabled(value: boolean): void;
1309
- }
1310
-
1311
- ///////////////////////////////////////////////////////////////////////////
1312
- // SCEDelegateService
1313
- // see http://docs.angularjs.org/api/ng/service/$sceDelegate
1314
- ///////////////////////////////////////////////////////////////////////////
1315
- interface ISCEDelegateService {
1316
- getTrusted(type: string, mayBeTrusted: any): any;
1317
- trustAs(type: string, value: any): any;
1318
- valueOf(value: any): any;
1319
- }
1320
-
1321
- ///////////////////////////////////////////////////////////////////////////
1322
- // SCEDelegateProvider
1323
- // see http://docs.angularjs.org/api/ng/provider/$sceDelegateProvider
1324
- ///////////////////////////////////////////////////////////////////////////
1325
- interface ISCEDelegateProvider extends IServiceProvider {
1326
- /** @deprecated since 1.8.1 */
1327
- resourceUrlBlacklist(): any[];
1328
- /** @deprecated since 1.8.1 */
1329
- resourceUrlBlacklist(bannedList: any[]): void;
1330
- bannedResourceUrlList(): any[];
1331
- bannedResourceUrlList(bannedList: any[]): void;
1332
- /** @deprecated since 1.8.1 */
1333
- resourceUrlWhitelist(): any[];
1334
- /** @deprecated since 1.8.1 */
1335
- resourceUrlWhitelist(trustedList: any[]): void;
1336
- trustedResourceUrlList(): any[];
1337
- trustedResourceUrlList(trustedList: any[]): void;
1338
- }
1339
-
1340
- type IControllerConstructor =
1341
- | (new (...args: any[]) => IController) // Instead of classes, plain functions are often used as controller constructors, especially in examples.
1342
- | ((...args: any[]) => void | IController);
1343
-
1344
- /**
1345
- * Directive controllers have a well-defined lifecycle. Each controller can implement "lifecycle hooks". These are methods that
1346
- * will be called by Angular at certain points in the life cycle of the directive.
1347
- * https://docs.angularjs.org/api/ng/service/$compile#life-cycle-hooks
1348
- * https://docs.angularjs.org/guide/component
1349
- */
1350
- interface IController {
1351
- /**
1352
- * Called on each controller after all the controllers on an element have been constructed and had their bindings
1353
- * initialized (and before the pre & post linking functions for the directives on this element). This is a good
1354
- * place to put initialization code for your controller.
1355
- */
1356
- $onInit?(): void;
1357
- /**
1358
- * Called on each turn of the digest cycle. Provides an opportunity to detect and act on changes.
1359
- * Any actions that you wish to take in response to the changes that you detect must be invoked from this hook;
1360
- * implementing this has no effect on when `$onChanges` is called. For example, this hook could be useful if you wish
1361
- * to perform a deep equality check, or to check a `Dat`e object, changes to which would not be detected by Angular's
1362
- * change detector and thus not trigger `$onChanges`. This hook is invoked with no arguments; if detecting changes,
1363
- * you must store the previous value(s) for comparison to the current values.
1364
- */
1365
- $doCheck?(): void;
1366
- /**
1367
- * Called whenever one-way bindings are updated. The onChangesObj is a hash whose keys are the names of the bound
1368
- * properties that have changed, and the values are an {@link IChangesObject} object of the form
1369
- * { currentValue, previousValue, isFirstChange() }. Use this hook to trigger updates within a component such as
1370
- * cloning the bound value to prevent accidental mutation of the outer value.
1371
- */
1372
- $onChanges?(onChangesObj: IOnChangesObject): void;
1373
- /**
1374
- * Called on a controller when its containing scope is destroyed. Use this hook for releasing external resources,
1375
- * watches and event handlers.
1376
- */
1377
- $onDestroy?(): void;
1378
- /**
1379
- * Called after this controller's element and its children have been linked. Similar to the post-link function this
1380
- * hook can be used to set up DOM event handlers and do direct DOM manipulation. Note that child elements that contain
1381
- * templateUrl directives will not have been compiled and linked since they are waiting for their template to load
1382
- * asynchronously and their own compilation and linking has been suspended until that occurs. This hook can be considered
1383
- * analogous to the ngAfterViewInit and ngAfterContentInit hooks in Angular 2. Since the compilation process is rather
1384
- * different in Angular 1 there is no direct mapping and care should be taken when upgrading.
1385
- */
1386
- $postLink?(): void;
1387
-
1388
- // IController implementations frequently do not implement any of its methods.
1389
- // A string indexer indicates to TypeScript not to issue a weak type error in this case.
1390
- [s: string]: any;
1391
- }
1392
-
1393
- /**
1394
- * Interface for the $onInit lifecycle hook
1395
- * https://docs.angularjs.org/api/ng/service/$compile#life-cycle-hooks
1396
- */
1397
- interface IOnInit {
1398
- /**
1399
- * Called on each controller after all the controllers on an element have been constructed and had their bindings
1400
- * initialized (and before the pre & post linking functions for the directives on this element). This is a good
1401
- * place to put initialization code for your controller.
1402
- */
1403
- $onInit(): void;
1404
- }
1405
-
1406
- /**
1407
- * Interface for the $onChanges lifecycle hook
1408
- * https://docs.angularjs.org/api/ng/service/$compile#life-cycle-hooks
1409
- */
1410
- interface IOnChanges {
1411
- /**
1412
- * Called whenever one-way bindings are updated. The onChangesObj is a hash whose keys are the names of the bound
1413
- * properties that have changed, and the values are an {@link IChangesObject} object of the form
1414
- * { currentValue, previousValue, isFirstChange() }. Use this hook to trigger updates within a component such as
1415
- * cloning the bound value to prevent accidental mutation of the outer value.
1416
- */
1417
- $onChanges(onChangesObj: IOnChangesObject): void;
1418
- }
1419
-
1420
- /**
1421
- * Interface for the $onDestroy lifecycle hook
1422
- * https://docs.angularjs.org/api/ng/service/$compile#life-cycle-hooks
1423
- */
1424
- interface IOnDestroy {
1425
- /**
1426
- * Called on a controller when its containing scope is destroyed. Use this hook for releasing external resources,
1427
- * watches and event handlers.
1428
- */
1429
- $onDestroy(): void;
1430
- }
1431
-
1432
- /**
1433
- * Interface for the $postLink lifecycle hook
1434
- * https://docs.angularjs.org/api/ng/service/$compile#life-cycle-hooks
1435
- */
1436
- interface IPostLink {
1437
- /**
1438
- * Called after this controller's element and its children have been linked. Similar to the post-link function this
1439
- * hook can be used to set up DOM event handlers and do direct DOM manipulation. Note that child elements that contain
1440
- * templateUrl directives will not have been compiled and linked since they are waiting for their template to load
1441
- * asynchronously and their own compilation and linking has been suspended until that occurs. This hook can be considered
1442
- * analogous to the ngAfterViewInit and ngAfterContentInit hooks in Angular 2. Since the compilation process is rather
1443
- * different in Angular 1 there is no direct mapping and care should be taken when upgrading.
1444
- */
1445
- $postLink(): void;
1446
- }
1447
-
1448
- interface IOnChangesObject {
1449
- [property: string]: IChangesObject<any>;
1450
- }
1451
-
1452
- interface IChangesObject<T> {
1453
- currentValue: T;
1454
- previousValue: T;
1455
- isFirstChange(): boolean;
1456
- }
1457
-
1458
- ///////////////////////////////////////////////////////////////////////////
1459
- // Directive
1460
- // see http://docs.angularjs.org/api/ng/provider/$compileProvider#directive
1461
- // and http://docs.angularjs.org/guide/directive
1462
- ///////////////////////////////////////////////////////////////////////////
1463
-
1464
- type IDirectiveController =
1465
- | IController
1466
- | IController[]
1467
- | { [key: string]: IController };
1468
-
1469
- interface IDirectiveFactory<
1470
- TScope extends IScope = IScope,
1471
- TElement extends JQLite = JQLite,
1472
- TAttributes extends IAttributes = IAttributes,
1473
- TController extends IDirectiveController = IController,
1474
- > {
1475
- (
1476
- ...args: any[]
1477
- ):
1478
- | IDirective<TScope, TElement, TAttributes, TController>
1479
- | IDirectiveLinkFn<TScope, TElement, TAttributes, TController>;
1480
- }
1481
-
1482
- interface IDirectiveLinkFn<
1483
- TScope extends IScope = IScope,
1484
- TElement extends JQLite = JQLite,
1485
- TAttributes extends IAttributes = IAttributes,
1486
- TController extends IDirectiveController = IController,
1487
- > {
1488
- (
1489
- scope: TScope,
1490
- instanceElement: TElement,
1491
- instanceAttributes: TAttributes,
1492
- controller?: TController,
1493
- transclude?: ITranscludeFunction,
1494
- ): void;
1495
- }
1496
-
1497
- interface IDirectivePrePost<
1498
- TScope extends IScope = IScope,
1499
- TElement extends JQLite = JQLite,
1500
- TAttributes extends IAttributes = IAttributes,
1501
- TController extends IDirectiveController = IController,
1502
- > {
1503
- pre?:
1504
- | IDirectiveLinkFn<TScope, TElement, TAttributes, TController>
1505
- | undefined;
1506
- post?:
1507
- | IDirectiveLinkFn<TScope, TElement, TAttributes, TController>
1508
- | undefined;
1509
- }
1510
-
1511
- interface IDirectiveCompileFn<
1512
- TScope extends IScope = IScope,
1513
- TElement extends JQLite = JQLite,
1514
- TAttributes extends IAttributes = IAttributes,
1515
- TController extends IDirectiveController = IController,
1516
- > {
1517
- (
1518
- templateElement: TElement,
1519
- templateAttributes: TAttributes,
1520
- /**
1521
- * @deprecated
1522
- * Note: The transclude function that is passed to the compile function is deprecated,
1523
- * as it e.g. does not know about the right outer scope. Please use the transclude function
1524
- * that is passed to the link function instead.
1525
- */
1526
- transclude: ITranscludeFunction,
1527
- ):
1528
- | void
1529
- | IDirectiveLinkFn<TScope, TElement, TAttributes, TController>
1530
- | IDirectivePrePost<TScope, TElement, TAttributes, TController>;
1531
- }
1532
-
1533
- interface IDirective<
1534
- TScope extends IScope = IScope,
1535
- TElement extends JQLite = JQLite,
1536
- TAttributes extends IAttributes = IAttributes,
1537
- TController extends IDirectiveController = IController,
1538
- > {
1539
- compile?:
1540
- | IDirectiveCompileFn<TScope, TElement, TAttributes, TController>
1541
- | undefined;
1542
- controller?: string | Injectable<IControllerConstructor> | undefined;
1543
- controllerAs?: string | undefined;
1544
- /**
1545
- * Deprecation warning: although bindings for non-ES6 class controllers are currently bound to this before
1546
- * the controller constructor is called, this use is now deprecated. Please place initialization code that
1547
- * relies upon bindings inside a $onInit method on the controller, instead.
1548
- */
1549
- bindToController?:
1550
- | boolean
1551
- | { [boundProperty: string]: string }
1552
- | undefined;
1553
- link?:
1554
- | IDirectiveLinkFn<TScope, TElement, TAttributes, TController>
1555
- | IDirectivePrePost<TScope, TElement, TAttributes, TController>
1556
- | undefined;
1557
- multiElement?: boolean | undefined;
1558
- priority?: number | undefined;
1559
- /**
1560
- * @deprecated
1561
- */
1562
- replace?: boolean | undefined;
1563
- require?: string | string[] | { [controller: string]: string } | undefined;
1564
- restrict?: string | undefined;
1565
- scope?: boolean | { [boundProperty: string]: string } | undefined;
1566
- template?:
1567
- | string
1568
- | ((tElement: TElement, tAttrs: TAttributes) => string)
1569
- | undefined;
1570
- templateNamespace?: string | undefined;
1571
- templateUrl?:
1572
- | string
1573
- | ((tElement: TElement, tAttrs: TAttributes) => string)
1574
- | undefined;
1575
- terminal?: boolean | undefined;
1576
- transclude?: boolean | "element" | { [slot: string]: string } | undefined;
1577
- }
1578
-
1579
- ///////////////////////////////////////////////////////////////////////////
1580
- // AUTO module (angular.js)
1581
- ///////////////////////////////////////////////////////////////////////////
1582
- namespace auto {
1583
- ///////////////////////////////////////////////////////////////////////
1584
- // InjectorService
1585
- // see http://docs.angularjs.org/api/AUTO.$injector
1586
- ///////////////////////////////////////////////////////////////////////
1587
- interface IInjectorService {
1588
- annotate(fn: Function, strictDi?: boolean): string[];
1589
- annotate(inlineAnnotatedFunction: any[]): string[];
1590
- get<T>(name: string, caller?: string): T;
1591
- get(name: "$anchorScroll"): IAnchorScrollService;
1592
- get(name: "$compile"): ICompileService;
1593
- get(name: "$controller"): IControllerService;
1594
- get(name: "$exceptionHandler"): IExceptionHandlerService;
1595
- get(name: "$filter"): IFilterService;
1596
- get(name: "$http"): IHttpService;
1597
- get(name: "$httpParamSerializer"): IHttpParamSerializer;
1598
- get(name: "$interpolate"): IInterpolateService;
1599
- get(name: "$locale"): ILocaleService;
1600
- get(name: "$location"): ILocationService;
1601
- get(name: "$log"): ILogService;
1602
- get(name: "$parse"): IParseService;
1603
- get(name: "$rootElement"): IRootElementService;
1604
- get(name: "$rootScope"): IRootScopeService;
1605
- get(name: "$sce"): ISCEService;
1606
- get(name: "$sceDelegate"): ISCEDelegateService;
1607
- get(name: "$templateCache"): ITemplateCacheService;
1608
- get(name: "$templateRequest"): ITemplateRequestService;
1609
- has(name: string): boolean;
1610
- instantiate<T>(
1611
- typeConstructor: { new (...args: any[]): T },
1612
- locals?: any,
1613
- ): T;
1614
- invoke<T = any>(
1615
- func: Injectable<Function | ((...args: any[]) => T)>,
1616
- context?: any,
1617
- locals?: any,
1618
- ): T;
1619
- /**
1620
- * Add the specified modules to the current injector.
1621
- * This method will add each of the injectables to the injector and execute all of the config and run blocks for each module passed to the method.
1622
- * @param modules A module, module name or annotated injection function.
1623
- */
1624
- loadNewModules(
1625
- modules: Array<IModule | string | Injectable<(...args: any[]) => void>>,
1626
- ): void;
1627
- /** An object map of all the modules that have been loaded into the injector. */
1628
- modules: { [moduleName: string]: IModule };
1629
- strictDi: boolean;
1630
- }
1631
-
1632
- ///////////////////////////////////////////////////////////////////////
1633
- // ProvideService
1634
- // see http://docs.angularjs.org/api/AUTO.$provide
1635
- ///////////////////////////////////////////////////////////////////////
1636
- interface IProvideService {
1637
- // Documentation says it returns the registered instance, but actual
1638
- // implementation does not return anything.
1639
- // constant(name: string, value: any): any;
1640
- /**
1641
- * Register a constant service, such as a string, a number, an array, an object or a function, with the $injector. Unlike value it can be injected into a module configuration function (see config) and it cannot be overridden by an Angular decorator.
1642
- *
1643
- * @param name The name of the constant.
1644
- * @param value The constant value.
1645
- */
1646
- constant(name: string, value: any): void;
1647
-
1648
- /**
1649
- * Register a service decorator with the $injector. A service decorator intercepts the creation of a service, allowing it to override or modify the behaviour of the service. The object returned by the decorator may be the original service, or a new service object which replaces or wraps and delegates to the original service.
1650
- *
1651
- * @param name The name of the service to decorate.
1652
- * @param decorator This function will be invoked when the service needs to be instantiated and should return the decorated service instance. The function is called using the injector.invoke method and is therefore fully injectable. Local injection arguments:
1653
- *
1654
- * $delegate - The original service instance, which can be monkey patched, configured, decorated or delegated to.
1655
- */
1656
- decorator(name: string, decorator: Function): void;
1657
- /**
1658
- * Register a service decorator with the $injector. A service decorator intercepts the creation of a service, allowing it to override or modify the behaviour of the service. The object returned by the decorator may be the original service, or a new service object which replaces or wraps and delegates to the original service.
1659
- *
1660
- * @param name The name of the service to decorate.
1661
- * @param inlineAnnotatedFunction This function will be invoked when the service needs to be instantiated and should return the decorated service instance. The function is called using the injector.invoke method and is therefore fully injectable. Local injection arguments:
1662
- *
1663
- * $delegate - The original service instance, which can be monkey patched, configured, decorated or delegated to.
1664
- */
1665
- decorator(name: string, inlineAnnotatedFunction: any[]): void;
1666
- factory(name: string, serviceFactoryFunction: Function): IServiceProvider;
1667
- factory(name: string, inlineAnnotatedFunction: any[]): IServiceProvider;
1668
- provider(name: string, provider: IServiceProvider): IServiceProvider;
1669
- provider(
1670
- name: string,
1671
- serviceProviderConstructor: Function,
1672
- ): IServiceProvider;
1673
- service(name: string, constructor: Function): IServiceProvider;
1674
- service(name: string, inlineAnnotatedFunction: any[]): IServiceProvider;
1675
- value(name: string, value: any): IServiceProvider;
1676
- }
1677
- }
1678
- }