@angular-wave/angular.ts 0.8.4 → 0.9.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 (213) hide show
  1. package/@types/core/scope/scope.d.ts +1 -4
  2. package/@types/interface.d.ts +17 -3
  3. package/@types/shared/interface.d.ts +17 -0
  4. package/@types/shared/utils.d.ts +4 -19
  5. package/dist/angular-ts.esm.js +42 -160
  6. package/dist/angular-ts.umd.js +42 -160
  7. package/dist/angular-ts.umd.min.js +1 -1
  8. package/docs/layouts/shortcodes/version.html +1 -1
  9. package/docs/static/typedoc/assets/hierarchy.js +1 -1
  10. package/docs/static/typedoc/assets/main.js +2 -2
  11. package/docs/static/typedoc/assets/navigation.js +1 -1
  12. package/docs/static/typedoc/assets/search.js +1 -1
  13. package/docs/static/typedoc/assets/style.css +2 -9
  14. package/docs/static/typedoc/classes/Location.html +20 -20
  15. package/docs/static/typedoc/classes/LocationProvider.html +5 -5
  16. package/docs/static/typedoc/classes/LogProvider.html +3 -3
  17. package/docs/static/typedoc/classes/PubSub.html +21 -21
  18. package/docs/static/typedoc/classes/PubSubProvider.html +1 -1
  19. package/docs/static/typedoc/classes/TemplateCacheProvider.html +2 -2
  20. package/docs/static/typedoc/hierarchy.html +1 -1
  21. package/docs/static/typedoc/index.html +1 -1
  22. package/docs/static/typedoc/interfaces/ChangesObject.html +3 -3
  23. package/docs/static/typedoc/interfaces/ComponentOptions.html +8 -8
  24. package/docs/static/typedoc/interfaces/Controller.html +6 -6
  25. package/docs/static/typedoc/interfaces/DefaultPorts.html +1 -1
  26. package/docs/static/typedoc/interfaces/Directive.html +18 -18
  27. package/docs/static/typedoc/interfaces/DirectivePrePost.html +1 -1
  28. package/docs/static/typedoc/interfaces/Html5Mode.html +1 -1
  29. package/docs/static/typedoc/interfaces/HttpProviderDefaults.html +7 -7
  30. package/docs/static/typedoc/interfaces/HttpService.html +21 -21
  31. package/docs/static/typedoc/interfaces/LogService.html +6 -6
  32. package/docs/static/typedoc/interfaces/NgModelController.html +15 -15
  33. package/docs/static/typedoc/interfaces/NgModelOptions.html +8 -8
  34. package/docs/static/typedoc/interfaces/Provider.html +17 -17
  35. package/docs/static/typedoc/interfaces/RequestConfig.html +15 -15
  36. package/docs/static/typedoc/interfaces/RequestShortcutConfig.html +11 -11
  37. package/docs/static/typedoc/interfaces/ServiceProvider.html +1 -1
  38. package/docs/static/typedoc/interfaces/TemplateCache.html +1 -1
  39. package/docs/static/typedoc/interfaces/TranscludeFunctionObject.html +4 -4
  40. package/docs/static/typedoc/interfaces/UrlParts.html +4 -4
  41. package/docs/static/typedoc/types/AnnotatedFactory.html +1 -1
  42. package/docs/static/typedoc/types/CloneAttachFunction.html +1 -1
  43. package/docs/static/typedoc/types/ControllerConstructor.html +1 -1
  44. package/docs/static/typedoc/types/DirectiveCompileFn.html +1 -1
  45. package/docs/static/typedoc/types/DirectiveController.html +1 -1
  46. package/docs/static/typedoc/types/DirectiveFactoryFn.html +1 -1
  47. package/docs/static/typedoc/types/DirectiveLinkFn.html +1 -1
  48. package/docs/static/typedoc/types/Expression.html +1 -1
  49. package/docs/static/typedoc/types/FilterFactory.html +1 -1
  50. package/docs/static/typedoc/types/FilterFn.html +1 -1
  51. package/docs/static/typedoc/types/Injectable.html +1 -1
  52. package/docs/static/typedoc/types/InjectableFactory.html +1 -1
  53. package/docs/static/typedoc/types/LogCall.html +1 -1
  54. package/docs/static/typedoc/types/LogServiceFactory.html +1 -1
  55. package/docs/static/typedoc/types/OnChangesObject.html +1 -1
  56. package/docs/static/typedoc/types/SwapModeType.html +1 -1
  57. package/docs/static/typedoc/types/TController.html +1 -1
  58. package/docs/static/typedoc/types/UrlChangeListener.html +4 -4
  59. package/docs/static/typedoc/variables/SwapMode.html +10 -10
  60. package/legacy.d.ts +0 -82
  61. package/package.json +2 -2
  62. package/src/animations/animate-js.js +2 -1
  63. package/src/animations/animate-queue.js +7 -6
  64. package/src/core/parse/interpreter.js +11 -6
  65. package/src/core/parse/parse.spec.js +6 -8
  66. package/src/core/scope/scope.js +10 -12
  67. package/src/core/scope/scope.spec.js +4 -4
  68. package/src/directive/http/form-router-test.html +44 -0
  69. package/src/directive/options/options-example.html +7 -3
  70. package/src/directive/options/options.js +1 -0
  71. package/src/directive/options/options.spec.js +117 -170
  72. package/src/interface.ts +20 -3
  73. package/src/router/directives/view-directive.js +0 -1
  74. package/src/router/directives/view-directive.spec.js +10 -9
  75. package/src/router/resolve/resolve-context.js +0 -19
  76. package/src/router/state/state-registry.js +3 -10
  77. package/src/router/state/state-service.js +5 -5
  78. package/src/router/transition/transition.js +1 -86
  79. package/src/router/view-hook.spec.js +1 -1
  80. package/src/shared/interface.ts +19 -0
  81. package/src/shared/utils.js +3 -12
  82. package/tsconfig.types.json +2 -2
  83. package/@types/angular.d.ts +0 -150
  84. package/@types/animations/animate-cache.d.ts +0 -50
  85. package/@types/animations/animate-children-directive.d.ts +0 -10
  86. package/@types/animations/animate-css-driver.d.ts +0 -18
  87. package/@types/animations/animate-css.d.ts +0 -18
  88. package/@types/animations/animate-js-driver.d.ts +0 -14
  89. package/@types/animations/animate-js.d.ts +0 -23
  90. package/@types/animations/animate-queue.d.ts +0 -28
  91. package/@types/animations/animate-runner.d.ts +0 -31
  92. package/@types/animations/animate-swap.d.ts +0 -9
  93. package/@types/animations/animate.d.ts +0 -450
  94. package/@types/animations/animation.d.ts +0 -14
  95. package/@types/animations/interface.d.ts +0 -17
  96. package/@types/animations/raf-scheduler.d.ts +0 -37
  97. package/@types/animations/shared.d.ts +0 -74
  98. package/@types/core/compile/compile.d.ts +0 -201
  99. package/@types/core/controller/controller.d.ts +0 -54
  100. package/@types/core/di/injector.d.ts +0 -22
  101. package/@types/core/filter/filter.d.ts +0 -23
  102. package/@types/core/interpolate/interpolate.d.ts +0 -38
  103. package/@types/core/parse/ast/ast-node.d.ts +0 -56
  104. package/@types/core/parse/ast/ast.d.ts +0 -164
  105. package/@types/core/parse/lexer/lexer.d.ts +0 -119
  106. package/@types/core/parse/lexer/token.d.ts +0 -17
  107. package/@types/core/parse/parse.d.ts +0 -33
  108. package/@types/core/parse/parser/parser.d.ts +0 -41
  109. package/@types/core/sanitize/interface.d.ts +0 -10
  110. package/@types/core/sanitize/sanitize-uri.d.ts +0 -40
  111. package/@types/directive/aria/aria.d.ts +0 -104
  112. package/@types/directive/attrs/attrs.d.ts +0 -8
  113. package/@types/directive/bind/bind.d.ts +0 -18
  114. package/@types/directive/channel/channel.d.ts +0 -10
  115. package/@types/directive/class/class.d.ts +0 -3
  116. package/@types/directive/cloak/cloak.d.ts +0 -4
  117. package/@types/directive/controller/controller.d.ts +0 -4
  118. package/@types/directive/events/events.d.ts +0 -21
  119. package/@types/directive/form/form.d.ts +0 -264
  120. package/@types/directive/http/http.d.ts +0 -46
  121. package/@types/directive/if/if.d.ts +0 -10
  122. package/@types/directive/include/include.d.ts +0 -28
  123. package/@types/directive/init/init.d.ts +0 -4
  124. package/@types/directive/input/input.d.ts +0 -70
  125. package/@types/directive/messages/messages.d.ts +0 -63
  126. package/@types/directive/model/model.d.ts +0 -515
  127. package/@types/directive/model-options/model-options.d.ts +0 -56
  128. package/@types/directive/non-bindable/non-bindable.d.ts +0 -4
  129. package/@types/directive/observe/observe.d.ts +0 -9
  130. package/@types/directive/options/options.d.ts +0 -13
  131. package/@types/directive/ref/ref.d.ts +0 -11
  132. package/@types/directive/repeat/repeat.d.ts +0 -11
  133. package/@types/directive/script/script.d.ts +0 -10
  134. package/@types/directive/select/select.d.ts +0 -15
  135. package/@types/directive/setter/setter.d.ts +0 -12
  136. package/@types/directive/show-hide/show-hide.d.ts +0 -19
  137. package/@types/directive/style/style.d.ts +0 -4
  138. package/@types/directive/switch/switch.d.ts +0 -18
  139. package/@types/directive/transclude/transclude.d.ts +0 -10
  140. package/@types/directive/validators/validators.d.ts +0 -149
  141. package/@types/filters/filter.d.ts +0 -4
  142. package/@types/filters/filters.d.ts +0 -38
  143. package/@types/filters/limit-to.d.ts +0 -4
  144. package/@types/filters/order-by.d.ts +0 -7
  145. package/@types/index.d.ts +0 -2
  146. package/@types/ng.d.ts +0 -8
  147. package/@types/router/common/trace.d.ts +0 -66
  148. package/@types/router/directives/state-directives.d.ts +0 -46
  149. package/@types/router/directives/view-directive.d.ts +0 -138
  150. package/@types/router/glob/glob.d.ts +0 -81
  151. package/@types/router/hooks/core-resolvables.d.ts +0 -2
  152. package/@types/router/hooks/ignored-transition.d.ts +0 -1
  153. package/@types/router/hooks/invalid-transition.d.ts +0 -1
  154. package/@types/router/hooks/lazy-load.d.ts +0 -42
  155. package/@types/router/hooks/on-enter-exit-retain.d.ts +0 -3
  156. package/@types/router/hooks/redirect-to.d.ts +0 -4
  157. package/@types/router/hooks/resolve.d.ts +0 -4
  158. package/@types/router/hooks/update-globals.d.ts +0 -1
  159. package/@types/router/hooks/url.d.ts +0 -5
  160. package/@types/router/hooks/views.d.ts +0 -5
  161. package/@types/router/params/interface.d.ts +0 -606
  162. package/@types/router/params/param-factory.d.ts +0 -16
  163. package/@types/router/params/param-type.d.ts +0 -59
  164. package/@types/router/params/param-types.d.ts +0 -36
  165. package/@types/router/params/param.d.ts +0 -71
  166. package/@types/router/params/state-params.d.ts +0 -12
  167. package/@types/router/path/path-node.d.ts +0 -38
  168. package/@types/router/path/path-utils.d.ts +0 -88
  169. package/@types/router/resolve/interface.d.ts +0 -200
  170. package/@types/router/resolve/resolvable.d.ts +0 -50
  171. package/@types/router/resolve/resolve-context.d.ts +0 -102
  172. package/@types/router/router.d.ts +0 -47
  173. package/@types/router/state/interface.d.ts +0 -983
  174. package/@types/router/state/state-builder.d.ts +0 -95
  175. package/@types/router/state/state-matcher.d.ts +0 -7
  176. package/@types/router/state/state-object.d.ts +0 -83
  177. package/@types/router/state/state-queue-manager.d.ts +0 -29
  178. package/@types/router/state/state-registry.d.ts +0 -134
  179. package/@types/router/state/state-service.d.ts +0 -419
  180. package/@types/router/state/target-state.d.ts +0 -102
  181. package/@types/router/state/views.d.ts +0 -58
  182. package/@types/router/state-filters.d.ts +0 -39
  183. package/@types/router/template-factory.d.ts +0 -117
  184. package/@types/router/transition/hook-builder.d.ts +0 -45
  185. package/@types/router/transition/hook-registry.d.ts +0 -102
  186. package/@types/router/transition/interface.d.ts +0 -880
  187. package/@types/router/transition/reject-factory.d.ts +0 -43
  188. package/@types/router/transition/transition-event-type.d.ts +0 -24
  189. package/@types/router/transition/transition-hook.d.ts +0 -86
  190. package/@types/router/transition/transition-service.d.ts +0 -116
  191. package/@types/router/transition/transition.d.ts +0 -396
  192. package/@types/router/url/url-config.d.ts +0 -99
  193. package/@types/router/url/url-matcher.d.ts +0 -174
  194. package/@types/router/url/url-rule.d.ts +0 -161
  195. package/@types/router/url/url-rules.d.ts +0 -249
  196. package/@types/router/url/url-service.d.ts +0 -254
  197. package/@types/router/view/interface.d.ts +0 -44
  198. package/@types/router/view/view.d.ts +0 -149
  199. package/@types/router/view-scroll.d.ts +0 -10
  200. package/@types/services/anchor-scroll.d.ts +0 -25
  201. package/@types/services/cookie-reader.d.ts +0 -4
  202. package/@types/services/http/http.d.ts +0 -134
  203. package/@types/services/http-backend/http-backend.d.ts +0 -58
  204. package/@types/services/sce/sce.d.ts +0 -238
  205. package/@types/services/template-request.d.ts +0 -55
  206. package/@types/shared/common.d.ts +0 -197
  207. package/@types/shared/hof.d.ts +0 -108
  208. package/@types/shared/predicates.d.ts +0 -17
  209. package/@types/shared/queue.d.ts +0 -64
  210. package/@types/shared/strings.d.ts +0 -58
  211. package/@types/shared/test-utils.d.ts +0 -18
  212. package/docs/static/typedoc/classes/NgModule.html +0 -32
  213. package/src/router/params/README.md +0 -8
@@ -16,10 +16,6 @@ export function createScope(target?: any, context?: Scope): Scope;
16
16
  * @property {Object} locals
17
17
  */
18
18
  export const $postUpdateQueue: any[];
19
- /**
20
- * @type {Function[]}
21
- */
22
- export const $$applyAsyncQueue: Function[];
23
19
  export class RootScopeProvider {
24
20
  rootScope: Scope;
25
21
  $get: (
@@ -57,6 +53,7 @@ export const NONSCOPE: "$nonscope";
57
53
  * Scope class for the Proxy. It intercepts operations like property access (get)
58
54
  * and property setting (set), and adds support for deep change tracking and
59
55
  * observer-like behavior.
56
+ * @extends {Record<string, any>}
60
57
  */
61
58
  export class Scope {
62
59
  /**
@@ -1,6 +1,3 @@
1
- import { Attributes } from "./core/compile/attributes.js";
2
- import { Scope } from "./core/scope/scope.js";
3
- export * from "./core/di/ng-module.js";
4
1
  export * from "./services/http/interface.ts";
5
2
  export * from "./services/log/interface.ts";
6
3
  export * from "./services/log/log.js";
@@ -9,6 +6,23 @@ export * from "./services/location/location.js";
9
6
  export * from "./services/pubsub/pubsub.js";
10
7
  export * from "./services/template-cache/interface.ts";
11
8
  export * from "./services/template-cache/template-cache.js";
9
+ import { Attributes } from "./core/compile/attributes.js";
10
+ import { Scope } from "./core/scope/scope.js";
11
+ import { NgModule } from "./core/di/ng-module.js";
12
+ import { PubSubProvider, PubSub } from "./services/pubsub/pubsub.js";
13
+ import type { ErrorHandlingConfig as iErrorHandlingConfig } from "./shared/interface.ts";
14
+ declare global {
15
+ interface Function {
16
+ $inject?: readonly string[] | undefined;
17
+ }
18
+ namespace ng {
19
+ type Scope = typeof Scope;
20
+ type NgModule = typeof NgModule;
21
+ type PubSubProvider = typeof PubSubProvider;
22
+ type PubSub = typeof PubSub;
23
+ type ErrorHandlingConfig = iErrorHandlingConfig;
24
+ }
25
+ }
12
26
  /**
13
27
  * A JavaScript expression represented as a string, typically used in interpolation bindings.
14
28
  *
@@ -1,2 +1,19 @@
1
1
  export type Predicate<X> = (x?: X) => boolean;
2
2
  export type PredicateBinary<X, Y> = (x?: X, y?: Y) => boolean;
3
+ /**
4
+ * Error configuration object. May only contain the options that need to be updated.
5
+ */
6
+ export interface ErrorHandlingConfig {
7
+ /**
8
+ * The max depth for stringifying objects.
9
+ * Setting to a non-positive or non-numeric value removes the max depth limit.
10
+ * Default: 5.
11
+ */
12
+ objectMaxDepth?: number;
13
+ /**
14
+ * Specifies whether the generated error URL will contain the parameters
15
+ * of the thrown error. Default: true.
16
+ * When used without argument, it returns the current value.
17
+ */
18
+ urlErrorParamsEnabled?: boolean;
19
+ }
@@ -442,12 +442,12 @@ export function assertArgFn(
442
442
  *
443
443
  * Omitted or undefined options will leave the corresponding configuration values unchanged.
444
444
  *
445
- * @param {ErrorHandlingConfig} [config]
446
- * @returns {ErrorHandlingConfig}
445
+ * @param {import("./interface.ts").ErrorHandlingConfig} [config]
446
+ * @returns {import("./interface.ts").ErrorHandlingConfig}
447
447
  */
448
448
  export function errorHandlingConfig(
449
- config?: ErrorHandlingConfig,
450
- ): ErrorHandlingConfig;
449
+ config?: import("./interface.ts").ErrorHandlingConfig,
450
+ ): import("./interface.ts").ErrorHandlingConfig;
451
451
  /**
452
452
  * This object provides a utility for producing rich Error messages within
453
453
  * AngularTS. It can be called as follows:
@@ -573,18 +573,3 @@ export function wait(t?: number): Promise<void>;
573
573
  export function startsWith(str: string, search: string): boolean;
574
574
  export const isProxySymbol: unique symbol;
575
575
  export const ngAttrPrefixes: string[];
576
- /**
577
- * Error configuration object. May only contain the options that need to be updated.
578
- */
579
- export type ErrorHandlingConfig = {
580
- /**
581
- * - The max depth for stringifying objects. Setting to a
582
- * non-positive or non-numeric value removes the max depth limit. Default: 5.
583
- */
584
- objectMaxDepth?: number | undefined;
585
- /**
586
- * - Specifies whether the generated error URL will
587
- * contain the parameters of the thrown error. Default: true. When used without argument, it returns the current value.
588
- */
589
- urlErrorParamsEnabled?: boolean | undefined;
590
- };
@@ -1,4 +1,4 @@
1
- /* Version: 0.8.4 - September 5, 2025 23:28:30 */
1
+ /* Version: 0.9.1 - October 8, 2025 04:11:27 */
2
2
  const VALID_CLASS = "ng-valid";
3
3
  const INVALID_CLASS = "ng-invalid";
4
4
  const PRISTINE_CLASS = "ng-pristine";
@@ -906,16 +906,7 @@ function assertArgFn(arg, name, acceptArrayAnnotation) {
906
906
  return arg;
907
907
  }
908
908
 
909
- /**
910
- * @typedef {Object} ErrorHandlingConfig
911
- * Error configuration object. May only contain the options that need to be updated.
912
- * @property {number=} objectMaxDepth - The max depth for stringifying objects. Setting to a
913
- * non-positive or non-numeric value removes the max depth limit. Default: 5.
914
- * @property {boolean=} urlErrorParamsEnabled - Specifies whether the generated error URL will
915
- * contain the parameters of the thrown error. Default: true. When used without argument, it returns the current value.
916
- */
917
-
918
- /** @type {ErrorHandlingConfig} */
909
+ /** @type {import("./interface.js").ErrorHandlingConfig} */
919
910
  const minErrConfig = {
920
911
  objectMaxDepth: 5,
921
912
  urlErrorParamsEnabled: true,
@@ -927,8 +918,8 @@ const minErrConfig = {
927
918
  *
928
919
  * Omitted or undefined options will leave the corresponding configuration values unchanged.
929
920
  *
930
- * @param {ErrorHandlingConfig} [config]
931
- * @returns {ErrorHandlingConfig}
921
+ * @param {import("./interface.ts").ErrorHandlingConfig} [config]
922
+ * @returns {import("./interface.ts").ErrorHandlingConfig}
932
923
  */
933
924
  function errorHandlingConfig(config) {
934
925
  if (isObject(config)) {
@@ -12386,6 +12377,7 @@ const optGroupTemplate = document.createElement("optgroup");
12386
12377
 
12387
12378
  const NG_OPTIONS_REGEXP =
12388
12379
  /^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([$\w][$\w]*)|(?:\(\s*([$\w][$\w]*)\s*,\s*([$\w][$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/;
12380
+
12389
12381
  // 1: value expression (valueFn)
12390
12382
  // 2: label expression (displayFn)
12391
12383
  // 3: group by expression (groupByFn)
@@ -15453,7 +15445,11 @@ class ASTInterpreter {
15453
15445
  ? (scope, locals, assign) => {
15454
15446
  const values = [];
15455
15447
  for (let i = 0; i < args.length; ++i) {
15456
- const res = args[i](scope.$target, locals, assign);
15448
+ const res = args[i](
15449
+ scope && scope.$target ? scope.$target : scope,
15450
+ locals,
15451
+ assign,
15452
+ );
15457
15453
  values.push(res);
15458
15454
  }
15459
15455
  const value = () => {
@@ -15541,7 +15537,7 @@ class ASTInterpreter {
15541
15537
  return context ? { value } : value;
15542
15538
  };
15543
15539
  case ASTType.ThisExpression:
15544
- return (scope) => (context ? { value: scope } : scope);
15540
+ return (scope) => (context ? { value: scope } : scope.$proxy);
15545
15541
  case ASTType.LocalsExpression:
15546
15542
  // @ts-ignore
15547
15543
  return (scope, locals) => (context ? { value: locals } : locals);
@@ -15817,9 +15813,9 @@ class ASTInterpreter {
15817
15813
  */
15818
15814
  "ternary?:"(test, alternate, consequent, context) {
15819
15815
  return (scope, locals, assign) => {
15820
- const arg = test(scope.$target, locals, assign)
15821
- ? alternate(scope.$target, locals, assign)
15822
- : consequent(scope.$target, locals, assign);
15816
+ const arg = test(scope, locals, assign)
15817
+ ? alternate(scope, locals, assign)
15818
+ : consequent(scope, locals, assign);
15823
15819
  return context ? { value: arg } : arg;
15824
15820
  };
15825
15821
  }
@@ -15844,7 +15840,8 @@ class ASTInterpreter {
15844
15840
  */
15845
15841
  identifier(name, context, create) {
15846
15842
  return (scope, locals) => {
15847
- const base = locals && name in locals ? locals : scope;
15843
+ const base =
15844
+ locals && name in locals ? locals : ((scope && scope.$proxy) ?? scope);
15848
15845
  if (create && create !== 1 && base && base[name] == null) {
15849
15846
  base[name] = {};
15850
15847
  }
@@ -20208,6 +20205,7 @@ const NONSCOPE = "$nonscope";
20208
20205
  * Scope class for the Proxy. It intercepts operations like property access (get)
20209
20206
  * and property setting (set), and adds support for deep change tracking and
20210
20207
  * observer-like behavior.
20208
+ * @extends {Record<string, any>}
20211
20209
  */
20212
20210
  class Scope {
20213
20211
  /**
@@ -20623,6 +20621,7 @@ class Scope {
20623
20621
  return true;
20624
20622
  }
20625
20623
 
20624
+ /** @internal **/
20626
20625
  #checkeListenersForAllKeys(value) {
20627
20626
  if (isUndefined(value)) {
20628
20627
  return;
@@ -20860,8 +20859,8 @@ class Scope {
20860
20859
  keySet.push(prop.value.name);
20861
20860
  listener.property.push(key);
20862
20861
  } else {
20863
- key =
20864
- get.decoratedNode.body[0].expression.toWatch[0].property.name;
20862
+ const target = get.decoratedNode.body[0].expression.toWatch[0];
20863
+ key = target.property ? target.property.name : target.name;
20865
20864
  listener.property.push(key);
20866
20865
  }
20867
20866
  }
@@ -20962,6 +20961,7 @@ class Scope {
20962
20961
  return proxy;
20963
20962
  }
20964
20963
 
20964
+ /** @internal **/
20965
20965
  #registerKey(key, listener) {
20966
20966
  if (this.watchers.has(key)) {
20967
20967
  this.watchers.get(key).push(listener);
@@ -20970,6 +20970,7 @@ class Scope {
20970
20970
  }
20971
20971
  }
20972
20972
 
20973
+ /** @internal **/
20973
20974
  #registerForeignKey(key, listener) {
20974
20975
  if (this.foreignListeners.has(key)) {
20975
20976
  this.foreignListeners.get(key).push(listener);
@@ -21101,7 +21102,8 @@ class Scope {
21101
21102
  }
21102
21103
 
21103
21104
  /**
21104
- * @returns {void}
21105
+ * @internal
21106
+ * @returns {any}
21105
21107
  */
21106
21108
  #eventHelper({ name, event, broadcast }, ...args) {
21107
21109
  if (!broadcast) {
@@ -21182,6 +21184,7 @@ class Scope {
21182
21184
  }
21183
21185
 
21184
21186
  /**
21187
+ * @internal
21185
21188
  * @returns {boolean}
21186
21189
  */
21187
21190
  #isRoot() {
@@ -21216,6 +21219,7 @@ class Scope {
21216
21219
  }
21217
21220
 
21218
21221
  /**
21222
+ * @internal
21219
21223
  * @param {Listener} listener - The property path that was changed.
21220
21224
  */
21221
21225
  #notifyListener(listener, target) {
@@ -23251,15 +23255,15 @@ function AnimateQueueProvider($animateProvider) {
23251
23255
  });
23252
23256
 
23253
23257
  this.$get = [
23254
- "$rootScope",
23255
- "$injector",
23256
- "$$animation",
23257
- "$$AnimateRunner",
23258
- "$templateRequest",
23258
+ $injectTokens.$rootScope,
23259
+ $injectTokens.$injector,
23260
+ $injectTokens.$$animation,
23261
+ $injectTokens.$$AnimateRunner,
23262
+ $injectTokens.$templateRequest,
23259
23263
  /**
23260
23264
  *
23261
23265
  * @param {import('../core/scope/scope.js').Scope} $rootScope
23262
- * @param {*} $injector
23266
+ * @param {import('../core/di/internal-injector.js').InjectorService} $injector
23263
23267
  * @param {*} $$animation
23264
23268
  * @param {*} $$AnimateRunner
23265
23269
  * @param {*} $templateRequest
@@ -23972,7 +23976,7 @@ function AnimateQueueProvider($animateProvider) {
23972
23976
  AnimateJsProvider.$inject = ["$animateProvider"];
23973
23977
  function AnimateJsProvider($animateProvider) {
23974
23978
  this.$get = [
23975
- "$injector",
23979
+ $injectTokens.$injector,
23976
23980
  "$$AnimateRunner",
23977
23981
  /**
23978
23982
  *
@@ -25830,20 +25834,6 @@ const anyTrueR = (memo, elem) => memo || elem;
25830
25834
  * ```
25831
25835
  */
25832
25836
  const unnestR = (memo, elem) => memo.concat(elem);
25833
- /**
25834
- * Reduce function which recursively un-nests all arrays
25835
- *
25836
- * @example
25837
- * ```
25838
- *
25839
- * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ];
25840
- * input.reduce(unnestR, []) // [ "a", "b", "c", "d", "double, "nested" ]
25841
- * ```
25842
- */
25843
- const flattenR = (memo, elem) =>
25844
- Array.isArray(elem)
25845
- ? memo.concat(elem.reduce(flattenR, []))
25846
- : pushR(memo, elem);
25847
25837
  /**
25848
25838
  * Reduce function that pushes an object to an array, then returns the array.
25849
25839
  * Mostly just for [[flattenR]] and [[uniqR]]
@@ -27944,10 +27934,6 @@ class ResolveContext {
27944
27934
  return Promise.all(promises);
27945
27935
  }
27946
27936
 
27947
- injector() {
27948
- return this._injector || (this._injector = new UIInjectorImpl());
27949
- }
27950
-
27951
27937
  findNode(resolvable) {
27952
27938
  return find(this._path, (node) => node.resolvables.includes(resolvable));
27953
27939
  }
@@ -27982,21 +27968,6 @@ class ResolveContext {
27982
27968
  }
27983
27969
  }
27984
27970
 
27985
- class UIInjectorImpl {
27986
- constructor() {
27987
- this.native = window["angular"].$injector;
27988
- }
27989
- get(token) {
27990
- return window["angular"].$injector.get(token);
27991
- }
27992
- getAsync(token) {
27993
- return Promise.resolve(window["angular"].$injector.get(token));
27994
- }
27995
- getNative(token) {
27996
- return window["angular"].$injector.get(token);
27997
- }
27998
- }
27999
-
28000
27971
  function getViewConfigFactory() {
28001
27972
  let templateFactory = null;
28002
27973
  return (path, view) => {
@@ -29698,90 +29669,7 @@ class Transition {
29698
29669
  .reduce((acc, obj) => ({ ...acc, ...obj }), {}),
29699
29670
  );
29700
29671
  }
29701
- paramsChanged() {
29702
- const fromParams = this.params("from");
29703
- const toParams = this.params("to");
29704
- // All the parameters declared on both the "to" and "from" paths
29705
- const allParamDescriptors = []
29706
- .concat(this._treeChanges.to)
29707
- .concat(this._treeChanges.from)
29708
- .map((pathNode) => pathNode.paramSchema)
29709
- .reduce(flattenR, [])
29710
- .reduce(uniqR, []);
29711
- const changedParamDescriptors = Param.changed(
29712
- allParamDescriptors,
29713
- fromParams,
29714
- toParams,
29715
- );
29716
- return changedParamDescriptors.reduce((changedValues, descriptor) => {
29717
- changedValues[descriptor.id] = toParams[descriptor.id];
29718
- return changedValues;
29719
- }, {});
29720
- }
29721
- /**
29722
- * Creates a [[UIInjector]] Dependency Injector
29723
- *
29724
- * Returns a Dependency Injector for the Transition's target state (to state).
29725
- * The injector provides resolve values which the target state has access to.
29726
- *
29727
- * The `UIInjector` can also provide values from the native root/global injector (ng1/ng2).
29728
- *
29729
- * #### Example:
29730
- * ```js
29731
- * .onEnter({ entering: 'myState' }, trans => {
29732
- * var myResolveValue = trans.injector().get('myResolve');
29733
- * // Inject a global service from the global/native injector (if it exists)
29734
- * var MyService = trans.injector().get('MyService');
29735
- * })
29736
- * ```
29737
- *
29738
- * In some cases (such as `onBefore`), you may need access to some resolve data but it has not yet been fetched.
29739
- * You can use [[UIInjector.getAsync]] to get a promise for the data.
29740
- * #### Example:
29741
- * ```js
29742
- * .onBefore({}, trans => {
29743
- * return trans.injector().getAsync('myResolve').then(myResolveValue =>
29744
- * return myResolveValue !== 'ABORT';
29745
- * });
29746
- * });
29747
- * ```
29748
- *
29749
- * If a `state` is provided, the injector that is returned will be limited to resolve values that the provided state has access to.
29750
- * This can be useful if both a parent state `foo` and a child state `foo.bar` have both defined a resolve such as `data`.
29751
- * #### Example:
29752
- * ```js
29753
- * .onEnter({ to: 'foo.bar' }, trans => {
29754
- * // returns result of `foo` state's `myResolve` resolve
29755
- * // even though `foo.bar` also has a `myResolve` resolve
29756
- * var fooData = trans.injector('foo').get('myResolve');
29757
- * });
29758
- * ```
29759
- *
29760
- * If you need resolve data from the exiting states, pass `'from'` as `pathName`.
29761
- * The resolve data from the `from` path will be returned.
29762
- * #### Example:
29763
- * ```js
29764
- * .onExit({ exiting: 'foo.bar' }, trans => {
29765
- * // Gets the resolve value of `myResolve` from the state being exited
29766
- * var fooData = trans.injector(null, 'from').get('myResolve');
29767
- * });
29768
- * ```
29769
- *
29770
- *
29771
- * @param state Limits the resolves provided to only the resolves the provided state has access to.
29772
- * @param pathName Default: `'to'`: Chooses the path for which to create the injector. Use this to access resolves for `exiting` states.
29773
- *
29774
- * @returns a [[UIInjector]]
29775
- */
29776
- injector(state, pathName = "to") {
29777
- let path = this._treeChanges[pathName];
29778
- if (state)
29779
- path = PathUtils.subPath(
29780
- path,
29781
- (node) => node.state === state || node.state.name === state,
29782
- );
29783
- return new ResolveContext(path).injector();
29784
- }
29672
+
29785
29673
  /**
29786
29674
  * Gets all available resolve tokens (keys)
29787
29675
  *
@@ -31014,19 +30902,20 @@ class StateProvider {
31014
30902
  return this.globals.$current;
31015
30903
  }
31016
30904
 
31017
- /* @ignore */ static $inject = ["$routerProvider", "$transitionsProvider"];
30905
+ static $inject = ["$routerProvider", "$transitionsProvider"];
31018
30906
 
31019
- // Needs access to urlService, stateRegistry
31020
30907
  /**
31021
30908
  *
31022
30909
  * @param {import('../router.js').Router} globals
31023
30910
  * @param {*} transitionService
30911
+ * @param {import('../../core/di/internal-injector.js').InjectorService} $injector
31024
30912
  */
31025
- constructor(globals, transitionService) {
30913
+ constructor(globals, transitionService, $injector) {
31026
30914
  this.stateRegistry = undefined;
31027
30915
  this.urlService = undefined;
31028
30916
  this.globals = globals;
31029
30917
  this.transitionService = transitionService;
30918
+ this.$injector = $injector;
31030
30919
  this.invalidCallbacks = [];
31031
30920
 
31032
30921
  this._defaultErrorHandler = function $defaultErrorHandler($error$) {
@@ -31183,7 +31072,7 @@ class StateProvider {
31183
31072
  const latest = latestThing();
31184
31073
  /** @type {Queue<Function>} */
31185
31074
  const callbackQueue = new Queue(this.invalidCallbacks.slice());
31186
- const injector = new ResolveContext(fromPath).injector();
31075
+ const injector = this.$injector;
31187
31076
  const checkForRedirect = (result) => {
31188
31077
  if (!(result instanceof TargetState)) {
31189
31078
  return;
@@ -34111,12 +34000,7 @@ class StateQueueManager {
34111
34000
  *
34112
34001
  */
34113
34002
  class StateRegistryProvider {
34114
- /* @ignore */ static $inject = provider([
34115
- $injectTokens.$url,
34116
- $injectTokens.$state,
34117
- $injectTokens.$router,
34118
- $injectTokens.$view,
34119
- ]);
34003
+ static $inject = provider([$injectTokens.$url, $injectTokens.$state, $injectTokens.$router, $injectTokens.$view]);
34120
34004
 
34121
34005
  /**
34122
34006
  * @param urlService
@@ -34155,11 +34039,9 @@ class StateRegistryProvider {
34155
34039
  globals.current = globals.$current.self;
34156
34040
  }
34157
34041
 
34158
- /** @type {import('../../interface.ts').AnnotatedFactory} */
34159
34042
  $get = [
34160
- "$injector",
34043
+ $injectTokens.$injector,
34161
34044
  /**
34162
- *
34163
34045
  * @param {import("../../core/di/internal-injector").InjectorService} $injector
34164
34046
  * @returns {StateRegistryProvider}
34165
34047
  */
@@ -35820,7 +35702,7 @@ class Angular {
35820
35702
  /**
35821
35703
  * @type {string} `version` from `package.json`
35822
35704
  */
35823
- this.version = "0.8.4"; //inserted via rollup plugin
35705
+ this.version = "0.9.1"; //inserted via rollup plugin
35824
35706
 
35825
35707
  /** @type {!Array<string|any>} */
35826
35708
  this.bootsrappedModules = [];