@angular-wave/angular.ts 0.7.3 → 0.7.5

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 (237) 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 +2 -2
  27. package/dist/angular-ts.esm.js +168 -165
  28. package/dist/angular-ts.umd.js +168 -165
  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 +59 -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/blur.md +38 -0
  39. package/docs/content/docs/directive/channel.md +37 -0
  40. package/docs/content/docs/directive/class-even.md +47 -0
  41. package/docs/content/docs/directive/class-odd.md +48 -0
  42. package/docs/content/docs/directive/class.md +64 -0
  43. package/docs/content/docs/directive/click.md +38 -0
  44. package/docs/content/docs/directive/cloak.md +74 -0
  45. package/docs/content/docs/directive/copy.md +38 -0
  46. package/docs/content/docs/directive/cut.md +40 -0
  47. package/docs/content/docs/directive/dblclick.md +38 -0
  48. package/docs/content/docs/directive/focus.md +38 -0
  49. package/docs/content/docs/directive/include.md +7 -0
  50. package/docs/content/docs/directive/keydown.md +0 -0
  51. package/docs/content/docs/directive/keyup.md +0 -0
  52. package/docs/content/docs/directive/load.md +0 -0
  53. package/docs/content/docs/directive/mousedown.md +38 -0
  54. package/docs/content/docs/directive/mouseenter.md +38 -0
  55. package/docs/content/docs/directive/mouseleave.md +38 -0
  56. package/docs/content/docs/directive/mousemove.md +38 -0
  57. package/docs/content/docs/directive/mouseout.md +38 -0
  58. package/docs/content/docs/directive/mouseover.md +38 -0
  59. package/docs/content/docs/directive/mouseup.md +38 -0
  60. package/docs/content/docs/filter/_index.md +4 -0
  61. package/docs/content/docs/provider/_index.md +4 -0
  62. package/docs/content/docs/provider/eventBusProvider.md +35 -0
  63. package/docs/content/docs/provider/logProvider.md +59 -0
  64. package/docs/content/docs/provider/templateCacheProvider.md +35 -0
  65. package/docs/content/docs/service/_index.md +4 -0
  66. package/docs/content/docs/service/eventBus.md +56 -0
  67. package/docs/content/docs/service/log.md +113 -0
  68. package/docs/content/docs/service/templateCache.md +64 -0
  69. package/docs/hugo.yaml +3 -3
  70. package/docs/layouts/404.html +1 -1
  71. package/docs/layouts/partials/hooks/head-end.html +3 -0
  72. package/docs/layouts/shortcodes/showhtml.html +2 -0
  73. package/docs/layouts/shortcodes/showjs.html +2 -0
  74. package/docs/layouts/shortcodes/showraw.html +1 -0
  75. package/docs/static/examples/counter/counter-test.html +17 -0
  76. package/docs/static/examples/counter/counter.html +5 -0
  77. package/docs/static/examples/counter/counter.test.js +28 -0
  78. package/docs/static/examples/eventbus/eventbus-test.html +19 -0
  79. package/docs/static/examples/eventbus/eventbus.html +13 -0
  80. package/docs/static/examples/eventbus/eventbus.js +15 -0
  81. package/docs/static/examples/eventbus/eventbus.test.js +19 -0
  82. package/docs/static/examples/ng-blur/ng-blur.html +9 -0
  83. package/docs/static/examples/ng-channel/ng-channel-test.html +17 -0
  84. package/docs/static/examples/ng-channel/ng-channel.html +24 -0
  85. package/docs/static/examples/ng-channel/ng-channel.test.js +31 -0
  86. package/docs/static/examples/ng-class/ng-class.html +71 -0
  87. package/docs/static/examples/ng-class-even/ng-class-even.html +8 -0
  88. package/docs/static/examples/ng-class-odd/ng-class-odd.html +8 -0
  89. package/docs/static/examples/ng-click/ng-click.html +6 -0
  90. package/docs/static/examples/ng-copy/ng-copy.html +6 -0
  91. package/docs/static/examples/ng-cut/ng-cut.html +6 -0
  92. package/docs/static/examples/ng-dblclick/ng-dblclick.html +10 -0
  93. package/docs/static/examples/ng-focus/ng-focus.html +9 -0
  94. package/docs/static/examples/ng-mousedown/ng-mousedown.html +6 -0
  95. package/docs/static/examples/ng-mouseenter/ng-mouseenter.html +4 -0
  96. package/docs/static/examples/ng-mouseleave/ng-mouseleave.html +4 -0
  97. package/docs/static/examples/ng-mousemove/ng-mousemove.html +4 -0
  98. package/docs/static/examples/ng-mouseout/ng-mouseout.html +4 -0
  99. package/docs/static/examples/ng-mouseover/ng-mouseover.html +4 -0
  100. package/docs/static/examples/ng-mouseup/ng-mouseup.html +4 -0
  101. package/docs/static/typedoc/assets/hierarchy.js +1 -1
  102. package/docs/static/typedoc/assets/navigation.js +1 -1
  103. package/docs/static/typedoc/assets/search.js +1 -1
  104. package/docs/static/typedoc/classes/LogProvider.html +6 -0
  105. package/docs/static/typedoc/classes/PubSub.html +71 -0
  106. package/docs/static/typedoc/classes/PubSubProvider.html +3 -0
  107. package/docs/static/typedoc/classes/TemplateCacheProvider.html +5 -0
  108. package/docs/static/typedoc/hierarchy.html +1 -1
  109. package/docs/static/typedoc/index.html +1 -1
  110. package/docs/static/typedoc/interfaces/ChangesObject.html +1 -1
  111. package/docs/static/typedoc/interfaces/ComponentOptions.html +1 -1
  112. package/docs/static/typedoc/interfaces/Controller.html +1 -1
  113. package/docs/static/typedoc/interfaces/Directive.html +1 -1
  114. package/docs/static/typedoc/interfaces/DirectivePrePost.html +1 -1
  115. package/docs/static/typedoc/interfaces/HttpHeadersGetter.html +1 -0
  116. package/docs/static/typedoc/interfaces/HttpProviderDefaults.html +31 -0
  117. package/docs/static/typedoc/interfaces/HttpRequestConfigHeaders.html +6 -0
  118. package/docs/static/typedoc/interfaces/HttpRequestTransformer.html +1 -0
  119. package/docs/static/typedoc/interfaces/HttpResponse.html +8 -0
  120. package/docs/static/typedoc/interfaces/HttpResponseTransformer.html +1 -0
  121. package/docs/static/typedoc/interfaces/HttpService.html +38 -0
  122. package/docs/static/typedoc/interfaces/LogService.html +12 -0
  123. package/docs/static/typedoc/interfaces/NgModelController.html +1 -1
  124. package/docs/static/typedoc/interfaces/NgModelOptions.html +1 -1
  125. package/docs/static/typedoc/interfaces/Provider.html +1 -1
  126. package/docs/static/typedoc/interfaces/RequestConfig.html +48 -0
  127. package/docs/static/typedoc/interfaces/RequestShortcutConfig.html +38 -0
  128. package/docs/static/typedoc/interfaces/ServiceProvider.html +1 -1
  129. package/docs/static/typedoc/interfaces/TranscludeFunctionObject.html +1 -1
  130. package/docs/static/typedoc/types/AnnotatedFactory.html +1 -1
  131. package/docs/static/typedoc/types/CloneAttachFunction.html +1 -1
  132. package/docs/static/typedoc/types/ControllerConstructor.html +1 -1
  133. package/docs/static/typedoc/types/DirectiveCompileFn.html +1 -1
  134. package/docs/static/typedoc/types/DirectiveController.html +1 -1
  135. package/docs/static/typedoc/types/DirectiveFactory.html +1 -1
  136. package/docs/static/typedoc/types/DirectiveLinkFn.html +1 -1
  137. package/docs/static/typedoc/types/ExpandoStore.html +2 -0
  138. package/docs/static/typedoc/types/Expression.html +1 -1
  139. package/docs/static/typedoc/types/FilterFactory.html +1 -1
  140. package/docs/static/typedoc/types/FilterFn.html +1 -1
  141. package/docs/static/typedoc/types/HttpPromise.html +1 -0
  142. package/docs/static/typedoc/types/Injectable.html +1 -1
  143. package/docs/static/typedoc/types/InjectableFactory.html +1 -1
  144. package/docs/static/typedoc/types/LogCall.html +2 -0
  145. package/docs/static/typedoc/types/LogServiceFactory.html +2 -0
  146. package/docs/static/typedoc/types/OnChangesObject.html +1 -1
  147. package/docs/static/typedoc/types/SwapInsertPosition.html +1 -1
  148. package/docs/static/typedoc/types/TController.html +1 -1
  149. package/docs/static/typedoc/types/TemplateCache.html +2 -0
  150. package/docs/static/typedoc/variables/EventBus.html +1 -0
  151. package/index.html +4 -2
  152. package/package.json +3 -3
  153. package/src/animations/animate-css.js +5 -1
  154. package/src/binding.spec.js +3 -1
  155. package/src/core/compile/compile.spec.js +12 -5
  156. package/src/core/core.html +0 -1
  157. package/src/core/exception-handler.js +1 -1
  158. package/src/core/prop.spec.js +1 -0
  159. package/src/core/task-tracker-factory.js +2 -2
  160. package/src/directive/bind/bind.spec.js +1 -4
  161. package/src/directive/channel/channel.js +8 -24
  162. package/src/directive/channel/channel.spec.js +4 -2
  163. package/src/directive/class/class.js +16 -0
  164. package/src/directive/class/class.spec.js +2 -0
  165. package/src/directive/events/event.spec.js +1 -0
  166. package/src/directive/events/events.js +21 -24
  167. package/src/directive/form/form.spec.js +2 -0
  168. package/src/directive/http/http.js +4 -4
  169. package/src/directive/if/if.spec.js +2 -0
  170. package/src/directive/include/include.spec.js +1 -0
  171. package/src/directive/input/input.spec.js +1 -0
  172. package/src/directive/model/model.spec.js +3 -0
  173. package/src/directive/model-options/model-options.spec.js +2 -0
  174. package/src/directive/observe/{test.html → observe-demo.html} +0 -1
  175. package/src/directive/observe/observe.spec.js +2 -1
  176. package/src/{core/pubsub/pubsub.html → directive/on/on.html} +1 -1
  177. package/src/{core → directive/on}/on.spec.js +5 -3
  178. package/src/directive/on/on.test.js +11 -0
  179. package/src/directive/options/options.spec.js +1 -0
  180. package/src/directive/script/script.js +1 -1
  181. package/src/directive/select/select.spec.js +1 -0
  182. package/src/directive/setter/setter.js +1 -1
  183. package/src/directive/setter/setter.spec.js +2 -0
  184. package/src/directive/switch/switch.spec.js +1 -0
  185. package/src/injection-tokens.js +3 -0
  186. package/src/interface.ts +10 -0
  187. package/src/loader.js +3 -6
  188. package/src/public.js +3 -3
  189. package/src/router/directives/state-directives.spec.js +3 -1
  190. package/src/router/params/param-factory.js +6 -0
  191. package/src/router/params/param.js +22 -7
  192. package/src/router/router.html +0 -1
  193. package/src/router/router.test.js +2 -1
  194. package/src/router/services.spec.js +2 -0
  195. package/src/router/state/state-builder.js +3 -0
  196. package/src/router/state/state-builder.spec.js +2 -0
  197. package/src/router/state/state-service.js +1 -1
  198. package/src/router/state-filter.spec.js +2 -0
  199. package/src/router/template-factory.html +19 -0
  200. package/src/router/template-factory.js +3 -3
  201. package/src/router/template-factory.spec.js +1 -0
  202. package/src/router/template-factory.test.js +12 -0
  203. package/src/router/transition/transition-hook.js +1 -1
  204. package/src/router/url/url-service.js +1 -1
  205. package/src/router/view-scroll.spec.js +3 -1
  206. package/src/services/http/http.js +4 -4
  207. package/src/services/http/http.test.js +1 -1
  208. package/src/services/http/interface.ts +243 -0
  209. package/src/services/http-backend/http-backend.js +21 -11
  210. package/src/services/log/interface.ts +39 -0
  211. package/src/services/log/log.html +19 -0
  212. package/src/services/log/log.js +74 -0
  213. package/src/services/log/log.spec.js +64 -0
  214. package/src/services/log/log.test.js +11 -0
  215. package/src/services/pubsub/pubsub.html +19 -0
  216. package/src/{core → services}/pubsub/pubsub.js +6 -5
  217. package/src/{core → services}/pubsub/pubsub.spec.js +3 -3
  218. package/src/{core → services}/pubsub/pubsub.test.js +1 -1
  219. package/src/services/template-cache/interface.ts +4 -0
  220. package/src/services/template-cache/template-cache.html +22 -0
  221. package/src/services/template-cache/template-cache.js +13 -0
  222. package/src/services/template-cache/template-cache.spec.js +62 -0
  223. package/src/services/template-cache/template-cache.test.js +11 -0
  224. package/src/services/template-request.js +2 -2
  225. package/src/shared/cache.js +9 -0
  226. package/src/shared/dom.js +13 -7
  227. package/utils/express.js +7 -9
  228. package/@types/core/cache/cache-factory.d.ts +0 -22
  229. package/@types/core/cache/cache.d.ts +0 -28
  230. package/@types/services/log.d.ts +0 -53
  231. package/src/core/cache/cache-factory.js +0 -19
  232. package/src/core/cache/cache.js +0 -27
  233. package/src/directive/class/class.md +0 -90
  234. package/src/directive/cloak/cloak.md +0 -24
  235. package/src/examples/counter.html +0 -20
  236. package/src/services/log.js +0 -95
  237. 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.5 - July 12, 2025 01:24:05 */
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
  */
@@ -3972,31 +3968,28 @@
3972
3968
  */
3973
3969
  const ngEventDirectives = {};
3974
3970
 
3975
- "click copy cut dblclick focus blur keydown keyup keypress load mouseover mousein mouseout mouseleave paste submit touchstart touchend touchmove"
3971
+ "click copy cut dblclick focus blur keydown keyup keypress load mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup paste submit touchstart touchend touchmove"
3976
3972
  .split(" ")
3977
- .forEach(
3978
- /** @param { string } eventName */
3979
- (eventName) => {
3980
- const directiveName = directiveNormalize(`ng-${eventName}`);
3981
- ngEventDirectives[directiveName] = [
3982
- "$parse",
3983
- "$exceptionHandler",
3984
- /**
3985
- * @param {import("../../core/parse/interface.ts").ParseService} $parse
3986
- * @param {import('../../core/exception-handler.js').ErrorHandler} $exceptionHandler
3987
- * @returns
3988
- */
3989
- ($parse, $exceptionHandler) => {
3990
- return createEventDirective(
3991
- $parse,
3992
- $exceptionHandler,
3993
- directiveName,
3994
- eventName,
3995
- );
3996
- },
3997
- ];
3998
- },
3999
- );
3973
+ .forEach((eventName) => {
3974
+ const directiveName = directiveNormalize(`ng-${eventName}`);
3975
+ ngEventDirectives[directiveName] = [
3976
+ "$parse",
3977
+ "$exceptionHandler",
3978
+ /**
3979
+ * @param {import("../../core/parse/interface.ts").ParseService} $parse
3980
+ * @param {import('../../core/exception-handler.js').ErrorHandler} $exceptionHandler
3981
+ * @returns
3982
+ */
3983
+ ($parse, $exceptionHandler) => {
3984
+ return createEventDirective(
3985
+ $parse,
3986
+ $exceptionHandler,
3987
+ directiveName,
3988
+ eventName,
3989
+ );
3990
+ },
3991
+ ];
3992
+ });
4000
3993
 
4001
3994
  /**
4002
3995
  *
@@ -10621,7 +10614,7 @@
10621
10614
  scriptDirective.$inject = ["$templateCache"];
10622
10615
 
10623
10616
  /**
10624
- * @param {import('../../core/cache/cache-factory').TemplateCache} $templateCache
10617
+ * @param {import('../../services/template-cache/interface.ts').TemplateCache} $templateCache
10625
10618
  * @returns {import('../../interface.ts').Directive}
10626
10619
  */
10627
10620
  function scriptDirective($templateCache) {
@@ -11282,6 +11275,8 @@
11282
11275
  }
11283
11276
 
11284
11277
  /**
11278
+ * @param {string} name
11279
+ * @param {boolean|number} selector
11285
11280
  * @returns {() => import("../../interface.ts").Directive}
11286
11281
  */
11287
11282
  function classDirective(name, selector) {
@@ -11297,6 +11292,7 @@
11297
11292
  link(scope, element, attr) {
11298
11293
  let classCounts = getCacheData(element, "$classCounts");
11299
11294
  let oldModulo = true;
11295
+ /** @type {string|undefined} */
11300
11296
  let oldClassString;
11301
11297
 
11302
11298
  if (!classCounts) {
@@ -11315,6 +11311,9 @@
11315
11311
  ngClassWatchAction(toClassString(val));
11316
11312
  });
11317
11313
 
11314
+ /**
11315
+ * @param {string} classString
11316
+ */
11318
11317
  function addClasses(classString) {
11319
11318
  classString = digestClassCounts(split(classString), 1);
11320
11319
  if (hasAnimate(element)) {
@@ -11328,6 +11327,9 @@
11328
11327
  }
11329
11328
  }
11330
11329
 
11330
+ /**
11331
+ * @param {string} classString
11332
+ */
11331
11333
  function removeClasses(classString) {
11332
11334
  classString = digestClassCounts(split(classString), -1);
11333
11335
  if (hasAnimate(element)) {
@@ -11341,6 +11343,10 @@
11341
11343
  }
11342
11344
  }
11343
11345
 
11346
+ /**
11347
+ * @param {string} oldClassString
11348
+ * @param {string} newClassString
11349
+ */
11344
11350
  function updateClasses(oldClassString, newClassString) {
11345
11351
  const oldClassArray = split(oldClassString);
11346
11352
  const newClassArray = split(newClassString);
@@ -11391,6 +11397,9 @@
11391
11397
  oldModulo = newModulo;
11392
11398
  }
11393
11399
 
11400
+ /**
11401
+ * @param {string} newClassString
11402
+ */
11394
11403
  function ngClassWatchAction(newClassString) {
11395
11404
  if (oldModulo === selector) {
11396
11405
  updateClasses(oldClassString, newClassString);
@@ -14874,23 +14883,17 @@
14874
14883
  }
14875
14884
 
14876
14885
  /**
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.
14886
+ * Provides an instance of a cache that can be used to store and retrieve template content.
14887
14887
  */
14888
14888
  class TemplateCacheProvider {
14889
+ constructor() {
14890
+ /** @type {import('./interface.ts').TemplateCache} */
14891
+ this.cache = new Map();
14892
+ }
14889
14893
  /**
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).
14894
+ * @returns {import('./interface.ts').TemplateCache}
14892
14895
  */
14893
- $get = () => new Map();
14896
+ $get = () => this.cache;
14894
14897
  }
14895
14898
 
14896
14899
  /**
@@ -14937,7 +14940,7 @@
14937
14940
  * @see {@link angular.ErrorHandler AngularTS ErrorHandler}
14938
14941
  */
14939
14942
 
14940
- /** @typedef {import('../services/log.js').LogService} LogService */
14943
+ /** @typedef {import('../services/log/interface.ts').LogService} LogService */
14941
14944
 
14942
14945
  /** @typedef {import("./error-handler.ts").ErrorHandler} ErrorHandler */
14943
14946
 
@@ -18503,8 +18506,8 @@
18503
18506
  *
18504
18507
  * @param {*} $browser
18505
18508
  * @param {*} $httpBackend
18506
- * @param {*} $rootScope
18507
- * @param {import("../../core/di/internal-injector").InjectorService} $injector
18509
+ * @param {import("../../core/scope/scope.js").Scope} $rootScope
18510
+ * @param {import("../../core/di/internal-injector.js").InjectorService} $injector
18508
18511
  * @param {*} $sce
18509
18512
  * @returns
18510
18513
  */
@@ -18942,9 +18945,9 @@
18942
18945
  Object.entries(eventHandlers).forEach(([key, eventHandler]) => {
18943
18946
  applyHandlers[key] = function (event) {
18944
18947
  if (useApplyAsync) {
18945
- setTimeout(() => $rootScope.$apply(callEventHandler));
18948
+ setTimeout(() => callEventHandler());
18946
18949
  } else {
18947
- $rootScope.$apply(callEventHandler);
18950
+ callEventHandler();
18948
18951
  }
18949
18952
 
18950
18953
  function callEventHandler() {
@@ -19052,17 +19055,27 @@
19052
19055
  * {@link ng.$http $http}.
19053
19056
  *
19054
19057
  */
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
- ];
19058
+ /**
19059
+ * HTTP backend used by the {@link ng.$http service} that delegates to
19060
+ * XMLHttpRequest object and deals with browser incompatibilities.
19061
+ *
19062
+ * You should never need to use this service directly, instead use the higher-level abstractions:
19063
+ * {@link ng.$http $http}.
19064
+ *
19065
+ */
19066
+ class HttpBackendProvider {
19067
+ constructor() {
19068
+ this.$get = [
19069
+ "$browser",
19070
+ /**
19071
+ * @param {import('../browser.js').Browser} $browser
19072
+ * @returns
19073
+ */
19074
+ function ($browser) {
19075
+ return createHttpBackend($browser);
19076
+ },
19077
+ ];
19078
+ }
19066
19079
  }
19067
19080
 
19068
19081
  /**
@@ -20196,57 +20209,27 @@
20196
20209
  return a === b || urlResolve(a).href === urlResolve(b).href;
20197
20210
  }
20198
20211
 
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
- /**
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
20212
  /**
20230
- * @type {LogProvider}
20231
- * Use the `$logProvider` to configure how the application logs messages
20213
+ * Configuration provider for `$log` service
20232
20214
  */
20233
20215
  class LogProvider {
20216
+ /** @private */
20234
20217
  constructor() {
20235
- this.debug = true;
20218
+ /** @type {boolean} */
20219
+ this.debug = false;
20220
+ /** @private @type {import("./interface.ts").LogServiceFactory | null} */
20221
+ this._override = null;
20236
20222
  }
20237
20223
 
20238
20224
  /**
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
20225
+ * Override the default {@link LogService} implemenation
20226
+ * @param {import("./interface.ts").LogServiceFactory} fn
20241
20227
  */
20242
- debugEnabled(flag) {
20243
- if (typeof flag !== "undefined") {
20244
- this.debug = flag;
20245
- return this;
20246
- }
20247
- return this.debug;
20228
+ setLogger(fn) {
20229
+ this._override = fn;
20248
20230
  }
20249
20231
 
20232
+ /** @private */
20250
20233
  formatError(arg) {
20251
20234
  if (isError(arg)) {
20252
20235
  if (arg.stack) {
@@ -20261,6 +20244,10 @@
20261
20244
  return arg;
20262
20245
  }
20263
20246
 
20247
+ /**
20248
+ * @private
20249
+ * @param {string} type
20250
+ */
20264
20251
  consoleLog(type) {
20265
20252
  const console = window.console || {};
20266
20253
  const logFn = console[type] || console.log || (() => {});
@@ -20271,8 +20258,14 @@
20271
20258
  };
20272
20259
  }
20273
20260
 
20261
+ /**
20262
+ * @returns {import("./interface.ts").LogService}
20263
+ */
20274
20264
  $get() {
20275
- LogService = {
20265
+ if (this._override) {
20266
+ return this._override();
20267
+ }
20268
+ return {
20276
20269
  log: this.consoleLog("log"),
20277
20270
  info: this.consoleLog("info"),
20278
20271
  warn: this.consoleLog("warn"),
@@ -20286,7 +20279,6 @@
20286
20279
  };
20287
20280
  })(),
20288
20281
  };
20289
- return LogService;
20290
20282
  }
20291
20283
  }
20292
20284
 
@@ -21541,7 +21533,7 @@
21541
21533
  /**
21542
21534
  * Creates a new `TaskTracker` instance.
21543
21535
  *
21544
- * @param {import('../services/log.js').LogService} log - The logging service.
21536
+ * @param {import('../services/log/interface.ts').LogService} log - The logging service.
21545
21537
  * @returns {TaskTracker} A new `TaskTracker` instance.
21546
21538
  */
21547
21539
  (log) => new TaskTracker(log),
@@ -21556,7 +21548,7 @@
21556
21548
  */
21557
21549
  class TaskTracker {
21558
21550
  /**
21559
- * @param {import('../services/log.js').LogService} log - The logging service.
21551
+ * @param {import('../services/log/interface.ts').LogService} log - The logging service.
21560
21552
  */
21561
21553
  constructor(log) {
21562
21554
  /** @private */
@@ -21734,8 +21726,8 @@
21734
21726
  /**
21735
21727
  *
21736
21728
  * @param {import('../core/exception-handler.js').ErrorHandler} $exceptionHandler
21737
- * @param {import('../core/cache/cache-factory.js').TemplateCache} $templateCache
21738
- * @param {*} $http
21729
+ * @param {import('../services/template-cache/interface.ts').TemplateCache} $templateCache
21730
+ * @param {import("interface.ts").HttpService} $http
21739
21731
  * @param {*} $sce
21740
21732
  * @returns
21741
21733
  */
@@ -27666,12 +27658,15 @@
27666
27658
  Object.prototype.hasOwnProperty.bind(cfg || {}),
27667
27659
  ).length === 0;
27668
27660
 
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 = {}));
27661
+ /**
27662
+ * @private
27663
+ * @enum {number}
27664
+ */
27665
+ const DefType = {
27666
+ PATH: 0,
27667
+ SEARCH: 1,
27668
+ CONFIG: 2,
27669
+ };
27675
27670
 
27676
27671
  function getParamDeclaration(paramName, location, state) {
27677
27672
  const noReloadOnSearch =
@@ -27684,6 +27679,7 @@
27684
27679
  );
27685
27680
  return Object.assign(defaultConfig, paramConfig);
27686
27681
  }
27682
+
27687
27683
  function unwrapShorthand(cfg) {
27688
27684
  cfg = isShorthand(cfg) ? { value: cfg } : cfg;
27689
27685
  getStaticDefaultValue["__cacheable"] = true;
@@ -27693,6 +27689,7 @@
27693
27689
  const $$fn = isInjectable(cfg.value) ? cfg.value : getStaticDefaultValue;
27694
27690
  return Object.assign(cfg, { $$fn });
27695
27691
  }
27692
+
27696
27693
  function getType(cfg, urlType, location, id, paramTypes) {
27697
27694
  if (cfg.type && urlType && urlType.name !== "string")
27698
27695
  throw new Error(`Param '${id}' has two type configurations.`);
@@ -27717,6 +27714,7 @@
27717
27714
  }
27718
27715
  return cfg.type instanceof ParamType ? cfg.type : paramTypes.type(cfg.type);
27719
27716
  }
27717
+
27720
27718
  /** returns false, true, or the squash value to indicate the "default parameter url squash policy". */
27721
27719
  function getSquashPolicy(config, isOptional, defaultPolicy) {
27722
27720
  const squash = config.squash;
@@ -27727,6 +27725,7 @@
27727
27725
  `Invalid squash policy: '${squash}'. Valid policies: false, true, or arbitrary string`,
27728
27726
  );
27729
27727
  }
27728
+
27730
27729
  function getReplace(config, arrayMode, isOptional, squash) {
27731
27730
  const defaultPolicy = [
27732
27731
  { from: "", to: isOptional || arrayMode ? undefined : "" },
@@ -27740,7 +27739,16 @@
27740
27739
  (item) => configuredKeys.indexOf(item.from) === -1,
27741
27740
  ).concat(replace);
27742
27741
  }
27742
+
27743
27743
  class Param {
27744
+ /**
27745
+ *
27746
+ * @param {*} id
27747
+ * @param {*} type
27748
+ * @param {DefType} location
27749
+ * @param {import("../url/url-config.js").UrlConfigProvider} urlConfig
27750
+ * @param {*} state
27751
+ */
27744
27752
  constructor(id, type, location, urlConfig, state) {
27745
27753
  const config = getParamDeclaration(id, location, state);
27746
27754
  type = getType(config, type, location, id, urlConfig.paramTypes);
@@ -28957,9 +28965,10 @@
28957
28965
 
28958
28966
  /**
28959
28967
  * Configurable provider for an injectable event bus
28960
- * @implements {ServiceProvider}
28968
+ * @extends {ServiceProvider}
28961
28969
  */
28962
28970
  class PubSubProvider {
28971
+ /** @private */
28963
28972
  constructor() {
28964
28973
  /**
28965
28974
  * @type {PubSub}
@@ -29023,7 +29032,7 @@
29023
29032
  * representation minimizes the number of object allocations and has been
29024
29033
  * shown to be faster than an array of objects with three key-value pairs or
29025
29034
  * three parallel arrays, especially on IE.) Once a subscription is removed
29026
- * via {@link #unsubscribe} or {@link #unsubscribeByKey}, the three
29035
+ * via {@link unsubscribe} or {@link unsubscribeByKey}, the three
29027
29036
  * corresponding array elements are deleted, and never reused. This means the
29028
29037
  * total number of subscriptions during the lifetime of the pubsub channel is
29029
29038
  * limited by the maximum length of a JavaScript array to (2^32 - 1) / 3 =
@@ -29053,7 +29062,7 @@
29053
29062
  * is specified. Subscribing the same function to the same topic multiple
29054
29063
  * times will result in multiple function invocations while publishing.
29055
29064
  * Returns a subscription key that can be used to unsubscribe the function from
29056
- * the topic via {@link #unsubscribeByKey}.
29065
+ * the topic via {@link unsubscribeByKey}.
29057
29066
  *
29058
29067
  * @param {string} topic Topic to subscribe to.
29059
29068
  * @param {Function} fn Function to be invoked when a message is published to
@@ -29088,7 +29097,7 @@
29088
29097
  * method on the given `opt_context` object, or in the global scope if
29089
29098
  * no context is specified, and is then unsubscribed. Returns a subscription
29090
29099
  * key that can be used to unsubscribe the function from the topic via
29091
- * {@link #unsubscribeByKey}.
29100
+ * {@link unsubscribeByKey}.
29092
29101
  *
29093
29102
  * @param {string} topic Topic to subscribe to.
29094
29103
  * @param {Function} fn Function to be invoked once and then unsubscribed when
@@ -29161,7 +29170,7 @@
29161
29170
  }
29162
29171
 
29163
29172
  /**
29164
- * Removes a subscription based on the key returned by {@link #subscribe}.
29173
+ * Removes a subscription based on the key returned by {@link subscribe}.
29165
29174
  * No-op if no matching subscription is found. Returns a Boolean indicating
29166
29175
  * whether a subscription was removed.
29167
29176
  *
@@ -32067,8 +32076,8 @@
32067
32076
  "$templateRequest",
32068
32077
  "$injector",
32069
32078
  /**
32070
- * @param {any} $http
32071
- * @param {import("../core/cache/cache-factory.js").TemplateCache} $templateCache
32079
+ * @param {import("interface.ts").HttpService} $http
32080
+ * @param {import("../services/template-cache/interface.ts").TemplateCache} $templateCache
32072
32081
  * @param {any} $templateRequest
32073
32082
  * @param {import("../core/di/internal-injector.js").InjectorService} $injector
32074
32083
  * @returns
@@ -32167,7 +32176,7 @@
32167
32176
  if (url == null) return null;
32168
32177
  if (this._useHttp) {
32169
32178
  return this.$http
32170
- .get(url, {
32179
+ .get(/** @type {string} */ (url), {
32171
32180
  cache: this.$templateCache,
32172
32181
  headers: { Accept: "text/html" },
32173
32182
  })
@@ -33479,7 +33488,13 @@
33479
33488
  }
33480
33489
 
33481
33490
  class ParamFactory {
33491
+ /**
33492
+ * @param {import("../url/url-config.js").UrlConfigProvider} urlServiceConfig
33493
+ */
33482
33494
  constructor(urlServiceConfig) {
33495
+ /**
33496
+ * @type {import("../url/url-config.js").UrlConfigProvider}
33497
+ */
33483
33498
  this.urlServiceConfig = urlServiceConfig;
33484
33499
  }
33485
33500
 
@@ -33533,7 +33548,7 @@
33533
33548
  * The nested [[UrlConfig]] API to configure the URL and retrieve URL information
33534
33549
  *
33535
33550
  * See: [[UrlConfig]] for details
33536
- * @type {import("./url-config").UrlConfigProvider}
33551
+ * @type {import("./url-config.js").UrlConfigProvider}
33537
33552
  */
33538
33553
  this.config = urlConfigProvider;
33539
33554
 
@@ -34048,6 +34063,9 @@
34048
34063
  };
34049
34064
  }
34050
34065
 
34066
+ /**
34067
+ * @param {import("../params/param-factory.js").ParamFactory} paramFactory
34068
+ */
34051
34069
  function getParamsBuilder(paramFactory) {
34052
34070
  return function (state) {
34053
34071
  const makeConfigParam = (_config, id) =>
@@ -35561,38 +35579,22 @@
35561
35579
 
35562
35580
  ngChannelDirective.$inject = [$injectTokens.$eventBus];
35563
35581
  /**
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
35582
+ * @param {import("../../services/pubsub/pubsub.js").PubSub} $eventBus
35581
35583
  * @returns {import("../../interface.ts").Directive}
35582
35584
  */
35583
35585
  function ngChannelDirective($eventBus) {
35584
35586
  return {
35585
35587
  link: (scope, element, attrs) => {
35586
- const hasTemplate = element.childNodes.length > 0;
35587
35588
  const channel = attrs["ngChannel"];
35589
+ const hasTemplateContent = element.childNodes.length > 0;
35588
35590
 
35589
- const key = $eventBus.subscribe(channel, (val) => {
35590
- if (!hasTemplate) {
35591
- element.innerHTML = val;
35592
- } else {
35593
- if (isObject(val)) {
35594
- scope.$merge(val);
35591
+ const key = $eventBus.subscribe(channel, (value) => {
35592
+ if (hasTemplateContent) {
35593
+ if (isObject(value)) {
35594
+ scope.$merge(value);
35595
35595
  }
35596
+ } else {
35597
+ element.innerHTML = value;
35596
35598
  }
35597
35599
  });
35598
35600
 
@@ -35606,7 +35608,7 @@
35606
35608
  ngSetterDirective.$inject = ["$parse", "$log"];
35607
35609
  /**
35608
35610
  * @param {import('../../core/parse/interface.ts').ParseService} $parse
35609
- * @param {import('../../services/log.js').LogService} $log
35611
+ * @param {import('../../services/log/interface.ts').LogService} $log
35610
35612
  * @returns {import('../../interface.ts').Directive}
35611
35613
  */
35612
35614
  function ngSetterDirective($parse, $log) {
@@ -35681,6 +35683,10 @@
35681
35683
  const ngPostDirective = defineDirective("post");
35682
35684
  const ngPutDirective = defineDirective("put");
35683
35685
 
35686
+ /**
35687
+ * @typedef {"click" | "change" | "submit"} EventType
35688
+ */
35689
+
35684
35690
  /**
35685
35691
  * Selects DOM event to listen for based on the element type.
35686
35692
  *
@@ -35789,9 +35795,9 @@
35789
35795
  */
35790
35796
  function createHttpDirective(method, attrName) {
35791
35797
  /**
35792
- * @param {{ [key: string]: Function }} $http
35798
+ * @param {import("interface.ts").HttpService} $http
35793
35799
  * @param {import("../../core/compile/compile.js").CompileFn} $compile
35794
- * @param {import("../../services/log.js").LogService} $log
35800
+ * @param {import("../../services/log/interface.ts").LogService} $log
35795
35801
  * @returns {import('../../interface.ts').Directive}
35796
35802
  */
35797
35803
  return function ($http, $compile, $log) {
@@ -36080,18 +36086,15 @@
36080
36086
 
36081
36087
  class Angular {
36082
36088
  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
36089
  this.$cache = Cache;
36087
36090
 
36088
- /** @type {import('./core/pubsub/pubsub.js').PubSub} */
36091
+ /** @type {import('./services/pubsub/pubsub.js').PubSub} */
36089
36092
  this.$eventBus = EventBus;
36090
36093
 
36091
36094
  /**
36092
36095
  * @type {string} `version` from `package.json`
36093
36096
  */
36094
- this.version = "0.7.3"; //inserted via rollup plugin
36097
+ this.version = "0.7.5"; //inserted via rollup plugin
36095
36098
 
36096
36099
  /** @type {!Array<string|any>} */
36097
36100
  this.bootsrappedModules = [];