@slickgrid-universal/event-pub-sub 2.5.0 → 2.6.2

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 (32) hide show
  1. package/dist/commonjs/basePubSub.service.js +47 -47
  2. package/dist/commonjs/eventPubSub.service.js +175 -175
  3. package/dist/commonjs/index.js +19 -19
  4. package/dist/commonjs/types/eventNamingStyle.enum.js +14 -14
  5. package/dist/commonjs/types/eventSubscription.interface.js +2 -2
  6. package/dist/commonjs/types/index.js +18 -18
  7. package/dist/esm/basePubSub.service.js +43 -43
  8. package/dist/esm/eventPubSub.service.js +171 -171
  9. package/dist/esm/index.js +3 -3
  10. package/dist/esm/types/eventNamingStyle.enum.js +11 -11
  11. package/dist/esm/types/eventSubscription.interface.js +1 -1
  12. package/dist/esm/types/index.js +2 -2
  13. package/dist/tsconfig.tsbuildinfo +1 -0
  14. package/dist/{commonjs → types}/basePubSub.service.d.ts +33 -32
  15. package/dist/types/basePubSub.service.d.ts.map +1 -0
  16. package/dist/{esm → types}/eventPubSub.service.d.ts +73 -72
  17. package/dist/types/eventPubSub.service.d.ts.map +1 -0
  18. package/dist/{esm → types}/index.d.ts +4 -3
  19. package/dist/types/index.d.ts.map +1 -0
  20. package/dist/{esm → types}/types/eventNamingStyle.enum.d.ts +11 -10
  21. package/dist/types/types/eventNamingStyle.enum.d.ts.map +1 -0
  22. package/dist/{commonjs → types}/types/eventSubscription.interface.d.ts +11 -10
  23. package/dist/types/types/eventSubscription.interface.d.ts.map +1 -0
  24. package/dist/{commonjs → types}/types/index.d.ts +3 -2
  25. package/dist/types/types/index.d.ts.map +1 -0
  26. package/package.json +7 -7
  27. package/dist/commonjs/eventPubSub.service.d.ts +0 -72
  28. package/dist/commonjs/index.d.ts +0 -3
  29. package/dist/commonjs/types/eventNamingStyle.enum.d.ts +0 -10
  30. package/dist/esm/basePubSub.service.d.ts +0 -32
  31. package/dist/esm/types/eventSubscription.interface.d.ts +0 -10
  32. package/dist/esm/types/index.d.ts +0 -2
@@ -1,48 +1,48 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BasePubSubService = void 0;
4
- class BasePubSubService {
5
- /**
6
- * Method to publish a message
7
- * @param event The event or channel to publish to.
8
- * @param data The data to publish on the channel.
9
- */
10
- publish(_eventName, _data, _delay) {
11
- throw new Error('BasePubSubService "publish" method must be implemented');
12
- }
13
- /**
14
- * Subscribes to a message channel or message type.
15
- * @param event The event channel or event data type.
16
- * @param callback The callback to be invoked when the specified message is published.
17
- * @return possibly a Subscription
18
- */
19
- // eslint-disable-next-line @typescript-eslint/ban-types
20
- subscribe(_eventName, _callback) {
21
- throw new Error('BasePubSubService "subscribe" method must be implemented');
22
- }
23
- /**
24
- * Subscribes to a custom event message channel or message type.
25
- * This is similar to the "subscribe" except that the callback receives an event typed as CustomEventInit and the data will be inside its "event.detail"
26
- * @param event The event channel or event data type.
27
- * @param callback The callback to be invoked when the specified message is published.
28
- * @return possibly a Subscription
29
- */
30
- // eslint-disable-next-line @typescript-eslint/ban-types
31
- subscribeEvent(_eventName, _callback) {
32
- throw new Error('BasePubSubService "subscribeEvent" method must be implemented');
33
- }
34
- /**
35
- * Unsubscribes a message name
36
- * @param event The event name
37
- * @return possibly a Subscription
38
- */
39
- unsubscribe(_eventName, _callback) {
40
- throw new Error('BasePubSubService "unsubscribe" method must be implemented');
41
- }
42
- /** Unsubscribes all subscriptions that currently exists */
43
- unsubscribeAll(_subscriptions) {
44
- throw new Error('BasePubSubService "unsubscribeAll" method must be implemented');
45
- }
46
- }
47
- exports.BasePubSubService = BasePubSubService;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BasePubSubService = void 0;
4
+ class BasePubSubService {
5
+ /**
6
+ * Method to publish a message
7
+ * @param event The event or channel to publish to.
8
+ * @param data The data to publish on the channel.
9
+ */
10
+ publish(_eventName, _data, _delay) {
11
+ throw new Error('BasePubSubService "publish" method must be implemented');
12
+ }
13
+ /**
14
+ * Subscribes to a message channel or message type.
15
+ * @param event The event channel or event data type.
16
+ * @param callback The callback to be invoked when the specified message is published.
17
+ * @return possibly a Subscription
18
+ */
19
+ // eslint-disable-next-line @typescript-eslint/ban-types
20
+ subscribe(_eventName, _callback) {
21
+ throw new Error('BasePubSubService "subscribe" method must be implemented');
22
+ }
23
+ /**
24
+ * Subscribes to a custom event message channel or message type.
25
+ * This is similar to the "subscribe" except that the callback receives an event typed as CustomEventInit and the data will be inside its "event.detail"
26
+ * @param event The event channel or event data type.
27
+ * @param callback The callback to be invoked when the specified message is published.
28
+ * @return possibly a Subscription
29
+ */
30
+ // eslint-disable-next-line @typescript-eslint/ban-types
31
+ subscribeEvent(_eventName, _callback) {
32
+ throw new Error('BasePubSubService "subscribeEvent" method must be implemented');
33
+ }
34
+ /**
35
+ * Unsubscribes a message name
36
+ * @param event The event name
37
+ * @return possibly a Subscription
38
+ */
39
+ unsubscribe(_eventName, _callback) {
40
+ throw new Error('BasePubSubService "unsubscribe" method must be implemented');
41
+ }
42
+ /** Unsubscribes all subscriptions that currently exists */
43
+ unsubscribeAll(_subscriptions) {
44
+ throw new Error('BasePubSubService "unsubscribeAll" method must be implemented');
45
+ }
46
+ }
47
+ exports.BasePubSubService = BasePubSubService;
48
48
  //# sourceMappingURL=basePubSub.service.js.map
@@ -1,176 +1,176 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EventPubSubService = void 0;
4
- const utils_1 = require("@slickgrid-universal/utils");
5
- const types_1 = require("./types");
6
- class EventPubSubService {
7
- get elementSource() {
8
- return this._elementSource;
9
- }
10
- set elementSource(element) {
11
- this._elementSource = element;
12
- }
13
- get subscribedEvents() {
14
- return this._subscribedEvents;
15
- }
16
- get subscribedEventNames() {
17
- return this._subscribedEvents.map((pubSubEvent) => pubSubEvent.name);
18
- }
19
- constructor(elementSource) {
20
- this._subscribedEvents = [];
21
- this.eventNamingStyle = types_1.EventNamingStyle.camelCase;
22
- // use the provided element
23
- // or create a "phantom DOM node" (a div element that is never rendered) to set up a custom event dispatching
24
- this._elementSource = elementSource || document.createElement('div');
25
- }
26
- dispose() {
27
- var _a;
28
- this.unsubscribeAll();
29
- this._subscribedEvents = [];
30
- clearTimeout(this._timer);
31
- (_a = this._elementSource) === null || _a === void 0 ? void 0 : _a.remove();
32
- this._elementSource = null;
33
- }
34
- /**
35
- * Dispatch of Custom Event, which by default will bubble up & is cancelable
36
- * @param {String} eventName - event name to dispatch
37
- * @param {*} data - optional data to include in the dispatching
38
- * @param {Boolean} isBubbling - is the event bubbling up?
39
- * @param {Boolean} isCancelable - is the event cancellable?
40
- * @returns {Boolean} returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
41
- */
42
- dispatchCustomEvent(eventName, data, isBubbling = true, isCancelable = true) {
43
- var _a;
44
- const eventInit = { bubbles: isBubbling, cancelable: isCancelable };
45
- if (data) {
46
- eventInit.detail = data;
47
- }
48
- return (_a = this._elementSource) === null || _a === void 0 ? void 0 : _a.dispatchEvent(new CustomEvent(eventName, eventInit));
49
- }
50
- /**
51
- * Get the event name by the convention defined, it could be: all lower case, camelCase, PascalCase or kebab-case
52
- * @param {String} inputEventName - name of the event
53
- * @param {String} eventNamePrefix - prefix to use in the event name
54
- * @returns {String} - output event name
55
- */
56
- getEventNameByNamingConvention(inputEventName, eventNamePrefix) {
57
- let outputEventName = '';
58
- switch (this.eventNamingStyle) {
59
- case types_1.EventNamingStyle.camelCase:
60
- outputEventName = (eventNamePrefix !== '') ? `${eventNamePrefix}${(0, utils_1.titleCase)(inputEventName)}` : inputEventName;
61
- break;
62
- case types_1.EventNamingStyle.kebabCase:
63
- outputEventName = (eventNamePrefix !== '') ? `${eventNamePrefix}-${(0, utils_1.toKebabCase)(inputEventName)}` : (0, utils_1.toKebabCase)(inputEventName);
64
- break;
65
- case types_1.EventNamingStyle.lowerCase:
66
- outputEventName = `${eventNamePrefix}${inputEventName}`.toLowerCase();
67
- break;
68
- case types_1.EventNamingStyle.lowerCaseWithoutOnPrefix:
69
- outputEventName = `${eventNamePrefix}${inputEventName.replace(/^on/, '')}`.toLowerCase();
70
- break;
71
- }
72
- return outputEventName;
73
- }
74
- /**
75
- * Method to publish a message via a dispatchEvent.
76
- * Return is a Boolean (from the event dispatch) unless a delay is provided if so we'll return the dispatched event in a Promise with a delayed cycle
77
- * The delay is rarely use and is only used when we want to make sure that certain events have the time to execute
78
- * and we do this because most framework require a cycle before the binding is processed and binding a spinner end up showing too late
79
- * for example this is used for the following events: onBeforeFilterClear, onBeforeFilterChange, onBeforeToggleTreeCollapse, onBeforeSortChange
80
- * @param {String} event - The event or channel to publish to.
81
- * @param {*} data - The data to publish on the channel.
82
- * @param {Number} delay - optional argument to delay the publish event
83
- * @returns {Boolean | Promise} - return type will be a Boolean unless a `delay` is provided then a `Promise<Boolean>` will be returned
84
- */
85
- publish(eventName, data, delay) {
86
- const eventNameByConvention = this.getEventNameByNamingConvention(eventName, '');
87
- if (delay) {
88
- return new Promise(resolve => {
89
- this._timer = setTimeout(() => resolve(this.dispatchCustomEvent(eventNameByConvention, data, true, true)), delay);
90
- });
91
- }
92
- else {
93
- return this.dispatchCustomEvent(eventNameByConvention, data, true, true);
94
- }
95
- }
96
- /**
97
- * Subscribes to a message channel or message type.
98
- * @param event The event channel or event data type.
99
- * @param callback The callback to be invoked when the specified message is published.
100
- * @return possibly a Subscription
101
- */
102
- subscribe(eventName, callback) {
103
- const eventNameByConvention = this.getEventNameByNamingConvention(eventName, '');
104
- // the event listener will return the data in the "event.detail", so we need to return its content to the final callback
105
- // basically we substitute the "data" with "event.detail" so that the user ends up with only the "data" result
106
- this._elementSource.addEventListener(eventNameByConvention, (event) => callback.call(null, event.detail));
107
- this._subscribedEvents.push({ name: eventNameByConvention, listener: callback });
108
- // return a subscription that we can unsubscribe
109
- return {
110
- unsubscribe: () => this.unsubscribe(eventNameByConvention, callback)
111
- };
112
- }
113
- /**
114
- * Subscribes to a custom event message channel or message type.
115
- * This is similar to the "subscribe" except that the callback receives an event typed as CustomEventInit and the data will be inside its "event.detail"
116
- * @param event The event channel or event data type.
117
- * @param callback The callback to be invoked when the specified message is published.
118
- * @return possibly a Subscription
119
- */
120
- subscribeEvent(eventName, listener) {
121
- const eventNameByConvention = this.getEventNameByNamingConvention(eventName, '');
122
- this._elementSource.addEventListener(eventNameByConvention, listener);
123
- this._subscribedEvents.push({ name: eventNameByConvention, listener });
124
- // return a subscription that we can unsubscribe
125
- return {
126
- unsubscribe: () => this.unsubscribe(eventNameByConvention, listener)
127
- };
128
- }
129
- /**
130
- * Unsubscribes a message name
131
- * @param {String} event - the event name
132
- * @param {*} listener - event listener callback
133
- * @param {Boolean} shouldRemoveFromEventList - should we also remove the event from the subscriptions array?
134
- * @return possibly a Subscription
135
- */
136
- unsubscribe(eventName, listener, shouldRemoveFromEventList = true) {
137
- const eventNameByConvention = this.getEventNameByNamingConvention(eventName, '');
138
- this._elementSource.removeEventListener(eventNameByConvention, listener);
139
- if (shouldRemoveFromEventList) {
140
- this.removeSubscribedEventWhenFound(eventName, listener);
141
- }
142
- }
143
- /** Unsubscribes all subscriptions/events that currently exists */
144
- unsubscribeAll(subscriptions) {
145
- if (Array.isArray(subscriptions)) {
146
- let subscription;
147
- do {
148
- subscription = subscriptions.pop();
149
- if (subscription === null || subscription === void 0 ? void 0 : subscription.dispose) {
150
- subscription.dispose();
151
- }
152
- else if (subscription === null || subscription === void 0 ? void 0 : subscription.unsubscribe) {
153
- subscription.unsubscribe();
154
- }
155
- } while (subscription);
156
- }
157
- else {
158
- let pubSubEvent = this._subscribedEvents.pop();
159
- while (pubSubEvent) {
160
- this.unsubscribe(pubSubEvent.name, pubSubEvent.listener, false);
161
- pubSubEvent = this._subscribedEvents.pop();
162
- }
163
- }
164
- }
165
- // --
166
- // protected functions
167
- // --------------------
168
- removeSubscribedEventWhenFound(eventName, listener) {
169
- const eventIdx = this._subscribedEvents.findIndex(evt => evt.name === eventName && evt.listener === listener);
170
- if (eventIdx >= 0) {
171
- this._subscribedEvents.splice(eventIdx, 1);
172
- }
173
- }
174
- }
175
- exports.EventPubSubService = EventPubSubService;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EventPubSubService = void 0;
4
+ const utils_1 = require("@slickgrid-universal/utils");
5
+ const types_1 = require("./types");
6
+ class EventPubSubService {
7
+ get elementSource() {
8
+ return this._elementSource;
9
+ }
10
+ set elementSource(element) {
11
+ this._elementSource = element;
12
+ }
13
+ get subscribedEvents() {
14
+ return this._subscribedEvents;
15
+ }
16
+ get subscribedEventNames() {
17
+ return this._subscribedEvents.map((pubSubEvent) => pubSubEvent.name);
18
+ }
19
+ constructor(elementSource) {
20
+ this._subscribedEvents = [];
21
+ this.eventNamingStyle = types_1.EventNamingStyle.camelCase;
22
+ // use the provided element
23
+ // or create a "phantom DOM node" (a div element that is never rendered) to set up a custom event dispatching
24
+ this._elementSource = elementSource || document.createElement('div');
25
+ }
26
+ dispose() {
27
+ var _a;
28
+ this.unsubscribeAll();
29
+ this._subscribedEvents = [];
30
+ clearTimeout(this._timer);
31
+ (_a = this._elementSource) === null || _a === void 0 ? void 0 : _a.remove();
32
+ this._elementSource = null;
33
+ }
34
+ /**
35
+ * Dispatch of Custom Event, which by default will bubble up & is cancelable
36
+ * @param {String} eventName - event name to dispatch
37
+ * @param {*} data - optional data to include in the dispatching
38
+ * @param {Boolean} isBubbling - is the event bubbling up?
39
+ * @param {Boolean} isCancelable - is the event cancellable?
40
+ * @returns {Boolean} returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
41
+ */
42
+ dispatchCustomEvent(eventName, data, isBubbling = true, isCancelable = true) {
43
+ var _a;
44
+ const eventInit = { bubbles: isBubbling, cancelable: isCancelable };
45
+ if (data) {
46
+ eventInit.detail = data;
47
+ }
48
+ return (_a = this._elementSource) === null || _a === void 0 ? void 0 : _a.dispatchEvent(new CustomEvent(eventName, eventInit));
49
+ }
50
+ /**
51
+ * Get the event name by the convention defined, it could be: all lower case, camelCase, PascalCase or kebab-case
52
+ * @param {String} inputEventName - name of the event
53
+ * @param {String} eventNamePrefix - prefix to use in the event name
54
+ * @returns {String} - output event name
55
+ */
56
+ getEventNameByNamingConvention(inputEventName, eventNamePrefix) {
57
+ let outputEventName = '';
58
+ switch (this.eventNamingStyle) {
59
+ case types_1.EventNamingStyle.camelCase:
60
+ outputEventName = (eventNamePrefix !== '') ? `${eventNamePrefix}${(0, utils_1.titleCase)(inputEventName)}` : inputEventName;
61
+ break;
62
+ case types_1.EventNamingStyle.kebabCase:
63
+ outputEventName = (eventNamePrefix !== '') ? `${eventNamePrefix}-${(0, utils_1.toKebabCase)(inputEventName)}` : (0, utils_1.toKebabCase)(inputEventName);
64
+ break;
65
+ case types_1.EventNamingStyle.lowerCase:
66
+ outputEventName = `${eventNamePrefix}${inputEventName}`.toLowerCase();
67
+ break;
68
+ case types_1.EventNamingStyle.lowerCaseWithoutOnPrefix:
69
+ outputEventName = `${eventNamePrefix}${inputEventName.replace(/^on/, '')}`.toLowerCase();
70
+ break;
71
+ }
72
+ return outputEventName;
73
+ }
74
+ /**
75
+ * Method to publish a message via a dispatchEvent.
76
+ * Return is a Boolean (from the event dispatch) unless a delay is provided if so we'll return the dispatched event in a Promise with a delayed cycle
77
+ * The delay is rarely use and is only used when we want to make sure that certain events have the time to execute
78
+ * and we do this because most framework require a cycle before the binding is processed and binding a spinner end up showing too late
79
+ * for example this is used for the following events: onBeforeFilterClear, onBeforeFilterChange, onBeforeToggleTreeCollapse, onBeforeSortChange
80
+ * @param {String} event - The event or channel to publish to.
81
+ * @param {*} data - The data to publish on the channel.
82
+ * @param {Number} delay - optional argument to delay the publish event
83
+ * @returns {Boolean | Promise} - return type will be a Boolean unless a `delay` is provided then a `Promise<Boolean>` will be returned
84
+ */
85
+ publish(eventName, data, delay) {
86
+ const eventNameByConvention = this.getEventNameByNamingConvention(eventName, '');
87
+ if (delay) {
88
+ return new Promise(resolve => {
89
+ this._timer = setTimeout(() => resolve(this.dispatchCustomEvent(eventNameByConvention, data, true, true)), delay);
90
+ });
91
+ }
92
+ else {
93
+ return this.dispatchCustomEvent(eventNameByConvention, data, true, true);
94
+ }
95
+ }
96
+ /**
97
+ * Subscribes to a message channel or message type.
98
+ * @param event The event channel or event data type.
99
+ * @param callback The callback to be invoked when the specified message is published.
100
+ * @return possibly a Subscription
101
+ */
102
+ subscribe(eventName, callback) {
103
+ const eventNameByConvention = this.getEventNameByNamingConvention(eventName, '');
104
+ // the event listener will return the data in the "event.detail", so we need to return its content to the final callback
105
+ // basically we substitute the "data" with "event.detail" so that the user ends up with only the "data" result
106
+ this._elementSource.addEventListener(eventNameByConvention, (event) => callback.call(null, event.detail));
107
+ this._subscribedEvents.push({ name: eventNameByConvention, listener: callback });
108
+ // return a subscription that we can unsubscribe
109
+ return {
110
+ unsubscribe: () => this.unsubscribe(eventNameByConvention, callback)
111
+ };
112
+ }
113
+ /**
114
+ * Subscribes to a custom event message channel or message type.
115
+ * This is similar to the "subscribe" except that the callback receives an event typed as CustomEventInit and the data will be inside its "event.detail"
116
+ * @param event The event channel or event data type.
117
+ * @param callback The callback to be invoked when the specified message is published.
118
+ * @return possibly a Subscription
119
+ */
120
+ subscribeEvent(eventName, listener) {
121
+ const eventNameByConvention = this.getEventNameByNamingConvention(eventName, '');
122
+ this._elementSource.addEventListener(eventNameByConvention, listener);
123
+ this._subscribedEvents.push({ name: eventNameByConvention, listener });
124
+ // return a subscription that we can unsubscribe
125
+ return {
126
+ unsubscribe: () => this.unsubscribe(eventNameByConvention, listener)
127
+ };
128
+ }
129
+ /**
130
+ * Unsubscribes a message name
131
+ * @param {String} event - the event name
132
+ * @param {*} listener - event listener callback
133
+ * @param {Boolean} shouldRemoveFromEventList - should we also remove the event from the subscriptions array?
134
+ * @return possibly a Subscription
135
+ */
136
+ unsubscribe(eventName, listener, shouldRemoveFromEventList = true) {
137
+ const eventNameByConvention = this.getEventNameByNamingConvention(eventName, '');
138
+ this._elementSource.removeEventListener(eventNameByConvention, listener);
139
+ if (shouldRemoveFromEventList) {
140
+ this.removeSubscribedEventWhenFound(eventName, listener);
141
+ }
142
+ }
143
+ /** Unsubscribes all subscriptions/events that currently exists */
144
+ unsubscribeAll(subscriptions) {
145
+ if (Array.isArray(subscriptions)) {
146
+ let subscription;
147
+ do {
148
+ subscription = subscriptions.pop();
149
+ if (subscription === null || subscription === void 0 ? void 0 : subscription.dispose) {
150
+ subscription.dispose();
151
+ }
152
+ else if (subscription === null || subscription === void 0 ? void 0 : subscription.unsubscribe) {
153
+ subscription.unsubscribe();
154
+ }
155
+ } while (subscription);
156
+ }
157
+ else {
158
+ let pubSubEvent = this._subscribedEvents.pop();
159
+ while (pubSubEvent) {
160
+ this.unsubscribe(pubSubEvent.name, pubSubEvent.listener, false);
161
+ pubSubEvent = this._subscribedEvents.pop();
162
+ }
163
+ }
164
+ }
165
+ // --
166
+ // protected functions
167
+ // --------------------
168
+ removeSubscribedEventWhenFound(eventName, listener) {
169
+ const eventIdx = this._subscribedEvents.findIndex(evt => evt.name === eventName && evt.listener === listener);
170
+ if (eventIdx >= 0) {
171
+ this._subscribedEvents.splice(eventIdx, 1);
172
+ }
173
+ }
174
+ }
175
+ exports.EventPubSubService = EventPubSubService;
176
176
  //# sourceMappingURL=eventPubSub.service.js.map
@@ -1,20 +1,20 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./basePubSub.service"), exports);
18
- __exportStar(require("./eventPubSub.service"), exports);
19
- __exportStar(require("./types"), exports);
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./basePubSub.service"), exports);
18
+ __exportStar(require("./eventPubSub.service"), exports);
19
+ __exportStar(require("./types"), exports);
20
20
  //# sourceMappingURL=index.js.map
@@ -1,15 +1,15 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EventNamingStyle = void 0;
4
- var EventNamingStyle;
5
- (function (EventNamingStyle) {
6
- /** Event name showing in Camel Case, so "onValidationError" would stay as "onValidationError" */
7
- EventNamingStyle["camelCase"] = "camelCase";
8
- /** Event name showing in Kebab Case, so "onValidationError" would become "on-validation-error" */
9
- EventNamingStyle["kebabCase"] = "kebabCase";
10
- /** Event name showing all in lowercase, so "onValidationError" would become "onvalidationerror" */
11
- EventNamingStyle["lowerCase"] = "lowerCase";
12
- /** Event name showing all in lowercase but without the "on" prefix, so "onValidationError" would become "validationerror" */
13
- EventNamingStyle["lowerCaseWithoutOnPrefix"] = "lowerCaseWithoutOnPrefix";
14
- })(EventNamingStyle = exports.EventNamingStyle || (exports.EventNamingStyle = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EventNamingStyle = void 0;
4
+ var EventNamingStyle;
5
+ (function (EventNamingStyle) {
6
+ /** Event name showing in Camel Case, so "onValidationError" would stay as "onValidationError" */
7
+ EventNamingStyle["camelCase"] = "camelCase";
8
+ /** Event name showing in Kebab Case, so "onValidationError" would become "on-validation-error" */
9
+ EventNamingStyle["kebabCase"] = "kebabCase";
10
+ /** Event name showing all in lowercase, so "onValidationError" would become "onvalidationerror" */
11
+ EventNamingStyle["lowerCase"] = "lowerCase";
12
+ /** Event name showing all in lowercase but without the "on" prefix, so "onValidationError" would become "validationerror" */
13
+ EventNamingStyle["lowerCaseWithoutOnPrefix"] = "lowerCaseWithoutOnPrefix";
14
+ })(EventNamingStyle = exports.EventNamingStyle || (exports.EventNamingStyle = {}));
15
15
  //# sourceMappingURL=eventNamingStyle.enum.js.map
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=eventSubscription.interface.js.map
@@ -1,19 +1,19 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./eventNamingStyle.enum"), exports);
18
- __exportStar(require("./eventSubscription.interface"), exports);
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./eventNamingStyle.enum"), exports);
18
+ __exportStar(require("./eventSubscription.interface"), exports);
19
19
  //# sourceMappingURL=index.js.map