@angular-wave/angular.ts 0.18.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 (107) 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 +11 -1
  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 +7 -0
  8. package/@types/animations/css/animate-css.d.ts +16 -0
  9. package/@types/animations/interface.d.ts +308 -19
  10. package/@types/animations/queue/animate-queue.d.ts +16 -7
  11. package/@types/animations/queue/interface.d.ts +14 -7
  12. package/@types/core/compile/attributes.d.ts +1 -1
  13. package/@types/core/compile/compile.d.ts +25 -15
  14. package/@types/core/compile/interface.d.ts +209 -34
  15. package/@types/core/controller/controller.d.ts +30 -38
  16. package/@types/core/controller/interface.d.ts +12 -3
  17. package/@types/core/parse/interface.d.ts +2 -2
  18. package/@types/core/parse/interpreter.d.ts +110 -58
  19. package/@types/core/scope/interface.d.ts +6 -0
  20. package/@types/core/scope/scope.d.ts +2 -1
  21. package/@types/directive/aria/aria.d.ts +66 -26
  22. package/@types/directive/aria/interface.d.ts +9 -0
  23. package/@types/directive/class/class.d.ts +31 -0
  24. package/@types/directive/form/form.d.ts +54 -18
  25. package/@types/directive/input/input.d.ts +59 -18
  26. package/@types/directive/input/interface.d.ts +10 -0
  27. package/@types/directive/messages/messages.d.ts +63 -12
  28. package/@types/directive/model/interface.d.ts +19 -0
  29. package/@types/directive/model/model.d.ts +70 -33
  30. package/@types/directive/model-options/model-options.d.ts +1 -23
  31. package/@types/directive/repeat/repeat.d.ts +2 -3
  32. package/@types/directive/validators/validators.d.ts +1 -5
  33. package/@types/directive/worker/interface.d.ts +9 -0
  34. package/@types/docs.d.ts +24 -0
  35. package/@types/filters/json.d.ts +4 -0
  36. package/@types/interface.d.ts +22 -69
  37. package/@types/namespace.d.ts +66 -40
  38. package/@types/router/common/trace.d.ts +150 -42
  39. package/@types/router/directives/state-directives.d.ts +4 -4
  40. package/@types/router/directives/view-directive.d.ts +2 -5
  41. package/@types/router/hooks/core-resolvables.d.ts +11 -2
  42. package/@types/router/hooks/ignored-transition.d.ts +3 -1
  43. package/@types/router/hooks/invalid-transition.d.ts +3 -1
  44. package/@types/router/hooks/lazy-load.d.ts +17 -13
  45. package/@types/router/hooks/on-enter-exit-retain.d.ts +9 -3
  46. package/@types/router/hooks/redirect-to.d.ts +3 -3
  47. package/@types/router/hooks/resolve.d.ts +11 -3
  48. package/@types/router/hooks/views.d.ts +6 -4
  49. package/@types/router/params/interface.d.ts +3 -2
  50. package/@types/router/params/param-factory.d.ts +24 -3
  51. package/@types/router/params/param-type.d.ts +47 -11
  52. package/@types/router/params/param-types.d.ts +52 -0
  53. package/@types/router/params/param.d.ts +52 -28
  54. package/@types/router/params/state-params.d.ts +5 -3
  55. package/@types/router/path/interface.d.ts +3 -0
  56. package/@types/router/path/path-node.d.ts +34 -14
  57. package/@types/router/path/path-utils.d.ts +75 -25
  58. package/@types/router/resolve/resolvable.d.ts +34 -7
  59. package/@types/router/resolve/resolve-context.d.ts +52 -34
  60. package/@types/router/router.d.ts +10 -12
  61. package/@types/router/state/interface.d.ts +194 -31
  62. package/@types/router/state/state-builder.d.ts +29 -29
  63. package/@types/router/state/state-matcher.d.ts +29 -11
  64. package/@types/router/state/state-object.d.ts +67 -21
  65. package/@types/router/state/state-queue-manager.d.ts +19 -10
  66. package/@types/router/state/state-registry.d.ts +80 -28
  67. package/@types/router/state/state-service.d.ts +182 -123
  68. package/@types/router/state/target-state.d.ts +36 -27
  69. package/@types/router/state/views.d.ts +48 -19
  70. package/@types/router/template-factory.d.ts +8 -15
  71. package/@types/router/transition/hook-builder.d.ts +17 -6
  72. package/@types/router/transition/hook-registry.d.ts +80 -46
  73. package/@types/router/transition/interface.d.ts +138 -118
  74. package/@types/router/transition/reject-factory.d.ts +58 -22
  75. package/@types/router/transition/transition-event-type.d.ts +19 -8
  76. package/@types/router/transition/transition-hook.d.ts +50 -29
  77. package/@types/router/transition/transition-service.d.ts +186 -30
  78. package/@types/router/transition/transition.d.ts +201 -70
  79. package/@types/router/url/interface.d.ts +140 -0
  80. package/@types/router/url/url-config.d.ts +19 -16
  81. package/@types/router/url/url-matcher.d.ts +66 -46
  82. package/@types/router/url/url-rule.d.ts +58 -35
  83. package/@types/router/url/url-rules.d.ts +38 -28
  84. package/@types/router/url/url-service.d.ts +68 -41
  85. package/@types/router/view/interface.d.ts +10 -30
  86. package/@types/router/view/view.d.ts +35 -21
  87. package/@types/services/anchor-scroll/interface.d.ts +1 -1
  88. package/@types/services/http/http.d.ts +19 -22
  89. package/@types/services/http/interface.d.ts +11 -23
  90. package/@types/services/location/interface.d.ts +1 -4
  91. package/@types/services/location/location.d.ts +13 -13
  92. package/@types/services/sce/sce.d.ts +14 -8
  93. package/@types/services/template-request/template-request.d.ts +21 -4
  94. package/@types/shared/common.d.ts +5 -32
  95. package/@types/shared/dom.d.ts +10 -5
  96. package/@types/shared/interface.d.ts +4 -0
  97. package/@types/shared/utils.d.ts +17 -6
  98. package/dist/angular-ts.esm.js +6424 -2850
  99. package/dist/angular-ts.umd.js +6424 -2850
  100. package/dist/angular-ts.umd.min.js +1 -1
  101. package/dist/angular-ts.umd.min.js.gz +0 -0
  102. package/dist/angular-ts.umd.min.js.map +1 -1
  103. package/package.json +1 -2
  104. package/@types/animations/animate-css.d.ts +0 -11
  105. package/@types/filters/filters.d.ts +0 -38
  106. package/@types/router/hooks/update-globals.d.ts +0 -1
  107. package/@types/router/hooks/url.d.ts +0 -5
@@ -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[];