@nebula.js/stardust 5.0.0-alpha.2 → 5.0.0-alpha.3

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": "5.0.0-alpha.2",
3
+ "version": "5.0.0-alpha.3",
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,15 +46,15 @@
46
46
  "devDependencies": {
47
47
  "@emotion/react": "^11.11.3",
48
48
  "@emotion/styled": "^11.11.0",
49
- "@mui/icons-material": "^5.15.2",
50
- "@mui/material": "^5.15.2",
51
- "@nebula.js/conversion": "^5.0.0-alpha.2",
52
- "@nebula.js/enigma-mocker": "^5.0.0-alpha.2",
53
- "@nebula.js/locale": "^5.0.0-alpha.2",
54
- "@nebula.js/nucleus": "^5.0.0-alpha.2",
55
- "@nebula.js/supernova": "^5.0.0-alpha.2",
56
- "@nebula.js/theme": "^5.0.0-alpha.2",
57
- "@nebula.js/ui": "^5.0.0-alpha.2",
49
+ "@mui/icons-material": "^5.15.7",
50
+ "@mui/material": "^5.15.7",
51
+ "@nebula.js/conversion": "^5.0.0-alpha.3",
52
+ "@nebula.js/enigma-mocker": "^5.0.0-alpha.3",
53
+ "@nebula.js/locale": "^5.0.0-alpha.3",
54
+ "@nebula.js/nucleus": "^5.0.0-alpha.3",
55
+ "@nebula.js/supernova": "^5.0.0-alpha.3",
56
+ "@nebula.js/theme": "^5.0.0-alpha.3",
57
+ "@nebula.js/ui": "^5.0.0-alpha.3",
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.22",
67
67
  "react-window": "1.8.10",
68
68
  "react-window-infinite-loader": "1.0.9",
69
69
  "regenerator-runtime": "0.14.1",
70
70
  "semver": "7.5.4"
71
71
  },
72
- "gitHead": "8fb8959ca3f42da1a11e0ac6beda1ada8dce076f"
72
+ "gitHead": "3520861f5ab7543f57fb873049dabecf9e132e17"
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[];
@@ -339,6 +349,7 @@ declare namespace stardust {
339
349
  frequencyMode?: stardust.FrequencyMode;
340
350
  histogram?: boolean;
341
351
  search?: stardust.SearchMode;
352
+ showLock?: boolean;
342
353
  toolbar?: boolean;
343
354
  checkboxes?: boolean;
344
355
  dense?: boolean;
@@ -525,6 +536,16 @@ declare namespace stardust {
525
536
 
526
537
  }
527
538
 
539
+ /**
540
+ * An object literal containing meta information about the plugin and a function containing the plugin implementation.
541
+ */
542
+ interface Plugin {
543
+ info: {
544
+ name: string;
545
+ };
546
+ fn: ()=>void;
547
+ }
548
+
528
549
  type Field = string | EngineAPI.INxDimension | EngineAPI.INxMeasure | stardust.LibraryField;
529
550
 
530
551
  /**
@@ -557,16 +578,6 @@ declare namespace stardust {
557
578
  type: "dimension" | "measure";
558
579
  }
559
580
 
560
- /**
561
- * An object literal containing meta information about the plugin and a function containing the plugin implementation.
562
- */
563
- interface Plugin {
564
- info: {
565
- name: string;
566
- };
567
- fn: ()=>void;
568
- }
569
-
570
581
  interface LoadType {
571
582
  (type: {
572
583
  name: string;
@@ -634,6 +645,11 @@ declare namespace stardust {
634
645
  (newState: S | (($: S)=>S)): void;
635
646
  }
636
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
+ */
637
653
  type EffectCallback = ()=>void | (()=>void);
638
654
 
639
655
  interface Rect {