@progress/telerik-react-report-viewer 21.24.116 → 21.24.305

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  var $ = require("jquery");
2
2
  /*
3
- * TelerikReporting v18.0.24.116 (https://www.telerik.com/products/reporting.aspx)
3
+ * TelerikReporting v18.0.24.305 (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
@@ -178,7 +178,8 @@ var telerikReportViewer = (() => {
178
178
  }
179
179
  function generateGuidString() {
180
180
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
181
- var r = Math.random() * 16 | 0, v = c == "x" ? r : r & 3 | 8;
181
+ var r = Math.random() * 16 | 0;
182
+ var v = c == "x" ? r : r & 3 | 8;
182
183
  return v.toString(16);
183
184
  });
184
185
  }
@@ -366,7 +367,13 @@ var telerikReportViewer = (() => {
366
367
  return parseJSON(xhr.responseText);
367
368
  }
368
369
  function extend() {
369
- var src, copy, name, options, target, i = 0, length = arguments.length;
370
+ var src;
371
+ var copy;
372
+ var name;
373
+ var options;
374
+ var target;
375
+ var i = 0;
376
+ var length = arguments.length;
370
377
  target = length > 1 ? arguments[i++] || {} : {};
371
378
  for (; i < length; i++) {
372
379
  if ((options = arguments[i]) != null) {
@@ -385,7 +392,8 @@ var telerikReportViewer = (() => {
385
392
  return target;
386
393
  }
387
394
  function each(obj, callback) {
388
- var length, i = 0;
395
+ var length;
396
+ var i = 0;
389
397
  if (isArray(obj)) {
390
398
  length = obj.length;
391
399
  for (; i < length; i++) {
@@ -538,7 +546,8 @@ var telerikReportViewer = (() => {
538
546
  scaleY = scaleY || 1;
539
547
  originX = originX || 0;
540
548
  originY = originY || 0;
541
- var scale2 = stringFormat("scale({0}, {1})", [scaleX, scaleY]), origin = stringFormat("{0} {1}", [originX, originY]);
549
+ var scale2 = stringFormat("scale({0}, {1})", [scaleX, scaleY]);
550
+ var origin = stringFormat("{0} {1}", [originX, originY]);
542
551
  $(dom).css("transform", scale2).css("transform-origin", origin);
543
552
  }
544
553
 
@@ -713,7 +722,11 @@ var telerikReportViewer = (() => {
713
722
  // src/accessibility.js
714
723
  var defaultOptions = {};
715
724
  function Accessibility(options) {
716
- var controller, pageInitialized = false, areas, lastArea, keyMap = {
725
+ var controller;
726
+ var pageInitialized = false;
727
+ var areas;
728
+ var lastArea;
729
+ var keyMap = {
717
730
  //keys for navigating on areas. Used in conjunction with CTRL+ALT to avoid duplicating default shortcuts behavior.
718
731
  CONFIRM_KEY: 13,
719
732
  CONTENT_AREA_KEY: 67,
@@ -889,8 +902,10 @@ var telerikReportViewer = (() => {
889
902
  var $menuItem = $(this);
890
903
  if (!$menuItem.hasClass("trv-report-pager")) {
891
904
  var ariaLabel = $menuItem.attr("aria-label");
892
- var expandableSr = stringFormat(". {0}", [stringResources.ariaLabelExpandable]), expandable = $menuItem.find("ul").length > 0 && ariaLabel.indexOf(expandableSr) < 0 ? expandableSr : "";
893
- var selectedSr = stringFormat(". {0}", [stringResources.ariaLabelSelected]), selected = $menuItem.hasClass("k-selected") && ariaLabel.indexOf(selectedSr) < 0 ? selectedSr : "";
905
+ var expandableSr = stringFormat(". {0}", [stringResources.ariaLabelExpandable]);
906
+ var expandable = $menuItem.find("ul").length > 0 && ariaLabel.indexOf(expandableSr) < 0 ? expandableSr : "";
907
+ var selectedSr = stringFormat(". {0}", [stringResources.ariaLabelSelected]);
908
+ var selected = $menuItem.hasClass("k-selected") && ariaLabel.indexOf(selectedSr) < 0 ? selectedSr : "";
894
909
  var label = ariaLabel + expandable + selected;
895
910
  $menuItem.attr("aria-label", label);
896
911
  if ($menuItem.hasClass("k-disabled")) {
@@ -925,9 +940,10 @@ var telerikReportViewer = (() => {
925
940
  bind: function($element) {
926
941
  var args = Array.prototype.slice.call(arguments, 1);
927
942
  attachCommands($element, args);
928
- var result = selector('[data-role^="telerik_ReportViewer_"]');
943
+ var result = $element.find('[data-role^="telerik_ReportViewer_"]');
929
944
  each(result, function() {
930
- var $this = $(this), f = $.fn[$this.attr("data-role")];
945
+ var $this = $(this);
946
+ var f = $.fn[$this.attr("data-role")];
931
947
  if (typeof f === "function") {
932
948
  f.apply($this, args);
933
949
  }
@@ -935,7 +951,10 @@ var telerikReportViewer = (() => {
935
951
  }
936
952
  };
937
953
  function attachCommands($element, args) {
938
- var commands = args[0].commands, viewerOptions = args[1], elementSelector = '[data-command^="telerik_ReportViewer_"]', customElementSelector = "[data-target-report-viewer]" + elementSelector;
954
+ var commands = args[0].commands;
955
+ var viewerOptions = args[1];
956
+ var elementSelector = '[data-command^="telerik_ReportViewer_"]';
957
+ var customElementSelector = "[data-target-report-viewer]" + elementSelector;
939
958
  $element.on("click", elementSelector, commandHandler);
940
959
  if (!GlobalSettings.CommandHandlerAttached) {
941
960
  $(document.body).on("click", customElementSelector, customCommandHandler);
@@ -947,7 +966,8 @@ var telerikReportViewer = (() => {
947
966
  function commandHandler(e) {
948
967
  var prefixedDataCommand = $(this).attr("data-command");
949
968
  if (prefixedDataCommand) {
950
- var dataCommand = prefixedDataCommand.substring("telerik_ReportViewer_".length), cmd = commands[dataCommand];
969
+ var dataCommand = prefixedDataCommand.substring("telerik_ReportViewer_".length);
970
+ var cmd = commands[dataCommand];
951
971
  if (cmd && cmd.enabled()) {
952
972
  cmd.exec($(this).attr("data-command-parameter"));
953
973
  }
@@ -955,9 +975,13 @@ var telerikReportViewer = (() => {
955
975
  }
956
976
  }
957
977
  function customCommandHandler(e) {
958
- var $this = $(this), prefixedDataCommand = $this.attr("data-command"), reportViewerTarget = $this.attr("data-target-report-viewer");
978
+ var $this = $(this);
979
+ var prefixedDataCommand = $this.attr("data-command");
980
+ var reportViewerTarget = $this.attr("data-target-report-viewer");
959
981
  if (prefixedDataCommand && reportViewerTarget) {
960
- var dataCommand = prefixedDataCommand.substring("telerik_ReportViewer_".length), reportViewer = $(reportViewerTarget).data("telerik_ReportViewer"), cmd = reportViewer.commands[dataCommand];
982
+ var dataCommand = prefixedDataCommand.substring("telerik_ReportViewer_".length);
983
+ var reportViewer = $(reportViewerTarget).data("telerik_ReportViewer");
984
+ var cmd = reportViewer.commands[dataCommand];
961
985
  if (cmd.enabled()) {
962
986
  cmd.exec($(this).attr("data-command-parameter"));
963
987
  }
@@ -967,7 +991,10 @@ var telerikReportViewer = (() => {
967
991
  }
968
992
  function attachCommand(dataCommand, cmd, viewerOptions, $element) {
969
993
  if (cmd) {
970
- var elementSelector = '[data-command="telerik_ReportViewer_' + dataCommand + '"]', customElementSelector = '[data-target-report-viewer="' + viewerOptions.selector + '"]' + elementSelector, $defaultElement = $element.find(elementSelector), $customElement = $(customElementSelector);
994
+ var elementSelector = '[data-command="telerik_ReportViewer_' + dataCommand + '"]';
995
+ var customElementSelector = '[data-target-report-viewer="' + viewerOptions.selector + '"]' + elementSelector;
996
+ var $defaultElement = $element.find(elementSelector);
997
+ var $customElement = $(customElementSelector);
971
998
  $(cmd).on("enabledChanged", function(e) {
972
999
  (cmd.enabled() ? $.fn.removeClass : $.fn.addClass).call($defaultElement.parent("li"), "k-disabled");
973
1000
  (cmd.enabled() ? $.fn.removeClass : $.fn.addClass).call($customElement, viewerOptions.disabledButtonClass);
@@ -982,7 +1009,9 @@ var telerikReportViewer = (() => {
982
1009
  return $element.hasClass("trv-menu-toggleable") ? "k-selected !k-bg-primary" : "k-selected";
983
1010
  }
984
1011
  function LinkButton(dom, options) {
985
- var cmd, $element = $(dom), dataCommand = $element.attr("data-command");
1012
+ var cmd;
1013
+ var $element = $(dom);
1014
+ var dataCommand = $element.attr("data-command");
986
1015
  if (dataCommand) {
987
1016
  cmd = options.commands[dataCommand];
988
1017
  }
@@ -1010,7 +1039,9 @@ var telerikReportViewer = (() => {
1010
1039
  });
1011
1040
  };
1012
1041
  function PageNumberInput(dom, options) {
1013
- var $element = $(dom), oldValue = 0, cmd = options.commands["goToPage"];
1042
+ var $element = $(dom);
1043
+ var oldValue = 0;
1044
+ var cmd = options.commands["goToPage"];
1014
1045
  function setPageNumber(value) {
1015
1046
  if (oldValue !== value || !$element.is(":focus")) {
1016
1047
  $element.val(value);
@@ -1248,7 +1279,8 @@ var telerikReportViewer = (() => {
1248
1279
  controller.scale(args);
1249
1280
  }
1250
1281
  function getZoomScale(scale2, steps) {
1251
- var pos = -1, length = scaleValues.length;
1282
+ var pos = -1;
1283
+ var length = scaleValues.length;
1252
1284
  for (var i = 0; i < length; i++) {
1253
1285
  var value = scaleValues[i];
1254
1286
  if (scale2 < value) {
@@ -1630,7 +1662,28 @@ var telerikReportViewer = (() => {
1630
1662
  documentInfoPollIntervalMs: 2e3
1631
1663
  };
1632
1664
  function ReportViewerController(options) {
1633
- var controller = {}, clientId, reportInstanceId, reportDocumentId, registerClientPromise, registerInstancePromise, documentFormatsPromise, report, parameterValues, processedParameterValues, currentPageNumber, pageCount, viewMode = ViewModes.INTERACTIVE, pageMode = PageModes.CONTINUOUS_SCROLL, loader, printMode = PrintModes.AUTO_SELECT, bookmarkNodes, renderingExtensions, clientHasExpired = false, parameterValidators = ParameterValidators, events = new Events3(), keepClientAliveSentinel;
1665
+ var controller = {};
1666
+ var clientId;
1667
+ var reportInstanceId;
1668
+ var reportDocumentId;
1669
+ var registerClientPromise;
1670
+ var registerInstancePromise;
1671
+ var documentFormatsPromise;
1672
+ var report;
1673
+ var parameterValues;
1674
+ var processedParameterValues;
1675
+ var currentPageNumber;
1676
+ var pageCount;
1677
+ var viewMode = ViewModes.INTERACTIVE;
1678
+ var pageMode = PageModes.CONTINUOUS_SCROLL;
1679
+ var loader;
1680
+ var printMode = PrintModes.AUTO_SELECT;
1681
+ var bookmarkNodes;
1682
+ var renderingExtensions;
1683
+ var clientHasExpired = false;
1684
+ var parameterValidators = ParameterValidators;
1685
+ var events = new Events3();
1686
+ var keepClientAliveSentinel;
1634
1687
  clearReportState();
1635
1688
  options = extend({}, defaultOptions2, options);
1636
1689
  if (options.settings.printMode) {
@@ -2004,7 +2057,8 @@ var telerikReportViewer = (() => {
2004
2057
  throwIfNoReport();
2005
2058
  var deviceInfo = {
2006
2059
  ImmediatePrint: true
2007
- }, printStartArgs = {
2060
+ };
2061
+ var printStartArgs = {
2008
2062
  deviceInfo,
2009
2063
  handled: false
2010
2064
  };
@@ -2015,10 +2069,13 @@ var telerikReportViewer = (() => {
2015
2069
  inProgress: true
2016
2070
  });
2017
2071
  showNotification({ stringResources: "preparingPrint" });
2018
- var canUsePlugin = getCanUsePlugin(), contentDisposition = canUsePlugin ? "inline" : "attachment", queryString = "response-content-disposition=" + contentDisposition;
2072
+ var canUsePlugin = getCanUsePlugin();
2073
+ var contentDisposition = canUsePlugin ? "inline" : "attachment";
2074
+ var queryString = "response-content-disposition=" + contentDisposition;
2019
2075
  exportAsync("PDF", deviceInfo).then(
2020
2076
  function(info) {
2021
- var url = client.formatDocumentUrl(info.clientId, info.instanceId, info.documentId, queryString), printEndArgs = {
2077
+ var url = client.formatDocumentUrl(info.clientId, info.instanceId, info.documentId, queryString);
2078
+ var printEndArgs = {
2022
2079
  url,
2023
2080
  handled: false
2024
2081
  };
@@ -2067,7 +2124,8 @@ var telerikReportViewer = (() => {
2067
2124
  showNotification({ stringResources: "preparingDownload" });
2068
2125
  exportAsync(format, exportStartArgs.deviceInfo).then(
2069
2126
  function(info) {
2070
- var url = client.formatDocumentUrl(info.clientId, info.instanceId, info.documentId, queryString), exportEndArgs = {
2127
+ var url = client.formatDocumentUrl(info.clientId, info.instanceId, info.documentId, queryString);
2128
+ var exportEndArgs = {
2071
2129
  url,
2072
2130
  format,
2073
2131
  handled: false,
@@ -2297,7 +2355,8 @@ var telerikReportViewer = (() => {
2297
2355
  window.open(args.Url, args.Target);
2298
2356
  },
2299
2357
  "navigateToBookmark": function(action) {
2300
- var id = action.Value, page = getPageForBookmark(bookmarkNodes, id);
2358
+ var id = action.Value;
2359
+ var page = getPageForBookmark(bookmarkNodes, id);
2301
2360
  controller.navigateToPage(page, {
2302
2361
  type: "bookmark",
2303
2362
  id
@@ -2846,7 +2905,8 @@ var telerikReportViewer = (() => {
2846
2905
  if (!serviceClient) {
2847
2906
  throw stringResources.noServiceClient;
2848
2907
  }
2849
- var interval, pingMilliseconds;
2908
+ var interval;
2909
+ var pingMilliseconds;
2850
2910
  if (!isNumber(sessionTimeoutSeconds)) {
2851
2911
  throw "sessionTimeoutSeconds must a number and must be finite";
2852
2912
  }
@@ -2909,7 +2969,8 @@ var telerikReportViewer = (() => {
2909
2969
  if (!controller) {
2910
2970
  throw "No controller (telerikReporting.reportViewerController) has been specified.";
2911
2971
  }
2912
- var settings = options.settings, history = settings.history() || { records: [], position: -1 };
2972
+ var settings = options.settings;
2973
+ var history = settings.history() || { records: [], position: -1 };
2913
2974
  controller.onLoadedReportChange(function() {
2914
2975
  clientHasExpired = false;
2915
2976
  addToHistory(true);
@@ -2932,7 +2993,8 @@ var telerikReportViewer = (() => {
2932
2993
  return null;
2933
2994
  }
2934
2995
  function pushRecord(rec) {
2935
- var records = history.records, position = history.position;
2996
+ var records = history.records;
2997
+ var position = history.position;
2936
2998
  records = Array.prototype.slice.call(records, 0, position + 1);
2937
2999
  records.push(rec);
2938
3000
  history.records = records;
@@ -2971,11 +3033,15 @@ var telerikReportViewer = (() => {
2971
3033
  controller.navigateToPage(currentRecord.pageNumber);
2972
3034
  }
2973
3035
  function canMove(step) {
2974
- var position = history.position, length = history.records.length, newPos = position + step;
3036
+ var position = history.position;
3037
+ var length = history.records.length;
3038
+ var newPos = position + step;
2975
3039
  return 0 <= newPos && newPos < length;
2976
3040
  }
2977
3041
  function move(step) {
2978
- var position = history.position, length = history.records.length, newPos = position + step;
3042
+ var position = history.position;
3043
+ var length = history.records.length;
3044
+ var newPos = position + step;
2979
3045
  if (newPos < 0) {
2980
3046
  newPos = 0;
2981
3047
  } else if (newPos >= length) {
@@ -3026,7 +3092,8 @@ var telerikReportViewer = (() => {
3026
3092
 
3027
3093
  // src/touch.js
3028
3094
  function TouchBehavior(dom, options) {
3029
- var startDistance, ignoreTouch;
3095
+ var startDistance;
3096
+ var ignoreTouch;
3030
3097
  init2(dom);
3031
3098
  function init2(element) {
3032
3099
  if (typeof $.fn.kendoTouch === "function") {
@@ -3209,7 +3276,9 @@ var telerikReportViewer = (() => {
3209
3276
  * page - the page object
3210
3277
  */
3211
3278
  renderPage: function renderPage(page) {
3212
- var that = this, pageViewMode = that.controller.getViewMode(), renderedPage = that.$placeholder.find('[data-page="' + page.pageNumber + '"]');
3279
+ var that = this;
3280
+ var pageViewMode = that.controller.getViewMode();
3281
+ var renderedPage = that.$placeholder.find('[data-page="' + page.pageNumber + '"]');
3213
3282
  if (!that.enabled) {
3214
3283
  that.enabled = true;
3215
3284
  that.$placeholder.addClass("scrollable");
@@ -3268,7 +3337,9 @@ var telerikReportViewer = (() => {
3268
3337
  that._loadNextPreviousPage(pageNumber);
3269
3338
  },
3270
3339
  _updatePageArea: function _updatePageArea(page) {
3271
- var that = this, scrollTo = 0, pageNumber = page.pageNumber;
3340
+ var that = this;
3341
+ var scrollTo = 0;
3342
+ var pageNumber = page.pageNumber;
3272
3343
  that.scrollInProgress = true;
3273
3344
  if (pageNumber > 1) {
3274
3345
  that._generateSkeletonScreens(pageNumber);
@@ -3285,7 +3356,10 @@ var telerikReportViewer = (() => {
3285
3356
  _navigateToPage: function _navigateToPage(page, renderedPage) {
3286
3357
  var that = this;
3287
3358
  that.scrollInProgress = true;
3288
- var scrollTo = renderedPage.position().top, pages = that.$placeholder.find(".trv-report-page"), pageNumber = page.pageNumber, pageHeight = $(pages[0]).height();
3359
+ var scrollTo = renderedPage.position().top;
3360
+ var pages = that.$placeholder.find(".trv-report-page");
3361
+ var pageNumber = page.pageNumber;
3362
+ var pageHeight = $(pages[0]).height();
3289
3363
  if (that._isSkeletonScreen(renderedPage, pageNumber)) {
3290
3364
  that.controller.getPageData(pageNumber).then(function(newPage) {
3291
3365
  that._render(newPage, false);
@@ -3308,7 +3382,10 @@ var telerikReportViewer = (() => {
3308
3382
  },
3309
3383
  _updatePageContent: function _updatePageContent(page, renderedPage) {
3310
3384
  this._updatePageStyle(page);
3311
- var pageNumber = page.pageNumber, wrapper = $($.parseHTML(page.pageContent)), $pageContent = wrapper.find("div.sheet"), $page = this.$placeholder.find('[data-page="' + pageNumber + '"]');
3385
+ var pageNumber = page.pageNumber;
3386
+ var wrapper = $($.parseHTML(page.pageContent));
3387
+ var $pageContent = wrapper.find("div.sheet");
3388
+ var $page = this.$placeholder.find('[data-page="' + pageNumber + '"]');
3312
3389
  $pageContent.css("margin", 0);
3313
3390
  $page.append($pageContent).append($('<div class="trv-page-overlay"></div>'));
3314
3391
  renderedPage.replaceWith($page);
@@ -3324,7 +3401,12 @@ var telerikReportViewer = (() => {
3324
3401
  return page.hasClass("trv-skeleton-" + pageNumber);
3325
3402
  },
3326
3403
  _addSkeletonScreen: function _addSkeletonScreen(pageNumber, position) {
3327
- var that = this, pageStyleNumber = position ? parseInt(pageNumber + 1) : parseInt(pageNumber - 1), pageStyleBaseDom = that.$placeholder.find('[data-page="' + pageStyleNumber + '"]'), pageStyle = pageStyleBaseDom.attr("style"), contentStyle = pageStyleBaseDom.find("sheet").attr("style"), skeletonEl = stringFormat(that.skeletonTemplate, [pageNumber, pageStyle, contentStyle]);
3404
+ var that = this;
3405
+ var pageStyleNumber = position ? parseInt(pageNumber + 1) : parseInt(pageNumber - 1);
3406
+ var pageStyleBaseDom = that.$placeholder.find('[data-page="' + pageStyleNumber + '"]');
3407
+ var pageStyle = pageStyleBaseDom.attr("style");
3408
+ var contentStyle = pageStyleBaseDom.find("sheet").attr("style");
3409
+ var skeletonEl = stringFormat(that.skeletonTemplate, [pageNumber, pageStyle, contentStyle]);
3328
3410
  if (position) {
3329
3411
  that.$pageWrapper.prepend(skeletonEl);
3330
3412
  } else {
@@ -3332,18 +3414,27 @@ var telerikReportViewer = (() => {
3332
3414
  }
3333
3415
  },
3334
3416
  _generateSkeletonScreens: function _generateSkeletonScreens(upToPageNumber) {
3335
- var that = this, skeletonEl = "", pageStyleBaseDom = this.$placeholder.find('[data-page="1"]'), pageStyle = pageStyleBaseDom.attr("style"), contentStyle = pageStyleBaseDom.find("sheet").attr("style"), lastPage = that.$placeholder.find(".trv-report-page").last().attr("data-page"), index = lastPage ? parseInt(lastPage) + 1 : 1;
3417
+ var that = this;
3418
+ var skeletonEl = "";
3419
+ var pageStyleBaseDom = this.$placeholder.find('[data-page="1"]');
3420
+ var pageStyle = pageStyleBaseDom.attr("style");
3421
+ var contentStyle = pageStyleBaseDom.find("sheet").attr("style");
3422
+ var lastPage = that.$placeholder.find(".trv-report-page").last().attr("data-page");
3423
+ var index = lastPage ? parseInt(lastPage) + 1 : 1;
3336
3424
  for (index; index < upToPageNumber; index++) {
3337
3425
  skeletonEl = skeletonEl + stringFormat(that.skeletonTemplate, [index, pageStyle, contentStyle]);
3338
3426
  }
3339
3427
  that.$pageWrapper.append($(skeletonEl));
3340
3428
  },
3341
3429
  _loadMorePages: function _loadMorePages() {
3342
- var that = this, pageCount = that.controller.getPageCount(), isViewPortBiggerThanPageHeight = that.$pageContainer.innerHeight() > that.$pageWrapper.innerHeight();
3430
+ var that = this;
3431
+ var pageCount = that.controller.getPageCount();
3432
+ var isViewPortBiggerThanPageHeight = that.$pageContainer.innerHeight() > that.$pageWrapper.innerHeight();
3343
3433
  if (pageCount > 1) {
3344
3434
  if (isViewPortBiggerThanPageHeight) {
3345
3435
  that.scrollInProgress = true;
3346
- var lastPage = parseInt(that.$placeholder.find(".trv-report-page").last().attr("data-page")), nextPage = lastPage + 1;
3436
+ var lastPage = parseInt(that.$placeholder.find(".trv-report-page").last().attr("data-page"));
3437
+ var nextPage = lastPage + 1;
3347
3438
  if (nextPage <= pageCount) {
3348
3439
  that.controller.getPageData(nextPage).then(function(newPage) {
3349
3440
  that._render(newPage, false);
@@ -3358,9 +3449,11 @@ var telerikReportViewer = (() => {
3358
3449
  }
3359
3450
  },
3360
3451
  _loadVisiblePages: function _loadVisiblePages() {
3361
- var that = this, pages = that.$placeholder.find(".trv-report-page");
3452
+ var that = this;
3453
+ var pages = that.$placeholder.find(".trv-report-page");
3362
3454
  $.each(pages, function(index, value) {
3363
- var pageItem = $(value), pageNumber = parseInt(pageItem.attr("data-page"));
3455
+ var pageItem = $(value);
3456
+ var pageNumber = parseInt(pageItem.attr("data-page"));
3364
3457
  if (that._scrolledInToView(pageItem) && that._isSkeletonScreen(pageItem, pageNumber)) {
3365
3458
  that.controller.getPageData(pageNumber).then(function(newPage) {
3366
3459
  that._render(newPage, false);
@@ -3369,17 +3462,29 @@ var telerikReportViewer = (() => {
3369
3462
  });
3370
3463
  },
3371
3464
  _scrolledInToView: function _scrolledInToView(elem) {
3372
- var pageCoords = elem[0].getBoundingClientRect(), parentCoords = elem.closest(".trv-pages-area")[0].getBoundingClientRect(), parentTop = parentCoords.top, parentBottom = parentCoords.top + parentCoords.height, pageTop = pageCoords.top, pageBottom = pageTop + elem.outerHeight(true), additionalTopOffset = this.additionalTopOffset + parentTop, topVisible = pageTop > 0 && pageTop < parentBottom, bottomVisible = pageBottom < parentBottom && pageBottom > additionalTopOffset;
3465
+ var pageCoords = elem[0].getBoundingClientRect();
3466
+ var parentCoords = elem.closest(".trv-pages-area")[0].getBoundingClientRect();
3467
+ var parentTop = parentCoords.top;
3468
+ var parentBottom = parentCoords.top + parentCoords.height;
3469
+ var pageTop = pageCoords.top;
3470
+ var pageBottom = pageTop + elem.outerHeight(true);
3471
+ var additionalTopOffset = this.additionalTopOffset + parentTop;
3472
+ var topVisible = pageTop > 0 && pageTop < parentBottom;
3473
+ var bottomVisible = pageBottom < parentBottom && pageBottom > additionalTopOffset;
3373
3474
  return topVisible || bottomVisible;
3374
3475
  },
3375
3476
  _render: function _render(page, empty) {
3376
- var that = this, pageNumber = page.pageNumber, pageItem = that.$placeholder.find('[data-page="' + pageNumber + '"]');
3477
+ var that = this;
3478
+ var pageNumber = page.pageNumber;
3479
+ var pageItem = that.$placeholder.find('[data-page="' + pageNumber + '"]');
3377
3480
  if (!empty && pageItem && pageItem.length && !that._isSkeletonScreen(pageItem, pageNumber)) {
3378
3481
  return;
3379
3482
  }
3380
3483
  that.loadedPage[pageNumber] = page;
3381
3484
  that._updatePageStyle(page);
3382
- var wrapper = $($.parseHTML(page.pageContent)), $pageContent = wrapper.find("div.sheet"), $page = $('<div class="trv-report-page" data-page="' + pageNumber + '"></div>');
3485
+ var wrapper = $($.parseHTML(page.pageContent));
3486
+ var $pageContent = wrapper.find("div.sheet");
3487
+ var $page = $('<div class="trv-report-page" data-page="' + pageNumber + '"></div>');
3383
3488
  $pageContent.css("margin", 0);
3384
3489
  $page.append($pageContent).append($('<div class="trv-page-overlay"></div>'));
3385
3490
  if (empty) {
@@ -3395,14 +3500,18 @@ var telerikReportViewer = (() => {
3395
3500
  that.controller.scrollPageReady({ page, target: $page });
3396
3501
  },
3397
3502
  _updatePageStyle: function _updatePageStyle(page) {
3398
- var that = this, lastLoadedPage = that.loadedPage[that._lastLoadedPage()] || page, styleId = "trv-" + that.controller.clientId() + "-styles", pageStyles;
3503
+ var that = this;
3504
+ var lastLoadedPage = that.loadedPage[that._lastLoadedPage()] || page;
3505
+ var styleId = "trv-" + that.controller.clientId() + "-styles";
3506
+ var pageStyles;
3399
3507
  $("#" + styleId).remove();
3400
3508
  pageStyles = $("<style id=" + styleId + "></style>");
3401
3509
  pageStyles.append(lastLoadedPage.pageStyles);
3402
3510
  pageStyles.appendTo("head");
3403
3511
  },
3404
3512
  _lastLoadedPage: function _lastLoadedPage() {
3405
- var that = this, lastKey;
3513
+ var that = this;
3514
+ var lastKey;
3406
3515
  for (var key in that.loadedPage) {
3407
3516
  if (that.loadedPage.hasOwnProperty(key)) {
3408
3517
  lastKey = key;
@@ -3411,7 +3520,11 @@ var telerikReportViewer = (() => {
3411
3520
  return lastKey;
3412
3521
  },
3413
3522
  _loadNextPreviousPage: function _loadNextPreviousPage(pageNumber) {
3414
- var that = this, nextPage, previousPage, nextItem, previousItem;
3523
+ var that = this;
3524
+ var nextPage;
3525
+ var previousPage;
3526
+ var nextItem;
3527
+ var previousItem;
3415
3528
  if (pageNumber < that.controller.getPageCount()) {
3416
3529
  nextPage = pageNumber + 1;
3417
3530
  nextItem = that.$placeholder.find('[data-page="' + nextPage + '"]');
@@ -3432,7 +3545,9 @@ var telerikReportViewer = (() => {
3432
3545
  }
3433
3546
  },
3434
3547
  _clickPage: function _clickPage(pageDom) {
3435
- var that = this, currentPage = that._currentPageNumber(), pageNumber = parseInt(pageDom.attr("data-page"));
3548
+ var that = this;
3549
+ var currentPage = that._currentPageNumber();
3550
+ var pageNumber = parseInt(pageDom.attr("data-page"));
3436
3551
  if (currentPage !== pageNumber) {
3437
3552
  if (that._isSkeletonScreen(pageDom, pageNumber)) {
3438
3553
  that.controller.getPageData(pageNumber).then(function(newPage) {
@@ -3450,7 +3565,8 @@ var telerikReportViewer = (() => {
3450
3565
  that._clickPage($(e.currentTarget));
3451
3566
  });
3452
3567
  that.$pageContainer.scroll(function() {
3453
- var pages = that.$placeholder.find(".trv-report-page"), scrollPosition = parseInt((that.$pageContainer.scrollTop() + that.$pageContainer.innerHeight()).toFixed(0));
3568
+ var pages = that.$placeholder.find(".trv-report-page");
3569
+ var scrollPosition = parseInt((that.$pageContainer.scrollTop() + that.$pageContainer.innerHeight()).toFixed(0));
3454
3570
  if (!that.scrollInProgress && that.oldScrollTopPosition !== scrollPosition) {
3455
3571
  if (that.oldScrollTopPosition > scrollPosition) {
3456
3572
  that._scrollUp(pages);
@@ -3461,7 +3577,8 @@ var telerikReportViewer = (() => {
3461
3577
  that.oldScrollTopPosition = scrollPosition;
3462
3578
  });
3463
3579
  that.$pageContainer.scroll(function() {
3464
- var pages = that.$placeholder.find(".trv-report-page"), scrollPosition = parseInt((that.$pageContainer.scrollTop() + that.$pageContainer.innerHeight()).toFixed(0));
3580
+ var pages = that.$placeholder.find(".trv-report-page");
3581
+ var scrollPosition = parseInt((that.$pageContainer.scrollTop() + that.$pageContainer.innerHeight()).toFixed(0));
3465
3582
  if (!that.scrollInProgress && pages.length && that.oldScrollTopPosition !== scrollPosition) {
3466
3583
  that._advanceCurrentPage(pages);
3467
3584
  }
@@ -3474,7 +3591,10 @@ var telerikReportViewer = (() => {
3474
3591
  },
3475
3592
  _advanceCurrentPage: function _advanceCurrentPage(pages) {
3476
3593
  var that = this;
3477
- var newCurrentPage = that._findNewCurrentPage(pages), pageNumber, currentPageNumber = that._currentPageNumber(), currentPageIsInToView = that._scrolledInToView(that.$placeholder.find('[data-page="' + currentPageNumber + '"]'));
3594
+ var newCurrentPage = that._findNewCurrentPage(pages);
3595
+ var pageNumber;
3596
+ var currentPageNumber = that._currentPageNumber();
3597
+ var currentPageIsInToView = that._scrolledInToView(that.$placeholder.find('[data-page="' + currentPageNumber + '"]'));
3478
3598
  if (newCurrentPage !== -1) {
3479
3599
  newCurrentPage = $(newCurrentPage);
3480
3600
  pageNumber = parseInt(newCurrentPage.attr("data-page"));
@@ -3494,7 +3614,9 @@ var telerikReportViewer = (() => {
3494
3614
  },
3495
3615
  // Binary search
3496
3616
  _findNewCurrentPage: function _findNewCurrentPage(pages) {
3497
- var that = this, middleIndex = Math.floor(pages.length / 2), result = that._findPageInViewPort(middleIndex, pages);
3617
+ var that = this;
3618
+ var middleIndex = Math.floor(pages.length / 2);
3619
+ var result = that._findPageInViewPort(middleIndex, pages);
3498
3620
  if (pages.length === 1) {
3499
3621
  return pages[0];
3500
3622
  }
@@ -3509,7 +3631,15 @@ var telerikReportViewer = (() => {
3509
3631
  }
3510
3632
  },
3511
3633
  _findPageInViewPort: function _findPageInViewPort(index, pages) {
3512
- var pageItem = this.$placeholder.find(pages[index]), pageCoords = pageItem[0].getBoundingClientRect(), parentCoords = pageItem.closest(".trv-pages-area")[0].getBoundingClientRect(), parentTop = parentCoords.top, parentBottom = parentCoords.top + parentCoords.height, pageTop = pageCoords.top, pageBottom = pageTop + pageItem.outerHeight(true), additionalTopOffset = this.additionalTopOffset + parentTop, isCurentPage = pageTop <= additionalTopOffset && additionalTopOffset < pageBottom;
3634
+ var pageItem = this.$placeholder.find(pages[index]);
3635
+ var pageCoords = pageItem[0].getBoundingClientRect();
3636
+ var parentCoords = pageItem.closest(".trv-pages-area")[0].getBoundingClientRect();
3637
+ var parentTop = parentCoords.top;
3638
+ var parentBottom = parentCoords.top + parentCoords.height;
3639
+ var pageTop = pageCoords.top;
3640
+ var pageBottom = pageTop + pageItem.outerHeight(true);
3641
+ var additionalTopOffset = this.additionalTopOffset + parentTop;
3642
+ var isCurentPage = pageTop <= additionalTopOffset && additionalTopOffset < pageBottom;
3513
3643
  if (isCurentPage) {
3514
3644
  return 0;
3515
3645
  }
@@ -3522,7 +3652,8 @@ var telerikReportViewer = (() => {
3522
3652
  _scrollDown: function _scrollDown(pages, scrollPosition) {
3523
3653
  var that = this;
3524
3654
  if (scrollPosition >= that.pageContainer.scrollHeight - 5) {
3525
- var lastPage = parseInt($(pages[pages.length - 1]).attr("data-page")), nextPage = lastPage + 1;
3655
+ var lastPage = parseInt($(pages[pages.length - 1]).attr("data-page"));
3656
+ var nextPage = lastPage + 1;
3526
3657
  if (that._currentPageNumber() < nextPage && nextPage <= that.controller.getPageCount()) {
3527
3658
  that._addSkeletonScreen(nextPage, false);
3528
3659
  that.controller.getPageData(nextPage).then(function(newPage) {
@@ -3537,7 +3668,9 @@ var telerikReportViewer = (() => {
3537
3668
  _scrollUp: function _scrollUp(pages) {
3538
3669
  var that = this;
3539
3670
  if (that.$pageContainer.scrollTop() === 0) {
3540
- var firstPage = $(pages[0]), pageNumber = parseInt(firstPage.attr("data-page")), previousPage = pageNumber - 1;
3671
+ var firstPage = $(pages[0]);
3672
+ var pageNumber = parseInt(firstPage.attr("data-page"));
3673
+ var previousPage = pageNumber - 1;
3541
3674
  if (that._currentPageNumber() > previousPage && previousPage >= 1) {
3542
3675
  that._addSkeletonScreen(previousPage, true);
3543
3676
  that.controller.getPageData(previousPage).then(function(newPage) {
@@ -3551,7 +3684,12 @@ var telerikReportViewer = (() => {
3551
3684
  }
3552
3685
  },
3553
3686
  _keepCurrentPageInToView: function _keepCurrentPageInToView() {
3554
- var that = this, currentPage = that.$placeholder.find('[data-page="' + that._currentPageNumber() + '"]'), currentPagePosition = currentPage.position().top, currentPageHeight = currentPage.innerHeight(), pageContainerHeight = that.$pageContainer.innerHeight(), emptyView;
3687
+ var that = this;
3688
+ var currentPage = that.$placeholder.find('[data-page="' + that._currentPageNumber() + '"]');
3689
+ var currentPagePosition = currentPage.position().top;
3690
+ var currentPageHeight = currentPage.innerHeight();
3691
+ var pageContainerHeight = that.$pageContainer.innerHeight();
3692
+ var emptyView;
3555
3693
  that.scrollInProgress = true;
3556
3694
  if (currentPageHeight < pageContainerHeight) {
3557
3695
  emptyView = (pageContainerHeight - currentPageHeight) / 2;
@@ -3849,7 +3987,29 @@ var telerikReportViewer = (() => {
3849
3987
  var controller = options.controller;
3850
3988
  if (!controller)
3851
3989
  throw "No controller (telerikReportViewer.reportViewerController) has been specified.";
3852
- var $placeholder = $(placeholder), $pageContainer = $placeholder.find(".trv-page-container"), pageContainer = $pageContainer[0], $pageWrapper = $placeholder.find(".trv-page-wrapper"), pageWrapper = $pageWrapper[0], $errorMessage = $placeholder.find(".trv-error-message"), actions, pendingElement, pageScaleMode = ScaleModes.SPECIFIC, pageScale = 1, minPageScale = 0.1, maxPageScale = 8, documentReady = true, navigateToPageOnDocReady, navigateToElementOnDocReady, isNewReportSource, showErrorTimeoutId, showPageAreaImage = false, reportPageIsLoaded = false, pageAreaImageStyle = '.trv-page-container {background: #ffffff url("{0}") no-repeat center 50px}', pageAreaImageID = "trv-initial-image-styles", scroll = extend({}, Scroll, {}), uiFreezeCoordinator = null;
3990
+ var $placeholder = $(placeholder);
3991
+ var $pageContainer = $placeholder.find(".trv-page-container");
3992
+ var pageContainer = $pageContainer[0];
3993
+ var $pageWrapper = $placeholder.find(".trv-page-wrapper");
3994
+ var pageWrapper = $pageWrapper[0];
3995
+ var $errorMessage = $placeholder.find(".trv-error-message");
3996
+ var actions;
3997
+ var pendingElement;
3998
+ var pageScaleMode = ScaleModes.SPECIFIC;
3999
+ var pageScale = 1;
4000
+ var minPageScale = 0.1;
4001
+ var maxPageScale = 8;
4002
+ var documentReady = true;
4003
+ var navigateToPageOnDocReady;
4004
+ var navigateToElementOnDocReady;
4005
+ var isNewReportSource;
4006
+ var showErrorTimeoutId;
4007
+ var showPageAreaImage = false;
4008
+ var reportPageIsLoaded = false;
4009
+ var pageAreaImageStyle = '.trv-page-container {background: #ffffff url("{0}") no-repeat center 50px}';
4010
+ var pageAreaImageID = "trv-initial-image-styles";
4011
+ var scroll = extend({}, Scroll, {});
4012
+ var uiFreezeCoordinator = null;
3853
4013
  init2();
3854
4014
  if (scroll) {
3855
4015
  scroll.init(placeholder, options);
@@ -4003,7 +4163,8 @@ var telerikReportViewer = (() => {
4003
4163
  }
4004
4164
  });
4005
4165
  function enableTouch(dom) {
4006
- var allowSwipeLeft, allowSwipeRight;
4166
+ var allowSwipeLeft;
4167
+ var allowSwipeRight;
4007
4168
  TouchBehavior(
4008
4169
  dom,
4009
4170
  {
@@ -4125,7 +4286,9 @@ var telerikReportViewer = (() => {
4125
4286
  $nextFocusable.focus();
4126
4287
  }
4127
4288
  }
4128
- var container = $pageContainer[0], offsetTop = 0, offsetLeft = 0;
4289
+ var container = $pageContainer[0];
4290
+ var offsetTop = 0;
4291
+ var offsetLeft = 0;
4129
4292
  while (el && el !== container) {
4130
4293
  if ($(el).is(".trv-page-wrapper")) {
4131
4294
  var scale2 = $(el).data("pageScale");
@@ -4169,7 +4332,8 @@ var telerikReportViewer = (() => {
4169
4332
  (error ? $.fn.addClass : $.fn.removeClass).call($placeholder, "trv-error");
4170
4333
  }
4171
4334
  function pageNo(page, no) {
4172
- var $page = page.$ ? page : $(page), dataKey = "pageNumber";
4335
+ var $page = page.$ ? page : $(page);
4336
+ var dataKey = "pageNumber";
4173
4337
  if (no === void 0) {
4174
4338
  return $page.data(dataKey);
4175
4339
  }
@@ -4182,12 +4346,21 @@ var telerikReportViewer = (() => {
4182
4346
  navigateToPageOnDocReady = null;
4183
4347
  }
4184
4348
  function setPageDimensions(page, scaleMode, scale2, pageNumber) {
4185
- var $target = $(page), $page = pageNumber ? $target : $target.find("div.trv-report-page"), $pageContent = $page.find("div.sheet"), $pageSkeletonContent = $page.find("div.trv-skeleton-wrapper"), pageContent = $pageContent[0] || $pageSkeletonContent[0], pageSkeletonContent = $pageSkeletonContent[0];
4349
+ var $target = $(page);
4350
+ var $page = pageNumber ? $target : $target.find("div.trv-report-page");
4351
+ var $pageContent = $page.find("div.sheet");
4352
+ var $pageSkeletonContent = $page.find("div.trv-skeleton-wrapper");
4353
+ var pageContent = $pageContent[0] || $pageSkeletonContent[0];
4354
+ var pageSkeletonContent = $pageSkeletonContent[0];
4186
4355
  if (!pageContent)
4187
4356
  return;
4188
- var pageWidth, pageHeight, box = $target.data("box");
4357
+ var pageWidth;
4358
+ var pageHeight;
4359
+ var box = $target.data("box");
4189
4360
  if (!box) {
4190
- var margins = getMargins($target), borders = getBorderWidth($page), padding = getPadding($page);
4361
+ var margins = getMargins($target);
4362
+ var borders = getBorderWidth($page);
4363
+ var padding = getPadding($page);
4191
4364
  box = {
4192
4365
  padLeft: margins.left + borders.left + padding.left,
4193
4366
  padRight: margins.right + borders.right + padding.right,
@@ -4205,7 +4378,9 @@ var telerikReportViewer = (() => {
4205
4378
  pageWidth = $target.data("pageWidth");
4206
4379
  pageHeight = $target.data("pageHeight");
4207
4380
  }
4208
- var scrollBarV = pageHeight > pageWidth && scaleMode === ScaleModes.FIT_PAGE_WIDTH ? 20 : 0, scaleW = (pageContainer.clientWidth - scrollBarV - box.padLeft - box.padRight) / pageWidth, scaleH = (pageContainer.clientHeight - 1 - box.padTop - box.padBottom) / pageHeight;
4381
+ var scrollBarV = pageHeight > pageWidth && scaleMode === ScaleModes.FIT_PAGE_WIDTH ? 20 : 0;
4382
+ var scaleW = (pageContainer.clientWidth - scrollBarV - box.padLeft - box.padRight) / pageWidth;
4383
+ var scaleH = (pageContainer.clientHeight - 1 - box.padTop - box.padBottom) / pageHeight;
4209
4384
  if (scaleMode === ScaleModes.FIT_PAGE_WIDTH) {
4210
4385
  scale2 = scaleW;
4211
4386
  } else if (!scale2 || scaleMode === ScaleModes.FIT_PAGE) {
@@ -4240,7 +4415,8 @@ var telerikReportViewer = (() => {
4240
4415
  }
4241
4416
  function onInteractiveItemClick(event) {
4242
4417
  var $eventTarget = $(this);
4243
- var actionId = $eventTarget.attr("data-reporting-action"), action = getAction(actionId);
4418
+ var actionId = $eventTarget.attr("data-reporting-action");
4419
+ var action = getAction(actionId);
4244
4420
  if (action) {
4245
4421
  navigateToPageOnDocReady = getNavigateToPageOnDocReady(event, action.Type);
4246
4422
  controller.executeReportAction({
@@ -4324,10 +4500,16 @@ var telerikReportViewer = (() => {
4324
4500
  var $container = $(toolTipTemplate);
4325
4501
  var $titleSpan = $container.find(".trv-pages-area-kendo-tooltip-title");
4326
4502
  var $textSpan = $container.find(".trv-pages-area-kendo-tooltip-text");
4327
- $titleSpan.text(toolTipArgs.toolTip.title);
4328
- $textSpan.text(toolTipArgs.toolTip.text);
4503
+ $titleSpan.html(replaceNewLineSymbols(toolTipArgs.toolTip.title));
4504
+ $textSpan.html(replaceNewLineSymbols(toolTipArgs.toolTip.text));
4329
4505
  return $container.clone().wrap("<p>").parent().html();
4330
4506
  }
4507
+ function replaceNewLineSymbols(tooltipText) {
4508
+ tooltipText = escapeHtml(tooltipText);
4509
+ tooltipText = tooltipText.replaceAll("\r\n", "<br>");
4510
+ tooltipText = tooltipText.replaceAll("\n", "<br>");
4511
+ return tooltipText;
4512
+ }
4331
4513
  function positionToolTip(toolTip, e) {
4332
4514
  var x = e.pageX;
4333
4515
  var y = e.pageY;
@@ -4370,7 +4552,10 @@ var telerikReportViewer = (() => {
4370
4552
  function setPageContent(page) {
4371
4553
  actions = JSON.parse(page.pageActions);
4372
4554
  updatePageStyle(page);
4373
- var pageNumber = page.pageNumber, wrapper = $($.parseHTML(page.pageContent)), $pageContent = wrapper.find("div.sheet"), $page = $('<div class="trv-report-page" data-page="' + pageNumber + '"></div>');
4555
+ var pageNumber = page.pageNumber;
4556
+ var wrapper = $($.parseHTML(page.pageContent));
4557
+ var $pageContent = wrapper.find("div.sheet");
4558
+ var $page = $('<div class="trv-report-page" data-page="' + pageNumber + '"></div>');
4374
4559
  $pageContent.css("margin", 0);
4375
4560
  $page.append($pageContent).append($('<div class="trv-page-overlay"></div>'));
4376
4561
  var $target = $pageWrapper.empty().removeData().data("pageNumber", pageNumber).append($page);
@@ -4571,7 +4756,12 @@ var telerikReportViewer = (() => {
4571
4756
  containerTabIndex = 300;
4572
4757
  }
4573
4758
  }
4574
- var wrapper = editor.closest(".trv-parameter-value"), selectAll = wrapper.find(".trv-select-all"), clearSelection = wrapper.find(".trv-select-none"), widgetParent = editor.closest(".k-widget"), hasFocusableElement = widgetParent.find(".k-input"), isComboWidget = hasFocusableElement && hasFocusableElement.length;
4759
+ var wrapper = editor.closest(".trv-parameter-value");
4760
+ var selectAll = wrapper.find(".trv-select-all");
4761
+ var clearSelection = wrapper.find(".trv-select-none");
4762
+ var widgetParent = editor.closest(".k-widget");
4763
+ var hasFocusableElement = widgetParent.find(".k-input");
4764
+ var isComboWidget = hasFocusableElement && hasFocusableElement.length;
4575
4765
  if (selectAll && selectAll.length) {
4576
4766
  selectAll.attr("tabindex", containerTabIndex + ++editorsIndex);
4577
4767
  }
@@ -4613,7 +4803,14 @@ var telerikReportViewer = (() => {
4613
4803
  var $placeholder = $(placeholder);
4614
4804
  var enabled = true;
4615
4805
  $placeholder.html(options.templates["trv-parameter-editor-available-values-multiselect"]);
4616
- var $list = $placeholder.find(".trv-list"), $selectAll = $placeholder.find(".trv-select-all"), $selectNone = $placeholder.find(".trv-select-none"), listView, parameter, updateTimeout, valueChangeCallback = options.parameterChanged, initialized;
4806
+ var $list = $placeholder.find(".trv-list");
4807
+ var $selectAll = $placeholder.find(".trv-select-all");
4808
+ var $selectNone = $placeholder.find(".trv-select-none");
4809
+ var listView;
4810
+ var parameter;
4811
+ var updateTimeout;
4812
+ var valueChangeCallback = options.parameterChanged;
4813
+ var initialized;
4617
4814
  $selectAll.text(stringResources[$selectAll.text()]);
4618
4815
  $selectAll.click(function(e) {
4619
4816
  e.preventDefault();
@@ -4645,7 +4842,8 @@ var telerikReportViewer = (() => {
4645
4842
  });
4646
4843
  }
4647
4844
  function notifyParameterChanged(selection) {
4648
- var availableValues = parameter.availableValues, values = $.map(selection, function(item) {
4845
+ var availableValues = parameter.availableValues;
4846
+ var values = $.map(selection, function(item) {
4649
4847
  return availableValues[$(item).index()].value;
4650
4848
  });
4651
4849
  clearPendingChange();
@@ -4778,7 +4976,18 @@ var telerikReportViewer = (() => {
4778
4976
  {
4779
4977
  match: parameterEditorsMatch.MultiSelectCombo,
4780
4978
  createEditor: function(placeholder, options) {
4781
- var $placeholder = $(placeholder), enabled = true, selector2 = ".trv-combo", template = "trv-parameter-editor-available-values-multiselect-combo", valueChangeCallback = options.parameterChanged, $editorDom, $selectNone, $selectAll, editor, updateTimeout, popUpIsClosed = true, parameter;
4979
+ var $placeholder = $(placeholder);
4980
+ var enabled = true;
4981
+ var selector2 = ".trv-combo";
4982
+ var template = "trv-parameter-editor-available-values-multiselect-combo";
4983
+ var valueChangeCallback = options.parameterChanged;
4984
+ var $editorDom;
4985
+ var $selectNone;
4986
+ var $selectAll;
4987
+ var editor;
4988
+ var updateTimeout;
4989
+ var popUpIsClosed = true;
4990
+ var parameter;
4782
4991
  $placeholder.html(options.templates[template]);
4783
4992
  $editorDom = $placeholder.find(selector2);
4784
4993
  $selectNone = $placeholder.find(".trv-select-none");
@@ -4900,7 +5109,11 @@ var telerikReportViewer = (() => {
4900
5109
  var $placeholder = $(placeholder);
4901
5110
  var enabled = true;
4902
5111
  $placeholder.html(options.templates["trv-parameter-editor-available-values"]);
4903
- var $list = $placeholder.find(".trv-list"), $selectNone = $placeholder.find(".trv-select-none"), listView, parameter, valueChangeCallback = options.parameterChanged;
5112
+ var $list = $placeholder.find(".trv-list");
5113
+ var $selectNone = $placeholder.find(".trv-select-none");
5114
+ var listView;
5115
+ var parameter;
5116
+ var valueChangeCallback = options.parameterChanged;
4904
5117
  if ($selectNone) {
4905
5118
  $selectNone.text(stringResources[$selectNone.text()]);
4906
5119
  $selectNone.click(function(e) {
@@ -4913,7 +5126,8 @@ var telerikReportViewer = (() => {
4913
5126
  notifyParameterChanged(selection);
4914
5127
  }
4915
5128
  function notifyParameterChanged(selection) {
4916
- var availableValues = parameter.availableValues, values = $.map(selection, function(item) {
5129
+ var availableValues = parameter.availableValues;
5130
+ var values = $.map(selection, function(item) {
4917
5131
  return availableValues[$(item).index()].value;
4918
5132
  });
4919
5133
  if (Array.isArray(values)) {
@@ -4999,7 +5213,15 @@ var telerikReportViewer = (() => {
4999
5213
  {
5000
5214
  match: parameterEditorsMatch.SingleSelectCombo,
5001
5215
  createEditor: function(placeholder, options) {
5002
- var $placeholder = $(placeholder), enabled = true, selector2 = ".trv-combo", template = "trv-parameter-editor-available-values-combo", valueChangeCallback = options.parameterChanged, $editorDom, $selectNone, editor, parameter;
5216
+ var $placeholder = $(placeholder);
5217
+ var enabled = true;
5218
+ var selector2 = ".trv-combo";
5219
+ var template = "trv-parameter-editor-available-values-combo";
5220
+ var valueChangeCallback = options.parameterChanged;
5221
+ var $editorDom;
5222
+ var $selectNone;
5223
+ var editor;
5224
+ var parameter;
5003
5225
  $placeholder.html(options.templates[template]);
5004
5226
  $editorDom = $placeholder.find(selector2);
5005
5227
  $selectNone = $placeholder.find(".trv-select-none");
@@ -5015,7 +5237,8 @@ var telerikReportViewer = (() => {
5015
5237
  notifyParameterChanged(selection, value);
5016
5238
  }
5017
5239
  function notifyParameterChanged(selection, value) {
5018
- var values = value || "", availableValues;
5240
+ var values = value || "";
5241
+ var availableValues;
5019
5242
  if (!value && selection >= 0) {
5020
5243
  availableValues = parameter.availableValues;
5021
5244
  values = availableValues[selection].value;
@@ -5083,7 +5306,8 @@ var telerikReportViewer = (() => {
5083
5306
  {
5084
5307
  match: parameterEditorsMatch.MultiValue,
5085
5308
  createEditor: function(placeholder, options) {
5086
- var $placeholder = $(placeholder), parameter;
5309
+ var $placeholder = $(placeholder);
5310
+ var parameter;
5087
5311
  $placeholder.html(options.templates["trv-parameter-editor-multivalue"]);
5088
5312
  var $textArea = $placeholder.find("textarea").on("change", function() {
5089
5313
  if (options.parameterChanged) {
@@ -5116,7 +5340,8 @@ var telerikReportViewer = (() => {
5116
5340
  {
5117
5341
  match: parameterEditorsMatch.DateTime,
5118
5342
  createEditor: function(placeholder, options) {
5119
- var $placeholder = $(placeholder), parameter;
5343
+ var $placeholder = $(placeholder);
5344
+ var parameter;
5120
5345
  $placeholder.html(options.templates["trv-parameter-editor-datetime"]);
5121
5346
  try {
5122
5347
  var $dateTimePicker = $placeholder.find("input[type=datetime]").kendoDatePicker({
@@ -5174,7 +5399,8 @@ var telerikReportViewer = (() => {
5174
5399
  {
5175
5400
  match: parameterEditorsMatch.String,
5176
5401
  createEditor: function(placeholder, options) {
5177
- var $placeholder = $(placeholder), parameter;
5402
+ var $placeholder = $(placeholder);
5403
+ var parameter;
5178
5404
  $placeholder.html(options.templates["trv-parameter-editor-text"]);
5179
5405
  var $input = $placeholder.find('input[type="text"]').change(function() {
5180
5406
  if (options.parameterChanged) {
@@ -5208,7 +5434,9 @@ var telerikReportViewer = (() => {
5208
5434
  {
5209
5435
  match: parameterEditorsMatch.Number,
5210
5436
  createEditor: function(placeholder, options) {
5211
- var $placeholder = $(placeholder), parameter, inputBehavior;
5437
+ var $placeholder = $(placeholder);
5438
+ var parameter;
5439
+ var inputBehavior;
5212
5440
  $placeholder.html(options.templates["trv-parameter-editor-number"]);
5213
5441
  var $input = $placeholder.find("input[type=number]").on("change", function() {
5214
5442
  if (options.parameterChanged) {
@@ -5250,7 +5478,8 @@ var telerikReportViewer = (() => {
5250
5478
  {
5251
5479
  match: parameterEditorsMatch.Boolean,
5252
5480
  createEditor: function(placeholder, options) {
5253
- var $placeholder = $(placeholder), parameter;
5481
+ var $placeholder = $(placeholder);
5482
+ var parameter;
5254
5483
  $placeholder.html(options.templates["trv-parameter-editor-boolean"]);
5255
5484
  var $input = $placeholder.find("input[type=checkbox]").on("change", function() {
5256
5485
  if (options.parameterChanged) {
@@ -5299,7 +5528,8 @@ var telerikReportViewer = (() => {
5299
5528
 
5300
5529
  // src/perspectives.js
5301
5530
  function PerspectiveManager(dom, controller) {
5302
- var smallMenu = dom.querySelectorAll ? dom.querySelectorAll(".trv-menu-small")[0] : false, perspectives = {
5531
+ var smallMenu = dom.querySelectorAll ? dom.querySelectorAll(".trv-menu-small")[0] : false;
5532
+ var perspectives = {
5303
5533
  "small": {
5304
5534
  documentMapVisible: false,
5305
5535
  parametersAreaVisible: false,
@@ -5326,7 +5556,8 @@ var telerikReportViewer = (() => {
5326
5556
  documentMapVisible: true,
5327
5557
  parametersAreaVisible: true
5328
5558
  }
5329
- }, currentPerspective;
5559
+ };
5560
+ var currentPerspective;
5330
5561
  function init2() {
5331
5562
  currentPerspective = getPerspective();
5332
5563
  initStateFromController(perspectives["large"]);
@@ -5388,7 +5619,8 @@ var telerikReportViewer = (() => {
5388
5619
  window.removeEventListener("resize", onWindowResize);
5389
5620
  }
5390
5621
  function getPerspective() {
5391
- var windowWidthInEm = $(window).width() / parseFloat($("body").css("font-size")), windowMinWidth = 40.5;
5622
+ var windowWidthInEm = $(window).width() / parseFloat($("body").css("font-size"));
5623
+ var windowMinWidth = 40.5;
5392
5624
  return smallMenu && windowWidthInEm <= windowMinWidth ? "small" : "large";
5393
5625
  }
5394
5626
  function initStateFromController(state) {
@@ -5437,7 +5669,8 @@ var telerikReportViewer = (() => {
5437
5669
  var defaultOptions4 = {};
5438
5670
  function ServiceClient(options) {
5439
5671
  options = extend({}, defaultOptions4, options);
5440
- var baseUrl = rtrim(options.serviceUrl || options.baseUrl, "\\/"), loginPromise;
5672
+ var baseUrl = rtrim(options.serviceUrl || options.baseUrl, "\\/");
5673
+ var loginPromise;
5441
5674
  var _ajax = $ajax;
5442
5675
  function validateClientID(clientID) {
5443
5676
  if (!clientID)
@@ -5843,7 +6076,11 @@ var telerikReportViewer = (() => {
5843
6076
  state &= ~flags;
5844
6077
  }
5845
6078
  }
5846
- var controller = options.controller, historyManager = options.history, state = 0, refreshUI, commands = options.commands;
6079
+ var controller = options.controller;
6080
+ var historyManager = options.history;
6081
+ var state = 0;
6082
+ var refreshUI;
6083
+ var commands = options.commands;
5847
6084
  if (!controller) {
5848
6085
  throw "No controller (telerikReporting.ReportViewerController) has been specified.";
5849
6086
  }
@@ -5973,7 +6210,8 @@ var telerikReportViewer = (() => {
5973
6210
  if (!controller) {
5974
6211
  throw "No controller (telerikReporting.reportViewerController) has been specified.";
5975
6212
  }
5976
- var $placeholder = $(placeholder), $documentMap;
6213
+ var $placeholder = $(placeholder);
6214
+ var $documentMap;
5977
6215
  var documentMapVisible = options.documentMapVisible !== false;
5978
6216
  var enableAccessibility = options.enableAccessibility;
5979
6217
  var currentReport = null;
@@ -5986,7 +6224,9 @@ var telerikReportViewer = (() => {
5986
6224
  replaceStringResources($placeholder);
5987
6225
  }
5988
6226
  function onTreeViewSelectionChanged(e) {
5989
- var documentMapNode = this.dataItem(e.node), page = documentMapNode.page, id = documentMapNode.id;
6227
+ var documentMapNode = this.dataItem(e.node);
6228
+ var page = documentMapNode.page;
6229
+ var id = documentMapNode.id;
5990
6230
  controller.navigateToPage(page, {
5991
6231
  type: "bookmark",
5992
6232
  id
@@ -6060,7 +6300,8 @@ var telerikReportViewer = (() => {
6060
6300
  $placeholder.removeClass("trv-loading");
6061
6301
  }
6062
6302
  function showDocumentMap(show) {
6063
- var splitter = GlobalSettings.viewerInstances.find((element) => element.id === options.viewerSelector + "-document-map-splitter").instance, sibling = $placeholder.next();
6303
+ var splitter = GlobalSettings.viewerInstances.find((element) => element.id === options.viewerSelector + "-document-map-splitter").instance;
6304
+ var sibling = $placeholder.next();
6064
6305
  if (options.documentMapAreaPosition === DocumentMapAreaPositions.RIGHT) {
6065
6306
  sibling = $placeholder.prev();
6066
6307
  }
@@ -6136,8 +6377,14 @@ var telerikReportViewer = (() => {
6136
6377
  throw "No controller (telerikReporting.reportViewerController) has been specified.";
6137
6378
  }
6138
6379
  var parameterEditors = [].concat(options.parameterEditors, ParameterEditors);
6139
- var recentParameterValues, parameters, initialParameterValues, processedParameterValues = void 0;
6140
- var $placeholder = $(placeholder), $content = $placeholder.find(".trv-parameters-area-content"), $errorMessage = $placeholder.find(".trv-error-message"), $previewButton = $placeholder.find(".trv-parameters-area-preview-button");
6380
+ var recentParameterValues;
6381
+ var parameters;
6382
+ var initialParameterValues;
6383
+ var processedParameterValues = void 0;
6384
+ var $placeholder = $(placeholder);
6385
+ var $content = $placeholder.find(".trv-parameters-area-content");
6386
+ var $errorMessage = $placeholder.find(".trv-error-message");
6387
+ var $previewButton = $placeholder.find(".trv-parameters-area-preview-button");
6141
6388
  $previewButton.text(stringResources[$previewButton.text()]);
6142
6389
  $previewButton.attr("aria-label", stringResources[$previewButton.attr("aria-label")]);
6143
6390
  $previewButton.on("click", function(e) {
@@ -6168,7 +6415,14 @@ var telerikReportViewer = (() => {
6168
6415
  return $(parameterContainerTemplate);
6169
6416
  }
6170
6417
  function createParameterUI(parameter) {
6171
- var $container = createParameterContainer(), $editorPlaceholder = $container.find(".trv-parameter-value"), $title = $container.find(".trv-parameter-title"), $error = $container.find(".trv-parameter-error"), $errorMessage2 = $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);
6418
+ var $container = createParameterContainer();
6419
+ var $editorPlaceholder = $container.find(".trv-parameter-value");
6420
+ var $title = $container.find(".trv-parameter-title");
6421
+ var $error = $container.find(".trv-parameter-error");
6422
+ var $errorMessage2 = $container.find(".trv-parameter-error-message");
6423
+ var $useDefaultValueCheckbox = $container.find(".trv-parameter-use-default input");
6424
+ var editorsTypes = options.parameters && options.parameters.editors ? options.parameters.editors : null;
6425
+ var editorFactory = selectParameterEditorFactory(parameter, editorsTypes);
6172
6426
  var parameterText = escapeHtml(parameter.text);
6173
6427
  var isHiddenParameter = !parameter.isVisible;
6174
6428
  if (isHiddenParameter) {
@@ -6302,14 +6556,16 @@ var telerikReportViewer = (() => {
6302
6556
  processedParameterValues = {};
6303
6557
  parameters = newParameters || [];
6304
6558
  clearEditors();
6305
- var $parameterContainer, $tempContainer = $("<div></div>");
6559
+ var $parameterContainer;
6560
+ var $tempContainer = $("<div></div>");
6306
6561
  each(parameters, function() {
6307
6562
  try {
6308
6563
  this.value = ParameterValidators.validate(this, this.value);
6309
6564
  } catch (e) {
6310
6565
  this.Error = this.Error || e;
6311
6566
  }
6312
- var hasError = Boolean(this.Error), hasValue = !hasError;
6567
+ var hasError = Boolean(this.Error);
6568
+ var hasValue = !hasError;
6313
6569
  if (hasValue) {
6314
6570
  recentParameterValues[this.id] = this.value;
6315
6571
  if (this.availableValues) {
@@ -6527,7 +6783,8 @@ var telerikReportViewer = (() => {
6527
6783
  }
6528
6784
  function showParametersArea(show) {
6529
6785
  var trv = window.telerikReportViewer;
6530
- var splitter = GlobalSettings.viewerInstances.find((element) => element.id === options.viewerSelector + "-parameters-splitter").instance, sibling = $placeholder.prev();
6786
+ var splitter = GlobalSettings.viewerInstances.find((element) => element.id === options.viewerSelector + "-parameters-splitter").instance;
6787
+ var sibling = $placeholder.prev();
6531
6788
  if (options.parametersAreaPosition === ParametersAreaPositions.TOP || options.parametersAreaPosition === ParametersAreaPositions.LEFT) {
6532
6789
  sibling = $placeholder.next();
6533
6790
  }
@@ -6603,7 +6860,11 @@ var telerikReportViewer = (() => {
6603
6860
  var lastSelectedMenuItem;
6604
6861
  var lastSelectedSubmenuItem;
6605
6862
  function MainMenu(dom, rootOptions, otherOptions) {
6606
- var options = $.extend({}, rootOptions, otherOptions), menu = $(dom).data("kendoMenu"), childrenL1 = dom.childNodes, controller = options.controller, enableAccessibility = options.enableAccessibility;
6863
+ var options = $.extend({}, rootOptions, otherOptions);
6864
+ var menu = $(dom).data("kendoMenu");
6865
+ var childrenL1 = dom.childNodes;
6866
+ var controller = options.controller;
6867
+ var enableAccessibility = options.enableAccessibility;
6607
6868
  if (!controller) {
6608
6869
  throw "No controller (telerikReporting.ReportViewerController) has been specified.";
6609
6870
  }
@@ -6685,7 +6946,8 @@ var telerikReportViewer = (() => {
6685
6946
  }
6686
6947
  function fillFormats(formats) {
6687
6948
  each($(dom).find("ul[data-command-list=export-format-list]"), function() {
6688
- var $list = $(this), $parent = $list.parents("li");
6949
+ var $list = $(this);
6950
+ var $parent = $list.parents("li");
6689
6951
  var tabIndex = enableAccessibility ? $parent.attr("tabindex") : -1;
6690
6952
  if (!tabIndex) {
6691
6953
  tabIndex = 1;
@@ -6889,7 +7151,8 @@ var telerikReportViewer = (() => {
6889
7151
  return;
6890
7152
  }
6891
7153
  each(menuAreas, function() {
6892
- var $menu = $(this), menuItems = $menu.children("li.k-item");
7154
+ var $menu = $(this);
7155
+ var menuItems = $menu.children("li.k-item");
6893
7156
  $menu.attr("aria-label", stringResources[$menu.attr("aria-label")]);
6894
7157
  each(menuItems, function() {
6895
7158
  var $menuItem = $(this);
@@ -6922,7 +7185,33 @@ var telerikReportViewer = (() => {
6922
7185
  var defaultOptions7 = {};
6923
7186
  function Search(placeholder, options, viewerOptions) {
6924
7187
  options = $.extend({}, defaultOptions7, options);
6925
- var controller = options.controller, initialized = false, dialogVisible = false, $placeholder, $inputBox, $searchOptionsPlaceholder, searchOptionsMenu, $stopSearchPlaceholder, stopSearchMenu, $navigationPlaceholder, navigationMenu, $resultsLabel, $resultsPlaceholder, kendoComboBox, kendoSearchDialog, stopSearchCommand, optionsCommandSet, navigationCommandSet, searchResults, mruList = [], inputComboRebinding, searchMetadataRequested, searchMetadataLoaded, pendingHighlightItem, windowLocation, reportViewerWrapper = $("[data-selector='" + viewerOptions.viewerSelector + "']").find(".trv-report-viewer"), lastSearch = "";
7188
+ var controller = options.controller;
7189
+ var initialized = false;
7190
+ var dialogVisible = false;
7191
+ var $placeholder;
7192
+ var $inputBox;
7193
+ var $searchOptionsPlaceholder;
7194
+ var searchOptionsMenu;
7195
+ var $stopSearchPlaceholder;
7196
+ var stopSearchMenu;
7197
+ var $navigationPlaceholder;
7198
+ var navigationMenu;
7199
+ var $resultsLabel;
7200
+ var $resultsPlaceholder;
7201
+ var kendoComboBox;
7202
+ var kendoSearchDialog;
7203
+ var stopSearchCommand;
7204
+ var optionsCommandSet;
7205
+ var navigationCommandSet;
7206
+ var searchResults;
7207
+ var mruList = [];
7208
+ var inputComboRebinding;
7209
+ var searchMetadataRequested;
7210
+ var searchMetadataLoaded;
7211
+ var pendingHighlightItem;
7212
+ var windowLocation;
7213
+ var reportViewerWrapper = $("[data-selector='" + viewerOptions.viewerSelector + "']").find(".trv-report-viewer");
7214
+ var lastSearch = "";
6926
7215
  var highlightManager = {
6927
7216
  shadedClassName: "trv-search-dialog-shaded-result",
6928
7217
  //the results that are found, but not selected (highlighted)
@@ -7091,7 +7380,12 @@ var telerikReportViewer = (() => {
7091
7380
  windowLocation = kendoWindow.offset();
7092
7381
  }
7093
7382
  function adjustDialogPosition() {
7094
- var windowWidth = $(window).innerWidth(), windowHeight = $(window).innerHeight(), kendoWindow = kendoSearchDialog.wrapper, width = kendoWindow.outerWidth(true), height = kendoWindow.outerHeight(true), padding = 10;
7383
+ var windowWidth = $(window).innerWidth();
7384
+ var windowHeight = $(window).innerHeight();
7385
+ var kendoWindow = kendoSearchDialog.wrapper;
7386
+ var width = kendoWindow.outerWidth(true);
7387
+ var height = kendoWindow.outerHeight(true);
7388
+ var padding = 10;
7095
7389
  if (!windowLocation) {
7096
7390
  var reportViewerCoords = reportViewerWrapper[0].getBoundingClientRect();
7097
7391
  kendoWindow.css({
@@ -7105,7 +7399,10 @@ var telerikReportViewer = (() => {
7105
7399
  }
7106
7400
  });
7107
7401
  } else {
7108
- var left = windowLocation.left, top = windowLocation.top, right = left + width, bottom = top + height;
7402
+ var left = windowLocation.left;
7403
+ var top = windowLocation.top;
7404
+ var right = left + width;
7405
+ var bottom = top + height;
7109
7406
  if (right > windowWidth - padding) {
7110
7407
  left = Math.max(padding, windowWidth - width - padding);
7111
7408
  kendoWindow.css({ left });
@@ -7203,7 +7500,9 @@ var telerikReportViewer = (() => {
7203
7500
  contentElement: "",
7204
7501
  template: "<div class='trv-search-dialog-results-row'><span>#: description #</span> <span class='trv-search-dialog-results-pageSpan'>" + stringResources.searchDialogPageText + " #:page#</span></div>",
7205
7502
  change: function() {
7206
- var index = this.select().index(), view = this.dataSource.view(), dataItem = view[index];
7503
+ var index = this.select().index();
7504
+ var view = this.dataSource.view();
7505
+ var dataItem = view[index];
7207
7506
  onSelectedItem(dataItem);
7208
7507
  updateUI(index, view.length);
7209
7508
  }
@@ -7318,7 +7617,9 @@ var telerikReportViewer = (() => {
7318
7617
  if (!results || results.length === 0) {
7319
7618
  return;
7320
7619
  }
7321
- var $parent = $placeholder.parent(), $pageContainer = $parent.find(".trv-page-container"), elements = $pageContainer.find("[data-search-id]");
7620
+ var $parent = $placeholder.parent();
7621
+ var $pageContainer = $parent.find(".trv-page-container");
7622
+ var elements = $pageContainer.find("[data-search-id]");
7322
7623
  each(results, function() {
7323
7624
  var $searchElement = elements.filter("[data-search-id=" + this.id + "]");
7324
7625
  if ($searchElement) {
@@ -7399,7 +7700,8 @@ var telerikReportViewer = (() => {
7399
7700
  $listView.select($selected);
7400
7701
  $listView.trigger("change");
7401
7702
  } else {
7402
- var index = $listView.select().trigger("change").index(), view = $listView.dataSource.view();
7703
+ var index = $listView.select().trigger("change").index();
7704
+ var view = $listView.dataSource.view();
7403
7705
  var newIndex = Math.min(view.length - 1, Math.max(0, index + offset));
7404
7706
  if (newIndex !== index) {
7405
7707
  var dataItem = view[newIndex];
@@ -7441,7 +7743,14 @@ var telerikReportViewer = (() => {
7441
7743
  if (!$search) {
7442
7744
  return;
7443
7745
  }
7444
- var $searchCaption = $search.find(".trv-search-dialog-caption-label"), $searchOptions = $search.find(".trv-search-dialog-search-options"), $searchStopButton = $search.find("a[data-command='telerik_ReportViewer_searchDialog_StopSearch']"), $searchMatchCaseButton = $search.find("a[data-command='telerik_ReportViewer_searchDialog_MatchCase']"), $searchMatchWholeWordButton = $search.find("a[data-command='telerik_ReportViewer_searchDialog_MatchWholeWord']"), $searchUseRegexButton = $search.find("a[data-command='telerik_ReportViewer_searchDialog_UseRegex']"), $searchNavigateUpButton = $search.find("a[data-command='telerik_ReportViewer_searchDialog_NavigateUp']"), $searchNavigateDownButton = $search.find("a[data-command='telerik_ReportViewer_searchDialog_NavigateDown']");
7746
+ var $searchCaption = $search.find(".trv-search-dialog-caption-label");
7747
+ var $searchOptions = $search.find(".trv-search-dialog-search-options");
7748
+ var $searchStopButton = $search.find("a[data-command='telerik_ReportViewer_searchDialog_StopSearch']");
7749
+ var $searchMatchCaseButton = $search.find("a[data-command='telerik_ReportViewer_searchDialog_MatchCase']");
7750
+ var $searchMatchWholeWordButton = $search.find("a[data-command='telerik_ReportViewer_searchDialog_MatchWholeWord']");
7751
+ var $searchUseRegexButton = $search.find("a[data-command='telerik_ReportViewer_searchDialog_UseRegex']");
7752
+ var $searchNavigateUpButton = $search.find("a[data-command='telerik_ReportViewer_searchDialog_NavigateUp']");
7753
+ var $searchNavigateDownButton = $search.find("a[data-command='telerik_ReportViewer_searchDialog_NavigateDown']");
7445
7754
  replaceAttribute($search, "aria-label");
7446
7755
  replaceAttribute($searchOptions, "aria-label");
7447
7756
  replaceText($searchCaption);
@@ -7506,7 +7815,24 @@ var telerikReportViewer = (() => {
7506
7815
  var defaultOptions8 = {};
7507
7816
  function SendEmail(placeholder, options, viewerOptions) {
7508
7817
  options = $.extend({}, defaultOptions8, options);
7509
- var controller = options.controller, initialized = false, dialogVisible = false, $placeholder, kendoSendEmailDialog, selector2 = viewerOptions.viewerSelector, inputFrom, inputTo, inputCC, inputSubject, docFormat, docFormatEl, bodyEditorEl, bodyEditor, docFormatList, optionsCommandSet, windowLocation, reportViewerWrapper = $("[data-selector='" + selector2 + "']").find(".trv-report-viewer");
7818
+ var controller = options.controller;
7819
+ var initialized = false;
7820
+ var dialogVisible = false;
7821
+ var $placeholder;
7822
+ var kendoSendEmailDialog;
7823
+ var selector2 = viewerOptions.viewerSelector;
7824
+ var inputFrom;
7825
+ var inputTo;
7826
+ var inputCC;
7827
+ var inputSubject;
7828
+ var docFormat;
7829
+ var docFormatEl;
7830
+ var bodyEditorEl;
7831
+ var bodyEditor;
7832
+ var docFormatList;
7833
+ var optionsCommandSet;
7834
+ var windowLocation;
7835
+ var reportViewerWrapper = $("[data-selector='" + selector2 + "']").find(".trv-report-viewer");
7510
7836
  if (!controller) {
7511
7837
  throw "No controller (telerikReporting.ReportViewerController) has been specified.";
7512
7838
  }
@@ -7657,11 +7983,13 @@ var telerikReportViewer = (() => {
7657
7983
  });
7658
7984
  function setAttrs() {
7659
7985
  $placeholder.find(".trv-send-email-field input").each(function() {
7660
- var el = $(this), attrName = el.attr("name");
7986
+ var el = $(this);
7987
+ var attrName = el.attr("name");
7661
7988
  el.attr("id", selector2 + "-" + attrName);
7662
7989
  });
7663
7990
  $placeholder.find(".trv-send-email-label label").each(function() {
7664
- var el = $(this), attrName = el.attr("for");
7991
+ var el = $(this);
7992
+ var attrName = el.attr("for");
7665
7993
  el.attr("for", selector2 + "-" + attrName);
7666
7994
  });
7667
7995
  }
@@ -7670,7 +7998,9 @@ var telerikReportViewer = (() => {
7670
7998
  windowLocation = kendoWindow.offset();
7671
7999
  }
7672
8000
  function adjustDialogSize() {
7673
- var kendoWindow = kendoSendEmailDialog.element.parent(".k-window"), windowWidth = $(window).width(), kendoWindowWidth = 350;
8001
+ var kendoWindow = kendoSendEmailDialog.element.parent(".k-window");
8002
+ var windowWidth = $(window).width();
8003
+ var kendoWindowWidth = 350;
7674
8004
  if (windowWidth > 800) {
7675
8005
  kendoWindowWidth = 720;
7676
8006
  }
@@ -7683,7 +8013,16 @@ var telerikReportViewer = (() => {
7683
8013
  if (!windowLocation) {
7684
8014
  kendoSendEmailDialog.center();
7685
8015
  } else {
7686
- var padding = 10, windowWidth = $(window).innerWidth(), windowHeight = $(window).innerHeight(), kendoWindow = kendoSendEmailDialog.wrapper, width = kendoWindow.outerWidth(true), height = kendoWindow.outerHeight(true), left = windowLocation.left, top = windowLocation.top, right = left + width, bottom = top + height;
8016
+ var padding = 10;
8017
+ var windowWidth = $(window).innerWidth();
8018
+ var windowHeight = $(window).innerHeight();
8019
+ var kendoWindow = kendoSendEmailDialog.wrapper;
8020
+ var width = kendoWindow.outerWidth(true);
8021
+ var height = kendoWindow.outerHeight(true);
8022
+ var left = windowLocation.left;
8023
+ var top = windowLocation.top;
8024
+ var right = left + width;
8025
+ var bottom = top + height;
7687
8026
  if (right > windowWidth - padding) {
7688
8027
  left = Math.max(padding, windowWidth - width - padding);
7689
8028
  kendoWindow.css({ left });
@@ -7762,7 +8101,10 @@ var telerikReportViewer = (() => {
7762
8101
  });
7763
8102
  }
7764
8103
  function validateFields() {
7765
- var fromIsValid = isEmpty(inputFrom) || !isValidEmail(inputFrom, false), toIsValid = isEmpty(inputTo) || !isValidEmail(inputTo, true), ccIsValid = inputCC.val().length && !isValidEmail(inputCC, true), hasFormat = docFormat.value().length;
8104
+ var fromIsValid = isEmpty(inputFrom) || !isValidEmail(inputFrom, false);
8105
+ var toIsValid = isEmpty(inputTo) || !isValidEmail(inputTo, true);
8106
+ var ccIsValid = inputCC.val().length && !isValidEmail(inputCC, true);
8107
+ var hasFormat = docFormat.value().length;
7766
8108
  if (!hasFormat) {
7767
8109
  showError(docFormatEl, "data-required-msg");
7768
8110
  }
@@ -7835,7 +8177,9 @@ var telerikReportViewer = (() => {
7835
8177
  if (!$sendEmailDialog) {
7836
8178
  return;
7837
8179
  }
7838
- var labels = $sendEmailDialog.find(".trv-replace-string"), ariaLabel = $sendEmailDialog.find("[aria-label]"), titles = $sendEmailDialog.find("[title]");
8180
+ var labels = $sendEmailDialog.find(".trv-replace-string");
8181
+ var ariaLabel = $sendEmailDialog.find("[aria-label]");
8182
+ var titles = $sendEmailDialog.find("[title]");
7839
8183
  if (labels.length) {
7840
8184
  $.each(labels, function(key, value) {
7841
8185
  replaceText($(value));
@@ -7900,7 +8244,15 @@ var telerikReportViewer = (() => {
7900
8244
 
7901
8245
  // src/sideMenu.js
7902
8246
  function SideMenu(dom, rootOptions, otherOptions) {
7903
- var options = $.extend({}, rootOptions, otherOptions), menu = $(dom).data("kendoMenu"), enableAccessibility = options.enableAccessibility, lastSelectedMenuItem2, DEFAULT_TABINDEX = 3, panelBar, loadingFormats, sideMenuVisible = false, controller = options.controller;
8247
+ var options = $.extend({}, rootOptions, otherOptions);
8248
+ var menu = $(dom).data("kendoMenu");
8249
+ var enableAccessibility = options.enableAccessibility;
8250
+ var lastSelectedMenuItem2;
8251
+ var DEFAULT_TABINDEX = 3;
8252
+ var panelBar;
8253
+ var loadingFormats;
8254
+ var sideMenuVisible = false;
8255
+ var controller = options.controller;
7904
8256
  if (!controller) {
7905
8257
  throw "No controller (telerikReporting.ReportViewerController) has been specified.";
7906
8258
  }
@@ -7962,7 +8314,8 @@ var telerikReportViewer = (() => {
7962
8314
  }
7963
8315
  function fillFormats(formats) {
7964
8316
  each($(dom).find("ul[data-command-list=export-format-list]"), function() {
7965
- var $list = $(this), $parent = $list.parents("li");
8317
+ var $list = $(this);
8318
+ var $parent = $list.parents("li");
7966
8319
  var tabIndex = $parent.attr("tabindex");
7967
8320
  if (!tabIndex) {
7968
8321
  tabIndex = DEFAULT_TABINDEX;
@@ -8090,10 +8443,12 @@ var telerikReportViewer = (() => {
8090
8443
  return;
8091
8444
  }
8092
8445
  each(menuAreas, function() {
8093
- var $menu = $(this), menuItems = $menu.children("li.k-panelbar-header");
8446
+ var $menu = $(this);
8447
+ var menuItems = $menu.children("li.k-panelbar-header");
8094
8448
  $menu.attr("aria-label", stringResources[$menu.attr("aria-label")]);
8095
8449
  each(menuItems, function() {
8096
- var $menuItem = $(this), $a = $menuItem.find("a");
8450
+ var $menuItem = $(this);
8451
+ var $a = $menuItem.find("a");
8097
8452
  $menuItem.attr("aria-label", stringResources[$menuItem.attr("aria-label")]);
8098
8453
  if ($a) {
8099
8454
  var $span = $a.find("span:not(.k-icon)");
@@ -8311,18 +8666,31 @@ var telerikReportViewer = (() => {
8311
8666
  };
8312
8667
  }
8313
8668
  function ReportViewer(dom, options) {
8314
- var svcApiUrl = options.serviceUrl, reportServerUrlSVCApiUrl = "";
8669
+ var svcApiUrl = options.serviceUrl;
8670
+ var reportServerUrlSVCApiUrl = "";
8315
8671
  if (options.reportServer) {
8316
8672
  reportServerUrlSVCApiUrl = rtrim(options.reportServer.url, "\\/");
8317
8673
  svcApiUrl = reportServerUrlSVCApiUrl + "/api/reports";
8318
8674
  }
8319
- var $placeholder = $(dom), templates = {}, persistanceKey = options.id || "#" + $placeholder.attr("id"), accessibility, settings = {}, client = {}, controller = {}, perspectiveManager = {}, history = {}, commands = {}, viewer = {}, serviceClientOptions = {}, reportServerUrl = "";
8675
+ var $placeholder = $(dom);
8676
+ var templates = {};
8677
+ var persistanceKey = options.id || "#" + $placeholder.attr("id");
8678
+ var accessibility;
8679
+ var settings = {};
8680
+ var client = {};
8681
+ var controller = {};
8682
+ var perspectiveManager = {};
8683
+ var history = {};
8684
+ var commands = {};
8685
+ var viewer = {};
8686
+ var serviceClientOptions = {};
8687
+ var reportServerUrl = "";
8320
8688
  options.viewerSelector = "reportViewer-" + generateGuidString();
8321
8689
  $placeholder.attr("data-selector", options.viewerSelector);
8322
8690
  if (!validateOptions(options)) {
8323
8691
  return;
8324
8692
  }
8325
- var version = "18.0.24.116";
8693
+ var version = "18.0.24.305";
8326
8694
  options = extend({}, getDefaultOptions(svcApiUrl, version), options);
8327
8695
  settings = new ReportViewerSettings(
8328
8696
  persistanceKey,
@@ -8512,7 +8880,8 @@ var telerikReportViewer = (() => {
8512
8880
  VIEWER_TOOLTIP_OPENING: controller.Events.TOOLTIP_OPENING,
8513
8881
  SEND_EMAIL_BEGIN: controller.Events.SEND_EMAIL_STARTED,
8514
8882
  SEND_EMAIL_END: controller.Events.SEND_EMAIL_READY
8515
- }, $viewer = $(viewer);
8883
+ };
8884
+ var $viewer = $(viewer);
8516
8885
  for (var eventName in viewerEventsMapping) {
8517
8886
  var controllerEventName = viewerEventsMapping[eventName];
8518
8887
  controller.on(controllerEventName, function($viewer2, eventName2) {
@@ -8570,13 +8939,19 @@ var telerikReportViewer = (() => {
8570
8939
  min: "50px",
8571
8940
  size: "210px",
8572
8941
  collapsible: true
8573
- }, parameterAreaTemplate = $placeholder.find(".trv-parameters-area"), parameterAreaPanes = [{}], documentMapPaneOptions = {
8942
+ };
8943
+ var parameterAreaTemplate = $placeholder.find(".trv-parameters-area");
8944
+ var parameterAreaPanes = [{}];
8945
+ var documentMapPaneOptions = {
8574
8946
  max: "500px",
8575
8947
  min: "50px",
8576
8948
  size: "210px",
8577
8949
  collapsible: true,
8578
8950
  collapsed: true
8579
- }, documentMapTemplate = $placeholder.find(".trv-document-map"), documentMapPanes = [{}], orientation = "horizontal";
8951
+ };
8952
+ var documentMapTemplate = $placeholder.find(".trv-document-map");
8953
+ var documentMapPanes = [{}];
8954
+ var orientation = "horizontal";
8580
8955
  if (options.documentMapAreaPosition === DocumentMapAreaPositions.RIGHT) {
8581
8956
  documentMapTemplate.insertAfter($placeholder.find(".trv-pages-area"));
8582
8957
  documentMapPanes.push(documentMapPaneOptions);
@@ -8892,7 +9267,7 @@ var telerikReportViewer = (() => {
8892
9267
  return __toCommonJS(src_exports);
8893
9268
  })();
8894
9269
 
8895
- /* DO NOT MODIFY OR DELETE THIS LINE! UPGRADE WIZARD CHECKSUM 158555f9b27bbf1db6fe5ef8bdd09a06 */
9270
+ /* DO NOT MODIFY OR DELETE THIS LINE! UPGRADE WIZARD CHECKSUM 16be669e2e6279564aec244028122f71 */
8896
9271
  module.exports = {
8897
9272
  ReportViewer: telerikReportViewer.ReportViewer
8898
9273
  };