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

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.9",
3
+ "version": "4.0.1",
4
4
  "description": "Product and framework agnostic integration API for Qlik's Associative Engine",
5
5
  "license": "MIT",
6
6
  "author": "QlikTech International AB",
@@ -34,25 +34,27 @@
34
34
  "build:dev": "rollup --config ../../rollup.config.js",
35
35
  "build:watch": "rollup --config ../../rollup.config.js -w",
36
36
  "prepublishOnly": "rm -rf dist && yarn run build",
37
- "spec": "sy from-jsdoc -c ./api-spec/spec.conf.js",
37
+ "spec:stardust": "sy from-jsdoc -c ./api-spec/spec.conf.js",
38
+ "spec:listbox": "sy from-jsdoc -c ./api-spec/listbox-spec.conf.js",
39
+ "spec": "yarn run spec:stardust && yarn run spec:listbox",
38
40
  "ts": "sy to-dts -c ./api-spec/spec.conf.js",
39
- "version": "yarn run spec && yarn run ts && git add ./api-spec/spec.json ./types/index.d.ts"
41
+ "version": "yarn run spec && yarn run ts && git add ./api-spec/spec.json ./api-spec/listbox-spec.json ./types/index.d.ts"
40
42
  },
41
43
  "dependencies": {
42
44
  "@types/qlik-engineapi": "12.67.12"
43
45
  },
44
46
  "devDependencies": {
45
- "@emotion/react": "^11.10.6",
46
- "@emotion/styled": "^11.10.6",
47
- "@mui/icons-material": "^5.11.11",
48
- "@mui/material": "^5.11.15",
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",
47
+ "@emotion/react": "^11.11.0",
48
+ "@emotion/styled": "^11.11.0",
49
+ "@mui/icons-material": "^5.11.16",
50
+ "@mui/material": "^5.12.3",
51
+ "@nebula.js/conversion": "^4.0.1",
52
+ "@nebula.js/enigma-mocker": "^4.0.1",
53
+ "@nebula.js/locale": "^4.0.1",
54
+ "@nebula.js/nucleus": "^4.0.1",
55
+ "@nebula.js/supernova": "^4.0.1",
56
+ "@nebula.js/theme": "^4.0.1",
57
+ "@nebula.js/ui": "^4.0.1",
56
58
  "@scriptappy/cli": "0.6.0",
57
59
  "@scriptappy/to-dts": "1.0.0-beta.4",
58
60
  "extend": "3.0.2",
@@ -60,11 +62,11 @@
60
62
  "react": "18.2.0",
61
63
  "react-dom": "18.2.0",
62
64
  "react-test-renderer": "18.2.0",
63
- "react-virtualized-auto-sizer": "1.0.7",
64
- "react-window": "1.8.8",
65
- "react-window-infinite-loader": "1.0.8",
65
+ "react-virtualized-auto-sizer": "1.0.15",
66
+ "react-window": "1.8.9",
67
+ "react-window-infinite-loader": "1.0.9",
66
68
  "regenerator-runtime": "0.13.11",
67
69
  "semver": "6.3.0"
68
70
  },
69
- "gitHead": "4041f477f85702b2e55626d5920ca5604a45fbf2"
71
+ "gitHead": "c105707099dc79c405f01d65cc338f1614ea9750"
70
72
  }
package/types/index.d.ts CHANGED
@@ -132,10 +132,19 @@ export function useAction<A>(factory: ()=>stardust.ActionDefinition<A>, deps?: a
132
132
  * Gets the desired constraints that should be applied when rendering the visualization.
133
133
  *
134
134
  * The constraints are set on the embed configuration before the visualization is rendered
135
- * and should respected by you when implementing the visualization.
135
+ * and should be respected when implementing the visualization.
136
+ * @deprecated
136
137
  */
137
138
  export function useConstraints(): stardust.Constraints;
138
139
 
140
+ /**
141
+ * Gets the desired interaction states that should be applied when rendering the visualization.
142
+ *
143
+ * The interactions are set on the embed configuration before the visualization is rendered
144
+ * and should be respected when implementing the visualization.
145
+ */
146
+ export function useInteractionState(): stardust.Interactions;
147
+
139
148
  /**
140
149
  * Gets the options object provided when rendering the visualization.
141
150
  *
@@ -212,15 +221,13 @@ declare namespace stardust {
212
221
  }
213
222
 
214
223
  interface Context {
215
- keyboardNavigation?: boolean;
216
- constraints?: {
217
- active?: boolean;
218
- passive?: boolean;
219
- select?: boolean;
220
- };
221
224
  theme?: string;
222
225
  language?: string;
223
226
  deviceType?: string;
227
+ constraints?: stardust.Constraints;
228
+ interactions?: stardust.Interactions;
229
+ keyboardNavigation?: boolean;
230
+ disableCellPadding?: boolean;
224
231
  }
225
232
 
226
233
  interface Galaxy {
@@ -389,14 +396,14 @@ declare namespace stardust {
389
396
  * @param eventName Event name to listen to
390
397
  * @param listener Callback function to invoke
391
398
  */
392
- on(eventName: string, listener: ()=>void): void;
399
+ addListener(eventName: string, listener: ()=>void): void;
393
400
 
394
401
  /**
395
402
  * Removes a listener
396
403
  * @param eventName Event name to remove from
397
404
  * @param listener Callback function to remove
398
405
  */
399
- off(eventName: string, listener: ()=>void): void;
406
+ removeListener(eventName: string, listener: ()=>void): void;
400
407
 
401
408
  }
402
409
 
@@ -427,6 +434,20 @@ declare namespace stardust {
427
434
  class ObjectSelections {
428
435
  constructor();
429
436
 
437
+ /**
438
+ * Event listener function on instance
439
+ * @param eventType event type that function needs to listen
440
+ * @param callback a callback function to run when event emits
441
+ */
442
+ addListener(eventType: string, callback: ()=>void): void;
443
+
444
+ /**
445
+ * Remove listener function on instance
446
+ * @param eventType event type that function needs to listen
447
+ * @param callback a callback function to run when event emits
448
+ */
449
+ removeListener(eventType: string, callback: ()=>void): void;
450
+
430
451
  /**
431
452
  * @param paths
432
453
  */
@@ -597,10 +618,21 @@ declare namespace stardust {
597
618
  };
598
619
  }
599
620
 
621
+ /**
622
+ * @deprecated
623
+ */
600
624
  interface Constraints {
601
625
  passive?: boolean;
602
626
  active?: boolean;
603
627
  select?: boolean;
628
+ edit?: boolean;
629
+ }
630
+
631
+ interface Interactions {
632
+ passive?: boolean;
633
+ active?: boolean;
634
+ select?: boolean;
635
+ edit?: boolean;
604
636
  }
605
637
 
606
638
  interface RenderState {
@@ -612,17 +644,19 @@ declare namespace stardust {
612
644
  enabled: boolean;
613
645
  active: boolean;
614
646
  /**
615
- * Function used by the visualization to tell Nebula to it wants to relinquish focus
647
+ * Function used by the visualization to tell Nebula it wants to relinquish focus
648
+ * @param $
616
649
  */
617
- blur?(): void;
650
+ blur?($: boolean): void;
618
651
  /**
619
- * Function used by the visualization to tell Nebula to it wants focus
652
+ * Function used by the visualization to tell Nebula it wants to focus
620
653
  */
621
654
  focus?(): void;
622
655
  /**
623
- * Function used by the visualization to tell Nebula to focus the selection toolbar
656
+ * Function used by the visualization to tell Nebula that focus the selection toolbar
657
+ * @param $
624
658
  */
625
- focusSelection?(): void;
659
+ focusSelection?($: boolean): void;
626
660
  }
627
661
 
628
662
  /**
@@ -673,6 +707,12 @@ declare namespace stardust {
673
707
  class Translator {
674
708
  constructor();
675
709
 
710
+ /**
711
+ * Returns current locale.
712
+ * @param lang language Locale to updated the currentLocale value
713
+ */
714
+ language(lang?: string): string;
715
+
676
716
  /**
677
717
  * Registers a string in multiple locales
678
718
  * @param item
@@ -694,6 +734,11 @@ declare namespace stardust {
694
734
  class Theme {
695
735
  constructor();
696
736
 
737
+ /**
738
+ * Returns theme name
739
+ */
740
+ name(): string;
741
+
697
742
  getDataColorScales(): stardust.Theme.ScalePalette[];
698
743
 
699
744
  getDataColorPalettes(): stardust.Theme.DataPalette[];