@sitevision/api 1.0.11 → 1.0.12
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.
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Listen to a given event
|
|
3
|
+
*
|
|
4
|
+
* @param eventName The name of the event
|
|
5
|
+
* @param callback The callback to trigger for the given event
|
|
6
|
+
*/
|
|
7
|
+
export function on(eventName: string, callback: (options: any) => void): void;
|
|
8
|
+
/**
|
|
9
|
+
* Emit a server side event
|
|
10
|
+
*
|
|
11
|
+
* Note! Server side only
|
|
12
|
+
*
|
|
13
|
+
* @param eventName The name of the event to emit
|
|
14
|
+
* @param options The options for the event
|
|
15
|
+
*/
|
|
16
|
+
export function emit(eventName: string, options: any): void;
|
|
17
|
+
/**
|
|
18
|
+
* Trigger a client side event
|
|
19
|
+
*
|
|
20
|
+
* Note! Client side only
|
|
21
|
+
*
|
|
22
|
+
* @param eventName The name of the event to trigger
|
|
23
|
+
* @param options The options for the event
|
|
24
|
+
*/
|
|
25
|
+
export function trigger(eventName: string, options: any): void;
|
|
26
|
+
|
|
27
|
+
declare namespace events {
|
|
28
|
+
export { on, emit, trigger };
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export default events;
|
package/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import './client/toasts';
|
|
|
4
4
|
import './common/app';
|
|
5
5
|
import './common/i18n';
|
|
6
6
|
import './common/router';
|
|
7
|
+
import './common/events';
|
|
7
8
|
|
|
8
9
|
import './server/appData';
|
|
9
10
|
import './server/appResource';
|
|
@@ -17,7 +18,6 @@ import './server/CollaborationGroupType';
|
|
|
17
18
|
import './server/CollaborationGroupUtil';
|
|
18
19
|
import './server/CollaborationGroupWrapper';
|
|
19
20
|
import './server/DateUtil';
|
|
20
|
-
import './server/events';
|
|
21
21
|
import './server/globalAppData';
|
|
22
22
|
import './server/hooks';
|
|
23
23
|
import './server/LandingPageUtil';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sitevision/api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"author": "Sitevision AB",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"access": "public",
|
|
27
27
|
"directory": "dist"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "d514eb8b9219d901e11cbda190e5812a5522fbdc"
|
|
30
30
|
}
|
package/server/events/index.d.ts
DELETED