@progress/telerik-angular-report-viewer 23.24.924 → 24.24.1112

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 18.2.24.924.
20
+ This version of the Angular Report Viewer requires Telerik Report Server or Telerik Reporting REST Service 18.3.24.1112.
21
21
 
22
22
  ## License
23
23
 
@@ -1,6 +1,6 @@
1
1
  var $ = require("jquery");
2
2
  /*
3
- * TelerikReporting v18.2.24.924 (https://www.telerik.com/products/reporting.aspx)
3
+ * TelerikReporting v18.3.24.1112 (https://www.telerik.com/products/reporting.aspx)
4
4
  * Copyright 2024 Progress Software EAD. All rights reserved.
5
5
  *
6
6
  * Telerik Reporting commercial licenses may be obtained at
@@ -562,6 +562,8 @@ var telerikReportViewer = (function (exports) {
562
562
  cannotValidateType: "Cannot validate parameter of type {type}.",
563
563
  loadingFormats: "Loading...",
564
564
  loadingReport: "Loading report...",
565
+ loadingParameters: "Loading parameters...",
566
+ autoRunDisabled: "Please validate the report parameter values and press Preview to generate the report.",
565
567
  preparingDownload: "Preparing document to download. Please wait...",
566
568
  preparingPrint: "Preparing document to print. Please wait...",
567
569
  errorLoadingTemplates: "Error loading the report viewer's templates. (trvTemplateUrl = '{0}').",
@@ -1132,7 +1134,7 @@ var telerikReportViewer = (function (exports) {
1132
1134
  }),
1133
1135
  "refresh": new Command(
1134
1136
  function() {
1135
- controller.refreshReport(true);
1137
+ controller.refreshReport(true, false);
1136
1138
  }
1137
1139
  ),
1138
1140
  "export": new Command(function(format) {
@@ -1553,6 +1555,7 @@ var telerikReportViewer = (function (exports) {
1553
1555
  if (pingMilliseconds <= 0) {
1554
1556
  return;
1555
1557
  }
1558
+ pingMilliseconds = Math.min(pingMilliseconds, 2147483647);
1556
1559
  interval = setInterval(function() {
1557
1560
  serviceClient.keepClientAlive(clientID);
1558
1561
  }, pingMilliseconds);
@@ -2308,7 +2311,7 @@ var telerikReportViewer = (function (exports) {
2308
2311
  report: args.Report,
2309
2312
  parameters: fixDataContractJsonSerializer(args.ParameterValues)
2310
2313
  });
2311
- controller.refreshReport(false);
2314
+ controller.refreshReport(false, true);
2312
2315
  },
2313
2316
  "navigateToUrl": function(action) {
2314
2317
  var args = action.Value;
@@ -2420,6 +2423,7 @@ var telerikReportViewer = (function (exports) {
2420
2423
  UPDATE_UI: "trv.UPDATE_UI",
2421
2424
  CSS_LOADED: "cssLoaded",
2422
2425
  RELOAD_PARAMETERS: "reloadParameters",
2426
+ PARAMETERS_LOADED: "parametersLoaded",
2423
2427
  INTERACTIVE_ACTION_EXECUTING: "interactiveActionExecuting",
2424
2428
  INTERACTIVE_ACTION_ENTER: "interactiveActionEnter",
2425
2429
  INTERACTIVE_ACTION_LEAVE: "interactiveActionLeave",
@@ -2469,7 +2473,7 @@ var telerikReportViewer = (function (exports) {
2469
2473
  return this;
2470
2474
  }
2471
2475
  report = rs.report;
2472
- parameterValues = rs.parameters;
2476
+ controller.setParameters(rs.parameters);
2473
2477
  changeReportSource(rs);
2474
2478
  return this;
2475
2479
  },
@@ -2490,6 +2494,7 @@ var telerikReportViewer = (function (exports) {
2490
2494
  },
2491
2495
  setParameters: function(paramValues) {
2492
2496
  parameterValues = paramValues;
2497
+ controller.parametersLoaded();
2493
2498
  },
2494
2499
  setProcessedParameter: function(processedParamValues) {
2495
2500
  processedParameterValues = processedParamValues;
@@ -2567,6 +2572,7 @@ var telerikReportViewer = (function (exports) {
2567
2572
  },
2568
2573
  previewReport: function(ignoreCache, baseDocumentId, actionId) {
2569
2574
  controller.loadedReportChange();
2575
+ controller.respectReportAutoRun = false;
2570
2576
  controller.refreshReportCore(ignoreCache, baseDocumentId, actionId);
2571
2577
  },
2572
2578
  refreshReportCore: function(ignoreCache, baseDocumentId, actionId) {
@@ -2604,7 +2610,7 @@ var telerikReportViewer = (function (exports) {
2604
2610
  }
2605
2611
  return paramsToBeExposed;
2606
2612
  },
2607
- refreshReport: function(ignoreCache, baseDocumentId, actionId) {
2613
+ refreshReport: function(ignoreCache, respectAutoRun, baseDocumentId, actionId) {
2608
2614
  controller.loadedReportChange();
2609
2615
  if (clientHasExpired) {
2610
2616
  clientHasExpired = false;
@@ -2634,12 +2640,25 @@ var telerikReportViewer = (function (exports) {
2634
2640
  appendInvalidReportParameterNames(invalidParameters);
2635
2641
  controller.missingOrInvalidParameters();
2636
2642
  } else {
2643
+ controller.respectReportAutoRun = respectAutoRun;
2637
2644
  controller.setParameters(parameterValues2);
2638
- controller.refreshReportCore(ignoreCache, baseDocumentId, actionId);
2645
+ if (controller.isReportAutoRun()) {
2646
+ controller.refreshReportCore(ignoreCache, baseDocumentId, actionId);
2647
+ } else {
2648
+ controller.showNotification({ stringResources: "autoRunDisabled" });
2649
+ }
2639
2650
  }
2640
2651
  });
2641
2652
  controller.reloadParameters(loadParametersPromise);
2642
2653
  },
2654
+ isReportAutoRun: function() {
2655
+ var _a;
2656
+ var reportAutoRunParameter = true;
2657
+ if (parameterValues) {
2658
+ reportAutoRunParameter = (_a = parameterValues.trv_AutoRun) != null ? _a : true;
2659
+ }
2660
+ return !controller.respectReportAutoRun || reportAutoRunParameter;
2661
+ },
2643
2662
  exportReport: function(format, deviceInfo) {
2644
2663
  exportReport(format, deviceInfo);
2645
2664
  },
@@ -2721,6 +2740,9 @@ var telerikReportViewer = (function (exports) {
2721
2740
  reloadParameters: function(...args) {
2722
2741
  return eventFactory(controller.Events.RELOAD_PARAMETERS, args);
2723
2742
  },
2743
+ parametersLoaded: function(...args) {
2744
+ return eventFactory(controller.Events.PARAMETERS_LOADED, args);
2745
+ },
2724
2746
  exportStarted: function(...args) {
2725
2747
  return eventFactory(controller.Events.EXPORT_STARTED, args);
2726
2748
  },
@@ -2909,7 +2931,8 @@ var telerikReportViewer = (function (exports) {
2909
2931
  INTERACTIVE_ACTION_LEAVE: "INTERACTIVE_ACTION_LEAVE",
2910
2932
  VIEWER_TOOLTIP_OPENING: "VIEWER_TOOLTIP_OPENING",
2911
2933
  SEND_EMAIL_BEGIN: "SEND_EMAIL_BEGIN",
2912
- SEND_EMAIL_END: "SEND_EMAIL_END"
2934
+ SEND_EMAIL_END: "SEND_EMAIL_END",
2935
+ PARAMETERS_LOADED: "PARAMETERS_LOADED"
2913
2936
  };
2914
2937
 
2915
2938
  function HistoryManager(options) {
@@ -2971,11 +2994,11 @@ var telerikReportViewer = (function (exports) {
2971
2994
  });
2972
2995
  }
2973
2996
  }
2974
- function exec(currentRecord) {
2997
+ function exec(currentRecord, reportChanged) {
2975
2998
  controller.setReportDocumentId(currentRecord.reportDocumentId);
2976
2999
  controller.setViewMode(currentRecord.viewMode);
2977
3000
  controller.setReportSource(currentRecord.reportSource);
2978
- controller.refreshReport(false, currentRecord.reportDocumentId);
3001
+ controller.refreshReport(false, reportChanged, currentRecord.reportDocumentId);
2979
3002
  controller.navigateToPage(currentRecord.pageNumber);
2980
3003
  }
2981
3004
  function canMove(step) {
@@ -2994,9 +3017,13 @@ var telerikReportViewer = (function (exports) {
2994
3017
  newPos = length - 1;
2995
3018
  }
2996
3019
  if (newPos != position) {
3020
+ var currentRecord = getCurrentRecord();
3021
+ var currentReport = currentRecord.reportSource ? currentRecord.reportSource.report : "";
2997
3022
  history.position = newPos;
2998
3023
  saveSettings();
2999
- exec(getCurrentRecord());
3024
+ var newRecord = getCurrentRecord();
3025
+ var newReport = newRecord.reportSource ? newRecord.reportSource.report : "";
3026
+ exec(newRecord, currentReport !== newReport);
3000
3027
  }
3001
3028
  }
3002
3029
  function removeTempRecordsFromHistory() {
@@ -3029,7 +3056,7 @@ var telerikReportViewer = (function (exports) {
3029
3056
  loadCurrent: function() {
3030
3057
  var rec = getCurrentRecord();
3031
3058
  if (rec) {
3032
- exec(rec);
3059
+ exec(rec, false);
3033
3060
  }
3034
3061
  return Boolean(rec);
3035
3062
  }
@@ -4005,7 +4032,8 @@ var telerikReportViewer = (function (exports) {
4005
4032
  documentReady = false;
4006
4033
  }).beforeLoadParameters(function(event, initial) {
4007
4034
  if (initial) {
4008
- showError(stringResources.loadingReport);
4035
+ clearPendingTimeoutIds();
4036
+ showError(stringResources.loadingParameters);
4009
4037
  }
4010
4038
  }).beforeLoadReport(function() {
4011
4039
  documentReady = false;
@@ -4015,7 +4043,9 @@ var telerikReportViewer = (function (exports) {
4015
4043
  clearPendingTimeoutIds();
4016
4044
  clear();
4017
4045
  disablePagesArea(true);
4018
- showError(stringResources.loadingReport);
4046
+ if (controller.isReportAutoRun()) {
4047
+ showError(stringResources.loadingReport);
4048
+ }
4019
4049
  }).beginLoadReport(function(event, args) {
4020
4050
  documentReady = true;
4021
4051
  invalidateCurrentlyLoadedPage();
@@ -6055,6 +6085,16 @@ var telerikReportViewer = (function (exports) {
6055
6085
  $li.attr("aria-label", $li[0].innerText);
6056
6086
  });
6057
6087
  }
6088
+ function resetReportAndClearItems() {
6089
+ documentMapNecessary = false;
6090
+ showDocumentMap(false);
6091
+ var r = controller.getReportSource().report;
6092
+ var clearMapItems = currentReport !== r || !isVisible();
6093
+ currentReport = r;
6094
+ if (clearMapItems) {
6095
+ clearDocumentMap();
6096
+ }
6097
+ }
6058
6098
  function clearDocumentMap() {
6059
6099
  displayDocumentMap([]);
6060
6100
  }
@@ -6120,14 +6160,10 @@ var telerikReportViewer = (function (exports) {
6120
6160
  }
6121
6161
  }
6122
6162
  function attach() {
6123
- controller.beginLoadReport(function() {
6163
+ controller.beforeLoadParameters(function() {
6164
+ resetReportAndClearItems();
6165
+ }).beginLoadReport(function() {
6124
6166
  beginLoad();
6125
- var r = controller.getReportSource().report;
6126
- var clearMapItems = currentReport !== r || !isVisible();
6127
- currentReport = r;
6128
- if (clearMapItems) {
6129
- clearDocumentMap();
6130
- }
6131
6167
  }).reportLoadComplete(function(event, args) {
6132
6168
  if (args.documentMapAvailable) {
6133
6169
  documentMapNecessary = true;
@@ -6323,7 +6359,7 @@ var telerikReportViewer = (function (exports) {
6323
6359
  (error ? $.fn.addClass : $.fn.removeClass).call($placeholder, "trv-error");
6324
6360
  }
6325
6361
  function showPreviewButton() {
6326
- (allParametersAutoRefresh() ? $.fn.removeClass : $.fn.addClass).call($placeholder, "preview");
6362
+ (allParametersAutoRefresh() && controller.isReportAutoRun() ? $.fn.removeClass : $.fn.addClass).call($placeholder, "preview");
6327
6363
  }
6328
6364
  function allParametersAutoRefresh() {
6329
6365
  var allAuto = Array.from(parameters).every((parameter) => {
@@ -6511,10 +6547,7 @@ var telerikReportViewer = (function (exports) {
6511
6547
  }
6512
6548
  var parametersAreaNecessary = false;
6513
6549
  function onLoadParametersComplete(params, successAction) {
6514
- parametersAreaNecessary = hasVisibleParameters(params);
6515
- if (!parametersAreaNecessary) {
6516
- showParametersArea(false);
6517
- }
6550
+ showParametersAreaIfNecessary(params);
6518
6551
  fill(params);
6519
6552
  showError("");
6520
6553
  if (parametersAreaNecessary && parametersAreaVisible) {
@@ -6529,6 +6562,10 @@ var telerikReportViewer = (function (exports) {
6529
6562
  }
6530
6563
  endLoad();
6531
6564
  }
6565
+ function showParametersAreaIfNecessary(params) {
6566
+ parametersAreaNecessary = hasVisibleParameters(params) || !controller.isReportAutoRun();
6567
+ showParametersArea(parametersAreaNecessary);
6568
+ }
6532
6569
  function updateParameters(successAction) {
6533
6570
  acceptParameters(controller.loadParameters(recentParameterValues), successAction);
6534
6571
  }
@@ -6598,6 +6635,9 @@ var telerikReportViewer = (function (exports) {
6598
6635
  controller.reloadParameters(onReloadParameters).beforeLoadReport(function() {
6599
6636
  loadingCount = 0;
6600
6637
  beginLoad();
6638
+ }).reportLoadComplete(function() {
6639
+ showParametersAreaIfNecessary(parameters);
6640
+ showPreviewButton();
6601
6641
  }).error(endLoad).pageReady(endLoad);
6602
6642
  controller.getParametersAreaState(function(event, args) {
6603
6643
  var parametersAreaNecessary2 = false;
@@ -8504,7 +8544,7 @@ var telerikReportViewer = (function (exports) {
8504
8544
  if (!validateOptions(options)) {
8505
8545
  return;
8506
8546
  }
8507
- var version = "18.2.24.924";
8547
+ var version = "18.3.24.1112";
8508
8548
  options = $.extend({}, getDefaultOptions(svcApiUrl, version), options);
8509
8549
  settings = new ReportViewerSettings(
8510
8550
  persistanceKey,
@@ -8561,13 +8601,13 @@ var telerikReportViewer = (function (exports) {
8561
8601
  if (arguments.length === 0) {
8562
8602
  ignoreCache = true;
8563
8603
  }
8564
- controller.refreshReport(ignoreCache);
8604
+ controller.refreshReport(ignoreCache, true);
8565
8605
  return viewer;
8566
8606
  },
8567
8607
  reportSource: function(rs) {
8568
8608
  if (rs || rs === null) {
8569
8609
  controller.setReportSource(rs);
8570
- controller.refreshReport(false);
8610
+ controller.refreshReport(false, true);
8571
8611
  return viewer;
8572
8612
  }
8573
8613
  return controller.getReportSource();
@@ -8620,6 +8660,9 @@ var telerikReportViewer = (function (exports) {
8620
8660
  getReportParameters: function() {
8621
8661
  return controller.getReportParameters();
8622
8662
  },
8663
+ isReportAutoRun: function() {
8664
+ return controller.isReportAutoRun();
8665
+ },
8623
8666
  authenticationToken: function(token) {
8624
8667
  if (token) {
8625
8668
  controller.setAuthenticationToken(token);
@@ -8695,7 +8738,8 @@ var telerikReportViewer = (function (exports) {
8695
8738
  INTERACTIVE_ACTION_LEAVE: controller.Events.INTERACTIVE_ACTION_LEAVE,
8696
8739
  VIEWER_TOOLTIP_OPENING: controller.Events.TOOLTIP_OPENING,
8697
8740
  SEND_EMAIL_BEGIN: controller.Events.SEND_EMAIL_STARTED,
8698
- SEND_EMAIL_END: controller.Events.SEND_EMAIL_READY
8741
+ SEND_EMAIL_END: controller.Events.SEND_EMAIL_READY,
8742
+ PARAMETERS_LOADED: controller.Events.PARAMETERS_LOADED
8699
8743
  };
8700
8744
  var $viewer = $(viewer);
8701
8745
  for (const [viewerEvent, controllerEvent] of Object.entries(eventMap)) {
@@ -8720,6 +8764,7 @@ var telerikReportViewer = (function (exports) {
8720
8764
  eventBinder(Events$1.VIEWER_TOOLTIP_OPENING, options.viewerToolTipOpening, true);
8721
8765
  eventBinder(Events$1.SEND_EMAIL_BEGIN, options.sendEmailBegin, true);
8722
8766
  eventBinder(Events$1.SEND_EMAIL_END, options.sendEmailEnd, true);
8767
+ eventBinder(Events$1.PARAMETERS_LOADED, options.parametersLoaded, true);
8723
8768
  }
8724
8769
  function init() {
8725
8770
  $placeholder.html(templates["trv-report-viewer"]);
@@ -8945,7 +8990,7 @@ var telerikReportViewer = (function (exports) {
8945
8990
  options.ready.call(viewer);
8946
8991
  }
8947
8992
  if (pendingRefresh) {
8948
- controller.refreshReport(false);
8993
+ controller.refreshReport(false, true);
8949
8994
  }
8950
8995
  }
8951
8996
  function loadStyleSheets(styleSheets) {
@@ -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-18.2.24.924.css/" rel="stylesheet" />
8
- <link href="{service}resources/styles/telerikReportViewer-18.2.24.924.css/" rel="stylesheet" />
7
+ <link href="{service}resources/font/fonticons-18.3.24.1112.css/" rel="stylesheet" />
8
+ <link href="{service}resources/styles/telerikReportViewer-18.3.24.1112.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 f23c7f781a7bed241984c86a0e1fbaba -->
332
+ <!-- DO NOT MODIFY OR DELETE THIS LINE! UPGRADE WIZARD CHECKSUM d2800d0cf0a1cb0c3bc626ab3ef5ec72 -->
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": "23.24.924",
4
+ "version": "24.24.1112",
5
5
  "author": "Progress",
6
6
  "license": "See LICENSE.md",
7
7
  "homepage": "https://www.telerik.com/reporting",
@@ -47,6 +47,6 @@
47
47
  "jquery": "^1.10.0 || ^2.2.0 || ^3.7.0"
48
48
  },
49
49
  "dependencies": {
50
- "@progress/telerik-jquery-report-viewer": "23.24.924"
50
+ "@progress/telerik-jquery-report-viewer": "24.24.1112"
51
51
  }
52
52
  }