@angular-wave/angular.ts 0.7.5 → 0.7.8

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 (174) hide show
  1. package/@types/animations/raf-scheduler.d.ts +2 -2
  2. package/@types/animations/shared.d.ts +0 -1
  3. package/@types/core/compile/attributes.d.ts +3 -3
  4. package/@types/core/compile/compile.d.ts +1 -1
  5. package/@types/core/di/injector.d.ts +0 -1
  6. package/@types/core/di/internal-injector.d.ts +1 -0
  7. package/@types/core/di/ng-module.d.ts +5 -0
  8. package/@types/core/filter/filter.d.ts +11 -13
  9. package/@types/core/sanitize/sanitize-uri.d.ts +3 -6
  10. package/@types/core/scope/scope.d.ts +1 -3
  11. package/@types/directive/attrs/attrs.d.ts +7 -1
  12. package/@types/directive/events/events.d.ts +9 -3
  13. package/@types/directive/http/http.d.ts +6 -2
  14. package/@types/directive/include/include.d.ts +2 -2
  15. package/@types/directive/input/input.d.ts +2 -12
  16. package/@types/directive/messages/messages.d.ts +9 -48
  17. package/@types/directive/model/model.d.ts +3 -3
  18. package/@types/directive/options/options.d.ts +13 -20
  19. package/@types/directive/setter/setter.d.ts +2 -2
  20. package/@types/directive/switch/switch.d.ts +1 -0
  21. package/@types/directive/transclude/transclude.d.ts +10 -6
  22. package/@types/interface.d.ts +54 -18
  23. package/@types/router/common/glob.d.ts +5 -1
  24. package/@types/router/directives/view-directive.d.ts +2 -19
  25. package/@types/router/globals.d.ts +1 -2
  26. package/@types/router/state/state-registry.d.ts +1 -2
  27. package/@types/router/url/url-service.d.ts +7 -9
  28. package/@types/services/anchor-scroll.d.ts +1 -1
  29. package/@types/{core → services/exception}/exception-handler.d.ts +4 -4
  30. package/@types/{core/error-handler.d.ts → services/exception/interface.d.ts} +1 -1
  31. package/@types/services/http/http.d.ts +0 -2
  32. package/@types/services/http/interface.d.ts +2 -2
  33. package/@types/services/http-backend/http-backend.d.ts +13 -21
  34. package/@types/services/location/interface.d.ts +8 -0
  35. package/@types/{core → services}/location/location.d.ts +52 -12
  36. package/@types/{core → services}/sce/sce.d.ts +1 -1
  37. package/@types/services/template-cache/interface.d.ts +8 -2
  38. package/@types/services/template-cache/template-cache.d.ts +1 -1
  39. package/@types/services/template-request.d.ts +1 -1
  40. package/@types/shared/cache.d.ts +0 -2
  41. package/@types/shared/dom.d.ts +6 -0
  42. package/@types/shared/test-utils.d.ts +1 -0
  43. package/@types/shared/url-utils/interface.d.ts +47 -0
  44. package/@types/{core → shared}/url-utils/url-utils.d.ts +26 -13
  45. package/@types/shared/utils.d.ts +23 -0
  46. package/Makefile +3 -2
  47. package/dist/angular-ts.esm.js +1188 -1364
  48. package/dist/angular-ts.umd.js +1188 -1364
  49. package/dist/angular-ts.umd.min.js +1 -1
  50. package/docs/assets/scss/index.scss +12 -0
  51. package/docs/content/_index.md +15 -4
  52. package/docs/content/docs/directive/bind.md +72 -0
  53. package/docs/content/docs/directive/click.md +3 -0
  54. package/docs/content/docs/directive/dblclick.md +3 -0
  55. package/docs/content/docs/directive/get.md +203 -0
  56. package/docs/content/docs/directive/keydown.md +38 -0
  57. package/docs/content/docs/directive/keyup.md +38 -0
  58. package/docs/content/docs/directive/load.md +43 -0
  59. package/docs/content/docs/provider/templateCacheProvider.md +66 -1
  60. package/docs/content/docs/service/templateCache.md +2 -2
  61. package/docs/layouts/partials/hooks/head-end.html +1 -1
  62. package/docs/layouts/shortcodes/showcss.html +2 -0
  63. package/docs/static/examples/ng-bind/ng-bind.html +9 -0
  64. package/docs/static/examples/ng-keydown/ng-keydown.html +9 -0
  65. package/docs/static/examples/ng-keyup/ng-keyup.html +9 -0
  66. package/docs/static/examples/ng-load/ng-load.html +8 -0
  67. package/docs/static/typedoc/assets/hierarchy.js +1 -1
  68. package/docs/static/typedoc/assets/navigation.js +1 -1
  69. package/docs/static/typedoc/assets/search.js +1 -1
  70. package/docs/static/typedoc/classes/NgModule.html +32 -0
  71. package/docs/static/typedoc/classes/TemplateCacheProvider.html +1 -1
  72. package/docs/static/typedoc/hierarchy.html +1 -1
  73. package/docs/static/typedoc/index.html +1 -1
  74. package/docs/static/typedoc/interfaces/Directive.html +5 -4
  75. package/docs/static/typedoc/interfaces/HttpProviderDefaults.html +1 -1
  76. package/docs/static/typedoc/interfaces/HttpResponse.html +2 -3
  77. package/docs/static/typedoc/interfaces/Provider.html +15 -10
  78. package/docs/static/typedoc/interfaces/RequestConfig.html +1 -1
  79. package/docs/static/typedoc/interfaces/RequestShortcutConfig.html +1 -1
  80. package/docs/static/typedoc/interfaces/TemplateCache.html +7 -0
  81. package/docs/static/typedoc/types/AnnotatedDirectiveFactory.html +1 -0
  82. package/docs/static/typedoc/types/DirectiveFactory.html +1 -2
  83. package/docs/static/typedoc/types/DirectiveFactoryFn.html +1 -0
  84. package/docs/static/typedoc/types/HttpResponseStatus.html +1 -0
  85. package/docs/static/typedoc/types/{TemplateCache.html → SwapModeType.html} +1 -1
  86. package/docs/static/typedoc/variables/SwapMode.html +11 -0
  87. package/legacy.d.ts +0 -14
  88. package/package.json +1 -3
  89. package/src/animations/animate-children-directive.js +2 -2
  90. package/src/animations/raf-scheduler.js +1 -1
  91. package/src/animations/shared.js +0 -9
  92. package/src/core/compile/attributes.js +1 -1
  93. package/src/core/compile/compile.js +3 -3
  94. package/src/core/di/injector.js +4 -17
  95. package/src/core/di/internal-injector.js +4 -1
  96. package/src/core/di/ng-module.js +12 -27
  97. package/src/core/filter/filter.js +28 -28
  98. package/src/core/parse/interpreter.js +32 -38
  99. package/src/core/sanitize/sanitize-uri.js +3 -3
  100. package/src/core/scope/scope.js +2 -7
  101. package/src/directive/attrs/attrs.js +7 -4
  102. package/src/directive/bind/bind.js +16 -4
  103. package/src/directive/bind/bind.spec.js +13 -0
  104. package/src/directive/events/events.js +7 -3
  105. package/src/directive/events/events.md +0 -41
  106. package/src/directive/http/delete.spec.js +2 -0
  107. package/src/directive/http/get.spec.js +280 -3
  108. package/src/directive/http/http.js +100 -12
  109. package/src/directive/http/http.test.js +2 -2
  110. package/src/directive/http/post.spec.js +2 -0
  111. package/src/directive/http/put.spec.js +2 -0
  112. package/src/directive/include/include.js +7 -7
  113. package/src/directive/input/input.js +6 -28
  114. package/src/directive/messages/messages.js +5 -1
  115. package/src/directive/model/model.js +1 -1
  116. package/src/directive/options/options.js +454 -464
  117. package/src/directive/repeat/repeat.js +175 -153
  118. package/src/directive/setter/setter.js +13 -15
  119. package/src/directive/setter/setter.spec.js +39 -16
  120. package/src/directive/switch/switch.js +1 -0
  121. package/src/directive/switch/switch.spec.js +1 -1
  122. package/src/directive/transclude/transclude.js +87 -89
  123. package/src/injection-tokens.js +1 -1
  124. package/src/interface.ts +68 -19
  125. package/src/loader.js +4 -9
  126. package/src/public.js +9 -15
  127. package/src/router/common/glob.js +5 -0
  128. package/src/router/directives/state-directives.js +4 -6
  129. package/src/router/directives/state-directives.spec.js +1 -1
  130. package/src/router/directives/view-directive.js +9 -1
  131. package/src/router/globals.js +0 -1
  132. package/src/router/state/state-registry.js +0 -1
  133. package/src/router/state-filters.js +2 -2
  134. package/src/router/url/url-service.js +5 -9
  135. package/src/services/anchor-scroll.html +0 -7
  136. package/src/services/anchor-scroll.js +2 -2
  137. package/src/{core → services/exception}/exception-handler.js +2 -2
  138. package/src/{core/error-handler.ts → services/exception/interface.ts} +1 -1
  139. package/src/services/http/http.js +2 -13
  140. package/src/services/http/interface.ts +2 -2
  141. package/src/services/http-backend/http-backend.js +4 -14
  142. package/src/services/http-backend/http-backend.spec.js +1 -4
  143. package/src/services/location/interface.ts +8 -0
  144. package/src/{core → services}/location/location.html +4 -1
  145. package/src/{core → services}/location/location.js +129 -27
  146. package/src/{core → services}/location/location.spec.js +2 -2
  147. package/src/{core → services}/location/location.test.js +1 -1
  148. package/src/{core → services}/sce/sce.html +1 -1
  149. package/src/{core → services}/sce/sce.js +9 -3
  150. package/src/{core → services}/sce/sce.spec.js +2 -3
  151. package/src/{core → services}/sce/sce.test.js +1 -1
  152. package/src/services/template-cache/interface.ts +8 -2
  153. package/src/services/template-cache/template-cache.js +3 -1
  154. package/src/services/template-cache/template-cache.spec.js +72 -0
  155. package/src/services/template-request.js +2 -1
  156. package/src/shared/cache.js +0 -2
  157. package/src/shared/dom.js +10 -0
  158. package/src/shared/test-utils.js +1 -0
  159. package/src/shared/url-utils/interface.ts +56 -0
  160. package/src/{core → shared}/url-utils/url-utils.html +4 -1
  161. package/src/{core → shared}/url-utils/url-utils.js +26 -23
  162. package/src/{core → shared}/url-utils/url-utils.spec.js +0 -8
  163. package/src/{core → shared}/url-utils/url-utils.test.js +1 -1
  164. package/src/shared/utils.js +47 -1
  165. package/utils/express.js +9 -1
  166. package/@types/core/task-tracker-factory.d.ts +0 -76
  167. package/@types/services/browser.d.ts +0 -101
  168. package/docs/static/typedoc/types/SwapInsertPosition.html +0 -2
  169. package/jsdoc.json +0 -22
  170. package/src/core/task-tracker-factory.js +0 -145
  171. package/src/services/browser.js +0 -212
  172. /package/src/{core → services}/location/location.md +0 -0
  173. /package/src/{core → services}/sce/sce.md +0 -0
  174. /package/src/{core → shared}/url-utils/url-utils.md +0 -0
@@ -4,9 +4,9 @@
4
4
  */
5
5
  /**
6
6
  * Service provider that creates a requestAnimationFrame-based scheduler.
7
- * @implements {ServiceProvider}
7
+ * @type {ServiceProvider}
8
8
  */
9
- export class RafSchedulerProvider implements ServiceProvider {
9
+ export class RafSchedulerProvider {
10
10
  /**
11
11
  * Internal task queue, where each item is an array of functions to run.
12
12
  * @type {Array<Array<() => void>>}
@@ -1,5 +1,4 @@
1
1
  export function assertArg(arg: any, name: any, reason: any): any;
2
- export function mergeClasses(a: any, b: any): any;
3
2
  export function packageStyles(options: any): {
4
3
  to: any;
5
4
  from: any;
@@ -6,7 +6,7 @@ export class Attributes implements Record<string, any> {
6
6
  /**
7
7
  * @param {import('../scope/scope.js').Scope} $rootScope
8
8
  * @param {*} $animate
9
- * @param {import("../exception-handler.js").ErrorHandler} $exceptionHandler
9
+ * @param {import("../../services/exception/exception-handler.js").ErrorHandler} $exceptionHandler
10
10
  * @param {*} $sce
11
11
  * @param {import("../../shared/noderef.js").NodeRef} [nodeRef]
12
12
  * @param {Object} [attributesToCopy]
@@ -14,14 +14,14 @@ export class Attributes implements Record<string, any> {
14
14
  constructor(
15
15
  $rootScope: import("../scope/scope.js").Scope,
16
16
  $animate: any,
17
- $exceptionHandler: import("../exception-handler.js").ErrorHandler,
17
+ $exceptionHandler: import("../../services/exception/exception-handler.js").ErrorHandler,
18
18
  $sce: any,
19
19
  nodeRef?: import("../../shared/noderef.js").NodeRef,
20
20
  attributesToCopy?: any,
21
21
  );
22
22
  $rootScope: import("../scope/scope.js").Scope;
23
23
  $animate: any;
24
- $exceptionHandler: import("../error-handler.ts").ErrorHandler;
24
+ $exceptionHandler: import("../../services/exception/interface.ts").Interface;
25
25
  $sce: any;
26
26
  $attr: {};
27
27
  /** @type {import("../../shared/noderef.js").NodeRef} */
@@ -123,7 +123,7 @@ export class CompileProvider {
123
123
  | ((
124
124
  $injector: import("../../core/di/internal-injector.js").InjectorService,
125
125
  $interpolate: any,
126
- $exceptionHandler: import("../exception-handler.js").ErrorHandler,
126
+ $exceptionHandler: import("../../services/exception/exception-handler.js").ErrorHandler,
127
127
  $templateRequest: any,
128
128
  $parse: import("../parse/interface.ts").ParseService,
129
129
  $controller: any,
@@ -9,7 +9,6 @@ export function createInjector(
9
9
  strictDi?: boolean,
10
10
  ): InjectorService;
11
11
  /**
12
- *
13
12
  * @param {any} fn
14
13
  * @param {boolean} [strictDi]
15
14
  * @param {String} [name]
@@ -23,6 +23,7 @@ export class InjectorService extends AbstractInjector {
23
23
  * @param {boolean} strictDi - Indicates if strict dependency injection is enforced.
24
24
  */
25
25
  constructor(providerInjector: ProviderInjector, strictDi: boolean);
26
+ /** @type {ProviderInjector} */
26
27
  providerInjector: ProviderInjector;
27
28
  /**
28
29
  *
@@ -1,7 +1,12 @@
1
+ /** @private */
1
2
  export const INJECTOR_LITERAL: "$injector";
3
+ /** @private */
2
4
  export const COMPILE_LITERAL: "$compileProvider";
5
+ /** @private */
3
6
  export const ANIMATION_LITERAL: "$animateProvider";
7
+ /** @private */
4
8
  export const FILTER_LITERAL: "$filterProvider";
9
+ /** @private */
5
10
  export const CONTROLLER_LITERAL: "$controllerProvider";
6
11
  /**
7
12
  * Modules are collections of application configuration information for components:
@@ -1,25 +1,23 @@
1
- /**
2
- * @param {import('../../interface.ts').Provider} $provide
3
- */
4
- export function FilterProvider(
5
- $provide: import("../../interface.ts").Provider,
6
- ): void;
7
1
  export class FilterProvider {
2
+ static $inject: string[];
8
3
  /**
9
4
  * @param {import('../../interface.ts').Provider} $provide
10
5
  */
11
6
  constructor($provide: import("../../interface.ts").Provider);
12
- register: (
7
+ $provide: import("../../interface.ts").Provider;
8
+ /**
9
+ * @param {string|Record<string, import('../../interface.ts').FilterFactory>} name
10
+ * @param {import('../../interface.ts').FilterFactory} [factory]
11
+ * @return {import('../../interface.ts').Provider}
12
+ */
13
+ register(
13
14
  name: string | Record<string, import("../../interface.ts").FilterFactory>,
14
- factory: import("../../interface.ts").FilterFactory,
15
- ) => import("../../interface.ts").ServiceProvider;
15
+ factory?: import("../../interface.ts").FilterFactory,
16
+ ): import("../../interface.ts").Provider;
16
17
  $get: (
17
18
  | string
18
19
  | ((
19
20
  $injector: import("../../core/di/internal-injector.js").InjectorService,
20
- ) => (name: any) => any)
21
+ ) => import("../../interface.ts").FilterFn)
21
22
  )[];
22
23
  }
23
- export namespace FilterProvider {
24
- let $inject: string[];
25
- }
@@ -1,4 +1,4 @@
1
- /** @typedef {import('../../interface.ts').ServiceProvider} ServiceProvider } */
1
+ /** @typedef {import('../../interface.ts').ServiceProvider} ServiceProvider */
2
2
  /**
3
3
  * Private service to sanitize uris for links and images. Used by $compile.
4
4
  * @implements {ServiceProvider}
@@ -33,11 +33,8 @@ export class SanitizeUriProvider implements ServiceProvider {
33
33
  regexp?: RegExp | undefined,
34
34
  ): RegExp | SanitizeUriProvider;
35
35
  /**
36
- * @returns {import("./interface.js").SanitizerFn} Sanitizer function.
36
+ * @returns {import("./interface").SanitizerFn}
37
37
  */
38
- $get(): import("./interface.js").SanitizerFn;
38
+ $get(): any;
39
39
  }
40
- /**
41
- * }
42
- */
43
40
  export type ServiceProvider = import("../../interface.ts").ServiceProvider;
@@ -25,7 +25,7 @@ export class RootScopeProvider {
25
25
  $get: (
26
26
  | string
27
27
  | ((
28
- exceptionHandler: import("../exception-handler.js").ErrorHandler,
28
+ exceptionHandler: import("../../services/exception/exception-handler.js").ErrorHandler,
29
29
  parse: import("../parse/interface.ts").ParseService,
30
30
  ) => Scope)
31
31
  )[];
@@ -150,7 +150,6 @@ export class Scope {
150
150
  $destroy: any;
151
151
  $eval: any;
152
152
  $apply: any;
153
- $evalAsync: any;
154
153
  $postUpdate: any;
155
154
  $isRoot: any;
156
155
  $target: any;
@@ -185,7 +184,6 @@ export class Scope {
185
184
  $newIsolate(instance: any): any;
186
185
  $transcluded(parentInstance: any): any;
187
186
  $eval(expr: any, locals: any): any;
188
- $evalAsync(expr: any, locals: any): Promise<any>;
189
187
  /**
190
188
  * @param {Object} newTarget
191
189
  */
@@ -1,2 +1,8 @@
1
1
  export const REGEX_STRING_REGEXP: RegExp;
2
- export const ngAttributeAliasDirectives: {};
2
+ /**
3
+ * @type {Record<string, import("../../interface.js").DirectiveFactory>}
4
+ */
5
+ export const ngAttributeAliasDirectives: Record<
6
+ string,
7
+ import("../../interface.js").DirectiveFactory
8
+ >;
@@ -1,15 +1,21 @@
1
1
  /**
2
2
  *
3
3
  * @param {import("../../core/parse/interface.ts").ParseService} $parse
4
- * @param {import('../../core/exception-handler.js').ErrorHandler} $exceptionHandler
4
+ * @param {import('../../services/exception/exception-handler.js').ErrorHandler} $exceptionHandler
5
5
  * @param {string} directiveName
6
6
  * @param {string} eventName
7
7
  * @returns {import("../../interface.ts").Directive}
8
8
  */
9
9
  export function createEventDirective(
10
10
  $parse: import("../../core/parse/interface.ts").ParseService,
11
- $exceptionHandler: import("../../core/exception-handler.js").ErrorHandler,
11
+ $exceptionHandler: import("../../services/exception/exception-handler.js").ErrorHandler,
12
12
  directiveName: string,
13
13
  eventName: string,
14
14
  ): import("../../interface.ts").Directive;
15
- export const ngEventDirectives: {};
15
+ /**
16
+ * @type {Record<string, import("../../interface.js").DirectiveFactory>}
17
+ */
18
+ export const ngEventDirectives: Record<
19
+ string,
20
+ import("../../interface.js").DirectiveFactory
21
+ >;
@@ -12,14 +12,14 @@ export function getEventNameForElement(element: Element): EventType;
12
12
  * Handles DOM manipulation based on a swap strategy and server-rendered HTML.
13
13
  *
14
14
  * @param {string} html - The HTML string returned from the server.
15
- * @param {import("../../interface.ts").SwapInsertPosition} swap
15
+ * @param {import("../../interface.ts").SwapModeType} swap
16
16
  * @param {Element} target - The target DOM element to apply the swap to.
17
17
  * @param {import('../../core/scope/scope.js').Scope} scope
18
18
  * @param {import('../../core/compile/compile.js').CompileFn} $compile
19
19
  */
20
20
  export function handleSwapResponse(
21
21
  html: string,
22
- swap: import("../../interface.ts").SwapInsertPosition,
22
+ swap: import("../../interface.ts").SwapModeType,
23
23
  target: Element,
24
24
  scope: import("../../core/scope/scope.js").Scope,
25
25
  $compile: import("../../core/compile/compile.js").CompileFn,
@@ -35,8 +35,12 @@ export function createHttpDirective(
35
35
  method: "get" | "delete" | "post" | "put",
36
36
  attrName: string,
37
37
  ): import("../../interface.ts").DirectiveFactory;
38
+ /** @type {import('../../interface.ts').DirectiveFactory} */
38
39
  export const ngGetDirective: import("../../interface.ts").DirectiveFactory;
40
+ /** @type {import('../../interface.ts').DirectiveFactory} */
39
41
  export const ngDeleteDirective: import("../../interface.ts").DirectiveFactory;
42
+ /** @type {import('../../interface.ts').DirectiveFactory} */
40
43
  export const ngPostDirective: import("../../interface.ts").DirectiveFactory;
44
+ /** @type {import('../../interface.ts').DirectiveFactory} */
41
45
  export const ngPutDirective: import("../../interface.ts").DirectiveFactory;
42
46
  export type EventType = "click" | "change" | "submit";
@@ -3,14 +3,14 @@
3
3
  * @param {*} $templateRequest
4
4
  * @param {import("../../services/anchor-scroll.js").AnchorScrollFunction} $anchorScroll
5
5
  * @param {*} $animate
6
- * @param {import('../../core/error-handler.js').ErrorHandler} $exceptionHandler
6
+ * @param {import('../../services/exception/interface.ts').Interface} $exceptionHandler
7
7
  * @returns {import('../../interface.js').Directive}
8
8
  */
9
9
  export function ngIncludeDirective(
10
10
  $templateRequest: any,
11
11
  $anchorScroll: import("../../services/anchor-scroll.js").AnchorScrollFunction,
12
12
  $animate: any,
13
- $exceptionHandler: import("../../core/error-handler.js").ErrorHandler,
13
+ $exceptionHandler: import("../../services/exception/interface.ts").Interface,
14
14
  ): import("../../interface.js").Directive;
15
15
  export namespace ngIncludeDirective {
16
16
  let $inject: string[];
@@ -12,7 +12,6 @@ export function createDateInputType(
12
12
  element: any,
13
13
  attr: any,
14
14
  ctrl: any,
15
- $browser: any,
16
15
  $filter: any,
17
16
  $parse: any,
18
17
  ) => void;
@@ -36,7 +35,6 @@ export function numberInputType(
36
35
  element: any,
37
36
  attr: any,
38
37
  ctrl: any,
39
- $browser: any,
40
38
  $filter: any,
41
39
  $parse: any,
42
40
  ): void;
@@ -47,22 +45,14 @@ export function rangeInputType(
47
45
  ctrl: any,
48
46
  ): void;
49
47
  /**
50
- * @param {import('../../services/browser').Browser} $browser
51
48
  * @param {*} $filter
52
49
  * @param {*} $parse
53
- * @returns
50
+ * @returns {import('../../interface.ts').Directive}
54
51
  */
55
52
  export function inputDirective(
56
- $browser: any,
57
53
  $filter: any,
58
54
  $parse: any,
59
- ): {
60
- restrict: string;
61
- require: string[];
62
- link: {
63
- pre(scope: any, element: any, attr: any, ctrls: any): void;
64
- };
65
- };
55
+ ): import("../../interface.ts").Directive;
66
56
  export namespace inputDirective {
67
57
  let $inject: string[];
68
58
  }
@@ -18,54 +18,15 @@ export namespace ngMessagesIncludeDirective {
18
18
  let $inject_1: string[];
19
19
  export { $inject_1 as $inject };
20
20
  }
21
- export function ngMessageDirective($animate: any): {
22
- restrict: string;
23
- transclude: string;
24
- priority: number;
25
- terminal: boolean;
26
- require: string;
27
- link(
28
- scope: any,
29
- element: any,
30
- attrs: any,
31
- ngMessagesCtrl: any,
32
- $transclude: any,
33
- ): void;
34
- };
35
- export namespace ngMessageDirective {
36
- let $inject_2: string[];
37
- export { $inject_2 as $inject };
38
- }
39
- export function ngMessageExpDirective($animate: any): {
40
- restrict: string;
41
- transclude: string;
42
- priority: number;
43
- terminal: boolean;
44
- require: string;
45
- link(
46
- scope: any,
47
- element: any,
48
- attrs: any,
49
- ngMessagesCtrl: any,
50
- $transclude: any,
51
- ): void;
52
- };
53
- export namespace ngMessageExpDirective {}
54
- export function ngMessageDefaultDirective($animate: any): {
55
- restrict: string;
56
- transclude: string;
57
- priority: number;
58
- terminal: boolean;
59
- require: string;
60
- link(
61
- scope: any,
62
- element: any,
63
- attrs: any,
64
- ngMessagesCtrl: any,
65
- $transclude: any,
66
- ): void;
67
- };
68
- export namespace ngMessageDefaultDirective {}
21
+ export const ngMessageDirective: (
22
+ any: any,
23
+ ) => import("../../interface.js").Directive;
24
+ export const ngMessageExpDirective: (
25
+ any: any,
26
+ ) => import("../../interface.js").Directive;
27
+ export const ngMessageDefaultDirective: (
28
+ any: any,
29
+ ) => import("../../interface.js").Directive;
69
30
  declare class NgMessageCtrl {
70
31
  /**
71
32
  * @param {Element} $element
@@ -50,7 +50,7 @@ export class NgModelController {
50
50
  static $inject: string[];
51
51
  /**
52
52
  * @param {import('../../core/scope/scope.js').Scope} $scope
53
- * @param {import('../../core/exception-handler.js').ErrorHandler} $exceptionHandler
53
+ * @param {import('../../services/exception/exception-handler.js').ErrorHandler} $exceptionHandler
54
54
  * @param {import('../../core/compile/attributes.js').Attributes} $attr
55
55
  * @param {Element} $element
56
56
  * @param {import("../../core/parse/interface.ts").ParseService} $parse
@@ -59,7 +59,7 @@ export class NgModelController {
59
59
  */
60
60
  constructor(
61
61
  $scope: import("../../core/scope/scope.js").Scope,
62
- $exceptionHandler: import("../../core/exception-handler.js").ErrorHandler,
62
+ $exceptionHandler: import("../../services/exception/exception-handler.js").ErrorHandler,
63
63
  $attr: import("../../core/compile/attributes.js").Attributes,
64
64
  $element: Element,
65
65
  $parse: import("../../core/parse/interface.ts").ParseService,
@@ -141,7 +141,7 @@ export class NgModelController {
141
141
  $$element: Element;
142
142
  $$animate: any;
143
143
  $$parse: import("../../core/parse/interface.ts").ParseService;
144
- $$exceptionHandler: import("../../core/error-handler.ts").ErrorHandler;
144
+ $$exceptionHandler: import("../../services/exception/interface.ts").Interface;
145
145
  $$hasNativeValidators: boolean;
146
146
  $$classCache: {};
147
147
  $$eventRemovers: Set<any>;
@@ -1,20 +1,13 @@
1
- export const ngOptionsDirective: (
2
- | string
3
- | ((
4
- $compile: import("../../core/compile/compile.js").CompileFn,
5
- $parse: import("../../core/parse/interface.ts").ParseService,
6
- ) => {
7
- restrict: string;
8
- terminal: boolean;
9
- require: string[];
10
- link: {
11
- pre: (scope: any, selectElement: any, attr: any, ctrls: any) => void;
12
- post: (
13
- scope: import("../../core/scope/scope.js").Scope,
14
- selectElement: HTMLSelectElement,
15
- attr: import("../../core/compile/attributes.js").Attributes,
16
- ctrls: any,
17
- ) => void;
18
- };
19
- })
20
- )[];
1
+ /**
2
+ *
3
+ * @param {import("../../core/compile/compile.js").CompileFn} $compile
4
+ * @param {import("../../core/parse/interface.ts").ParseService} $parse
5
+ * @returns {import("../../interface.ts").Directive}
6
+ */
7
+ export function ngOptionsDirective(
8
+ $compile: import("../../core/compile/compile.js").CompileFn,
9
+ $parse: import("../../core/parse/interface.ts").ParseService,
10
+ ): import("../../interface.ts").Directive;
11
+ export namespace ngOptionsDirective {
12
+ let $inject: string[];
13
+ }
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * @param {import('../../core/parse/interface.ts').ParseService} $parse
3
3
  * @param {import('../../services/log/interface.ts').LogService} $log
4
- * @returns {import('../../interface.ts').Directive}
4
+ * @returns {import('interface.ts').Directive}
5
5
  */
6
6
  export function ngSetterDirective(
7
7
  $parse: import("../../core/parse/interface.ts").ParseService,
8
8
  $log: import("../../services/log/interface.ts").LogService,
9
- ): import("../../interface.ts").Directive;
9
+ ): any;
10
10
  export namespace ngSetterDirective {
11
11
  let $inject: string[];
12
12
  }
@@ -1,4 +1,5 @@
1
1
  /**
2
+ * @param {*} $animate
2
3
  * @returns {import('../../interface.ts').Directive}
3
4
  */
4
5
  export function ngSwitchDirective(
@@ -1,6 +1,10 @@
1
- export const ngTranscludeDirective: (
2
- | string
3
- | ((
4
- $compile: import("../../core/compile/compile.js").CompileFn,
5
- ) => import("../../interface.ts").Directive)
6
- )[];
1
+ /**
2
+ * @param {import("../../core/compile/compile.js").CompileFn} $compile
3
+ * @returns {import("../../interface.ts").Directive}
4
+ */
5
+ export function ngTranscludeDirective(
6
+ $compile: import("../../core/compile/compile.js").CompileFn,
7
+ ): import("../../interface.ts").Directive;
8
+ export namespace ngTranscludeDirective {
9
+ let $inject: string[];
10
+ }
@@ -1,5 +1,6 @@
1
1
  import { Attributes } from "./core/compile/attributes.js";
2
2
  import { Scope } from "./core/scope/scope.js";
3
+ export * from "./core/di/ng-module.js";
3
4
  export * from "./services/http/interface.ts";
4
5
  export * from "./services/log/interface.ts";
5
6
  export * from "./services/log/log.js";
@@ -57,42 +58,58 @@ export interface ServiceProvider {
57
58
  * services, factories, constants, values, decorators, etc.
58
59
  */
59
60
  export interface Provider {
61
+ /**
62
+ * Register a directive
63
+ * @param name - The name of the directive.
64
+ * @param provider - An object with a `$get` property that defines how the service is created.
65
+ */
66
+ directive(name: string, directive: DirectiveFactory): Provider;
67
+ /**
68
+ * Register multiple directives
69
+ * @param obj
70
+ */
71
+ directive(obj: Record<string, DirectiveFactory>): Provider;
60
72
  /**
61
73
  * Register a service provider.
62
74
  * @param name - The name of the service.
63
75
  * @param provider - An object with a `$get` property that defines how the service is created.
64
76
  */
65
- provider(name: string, provider: ServiceProvider): ServiceProvider;
77
+ provider(name: string, provider: Function): Provider;
78
+ /**
79
+ * Register multiple service providers
80
+ * @param obj
81
+ */
82
+ provider(obj: Record<string, Function>): Provider;
66
83
  /**
67
84
  * Register a factory function to create a service.
68
85
  * @param name - The name of the service.
69
86
  * @param factoryFn - A function (or annotated array) that returns the service instance.
70
87
  */
71
- factory(name: string, factoryFn: Injectable): ServiceProvider;
88
+ factory(name: string, factoryFn: Injectable): Provider;
72
89
  /**
73
90
  * Register a constructor function to create a service.
74
91
  * @param name - The name of the service.
75
92
  * @param constructor - A class or function to instantiate.
76
93
  */
77
- service(name: string, constructor: Injectable): ServiceProvider;
94
+ service(name: string, constructor: Injectable): Provider;
78
95
  /**
79
96
  * Register a fixed value as a service.
80
97
  * @param name - The name of the service.
81
98
  * @param val - The value to use.
82
99
  */
83
- value(name: string, val: any): ServiceProvider;
100
+ value(name: string, val: any): Provider;
84
101
  /**
85
102
  * Register a constant value (available during config).
86
103
  * @param name - The name of the constant.
87
104
  * @param val - The constant value.
88
105
  */
89
- constant(name: string, val: any): void;
106
+ constant(name: string, val: any): Provider;
90
107
  /**
91
108
  * Register a decorator function to modify or replace an existing service.
92
109
  * @param name - The name of the service to decorate.
93
110
  * @param fn - A function that takes `$delegate` and returns a decorated service.
94
111
  */
95
- decorator(name: string, fn: Injectable): void;
112
+ decorator(name: string, fn: Function): Provider;
96
113
  }
97
114
  /**
98
115
  * A filter function takes an input and optional arguments, and returns a transformed value.
@@ -226,14 +243,16 @@ export interface Directive {
226
243
  /** Template URL for loading from server */
227
244
  templateUrl?: string | ((element: Element, attrs: Attributes) => string);
228
245
  /** Enables transclusion or configures named slots */
229
- transclude?: boolean | "element" | Record<string, string>;
246
+ transclude?: boolean | string | Record<string, string>;
230
247
  /** Internal hook for directive compilation state */
231
248
  $$addStateInfo?: (...args: any[]) => any;
249
+ count?: number;
232
250
  }
233
- /**
234
- * A factory function returning a directive definition.
235
- */
236
- export type DirectiveFactory = (...args: any[]) => Directive | DirectiveLinkFn;
251
+ export type DirectiveFactoryFn = (
252
+ ...args: any[]
253
+ ) => Directive | DirectiveLinkFn;
254
+ export type AnnotatedDirectiveFactory = Array<string | DirectiveFactoryFn>;
255
+ export type DirectiveFactory = DirectiveFactoryFn | AnnotatedDirectiveFactory;
237
256
  /**
238
257
  * Represents advanced transclusion functions used in directives.
239
258
  */
@@ -316,10 +335,27 @@ export interface NgModelController {
316
335
  /**
317
336
  * Possible values for `data-swap` attribute
318
337
  */
319
- export type SwapInsertPosition =
320
- | InsertPosition
321
- | "textContent"
322
- | "innerHTML"
323
- | "outerHTML"
324
- | "delete"
325
- | "none";
338
+ export declare const SwapMode: {
339
+ /** (default) Replaces the contents inside the element */
340
+ readonly innerHTML: "innerHTML";
341
+ /** Replaces the entire element, including the tag itself */
342
+ readonly outerHTML: "outerHTML";
343
+ /** Inserts plain text (without parsing HTML) */
344
+ readonly textContent: "textContent";
345
+ /** Inserts HTML immediately before the element itself */
346
+ readonly beforebegin: "beforebegin";
347
+ /** Inserts HTML inside the element, before its first child */
348
+ readonly afterbegin: "afterbegin";
349
+ /** Inserts HTML inside the element, after its last child */
350
+ readonly beforeend: "beforeend";
351
+ /** Inserts HTML immediately after the element itself */
352
+ readonly afterend: "afterend";
353
+ /** Removes the element entirely */
354
+ readonly delete: "delete";
355
+ /** Performs no insertion (no-op) */
356
+ readonly none: "none";
357
+ };
358
+ /**
359
+ * Union type representing all possible DOM insertion modes.
360
+ */
361
+ export type SwapModeType = keyof typeof SwapMode;
@@ -73,5 +73,9 @@ export class Glob {
73
73
  * @type {RegExp}
74
74
  */
75
75
  regexp: RegExp;
76
- matches(name: any): boolean;
76
+ /**
77
+ * @param {string} name
78
+ * @return {boolean}
79
+ */
80
+ matches(name: string): boolean;
77
81
  }
@@ -134,22 +134,5 @@ export namespace $ViewDirectiveFill {
134
134
  * });
135
135
  * ```
136
136
  */
137
- export let ngView: (
138
- | string
139
- | ((
140
- $view: any,
141
- $animate: any,
142
- $ngViewScroll: any,
143
- $interpolate: any,
144
- ) => {
145
- count: number;
146
- terminal: boolean;
147
- priority: number;
148
- transclude: string;
149
- compile: (
150
- _tElement: any,
151
- _tAttrs: any,
152
- $transclude: any,
153
- ) => (scope: any, $element: any, attrs: any) => void;
154
- })
155
- )[];
137
+ /** @type {import("../../interface.js").AnnotatedDirectiveFactory} */
138
+ export let ngView: import("../../interface.js").AnnotatedDirectiveFactory;
@@ -4,9 +4,8 @@
4
4
  *
5
5
  * This is where we hold the global mutable state such as current state, current
6
6
  * params, current transition, etc.
7
- * @implements {ServiceProvider}
8
7
  */
9
- export class RouterGlobals implements ServiceProvider {
8
+ export class RouterGlobals {
10
9
  /**
11
10
  * Current parameter values
12
11
  *
@@ -4,9 +4,8 @@
4
4
  *
5
5
  * This API is found at `$stateRegistry` ([[UIRouter.stateRegistry]])
6
6
  *
7
- * @implements {ServiceProvider}
8
7
  */
9
- export class StateRegistryProvider implements ServiceProvider {
8
+ export class StateRegistryProvider {
10
9
  static $inject: string[];
11
10
  /**
12
11
  * @param urlService