@nebula.js/stardust 2.5.0 → 2.8.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.5.0",
3
+ "version": "2.8.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.5.0",
49
- "@nebula.js/locale": "^2.5.0",
50
- "@nebula.js/nucleus": "^2.5.0",
51
- "@nebula.js/supernova": "^2.5.0",
52
- "@nebula.js/theme": "^2.5.0",
53
- "@nebula.js/ui": "^2.5.0",
48
+ "@nebula.js/conversion": "^2.8.0",
49
+ "@nebula.js/locale": "^2.8.0",
50
+ "@nebula.js/nucleus": "^2.8.0",
51
+ "@nebula.js/supernova": "^2.8.0",
52
+ "@nebula.js/theme": "^2.8.0",
53
+ "@nebula.js/ui": "^2.8.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": "d7aef688509a8f4f12541ab4605b83095d8b889c"
67
+ "gitHead": "a89a9f79dbd5ac7f5f0421fca2b4bb4b4199a640"
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,14 +254,24 @@ 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;
264
+ checkboxes?: boolean;
265
+ rangeSelect?: boolean;
266
+ dense?: boolean;
253
267
  stateName?: boolean;
254
268
  properties?: object;
255
269
  sessionModel?: object;
256
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;
257
275
  update?: stardust.ReceiverFunction;
258
276
  }): void;
259
277
 
@@ -421,15 +439,6 @@ declare namespace stardust {
421
439
  meta?: object;
422
440
  }
423
441
 
424
- type MinMaxResult = {
425
- };
426
-
427
- /**
428
- * Returns the min and max indices of elemNumbersOrdered which contains
429
- * all numbers in elementNbrs.
430
- */
431
- type getMinMax = (elementNbrs: number[], elemNumbersOrdered: number[])=>stardust.MinMaxResult;
432
-
433
442
  interface ActionToolbarElement extends HTMLElement{
434
443
  className: "njs-action-toolbar-popover";
435
444
  }
@@ -623,14 +632,18 @@ declare namespace stardust {
623
632
  getContrastingColorTo(color: string): string;
624
633
 
625
634
  /**
626
- * Get the value of a style attribute in the theme by searching in the theme's JSON structure.
627
- * 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.
628
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
629
642
  * @param basePath Base path in the theme's JSON structure to start the search in (specified as a name path separated by dots).
630
643
  * @param path Expected path for the attribute (specified as a name path separated by dots).
631
- * @param attribute Name of the style attribute.
644
+ * @param attribute Name of the style attribute. (specified as a name attribute separated by dots).
632
645
  */
633
- getStyle(basePath: string, path: string, attribute: string): string;
646
+ getStyle(basePath: string, path: string, attribute: string): string | undefined;
634
647
 
635
648
  }
636
649