@nebula.js/stardust 4.0.0-alpha.8 → 4.0.0-alpha.9

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.8",
3
+ "version": "4.0.0-alpha.9",
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.15",
49
- "@nebula.js/conversion": "^4.0.0-alpha.8",
50
- "@nebula.js/enigma-mocker": "^4.0.0-alpha.8",
51
- "@nebula.js/locale": "^4.0.0-alpha.8",
52
- "@nebula.js/nucleus": "^4.0.0-alpha.8",
53
- "@nebula.js/supernova": "^4.0.0-alpha.8",
54
- "@nebula.js/theme": "^4.0.0-alpha.8",
55
- "@nebula.js/ui": "^4.0.0-alpha.8",
49
+ "@nebula.js/conversion": "^4.0.0-alpha.9",
50
+ "@nebula.js/enigma-mocker": "^4.0.0-alpha.9",
51
+ "@nebula.js/locale": "^4.0.0-alpha.9",
52
+ "@nebula.js/nucleus": "^4.0.0-alpha.9",
53
+ "@nebula.js/supernova": "^4.0.0-alpha.9",
54
+ "@nebula.js/theme": "^4.0.0-alpha.9",
55
+ "@nebula.js/ui": "^4.0.0-alpha.9",
56
56
  "@scriptappy/cli": "0.6.0",
57
57
  "@scriptappy/to-dts": "1.0.0-beta.4",
58
58
  "extend": "3.0.2",
@@ -60,11 +60,11 @@
60
60
  "react": "18.2.0",
61
61
  "react-dom": "18.2.0",
62
62
  "react-test-renderer": "18.2.0",
63
- "react-virtualized-auto-sizer": "^1.0.11",
63
+ "react-virtualized-auto-sizer": "1.0.7",
64
64
  "react-window": "1.8.8",
65
65
  "react-window-infinite-loader": "1.0.8",
66
66
  "regenerator-runtime": "0.13.11",
67
67
  "semver": "6.3.0"
68
68
  },
69
- "gitHead": "f8bf3d9036d17809c6f2c511b1e1b5928d4ddcf7"
69
+ "gitHead": "4041f477f85702b2e55626d5920ca5604a45fbf2"
70
70
  }
package/types/index.d.ts CHANGED
@@ -235,10 +235,23 @@ declare namespace stardust {
235
235
 
236
236
  /**
237
237
  * Renders a visualization or sheet into an HTMLElement.
238
+ * Visualizations can either be existing objects or created on the fly.
238
239
  * Support for sense sheets is experimental.
239
240
  * @param cfg The render configuration.
240
241
  */
241
- render(cfg: stardust.CreateConfig | stardust.GetConfig): Promise<stardust.Viz | stardust.Sheet>;
242
+ render(cfg: stardust.RenderConfig): Promise<stardust.Viz | stardust.Sheet>;
243
+
244
+ /**
245
+ * Creates a visualization model
246
+ * @param cfg The create configuration.
247
+ */
248
+ create(cfg: stardust.CreateConfig): Promise<EngineAPI.IGenericObject>;
249
+
250
+ /**
251
+ * Generates properties for a visualization object
252
+ * @param cfg The create configuration.
253
+ */
254
+ generateProperties(cfg: stardust.CreateConfig): Promise<object>;
242
255
 
243
256
  /**
244
257
  * Updates the current context of this embed instance.
@@ -357,7 +370,7 @@ declare namespace stardust {
357
370
 
358
371
  id: string;
359
372
 
360
- model: string;
373
+ model: EngineAPI.IGenericObject;
361
374
 
362
375
  /**
363
376
  * Destroys the visualization and removes it from the the DOM.
@@ -460,28 +473,26 @@ declare namespace stardust {
460
473
  /**
461
474
  * Rendering configuration for creating and rendering a new object
462
475
  */
463
- interface CreateConfig extends stardust.BaseConfig{
476
+ interface CreateConfig {
464
477
  type: string;
465
478
  version?: string;
466
479
  fields?: stardust.Field[];
467
- extendProperties?: boolean;
468
480
  properties?: EngineAPI.IGenericObjectProperties;
469
481
  }
470
482
 
471
483
  /**
472
- * Basic rendering configuration for rendering an object
484
+ * Configuration for rendering a visualisation, either creating or fetching an existing object.
473
485
  */
474
- interface BaseConfig {
486
+ interface RenderConfig {
475
487
  element: HTMLElement;
476
488
  options?: object;
477
489
  plugins?: stardust.Plugin[];
478
- }
479
-
480
- /**
481
- * Rendering configuration for rendering an existing object
482
- */
483
- interface GetConfig extends stardust.BaseConfig{
484
- id: string;
490
+ id?: string;
491
+ type?: string;
492
+ version?: string;
493
+ fields?: stardust.Field[];
494
+ extendProperties?: boolean;
495
+ properties?: EngineAPI.IGenericObjectProperties;
485
496
  }
486
497
 
487
498
  interface LibraryField {