@nebula.js/stardust 4.8.1 → 4.10.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nebula.js/stardust",
3
- "version": "4.8.1",
3
+ "version": "4.10.0",
4
4
  "description": "Product and framework agnostic integration API for Qlik's Associative Engine",
5
5
  "license": "MIT",
6
6
  "author": "QlikTech International AB",
@@ -44,17 +44,17 @@
44
44
  "@types/qlik-engineapi": "12.67.16"
45
45
  },
46
46
  "devDependencies": {
47
- "@emotion/react": "^11.11.1",
47
+ "@emotion/react": "^11.11.3",
48
48
  "@emotion/styled": "^11.11.0",
49
- "@mui/icons-material": "^5.14.18",
50
- "@mui/material": "^5.14.18",
51
- "@nebula.js/conversion": "^4.8.1",
52
- "@nebula.js/enigma-mocker": "^4.8.1",
53
- "@nebula.js/locale": "^4.8.1",
54
- "@nebula.js/nucleus": "^4.8.1",
55
- "@nebula.js/supernova": "^4.8.1",
56
- "@nebula.js/theme": "^4.8.1",
57
- "@nebula.js/ui": "^4.8.1",
49
+ "@mui/icons-material": "^5.15.6",
50
+ "@mui/material": "^5.15.6",
51
+ "@nebula.js/conversion": "^4.10.0",
52
+ "@nebula.js/enigma-mocker": "^4.10.0",
53
+ "@nebula.js/locale": "^4.10.0",
54
+ "@nebula.js/nucleus": "^4.10.0",
55
+ "@nebula.js/supernova": "^4.10.0",
56
+ "@nebula.js/theme": "^4.10.0",
57
+ "@nebula.js/ui": "^4.10.0",
58
58
  "@scriptappy/cli": "0.10.0",
59
59
  "@scriptappy/from-jsdoc": "0.19.0",
60
60
  "@scriptappy/to-dts": "1.0.0-beta.4",
@@ -63,11 +63,11 @@
63
63
  "react": "18.2.0",
64
64
  "react-dom": "18.2.0",
65
65
  "react-test-renderer": "18.2.0",
66
- "react-virtualized-auto-sizer": "1.0.20",
66
+ "react-virtualized-auto-sizer": "1.0.21",
67
67
  "react-window": "1.8.10",
68
68
  "react-window-infinite-loader": "1.0.9",
69
- "regenerator-runtime": "0.14.0",
69
+ "regenerator-runtime": "0.14.1",
70
70
  "semver": "7.5.4"
71
71
  },
72
- "gitHead": "9c53625d63aa583a333cd1874d8520a81a068855"
72
+ "gitHead": "1be7d26b3c063c05c6d3e85c1ad2b097177dccb3"
73
73
  }
package/types/index.d.ts CHANGED
@@ -26,6 +26,9 @@ export function useState<S>(initialState: S | (()=>S)): [S, stardust.SetStateFn<
26
26
 
27
27
  /**
28
28
  * Triggers a callback function when a dependent value changes.
29
+ *
30
+ * Omitting the dependency array will have the hook run on each update
31
+ * and an empty dependency array runs only once.
29
32
  * @param effect The callback.
30
33
  * @param deps The dependencies that should trigger the callback.
31
34
  */
@@ -40,6 +43,9 @@ export function useMemo<T>(factory: ()=>T, deps: any[]): T;
40
43
 
41
44
  /**
42
45
  * Runs a callback function when a dependent changes.
46
+ *
47
+ * Useful for async operations that otherwise cause no side effects.
48
+ * Do not add for example listeners withing the callback as there is no teardown function.
43
49
  * @param factory The factory function that calls the promise.
44
50
  * @param deps The dependencies.
45
51
  */
@@ -227,7 +233,11 @@ declare namespace stardust {
227
233
  }
228
234
 
229
235
  interface Configuration {
230
- load?: stardust.LoadType;
236
+ /**
237
+ * Fallback load function for missing types
238
+ * @param $
239
+ */
240
+ load($: stardust.LoadType): Promise<stardust.Visualization>;
231
241
  context?: stardust.Context;
232
242
  types?: stardust.TypeInfo[];
233
243
  themes?: stardust.ThemeInfo[];
@@ -242,6 +252,7 @@ declare namespace stardust {
242
252
  interactions?: stardust.Interactions;
243
253
  keyboardNavigation?: boolean;
244
254
  disableCellPadding?: boolean;
255
+ dataViewType?: string;
245
256
  }
246
257
 
247
258
  interface Galaxy {
@@ -338,6 +349,7 @@ declare namespace stardust {
338
349
  frequencyMode?: stardust.FrequencyMode;
339
350
  histogram?: boolean;
340
351
  search?: stardust.SearchMode;
352
+ showLock?: boolean;
341
353
  toolbar?: boolean;
342
354
  checkboxes?: boolean;
343
355
  dense?: boolean;
@@ -411,6 +423,16 @@ declare namespace stardust {
411
423
  */
412
424
  convertTo(newType: string, forceUpdate?: boolean, forcePatch?: boolean): Promise<object>;
413
425
 
426
+ /**
427
+ * Toggles the chart to a data view of the chart.
428
+ *
429
+ * The chart will be toggled to the type defined in the nebula context (dataViewType).
430
+ *
431
+ * The default dataViewType for nebula is sn-table. The specified chart type needs to be registered as well, in order to make it possible to render the data view.
432
+ * @param showDataView If included, forces the chart into a specific state. True will show data view, and false will show the original chart. If not included it will always toggle between the two views.
433
+ */
434
+ toggleDataView(showDataView?: boolean): void;
435
+
414
436
  /**
415
437
  * Listens to custom events from inside the visualization. See useEmitter
416
438
  * @param eventName Event name to listen to
@@ -623,6 +645,11 @@ declare namespace stardust {
623
645
  (newState: S | (($: S)=>S)): void;
624
646
  }
625
647
 
648
+ /**
649
+ * Callback function that should return a function that in turns gets
650
+ * called before the hook runs again or when the component is destroyed.
651
+ * For example to remove any listeners added in the callback itself.
652
+ */
626
653
  type EffectCallback = ()=>void | (()=>void);
627
654
 
628
655
  interface Rect {