@rxap/ngx-pub-sub 21.0.1 → 22.0.0-dev.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 (58) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/compodoc/changelog.html +2 -0
  3. package/compodoc/dependencies.html +2 -2
  4. package/compodoc/js/search/search_index.js +2 -2
  5. package/compodoc/properties.html +1 -1
  6. package/docs/documentation.json +78 -78
  7. package/docs/html/classes/MessageMetaData.html +6 -6
  8. package/docs/html/classes/PubSubService.html +7 -7
  9. package/docs/html/functions/ProvidePubSub.html +1 -1
  10. package/docs/html/functions/withDisableCache.html +1 -1
  11. package/docs/html/functions/withDisableGarbageCollector.html +1 -1
  12. package/docs/html/functions/withGarbageCollectorInterval.html +1 -1
  13. package/docs/html/functions/withMaxCacheSize.html +1 -1
  14. package/docs/html/hierarchy.html +1 -1
  15. package/docs/html/index.html +2 -2
  16. package/docs/html/interfaces/CachedPubSubMessage.html +3 -3
  17. package/docs/html/interfaces/PubSubMessage.html +3 -3
  18. package/docs/html/modules.html +1 -1
  19. package/docs/html/variables/RXAP_PUB_SUB_CACHE_SIZE.html +1 -1
  20. package/docs/html/variables/RXAP_PUB_SUB_DISABLE_CACHE.html +1 -1
  21. package/docs/html/variables/RXAP_PUB_SUB_DISABLE_GARBAGE_COLLECTOR.html +1 -1
  22. package/docs/html/variables/RXAP_PUB_SUB_GARBAGE_COLLECTOR_INTERVAL.html +1 -1
  23. package/docs/html/variables/RXAP_TOPICS.html +2 -2
  24. package/docs/markdown/README.md +1 -1
  25. package/docs/markdown/classes/MessageMetaData.md +7 -7
  26. package/docs/markdown/classes/PubSubService.md +12 -12
  27. package/docs/markdown/functions/ProvidePubSub.md +2 -2
  28. package/docs/markdown/functions/withDisableCache.md +2 -2
  29. package/docs/markdown/functions/withDisableGarbageCollector.md +2 -2
  30. package/docs/markdown/functions/withGarbageCollectorInterval.md +2 -2
  31. package/docs/markdown/functions/withMaxCacheSize.md +2 -2
  32. package/docs/markdown/globals.md +2 -2
  33. package/docs/markdown/interfaces/CachedPubSubMessage.md +5 -5
  34. package/docs/markdown/interfaces/PubSubMessage.md +4 -4
  35. package/docs/markdown/variables/RXAP_PUB_SUB_CACHE_SIZE.md +2 -2
  36. package/docs/markdown/variables/RXAP_PUB_SUB_DISABLE_CACHE.md +2 -2
  37. package/docs/markdown/variables/RXAP_PUB_SUB_DISABLE_GARBAGE_COLLECTOR.md +2 -2
  38. package/docs/markdown/variables/RXAP_PUB_SUB_GARBAGE_COLLECTOR_INTERVAL.md +2 -2
  39. package/docs/markdown/variables/RXAP_TOPICS.md +2 -2
  40. package/docs/wiki/Class.MessageMetaData.md +6 -6
  41. package/docs/wiki/Class.PubSubService.md +11 -11
  42. package/docs/wiki/Function.ProvidePubSub.md +1 -1
  43. package/docs/wiki/Function.withDisableCache.md +1 -1
  44. package/docs/wiki/Function.withDisableGarbageCollector.md +1 -1
  45. package/docs/wiki/Function.withGarbageCollectorInterval.md +1 -1
  46. package/docs/wiki/Function.withMaxCacheSize.md +1 -1
  47. package/docs/wiki/Interface.CachedPubSubMessage.md +4 -4
  48. package/docs/wiki/Interface.PubSubMessage.md +3 -3
  49. package/docs/wiki/Variable.RXAP_PUB_SUB_CACHE_SIZE.md +1 -1
  50. package/docs/wiki/Variable.RXAP_PUB_SUB_DISABLE_CACHE.md +1 -1
  51. package/docs/wiki/Variable.RXAP_PUB_SUB_DISABLE_GARBAGE_COLLECTOR.md +1 -1
  52. package/docs/wiki/Variable.RXAP_PUB_SUB_GARBAGE_COLLECTOR_INTERVAL.md +1 -1
  53. package/docs/wiki/Variable.RXAP_TOPICS.md +1 -1
  54. package/docs/wiki/globals.md +1 -1
  55. package/fesm2022/rxap-ngx-pub-sub.mjs +228 -301
  56. package/fesm2022/rxap-ngx-pub-sub.mjs.map +1 -1
  57. package/package.json +5 -5
  58. package/types/rxap-ngx-pub-sub.d.ts +165 -171
@@ -1,178 +1,172 @@
1
- import * as i0 from '@angular/core';
2
- import { Provider, EnvironmentProviders, OnDestroy, InjectionToken } from '@angular/core';
3
- import { Observable } from 'rxjs';
4
-
5
- declare class MessageMetaData<T = unknown> {
6
- /**
7
- * Original topic associated to the message.
8
- * @private
9
- */
10
- private readonly _topic;
11
- /**
12
- * Data associated to message. It's optional.
13
- * @private
14
- */
15
- private readonly _data?;
16
- /**
17
- * A unique identifier of the message sent through the events bus.
18
- * @private
19
- */
20
- private readonly _id;
21
- /**
22
- * Time in milliseconds in which the message was generated.
23
- * @private
24
- */
25
- private readonly _timestamp;
26
- /**
27
- * Constructor for this class.
28
- *
29
- * @param _topic Original topic associated to the message sent through the events bus.
30
- * @param [_data] Optional: Additional data sent with the message.
31
- */
32
- constructor(
33
- /**
34
- * Original topic associated to the message.
35
- * @private
36
- */
37
- _topic: string,
38
- /**
39
- * Data associated to message. It's optional.
40
- * @private
41
- */
42
- _data?: T | undefined);
43
- /**
44
- * Gets unique identifier of the message sent through the events bus.
45
- */
46
- get id(): string;
47
- /**
48
- * Original topic associated to the message.
49
- */
50
- get topic(): string;
51
- /**
52
- * Data associated to message. It's optional.
53
- */
54
- get data(): T | undefined;
55
- /**
56
- * Gets the time in milliseconds in which the message was generated.
57
- */
58
- get timestamp(): number;
59
- /**
60
- * Generates UUID version 4. The solution above uses Math.random() for brevity, however Math.random() is not
61
- * guaranteed to be a high-quality RNG.
62
- *
63
- * @return UUID version 4.
64
- */
65
- private uuid;
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ import * as i0 from "@angular/core";
5
+ import { EnvironmentProviders, InjectionToken, OnDestroy, Provider } from "@angular/core";
6
+ import { Observable } from "rxjs";
7
+ export declare class MessageMetaData<T = unknown> {
8
+ /**
9
+ * Original topic associated to the message.
10
+ * @private
11
+ */
12
+ private readonly _topic;
13
+ /**
14
+ * Data associated to message. It's optional.
15
+ * @private
16
+ */
17
+ private readonly _data?;
18
+ /**
19
+ * A unique identifier of the message sent through the events bus.
20
+ * @private
21
+ */
22
+ private readonly _id;
23
+ /**
24
+ * Time in milliseconds in which the message was generated.
25
+ * @private
26
+ */
27
+ private readonly _timestamp;
28
+ /**
29
+ * Constructor for this class.
30
+ *
31
+ * @param _topic Original topic associated to the message sent through the events bus.
32
+ * @param [_data] Optional: Additional data sent with the message.
33
+ */
34
+ constructor(
35
+ /**
36
+ * Original topic associated to the message.
37
+ * @private
38
+ */
39
+ _topic: string,
40
+ /**
41
+ * Data associated to message. It's optional.
42
+ * @private
43
+ */
44
+ _data?: T | undefined);
45
+ /**
46
+ * Gets unique identifier of the message sent through the events bus.
47
+ */
48
+ get id(): string;
49
+ /**
50
+ * Original topic associated to the message.
51
+ */
52
+ get topic(): string;
53
+ /**
54
+ * Data associated to message. It's optional.
55
+ */
56
+ get data(): T | undefined;
57
+ /**
58
+ * Gets the time in milliseconds in which the message was generated.
59
+ */
60
+ get timestamp(): number;
61
+ /**
62
+ * Generates UUID version 4. The solution above uses Math.random() for brevity, however Math.random() is not
63
+ * guaranteed to be a high-quality RNG.
64
+ *
65
+ * @return UUID version 4.
66
+ */
67
+ private uuid;
66
68
  }
67
-
68
- declare function ProvidePubSub(...providers: Provider[]): Array<Provider | EnvironmentProviders>;
69
- declare function withDisableCache(): Provider;
70
- declare function withDisableGarbageCollector(): Provider;
71
- declare function withMaxCacheSize(size: number): Provider;
72
- declare function withGarbageCollectorInterval(interval: number): Provider;
73
-
74
- interface PubSubMessage<T = unknown> {
75
- /**
76
- * Key to identify message.
77
- */
78
- topic: string;
79
- /**
80
- * Full message metadata.
81
- */
82
- metadata: MessageMetaData<T>;
69
+ export declare function ProvidePubSub(...providers: Provider[]): Array<Provider | EnvironmentProviders>;
70
+ export declare function withDisableCache(): Provider;
71
+ export declare function withDisableGarbageCollector(): Provider;
72
+ export declare function withMaxCacheSize(size: number): Provider;
73
+ export declare function withGarbageCollectorInterval(interval: number): Provider;
74
+ export interface PubSubMessage<T = unknown> {
75
+ /**
76
+ * Key to identify message.
77
+ */
78
+ topic: string;
79
+ /**
80
+ * Full message metadata.
81
+ */
82
+ metadata: MessageMetaData<T>;
83
83
  }
84
- interface CachedPubSubMessage<T = unknown> extends PubSubMessage<T> {
85
- retention?: number;
84
+ export interface CachedPubSubMessage<T = unknown> extends PubSubMessage<T> {
85
+ retention?: number;
86
86
  }
87
-
88
- declare class PubSubService implements OnDestroy {
89
- /**
90
- * Main observable to multicast to all observers.
91
- */
92
- private readonly messageBus;
93
- private readonly cache;
94
- private maxCacheSize;
95
- /**
96
- * Topic message separator.
97
- */
98
- private readonly separator;
99
- private readonly garbageCollectorInterval;
100
- private readonly disableCache;
101
- private readonly disableGarbageCollector;
102
- private garbageCollectorSubscription;
103
- private garbageCollectorInitialized;
104
- get cacheSize(): number;
105
- setMaxCacheSize(size: number): void;
106
- startGarbageCollector(): void;
107
- runGarbageCollector(): void;
108
- stopGarbageCollector(): void;
109
- ngOnDestroy(): void;
110
- /**
111
- * Validates topic matching.
112
- *
113
- * @param topic Topic to identify the message/event.
114
- * @param wildcard Wildcard received from on method.
87
+ export declare class PubSubService implements OnDestroy {
88
+ /**
89
+ * Main observable to multicast to all observers.
90
+ */
91
+ private readonly messageBus;
92
+ private readonly cache;
93
+ private maxCacheSize;
94
+ /**
95
+ * Topic message separator.
96
+ */
97
+ private readonly separator;
98
+ private readonly garbageCollectorInterval;
99
+ private readonly disableCache;
100
+ private readonly disableGarbageCollector;
101
+ private garbageCollectorSubscription;
102
+ private garbageCollectorInitialized;
103
+ get cacheSize(): number;
104
+ setMaxCacheSize(size: number): void;
105
+ startGarbageCollector(): void;
106
+ runGarbageCollector(): void;
107
+ stopGarbageCollector(): void;
108
+ ngOnDestroy(): void;
109
+ /**
110
+ * Validates topic matching.
111
+ *
112
+ * @param topic Topic to identify the message/event.
113
+ * @param wildcard Wildcard received from on method.
114
+ *
115
+ * @return true if topic matches, false otherwise.
116
+ */
117
+ topicMatch(topic: string, wildcard: string): boolean;
118
+ /**
119
+ * @param topic Topic to identify the message.
120
+ * @param [data] Optional: Additional data sent with the message.
121
+ * @param [retention] Optional: Retention time in milliseconds.
122
+ * @throws {Error} topic parameter must be a string and must not be empty.
123
+ */
124
+ publish<T = unknown>(topic: string, data?: T, retention?: number): void;
125
+ /**
126
+ * @param topic Topic to identify the message.
127
+ * @param replayCount Number of messages to replay.
128
+ * @return Observable you can subscribe to listen messages.
129
+ */
130
+ subscribe<T = unknown>(topic: string, replayCount?: number): Observable<MessageMetaData<T>>;
131
+ /**
132
+ * @param topic Topic to identify the message.
133
+ * @param limit Maximum number of messages to return.
134
+ */
135
+ getFromCache<T = unknown>(topic: string, limit?: number): Array<MessageMetaData<T>>;
136
+ static ɵfac: i0.ɵɵFactoryDeclaration<PubSubService, never>;
137
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
138
+ }
139
+ export declare const RXAP_PUB_SUB_CACHE_SIZE: InjectionToken<number>;
140
+ export declare const RXAP_PUB_SUB_GARBAGE_COLLECTOR_INTERVAL: InjectionToken<number>;
141
+ export declare const RXAP_PUB_SUB_DISABLE_CACHE: InjectionToken<boolean>;
142
+ export declare const RXAP_PUB_SUB_DISABLE_GARBAGE_COLLECTOR: InjectionToken<boolean>;
143
+ export declare const RXAP_TOPICS: {
144
+ theme: {
145
+ /**
146
+ * restore is used by the UserSettingsThemeService after the theme is loaded and then used by the ThemeService to
147
+ * set the restored theme properties
115
148
  *
116
- * @return true if topic matches, false otherwise.
117
- */
118
- topicMatch(topic: string, wildcard: string): boolean;
119
- /**
120
- * @param topic Topic to identify the message.
121
- * @param [data] Optional: Additional data sent with the message.
122
- * @param [retention] Optional: Retention time in milliseconds.
123
- * @throws {Error} topic parameter must be a string and must not be empty.
124
- */
125
- publish<T = unknown>(topic: string, data?: T, retention?: number): void;
126
- /**
127
- * @param topic Topic to identify the message.
128
- * @param replayCount Number of messages to replay.
129
- * @return Observable you can subscribe to listen messages.
149
+ * changed is used by the ThemeService to notify the UserSettingsThemeService that the theme properties have changed
130
150
  */
131
- subscribe<T = unknown>(topic: string, replayCount?: number): Observable<MessageMetaData<T>>;
132
- /**
133
- * @param topic Topic to identify the message.
134
- * @param limit Maximum number of messages to return.
135
- */
136
- getFromCache<T = unknown>(topic: string, limit?: number): Array<MessageMetaData<T>>;
137
- static ɵfac: i0.ɵɵFactoryDeclaration<PubSubService, never>;
138
- static ɵprov: i0.ɵɵInjectableDeclaration<PubSubService>;
139
- }
140
-
141
- declare const RXAP_PUB_SUB_CACHE_SIZE: InjectionToken<number>;
142
- declare const RXAP_PUB_SUB_GARBAGE_COLLECTOR_INTERVAL: InjectionToken<number>;
143
- declare const RXAP_PUB_SUB_DISABLE_CACHE: InjectionToken<boolean>;
144
- declare const RXAP_PUB_SUB_DISABLE_GARBAGE_COLLECTOR: InjectionToken<boolean>;
145
-
146
- declare const RXAP_TOPICS: {
147
- theme: {
148
- /**
149
- * restore is used by the UserSettingsThemeService after the theme is loaded and then used by the ThemeService to
150
- * set the restored theme properties
151
- *
152
- * changed is used by the ThemeService to notify the UserSettingsThemeService that the theme properties have changed
153
- */
154
- density: {
155
- restore: string;
156
- changed: string;
157
- };
158
- preset: {
159
- restore: string;
160
- changed: string;
161
- };
162
- typography: {
163
- restore: string;
164
- changed: string;
165
- };
166
- darkMode: {
167
- restore: string;
168
- changed: string;
169
- };
151
+ density: {
152
+ restore: string;
153
+ changed: string;
154
+ };
155
+ preset: {
156
+ restore: string;
157
+ changed: string;
158
+ };
159
+ typography: {
160
+ restore: string;
161
+ changed: string;
170
162
  };
171
- authentication: {
172
- logout: string;
173
- login: string;
163
+ darkMode: {
164
+ restore: string;
165
+ changed: string;
174
166
  };
175
- };
176
-
177
- export { MessageMetaData, ProvidePubSub, PubSubService, RXAP_PUB_SUB_CACHE_SIZE, RXAP_PUB_SUB_DISABLE_CACHE, RXAP_PUB_SUB_DISABLE_GARBAGE_COLLECTOR, RXAP_PUB_SUB_GARBAGE_COLLECTOR_INTERVAL, RXAP_TOPICS, withDisableCache, withDisableGarbageCollector, withGarbageCollectorInterval, withMaxCacheSize };
178
- export type { CachedPubSubMessage, PubSubMessage };
167
+ };
168
+ authentication: {
169
+ logout: string;
170
+ login: string;
171
+ };
172
+ };