angular-toolbox 0.0.7 → 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 (230) 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/model/service/ui/scroll.service.d.ts +55 -0
  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 -3
  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/public-api.mjs +0 -7
  224. package/fesm2015/angular-toolbox.mjs +0 -278
  225. package/fesm2015/angular-toolbox.mjs.map +0 -1
  226. package/fesm2020/angular-toolbox.mjs +0 -274
  227. package/fesm2020/angular-toolbox.mjs.map +0 -1
  228. package/lib/service/index.d.ts +0 -2
  229. package/lib/service/subscription/subscription.service.d.ts +0 -33
  230. package/lib/service/ui/dark-mode.service.d.ts +0 -92
@@ -0,0 +1,22 @@
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 { VersionConfig } from "./version-config";
9
+ /**
10
+ * The default provider for the `VersionService` configuration. You typically define
11
+ * the custom properties in the main `NgModule` declaration to initialize the application
12
+ * config:
13
+ *
14
+ * @NgModule({
15
+ * ...
16
+ * providers: [
17
+ * { provide: VERSION_CONFIG, useValue: { major: 1, minor: 2, patch: 12 } }
18
+ * ],
19
+ * ...
20
+ * });
21
+ */
22
+ export declare const VERSION_CONFIG: VersionConfig;
@@ -0,0 +1,34 @@
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
+ * Specifies the semantic versioning of an Angular application.
10
+ */
11
+ export interface Version {
12
+ /**
13
+ * Specifies versions with incompatible API changes.
14
+ */
15
+ major: number;
16
+ /**
17
+ * Specifies versions with functionalities that have backward compatibility.
18
+ */
19
+ minor: number;
20
+ /**
21
+ * Specifies versions that fixes bugs.
22
+ */
23
+ patch: number;
24
+ /**
25
+ * Specifies the timestamp that corresponds to the build date for this `Version` object.
26
+ */
27
+ buildTimeStamp: number;
28
+ /**
29
+ * Returns a string representation of this `Version` object.
30
+ *
31
+ * @returns A string representation of this `Version` object.
32
+ */
33
+ toString(): string;
34
+ }
@@ -0,0 +1,2 @@
1
+ export * from './business';
2
+ export * from './service';
@@ -0,0 +1,4 @@
1
+ export * from './subscription/subscription.service';
2
+ export * from './ui';
3
+ export * from './version/version.service';
4
+ export * from './mock/http/http-mock.service';
@@ -0,0 +1,101 @@
1
+ import { HttpMockConfig } from '../../../business';
2
+ import { HTTPMethodRef } from '../../../../framework/mock/http/util/http-method-ref.enum';
3
+ import { RouteMockConfig } from '../../../../framework/mock/http/config/route-mock-config';
4
+ import { Uuid } from '../../../../util';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * @private
8
+ * Reference to the original type for this class.
9
+ */
10
+ export declare const HTTP_MOCK_SERVICE: string;
11
+ /**
12
+ * The `HttpMockService` class provides the API for managing HTTP mock configuration objects.
13
+ */
14
+ export declare class HttpMockService {
15
+ /**
16
+ * @private
17
+ * Ensures that class type is still accessible after TypeScript compilation.
18
+ */
19
+ readonly type: string;
20
+ /**
21
+ * @private
22
+ * The list of IDs associated with each config object.
23
+ */
24
+ private _configIdList;
25
+ /**
26
+ * @private
27
+ * Stores the complete collection of mocking behaviors for each registered config.
28
+ */
29
+ private _configList;
30
+ /**
31
+ * @private
32
+ * The reference to the current app URL origin.
33
+ */
34
+ private readonly APP_ORIGIN;
35
+ /**
36
+ * Adds the specified `HttpMockConfig` object to this `HttpMockService` instance.
37
+ *
38
+ * @param config The `HttpMockConfig` object to add to this `HttpMockService` instance.
39
+ * @Returns The `Uuid` instance associated with the added `HttpMockConfig` object.
40
+ */
41
+ addConfig(config: HttpMockConfig): Uuid;
42
+ /**
43
+ * Returns the current app URL origin.
44
+ *
45
+ * @returns A string that represents the current app URL origin.
46
+ */
47
+ getAppOrigin(): string;
48
+ /**
49
+ * Removes the configuration registered with the specified `uuid` from this `HttpMockService` instance.
50
+ *
51
+ * @param uuid The UUID of the configuration to remove.
52
+ */
53
+ removeConfig(uuid: Uuid): void;
54
+ /**
55
+ * Removes all registred configurations from this `HttpMockService` instance.
56
+ */
57
+ clearConfigs(): void;
58
+ /**
59
+ * Returns a boolean value that indicates whether a config with the specified UUID has been registered
60
+ * (`true`), or not (`false`).
61
+ *
62
+ * @param uuid The UUID of the config to check.
63
+ * @returns `true` whether a config with the specified UUID has been registered; `false` otherwise.
64
+ */
65
+ hasRegisteredConfig(uuid: Uuid): boolean;
66
+ /**
67
+ * Returns the `RouteMockConfig` object associated with the specified `URL` instance and HTTP method.
68
+ *
69
+ * @param url The `URL` instance for which to find a route config.
70
+ * @param method The HTTP method for which to find a route config.
71
+ * @returns The `RouteMockConfig` object associated with the specified `URL` instance and HTTP method whether it exists;
72
+ * `undefined` otherwise.
73
+ */
74
+ getRouteConfig(url: URL, method: HTTPMethodRef): RouteMockConfig | undefined;
75
+ /**
76
+ * @rivate
77
+ */
78
+ private buildParameters;
79
+ /**
80
+ * @rivate
81
+ */
82
+ private extractConfig;
83
+ /**
84
+ * @rivate
85
+ */
86
+ private extractEndpointConfig;
87
+ /**
88
+ * @rivate
89
+ */
90
+ private checkOrigin;
91
+ /**
92
+ * @rivate
93
+ */
94
+ private deleteConfigById;
95
+ /**
96
+ * @rivate
97
+ */
98
+ private cleanConfig;
99
+ static ɵfac: i0.ɵɵFactoryDeclaration<HttpMockService, never>;
100
+ static ɵprov: i0.ɵɵInjectableDeclaration<HttpMockService>;
101
+ }
@@ -0,0 +1,66 @@
1
+ import { Subscription } from 'rxjs';
2
+ import { Identifiable } from '../../business';
3
+ import * as i0 from "@angular/core";
4
+ export declare class SubscriptionService {
5
+ /**
6
+ * @private
7
+ * Stores an internal reference to the last reference used with the `register()`
8
+ * method.
9
+ */
10
+ private _lastRef;
11
+ /**
12
+ * @private
13
+ * The internal `Subscription` instances storage.
14
+ */
15
+ private _subMap;
16
+ /**
17
+ * Stores a new `Subscription` instance associated with the specified reference.
18
+ *
19
+ * @param ref The reference for which to store a new `Subscription` instance.
20
+ * Can be either a string or an `Identifiable` object.
21
+ * @param subscription The `Subscription` instance to register.
22
+ *
23
+ * @returns A reference to this `SubscriptionService` instance.
24
+ */
25
+ register(ref: string | Identifiable, subscription: Subscription): SubscriptionService;
26
+ /**
27
+ * Stores a new `Subscription` instance associated with the reference specified
28
+ * by the last `register()` method invokation.
29
+ *
30
+ * @param subscription The `Subscription` instance to register.
31
+ *
32
+ * @returns A reference to this `SubscriptionService` instance.
33
+ */
34
+ append(subscription: Subscription): SubscriptionService;
35
+ /**
36
+ * Unsubscribes and removes all `Subscription` instances associated with the specified reference.
37
+ *
38
+ * @param ref The reference for which to remove all `Subscription` instances.
39
+ * Can be either a string or an `Identifiable` object.
40
+ *
41
+ * @returns `true` whether the specified reference exists; `false` otherwise.
42
+ */
43
+ clearAll(ref: string | Identifiable): boolean;
44
+ /**
45
+ * Returns all `Subscription` instances associated with the specified reference.
46
+ *
47
+ * @param ref The reference for which to remove get `Subscription` instances.
48
+ * Can be either a string or an `Identifiable` object.
49
+ *
50
+ * @returns All `Subscription` instances associated with the specified reference, or
51
+ * `null` whether the specified reference does not exists.
52
+ */
53
+ get(ref: string | Identifiable): Array<Subscription> | null;
54
+ /**
55
+ * @private
56
+ * Returns the string reference for the regsitration process.
57
+ *
58
+ * @param ref The reference to be used the regsitration process.
59
+ * Can be either a string or an `Identifiable` object.
60
+ *
61
+ * @returns the string reference for the regsitration process.
62
+ */
63
+ private getRef;
64
+ static ɵfac: i0.ɵɵFactoryDeclaration<SubscriptionService, never>;
65
+ static ɵprov: i0.ɵɵInjectableDeclaration<SubscriptionService>;
66
+ }
@@ -0,0 +1,80 @@
1
+ import { NgZone } from '@angular/core';
2
+ import { NavigationExtras, Router } from '@angular/router';
3
+ import { AppBridgeCommand } from '../../business/lang/app-bridge-command';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * @private
7
+ */
8
+ export declare const APP_PRIDGE_REF: string;
9
+ /**
10
+ * A utility service that allows dynamically injected HTML fragments, to interact with the Angular application.
11
+ */
12
+ export declare class AppBrigeService {
13
+ private _router;
14
+ private _zone;
15
+ private _document;
16
+ /**
17
+ * @private
18
+ */
19
+ private readonly _defaultView;
20
+ /**
21
+ * @private
22
+ * Thereference to the command invoker.
23
+ */
24
+ private readonly _appBridge;
25
+ /**
26
+ * @private
27
+ */
28
+ constructor(_router: Router, _zone: NgZone, _document: any);
29
+ /**
30
+ * Provides the ability to invoke the `navigate()` method of the Angular app router.
31
+ *
32
+ * @param commands The commands array as specified by the Angular router `navigate()` method.
33
+ * @param extras The navigation options as specified by the Angular router `navigate()` method.
34
+ * @return `Promise` that resolves to `true` when navigation succeeds, or `false` when navigation fails.
35
+ *
36
+ * @see https://angular.dev/api/router/Router#navigate
37
+ */
38
+ navigate(commands: string[], extras?: NavigationExtras | undefined): Promise<boolean>;
39
+ /**
40
+ * Allows to scroll to the fragment specified by the `href` attribute when the user element interact with the associated element.
41
+ *
42
+ * @example
43
+ * <a href="#myAnchor" onclick="appBridge.goToAnchor(event)">My Section</a></code>
44
+ *
45
+ * @param event The event that triggers the anchor navigation.
46
+ * @return `Promise` that resolves to `true` when navigation succeeds, or `false` when navigation fails.
47
+ *
48
+ * @see https://angular.dev/api/router/Router#navigate
49
+ */
50
+ goToAnchor(event: Event): Promise<boolean>;
51
+ /**
52
+ * Declares a new JavaScript command to be used with dynamically loaded documents.
53
+ *
54
+ * @param name The name of the command to declare.
55
+ * @param command The reference to a JavaScript command to be used with dynamically loaded documents.
56
+ */
57
+ declareCommand(name: string, command: AppBridgeCommand): void;
58
+ /**
59
+ * Unregisters a JavaScript command previously referenced with the `declareCommand()` method.
60
+ *
61
+ * @param name The name of the command to remove.
62
+ *
63
+ * @returns `true` whether the command existed and has been removed; `false` otherwise.
64
+ */
65
+ deleteCommand(name: string): boolean;
66
+ /**
67
+ * Returns the JavaScript command previously referenced with the `declareCommand()` method.
68
+ *
69
+ * @param name The name of the command to retrieve.
70
+ * @returns The JavaScript command previously referenced with the specified `name` parameter.
71
+ * If no command is found, returns `undefined`.
72
+ */
73
+ getCommand(name: string): AppBridgeCommand | undefined;
74
+ /**
75
+ * @private
76
+ */
77
+ private checkCommandName;
78
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppBrigeService, never>;
79
+ static ɵprov: i0.ɵɵInjectableDeclaration<AppBrigeService>;
80
+ }
@@ -0,0 +1,99 @@
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 { EventEmitter } from '@angular/core';
9
+ import { DarkModeConfig } from '../../business';
10
+ import * as i0 from "@angular/core";
11
+ export declare class DarkModeService {
12
+ private _document;
13
+ /**
14
+ * @private
15
+ */
16
+ private _darkModeEnabled;
17
+ /**
18
+ * @private
19
+ */
20
+ private _cssProperty;
21
+ /**
22
+ * @private
23
+ */
24
+ private _storageKey;
25
+ /**
26
+ * The callback function that is triggered when the dark mode changes.
27
+ *
28
+ * @typeParam `EventEmitter<boolean>` the value returned by the `darkModeEnabled()` property.
29
+ */
30
+ readonly change: EventEmitter<boolean>;
31
+ /**
32
+ * @private
33
+ * Creates a new `DarkModeService` instance.
34
+ *
35
+ * @param _document The reference to the `Document` singleton.
36
+ * @param config The reference to the `DarkModeConfig` provider.
37
+ */
38
+ constructor(_document: Document, config: DarkModeConfig);
39
+ /**
40
+ * Toogles the dark mode state.
41
+ */
42
+ toggleDarkMode(): void;
43
+ /**
44
+ * Sets the dark mode state to active.
45
+ */
46
+ enableDarkMode(): void;
47
+ /**
48
+ * Sets the dark mode state to inactive.
49
+ */
50
+ disableDarkMode(): void;
51
+ /**
52
+ * Returns a `boolean` value that indicates whether the dark mode state is active (`true`), or not (`false`).
53
+ *
54
+ * @returns `true` whether the dark mode state is active; `false` otherwise.
55
+ */
56
+ darkModeEnabled(): boolean;
57
+ /**
58
+ * Returns the value of the CSS property as defined by the config provider.
59
+ *
60
+ * @returns The value of the CSS property.
61
+ */
62
+ getCssProperty(): string;
63
+ /**
64
+ * Returns the value of the storage key as defined by the config provider.
65
+ *
66
+ * @returns The value of the storage key.
67
+ */
68
+ getStorageKey(): string;
69
+ /**
70
+ * Removes the dark mode information from local storage.
71
+ */
72
+ invalidateStorage(): void;
73
+ /**
74
+ * @private
75
+ */
76
+ private initDarkMode;
77
+ /**
78
+ * @private
79
+ */
80
+ private initStoredDarkMode;
81
+ /**
82
+ * @private
83
+ */
84
+ private setStoredDarkMode;
85
+ /**
86
+ * @private
87
+ */
88
+ private setDarkMode;
89
+ /**
90
+ * @private
91
+ */
92
+ private initBrowserMode;
93
+ /**
94
+ * @private
95
+ */
96
+ private matchDarkTheme;
97
+ static ɵfac: i0.ɵɵFactoryDeclaration<DarkModeService, never>;
98
+ static ɵprov: i0.ɵɵInjectableDeclaration<DarkModeService>;
99
+ }
@@ -0,0 +1,3 @@
1
+ export * from './dark-mode.service';
2
+ export * from './scroll.service';
3
+ export * from './app-bridge.service';
@@ -0,0 +1,55 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { ScrollBehavior } from '../../business';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ScrollService {
5
+ private _document;
6
+ /**
7
+ * The callback function that is triggered when a scroll operation is performed.
8
+ *
9
+ * @typeParam `EventEmitter<Event>` The reference to the original scroll event.
10
+ */
11
+ readonly onScroll: EventEmitter<Event>;
12
+ /**
13
+ * @private
14
+ * Creates a new `ScrollService` instance.
15
+ *
16
+ * @param _document The reference to the `Document` singleton.
17
+ */
18
+ constructor(_document: Document);
19
+ /**
20
+ * Scrolls the ancestor containers of the element with the specified selector such that
21
+ * this element is visible to the user.
22
+ *
23
+ * @param selector The selector of the target element.
24
+ * @param arg A `boolean` value:
25
+ * If `true`, the top of the element will be aligned to the top of the visible area of the
26
+ * scrollable ancestor.
27
+ * If `false`, the bottom of the element will be aligned to the bottom of the visible area
28
+ * of the scrollable ancestor.
29
+ * @param arg A dictionary containing the scroll parameters.
30
+ */
31
+ scrollIntoView(selector: string, arg?: boolean | ScrollIntoViewOptions | undefined): void;
32
+ /**
33
+ * Scrolls the app viewport to the top of the browser window.
34
+ *
35
+ * @param behavior Specifies whether the scrolling should animate smoothly (`smooth`),
36
+ * happen instantly in a single jump (`instant`), or let the browser
37
+ * choose (`auto`, `default`).
38
+ */
39
+ gotoTop(behavior?: ScrollBehavior): void;
40
+ /**
41
+ * Scrolls the app viewport according to the specified options, into the browser window.
42
+ *
43
+ * @param options A dictionary containing the scroll parameters.
44
+ */
45
+ scroll(options?: ScrollToOptions): void;
46
+ /**
47
+ * Scrolls the app viewport by the specified `x/y` coordinates, into the browser window.
48
+ *
49
+ * @param x The horizontal pixel value that you want to scroll by.
50
+ * @param y The vertical pixel value that you want to scroll by.
51
+ */
52
+ scrollBy(x: number, y: number): void;
53
+ static ɵfac: i0.ɵɵFactoryDeclaration<ScrollService, never>;
54
+ static ɵprov: i0.ɵɵInjectableDeclaration<ScrollService>;
55
+ }
@@ -0,0 +1,30 @@
1
+ import { Version, VersionConfig } from '../../business';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * A lightweight service that provides Semantic Versioning implementation for your Angular projects.
5
+ */
6
+ export declare class VersionService {
7
+ /**
8
+ * @private
9
+ */
10
+ private readonly _version;
11
+ /**
12
+ * Creates a new VersionService instance.
13
+ * @param config the reference to the VersionConfig provider.
14
+ */
15
+ constructor(config: VersionConfig);
16
+ /**
17
+ * Returns the version of the associated Angular project.
18
+ *
19
+ * @return the version of the associated Angular project.
20
+ */
21
+ getVersion(): Version;
22
+ /**
23
+ * Returns the build timestamp of the associated Angular project.
24
+ *
25
+ * @return the build timestamp of the associated Angular project.
26
+ */
27
+ getBuildTimestamp(): number;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<VersionService, never>;
29
+ static ɵprov: i0.ɵɵInjectableDeclaration<VersionService>;
30
+ }
@@ -1 +1 @@
1
- export * from './safe/safe-html.pipe';
1
+ export * from './safe/safe-html.pipe';
@@ -1,10 +1,30 @@
1
- import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
2
- import { PipeTransform } from "@angular/core";
3
- import * as i0 from "@angular/core";
4
- export declare class SafeHtmlPipe implements PipeTransform {
5
- private _sanitizer;
6
- constructor(_sanitizer: DomSanitizer);
7
- transform(value: string): SafeHtml;
8
- static ɵfac: i0.ɵɵFactoryDeclaration<SafeHtmlPipe, never>;
9
- static ɵpipe: i0.ɵɵPipeDeclaration<SafeHtmlPipe, "safeHtml", false>;
10
- }
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 { DomSanitizer, SafeHtml } from '@angular/platform-browser';
9
+ import { PipeTransform } from "@angular/core";
10
+ import * as i0 from "@angular/core";
11
+ /**
12
+ * A basic implementation of HTML sanitization pipe.
13
+ */
14
+ export declare class SafeHtmlPipe implements PipeTransform {
15
+ private _sanitizer;
16
+ /**
17
+ * @private
18
+ */
19
+ constructor(_sanitizer: DomSanitizer);
20
+ /**
21
+ * Transforms the HTML input string value into a `SafeHtml` instance and returns the result
22
+ * of the transformation.
23
+ *
24
+ * @param value The HTML input value to transform into a `SafeHtml` instance.
25
+ * @returns A `SafeHtml` instance based on the specified input value.
26
+ */
27
+ transform(value: string): SafeHtml;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<SafeHtmlPipe, never>;
29
+ static ɵpipe: i0.ɵɵPipeDeclaration<SafeHtmlPipe, "safeHtml", true>;
30
+ }
@@ -0,0 +1,15 @@
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
+ * A reference to the `"button"` value of the `role` property.
10
+ */
11
+ export declare const BUTTON_ROLE: string;
12
+ /**
13
+ * A reference to the `"link"` value of the `role` property.
14
+ */
15
+ export declare const LINK_ROLE: string;
@@ -0,0 +1,12 @@
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
+ * @private
10
+ * An internal convenient object that defined default `ScrollIntoViewOptions` objects.
11
+ */
12
+ export declare const DEFAULT_SCROLL_BEHAVIOR: ScrollIntoViewOptions;
@@ -0,0 +1,11 @@
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
+ * A reference to an immutable empty string.
10
+ */
11
+ export declare const EMPTY_STRING: string;
@@ -0,0 +1,4 @@
1
+ export * from './empty-string.const';
2
+ export * from './aria-role.constant';
3
+ export * from './uuid';
4
+ export * from './js-type';
@@ -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 found in
6
+ * the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
+ */
8
+ /**
9
+ * A reference to the `"undefined"` type.
10
+ */
11
+ export declare const UNDEFINED: string;
12
+ /**
13
+ * A reference to the `"object"` type.
14
+ */
15
+ export declare const OBJECT: string;
16
+ /**
17
+ * A reference to the `"boolean"` type.
18
+ */
19
+ export declare const BOOLEAN: string;
20
+ /**
21
+ * A reference to the `"number"` type.
22
+ */
23
+ export declare const NUMBER: string;
24
+ /**
25
+ * A reference to the `"bigint"` type.
26
+ */
27
+ export declare const BIGINT: string;
28
+ /**
29
+ * A reference to the `"function"` type.
30
+ */
31
+ export declare const FUNCTION: string;
32
+ /**
33
+ * A reference to the `"string"` type.
34
+ */
35
+ export declare const STRING: string;
36
+ /**
37
+ * A reference to the `"symbol"` type.
38
+ */
39
+ export declare const SYMBOL: string;