@ic3/reporting-api 8.0.0-rc.4 → 8.1.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.d.ts +46 -8
- package/dist/ApiUtils.js +37 -21
- package/dist/ApiUtils.js.map +1 -1
- package/dist/INotification.d.ts +26 -6
- package/dist/IOnNewEventJsContext.d.ts +66 -0
- package/dist/{theme/ThemeGoogleMapMarker.js → IOnNewEventJsContext.js} +1 -1
- package/dist/IOnNewEventJsContext.js.map +1 -0
- package/dist/IPluginDefinition.d.ts +9 -0
- package/dist/IReporting.d.ts +15 -5
- package/dist/IThemeManager.d.ts +12 -13
- package/dist/IThemeManager.js.map +1 -1
- package/dist/ITypes.d.ts +22 -0
- package/dist/ITypes.js +28 -0
- package/dist/ITypes.js.map +1 -1
- package/dist/IWidgetManager.d.ts +5 -2
- package/dist/LazyTreeView.d.ts +6 -24
- package/dist/LazyTreeView.js +0 -13
- package/dist/LazyTreeView.js.map +1 -1
- package/dist/Loader.d.ts +78 -0
- package/dist/Loader.js +160 -3
- package/dist/Loader.js.map +1 -1
- package/dist/PublicAmchartsData.d.ts +62 -0
- package/dist/PublicAmchartsData.js +126 -0
- package/dist/PublicAmchartsData.js.map +1 -0
- package/dist/PublicContext.d.ts +40 -3
- package/dist/PublicLayout.d.ts +5 -1
- package/dist/PublicTemplate.d.ts +90 -36
- package/dist/PublicTemplate.js +1 -10
- package/dist/PublicTemplate.js.map +1 -1
- package/dist/PublicTemplateForm.d.ts +66 -8
- package/dist/PublicTemplateForm.js +1 -9
- package/dist/PublicTemplateForm.js.map +1 -1
- package/dist/PublicTemplates.d.ts +61 -0
- package/dist/{theme/ThemeReportAppMenu.js → PublicTemplates.js} +1 -1
- package/dist/PublicTemplates.js.map +1 -0
- package/dist/PublicTheme.d.ts +157 -16
- package/dist/PublicTheme.js.map +1 -1
- package/dist/PublicTidyColumn.d.ts +76 -21
- package/dist/PublicTidyColumn.js +8 -0
- package/dist/PublicTidyColumn.js.map +1 -1
- package/dist/PublicTidyHistogram.d.ts +39 -1
- package/dist/PublicTidyHistogram.js +6 -1
- package/dist/PublicTidyHistogram.js.map +1 -1
- package/dist/PublicTidyMath.d.ts +26 -20
- package/dist/PublicTidyTable.d.ts +44 -19
- package/dist/PublicTidyTableInteractions.d.ts +80 -17
- package/dist/PublicTidyTableTypes.d.ts +109 -19
- package/dist/PublicTidyTableTypes.js +18 -1
- package/dist/PublicTidyTableTypes.js.map +1 -1
- package/dist/PublicTidyTree.d.ts +19 -12
- package/dist/PublicTidyTree.js +25 -16
- package/dist/PublicTidyTree.js.map +1 -1
- package/dist/index.d.ts +20 -3
- package/dist/index.js +25 -4
- package/dist/index.js.map +1 -1
- package/dist/theme/ThemeAmCharts4.d.ts +1358 -0
- package/dist/theme/ThemeAmCharts4.js +61 -0
- package/dist/theme/ThemeAmCharts4.js.map +1 -0
- package/dist/theme/ThemeApp.d.ts +26 -11
- package/dist/theme/ThemeApp.js +51 -0
- package/dist/theme/ThemeApp.js.map +1 -1
- package/dist/theme/ThemeAppMenuIcon.d.ts +7 -0
- package/dist/theme/ThemeAppMenuIcon.js +8 -0
- package/dist/theme/ThemeAppMenuIcon.js.map +1 -0
- package/dist/theme/ThemeBaseTable.d.ts +94 -0
- package/dist/theme/ThemeBaseTable.js +10 -0
- package/dist/theme/ThemeBaseTable.js.map +1 -0
- package/dist/theme/ThemeDatePicker.d.ts +118 -0
- package/dist/theme/ThemeDatePicker.js +11 -0
- package/dist/theme/ThemeDatePicker.js.map +1 -0
- package/dist/theme/ThemeEditorTopBar.d.ts +31 -0
- package/dist/theme/ThemeEditorTopBar.js +35 -0
- package/dist/theme/ThemeEditorTopBar.js.map +1 -0
- package/dist/theme/ThemeEmbeddedReport.d.ts +25 -0
- package/dist/theme/ThemeEmbeddedReport.js +3 -0
- package/dist/theme/ThemeEmbeddedReport.js.map +1 -0
- package/dist/theme/ThemeFilter.d.ts +28 -0
- package/dist/theme/ThemeFilter.js +3 -0
- package/dist/theme/ThemeFilter.js.map +1 -0
- package/dist/theme/ThemeFilterAutocomplete.d.ts +31 -15
- package/dist/theme/ThemeFilterAutocomplete.js.map +1 -1
- package/dist/theme/ThemeFilterButtons.d.ts +40 -23
- package/dist/theme/ThemeFilterButtons.js +1 -1
- package/dist/theme/ThemeFilterButtons.js.map +1 -1
- package/dist/theme/ThemeFilterCheckboxRadio.d.ts +48 -0
- package/dist/theme/ThemeFilterCheckboxRadio.js +23 -0
- package/dist/theme/ThemeFilterCheckboxRadio.js.map +1 -0
- package/dist/theme/ThemeFilterPanel.d.ts +94 -0
- package/dist/theme/ThemeFilterPanel.js +35 -0
- package/dist/theme/ThemeFilterPanel.js.map +1 -0
- package/dist/theme/ThemeFilterSlider.d.ts +42 -28
- package/dist/theme/ThemeFilterSlider.js +7 -7
- package/dist/theme/ThemeFilterSlider.js.map +1 -1
- package/dist/theme/ThemeFilterTree.d.ts +61 -30
- package/dist/theme/ThemeFilterTree.js +2 -1
- package/dist/theme/ThemeFilterTree.js.map +1 -1
- package/dist/theme/ThemeGlobal.d.ts +4 -0
- package/dist/theme/ThemeGlobal.js +9 -0
- package/dist/theme/ThemeGlobal.js.map +1 -0
- package/dist/theme/ThemeGoogle.d.ts +132 -0
- package/dist/theme/ThemeGoogle.js +64 -0
- package/dist/theme/ThemeGoogle.js.map +1 -0
- package/dist/theme/ThemeGoogleHeatMap.d.ts +58 -0
- package/dist/theme/ThemeGoogleHeatMap.js +3 -0
- package/dist/theme/ThemeGoogleHeatMap.js.map +1 -0
- package/dist/theme/ThemeGoogleKmlLayer.d.ts +40 -0
- package/dist/theme/ThemeGoogleKmlLayer.js +3 -0
- package/dist/theme/ThemeGoogleKmlLayer.js.map +1 -0
- package/dist/theme/ThemeGoogleMarker.d.ts +147 -0
- package/dist/theme/ThemeGoogleMarker.js +3 -0
- package/dist/theme/ThemeGoogleMarker.js.map +1 -0
- package/dist/theme/ThemeHtmlBox.d.ts +5 -1
- package/dist/theme/ThemeImage.d.ts +19 -0
- package/dist/theme/ThemeImage.js +3 -0
- package/dist/theme/ThemeImage.js.map +1 -0
- package/dist/theme/ThemeKpiBox.d.ts +46 -0
- package/dist/theme/ThemeKpiBox.js +3 -0
- package/dist/theme/ThemeKpiBox.js.map +1 -0
- package/dist/theme/ThemeKpiCard.d.ts +98 -0
- package/dist/theme/ThemeKpiCard.js +3 -0
- package/dist/theme/ThemeKpiCard.js.map +1 -0
- package/dist/theme/ThemeLazyTreeClasses.d.ts +14 -0
- package/dist/theme/ThemeLazyTreeClasses.js +19 -0
- package/dist/theme/ThemeLazyTreeClasses.js.map +1 -0
- package/dist/theme/ThemeMarkdownText.d.ts +27 -0
- package/dist/theme/ThemeMarkdownText.js +3 -0
- package/dist/theme/ThemeMarkdownText.js.map +1 -0
- package/dist/theme/ThemePivotTable.d.ts +63 -0
- package/dist/theme/ThemePivotTable.js +10 -1
- package/dist/theme/ThemePivotTable.js.map +1 -1
- package/dist/theme/ThemeQueryBuilderNode.d.ts +8 -0
- package/dist/theme/ThemeQueryBuilderNode.js +8 -0
- package/dist/theme/ThemeQueryBuilderNode.js.map +1 -0
- package/dist/theme/ThemeRepetitionWidget.d.ts +51 -0
- package/dist/theme/ThemeRepetitionWidget.js +3 -0
- package/dist/theme/ThemeRepetitionWidget.js.map +1 -0
- package/dist/theme/ThemeReportAppLeftPanel.d.ts +7 -0
- package/dist/theme/ThemeReportAppLeftPanel.js +11 -0
- package/dist/theme/ThemeReportAppLeftPanel.js.map +1 -0
- package/dist/theme/ThemeTable.d.ts +56 -1
- package/dist/theme/ThemeTable.js.map +1 -1
- package/dist/theme/ThemeWidgetBox.d.ts +77 -0
- package/dist/theme/ThemeWidgetBox.js +50 -14
- package/dist/theme/ThemeWidgetBox.js.map +1 -1
- package/package.json +6 -6
- package/dist/theme/ThemeFilterCheckboxes.d.ts +0 -18
- package/dist/theme/ThemeFilterCheckboxes.js +0 -11
- package/dist/theme/ThemeFilterCheckboxes.js.map +0 -1
- package/dist/theme/ThemeGoogleMapMarker.d.ts +0 -51
- package/dist/theme/ThemeGoogleMapMarker.js.map +0 -1
- package/dist/theme/ThemeReportAppMenu.d.ts +0 -18
- package/dist/theme/ThemeReportAppMenu.js.map +0 -1
package/dist/ApiUtils.d.ts
CHANGED
|
@@ -1,6 +1,41 @@
|
|
|
1
1
|
import { IPluginDefinition } from "./IPluginDefinition";
|
|
2
2
|
import { IVersionedPluginDefinition } from "./IVersionedPluginDefinition";
|
|
3
|
-
import {
|
|
3
|
+
import { FormFieldObject } from "./PublicTemplateForm";
|
|
4
|
+
import { IPublicWidgetJsTemplateDefinition, IPublicWidgetTemplateDefinition, IWrappedWidgetTemplateDefinition } from "./PublicTemplate";
|
|
5
|
+
import { WidgetTemplateIDs } from "./PublicTemplates";
|
|
6
|
+
export interface AmCharts4WrappedDefinition<WIDGET extends WidgetTemplateIDs> {
|
|
7
|
+
/**
|
|
8
|
+
* Some free text used while registering the wrapper (e.g., error purpose).
|
|
9
|
+
*/
|
|
10
|
+
readonly registrationInfo: string;
|
|
11
|
+
/**
|
|
12
|
+
* e.g., amCharts4.AmCharts4DonutChart
|
|
13
|
+
*/
|
|
14
|
+
readonly wrappedWidgetTemplateId: WIDGET;
|
|
15
|
+
/**
|
|
16
|
+
* New overall meta-information (e.g., id, groupId, image, etc...).
|
|
17
|
+
*/
|
|
18
|
+
readonly props: Partial<IPublicWidgetTemplateDefinition<FormFieldObject>>;
|
|
19
|
+
/**
|
|
20
|
+
* Meta-information for the editing of the widget options as well as the actual processing of those options
|
|
21
|
+
* (i.e., AmCharts 4 chart configuration). Lazy-loaded (and the underlying AmCharts 4 library) once required.
|
|
22
|
+
*
|
|
23
|
+
* <pre>
|
|
24
|
+
* export default {
|
|
25
|
+
*
|
|
26
|
+
* hookChartOptionsMeta: () => {
|
|
27
|
+
* ...
|
|
28
|
+
* },
|
|
29
|
+
*
|
|
30
|
+
* hookChartOptions: () => {
|
|
31
|
+
* ...
|
|
32
|
+
* },
|
|
33
|
+
*
|
|
34
|
+
* }
|
|
35
|
+
* </pre>
|
|
36
|
+
*/
|
|
37
|
+
readonly hooks: Promise<any>;
|
|
38
|
+
}
|
|
4
39
|
export declare class ApiUtils {
|
|
5
40
|
/**
|
|
6
41
|
* Define the form field as being localized.
|
|
@@ -8,12 +43,15 @@ export declare class ApiUtils {
|
|
|
8
43
|
static readonly TAG_I18N_FIELD = "ic3t_";
|
|
9
44
|
static makePlugin(definition: IPluginDefinition): () => IVersionedPluginDefinition;
|
|
10
45
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* @
|
|
15
|
-
|
|
46
|
+
* A helper method to create a widget template using the resolveDefinition method.
|
|
47
|
+
* Webpack lazy load of dependencies.
|
|
48
|
+
*
|
|
49
|
+
* @see IPublicWidgetJsTemplateDefinition#resolveDefinition
|
|
50
|
+
*/
|
|
51
|
+
static createLazyJsWidgetTemplateDefinition<OPTIONS extends FormFieldObject>(definition: Omit<IPublicWidgetJsTemplateDefinition<OPTIONS>, "jsCode">): IPublicWidgetJsTemplateDefinition<OPTIONS>;
|
|
52
|
+
static resolveAmCharts4WidgetTemplateDefinition<OPTIONS extends FormFieldObject>(definition: IPublicWidgetTemplateDefinition<OPTIONS>, wrapped: IPublicWidgetTemplateDefinition<any>): IPublicWidgetTemplateDefinition<OPTIONS>;
|
|
53
|
+
/**
|
|
54
|
+
* A utility function creating a wrapper widget template definition for existing AmCharts 4 widgets.
|
|
16
55
|
*/
|
|
17
|
-
static
|
|
18
|
-
private static resolveTemplateDefinition;
|
|
56
|
+
static makeAmCharts4WrappedWidgetTemplateDefinition<WIDGET extends WidgetTemplateIDs>(props: AmCharts4WrappedDefinition<WIDGET>): IWrappedWidgetTemplateDefinition<WIDGET>;
|
|
19
57
|
}
|
package/dist/ApiUtils.js
CHANGED
|
@@ -8,32 +8,48 @@ 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.1.0" || "-", "Thu, 02 Jun 2022 08:24:32 GMT" || "-") }, definition);
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* @
|
|
19
|
-
* @param transformOptions create the available options using the options from the wrapped template.
|
|
15
|
+
* A helper method to create a widget template using the resolveDefinition method.
|
|
16
|
+
* Webpack lazy load of dependencies.
|
|
17
|
+
*
|
|
18
|
+
* @see IPublicWidgetJsTemplateDefinition#resolveDefinition
|
|
20
19
|
*/
|
|
21
|
-
static
|
|
22
|
-
return Object.assign(Object.assign({},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
.then(definition => ApiUtils.resolveTemplateDefinition(self, definition, transformOptions));
|
|
26
|
-
}, jsCode: () => {
|
|
27
|
-
throw Error("Wrapped widget template " + wrappedTemplateId + ": unexpected jsCode() call!");
|
|
28
|
-
} });
|
|
20
|
+
static createLazyJsWidgetTemplateDefinition(definition) {
|
|
21
|
+
return Object.assign(Object.assign({}, definition), { jsCode: (context, container) => {
|
|
22
|
+
throw new Error("JS Lazy: unexpected jsCode() call!");
|
|
23
|
+
}, reactComponent: false, withDrilldownPivotTableLikeAs: false });
|
|
29
24
|
}
|
|
30
|
-
static
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
25
|
+
static resolveAmCharts4WidgetTemplateDefinition(definition, wrapped) {
|
|
26
|
+
return Object.assign(Object.assign(Object.assign({}, wrapped), definition), { resolveDefinition: undefined, jsCode: wrapped.jsCode });
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A utility function creating a wrapper widget template definition for existing AmCharts 4 widgets.
|
|
30
|
+
*/
|
|
31
|
+
static makeAmCharts4WrappedWidgetTemplateDefinition(props) {
|
|
32
|
+
return {
|
|
33
|
+
registrationInfo: props.registrationInfo,
|
|
34
|
+
wrappedWidgetTemplateId: props.wrappedWidgetTemplateId,
|
|
35
|
+
wrapper: (wrapped) => {
|
|
36
|
+
return Object.assign(Object.assign(Object.assign({}, wrapped /* unresolved */), props.props /* e.g., id, groupId, etc... */), {
|
|
37
|
+
/**
|
|
38
|
+
* amCharts 4 widgets are loading the amCharts 4 Javascript library on the fly.
|
|
39
|
+
*
|
|
40
|
+
* This extended widget has to use the resolveDefinition() mechanism as well to be able to re-use
|
|
41
|
+
* the lazy-loaded jsCode (widgets are implemented as IPublicWidgetJsTemplateDefinition).
|
|
42
|
+
*/
|
|
43
|
+
resolveDefinition: function (wrappedR) {
|
|
44
|
+
const wrappedResolved = ApiUtils.resolveAmCharts4WidgetTemplateDefinition(this, wrappedR);
|
|
45
|
+
return new Promise((resolve, reject) => {
|
|
46
|
+
props.hooks.then(definition => resolve(Object.assign(Object.assign({}, wrappedResolved), {
|
|
47
|
+
// our (lazy-loaded) widget meta-information and options hook.
|
|
48
|
+
chartOptionsMeta: definition.default.hookChartOptionsMeta(wrappedResolved.chartOptionsMeta), hookChartOptions: definition.default.hookChartOptions }))).catch(err => reject(err));
|
|
49
|
+
});
|
|
50
|
+
} });
|
|
51
|
+
}
|
|
52
|
+
};
|
|
37
53
|
}
|
|
38
54
|
}
|
|
39
55
|
exports.ApiUtils = ApiUtils;
|
package/dist/ApiUtils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiUtils.js","sourceRoot":"","sources":["../src/ApiUtils.ts"],"names":[],"mappings":";;;;;;AAEA,0EAAkD;
|
|
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,OAAO,IAAI,GAAG,EACd,+BAA+B,IAAI,GAAG,CACzC,IAEE,UAAU,EAEhB;QAEL,CAAC,CAAA;IACL,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,oCAAoC,CAAkC,UAAsE;QAEtJ,uCAEO,UAAU,KAEb,MAAM,EAAE,CAAC,OAA6B,EAAE,SAAyB,EAAE,EAAE;gBACjE,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;YAC1D,CAAC,EAED,cAAc,EAAE,KAAK,EAErB,6BAA6B,EAAE,KAAK,IAEvC;IAEL,CAAC;IAEM,MAAM,CAAC,wCAAwC,CAAkC,UAAoD,EAAE,OAA6C;QAEvL,OAAO,8CAEA,OAAO,GACP,UAAU,KAEb,iBAAiB,EAAE,SAAS,EAC5B,MAAM,EAAE,OAAO,CAAC,MAAM,GAEmB,CAAA;IAEjD,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,4CAA4C,CAAmC,KAAyC;QAElI,OAAO;YAEH,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;YACxC,uBAAuB,EAAE,KAAK,CAAC,uBAAuB;YAEtD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE;gBAEjB,qDAEO,OAAO,CAAC,gBAAgB,GAExB,KAAK,CAAC,KAAK,CAAC,+BAA+B;oBAE9C;;;;;uBAKG;oBACH,iBAAiB,EAAE,UAAU,QAAQ;wBAEjC,MAAM,eAAe,GAAG,QAAQ,CAAC,wCAAwC,CAAC,IAAI,EAAE,QAAS,CAAC,CAAC;wBAE3F,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;4BAEnC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,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 declare type AppNotificationType = "edit-report" | "print-report-dialog" | "print-report";
|
|
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";
|
|
3
3
|
export interface IAppNotification {
|
|
4
4
|
/**
|
|
5
5
|
* E.g., print-report.
|
|
@@ -19,15 +19,35 @@ export interface IAppNotificationWithPayload<PAYLOAD> extends IAppNotification {
|
|
|
19
19
|
export interface AppEditReportNotification extends IAppNotification {
|
|
20
20
|
readonly type: "edit-report";
|
|
21
21
|
}
|
|
22
|
-
export interface AppPrintReportDialogNotification extends IAppNotification {
|
|
23
|
-
readonly type: "print-report-dialog";
|
|
24
|
-
}
|
|
25
22
|
export interface AppPrintReportNotificationPayload {
|
|
26
23
|
fileName?: string;
|
|
27
24
|
paperSizeName?: PaperSizeName;
|
|
28
25
|
layout?: PaperOrientation;
|
|
29
26
|
}
|
|
30
|
-
export interface
|
|
27
|
+
export interface IAppPrintReportNotification extends IAppNotificationWithPayload<AppPrintReportNotificationPayload> {
|
|
28
|
+
}
|
|
29
|
+
export interface AppPrintReportNotification extends IAppPrintReportNotification {
|
|
31
30
|
readonly type: "print-report";
|
|
32
31
|
}
|
|
33
|
-
export
|
|
32
|
+
export interface AppPrintReportWithoutStateNotification extends IAppPrintReportNotification {
|
|
33
|
+
readonly type: "print-report-without-state";
|
|
34
|
+
}
|
|
35
|
+
export interface AppPrintReportInBrowserNotification extends IAppPrintReportNotification {
|
|
36
|
+
readonly type: "print-report-in-browser";
|
|
37
|
+
}
|
|
38
|
+
export interface AppPrintReportDialogNotification extends IAppNotification {
|
|
39
|
+
readonly type: "print-report-dialog";
|
|
40
|
+
}
|
|
41
|
+
export interface SaveStateToLocalStorageNotification extends IAppNotification {
|
|
42
|
+
readonly type: "save-state-to-localstorage";
|
|
43
|
+
}
|
|
44
|
+
export interface RestoreStateFromLocalStorageNotification extends IAppNotification {
|
|
45
|
+
readonly type: "restore-state-from-localstorage";
|
|
46
|
+
}
|
|
47
|
+
export interface SaveOwnPropsToLocalStorageNotification extends IAppNotification {
|
|
48
|
+
readonly type: "save-ownprops-to-localstorage";
|
|
49
|
+
}
|
|
50
|
+
export interface RestoreOwnPropsFromLocalStorageNotification extends IAppNotification {
|
|
51
|
+
readonly type: "restore-ownprops-from-localstorage";
|
|
52
|
+
}
|
|
53
|
+
export declare type AppNotification = AppEditReportNotification | AppPrintReportDialogNotification | AppPrintReportNotification | AppPrintReportWithoutStateNotification | AppPrintReportInBrowserNotification | SaveStateToLocalStorageNotification | RestoreStateFromLocalStorageNotification | SaveOwnPropsToLocalStorageNotification | RestoreOwnPropsFromLocalStorageNotification;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { PublicIcEvent } from "./IcEvent";
|
|
2
|
+
export interface IEventPayLoad {
|
|
3
|
+
nsId: string;
|
|
4
|
+
widgetId: string;
|
|
5
|
+
eventName: string;
|
|
6
|
+
event: PublicIcEvent | null | undefined;
|
|
7
|
+
}
|
|
8
|
+
export interface IOnNewEventJsContext {
|
|
9
|
+
/**
|
|
10
|
+
* A context cache that persist over calls.
|
|
11
|
+
*/
|
|
12
|
+
getCache(): Map<string, any>;
|
|
13
|
+
/**
|
|
14
|
+
* Report user name.
|
|
15
|
+
*/
|
|
16
|
+
getUserName(): string;
|
|
17
|
+
/**
|
|
18
|
+
* Report tenant, if any.
|
|
19
|
+
*/
|
|
20
|
+
getTenant(): string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Reporting version.
|
|
23
|
+
*/
|
|
24
|
+
getReportingVersion(): string;
|
|
25
|
+
/**
|
|
26
|
+
* Returns true if the event is empty.
|
|
27
|
+
*/
|
|
28
|
+
isEmptyEvent(event: IEventPayLoad): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* The name of the event/channel.
|
|
31
|
+
*/
|
|
32
|
+
getEventName(event: IEventPayLoad): string;
|
|
33
|
+
/**
|
|
34
|
+
* The caption of the event (i.e. 'United Kingdom').
|
|
35
|
+
*/
|
|
36
|
+
getEventCaption(event: IEventPayLoad): string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* The MDX of the event (i.e. [Geography].[Country].&[UK]).
|
|
39
|
+
*/
|
|
40
|
+
getEventMdx(event: IEventPayLoad): string | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* The widgetId from the widget the event was generated, if available.
|
|
43
|
+
*/
|
|
44
|
+
getEventWidgetId(event: IEventPayLoad): string | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Returns the widget jQuery object
|
|
47
|
+
*
|
|
48
|
+
* Using JQuery might conflit with React's state.
|
|
49
|
+
* Use with care as you will modify the DOM directly.
|
|
50
|
+
*/
|
|
51
|
+
getWidget$(widgetId: string): any;
|
|
52
|
+
/**
|
|
53
|
+
* Returns the widget header jQuery object.
|
|
54
|
+
*
|
|
55
|
+
* Using JQuery might conflit with React's state.
|
|
56
|
+
* Use with care as you will modify the DOM directly.
|
|
57
|
+
*/
|
|
58
|
+
getWidgetHeader$(widgetId: string): any;
|
|
59
|
+
/**
|
|
60
|
+
* Returns the widget header jQuery object (you can user text() to modify the header's title.
|
|
61
|
+
*
|
|
62
|
+
* Using JQuery might conflit with React's state.
|
|
63
|
+
* Use with care as you will modify the DOM directly.
|
|
64
|
+
*/
|
|
65
|
+
getWidgetHeaderTitle$(widgetId: string): any;
|
|
66
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IOnNewEventJsContext.js","sourceRoot":"","sources":["../src/IOnNewEventJsContext.ts"],"names":[],"mappings":""}
|
|
@@ -4,6 +4,9 @@ import { IWidgetManager } from "./IWidgetManager";
|
|
|
4
4
|
import { ITidyTableTransformationManager } from "./ITidyTableTransformationManager";
|
|
5
5
|
import { IWidgetDefaultsManager } from "./IWidgetDefaultsManager";
|
|
6
6
|
import { Theme } from "@mui/material/styles";
|
|
7
|
+
import { WidgetTemplateIDs } from "./PublicTemplates";
|
|
8
|
+
import { FormFieldObject } from "./PublicTemplateForm";
|
|
9
|
+
import { IPublicWidgetTemplateDefinition } from "./PublicTemplate";
|
|
7
10
|
export interface IPluginDefinition {
|
|
8
11
|
/**
|
|
9
12
|
* Keep that id simple (i.e., ASCII letter without any dot, space, separator, etc...) as it will be used
|
|
@@ -21,4 +24,10 @@ export interface IPluginDefinition {
|
|
|
21
24
|
registerWidgets?: (manager: IWidgetManager) => void;
|
|
22
25
|
registerTidyTableTransformations?: (manager: ITidyTableTransformationManager) => void;
|
|
23
26
|
registerWidgetDefaults?: (theme: Theme, manager: IWidgetDefaultsManager) => void;
|
|
27
|
+
/**
|
|
28
|
+
* Allows for selecting the available widgets.
|
|
29
|
+
*
|
|
30
|
+
* @param id pluginId.widgetId (e.g., ic3.Table)
|
|
31
|
+
*/
|
|
32
|
+
acceptWidget?: (id: WidgetTemplateIDs | string, widget: IPublicWidgetTemplateDefinition<FormFieldObject>) => boolean;
|
|
24
33
|
}
|
package/dist/IReporting.d.ts
CHANGED
|
@@ -71,20 +71,30 @@ export interface IOpenReportAppOptions {
|
|
|
71
71
|
export interface IReporting {
|
|
72
72
|
getVersion(): ReportingVersion;
|
|
73
73
|
/**
|
|
74
|
-
* @param options
|
|
75
|
-
* @param pushToHistory
|
|
76
|
-
* @param keepGlobalFilter
|
|
74
|
+
* @param options path, ...
|
|
75
|
+
* @param pushToHistory defaulted to true
|
|
76
|
+
* @param keepGlobalFilter defaulted to true. Apply the global filter to the newly opened report.
|
|
77
|
+
*
|
|
78
|
+
* @see IOpenReportOptions#onDefinition
|
|
77
79
|
*/
|
|
78
80
|
openReport(options: IOpenReportOptions, pushToHistory?: boolean, keepGlobalFilter?: boolean): void;
|
|
79
81
|
/**
|
|
80
|
-
* @param options
|
|
82
|
+
* @param options path, ...
|
|
81
83
|
* @param pushToHistory defaulted to true
|
|
84
|
+
*
|
|
85
|
+
* @see IOpenReportOptions#onDefinition
|
|
82
86
|
*/
|
|
83
87
|
openReportApp(options: IOpenReportAppOptions, pushToHistory?: boolean): void;
|
|
88
|
+
/**
|
|
89
|
+
* Publish a widget event to the dashboard.
|
|
90
|
+
*/
|
|
84
91
|
fireEvent(eventName: string, value: IEventContent | null): void;
|
|
92
|
+
/**
|
|
93
|
+
* Subscribe to a widget event.
|
|
94
|
+
*/
|
|
85
95
|
onEvent(eventName: string, callback: (value: IEventContent | null) => void): void;
|
|
86
96
|
/**
|
|
87
|
-
* e.g., print-report
|
|
97
|
+
* Publish a application notification (e.g., print-report).
|
|
88
98
|
*/
|
|
89
99
|
fireAppNotification(notification: AppNotification): void;
|
|
90
100
|
}
|
package/dist/IThemeManager.d.ts
CHANGED
|
@@ -1,35 +1,34 @@
|
|
|
1
1
|
import { CSSInterpolation } from "@mui/system";
|
|
2
|
+
import { ic3Components } from "./PublicTheme";
|
|
2
3
|
export declare enum EmbeddedThemeNames {
|
|
3
4
|
Statos = "ic3-statos"
|
|
4
5
|
}
|
|
5
6
|
/**
|
|
6
|
-
* Default values (e.g., box options, chart options, etc
|
|
7
|
+
* Default values (e.g., box options, chart options, etc...).
|
|
7
8
|
*/
|
|
8
9
|
export interface IThemeWidgetDefaults {
|
|
9
10
|
/**
|
|
10
|
-
* Default values for widget boxes.
|
|
11
|
+
* Default values for widget boxes. Lookup order:
|
|
11
12
|
*
|
|
12
13
|
* <pre>
|
|
13
|
-
*
|
|
14
|
+
* plugin-id.template-id.option
|
|
15
|
+
* plugin-id.option
|
|
16
|
+
* option
|
|
14
17
|
* </pre>
|
|
18
|
+
*
|
|
19
|
+
* @see WidgetBoxOptions (ThemeWidgetBox.ts)
|
|
15
20
|
*/
|
|
16
21
|
box?: Record<string, any>;
|
|
17
22
|
/**
|
|
18
|
-
* Default values for widget chart options.
|
|
19
|
-
*
|
|
20
|
-
* <pre>
|
|
21
|
-
* IWidgetDefinition
|
|
22
|
-
* dataRenderOptions: IWidgetDataRenderDefinition
|
|
23
|
-
* chartOptions: IChartTemplateDataRenderDefinition
|
|
24
|
-
* </pre>
|
|
25
|
-
*
|
|
26
|
-
* Lookup order:
|
|
23
|
+
* Default values for widget chart options. Lookup order:
|
|
27
24
|
*
|
|
28
25
|
* <pre>
|
|
29
26
|
* plugin-id.template-id.option
|
|
30
27
|
* plugin-id.option
|
|
31
28
|
* option
|
|
32
29
|
* </pre>
|
|
30
|
+
*
|
|
31
|
+
* @see IWidgetTemplateChartOptions (PublicTemplates.ts)
|
|
33
32
|
*/
|
|
34
33
|
options?: Record<string, any>;
|
|
35
34
|
}
|
|
@@ -53,5 +52,5 @@ export interface IThemeManager {
|
|
|
53
52
|
* The theme decorator allows to setup the Theme.components and Theme.ic3 using the theme
|
|
54
53
|
* created from its partial options (e.g., using palette, typography, spacing, etc...)
|
|
55
54
|
*/
|
|
56
|
-
registerTheme(themeOptions: any, themeDecorator?: (theme: any) =>
|
|
55
|
+
registerTheme(themeOptions: any, themeDecorator?: (theme: any) => ic3Components, baseTheme?: EmbeddedThemeNames): void;
|
|
57
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IThemeManager.js","sourceRoot":"","sources":["../src/IThemeManager.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"IThemeManager.js","sourceRoot":"","sources":["../src/IThemeManager.ts"],"names":[],"mappings":";;;AAGA,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAE1B,2CAAqB,CAAA;AAEzB,CAAC,EAJW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAI7B"}
|
package/dist/ITypes.d.ts
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
1
|
export declare type PaperSizeName = "A5" | "A4" | "A3" | "B5" | "B4" | "Letter" | "Legal" | "Ledger" | "JIS-B5" | "JIS-B4";
|
|
2
2
|
export declare type PaperOrientation = "portrait" | "landscape";
|
|
3
3
|
export declare type PaperSizeUnits = "px" | "mm" | "cm" | "in";
|
|
4
|
+
export declare enum CompareTextInterpretationType {
|
|
5
|
+
MORE = "more=better",
|
|
6
|
+
LESS = "less=better",
|
|
7
|
+
NONE = "none"
|
|
8
|
+
}
|
|
9
|
+
export declare enum TargetTextPosition {
|
|
10
|
+
DISABLE = "DISABLE",
|
|
11
|
+
ALIGN_TOP = "ALIGN_TOP",
|
|
12
|
+
ALIGN_BOTTOM = "ALIGN_BOTTOM"
|
|
13
|
+
}
|
|
14
|
+
export declare enum TargetTextIconSet {
|
|
15
|
+
TREND_ICONS = "TREND_ICONS",
|
|
16
|
+
TRIANGLE_ICONS = "TRIANGLE_ICONS"
|
|
17
|
+
}
|
|
18
|
+
export declare enum SparkChartType {
|
|
19
|
+
LINE = "line",
|
|
20
|
+
COLUMN = "column"
|
|
21
|
+
}
|
|
22
|
+
export declare enum SparklinePosition {
|
|
23
|
+
BELOW_VALUE = "BELOW_VALUE",
|
|
24
|
+
RIGHT_OF_VALUE = "RIGHT_OF_VALUE"
|
|
25
|
+
}
|
package/dist/ITypes.js
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
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;
|
|
4
|
+
var CompareTextInterpretationType;
|
|
5
|
+
(function (CompareTextInterpretationType) {
|
|
6
|
+
CompareTextInterpretationType["MORE"] = "more=better";
|
|
7
|
+
CompareTextInterpretationType["LESS"] = "less=better";
|
|
8
|
+
CompareTextInterpretationType["NONE"] = "none";
|
|
9
|
+
})(CompareTextInterpretationType = exports.CompareTextInterpretationType || (exports.CompareTextInterpretationType = {}));
|
|
10
|
+
var TargetTextPosition;
|
|
11
|
+
(function (TargetTextPosition) {
|
|
12
|
+
TargetTextPosition["DISABLE"] = "DISABLE";
|
|
13
|
+
TargetTextPosition["ALIGN_TOP"] = "ALIGN_TOP";
|
|
14
|
+
TargetTextPosition["ALIGN_BOTTOM"] = "ALIGN_BOTTOM";
|
|
15
|
+
})(TargetTextPosition = exports.TargetTextPosition || (exports.TargetTextPosition = {}));
|
|
16
|
+
var TargetTextIconSet;
|
|
17
|
+
(function (TargetTextIconSet) {
|
|
18
|
+
TargetTextIconSet["TREND_ICONS"] = "TREND_ICONS";
|
|
19
|
+
TargetTextIconSet["TRIANGLE_ICONS"] = "TRIANGLE_ICONS";
|
|
20
|
+
})(TargetTextIconSet = exports.TargetTextIconSet || (exports.TargetTextIconSet = {}));
|
|
21
|
+
var SparkChartType;
|
|
22
|
+
(function (SparkChartType) {
|
|
23
|
+
SparkChartType["LINE"] = "line";
|
|
24
|
+
SparkChartType["COLUMN"] = "column";
|
|
25
|
+
})(SparkChartType = exports.SparkChartType || (exports.SparkChartType = {}));
|
|
26
|
+
var SparklinePosition;
|
|
27
|
+
(function (SparklinePosition) {
|
|
28
|
+
SparklinePosition["BELOW_VALUE"] = "BELOW_VALUE";
|
|
29
|
+
SparklinePosition["RIGHT_OF_VALUE"] = "RIGHT_OF_VALUE";
|
|
30
|
+
})(SparklinePosition = exports.SparklinePosition || (exports.SparklinePosition = {}));
|
|
3
31
|
//# sourceMappingURL=ITypes.js.map
|
package/dist/ITypes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ITypes.js","sourceRoot":"","sources":["../src/ITypes.ts"],"names":[],"mappings":""}
|
|
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"}
|
package/dist/IWidgetManager.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import { IPublicWidgetTemplateDefinition } from "./PublicTemplate";
|
|
1
|
+
import { IPublicWidgetTemplateDefinition, IWrappedWidgetTemplateDefinition } from "./PublicTemplate";
|
|
2
|
+
import { WidgetTemplateIDs } from "./PublicTemplates";
|
|
3
|
+
import { FormFieldObject } from "./PublicTemplateForm";
|
|
2
4
|
export interface IWidgetManager {
|
|
3
|
-
registerWidget(widget: IPublicWidgetTemplateDefinition<
|
|
5
|
+
registerWidget<OPTIONS extends FormFieldObject>(widget: IPublicWidgetTemplateDefinition<OPTIONS>): void;
|
|
6
|
+
registerWrappedWidget<WIDGET extends WidgetTemplateIDs>(widget: IWrappedWidgetTemplateDefinition<WIDGET>): void;
|
|
4
7
|
}
|
package/dist/LazyTreeView.d.ts
CHANGED
|
@@ -24,29 +24,6 @@ export interface LazyTreeItemClasses {
|
|
|
24
24
|
/** Styles applied to the label element. */
|
|
25
25
|
label: string;
|
|
26
26
|
}
|
|
27
|
-
export interface LazyTreeClasses {
|
|
28
|
-
/** Styles applied to the search toolbar element */
|
|
29
|
-
toolbar: string;
|
|
30
|
-
/** Styles applied to the search search input element */
|
|
31
|
-
input: string;
|
|
32
|
-
/** Styles applied to the select filter button (on) */
|
|
33
|
-
button: string;
|
|
34
|
-
/** Styles applied to the select filter button (on) */
|
|
35
|
-
buttonFilterSelectedOn: string;
|
|
36
|
-
/** Styles applied to the select filter button (off) */
|
|
37
|
-
buttonFilterSelectedOff: string;
|
|
38
|
-
/** Styles applied to the TreeRoot element */
|
|
39
|
-
treeRoot: string;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Global classes
|
|
43
|
-
*/
|
|
44
|
-
export interface Ic3GlobalClasses {
|
|
45
|
-
singleSelection: string;
|
|
46
|
-
multipleSelection: string;
|
|
47
|
-
}
|
|
48
|
-
export declare const ic3GlobalClasses: Ic3GlobalClasses;
|
|
49
|
-
export declare const lazyTreeClasses: LazyTreeClasses;
|
|
50
27
|
export interface ILazyTreeViewLoader {
|
|
51
28
|
/**
|
|
52
29
|
* This will build the tree with react children
|
|
@@ -65,6 +42,7 @@ export interface ILazyTreeViewLoader {
|
|
|
65
42
|
* Controlled properties of LazyTreeView (doesn't has to be lazy)
|
|
66
43
|
*/
|
|
67
44
|
export interface LazyTreeViewProps {
|
|
45
|
+
logId: string;
|
|
68
46
|
lazyLoader: ILazyTreeViewLoader;
|
|
69
47
|
allowEmptySelection?: boolean;
|
|
70
48
|
/**
|
|
@@ -98,9 +76,13 @@ export interface LazyTreeViewProps {
|
|
|
98
76
|
*/
|
|
99
77
|
setSelected?: (nodeIdx: string[]) => void;
|
|
100
78
|
/**
|
|
101
|
-
* Controlled mode for expanded
|
|
79
|
+
* Controlled mode for expanded or initial expanded if not controlled
|
|
102
80
|
*/
|
|
103
81
|
expanded?: string[];
|
|
82
|
+
/**
|
|
83
|
+
* Controlled mode for expanded
|
|
84
|
+
*/
|
|
85
|
+
setExpanded?: (nodeIdx: string[]) => void;
|
|
104
86
|
/**
|
|
105
87
|
* The level depth of initially open nodes ( 0 first level )
|
|
106
88
|
*/
|
package/dist/LazyTreeView.js
CHANGED
|
@@ -1,16 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.lazyTreeClasses = exports.ic3GlobalClasses = void 0;
|
|
4
|
-
exports.ic3GlobalClasses = {
|
|
5
|
-
singleSelection: 'Ic3-SingleSelection',
|
|
6
|
-
multipleSelection: 'Ic3-MultipleSelection',
|
|
7
|
-
};
|
|
8
|
-
exports.lazyTreeClasses = {
|
|
9
|
-
toolbar: 'Ic3-LazyTreeView-toolbar',
|
|
10
|
-
input: 'Ic3-LazyTreeView-toolbar-input',
|
|
11
|
-
button: 'Ic3-LazyTreeView-toolbar-button',
|
|
12
|
-
buttonFilterSelectedOn: 'Ic3-LazyTreeView-toolbar-buttonOn',
|
|
13
|
-
buttonFilterSelectedOff: 'Ic3-LazyTreeView-toolbar-buttonOff',
|
|
14
|
-
treeRoot: 'Ic3-LazyTreeView-treeRoot',
|
|
15
|
-
};
|
|
16
3
|
//# sourceMappingURL=LazyTreeView.js.map
|
package/dist/LazyTreeView.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LazyTreeView.js","sourceRoot":"","sources":["../src/LazyTreeView.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LazyTreeView.js","sourceRoot":"","sources":["../src/LazyTreeView.ts"],"names":[],"mappings":""}
|
package/dist/Loader.d.ts
CHANGED
|
@@ -1,10 +1,88 @@
|
|
|
1
1
|
import { IReporting } from "./IReporting";
|
|
2
|
+
export declare type AppType = "embedded-div-init" | "console" | "viewer" | "editor" | "admin" | "appEditor";
|
|
2
3
|
export interface IDashboardsLoaderFrameParams {
|
|
3
4
|
/**
|
|
4
5
|
* An unique ID (DOM) that is identifying the icCube dashboards instance.
|
|
5
6
|
*/
|
|
6
7
|
containerId: string;
|
|
8
|
+
/**
|
|
9
|
+
* Optional CSS class of the created iFrame.
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Optional CSS inline styling of the created iFrame.
|
|
14
|
+
*/
|
|
15
|
+
style?: Partial<CSSStyleDeclaration>;
|
|
7
16
|
onReady: (ic3: IReporting) => void;
|
|
8
17
|
url: string;
|
|
9
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Support for embedding icCube via an iFrame.
|
|
21
|
+
*/
|
|
10
22
|
export declare function DashboardsLoaderFrame(params: IDashboardsLoaderFrameParams): void;
|
|
23
|
+
export interface IDashboardsLoaderDivParams {
|
|
24
|
+
/**
|
|
25
|
+
* identifier of the IReporting instance
|
|
26
|
+
*/
|
|
27
|
+
uid: string;
|
|
28
|
+
/**
|
|
29
|
+
* the container to put icCube
|
|
30
|
+
*/
|
|
31
|
+
container: string | HTMLElement;
|
|
32
|
+
/**
|
|
33
|
+
* an optional container where icCube will set the height to fit the current report
|
|
34
|
+
*/
|
|
35
|
+
resizingContainer?: HTMLElement;
|
|
36
|
+
/**
|
|
37
|
+
* The type of application (default: 'viewer')
|
|
38
|
+
*/
|
|
39
|
+
appType?: AppType;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Support for embedding icCube via a DIV.
|
|
43
|
+
*
|
|
44
|
+
* icCube uses Webpack: loading the entry point (i.e., main.js) will start loading all initial chunks.
|
|
45
|
+
*
|
|
46
|
+
* You can create this context ASAP. Actually can be done at any point in your app life time before
|
|
47
|
+
* any icCube rendering is required yet.
|
|
48
|
+
*
|
|
49
|
+
* Can be easily wrapped into a React context (see ic3-demo-embedded-react Github project).
|
|
50
|
+
*/
|
|
51
|
+
export declare class DashboardsLoaderDivContext {
|
|
52
|
+
private static readonly crfCodeRE;
|
|
53
|
+
private static readonly mainJsCacheKeyRE;
|
|
54
|
+
private static readonly buildVersionRE;
|
|
55
|
+
private static readonly buildTimestampRE;
|
|
56
|
+
/**
|
|
57
|
+
* The URL path of the icCube index.html containing the Webpack main entry point (i.e., main.js).
|
|
58
|
+
*/
|
|
59
|
+
private readonly indexHtmlUrl;
|
|
60
|
+
/**
|
|
61
|
+
* The URL path where icCube Webpack files are located:
|
|
62
|
+
*
|
|
63
|
+
* /icCube/report
|
|
64
|
+
* app -- public path
|
|
65
|
+
* index.html
|
|
66
|
+
* main.js
|
|
67
|
+
* chunks
|
|
68
|
+
* ...
|
|
69
|
+
* plugins -- e.g., amCharts
|
|
70
|
+
* ...
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
private readonly publicPath;
|
|
74
|
+
private readonly mainJsUrl;
|
|
75
|
+
private buildVersion;
|
|
76
|
+
private buildTimestamp;
|
|
77
|
+
private libLoader;
|
|
78
|
+
constructor(suffix?: string);
|
|
79
|
+
private static extractMatch;
|
|
80
|
+
private static loadScript;
|
|
81
|
+
getBuildVersion(): string;
|
|
82
|
+
getBuildTimestamp(): string;
|
|
83
|
+
loadLibsAndInitialize(options: IDashboardsLoaderDivParams): Promise<IReporting>;
|
|
84
|
+
/**
|
|
85
|
+
* First step load main.js, associated chunks
|
|
86
|
+
*/
|
|
87
|
+
private loadLibs;
|
|
88
|
+
}
|