@angular-wave/angular.ts 0.7.3 → 0.7.4

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 (206) hide show
  1. package/.prettierignore +2 -1
  2. package/@types/core/exception-handler.d.ts +2 -2
  3. package/@types/core/task-tracker-factory.d.ts +2 -2
  4. package/@types/directive/channel/channel.d.ts +2 -18
  5. package/@types/directive/http/http.d.ts +3 -0
  6. package/@types/directive/script/script.d.ts +2 -2
  7. package/@types/directive/setter/setter.d.ts +2 -2
  8. package/@types/injection-tokens.d.ts +3 -0
  9. package/@types/interface.d.ts +11 -0
  10. package/@types/loader.d.ts +3 -4
  11. package/@types/router/params/param-factory.d.ts +10 -2
  12. package/@types/router/params/param.d.ts +22 -3
  13. package/@types/router/template-factory.d.ts +2 -2
  14. package/@types/router/url/url-service.d.ts +2 -2
  15. package/@types/services/http/http.d.ts +2 -2
  16. package/@types/services/http/interface.d.ts +219 -0
  17. package/@types/services/http-backend/http-backend.d.ts +26 -19
  18. package/@types/services/log/interface.d.ts +33 -0
  19. package/@types/services/log/log.d.ts +25 -0
  20. package/@types/{core → services}/pubsub/pubsub.d.ts +6 -6
  21. package/@types/services/template-cache/interface.d.ts +4 -0
  22. package/@types/services/template-cache/template-cache.d.ts +11 -0
  23. package/@types/services/template-request.d.ts +1 -1
  24. package/@types/shared/cache.d.ts +9 -0
  25. package/@types/shared/dom.d.ts +2 -2
  26. package/Makefile +1 -1
  27. package/dist/angular-ts.esm.js +147 -141
  28. package/dist/angular-ts.umd.js +147 -141
  29. package/dist/angular-ts.umd.min.js +1 -1
  30. package/docs/assets/scss/_variables_project.scss +1 -1
  31. package/docs/assets/scss/_variables_project_after_bs.scss +5 -5
  32. package/docs/assets/scss/index.scss +2 -3
  33. package/docs/content/_index.md +1 -1
  34. package/docs/content/docs/_index.md +58 -25
  35. package/docs/content/docs/directive/_index.md +4 -0
  36. package/docs/content/docs/directive/app.md +11 -0
  37. package/docs/content/docs/directive/aria.md +0 -0
  38. package/docs/content/docs/directive/channel.md +39 -0
  39. package/docs/content/docs/directive/class-even.md +47 -0
  40. package/docs/content/docs/directive/class-odd.md +48 -0
  41. package/docs/content/docs/directive/class.md +64 -0
  42. package/docs/content/docs/directive/cloak.md +78 -0
  43. package/docs/content/docs/directive/include.md +7 -0
  44. package/docs/content/docs/filter/_index.md +4 -0
  45. package/docs/content/docs/provider/_index.md +4 -0
  46. package/docs/content/docs/provider/eventBusProvider.md +35 -0
  47. package/docs/content/docs/provider/logProvider.md +59 -0
  48. package/docs/content/docs/provider/templateCacheProvider.md +35 -0
  49. package/docs/content/docs/service/_index.md +4 -0
  50. package/docs/content/docs/service/eventBus.md +56 -0
  51. package/docs/content/docs/service/log.md +113 -0
  52. package/docs/content/docs/service/templateCache.md +64 -0
  53. package/docs/hugo.yaml +3 -3
  54. package/docs/layouts/partials/hooks/head-end.html +3 -0
  55. package/docs/layouts/shortcodes/showhtml.html +2 -0
  56. package/docs/layouts/shortcodes/showjs.html +2 -0
  57. package/docs/layouts/shortcodes/showraw.html +1 -0
  58. package/docs/static/examples/counter/counter-test.html +17 -0
  59. package/docs/static/examples/counter/counter.html +5 -0
  60. package/docs/static/examples/counter/counter.test.js +28 -0
  61. package/docs/static/examples/eventbus/eventbus-test.html +19 -0
  62. package/docs/static/examples/eventbus/eventbus.html +13 -0
  63. package/docs/static/examples/eventbus/eventbus.js +15 -0
  64. package/docs/static/examples/eventbus/eventbus.test.js +19 -0
  65. package/docs/static/examples/ng-channel/ng-channel-test.html +17 -0
  66. package/docs/static/examples/ng-channel/ng-channel.html +24 -0
  67. package/docs/static/examples/ng-channel/ng-channel.test.js +31 -0
  68. package/docs/static/examples/ng-class/ng-class.html +71 -0
  69. package/docs/static/examples/ng-class/ng-class.js +0 -0
  70. package/docs/static/examples/ng-class-even/ng-class-even.html +8 -0
  71. package/docs/static/examples/ng-class-odd/ng-class-odd.html +8 -0
  72. package/docs/static/typedoc/assets/hierarchy.js +1 -1
  73. package/docs/static/typedoc/assets/navigation.js +1 -1
  74. package/docs/static/typedoc/assets/search.js +1 -1
  75. package/docs/static/typedoc/classes/LogProvider.html +6 -0
  76. package/docs/static/typedoc/classes/PubSub.html +71 -0
  77. package/docs/static/typedoc/classes/PubSubProvider.html +3 -0
  78. package/docs/static/typedoc/classes/TemplateCacheProvider.html +5 -0
  79. package/docs/static/typedoc/hierarchy.html +1 -1
  80. package/docs/static/typedoc/index.html +1 -1
  81. package/docs/static/typedoc/interfaces/ChangesObject.html +1 -1
  82. package/docs/static/typedoc/interfaces/ComponentOptions.html +1 -1
  83. package/docs/static/typedoc/interfaces/Controller.html +1 -1
  84. package/docs/static/typedoc/interfaces/Directive.html +1 -1
  85. package/docs/static/typedoc/interfaces/DirectivePrePost.html +1 -1
  86. package/docs/static/typedoc/interfaces/HttpHeadersGetter.html +1 -0
  87. package/docs/static/typedoc/interfaces/HttpProviderDefaults.html +31 -0
  88. package/docs/static/typedoc/interfaces/HttpRequestConfigHeaders.html +6 -0
  89. package/docs/static/typedoc/interfaces/HttpRequestTransformer.html +1 -0
  90. package/docs/static/typedoc/interfaces/HttpResponse.html +8 -0
  91. package/docs/static/typedoc/interfaces/HttpResponseTransformer.html +1 -0
  92. package/docs/static/typedoc/interfaces/HttpService.html +38 -0
  93. package/docs/static/typedoc/interfaces/LogService.html +12 -0
  94. package/docs/static/typedoc/interfaces/NgModelController.html +1 -1
  95. package/docs/static/typedoc/interfaces/NgModelOptions.html +1 -1
  96. package/docs/static/typedoc/interfaces/Provider.html +1 -1
  97. package/docs/static/typedoc/interfaces/RequestConfig.html +48 -0
  98. package/docs/static/typedoc/interfaces/RequestShortcutConfig.html +38 -0
  99. package/docs/static/typedoc/interfaces/ServiceProvider.html +1 -1
  100. package/docs/static/typedoc/interfaces/TranscludeFunctionObject.html +1 -1
  101. package/docs/static/typedoc/types/AnnotatedFactory.html +1 -1
  102. package/docs/static/typedoc/types/CloneAttachFunction.html +1 -1
  103. package/docs/static/typedoc/types/ControllerConstructor.html +1 -1
  104. package/docs/static/typedoc/types/DirectiveCompileFn.html +1 -1
  105. package/docs/static/typedoc/types/DirectiveController.html +1 -1
  106. package/docs/static/typedoc/types/DirectiveFactory.html +1 -1
  107. package/docs/static/typedoc/types/DirectiveLinkFn.html +1 -1
  108. package/docs/static/typedoc/types/ExpandoStore.html +2 -0
  109. package/docs/static/typedoc/types/Expression.html +1 -1
  110. package/docs/static/typedoc/types/FilterFactory.html +1 -1
  111. package/docs/static/typedoc/types/FilterFn.html +1 -1
  112. package/docs/static/typedoc/types/HttpPromise.html +1 -0
  113. package/docs/static/typedoc/types/Injectable.html +1 -1
  114. package/docs/static/typedoc/types/InjectableFactory.html +1 -1
  115. package/docs/static/typedoc/types/LogCall.html +2 -0
  116. package/docs/static/typedoc/types/LogServiceFactory.html +2 -0
  117. package/docs/static/typedoc/types/OnChangesObject.html +1 -1
  118. package/docs/static/typedoc/types/SwapInsertPosition.html +1 -1
  119. package/docs/static/typedoc/types/TController.html +1 -1
  120. package/docs/static/typedoc/types/TemplateCache.html +2 -0
  121. package/docs/static/typedoc/variables/EventBus.html +1 -0
  122. package/index.html +4 -2
  123. package/package.json +3 -3
  124. package/src/animations/animate-css.js +5 -1
  125. package/src/binding.spec.js +3 -1
  126. package/src/core/compile/compile.spec.js +12 -5
  127. package/src/core/core.html +0 -1
  128. package/src/core/exception-handler.js +1 -1
  129. package/src/core/prop.spec.js +1 -0
  130. package/src/core/task-tracker-factory.js +2 -2
  131. package/src/directive/bind/bind.spec.js +1 -4
  132. package/src/directive/channel/channel.js +8 -24
  133. package/src/directive/channel/channel.spec.js +4 -2
  134. package/src/directive/class/class.js +16 -0
  135. package/src/directive/class/class.spec.js +2 -0
  136. package/src/directive/events/event.spec.js +1 -0
  137. package/src/directive/form/form.spec.js +2 -0
  138. package/src/directive/http/http.js +4 -4
  139. package/src/directive/if/if.spec.js +2 -0
  140. package/src/directive/include/include.spec.js +1 -0
  141. package/src/directive/input/input.spec.js +1 -0
  142. package/src/directive/model/model.spec.js +3 -0
  143. package/src/directive/model-options/model-options.spec.js +2 -0
  144. package/src/directive/observe/observe.spec.js +2 -1
  145. package/src/{core/pubsub/pubsub.html → directive/on/on.html} +1 -1
  146. package/src/{core → directive/on}/on.spec.js +5 -3
  147. package/src/directive/on/on.test.js +11 -0
  148. package/src/directive/options/options.spec.js +1 -0
  149. package/src/directive/script/script.js +1 -1
  150. package/src/directive/select/select.spec.js +1 -0
  151. package/src/directive/setter/setter.js +1 -1
  152. package/src/directive/setter/setter.spec.js +2 -0
  153. package/src/directive/switch/switch.spec.js +1 -0
  154. package/src/injection-tokens.js +3 -0
  155. package/src/interface.ts +10 -0
  156. package/src/loader.js +3 -6
  157. package/src/public.js +3 -3
  158. package/src/router/directives/state-directives.spec.js +3 -1
  159. package/src/router/params/param-factory.js +6 -0
  160. package/src/router/params/param.js +22 -7
  161. package/src/router/router.html +0 -1
  162. package/src/router/router.test.js +2 -1
  163. package/src/router/services.spec.js +2 -0
  164. package/src/router/state/state-builder.js +3 -0
  165. package/src/router/state/state-builder.spec.js +2 -0
  166. package/src/router/state/state-service.js +1 -1
  167. package/src/router/state-filter.spec.js +2 -0
  168. package/src/router/template-factory.html +19 -0
  169. package/src/router/template-factory.js +3 -3
  170. package/src/router/template-factory.spec.js +1 -0
  171. package/src/router/template-factory.test.js +12 -0
  172. package/src/router/transition/transition-hook.js +1 -1
  173. package/src/router/url/url-service.js +1 -1
  174. package/src/router/view-scroll.spec.js +3 -1
  175. package/src/services/http/http.js +4 -4
  176. package/src/services/http/http.test.js +1 -1
  177. package/src/services/http/interface.ts +243 -0
  178. package/src/services/http-backend/http-backend.js +21 -11
  179. package/src/services/log/interface.ts +39 -0
  180. package/src/services/log/log.html +19 -0
  181. package/src/services/log/log.js +74 -0
  182. package/src/services/log/log.spec.js +64 -0
  183. package/src/services/log/log.test.js +11 -0
  184. package/src/services/pubsub/pubsub.html +19 -0
  185. package/src/{core → services}/pubsub/pubsub.js +6 -5
  186. package/src/{core → services}/pubsub/pubsub.spec.js +3 -3
  187. package/src/{core → services}/pubsub/pubsub.test.js +1 -1
  188. package/src/services/template-cache/interface.ts +4 -0
  189. package/src/services/template-cache/template-cache.html +22 -0
  190. package/src/services/template-cache/template-cache.js +13 -0
  191. package/src/services/template-cache/template-cache.spec.js +62 -0
  192. package/src/services/template-cache/template-cache.test.js +11 -0
  193. package/src/services/template-request.js +2 -2
  194. package/src/shared/cache.js +9 -0
  195. package/src/shared/dom.js +13 -7
  196. package/utils/express.js +7 -9
  197. package/@types/core/cache/cache-factory.d.ts +0 -22
  198. package/@types/core/cache/cache.d.ts +0 -28
  199. package/@types/services/log.d.ts +0 -53
  200. package/src/core/cache/cache-factory.js +0 -19
  201. package/src/core/cache/cache.js +0 -27
  202. package/src/directive/class/class.md +0 -90
  203. package/src/directive/cloak/cloak.md +0 -24
  204. package/src/examples/counter.html +0 -20
  205. package/src/services/log.js +0 -95
  206. package/src/services/log.md +0 -39
@@ -1,4 +1,4 @@
1
- /* Version: 0.7.3 - July 4, 2025 23:40:50 */
1
+ /* Version: 0.7.4 - July 11, 2025 03:03:25 */
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) :
@@ -1136,36 +1136,29 @@
1136
1136
  return Object.prototype.hasOwnProperty.call(obj, key);
1137
1137
  }
1138
1138
 
1139
- /**
1140
- * @typedef {Object} ExpandoStore
1141
- * @property {!Object<string, any>} data
1142
- *
1143
- */
1144
-
1145
- const EXPANDO = "ng";
1146
-
1147
1139
  /**
1148
1140
  * Expando cache for adding properties to DOM nodes with JavaScript.
1149
1141
  * This used to be an Object in JQLite decorator, but swapped out for a Map
1150
1142
  * for performance reasons and convenience methods. A proxy is available for
1151
1143
  * additional logic handling.
1152
1144
  *
1153
- * @type {Map<number, ExpandoStore>}
1145
+ * @type {Map<number, import('../interface.ts').ExpandoStore>}
1154
1146
  */
1155
1147
  const Cache = new Map();
1156
1148
 
1157
- /**
1158
- * Key for storing scope data, attached to an element
1159
- */
1160
- const SCOPE_KEY = "$scope";
1149
+ /** @type {number} */
1150
+ let jqId = 1;
1161
1151
 
1162
1152
  /**
1163
1153
  * Key for storing isolate scope data, attached to an element
1164
1154
  */
1165
1155
  const ISOLATE_SCOPE_KEY = "$isolateScope";
1156
+ const EXPANDO = "ng";
1166
1157
 
1167
- /** @type {number} */
1168
- let jqId = 1;
1158
+ /**
1159
+ * Key for storing scope data, attached to an element
1160
+ */
1161
+ const SCOPE_KEY = "$scope";
1169
1162
 
1170
1163
  const DASH_LOWERCASE_REGEXP = /-([a-z])/g;
1171
1164
  const UNDERSCORE_LOWERCASE_REGEXP = /_([a-z])/g;
@@ -1266,7 +1259,7 @@
1266
1259
  *
1267
1260
  * @param {Element} element
1268
1261
  * @param {boolean} [createIfNecessary=false]
1269
- * @returns {import("../core/cache/cache.js").ExpandoStore}
1262
+ * @returns {import("../interface.ts").ExpandoStore}
1270
1263
  */
1271
1264
  function getExpando(element, createIfNecessary = false) {
1272
1265
  let expandoId = element[EXPANDO];
@@ -1711,6 +1704,9 @@
1711
1704
  * angular.$injectTokens.$animate,
1712
1705
  * angular.$injectTokens.$templateRequest,
1713
1706
  * ];
1707
+ *
1708
+ * function myDirective($animate, $templateRequest) { ... }
1709
+ *
1714
1710
  * ```
1715
1711
  * @type Readonly<Record<string, string>>
1716
1712
  */
@@ -10621,7 +10617,7 @@
10621
10617
  scriptDirective.$inject = ["$templateCache"];
10622
10618
 
10623
10619
  /**
10624
- * @param {import('../../core/cache/cache-factory').TemplateCache} $templateCache
10620
+ * @param {import('../../services/template-cache/interface.ts').TemplateCache} $templateCache
10625
10621
  * @returns {import('../../interface.ts').Directive}
10626
10622
  */
10627
10623
  function scriptDirective($templateCache) {
@@ -11282,6 +11278,8 @@
11282
11278
  }
11283
11279
 
11284
11280
  /**
11281
+ * @param {string} name
11282
+ * @param {boolean|number} selector
11285
11283
  * @returns {() => import("../../interface.ts").Directive}
11286
11284
  */
11287
11285
  function classDirective(name, selector) {
@@ -11297,6 +11295,7 @@
11297
11295
  link(scope, element, attr) {
11298
11296
  let classCounts = getCacheData(element, "$classCounts");
11299
11297
  let oldModulo = true;
11298
+ /** @type {string|undefined} */
11300
11299
  let oldClassString;
11301
11300
 
11302
11301
  if (!classCounts) {
@@ -11315,6 +11314,9 @@
11315
11314
  ngClassWatchAction(toClassString(val));
11316
11315
  });
11317
11316
 
11317
+ /**
11318
+ * @param {string} classString
11319
+ */
11318
11320
  function addClasses(classString) {
11319
11321
  classString = digestClassCounts(split(classString), 1);
11320
11322
  if (hasAnimate(element)) {
@@ -11328,6 +11330,9 @@
11328
11330
  }
11329
11331
  }
11330
11332
 
11333
+ /**
11334
+ * @param {string} classString
11335
+ */
11331
11336
  function removeClasses(classString) {
11332
11337
  classString = digestClassCounts(split(classString), -1);
11333
11338
  if (hasAnimate(element)) {
@@ -11341,6 +11346,10 @@
11341
11346
  }
11342
11347
  }
11343
11348
 
11349
+ /**
11350
+ * @param {string} oldClassString
11351
+ * @param {string} newClassString
11352
+ */
11344
11353
  function updateClasses(oldClassString, newClassString) {
11345
11354
  const oldClassArray = split(oldClassString);
11346
11355
  const newClassArray = split(newClassString);
@@ -11391,6 +11400,9 @@
11391
11400
  oldModulo = newModulo;
11392
11401
  }
11393
11402
 
11403
+ /**
11404
+ * @param {string} newClassString
11405
+ */
11394
11406
  function ngClassWatchAction(newClassString) {
11395
11407
  if (oldModulo === selector) {
11396
11408
  updateClasses(oldClassString, newClassString);
@@ -14874,23 +14886,17 @@
14874
14886
  }
14875
14887
 
14876
14888
  /**
14877
- * A cache for maping template names to their respective content.
14878
- *
14879
- * @typedef {Map<string, string>} TemplateCache
14880
- */
14881
-
14882
- /**
14883
- * Service responsible for providing a cache for templates.
14884
- *
14885
- * @class TemplateCacheProvider
14886
- * @description Provides an instance of a template cache that can be used to store and retrieve template content.
14889
+ * Provides an instance of a cache that can be used to store and retrieve template content.
14887
14890
  */
14888
14891
  class TemplateCacheProvider {
14892
+ constructor() {
14893
+ /** @type {import('./interface.ts').TemplateCache} */
14894
+ this.cache = new Map();
14895
+ }
14889
14896
  /**
14890
- * @description Returns a new instance of a `TemplateCache`, which is a Map used to store templates.
14891
- * @returns {TemplateCache} A new instance of the template cache (Map object).
14897
+ * @returns {import('./interface.ts').TemplateCache}
14892
14898
  */
14893
- $get = () => new Map();
14899
+ $get = () => this.cache;
14894
14900
  }
14895
14901
 
14896
14902
  /**
@@ -14937,7 +14943,7 @@
14937
14943
  * @see {@link angular.ErrorHandler AngularTS ErrorHandler}
14938
14944
  */
14939
14945
 
14940
- /** @typedef {import('../services/log.js').LogService} LogService */
14946
+ /** @typedef {import('../services/log/interface.ts').LogService} LogService */
14941
14947
 
14942
14948
  /** @typedef {import("./error-handler.ts").ErrorHandler} ErrorHandler */
14943
14949
 
@@ -18503,8 +18509,8 @@
18503
18509
  *
18504
18510
  * @param {*} $browser
18505
18511
  * @param {*} $httpBackend
18506
- * @param {*} $rootScope
18507
- * @param {import("../../core/di/internal-injector").InjectorService} $injector
18512
+ * @param {import("../../core/scope/scope.js").Scope} $rootScope
18513
+ * @param {import("../../core/di/internal-injector.js").InjectorService} $injector
18508
18514
  * @param {*} $sce
18509
18515
  * @returns
18510
18516
  */
@@ -18942,9 +18948,9 @@
18942
18948
  Object.entries(eventHandlers).forEach(([key, eventHandler]) => {
18943
18949
  applyHandlers[key] = function (event) {
18944
18950
  if (useApplyAsync) {
18945
- setTimeout(() => $rootScope.$apply(callEventHandler));
18951
+ setTimeout(() => callEventHandler());
18946
18952
  } else {
18947
- $rootScope.$apply(callEventHandler);
18953
+ callEventHandler();
18948
18954
  }
18949
18955
 
18950
18956
  function callEventHandler() {
@@ -19052,17 +19058,27 @@
19052
19058
  * {@link ng.$http $http}.
19053
19059
  *
19054
19060
  */
19055
- function HttpBackendProvider() {
19056
- this.$get = [
19057
- "$browser",
19058
- /**
19059
- * @param {import('../browser.js').Browser} $browser
19060
- * @returns
19061
- */
19062
- function ($browser) {
19063
- return createHttpBackend($browser);
19064
- },
19065
- ];
19061
+ /**
19062
+ * HTTP backend used by the {@link ng.$http service} that delegates to
19063
+ * XMLHttpRequest object and deals with browser incompatibilities.
19064
+ *
19065
+ * You should never need to use this service directly, instead use the higher-level abstractions:
19066
+ * {@link ng.$http $http}.
19067
+ *
19068
+ */
19069
+ class HttpBackendProvider {
19070
+ constructor() {
19071
+ this.$get = [
19072
+ "$browser",
19073
+ /**
19074
+ * @param {import('../browser.js').Browser} $browser
19075
+ * @returns
19076
+ */
19077
+ function ($browser) {
19078
+ return createHttpBackend($browser);
19079
+ },
19080
+ ];
19081
+ }
19066
19082
  }
19067
19083
 
19068
19084
  /**
@@ -20196,57 +20212,27 @@
20196
20212
  return a === b || urlResolve(a).href === urlResolve(b).href;
20197
20213
  }
20198
20214
 
20199
- ///////////////////////////////////////////////////////////////////////////
20200
- // LogService
20201
- // see http://docs.angularjs.org/api/ng/service/$log
20202
- // see http://docs.angularjs.org/api/ng/provider/$logProvider
20203
- ///////////////////////////////////////////////////////////////////////////
20204
-
20205
20215
  /**
20206
- * @typedef {(...args: any[]) => void} LogCall
20207
- */
20208
-
20209
- /**
20210
- * @typedef {Object} LogService
20211
- * @property {LogCall} debug - Log a debug messages
20212
- * @property {LogCall} error - Log a error message
20213
- * @property {LogCall} info - Log a info message
20214
- * @property {LogCall} log - Log a general message
20215
- * @property {LogCall} warn - Log a warning message
20216
- */
20217
-
20218
- /**
20219
- * @type {LogService}
20220
- */
20221
- let LogService = {
20222
- debug: undefined,
20223
- error: undefined,
20224
- info: undefined,
20225
- log: undefined,
20226
- warn: undefined,
20227
- };
20228
-
20229
- /**
20230
- * @type {LogProvider}
20231
- * Use the `$logProvider` to configure how the application logs messages
20216
+ * Configuration provider for `$log` service
20232
20217
  */
20233
20218
  class LogProvider {
20219
+ /** @private */
20234
20220
  constructor() {
20235
- this.debug = true;
20221
+ /** @type {boolean} */
20222
+ this.debug = false;
20223
+ /** @private @type {import("./interface.ts").LogServiceFactory | null} */
20224
+ this._override = null;
20236
20225
  }
20237
20226
 
20238
20227
  /**
20239
- * @param {boolean=} flag enable or disable debug level messages
20240
- * @returns {*} current value if used as getter or itself (chaining) if used as setter
20228
+ * Override the default {@link LogService} implemenation
20229
+ * @param {import("./interface.ts").LogServiceFactory} fn
20241
20230
  */
20242
- debugEnabled(flag) {
20243
- if (typeof flag !== "undefined") {
20244
- this.debug = flag;
20245
- return this;
20246
- }
20247
- return this.debug;
20231
+ setLogger(fn) {
20232
+ this._override = fn;
20248
20233
  }
20249
20234
 
20235
+ /** @private */
20250
20236
  formatError(arg) {
20251
20237
  if (isError(arg)) {
20252
20238
  if (arg.stack) {
@@ -20261,6 +20247,10 @@
20261
20247
  return arg;
20262
20248
  }
20263
20249
 
20250
+ /**
20251
+ * @private
20252
+ * @param {string} type
20253
+ */
20264
20254
  consoleLog(type) {
20265
20255
  const console = window.console || {};
20266
20256
  const logFn = console[type] || console.log || (() => {});
@@ -20271,8 +20261,14 @@
20271
20261
  };
20272
20262
  }
20273
20263
 
20264
+ /**
20265
+ * @returns {import("./interface.ts").LogService}
20266
+ */
20274
20267
  $get() {
20275
- LogService = {
20268
+ if (this._override) {
20269
+ return this._override();
20270
+ }
20271
+ return {
20276
20272
  log: this.consoleLog("log"),
20277
20273
  info: this.consoleLog("info"),
20278
20274
  warn: this.consoleLog("warn"),
@@ -20286,7 +20282,6 @@
20286
20282
  };
20287
20283
  })(),
20288
20284
  };
20289
- return LogService;
20290
20285
  }
20291
20286
  }
20292
20287
 
@@ -21541,7 +21536,7 @@
21541
21536
  /**
21542
21537
  * Creates a new `TaskTracker` instance.
21543
21538
  *
21544
- * @param {import('../services/log.js').LogService} log - The logging service.
21539
+ * @param {import('../services/log/interface.ts').LogService} log - The logging service.
21545
21540
  * @returns {TaskTracker} A new `TaskTracker` instance.
21546
21541
  */
21547
21542
  (log) => new TaskTracker(log),
@@ -21556,7 +21551,7 @@
21556
21551
  */
21557
21552
  class TaskTracker {
21558
21553
  /**
21559
- * @param {import('../services/log.js').LogService} log - The logging service.
21554
+ * @param {import('../services/log/interface.ts').LogService} log - The logging service.
21560
21555
  */
21561
21556
  constructor(log) {
21562
21557
  /** @private */
@@ -21734,8 +21729,8 @@
21734
21729
  /**
21735
21730
  *
21736
21731
  * @param {import('../core/exception-handler.js').ErrorHandler} $exceptionHandler
21737
- * @param {import('../core/cache/cache-factory.js').TemplateCache} $templateCache
21738
- * @param {*} $http
21732
+ * @param {import('../services/template-cache/interface.ts').TemplateCache} $templateCache
21733
+ * @param {import("interface.ts").HttpService} $http
21739
21734
  * @param {*} $sce
21740
21735
  * @returns
21741
21736
  */
@@ -27666,12 +27661,15 @@
27666
27661
  Object.prototype.hasOwnProperty.bind(cfg || {}),
27667
27662
  ).length === 0;
27668
27663
 
27669
- let DefType;
27670
- (function (DefType) {
27671
- DefType[(DefType["PATH"] = 0)] = "PATH";
27672
- DefType[(DefType["SEARCH"] = 1)] = "SEARCH";
27673
- DefType[(DefType["CONFIG"] = 2)] = "CONFIG";
27674
- })(DefType || (DefType = {}));
27664
+ /**
27665
+ * @private
27666
+ * @enum {number}
27667
+ */
27668
+ const DefType = {
27669
+ PATH: 0,
27670
+ SEARCH: 1,
27671
+ CONFIG: 2,
27672
+ };
27675
27673
 
27676
27674
  function getParamDeclaration(paramName, location, state) {
27677
27675
  const noReloadOnSearch =
@@ -27684,6 +27682,7 @@
27684
27682
  );
27685
27683
  return Object.assign(defaultConfig, paramConfig);
27686
27684
  }
27685
+
27687
27686
  function unwrapShorthand(cfg) {
27688
27687
  cfg = isShorthand(cfg) ? { value: cfg } : cfg;
27689
27688
  getStaticDefaultValue["__cacheable"] = true;
@@ -27693,6 +27692,7 @@
27693
27692
  const $$fn = isInjectable(cfg.value) ? cfg.value : getStaticDefaultValue;
27694
27693
  return Object.assign(cfg, { $$fn });
27695
27694
  }
27695
+
27696
27696
  function getType(cfg, urlType, location, id, paramTypes) {
27697
27697
  if (cfg.type && urlType && urlType.name !== "string")
27698
27698
  throw new Error(`Param '${id}' has two type configurations.`);
@@ -27717,6 +27717,7 @@
27717
27717
  }
27718
27718
  return cfg.type instanceof ParamType ? cfg.type : paramTypes.type(cfg.type);
27719
27719
  }
27720
+
27720
27721
  /** returns false, true, or the squash value to indicate the "default parameter url squash policy". */
27721
27722
  function getSquashPolicy(config, isOptional, defaultPolicy) {
27722
27723
  const squash = config.squash;
@@ -27727,6 +27728,7 @@
27727
27728
  `Invalid squash policy: '${squash}'. Valid policies: false, true, or arbitrary string`,
27728
27729
  );
27729
27730
  }
27731
+
27730
27732
  function getReplace(config, arrayMode, isOptional, squash) {
27731
27733
  const defaultPolicy = [
27732
27734
  { from: "", to: isOptional || arrayMode ? undefined : "" },
@@ -27740,7 +27742,16 @@
27740
27742
  (item) => configuredKeys.indexOf(item.from) === -1,
27741
27743
  ).concat(replace);
27742
27744
  }
27745
+
27743
27746
  class Param {
27747
+ /**
27748
+ *
27749
+ * @param {*} id
27750
+ * @param {*} type
27751
+ * @param {DefType} location
27752
+ * @param {import("../url/url-config.js").UrlConfigProvider} urlConfig
27753
+ * @param {*} state
27754
+ */
27744
27755
  constructor(id, type, location, urlConfig, state) {
27745
27756
  const config = getParamDeclaration(id, location, state);
27746
27757
  type = getType(config, type, location, id, urlConfig.paramTypes);
@@ -28957,9 +28968,10 @@
28957
28968
 
28958
28969
  /**
28959
28970
  * Configurable provider for an injectable event bus
28960
- * @implements {ServiceProvider}
28971
+ * @extends {ServiceProvider}
28961
28972
  */
28962
28973
  class PubSubProvider {
28974
+ /** @private */
28963
28975
  constructor() {
28964
28976
  /**
28965
28977
  * @type {PubSub}
@@ -29023,7 +29035,7 @@
29023
29035
  * representation minimizes the number of object allocations and has been
29024
29036
  * shown to be faster than an array of objects with three key-value pairs or
29025
29037
  * three parallel arrays, especially on IE.) Once a subscription is removed
29026
- * via {@link #unsubscribe} or {@link #unsubscribeByKey}, the three
29038
+ * via {@link unsubscribe} or {@link unsubscribeByKey}, the three
29027
29039
  * corresponding array elements are deleted, and never reused. This means the
29028
29040
  * total number of subscriptions during the lifetime of the pubsub channel is
29029
29041
  * limited by the maximum length of a JavaScript array to (2^32 - 1) / 3 =
@@ -29053,7 +29065,7 @@
29053
29065
  * is specified. Subscribing the same function to the same topic multiple
29054
29066
  * times will result in multiple function invocations while publishing.
29055
29067
  * Returns a subscription key that can be used to unsubscribe the function from
29056
- * the topic via {@link #unsubscribeByKey}.
29068
+ * the topic via {@link unsubscribeByKey}.
29057
29069
  *
29058
29070
  * @param {string} topic Topic to subscribe to.
29059
29071
  * @param {Function} fn Function to be invoked when a message is published to
@@ -29088,7 +29100,7 @@
29088
29100
  * method on the given `opt_context` object, or in the global scope if
29089
29101
  * no context is specified, and is then unsubscribed. Returns a subscription
29090
29102
  * key that can be used to unsubscribe the function from the topic via
29091
- * {@link #unsubscribeByKey}.
29103
+ * {@link unsubscribeByKey}.
29092
29104
  *
29093
29105
  * @param {string} topic Topic to subscribe to.
29094
29106
  * @param {Function} fn Function to be invoked once and then unsubscribed when
@@ -29161,7 +29173,7 @@
29161
29173
  }
29162
29174
 
29163
29175
  /**
29164
- * Removes a subscription based on the key returned by {@link #subscribe}.
29176
+ * Removes a subscription based on the key returned by {@link subscribe}.
29165
29177
  * No-op if no matching subscription is found. Returns a Boolean indicating
29166
29178
  * whether a subscription was removed.
29167
29179
  *
@@ -32067,8 +32079,8 @@
32067
32079
  "$templateRequest",
32068
32080
  "$injector",
32069
32081
  /**
32070
- * @param {any} $http
32071
- * @param {import("../core/cache/cache-factory.js").TemplateCache} $templateCache
32082
+ * @param {import("interface.ts").HttpService} $http
32083
+ * @param {import("../services/template-cache/interface.ts").TemplateCache} $templateCache
32072
32084
  * @param {any} $templateRequest
32073
32085
  * @param {import("../core/di/internal-injector.js").InjectorService} $injector
32074
32086
  * @returns
@@ -32167,7 +32179,7 @@
32167
32179
  if (url == null) return null;
32168
32180
  if (this._useHttp) {
32169
32181
  return this.$http
32170
- .get(url, {
32182
+ .get(/** @type {string} */ (url), {
32171
32183
  cache: this.$templateCache,
32172
32184
  headers: { Accept: "text/html" },
32173
32185
  })
@@ -33479,7 +33491,13 @@
33479
33491
  }
33480
33492
 
33481
33493
  class ParamFactory {
33494
+ /**
33495
+ * @param {import("../url/url-config.js").UrlConfigProvider} urlServiceConfig
33496
+ */
33482
33497
  constructor(urlServiceConfig) {
33498
+ /**
33499
+ * @type {import("../url/url-config.js").UrlConfigProvider}
33500
+ */
33483
33501
  this.urlServiceConfig = urlServiceConfig;
33484
33502
  }
33485
33503
 
@@ -33533,7 +33551,7 @@
33533
33551
  * The nested [[UrlConfig]] API to configure the URL and retrieve URL information
33534
33552
  *
33535
33553
  * See: [[UrlConfig]] for details
33536
- * @type {import("./url-config").UrlConfigProvider}
33554
+ * @type {import("./url-config.js").UrlConfigProvider}
33537
33555
  */
33538
33556
  this.config = urlConfigProvider;
33539
33557
 
@@ -34048,6 +34066,9 @@
34048
34066
  };
34049
34067
  }
34050
34068
 
34069
+ /**
34070
+ * @param {import("../params/param-factory.js").ParamFactory} paramFactory
34071
+ */
34051
34072
  function getParamsBuilder(paramFactory) {
34052
34073
  return function (state) {
34053
34074
  const makeConfigParam = (_config, id) =>
@@ -35561,38 +35582,22 @@
35561
35582
 
35562
35583
  ngChannelDirective.$inject = [$injectTokens.$eventBus];
35563
35584
  /**
35564
- * Dynamically updates an element's content based on events published on a specified channel.
35565
- * If data is sent via `$eventBus` on the specified `ngChannel`, the directive attempts to update the element's content accordingly,
35566
- * either by directly setting the inner HTML or merging the scope's data if the element contains a template.
35567
- *
35568
- * If the element has a template and incoming data is an object, the directive will merge all key/value pairs onto the scope,
35569
- * allowing Angular expressions (`{{ yourModel }}`) to be evaluated and rendered.
35570
- *
35571
- * When the scope is destroyed, the directive automatically unsubscribes from the channel.
35572
- * Example:
35573
- *
35574
- * HTML:
35575
- * <div ng-channel="userChannel">Hello {{ user.firstName }} {{ user.lastName }}</div>
35576
- *
35577
- * JavaScript:
35578
- * angular.$eventBus.publish('userChannel', { user: { firstName: 'John', lastName: 'Smith' } });
35579
- *
35580
- * @param {import("../../core/pubsub/pubsub.js").PubSub} $eventBus
35585
+ * @param {import("../../services/pubsub/pubsub.js").PubSub} $eventBus
35581
35586
  * @returns {import("../../interface.ts").Directive}
35582
35587
  */
35583
35588
  function ngChannelDirective($eventBus) {
35584
35589
  return {
35585
35590
  link: (scope, element, attrs) => {
35586
- const hasTemplate = element.childNodes.length > 0;
35587
35591
  const channel = attrs["ngChannel"];
35592
+ const hasTemplateContent = element.childNodes.length > 0;
35588
35593
 
35589
- const key = $eventBus.subscribe(channel, (val) => {
35590
- if (!hasTemplate) {
35591
- element.innerHTML = val;
35592
- } else {
35593
- if (isObject(val)) {
35594
- scope.$merge(val);
35594
+ const key = $eventBus.subscribe(channel, (value) => {
35595
+ if (hasTemplateContent) {
35596
+ if (isObject(value)) {
35597
+ scope.$merge(value);
35595
35598
  }
35599
+ } else {
35600
+ element.innerHTML = value;
35596
35601
  }
35597
35602
  });
35598
35603
 
@@ -35606,7 +35611,7 @@
35606
35611
  ngSetterDirective.$inject = ["$parse", "$log"];
35607
35612
  /**
35608
35613
  * @param {import('../../core/parse/interface.ts').ParseService} $parse
35609
- * @param {import('../../services/log.js').LogService} $log
35614
+ * @param {import('../../services/log/interface.ts').LogService} $log
35610
35615
  * @returns {import('../../interface.ts').Directive}
35611
35616
  */
35612
35617
  function ngSetterDirective($parse, $log) {
@@ -35681,6 +35686,10 @@
35681
35686
  const ngPostDirective = defineDirective("post");
35682
35687
  const ngPutDirective = defineDirective("put");
35683
35688
 
35689
+ /**
35690
+ * @typedef {"click" | "change" | "submit"} EventType
35691
+ */
35692
+
35684
35693
  /**
35685
35694
  * Selects DOM event to listen for based on the element type.
35686
35695
  *
@@ -35789,9 +35798,9 @@
35789
35798
  */
35790
35799
  function createHttpDirective(method, attrName) {
35791
35800
  /**
35792
- * @param {{ [key: string]: Function }} $http
35801
+ * @param {import("interface.ts").HttpService} $http
35793
35802
  * @param {import("../../core/compile/compile.js").CompileFn} $compile
35794
- * @param {import("../../services/log.js").LogService} $log
35803
+ * @param {import("../../services/log/interface.ts").LogService} $log
35795
35804
  * @returns {import('../../interface.ts').Directive}
35796
35805
  */
35797
35806
  return function ($http, $compile, $log) {
@@ -36080,18 +36089,15 @@
36080
36089
 
36081
36090
  class Angular {
36082
36091
  constructor() {
36083
- Cache.clear(); // a ensure new instance of angular gets a clean cache
36084
-
36085
- /** @type {Map<number, import("./core/cache/cache.js").ExpandoStore>} */
36086
36092
  this.$cache = Cache;
36087
36093
 
36088
- /** @type {import('./core/pubsub/pubsub.js').PubSub} */
36094
+ /** @type {import('./services/pubsub/pubsub.js').PubSub} */
36089
36095
  this.$eventBus = EventBus;
36090
36096
 
36091
36097
  /**
36092
36098
  * @type {string} `version` from `package.json`
36093
36099
  */
36094
- this.version = "0.7.3"; //inserted via rollup plugin
36100
+ this.version = "0.7.4"; //inserted via rollup plugin
36095
36101
 
36096
36102
  /** @type {!Array<string|any>} */
36097
36103
  this.bootsrappedModules = [];