@ic3/reporting-api 8.0.0-rc.2 → 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 +29 -8
- package/dist/IPluginDefinition.d.ts +9 -0
- package/dist/IReporting.d.ts +3 -1
- package/dist/IThemeManager.d.ts +14 -13
- package/dist/IThemeManager.js.map +1 -1
- package/dist/ITypes.d.ts +25 -0
- package/dist/ITypes.js +31 -0
- package/dist/ITypes.js.map +1 -0
- package/dist/IWidgetManager.d.ts +5 -2
- package/dist/LazyTreeView.d.ts +6 -1
- package/dist/PublicContext.d.ts +19 -4
- package/dist/PublicLayout.d.ts +7 -23
- package/dist/PublicTemplate.d.ts +101 -41
- package/dist/PublicTemplate.js +1 -10
- package/dist/PublicTemplate.js.map +1 -1
- package/dist/PublicTemplateForm.d.ts +126 -15
- 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 +112 -75
- package/dist/PublicTheme.js.map +1 -1
- package/dist/PublicTidyColumn.d.ts +29 -9
- package/dist/PublicTidyColumn.js.map +1 -1
- package/dist/PublicTidyHistogram.d.ts +32 -0
- package/dist/PublicTidyHistogram.js.map +1 -1
- package/dist/PublicTidyMath.d.ts +2 -2
- package/dist/PublicTidyTable.d.ts +35 -18
- package/dist/PublicTidyTableInteractions.d.ts +24 -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 +24 -0
- package/dist/index.js +29 -1
- 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 -19
- 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 +155 -2
- package/dist/theme/ThemeTable.js +165 -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,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { PaperOrientation, PaperSizeName } from "./ITypes";
|
|
2
|
+
export declare type AppNotificationType = "edit-report" | "print-report-dialog" | "print-report" | "print-report-without-state" | "print-report-in-browser" | "save-state-to-localstorage" | "restore-state-from-localstorage" | "save-ownprops-to-localstorage" | "restore-ownprops-from-localstorage";
|
|
2
3
|
export interface IAppNotification {
|
|
3
4
|
/**
|
|
4
5
|
* E.g., print-report.
|
|
@@ -18,15 +19,35 @@ export interface IAppNotificationWithPayload<PAYLOAD> extends IAppNotification {
|
|
|
18
19
|
export interface AppEditReportNotification extends IAppNotification {
|
|
19
20
|
readonly type: "edit-report";
|
|
20
21
|
}
|
|
21
|
-
export interface AppPrintReportDialogNotification extends IAppNotification {
|
|
22
|
-
readonly type: "print-report-dialog";
|
|
23
|
-
}
|
|
24
22
|
export interface AppPrintReportNotificationPayload {
|
|
25
23
|
fileName?: string;
|
|
26
|
-
paperSizeName?:
|
|
27
|
-
layout?:
|
|
24
|
+
paperSizeName?: PaperSizeName;
|
|
25
|
+
layout?: PaperOrientation;
|
|
26
|
+
}
|
|
27
|
+
export interface IAppPrintReportNotification extends IAppNotificationWithPayload<AppPrintReportNotificationPayload> {
|
|
28
28
|
}
|
|
29
|
-
export interface AppPrintReportNotification extends
|
|
29
|
+
export interface AppPrintReportNotification extends IAppPrintReportNotification {
|
|
30
30
|
readonly type: "print-report";
|
|
31
31
|
}
|
|
32
|
-
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
|
@@ -7,6 +7,8 @@ export interface IReportDefinition {
|
|
|
7
7
|
setDefaultSchemaName(name: string): void;
|
|
8
8
|
getDefaultCubeName(): string | undefined;
|
|
9
9
|
setDefaultCubeName(name: string): void;
|
|
10
|
+
getThemeUID(): string;
|
|
11
|
+
setThemeUID(uid: string): void;
|
|
10
12
|
}
|
|
11
13
|
export interface IReportAppDefinition {
|
|
12
14
|
}
|
|
@@ -71,7 +73,7 @@ export interface IReporting {
|
|
|
71
73
|
/**
|
|
72
74
|
* @param options
|
|
73
75
|
* @param pushToHistory defaulted to true
|
|
74
|
-
* @param keepGlobalFilter defaulted to
|
|
76
|
+
* @param keepGlobalFilter defaulted to false
|
|
75
77
|
*/
|
|
76
78
|
openReport(options: IOpenReportOptions, pushToHistory?: boolean, keepGlobalFilter?: boolean): void;
|
|
77
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
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare type PaperSizeName = "A5" | "A4" | "A3" | "B5" | "B4" | "Letter" | "Legal" | "Ledger" | "JIS-B5" | "JIS-B4";
|
|
2
|
+
export declare type PaperOrientation = "portrait" | "landscape";
|
|
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
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
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 = {}));
|
|
31
|
+
//# sourceMappingURL=ITypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ITypes.js","sourceRoot":"","sources":["../src/ITypes.ts"],"names":[],"mappings":";;;AAIA,IAAY,6BAIX;AAJD,WAAY,6BAA6B;IACrC,qDAAoB,CAAA;IACpB,qDAAoB,CAAA;IACpB,8CAAa,CAAA;AACjB,CAAC,EAJW,6BAA6B,GAA7B,qCAA6B,KAA7B,qCAA6B,QAIxC;AAED,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC1B,yCAAmB,CAAA;IACnB,6CAAuB,CAAA;IACvB,mDAA6B,CAAA;AACjC,CAAC,EAJW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAI7B;AAED,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IACzB,gDAA2B,CAAA;IAC3B,sDAAiC,CAAA;AACrC,CAAC,EAHW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAG5B;AAED,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,+BAAa,CAAA;IACb,mCAAiB,CAAA;AACrB,CAAC,EAHW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAGzB;AAED,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IACzB,gDAA2B,CAAA;IAC3B,sDAAiC,CAAA;AACrC,CAAC,EAHW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAG5B"}
|
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
|
@@ -24,13 +24,28 @@ export interface IPublicContext {
|
|
|
24
24
|
getUserName(): string;
|
|
25
25
|
getReportLocale(): string;
|
|
26
26
|
getNumberFormatter(format: ThemeTextFormatter): (value: any | undefined) => string;
|
|
27
|
+
/**
|
|
28
|
+
* translate the content of a report (the title of widgets, content of some widgets...). This does use another file
|
|
29
|
+
*
|
|
30
|
+
* aka content localization
|
|
31
|
+
*/
|
|
32
|
+
translateContent(content: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* localized report application tags (e.g. edit, write, save.. )
|
|
35
|
+
*/
|
|
36
|
+
localize(name: string, ...args: any[]): string;
|
|
37
|
+
/**
|
|
38
|
+
* localized report application error tags
|
|
39
|
+
*/
|
|
40
|
+
localizeError(name: string, ...args: any[]): string;
|
|
41
|
+
/**
|
|
42
|
+
* Localization for transformations
|
|
43
|
+
*/
|
|
27
44
|
localizeTransformationCaption(template: ITidyTableTransformation<any>): {
|
|
28
45
|
info: string;
|
|
29
46
|
description?: string;
|
|
30
47
|
};
|
|
31
|
-
|
|
32
|
-
localize(name: string, ...args: any[]): string;
|
|
33
|
-
translateContent(content: string): string;
|
|
48
|
+
localizeFormField(pluginId: string, widgetTemplateId: string, name: string, ...args: any[]): [string, string | undefined];
|
|
34
49
|
/**
|
|
35
50
|
* A bunch of mathematical functions related to the tidy table.
|
|
36
51
|
*/
|
|
@@ -117,7 +132,7 @@ export interface IWidgetPublicContext extends IPublicContext {
|
|
|
117
132
|
* template form fields, FormFieldDef (i.e. {zoom:14} to set the zoom to 14). If in editing mode,
|
|
118
133
|
* the edited options in the widget editor panel will be updated.
|
|
119
134
|
*/
|
|
120
|
-
onUserMenuAction(userMenuAction: string,
|
|
135
|
+
onUserMenuAction(callback: (userMenuAction: string, event: any) => Record<string, any> | undefined): void;
|
|
121
136
|
onWidgetRenderStatusChange(status: WidgetRenderLayoutStatus): void;
|
|
122
137
|
/**
|
|
123
138
|
* Event methods that do not depend on a Table
|
package/dist/PublicLayout.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PaperOrientation, PaperSizeUnits } from "./ITypes";
|
|
1
2
|
declare type CSSProperties = any;
|
|
2
3
|
/**
|
|
3
4
|
* <pre>
|
|
@@ -5,34 +6,17 @@ declare type CSSProperties = any;
|
|
|
5
6
|
* </pre>
|
|
6
7
|
*/
|
|
7
8
|
export declare type PageSize = "known" | "manual" | "unlimited";
|
|
8
|
-
export declare type PageSizeUnit = "px" | "mm" | "cm" | "in";
|
|
9
|
-
export declare type PageOrientation = "portrait" | "landscape";
|
|
10
9
|
export interface IPageSize {
|
|
11
10
|
type: PageSize;
|
|
12
11
|
}
|
|
13
12
|
/**
|
|
14
|
-
* From icCube server print component configuration
|
|
15
|
-
*
|
|
16
|
-
* <pre>
|
|
17
|
-
* <paperSize name="A5" unit="in" width="5.8" height="8.3"/>
|
|
18
|
-
* <paperSize name="A4" unit="in" width="8.3" height="11.7"/>
|
|
19
|
-
* <paperSize name="A3" unit="in" width="11.7" height="16.5"/>
|
|
20
|
-
* <paperSize name="B5" unit="in" width="6.9" height="9.8"/>
|
|
21
|
-
* <paperSize name="B4" unit="in" width="9.8" height="13.9"/>
|
|
22
|
-
*
|
|
23
|
-
* <paperSize name="JIS-B5" unit="in" width="7.2" height="10.1"/>
|
|
24
|
-
* <paperSize name="JIS-B4" unit="in" width="10.1" height="14.3"/>
|
|
25
|
-
*
|
|
26
|
-
* <paperSize name="Letter" unit="in" width="8.5" height="11"/>
|
|
27
|
-
* <paperSize name="Legal" unit="in" width="8.5" height="14"/>
|
|
28
|
-
* <paperSize name="Ledger" unit="in" width="11" height="17"/>
|
|
29
|
-
* </pre>
|
|
13
|
+
* From icCube server print component configuration.
|
|
30
14
|
*/
|
|
31
15
|
export interface IKnownPageSize extends IPageSize {
|
|
32
16
|
name: string;
|
|
33
17
|
}
|
|
34
18
|
export interface IManualPageSize extends IPageSize {
|
|
35
|
-
pageSizeUnits:
|
|
19
|
+
pageSizeUnits: PaperSizeUnits;
|
|
36
20
|
pageWidth: number;
|
|
37
21
|
pageHeight: number;
|
|
38
22
|
}
|
|
@@ -40,11 +24,11 @@ export interface IManualPageSize extends IPageSize {
|
|
|
40
24
|
* Unlimited in height.
|
|
41
25
|
*/
|
|
42
26
|
export interface IUnlimitedPageSize extends IPageSize {
|
|
43
|
-
pageSizeUnits:
|
|
27
|
+
pageSizeUnits: PaperSizeUnits;
|
|
44
28
|
pageWidth: number;
|
|
45
29
|
}
|
|
46
30
|
export interface IPageMargin {
|
|
47
|
-
sizeUnits:
|
|
31
|
+
sizeUnits: PaperSizeUnits;
|
|
48
32
|
top: number;
|
|
49
33
|
bottom: number;
|
|
50
34
|
left: number;
|
|
@@ -98,7 +82,7 @@ export interface IPageHeaderFooterPartDefinition {
|
|
|
98
82
|
logo?: IPageHeaderFooterLogoDefinition;
|
|
99
83
|
}
|
|
100
84
|
export interface IPageHeaderFooterDefinition {
|
|
101
|
-
sizeUnits:
|
|
85
|
+
sizeUnits: PaperSizeUnits;
|
|
102
86
|
height: number;
|
|
103
87
|
style?: CSSProperties;
|
|
104
88
|
left?: IPageHeaderFooterPartDefinition;
|
|
@@ -112,7 +96,7 @@ export interface IWidgetLayoutDefinition {
|
|
|
112
96
|
layoutConfigId: string;
|
|
113
97
|
cssClass?: string;
|
|
114
98
|
pageSize: IKnownPageSize | IManualPageSize | IUnlimitedPageSize;
|
|
115
|
-
pageOrientation:
|
|
99
|
+
pageOrientation: PaperOrientation;
|
|
116
100
|
pageMargin: IPageMargin;
|
|
117
101
|
pageBackgroundColor: string;
|
|
118
102
|
/**
|