@progress/telerik-jquery-report-viewer 31.26.812 → 32.26.1110

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/README.md CHANGED
@@ -20,6 +20,8 @@ Major features:
20
20
 
21
21
  This version of Telerik jQuery Report Viewer requires either Telerik Report Server or Telerik Reporting REST Service _REPORTING_VERSION_PLACEHOLDER_.
22
22
 
23
+ The viewer uses Kendo SVG icons. Its templates and distribution do not require the ReportingIcons font or the `fonticons` stylesheet.
24
+
23
25
  Learn more about Telerik Reporting Viewers here: [Telerik Report Viewers Overview](https://docs.telerik.com/reporting/embedding-reports/display-reports-in-applications/overview)
24
26
 
25
27
  ## License
@@ -43,6 +43,22 @@ function CommandSet(options) {
43
43
  if (!historyManager) {
44
44
  throw "No options.history.";
45
45
  }
46
+ var exportSettingsStore = options.exportSettingsStore;
47
+ var exportDialogEnabled = Boolean(options.exportDialog.enabled);
48
+ var hasConfigurableExportSettings = false;
49
+ var openExportDialogCommand = new command.Command(() => {
50
+ if (exportDialogEnabled && hasConfigurableExportSettings) {
51
+ notificationService.setExportDialogVisible({ visible: true });
52
+ }
53
+ }).setEnabled(false);
54
+ controller.on("beginLoadReport", () => {
55
+ hasConfigurableExportSettings = false;
56
+ openExportDialogCommand.setEnabled(false);
57
+ }).onAsync("reportLoadComplete", async (info) => {
58
+ const extensions = Array.isArray(info?.renderingExtensions) ? info.renderingExtensions : await Promise.resolve(controller.getDocumentFormats());
59
+ hasConfigurableExportSettings = RCV__namespace.hasExportSettings(extensions);
60
+ openExportDialogCommand.setEnabled(exportDialogEnabled && hasConfigurableExportSettings);
61
+ });
46
62
  function getDocumentMapVisible() {
47
63
  var args = {};
48
64
  notificationService.getDocumentMapState(args);
@@ -103,9 +119,16 @@ function CommandSet(options) {
103
119
  }),
104
120
  "export": new command.Command((format) => {
105
121
  if (format) {
106
- controller.exportReport(format);
122
+ Promise.resolve(controller.getDocumentFormats()).then((formats) => {
123
+ const extension = (formats || []).find((item) => item.name === format);
124
+ const deviceInfo = extension && exportSettingsStore ? exportSettingsStore.getDeviceInfo(format, extension.settings || []) : {};
125
+ controller.exportReport(format, deviceInfo);
126
+ }).catch((error) => {
127
+ controller.trigger("error", { message: error });
128
+ });
107
129
  }
108
130
  }),
131
+ "openExportDialog": openExportDialogCommand,
109
132
  "print": new command.Command(() => {
110
133
  controller.printReport();
111
134
  }),