@nebula.js/stardust 2.6.1 → 2.9.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": "2.6.1",
3
+ "version": "2.9.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",
@@ -39,18 +39,18 @@
39
39
  "version": "yarn run spec && yarn run ts && git add ./api-spec/spec.json ./types/index.d.ts"
40
40
  },
41
41
  "dependencies": {
42
- "@types/qlik-engineapi": "12.67.11"
42
+ "@types/qlik-engineapi": "12.67.12"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@material-ui/core": "4.12.3",
46
46
  "@material-ui/icons": "4.11.2",
47
47
  "@material-ui/styles": "4.11.4",
48
- "@nebula.js/conversion": "^2.6.1",
49
- "@nebula.js/locale": "^2.6.1",
50
- "@nebula.js/nucleus": "^2.6.1",
51
- "@nebula.js/supernova": "^2.6.1",
52
- "@nebula.js/theme": "^2.6.1",
53
- "@nebula.js/ui": "^2.6.1",
48
+ "@nebula.js/conversion": "^2.9.0",
49
+ "@nebula.js/locale": "^2.9.0",
50
+ "@nebula.js/nucleus": "^2.9.0",
51
+ "@nebula.js/supernova": "^2.9.0",
52
+ "@nebula.js/theme": "^2.9.0",
53
+ "@nebula.js/ui": "^2.9.0",
54
54
  "@scriptappy/cli": "0.1.0",
55
55
  "@scriptappy/to-dts": "1.0.0-beta.4",
56
56
  "extend": "3.0.2",
@@ -64,5 +64,5 @@
64
64
  "regenerator-runtime": "0.13.9",
65
65
  "semver": "6.3.0"
66
66
  },
67
- "gitHead": "c06af7d8139127521baf8229406db290d7ee0b17"
67
+ "gitHead": "f1efe03caedecd9bf18e4db33b66ed7553a210a1"
68
68
  }
package/types/index.d.ts CHANGED
@@ -231,6 +231,14 @@ declare namespace stardust {
231
231
 
232
232
  }
233
233
 
234
+ type Direction = "ltr" | "rtl";
235
+
236
+ type ListLayout = "vertical" | "horizontal";
237
+
238
+ type FrequencyMode = "none" | "value" | "percent" | "relative";
239
+
240
+ type SearchMode = boolean | "toggle";
241
+
234
242
  /**
235
243
  * A callback function which receives another function as input.
236
244
  */
@@ -246,9 +254,12 @@ declare namespace stardust {
246
254
  */
247
255
  mount(element: HTMLElement, options?: {
248
256
  title?: string;
249
- direction?: string;
250
- listLayout?: string;
251
- search?: boolean;
257
+ direction?: stardust.Direction;
258
+ listLayout?: stardust.ListLayout;
259
+ frequencyMode?: stardust.FrequencyMode;
260
+ histogram?: boolean;
261
+ search?: stardust.SearchMode;
262
+ focusSearch?: boolean;
252
263
  toolbar?: boolean;
253
264
  checkboxes?: boolean;
254
265
  rangeSelect?: boolean;
@@ -257,6 +268,10 @@ declare namespace stardust {
257
268
  properties?: object;
258
269
  sessionModel?: object;
259
270
  selectionsApi?: object;
271
+ /**
272
+ * Define a function which tells when selections are disabled (true) or enabled (false). By default, always returns false.
273
+ */
274
+ "selectDisabled="?(): boolean;
260
275
  update?: stardust.ReceiverFunction;
261
276
  }): void;
262
277
 
@@ -424,23 +439,6 @@ declare namespace stardust {
424
439
  meta?: object;
425
440
  }
426
441
 
427
- type Range = {
428
- };
429
-
430
- type Segment = {
431
- };
432
-
433
- type getSegmentsFromRange = (label: string, range: stardust.Range, startIndex?: number)=>stardust.Segment[];
434
-
435
- type MinMaxResult = {
436
- };
437
-
438
- /**
439
- * Returns the min and max indices of elemNumbersOrdered which contains
440
- * all numbers in elementNbrs.
441
- */
442
- type getMinMax = (elementNbrs: number[], elemNumbersOrdered: number[])=>stardust.MinMaxResult;
443
-
444
442
  interface ActionToolbarElement extends HTMLElement{
445
443
  className: "njs-action-toolbar-popover";
446
444
  }
@@ -634,14 +632,18 @@ declare namespace stardust {
634
632
  getContrastingColorTo(color: string): string;
635
633
 
636
634
  /**
637
- * Get the value of a style attribute in the theme by searching in the theme's JSON structure.
638
- * The search starts at the specified base path and continues upwards until the value is found.
635
+ * Get the value of a style attribute in the theme
636
+ * by searching in the theme's JSON structure.
637
+ * The search starts at the specified base path
638
+ * and continues upwards until the value is found.
639
639
  * If possible it will get the attribute's value using the given path.
640
+ * When attributes separated by dots are provided, such as 'hover.color',
641
+ * they are required in the theme JSON file
640
642
  * @param basePath Base path in the theme's JSON structure to start the search in (specified as a name path separated by dots).
641
643
  * @param path Expected path for the attribute (specified as a name path separated by dots).
642
- * @param attribute Name of the style attribute.
644
+ * @param attribute Name of the style attribute. (specified as a name attribute separated by dots).
643
645
  */
644
- getStyle(basePath: string, path: string, attribute: string): string;
646
+ getStyle(basePath: string, path: string, attribute: string): string | undefined;
645
647
 
646
648
  }
647
649