@ic3/reporting-api 8.3.0-alpha.1 → 8.3.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/dist/ApiUtils.js +1 -1
- package/dist/ApiUtils.js.map +1 -1
- package/dist/INotification.d.ts +11 -2
- package/dist/IOnNewEventJsContext.d.ts +1 -1
- package/dist/IReporting.d.ts +45 -4
- package/dist/IThemeManager.d.ts +1 -1
- package/dist/ITypes.d.ts +3 -3
- package/dist/IWidgetVariantManager.d.ts +2 -2
- package/dist/LazyTreeView.d.ts +1 -1
- package/dist/Loader.d.ts +94 -20
- package/dist/Loader.js +45 -44
- package/dist/Loader.js.map +1 -1
- package/dist/Logger.d.ts +1 -1
- package/dist/PublicContext.d.ts +18 -0
- package/dist/PublicContext.js +6 -1
- package/dist/PublicContext.js.map +1 -1
- package/dist/PublicLayout.d.ts +2 -2
- package/dist/PublicTemplate.d.ts +8 -5
- package/dist/PublicTemplate.js.map +1 -1
- package/dist/PublicTemplateForm.d.ts +19 -18
- package/dist/PublicTemplateForm.js.map +1 -1
- package/dist/PublicTemplates.d.ts +4 -2
- package/dist/PublicTheme.d.ts +89 -62
- package/dist/PublicTheme.js.map +1 -1
- package/dist/PublicTidyColumn.d.ts +23 -17
- package/dist/PublicTidyColumn.js.map +1 -1
- package/dist/PublicTidyTableInteractions.d.ts +7 -2
- package/dist/PublicTidyTableInteractions.js.map +1 -1
- package/dist/PublicTidyTableTypes.d.ts +45 -18
- package/dist/PublicTidyTableTypes.js +3 -4
- package/dist/PublicTidyTableTypes.js.map +1 -1
- package/dist/PublicTidyTree.d.ts +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/theme/ThemeAmCharts4.d.ts +59 -19
- package/dist/theme/ThemeDatePicker.d.ts +8 -0
- package/dist/theme/ThemeEditorTopBar.d.ts +4 -0
- package/dist/theme/ThemeEditorTopBar.js +4 -0
- package/dist/theme/ThemeEditorTopBar.js.map +1 -1
- package/dist/theme/ThemeFilterAutocomplete.d.ts +6 -1
- package/dist/theme/ThemeFilterPanel.d.ts +4 -0
- package/dist/theme/ThemeFilterTree.d.ts +1 -1
- package/dist/theme/ThemeHtmlBox.d.ts +1 -1
- package/dist/theme/ThemeLazyTreeClasses.d.ts +1 -0
- package/dist/theme/ThemeListCounter.d.ts +5 -0
- package/dist/theme/ThemeListCounter.js +9 -0
- package/dist/theme/ThemeListCounter.js.map +1 -0
- package/dist/theme/ThemePrintButton.d.ts +22 -0
- package/dist/theme/ThemePrintButton.js +10 -0
- package/dist/theme/ThemePrintButton.js.map +1 -0
- package/dist/theme/ThemeSinglePanelFilter.d.ts +18 -0
- package/dist/theme/ThemeSinglePanelFilter.js +3 -0
- package/dist/theme/ThemeSinglePanelFilter.js.map +1 -0
- package/package.json +5 -5
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.
|
|
11
|
+
return Object.assign({ apiVersion: new ReportingVersion_1.default("8.3.0" || "-", "Mon, 02 Jan 2023 06:42:29 GMT" || "-") }, definition);
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
/**
|
package/dist/ApiUtils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiUtils.js","sourceRoot":"","sources":["../src/ApiUtils.ts"],"names":[],"mappings":";;;;;;AAEA,0EAAkD;AAiDlD,MAAa,QAAQ;IAOV,MAAM,CAAC,UAAU,CAAC,UAA6B;QAElD,OAAO,GAA+B,EAAE;YAEpC,uBAEI,UAAU,EAAE,IAAI,0BAAgB,CAC5B,
|
|
1
|
+
{"version":3,"file":"ApiUtils.js","sourceRoot":"","sources":["../src/ApiUtils.ts"],"names":[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C,EAAE,CAAC,OAAO,iCAE/B,eAAe;gCAElB,8DAA8D;gCAE9D,gBAAgB,EAAE,UAAU,CAAC,OAAO,CAAC,oBAAoB,CAAC,eAAe,CAAC,gBAAgB,CAAC,EAC3F,gBAAgB,EAAE,UAAU,CAAC,OAAO,CAAC,gBAAgB,IAEvD,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAA;wBACjC,CAAC,CAAC,CAAC;oBAEP,CAAC,IACJ;YACL,CAAC;SAEwC,CAAC;IAElD,CAAC;;AA/GL,4BAiHC;AA/GG;;GAEG;AACoB,uBAAc,GAAG,OAAO,CAAC"}
|
package/dist/INotification.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PaperOrientation, PaperSizeName } from "./ITypes";
|
|
2
|
-
export
|
|
2
|
+
export 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.
|
|
@@ -56,4 +56,13 @@ export interface SaveWidgetOwnPropsToLocalStorageNotification extends IAppNotifi
|
|
|
56
56
|
export interface RestoreWidgetOwnPropsFromLocalStorageNotification extends IAppNotification {
|
|
57
57
|
readonly type: "restore-reportwidgets-ownprops-from-localstorage";
|
|
58
58
|
}
|
|
59
|
-
export
|
|
59
|
+
export type AppNotification = AppEditReportNotification | AppPrintReportDialogNotification | AppPrintReportNotification | AppPrintReportWithoutStateNotification | AppPrintReportInBrowserNotification | SaveStateToLocalStorageNotification | RestoreStateFromLocalStorageNotification | SaveOwnPropsToLocalStorageNotification | RestoreWidgetOwnPropsFromLocalStorageNotification | SaveWidgetOwnPropsToLocalStorageNotification | RestoreOwnPropsFromLocalStorageNotification;
|
|
60
|
+
export interface IAppNotificationToken {
|
|
61
|
+
type: AppNotificationType;
|
|
62
|
+
uid: number;
|
|
63
|
+
}
|
|
64
|
+
export interface IAppNotificationCallback {
|
|
65
|
+
onStarted: (token: IAppNotificationToken) => void;
|
|
66
|
+
onSuccess: (token: IAppNotificationToken) => void;
|
|
67
|
+
onError: (token: IAppNotificationToken, error: any) => void;
|
|
68
|
+
}
|
|
@@ -45,7 +45,7 @@ export interface IOnNewEventJsContext {
|
|
|
45
45
|
/**
|
|
46
46
|
* Returns the widget jQuery object
|
|
47
47
|
*
|
|
48
|
-
* Using JQuery might
|
|
48
|
+
* Using JQuery might conflict with React's state.
|
|
49
49
|
* Use with care as you will modify the DOM directly.
|
|
50
50
|
*/
|
|
51
51
|
getWidget$(widgetId: string): any;
|
package/dist/IReporting.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import ReportingVersion from "./ReportingVersion";
|
|
2
|
-
import { AppNotification } from "./INotification";
|
|
2
|
+
import { AppNotification, IAppNotificationCallback, IAppNotificationToken } from "./INotification";
|
|
3
3
|
export interface IReportDefinition {
|
|
4
4
|
getName(): string;
|
|
5
5
|
getPath(): string;
|
|
@@ -20,7 +20,7 @@ export interface IEventContentItem {
|
|
|
20
20
|
name: string;
|
|
21
21
|
uniqueName: string;
|
|
22
22
|
}
|
|
23
|
-
export
|
|
23
|
+
export type IEventContent = IEventContentItem | IEventContentItem[];
|
|
24
24
|
/**
|
|
25
25
|
* Used to setup filter initial selection.
|
|
26
26
|
*/
|
|
@@ -77,11 +77,42 @@ export interface IOpenReportAppOptions {
|
|
|
77
77
|
*/
|
|
78
78
|
onError?: (error: any) => boolean;
|
|
79
79
|
}
|
|
80
|
+
export interface IPathInfo {
|
|
81
|
+
name: string;
|
|
82
|
+
path: string;
|
|
83
|
+
}
|
|
84
|
+
export interface IRootPaths {
|
|
85
|
+
shared?: IPathInfo;
|
|
86
|
+
home?: IPathInfo;
|
|
87
|
+
users?: IPathInfo;
|
|
88
|
+
}
|
|
89
|
+
export interface IPath {
|
|
90
|
+
folder: boolean;
|
|
91
|
+
name: string;
|
|
92
|
+
path: string;
|
|
93
|
+
}
|
|
94
|
+
export interface IPathsCallback {
|
|
95
|
+
onSuccess: (paths: IPath[]) => void;
|
|
96
|
+
onError: (error: any) => void;
|
|
97
|
+
}
|
|
80
98
|
/**
|
|
81
99
|
* An instance of icCube reporting application.
|
|
82
100
|
*/
|
|
83
101
|
export interface IReporting {
|
|
84
102
|
getVersion(): ReportingVersion;
|
|
103
|
+
/**
|
|
104
|
+
* The root paths for accessing dashboards, dashboards applications
|
|
105
|
+
* according to the security profile of the user.
|
|
106
|
+
*/
|
|
107
|
+
getRootPaths(): IRootPaths;
|
|
108
|
+
/**
|
|
109
|
+
* Asynchronous retrieval of dashboards paths.
|
|
110
|
+
*/
|
|
111
|
+
getDashboardPaths(path: string, callback: IPathsCallback): void;
|
|
112
|
+
/**
|
|
113
|
+
* Asynchronous retrieval of dashboard applications paths.
|
|
114
|
+
*/
|
|
115
|
+
getDashboardApplicationPaths(path: string, callback: IPathsCallback): void;
|
|
85
116
|
/**
|
|
86
117
|
* @param options path, ...
|
|
87
118
|
* @param pushToHistory defaulted to true
|
|
@@ -106,7 +137,17 @@ export interface IReporting {
|
|
|
106
137
|
*/
|
|
107
138
|
onEvent(eventName: string, callback: (value: IEventContent | null) => void): void;
|
|
108
139
|
/**
|
|
109
|
-
* Publish
|
|
140
|
+
* Publish an application notification (e.g., print-report).
|
|
141
|
+
*
|
|
142
|
+
* Note that a single 'print' notification can be active in the application.
|
|
143
|
+
*
|
|
144
|
+
* @param callback currently used to monitor a 'print' notification.
|
|
145
|
+
*/
|
|
146
|
+
fireAppNotification(notification: AppNotification, callback?: IAppNotificationCallback): void;
|
|
147
|
+
/**
|
|
148
|
+
* Attempt to cancel an ongoing application notification (e.g., print).
|
|
149
|
+
*
|
|
150
|
+
* @param token as returned via the 'onSuccess' method in the 'fireAppNotification' callback.
|
|
110
151
|
*/
|
|
111
|
-
|
|
152
|
+
cancelAppNotification(token: IAppNotificationToken): void;
|
|
112
153
|
}
|
package/dist/IThemeManager.d.ts
CHANGED
package/dist/ITypes.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export type PaperSizeName = "A5" | "A4" | "A3" | "B5" | "B4" | "Letter" | "Legal" | "Ledger" | "JIS-B5" | "JIS-B4";
|
|
2
|
+
export type PaperOrientation = "portrait" | "landscape";
|
|
3
|
+
export type PaperSizeUnits = "px" | "mm" | "cm" | "in";
|
|
4
4
|
export declare enum CompareTextInterpretationType {
|
|
5
5
|
MORE = "more=better",
|
|
6
6
|
LESS = "less=better",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CSSInterpolation } from "@mui/system";
|
|
2
|
-
|
|
3
|
-
export
|
|
2
|
+
type variantName = string;
|
|
3
|
+
export type IThemeRegisterVariant = Record<variantName, {
|
|
4
4
|
/**
|
|
5
5
|
* for styled MUI like components additional properties defining when the variant applies
|
|
6
6
|
*/
|
package/dist/LazyTreeView.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EntityItem, MdxInfo, TreeRowPropsTreeData } from "./PublicTidyTableTypes";
|
|
2
2
|
import React, { ReactElement } from "react";
|
|
3
|
-
export
|
|
3
|
+
export type ScrollDirection = "forward" | "backward";
|
|
4
4
|
export interface ListOnScrollProps {
|
|
5
5
|
scrollDirection: ScrollDirection;
|
|
6
6
|
scrollOffset: number;
|
package/dist/Loader.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IReporting } from "./IReporting";
|
|
2
|
-
export
|
|
2
|
+
export type AppType = "embedded-div-init" | "console" | "viewer" | "editor" | "admin" | "appEditor" | "gadgetEditor" | "mdxConsole";
|
|
3
3
|
export interface IDashboardsLoaderFrameParams {
|
|
4
4
|
/**
|
|
5
5
|
* An unique ID (DOM) that is identifying the icCube dashboards instance.
|
|
@@ -36,6 +36,56 @@ export interface IDashboardsLoaderParams {
|
|
|
36
36
|
* An empty string means default embedded configuration.
|
|
37
37
|
*/
|
|
38
38
|
configuration?: string;
|
|
39
|
+
/**
|
|
40
|
+
* An optional URL giving the actual location of the icCube server (e.g., https://dev.icCube.com).
|
|
41
|
+
* All other URLs will be inferred from it.
|
|
42
|
+
*/
|
|
43
|
+
urlHome?: string;
|
|
44
|
+
/**
|
|
45
|
+
* The URL path of the icCube index.html containing the Webpack main entry point (i.e., main.js).
|
|
46
|
+
*
|
|
47
|
+
* ($urlHome)/icCube/report/console (e.g., https://dev.icCube.com/icCube/report/console).
|
|
48
|
+
*/
|
|
49
|
+
urlAppIndexHtml?: string;
|
|
50
|
+
/**
|
|
51
|
+
* The URL path where icCube Webpack files are located:
|
|
52
|
+
* <pre>
|
|
53
|
+
* /icCube/report
|
|
54
|
+
* app -- public path
|
|
55
|
+
* index.html
|
|
56
|
+
* main.js
|
|
57
|
+
* chunks
|
|
58
|
+
* ...
|
|
59
|
+
* plugins -- e.g., amCharts
|
|
60
|
+
* ...
|
|
61
|
+
* </pre>
|
|
62
|
+
*
|
|
63
|
+
* ($urlHome)/icCube/report/app/ (e.g., https://dev.icCube.com/icCube/report/app/).
|
|
64
|
+
*/
|
|
65
|
+
urlAppPublicPath?: string;
|
|
66
|
+
/**
|
|
67
|
+
* ($urlHome)/icCube/report/console (e.g., https://dev.icCube.com/icCube/report/console).
|
|
68
|
+
*/
|
|
69
|
+
urlApp?: string;
|
|
70
|
+
/**
|
|
71
|
+
* ($urlHome)/icCube/report/ic3-reporting/app-local (e.g., https://dev.icCube.com/icCube/report/ic3-reporting/app-local).
|
|
72
|
+
*/
|
|
73
|
+
urlAppLocal?: string;
|
|
74
|
+
/**
|
|
75
|
+
* ($urlHome)/icCube/report/ic3-reporting/doc (e.g., https://dev.icCube.com/icCube/report/ic3-reporting/doc).
|
|
76
|
+
*/
|
|
77
|
+
urlAppDoc?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Optional extra. documentation path (e.g., https://dev.icCube.com/icCube/report/ic3-reporting/app-local/doc).
|
|
80
|
+
*/
|
|
81
|
+
urlAppDocEx?: string;
|
|
82
|
+
/**
|
|
83
|
+
* ($urlHome)/icCube/gvi (e.g., https://dev.icCube.com/icCube/gvi).
|
|
84
|
+
*/
|
|
85
|
+
urlAppDataSource?: string;
|
|
86
|
+
/**
|
|
87
|
+
* ?ic3demo=
|
|
88
|
+
*/
|
|
39
89
|
urlSuffix?: string;
|
|
40
90
|
}
|
|
41
91
|
export interface IDashboardsLoaderDivParams {
|
|
@@ -71,24 +121,6 @@ export declare class DashboardsLoaderDivContext {
|
|
|
71
121
|
private static readonly mainJsCacheKeyRE;
|
|
72
122
|
private static readonly buildVersionRE;
|
|
73
123
|
private static readonly buildTimestampRE;
|
|
74
|
-
/**
|
|
75
|
-
* The URL path of the icCube index.html containing the Webpack main entry point (i.e., main.js).
|
|
76
|
-
*/
|
|
77
|
-
private readonly indexHtmlUrl;
|
|
78
|
-
/**
|
|
79
|
-
* The URL path where icCube Webpack files are located:
|
|
80
|
-
*
|
|
81
|
-
* /icCube/report
|
|
82
|
-
* app -- public path
|
|
83
|
-
* index.html
|
|
84
|
-
* main.js
|
|
85
|
-
* chunks
|
|
86
|
-
* ...
|
|
87
|
-
* plugins -- e.g., amCharts
|
|
88
|
-
* ...
|
|
89
|
-
*
|
|
90
|
-
*/
|
|
91
|
-
private readonly publicPath;
|
|
92
124
|
/**
|
|
93
125
|
* Whether or not icCube is going to request custom HTTP headers from the host application.
|
|
94
126
|
* The value is passed back to the message sent to the host.
|
|
@@ -100,7 +132,49 @@ export declare class DashboardsLoaderDivContext {
|
|
|
100
132
|
* An empty string means default embedded configuration.
|
|
101
133
|
*/
|
|
102
134
|
private readonly configuration?;
|
|
103
|
-
|
|
135
|
+
/**
|
|
136
|
+
* The URL path of the icCube index.html containing the Webpack main entry point (i.e., main.js).
|
|
137
|
+
*
|
|
138
|
+
* ($urlHome)/icCube/report/console (e.g., https://dev.icCube.com/icCube/report/console).
|
|
139
|
+
*/
|
|
140
|
+
private readonly urlAppIndexHtml;
|
|
141
|
+
/**
|
|
142
|
+
* The URL path where icCube Webpack files are located:
|
|
143
|
+
* <pre>
|
|
144
|
+
* /icCube/report
|
|
145
|
+
* app -- public path
|
|
146
|
+
* index.html
|
|
147
|
+
* main.js
|
|
148
|
+
* chunks
|
|
149
|
+
* ...
|
|
150
|
+
* plugins -- e.g., amCharts
|
|
151
|
+
* ...
|
|
152
|
+
* </pre>
|
|
153
|
+
*
|
|
154
|
+
* ($urlHome)/icCube/report/app (e.g., https://dev.icCube.com/icCube/report/app).
|
|
155
|
+
*/
|
|
156
|
+
private readonly urlAppPublicPath;
|
|
157
|
+
private readonly urlAppMainJS;
|
|
158
|
+
/**
|
|
159
|
+
* ($urlHome)/icCube/report/console (e.g., https://dev.icCube.com/icCube/report/console).
|
|
160
|
+
*/
|
|
161
|
+
private readonly urlApp?;
|
|
162
|
+
/**
|
|
163
|
+
* ($urlHome)/icCube/report/ic3-reporting/app-local (e.g., https://dev.icCube.com/icCube/report/ic3-reporting/app-local).
|
|
164
|
+
*/
|
|
165
|
+
private readonly urlAppLocal?;
|
|
166
|
+
/**
|
|
167
|
+
* ($urlHome)/icCube/report/ic3-reporting/doc (e.g., https://dev.icCube.com/icCube/report/ic3-reporting/doc).
|
|
168
|
+
*/
|
|
169
|
+
private readonly urlAppDoc?;
|
|
170
|
+
/**
|
|
171
|
+
* Optional extra. documentation path (e.g., https://dev.icCube.com/icCube/report/ic3-reporting/app-local/doc).
|
|
172
|
+
*/
|
|
173
|
+
private readonly urlAppDocEx?;
|
|
174
|
+
/**
|
|
175
|
+
* ($urlHome)/icCube/gvi (e.g., https://dev.icCube.com/icCube/gvi).
|
|
176
|
+
*/
|
|
177
|
+
private readonly urlAppDataSource?;
|
|
104
178
|
private buildVersion;
|
|
105
179
|
private buildTimestamp;
|
|
106
180
|
private libLoader;
|
package/dist/Loader.js
CHANGED
|
@@ -8,7 +8,7 @@ function DashboardsLoaderFrame(params) {
|
|
|
8
8
|
const { containerId, frameId, className, style, onReady, url } = params;
|
|
9
9
|
const containerELT = document.getElementById(containerId);
|
|
10
10
|
if (!containerELT) {
|
|
11
|
-
throw new Error("[
|
|
11
|
+
throw new Error("[Loader] (iFrame) missing container [" + containerId + "]");
|
|
12
12
|
}
|
|
13
13
|
console.log("[Loader] (iFrame) icCube URL : " + url);
|
|
14
14
|
console.log("[Loader] (iFrame) container : " + containerId);
|
|
@@ -54,41 +54,34 @@ exports.DashboardsLoaderFrame = DashboardsLoaderFrame;
|
|
|
54
54
|
*/
|
|
55
55
|
class DashboardsLoaderDivContext {
|
|
56
56
|
constructor(options) {
|
|
57
|
-
|
|
58
|
-
* The URL path of the icCube index.html containing the Webpack main entry point (i.e., main.js).
|
|
59
|
-
*/
|
|
60
|
-
this.indexHtmlUrl = "/icCube/report/console";
|
|
61
|
-
/**
|
|
62
|
-
* The URL path where icCube Webpack files are located:
|
|
63
|
-
*
|
|
64
|
-
* /icCube/report
|
|
65
|
-
* app -- public path
|
|
66
|
-
* index.html
|
|
67
|
-
* main.js
|
|
68
|
-
* chunks
|
|
69
|
-
* ...
|
|
70
|
-
* plugins -- e.g., amCharts
|
|
71
|
-
* ...
|
|
72
|
-
*
|
|
73
|
-
*/
|
|
74
|
-
this.publicPath = "/icCube/report/app/";
|
|
57
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
75
58
|
this.buildVersion = "";
|
|
76
59
|
this.buildTimestamp = "";
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
this.
|
|
89
|
-
this.
|
|
90
|
-
this.
|
|
91
|
-
this.
|
|
60
|
+
const opts = (_a = ((typeof options === "string") ? { urlSuffix: options } : options)) !== null && _a !== void 0 ? _a : {};
|
|
61
|
+
this.customHeaders = opts.customHeaders;
|
|
62
|
+
this.configuration = opts.configuration;
|
|
63
|
+
const suffix = (_b = opts.urlSuffix) !== null && _b !== void 0 ? _b : "";
|
|
64
|
+
const home = function (p) {
|
|
65
|
+
return opts.urlHome ? (opts.urlHome + p) : undefined;
|
|
66
|
+
};
|
|
67
|
+
this.urlAppIndexHtml = ((_c = opts.urlAppIndexHtml) !== null && _c !== void 0 ? _c : (((_d = opts.urlHome) !== null && _d !== void 0 ? _d : "") + "/icCube/report/console")) + suffix;
|
|
68
|
+
this.urlAppPublicPath = (_e = opts.urlAppPublicPath) !== null && _e !== void 0 ? _e : (((_f = opts.urlHome) !== null && _f !== void 0 ? _f : "") + "/icCube/report/app/");
|
|
69
|
+
this.urlAppMainJS = this.urlAppPublicPath + "main.js" + suffix;
|
|
70
|
+
this.urlApp = (_g = opts.urlApp) !== null && _g !== void 0 ? _g : home("/icCube/report/console");
|
|
71
|
+
this.urlAppLocal = (_h = opts.urlAppLocal) !== null && _h !== void 0 ? _h : home("/icCube/report/ic3-reporting/app-local");
|
|
72
|
+
this.urlAppDoc = (_j = opts.urlAppDoc) !== null && _j !== void 0 ? _j : home("/icCube/report/ic3-reporting/doc");
|
|
73
|
+
this.urlAppDocEx = opts.urlAppDocEx;
|
|
74
|
+
this.urlAppDataSource = (_k = opts.urlAppDataSource) !== null && _k !== void 0 ? _k : home("/icCube/gvi");
|
|
75
|
+
console.log("[Loader] (div) suffix :" + opts.urlSuffix);
|
|
76
|
+
console.log("[Loader] (div) home :" + opts.urlHome);
|
|
77
|
+
console.log("[Loader] (div) urlAppIndexHtml :" + this.urlAppIndexHtml);
|
|
78
|
+
console.log("[Loader] (div) urlAppPublicPath :" + this.urlAppPublicPath);
|
|
79
|
+
console.log("[Loader] (div) urlAppMainJS :" + this.urlAppMainJS);
|
|
80
|
+
console.log("[Loader] (div) urlApp :" + this.urlApp);
|
|
81
|
+
console.log("[Loader] (div) urlAppLocal :" + this.urlAppLocal);
|
|
82
|
+
console.log("[Loader] (div) urlAppDoc :" + this.urlAppDoc);
|
|
83
|
+
console.log("[Loader] (div) urlAppDocEx :" + this.urlAppDocEx);
|
|
84
|
+
console.log("[Loader] (div) urlAppDataSource :" + this.urlAppDataSource);
|
|
92
85
|
// Start loading all required initial libraries (in the background).
|
|
93
86
|
this.libLoader = this.loadLibs();
|
|
94
87
|
}
|
|
@@ -131,13 +124,16 @@ class DashboardsLoaderDivContext {
|
|
|
131
124
|
if (this.libLoader == null) {
|
|
132
125
|
const wnd = window;
|
|
133
126
|
const start = performance.now();
|
|
134
|
-
this.libLoader = fetch(this.
|
|
127
|
+
this.libLoader = fetch(this.urlAppIndexHtml, { cache: 'no-cache' })
|
|
135
128
|
.then(response => {
|
|
136
129
|
if (!response.ok) {
|
|
137
130
|
throw new Error(response.status + ":" + response.statusText + " (" + response.url + ")");
|
|
138
131
|
}
|
|
139
132
|
return response.text();
|
|
140
133
|
}).then(indexHtml => {
|
|
134
|
+
if (indexHtml.indexOf("ic3-reporting-application") === -1) {
|
|
135
|
+
throw new Error("[Loader] unexpected content in index.html (possibly not logged?)");
|
|
136
|
+
}
|
|
141
137
|
// CSRF code.
|
|
142
138
|
//
|
|
143
139
|
// The server might have been configured with csrfOff=true meaning we should not fail here.
|
|
@@ -148,23 +144,28 @@ class DashboardsLoaderDivContext {
|
|
|
148
144
|
token && (wnd['ic3_CSRF_token'] = token);
|
|
149
145
|
}
|
|
150
146
|
// Webpack entry point (main.js) cache busting key
|
|
151
|
-
|
|
152
|
-
if (!this.mainJsUrl.includes("?")) {
|
|
153
|
-
cacheKey = "?" + DashboardsLoaderDivContext.extractMatch(indexHtml, DashboardsLoaderDivContext.mainJsCacheKeyRE, "Internal Error: missing main.js");
|
|
154
|
-
}
|
|
147
|
+
const cacheKey = DashboardsLoaderDivContext.extractMatch(indexHtml, DashboardsLoaderDivContext.mainJsCacheKeyRE, "[Loader] missing main.js cache key from index.html");
|
|
155
148
|
// Build information
|
|
156
149
|
this.buildVersion = DashboardsLoaderDivContext.extractMatch(indexHtml, DashboardsLoaderDivContext.buildVersionRE);
|
|
157
150
|
this.buildTimestamp = DashboardsLoaderDivContext.extractMatch(indexHtml, DashboardsLoaderDivContext.buildTimestampRE);
|
|
158
|
-
const scriptUrl = this.
|
|
151
|
+
const scriptUrl = this.urlAppMainJS + (!this.urlAppMainJS.includes("?") ? "?" : "&") + cacheKey;
|
|
159
152
|
// Load Webpack entry point: main.js
|
|
160
153
|
console.log("[Loader] (div) start loading library [version:" + this.buildVersion + "] [build:" + this.buildTimestamp + "]");
|
|
161
154
|
wnd["__ic3_div_embedded__"] = true;
|
|
162
|
-
wnd["__ic3_div_webpack_public_path__"] = this.
|
|
155
|
+
wnd["__ic3_div_webpack_public_path__"] = this.urlAppPublicPath;
|
|
163
156
|
wnd["__ic3_div_custom_headers__"] = this.customHeaders;
|
|
164
157
|
wnd["__ic3_div_configuration__"] = this.configuration;
|
|
165
|
-
wnd["
|
|
166
|
-
wnd["
|
|
167
|
-
|
|
158
|
+
wnd["__ic3_div_app_path__"] = this.urlApp;
|
|
159
|
+
wnd["__ic3_div_app_local_path__"] = this.urlAppLocal;
|
|
160
|
+
wnd["__ic3_div_app_doc_path__"] = this.urlAppDoc;
|
|
161
|
+
wnd["__ic3_div_app_doc_ex_path__"] = this.urlAppDocEx;
|
|
162
|
+
wnd["__ic3_div_app_datasource_path__"] = this.urlAppDataSource;
|
|
163
|
+
{
|
|
164
|
+
// embedding a previous version
|
|
165
|
+
wnd["__ic3_embedded__"] = true;
|
|
166
|
+
wnd["__ic3__webpack_public_path__"] = this.urlAppPublicPath;
|
|
167
|
+
}
|
|
168
|
+
return DashboardsLoaderDivContext.loadScript(scriptUrl).catch(reason => Promise.reject("[Loader] error while loading the main.js script : " + scriptUrl));
|
|
168
169
|
}).then(() => {
|
|
169
170
|
console.log("[Loader] (div) main.js loaded in " + Math.round(performance.now() - start) + " ms");
|
|
170
171
|
let count = 0;
|
package/dist/Loader.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Loader.js","sourceRoot":"","sources":["../src/Loader.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Loader.js","sourceRoot":"","sources":["../src/Loader.ts"],"names":[],"mappings":";;;AA0CA;;GAEG;AACH,SAAgB,qBAAqB,CAAC,MAAoC;IAEtE,MAAM,EAAC,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAC,GAAG,MAAM,CAAC;IAEtE,MAAM,YAAY,GAAG,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAE1D,IAAI,CAAC,YAAY,EAAE;QACf,MAAM,IAAI,KAAK,CAAC,uCAAuC,GAAG,WAAW,GAAG,GAAG,CAAC,CAAA;KAC/E;IAED,OAAO,CAAC,GAAG,CAAC,iCAAiC,GAAG,GAAG,CAAC,CAAC;IACrD,OAAO,CAAC,GAAG,CAAC,iCAAiC,GAAG,WAAW,CAAC,CAAC;IAC7D,OAAO,CAAC,GAAG,CAAC,iCAAiC,GAAG,OAAO,CAAC,CAAC;IAEzD,MAAM,GAAG,GAAI,MAAc,CAAC;IAE5B,GAAG,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC;IAEpC,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG,CAAC,GAAe,EAAE,EAAE;QAE7C,OAAO,CAAC,GAAG,CAAC,iCAAiC,EAAE,GAAG,CAAC,CAAC;QAEpD,OAAO,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QAClC,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;IAE5B,CAAC,CAAA;IAED,iEAAiE;IACjE,6CAA6C;IAE7C,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IAEhD,OAAO,IAAI,CAAC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AiB,CAAA;QAC/B,MAAM,CAAC,MAAM,GAAG,OAAO,CAAA;QACvB,MAAM,CAAC,OAAO,GAAG,MAAM,CAAA;QACvB,MAAM,CAAC,GAAG,GAAG,GAAG,CAAA;QAChB,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAChC,CAAC,CAAC,CAAA;AACN,CAAC,CAAA"}
|
package/dist/Logger.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type LoggerComponent = "AlertDialog" | "AmCharts4" | "AmCharts4GeoMap" | "AmCharts5" | "App" | "AppCustomHeaders" | "AppStarter" | "AppStatus" | "ChartTemplateWidget" | "Demo" | "EmbeddedReport" | "ErrorRenderer" | "Font" | "General" | "GoogleMap" | "Help" | "History" | "Keyboard" | "Layout" | "LayoutPage" | "LayoutRender" | "Loader" | "Localization" | "Operation" | "Other" | "PivotTable" | "PivotTablePagingView" | "Plugin" | "Profiler" | "ReportAppBar" | "ReportAppMenu" | "ReportInitializer" | "ReportStarter" | "RepetitionWidget" | "Request" | "SchemaDataUpdate" | "Storage" | "Table" | "WidgetBox" | "WidgetBoxWrapper" | "WidgetTemplateLibrary";
|
|
2
2
|
export interface ILogger {
|
|
3
3
|
resetTime(): void;
|
|
4
4
|
disable(component: LoggerComponent): void;
|
package/dist/PublicContext.d.ts
CHANGED
|
@@ -8,10 +8,15 @@ import { ITidyColumn, ITidyNumericColumn } from "./PublicTidyColumn";
|
|
|
8
8
|
import { IPublicWidgetTemplateDefinition } from "./PublicTemplate";
|
|
9
9
|
import { ITidyMath } from "./PublicTidyMath";
|
|
10
10
|
import { ILogger } from "./Logger";
|
|
11
|
+
import { AppNotification } from "./INotification";
|
|
11
12
|
export declare enum WidgetRenderLayoutStatus {
|
|
12
13
|
RENDERING = "RENDERING",
|
|
13
14
|
RENDERED = "RENDERED"
|
|
14
15
|
}
|
|
16
|
+
export declare enum WidgetWarningSeverity {
|
|
17
|
+
WARNING = 0,
|
|
18
|
+
ERROR = 1
|
|
19
|
+
}
|
|
15
20
|
export declare enum IContentMessageType {
|
|
16
21
|
info = 0,
|
|
17
22
|
error = 1
|
|
@@ -152,6 +157,10 @@ export interface IWidgetPublicContext extends IPublicContext {
|
|
|
152
157
|
* actionName if the action is bound to a channel, send an Mdx Event (value,mdx)
|
|
153
158
|
*/
|
|
154
159
|
fireMdxEvent(actionName: string, value: string, mdx: string): void;
|
|
160
|
+
/**
|
|
161
|
+
* Used for publishing app notifications (e.g., print the report).
|
|
162
|
+
*/
|
|
163
|
+
fireAppNotification(notification: AppNotification): void;
|
|
155
164
|
/**
|
|
156
165
|
* Cypress testing purpose, after a rendering of the chart
|
|
157
166
|
*/
|
|
@@ -216,6 +225,15 @@ export interface IWidgetPublicContext extends IPublicContext {
|
|
|
216
225
|
*/
|
|
217
226
|
getMapCoordinates(table: ITidyTable): [ITidyNumericColumn, ITidyNumericColumn] | [];
|
|
218
227
|
getGoogleMapRenderedDelayMS(): number;
|
|
228
|
+
/**
|
|
229
|
+
* Displays an warning icon in the widget header showing the warning when the user hovers the icon.
|
|
230
|
+
* Be sure to clear all warnings before rendering using {@see widgetClearWarnings}
|
|
231
|
+
*/
|
|
232
|
+
addWidgetWarning(warning: string, severity?: WidgetWarningSeverity): void;
|
|
233
|
+
/**
|
|
234
|
+
* Clear the warnings in the widget.
|
|
235
|
+
*/
|
|
236
|
+
widgetClearWarnings(): void;
|
|
219
237
|
}
|
|
220
238
|
export interface IWidgetEditorPublicContext {
|
|
221
239
|
/**
|
package/dist/PublicContext.js
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IContentMessageType = exports.WidgetRenderLayoutStatus = void 0;
|
|
3
|
+
exports.IContentMessageType = exports.WidgetWarningSeverity = exports.WidgetRenderLayoutStatus = void 0;
|
|
4
4
|
var WidgetRenderLayoutStatus;
|
|
5
5
|
(function (WidgetRenderLayoutStatus) {
|
|
6
6
|
WidgetRenderLayoutStatus["RENDERING"] = "RENDERING";
|
|
7
7
|
WidgetRenderLayoutStatus["RENDERED"] = "RENDERED";
|
|
8
8
|
})(WidgetRenderLayoutStatus = exports.WidgetRenderLayoutStatus || (exports.WidgetRenderLayoutStatus = {}));
|
|
9
|
+
var WidgetWarningSeverity;
|
|
10
|
+
(function (WidgetWarningSeverity) {
|
|
11
|
+
WidgetWarningSeverity[WidgetWarningSeverity["WARNING"] = 0] = "WARNING";
|
|
12
|
+
WidgetWarningSeverity[WidgetWarningSeverity["ERROR"] = 1] = "ERROR";
|
|
13
|
+
})(WidgetWarningSeverity = exports.WidgetWarningSeverity || (exports.WidgetWarningSeverity = {}));
|
|
9
14
|
var IContentMessageType;
|
|
10
15
|
(function (IContentMessageType) {
|
|
11
16
|
IContentMessageType[IContentMessageType["info"] = 0] = "info";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicContext.js","sourceRoot":"","sources":["../src/PublicContext.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"PublicContext.js","sourceRoot":"","sources":["../src/PublicContext.ts"],"names":[],"mappings":";;;AAWA,IAAY,wBAGX;AAHD,WAAY,wBAAwB;IAChC,mDAAuB,CAAA;IACvB,iDAAqB,CAAA;AACzB,CAAC,EAHW,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAGnC;AAED,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC7B,uEAAO,CAAA;IACP,mEAAK,CAAA;AACT,CAAC,EAHW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAGhC;AAED,IAAY,mBAAkC;AAA9C,WAAY,mBAAmB;IAAG,6DAAI,CAAA;IAAE,+DAAK,CAAA;AAAA,CAAC,EAAlC,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAAe"}
|
package/dist/PublicLayout.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { PaperOrientation, PaperSizeUnits } from "./ITypes";
|
|
2
2
|
import { Property } from "csstype";
|
|
3
|
-
|
|
3
|
+
type CSSProperties = any;
|
|
4
4
|
/**
|
|
5
5
|
* <pre>
|
|
6
6
|
* unlimited: in height (page width is always known).
|
|
7
7
|
* </pre>
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export type PageSize = "known" | "manual" | "unlimited";
|
|
10
10
|
export interface IPageSize {
|
|
11
11
|
type: PageSize;
|
|
12
12
|
}
|
package/dist/PublicTemplate.d.ts
CHANGED
|
@@ -38,8 +38,7 @@ export interface IWidgetLayoutInfo extends IRectangle {
|
|
|
38
38
|
data?: IWidgetLayoutData;
|
|
39
39
|
resizingConstraint?: ResizingConstraintOptions;
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
export declare type IPublicWidgetTemplateDefinition<T extends FormFieldObject> = IPublicWidgetReactTemplateDefinition<T> | IPublicWidgetJsTemplateDefinition<T>;
|
|
41
|
+
export type IPublicWidgetTemplateDefinition<T extends FormFieldObject> = IPublicWidgetReactTemplateDefinition<T> | IPublicWidgetJsTemplateDefinition<T>;
|
|
43
42
|
export declare enum IWidgetTemplateMdxBuilderAxisPropsConstraint {
|
|
44
43
|
DateType = "DateType",
|
|
45
44
|
GeoLatLong = "GeoLatLong",
|
|
@@ -100,9 +99,13 @@ export interface IWidgetTemplateMdxBuilderMapping {
|
|
|
100
99
|
*/
|
|
101
100
|
mdxIsForFilter?: true;
|
|
102
101
|
/**
|
|
103
|
-
* The cell values are not needed
|
|
102
|
+
* The cell values are not needed.
|
|
104
103
|
*/
|
|
105
104
|
withoutCellValues?: true;
|
|
105
|
+
/**
|
|
106
|
+
* The cell values are not needed if there is a single axis in the query.
|
|
107
|
+
*/
|
|
108
|
+
withoutCellValuesSingleAxis?: true;
|
|
106
109
|
/**
|
|
107
110
|
* An MDX query if the builder is empty.
|
|
108
111
|
*/
|
|
@@ -119,7 +122,7 @@ export interface IPublicReactChartTemplate<T extends FormFieldObject> {
|
|
|
119
122
|
* @param options the options (possibly edited and/or from the theme) of this widget
|
|
120
123
|
* @param header aka. widget title
|
|
121
124
|
*/
|
|
122
|
-
reactElement: (data: IWidgetTemplateTidyData, options: T, header: string
|
|
125
|
+
reactElement: (data: IWidgetTemplateTidyData, options: T, header: string) => ReactElement;
|
|
123
126
|
}
|
|
124
127
|
/**
|
|
125
128
|
* A widget that renders using plain Javascript/Typescript.
|
|
@@ -437,7 +440,7 @@ export interface IChartVisualizationTypedInput<T extends FormFieldObject> {
|
|
|
437
440
|
* validity. The widget generates an error if columns are selected that are not in the allowed properties, or if
|
|
438
441
|
* columns are mandatory but there is no selection or fallback.
|
|
439
442
|
*/
|
|
440
|
-
export
|
|
443
|
+
export type IWidgetTemplateDataMappingDef = IFormColumnChooserFieldDef;
|
|
441
444
|
/**
|
|
442
445
|
* Predefined roles
|
|
443
446
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicTemplate.js","sourceRoot":"","sources":["../src/PublicTemplate.ts"],"names":[],"mappings":";;;
|
|
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;AAgcD;;;;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"}
|