@ic3/reporting-api 8.2.0 → 8.2.1

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/dist/ApiUtils.js CHANGED
@@ -8,7 +8,7 @@ const ReportingVersion_1 = __importDefault(require("./ReportingVersion"));
8
8
  class ApiUtils {
9
9
  static makePlugin(definition) {
10
10
  return () => {
11
- return Object.assign({ apiVersion: new ReportingVersion_1.default("8.2.0" || "-", "Thu, 14 Jul 2022 12:18:27 GMT" || "-") }, definition);
11
+ return Object.assign({ apiVersion: new ReportingVersion_1.default("8.2.1" || "-", "Wed, 03 Aug 2022 13:20:55 GMT" || "-") }, definition);
12
12
  };
13
13
  }
14
14
  /**
@@ -1,5 +1,5 @@
1
1
  import { PaperOrientation, PaperSizeName } from "./ITypes";
2
- export declare type AppNotificationType = "edit-report" | "print-report-dialog" | "print-report" | "print-report-without-state" | "print-report-in-browser" | "save-state-to-localstorage" | "restore-state-from-localstorage" | "save-ownprops-to-localstorage" | "restore-ownprops-from-localstorage";
2
+ export declare type AppNotificationType = "edit-report" | "print-report-dialog" | "print-report" | "print-report-without-state" | "print-report-in-browser" | "save-state-to-localstorage" | "restore-state-from-localstorage" | "save-ownprops-to-localstorage" | "restore-ownprops-from-localstorage" | "save-reportwidgets-ownprops-to-localstorage" | "restore-reportwidgets-ownprops-from-localstorage";
3
3
  export interface IAppNotification {
4
4
  /**
5
5
  * E.g., print-report.
@@ -50,4 +50,10 @@ export interface SaveOwnPropsToLocalStorageNotification extends IAppNotification
50
50
  export interface RestoreOwnPropsFromLocalStorageNotification extends IAppNotification {
51
51
  readonly type: "restore-ownprops-from-localstorage";
52
52
  }
53
- export declare type AppNotification = AppEditReportNotification | AppPrintReportDialogNotification | AppPrintReportNotification | AppPrintReportWithoutStateNotification | AppPrintReportInBrowserNotification | SaveStateToLocalStorageNotification | RestoreStateFromLocalStorageNotification | SaveOwnPropsToLocalStorageNotification | RestoreOwnPropsFromLocalStorageNotification;
53
+ export interface SaveWidgetOwnPropsToLocalStorageNotification extends IAppNotification {
54
+ readonly type: "save-reportwidgets-ownprops-to-localstorage";
55
+ }
56
+ export interface RestoreWidgetOwnPropsFromLocalStorageNotification extends IAppNotification {
57
+ readonly type: "restore-reportwidgets-ownprops-from-localstorage";
58
+ }
59
+ export declare type AppNotification = AppEditReportNotification | AppPrintReportDialogNotification | AppPrintReportNotification | AppPrintReportWithoutStateNotification | AppPrintReportInBrowserNotification | SaveStateToLocalStorageNotification | RestoreStateFromLocalStorageNotification | SaveOwnPropsToLocalStorageNotification | RestoreWidgetOwnPropsFromLocalStorageNotification | SaveWidgetOwnPropsToLocalStorageNotification | RestoreOwnPropsFromLocalStorageNotification;
@@ -53,4 +53,9 @@ export interface IThemeManager {
53
53
  * created from its partial options (e.g., using palette, typography, spacing, etc...)
54
54
  */
55
55
  registerTheme(themeOptions: any, themeDecorator?: (theme: any) => ic3Components, baseTheme?: EmbeddedThemeNames): void;
56
+ /**
57
+ * Register editor themes. Change the editor theme in ic3report-config.js by setting defaultEditorThemeId to a
58
+ * themeId from a theme using this method.
59
+ */
60
+ registerEditorTheme(themeOptions: any, themeDecorator?: (theme: any) => ic3Components): void;
56
61
  }
package/dist/ITypes.d.ts CHANGED
@@ -23,3 +23,9 @@ export declare enum SparklinePosition {
23
23
  BELOW_VALUE = "BELOW_VALUE",
24
24
  RIGHT_OF_VALUE = "RIGHT_OF_VALUE"
25
25
  }
26
+ export declare enum QueryType {
27
+ MDX = "mdx",
28
+ SQL = "sql",
29
+ EMBEDDED = "embedded",
30
+ HTTP_CSV = "HTTP_CSV"
31
+ }
package/dist/ITypes.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SparklinePosition = exports.SparkChartType = exports.TargetTextIconSet = exports.TargetTextPosition = exports.CompareTextInterpretationType = void 0;
3
+ exports.QueryType = exports.SparklinePosition = exports.SparkChartType = exports.TargetTextIconSet = exports.TargetTextPosition = exports.CompareTextInterpretationType = void 0;
4
4
  var CompareTextInterpretationType;
5
5
  (function (CompareTextInterpretationType) {
6
6
  CompareTextInterpretationType["MORE"] = "more=better";
@@ -28,4 +28,11 @@ var SparklinePosition;
28
28
  SparklinePosition["BELOW_VALUE"] = "BELOW_VALUE";
29
29
  SparklinePosition["RIGHT_OF_VALUE"] = "RIGHT_OF_VALUE";
30
30
  })(SparklinePosition = exports.SparklinePosition || (exports.SparklinePosition = {}));
31
+ var QueryType;
32
+ (function (QueryType) {
33
+ QueryType["MDX"] = "mdx";
34
+ QueryType["SQL"] = "sql";
35
+ QueryType["EMBEDDED"] = "embedded";
36
+ QueryType["HTTP_CSV"] = "HTTP_CSV";
37
+ })(QueryType = exports.QueryType || (exports.QueryType = {}));
31
38
  //# sourceMappingURL=ITypes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ITypes.js","sourceRoot":"","sources":["../src/ITypes.ts"],"names":[],"mappings":";;;AAIA,IAAY,6BAIX;AAJD,WAAY,6BAA6B;IACrC,qDAAoB,CAAA;IACpB,qDAAoB,CAAA;IACpB,8CAAa,CAAA;AACjB,CAAC,EAJW,6BAA6B,GAA7B,qCAA6B,KAA7B,qCAA6B,QAIxC;AAED,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC1B,yCAAmB,CAAA;IACnB,6CAAuB,CAAA;IACvB,mDAA6B,CAAA;AACjC,CAAC,EAJW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAI7B;AAED,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IACzB,gDAA2B,CAAA;IAC3B,sDAAiC,CAAA;AACrC,CAAC,EAHW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAG5B;AAED,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,+BAAa,CAAA;IACb,mCAAiB,CAAA;AACrB,CAAC,EAHW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAGzB;AAED,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IACzB,gDAA2B,CAAA;IAC3B,sDAAiC,CAAA;AACrC,CAAC,EAHW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAG5B"}
1
+ {"version":3,"file":"ITypes.js","sourceRoot":"","sources":["../src/ITypes.ts"],"names":[],"mappings":";;;AAIA,IAAY,6BAIX;AAJD,WAAY,6BAA6B;IACrC,qDAAoB,CAAA;IACpB,qDAAoB,CAAA;IACpB,8CAAa,CAAA;AACjB,CAAC,EAJW,6BAA6B,GAA7B,qCAA6B,KAA7B,qCAA6B,QAIxC;AAED,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC1B,yCAAmB,CAAA;IACnB,6CAAuB,CAAA;IACvB,mDAA6B,CAAA;AACjC,CAAC,EAJW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAI7B;AAED,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IACzB,gDAA2B,CAAA;IAC3B,sDAAiC,CAAA;AACrC,CAAC,EAHW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAG5B;AAED,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,+BAAa,CAAA;IACb,mCAAiB,CAAA;AACrB,CAAC,EAHW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAGzB;AAED,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IACzB,gDAA2B,CAAA;IAC3B,sDAAiC,CAAA;AACrC,CAAC,EAHW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAG5B;AAED,IAAY,SAKX;AALD,WAAY,SAAS;IACjB,wBAAW,CAAA;IACX,wBAAW,CAAA;IACX,kCAAqB,CAAA;IACrB,kCAAqB,CAAA;AACzB,CAAC,EALW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAKpB"}
package/dist/IcEvent.d.ts CHANGED
@@ -17,6 +17,10 @@ export interface PublicIcEvent {
17
17
  * The MDX version of the events
18
18
  */
19
19
  readonly mdx: string;
20
+ /**
21
+ * If available the key of the MDX member
22
+ */
23
+ readonly key?: any | any[];
20
24
  /**
21
25
  * These two strings together define an unique id for a widget in a report
22
26
  */
@@ -8,6 +8,7 @@ import { Theme } from "@mui/material/styles";
8
8
  import { WidgetTemplateChartOptions, WidgetTemplateIDs } from "./PublicTemplates";
9
9
  import { ChartTemplateDataMapping, IFormFieldGranularityItem } from "./PublicTidyTableTypes";
10
10
  import { ResizingConstraintOptions } from "./theme/ThemeWidgetBox";
11
+ import { QueryType } from "./ITypes";
11
12
  export interface IRectanglePosition {
12
13
  top: number;
13
14
  left: number;
@@ -63,9 +64,9 @@ export interface IWidgetTemplateMdxBuilderAxisProps {
63
64
  */
64
65
  disableNonEmpty?: true;
65
66
  /**
66
- * For filters add lazy load feature to the axis
67
+ * For filters add lazy load feature to the axis.
67
68
  */
68
- addLazyLoad?: true;
69
+ withLazySearch?: true;
69
70
  /**
70
71
  * Allow only a single member
71
72
  */
@@ -390,6 +391,19 @@ interface IPublicCommonWidgetTemplateDefinition<OPTIONS extends FormFieldObject>
390
391
  * Returns true if the widget fires a global event at initialization (start)
391
392
  */
392
393
  firesGlobalEventAtStart?: (options: OPTIONS | undefined, templateDef: IPublicWidgetTemplateDefinition<OPTIONS>) => boolean;
394
+ /**
395
+ * Limit on the rows of the tidy result to be sure that the browser does not crash during rendering.
396
+ * Leave to undefined or set to -1 to have no limit.
397
+ *
398
+ * Note: can be overridden via Dashboards options (ic3report-config.js).
399
+ */
400
+ maxTidyRowCount?: number;
401
+ /**
402
+ * List of supported types of query.
403
+ *
404
+ * Defaults: all of them.
405
+ */
406
+ withQueryTypes?: QueryType[];
393
407
  }
394
408
  /**
395
409
  * *********************************************************************************************************************
@@ -1 +1 @@
1
- {"version":3,"file":"PublicTemplate.js","sourceRoot":"","sources":["../src/PublicTemplate.ts"],"names":[],"mappings":";;;AAyDA,IAAY,4CAIX;AAJD,WAAY,4CAA4C;IACpD,qEAAqB,CAAA;IACrB,yEAAyB,CAAA;IACzB,2EAA2B,CAAA;AAC/B,CAAC,EAJW,4CAA4C,GAA5C,oDAA4C,KAA5C,oDAA4C,QAIvD;AAyaD;;;;GAIG;AACH,IAAY,4BAKX;AALD,WAAY,4BAA4B;IACpC,+CAAe,CAAA;IACf,iDAAiB,CAAA;IACjB,2CAAW,CAAA;IACX,6CAAa,CAAA;AACjB,CAAC,EALW,4BAA4B,GAA5B,oCAA4B,KAA5B,oCAA4B,QAKvC;AA6BD;;GAEG;AACH,IAAY,wBAMX;AAND,WAAY,wBAAwB;IAChC,mDAAuB,CAAA;IAEvB,gBAAgB;IAChB,0DAA8B,CAAA;IAC9B,iEAAqC,CAAA;AACzC,CAAC,EANW,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAMnC"}
1
+ {"version":3,"file":"PublicTemplate.js","sourceRoot":"","sources":["../src/PublicTemplate.ts"],"names":[],"mappings":";;;AA0DA,IAAY,4CAIX;AAJD,WAAY,4CAA4C;IACpD,qEAAqB,CAAA;IACrB,yEAAyB,CAAA;IACzB,2EAA2B,CAAA;AAC/B,CAAC,EAJW,4CAA4C,GAA5C,oDAA4C,KAA5C,oDAA4C,QAIvD;AAybD;;;;GAIG;AACH,IAAY,4BAKX;AALD,WAAY,4BAA4B;IACpC,+CAAe,CAAA;IACf,iDAAiB,CAAA;IACjB,2CAAW,CAAA;IACX,6CAAa,CAAA;AACjB,CAAC,EALW,4BAA4B,GAA5B,oCAA4B,KAA5B,oCAA4B,QAKvC;AA6BD;;GAEG;AACH,IAAY,wBAMX;AAND,WAAY,wBAAwB;IAChC,mDAAuB,CAAA;IAEvB,gBAAgB;IAChB,0DAA8B,CAAA;IAC9B,iEAAqC,CAAA;AACzC,CAAC,EANW,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAMnC"}
@@ -22,6 +22,7 @@ interface IWidgetTemplateChartOptions {
22
22
  "ic3.DatePicker": DatePickerChartOptions;
23
23
  "ic3.EmbeddedReport": EmbeddedReportChartOptions;
24
24
  "ic3.FilterAutocomplete": FilterAutocompleteChartOptions;
25
+ "ic3.FilterAutocompleteLazy": FilterAutocompleteChartOptions;
25
26
  "ic3.FilterButtons": FilterButtonsChartOptions;
26
27
  "ic3.FilterCheckboxRadio": FilterCheckboxRadioChartOptions;
27
28
  "ic3.FilterPanel": FilterPanelChartOptions;
@@ -354,6 +354,13 @@ export interface ic3Theme {
354
354
  };
355
355
  }
356
356
  export interface ic3ThemeOptions {
357
+ /**
358
+ * For editor theme, the id to use in your app-local/ic3report-config.js:
359
+ *
360
+ * <pre>
361
+ * options.defaultEditorThemeId = ...
362
+ * </pre>
363
+ */
357
364
  id: string;
358
365
  caption: string;
359
366
  cssClass?: string;
@@ -421,19 +428,27 @@ export interface ic3ThemeOptions {
421
428
  */
422
429
  editor?: {
423
430
  /**
424
- * Editor logo. Defaults to icCubes logo.
431
+ * Editor logo.
432
+ *
433
+ * Default: icCube logo.
425
434
  */
426
435
  logo?: string;
427
436
  /**
428
- * Alt text for the logo image. Default = icCube.
437
+ * Alt text for the logo image.
438
+ *
439
+ * Default: "icCube".
429
440
  */
430
441
  logoAlt?: string;
431
442
  /**
432
- * Top - Offset of dashboard page to the editor. Default 25.
443
+ * Top offset of the edited dashboard page in the editor.
444
+ *
445
+ * Default: 25.
433
446
  */
434
447
  viewPortOffsetTop?: number;
435
448
  /**
436
- * Left - Offset of dashboard page to the editor. Default 25.
449
+ * Left offset of the edited dashboard page in the editor.
450
+ *
451
+ * Default: 25.
437
452
  */
438
453
  viewPortOffsetLeft?: number;
439
454
  };
@@ -445,7 +445,10 @@ export interface ITidyTable {
445
445
  * Add a new index to the existing index, overwriting what already exists.
446
446
  */
447
447
  addColumnIndex(index: TidyColumnIndex): void;
448
- getQueryLimit(): number | undefined;
448
+ /**
449
+ * The limit used when lazy search is enabled.
450
+ */
451
+ getLazySearchLimit(): number | undefined;
449
452
  isTotalRow(rowIdx: number): boolean;
450
453
  /**
451
454
  * Transform the table to a table where each row is a bucket in the histogram for that group.
@@ -486,4 +489,8 @@ export interface ITidyTable {
486
489
  * Utility class for doing maths on columns
487
490
  */
488
491
  getMath(): ITidyMath;
492
+ /**
493
+ * Returns true if and only if the table is truncated by the server (too many rows otherwise).
494
+ */
495
+ reachedMaxTidyRowCount(): boolean;
489
496
  }
@@ -1,4 +1,4 @@
1
- import { SelectionBehaviour, WidgetTidySelectionOptions } from "./PublicTidyTableTypes";
1
+ import { EntityItem, ITidyTableSelection, SelectionBehaviour, WidgetTidySelectionOptions } from "./PublicTidyTableTypes";
2
2
  import { ITidyBaseColumn, ITidyColumn } from "./PublicTidyColumn";
3
3
  import { ILazyTreeViewLoader } from "./LazyTreeView";
4
4
  import { PublicIcEvent } from "./IcEvent";
@@ -32,9 +32,13 @@ export declare type TidyEvent = MouseEvent | TouchEvent;
32
32
  export declare type IWidgetInteractionMode = "drilldown" | "selection";
33
33
  export interface ITidyTableInteractionSelection {
34
34
  /**
35
- * Sets the selection at the creation of the widget
35
+ * Sets the selection at the creation of the widget.
36
36
  */
37
37
  initializeSelection(isRangeSelection?: boolean): void;
38
+ /**
39
+ * Sets the selection at the creation of the widget: autocomplete-lazy.
40
+ */
41
+ initializeLazySelection(items?: EntityItem[]): void;
38
42
  /**
39
43
  * Returns true if the selection if empty. Returns false otherwise.
40
44
  */
@@ -266,10 +270,22 @@ export interface ITidyTableInteraction extends ITidyTableInteractionSelection, I
266
270
  */
267
271
  isSelectable(col: ITidyColumn): boolean;
268
272
  isHierarchyIdxSelectable(hierIndex: number): boolean;
273
+ /**
274
+ * Returns the rows of the items currently in the selection. Note, the item must be present in the current tidy
275
+ * table.
276
+ */
269
277
  getSelectedRows(): number[];
270
278
  setSortSelectionToColumnOrder(value: boolean): void;
271
279
  /**
272
280
  * Returns the widgets selection options.
273
281
  */
274
282
  getWidgetSelectionOptions(): WidgetTidySelectionOptions;
283
+ /**
284
+ * Returns the selection in the interaction object.
285
+ */
286
+ getSelectedItems(): ITidyTableSelection[];
287
+ /**
288
+ * Add an item to the interactions selection.
289
+ */
290
+ setSelection(items: ITidyTableSelection | ITidyTableSelection[]): void;
275
291
  }
@@ -231,7 +231,7 @@ export interface IMdxAxisSeriesInfo {
231
231
  }
232
232
  export interface EntityItem {
233
233
  uniqueName: string;
234
- key?: string;
234
+ key?: any;
235
235
  name: string;
236
236
  caption: string;
237
237
  parentUN?: string;
@@ -73,6 +73,12 @@ export interface BaseTableChartOptions extends FormFieldObject {
73
73
  * Display the sort options. A list of boolean values: 'true', 'false'. The last value repeats itself.
74
74
  */
75
75
  columnSortable: string;
76
+ /**
77
+ * Column Ordering (CSV).
78
+ *
79
+ * A list of boolean values: 'true', 'false'. The last value repeats itself.
80
+ */
81
+ columnOrdering: string;
76
82
  /**
77
83
  * Pinnable (CSV).
78
84
  *
@@ -44,4 +44,10 @@ export interface FilterAutocompleteChartOptions extends FilterTidyTableChartOpti
44
44
  * Maximum number of items that will be visible when not focused. Set -1 to disable the limit.
45
45
  */
46
46
  limitTags: number;
47
+ /**
48
+ * Limit Chips.
49
+ *
50
+ * Maximum number of chips that will be visible
51
+ */
52
+ limitChips: number;
47
53
  }
@@ -1,6 +1,5 @@
1
1
  import { FormFieldObject } from "../PublicTemplateForm";
2
2
  import { HtmlBoxVariant } from "./ThemeHtmlBox";
3
- import { TidyTableColumnSelector } from "../PublicTidyTableTypes";
4
3
  /**
5
4
  * KPI Box Options (fields of the "Chart" tab in the widget editor).
6
5
  *
@@ -31,16 +30,4 @@ export interface KpiBoxChartOptions extends FormFieldObject {
31
30
  * Expression that returns a markdown text. Evaluated once after row's markdown.
32
31
  */
33
32
  postMarkdown?: string;
34
- /**
35
- * Column.
36
- *
37
- * Default column for the expression and the background color.
38
- */
39
- column?: TidyTableColumnSelector;
40
- /**
41
- * Background Color.
42
- *
43
- * Use the column color to set the background color.
44
- */
45
- backgroundColorFromQuery: boolean;
46
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ic3/reporting-api",
3
- "version": "8.2.0",
3
+ "version": "8.2.1",
4
4
  "description": "icCube dashboards API",
5
5
  "homepage": "https://github.com/ic3-software/ic3-reporting-api",
6
6
  "repository": "https://github.com/ic3-software/ic3-reporting-api",
@@ -14,13 +14,13 @@
14
14
  "access": "public"
15
15
  },
16
16
  "devDependencies": {
17
- "@mui/material": "5.8.7",
18
- "@mui/system": "5.8.7",
17
+ "@mui/material": "5.9.3",
18
+ "@mui/system": "5.9.3",
19
19
  "@types/googlemaps": "3.43.3",
20
20
  "@types/markerclustererplus": "2.1.33",
21
- "@types/node": "18.0.3",
21
+ "@types/node": "18.6.3",
22
22
  "@types/react": "17.0.43",
23
- "del-cli": "4.0.1",
23
+ "del-cli": "5.0.0",
24
24
  "typescript": "4.7.4"
25
25
  },
26
26
  "scripts": {