@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
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Expando cache for adding properties to DOM nodes with JavaScript.
3
+ * This used to be an Object in JQLite decorator, but swapped out for a Map
4
+ * for performance reasons and convenience methods. A proxy is available for
5
+ * additional logic handling.
6
+ *
7
+ * @type {Map<number, import('../interface.ts').ExpandoStore>}
8
+ */
9
+ export const Cache: Map<number, import("../interface.ts").ExpandoStore>;
@@ -25,12 +25,12 @@ export function removeElementData(element: Element, name?: string): void;
25
25
  *
26
26
  * @param {Element} element
27
27
  * @param {boolean} [createIfNecessary=false]
28
- * @returns {import("../core/cache/cache.js").ExpandoStore}
28
+ * @returns {import("../interface.ts").ExpandoStore}
29
29
  */
30
30
  export function getExpando(
31
31
  element: Element,
32
32
  createIfNecessary?: boolean,
33
- ): import("../core/cache/cache.js").ExpandoStore;
33
+ ): import("../interface.ts").ExpandoStore;
34
34
  /**
35
35
  * Checks if the string contains HTML tags or entities.
36
36
  * @param {string} html
package/Makefile CHANGED
@@ -31,7 +31,7 @@ types:
31
31
 
32
32
 
33
33
  TYPEDOC_DIR = docs/static/typedoc
34
- jsdoc:
34
+ typedoc: types pretty
35
35
  @rm -rf $(TYPEDOC_DIR)
36
36
  @npm run generate-docs
37
37
  @npx prettier ./typedoc --write
@@ -1,4 +1,4 @@
1
- /* Version: 0.7.3 - July 4, 2025 23:40:52 */
1
+ /* Version: 0.7.4 - July 11, 2025 03:03:27 */
2
2
  const VALID_CLASS = "ng-valid";
3
3
  const INVALID_CLASS = "ng-invalid";
4
4
  const PRISTINE_CLASS = "ng-pristine";
@@ -1130,36 +1130,29 @@ function hasOwn(obj, key) {
1130
1130
  return Object.prototype.hasOwnProperty.call(obj, key);
1131
1131
  }
1132
1132
 
1133
- /**
1134
- * @typedef {Object} ExpandoStore
1135
- * @property {!Object<string, any>} data
1136
- *
1137
- */
1138
-
1139
- const EXPANDO = "ng";
1140
-
1141
1133
  /**
1142
1134
  * Expando cache for adding properties to DOM nodes with JavaScript.
1143
1135
  * This used to be an Object in JQLite decorator, but swapped out for a Map
1144
1136
  * for performance reasons and convenience methods. A proxy is available for
1145
1137
  * additional logic handling.
1146
1138
  *
1147
- * @type {Map<number, ExpandoStore>}
1139
+ * @type {Map<number, import('../interface.ts').ExpandoStore>}
1148
1140
  */
1149
1141
  const Cache = new Map();
1150
1142
 
1151
- /**
1152
- * Key for storing scope data, attached to an element
1153
- */
1154
- const SCOPE_KEY = "$scope";
1143
+ /** @type {number} */
1144
+ let jqId = 1;
1155
1145
 
1156
1146
  /**
1157
1147
  * Key for storing isolate scope data, attached to an element
1158
1148
  */
1159
1149
  const ISOLATE_SCOPE_KEY = "$isolateScope";
1150
+ const EXPANDO = "ng";
1160
1151
 
1161
- /** @type {number} */
1162
- let jqId = 1;
1152
+ /**
1153
+ * Key for storing scope data, attached to an element
1154
+ */
1155
+ const SCOPE_KEY = "$scope";
1163
1156
 
1164
1157
  const DASH_LOWERCASE_REGEXP = /-([a-z])/g;
1165
1158
  const UNDERSCORE_LOWERCASE_REGEXP = /_([a-z])/g;
@@ -1260,7 +1253,7 @@ function removeElementData(element, name) {
1260
1253
  *
1261
1254
  * @param {Element} element
1262
1255
  * @param {boolean} [createIfNecessary=false]
1263
- * @returns {import("../core/cache/cache.js").ExpandoStore}
1256
+ * @returns {import("../interface.ts").ExpandoStore}
1264
1257
  */
1265
1258
  function getExpando(element, createIfNecessary = false) {
1266
1259
  let expandoId = element[EXPANDO];
@@ -1705,6 +1698,9 @@ function extractElementNode$1(element) {
1705
1698
  * angular.$injectTokens.$animate,
1706
1699
  * angular.$injectTokens.$templateRequest,
1707
1700
  * ];
1701
+ *
1702
+ * function myDirective($animate, $templateRequest) { ... }
1703
+ *
1708
1704
  * ```
1709
1705
  * @type Readonly<Record<string, string>>
1710
1706
  */
@@ -10615,7 +10611,7 @@ function ngValueDirective() {
10615
10611
  scriptDirective.$inject = ["$templateCache"];
10616
10612
 
10617
10613
  /**
10618
- * @param {import('../../core/cache/cache-factory').TemplateCache} $templateCache
10614
+ * @param {import('../../services/template-cache/interface.ts').TemplateCache} $templateCache
10619
10615
  * @returns {import('../../interface.ts').Directive}
10620
10616
  */
10621
10617
  function scriptDirective($templateCache) {
@@ -11276,6 +11272,8 @@ function ngBindHtmlDirective($parse) {
11276
11272
  }
11277
11273
 
11278
11274
  /**
11275
+ * @param {string} name
11276
+ * @param {boolean|number} selector
11279
11277
  * @returns {() => import("../../interface.ts").Directive}
11280
11278
  */
11281
11279
  function classDirective(name, selector) {
@@ -11291,6 +11289,7 @@ function classDirective(name, selector) {
11291
11289
  link(scope, element, attr) {
11292
11290
  let classCounts = getCacheData(element, "$classCounts");
11293
11291
  let oldModulo = true;
11292
+ /** @type {string|undefined} */
11294
11293
  let oldClassString;
11295
11294
 
11296
11295
  if (!classCounts) {
@@ -11309,6 +11308,9 @@ function classDirective(name, selector) {
11309
11308
  ngClassWatchAction(toClassString(val));
11310
11309
  });
11311
11310
 
11311
+ /**
11312
+ * @param {string} classString
11313
+ */
11312
11314
  function addClasses(classString) {
11313
11315
  classString = digestClassCounts(split(classString), 1);
11314
11316
  if (hasAnimate(element)) {
@@ -11322,6 +11324,9 @@ function classDirective(name, selector) {
11322
11324
  }
11323
11325
  }
11324
11326
 
11327
+ /**
11328
+ * @param {string} classString
11329
+ */
11325
11330
  function removeClasses(classString) {
11326
11331
  classString = digestClassCounts(split(classString), -1);
11327
11332
  if (hasAnimate(element)) {
@@ -11335,6 +11340,10 @@ function classDirective(name, selector) {
11335
11340
  }
11336
11341
  }
11337
11342
 
11343
+ /**
11344
+ * @param {string} oldClassString
11345
+ * @param {string} newClassString
11346
+ */
11338
11347
  function updateClasses(oldClassString, newClassString) {
11339
11348
  const oldClassArray = split(oldClassString);
11340
11349
  const newClassArray = split(newClassString);
@@ -11385,6 +11394,9 @@ function classDirective(name, selector) {
11385
11394
  oldModulo = newModulo;
11386
11395
  }
11387
11396
 
11397
+ /**
11398
+ * @param {string} newClassString
11399
+ */
11388
11400
  function ngClassWatchAction(newClassString) {
11389
11401
  if (oldModulo === selector) {
11390
11402
  updateClasses(oldClassString, newClassString);
@@ -14868,23 +14880,17 @@ class AnimateRunner {
14868
14880
  }
14869
14881
 
14870
14882
  /**
14871
- * A cache for maping template names to their respective content.
14872
- *
14873
- * @typedef {Map<string, string>} TemplateCache
14874
- */
14875
-
14876
- /**
14877
- * Service responsible for providing a cache for templates.
14878
- *
14879
- * @class TemplateCacheProvider
14880
- * @description Provides an instance of a template cache that can be used to store and retrieve template content.
14883
+ * Provides an instance of a cache that can be used to store and retrieve template content.
14881
14884
  */
14882
14885
  class TemplateCacheProvider {
14886
+ constructor() {
14887
+ /** @type {import('./interface.ts').TemplateCache} */
14888
+ this.cache = new Map();
14889
+ }
14883
14890
  /**
14884
- * @description Returns a new instance of a `TemplateCache`, which is a Map used to store templates.
14885
- * @returns {TemplateCache} A new instance of the template cache (Map object).
14891
+ * @returns {import('./interface.ts').TemplateCache}
14886
14892
  */
14887
- $get = () => new Map();
14893
+ $get = () => this.cache;
14888
14894
  }
14889
14895
 
14890
14896
  /**
@@ -14931,7 +14937,7 @@ class TemplateCacheProvider {
14931
14937
  * @see {@link angular.ErrorHandler AngularTS ErrorHandler}
14932
14938
  */
14933
14939
 
14934
- /** @typedef {import('../services/log.js').LogService} LogService */
14940
+ /** @typedef {import('../services/log/interface.ts').LogService} LogService */
14935
14941
 
14936
14942
  /** @typedef {import("./error-handler.ts").ErrorHandler} ErrorHandler */
14937
14943
 
@@ -18497,8 +18503,8 @@ function HttpProvider() {
18497
18503
  *
18498
18504
  * @param {*} $browser
18499
18505
  * @param {*} $httpBackend
18500
- * @param {*} $rootScope
18501
- * @param {import("../../core/di/internal-injector").InjectorService} $injector
18506
+ * @param {import("../../core/scope/scope.js").Scope} $rootScope
18507
+ * @param {import("../../core/di/internal-injector.js").InjectorService} $injector
18502
18508
  * @param {*} $sce
18503
18509
  * @returns
18504
18510
  */
@@ -18936,9 +18942,9 @@ function HttpProvider() {
18936
18942
  Object.entries(eventHandlers).forEach(([key, eventHandler]) => {
18937
18943
  applyHandlers[key] = function (event) {
18938
18944
  if (useApplyAsync) {
18939
- setTimeout(() => $rootScope.$apply(callEventHandler));
18945
+ setTimeout(() => callEventHandler());
18940
18946
  } else {
18941
- $rootScope.$apply(callEventHandler);
18947
+ callEventHandler();
18942
18948
  }
18943
18949
 
18944
18950
  function callEventHandler() {
@@ -19046,17 +19052,27 @@ function HttpProvider() {
19046
19052
  * {@link ng.$http $http}.
19047
19053
  *
19048
19054
  */
19049
- function HttpBackendProvider() {
19050
- this.$get = [
19051
- "$browser",
19052
- /**
19053
- * @param {import('../browser.js').Browser} $browser
19054
- * @returns
19055
- */
19056
- function ($browser) {
19057
- return createHttpBackend($browser);
19058
- },
19059
- ];
19055
+ /**
19056
+ * HTTP backend used by the {@link ng.$http service} that delegates to
19057
+ * XMLHttpRequest object and deals with browser incompatibilities.
19058
+ *
19059
+ * You should never need to use this service directly, instead use the higher-level abstractions:
19060
+ * {@link ng.$http $http}.
19061
+ *
19062
+ */
19063
+ class HttpBackendProvider {
19064
+ constructor() {
19065
+ this.$get = [
19066
+ "$browser",
19067
+ /**
19068
+ * @param {import('../browser.js').Browser} $browser
19069
+ * @returns
19070
+ */
19071
+ function ($browser) {
19072
+ return createHttpBackend($browser);
19073
+ },
19074
+ ];
19075
+ }
19060
19076
  }
19061
19077
 
19062
19078
  /**
@@ -20190,57 +20206,27 @@ function urlsEqual(a, b) {
20190
20206
  return a === b || urlResolve(a).href === urlResolve(b).href;
20191
20207
  }
20192
20208
 
20193
- ///////////////////////////////////////////////////////////////////////////
20194
- // LogService
20195
- // see http://docs.angularjs.org/api/ng/service/$log
20196
- // see http://docs.angularjs.org/api/ng/provider/$logProvider
20197
- ///////////////////////////////////////////////////////////////////////////
20198
-
20199
20209
  /**
20200
- * @typedef {(...args: any[]) => void} LogCall
20201
- */
20202
-
20203
- /**
20204
- * @typedef {Object} LogService
20205
- * @property {LogCall} debug - Log a debug messages
20206
- * @property {LogCall} error - Log a error message
20207
- * @property {LogCall} info - Log a info message
20208
- * @property {LogCall} log - Log a general message
20209
- * @property {LogCall} warn - Log a warning message
20210
- */
20211
-
20212
- /**
20213
- * @type {LogService}
20214
- */
20215
- let LogService = {
20216
- debug: undefined,
20217
- error: undefined,
20218
- info: undefined,
20219
- log: undefined,
20220
- warn: undefined,
20221
- };
20222
-
20223
- /**
20224
- * @type {LogProvider}
20225
- * Use the `$logProvider` to configure how the application logs messages
20210
+ * Configuration provider for `$log` service
20226
20211
  */
20227
20212
  class LogProvider {
20213
+ /** @private */
20228
20214
  constructor() {
20229
- this.debug = true;
20215
+ /** @type {boolean} */
20216
+ this.debug = false;
20217
+ /** @private @type {import("./interface.ts").LogServiceFactory | null} */
20218
+ this._override = null;
20230
20219
  }
20231
20220
 
20232
20221
  /**
20233
- * @param {boolean=} flag enable or disable debug level messages
20234
- * @returns {*} current value if used as getter or itself (chaining) if used as setter
20222
+ * Override the default {@link LogService} implemenation
20223
+ * @param {import("./interface.ts").LogServiceFactory} fn
20235
20224
  */
20236
- debugEnabled(flag) {
20237
- if (typeof flag !== "undefined") {
20238
- this.debug = flag;
20239
- return this;
20240
- }
20241
- return this.debug;
20225
+ setLogger(fn) {
20226
+ this._override = fn;
20242
20227
  }
20243
20228
 
20229
+ /** @private */
20244
20230
  formatError(arg) {
20245
20231
  if (isError(arg)) {
20246
20232
  if (arg.stack) {
@@ -20255,6 +20241,10 @@ class LogProvider {
20255
20241
  return arg;
20256
20242
  }
20257
20243
 
20244
+ /**
20245
+ * @private
20246
+ * @param {string} type
20247
+ */
20258
20248
  consoleLog(type) {
20259
20249
  const console = window.console || {};
20260
20250
  const logFn = console[type] || console.log || (() => {});
@@ -20265,8 +20255,14 @@ class LogProvider {
20265
20255
  };
20266
20256
  }
20267
20257
 
20258
+ /**
20259
+ * @returns {import("./interface.ts").LogService}
20260
+ */
20268
20261
  $get() {
20269
- LogService = {
20262
+ if (this._override) {
20263
+ return this._override();
20264
+ }
20265
+ return {
20270
20266
  log: this.consoleLog("log"),
20271
20267
  info: this.consoleLog("info"),
20272
20268
  warn: this.consoleLog("warn"),
@@ -20280,7 +20276,6 @@ class LogProvider {
20280
20276
  };
20281
20277
  })(),
20282
20278
  };
20283
- return LogService;
20284
20279
  }
20285
20280
  }
20286
20281
 
@@ -21535,7 +21530,7 @@ class TaskTrackerFactoryProvider {
21535
21530
  /**
21536
21531
  * Creates a new `TaskTracker` instance.
21537
21532
  *
21538
- * @param {import('../services/log.js').LogService} log - The logging service.
21533
+ * @param {import('../services/log/interface.ts').LogService} log - The logging service.
21539
21534
  * @returns {TaskTracker} A new `TaskTracker` instance.
21540
21535
  */
21541
21536
  (log) => new TaskTracker(log),
@@ -21550,7 +21545,7 @@ class TaskTrackerFactoryProvider {
21550
21545
  */
21551
21546
  class TaskTracker {
21552
21547
  /**
21553
- * @param {import('../services/log.js').LogService} log - The logging service.
21548
+ * @param {import('../services/log/interface.ts').LogService} log - The logging service.
21554
21549
  */
21555
21550
  constructor(log) {
21556
21551
  /** @private */
@@ -21728,8 +21723,8 @@ function TemplateRequestProvider() {
21728
21723
  /**
21729
21724
  *
21730
21725
  * @param {import('../core/exception-handler.js').ErrorHandler} $exceptionHandler
21731
- * @param {import('../core/cache/cache-factory.js').TemplateCache} $templateCache
21732
- * @param {*} $http
21726
+ * @param {import('../services/template-cache/interface.ts').TemplateCache} $templateCache
21727
+ * @param {import("interface.ts").HttpService} $http
21733
21728
  * @param {*} $sce
21734
21729
  * @returns
21735
21730
  */
@@ -27660,12 +27655,15 @@ const isShorthand = (cfg) =>
27660
27655
  Object.prototype.hasOwnProperty.bind(cfg || {}),
27661
27656
  ).length === 0;
27662
27657
 
27663
- let DefType;
27664
- (function (DefType) {
27665
- DefType[(DefType["PATH"] = 0)] = "PATH";
27666
- DefType[(DefType["SEARCH"] = 1)] = "SEARCH";
27667
- DefType[(DefType["CONFIG"] = 2)] = "CONFIG";
27668
- })(DefType || (DefType = {}));
27658
+ /**
27659
+ * @private
27660
+ * @enum {number}
27661
+ */
27662
+ const DefType = {
27663
+ PATH: 0,
27664
+ SEARCH: 1,
27665
+ CONFIG: 2,
27666
+ };
27669
27667
 
27670
27668
  function getParamDeclaration(paramName, location, state) {
27671
27669
  const noReloadOnSearch =
@@ -27678,6 +27676,7 @@ function getParamDeclaration(paramName, location, state) {
27678
27676
  );
27679
27677
  return Object.assign(defaultConfig, paramConfig);
27680
27678
  }
27679
+
27681
27680
  function unwrapShorthand(cfg) {
27682
27681
  cfg = isShorthand(cfg) ? { value: cfg } : cfg;
27683
27682
  getStaticDefaultValue["__cacheable"] = true;
@@ -27687,6 +27686,7 @@ function unwrapShorthand(cfg) {
27687
27686
  const $$fn = isInjectable(cfg.value) ? cfg.value : getStaticDefaultValue;
27688
27687
  return Object.assign(cfg, { $$fn });
27689
27688
  }
27689
+
27690
27690
  function getType(cfg, urlType, location, id, paramTypes) {
27691
27691
  if (cfg.type && urlType && urlType.name !== "string")
27692
27692
  throw new Error(`Param '${id}' has two type configurations.`);
@@ -27711,6 +27711,7 @@ function getType(cfg, urlType, location, id, paramTypes) {
27711
27711
  }
27712
27712
  return cfg.type instanceof ParamType ? cfg.type : paramTypes.type(cfg.type);
27713
27713
  }
27714
+
27714
27715
  /** returns false, true, or the squash value to indicate the "default parameter url squash policy". */
27715
27716
  function getSquashPolicy(config, isOptional, defaultPolicy) {
27716
27717
  const squash = config.squash;
@@ -27721,6 +27722,7 @@ function getSquashPolicy(config, isOptional, defaultPolicy) {
27721
27722
  `Invalid squash policy: '${squash}'. Valid policies: false, true, or arbitrary string`,
27722
27723
  );
27723
27724
  }
27725
+
27724
27726
  function getReplace(config, arrayMode, isOptional, squash) {
27725
27727
  const defaultPolicy = [
27726
27728
  { from: "", to: isOptional || arrayMode ? undefined : "" },
@@ -27734,7 +27736,16 @@ function getReplace(config, arrayMode, isOptional, squash) {
27734
27736
  (item) => configuredKeys.indexOf(item.from) === -1,
27735
27737
  ).concat(replace);
27736
27738
  }
27739
+
27737
27740
  class Param {
27741
+ /**
27742
+ *
27743
+ * @param {*} id
27744
+ * @param {*} type
27745
+ * @param {DefType} location
27746
+ * @param {import("../url/url-config.js").UrlConfigProvider} urlConfig
27747
+ * @param {*} state
27748
+ */
27738
27749
  constructor(id, type, location, urlConfig, state) {
27739
27750
  const config = getParamDeclaration(id, location, state);
27740
27751
  type = getType(config, type, location, id, urlConfig.paramTypes);
@@ -28951,9 +28962,10 @@ class Rejection {
28951
28962
 
28952
28963
  /**
28953
28964
  * Configurable provider for an injectable event bus
28954
- * @implements {ServiceProvider}
28965
+ * @extends {ServiceProvider}
28955
28966
  */
28956
28967
  class PubSubProvider {
28968
+ /** @private */
28957
28969
  constructor() {
28958
28970
  /**
28959
28971
  * @type {PubSub}
@@ -29017,7 +29029,7 @@ class PubSub {
29017
29029
  * representation minimizes the number of object allocations and has been
29018
29030
  * shown to be faster than an array of objects with three key-value pairs or
29019
29031
  * three parallel arrays, especially on IE.) Once a subscription is removed
29020
- * via {@link #unsubscribe} or {@link #unsubscribeByKey}, the three
29032
+ * via {@link unsubscribe} or {@link unsubscribeByKey}, the three
29021
29033
  * corresponding array elements are deleted, and never reused. This means the
29022
29034
  * total number of subscriptions during the lifetime of the pubsub channel is
29023
29035
  * limited by the maximum length of a JavaScript array to (2^32 - 1) / 3 =
@@ -29047,7 +29059,7 @@ class PubSub {
29047
29059
  * is specified. Subscribing the same function to the same topic multiple
29048
29060
  * times will result in multiple function invocations while publishing.
29049
29061
  * Returns a subscription key that can be used to unsubscribe the function from
29050
- * the topic via {@link #unsubscribeByKey}.
29062
+ * the topic via {@link unsubscribeByKey}.
29051
29063
  *
29052
29064
  * @param {string} topic Topic to subscribe to.
29053
29065
  * @param {Function} fn Function to be invoked when a message is published to
@@ -29082,7 +29094,7 @@ class PubSub {
29082
29094
  * method on the given `opt_context` object, or in the global scope if
29083
29095
  * no context is specified, and is then unsubscribed. Returns a subscription
29084
29096
  * key that can be used to unsubscribe the function from the topic via
29085
- * {@link #unsubscribeByKey}.
29097
+ * {@link unsubscribeByKey}.
29086
29098
  *
29087
29099
  * @param {string} topic Topic to subscribe to.
29088
29100
  * @param {Function} fn Function to be invoked once and then unsubscribed when
@@ -29155,7 +29167,7 @@ class PubSub {
29155
29167
  }
29156
29168
 
29157
29169
  /**
29158
- * Removes a subscription based on the key returned by {@link #subscribe}.
29170
+ * Removes a subscription based on the key returned by {@link subscribe}.
29159
29171
  * No-op if no matching subscription is found. Returns a Boolean indicating
29160
29172
  * whether a subscription was removed.
29161
29173
  *
@@ -32061,8 +32073,8 @@ class TemplateFactoryProvider {
32061
32073
  "$templateRequest",
32062
32074
  "$injector",
32063
32075
  /**
32064
- * @param {any} $http
32065
- * @param {import("../core/cache/cache-factory.js").TemplateCache} $templateCache
32076
+ * @param {import("interface.ts").HttpService} $http
32077
+ * @param {import("../services/template-cache/interface.ts").TemplateCache} $templateCache
32066
32078
  * @param {any} $templateRequest
32067
32079
  * @param {import("../core/di/internal-injector.js").InjectorService} $injector
32068
32080
  * @returns
@@ -32161,7 +32173,7 @@ class TemplateFactoryProvider {
32161
32173
  if (url == null) return null;
32162
32174
  if (this._useHttp) {
32163
32175
  return this.$http
32164
- .get(url, {
32176
+ .get(/** @type {string} */ (url), {
32165
32177
  cache: this.$templateCache,
32166
32178
  headers: { Accept: "text/html" },
32167
32179
  })
@@ -33473,7 +33485,13 @@ class UrlRules {
33473
33485
  }
33474
33486
 
33475
33487
  class ParamFactory {
33488
+ /**
33489
+ * @param {import("../url/url-config.js").UrlConfigProvider} urlServiceConfig
33490
+ */
33476
33491
  constructor(urlServiceConfig) {
33492
+ /**
33493
+ * @type {import("../url/url-config.js").UrlConfigProvider}
33494
+ */
33477
33495
  this.urlServiceConfig = urlServiceConfig;
33478
33496
  }
33479
33497
 
@@ -33527,7 +33545,7 @@ class UrlService {
33527
33545
  * The nested [[UrlConfig]] API to configure the URL and retrieve URL information
33528
33546
  *
33529
33547
  * See: [[UrlConfig]] for details
33530
- * @type {import("./url-config").UrlConfigProvider}
33548
+ * @type {import("./url-config.js").UrlConfigProvider}
33531
33549
  */
33532
33550
  this.config = urlConfigProvider;
33533
33551
 
@@ -34042,6 +34060,9 @@ function getNavigableBuilder(isRoot) {
34042
34060
  };
34043
34061
  }
34044
34062
 
34063
+ /**
34064
+ * @param {import("../params/param-factory.js").ParamFactory} paramFactory
34065
+ */
34045
34066
  function getParamsBuilder(paramFactory) {
34046
34067
  return function (state) {
34047
34068
  const makeConfigParam = (_config, id) =>
@@ -35555,38 +35576,22 @@ function registerControllerCallbacks(
35555
35576
 
35556
35577
  ngChannelDirective.$inject = [$injectTokens.$eventBus];
35557
35578
  /**
35558
- * Dynamically updates an element's content based on events published on a specified channel.
35559
- * If data is sent via `$eventBus` on the specified `ngChannel`, the directive attempts to update the element's content accordingly,
35560
- * either by directly setting the inner HTML or merging the scope's data if the element contains a template.
35561
- *
35562
- * If the element has a template and incoming data is an object, the directive will merge all key/value pairs onto the scope,
35563
- * allowing Angular expressions (`{{ yourModel }}`) to be evaluated and rendered.
35564
- *
35565
- * When the scope is destroyed, the directive automatically unsubscribes from the channel.
35566
- * Example:
35567
- *
35568
- * HTML:
35569
- * <div ng-channel="userChannel">Hello {{ user.firstName }} {{ user.lastName }}</div>
35570
- *
35571
- * JavaScript:
35572
- * angular.$eventBus.publish('userChannel', { user: { firstName: 'John', lastName: 'Smith' } });
35573
- *
35574
- * @param {import("../../core/pubsub/pubsub.js").PubSub} $eventBus
35579
+ * @param {import("../../services/pubsub/pubsub.js").PubSub} $eventBus
35575
35580
  * @returns {import("../../interface.ts").Directive}
35576
35581
  */
35577
35582
  function ngChannelDirective($eventBus) {
35578
35583
  return {
35579
35584
  link: (scope, element, attrs) => {
35580
- const hasTemplate = element.childNodes.length > 0;
35581
35585
  const channel = attrs["ngChannel"];
35586
+ const hasTemplateContent = element.childNodes.length > 0;
35582
35587
 
35583
- const key = $eventBus.subscribe(channel, (val) => {
35584
- if (!hasTemplate) {
35585
- element.innerHTML = val;
35586
- } else {
35587
- if (isObject(val)) {
35588
- scope.$merge(val);
35588
+ const key = $eventBus.subscribe(channel, (value) => {
35589
+ if (hasTemplateContent) {
35590
+ if (isObject(value)) {
35591
+ scope.$merge(value);
35589
35592
  }
35593
+ } else {
35594
+ element.innerHTML = value;
35590
35595
  }
35591
35596
  });
35592
35597
 
@@ -35600,7 +35605,7 @@ function ngChannelDirective($eventBus) {
35600
35605
  ngSetterDirective.$inject = ["$parse", "$log"];
35601
35606
  /**
35602
35607
  * @param {import('../../core/parse/interface.ts').ParseService} $parse
35603
- * @param {import('../../services/log.js').LogService} $log
35608
+ * @param {import('../../services/log/interface.ts').LogService} $log
35604
35609
  * @returns {import('../../interface.ts').Directive}
35605
35610
  */
35606
35611
  function ngSetterDirective($parse, $log) {
@@ -35675,6 +35680,10 @@ const ngDeleteDirective = defineDirective("delete");
35675
35680
  const ngPostDirective = defineDirective("post");
35676
35681
  const ngPutDirective = defineDirective("put");
35677
35682
 
35683
+ /**
35684
+ * @typedef {"click" | "change" | "submit"} EventType
35685
+ */
35686
+
35678
35687
  /**
35679
35688
  * Selects DOM event to listen for based on the element type.
35680
35689
  *
@@ -35783,9 +35792,9 @@ function handleSwapResponse(html, swap, target, scope, $compile) {
35783
35792
  */
35784
35793
  function createHttpDirective(method, attrName) {
35785
35794
  /**
35786
- * @param {{ [key: string]: Function }} $http
35795
+ * @param {import("interface.ts").HttpService} $http
35787
35796
  * @param {import("../../core/compile/compile.js").CompileFn} $compile
35788
- * @param {import("../../services/log.js").LogService} $log
35797
+ * @param {import("../../services/log/interface.ts").LogService} $log
35789
35798
  * @returns {import('../../interface.ts').Directive}
35790
35799
  */
35791
35800
  return function ($http, $compile, $log) {
@@ -36074,18 +36083,15 @@ const modules = {};
36074
36083
 
36075
36084
  class Angular {
36076
36085
  constructor() {
36077
- Cache.clear(); // a ensure new instance of angular gets a clean cache
36078
-
36079
- /** @type {Map<number, import("./core/cache/cache.js").ExpandoStore>} */
36080
36086
  this.$cache = Cache;
36081
36087
 
36082
- /** @type {import('./core/pubsub/pubsub.js').PubSub} */
36088
+ /** @type {import('./services/pubsub/pubsub.js').PubSub} */
36083
36089
  this.$eventBus = EventBus;
36084
36090
 
36085
36091
  /**
36086
36092
  * @type {string} `version` from `package.json`
36087
36093
  */
36088
- this.version = "0.7.3"; //inserted via rollup plugin
36094
+ this.version = "0.7.4"; //inserted via rollup plugin
36089
36095
 
36090
36096
  /** @type {!Array<string|any>} */
36091
36097
  this.bootsrappedModules = [];