angular-toolbox 0.0.8 → 0.9.0

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 (231) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +14 -10
  3. package/{esm2020 → esm2022}/angular-toolbox.mjs +4 -4
  4. package/esm2022/lib/angular-toolbox.module.mjs +21 -0
  5. package/esm2022/lib/core/bridge/app-bridge.mjs +76 -0
  6. package/esm2022/lib/core/error/app-bridge-error.mjs +24 -0
  7. package/esm2022/lib/core/error/http-mock-service-error.mjs +26 -0
  8. package/esm2022/lib/core/error/index.mjs +5 -0
  9. package/esm2022/lib/core/error/integrity-error.mjs +26 -0
  10. package/esm2022/lib/core/error/subscription-error.mjs +26 -0
  11. package/esm2022/lib/core/impl/index.mjs +2 -0
  12. package/esm2022/lib/core/impl/lang/identifiable-component.mjs +31 -0
  13. package/esm2022/lib/core/impl/lang/index.mjs +2 -0
  14. package/esm2022/lib/core/impl/version/version.impl.mjs +34 -0
  15. package/esm2022/lib/core/index.mjs +3 -0
  16. package/esm2022/lib/directive/anchor-link.directive.mjs +62 -0
  17. package/esm2022/lib/directive/button-role.directive.mjs +102 -0
  18. package/esm2022/lib/directive/content-renderer.directive.mjs +61 -0
  19. package/esm2022/lib/directive/index.mjs +5 -0
  20. package/esm2022/lib/directive/navigate-to-url.directive.mjs +51 -0
  21. package/esm2022/lib/directive/navigation-directive-base.mjs +23 -0
  22. package/esm2022/lib/framework/index.mjs +2 -0
  23. package/esm2022/lib/framework/mock/http/config/http-mock-parameters.mjs +9 -0
  24. package/esm2022/lib/framework/mock/http/config/http-mock.decorator.mjs +48 -0
  25. package/esm2022/lib/framework/mock/http/config/index.mjs +3 -0
  26. package/esm2022/lib/framework/mock/http/config/route-mock-config.mjs +9 -0
  27. package/esm2022/lib/framework/mock/http/core/data-storage.mjs +9 -0
  28. package/esm2022/lib/framework/mock/http/event/event-target.impl.mjs +122 -0
  29. package/esm2022/lib/framework/mock/http/event/progress-event-mock.mjs +48 -0
  30. package/esm2022/lib/framework/mock/http/index.mjs +4 -0
  31. package/esm2022/lib/framework/mock/http/path-to-regexp/constants.mjs +111 -0
  32. package/esm2022/lib/framework/mock/http/path-to-regexp/escape-to-regexp-string.mjs +34 -0
  33. package/esm2022/lib/framework/mock/http/path-to-regexp/get-flags.mjs +28 -0
  34. package/esm2022/lib/framework/mock/http/path-to-regexp/iter.mjs +76 -0
  35. package/esm2022/lib/framework/mock/http/path-to-regexp/lexer.mjs +96 -0
  36. package/esm2022/lib/framework/mock/http/path-to-regexp/loose-replacer.mjs +28 -0
  37. package/esm2022/lib/framework/mock/http/path-to-regexp/model/decode-key-to-string.mjs +17 -0
  38. package/esm2022/lib/framework/mock/http/path-to-regexp/model/encode.mjs +17 -0
  39. package/esm2022/lib/framework/mock/http/path-to-regexp/model/key.mjs +17 -0
  40. package/esm2022/lib/framework/mock/http/path-to-regexp/model/lex-token.mjs +17 -0
  41. package/esm2022/lib/framework/mock/http/path-to-regexp/model/lexer-type.mjs +17 -0
  42. package/esm2022/lib/framework/mock/http/path-to-regexp/model/loose-replacer-provider.mjs +17 -0
  43. package/esm2022/lib/framework/mock/http/path-to-regexp/model/non-delimiter-encoder-provider.mjs +17 -0
  44. package/esm2022/lib/framework/mock/http/path-to-regexp/model/parse-options.mjs +17 -0
  45. package/esm2022/lib/framework/mock/http/path-to-regexp/model/path-to-regexp-options.mjs +17 -0
  46. package/esm2022/lib/framework/mock/http/path-to-regexp/model/route-string-tokenizer.mjs +17 -0
  47. package/esm2022/lib/framework/mock/http/path-to-regexp/model/simple-tokens.mjs +30 -0
  48. package/esm2022/lib/framework/mock/http/path-to-regexp/model/token-data-regexp-factory.mjs +17 -0
  49. package/esm2022/lib/framework/mock/http/path-to-regexp/model/token-type.mjs +17 -0
  50. package/esm2022/lib/framework/mock/http/path-to-regexp/model/token.mjs +17 -0
  51. package/esm2022/lib/framework/mock/http/path-to-regexp/string-to-token-data.mjs +87 -0
  52. package/esm2022/lib/framework/mock/http/path-to-regexp/to-key-regexp.mjs +41 -0
  53. package/esm2022/lib/framework/mock/http/path-to-regexp/to-stringify.mjs +29 -0
  54. package/esm2022/lib/framework/mock/http/path-to-regexp/token-data-to-regexp.mjs +49 -0
  55. package/esm2022/lib/framework/mock/http/path-to-regexp/token-data.mjs +33 -0
  56. package/esm2022/lib/framework/mock/http/util/data-storage.builder.mjs +35 -0
  57. package/esm2022/lib/framework/mock/http/util/http-headers-mock.builder.mjs +138 -0
  58. package/esm2022/lib/framework/mock/http/util/http-headers.util.mjs +56 -0
  59. package/esm2022/lib/framework/mock/http/util/http-method-ref.enum.mjs +60 -0
  60. package/esm2022/lib/framework/mock/http/util/http-mock-response.builder.mjs +117 -0
  61. package/esm2022/lib/framework/mock/http/util/index.mjs +3 -0
  62. package/esm2022/lib/framework/mock/http/xhr/delegate-xhr.mjs +316 -0
  63. package/esm2022/lib/framework/mock/http/xhr/http-mock-factory.impl.mjs +29 -0
  64. package/esm2022/lib/framework/mock/http/xhr/http-mock-factory.mjs +19 -0
  65. package/esm2022/lib/framework/mock/http/xhr/index.mjs +2 -0
  66. package/esm2022/lib/framework/mock/http/xhr/xhr-base.mjs +123 -0
  67. package/esm2022/lib/framework/mock/http/xhr/xhr-proxy-impl.mjs +177 -0
  68. package/esm2022/lib/model/business/index.mjs +5 -0
  69. package/esm2022/lib/model/business/lang/app-bridge-command.mjs +9 -0
  70. package/esm2022/lib/model/business/lang/destroyable.mjs +9 -0
  71. package/esm2022/lib/model/business/lang/identifiable.mjs +9 -0
  72. package/esm2022/lib/model/business/lang/index.mjs +5 -0
  73. package/esm2022/lib/model/business/lang/instantiable.mjs +9 -0
  74. package/esm2022/lib/model/business/mock/http/http-method-mock.mjs +9 -0
  75. package/esm2022/lib/model/business/mock/http/http-mock-config.mjs +9 -0
  76. package/esm2022/lib/model/business/mock/http/http-mock-endpoint.mjs +9 -0
  77. package/esm2022/lib/model/business/mock/http/http-mock-error.mjs +9 -0
  78. package/esm2022/lib/model/business/mock/http/http-mock-interceptor.mjs +9 -0
  79. package/esm2022/lib/model/business/mock/http/http-response-mock.mjs +9 -0
  80. package/esm2022/lib/model/business/mock/http/index.mjs +8 -0
  81. package/esm2022/lib/model/business/mock/http/xhr-proxy.mjs +9 -0
  82. package/esm2022/lib/model/business/ui/dark-mode-config.mjs +9 -0
  83. package/esm2022/lib/model/business/ui/dark-mode-config.provider.mjs +43 -0
  84. package/esm2022/lib/model/business/ui/dark-mode.constant.mjs +16 -0
  85. package/esm2022/lib/model/business/ui/index.mjs +5 -0
  86. package/esm2022/lib/model/business/ui/scroll-behavior.type.mjs +9 -0
  87. package/esm2022/lib/model/business/version/index.mjs +4 -0
  88. package/esm2022/lib/model/business/version/version-config.mjs +9 -0
  89. package/esm2022/lib/model/business/version/version-config.provider.mjs +40 -0
  90. package/esm2022/lib/model/business/version/version.mjs +10 -0
  91. package/esm2022/lib/model/index.mjs +3 -0
  92. package/esm2022/lib/model/service/index.mjs +5 -0
  93. package/esm2022/lib/model/service/mock/http/http-mock.service.mjs +239 -0
  94. package/esm2022/lib/model/service/subscription/subscription.service.mjs +122 -0
  95. package/esm2022/lib/model/service/ui/app-bridge.service.mjs +142 -0
  96. package/esm2022/lib/model/service/ui/dark-mode.service.mjs +183 -0
  97. package/esm2022/lib/model/service/ui/index.mjs +4 -0
  98. package/esm2022/lib/model/service/ui/scroll.service.mjs +93 -0
  99. package/esm2022/lib/model/service/version/version.service.mjs +51 -0
  100. package/{esm2020 → esm2022}/lib/pipe/index.mjs +1 -1
  101. package/esm2022/lib/pipe/safe/safe-html.pipe.mjs +34 -0
  102. package/esm2022/lib/util/aria-role.constant.mjs +16 -0
  103. package/esm2022/lib/util/default-scroll-behavior.mjs +13 -0
  104. package/esm2022/lib/util/empty-string.const.mjs +12 -0
  105. package/esm2022/lib/util/index.mjs +5 -0
  106. package/esm2022/lib/util/js-type.mjs +40 -0
  107. package/esm2022/lib/util/uuid.mjs +126 -0
  108. package/esm2022/public-api.mjs +18 -0
  109. package/fesm2022/angular-toolbox.mjs +3710 -0
  110. package/fesm2022/angular-toolbox.mjs.map +1 -0
  111. package/index.d.ts +5 -5
  112. package/lib/angular-toolbox.module.d.ts +9 -7
  113. package/lib/core/bridge/app-bridge.d.ts +59 -0
  114. package/lib/core/error/app-bridge-error.d.ts +16 -0
  115. package/lib/core/error/http-mock-service-error.d.ts +18 -0
  116. package/lib/core/error/index.d.ts +4 -0
  117. package/lib/core/error/integrity-error.d.ts +18 -0
  118. package/lib/core/error/subscription-error.d.ts +18 -0
  119. package/lib/core/impl/index.d.ts +1 -0
  120. package/lib/core/impl/lang/identifiable-component.d.ts +26 -0
  121. package/lib/core/impl/lang/index.d.ts +1 -0
  122. package/lib/core/impl/version/version.impl.d.ts +42 -0
  123. package/lib/core/index.d.ts +2 -0
  124. package/lib/directive/anchor-link.directive.d.ts +29 -0
  125. package/lib/directive/button-role.directive.d.ts +52 -0
  126. package/lib/directive/content-renderer.directive.d.ts +39 -0
  127. package/lib/directive/index.d.ts +4 -0
  128. package/lib/directive/navigate-to-url.directive.d.ts +23 -0
  129. package/lib/directive/navigation-directive-base.d.ts +19 -0
  130. package/lib/framework/index.d.ts +1 -0
  131. package/lib/framework/mock/http/config/http-mock-parameters.d.ts +13 -0
  132. package/lib/framework/mock/http/config/http-mock.decorator.d.ts +13 -0
  133. package/lib/framework/mock/http/config/index.d.ts +2 -0
  134. package/lib/framework/mock/http/config/route-mock-config.d.ts +30 -0
  135. package/lib/framework/mock/http/core/data-storage.d.ts +38 -0
  136. package/lib/framework/mock/http/event/event-target.impl.d.ts +70 -0
  137. package/lib/framework/mock/http/event/progress-event-mock.d.ts +36 -0
  138. package/lib/framework/mock/http/index.d.ts +3 -0
  139. package/lib/framework/mock/http/path-to-regexp/constants.d.ts +111 -0
  140. package/lib/framework/mock/http/path-to-regexp/escape-to-regexp-string.d.ts +24 -0
  141. package/lib/framework/mock/http/path-to-regexp/get-flags.d.ts +25 -0
  142. package/lib/framework/mock/http/path-to-regexp/iter.d.ts +50 -0
  143. package/lib/framework/mock/http/path-to-regexp/lexer.d.ts +24 -0
  144. package/lib/framework/mock/http/path-to-regexp/loose-replacer.d.ts +25 -0
  145. package/lib/framework/mock/http/path-to-regexp/model/decode-key-to-string.d.ts +21 -0
  146. package/lib/framework/mock/http/path-to-regexp/model/encode.d.ts +20 -0
  147. package/lib/framework/mock/http/path-to-regexp/model/key.d.ts +45 -0
  148. package/lib/framework/mock/http/path-to-regexp/model/lex-token.d.ts +34 -0
  149. package/lib/framework/mock/http/path-to-regexp/model/lexer-type.d.ts +21 -0
  150. package/lib/framework/mock/http/path-to-regexp/model/loose-replacer-provider.d.ts +20 -0
  151. package/lib/framework/mock/http/path-to-regexp/model/non-delimiter-encoder-provider.d.ts +21 -0
  152. package/lib/framework/mock/http/path-to-regexp/model/parse-options.d.ts +33 -0
  153. package/lib/framework/mock/http/path-to-regexp/model/path-to-regexp-options.d.ts +52 -0
  154. package/lib/framework/mock/http/path-to-regexp/model/route-string-tokenizer.d.ts +22 -0
  155. package/lib/framework/mock/http/path-to-regexp/model/simple-tokens.d.ts +21 -0
  156. package/lib/framework/mock/http/path-to-regexp/model/token-data-regexp-factory.d.ts +23 -0
  157. package/lib/framework/mock/http/path-to-regexp/model/token-type.d.ts +20 -0
  158. package/lib/framework/mock/http/path-to-regexp/model/token.d.ts +21 -0
  159. package/lib/framework/mock/http/path-to-regexp/string-to-token-data.d.ts +21 -0
  160. package/lib/framework/mock/http/path-to-regexp/to-key-regexp.d.ts +22 -0
  161. package/lib/framework/mock/http/path-to-regexp/to-stringify.d.ts +21 -0
  162. package/lib/framework/mock/http/path-to-regexp/token-data-to-regexp.d.ts +21 -0
  163. package/lib/framework/mock/http/path-to-regexp/token-data.d.ts +32 -0
  164. package/lib/framework/mock/http/util/data-storage.builder.d.ts +25 -0
  165. package/lib/framework/mock/http/util/http-headers-mock.builder.d.ts +106 -0
  166. package/lib/framework/mock/http/util/http-headers.util.d.ts +31 -0
  167. package/lib/framework/mock/http/util/http-method-ref.enum.d.ts +58 -0
  168. package/lib/framework/mock/http/util/http-mock-response.builder.d.ts +83 -0
  169. package/lib/framework/mock/http/util/index.d.ts +2 -0
  170. package/lib/framework/mock/http/xhr/delegate-xhr.d.ts +199 -0
  171. package/lib/framework/mock/http/xhr/http-mock-factory.d.ts +14 -0
  172. package/lib/framework/mock/http/xhr/http-mock-factory.impl.d.ts +24 -0
  173. package/lib/framework/mock/http/xhr/index.d.ts +1 -0
  174. package/lib/framework/mock/http/xhr/xhr-base.d.ts +123 -0
  175. package/lib/framework/mock/http/xhr/xhr-proxy-impl.d.ts +125 -0
  176. package/lib/model/business/index.d.ts +4 -0
  177. package/lib/model/business/lang/app-bridge-command.d.ts +11 -0
  178. package/lib/model/business/lang/destroyable.d.ts +16 -0
  179. package/lib/model/business/lang/identifiable.d.ts +19 -0
  180. package/lib/model/business/lang/index.d.ts +4 -0
  181. package/lib/model/business/lang/instantiable.d.ts +15 -0
  182. package/lib/model/business/mock/http/http-method-mock.d.ts +35 -0
  183. package/lib/model/business/mock/http/http-mock-config.d.ts +28 -0
  184. package/lib/model/business/mock/http/http-mock-endpoint.d.ts +41 -0
  185. package/lib/model/business/mock/http/http-mock-error.d.ts +21 -0
  186. package/lib/model/business/mock/http/http-mock-interceptor.d.ts +27 -0
  187. package/lib/model/business/mock/http/http-response-mock.d.ts +44 -0
  188. package/lib/model/business/mock/http/index.d.ts +7 -0
  189. package/lib/model/business/mock/http/xhr-proxy.d.ts +15 -0
  190. package/lib/model/business/ui/dark-mode-config.d.ts +29 -0
  191. package/lib/model/business/ui/dark-mode-config.provider.d.ts +21 -0
  192. package/lib/model/business/ui/dark-mode.constant.d.ts +15 -0
  193. package/lib/model/business/ui/index.d.ts +4 -0
  194. package/lib/model/business/ui/scroll-behavior.type.d.ts +11 -0
  195. package/lib/model/business/version/index.d.ts +3 -0
  196. package/lib/model/business/version/version-config.d.ts +28 -0
  197. package/lib/model/business/version/version-config.provider.d.ts +22 -0
  198. package/lib/model/business/version/version.d.ts +34 -0
  199. package/lib/model/index.d.ts +2 -0
  200. package/lib/model/service/index.d.ts +4 -0
  201. package/lib/model/service/mock/http/http-mock.service.d.ts +101 -0
  202. package/lib/model/service/subscription/subscription.service.d.ts +66 -0
  203. package/lib/model/service/ui/app-bridge.service.d.ts +80 -0
  204. package/lib/model/service/ui/dark-mode.service.d.ts +99 -0
  205. package/lib/model/service/ui/index.d.ts +3 -0
  206. package/lib/{service → model/service}/ui/scroll.service.d.ts +55 -52
  207. package/lib/model/service/version/version.service.d.ts +30 -0
  208. package/lib/pipe/index.d.ts +1 -1
  209. package/lib/pipe/safe/safe-html.pipe.d.ts +30 -10
  210. package/lib/util/aria-role.constant.d.ts +15 -0
  211. package/lib/util/default-scroll-behavior.d.ts +12 -0
  212. package/lib/util/empty-string.const.d.ts +11 -0
  213. package/lib/util/index.d.ts +4 -0
  214. package/lib/util/js-type.d.ts +39 -0
  215. package/lib/util/uuid.d.ts +89 -0
  216. package/package.json +10 -13
  217. package/public-api.d.ts +14 -3
  218. package/esm2020/lib/angular-toolbox.module.mjs +0 -26
  219. package/esm2020/lib/pipe/safe/safe-html.pipe.mjs +0 -18
  220. package/esm2020/lib/service/index.mjs +0 -4
  221. package/esm2020/lib/service/subscription/subscription.service.mjs +0 -60
  222. package/esm2020/lib/service/ui/dark-mode.service.mjs +0 -167
  223. package/esm2020/lib/service/ui/scroll.service.mjs +0 -79
  224. package/esm2020/public-api.mjs +0 -7
  225. package/fesm2015/angular-toolbox.mjs +0 -356
  226. package/fesm2015/angular-toolbox.mjs.map +0 -1
  227. package/fesm2020/angular-toolbox.mjs +0 -350
  228. package/fesm2020/angular-toolbox.mjs.map +0 -1
  229. package/lib/service/index.d.ts +0 -3
  230. package/lib/service/subscription/subscription.service.d.ts +0 -33
  231. package/lib/service/ui/dark-mode.service.d.ts +0 -92
@@ -0,0 +1,59 @@
1
+ /**
2
+ * @license
3
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be ound in
6
+ * fthe LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
+ */
8
+ import { AppBridgeCommand } from "../../model/business/lang/app-bridge-command";
9
+ /**
10
+ * @private
11
+ * The `AppBridge` class is an internal invoker utility that executes commans declared
12
+ * by the `AppBridgeService` instance.
13
+ */
14
+ export declare class AppBridge {
15
+ /**
16
+ * @private
17
+ * Stores all commands registered by the `AppBridgeService` instance.
18
+ */
19
+ private readonly _commandMap;
20
+ /**
21
+ * Executes the command with the specified `name` parameter.
22
+ *
23
+ * @param name The reference to the command to execute.
24
+ * @param args The list of parmeters so be sent to the command.
25
+ */
26
+ execute(name: string, ...args: any[]): void;
27
+ /**
28
+ * Registers a command.
29
+ *
30
+ * @param name The name of the command to register.
31
+ * @param command The command to register.
32
+ */
33
+ addCommand(name: string, command: AppBridgeCommand): void;
34
+ /**
35
+ * Unregisters a command.
36
+ *
37
+ * @param name The name of the command to unregister.
38
+ *
39
+ * @returns `true` whether the command existed and has been removed; `false` otherwise.
40
+ */
41
+ removeCommand(name: string): boolean;
42
+ /**
43
+ * Returns the command with the specified name.
44
+ *
45
+ * @param name The name of the command to retrieve.
46
+ *
47
+ * @returns Returns the command associated with the specified name.
48
+ * If no command is associated with the specified name, `undefined` is returned.
49
+ */
50
+ getCommand(name: string): AppBridgeCommand | undefined;
51
+ /**
52
+ * Returns a boolean indicating whether a command with the specified name exists or not.
53
+ *
54
+ * @param name The name of the command to retrieve.
55
+ *
56
+ * @returns Returns `true` whether the command exists; `false` otherwise.
57
+ */
58
+ hasCommand(name: string): boolean;
59
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be ound in
6
+ * fthe LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
+ */
8
+ /**
9
+ * Represents exceptions thrown by the `AppBridge` class.
10
+ */
11
+ export declare class AppBridgeError extends ReferenceError {
12
+ /**
13
+ * @private
14
+ */
15
+ constructor(message: string);
16
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @license
3
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be ound in
6
+ * fthe LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
+ */
8
+ /**
9
+ * Represents errors thrown by `HttpMockService` instances.
10
+ */
11
+ export declare class HttpMockServiceError extends Error {
12
+ /**
13
+ * Creates en new `HttpMockService` instances.
14
+ *
15
+ * @param message A human-readable description of the error.
16
+ */
17
+ constructor(message: string);
18
+ }
@@ -0,0 +1,4 @@
1
+ export * from './subscription-error';
2
+ export * from './integrity-error';
3
+ export * from './app-bridge-error';
4
+ export * from './http-mock-service-error';
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @license
3
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be ound in
6
+ * fthe LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
+ */
8
+ /**
9
+ * Represents a data integrity violation error.
10
+ */
11
+ export declare class IntegrityError extends Error {
12
+ /**
13
+ * Creates en new `IntegrityError` instances.
14
+ *
15
+ * @param message A human-readable description of the error.
16
+ */
17
+ constructor(message: string);
18
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @license
3
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be ound in
6
+ * fthe LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
+ */
8
+ /**
9
+ * Represents errors thrown by `SubscriptionService` instances.
10
+ */
11
+ export declare class SubscriptionError extends Error {
12
+ /**
13
+ * Creates en new `SubscriptionService` instances.
14
+ *
15
+ * @param message A human-readable description of the error.
16
+ */
17
+ constructor(message: string);
18
+ }
@@ -0,0 +1 @@
1
+ export * from './lang';
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @license
3
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be ound in
6
+ * fthe LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
+ */
8
+ import { Identifiable } from "../../../model";
9
+ import { Uuid } from "../../../util";
10
+ /**
11
+ * @private
12
+ * The base class that must be extended by objects to be indentified by the
13
+ * Angular Toolbox Subscription Service.
14
+ */
15
+ export declare class IdentifiableComponent implements Identifiable {
16
+ /**
17
+ * @private
18
+ */
19
+ private readonly _uuid;
20
+ /**
21
+ * Returns the unique identifier for this object.
22
+ *
23
+ * @returns An instance of the `Uuid` class.
24
+ */
25
+ getID(): Uuid;
26
+ }
@@ -0,0 +1 @@
1
+ export * from './identifiable-component';
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @license
3
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be ound in
6
+ * fthe LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
+ */
8
+ import { Version } from "../../../model";
9
+ /**
10
+ * @private
11
+ * Specifies the semantic versioning of an API.
12
+ */
13
+ export declare class VersionImpl implements Version {
14
+ /**
15
+ * Specifies versions with incompatible API changes.
16
+ */
17
+ readonly major: number;
18
+ /**
19
+ * Specifies versions with functionalities that have backward compatibility.
20
+ */
21
+ readonly minor: number;
22
+ /**
23
+ * Specifies versions that fixes bugs.
24
+ */
25
+ readonly patch: number;
26
+ /**
27
+ * Specifies the timestamp that corresponds to the build date for this `Version` instance.
28
+ */
29
+ readonly buildTimeStamp: number;
30
+ /**
31
+ * @private
32
+ */
33
+ constructor(major: number, minor: number, patch: number, buildTimeStamp: number);
34
+ /**
35
+ * Returns a string representation of this `Version` object in the form `M.m.p`, where
36
+ * `M` represents the major number, `m` represents the minor number and `p` represents
37
+ * the patch number of this `VersionImpl` instance.
38
+ *
39
+ * @returns A string representation of this `VersionImpl` instance.
40
+ */
41
+ toString(): string;
42
+ }
@@ -0,0 +1,2 @@
1
+ export * from './error';
2
+ export * from './impl';
@@ -0,0 +1,29 @@
1
+ import { AfterViewInit, ElementRef } from '@angular/core';
2
+ import { Router } from '@angular/router';
3
+ import { NavigationDirectiveBase } from './navigation-directive-base';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Provides functionality to activate anchor navigation through the native Angular router.
7
+ */
8
+ export declare class AnchorLinklDirective extends NavigationDirectiveBase implements AfterViewInit {
9
+ private _document;
10
+ private _router;
11
+ /**
12
+ * The `href` attribute of the decorated element.
13
+ */
14
+ href: string;
15
+ /**
16
+ * @private
17
+ */
18
+ private onClick;
19
+ /**
20
+ * @private
21
+ */
22
+ constructor(_document: any, elmRef: ElementRef, _router: Router);
23
+ /**
24
+ * @private
25
+ */
26
+ ngAfterViewInit(): void;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<AnchorLinklDirective, never>;
28
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AnchorLinklDirective, "[anchorLink]", never, { "href": { "alias": "href"; "required": false; }; }, {}, never, never, true, never>;
29
+ }
@@ -0,0 +1,52 @@
1
+ /**
2
+ * @license
3
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
+ */
8
+ import { AfterViewInit, ElementRef, EventEmitter } from '@angular/core';
9
+ import { Router } from '@angular/router';
10
+ import { NavigationDirectiveBase } from './navigation-directive-base';
11
+ import * as i0 from "@angular/core";
12
+ /**
13
+ * An easy-to-use directive that enables keyboard navigation and provides support for keyboard "Enter" key events.
14
+ */
15
+ export declare class ButtonRoleDirective<T> extends NavigationDirectiveBase implements AfterViewInit {
16
+ private _router;
17
+ /**
18
+ * Dispatches events when the user presses the "Enter" key.
19
+ */
20
+ readonly enter: EventEmitter<T>;
21
+ /**
22
+ * Forces callback methods defined with the "enter" event listener to be invoked when user clicks on the
23
+ * decorated element.
24
+ */
25
+ delegateClick: any;
26
+ /**
27
+ * @private
28
+ */
29
+ private onKeyup;
30
+ /**
31
+ * @private
32
+ */
33
+ private onClick;
34
+ /**
35
+ * @private
36
+ */
37
+ private _routerLinkRef;
38
+ /**
39
+ * @private
40
+ */
41
+ constructor(elmRef: ElementRef, _router: Router);
42
+ /**
43
+ * @private
44
+ */
45
+ ngAfterViewInit(): void;
46
+ /**
47
+ * @private
48
+ */
49
+ private processEvent;
50
+ static ɵfac: i0.ɵɵFactoryDeclaration<ButtonRoleDirective<any>, never>;
51
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ButtonRoleDirective<any>, "[buttonRole]", never, { "delegateClick": { "alias": "delegateClick"; "required": false; }; }, { "enter": "enter"; }, never, never, true, never>;
52
+ }
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @license
3
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
+ */
8
+ import { ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
9
+ import * as i0 from "@angular/core";
10
+ /**
11
+ * Allows injection of any value into an HTML element container (`div`, `button`, etc...).
12
+ * A rendered event is emitted after the injected content has been rendered and is
13
+ * available for DOM manipulation.
14
+ */
15
+ export declare class ContentRendererDirective implements OnInit, OnDestroy {
16
+ private _elmRef;
17
+ /**
18
+ * @private
19
+ */
20
+ private readonly _observer;
21
+ /**
22
+ * Dispatches events when the content of the HTML element has been rendered.
23
+ */
24
+ readonly rendered: EventEmitter<HTMLElement>;
25
+ /**
26
+ * @private
27
+ */
28
+ constructor(_elmRef: ElementRef);
29
+ /**
30
+ * @private
31
+ */
32
+ ngOnDestroy(): void;
33
+ /**
34
+ * @private
35
+ */
36
+ ngOnInit(): void;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<ContentRendererDirective, never>;
38
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ContentRendererDirective, "[contentRenderer]", never, {}, { "rendered": "rendered"; }, never, never, true, never>;
39
+ }
@@ -0,0 +1,4 @@
1
+ export * from './button-role.directive';
2
+ export * from './navigate-to-url.directive';
3
+ export * from './anchor-link.directive';
4
+ export * from './content-renderer.directive';
@@ -0,0 +1,23 @@
1
+ import { ElementRef } from '@angular/core';
2
+ import { NavigationDirectiveBase } from './navigation-directive-base';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * An easy-to-use directive that enables keyboard navigation and provides support for navigating to an external URL.
6
+ */
7
+ export declare class NavigateToUrlDirective extends NavigationDirectiveBase {
8
+ private _document;
9
+ /**
10
+ * The `href` attribute of the decorated element.
11
+ */
12
+ href: string;
13
+ /**
14
+ * @private
15
+ */
16
+ private onClick;
17
+ /**
18
+ * @private
19
+ */
20
+ constructor(_document: any, elmRef: ElementRef);
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<NavigateToUrlDirective, never>;
22
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NavigateToUrlDirective, "[navigateToUrl]", never, { "href": { "alias": "href"; "required": false; }; }, {}, never, never, true, never>;
23
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @license
3
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
+ */
8
+ import { ElementRef } from '@angular/core';
9
+ /**
10
+ * @private
11
+ * The base class for all directives that are responsible for navigation whithin ab Angular app.
12
+ */
13
+ export declare class NavigationDirectiveBase {
14
+ protected elmRef: ElementRef;
15
+ /**
16
+ * @private
17
+ */
18
+ constructor(elmRef: ElementRef, role: string);
19
+ }
@@ -0,0 +1 @@
1
+ export * from './mock/http';
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license
3
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be found in
6
+ * the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
+ */
8
+ /**
9
+ * The type of parameter objects associated with a HTTP call.
10
+ */
11
+ export type HttpMockParameters = {
12
+ [key: string]: any;
13
+ };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license
3
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be found in
6
+ * the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
+ */
8
+ /**
9
+ * The definition function for the `@HttpMock` decorator.
10
+ *
11
+ * @param config The `HttpMockConfig` object used to initialize the HTTP Mocking Framework.
12
+ */
13
+ export declare const HttpMock: Function;
@@ -0,0 +1,2 @@
1
+ export * from './http-mock-parameters';
2
+ export * from './http-mock.decorator';
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @license
3
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be found in
6
+ * the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
+ */
8
+ import { HttpMethodMock } from "../../../../model";
9
+ import { HttpMockParameters } from "./http-mock-parameters";
10
+ /**
11
+ * @private
12
+ *
13
+ * The markup interface for DTOs that are used to send a mock config to the delegate
14
+ * `XhrProxy` instance.
15
+ * This interface is not exposed.
16
+ */
17
+ export interface RouteMockConfig {
18
+ /**
19
+ * @private
20
+ *
21
+ * The `HttpMethodMock`object to be consumed by the the delegate `XhrProxy` instance.
22
+ */
23
+ methodConfig: HttpMethodMock;
24
+ /**
25
+ * @private
26
+ *
27
+ * The list of URI parameters associated with the current HTTP call.
28
+ */
29
+ parameters: HttpMockParameters | null;
30
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @license
3
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be found in
6
+ * the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
+ */
8
+ import { HttpResponseMock } from "../../../../model";
9
+ /**
10
+ * @private
11
+ * Utility interface used by the `DelegateXhr` class to store HTTP request information.
12
+ */
13
+ export interface DataStorage {
14
+ /**
15
+ * @private
16
+ */
17
+ httpResponse: HttpResponseMock;
18
+ /**
19
+ * @private
20
+ * The amount of data currently loaded.
21
+ */
22
+ loaded: number;
23
+ /**
24
+ * @private
25
+ * The total size of data to load.
26
+ */
27
+ total: number;
28
+ /**
29
+ * @private
30
+ * The loaded data.
31
+ */
32
+ data: any;
33
+ /**
34
+ * @private
35
+ * The JSON string prepresentation of the loaded data.
36
+ */
37
+ stringifiedData: string;
38
+ }
@@ -0,0 +1,70 @@
1
+ /**
2
+ * @license
3
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be found in
6
+ * the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
+ *
8
+ * This source code is derived from the following original source code:
9
+ * - https://github.com/benlesh/event-target-polyfill
10
+ * - Copyright (c) 2020 Ben Lesh
11
+ *
12
+ * Use of the original source code is governed by an MIT-style license
13
+ * that can be found in the LICENSE file at
14
+ * https://github.com/benlesh/event-target-polyfill/blob/master/LICENSE
15
+ */
16
+ /**
17
+ * @private
18
+ * A utility class the provides an implementation for the `EventTarget` interface.
19
+ * This class is used internally by the framework; please do not expose it.
20
+ *
21
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget
22
+ */
23
+ export declare class EventTargetImpl implements EventTarget {
24
+ /**
25
+ * @private
26
+ */
27
+ private _listenerList;
28
+ /**
29
+ * @private
30
+ */
31
+ constructor();
32
+ /**
33
+ * @private
34
+ * Sets up a function that will be called whenever the specified event is delivered to the target.
35
+ *
36
+ * @param type a case-sensitive string representing the event type to listen for.
37
+ * @param listener the object that receives a notification (an object that implements the
38
+ * `Event` interface) when an event of the specified type occurs.
39
+ * @param options an object that specifies characteristics about the event listener.
40
+ *
41
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
42
+ */
43
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions | undefined): void;
44
+ /**
45
+ * @private
46
+ * Removes an event listener previously registered with `EventTarget.addEventListener()` from the target.
47
+ *
48
+ * @param type a case-sensitive which specifies the type of event for which to remove an event listener.
49
+ * @param listener the event listener function of the event handler to remove from the event target.
50
+ * @param options An options object that specifies characteristics about the event listener.
51
+ *
52
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener
53
+ */
54
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject | null, options?: boolean | EventListenerOptions | undefined): void;
55
+ /**
56
+ * @private
57
+ * Sends an `Event` to this to the `Event` object, (synchronously) invoking the affected event listeners
58
+ * in the appropriate order.
59
+ *
60
+ * @param event the `Event object to dispatch. Its Event.target property will be set to the current EventTarget.
61
+ * @returns true since there are no cancellable events on a base `EventTarget`.
62
+ *
63
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/dispatchEvent
64
+ */
65
+ dispatchEvent(event: Event): boolean;
66
+ /**
67
+ * @private
68
+ */
69
+ private checkArgLength;
70
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @license
3
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be found in
6
+ * the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
+ */
8
+ /**
9
+ * @private
10
+ * A utility class used by delegate `XhrProxy` instances to dispatch `ProgressEvent`
11
+ * instances.
12
+ *
13
+ * This class is not exposed.
14
+ */
15
+ export declare class ProgressEventMock extends ProgressEvent {
16
+ /**
17
+ * @private
18
+ */
19
+ private _total;
20
+ /**
21
+ * A 64-bit unsigned integer indicating the size, in bytes, of the data already
22
+ * transmitted or processed.
23
+ */
24
+ set total(value: number);
25
+ get total(): number;
26
+ /**
27
+ * @private
28
+ */
29
+ private _loaded;
30
+ /**
31
+ * A 64-bit unsigned integer indicating the total size, in bytes, of the data being
32
+ * transmitted or processed.
33
+ */
34
+ set loaded(value: number);
35
+ get loaded(): number;
36
+ }
@@ -0,0 +1,3 @@
1
+ export * from './config';
2
+ export * from './util';
3
+ export * from './xhr';