@angular-wave/angular.ts 0.15.0 → 0.15.1

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 (59) hide show
  1. package/@types/angular.d.ts +1 -1
  2. package/@types/core/compile/attributes.d.ts +28 -4
  3. package/@types/core/compile/inteface.d.ts +5 -1
  4. package/@types/core/di/inteface.d.ts +11 -0
  5. package/@types/core/parse/ast/ast-node.d.ts +2 -0
  6. package/@types/core/parse/parse.d.ts +4 -1
  7. package/@types/core/scope/interface.d.ts +26 -0
  8. package/@types/directive/bind/bind.d.ts +5 -7
  9. package/@types/directive/form/form.d.ts +12 -9
  10. package/@types/directive/init/init.d.ts +2 -2
  11. package/@types/directive/input/input.d.ts +16 -0
  12. package/@types/directive/listener/listener.d.ts +4 -0
  13. package/@types/directive/model/interface.d.ts +18 -0
  14. package/@types/directive/model/model.d.ts +20 -18
  15. package/@types/directive/non-bindable/non-bindable.d.ts +2 -2
  16. package/@types/directive/select/select.d.ts +2 -2
  17. package/@types/directive/setter/setter.d.ts +2 -2
  18. package/@types/directive/show-hide/show-hide.d.ts +2 -4
  19. package/@types/directive/switch/switch.d.ts +4 -4
  20. package/@types/interface.d.ts +22 -1
  21. package/@types/namespace.d.ts +9 -1
  22. package/@types/router/router.d.ts +5 -3
  23. package/@types/router/scroll/interface.d.ts +1 -1
  24. package/@types/router/state/interface.d.ts +5 -0
  25. package/@types/router/state/state-builder.d.ts +10 -6
  26. package/@types/router/state/state-matcher.d.ts +11 -3
  27. package/@types/router/state/state-object.d.ts +3 -5
  28. package/@types/router/state/state-queue-manager.d.ts +14 -8
  29. package/@types/router/state/state-registry.d.ts +12 -3
  30. package/@types/router/state/state-service.d.ts +8 -2
  31. package/@types/router/transition/hook-registry.d.ts +15 -5
  32. package/@types/router/transition/transition.d.ts +4 -2
  33. package/@types/router/url/url-rules.d.ts +3 -84
  34. package/@types/router/url/url-service.d.ts +9 -8
  35. package/@types/services/cookie/cookie.d.ts +3 -11
  36. package/@types/services/http/http.d.ts +6 -31
  37. package/@types/services/http/interface.d.ts +22 -0
  38. package/@types/services/location/location.d.ts +14 -13
  39. package/@types/services/sce/interface.d.ts +25 -0
  40. package/@types/services/sse/interface.d.ts +8 -1
  41. package/@types/services/sse/sse.d.ts +10 -18
  42. package/@types/services/storage/storage.d.ts +6 -6
  43. package/@types/services/stream/interface.d.ts +1 -1
  44. package/@types/services/stream/stream.d.ts +98 -0
  45. package/@types/shared/common.d.ts +2 -2
  46. package/@types/shared/dom.d.ts +21 -42
  47. package/@types/shared/hof.d.ts +27 -37
  48. package/@types/shared/noderef.d.ts +2 -2
  49. package/@types/shared/strings.d.ts +13 -4
  50. package/@types/shared/utils.d.ts +123 -66
  51. package/@types/shared/validate.d.ts +7 -0
  52. package/dist/angular-ts.esm.js +980 -812
  53. package/dist/angular-ts.umd.js +980 -812
  54. package/dist/angular-ts.umd.min.js +1 -1
  55. package/dist/angular-ts.umd.min.js.gz +0 -0
  56. package/dist/angular-ts.umd.min.js.map +1 -1
  57. package/package.json +1 -1
  58. package/@types/router/state-filters.d.ts +0 -39
  59. package/@types/shared/cache.d.ts +0 -7
@@ -1,4 +1,4 @@
1
- export class Angular {
1
+ export class Angular extends EventTarget {
2
2
  /** @private @type {!Array<string|any>} */
3
3
  private _bootsrappedModules;
4
4
  /** @public @type {ng.PubSubService} */
@@ -1,6 +1,25 @@
1
+ /**
2
+ * @extends {Record<string, any>}
3
+ */
1
4
  export class Attributes {
2
5
  static $nonscope: boolean;
3
6
  /**
7
+ * Creates an Attributes instance.
8
+ *
9
+ * There are two construction modes:
10
+ *
11
+ * 1. **Fresh instance** (no `attributesToCopy`):
12
+ * - Used when compiling a DOM element for the first time.
13
+ * - Initializes a new `$attr` map to track normalized → DOM attribute names.
14
+ *
15
+ * 2. **Clone instance** (`attributesToCopy` provided):
16
+ * - Used when cloning attributes for directive linking / child scopes.
17
+ * - Performs a shallow copy of all properties from the source Attributes object,
18
+ * including `$attr`, normalized attribute values, and internal fields
19
+ * (e.g. `$$observers`).
20
+ * - `$attr` is intentionally **not reinitialized** in this case, because the
21
+ * source object already contains the correct normalized → DOM attribute mapping.
22
+ *
4
23
  * @param {ng.AnimateService} $animate
5
24
  * @param {ng.ExceptionHandlerService} $exceptionHandler
6
25
  * @param {*} $sce
@@ -17,9 +36,13 @@ export class Attributes {
17
36
  _$animate: import("../../animations/interface.ts").AnimateService;
18
37
  _$exceptionHandler: import("../../services/exception/interface.ts").ExceptionHandler;
19
38
  _$sce: any;
39
+ /**
40
+ * A map of DOM element attribute names to the normalized name. This is needed
41
+ * to do reverse lookup from normalized name back to actual name.
42
+ */
20
43
  $attr: {};
21
44
  /** @type {import("../../shared/noderef.js").NodeRef} */
22
- $nodeRef: import("../../shared/noderef.js").NodeRef;
45
+ _nodeRef: import("../../shared/noderef.js").NodeRef;
23
46
  /** @type {Node|Element} */
24
47
  get $$element(): Node | Element;
25
48
  /**
@@ -71,6 +94,7 @@ export class Attributes {
71
94
  attrName?: string | undefined,
72
95
  ): void;
73
96
  /**
97
+ * @template T
74
98
  * Observes an interpolated attribute.
75
99
  *
76
100
  * The observer function will be invoked once during the next `$digest` following
@@ -78,13 +102,13 @@ export class Attributes {
78
102
  * changes.
79
103
  *
80
104
  * @param {string} key Normalized key. (ie ngAttribute) .
81
- * @param {any} fn Function that will be called whenever
105
+ * @param {(value?: T) => any} fn Function that will be called whenever
82
106
  the interpolated value of the attribute changes.
83
107
  * See the {@link guide/interpolation#how-text-and-attribute-bindings-work Interpolation
84
108
  * guide} for more info.
85
- * @returns {function()} Returns a deregistration function for this observer.
109
+ * @returns {Function} Returns a deregistration function for this observer.
86
110
  */
87
- $observe(key: string, fn: any): () => any;
111
+ $observe<T>(key: string, fn: (value?: T) => any): Function;
88
112
  $$observers: any;
89
113
  setSpecialAttr(element: any, attrName: any, value: any): void;
90
114
  /**
@@ -1,5 +1,7 @@
1
1
  import type { Scope } from "../scope/scope.js";
2
2
  import type { NodeRef } from "../../shared/noderef.js";
3
+ type TranscludedNodes = Node | Node[] | NodeList | null;
4
+ type TranscludeFnCb = (clone?: TranscludedNodes, scope?: Scope | null) => void;
3
5
  /**
4
6
  * A function passed as the fifth argument to a `PublicLinkFn` link function.
5
7
  * It behaves like a linking function, with the `scope` argument automatically created
@@ -8,7 +10,8 @@ import type { NodeRef } from "../../shared/noderef.js";
8
10
  * The function returns the DOM content to be injected (transcluded) into the directive.
9
11
  */
10
12
  export type TranscludeFn = {
11
- (clone?: Element | Node | ChildNode | NodeList | Node[], scope?: Scope): void;
13
+ (cb: TranscludeFnCb): void;
14
+ (scope: Scope, cb?: TranscludeFnCb): void;
12
15
  $$slots?: any;
13
16
  };
14
17
  /**
@@ -84,3 +87,4 @@ export type CompositeLinkFn = (
84
87
  $linkNode: NodeRef,
85
88
  parentBoundTranscludeFn?: Function,
86
89
  ) => void;
90
+ export {};
@@ -0,0 +1,11 @@
1
+ export interface StorageLike {
2
+ getItem(key: string): string | null;
3
+ setItem(key: string, value: string): void;
4
+ removeItem(key: string): void;
5
+ }
6
+ export interface PersistentStoreConfig {
7
+ backend?: StorageLike;
8
+ serialize?: (value: unknown) => string;
9
+ deserialize?: (value: string) => unknown;
10
+ cookie?: Record<string, unknown>;
11
+ }
@@ -53,4 +53,6 @@ export type ASTNode = {
53
53
  filter?: boolean;
54
54
  /** Indicates in node depends on non-shallow state of objects */
55
55
  isPure?: boolean;
56
+ /** Indicates the expression is a contant */
57
+ constant?: boolean;
56
58
  };
@@ -29,5 +29,8 @@ export class ParseProvider {
29
29
  identifierStart?: (arg0: any) => boolean,
30
30
  identifierContinue?: (arg0: any) => boolean,
31
31
  ) => ParseProvider;
32
- $get: (string | (($filter: (any: any) => any) => any))[];
32
+ $get: (
33
+ | string
34
+ | (($filter: (any: any) => any) => import("./interface.ts").ParseService)
35
+ )[];
33
36
  }
@@ -10,3 +10,29 @@ export interface Listener {
10
10
  watchProp?: string;
11
11
  foreignListener?: ProxyConstructor;
12
12
  }
13
+ export interface ScopeEvent {
14
+ /**
15
+ * the scope on which the event was $emit-ed or $broadcast-ed.
16
+ */
17
+ targetScope: ng.Scope;
18
+ /**
19
+ * the scope that is currently handling the event. Once the event propagates through the scope hierarchy, this property is set to null.
20
+ */
21
+ currentScope: ng.Scope;
22
+ /**
23
+ * name of the event.
24
+ */
25
+ name: string;
26
+ /**
27
+ * calling stopPropagation function will cancel further event propagation (available only for events that were $emit-ed).
28
+ */
29
+ stopPropagation?(): void;
30
+ /**
31
+ * calling preventDefault sets defaultPrevented flag to true.
32
+ */
33
+ preventDefault(): void;
34
+ /**
35
+ * true if preventDefault was called.
36
+ */
37
+ defaultPrevented: boolean;
38
+ }
@@ -3,16 +3,14 @@
3
3
  */
4
4
  export function ngBindDirective(): ng.Directive;
5
5
  /**
6
- * @returns {import('../../interface.ts').Directive}
6
+ * @returns {ng.Directive}
7
7
  */
8
- export function ngBindTemplateDirective(): import("../../interface.ts").Directive;
8
+ export function ngBindTemplateDirective(): ng.Directive;
9
9
  /**
10
- * @param {import('../../core/parse/interface.ts').ParseService} $parse
11
- * @returns {import('../../interface.ts').Directive}
10
+ * @param {ng.ParseService} $parse
11
+ * @returns {ng.Directive}
12
12
  */
13
- export function ngBindHtmlDirective(
14
- $parse: import("../../core/parse/interface.ts").ParseService,
15
- ): import("../../interface.ts").Directive;
13
+ export function ngBindHtmlDirective($parse: ng.ParseService): ng.Directive;
16
14
  export namespace ngBindHtmlDirective {
17
15
  let $inject: string[];
18
16
  }
@@ -4,26 +4,26 @@ export function setupValidity(instance: any): void;
4
4
  * $nonscope: boolean,
5
5
  * $addControl: Function,
6
6
  * $getControls: () => any[],
7
- * $$renameControl: Function,
7
+ * _renameControl: Function,
8
8
  * $removeControl: Function,
9
9
  * $setValidity: Function | ((key: any, isValid: boolean, control: any) => any),
10
10
  * $setDirty: Function,
11
11
  * $setPristine: Function,
12
12
  * $setSubmitted: Function,
13
- * $$setSubmitted: Function
13
+ * _setSubmitted: Function
14
14
  * }}
15
15
  */
16
16
  export const nullFormCtrl: {
17
17
  $nonscope: boolean;
18
18
  $addControl: Function;
19
19
  $getControls: () => any[];
20
- $$renameControl: Function;
20
+ _renameControl: Function;
21
21
  $removeControl: Function;
22
22
  $setValidity: Function | ((key: any, isValid: boolean, control: any) => any);
23
23
  $setDirty: Function;
24
24
  $setPristine: Function;
25
25
  $setSubmitted: Function;
26
- $$setSubmitted: Function;
26
+ _setSubmitted: Function;
27
27
  };
28
28
  export const PENDING_CLASS: "ng-pending";
29
29
  /**
@@ -87,7 +87,7 @@ export class FormController {
87
87
  $animate: ng.AnimateService,
88
88
  $interpolate: ng.InterpolateService,
89
89
  );
90
- $$controls: any[];
90
+ _controls: any[];
91
91
  $name: string;
92
92
  /**
93
93
  * @property {boolean} $dirty True if user has already interacted with the form.
@@ -108,6 +108,7 @@ export class FormController {
108
108
  $$success: {};
109
109
  $pending: any;
110
110
  $$classCache: {};
111
+ $target: {};
111
112
  /**
112
113
  * Rollback all form controls pending updates to the `$modelValue`.
113
114
  *
@@ -154,9 +155,10 @@ export class FormController {
154
155
  * Likewise, adding a control to, or removing a control from the form is not reflected
155
156
  * in the shallow copy. That means you should get a fresh copy from `$getControls()` every time
156
157
  * you need access to the controls.
158
+ * @returns {ReadonlyArray<FormController>}
157
159
  */
158
- $getControls(): any;
159
- $$renameControl(control: any, newName: any): void;
160
+ $getControls(): ReadonlyArray<FormController>;
161
+ _renameControl(control: any, newName: any): void;
160
162
  /**
161
163
  * Deregister a control from the form.
162
164
  *
@@ -166,8 +168,9 @@ export class FormController {
166
168
  * form. `$dirty`, `$submitted` states will not be changed, because the expected behavior can be
167
169
  * different from case to case. For example, removing the only `$dirty` control from a form may or
168
170
  * may not mean that the form is still `$dirty`.
171
+ * @param {FormController } control
169
172
  */
170
- $removeControl(control: any): void;
173
+ $removeControl(control: FormController): void;
171
174
  /**
172
175
  * Sets the form to a dirty state.
173
176
  *
@@ -203,7 +206,7 @@ export class FormController {
203
206
  * parent forms of the form.
204
207
  */
205
208
  $setSubmitted(): void;
206
- $$setSubmitted(): void;
209
+ _setSubmitted(): void;
207
210
  set(object: any, property: any, controller: any): void;
208
211
  unset(object: any, property: any, controller: any): void;
209
212
  /**
@@ -1,4 +1,4 @@
1
1
  /**
2
- * @returns {import('../../interface.ts').Directive}
2
+ * @returns {ng.Directive}
3
3
  */
4
- export function ngInitDirective(): import("../../interface.ts").Directive;
4
+ export function ngInitDirective(): ng.Directive;
@@ -64,6 +64,22 @@ export function hiddenInputBrowserCacheDirective(): ng.Directive;
64
64
  * @returns {ng.Directive}
65
65
  */
66
66
  export function ngValueDirective(): ng.Directive;
67
+ /**
68
+ * @param {Date} date
69
+ * @param {any} timezone
70
+ * @param {undefined} [reverse]
71
+ */
72
+ export function convertTimezoneToLocal(
73
+ date: Date,
74
+ timezone: any,
75
+ reverse?: undefined,
76
+ ): Date;
77
+ /**
78
+ * @param {any} timezone
79
+ * @param {number} [fallback]
80
+ * @returns {number}
81
+ */
82
+ export function timezoneToOffset(timezone: any, fallback?: number): number;
67
83
  export const ISO_DATE_REGEXP: RegExp;
68
84
  export const URL_REGEXP: RegExp;
69
85
  export const EMAIL_REGEXP: RegExp;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @returns {ng.Directive}
3
+ */
4
+ export function ngListenerDirective(): ng.Directive;
@@ -0,0 +1,18 @@
1
+ export interface ModelValidators {
2
+ /**
3
+ * viewValue is any because it can be an object that is called in the view like $viewValue.name:$viewValue.subName
4
+ */
5
+ [index: string]: (modelValue: any, viewValue: any) => boolean;
6
+ }
7
+ export interface AsyncModelValidators {
8
+ [index: string]: (modelValue: any, viewValue: any) => Promise<any>;
9
+ }
10
+ export interface ModelParser {
11
+ (value: any): any;
12
+ }
13
+ export interface ModelFormatter {
14
+ (value: any): any;
15
+ }
16
+ export interface ModelViewChangeListener {
17
+ (): void;
18
+ }
@@ -72,16 +72,16 @@ export class NgModelController {
72
72
  $modelValue: any;
73
73
  /** @type {any} */
74
74
  $$rawModelValue: any;
75
- /** @type {any} */
76
- $validators: any;
77
- /** @type {any} */
78
- $asyncValidators: any;
79
- /** @type {Array<any>} */
80
- $parsers: Array<any>;
81
- /** @type {Array<any>} */
82
- $formatters: Array<any>;
83
- /** @type {Array<any>} */
84
- $viewChangeListeners: Array<any>;
75
+ /** @type {import("./interface.ts").ModelValidators} */
76
+ $validators: import("./interface.ts").ModelValidators;
77
+ /** @type {import("./interface.ts").AsyncModelValidators} */
78
+ $asyncValidators: import("./interface.ts").AsyncModelValidators;
79
+ /** @type {Array<import("./interface.ts").ModelParser>} */
80
+ $parsers: Array<import("./interface.ts").ModelParser>;
81
+ /** @type {Array<import("./interface.ts").ModelFormatter>} */
82
+ $formatters: Array<import("./interface.ts").ModelFormatter>;
83
+ /** @type {Array<import("./interface.ts").ModelViewChangeListener>} */
84
+ $viewChangeListeners: Array<import("./interface.ts").ModelViewChangeListener>;
85
85
  /** @type {boolean} */
86
86
  $untouched: boolean;
87
87
  /** @type {boolean} */
@@ -102,7 +102,7 @@ export class NgModelController {
102
102
  $nonscope: boolean;
103
103
  $addControl: Function;
104
104
  $getControls: () => any[];
105
- $$renameControl: Function;
105
+ _renameControl: Function;
106
106
  $removeControl: Function;
107
107
  $setValidity:
108
108
  | Function
@@ -110,7 +110,7 @@ export class NgModelController {
110
110
  $setDirty: Function;
111
111
  $setPristine: Function;
112
112
  $setSubmitted: Function;
113
- $$setSubmitted: Function;
113
+ _setSubmitted: Function;
114
114
  };
115
115
  $options: {
116
116
  $$options: import("../model-options/model-options.js").ModelOptionsConfig;
@@ -125,16 +125,16 @@ export class NgModelController {
125
125
  };
126
126
  $$updateEvents: string;
127
127
  $$updateEventHandler(ev: any): void;
128
- $$parsedNgModel: import("../../core/parse/interface.ts").CompiledExpression;
129
- $$parsedNgModelAssign: (context: any, value: any) => any;
128
+ _parsedNgModel: import("../../core/parse/interface.ts").CompiledExpression;
129
+ _parsedNgModelAssign: (context: any, value: any) => any;
130
130
  /**
131
131
  * @type {import("../../core/parse/interface.ts").CompiledExpression |
132
132
  * (function(ng.Scope): any)}
133
133
  */
134
- $$ngModelGet:
134
+ _ngModelGet:
135
135
  | import("../../core/parse/interface.ts").CompiledExpression
136
136
  | ((arg0: ng.Scope) => any);
137
- $$ngModelSet: (context: any, value: any) => any;
137
+ _ngModelSet: (context: any, value: any) => any;
138
138
  $$pendingDebounce: number;
139
139
  $$parserValid: boolean;
140
140
  /** @type {string} */
@@ -398,10 +398,12 @@ export class NgModelController {
398
398
  * **Note:** it is not possible to override the `getterSetter` option.
399
399
  * </div>
400
400
  *
401
- * @param {Object} options a hash of settings to override the previous options
401
+ * @param {import("../../interface.ts").NgModelOptions} options a hash of settings to override the previous options
402
402
  *
403
403
  */
404
- $overrideModelOptions(options: any): void;
404
+ $overrideModelOptions(
405
+ options: import("../../interface.ts").NgModelOptions,
406
+ ): void;
405
407
  /**
406
408
  * Runs the model -> view pipeline on the current
407
409
  * {@link ngModel.NgModelController#$modelValue $modelValue}.
@@ -1,4 +1,4 @@
1
1
  /**
2
- * @returns {import('../../interface.ts').Directive}
2
+ * @returns {ng.Directive}
3
3
  */
4
- export function ngNonBindableDirective(): import("../../interface.ts").Directive;
4
+ export function ngNonBindableDirective(): ng.Directive;
@@ -1,7 +1,7 @@
1
1
  /**
2
- * @returns {import('../../interface.ts').Directive}
2
+ * @returns {ng.Directive}
3
3
  */
4
- export function selectDirective(): import("../../interface.ts").Directive;
4
+ export function selectDirective(): ng.Directive;
5
5
  /**
6
6
  * @param {ng.InterpolateService} $interpolate
7
7
  * @returns {ng.Directive}
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * @param {ng.ParseService} $parse
3
3
  * @param {ng.LogService} $log
4
- * @returns {import('interface.ts').Directive}
4
+ * @returns {ng.Directive}
5
5
  */
6
6
  export function ngSetterDirective(
7
7
  $parse: ng.ParseService,
8
8
  $log: ng.LogService,
9
- ): any;
9
+ ): ng.Directive;
10
10
  export namespace ngSetterDirective {
11
11
  let $inject: string[];
12
12
  }
@@ -7,11 +7,9 @@ export namespace ngShowDirective {
7
7
  let $inject: string[];
8
8
  }
9
9
  /**
10
- * @returns {import('../../interface.ts').Directive}
10
+ * @returns {ng.Directive}
11
11
  */
12
- export function ngHideDirective(
13
- $animate: any,
14
- ): import("../../interface.ts").Directive;
12
+ export function ngHideDirective($animate: any): ng.Directive;
15
13
  export namespace ngHideDirective {
16
14
  let $inject_1: string[];
17
15
  export { $inject_1 as $inject };
@@ -7,10 +7,10 @@ export namespace ngSwitchDirective {
7
7
  let $inject: string[];
8
8
  }
9
9
  /**
10
- * @returns {import('../../interface.ts').Directive}
10
+ * @returns {ng.Directive}
11
11
  */
12
- export function ngSwitchWhenDirective(): import("../../interface.ts").Directive;
12
+ export function ngSwitchWhenDirective(): ng.Directive;
13
13
  /**
14
- * @returns {import('../../interface.ts').Directive}
14
+ * @returns {ng.Directive}
15
15
  */
16
- export function ngSwitchDefaultDirective(): import("../../interface.ts").Directive;
16
+ export function ngSwitchDefaultDirective(): ng.Directive;
@@ -1,6 +1,9 @@
1
1
  import { Attributes } from "./core/compile/attributes.js";
2
2
  import { Scope } from "./core/scope/scope.js";
3
3
  import { NgModelController } from "./directive/model/model.js";
4
+ export interface Constructor<T = any> {
5
+ new (...args: any[]): T;
6
+ }
4
7
  export declare const PublicInjectionTokens: {
5
8
  readonly $angular: "$angular";
6
9
  readonly $attrs: "$attrs";
@@ -376,7 +379,7 @@ export interface DirectivePrePost {
376
379
  * A link function executed during directive linking.
377
380
  */
378
381
  export type DirectiveLinkFn<T> = (
379
- scope: Scope,
382
+ scope: ng.Scope,
380
383
  element: HTMLElement,
381
384
  attrs: ng.Attributes,
382
385
  controller?: TController<T>,
@@ -462,6 +465,24 @@ export type CloneAttachFunction = (
462
465
  clonedElement?: Element,
463
466
  scope?: Scope,
464
467
  ) => any;
468
+ export interface TemplateLinkingFunction {
469
+ (
470
+ scope: ng.Scope,
471
+ cloneAttachFn?: CloneAttachFunction,
472
+ options?: TemplateLinkingFunctionOptions,
473
+ ): Element;
474
+ }
475
+ export interface TemplateLinkingFunctionOptions {
476
+ parentBoundTranscludeFn?: TranscludeFunctionObject | undefined;
477
+ transcludeControllers?:
478
+ | {
479
+ [controller: string]: {
480
+ instance: Controller;
481
+ };
482
+ }
483
+ | undefined;
484
+ futureParentElement?: Element | undefined;
485
+ }
465
486
  /**
466
487
  * Configuration for ngModel behavior.
467
488
  */
@@ -5,6 +5,7 @@ import { Scope as TScope } from "./core/scope/scope.js";
5
5
  import {
6
6
  ListenerFn as TListenerFn,
7
7
  Listener as TListener,
8
+ ScopeEvent as TScopeEvent,
8
9
  } from "./core/scope/interface.ts";
9
10
  import { NgModule as TNgModule } from "./core/di/ng-module/ng-module.js";
10
11
  import { InjectorService as TInjectorService } from "./core/di/internal-injector.js";
@@ -107,6 +108,10 @@ import { StateObject as TStateObject } from "./router/state/state-object.js";
107
108
  import { StateRegistryProvider as TStateRegistryProvider } from "./router/state/state-registry.js";
108
109
  import { ViewScrollService as TViewScrollService } from "./router/scroll/interface.ts";
109
110
  import { HookRegistry } from "./router/transition/interface.ts";
111
+ import {
112
+ SCEService as TSCEService,
113
+ SCEDelegateService as TSCEDelegateService,
114
+ } from "./services/sce/interface.ts";
110
115
  declare global {
111
116
  interface Function {
112
117
  $inject?: readonly string[] | undefined;
@@ -166,6 +171,8 @@ declare global {
166
171
  type RouterService = TRouterProvider;
167
172
  type StateService = TStateProvider;
168
173
  type StateRegistryService = TStateRegistryProvider;
174
+ type SCEService = TSCEService;
175
+ type SCEDelegateService = TSCEDelegateService;
169
176
  type SseService = TSseService;
170
177
  type SseConfig = TSseConfig;
171
178
  type TransitionService = TransitionProvider & HookRegistry;
@@ -179,7 +186,7 @@ declare global {
179
186
  type Listener = TListener;
180
187
  type DocumentService = Document;
181
188
  type WindowService = Window;
182
- type AngularServie = Angular;
189
+ type AngularService = Angular;
183
190
  type WorkerConfig = TWorkerConfig;
184
191
  type WorkerConnection = TWorkerConnection;
185
192
  type Injectable<
@@ -206,5 +213,6 @@ declare global {
206
213
  type AnchorScrollFunction = TAnchorScrollFunction;
207
214
  type AnchorScrollObject = TAnchorScrollObject;
208
215
  type InjectionTokens = typeof PublicInjectionTokens;
216
+ type ScopeEvent = TScopeEvent;
209
217
  }
210
218
  }
@@ -16,15 +16,17 @@ export class RouterProvider {
16
16
  /**
17
17
  * @type {number}
18
18
  */
19
- lastStartedTransitionId: number;
19
+ _lastStartedTransitionId: number;
20
20
  /**
21
21
  * @type {Queue<import("./transition/transition.js").Transition>}
22
22
  */
23
- transitionHistory: Queue<import("./transition/transition.js").Transition>;
23
+ _transitionHistory: Queue<import("./transition/transition.js").Transition>;
24
24
  /**
25
25
  * @type {Queue<import("./transition/transition.js").Transition>}
26
26
  */
27
- successfulTransitions: Queue<import("./transition/transition.js").Transition>;
27
+ _successfulTransitions: Queue<
28
+ import("./transition/transition.js").Transition
29
+ >;
28
30
  /**
29
31
  * @type {import("./state/interface.ts").StateDeclaration|undefined}
30
32
  */
@@ -1,3 +1,3 @@
1
1
  export type ViewScrollService =
2
2
  | ng.AnchorScrollService
3
- | ((el: Element) => void | Promise<void>);
3
+ | ((element: Element) => void);
@@ -14,7 +14,9 @@ import {
14
14
  } from "../resolve/interface.ts";
15
15
  import { Resolvable } from "../resolve/resolvable.js";
16
16
  import { TargetState } from "./target-state.js";
17
+ import { Glob } from "../glob/glob.js";
17
18
  export type StateOrName = string | StateDeclaration | StateObject;
19
+ export type StateStore = Record<string, StateObject | BuiltStateDeclaration>;
18
20
  export interface TransitionPromise extends Promise<StateObject> {
19
21
  transition: Transition;
20
22
  }
@@ -826,6 +828,9 @@ export type BuiltStateDeclaration = StateDeclaration & {
826
828
  parent?: BuiltStateDeclaration | null;
827
829
  /** Optional inherited data */
828
830
  data?: any;
831
+ _stateObjectCache?: {
832
+ nameGlob: Glob;
833
+ } | null;
829
834
  };
830
835
  /**
831
836
  * The return type of a [[StateDeclaration.lazyLoad]] function
@@ -58,18 +58,22 @@ export function resolvablesBuilder(
58
58
  export class StateBuilder {
59
59
  /**
60
60
  * @param {import('./state-matcher.js').StateMatcher} matcher
61
- * @param urlService
61
+ * @param {ng.UrlService} urlService
62
62
  */
63
63
  constructor(
64
64
  matcher: import("./state-matcher.js").StateMatcher,
65
- urlService: any,
65
+ urlService: ng.UrlService,
66
66
  );
67
- matcher: import("./state-matcher.js").StateMatcher;
68
- $injector: any;
69
- builders: {
67
+ _matcher: import("./state-matcher.js").StateMatcher;
68
+ _$injector: any;
69
+ _builders: {
70
70
  name: ((state: any) => any)[];
71
71
  self: (typeof selfBuilder)[];
72
- parent: ((state: any) => any)[];
72
+ parent: ((
73
+ state: any,
74
+ ) =>
75
+ | import("./state-object.js").StateObject
76
+ | import("./interface.ts").BuiltStateDeclaration)[];
73
77
  data: (typeof dataBuilder)[];
74
78
  url: ((stateObject: any) => any)[];
75
79
  navigable: ((state: any) => any)[];
@@ -1,7 +1,15 @@
1
1
  export class StateMatcher {
2
- constructor(_states: any);
3
- _states: any;
2
+ /** @param {import("./interface.ts").StateStore} states */
3
+ constructor(states: import("./interface.ts").StateStore);
4
+ /** @type {import("./interface.ts").StateStore} */
5
+ _states: import("./interface.ts").StateStore;
4
6
  isRelative(stateName: any): boolean;
5
- find(stateOrName: any, base: any, matchGlob?: boolean): any;
7
+ find(
8
+ stateOrName: any,
9
+ base: any,
10
+ matchGlob?: boolean,
11
+ ):
12
+ | import("./state-object.js").StateObject
13
+ | import("./interface.ts").BuiltStateDeclaration;
6
14
  resolvePath(name: any, base: any): string;
7
15
  }