@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.
Files changed (118) hide show
  1. package/dist/ApiUtils.d.ts +46 -8
  2. package/dist/ApiUtils.js +37 -21
  3. package/dist/ApiUtils.js.map +1 -1
  4. package/dist/INotification.d.ts +26 -6
  5. package/dist/IPluginDefinition.d.ts +9 -0
  6. package/dist/IReporting.d.ts +1 -1
  7. package/dist/IThemeManager.d.ts +14 -13
  8. package/dist/IThemeManager.js.map +1 -1
  9. package/dist/ITypes.d.ts +22 -0
  10. package/dist/ITypes.js +28 -0
  11. package/dist/ITypes.js.map +1 -1
  12. package/dist/IWidgetManager.d.ts +5 -2
  13. package/dist/LazyTreeView.d.ts +6 -1
  14. package/dist/PublicContext.d.ts +1 -0
  15. package/dist/PublicTemplate.d.ts +95 -35
  16. package/dist/PublicTemplate.js +1 -10
  17. package/dist/PublicTemplate.js.map +1 -1
  18. package/dist/PublicTemplateForm.d.ts +61 -7
  19. package/dist/PublicTemplateForm.js +1 -9
  20. package/dist/PublicTemplateForm.js.map +1 -1
  21. package/dist/PublicTemplates.d.ts +61 -0
  22. package/dist/{theme/ThemeGoogleMapMarker.js → PublicTemplates.js} +1 -1
  23. package/dist/PublicTemplates.js.map +1 -0
  24. package/dist/PublicTheme.d.ts +27 -8
  25. package/dist/PublicTheme.js.map +1 -1
  26. package/dist/PublicTidyColumn.d.ts +24 -8
  27. package/dist/PublicTidyColumn.js.map +1 -1
  28. package/dist/PublicTidyHistogram.d.ts +32 -0
  29. package/dist/PublicTidyHistogram.js.map +1 -1
  30. package/dist/PublicTidyTable.d.ts +35 -18
  31. package/dist/PublicTidyTableInteractions.d.ts +15 -2
  32. package/dist/PublicTidyTableTypes.d.ts +28 -8
  33. package/dist/PublicTidyTableTypes.js +18 -1
  34. package/dist/PublicTidyTableTypes.js.map +1 -1
  35. package/dist/PublicTidyTree.d.ts +13 -3
  36. package/dist/PublicTidyTree.js +19 -13
  37. package/dist/PublicTidyTree.js.map +1 -1
  38. package/dist/index.d.ts +17 -2
  39. package/dist/index.js +22 -3
  40. package/dist/index.js.map +1 -1
  41. package/dist/theme/ThemeAmCharts4.d.ts +1346 -0
  42. package/dist/theme/ThemeAmCharts4.js +61 -0
  43. package/dist/theme/ThemeAmCharts4.js.map +1 -0
  44. package/dist/theme/ThemeApp.d.ts +11 -11
  45. package/dist/theme/ThemeApp.js +40 -0
  46. package/dist/theme/ThemeApp.js.map +1 -1
  47. package/dist/theme/ThemeBaseTable.d.ts +94 -0
  48. package/dist/theme/ThemeBaseTable.js +10 -0
  49. package/dist/theme/ThemeBaseTable.js.map +1 -0
  50. package/dist/theme/ThemeDatePicker.d.ts +111 -0
  51. package/dist/theme/ThemeDatePicker.js +3 -0
  52. package/dist/theme/ThemeDatePicker.js.map +1 -0
  53. package/dist/theme/ThemeEmbeddedReport.d.ts +25 -0
  54. package/dist/theme/ThemeEmbeddedReport.js +3 -0
  55. package/dist/theme/ThemeEmbeddedReport.js.map +1 -0
  56. package/dist/theme/ThemeFilter.d.ts +28 -0
  57. package/dist/theme/ThemeFilter.js +3 -0
  58. package/dist/theme/ThemeFilter.js.map +1 -0
  59. package/dist/theme/ThemeFilterAutocomplete.d.ts +31 -15
  60. package/dist/theme/ThemeFilterAutocomplete.js.map +1 -1
  61. package/dist/theme/ThemeFilterButtons.d.ts +40 -23
  62. package/dist/theme/ThemeFilterButtons.js.map +1 -1
  63. package/dist/theme/ThemeFilterCheckboxRadio.d.ts +48 -0
  64. package/dist/theme/ThemeFilterCheckboxRadio.js +23 -0
  65. package/dist/theme/ThemeFilterCheckboxRadio.js.map +1 -0
  66. package/dist/theme/ThemeFilterPanel.d.ts +84 -0
  67. package/dist/theme/ThemeFilterPanel.js +35 -0
  68. package/dist/theme/ThemeFilterPanel.js.map +1 -0
  69. package/dist/theme/ThemeFilterSlider.d.ts +42 -28
  70. package/dist/theme/ThemeFilterSlider.js +7 -7
  71. package/dist/theme/ThemeFilterSlider.js.map +1 -1
  72. package/dist/theme/ThemeFilterTree.d.ts +60 -30
  73. package/dist/theme/ThemeFilterTree.js.map +1 -1
  74. package/dist/theme/ThemeGoogle.d.ts +132 -0
  75. package/dist/theme/ThemeGoogle.js +64 -0
  76. package/dist/theme/ThemeGoogle.js.map +1 -0
  77. package/dist/theme/ThemeGoogleHeatMap.d.ts +58 -0
  78. package/dist/theme/ThemeGoogleHeatMap.js +3 -0
  79. package/dist/theme/ThemeGoogleHeatMap.js.map +1 -0
  80. package/dist/theme/ThemeGoogleKmlLayer.d.ts +40 -0
  81. package/dist/theme/ThemeGoogleKmlLayer.js +3 -0
  82. package/dist/theme/ThemeGoogleKmlLayer.js.map +1 -0
  83. package/dist/theme/ThemeGoogleMarker.d.ts +147 -0
  84. package/dist/theme/ThemeGoogleMarker.js +3 -0
  85. package/dist/theme/ThemeGoogleMarker.js.map +1 -0
  86. package/dist/theme/ThemeHtmlBox.d.ts +5 -1
  87. package/dist/theme/ThemeImage.d.ts +19 -0
  88. package/dist/theme/ThemeImage.js +3 -0
  89. package/dist/theme/ThemeImage.js.map +1 -0
  90. package/dist/theme/ThemeKpiBox.d.ts +46 -0
  91. package/dist/theme/ThemeKpiBox.js +3 -0
  92. package/dist/theme/ThemeKpiBox.js.map +1 -0
  93. package/dist/theme/ThemeKpiCard.d.ts +98 -0
  94. package/dist/theme/ThemeKpiCard.js +3 -0
  95. package/dist/theme/ThemeKpiCard.js.map +1 -0
  96. package/dist/theme/ThemeMarkdownText.d.ts +27 -0
  97. package/dist/theme/ThemeMarkdownText.js +3 -0
  98. package/dist/theme/ThemeMarkdownText.js.map +1 -0
  99. package/dist/theme/ThemePivotTable.d.ts +61 -0
  100. package/dist/theme/ThemePivotTable.js +10 -1
  101. package/dist/theme/ThemePivotTable.js.map +1 -1
  102. package/dist/theme/ThemeRepetitionWidget.d.ts +51 -0
  103. package/dist/theme/ThemeRepetitionWidget.js +3 -0
  104. package/dist/theme/ThemeRepetitionWidget.js.map +1 -0
  105. package/dist/theme/ThemeReportAppLeftPanel.d.ts +7 -0
  106. package/dist/theme/ThemeReportAppLeftPanel.js +11 -0
  107. package/dist/theme/ThemeReportAppLeftPanel.js.map +1 -0
  108. package/dist/theme/ThemeTable.d.ts +70 -1
  109. package/dist/theme/ThemeTable.js.map +1 -1
  110. package/dist/theme/ThemeWidgetBox.d.ts +69 -0
  111. package/dist/theme/ThemeWidgetBox.js +29 -1
  112. package/dist/theme/ThemeWidgetBox.js.map +1 -1
  113. package/package.json +6 -6
  114. package/dist/theme/ThemeFilterCheckboxes.d.ts +0 -18
  115. package/dist/theme/ThemeFilterCheckboxes.js +0 -11
  116. package/dist/theme/ThemeFilterCheckboxes.js.map +0 -1
  117. package/dist/theme/ThemeGoogleMapMarker.d.ts +0 -51
  118. package/dist/theme/ThemeGoogleMapMarker.js.map +0 -1
@@ -1,6 +1,41 @@
1
1
  import { IPluginDefinition } from "./IPluginDefinition";
2
2
  import { IVersionedPluginDefinition } from "./IVersionedPluginDefinition";
3
- import { IPublicWidgetTemplateDefinition } from "./PublicTemplate";
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
- * Wrap the template from another widget. The widget can come from a plugin or from the included widgets.
12
- * Wrapping means that the template receives its not-defined settings from the template that is wrapped.
13
- * @param wrappedTemplateId the unique identifier of the template, e.g., amCharts4.AmCharts4DonutChart.
14
- * @param newDefinition definition of the new widget.
15
- * @param transformOptions create the available options using the options from the wrapped template.
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 makeWidgetTemplateWrapper<T extends IPublicWidgetTemplateDefinition<any>>(wrappedTemplateId: string, newDefinition: T, transformOptions?: (old: T['chartOptionsMeta']) => void): T;
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-rc.4" || "-", "Mon, 14 Feb 2022 08:45:05 GMT" || "-") }, definition);
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
- * Wrap the template from another widget. The widget can come from a plugin or from the included widgets.
16
- * Wrapping means that the template receives its not-defined settings from the template that is wrapped.
17
- * @param wrappedTemplateId the unique identifier of the template, e.g., amCharts4.AmCharts4DonutChart.
18
- * @param newDefinition definition of the new widget.
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 makeWidgetTemplateWrapper(wrappedTemplateId, newDefinition, transformOptions) {
22
- return Object.assign(Object.assign({}, newDefinition), { resolveDefinition: function (lib) {
23
- const self = newDefinition;
24
- return lib.wrapTemplateDefinition(wrappedTemplateId)
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 resolveTemplateDefinition(self, definition, transformOptions) {
31
- const newTemplate = Object.assign(Object.assign(Object.assign({}, definition), self), { resolveDefinition: undefined });
32
- // TODO (tom) use deepClone for the optionsMeta.
33
- if (transformOptions != null) {
34
- transformOptions(newTemplate.chartOptionsMeta);
35
- }
36
- return newTemplate;
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;
@@ -1 +1 @@
1
- {"version":3,"file":"ApiUtils.js","sourceRoot":"","sources":["../src/ApiUtils.ts"],"names":[],"mappings":";;;;;;AAEA,0EAAkD;AAGlD,MAAa,QAAQ;IAOjB,MAAM,CAAC,UAAU,CAAC,UAA6B;QAE3C,OAAO,GAA+B,EAAE;YAEpC,uBAEI,UAAU,EAAE,IAAI,0BAAgB,CAC5B,YAAY,IAAI,GAAG,EACnB,+BAA+B,IAAI,GAAG,CACzC,IAEE,UAAU,EAEhB;QAEL,CAAC,CAAA;IACL,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,yBAAyB,CAC5B,iBAAyB,EAAE,aAAgB,EAAE,gBAAuD;QAEpG,uCAGO,aAAa,KAEhB,iBAAiB,EAAE,UAAU,GAA8B;gBACvD,MAAM,IAAI,GAAG,aAAa,CAAC;gBAC3B,OAAO,GAAG,CAAC,sBAAsB,CAAC,iBAAiB,CAAC;qBAC/C,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC,IAAI,EAAE,UAAU,EAAE,gBAAgB,CAAC,CAAC,CAAA;YACnG,CAAC,EAED,MAAM,EAAE,GAAG,EAAE;gBACT,MAAM,KAAK,CAAC,0BAA0B,GAAG,iBAAiB,GAAG,6BAA6B,CAAC,CAAC;YAChG,CAAC,IAEJ;IACL,CAAC;IAEO,MAAM,CAAC,yBAAyB,CACpC,IAAO,EAAE,UAAgD,EAAE,gBAAuD;QAElH,MAAM,WAAW,iDAAO,UAAU,GAAK,IAAI,KAAE,iBAAiB,EAAE,SAAS,GAAC,CAAC;QAC3E,gDAAgD;QAChD,IAAI,gBAAgB,IAAI,IAAI,EAAE;YAC1B,gBAAgB,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;SAClD;QACD,OAAO,WAAW,CAAC;IACvB,CAAC;;AA9DL,4BAgEC;AA9DG;;GAEG;AACoB,uBAAc,GAAG,OAAO,CAAC"}
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"}
@@ -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 AppPrintReportNotification extends IAppNotificationWithPayload<AppPrintReportNotificationPayload> {
27
+ export interface IAppPrintReportNotification extends IAppNotificationWithPayload<AppPrintReportNotificationPayload> {
28
+ }
29
+ export interface AppPrintReportNotification extends IAppPrintReportNotification {
31
30
  readonly type: "print-report";
32
31
  }
33
- export declare type AppNotification = AppEditReportNotification | AppPrintReportDialogNotification | AppPrintReportNotification;
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
  }
@@ -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 true
76
+ * @param keepGlobalFilter defaulted to false
77
77
  */
78
78
  openReport(options: IOpenReportOptions, pushToHistory?: boolean, keepGlobalFilter?: boolean): void;
79
79
  /**
@@ -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
- * IWidgetBoxDefinition
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) => void, baseTheme?: EmbeddedThemeNames): void;
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":";;;AAEA,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAE1B,2CAAqB,CAAA;AAEzB,CAAC,EAJW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAI7B"}
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
@@ -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"}
@@ -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<any>): void;
5
+ registerWidget<OPTIONS extends FormFieldObject>(widget: IPublicWidgetTemplateDefinition<OPTIONS>): void;
6
+ registerWrappedWidget<WIDGET extends WidgetTemplateIDs>(widget: IWrappedWidgetTemplateDefinition<WIDGET>): void;
4
7
  }
@@ -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
  */
@@ -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
  */
@@ -1,11 +1,13 @@
1
1
  import { ITidyTable } from "./PublicTidyTable";
2
2
  import { ITidyTableInteraction } from "./PublicTidyTableInteractions";
3
3
  import { IWidgetPublicContext } from "./PublicContext";
4
- import { FormFieldDef, FormFieldObject, FormFields, IFormColumnChooserFieldDef } from "./PublicTemplateForm";
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 Mdx is for a filter (the cell values are not of interest)
69
+ * The generated MDX is for a filter (the cell values are not of interest).
68
70
  */
69
71
  mdxIsForFilter?: true;
70
72
  /**
71
- * the cell values are not needed
73
+ * The cell values are not needed
72
74
  */
73
75
  withoutCellValues?: true;
74
76
  /**
75
- * an MDX query if the builder is empty
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<T extends FormFieldObject> extends IPublicCommonWidgetTemplateDefinition {
113
- jsCode: (context: IWidgetPublicContext) => IPublicReactChartTemplate<T>;
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<T extends FormFieldObject> extends IPublicCommonWidgetTemplateDefinition {
123
- jsCode: (context: IWidgetPublicContext, container: HTMLDivElement) => IPublicJsChartTemplate<T>;
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
- * List of special selection granularities (column selectors)
128
- */
129
- export declare enum SelectionGranularityOptions {
130
- PivotTableTopHeader = "ic3pivotTableTopHeader",
131
- PivotTableLeftHeader = "ic3pivotTableLeftHeader",
132
- PivotTableCell = "ic3pivotTableCell"
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
- * The list of columns that can be part of the selection. The end-user can then select the actual
277
- * columns from the Interaction/Selection configuration (see Selection Granularity).
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: (column: ITidyColumn) => boolean;
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?: FormFieldDef[] | FormFields<FormFieldObject>;
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
- resolveDefinition?: (library: IResolveDefinitionLibrary) => Promise<IPublicWidgetTemplateDefinition<any>>;
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 IChartVisualizationInput {
381
+ export interface IWidgetTemplateTidyData {
330
382
  table: ITidyTable;
331
383
  inter: ITidyTableInteraction;
332
- options: {
333
- [key: string]: any;
334
- };
335
384
  }
336
- export interface IWidgetTemplateTidyData {
385
+ export interface IWidgetTemplateTidyOptions<T extends FormFieldObject> {
337
386
  table: ITidyTable;
338
- inter: ITidyTableInteraction;
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 IResolveDefinitionLibrary {
389
- wrapTemplateDefinition(id: string): Promise<IPublicWidgetTemplateDefinition<any>>;
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 {};