@progress/telerik-jquery-report-viewer 21.24.130 → 21.24.305

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * TelerikReporting v18.0.24.130 (https://www.telerik.com/products/reporting.aspx)
2
+ * TelerikReporting v18.0.24.305 (https://www.telerik.com/products/reporting.aspx)
3
3
  * Copyright 2024 Progress Software EAD. All rights reserved.
4
4
  *
5
5
  * Telerik Reporting commercial licenses may be obtained at
@@ -177,7 +177,8 @@ var telerikReportViewer = (() => {
177
177
  }
178
178
  function generateGuidString() {
179
179
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
180
- var r = Math.random() * 16 | 0, v = c == "x" ? r : r & 3 | 8;
180
+ var r = Math.random() * 16 | 0;
181
+ var v = c == "x" ? r : r & 3 | 8;
181
182
  return v.toString(16);
182
183
  });
183
184
  }
@@ -365,7 +366,13 @@ var telerikReportViewer = (() => {
365
366
  return parseJSON(xhr.responseText);
366
367
  }
367
368
  function extend() {
368
- var src, copy, name, options, target, i = 0, length = arguments.length;
369
+ var src;
370
+ var copy;
371
+ var name;
372
+ var options;
373
+ var target;
374
+ var i = 0;
375
+ var length = arguments.length;
369
376
  target = length > 1 ? arguments[i++] || {} : {};
370
377
  for (; i < length; i++) {
371
378
  if ((options = arguments[i]) != null) {
@@ -384,7 +391,8 @@ var telerikReportViewer = (() => {
384
391
  return target;
385
392
  }
386
393
  function each(obj, callback) {
387
- var length, i = 0;
394
+ var length;
395
+ var i = 0;
388
396
  if (isArray(obj)) {
389
397
  length = obj.length;
390
398
  for (; i < length; i++) {
@@ -537,7 +545,8 @@ var telerikReportViewer = (() => {
537
545
  scaleY = scaleY || 1;
538
546
  originX = originX || 0;
539
547
  originY = originY || 0;
540
- var scale2 = stringFormat("scale({0}, {1})", [scaleX, scaleY]), origin = stringFormat("{0} {1}", [originX, originY]);
548
+ var scale2 = stringFormat("scale({0}, {1})", [scaleX, scaleY]);
549
+ var origin = stringFormat("{0} {1}", [originX, originY]);
541
550
  $(dom).css("transform", scale2).css("transform-origin", origin);
542
551
  }
543
552
 
@@ -712,7 +721,11 @@ var telerikReportViewer = (() => {
712
721
  // src/accessibility.js
713
722
  var defaultOptions = {};
714
723
  function Accessibility(options) {
715
- var controller, pageInitialized = false, areas, lastArea, keyMap = {
724
+ var controller;
725
+ var pageInitialized = false;
726
+ var areas;
727
+ var lastArea;
728
+ var keyMap = {
716
729
  //keys for navigating on areas. Used in conjunction with CTRL+ALT to avoid duplicating default shortcuts behavior.
717
730
  CONFIRM_KEY: 13,
718
731
  CONTENT_AREA_KEY: 67,
@@ -888,8 +901,10 @@ var telerikReportViewer = (() => {
888
901
  var $menuItem = $(this);
889
902
  if (!$menuItem.hasClass("trv-report-pager")) {
890
903
  var ariaLabel = $menuItem.attr("aria-label");
891
- var expandableSr = stringFormat(". {0}", [stringResources.ariaLabelExpandable]), expandable = $menuItem.find("ul").length > 0 && ariaLabel.indexOf(expandableSr) < 0 ? expandableSr : "";
892
- var selectedSr = stringFormat(". {0}", [stringResources.ariaLabelSelected]), selected = $menuItem.hasClass("k-selected") && ariaLabel.indexOf(selectedSr) < 0 ? selectedSr : "";
904
+ var expandableSr = stringFormat(". {0}", [stringResources.ariaLabelExpandable]);
905
+ var expandable = $menuItem.find("ul").length > 0 && ariaLabel.indexOf(expandableSr) < 0 ? expandableSr : "";
906
+ var selectedSr = stringFormat(". {0}", [stringResources.ariaLabelSelected]);
907
+ var selected = $menuItem.hasClass("k-selected") && ariaLabel.indexOf(selectedSr) < 0 ? selectedSr : "";
893
908
  var label = ariaLabel + expandable + selected;
894
909
  $menuItem.attr("aria-label", label);
895
910
  if ($menuItem.hasClass("k-disabled")) {
@@ -924,9 +939,10 @@ var telerikReportViewer = (() => {
924
939
  bind: function($element) {
925
940
  var args = Array.prototype.slice.call(arguments, 1);
926
941
  attachCommands($element, args);
927
- var result = selector('[data-role^="telerik_ReportViewer_"]');
942
+ var result = $element.find('[data-role^="telerik_ReportViewer_"]');
928
943
  each(result, function() {
929
- var $this = $(this), f = $.fn[$this.attr("data-role")];
944
+ var $this = $(this);
945
+ var f = $.fn[$this.attr("data-role")];
930
946
  if (typeof f === "function") {
931
947
  f.apply($this, args);
932
948
  }
@@ -934,7 +950,10 @@ var telerikReportViewer = (() => {
934
950
  }
935
951
  };
936
952
  function attachCommands($element, args) {
937
- var commands = args[0].commands, viewerOptions = args[1], elementSelector = '[data-command^="telerik_ReportViewer_"]', customElementSelector = "[data-target-report-viewer]" + elementSelector;
953
+ var commands = args[0].commands;
954
+ var viewerOptions = args[1];
955
+ var elementSelector = '[data-command^="telerik_ReportViewer_"]';
956
+ var customElementSelector = "[data-target-report-viewer]" + elementSelector;
938
957
  $element.on("click", elementSelector, commandHandler);
939
958
  if (!GlobalSettings.CommandHandlerAttached) {
940
959
  $(document.body).on("click", customElementSelector, customCommandHandler);
@@ -946,7 +965,8 @@ var telerikReportViewer = (() => {
946
965
  function commandHandler(e) {
947
966
  var prefixedDataCommand = $(this).attr("data-command");
948
967
  if (prefixedDataCommand) {
949
- var dataCommand = prefixedDataCommand.substring("telerik_ReportViewer_".length), cmd = commands[dataCommand];
968
+ var dataCommand = prefixedDataCommand.substring("telerik_ReportViewer_".length);
969
+ var cmd = commands[dataCommand];
950
970
  if (cmd && cmd.enabled()) {
951
971
  cmd.exec($(this).attr("data-command-parameter"));
952
972
  }
@@ -954,9 +974,13 @@ var telerikReportViewer = (() => {
954
974
  }
955
975
  }
956
976
  function customCommandHandler(e) {
957
- var $this = $(this), prefixedDataCommand = $this.attr("data-command"), reportViewerTarget = $this.attr("data-target-report-viewer");
977
+ var $this = $(this);
978
+ var prefixedDataCommand = $this.attr("data-command");
979
+ var reportViewerTarget = $this.attr("data-target-report-viewer");
958
980
  if (prefixedDataCommand && reportViewerTarget) {
959
- var dataCommand = prefixedDataCommand.substring("telerik_ReportViewer_".length), reportViewer = $(reportViewerTarget).data("telerik_ReportViewer"), cmd = reportViewer.commands[dataCommand];
981
+ var dataCommand = prefixedDataCommand.substring("telerik_ReportViewer_".length);
982
+ var reportViewer = $(reportViewerTarget).data("telerik_ReportViewer");
983
+ var cmd = reportViewer.commands[dataCommand];
960
984
  if (cmd.enabled()) {
961
985
  cmd.exec($(this).attr("data-command-parameter"));
962
986
  }
@@ -966,7 +990,10 @@ var telerikReportViewer = (() => {
966
990
  }
967
991
  function attachCommand(dataCommand, cmd, viewerOptions, $element) {
968
992
  if (cmd) {
969
- var elementSelector = '[data-command="telerik_ReportViewer_' + dataCommand + '"]', customElementSelector = '[data-target-report-viewer="' + viewerOptions.selector + '"]' + elementSelector, $defaultElement = $element.find(elementSelector), $customElement = $(customElementSelector);
993
+ var elementSelector = '[data-command="telerik_ReportViewer_' + dataCommand + '"]';
994
+ var customElementSelector = '[data-target-report-viewer="' + viewerOptions.selector + '"]' + elementSelector;
995
+ var $defaultElement = $element.find(elementSelector);
996
+ var $customElement = $(customElementSelector);
970
997
  $(cmd).on("enabledChanged", function(e) {
971
998
  (cmd.enabled() ? $.fn.removeClass : $.fn.addClass).call($defaultElement.parent("li"), "k-disabled");
972
999
  (cmd.enabled() ? $.fn.removeClass : $.fn.addClass).call($customElement, viewerOptions.disabledButtonClass);
@@ -981,7 +1008,9 @@ var telerikReportViewer = (() => {
981
1008
  return $element.hasClass("trv-menu-toggleable") ? "k-selected !k-bg-primary" : "k-selected";
982
1009
  }
983
1010
  function LinkButton(dom, options) {
984
- var cmd, $element = $(dom), dataCommand = $element.attr("data-command");
1011
+ var cmd;
1012
+ var $element = $(dom);
1013
+ var dataCommand = $element.attr("data-command");
985
1014
  if (dataCommand) {
986
1015
  cmd = options.commands[dataCommand];
987
1016
  }
@@ -1009,7 +1038,9 @@ var telerikReportViewer = (() => {
1009
1038
  });
1010
1039
  };
1011
1040
  function PageNumberInput(dom, options) {
1012
- var $element = $(dom), oldValue = 0, cmd = options.commands["goToPage"];
1041
+ var $element = $(dom);
1042
+ var oldValue = 0;
1043
+ var cmd = options.commands["goToPage"];
1013
1044
  function setPageNumber(value) {
1014
1045
  if (oldValue !== value || !$element.is(":focus")) {
1015
1046
  $element.val(value);
@@ -1247,7 +1278,8 @@ var telerikReportViewer = (() => {
1247
1278
  controller.scale(args);
1248
1279
  }
1249
1280
  function getZoomScale(scale2, steps) {
1250
- var pos = -1, length = scaleValues.length;
1281
+ var pos = -1;
1282
+ var length = scaleValues.length;
1251
1283
  for (var i = 0; i < length; i++) {
1252
1284
  var value = scaleValues[i];
1253
1285
  if (scale2 < value) {
@@ -1629,7 +1661,28 @@ var telerikReportViewer = (() => {
1629
1661
  documentInfoPollIntervalMs: 2e3
1630
1662
  };
1631
1663
  function ReportViewerController(options) {
1632
- 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;
1664
+ var controller = {};
1665
+ var clientId;
1666
+ var reportInstanceId;
1667
+ var reportDocumentId;
1668
+ var registerClientPromise;
1669
+ var registerInstancePromise;
1670
+ var documentFormatsPromise;
1671
+ var report;
1672
+ var parameterValues;
1673
+ var processedParameterValues;
1674
+ var currentPageNumber;
1675
+ var pageCount;
1676
+ var viewMode = ViewModes.INTERACTIVE;
1677
+ var pageMode = PageModes.CONTINUOUS_SCROLL;
1678
+ var loader;
1679
+ var printMode = PrintModes.AUTO_SELECT;
1680
+ var bookmarkNodes;
1681
+ var renderingExtensions;
1682
+ var clientHasExpired = false;
1683
+ var parameterValidators = ParameterValidators;
1684
+ var events = new Events3();
1685
+ var keepClientAliveSentinel;
1633
1686
  clearReportState();
1634
1687
  options = extend({}, defaultOptions2, options);
1635
1688
  if (options.settings.printMode) {
@@ -2003,7 +2056,8 @@ var telerikReportViewer = (() => {
2003
2056
  throwIfNoReport();
2004
2057
  var deviceInfo = {
2005
2058
  ImmediatePrint: true
2006
- }, printStartArgs = {
2059
+ };
2060
+ var printStartArgs = {
2007
2061
  deviceInfo,
2008
2062
  handled: false
2009
2063
  };
@@ -2014,10 +2068,13 @@ var telerikReportViewer = (() => {
2014
2068
  inProgress: true
2015
2069
  });
2016
2070
  showNotification({ stringResources: "preparingPrint" });
2017
- var canUsePlugin = getCanUsePlugin(), contentDisposition = canUsePlugin ? "inline" : "attachment", queryString = "response-content-disposition=" + contentDisposition;
2071
+ var canUsePlugin = getCanUsePlugin();
2072
+ var contentDisposition = canUsePlugin ? "inline" : "attachment";
2073
+ var queryString = "response-content-disposition=" + contentDisposition;
2018
2074
  exportAsync("PDF", deviceInfo).then(
2019
2075
  function(info) {
2020
- var url = client.formatDocumentUrl(info.clientId, info.instanceId, info.documentId, queryString), printEndArgs = {
2076
+ var url = client.formatDocumentUrl(info.clientId, info.instanceId, info.documentId, queryString);
2077
+ var printEndArgs = {
2021
2078
  url,
2022
2079
  handled: false
2023
2080
  };
@@ -2066,7 +2123,8 @@ var telerikReportViewer = (() => {
2066
2123
  showNotification({ stringResources: "preparingDownload" });
2067
2124
  exportAsync(format, exportStartArgs.deviceInfo).then(
2068
2125
  function(info) {
2069
- var url = client.formatDocumentUrl(info.clientId, info.instanceId, info.documentId, queryString), exportEndArgs = {
2126
+ var url = client.formatDocumentUrl(info.clientId, info.instanceId, info.documentId, queryString);
2127
+ var exportEndArgs = {
2070
2128
  url,
2071
2129
  format,
2072
2130
  handled: false,
@@ -2296,7 +2354,8 @@ var telerikReportViewer = (() => {
2296
2354
  window.open(args.Url, args.Target);
2297
2355
  },
2298
2356
  "navigateToBookmark": function(action) {
2299
- var id = action.Value, page = getPageForBookmark(bookmarkNodes, id);
2357
+ var id = action.Value;
2358
+ var page = getPageForBookmark(bookmarkNodes, id);
2300
2359
  controller.navigateToPage(page, {
2301
2360
  type: "bookmark",
2302
2361
  id
@@ -2845,7 +2904,8 @@ var telerikReportViewer = (() => {
2845
2904
  if (!serviceClient) {
2846
2905
  throw stringResources.noServiceClient;
2847
2906
  }
2848
- var interval, pingMilliseconds;
2907
+ var interval;
2908
+ var pingMilliseconds;
2849
2909
  if (!isNumber(sessionTimeoutSeconds)) {
2850
2910
  throw "sessionTimeoutSeconds must a number and must be finite";
2851
2911
  }
@@ -2908,7 +2968,8 @@ var telerikReportViewer = (() => {
2908
2968
  if (!controller) {
2909
2969
  throw "No controller (telerikReporting.reportViewerController) has been specified.";
2910
2970
  }
2911
- var settings = options.settings, history = settings.history() || { records: [], position: -1 };
2971
+ var settings = options.settings;
2972
+ var history = settings.history() || { records: [], position: -1 };
2912
2973
  controller.onLoadedReportChange(function() {
2913
2974
  clientHasExpired = false;
2914
2975
  addToHistory(true);
@@ -2931,7 +2992,8 @@ var telerikReportViewer = (() => {
2931
2992
  return null;
2932
2993
  }
2933
2994
  function pushRecord(rec) {
2934
- var records = history.records, position = history.position;
2995
+ var records = history.records;
2996
+ var position = history.position;
2935
2997
  records = Array.prototype.slice.call(records, 0, position + 1);
2936
2998
  records.push(rec);
2937
2999
  history.records = records;
@@ -2970,11 +3032,15 @@ var telerikReportViewer = (() => {
2970
3032
  controller.navigateToPage(currentRecord.pageNumber);
2971
3033
  }
2972
3034
  function canMove(step) {
2973
- var position = history.position, length = history.records.length, newPos = position + step;
3035
+ var position = history.position;
3036
+ var length = history.records.length;
3037
+ var newPos = position + step;
2974
3038
  return 0 <= newPos && newPos < length;
2975
3039
  }
2976
3040
  function move(step) {
2977
- var position = history.position, length = history.records.length, newPos = position + step;
3041
+ var position = history.position;
3042
+ var length = history.records.length;
3043
+ var newPos = position + step;
2978
3044
  if (newPos < 0) {
2979
3045
  newPos = 0;
2980
3046
  } else if (newPos >= length) {
@@ -3025,7 +3091,8 @@ var telerikReportViewer = (() => {
3025
3091
 
3026
3092
  // src/touch.js
3027
3093
  function TouchBehavior(dom, options) {
3028
- var startDistance, ignoreTouch;
3094
+ var startDistance;
3095
+ var ignoreTouch;
3029
3096
  init2(dom);
3030
3097
  function init2(element) {
3031
3098
  if (typeof $.fn.kendoTouch === "function") {
@@ -3208,7 +3275,9 @@ var telerikReportViewer = (() => {
3208
3275
  * page - the page object
3209
3276
  */
3210
3277
  renderPage: function renderPage(page) {
3211
- var that = this, pageViewMode = that.controller.getViewMode(), renderedPage = that.$placeholder.find('[data-page="' + page.pageNumber + '"]');
3278
+ var that = this;
3279
+ var pageViewMode = that.controller.getViewMode();
3280
+ var renderedPage = that.$placeholder.find('[data-page="' + page.pageNumber + '"]');
3212
3281
  if (!that.enabled) {
3213
3282
  that.enabled = true;
3214
3283
  that.$placeholder.addClass("scrollable");
@@ -3267,7 +3336,9 @@ var telerikReportViewer = (() => {
3267
3336
  that._loadNextPreviousPage(pageNumber);
3268
3337
  },
3269
3338
  _updatePageArea: function _updatePageArea(page) {
3270
- var that = this, scrollTo = 0, pageNumber = page.pageNumber;
3339
+ var that = this;
3340
+ var scrollTo = 0;
3341
+ var pageNumber = page.pageNumber;
3271
3342
  that.scrollInProgress = true;
3272
3343
  if (pageNumber > 1) {
3273
3344
  that._generateSkeletonScreens(pageNumber);
@@ -3284,7 +3355,10 @@ var telerikReportViewer = (() => {
3284
3355
  _navigateToPage: function _navigateToPage(page, renderedPage) {
3285
3356
  var that = this;
3286
3357
  that.scrollInProgress = true;
3287
- var scrollTo = renderedPage.position().top, pages = that.$placeholder.find(".trv-report-page"), pageNumber = page.pageNumber, pageHeight = $(pages[0]).height();
3358
+ var scrollTo = renderedPage.position().top;
3359
+ var pages = that.$placeholder.find(".trv-report-page");
3360
+ var pageNumber = page.pageNumber;
3361
+ var pageHeight = $(pages[0]).height();
3288
3362
  if (that._isSkeletonScreen(renderedPage, pageNumber)) {
3289
3363
  that.controller.getPageData(pageNumber).then(function(newPage) {
3290
3364
  that._render(newPage, false);
@@ -3307,7 +3381,10 @@ var telerikReportViewer = (() => {
3307
3381
  },
3308
3382
  _updatePageContent: function _updatePageContent(page, renderedPage) {
3309
3383
  this._updatePageStyle(page);
3310
- var pageNumber = page.pageNumber, wrapper = $($.parseHTML(page.pageContent)), $pageContent = wrapper.find("div.sheet"), $page = this.$placeholder.find('[data-page="' + pageNumber + '"]');
3384
+ var pageNumber = page.pageNumber;
3385
+ var wrapper = $($.parseHTML(page.pageContent));
3386
+ var $pageContent = wrapper.find("div.sheet");
3387
+ var $page = this.$placeholder.find('[data-page="' + pageNumber + '"]');
3311
3388
  $pageContent.css("margin", 0);
3312
3389
  $page.append($pageContent).append($('<div class="trv-page-overlay"></div>'));
3313
3390
  renderedPage.replaceWith($page);
@@ -3323,7 +3400,12 @@ var telerikReportViewer = (() => {
3323
3400
  return page.hasClass("trv-skeleton-" + pageNumber);
3324
3401
  },
3325
3402
  _addSkeletonScreen: function _addSkeletonScreen(pageNumber, position) {
3326
- 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]);
3403
+ var that = this;
3404
+ var pageStyleNumber = position ? parseInt(pageNumber + 1) : parseInt(pageNumber - 1);
3405
+ var pageStyleBaseDom = that.$placeholder.find('[data-page="' + pageStyleNumber + '"]');
3406
+ var pageStyle = pageStyleBaseDom.attr("style");
3407
+ var contentStyle = pageStyleBaseDom.find("sheet").attr("style");
3408
+ var skeletonEl = stringFormat(that.skeletonTemplate, [pageNumber, pageStyle, contentStyle]);
3327
3409
  if (position) {
3328
3410
  that.$pageWrapper.prepend(skeletonEl);
3329
3411
  } else {
@@ -3331,18 +3413,27 @@ var telerikReportViewer = (() => {
3331
3413
  }
3332
3414
  },
3333
3415
  _generateSkeletonScreens: function _generateSkeletonScreens(upToPageNumber) {
3334
- 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;
3416
+ var that = this;
3417
+ var skeletonEl = "";
3418
+ var pageStyleBaseDom = this.$placeholder.find('[data-page="1"]');
3419
+ var pageStyle = pageStyleBaseDom.attr("style");
3420
+ var contentStyle = pageStyleBaseDom.find("sheet").attr("style");
3421
+ var lastPage = that.$placeholder.find(".trv-report-page").last().attr("data-page");
3422
+ var index = lastPage ? parseInt(lastPage) + 1 : 1;
3335
3423
  for (index; index < upToPageNumber; index++) {
3336
3424
  skeletonEl = skeletonEl + stringFormat(that.skeletonTemplate, [index, pageStyle, contentStyle]);
3337
3425
  }
3338
3426
  that.$pageWrapper.append($(skeletonEl));
3339
3427
  },
3340
3428
  _loadMorePages: function _loadMorePages() {
3341
- var that = this, pageCount = that.controller.getPageCount(), isViewPortBiggerThanPageHeight = that.$pageContainer.innerHeight() > that.$pageWrapper.innerHeight();
3429
+ var that = this;
3430
+ var pageCount = that.controller.getPageCount();
3431
+ var isViewPortBiggerThanPageHeight = that.$pageContainer.innerHeight() > that.$pageWrapper.innerHeight();
3342
3432
  if (pageCount > 1) {
3343
3433
  if (isViewPortBiggerThanPageHeight) {
3344
3434
  that.scrollInProgress = true;
3345
- var lastPage = parseInt(that.$placeholder.find(".trv-report-page").last().attr("data-page")), nextPage = lastPage + 1;
3435
+ var lastPage = parseInt(that.$placeholder.find(".trv-report-page").last().attr("data-page"));
3436
+ var nextPage = lastPage + 1;
3346
3437
  if (nextPage <= pageCount) {
3347
3438
  that.controller.getPageData(nextPage).then(function(newPage) {
3348
3439
  that._render(newPage, false);
@@ -3357,9 +3448,11 @@ var telerikReportViewer = (() => {
3357
3448
  }
3358
3449
  },
3359
3450
  _loadVisiblePages: function _loadVisiblePages() {
3360
- var that = this, pages = that.$placeholder.find(".trv-report-page");
3451
+ var that = this;
3452
+ var pages = that.$placeholder.find(".trv-report-page");
3361
3453
  $.each(pages, function(index, value) {
3362
- var pageItem = $(value), pageNumber = parseInt(pageItem.attr("data-page"));
3454
+ var pageItem = $(value);
3455
+ var pageNumber = parseInt(pageItem.attr("data-page"));
3363
3456
  if (that._scrolledInToView(pageItem) && that._isSkeletonScreen(pageItem, pageNumber)) {
3364
3457
  that.controller.getPageData(pageNumber).then(function(newPage) {
3365
3458
  that._render(newPage, false);
@@ -3368,17 +3461,29 @@ var telerikReportViewer = (() => {
3368
3461
  });
3369
3462
  },
3370
3463
  _scrolledInToView: function _scrolledInToView(elem) {
3371
- 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;
3464
+ var pageCoords = elem[0].getBoundingClientRect();
3465
+ var parentCoords = elem.closest(".trv-pages-area")[0].getBoundingClientRect();
3466
+ var parentTop = parentCoords.top;
3467
+ var parentBottom = parentCoords.top + parentCoords.height;
3468
+ var pageTop = pageCoords.top;
3469
+ var pageBottom = pageTop + elem.outerHeight(true);
3470
+ var additionalTopOffset = this.additionalTopOffset + parentTop;
3471
+ var topVisible = pageTop > 0 && pageTop < parentBottom;
3472
+ var bottomVisible = pageBottom < parentBottom && pageBottom > additionalTopOffset;
3372
3473
  return topVisible || bottomVisible;
3373
3474
  },
3374
3475
  _render: function _render(page, empty) {
3375
- var that = this, pageNumber = page.pageNumber, pageItem = that.$placeholder.find('[data-page="' + pageNumber + '"]');
3476
+ var that = this;
3477
+ var pageNumber = page.pageNumber;
3478
+ var pageItem = that.$placeholder.find('[data-page="' + pageNumber + '"]');
3376
3479
  if (!empty && pageItem && pageItem.length && !that._isSkeletonScreen(pageItem, pageNumber)) {
3377
3480
  return;
3378
3481
  }
3379
3482
  that.loadedPage[pageNumber] = page;
3380
3483
  that._updatePageStyle(page);
3381
- var wrapper = $($.parseHTML(page.pageContent)), $pageContent = wrapper.find("div.sheet"), $page = $('<div class="trv-report-page" data-page="' + pageNumber + '"></div>');
3484
+ var wrapper = $($.parseHTML(page.pageContent));
3485
+ var $pageContent = wrapper.find("div.sheet");
3486
+ var $page = $('<div class="trv-report-page" data-page="' + pageNumber + '"></div>');
3382
3487
  $pageContent.css("margin", 0);
3383
3488
  $page.append($pageContent).append($('<div class="trv-page-overlay"></div>'));
3384
3489
  if (empty) {
@@ -3394,14 +3499,18 @@ var telerikReportViewer = (() => {
3394
3499
  that.controller.scrollPageReady({ page, target: $page });
3395
3500
  },
3396
3501
  _updatePageStyle: function _updatePageStyle(page) {
3397
- var that = this, lastLoadedPage = that.loadedPage[that._lastLoadedPage()] || page, styleId = "trv-" + that.controller.clientId() + "-styles", pageStyles;
3502
+ var that = this;
3503
+ var lastLoadedPage = that.loadedPage[that._lastLoadedPage()] || page;
3504
+ var styleId = "trv-" + that.controller.clientId() + "-styles";
3505
+ var pageStyles;
3398
3506
  $("#" + styleId).remove();
3399
3507
  pageStyles = $("<style id=" + styleId + "></style>");
3400
3508
  pageStyles.append(lastLoadedPage.pageStyles);
3401
3509
  pageStyles.appendTo("head");
3402
3510
  },
3403
3511
  _lastLoadedPage: function _lastLoadedPage() {
3404
- var that = this, lastKey;
3512
+ var that = this;
3513
+ var lastKey;
3405
3514
  for (var key in that.loadedPage) {
3406
3515
  if (that.loadedPage.hasOwnProperty(key)) {
3407
3516
  lastKey = key;
@@ -3410,7 +3519,11 @@ var telerikReportViewer = (() => {
3410
3519
  return lastKey;
3411
3520
  },
3412
3521
  _loadNextPreviousPage: function _loadNextPreviousPage(pageNumber) {
3413
- var that = this, nextPage, previousPage, nextItem, previousItem;
3522
+ var that = this;
3523
+ var nextPage;
3524
+ var previousPage;
3525
+ var nextItem;
3526
+ var previousItem;
3414
3527
  if (pageNumber < that.controller.getPageCount()) {
3415
3528
  nextPage = pageNumber + 1;
3416
3529
  nextItem = that.$placeholder.find('[data-page="' + nextPage + '"]');
@@ -3431,7 +3544,9 @@ var telerikReportViewer = (() => {
3431
3544
  }
3432
3545
  },
3433
3546
  _clickPage: function _clickPage(pageDom) {
3434
- var that = this, currentPage = that._currentPageNumber(), pageNumber = parseInt(pageDom.attr("data-page"));
3547
+ var that = this;
3548
+ var currentPage = that._currentPageNumber();
3549
+ var pageNumber = parseInt(pageDom.attr("data-page"));
3435
3550
  if (currentPage !== pageNumber) {
3436
3551
  if (that._isSkeletonScreen(pageDom, pageNumber)) {
3437
3552
  that.controller.getPageData(pageNumber).then(function(newPage) {
@@ -3449,7 +3564,8 @@ var telerikReportViewer = (() => {
3449
3564
  that._clickPage($(e.currentTarget));
3450
3565
  });
3451
3566
  that.$pageContainer.scroll(function() {
3452
- var pages = that.$placeholder.find(".trv-report-page"), scrollPosition = parseInt((that.$pageContainer.scrollTop() + that.$pageContainer.innerHeight()).toFixed(0));
3567
+ var pages = that.$placeholder.find(".trv-report-page");
3568
+ var scrollPosition = parseInt((that.$pageContainer.scrollTop() + that.$pageContainer.innerHeight()).toFixed(0));
3453
3569
  if (!that.scrollInProgress && that.oldScrollTopPosition !== scrollPosition) {
3454
3570
  if (that.oldScrollTopPosition > scrollPosition) {
3455
3571
  that._scrollUp(pages);
@@ -3460,7 +3576,8 @@ var telerikReportViewer = (() => {
3460
3576
  that.oldScrollTopPosition = scrollPosition;
3461
3577
  });
3462
3578
  that.$pageContainer.scroll(function() {
3463
- var pages = that.$placeholder.find(".trv-report-page"), scrollPosition = parseInt((that.$pageContainer.scrollTop() + that.$pageContainer.innerHeight()).toFixed(0));
3579
+ var pages = that.$placeholder.find(".trv-report-page");
3580
+ var scrollPosition = parseInt((that.$pageContainer.scrollTop() + that.$pageContainer.innerHeight()).toFixed(0));
3464
3581
  if (!that.scrollInProgress && pages.length && that.oldScrollTopPosition !== scrollPosition) {
3465
3582
  that._advanceCurrentPage(pages);
3466
3583
  }
@@ -3473,7 +3590,10 @@ var telerikReportViewer = (() => {
3473
3590
  },
3474
3591
  _advanceCurrentPage: function _advanceCurrentPage(pages) {
3475
3592
  var that = this;
3476
- var newCurrentPage = that._findNewCurrentPage(pages), pageNumber, currentPageNumber = that._currentPageNumber(), currentPageIsInToView = that._scrolledInToView(that.$placeholder.find('[data-page="' + currentPageNumber + '"]'));
3593
+ var newCurrentPage = that._findNewCurrentPage(pages);
3594
+ var pageNumber;
3595
+ var currentPageNumber = that._currentPageNumber();
3596
+ var currentPageIsInToView = that._scrolledInToView(that.$placeholder.find('[data-page="' + currentPageNumber + '"]'));
3477
3597
  if (newCurrentPage !== -1) {
3478
3598
  newCurrentPage = $(newCurrentPage);
3479
3599
  pageNumber = parseInt(newCurrentPage.attr("data-page"));
@@ -3493,7 +3613,9 @@ var telerikReportViewer = (() => {
3493
3613
  },
3494
3614
  // Binary search
3495
3615
  _findNewCurrentPage: function _findNewCurrentPage(pages) {
3496
- var that = this, middleIndex = Math.floor(pages.length / 2), result = that._findPageInViewPort(middleIndex, pages);
3616
+ var that = this;
3617
+ var middleIndex = Math.floor(pages.length / 2);
3618
+ var result = that._findPageInViewPort(middleIndex, pages);
3497
3619
  if (pages.length === 1) {
3498
3620
  return pages[0];
3499
3621
  }
@@ -3508,7 +3630,15 @@ var telerikReportViewer = (() => {
3508
3630
  }
3509
3631
  },
3510
3632
  _findPageInViewPort: function _findPageInViewPort(index, pages) {
3511
- 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;
3633
+ var pageItem = this.$placeholder.find(pages[index]);
3634
+ var pageCoords = pageItem[0].getBoundingClientRect();
3635
+ var parentCoords = pageItem.closest(".trv-pages-area")[0].getBoundingClientRect();
3636
+ var parentTop = parentCoords.top;
3637
+ var parentBottom = parentCoords.top + parentCoords.height;
3638
+ var pageTop = pageCoords.top;
3639
+ var pageBottom = pageTop + pageItem.outerHeight(true);
3640
+ var additionalTopOffset = this.additionalTopOffset + parentTop;
3641
+ var isCurentPage = pageTop <= additionalTopOffset && additionalTopOffset < pageBottom;
3512
3642
  if (isCurentPage) {
3513
3643
  return 0;
3514
3644
  }
@@ -3521,7 +3651,8 @@ var telerikReportViewer = (() => {
3521
3651
  _scrollDown: function _scrollDown(pages, scrollPosition) {
3522
3652
  var that = this;
3523
3653
  if (scrollPosition >= that.pageContainer.scrollHeight - 5) {
3524
- var lastPage = parseInt($(pages[pages.length - 1]).attr("data-page")), nextPage = lastPage + 1;
3654
+ var lastPage = parseInt($(pages[pages.length - 1]).attr("data-page"));
3655
+ var nextPage = lastPage + 1;
3525
3656
  if (that._currentPageNumber() < nextPage && nextPage <= that.controller.getPageCount()) {
3526
3657
  that._addSkeletonScreen(nextPage, false);
3527
3658
  that.controller.getPageData(nextPage).then(function(newPage) {
@@ -3536,7 +3667,9 @@ var telerikReportViewer = (() => {
3536
3667
  _scrollUp: function _scrollUp(pages) {
3537
3668
  var that = this;
3538
3669
  if (that.$pageContainer.scrollTop() === 0) {
3539
- var firstPage = $(pages[0]), pageNumber = parseInt(firstPage.attr("data-page")), previousPage = pageNumber - 1;
3670
+ var firstPage = $(pages[0]);
3671
+ var pageNumber = parseInt(firstPage.attr("data-page"));
3672
+ var previousPage = pageNumber - 1;
3540
3673
  if (that._currentPageNumber() > previousPage && previousPage >= 1) {
3541
3674
  that._addSkeletonScreen(previousPage, true);
3542
3675
  that.controller.getPageData(previousPage).then(function(newPage) {
@@ -3550,7 +3683,12 @@ var telerikReportViewer = (() => {
3550
3683
  }
3551
3684
  },
3552
3685
  _keepCurrentPageInToView: function _keepCurrentPageInToView() {
3553
- var that = this, currentPage = that.$placeholder.find('[data-page="' + that._currentPageNumber() + '"]'), currentPagePosition = currentPage.position().top, currentPageHeight = currentPage.innerHeight(), pageContainerHeight = that.$pageContainer.innerHeight(), emptyView;
3686
+ var that = this;
3687
+ var currentPage = that.$placeholder.find('[data-page="' + that._currentPageNumber() + '"]');
3688
+ var currentPagePosition = currentPage.position().top;
3689
+ var currentPageHeight = currentPage.innerHeight();
3690
+ var pageContainerHeight = that.$pageContainer.innerHeight();
3691
+ var emptyView;
3554
3692
  that.scrollInProgress = true;
3555
3693
  if (currentPageHeight < pageContainerHeight) {
3556
3694
  emptyView = (pageContainerHeight - currentPageHeight) / 2;
@@ -3848,7 +3986,29 @@ var telerikReportViewer = (() => {
3848
3986
  var controller = options.controller;
3849
3987
  if (!controller)
3850
3988
  throw "No controller (telerikReportViewer.reportViewerController) has been specified.";
3851
- 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;
3989
+ var $placeholder = $(placeholder);
3990
+ var $pageContainer = $placeholder.find(".trv-page-container");
3991
+ var pageContainer = $pageContainer[0];
3992
+ var $pageWrapper = $placeholder.find(".trv-page-wrapper");
3993
+ var pageWrapper = $pageWrapper[0];
3994
+ var $errorMessage = $placeholder.find(".trv-error-message");
3995
+ var actions;
3996
+ var pendingElement;
3997
+ var pageScaleMode = ScaleModes.SPECIFIC;
3998
+ var pageScale = 1;
3999
+ var minPageScale = 0.1;
4000
+ var maxPageScale = 8;
4001
+ var documentReady = true;
4002
+ var navigateToPageOnDocReady;
4003
+ var navigateToElementOnDocReady;
4004
+ var isNewReportSource;
4005
+ var showErrorTimeoutId;
4006
+ var showPageAreaImage = false;
4007
+ var reportPageIsLoaded = false;
4008
+ var pageAreaImageStyle = '.trv-page-container {background: #ffffff url("{0}") no-repeat center 50px}';
4009
+ var pageAreaImageID = "trv-initial-image-styles";
4010
+ var scroll = extend({}, Scroll, {});
4011
+ var uiFreezeCoordinator = null;
3852
4012
  init2();
3853
4013
  if (scroll) {
3854
4014
  scroll.init(placeholder, options);
@@ -4002,7 +4162,8 @@ var telerikReportViewer = (() => {
4002
4162
  }
4003
4163
  });
4004
4164
  function enableTouch(dom) {
4005
- var allowSwipeLeft, allowSwipeRight;
4165
+ var allowSwipeLeft;
4166
+ var allowSwipeRight;
4006
4167
  TouchBehavior(
4007
4168
  dom,
4008
4169
  {
@@ -4124,7 +4285,9 @@ var telerikReportViewer = (() => {
4124
4285
  $nextFocusable.focus();
4125
4286
  }
4126
4287
  }
4127
- var container = $pageContainer[0], offsetTop = 0, offsetLeft = 0;
4288
+ var container = $pageContainer[0];
4289
+ var offsetTop = 0;
4290
+ var offsetLeft = 0;
4128
4291
  while (el && el !== container) {
4129
4292
  if ($(el).is(".trv-page-wrapper")) {
4130
4293
  var scale2 = $(el).data("pageScale");
@@ -4168,7 +4331,8 @@ var telerikReportViewer = (() => {
4168
4331
  (error ? $.fn.addClass : $.fn.removeClass).call($placeholder, "trv-error");
4169
4332
  }
4170
4333
  function pageNo(page, no) {
4171
- var $page = page.$ ? page : $(page), dataKey = "pageNumber";
4334
+ var $page = page.$ ? page : $(page);
4335
+ var dataKey = "pageNumber";
4172
4336
  if (no === void 0) {
4173
4337
  return $page.data(dataKey);
4174
4338
  }
@@ -4181,12 +4345,21 @@ var telerikReportViewer = (() => {
4181
4345
  navigateToPageOnDocReady = null;
4182
4346
  }
4183
4347
  function setPageDimensions(page, scaleMode, scale2, pageNumber) {
4184
- 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];
4348
+ var $target = $(page);
4349
+ var $page = pageNumber ? $target : $target.find("div.trv-report-page");
4350
+ var $pageContent = $page.find("div.sheet");
4351
+ var $pageSkeletonContent = $page.find("div.trv-skeleton-wrapper");
4352
+ var pageContent = $pageContent[0] || $pageSkeletonContent[0];
4353
+ var pageSkeletonContent = $pageSkeletonContent[0];
4185
4354
  if (!pageContent)
4186
4355
  return;
4187
- var pageWidth, pageHeight, box = $target.data("box");
4356
+ var pageWidth;
4357
+ var pageHeight;
4358
+ var box = $target.data("box");
4188
4359
  if (!box) {
4189
- var margins = getMargins($target), borders = getBorderWidth($page), padding = getPadding($page);
4360
+ var margins = getMargins($target);
4361
+ var borders = getBorderWidth($page);
4362
+ var padding = getPadding($page);
4190
4363
  box = {
4191
4364
  padLeft: margins.left + borders.left + padding.left,
4192
4365
  padRight: margins.right + borders.right + padding.right,
@@ -4204,7 +4377,9 @@ var telerikReportViewer = (() => {
4204
4377
  pageWidth = $target.data("pageWidth");
4205
4378
  pageHeight = $target.data("pageHeight");
4206
4379
  }
4207
- 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;
4380
+ var scrollBarV = pageHeight > pageWidth && scaleMode === ScaleModes.FIT_PAGE_WIDTH ? 20 : 0;
4381
+ var scaleW = (pageContainer.clientWidth - scrollBarV - box.padLeft - box.padRight) / pageWidth;
4382
+ var scaleH = (pageContainer.clientHeight - 1 - box.padTop - box.padBottom) / pageHeight;
4208
4383
  if (scaleMode === ScaleModes.FIT_PAGE_WIDTH) {
4209
4384
  scale2 = scaleW;
4210
4385
  } else if (!scale2 || scaleMode === ScaleModes.FIT_PAGE) {
@@ -4239,7 +4414,8 @@ var telerikReportViewer = (() => {
4239
4414
  }
4240
4415
  function onInteractiveItemClick(event) {
4241
4416
  var $eventTarget = $(this);
4242
- var actionId = $eventTarget.attr("data-reporting-action"), action = getAction(actionId);
4417
+ var actionId = $eventTarget.attr("data-reporting-action");
4418
+ var action = getAction(actionId);
4243
4419
  if (action) {
4244
4420
  navigateToPageOnDocReady = getNavigateToPageOnDocReady(event, action.Type);
4245
4421
  controller.executeReportAction({
@@ -4375,7 +4551,10 @@ var telerikReportViewer = (() => {
4375
4551
  function setPageContent(page) {
4376
4552
  actions = JSON.parse(page.pageActions);
4377
4553
  updatePageStyle(page);
4378
- var pageNumber = page.pageNumber, wrapper = $($.parseHTML(page.pageContent)), $pageContent = wrapper.find("div.sheet"), $page = $('<div class="trv-report-page" data-page="' + pageNumber + '"></div>');
4554
+ var pageNumber = page.pageNumber;
4555
+ var wrapper = $($.parseHTML(page.pageContent));
4556
+ var $pageContent = wrapper.find("div.sheet");
4557
+ var $page = $('<div class="trv-report-page" data-page="' + pageNumber + '"></div>');
4379
4558
  $pageContent.css("margin", 0);
4380
4559
  $page.append($pageContent).append($('<div class="trv-page-overlay"></div>'));
4381
4560
  var $target = $pageWrapper.empty().removeData().data("pageNumber", pageNumber).append($page);
@@ -4576,7 +4755,12 @@ var telerikReportViewer = (() => {
4576
4755
  containerTabIndex = 300;
4577
4756
  }
4578
4757
  }
4579
- 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;
4758
+ var wrapper = editor.closest(".trv-parameter-value");
4759
+ var selectAll = wrapper.find(".trv-select-all");
4760
+ var clearSelection = wrapper.find(".trv-select-none");
4761
+ var widgetParent = editor.closest(".k-widget");
4762
+ var hasFocusableElement = widgetParent.find(".k-input");
4763
+ var isComboWidget = hasFocusableElement && hasFocusableElement.length;
4580
4764
  if (selectAll && selectAll.length) {
4581
4765
  selectAll.attr("tabindex", containerTabIndex + ++editorsIndex);
4582
4766
  }
@@ -4618,7 +4802,14 @@ var telerikReportViewer = (() => {
4618
4802
  var $placeholder = $(placeholder);
4619
4803
  var enabled = true;
4620
4804
  $placeholder.html(options.templates["trv-parameter-editor-available-values-multiselect"]);
4621
- 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;
4805
+ var $list = $placeholder.find(".trv-list");
4806
+ var $selectAll = $placeholder.find(".trv-select-all");
4807
+ var $selectNone = $placeholder.find(".trv-select-none");
4808
+ var listView;
4809
+ var parameter;
4810
+ var updateTimeout;
4811
+ var valueChangeCallback = options.parameterChanged;
4812
+ var initialized;
4622
4813
  $selectAll.text(stringResources[$selectAll.text()]);
4623
4814
  $selectAll.click(function(e) {
4624
4815
  e.preventDefault();
@@ -4650,7 +4841,8 @@ var telerikReportViewer = (() => {
4650
4841
  });
4651
4842
  }
4652
4843
  function notifyParameterChanged(selection) {
4653
- var availableValues = parameter.availableValues, values = $.map(selection, function(item) {
4844
+ var availableValues = parameter.availableValues;
4845
+ var values = $.map(selection, function(item) {
4654
4846
  return availableValues[$(item).index()].value;
4655
4847
  });
4656
4848
  clearPendingChange();
@@ -4783,7 +4975,18 @@ var telerikReportViewer = (() => {
4783
4975
  {
4784
4976
  match: parameterEditorsMatch.MultiSelectCombo,
4785
4977
  createEditor: function(placeholder, options) {
4786
- 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;
4978
+ var $placeholder = $(placeholder);
4979
+ var enabled = true;
4980
+ var selector2 = ".trv-combo";
4981
+ var template = "trv-parameter-editor-available-values-multiselect-combo";
4982
+ var valueChangeCallback = options.parameterChanged;
4983
+ var $editorDom;
4984
+ var $selectNone;
4985
+ var $selectAll;
4986
+ var editor;
4987
+ var updateTimeout;
4988
+ var popUpIsClosed = true;
4989
+ var parameter;
4787
4990
  $placeholder.html(options.templates[template]);
4788
4991
  $editorDom = $placeholder.find(selector2);
4789
4992
  $selectNone = $placeholder.find(".trv-select-none");
@@ -4905,7 +5108,11 @@ var telerikReportViewer = (() => {
4905
5108
  var $placeholder = $(placeholder);
4906
5109
  var enabled = true;
4907
5110
  $placeholder.html(options.templates["trv-parameter-editor-available-values"]);
4908
- var $list = $placeholder.find(".trv-list"), $selectNone = $placeholder.find(".trv-select-none"), listView, parameter, valueChangeCallback = options.parameterChanged;
5111
+ var $list = $placeholder.find(".trv-list");
5112
+ var $selectNone = $placeholder.find(".trv-select-none");
5113
+ var listView;
5114
+ var parameter;
5115
+ var valueChangeCallback = options.parameterChanged;
4909
5116
  if ($selectNone) {
4910
5117
  $selectNone.text(stringResources[$selectNone.text()]);
4911
5118
  $selectNone.click(function(e) {
@@ -4918,7 +5125,8 @@ var telerikReportViewer = (() => {
4918
5125
  notifyParameterChanged(selection);
4919
5126
  }
4920
5127
  function notifyParameterChanged(selection) {
4921
- var availableValues = parameter.availableValues, values = $.map(selection, function(item) {
5128
+ var availableValues = parameter.availableValues;
5129
+ var values = $.map(selection, function(item) {
4922
5130
  return availableValues[$(item).index()].value;
4923
5131
  });
4924
5132
  if (Array.isArray(values)) {
@@ -5004,7 +5212,15 @@ var telerikReportViewer = (() => {
5004
5212
  {
5005
5213
  match: parameterEditorsMatch.SingleSelectCombo,
5006
5214
  createEditor: function(placeholder, options) {
5007
- var $placeholder = $(placeholder), enabled = true, selector2 = ".trv-combo", template = "trv-parameter-editor-available-values-combo", valueChangeCallback = options.parameterChanged, $editorDom, $selectNone, editor, parameter;
5215
+ var $placeholder = $(placeholder);
5216
+ var enabled = true;
5217
+ var selector2 = ".trv-combo";
5218
+ var template = "trv-parameter-editor-available-values-combo";
5219
+ var valueChangeCallback = options.parameterChanged;
5220
+ var $editorDom;
5221
+ var $selectNone;
5222
+ var editor;
5223
+ var parameter;
5008
5224
  $placeholder.html(options.templates[template]);
5009
5225
  $editorDom = $placeholder.find(selector2);
5010
5226
  $selectNone = $placeholder.find(".trv-select-none");
@@ -5020,7 +5236,8 @@ var telerikReportViewer = (() => {
5020
5236
  notifyParameterChanged(selection, value);
5021
5237
  }
5022
5238
  function notifyParameterChanged(selection, value) {
5023
- var values = value || "", availableValues;
5239
+ var values = value || "";
5240
+ var availableValues;
5024
5241
  if (!value && selection >= 0) {
5025
5242
  availableValues = parameter.availableValues;
5026
5243
  values = availableValues[selection].value;
@@ -5088,7 +5305,8 @@ var telerikReportViewer = (() => {
5088
5305
  {
5089
5306
  match: parameterEditorsMatch.MultiValue,
5090
5307
  createEditor: function(placeholder, options) {
5091
- var $placeholder = $(placeholder), parameter;
5308
+ var $placeholder = $(placeholder);
5309
+ var parameter;
5092
5310
  $placeholder.html(options.templates["trv-parameter-editor-multivalue"]);
5093
5311
  var $textArea = $placeholder.find("textarea").on("change", function() {
5094
5312
  if (options.parameterChanged) {
@@ -5121,7 +5339,8 @@ var telerikReportViewer = (() => {
5121
5339
  {
5122
5340
  match: parameterEditorsMatch.DateTime,
5123
5341
  createEditor: function(placeholder, options) {
5124
- var $placeholder = $(placeholder), parameter;
5342
+ var $placeholder = $(placeholder);
5343
+ var parameter;
5125
5344
  $placeholder.html(options.templates["trv-parameter-editor-datetime"]);
5126
5345
  try {
5127
5346
  var $dateTimePicker = $placeholder.find("input[type=datetime]").kendoDatePicker({
@@ -5179,7 +5398,8 @@ var telerikReportViewer = (() => {
5179
5398
  {
5180
5399
  match: parameterEditorsMatch.String,
5181
5400
  createEditor: function(placeholder, options) {
5182
- var $placeholder = $(placeholder), parameter;
5401
+ var $placeholder = $(placeholder);
5402
+ var parameter;
5183
5403
  $placeholder.html(options.templates["trv-parameter-editor-text"]);
5184
5404
  var $input = $placeholder.find('input[type="text"]').change(function() {
5185
5405
  if (options.parameterChanged) {
@@ -5213,7 +5433,9 @@ var telerikReportViewer = (() => {
5213
5433
  {
5214
5434
  match: parameterEditorsMatch.Number,
5215
5435
  createEditor: function(placeholder, options) {
5216
- var $placeholder = $(placeholder), parameter, inputBehavior;
5436
+ var $placeholder = $(placeholder);
5437
+ var parameter;
5438
+ var inputBehavior;
5217
5439
  $placeholder.html(options.templates["trv-parameter-editor-number"]);
5218
5440
  var $input = $placeholder.find("input[type=number]").on("change", function() {
5219
5441
  if (options.parameterChanged) {
@@ -5255,7 +5477,8 @@ var telerikReportViewer = (() => {
5255
5477
  {
5256
5478
  match: parameterEditorsMatch.Boolean,
5257
5479
  createEditor: function(placeholder, options) {
5258
- var $placeholder = $(placeholder), parameter;
5480
+ var $placeholder = $(placeholder);
5481
+ var parameter;
5259
5482
  $placeholder.html(options.templates["trv-parameter-editor-boolean"]);
5260
5483
  var $input = $placeholder.find("input[type=checkbox]").on("change", function() {
5261
5484
  if (options.parameterChanged) {
@@ -5304,7 +5527,8 @@ var telerikReportViewer = (() => {
5304
5527
 
5305
5528
  // src/perspectives.js
5306
5529
  function PerspectiveManager(dom, controller) {
5307
- var smallMenu = dom.querySelectorAll ? dom.querySelectorAll(".trv-menu-small")[0] : false, perspectives = {
5530
+ var smallMenu = dom.querySelectorAll ? dom.querySelectorAll(".trv-menu-small")[0] : false;
5531
+ var perspectives = {
5308
5532
  "small": {
5309
5533
  documentMapVisible: false,
5310
5534
  parametersAreaVisible: false,
@@ -5331,7 +5555,8 @@ var telerikReportViewer = (() => {
5331
5555
  documentMapVisible: true,
5332
5556
  parametersAreaVisible: true
5333
5557
  }
5334
- }, currentPerspective;
5558
+ };
5559
+ var currentPerspective;
5335
5560
  function init2() {
5336
5561
  currentPerspective = getPerspective();
5337
5562
  initStateFromController(perspectives["large"]);
@@ -5393,7 +5618,8 @@ var telerikReportViewer = (() => {
5393
5618
  window.removeEventListener("resize", onWindowResize);
5394
5619
  }
5395
5620
  function getPerspective() {
5396
- var windowWidthInEm = $(window).width() / parseFloat($("body").css("font-size")), windowMinWidth = 40.5;
5621
+ var windowWidthInEm = $(window).width() / parseFloat($("body").css("font-size"));
5622
+ var windowMinWidth = 40.5;
5397
5623
  return smallMenu && windowWidthInEm <= windowMinWidth ? "small" : "large";
5398
5624
  }
5399
5625
  function initStateFromController(state) {
@@ -5442,7 +5668,8 @@ var telerikReportViewer = (() => {
5442
5668
  var defaultOptions4 = {};
5443
5669
  function ServiceClient(options) {
5444
5670
  options = extend({}, defaultOptions4, options);
5445
- var baseUrl = rtrim(options.serviceUrl || options.baseUrl, "\\/"), loginPromise;
5671
+ var baseUrl = rtrim(options.serviceUrl || options.baseUrl, "\\/");
5672
+ var loginPromise;
5446
5673
  var _ajax = $ajax;
5447
5674
  function validateClientID(clientID) {
5448
5675
  if (!clientID)
@@ -5848,7 +6075,11 @@ var telerikReportViewer = (() => {
5848
6075
  state &= ~flags;
5849
6076
  }
5850
6077
  }
5851
- var controller = options.controller, historyManager = options.history, state = 0, refreshUI, commands = options.commands;
6078
+ var controller = options.controller;
6079
+ var historyManager = options.history;
6080
+ var state = 0;
6081
+ var refreshUI;
6082
+ var commands = options.commands;
5852
6083
  if (!controller) {
5853
6084
  throw "No controller (telerikReporting.ReportViewerController) has been specified.";
5854
6085
  }
@@ -5978,7 +6209,8 @@ var telerikReportViewer = (() => {
5978
6209
  if (!controller) {
5979
6210
  throw "No controller (telerikReporting.reportViewerController) has been specified.";
5980
6211
  }
5981
- var $placeholder = $(placeholder), $documentMap;
6212
+ var $placeholder = $(placeholder);
6213
+ var $documentMap;
5982
6214
  var documentMapVisible = options.documentMapVisible !== false;
5983
6215
  var enableAccessibility = options.enableAccessibility;
5984
6216
  var currentReport = null;
@@ -5991,7 +6223,9 @@ var telerikReportViewer = (() => {
5991
6223
  replaceStringResources($placeholder);
5992
6224
  }
5993
6225
  function onTreeViewSelectionChanged(e) {
5994
- var documentMapNode = this.dataItem(e.node), page = documentMapNode.page, id = documentMapNode.id;
6226
+ var documentMapNode = this.dataItem(e.node);
6227
+ var page = documentMapNode.page;
6228
+ var id = documentMapNode.id;
5995
6229
  controller.navigateToPage(page, {
5996
6230
  type: "bookmark",
5997
6231
  id
@@ -6065,7 +6299,8 @@ var telerikReportViewer = (() => {
6065
6299
  $placeholder.removeClass("trv-loading");
6066
6300
  }
6067
6301
  function showDocumentMap(show) {
6068
- var splitter = GlobalSettings.viewerInstances.find((element) => element.id === options.viewerSelector + "-document-map-splitter").instance, sibling = $placeholder.next();
6302
+ var splitter = GlobalSettings.viewerInstances.find((element) => element.id === options.viewerSelector + "-document-map-splitter").instance;
6303
+ var sibling = $placeholder.next();
6069
6304
  if (options.documentMapAreaPosition === DocumentMapAreaPositions.RIGHT) {
6070
6305
  sibling = $placeholder.prev();
6071
6306
  }
@@ -6141,8 +6376,14 @@ var telerikReportViewer = (() => {
6141
6376
  throw "No controller (telerikReporting.reportViewerController) has been specified.";
6142
6377
  }
6143
6378
  var parameterEditors = [].concat(options.parameterEditors, ParameterEditors);
6144
- var recentParameterValues, parameters, initialParameterValues, processedParameterValues = void 0;
6145
- var $placeholder = $(placeholder), $content = $placeholder.find(".trv-parameters-area-content"), $errorMessage = $placeholder.find(".trv-error-message"), $previewButton = $placeholder.find(".trv-parameters-area-preview-button");
6379
+ var recentParameterValues;
6380
+ var parameters;
6381
+ var initialParameterValues;
6382
+ var processedParameterValues = void 0;
6383
+ var $placeholder = $(placeholder);
6384
+ var $content = $placeholder.find(".trv-parameters-area-content");
6385
+ var $errorMessage = $placeholder.find(".trv-error-message");
6386
+ var $previewButton = $placeholder.find(".trv-parameters-area-preview-button");
6146
6387
  $previewButton.text(stringResources[$previewButton.text()]);
6147
6388
  $previewButton.attr("aria-label", stringResources[$previewButton.attr("aria-label")]);
6148
6389
  $previewButton.on("click", function(e) {
@@ -6173,7 +6414,14 @@ var telerikReportViewer = (() => {
6173
6414
  return $(parameterContainerTemplate);
6174
6415
  }
6175
6416
  function createParameterUI(parameter) {
6176
- 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);
6417
+ var $container = createParameterContainer();
6418
+ var $editorPlaceholder = $container.find(".trv-parameter-value");
6419
+ var $title = $container.find(".trv-parameter-title");
6420
+ var $error = $container.find(".trv-parameter-error");
6421
+ var $errorMessage2 = $container.find(".trv-parameter-error-message");
6422
+ var $useDefaultValueCheckbox = $container.find(".trv-parameter-use-default input");
6423
+ var editorsTypes = options.parameters && options.parameters.editors ? options.parameters.editors : null;
6424
+ var editorFactory = selectParameterEditorFactory(parameter, editorsTypes);
6177
6425
  var parameterText = escapeHtml(parameter.text);
6178
6426
  var isHiddenParameter = !parameter.isVisible;
6179
6427
  if (isHiddenParameter) {
@@ -6307,14 +6555,16 @@ var telerikReportViewer = (() => {
6307
6555
  processedParameterValues = {};
6308
6556
  parameters = newParameters || [];
6309
6557
  clearEditors();
6310
- var $parameterContainer, $tempContainer = $("<div></div>");
6558
+ var $parameterContainer;
6559
+ var $tempContainer = $("<div></div>");
6311
6560
  each(parameters, function() {
6312
6561
  try {
6313
6562
  this.value = ParameterValidators.validate(this, this.value);
6314
6563
  } catch (e) {
6315
6564
  this.Error = this.Error || e;
6316
6565
  }
6317
- var hasError = Boolean(this.Error), hasValue = !hasError;
6566
+ var hasError = Boolean(this.Error);
6567
+ var hasValue = !hasError;
6318
6568
  if (hasValue) {
6319
6569
  recentParameterValues[this.id] = this.value;
6320
6570
  if (this.availableValues) {
@@ -6532,7 +6782,8 @@ var telerikReportViewer = (() => {
6532
6782
  }
6533
6783
  function showParametersArea(show) {
6534
6784
  var trv = window.telerikReportViewer;
6535
- var splitter = GlobalSettings.viewerInstances.find((element) => element.id === options.viewerSelector + "-parameters-splitter").instance, sibling = $placeholder.prev();
6785
+ var splitter = GlobalSettings.viewerInstances.find((element) => element.id === options.viewerSelector + "-parameters-splitter").instance;
6786
+ var sibling = $placeholder.prev();
6536
6787
  if (options.parametersAreaPosition === ParametersAreaPositions.TOP || options.parametersAreaPosition === ParametersAreaPositions.LEFT) {
6537
6788
  sibling = $placeholder.next();
6538
6789
  }
@@ -6608,7 +6859,11 @@ var telerikReportViewer = (() => {
6608
6859
  var lastSelectedMenuItem;
6609
6860
  var lastSelectedSubmenuItem;
6610
6861
  function MainMenu(dom, rootOptions, otherOptions) {
6611
- var options = $.extend({}, rootOptions, otherOptions), menu = $(dom).data("kendoMenu"), childrenL1 = dom.childNodes, controller = options.controller, enableAccessibility = options.enableAccessibility;
6862
+ var options = $.extend({}, rootOptions, otherOptions);
6863
+ var menu = $(dom).data("kendoMenu");
6864
+ var childrenL1 = dom.childNodes;
6865
+ var controller = options.controller;
6866
+ var enableAccessibility = options.enableAccessibility;
6612
6867
  if (!controller) {
6613
6868
  throw "No controller (telerikReporting.ReportViewerController) has been specified.";
6614
6869
  }
@@ -6690,7 +6945,8 @@ var telerikReportViewer = (() => {
6690
6945
  }
6691
6946
  function fillFormats(formats) {
6692
6947
  each($(dom).find("ul[data-command-list=export-format-list]"), function() {
6693
- var $list = $(this), $parent = $list.parents("li");
6948
+ var $list = $(this);
6949
+ var $parent = $list.parents("li");
6694
6950
  var tabIndex = enableAccessibility ? $parent.attr("tabindex") : -1;
6695
6951
  if (!tabIndex) {
6696
6952
  tabIndex = 1;
@@ -6894,7 +7150,8 @@ var telerikReportViewer = (() => {
6894
7150
  return;
6895
7151
  }
6896
7152
  each(menuAreas, function() {
6897
- var $menu = $(this), menuItems = $menu.children("li.k-item");
7153
+ var $menu = $(this);
7154
+ var menuItems = $menu.children("li.k-item");
6898
7155
  $menu.attr("aria-label", stringResources[$menu.attr("aria-label")]);
6899
7156
  each(menuItems, function() {
6900
7157
  var $menuItem = $(this);
@@ -6927,7 +7184,33 @@ var telerikReportViewer = (() => {
6927
7184
  var defaultOptions7 = {};
6928
7185
  function Search(placeholder, options, viewerOptions) {
6929
7186
  options = $.extend({}, defaultOptions7, options);
6930
- 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 = "";
7187
+ var controller = options.controller;
7188
+ var initialized = false;
7189
+ var dialogVisible = false;
7190
+ var $placeholder;
7191
+ var $inputBox;
7192
+ var $searchOptionsPlaceholder;
7193
+ var searchOptionsMenu;
7194
+ var $stopSearchPlaceholder;
7195
+ var stopSearchMenu;
7196
+ var $navigationPlaceholder;
7197
+ var navigationMenu;
7198
+ var $resultsLabel;
7199
+ var $resultsPlaceholder;
7200
+ var kendoComboBox;
7201
+ var kendoSearchDialog;
7202
+ var stopSearchCommand;
7203
+ var optionsCommandSet;
7204
+ var navigationCommandSet;
7205
+ var searchResults;
7206
+ var mruList = [];
7207
+ var inputComboRebinding;
7208
+ var searchMetadataRequested;
7209
+ var searchMetadataLoaded;
7210
+ var pendingHighlightItem;
7211
+ var windowLocation;
7212
+ var reportViewerWrapper = $("[data-selector='" + viewerOptions.viewerSelector + "']").find(".trv-report-viewer");
7213
+ var lastSearch = "";
6931
7214
  var highlightManager = {
6932
7215
  shadedClassName: "trv-search-dialog-shaded-result",
6933
7216
  //the results that are found, but not selected (highlighted)
@@ -7096,7 +7379,12 @@ var telerikReportViewer = (() => {
7096
7379
  windowLocation = kendoWindow.offset();
7097
7380
  }
7098
7381
  function adjustDialogPosition() {
7099
- var windowWidth = $(window).innerWidth(), windowHeight = $(window).innerHeight(), kendoWindow = kendoSearchDialog.wrapper, width = kendoWindow.outerWidth(true), height = kendoWindow.outerHeight(true), padding = 10;
7382
+ var windowWidth = $(window).innerWidth();
7383
+ var windowHeight = $(window).innerHeight();
7384
+ var kendoWindow = kendoSearchDialog.wrapper;
7385
+ var width = kendoWindow.outerWidth(true);
7386
+ var height = kendoWindow.outerHeight(true);
7387
+ var padding = 10;
7100
7388
  if (!windowLocation) {
7101
7389
  var reportViewerCoords = reportViewerWrapper[0].getBoundingClientRect();
7102
7390
  kendoWindow.css({
@@ -7110,7 +7398,10 @@ var telerikReportViewer = (() => {
7110
7398
  }
7111
7399
  });
7112
7400
  } else {
7113
- var left = windowLocation.left, top = windowLocation.top, right = left + width, bottom = top + height;
7401
+ var left = windowLocation.left;
7402
+ var top = windowLocation.top;
7403
+ var right = left + width;
7404
+ var bottom = top + height;
7114
7405
  if (right > windowWidth - padding) {
7115
7406
  left = Math.max(padding, windowWidth - width - padding);
7116
7407
  kendoWindow.css({ left });
@@ -7208,7 +7499,9 @@ var telerikReportViewer = (() => {
7208
7499
  contentElement: "",
7209
7500
  template: "<div class='trv-search-dialog-results-row'><span>#: description #</span> <span class='trv-search-dialog-results-pageSpan'>" + stringResources.searchDialogPageText + " #:page#</span></div>",
7210
7501
  change: function() {
7211
- var index = this.select().index(), view = this.dataSource.view(), dataItem = view[index];
7502
+ var index = this.select().index();
7503
+ var view = this.dataSource.view();
7504
+ var dataItem = view[index];
7212
7505
  onSelectedItem(dataItem);
7213
7506
  updateUI(index, view.length);
7214
7507
  }
@@ -7323,7 +7616,9 @@ var telerikReportViewer = (() => {
7323
7616
  if (!results || results.length === 0) {
7324
7617
  return;
7325
7618
  }
7326
- var $parent = $placeholder.parent(), $pageContainer = $parent.find(".trv-page-container"), elements = $pageContainer.find("[data-search-id]");
7619
+ var $parent = $placeholder.parent();
7620
+ var $pageContainer = $parent.find(".trv-page-container");
7621
+ var elements = $pageContainer.find("[data-search-id]");
7327
7622
  each(results, function() {
7328
7623
  var $searchElement = elements.filter("[data-search-id=" + this.id + "]");
7329
7624
  if ($searchElement) {
@@ -7404,7 +7699,8 @@ var telerikReportViewer = (() => {
7404
7699
  $listView.select($selected);
7405
7700
  $listView.trigger("change");
7406
7701
  } else {
7407
- var index = $listView.select().trigger("change").index(), view = $listView.dataSource.view();
7702
+ var index = $listView.select().trigger("change").index();
7703
+ var view = $listView.dataSource.view();
7408
7704
  var newIndex = Math.min(view.length - 1, Math.max(0, index + offset));
7409
7705
  if (newIndex !== index) {
7410
7706
  var dataItem = view[newIndex];
@@ -7446,7 +7742,14 @@ var telerikReportViewer = (() => {
7446
7742
  if (!$search) {
7447
7743
  return;
7448
7744
  }
7449
- 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']");
7745
+ var $searchCaption = $search.find(".trv-search-dialog-caption-label");
7746
+ var $searchOptions = $search.find(".trv-search-dialog-search-options");
7747
+ var $searchStopButton = $search.find("a[data-command='telerik_ReportViewer_searchDialog_StopSearch']");
7748
+ var $searchMatchCaseButton = $search.find("a[data-command='telerik_ReportViewer_searchDialog_MatchCase']");
7749
+ var $searchMatchWholeWordButton = $search.find("a[data-command='telerik_ReportViewer_searchDialog_MatchWholeWord']");
7750
+ var $searchUseRegexButton = $search.find("a[data-command='telerik_ReportViewer_searchDialog_UseRegex']");
7751
+ var $searchNavigateUpButton = $search.find("a[data-command='telerik_ReportViewer_searchDialog_NavigateUp']");
7752
+ var $searchNavigateDownButton = $search.find("a[data-command='telerik_ReportViewer_searchDialog_NavigateDown']");
7450
7753
  replaceAttribute($search, "aria-label");
7451
7754
  replaceAttribute($searchOptions, "aria-label");
7452
7755
  replaceText($searchCaption);
@@ -7511,7 +7814,24 @@ var telerikReportViewer = (() => {
7511
7814
  var defaultOptions8 = {};
7512
7815
  function SendEmail(placeholder, options, viewerOptions) {
7513
7816
  options = $.extend({}, defaultOptions8, options);
7514
- 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");
7817
+ var controller = options.controller;
7818
+ var initialized = false;
7819
+ var dialogVisible = false;
7820
+ var $placeholder;
7821
+ var kendoSendEmailDialog;
7822
+ var selector2 = viewerOptions.viewerSelector;
7823
+ var inputFrom;
7824
+ var inputTo;
7825
+ var inputCC;
7826
+ var inputSubject;
7827
+ var docFormat;
7828
+ var docFormatEl;
7829
+ var bodyEditorEl;
7830
+ var bodyEditor;
7831
+ var docFormatList;
7832
+ var optionsCommandSet;
7833
+ var windowLocation;
7834
+ var reportViewerWrapper = $("[data-selector='" + selector2 + "']").find(".trv-report-viewer");
7515
7835
  if (!controller) {
7516
7836
  throw "No controller (telerikReporting.ReportViewerController) has been specified.";
7517
7837
  }
@@ -7662,11 +7982,13 @@ var telerikReportViewer = (() => {
7662
7982
  });
7663
7983
  function setAttrs() {
7664
7984
  $placeholder.find(".trv-send-email-field input").each(function() {
7665
- var el = $(this), attrName = el.attr("name");
7985
+ var el = $(this);
7986
+ var attrName = el.attr("name");
7666
7987
  el.attr("id", selector2 + "-" + attrName);
7667
7988
  });
7668
7989
  $placeholder.find(".trv-send-email-label label").each(function() {
7669
- var el = $(this), attrName = el.attr("for");
7990
+ var el = $(this);
7991
+ var attrName = el.attr("for");
7670
7992
  el.attr("for", selector2 + "-" + attrName);
7671
7993
  });
7672
7994
  }
@@ -7675,7 +7997,9 @@ var telerikReportViewer = (() => {
7675
7997
  windowLocation = kendoWindow.offset();
7676
7998
  }
7677
7999
  function adjustDialogSize() {
7678
- var kendoWindow = kendoSendEmailDialog.element.parent(".k-window"), windowWidth = $(window).width(), kendoWindowWidth = 350;
8000
+ var kendoWindow = kendoSendEmailDialog.element.parent(".k-window");
8001
+ var windowWidth = $(window).width();
8002
+ var kendoWindowWidth = 350;
7679
8003
  if (windowWidth > 800) {
7680
8004
  kendoWindowWidth = 720;
7681
8005
  }
@@ -7688,7 +8012,16 @@ var telerikReportViewer = (() => {
7688
8012
  if (!windowLocation) {
7689
8013
  kendoSendEmailDialog.center();
7690
8014
  } else {
7691
- 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;
8015
+ var padding = 10;
8016
+ var windowWidth = $(window).innerWidth();
8017
+ var windowHeight = $(window).innerHeight();
8018
+ var kendoWindow = kendoSendEmailDialog.wrapper;
8019
+ var width = kendoWindow.outerWidth(true);
8020
+ var height = kendoWindow.outerHeight(true);
8021
+ var left = windowLocation.left;
8022
+ var top = windowLocation.top;
8023
+ var right = left + width;
8024
+ var bottom = top + height;
7692
8025
  if (right > windowWidth - padding) {
7693
8026
  left = Math.max(padding, windowWidth - width - padding);
7694
8027
  kendoWindow.css({ left });
@@ -7767,7 +8100,10 @@ var telerikReportViewer = (() => {
7767
8100
  });
7768
8101
  }
7769
8102
  function validateFields() {
7770
- var fromIsValid = isEmpty(inputFrom) || !isValidEmail(inputFrom, false), toIsValid = isEmpty(inputTo) || !isValidEmail(inputTo, true), ccIsValid = inputCC.val().length && !isValidEmail(inputCC, true), hasFormat = docFormat.value().length;
8103
+ var fromIsValid = isEmpty(inputFrom) || !isValidEmail(inputFrom, false);
8104
+ var toIsValid = isEmpty(inputTo) || !isValidEmail(inputTo, true);
8105
+ var ccIsValid = inputCC.val().length && !isValidEmail(inputCC, true);
8106
+ var hasFormat = docFormat.value().length;
7771
8107
  if (!hasFormat) {
7772
8108
  showError(docFormatEl, "data-required-msg");
7773
8109
  }
@@ -7840,7 +8176,9 @@ var telerikReportViewer = (() => {
7840
8176
  if (!$sendEmailDialog) {
7841
8177
  return;
7842
8178
  }
7843
- var labels = $sendEmailDialog.find(".trv-replace-string"), ariaLabel = $sendEmailDialog.find("[aria-label]"), titles = $sendEmailDialog.find("[title]");
8179
+ var labels = $sendEmailDialog.find(".trv-replace-string");
8180
+ var ariaLabel = $sendEmailDialog.find("[aria-label]");
8181
+ var titles = $sendEmailDialog.find("[title]");
7844
8182
  if (labels.length) {
7845
8183
  $.each(labels, function(key, value) {
7846
8184
  replaceText($(value));
@@ -7905,7 +8243,15 @@ var telerikReportViewer = (() => {
7905
8243
 
7906
8244
  // src/sideMenu.js
7907
8245
  function SideMenu(dom, rootOptions, otherOptions) {
7908
- var options = $.extend({}, rootOptions, otherOptions), menu = $(dom).data("kendoMenu"), enableAccessibility = options.enableAccessibility, lastSelectedMenuItem2, DEFAULT_TABINDEX = 3, panelBar, loadingFormats, sideMenuVisible = false, controller = options.controller;
8246
+ var options = $.extend({}, rootOptions, otherOptions);
8247
+ var menu = $(dom).data("kendoMenu");
8248
+ var enableAccessibility = options.enableAccessibility;
8249
+ var lastSelectedMenuItem2;
8250
+ var DEFAULT_TABINDEX = 3;
8251
+ var panelBar;
8252
+ var loadingFormats;
8253
+ var sideMenuVisible = false;
8254
+ var controller = options.controller;
7909
8255
  if (!controller) {
7910
8256
  throw "No controller (telerikReporting.ReportViewerController) has been specified.";
7911
8257
  }
@@ -7967,7 +8313,8 @@ var telerikReportViewer = (() => {
7967
8313
  }
7968
8314
  function fillFormats(formats) {
7969
8315
  each($(dom).find("ul[data-command-list=export-format-list]"), function() {
7970
- var $list = $(this), $parent = $list.parents("li");
8316
+ var $list = $(this);
8317
+ var $parent = $list.parents("li");
7971
8318
  var tabIndex = $parent.attr("tabindex");
7972
8319
  if (!tabIndex) {
7973
8320
  tabIndex = DEFAULT_TABINDEX;
@@ -8095,10 +8442,12 @@ var telerikReportViewer = (() => {
8095
8442
  return;
8096
8443
  }
8097
8444
  each(menuAreas, function() {
8098
- var $menu = $(this), menuItems = $menu.children("li.k-panelbar-header");
8445
+ var $menu = $(this);
8446
+ var menuItems = $menu.children("li.k-panelbar-header");
8099
8447
  $menu.attr("aria-label", stringResources[$menu.attr("aria-label")]);
8100
8448
  each(menuItems, function() {
8101
- var $menuItem = $(this), $a = $menuItem.find("a");
8449
+ var $menuItem = $(this);
8450
+ var $a = $menuItem.find("a");
8102
8451
  $menuItem.attr("aria-label", stringResources[$menuItem.attr("aria-label")]);
8103
8452
  if ($a) {
8104
8453
  var $span = $a.find("span:not(.k-icon)");
@@ -8316,18 +8665,31 @@ var telerikReportViewer = (() => {
8316
8665
  };
8317
8666
  }
8318
8667
  function ReportViewer(dom, options) {
8319
- var svcApiUrl = options.serviceUrl, reportServerUrlSVCApiUrl = "";
8668
+ var svcApiUrl = options.serviceUrl;
8669
+ var reportServerUrlSVCApiUrl = "";
8320
8670
  if (options.reportServer) {
8321
8671
  reportServerUrlSVCApiUrl = rtrim(options.reportServer.url, "\\/");
8322
8672
  svcApiUrl = reportServerUrlSVCApiUrl + "/api/reports";
8323
8673
  }
8324
- var $placeholder = $(dom), templates = {}, persistanceKey = options.id || "#" + $placeholder.attr("id"), accessibility, settings = {}, client = {}, controller = {}, perspectiveManager = {}, history = {}, commands = {}, viewer = {}, serviceClientOptions = {}, reportServerUrl = "";
8674
+ var $placeholder = $(dom);
8675
+ var templates = {};
8676
+ var persistanceKey = options.id || "#" + $placeholder.attr("id");
8677
+ var accessibility;
8678
+ var settings = {};
8679
+ var client = {};
8680
+ var controller = {};
8681
+ var perspectiveManager = {};
8682
+ var history = {};
8683
+ var commands = {};
8684
+ var viewer = {};
8685
+ var serviceClientOptions = {};
8686
+ var reportServerUrl = "";
8325
8687
  options.viewerSelector = "reportViewer-" + generateGuidString();
8326
8688
  $placeholder.attr("data-selector", options.viewerSelector);
8327
8689
  if (!validateOptions(options)) {
8328
8690
  return;
8329
8691
  }
8330
- var version = "18.0.24.130";
8692
+ var version = "18.0.24.305";
8331
8693
  options = extend({}, getDefaultOptions(svcApiUrl, version), options);
8332
8694
  settings = new ReportViewerSettings(
8333
8695
  persistanceKey,
@@ -8517,7 +8879,8 @@ var telerikReportViewer = (() => {
8517
8879
  VIEWER_TOOLTIP_OPENING: controller.Events.TOOLTIP_OPENING,
8518
8880
  SEND_EMAIL_BEGIN: controller.Events.SEND_EMAIL_STARTED,
8519
8881
  SEND_EMAIL_END: controller.Events.SEND_EMAIL_READY
8520
- }, $viewer = $(viewer);
8882
+ };
8883
+ var $viewer = $(viewer);
8521
8884
  for (var eventName in viewerEventsMapping) {
8522
8885
  var controllerEventName = viewerEventsMapping[eventName];
8523
8886
  controller.on(controllerEventName, function($viewer2, eventName2) {
@@ -8575,13 +8938,19 @@ var telerikReportViewer = (() => {
8575
8938
  min: "50px",
8576
8939
  size: "210px",
8577
8940
  collapsible: true
8578
- }, parameterAreaTemplate = $placeholder.find(".trv-parameters-area"), parameterAreaPanes = [{}], documentMapPaneOptions = {
8941
+ };
8942
+ var parameterAreaTemplate = $placeholder.find(".trv-parameters-area");
8943
+ var parameterAreaPanes = [{}];
8944
+ var documentMapPaneOptions = {
8579
8945
  max: "500px",
8580
8946
  min: "50px",
8581
8947
  size: "210px",
8582
8948
  collapsible: true,
8583
8949
  collapsed: true
8584
- }, documentMapTemplate = $placeholder.find(".trv-document-map"), documentMapPanes = [{}], orientation = "horizontal";
8950
+ };
8951
+ var documentMapTemplate = $placeholder.find(".trv-document-map");
8952
+ var documentMapPanes = [{}];
8953
+ var orientation = "horizontal";
8585
8954
  if (options.documentMapAreaPosition === DocumentMapAreaPositions.RIGHT) {
8586
8955
  documentMapTemplate.insertAfter($placeholder.find(".trv-pages-area"));
8587
8956
  documentMapPanes.push(documentMapPaneOptions);
@@ -8897,4 +9266,4 @@ var telerikReportViewer = (() => {
8897
9266
  return __toCommonJS(src_exports);
8898
9267
  })();
8899
9268
 
8900
- /* DO NOT MODIFY OR DELETE THIS LINE! UPGRADE WIZARD CHECKSUM c9b9b66c0976c140ee70f2158bb3b437 */
9269
+ /* DO NOT MODIFY OR DELETE THIS LINE! UPGRADE WIZARD CHECKSUM 16be669e2e6279564aec244028122f71 */