@nebula.js/stardust 4.0.0-alpha.9 → 4.0.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/core/esm/dev.js +3874 -3211
- package/core/esm/dev.js.map +1 -1
- package/core/esm/index.js +4 -4
- package/core/esm/index.js.map +1 -1
- package/core/package.json +4 -4
- package/dist/stardust.dev.js +5256 -3912
- package/dist/stardust.dev.js.map +1 -1
- package/dist/stardust.js +14 -15
- package/dist/stardust.js.map +1 -1
- package/package.json +20 -18
- package/types/index.d.ts +115 -70
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nebula.js/stardust",
|
|
3
|
-
"version": "4.0.0
|
|
3
|
+
"version": "4.0.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",
|
|
@@ -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.
|
|
46
|
-
"@emotion/styled": "^11.
|
|
47
|
-
"@mui/icons-material": "^5.11.
|
|
48
|
-
"@mui/material": "^5.
|
|
49
|
-
"@nebula.js/conversion": "^4.0.0
|
|
50
|
-
"@nebula.js/enigma-mocker": "^4.0.0
|
|
51
|
-
"@nebula.js/locale": "^4.0.0
|
|
52
|
-
"@nebula.js/nucleus": "^4.0.0
|
|
53
|
-
"@nebula.js/supernova": "^4.0.0
|
|
54
|
-
"@nebula.js/theme": "^4.0.0
|
|
55
|
-
"@nebula.js/ui": "^4.0.0
|
|
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.0",
|
|
52
|
+
"@nebula.js/enigma-mocker": "^4.0.0",
|
|
53
|
+
"@nebula.js/locale": "^4.0.0",
|
|
54
|
+
"@nebula.js/nucleus": "^4.0.0",
|
|
55
|
+
"@nebula.js/supernova": "^4.0.0",
|
|
56
|
+
"@nebula.js/theme": "^4.0.0",
|
|
57
|
+
"@nebula.js/ui": "^4.0.0",
|
|
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.
|
|
64
|
-
"react-window": "1.8.
|
|
65
|
-
"react-window-infinite-loader": "1.0.
|
|
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": "
|
|
71
|
+
"gitHead": "25856057bb28d545839e8118b0fd96db1af6f4aa"
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
406
|
+
removeListener(eventName: string, listener: ()=>void): void;
|
|
400
407
|
|
|
401
408
|
}
|
|
402
409
|
|
|
@@ -408,6 +415,62 @@ declare namespace stardust {
|
|
|
408
415
|
isEnabled(flag: string): boolean;
|
|
409
416
|
}
|
|
410
417
|
|
|
418
|
+
type Field = string | EngineAPI.INxDimension | EngineAPI.INxMeasure | stardust.LibraryField;
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Rendering configuration for creating and rendering a new object
|
|
422
|
+
*/
|
|
423
|
+
interface CreateConfig {
|
|
424
|
+
type: string;
|
|
425
|
+
version?: string;
|
|
426
|
+
fields?: stardust.Field[];
|
|
427
|
+
properties?: EngineAPI.IGenericObjectProperties;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Configuration for rendering a visualisation, either creating or fetching an existing object.
|
|
432
|
+
*/
|
|
433
|
+
interface RenderConfig {
|
|
434
|
+
element: HTMLElement;
|
|
435
|
+
options?: object;
|
|
436
|
+
plugins?: stardust.Plugin[];
|
|
437
|
+
id?: string;
|
|
438
|
+
type?: string;
|
|
439
|
+
version?: string;
|
|
440
|
+
fields?: stardust.Field[];
|
|
441
|
+
extendProperties?: boolean;
|
|
442
|
+
properties?: EngineAPI.IGenericObjectProperties;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
interface LibraryField {
|
|
446
|
+
qLibraryId: string;
|
|
447
|
+
type: "dimension" | "measure";
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* An object literal containing meta information about the plugin and a function containing the plugin implementation.
|
|
452
|
+
*/
|
|
453
|
+
interface Plugin {
|
|
454
|
+
info: {
|
|
455
|
+
name: string;
|
|
456
|
+
};
|
|
457
|
+
fn: ()=>void;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
interface LoadType {
|
|
461
|
+
(type: {
|
|
462
|
+
name: string;
|
|
463
|
+
version: string;
|
|
464
|
+
}): Promise<stardust.Visualization>;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
interface TypeInfo {
|
|
468
|
+
name: string;
|
|
469
|
+
version?: string;
|
|
470
|
+
load: stardust.LoadType;
|
|
471
|
+
meta?: object;
|
|
472
|
+
}
|
|
473
|
+
|
|
411
474
|
class AppSelections {
|
|
412
475
|
constructor();
|
|
413
476
|
|
|
@@ -427,6 +490,20 @@ declare namespace stardust {
|
|
|
427
490
|
class ObjectSelections {
|
|
428
491
|
constructor();
|
|
429
492
|
|
|
493
|
+
/**
|
|
494
|
+
* Event listener function on instance
|
|
495
|
+
* @param eventType event type that function needs to listen
|
|
496
|
+
* @param callback a callback function to run when event emits
|
|
497
|
+
*/
|
|
498
|
+
addListener(eventType: string, callback: ()=>void): void;
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* Remove listener function on instance
|
|
502
|
+
* @param eventType event type that function needs to listen
|
|
503
|
+
* @param callback a callback function to run when event emits
|
|
504
|
+
*/
|
|
505
|
+
removeListener(eventType: string, callback: ()=>void): void;
|
|
506
|
+
|
|
430
507
|
/**
|
|
431
508
|
* @param paths
|
|
432
509
|
*/
|
|
@@ -468,62 +545,6 @@ declare namespace stardust {
|
|
|
468
545
|
|
|
469
546
|
}
|
|
470
547
|
|
|
471
|
-
type Field = string | EngineAPI.INxDimension | EngineAPI.INxMeasure | stardust.LibraryField;
|
|
472
|
-
|
|
473
|
-
/**
|
|
474
|
-
* Rendering configuration for creating and rendering a new object
|
|
475
|
-
*/
|
|
476
|
-
interface CreateConfig {
|
|
477
|
-
type: string;
|
|
478
|
-
version?: string;
|
|
479
|
-
fields?: stardust.Field[];
|
|
480
|
-
properties?: EngineAPI.IGenericObjectProperties;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
/**
|
|
484
|
-
* Configuration for rendering a visualisation, either creating or fetching an existing object.
|
|
485
|
-
*/
|
|
486
|
-
interface RenderConfig {
|
|
487
|
-
element: HTMLElement;
|
|
488
|
-
options?: object;
|
|
489
|
-
plugins?: stardust.Plugin[];
|
|
490
|
-
id?: string;
|
|
491
|
-
type?: string;
|
|
492
|
-
version?: string;
|
|
493
|
-
fields?: stardust.Field[];
|
|
494
|
-
extendProperties?: boolean;
|
|
495
|
-
properties?: EngineAPI.IGenericObjectProperties;
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
interface LibraryField {
|
|
499
|
-
qLibraryId: string;
|
|
500
|
-
type: "dimension" | "measure";
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
/**
|
|
504
|
-
* An object literal containing meta information about the plugin and a function containing the plugin implementation.
|
|
505
|
-
*/
|
|
506
|
-
interface Plugin {
|
|
507
|
-
info: {
|
|
508
|
-
name: string;
|
|
509
|
-
};
|
|
510
|
-
fn: ()=>void;
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
interface LoadType {
|
|
514
|
-
(type: {
|
|
515
|
-
name: string;
|
|
516
|
-
version: string;
|
|
517
|
-
}): Promise<stardust.Visualization>;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
interface TypeInfo {
|
|
521
|
-
name: string;
|
|
522
|
-
version?: string;
|
|
523
|
-
load: stardust.LoadType;
|
|
524
|
-
meta?: object;
|
|
525
|
-
}
|
|
526
|
-
|
|
527
548
|
interface ActionToolbarElement extends HTMLElement{
|
|
528
549
|
className: "njs-action-toolbar-popover";
|
|
529
550
|
}
|
|
@@ -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
|
|
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
|
|
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
|
|
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[];
|