@angular-wave/angular.ts 0.9.0 → 0.9.2

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 (87) hide show
  1. package/@types/animations/animate-queue.d.ts +1 -1
  2. package/@types/core/scope/scope.d.ts +1 -4
  3. package/@types/interface.d.ts +18 -3
  4. package/@types/router/resolve/resolve-context.d.ts +0 -9
  5. package/@types/router/state/state-registry.d.ts +1 -2
  6. package/@types/router/state/state-service.d.ts +7 -1
  7. package/@types/router/transition/transition.d.ts +0 -65
  8. package/@types/shared/interface.d.ts +17 -0
  9. package/@types/shared/utils.d.ts +4 -19
  10. package/dist/angular-ts.esm.js +29 -152
  11. package/dist/angular-ts.umd.js +29 -152
  12. package/dist/angular-ts.umd.min.js +1 -1
  13. package/docs/layouts/shortcodes/version.html +1 -1
  14. package/docs/static/typedoc/assets/hierarchy.js +1 -1
  15. package/docs/static/typedoc/assets/main.js +2 -2
  16. package/docs/static/typedoc/assets/navigation.js +1 -1
  17. package/docs/static/typedoc/assets/search.js +1 -1
  18. package/docs/static/typedoc/classes/Location.html +20 -20
  19. package/docs/static/typedoc/classes/LocationProvider.html +5 -5
  20. package/docs/static/typedoc/classes/LogProvider.html +3 -3
  21. package/docs/static/typedoc/classes/PubSub.html +21 -21
  22. package/docs/static/typedoc/classes/PubSubProvider.html +1 -1
  23. package/docs/static/typedoc/classes/TemplateCacheProvider.html +2 -2
  24. package/docs/static/typedoc/hierarchy.html +1 -1
  25. package/docs/static/typedoc/index.html +1 -1
  26. package/docs/static/typedoc/interfaces/ChangesObject.html +3 -3
  27. package/docs/static/typedoc/interfaces/ComponentOptions.html +8 -8
  28. package/docs/static/typedoc/interfaces/Controller.html +6 -6
  29. package/docs/static/typedoc/interfaces/DefaultPorts.html +1 -1
  30. package/docs/static/typedoc/interfaces/Directive.html +18 -18
  31. package/docs/static/typedoc/interfaces/DirectivePrePost.html +1 -1
  32. package/docs/static/typedoc/interfaces/Html5Mode.html +1 -1
  33. package/docs/static/typedoc/interfaces/HttpProviderDefaults.html +7 -7
  34. package/docs/static/typedoc/interfaces/HttpService.html +21 -21
  35. package/docs/static/typedoc/interfaces/LogService.html +6 -6
  36. package/docs/static/typedoc/interfaces/NgModelController.html +15 -15
  37. package/docs/static/typedoc/interfaces/NgModelOptions.html +8 -8
  38. package/docs/static/typedoc/interfaces/Provider.html +17 -17
  39. package/docs/static/typedoc/interfaces/RequestConfig.html +15 -15
  40. package/docs/static/typedoc/interfaces/RequestShortcutConfig.html +11 -11
  41. package/docs/static/typedoc/interfaces/ServiceProvider.html +1 -1
  42. package/docs/static/typedoc/interfaces/TemplateCache.html +1 -1
  43. package/docs/static/typedoc/interfaces/TranscludeFunctionObject.html +4 -4
  44. package/docs/static/typedoc/interfaces/UrlParts.html +4 -4
  45. package/docs/static/typedoc/types/AnnotatedFactory.html +1 -1
  46. package/docs/static/typedoc/types/CloneAttachFunction.html +1 -1
  47. package/docs/static/typedoc/types/ControllerConstructor.html +1 -1
  48. package/docs/static/typedoc/types/DirectiveCompileFn.html +1 -1
  49. package/docs/static/typedoc/types/DirectiveController.html +1 -1
  50. package/docs/static/typedoc/types/DirectiveFactoryFn.html +1 -1
  51. package/docs/static/typedoc/types/DirectiveLinkFn.html +1 -1
  52. package/docs/static/typedoc/types/Expression.html +1 -1
  53. package/docs/static/typedoc/types/FilterFactory.html +1 -1
  54. package/docs/static/typedoc/types/FilterFn.html +1 -1
  55. package/docs/static/typedoc/types/Injectable.html +1 -1
  56. package/docs/static/typedoc/types/InjectableFactory.html +1 -1
  57. package/docs/static/typedoc/types/LogCall.html +1 -1
  58. package/docs/static/typedoc/types/LogServiceFactory.html +1 -1
  59. package/docs/static/typedoc/types/OnChangesObject.html +1 -1
  60. package/docs/static/typedoc/types/SwapModeType.html +1 -1
  61. package/docs/static/typedoc/types/TController.html +1 -1
  62. package/docs/static/typedoc/types/UrlChangeListener.html +4 -4
  63. package/docs/static/typedoc/variables/SwapMode.html +10 -10
  64. package/legacy.d.ts +0 -82
  65. package/package.json +2 -2
  66. package/src/animations/animate-js.js +2 -1
  67. package/src/animations/animate-queue.js +7 -6
  68. package/src/core/scope/scope.js +8 -10
  69. package/src/directive/http/form-router-test.html +44 -0
  70. package/src/directive/options/options-example.html +7 -3
  71. package/src/directive/options/options.js +1 -0
  72. package/src/directive/options/options.spec.js +117 -170
  73. package/src/interface.ts +21 -3
  74. package/src/router/directives/view-directive.js +0 -1
  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/core/sanitize/interface.d.ts +0 -10
  84. package/@types/router/params/param-types.d.ts +0 -36
  85. package/@types/shared/test-utils.d.ts +0 -18
  86. package/docs/static/typedoc/classes/NgModule.html +0 -32
  87. package/src/router/params/README.md +0 -8
@@ -1,4 +1,4 @@
1
- /* Version: 0.9.0 - September 12, 2025 22:41:26 */
1
+ /* Version: 0.9.2 - October 9, 2025 19:13:00 */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
4
4
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
@@ -912,16 +912,7 @@
912
912
  return arg;
913
913
  }
914
914
 
915
- /**
916
- * @typedef {Object} ErrorHandlingConfig
917
- * Error configuration object. May only contain the options that need to be updated.
918
- * @property {number=} objectMaxDepth - The max depth for stringifying objects. Setting to a
919
- * non-positive or non-numeric value removes the max depth limit. Default: 5.
920
- * @property {boolean=} urlErrorParamsEnabled - Specifies whether the generated error URL will
921
- * contain the parameters of the thrown error. Default: true. When used without argument, it returns the current value.
922
- */
923
-
924
- /** @type {ErrorHandlingConfig} */
915
+ /** @type {import("./interface.js").ErrorHandlingConfig} */
925
916
  const minErrConfig = {
926
917
  objectMaxDepth: 5,
927
918
  urlErrorParamsEnabled: true,
@@ -933,8 +924,8 @@
933
924
  *
934
925
  * Omitted or undefined options will leave the corresponding configuration values unchanged.
935
926
  *
936
- * @param {ErrorHandlingConfig} [config]
937
- * @returns {ErrorHandlingConfig}
927
+ * @param {import("./interface.ts").ErrorHandlingConfig} [config]
928
+ * @returns {import("./interface.ts").ErrorHandlingConfig}
938
929
  */
939
930
  function errorHandlingConfig(config) {
940
931
  if (isObject(config)) {
@@ -12392,6 +12383,7 @@
12392
12383
 
12393
12384
  const NG_OPTIONS_REGEXP =
12394
12385
  /^\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]+?))?$/;
12386
+
12395
12387
  // 1: value expression (valueFn)
12396
12388
  // 2: label expression (displayFn)
12397
12389
  // 3: group by expression (groupByFn)
@@ -20219,6 +20211,7 @@
20219
20211
  * Scope class for the Proxy. It intercepts operations like property access (get)
20220
20212
  * and property setting (set), and adds support for deep change tracking and
20221
20213
  * observer-like behavior.
20214
+ * @extends {Record<string, any>}
20222
20215
  */
20223
20216
  class Scope {
20224
20217
  /**
@@ -20634,6 +20627,7 @@
20634
20627
  return true;
20635
20628
  }
20636
20629
 
20630
+ /** @internal **/
20637
20631
  #checkeListenersForAllKeys(value) {
20638
20632
  if (isUndefined(value)) {
20639
20633
  return;
@@ -20973,6 +20967,7 @@
20973
20967
  return proxy;
20974
20968
  }
20975
20969
 
20970
+ /** @internal **/
20976
20971
  #registerKey(key, listener) {
20977
20972
  if (this.watchers.has(key)) {
20978
20973
  this.watchers.get(key).push(listener);
@@ -20981,6 +20976,7 @@
20981
20976
  }
20982
20977
  }
20983
20978
 
20979
+ /** @internal **/
20984
20980
  #registerForeignKey(key, listener) {
20985
20981
  if (this.foreignListeners.has(key)) {
20986
20982
  this.foreignListeners.get(key).push(listener);
@@ -21112,7 +21108,8 @@
21112
21108
  }
21113
21109
 
21114
21110
  /**
21115
- * @returns {void}
21111
+ * @internal
21112
+ * @returns {any}
21116
21113
  */
21117
21114
  #eventHelper({ name, event, broadcast }, ...args) {
21118
21115
  if (!broadcast) {
@@ -21193,6 +21190,7 @@
21193
21190
  }
21194
21191
 
21195
21192
  /**
21193
+ * @internal
21196
21194
  * @returns {boolean}
21197
21195
  */
21198
21196
  #isRoot() {
@@ -21227,6 +21225,7 @@
21227
21225
  }
21228
21226
 
21229
21227
  /**
21228
+ * @internal
21230
21229
  * @param {Listener} listener - The property path that was changed.
21231
21230
  */
21232
21231
  #notifyListener(listener, target) {
@@ -23262,15 +23261,15 @@
23262
23261
  });
23263
23262
 
23264
23263
  this.$get = [
23265
- "$rootScope",
23266
- "$injector",
23267
- "$$animation",
23268
- "$$AnimateRunner",
23269
- "$templateRequest",
23264
+ $injectTokens.$rootScope,
23265
+ $injectTokens.$injector,
23266
+ $injectTokens.$$animation,
23267
+ $injectTokens.$$AnimateRunner,
23268
+ $injectTokens.$templateRequest,
23270
23269
  /**
23271
23270
  *
23272
23271
  * @param {import('../core/scope/scope.js').Scope} $rootScope
23273
- * @param {*} $injector
23272
+ * @param {import('../core/di/internal-injector.js').InjectorService} $injector
23274
23273
  * @param {*} $$animation
23275
23274
  * @param {*} $$AnimateRunner
23276
23275
  * @param {*} $templateRequest
@@ -23983,7 +23982,7 @@
23983
23982
  AnimateJsProvider.$inject = ["$animateProvider"];
23984
23983
  function AnimateJsProvider($animateProvider) {
23985
23984
  this.$get = [
23986
- "$injector",
23985
+ $injectTokens.$injector,
23987
23986
  "$$AnimateRunner",
23988
23987
  /**
23989
23988
  *
@@ -25841,20 +25840,6 @@
25841
25840
  * ```
25842
25841
  */
25843
25842
  const unnestR = (memo, elem) => memo.concat(elem);
25844
- /**
25845
- * Reduce function which recursively un-nests all arrays
25846
- *
25847
- * @example
25848
- * ```
25849
- *
25850
- * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ];
25851
- * input.reduce(unnestR, []) // [ "a", "b", "c", "d", "double, "nested" ]
25852
- * ```
25853
- */
25854
- const flattenR = (memo, elem) =>
25855
- Array.isArray(elem)
25856
- ? memo.concat(elem.reduce(flattenR, []))
25857
- : pushR(memo, elem);
25858
25843
  /**
25859
25844
  * Reduce function that pushes an object to an array, then returns the array.
25860
25845
  * Mostly just for [[flattenR]] and [[uniqR]]
@@ -27955,10 +27940,6 @@
27955
27940
  return Promise.all(promises);
27956
27941
  }
27957
27942
 
27958
- injector() {
27959
- return this._injector || (this._injector = new UIInjectorImpl());
27960
- }
27961
-
27962
27943
  findNode(resolvable) {
27963
27944
  return find(this._path, (node) => node.resolvables.includes(resolvable));
27964
27945
  }
@@ -27993,21 +27974,6 @@
27993
27974
  }
27994
27975
  }
27995
27976
 
27996
- class UIInjectorImpl {
27997
- constructor() {
27998
- this.native = window["angular"].$injector;
27999
- }
28000
- get(token) {
28001
- return window["angular"].$injector.get(token);
28002
- }
28003
- getAsync(token) {
28004
- return Promise.resolve(window["angular"].$injector.get(token));
28005
- }
28006
- getNative(token) {
28007
- return window["angular"].$injector.get(token);
28008
- }
28009
- }
28010
-
28011
27977
  function getViewConfigFactory() {
28012
27978
  let templateFactory = null;
28013
27979
  return (path, view) => {
@@ -29709,90 +29675,7 @@
29709
29675
  .reduce((acc, obj) => ({ ...acc, ...obj }), {}),
29710
29676
  );
29711
29677
  }
29712
- paramsChanged() {
29713
- const fromParams = this.params("from");
29714
- const toParams = this.params("to");
29715
- // All the parameters declared on both the "to" and "from" paths
29716
- const allParamDescriptors = []
29717
- .concat(this._treeChanges.to)
29718
- .concat(this._treeChanges.from)
29719
- .map((pathNode) => pathNode.paramSchema)
29720
- .reduce(flattenR, [])
29721
- .reduce(uniqR, []);
29722
- const changedParamDescriptors = Param.changed(
29723
- allParamDescriptors,
29724
- fromParams,
29725
- toParams,
29726
- );
29727
- return changedParamDescriptors.reduce((changedValues, descriptor) => {
29728
- changedValues[descriptor.id] = toParams[descriptor.id];
29729
- return changedValues;
29730
- }, {});
29731
- }
29732
- /**
29733
- * Creates a [[UIInjector]] Dependency Injector
29734
- *
29735
- * Returns a Dependency Injector for the Transition's target state (to state).
29736
- * The injector provides resolve values which the target state has access to.
29737
- *
29738
- * The `UIInjector` can also provide values from the native root/global injector (ng1/ng2).
29739
- *
29740
- * #### Example:
29741
- * ```js
29742
- * .onEnter({ entering: 'myState' }, trans => {
29743
- * var myResolveValue = trans.injector().get('myResolve');
29744
- * // Inject a global service from the global/native injector (if it exists)
29745
- * var MyService = trans.injector().get('MyService');
29746
- * })
29747
- * ```
29748
- *
29749
- * In some cases (such as `onBefore`), you may need access to some resolve data but it has not yet been fetched.
29750
- * You can use [[UIInjector.getAsync]] to get a promise for the data.
29751
- * #### Example:
29752
- * ```js
29753
- * .onBefore({}, trans => {
29754
- * return trans.injector().getAsync('myResolve').then(myResolveValue =>
29755
- * return myResolveValue !== 'ABORT';
29756
- * });
29757
- * });
29758
- * ```
29759
- *
29760
- * If a `state` is provided, the injector that is returned will be limited to resolve values that the provided state has access to.
29761
- * This can be useful if both a parent state `foo` and a child state `foo.bar` have both defined a resolve such as `data`.
29762
- * #### Example:
29763
- * ```js
29764
- * .onEnter({ to: 'foo.bar' }, trans => {
29765
- * // returns result of `foo` state's `myResolve` resolve
29766
- * // even though `foo.bar` also has a `myResolve` resolve
29767
- * var fooData = trans.injector('foo').get('myResolve');
29768
- * });
29769
- * ```
29770
- *
29771
- * If you need resolve data from the exiting states, pass `'from'` as `pathName`.
29772
- * The resolve data from the `from` path will be returned.
29773
- * #### Example:
29774
- * ```js
29775
- * .onExit({ exiting: 'foo.bar' }, trans => {
29776
- * // Gets the resolve value of `myResolve` from the state being exited
29777
- * var fooData = trans.injector(null, 'from').get('myResolve');
29778
- * });
29779
- * ```
29780
- *
29781
- *
29782
- * @param state Limits the resolves provided to only the resolves the provided state has access to.
29783
- * @param pathName Default: `'to'`: Chooses the path for which to create the injector. Use this to access resolves for `exiting` states.
29784
- *
29785
- * @returns a [[UIInjector]]
29786
- */
29787
- injector(state, pathName = "to") {
29788
- let path = this._treeChanges[pathName];
29789
- if (state)
29790
- path = PathUtils.subPath(
29791
- path,
29792
- (node) => node.state === state || node.state.name === state,
29793
- );
29794
- return new ResolveContext(path).injector();
29795
- }
29678
+
29796
29679
  /**
29797
29680
  * Gets all available resolve tokens (keys)
29798
29681
  *
@@ -31025,19 +30908,20 @@
31025
30908
  return this.globals.$current;
31026
30909
  }
31027
30910
 
31028
- /* @ignore */ static $inject = ["$routerProvider", "$transitionsProvider"];
30911
+ static $inject = ["$routerProvider", "$transitionsProvider"];
31029
30912
 
31030
- // Needs access to urlService, stateRegistry
31031
30913
  /**
31032
30914
  *
31033
30915
  * @param {import('../router.js').Router} globals
31034
30916
  * @param {*} transitionService
30917
+ * @param {import('../../core/di/internal-injector.js').InjectorService} $injector
31035
30918
  */
31036
- constructor(globals, transitionService) {
30919
+ constructor(globals, transitionService, $injector) {
31037
30920
  this.stateRegistry = undefined;
31038
30921
  this.urlService = undefined;
31039
30922
  this.globals = globals;
31040
30923
  this.transitionService = transitionService;
30924
+ this.$injector = $injector;
31041
30925
  this.invalidCallbacks = [];
31042
30926
 
31043
30927
  this._defaultErrorHandler = function $defaultErrorHandler($error$) {
@@ -31194,7 +31078,7 @@
31194
31078
  const latest = latestThing();
31195
31079
  /** @type {Queue<Function>} */
31196
31080
  const callbackQueue = new Queue(this.invalidCallbacks.slice());
31197
- const injector = new ResolveContext(fromPath).injector();
31081
+ const injector = this.$injector;
31198
31082
  const checkForRedirect = (result) => {
31199
31083
  if (!(result instanceof TargetState)) {
31200
31084
  return;
@@ -34122,12 +34006,7 @@
34122
34006
  *
34123
34007
  */
34124
34008
  class StateRegistryProvider {
34125
- /* @ignore */ static $inject = provider([
34126
- $injectTokens.$url,
34127
- $injectTokens.$state,
34128
- $injectTokens.$router,
34129
- $injectTokens.$view,
34130
- ]);
34009
+ static $inject = provider([$injectTokens.$url, $injectTokens.$state, $injectTokens.$router, $injectTokens.$view]);
34131
34010
 
34132
34011
  /**
34133
34012
  * @param urlService
@@ -34166,11 +34045,9 @@
34166
34045
  globals.current = globals.$current.self;
34167
34046
  }
34168
34047
 
34169
- /** @type {import('../../interface.ts').AnnotatedFactory} */
34170
34048
  $get = [
34171
- "$injector",
34049
+ $injectTokens.$injector,
34172
34050
  /**
34173
- *
34174
34051
  * @param {import("../../core/di/internal-injector").InjectorService} $injector
34175
34052
  * @returns {StateRegistryProvider}
34176
34053
  */
@@ -35831,7 +35708,7 @@
35831
35708
  /**
35832
35709
  * @type {string} `version` from `package.json`
35833
35710
  */
35834
- this.version = "0.9.0"; //inserted via rollup plugin
35711
+ this.version = "0.9.2"; //inserted via rollup plugin
35835
35712
 
35836
35713
  /** @type {!Array<string|any>} */
35837
35714
  this.bootsrappedModules = [];