@angular-wave/angular.ts 0.17.0 → 0.19.0

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 (113) hide show
  1. package/@types/angular.d.ts +18 -6
  2. package/@types/animations/animate-css-driver.d.ts +2 -2
  3. package/@types/animations/animate-js-driver.d.ts +21 -3
  4. package/@types/animations/animate-js.d.ts +10 -2
  5. package/@types/animations/animate-swap.d.ts +4 -1
  6. package/@types/animations/animate.d.ts +11 -5
  7. package/@types/animations/animation.d.ts +8 -2
  8. package/@types/animations/css/animate-css.d.ts +16 -0
  9. package/@types/animations/interface.d.ts +315 -21
  10. package/@types/animations/queue/animate-queue.d.ts +17 -8
  11. package/@types/animations/queue/interface.d.ts +14 -7
  12. package/@types/animations/shared.d.ts +1 -1
  13. package/@types/core/compile/attributes.d.ts +5 -5
  14. package/@types/core/compile/compile.d.ts +28 -18
  15. package/@types/core/compile/interface.d.ts +209 -34
  16. package/@types/core/controller/controller.d.ts +30 -38
  17. package/@types/core/controller/interface.d.ts +12 -3
  18. package/@types/core/interpolate/interpolate.d.ts +1 -1
  19. package/@types/core/parse/interface.d.ts +2 -2
  20. package/@types/core/parse/interpreter.d.ts +110 -58
  21. package/@types/core/scope/interface.d.ts +6 -0
  22. package/@types/core/scope/scope.d.ts +2 -1
  23. package/@types/directive/aria/aria.d.ts +67 -27
  24. package/@types/directive/aria/interface.d.ts +9 -0
  25. package/@types/directive/class/class.d.ts +31 -0
  26. package/@types/directive/form/form.d.ts +54 -18
  27. package/@types/directive/input/input.d.ts +59 -18
  28. package/@types/directive/input/interface.d.ts +10 -0
  29. package/@types/directive/messages/messages.d.ts +73 -22
  30. package/@types/directive/model/interface.d.ts +19 -0
  31. package/@types/directive/model/model.d.ts +70 -33
  32. package/@types/directive/model-options/model-options.d.ts +1 -23
  33. package/@types/directive/repeat/repeat.d.ts +2 -3
  34. package/@types/directive/validators/validators.d.ts +1 -5
  35. package/@types/directive/worker/interface.d.ts +9 -0
  36. package/@types/docs.d.ts +24 -0
  37. package/@types/filters/json.d.ts +4 -0
  38. package/@types/interface.d.ts +22 -70
  39. package/@types/namespace.d.ts +73 -53
  40. package/@types/router/common/trace.d.ts +150 -42
  41. package/@types/router/directives/state-directives.d.ts +4 -4
  42. package/@types/router/directives/view-directive.d.ts +4 -7
  43. package/@types/router/hooks/core-resolvables.d.ts +11 -2
  44. package/@types/router/hooks/ignored-transition.d.ts +3 -1
  45. package/@types/router/hooks/invalid-transition.d.ts +3 -1
  46. package/@types/router/hooks/lazy-load.d.ts +17 -13
  47. package/@types/router/hooks/on-enter-exit-retain.d.ts +9 -3
  48. package/@types/router/hooks/redirect-to.d.ts +3 -3
  49. package/@types/router/hooks/resolve.d.ts +11 -3
  50. package/@types/router/hooks/views.d.ts +6 -4
  51. package/@types/router/params/interface.d.ts +3 -2
  52. package/@types/router/params/param-factory.d.ts +24 -3
  53. package/@types/router/params/param-type.d.ts +47 -11
  54. package/@types/router/params/param-types.d.ts +52 -0
  55. package/@types/router/params/param.d.ts +52 -28
  56. package/@types/router/params/state-params.d.ts +5 -3
  57. package/@types/router/path/interface.d.ts +3 -0
  58. package/@types/router/path/path-node.d.ts +34 -14
  59. package/@types/router/path/path-utils.d.ts +75 -25
  60. package/@types/router/resolve/resolvable.d.ts +34 -7
  61. package/@types/router/resolve/resolve-context.d.ts +52 -34
  62. package/@types/router/router.d.ts +10 -12
  63. package/@types/router/state/interface.d.ts +194 -31
  64. package/@types/router/state/state-builder.d.ts +29 -29
  65. package/@types/router/state/state-matcher.d.ts +29 -11
  66. package/@types/router/state/state-object.d.ts +68 -22
  67. package/@types/router/state/state-queue-manager.d.ts +19 -10
  68. package/@types/router/state/state-registry.d.ts +80 -28
  69. package/@types/router/state/state-service.d.ts +182 -123
  70. package/@types/router/state/target-state.d.ts +36 -27
  71. package/@types/router/state/views.d.ts +48 -19
  72. package/@types/router/template-factory.d.ts +8 -15
  73. package/@types/router/transition/hook-builder.d.ts +17 -6
  74. package/@types/router/transition/hook-registry.d.ts +80 -46
  75. package/@types/router/transition/interface.d.ts +138 -118
  76. package/@types/router/transition/reject-factory.d.ts +58 -22
  77. package/@types/router/transition/transition-event-type.d.ts +19 -8
  78. package/@types/router/transition/transition-hook.d.ts +50 -29
  79. package/@types/router/transition/transition-service.d.ts +186 -30
  80. package/@types/router/transition/transition.d.ts +201 -70
  81. package/@types/router/url/interface.d.ts +140 -0
  82. package/@types/router/url/url-config.d.ts +19 -16
  83. package/@types/router/url/url-matcher.d.ts +66 -46
  84. package/@types/router/url/url-rule.d.ts +58 -35
  85. package/@types/router/url/url-rules.d.ts +38 -28
  86. package/@types/router/url/url-service.d.ts +68 -41
  87. package/@types/router/view/interface.d.ts +10 -30
  88. package/@types/router/view/view.d.ts +35 -21
  89. package/@types/services/anchor-scroll/anchor-scroll.d.ts +1 -1
  90. package/@types/services/anchor-scroll/interface.d.ts +5 -8
  91. package/@types/services/http/http.d.ts +20 -23
  92. package/@types/services/http/interface.d.ts +11 -23
  93. package/@types/services/location/interface.d.ts +1 -4
  94. package/@types/services/location/location.d.ts +14 -14
  95. package/@types/services/sce/interface.d.ts +2 -2
  96. package/@types/services/sce/sce.d.ts +16 -10
  97. package/@types/services/template-request/template-request.d.ts +21 -4
  98. package/@types/shared/common.d.ts +5 -32
  99. package/@types/shared/dom.d.ts +10 -5
  100. package/@types/shared/interface.d.ts +4 -0
  101. package/@types/shared/utils.d.ts +17 -6
  102. package/dist/angular-ts.esm.js +6643 -3107
  103. package/dist/angular-ts.umd.js +6643 -3107
  104. package/dist/angular-ts.umd.min.js +1 -1
  105. package/dist/angular-ts.umd.min.js.gz +0 -0
  106. package/dist/angular-ts.umd.min.js.map +1 -1
  107. package/package.json +1 -2
  108. package/@types/animations/animate-css.d.ts +0 -11
  109. package/@types/filters/filters.d.ts +0 -38
  110. package/@types/router/hooks/update-globals.d.ts +0 -1
  111. package/@types/router/hooks/url.d.ts +0 -5
  112. package/@types/router/scroll/interface.d.ts +0 -3
  113. package/@types/router/scroll/view-scroll.d.ts +0 -8
@@ -1,4 +1,7 @@
1
- export function escapeForRegexp(str: any): any;
1
+ /**
2
+ * @param {string} str
3
+ */
4
+ export function escapeForRegexp(str: string): string;
2
5
  /**
3
6
  * Adjusts a matcher string or RegExp into a proper RegExp.
4
7
  *
@@ -22,8 +25,8 @@ export class SceProvider {
22
25
  | string
23
26
  | ((
24
27
  $parse: ng.ParseService,
25
- $sceDelegate: ng.SCEDelegateService,
26
- ) => ng.SCEService)
28
+ $sceDelegate: ng.SceDelegateService,
29
+ ) => ng.SceService)
27
30
  )[];
28
31
  }
29
32
  export namespace SCE_CONTEXTS {
@@ -114,13 +117,13 @@ export namespace SCE_CONTEXTS {
114
117
  export class SceDelegateProvider {
115
118
  /**
116
119
  *
117
- * @param {Array=} value When provided, replaces the trustedResourceUrlList with
120
+ * @param {(Array<RegExp | "self"> | null)=} value When provided, replaces the trustedResourceUrlList with
118
121
  * the value provided. This must be an array or null. A snapshot of this array is used so
119
122
  * further changes to the array are ignored.
120
123
  * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items
121
124
  * allowed in this array.
122
125
  *
123
- * @return {Array<any>} The currently set trusted resource URL array.
126
+ * @return {Array<RegExp | "self">} The currently set trusted resource URL array.
124
127
  *
125
128
  *
126
129
  * Sets/Gets the list trusted of resource URLs.
@@ -134,12 +137,12 @@ export class SceDelegateProvider {
134
137
  * </div>
135
138
  */
136
139
  trustedResourceUrlList: (
137
- value?: any[] | undefined,
140
+ value?: (Array<RegExp | "self"> | null) | undefined,
138
141
  ...args: any[]
139
- ) => Array<any>;
142
+ ) => Array<RegExp | "self">;
140
143
  /**
141
144
  *
142
- * @param {Array=} bannedResourceUrlList When provided, replaces the `bannedResourceUrlList` with
145
+ * @param {(Array<RegExp | "self"> | null)=} value When provided, replaces the `bannedResourceUrlList` with
143
146
  * the value provided. This must be an array or null. A snapshot of this array is used so
144
147
  * further changes to the array are ignored.</p><p>
145
148
  * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items
@@ -151,7 +154,7 @@ export class SceDelegateProvider {
151
154
  * Finally, **the banned resource URL list overrides the trusted resource URL list** and has
152
155
  * the final say.
153
156
  *
154
- * @return {Array<any>} The currently set `bannedResourceUrlList` array.
157
+ * @return {Array<RegExp | "self">} The currently set `bannedResourceUrlList` array.
155
158
  *
156
159
  *
157
160
  * Sets/Gets the `bannedResourceUrlList` of trusted resource URLs.
@@ -159,7 +162,10 @@ export class SceDelegateProvider {
159
162
  * The **default value** when no trusted resource URL list has been explicitly set is the empty
160
163
  * array (i.e. there is no `bannedResourceUrlList`.)
161
164
  */
162
- bannedResourceUrlList: (value: any, ...args: any[]) => Array<any>;
165
+ bannedResourceUrlList: (
166
+ value?: (Array<RegExp | "self"> | null) | undefined,
167
+ ...args: any[]
168
+ ) => Array<RegExp | "self">;
163
169
  $get: (
164
170
  | string
165
171
  | ((
@@ -2,12 +2,29 @@
2
2
  * Provider for the `$templateRequest` service.
3
3
  *
4
4
  * Fetches templates via HTTP and caches them in `$templateCache`.
5
- * Templates are assumed trusted. This provider allows configuring
6
- * per-request `$http` options such as headers, timeout, or transform functions.
5
+ * Templates are assumed trusted.
6
+ *
7
+ * This provider allows configuring per-request `$http` options such as headers,
8
+ * timeout, or transform functions via `httpOptions`.
9
+ *
10
+ * Option A:
11
+ * - Provide a sensible default for template fetching (e.g. `Accept: text/html`)
12
+ * - Keep `httpOptions` overridable during config phase
7
13
  */
8
14
  export class TemplateRequestProvider {
9
- /** @type {ng.RequestShortcutConfig|undefined} */
10
- httpOptions: ng.RequestShortcutConfig | undefined;
15
+ /**
16
+ * Optional `$http.get()` config applied to every template request.
17
+ *
18
+ * This is merged on top of the default template request config:
19
+ * - `cache: $templateCache`
20
+ * - `transformResponse`: with `defaultHttpResponseTransform` removed
21
+ *
22
+ * Use this to set template-specific defaults such as custom headers,
23
+ * timeouts, credentials, etc.
24
+ *
25
+ * @type {ng.RequestShortcutConfig}
26
+ */
27
+ httpOptions: ng.RequestShortcutConfig;
11
28
  $get: (
12
29
  | string
13
30
  | ((
@@ -28,37 +28,10 @@ export function removeFrom(array: Array<any>, obj: any): Array<any>;
28
28
  * Applies a set of defaults to an options object. The options object is filtered
29
29
  * to only those properties of the objects in the defaultsList.
30
30
  * Earlier objects in the defaultsList take precedence when applying defaults.
31
- * @param {{}} opts
32
- * @param {{ current?: (() => void) | (() => null); transition?: null; traceData?: {}; bind?: null; inherit?: boolean; matchingKeys?: null; state?: { params: {}; }; strict?: boolean; caseInsensitive?: boolean; relative?: import("../router/state/state-object.js").StateObject | null | undefined; location?: boolean; notify?: boolean; reload?: boolean; supercede?: boolean; custom?: {}; source?: string; lossy?: boolean; absolute?: boolean; }[]} defaultsList
33
- */
34
- export function defaults(
35
- opts: {},
36
- ...defaultsList: {
37
- current?: (() => void) | (() => null);
38
- transition?: null;
39
- traceData?: {};
40
- bind?: null;
41
- inherit?: boolean;
42
- matchingKeys?: null;
43
- state?: {
44
- params: {};
45
- };
46
- strict?: boolean;
47
- caseInsensitive?: boolean;
48
- relative?:
49
- | import("../router/state/state-object.js").StateObject
50
- | null
51
- | undefined;
52
- location?: boolean;
53
- notify?: boolean;
54
- reload?: boolean;
55
- supercede?: boolean;
56
- custom?: {};
57
- source?: string;
58
- lossy?: boolean;
59
- absolute?: boolean;
60
- }[]
61
- ): any;
31
+ * @param {any} opts
32
+ * @param {any} defaultsList
33
+ */
34
+ export function defaults(opts: any, ...defaultsList: any): any;
62
35
  /**
63
36
  * Return a copy of the object only containing the whitelisted properties.
64
37
  *
@@ -203,7 +176,7 @@ export function tail<T>(arr: any[] | string): T | undefined;
203
176
  export function copy(src: any, dest: any): any;
204
177
  export function allTrueR(memo: any, elem: any): any;
205
178
  export function anyTrueR(memo: any, elem: any): any;
206
- export function unnestR<T>(memo: T[], elem: T | T[]): T[];
179
+ export function unnestR(memo: any, elem: any): any;
207
180
  export function flattenR<T>(memo: T[], elem: any): T[];
208
181
  export function uniqR(acc: any[], token: any): any[];
209
182
  export function unnest(arr: any[]): any;
@@ -187,16 +187,21 @@ export function cleanElementData(nodes: NodeListOf<Element> | Element[]): void;
187
187
  export function getInjector(element: Element): ng.InjectorService;
188
188
  /**
189
189
  * Creates a DOM element from an HTML string.
190
- * @param {string} htmlString - A string representing the HTML to parse. Must have only one root element.
191
- * @returns {Element} - The parsed DOM element.
190
+ * Must have exactly one root node.
191
+ *
192
+ * @param {string} htmlString - A string representing the HTML to parse.
193
+ * @returns {Element}
192
194
  */
193
195
  export function createElementFromHTML(htmlString: string): Element;
194
196
  /**
195
- * Creates a DOM element from an HTML string.
197
+ * Creates a NodeList from an HTML string.
198
+ *
196
199
  * @param {string} htmlString - A string representing the HTML to parse.
197
- * @returns {NodeList} - The parsed DOM element.
200
+ * @returns {NodeListOf<ChildNode>}
198
201
  */
199
- export function createNodelistFromHTML(htmlString: string): NodeList;
202
+ export function createNodelistFromHTML(
203
+ htmlString: string,
204
+ ): NodeListOf<ChildNode>;
200
205
  /**
201
206
  * Remove element from the DOM and clear Cache data, associated with the node.
202
207
  * @param {Element} element
@@ -18,3 +18,7 @@ export interface ErrorHandlingConfig {
18
18
  urlErrorParamsEnabled?: boolean;
19
19
  }
20
20
  export type Validator = (value: unknown) => boolean;
21
+ /**
22
+ * A dictionary of string keys and values of type T.
23
+ */
24
+ export type Dict<T> = Record<string, T>;
@@ -256,8 +256,8 @@ export function extend(dst: any, ...src: any[]): any;
256
256
  */
257
257
  export function isNumberNaN(num: any): boolean;
258
258
  /**
259
- * @param {Object} parent
260
- * @param {Object} extra
259
+ * @param {any} parent
260
+ * @param {any} extra
261
261
  * @returns {Object}
262
262
  */
263
263
  export function inherit(parent: any, extra: any): any;
@@ -277,9 +277,9 @@ export function hasCustomToString(obj: { toString: () => string }): boolean;
277
277
  export function getNodeName(element: Element): string;
278
278
  /**
279
279
  * @param {any} array
280
- * @param {string} obj
280
+ * @param {any} obj
281
281
  */
282
- export function includes(array: any, obj: string): boolean;
282
+ export function includes(array: any, obj: any): boolean;
283
283
  /**
284
284
  * Removes the first occurrence of a specified value from an array.
285
285
  *
@@ -427,10 +427,10 @@ export function fromJson(json: string): any | Array<any> | string | number;
427
427
  export function addDateMinutes(date: Date, minutes: number): Date;
428
428
  /**
429
429
  * Parses an escaped url query string into key-value pairs.
430
- * @param {string} keyValue
430
+ * @param {string} value
431
431
  * @returns {Object.<string,boolean|Array<any>>}
432
432
  */
433
- export function parseKeyValue(keyValue: string): {
433
+ export function parseKeyValue(value: string): {
434
434
  [x: string]: boolean | any[];
435
435
  };
436
436
  /**
@@ -724,5 +724,16 @@ export function instantiateWasm(
724
724
  * @returns {boolean}
725
725
  */
726
726
  export function isArrowFunction(fn: any): boolean;
727
+ /**
728
+ * Creates an object with no prototype.
729
+ *
730
+ * This is useful for use as a dictionary or map, since the returned object
731
+ * does not inherit from `Object.prototype` and therefore has no built-in
732
+ * properties such as `toString` or `hasOwnProperty`.
733
+ *
734
+ * @template T
735
+ * @returns {Record<string, T>} An object with a null prototype.
736
+ */
737
+ export function nullObject<T>(): Record<string, T>;
727
738
  export const isProxySymbol: unique symbol;
728
739
  export const ngAttrPrefixes: string[];