@ic3/reporting-api 8.0.0-rc.4 → 8.0.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/IPluginDefinition.d.ts +9 -0
- package/dist/IReporting.d.ts +1 -1
- package/dist/IThemeManager.d.ts +14 -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 -1
- package/dist/PublicContext.d.ts +1 -0
- package/dist/PublicTemplate.d.ts +95 -35
- package/dist/PublicTemplate.js +1 -10
- package/dist/PublicTemplate.js.map +1 -1
- package/dist/PublicTemplateForm.d.ts +61 -7
- package/dist/PublicTemplateForm.js +1 -9
- package/dist/PublicTemplateForm.js.map +1 -1
- package/dist/PublicTemplates.d.ts +61 -0
- package/dist/{theme/ThemeGoogleMapMarker.js → PublicTemplates.js} +1 -1
- package/dist/PublicTemplates.js.map +1 -0
- package/dist/PublicTheme.d.ts +27 -8
- package/dist/PublicTheme.js.map +1 -1
- package/dist/PublicTidyColumn.d.ts +24 -8
- package/dist/PublicTidyColumn.js.map +1 -1
- package/dist/PublicTidyHistogram.d.ts +32 -0
- package/dist/PublicTidyHistogram.js.map +1 -1
- package/dist/PublicTidyTable.d.ts +35 -18
- package/dist/PublicTidyTableInteractions.d.ts +15 -2
- package/dist/PublicTidyTableTypes.d.ts +28 -8
- package/dist/PublicTidyTableTypes.js +18 -1
- package/dist/PublicTidyTableTypes.js.map +1 -1
- package/dist/PublicTidyTree.d.ts +13 -3
- package/dist/PublicTidyTree.js +19 -13
- package/dist/PublicTidyTree.js.map +1 -1
- package/dist/index.d.ts +17 -2
- package/dist/index.js +22 -3
- package/dist/index.js.map +1 -1
- package/dist/theme/ThemeAmCharts4.d.ts +1346 -0
- package/dist/theme/ThemeAmCharts4.js +61 -0
- package/dist/theme/ThemeAmCharts4.js.map +1 -0
- package/dist/theme/ThemeApp.d.ts +11 -11
- package/dist/theme/ThemeApp.js +40 -0
- package/dist/theme/ThemeApp.js.map +1 -1
- 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 +111 -0
- package/dist/theme/ThemeDatePicker.js +3 -0
- package/dist/theme/ThemeDatePicker.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.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 +84 -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 +60 -30
- package/dist/theme/ThemeFilterTree.js.map +1 -1
- 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/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 +61 -0
- package/dist/theme/ThemePivotTable.js +10 -1
- package/dist/theme/ThemePivotTable.js.map +1 -1
- 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 +70 -1
- package/dist/theme/ThemeTable.js.map +1 -1
- package/dist/theme/ThemeWidgetBox.d.ts +69 -0
- package/dist/theme/ThemeWidgetBox.js +29 -1
- 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/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.0.0
|
|
11
|
+
return Object.assign({ apiVersion: new ReportingVersion_1.default("8.0.0" || "-", "Fri, 08 Apr 2022 12:23:38 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;
|
|
@@ -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
|
@@ -73,7 +73,7 @@ export interface IReporting {
|
|
|
73
73
|
/**
|
|
74
74
|
* @param options
|
|
75
75
|
* @param pushToHistory defaulted to true
|
|
76
|
-
* @param keepGlobalFilter defaulted to
|
|
76
|
+
* @param keepGlobalFilter defaulted to false
|
|
77
77
|
*/
|
|
78
78
|
openReport(options: IOpenReportOptions, pushToHistory?: boolean, keepGlobalFilter?: boolean): void;
|
|
79
79
|
/**
|
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
|
}
|
|
@@ -50,8 +49,10 @@ export declare type IThemeWidgetVariant = {
|
|
|
50
49
|
};
|
|
51
50
|
export interface IThemeManager {
|
|
52
51
|
/**
|
|
52
|
+
*
|
|
53
53
|
* The theme decorator allows to setup the Theme.components and Theme.ic3 using the theme
|
|
54
54
|
* created from its partial options (e.g., using palette, typography, spacing, etc...)
|
|
55
|
+
*
|
|
55
56
|
*/
|
|
56
|
-
registerTheme(themeOptions: any, themeDecorator?: (theme: any) =>
|
|
57
|
+
registerTheme(themeOptions: any, themeDecorator?: (theme: any) => ic3Components, baseTheme?: EmbeddedThemeNames): void;
|
|
57
58
|
}
|
|
@@ -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
|
@@ -65,6 +65,7 @@ export interface ILazyTreeViewLoader {
|
|
|
65
65
|
* Controlled properties of LazyTreeView (doesn't has to be lazy)
|
|
66
66
|
*/
|
|
67
67
|
export interface LazyTreeViewProps {
|
|
68
|
+
logId: string;
|
|
68
69
|
lazyLoader: ILazyTreeViewLoader;
|
|
69
70
|
allowEmptySelection?: boolean;
|
|
70
71
|
/**
|
|
@@ -98,9 +99,13 @@ export interface LazyTreeViewProps {
|
|
|
98
99
|
*/
|
|
99
100
|
setSelected?: (nodeIdx: string[]) => void;
|
|
100
101
|
/**
|
|
101
|
-
* Controlled mode for expanded
|
|
102
|
+
* Controlled mode for expanded or initial expanded if not controlled
|
|
102
103
|
*/
|
|
103
104
|
expanded?: string[];
|
|
105
|
+
/**
|
|
106
|
+
* Controlled mode for expanded
|
|
107
|
+
*/
|
|
108
|
+
setExpanded?: (nodeIdx: string[]) => void;
|
|
104
109
|
/**
|
|
105
110
|
* The level depth of initially open nodes ( 0 first level )
|
|
106
111
|
*/
|
package/dist/PublicContext.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ export interface IPublicContext {
|
|
|
45
45
|
info: string;
|
|
46
46
|
description?: string;
|
|
47
47
|
};
|
|
48
|
+
localizeFormField(pluginId: string, widgetTemplateId: string, name: string, ...args: any[]): [string, string | undefined];
|
|
48
49
|
/**
|
|
49
50
|
* A bunch of mathematical functions related to the tidy table.
|
|
50
51
|
*/
|
package/dist/PublicTemplate.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { ITidyTable } from "./PublicTidyTable";
|
|
2
2
|
import { ITidyTableInteraction } from "./PublicTidyTableInteractions";
|
|
3
3
|
import { IWidgetPublicContext } from "./PublicContext";
|
|
4
|
-
import {
|
|
4
|
+
import { FormFieldObject, FormFields, IFormColumnChooserFieldDef } from "./PublicTemplateForm";
|
|
5
5
|
import { IWidgetVariantManager } from "./IWidgetVariantManager";
|
|
6
6
|
import { ITidyColumn } from "./PublicTidyColumn";
|
|
7
7
|
import { ReactElement } from "react";
|
|
8
8
|
import { Theme } from "@mui/material/styles";
|
|
9
|
+
import { WidgetTemplateChartOptions, WidgetTemplateIDs } from "./PublicTemplates";
|
|
10
|
+
import { ChartTemplateDataMapping } from "./PublicTidyTableTypes";
|
|
9
11
|
declare type ChartTemplateWidgetProps = any;
|
|
10
12
|
export declare type IPublicWidgetTemplateDefinition<T extends FormFieldObject> = IPublicWidgetReactTemplateDefinition<T> | IPublicWidgetJsTemplateDefinition<T>;
|
|
11
13
|
export declare enum IWidgetTemplateMdxBuilderAxisPropsConstraint {
|
|
@@ -64,15 +66,15 @@ export interface IWidgetTemplateMdxBuilderMapping {
|
|
|
64
66
|
*/
|
|
65
67
|
mdxAxis: Readonly<IWidgetTemplateMdxBuilderAxisProps[]>;
|
|
66
68
|
/**
|
|
67
|
-
* The generated
|
|
69
|
+
* The generated MDX is for a filter (the cell values are not of interest).
|
|
68
70
|
*/
|
|
69
71
|
mdxIsForFilter?: true;
|
|
70
72
|
/**
|
|
71
|
-
*
|
|
73
|
+
* The cell values are not needed
|
|
72
74
|
*/
|
|
73
75
|
withoutCellValues?: true;
|
|
74
76
|
/**
|
|
75
|
-
*
|
|
77
|
+
* An MDX query if the builder is empty.
|
|
76
78
|
*/
|
|
77
79
|
mdxQueryIfEmpty?: boolean;
|
|
78
80
|
}
|
|
@@ -109,9 +111,22 @@ export interface IPublicJsChartTemplate<T extends FormFieldObject> {
|
|
|
109
111
|
* @see IPublicReactChartTemplate
|
|
110
112
|
* @see FormFieldObject
|
|
111
113
|
*/
|
|
112
|
-
export interface IPublicWidgetReactTemplateDefinition<
|
|
113
|
-
|
|
114
|
+
export interface IPublicWidgetReactTemplateDefinition<OPTIONS extends FormFieldObject> extends IPublicCommonWidgetTemplateDefinition<OPTIONS> {
|
|
115
|
+
/**
|
|
116
|
+
* Actual widget rendering logic.
|
|
117
|
+
*/
|
|
118
|
+
jsCode: (context: IWidgetPublicContext) => IPublicReactChartTemplate<OPTIONS>;
|
|
114
119
|
reactComponent: true;
|
|
120
|
+
/**
|
|
121
|
+
* Only the widget template meta information is required when starting the application.
|
|
122
|
+
*
|
|
123
|
+
* This method gives the opportunity for a widget template to load (Webpack) its actual jsCode logic when required.
|
|
124
|
+
* For example, AmCharts 4 widgets are loading the AmCharts 4 actual JS libraries once their rendering is actually
|
|
125
|
+
* required.
|
|
126
|
+
*
|
|
127
|
+
* @param definitionW a resolved wrapped widget (extending widget).
|
|
128
|
+
*/
|
|
129
|
+
resolveDefinition?: (definitionW?: IPublicWidgetTemplateDefinition<any>) => Promise<IPublicWidgetTemplateDefinition<OPTIONS>>;
|
|
115
130
|
}
|
|
116
131
|
/**
|
|
117
132
|
* The definition of a widget that renders using plain Javascript/Typescript.
|
|
@@ -119,22 +134,27 @@ export interface IPublicWidgetReactTemplateDefinition<T extends FormFieldObject>
|
|
|
119
134
|
* @see IPublicJsChartTemplate
|
|
120
135
|
* @see FormFieldObject
|
|
121
136
|
*/
|
|
122
|
-
export interface IPublicWidgetJsTemplateDefinition<
|
|
123
|
-
|
|
137
|
+
export interface IPublicWidgetJsTemplateDefinition<OPTIONS extends FormFieldObject> extends IPublicCommonWidgetTemplateDefinition<OPTIONS> {
|
|
138
|
+
/**
|
|
139
|
+
* Actual widget rendering logic.
|
|
140
|
+
*/
|
|
141
|
+
jsCode: (context: IWidgetPublicContext, container: HTMLDivElement) => IPublicJsChartTemplate<OPTIONS>;
|
|
124
142
|
reactComponent?: false;
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
143
|
+
/**
|
|
144
|
+
* Only the widget template meta information is required when starting the application.
|
|
145
|
+
*
|
|
146
|
+
* This method gives the opportunity for a widget template to load (Webpack) its actual jsCode logic when required.
|
|
147
|
+
* For example, AmCharts 4 widgets are loading the AmCharts 4 actual JS libraries once their rendering is actually
|
|
148
|
+
* required.
|
|
149
|
+
*
|
|
150
|
+
* @param definitionW a resolved wrapped widget (extending widget).
|
|
151
|
+
*/
|
|
152
|
+
resolveDefinition?: (definitionW?: IPublicWidgetTemplateDefinition<any>) => Promise<IPublicWidgetTemplateDefinition<OPTIONS>>;
|
|
133
153
|
}
|
|
134
154
|
/**
|
|
135
155
|
* Definition - static - of a widget template
|
|
136
156
|
*/
|
|
137
|
-
interface IPublicCommonWidgetTemplateDefinition {
|
|
157
|
+
interface IPublicCommonWidgetTemplateDefinition<OPTIONS extends FormFieldObject> {
|
|
138
158
|
/**
|
|
139
159
|
* Determine the widget icon in the widget infos.
|
|
140
160
|
* Used for finding the right documentation.
|
|
@@ -155,6 +175,10 @@ interface IPublicCommonWidgetTemplateDefinition {
|
|
|
155
175
|
* Internal usage: while investigating lazy registration (setup upon registration).
|
|
156
176
|
*/
|
|
157
177
|
debug?: string;
|
|
178
|
+
/**
|
|
179
|
+
* Internal usage: the wrapped pluginId.templateId (setup upon registration).
|
|
180
|
+
*/
|
|
181
|
+
wrapped?: string;
|
|
158
182
|
/**
|
|
159
183
|
* Internal usage: pluginId.templateId (setup upon registration).
|
|
160
184
|
*/
|
|
@@ -273,20 +297,35 @@ interface IPublicCommonWidgetTemplateDefinition {
|
|
|
273
297
|
eventRoles?: ITemplateEventActionDef;
|
|
274
298
|
selection?: {
|
|
275
299
|
/**
|
|
276
|
-
*
|
|
277
|
-
|
|
300
|
+
* If defined, default selection role(s)
|
|
301
|
+
*/
|
|
302
|
+
defaultRoles?: string[];
|
|
303
|
+
/**
|
|
304
|
+
* If defined, returns the roles available
|
|
305
|
+
*
|
|
306
|
+
*/
|
|
307
|
+
allowedRoles?: (table: ITidyTable | undefined) => string[];
|
|
308
|
+
/**
|
|
309
|
+
* The list of columns that can be part of the selection granularity. The user can select from the roles
|
|
310
|
+
* of the MDX query if there are 2 or more roles.
|
|
278
311
|
*/
|
|
279
|
-
allowedColumns
|
|
280
|
-
optionValues?: undefined;
|
|
281
|
-
} | {
|
|
282
|
-
allowedColumns?: undefined;
|
|
283
|
-
optionValues?: SelectionGranularityOptions[];
|
|
312
|
+
allowedColumns?: (column: ITidyColumn, table: ITidyTable) => boolean;
|
|
284
313
|
};
|
|
285
314
|
mdxBuilderSettings?: IWidgetTemplateMdxBuilderMapping;
|
|
315
|
+
/**
|
|
316
|
+
* Setup how to get default mappings from the table and options for this widget. If undefined, it uses the default
|
|
317
|
+
* fallback logic.
|
|
318
|
+
*/
|
|
319
|
+
defaultMapping?: (data: IWidgetTemplateTidyOptions<OPTIONS>) => ChartTemplateDataMapping;
|
|
286
320
|
/**
|
|
287
321
|
* The meta information required for editing the widget options.
|
|
288
322
|
*/
|
|
289
|
-
chartOptionsMeta?:
|
|
323
|
+
chartOptionsMeta?: FormFields<OPTIONS>;
|
|
324
|
+
/**
|
|
325
|
+
* An optional hook that allows for modifying the chart options passed as parameter.
|
|
326
|
+
* Used when extending existing widget definition.
|
|
327
|
+
*/
|
|
328
|
+
hookChartOptions?: (options: any) => any;
|
|
290
329
|
/**
|
|
291
330
|
* When registering a variant add the following field editor meta:
|
|
292
331
|
* <pre>
|
|
@@ -305,7 +344,16 @@ interface IPublicCommonWidgetTemplateDefinition {
|
|
|
305
344
|
* Whether or not that component is using React for rendering.
|
|
306
345
|
*/
|
|
307
346
|
reactComponent?: boolean;
|
|
308
|
-
|
|
347
|
+
/**
|
|
348
|
+
* Only the widget template meta information is required when starting the application.
|
|
349
|
+
*
|
|
350
|
+
* This method gives the opportunity for a widget template to load (Webpack) its actual jsCode logic when required.
|
|
351
|
+
* For example, AmCharts 4 widgets are loading the AmCharts 4 actual JS libraries once their rendering is actually
|
|
352
|
+
* required.
|
|
353
|
+
*
|
|
354
|
+
* @param definitionW a resolved wrapped widget (extending widget).
|
|
355
|
+
*/
|
|
356
|
+
resolveDefinition?: (definitionW?: IPublicWidgetTemplateDefinition<any>) => Promise<IPublicWidgetTemplateDefinition<OPTIONS>>;
|
|
309
357
|
/**
|
|
310
358
|
* When defining new widgets using amCharts 4, this method registers the icCube license.
|
|
311
359
|
*/
|
|
@@ -314,6 +362,10 @@ interface IPublicCommonWidgetTemplateDefinition {
|
|
|
314
362
|
* When opening "Use Global Filter" option on Interaction tab
|
|
315
363
|
*/
|
|
316
364
|
enableUseGlobalFilter?: boolean;
|
|
365
|
+
/**
|
|
366
|
+
* Returns true if the widget fires a global event at initialization (start)
|
|
367
|
+
*/
|
|
368
|
+
firesGlobalEventAtStart?: (options: OPTIONS | undefined, templateDef: IPublicWidgetTemplateDefinition<OPTIONS>) => boolean;
|
|
317
369
|
}
|
|
318
370
|
/**
|
|
319
371
|
* *********************************************************************************************************************
|
|
@@ -326,16 +378,13 @@ export declare enum WidgetTemplateDefinitionType {
|
|
|
326
378
|
Map = "map",
|
|
327
379
|
Misc = "misc"
|
|
328
380
|
}
|
|
329
|
-
export interface
|
|
381
|
+
export interface IWidgetTemplateTidyData {
|
|
330
382
|
table: ITidyTable;
|
|
331
383
|
inter: ITidyTableInteraction;
|
|
332
|
-
options: {
|
|
333
|
-
[key: string]: any;
|
|
334
|
-
};
|
|
335
384
|
}
|
|
336
|
-
export interface
|
|
385
|
+
export interface IWidgetTemplateTidyOptions<T extends FormFieldObject> {
|
|
337
386
|
table: ITidyTable;
|
|
338
|
-
|
|
387
|
+
options: T;
|
|
339
388
|
}
|
|
340
389
|
export interface IChartVisualizationTypedInput<T extends FormFieldObject> {
|
|
341
390
|
table: ITidyTable;
|
|
@@ -361,7 +410,7 @@ export declare enum TemplateEventActionNames {
|
|
|
361
410
|
* Definition of the actions supported by a template
|
|
362
411
|
*
|
|
363
412
|
*
|
|
364
|
-
* ( e.g publish: 'onClick' )
|
|
413
|
+
* ( e.g., publish: 'onClick' )
|
|
365
414
|
*/
|
|
366
415
|
export interface ITemplateEventActionDef {
|
|
367
416
|
/**
|
|
@@ -385,7 +434,18 @@ export interface ITemplateEventActionDef {
|
|
|
385
434
|
*/
|
|
386
435
|
selectionSubscribe?: string;
|
|
387
436
|
}
|
|
388
|
-
export interface
|
|
389
|
-
|
|
437
|
+
export interface IWrappedWidgetTemplateDefinition<WIDGET extends WidgetTemplateIDs> {
|
|
438
|
+
/**
|
|
439
|
+
* Some free text used while registering the wrapper (e.g., error purpose).
|
|
440
|
+
*/
|
|
441
|
+
readonly registrationInfo: string;
|
|
442
|
+
/**
|
|
443
|
+
* e.g., ic3.Table
|
|
444
|
+
*/
|
|
445
|
+
readonly wrappedWidgetTemplateId: WIDGET;
|
|
446
|
+
/**
|
|
447
|
+
* A function generating the widget template definition based on the wrapped widget template definition.
|
|
448
|
+
*/
|
|
449
|
+
readonly wrapper: (wrapped: IPublicWidgetTemplateDefinition<WidgetTemplateChartOptions[WIDGET]>) => IPublicWidgetTemplateDefinition<FormFieldObject>;
|
|
390
450
|
}
|
|
391
451
|
export {};
|