@nebula.js/stardust 5.0.0-alpha4 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nebula.js/stardust",
3
- "version": "5.0.0-alpha4",
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.3",
44
+ "@emotion/react": "^11.11.4",
48
45
  "@emotion/styled": "^11.11.0",
49
- "@mui/icons-material": "^5.15.11",
50
- "@mui/material": "^5.15.11",
51
- "@nebula.js/conversion": "^5.0.0-alpha4",
52
- "@nebula.js/enigma-mocker": "^5.0.0-alpha4",
53
- "@nebula.js/locale": "^5.0.0-alpha4",
54
- "@nebula.js/nucleus": "^5.0.0-alpha4",
55
- "@nebula.js/supernova": "^5.0.0-alpha4",
56
- "@nebula.js/theme": "^5.0.0-alpha4",
57
- "@nebula.js/ui": "^5.0.0-alpha4",
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-beta.4",
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.23",
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
68
  "semver": "7.6.0"
71
69
  },
72
- "gitHead": "d8b137df822275d3a59d23828e77b16f172dd908"
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
- /// <reference types="qlik-engineapi" />
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: EngineAPI.IApp, instanceConfig?: stardust.Configuration): stardust.Embed;
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(): EngineAPI.IGenericObjectLayout;
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(): EngineAPI.IGenericObjectLayout;
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(): EngineAPI.INxAppLayout;
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(): EngineAPI.IGenericObject | undefined;
88
+ export function useModel(): qix.GenericObject | undefined;
89
89
 
90
90
  /**
91
91
  * Gets the doc API.
92
92
  */
93
- export function useApp(): EngineAPI.IApp | undefined;
93
+ export function useApp(): qix.Doc | undefined;
94
94
 
95
95
  /**
96
96
  * Gets the global API.
97
97
  */
98
- export function useGlobal(): EngineAPI.IGlobal | undefined;
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: ($: EngineAPI.IGenericObjectLayout)=>Promise<EngineAPI.IGenericObjectLayout>): void;
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 visulization and specifies how it behaves. For example, what layout to use the data to present.
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 controling behaviour of visualizations.
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<EngineAPI.IApp>;
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<EngineAPI.IGenericObject>;
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: EngineAPI.IGenericObject;
407
+ model: qix.GenericObject;
408
408
 
409
409
  /**
410
410
  * Destroys the visualization and removes it from the the DOM.
@@ -536,7 +536,7 @@ declare namespace stardust {
536
536
 
537
537
  }
538
538
 
539
- type Field = string | EngineAPI.INxDimension | EngineAPI.INxMeasure | stardust.LibraryField;
539
+ type Field = string | qix.NxDimension | qix.NxMeasure | stardust.LibraryField;
540
540
 
541
541
  /**
542
542
  * Rendering configuration for creating and rendering a new object
@@ -545,7 +545,7 @@ declare namespace stardust {
545
545
  type: string;
546
546
  version?: string;
547
547
  fields?: stardust.Field[];
548
- properties?: EngineAPI.IGenericObjectProperties;
548
+ properties?: qix.GenericObjectProperties;
549
549
  }
550
550
 
551
551
  /**
@@ -560,7 +560,7 @@ declare namespace stardust {
560
560
  version?: string;
561
561
  fields?: stardust.Field[];
562
562
  extendProperties?: boolean;
563
- properties?: EngineAPI.IGenericObjectProperties;
563
+ properties?: qix.GenericObjectProperties;
564
564
  }
565
565
 
566
566
  interface LibraryField {
@@ -736,7 +736,7 @@ declare namespace stardust {
736
736
  })=>stardust.ExportFormat;
737
737
 
738
738
  interface QAEDefinition {
739
- properties?: EngineAPI.IGenericObjectProperties;
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<EngineAPI.INxDimension>;
750
- measures?: stardust.FieldTarget<EngineAPI.INxMeasure>;
749
+ dimensions?: stardust.FieldTarget<qix.NxDimension>;
750
+ measures?: stardust.FieldTarget<qix.NxMeasure>;
751
751
  }
752
752
 
753
- type fieldTargetAddedCallback<T> = (field: T, properties: EngineAPI.IGenericObjectProperties)=>void;
753
+ type fieldTargetAddedCallback<T> = (field: T, properties: qix.GenericObjectProperties)=>void;
754
754
 
755
- type fieldTargetRemovedCallback<T> = (field: T, properties: EngineAPI.IGenericObjectProperties, index: number)=>void;
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: EngineAPI.INxDimension[];
882
- measures: EngineAPI.INxMeasure[];
883
- excludedDimensions: EngineAPI.INxDimension[];
884
- excludedMeasures: EngineAPI.INxMeasure[];
881
+ dimensions: qix.NxDimension[];
882
+ measures: qix.NxMeasure[];
883
+ excludedDimensions: qix.NxDimension[];
884
+ excludedMeasures: qix.NxMeasure[];
885
885
  interColumnSortOrder: number[];
886
886
  }
887
887