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

Sign up to get free protection for your applications and to get access to all the features.
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.116.
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.116 (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
  }
@@ -6592,6 +6616,11 @@ var telerikReportViewer = (() => {
6592
6616
  menu._oldHoverItem.toggleClass("k-focus");
6593
6617
  }
6594
6618
  }
6619
+ if (!args.renderingExtensions) {
6620
+ controller.getDocumentFormats().then(fillFormats);
6621
+ } else {
6622
+ fillFormats(args.renderingExtensions);
6623
+ }
6595
6624
  });
6596
6625
  function init2() {
6597
6626
  try {
@@ -6600,7 +6629,6 @@ var telerikReportViewer = (() => {
6600
6629
  console.error("Instantiation of Kendo Menu as Main Menu threw an exception", e);
6601
6630
  throw e;
6602
6631
  }
6603
- menu.bind("open", onSubmenuOpen);
6604
6632
  menu.bind("activate", onSubmenuActivate);
6605
6633
  menu.bind("deactivate", onSubmenuDeactivate);
6606
6634
  menu.element.off("keydown", onMenuKeyDown);
@@ -6655,16 +6683,6 @@ var telerikReportViewer = (() => {
6655
6683
  });
6656
6684
  });
6657
6685
  }
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
6686
  function fillFormats(formats) {
6669
6687
  each($(dom).find("ul[data-command-list=export-format-list]"), function() {
6670
6688
  var $list = $(this), $parent = $list.parents("li");
@@ -8304,7 +8322,7 @@ var telerikReportViewer = (() => {
8304
8322
  if (!validateOptions(options)) {
8305
8323
  return;
8306
8324
  }
8307
- var version = "17.2.23.1114";
8325
+ var version = "18.0.24.116";
8308
8326
  options = extend({}, getDefaultOptions(svcApiUrl, version), options);
8309
8327
  settings = new ReportViewerSettings(
8310
8328
  persistanceKey,
@@ -8795,8 +8813,9 @@ var telerikReportViewer = (() => {
8795
8813
  ensureKendo(version2).then(function() {
8796
8814
  }).then(function() {
8797
8815
  viewer.authenticationToken(options.authenticationToken);
8798
- controller.getServiceVersion().catch(function() {
8799
- $placeholder.text(stringFormat(stringResources.errorServiceUrl, [escapeHtml(svcApiUrl)]));
8816
+ controller.getServiceVersion().catch(function(ex) {
8817
+ var errorOutput = isApplicationExceptionInstance(ex) ? ex.exceptionMessage : stringFormat(stringResources.errorServiceUrl, [escapeHtml(svcApiUrl)]);
8818
+ $placeholder.text(errorOutput);
8800
8819
  return Promise.reject();
8801
8820
  }).then(function(data) {
8802
8821
  if (data !== version2) {
@@ -8873,7 +8892,7 @@ var telerikReportViewer = (() => {
8873
8892
  return __toCommonJS(src_exports);
8874
8893
  })();
8875
8894
 
8876
- /* DO NOT MODIFY OR DELETE THIS LINE! UPGRADE WIZARD CHECKSUM 90485bf9963b5f8fe2856225dae030cb */
8895
+ /* DO NOT MODIFY OR DELETE THIS LINE! UPGRADE WIZARD CHECKSUM 158555f9b27bbf1db6fe5ef8bdd09a06 */
8877
8896
  module.exports = {
8878
8897
  ReportViewer: telerikReportViewer.ReportViewer
8879
8898
  };
@@ -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.116.css/" rel="stylesheet" />
8
+ <link href="{service}resources/styles/telerikReportViewer-18.0.24.116.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 1c1b6b254bc960722558f9294a39b516 -->
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.116",
5
5
  "author": "Progress",
6
6
  "license": "See LICENSE.md",
7
7
  "homepage": "https://www.telerik.com/reporting",