@nebula.js/stardust 5.0.0-alpha.3 → 5.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 +2781 -2175
- 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 +3 -3
- package/dist/stardust.dev.js +3381 -2684
- package/dist/stardust.dev.js.map +1 -1
- package/dist/stardust.js +14 -14
- package/dist/stardust.js.map +1 -1
- package/package.json +16 -18
- package/types/index.d.ts +36 -36
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nebula.js/stardust",
|
|
3
|
-
"version": "5.0.0
|
|
3
|
+
"version": "5.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",
|
|
@@ -40,34 +40,32 @@
|
|
|
40
40
|
"ts": "sy to-dts -c ./api-spec/spec.conf.js",
|
|
41
41
|
"version": "yarn run spec && yarn run ts && git add ./api-spec/spec.json ./api-spec/listbox-spec.json ./types/index.d.ts"
|
|
42
42
|
},
|
|
43
|
-
"dependencies": {
|
|
44
|
-
"@types/qlik-engineapi": "12.67.16"
|
|
45
|
-
},
|
|
46
43
|
"devDependencies": {
|
|
47
|
-
"@emotion/react": "^11.11.
|
|
44
|
+
"@emotion/react": "^11.11.4",
|
|
48
45
|
"@emotion/styled": "^11.11.0",
|
|
49
|
-
"@mui/icons-material": "^5.15.
|
|
50
|
-
"@mui/material": "^5.15.
|
|
51
|
-
"@nebula.js/conversion": "^5.0.0
|
|
52
|
-
"@nebula.js/enigma-mocker": "^5.0.0
|
|
53
|
-
"@nebula.js/locale": "^5.0.0
|
|
54
|
-
"@nebula.js/nucleus": "^5.0.0
|
|
55
|
-
"@nebula.js/supernova": "^5.0.0
|
|
56
|
-
"@nebula.js/theme": "^5.0.0
|
|
57
|
-
"@nebula.js/ui": "^5.0.0
|
|
46
|
+
"@mui/icons-material": "^5.15.13",
|
|
47
|
+
"@mui/material": "^5.15.13",
|
|
48
|
+
"@nebula.js/conversion": "^5.0.0",
|
|
49
|
+
"@nebula.js/enigma-mocker": "^5.0.0",
|
|
50
|
+
"@nebula.js/locale": "^5.0.0",
|
|
51
|
+
"@nebula.js/nucleus": "^5.0.0",
|
|
52
|
+
"@nebula.js/supernova": "^5.0.0",
|
|
53
|
+
"@nebula.js/theme": "^5.0.0",
|
|
54
|
+
"@nebula.js/ui": "^5.0.0",
|
|
55
|
+
"@qlik/api": "^0.3.0",
|
|
58
56
|
"@scriptappy/cli": "0.10.0",
|
|
59
57
|
"@scriptappy/from-jsdoc": "0.19.0",
|
|
60
|
-
"@scriptappy/to-dts": "1.0.0
|
|
58
|
+
"@scriptappy/to-dts": "1.0.0",
|
|
61
59
|
"extend": "3.0.2",
|
|
62
60
|
"node-event-emitter": "0.0.1",
|
|
63
61
|
"react": "18.2.0",
|
|
64
62
|
"react-dom": "18.2.0",
|
|
65
63
|
"react-test-renderer": "18.2.0",
|
|
66
|
-
"react-virtualized-auto-sizer": "1.0.
|
|
64
|
+
"react-virtualized-auto-sizer": "1.0.24",
|
|
67
65
|
"react-window": "1.8.10",
|
|
68
66
|
"react-window-infinite-loader": "1.0.9",
|
|
69
67
|
"regenerator-runtime": "0.14.1",
|
|
70
|
-
"semver": "7.
|
|
68
|
+
"semver": "7.6.0"
|
|
71
69
|
},
|
|
72
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "9b45a8bffe91cdadb36f3b2cad7414872a2e94d1"
|
|
73
71
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// File generated automatically by "@scriptappy/to-dts"; DO NOT EDIT.
|
|
2
|
-
|
|
2
|
+
import * as qix from '@qlik/api/qix';
|
|
3
3
|
/**
|
|
4
4
|
* Initiates a new `Embed` instance using the specified enigma `app`.
|
|
5
5
|
* @param app
|
|
6
6
|
* @param instanceConfig
|
|
7
7
|
*/
|
|
8
|
-
export function embed(app:
|
|
8
|
+
export function embed(app: qix.Doc, instanceConfig?: stardust.Configuration): stardust.Embed;
|
|
9
9
|
|
|
10
10
|
export namespace embed {
|
|
11
11
|
/**
|
|
@@ -64,7 +64,7 @@ export function useRect(): stardust.Rect;
|
|
|
64
64
|
/**
|
|
65
65
|
* Gets the layout of the generic object associated with this visualization.
|
|
66
66
|
*/
|
|
67
|
-
export function useLayout():
|
|
67
|
+
export function useLayout(): qix.GenericObjectLayout;
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
70
|
* Gets the layout of the generic object associated with this visualization.
|
|
@@ -75,27 +75,27 @@ export function useLayout(): EngineAPI.IGenericObjectLayout;
|
|
|
75
75
|
* The returned value from `useStaleLayout()` and `useLayout()` are identical when the object
|
|
76
76
|
* is not in a modal state.
|
|
77
77
|
*/
|
|
78
|
-
export function useStaleLayout():
|
|
78
|
+
export function useStaleLayout(): qix.GenericObjectLayout;
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
81
|
* Gets the layout of the app associated with this visualization.
|
|
82
82
|
*/
|
|
83
|
-
export function useAppLayout():
|
|
83
|
+
export function useAppLayout(): qix.NxAppLayout;
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
86
|
* Gets the generic object API of the generic object connected to this visualization.
|
|
87
87
|
*/
|
|
88
|
-
export function useModel():
|
|
88
|
+
export function useModel(): qix.GenericObject | undefined;
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
91
|
* Gets the doc API.
|
|
92
92
|
*/
|
|
93
|
-
export function useApp():
|
|
93
|
+
export function useApp(): qix.Doc | undefined;
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
96
|
* Gets the global API.
|
|
97
97
|
*/
|
|
98
|
-
export function useGlobal():
|
|
98
|
+
export function useGlobal(): qix.Global | undefined;
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
101
|
* Gets the object selections.
|
|
@@ -176,7 +176,7 @@ export function useImperativeHandle<T>(factory: ()=>T, deps?: any[]): void;
|
|
|
176
176
|
* Registers a callback that is called when a snapshot is taken.
|
|
177
177
|
* @param snapshotCallback
|
|
178
178
|
*/
|
|
179
|
-
export function onTakeSnapshot(snapshotCallback: ($:
|
|
179
|
+
export function onTakeSnapshot(snapshotCallback: ($: qix.GenericObjectLayout)=>Promise<qix.GenericObjectLayout>): void;
|
|
180
180
|
|
|
181
181
|
/**
|
|
182
182
|
* Gets render state instance.
|
|
@@ -215,15 +215,15 @@ export namespace Conversion {
|
|
|
215
215
|
*/
|
|
216
216
|
export namespace EnigmaMocker {
|
|
217
217
|
/**
|
|
218
|
-
* Mocks Engima app functionality. It accepts one / many generic objects as input argument and returns the mocked Enigma app. Each generic object represents one
|
|
218
|
+
* Mocks Engima app functionality. It accepts one / many generic objects as input argument and returns the mocked Enigma app. Each generic object represents one visualisation and specifies how it behaves. For example, what layout to use the data to present.
|
|
219
219
|
*
|
|
220
220
|
* The generic object is represented with a Javascript object with a number of properties. The name of the property correlates to the name in the Enigma model for `app.getObject(id)`. For example, the property `getLayout` in the generic object is used to define `app.getObject(id).getLayout()`. Any property can be added to the fixture (just make sure it exists and behaves as in the Enigma model!).
|
|
221
221
|
*
|
|
222
222
|
* The value for each property is either fixed (string / boolean / number / object) or a function. Arguments are forwarded to the function to allow for greater flexibility. For example, this can be used to return different hypercube data when scrolling in the chart.
|
|
223
|
-
* @param genericObjects Generic objects
|
|
223
|
+
* @param genericObjects Generic objects controlling behaviour of visualizations.
|
|
224
224
|
* @param options Options
|
|
225
225
|
*/
|
|
226
|
-
function fromGenericObjects(genericObjects: object[], options?: stardust.EnigmaMockerOptions): Promise<
|
|
226
|
+
function fromGenericObjects(genericObjects: object[], options?: stardust.EnigmaMockerOptions): Promise<qix.Doc>;
|
|
227
227
|
|
|
228
228
|
}
|
|
229
229
|
|
|
@@ -277,7 +277,7 @@ declare namespace stardust {
|
|
|
277
277
|
* Creates a visualization model
|
|
278
278
|
* @param cfg The create configuration.
|
|
279
279
|
*/
|
|
280
|
-
create(cfg: stardust.CreateConfig): Promise<
|
|
280
|
+
create(cfg: stardust.CreateConfig): Promise<qix.GenericObject>;
|
|
281
281
|
|
|
282
282
|
/**
|
|
283
283
|
* Generates properties for a visualization object
|
|
@@ -404,7 +404,7 @@ declare namespace stardust {
|
|
|
404
404
|
|
|
405
405
|
id: string;
|
|
406
406
|
|
|
407
|
-
model:
|
|
407
|
+
model: qix.GenericObject;
|
|
408
408
|
|
|
409
409
|
/**
|
|
410
410
|
* Destroys the visualization and removes it from the the DOM.
|
|
@@ -536,17 +536,7 @@ declare namespace stardust {
|
|
|
536
536
|
|
|
537
537
|
}
|
|
538
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
|
-
|
|
549
|
-
type Field = string | EngineAPI.INxDimension | EngineAPI.INxMeasure | stardust.LibraryField;
|
|
539
|
+
type Field = string | qix.NxDimension | qix.NxMeasure | stardust.LibraryField;
|
|
550
540
|
|
|
551
541
|
/**
|
|
552
542
|
* Rendering configuration for creating and rendering a new object
|
|
@@ -555,7 +545,7 @@ declare namespace stardust {
|
|
|
555
545
|
type: string;
|
|
556
546
|
version?: string;
|
|
557
547
|
fields?: stardust.Field[];
|
|
558
|
-
properties?:
|
|
548
|
+
properties?: qix.GenericObjectProperties;
|
|
559
549
|
}
|
|
560
550
|
|
|
561
551
|
/**
|
|
@@ -570,7 +560,7 @@ declare namespace stardust {
|
|
|
570
560
|
version?: string;
|
|
571
561
|
fields?: stardust.Field[];
|
|
572
562
|
extendProperties?: boolean;
|
|
573
|
-
properties?:
|
|
563
|
+
properties?: qix.GenericObjectProperties;
|
|
574
564
|
}
|
|
575
565
|
|
|
576
566
|
interface LibraryField {
|
|
@@ -578,6 +568,16 @@ declare namespace stardust {
|
|
|
578
568
|
type: "dimension" | "measure";
|
|
579
569
|
}
|
|
580
570
|
|
|
571
|
+
/**
|
|
572
|
+
* An object literal containing meta information about the plugin and a function containing the plugin implementation.
|
|
573
|
+
*/
|
|
574
|
+
interface Plugin {
|
|
575
|
+
info: {
|
|
576
|
+
name: string;
|
|
577
|
+
};
|
|
578
|
+
fn: ()=>void;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
581
|
interface LoadType {
|
|
582
582
|
(type: {
|
|
583
583
|
name: string;
|
|
@@ -736,7 +736,7 @@ declare namespace stardust {
|
|
|
736
736
|
})=>stardust.ExportFormat;
|
|
737
737
|
|
|
738
738
|
interface QAEDefinition {
|
|
739
|
-
properties?:
|
|
739
|
+
properties?: qix.GenericObjectProperties;
|
|
740
740
|
data?: {
|
|
741
741
|
targets: stardust.DataTarget[];
|
|
742
742
|
};
|
|
@@ -746,13 +746,13 @@ declare namespace stardust {
|
|
|
746
746
|
|
|
747
747
|
interface DataTarget {
|
|
748
748
|
path: string;
|
|
749
|
-
dimensions?: stardust.FieldTarget<
|
|
750
|
-
measures?: stardust.FieldTarget<
|
|
749
|
+
dimensions?: stardust.FieldTarget<qix.NxDimension>;
|
|
750
|
+
measures?: stardust.FieldTarget<qix.NxMeasure>;
|
|
751
751
|
}
|
|
752
752
|
|
|
753
|
-
type fieldTargetAddedCallback<T> = (field: T, properties:
|
|
753
|
+
type fieldTargetAddedCallback<T> = (field: T, properties: qix.GenericObjectProperties)=>void;
|
|
754
754
|
|
|
755
|
-
type fieldTargetRemovedCallback<T> = (field: T, properties:
|
|
755
|
+
type fieldTargetRemovedCallback<T> = (field: T, properties: qix.GenericObjectProperties, index: number)=>void;
|
|
756
756
|
|
|
757
757
|
interface FieldTarget<T> {
|
|
758
758
|
min?: (()=>void) | number;
|
|
@@ -878,10 +878,10 @@ declare namespace stardust {
|
|
|
878
878
|
}
|
|
879
879
|
|
|
880
880
|
interface ExportDataDef {
|
|
881
|
-
dimensions:
|
|
882
|
-
measures:
|
|
883
|
-
excludedDimensions:
|
|
884
|
-
excludedMeasures:
|
|
881
|
+
dimensions: qix.NxDimension[];
|
|
882
|
+
measures: qix.NxMeasure[];
|
|
883
|
+
excludedDimensions: qix.NxDimension[];
|
|
884
|
+
excludedMeasures: qix.NxMeasure[];
|
|
885
885
|
interColumnSortOrder: number[];
|
|
886
886
|
}
|
|
887
887
|
|