@nebula.js/stardust 4.0.0-alpha.5 → 4.0.0-alpha.7

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nebula.js/stardust",
3
- "version": "4.0.0-alpha.5",
3
+ "version": "4.0.0-alpha.7",
4
4
  "description": "Product and framework agnostic integration API for Qlik's Associative Engine",
5
5
  "license": "MIT",
6
6
  "author": "QlikTech International AB",
@@ -46,13 +46,13 @@
46
46
  "@emotion/styled": "^11.10.6",
47
47
  "@mui/icons-material": "^5.11.11",
48
48
  "@mui/material": "^5.11.11",
49
- "@nebula.js/conversion": "^4.0.0-alpha.5",
50
- "@nebula.js/enigma-mocker": "^4.0.0-alpha.5",
51
- "@nebula.js/locale": "^4.0.0-alpha.5",
52
- "@nebula.js/nucleus": "^4.0.0-alpha.5",
53
- "@nebula.js/supernova": "^4.0.0-alpha.5",
54
- "@nebula.js/theme": "^4.0.0-alpha.5",
55
- "@nebula.js/ui": "^4.0.0-alpha.5",
49
+ "@nebula.js/conversion": "^4.0.0-alpha.7",
50
+ "@nebula.js/enigma-mocker": "^4.0.0-alpha.7",
51
+ "@nebula.js/locale": "^4.0.0-alpha.7",
52
+ "@nebula.js/nucleus": "^4.0.0-alpha.7",
53
+ "@nebula.js/supernova": "^4.0.0-alpha.7",
54
+ "@nebula.js/theme": "^4.0.0-alpha.7",
55
+ "@nebula.js/ui": "^4.0.0-alpha.7",
56
56
  "@scriptappy/cli": "0.6.0",
57
57
  "@scriptappy/to-dts": "1.0.0-beta.4",
58
58
  "extend": "3.0.2",
@@ -66,5 +66,5 @@
66
66
  "regenerator-runtime": "0.13.11",
67
67
  "semver": "6.3.0"
68
68
  },
69
- "gitHead": "72737e56be17458861e32929b10dfdd20e134661"
69
+ "gitHead": "a6cf04ffd05a61e5c9881620a0c7a4755cccbbfa"
70
70
  }
package/types/index.d.ts CHANGED
@@ -160,6 +160,11 @@ export function onTakeSnapshot(snapshotCallback: ($: EngineAPI.IGenericObjectLay
160
160
  */
161
161
  export function useRenderState(): stardust.RenderState;
162
162
 
163
+ /**
164
+ * Gets an event emitter instance for the visualization.
165
+ */
166
+ export function useEmitter(): Emitter;
167
+
163
168
  /**
164
169
  * Gets the desired keyboard settings and status to applied when rendering the visualization.
165
170
  * A visualization should in general only have tab stops if either `keyboard.enabled` is false or if active is true.
@@ -366,6 +371,20 @@ declare namespace stardust {
366
371
  */
367
372
  convertTo(newType: string, forceUpdate?: boolean): Promise<object>;
368
373
 
374
+ /**
375
+ * Listens to custom events from inside the visualization. See useEmitter
376
+ * @param eventName Event name to listen to
377
+ * @param listener Callback function to invoke
378
+ */
379
+ on(eventName: string, listener: ()=>void): void;
380
+
381
+ /**
382
+ * Removes a listener
383
+ * @param eventName Event name to remove from
384
+ * @param listener Callback function to remove
385
+ */
386
+ off(eventName: string, listener: ()=>void): void;
387
+
369
388
  }
370
389
 
371
390
  interface Flags {