@progress/telerik-react-report-viewer 0.0.9 → 15.22.225

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -1,16 +1,30 @@
1
1
 
2
- #Progress Telerik Report Viewer for React component
2
+ # Progress Telerik Report Viewer component for React
3
3
 
4
- This package is part of the [Telerik Reporting](http://www.telerik.com/reporting).
5
- **IMPORTANT** This package is built and published for testing purposes only. It is not intended to be used in production environment.
4
+ This package is part of [Telerik Reporting](https://www.telerik.com/reporting).
6
5
 
7
- This version of the React Report Viewer requires Telerik Report Server or Telerik Reporting REST Service 11.0.0.9
6
+ This React component is a report viewer that will ensure straightforward embedding of reports for preview.
7
+ The viewer is built as a wrapper of the Telerik Reporting HTML5 Report Viewer widget,
8
+ inheriting all its strengths, including:
9
+
10
+ * Navigate the report pages for preview on the screen
8
11
 
12
+ * Exercise the defined interactivities like navigate to another report or to a bookmark in the same one,
13
+ drill-down or sort on a column, etc.
14
+
15
+ * Print or export the report to all the formats we support, including PDF and Excel
16
+
17
+ While the component is not native (the theming mechanism uses Kendo UI for jQuery
18
+ and has a dependency to jQuery itself), it brings reporting value to your React applications
19
+ in no time.
20
+
21
+ This version of the React Report Viewer requires Telerik Report Server or Telerik Reporting REST Service 16.0.22.225
22
+
9
23
  ## License
10
-
11
- **IMPORTANT** This is not free software. You must agree to the
12
- [Telerik End User License Agreement for Telerik Reporting](http://www.telerik.com/purchase/license-agreement/reporting-dlw-s) in order to use it.
13
-
24
+
25
+ **IMPORTANT** This is commercial software. You must agree to the
26
+ [Telerik End User License Agreement for Telerik Reporting](https://www.telerik.com/purchase/license-agreement/reporting-dlw-s) to use it.
27
+
14
28
  If you do not own a commercial license, the use of this product shall be governed by the trial license terms.
15
-
16
- Telerik Reporting licenses may be obtained at [http://www.telerik.com/purchase/individual/reporting](http://www.telerik.com/purchase/individual/reporting).
29
+
30
+ Telerik Reporting licenses may be obtained through the [Telerik Reporting page](https://www.telerik.com/purchase/individual/reporting).
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -15,9 +15,9 @@ var _telerikReportViewer = require("../dependencies/telerikReportViewer.js");
15
15
 
16
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
17
 
18
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
18
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
19
19
 
20
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
20
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
21
21
 
22
22
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
23
23
 
@@ -25,9 +25,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
25
25
 
26
26
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
27
27
 
28
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
28
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
29
29
 
30
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
30
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
31
31
 
32
32
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
33
33
 
@@ -111,6 +111,11 @@ var TelerikReportViewer = /*#__PURE__*/function (_React$Component) {
111
111
  });
112
112
  this.commands = this.viewerObject.commands;
113
113
  }
114
+ }, {
115
+ key: "componentWillUnmount",
116
+ value: function componentWillUnmount() {
117
+ this.dispose();
118
+ }
114
119
  }, {
115
120
  key: "render",
116
121
  value: function render() {
@@ -214,6 +219,11 @@ var TelerikReportViewer = /*#__PURE__*/function (_React$Component) {
214
219
  value: function clearReportSource() {
215
220
  return this.viewerObject.clearReportSource();
216
221
  }
222
+ }, {
223
+ key: "dispose",
224
+ value: function dispose() {
225
+ return this.viewerObject.dispose();
226
+ }
217
227
  }]);
218
228
 
219
229
  return TelerikReportViewer;
@@ -1,8 +1,8 @@
1
1
 
2
2
 
3
3
  /*
4
- * TelerikReporting v16.0.21.1213 (http://www.telerik.com/products/reporting.aspx)
5
- * Copyright 2021 Progress Software EAD. All rights reserved.
4
+ * TelerikReporting v16.0.22.225 (http://www.telerik.com/products/reporting.aspx)
5
+ * Copyright 2022 Progress Software EAD. All rights reserved.
6
6
  *
7
7
  * Telerik Reporting commercial licenses may be obtained at
8
8
  * http://www.telerik.com/purchase/license-agreement/reporting.aspx
@@ -1730,7 +1730,7 @@ var telerikReportViewer = {};
1730
1730
  }
1731
1731
  function showError($el, tag) {
1732
1732
  var validationMsg = sr[$el.attr(tag)];
1733
- $('[data-for="' + $el.attr("name") + '"]').addClass("-visible").html(validationMsg);
1733
+ $('[data-for="' + $el.attr("name") + '"]').addClass("-visible").text(validationMsg);
1734
1734
  }
1735
1735
  function hideError($el) {
1736
1736
  $('[data-for="' + $el.attr("name") + '"]').removeClass("-visible");
@@ -2519,7 +2519,7 @@ var telerikReportViewer = {};
2519
2519
  var exceptionMessage = utils.escapeHtml(parsedXhr.exceptionMessage || parsedXhr.error_description);
2520
2520
  if (exceptionMessage) {
2521
2521
  if (result) {
2522
- result += "<br/>" + exceptionMessage;
2522
+ result += " " + exceptionMessage;
2523
2523
  } else {
2524
2524
  result = exceptionMessage;
2525
2525
  }
@@ -2529,7 +2529,7 @@ var telerikReportViewer = {};
2529
2529
  }
2530
2530
  if (localizedMessage || error) {
2531
2531
  if (result) {
2532
- result = "<br/>" + result;
2532
+ result = " " + result;
2533
2533
  }
2534
2534
  result = utils.escapeHtml(localizedMessage ? localizedMessage : error) + result;
2535
2535
  }
@@ -3831,7 +3831,7 @@ var telerikReportViewer = {};
3831
3831
  (disable ? $.fn.addClass : $.fn.removeClass).call($placeholder, "trv-loading");
3832
3832
  }
3833
3833
  function showError(error) {
3834
- $errorMessage.html(error);
3834
+ $errorMessage.text(error);
3835
3835
  (error ? $.fn.addClass : $.fn.removeClass).call($placeholder, "trv-error");
3836
3836
  }
3837
3837
  function pageNo(page, no) {
@@ -5074,7 +5074,7 @@ var telerikReportViewer = {};
5074
5074
  $placeholder.html('<div class="trv-parameter-editor-generic"></div>');
5075
5075
  return {
5076
5076
  beginEdit: function(parameter) {
5077
- $placeholder.find(".trv-parameter-editor-generic").html(parameter.Error ? "(error)" : parameter.value);
5077
+ $placeholder.find(".trv-parameter-editor-generic").text(parameter.Error ? "(error)" : parameter.value);
5078
5078
  },
5079
5079
  enable: function(enable) {}
5080
5080
  };
@@ -5267,13 +5267,13 @@ var telerikReportViewer = {};
5267
5267
  }
5268
5268
  function createParameterUI(parameter) {
5269
5269
  var $container = createParameterContainer(), $editorPlaceholder = $container.find(".trv-parameter-value"), $title = $container.find(".trv-parameter-title"), $error = $container.find(".trv-parameter-error"), $errorMessage = $container.find(".trv-parameter-error-message"), $useDefaultValueCheckbox = $container.find(".trv-parameter-use-default input"), editorsTypes = options.parameters && options.parameters.editors ? options.parameters.editors : null, editorFactory = selectParameterEditorFactory(parameter, editorsTypes);
5270
- var parameterText = parameter.text;
5270
+ var parameterText = utils.escapeHtml(parameter.text);
5271
5271
  var isHiddenParameter = !parameter.isVisible;
5272
5272
  if (isHiddenParameter) {
5273
5273
  parameterText += " [<b>hidden</b>]";
5274
5274
  }
5275
5275
  $title.html(parameterText).attr("title", parameterText);
5276
- $errorMessage.html(parameter.Error);
5276
+ $errorMessage.text(parameter.Error);
5277
5277
  (parameter.Error ? $.fn.show : $.fn.hide).call($error);
5278
5278
  var editor = editorFactory.createEditor($editorPlaceholder, {
5279
5279
  templates: options.templates,
@@ -5285,7 +5285,7 @@ var telerikReportViewer = {};
5285
5285
  } catch (error) {
5286
5286
  parameter.Error = error;
5287
5287
  parameter.value = [];
5288
- $errorMessage.html(error);
5288
+ $errorMessage.text(error);
5289
5289
  $error.show();
5290
5290
  enablePreviewButton(false);
5291
5291
  } finally {
@@ -5354,7 +5354,7 @@ var telerikReportViewer = {};
5354
5354
  return factory;
5355
5355
  }
5356
5356
  function showError(error) {
5357
- $errorMessage.html(error);
5357
+ $errorMessage.text(error);
5358
5358
  (error ? $.fn.addClass : $.fn.removeClass).call($placeholder, "trv-error");
5359
5359
  }
5360
5360
  function showPreviewButton() {
@@ -6848,7 +6848,7 @@ var telerikReportViewer = {};
6848
6848
  function PageCountLabel(dom, options) {
6849
6849
  var $element = $(dom);
6850
6850
  options.controller.pageCountChange(function(e, value) {
6851
- $element.html(value);
6851
+ $element.text(value);
6852
6852
  });
6853
6853
  }
6854
6854
  var pageCountLabel_pluginName = "telerik_ReportViewer_PageCountLabel";
@@ -7501,7 +7501,7 @@ var telerikReportViewer = {};
7501
7501
  }
7502
7502
  }
7503
7503
  function kendoComboBoxSelect(e) {
7504
- var newValue = e.sender.dataItem() ? e.sender.dataItem().value : null;
7504
+ var newValue = e.sender.value();
7505
7505
  if (newValue && lastSearch !== newValue) {
7506
7506
  lastSearch = newValue;
7507
7507
  searchForToken(lastSearch);
@@ -8026,7 +8026,7 @@ var telerikReportViewer = {};
8026
8026
  if (!validateOptions(options)) {
8027
8027
  return;
8028
8028
  }
8029
- var version = "11.0.0.9";
8029
+ var version = "16.0.22.225";
8030
8030
  options = utils.extend({}, getDefaultOptions(svcApiUrl, version), options);
8031
8031
  settings = new ReportViewerSettings(persistanceKey, options.persistSession ? window.sessionStorage : new MemStorage(), {
8032
8032
  scale: options.scale,
@@ -8164,17 +8164,17 @@ var telerikReportViewer = {};
8164
8164
  };
8165
8165
  function validateOptions(options) {
8166
8166
  if (!options) {
8167
- $placeholder.html("The report viewer configuration options are not initialized.");
8167
+ $placeholder.text("The report viewer configuration options are not initialized.");
8168
8168
  return false;
8169
8169
  }
8170
8170
  if (options.reportServer) {
8171
8171
  if (!options.reportServer.url) {
8172
- $placeholder.html("The report server URL is not specified.");
8172
+ $placeholder.text("The report server URL is not specified.");
8173
8173
  return false;
8174
8174
  }
8175
8175
  } else {
8176
8176
  if (!options.serviceUrl) {
8177
- $placeholder.html("The serviceUrl is not specified.");
8177
+ $placeholder.text("The serviceUrl is not specified.");
8178
8178
  return false;
8179
8179
  }
8180
8180
  }
@@ -8484,15 +8484,15 @@ var telerikReportViewer = {};
8484
8484
  ensureKendo(version).then(function() {
8485
8485
  viewer.authenticationToken(options.authenticationToken);
8486
8486
  controller.getServiceVersion().catch(function() {
8487
- $placeholder.html(utils.stringFormat(sr.errorServiceUrl, [ utils.escapeHtml(svcApiUrl) ]));
8487
+ $placeholder.text(utils.stringFormat(sr.errorServiceUrl, [ utils.escapeHtml(svcApiUrl) ]));
8488
8488
  return Promise.reject();
8489
8489
  }).then(function(data) {
8490
8490
  if (data !== version) {
8491
- $placeholder.html(utils.stringFormat(sr.errorServiceVersion, [ data, version ]));
8491
+ $placeholder.text(utils.stringFormat(sr.errorServiceVersion, [ data, version ]));
8492
8492
  return Promise.reject();
8493
8493
  }
8494
8494
  templateCache.load(options.trvTemplateUrl, svcApiUrl, client).catch(function() {
8495
- $placeholder.html(utils.stringFormat(sr.errorLoadingTemplates, [ utils.escapeHtml(options.trvTemplateUrl) ]));
8495
+ $placeholder.text(utils.stringFormat(sr.errorLoadingTemplates, [ utils.escapeHtml(options.trvTemplateUrl) ]));
8496
8496
  return Promise.reject();
8497
8497
  }).then(function(result) {
8498
8498
  templates = result.templates;
@@ -8526,4 +8526,4 @@ module.exports = {
8526
8526
  ReportViewer: telerikReportViewer.ReportViewer
8527
8527
  };
8528
8528
 
8529
- /* DO NOT MODIFY OR DELETE THIS LINE! UPGRADE WIZARD CHECKSUM 27082FEFEA4F6B45C99797FB923957B7 */
8529
+ /* DO NOT MODIFY OR DELETE THIS LINE! UPGRADE WIZARD CHECKSUM C79ACF5542545A0AF69CA9F61D0E3393 */