@progress/telerik-angular-report-viewer 20.23.1114 → 21.24.130

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
@@ -17,7 +17,7 @@ While the component is not native (the theming mechanism uses Kendo UI for jQuer
17
17
  and has a dependency to jQuery itself), it brings reporting value to your Angular applications
18
18
  in no time.
19
19
 
20
- This version of the Angular Report Viewer requires Telerik Report Server or Telerik Reporting REST Service 17.2.23.1114.
20
+ This version of the Angular Report Viewer requires Telerik Report Server or Telerik Reporting REST Service 18.0.24.130.
21
21
 
22
22
  ## License
23
23
 
@@ -1,7 +1,7 @@
1
1
  var $ = require("jquery");
2
2
  /*
3
- * TelerikReporting v17.2.23.1114 (https://www.telerik.com/products/reporting.aspx)
4
- * Copyright 2023 Progress Software EAD. All rights reserved.
3
+ * TelerikReporting v18.0.24.130 (https://www.telerik.com/products/reporting.aspx)
4
+ * Copyright 2024 Progress Software EAD. All rights reserved.
5
5
  *
6
6
  * Telerik Reporting commercial licenses may be obtained at
7
7
  * https://www.telerik.com/purchase/license-agreement/reporting.aspx
@@ -78,11 +78,15 @@ var telerikReportViewer = (() => {
78
78
  areEqualArrays: () => areEqualArrays,
79
79
  each: () => each,
80
80
  escapeHtml: () => escapeHtml,
81
+ exceptionTypeNamesMatch: () => exceptionTypeNamesMatch,
81
82
  extend: () => extend,
82
83
  filterUniqueLastOccurance: () => filterUniqueLastOccurance,
83
84
  findElement: () => findElement,
84
85
  generateGuidString: () => generateGuidString,
85
86
  getColorAlphaValue: () => getColorAlphaValue,
87
+ getExceptionInstance: () => getExceptionInstance,
88
+ isApplicationException: () => isApplicationException,
89
+ isApplicationExceptionInstance: () => isApplicationExceptionInstance,
86
90
  isArray: () => isArray,
87
91
  isExceptionOfType: () => isExceptionOfType,
88
92
  isInternalServerError: () => isInternalServerError,
@@ -90,6 +94,7 @@ var telerikReportViewer = (() => {
90
94
  isRgbColor: () => isRgbColor,
91
95
  isSpecialKey: () => isSpecialKey,
92
96
  isSvgSupported: () => isSvgSupported,
97
+ isSystemArgumentException: () => isSystemArgumentException,
93
98
  loadScript: () => loadScript,
94
99
  loadScriptWithCallback: () => loadScriptWithCallback,
95
100
  logError: () => logError,
@@ -309,20 +314,31 @@ var telerikReportViewer = (() => {
309
314
  }
310
315
  return false;
311
316
  }
317
+ function isSystemArgumentException(xhr) {
318
+ var exceptionShortName = "ArgumentException";
319
+ var exceptionInstance = getExceptionInstance(xhr);
320
+ return isExceptionInstanceOfType(exceptionInstance, exceptionShortName, "System." + exceptionShortName);
321
+ }
312
322
  function isInvalidClientException(xhr) {
313
- return isExceptionOfType(xhr, "Telerik.Reporting.Services.Engine.InvalidClientException");
323
+ var exceptionShortName = "InvalidClientException";
324
+ var exceptionInstance = getExceptionInstance(xhr);
325
+ return isExceptionInstanceOfType(exceptionInstance, exceptionShortName, "Telerik.Reporting.Services.Engine." + exceptionShortName);
326
+ }
327
+ function isApplicationException(xhr) {
328
+ return isApplicationExceptionInstance(getExceptionInstance(xhr));
329
+ }
330
+ function isApplicationExceptionInstance(exception) {
331
+ var exceptionShortName = "DrawingFactoryUnavailableException";
332
+ return isExceptionInstanceOfType(exception, exceptionShortName, "Telerik.Drawing.Contract." + exceptionShortName);
314
333
  }
315
334
  function isExceptionOfType(xhr, exceptionType) {
316
- if (!xhr)
317
- return false;
318
- if (!xhr.responseText)
319
- return false;
320
- var json = parseJSON(xhr.responseText);
321
- if (!json)
322
- return false;
323
- if (!json.exceptionType)
324
- return false;
325
- return json.exceptionType === exceptionType;
335
+ return isExceptionInstanceOfType(getExceptionInstance(xhr), exceptionType, exceptionType);
336
+ }
337
+ function isExceptionInstanceOfType(exceptionInstance, exceptionTypeShortName, exceptionTypeFullName) {
338
+ return exceptionInstance && exceptionInstance.exceptionType && exceptionTypeNamesMatch(exceptionInstance.exceptionType, exceptionTypeShortName, exceptionTypeFullName);
339
+ }
340
+ function exceptionTypeNamesMatch(instanceTypeName, exceptionTypeShortName, exceptionTypeFullName) {
341
+ return instanceTypeName && (instanceTypeName === exceptionTypeFullName || instanceTypeName.endsWith(exceptionTypeShortName));
326
342
  }
327
343
  function parseJSON(json) {
328
344
  try {
@@ -343,6 +359,12 @@ var telerikReportViewer = (() => {
343
359
  return null;
344
360
  }
345
361
  }
362
+ function getExceptionInstance(xhr) {
363
+ if (!xhr || !xhr.responseText) {
364
+ return false;
365
+ }
366
+ return parseJSON(xhr.responseText);
367
+ }
346
368
  function extend() {
347
369
  var src, copy, name, options, target, i = 0, length = arguments.length;
348
370
  target = length > 1 ? arguments[i++] || {} : {};
@@ -681,7 +703,7 @@ var telerikReportViewer = (() => {
681
703
  errorSendingDocument: "Error sending report document (Report = '{0}')."
682
704
  };
683
705
  window.telerikReportViewer ||= {};
684
- window.telerikReportViewer.sr = sr;
706
+ window.telerikReportViewer.sr ||= sr;
685
707
 
686
708
  // src/stringResources.js
687
709
  var sr2 = sr2 || {};
@@ -1662,19 +1684,25 @@ var telerikReportViewer = (() => {
1662
1684
  raiseError(formatXhrError({ "responseText": errorMessage }, null, null, null));
1663
1685
  throw errorMessage;
1664
1686
  }
1665
- if (isInvalidClientException(xhrData.xhr)) {
1687
+ var xhr = xhrData.xhr;
1688
+ if (isInvalidClientException(xhr)) {
1666
1689
  onClientExpired();
1667
1690
  }
1668
1691
  var formattedError = formatXhrError(
1669
- xhrData.xhr,
1692
+ xhr,
1670
1693
  xhrData.status,
1671
1694
  isInternalServerError(xhrData.error) ? "" : xhrData.error,
1672
1695
  localizedMessage
1673
1696
  );
1674
1697
  raiseError(formattedError);
1675
1698
  if (!suppressErrorBubbling) {
1676
- errorMessage = xhrData.xhr.responseJSON && xhrData.xhr.responseJSON.exceptionMessage ? xhrData.xhr.responseJSON.exceptionMessage : stringResources.promisesChainStopError;
1677
- throw errorMessage;
1699
+ if (isApplicationException(xhr)) {
1700
+ var exception = getExceptionInstance(xhr);
1701
+ if (exception) {
1702
+ throw exception;
1703
+ }
1704
+ }
1705
+ throw xhr.responseJSON && exception.exceptionMessage ? xhr.responseJSON.exceptionMessage : stringResources.promisesChainStopError;
1678
1706
  }
1679
1707
  }
1680
1708
  function initializeClientAsync() {
@@ -1892,19 +1920,15 @@ var telerikReportViewer = (() => {
1892
1920
  deviceInfo.enableSearch = enableSearch;
1893
1921
  return deviceInfo;
1894
1922
  }
1895
- function resolveErrorByExceptionType(exceptionType) {
1896
- switch (exceptionType) {
1897
- case "Telerik.Reporting.Services.Engine.InvalidParameterException":
1898
- return stringResources.missingOrInvalidParameter;
1899
- default:
1900
- return "";
1901
- }
1923
+ function tryResolveClientErrorByExceptionType(exceptionType) {
1924
+ var parameterExceptionShortName = "InvalidParameterException";
1925
+ return exceptionTypeNamesMatch(exceptionType, parameterExceptionShortName, "Telerik.Reporting.Services.Engine." + parameterExceptionShortName) ? stringResources.missingOrInvalidParameter : "";
1902
1926
  }
1903
1927
  function formatXhrError(xhr, status, error, localizedMessage) {
1904
1928
  var parsedXhr = parseJSON(xhr.responseText);
1905
1929
  var result = "";
1906
1930
  if (parsedXhr) {
1907
- var errorMessage = resolveErrorByExceptionType(parsedXhr.exceptionType || parsedXhr.error);
1931
+ var errorMessage = tryResolveClientErrorByExceptionType(parsedXhr.exceptionType || parsedXhr.error);
1908
1932
  if (errorMessage) {
1909
1933
  return errorMessage;
1910
1934
  }
@@ -2329,7 +2353,7 @@ var telerikReportViewer = (() => {
2329
2353
  return client.getSearchResults(clientId, reportInstanceId, reportDocumentId, args.searchToken, args.matchCase, args.matchWholeWord, args.useRegex).catch(handleSearchResultsError);
2330
2354
  }
2331
2355
  function handleSearchResultsError(xhrData) {
2332
- if (!isExceptionOfType(xhrData.xhr, "System.ArgumentException")) {
2356
+ if (!isSystemArgumentException(xhrData.xhr)) {
2333
2357
  handleRequestError(xhrData, null, true);
2334
2358
  throw null;
2335
2359
  }
@@ -4300,10 +4324,16 @@ var telerikReportViewer = (() => {
4300
4324
  var $container = $(toolTipTemplate);
4301
4325
  var $titleSpan = $container.find(".trv-pages-area-kendo-tooltip-title");
4302
4326
  var $textSpan = $container.find(".trv-pages-area-kendo-tooltip-text");
4303
- $titleSpan.text(toolTipArgs.toolTip.title);
4304
- $textSpan.text(toolTipArgs.toolTip.text);
4327
+ $titleSpan.html(replaceNewLineSymbols(toolTipArgs.toolTip.title));
4328
+ $textSpan.html(replaceNewLineSymbols(toolTipArgs.toolTip.text));
4305
4329
  return $container.clone().wrap("<p>").parent().html();
4306
4330
  }
4331
+ function replaceNewLineSymbols(tooltipText) {
4332
+ tooltipText = escapeHtml(tooltipText);
4333
+ tooltipText = tooltipText.replaceAll("\r\n", "<br>");
4334
+ tooltipText = tooltipText.replaceAll("\n", "<br>");
4335
+ return tooltipText;
4336
+ }
4307
4337
  function positionToolTip(toolTip, e) {
4308
4338
  var x = e.pageX;
4309
4339
  var y = e.pageY;
@@ -6592,6 +6622,11 @@ var telerikReportViewer = (() => {
6592
6622
  menu._oldHoverItem.toggleClass("k-focus");
6593
6623
  }
6594
6624
  }
6625
+ if (!args.renderingExtensions) {
6626
+ controller.getDocumentFormats().then(fillFormats);
6627
+ } else {
6628
+ fillFormats(args.renderingExtensions);
6629
+ }
6595
6630
  });
6596
6631
  function init2() {
6597
6632
  try {
@@ -6600,7 +6635,6 @@ var telerikReportViewer = (() => {
6600
6635
  console.error("Instantiation of Kendo Menu as Main Menu threw an exception", e);
6601
6636
  throw e;
6602
6637
  }
6603
- menu.bind("open", onSubmenuOpen);
6604
6638
  menu.bind("activate", onSubmenuActivate);
6605
6639
  menu.bind("deactivate", onSubmenuDeactivate);
6606
6640
  menu.element.off("keydown", onMenuKeyDown);
@@ -6655,16 +6689,6 @@ var telerikReportViewer = (() => {
6655
6689
  });
6656
6690
  });
6657
6691
  }
6658
- function onSubmenuOpen(e) {
6659
- var $item = $(e.item);
6660
- menu.unbind("open", onSubmenuOpen);
6661
- menu.append({ text: stringResources.loadingFormats, spriteCssClass: "k-icon k-loading" }, $item);
6662
- controller.getDocumentFormats().then(fillFormats).then(function() {
6663
- menu.open($item);
6664
- }).then(function() {
6665
- menu.bind("open", onSubmenuOpen);
6666
- });
6667
- }
6668
6692
  function fillFormats(formats) {
6669
6693
  each($(dom).find("ul[data-command-list=export-format-list]"), function() {
6670
6694
  var $list = $(this), $parent = $list.parents("li");
@@ -8304,7 +8328,7 @@ var telerikReportViewer = (() => {
8304
8328
  if (!validateOptions(options)) {
8305
8329
  return;
8306
8330
  }
8307
- var version = "17.2.23.1114";
8331
+ var version = "18.0.24.130";
8308
8332
  options = extend({}, getDefaultOptions(svcApiUrl, version), options);
8309
8333
  settings = new ReportViewerSettings(
8310
8334
  persistanceKey,
@@ -8795,8 +8819,9 @@ var telerikReportViewer = (() => {
8795
8819
  ensureKendo(version2).then(function() {
8796
8820
  }).then(function() {
8797
8821
  viewer.authenticationToken(options.authenticationToken);
8798
- controller.getServiceVersion().catch(function() {
8799
- $placeholder.text(stringFormat(stringResources.errorServiceUrl, [escapeHtml(svcApiUrl)]));
8822
+ controller.getServiceVersion().catch(function(ex) {
8823
+ var errorOutput = isApplicationExceptionInstance(ex) ? ex.exceptionMessage : stringFormat(stringResources.errorServiceUrl, [escapeHtml(svcApiUrl)]);
8824
+ $placeholder.text(errorOutput);
8800
8825
  return Promise.reject();
8801
8826
  }).then(function(data) {
8802
8827
  if (data !== version2) {
@@ -8873,7 +8898,7 @@ var telerikReportViewer = (() => {
8873
8898
  return __toCommonJS(src_exports);
8874
8899
  })();
8875
8900
 
8876
- /* DO NOT MODIFY OR DELETE THIS LINE! UPGRADE WIZARD CHECKSUM 90485bf9963b5f8fe2856225dae030cb */
8901
+ /* DO NOT MODIFY OR DELETE THIS LINE! UPGRADE WIZARD CHECKSUM c9b9b66c0976c140ee70f2158bb3b437 */
8877
8902
  module.exports = {
8878
8903
  ReportViewer: telerikReportViewer.ReportViewer
8879
8904
  };
@@ -4,8 +4,8 @@
4
4
  <title>Telerik HTML5 Report Viewer Templates</title>
5
5
 
6
6
  <!--Telerik served resources. For more information see: http://docs.telerik.com/reporting/html5-report-viewer-styling-and-appearance -->
7
- <link href="{service}resources/font/fonticons-17.2.23.1114.css/" rel="stylesheet" />
8
- <link href="{service}resources/styles/telerikReportViewer-17.2.23.1114.css/" rel="stylesheet" />
7
+ <link href="{service}resources/font/fonticons-18.0.24.130.css/" rel="stylesheet" />
8
+ <link href="{service}resources/styles/telerikReportViewer-18.0.24.130.css/" rel="stylesheet" />
9
9
 
10
10
  </head>
11
11
  <body>
@@ -329,4 +329,4 @@
329
329
 
330
330
  </body>
331
331
  </html>
332
- <!-- DO NOT MODIFY OR DELETE THIS LINE! UPGRADE WIZARD CHECKSUM e7abbe1152b58ee77a0c9c643dfe2c57 -->
332
+ <!-- DO NOT MODIFY OR DELETE THIS LINE! UPGRADE WIZARD CHECKSUM f5ae1b3fa7d650d4d991e0fe456c214b -->
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@progress/telerik-angular-report-viewer",
3
3
  "description": "Progress® Telerik® Report Viewer for Angular",
4
- "version": "20.23.1114",
4
+ "version": "21.24.130",
5
5
  "author": "Progress",
6
6
  "license": "See LICENSE.md",
7
7
  "homepage": "https://www.telerik.com/reporting",