@progress/telerik-react-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,6 +1,6 @@
|
|
1
1
|
var $ = require("jquery");
|
2
2
|
/*
|
3
|
-
* TelerikReporting v18.0.24.
|
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
|
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
|
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
|
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])
|
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
|
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])
|
893
|
-
var
|
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 =
|
943
|
+
var result = $element.find('[data-role^="telerik_ReportViewer_"]');
|
929
944
|
each(result, function() {
|
930
|
-
var $this = $(this)
|
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
|
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)
|
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)
|
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)
|
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 + '"]'
|
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
|
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)
|
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
|
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 = {}
|
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
|
-
}
|
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()
|
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)
|
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)
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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"))
|
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
|
3452
|
+
var that = this;
|
3453
|
+
var pages = that.$placeholder.find(".trv-report-page");
|
3362
3454
|
$.each(pages, function(index, value) {
|
3363
|
-
var pageItem = $(value)
|
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()
|
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
|
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))
|
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
|
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
|
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
|
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
|
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")
|
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")
|
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)
|
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
|
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])
|
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"))
|
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])
|
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
|
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)
|
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
|
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]
|
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)
|
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)
|
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
|
4357
|
+
var pageWidth;
|
4358
|
+
var pageHeight;
|
4359
|
+
var box = $target.data("box");
|
4189
4360
|
if (!box) {
|
4190
|
-
var margins = getMargins($target)
|
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
|
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")
|
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({
|
@@ -4376,7 +4552,10 @@ var telerikReportViewer = (() => {
|
|
4376
4552
|
function setPageContent(page) {
|
4377
4553
|
actions = JSON.parse(page.pageActions);
|
4378
4554
|
updatePageStyle(page);
|
4379
|
-
var pageNumber = page.pageNumber
|
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>');
|
4380
4559
|
$pageContent.css("margin", 0);
|
4381
4560
|
$page.append($pageContent).append($('<div class="trv-page-overlay"></div>'));
|
4382
4561
|
var $target = $pageWrapper.empty().removeData().data("pageNumber", pageNumber).append($page);
|
@@ -4577,7 +4756,12 @@ var telerikReportViewer = (() => {
|
|
4577
4756
|
containerTabIndex = 300;
|
4578
4757
|
}
|
4579
4758
|
}
|
4580
|
-
var wrapper = editor.closest(".trv-parameter-value")
|
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;
|
4581
4765
|
if (selectAll && selectAll.length) {
|
4582
4766
|
selectAll.attr("tabindex", containerTabIndex + ++editorsIndex);
|
4583
4767
|
}
|
@@ -4619,7 +4803,14 @@ var telerikReportViewer = (() => {
|
|
4619
4803
|
var $placeholder = $(placeholder);
|
4620
4804
|
var enabled = true;
|
4621
4805
|
$placeholder.html(options.templates["trv-parameter-editor-available-values-multiselect"]);
|
4622
|
-
var $list = $placeholder.find(".trv-list")
|
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;
|
4623
4814
|
$selectAll.text(stringResources[$selectAll.text()]);
|
4624
4815
|
$selectAll.click(function(e) {
|
4625
4816
|
e.preventDefault();
|
@@ -4651,7 +4842,8 @@ var telerikReportViewer = (() => {
|
|
4651
4842
|
});
|
4652
4843
|
}
|
4653
4844
|
function notifyParameterChanged(selection) {
|
4654
|
-
var availableValues = parameter.availableValues
|
4845
|
+
var availableValues = parameter.availableValues;
|
4846
|
+
var values = $.map(selection, function(item) {
|
4655
4847
|
return availableValues[$(item).index()].value;
|
4656
4848
|
});
|
4657
4849
|
clearPendingChange();
|
@@ -4784,7 +4976,18 @@ var telerikReportViewer = (() => {
|
|
4784
4976
|
{
|
4785
4977
|
match: parameterEditorsMatch.MultiSelectCombo,
|
4786
4978
|
createEditor: function(placeholder, options) {
|
4787
|
-
var $placeholder = $(placeholder)
|
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;
|
4788
4991
|
$placeholder.html(options.templates[template]);
|
4789
4992
|
$editorDom = $placeholder.find(selector2);
|
4790
4993
|
$selectNone = $placeholder.find(".trv-select-none");
|
@@ -4906,7 +5109,11 @@ var telerikReportViewer = (() => {
|
|
4906
5109
|
var $placeholder = $(placeholder);
|
4907
5110
|
var enabled = true;
|
4908
5111
|
$placeholder.html(options.templates["trv-parameter-editor-available-values"]);
|
4909
|
-
var $list = $placeholder.find(".trv-list")
|
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;
|
4910
5117
|
if ($selectNone) {
|
4911
5118
|
$selectNone.text(stringResources[$selectNone.text()]);
|
4912
5119
|
$selectNone.click(function(e) {
|
@@ -4919,7 +5126,8 @@ var telerikReportViewer = (() => {
|
|
4919
5126
|
notifyParameterChanged(selection);
|
4920
5127
|
}
|
4921
5128
|
function notifyParameterChanged(selection) {
|
4922
|
-
var availableValues = parameter.availableValues
|
5129
|
+
var availableValues = parameter.availableValues;
|
5130
|
+
var values = $.map(selection, function(item) {
|
4923
5131
|
return availableValues[$(item).index()].value;
|
4924
5132
|
});
|
4925
5133
|
if (Array.isArray(values)) {
|
@@ -5005,7 +5213,15 @@ var telerikReportViewer = (() => {
|
|
5005
5213
|
{
|
5006
5214
|
match: parameterEditorsMatch.SingleSelectCombo,
|
5007
5215
|
createEditor: function(placeholder, options) {
|
5008
|
-
var $placeholder = $(placeholder)
|
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;
|
5009
5225
|
$placeholder.html(options.templates[template]);
|
5010
5226
|
$editorDom = $placeholder.find(selector2);
|
5011
5227
|
$selectNone = $placeholder.find(".trv-select-none");
|
@@ -5021,7 +5237,8 @@ var telerikReportViewer = (() => {
|
|
5021
5237
|
notifyParameterChanged(selection, value);
|
5022
5238
|
}
|
5023
5239
|
function notifyParameterChanged(selection, value) {
|
5024
|
-
var values = value || ""
|
5240
|
+
var values = value || "";
|
5241
|
+
var availableValues;
|
5025
5242
|
if (!value && selection >= 0) {
|
5026
5243
|
availableValues = parameter.availableValues;
|
5027
5244
|
values = availableValues[selection].value;
|
@@ -5089,7 +5306,8 @@ var telerikReportViewer = (() => {
|
|
5089
5306
|
{
|
5090
5307
|
match: parameterEditorsMatch.MultiValue,
|
5091
5308
|
createEditor: function(placeholder, options) {
|
5092
|
-
var $placeholder = $(placeholder)
|
5309
|
+
var $placeholder = $(placeholder);
|
5310
|
+
var parameter;
|
5093
5311
|
$placeholder.html(options.templates["trv-parameter-editor-multivalue"]);
|
5094
5312
|
var $textArea = $placeholder.find("textarea").on("change", function() {
|
5095
5313
|
if (options.parameterChanged) {
|
@@ -5122,7 +5340,8 @@ var telerikReportViewer = (() => {
|
|
5122
5340
|
{
|
5123
5341
|
match: parameterEditorsMatch.DateTime,
|
5124
5342
|
createEditor: function(placeholder, options) {
|
5125
|
-
var $placeholder = $(placeholder)
|
5343
|
+
var $placeholder = $(placeholder);
|
5344
|
+
var parameter;
|
5126
5345
|
$placeholder.html(options.templates["trv-parameter-editor-datetime"]);
|
5127
5346
|
try {
|
5128
5347
|
var $dateTimePicker = $placeholder.find("input[type=datetime]").kendoDatePicker({
|
@@ -5180,7 +5399,8 @@ var telerikReportViewer = (() => {
|
|
5180
5399
|
{
|
5181
5400
|
match: parameterEditorsMatch.String,
|
5182
5401
|
createEditor: function(placeholder, options) {
|
5183
|
-
var $placeholder = $(placeholder)
|
5402
|
+
var $placeholder = $(placeholder);
|
5403
|
+
var parameter;
|
5184
5404
|
$placeholder.html(options.templates["trv-parameter-editor-text"]);
|
5185
5405
|
var $input = $placeholder.find('input[type="text"]').change(function() {
|
5186
5406
|
if (options.parameterChanged) {
|
@@ -5214,7 +5434,9 @@ var telerikReportViewer = (() => {
|
|
5214
5434
|
{
|
5215
5435
|
match: parameterEditorsMatch.Number,
|
5216
5436
|
createEditor: function(placeholder, options) {
|
5217
|
-
var $placeholder = $(placeholder)
|
5437
|
+
var $placeholder = $(placeholder);
|
5438
|
+
var parameter;
|
5439
|
+
var inputBehavior;
|
5218
5440
|
$placeholder.html(options.templates["trv-parameter-editor-number"]);
|
5219
5441
|
var $input = $placeholder.find("input[type=number]").on("change", function() {
|
5220
5442
|
if (options.parameterChanged) {
|
@@ -5256,7 +5478,8 @@ var telerikReportViewer = (() => {
|
|
5256
5478
|
{
|
5257
5479
|
match: parameterEditorsMatch.Boolean,
|
5258
5480
|
createEditor: function(placeholder, options) {
|
5259
|
-
var $placeholder = $(placeholder)
|
5481
|
+
var $placeholder = $(placeholder);
|
5482
|
+
var parameter;
|
5260
5483
|
$placeholder.html(options.templates["trv-parameter-editor-boolean"]);
|
5261
5484
|
var $input = $placeholder.find("input[type=checkbox]").on("change", function() {
|
5262
5485
|
if (options.parameterChanged) {
|
@@ -5305,7 +5528,8 @@ var telerikReportViewer = (() => {
|
|
5305
5528
|
|
5306
5529
|
// src/perspectives.js
|
5307
5530
|
function PerspectiveManager(dom, controller) {
|
5308
|
-
var smallMenu = dom.querySelectorAll ? dom.querySelectorAll(".trv-menu-small")[0] : false
|
5531
|
+
var smallMenu = dom.querySelectorAll ? dom.querySelectorAll(".trv-menu-small")[0] : false;
|
5532
|
+
var perspectives = {
|
5309
5533
|
"small": {
|
5310
5534
|
documentMapVisible: false,
|
5311
5535
|
parametersAreaVisible: false,
|
@@ -5332,7 +5556,8 @@ var telerikReportViewer = (() => {
|
|
5332
5556
|
documentMapVisible: true,
|
5333
5557
|
parametersAreaVisible: true
|
5334
5558
|
}
|
5335
|
-
}
|
5559
|
+
};
|
5560
|
+
var currentPerspective;
|
5336
5561
|
function init2() {
|
5337
5562
|
currentPerspective = getPerspective();
|
5338
5563
|
initStateFromController(perspectives["large"]);
|
@@ -5394,7 +5619,8 @@ var telerikReportViewer = (() => {
|
|
5394
5619
|
window.removeEventListener("resize", onWindowResize);
|
5395
5620
|
}
|
5396
5621
|
function getPerspective() {
|
5397
|
-
var windowWidthInEm = $(window).width() / parseFloat($("body").css("font-size"))
|
5622
|
+
var windowWidthInEm = $(window).width() / parseFloat($("body").css("font-size"));
|
5623
|
+
var windowMinWidth = 40.5;
|
5398
5624
|
return smallMenu && windowWidthInEm <= windowMinWidth ? "small" : "large";
|
5399
5625
|
}
|
5400
5626
|
function initStateFromController(state) {
|
@@ -5443,7 +5669,8 @@ var telerikReportViewer = (() => {
|
|
5443
5669
|
var defaultOptions4 = {};
|
5444
5670
|
function ServiceClient(options) {
|
5445
5671
|
options = extend({}, defaultOptions4, options);
|
5446
|
-
var baseUrl = rtrim(options.serviceUrl || options.baseUrl, "\\/")
|
5672
|
+
var baseUrl = rtrim(options.serviceUrl || options.baseUrl, "\\/");
|
5673
|
+
var loginPromise;
|
5447
5674
|
var _ajax = $ajax;
|
5448
5675
|
function validateClientID(clientID) {
|
5449
5676
|
if (!clientID)
|
@@ -5849,7 +6076,11 @@ var telerikReportViewer = (() => {
|
|
5849
6076
|
state &= ~flags;
|
5850
6077
|
}
|
5851
6078
|
}
|
5852
|
-
var controller = options.controller
|
6079
|
+
var controller = options.controller;
|
6080
|
+
var historyManager = options.history;
|
6081
|
+
var state = 0;
|
6082
|
+
var refreshUI;
|
6083
|
+
var commands = options.commands;
|
5853
6084
|
if (!controller) {
|
5854
6085
|
throw "No controller (telerikReporting.ReportViewerController) has been specified.";
|
5855
6086
|
}
|
@@ -5979,7 +6210,8 @@ var telerikReportViewer = (() => {
|
|
5979
6210
|
if (!controller) {
|
5980
6211
|
throw "No controller (telerikReporting.reportViewerController) has been specified.";
|
5981
6212
|
}
|
5982
|
-
var $placeholder = $(placeholder)
|
6213
|
+
var $placeholder = $(placeholder);
|
6214
|
+
var $documentMap;
|
5983
6215
|
var documentMapVisible = options.documentMapVisible !== false;
|
5984
6216
|
var enableAccessibility = options.enableAccessibility;
|
5985
6217
|
var currentReport = null;
|
@@ -5992,7 +6224,9 @@ var telerikReportViewer = (() => {
|
|
5992
6224
|
replaceStringResources($placeholder);
|
5993
6225
|
}
|
5994
6226
|
function onTreeViewSelectionChanged(e) {
|
5995
|
-
var documentMapNode = this.dataItem(e.node)
|
6227
|
+
var documentMapNode = this.dataItem(e.node);
|
6228
|
+
var page = documentMapNode.page;
|
6229
|
+
var id = documentMapNode.id;
|
5996
6230
|
controller.navigateToPage(page, {
|
5997
6231
|
type: "bookmark",
|
5998
6232
|
id
|
@@ -6066,7 +6300,8 @@ var telerikReportViewer = (() => {
|
|
6066
6300
|
$placeholder.removeClass("trv-loading");
|
6067
6301
|
}
|
6068
6302
|
function showDocumentMap(show) {
|
6069
|
-
var splitter = GlobalSettings.viewerInstances.find((element) => element.id === options.viewerSelector + "-document-map-splitter").instance
|
6303
|
+
var splitter = GlobalSettings.viewerInstances.find((element) => element.id === options.viewerSelector + "-document-map-splitter").instance;
|
6304
|
+
var sibling = $placeholder.next();
|
6070
6305
|
if (options.documentMapAreaPosition === DocumentMapAreaPositions.RIGHT) {
|
6071
6306
|
sibling = $placeholder.prev();
|
6072
6307
|
}
|
@@ -6142,8 +6377,14 @@ var telerikReportViewer = (() => {
|
|
6142
6377
|
throw "No controller (telerikReporting.reportViewerController) has been specified.";
|
6143
6378
|
}
|
6144
6379
|
var parameterEditors = [].concat(options.parameterEditors, ParameterEditors);
|
6145
|
-
var recentParameterValues
|
6146
|
-
var
|
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");
|
6147
6388
|
$previewButton.text(stringResources[$previewButton.text()]);
|
6148
6389
|
$previewButton.attr("aria-label", stringResources[$previewButton.attr("aria-label")]);
|
6149
6390
|
$previewButton.on("click", function(e) {
|
@@ -6174,7 +6415,14 @@ var telerikReportViewer = (() => {
|
|
6174
6415
|
return $(parameterContainerTemplate);
|
6175
6416
|
}
|
6176
6417
|
function createParameterUI(parameter) {
|
6177
|
-
var $container = createParameterContainer()
|
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);
|
6178
6426
|
var parameterText = escapeHtml(parameter.text);
|
6179
6427
|
var isHiddenParameter = !parameter.isVisible;
|
6180
6428
|
if (isHiddenParameter) {
|
@@ -6308,14 +6556,16 @@ var telerikReportViewer = (() => {
|
|
6308
6556
|
processedParameterValues = {};
|
6309
6557
|
parameters = newParameters || [];
|
6310
6558
|
clearEditors();
|
6311
|
-
var $parameterContainer
|
6559
|
+
var $parameterContainer;
|
6560
|
+
var $tempContainer = $("<div></div>");
|
6312
6561
|
each(parameters, function() {
|
6313
6562
|
try {
|
6314
6563
|
this.value = ParameterValidators.validate(this, this.value);
|
6315
6564
|
} catch (e) {
|
6316
6565
|
this.Error = this.Error || e;
|
6317
6566
|
}
|
6318
|
-
var hasError = Boolean(this.Error)
|
6567
|
+
var hasError = Boolean(this.Error);
|
6568
|
+
var hasValue = !hasError;
|
6319
6569
|
if (hasValue) {
|
6320
6570
|
recentParameterValues[this.id] = this.value;
|
6321
6571
|
if (this.availableValues) {
|
@@ -6533,7 +6783,8 @@ var telerikReportViewer = (() => {
|
|
6533
6783
|
}
|
6534
6784
|
function showParametersArea(show) {
|
6535
6785
|
var trv = window.telerikReportViewer;
|
6536
|
-
var splitter = GlobalSettings.viewerInstances.find((element) => element.id === options.viewerSelector + "-parameters-splitter").instance
|
6786
|
+
var splitter = GlobalSettings.viewerInstances.find((element) => element.id === options.viewerSelector + "-parameters-splitter").instance;
|
6787
|
+
var sibling = $placeholder.prev();
|
6537
6788
|
if (options.parametersAreaPosition === ParametersAreaPositions.TOP || options.parametersAreaPosition === ParametersAreaPositions.LEFT) {
|
6538
6789
|
sibling = $placeholder.next();
|
6539
6790
|
}
|
@@ -6609,7 +6860,11 @@ var telerikReportViewer = (() => {
|
|
6609
6860
|
var lastSelectedMenuItem;
|
6610
6861
|
var lastSelectedSubmenuItem;
|
6611
6862
|
function MainMenu(dom, rootOptions, otherOptions) {
|
6612
|
-
var options = $.extend({}, rootOptions, otherOptions)
|
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;
|
6613
6868
|
if (!controller) {
|
6614
6869
|
throw "No controller (telerikReporting.ReportViewerController) has been specified.";
|
6615
6870
|
}
|
@@ -6691,7 +6946,8 @@ var telerikReportViewer = (() => {
|
|
6691
6946
|
}
|
6692
6947
|
function fillFormats(formats) {
|
6693
6948
|
each($(dom).find("ul[data-command-list=export-format-list]"), function() {
|
6694
|
-
var $list = $(this)
|
6949
|
+
var $list = $(this);
|
6950
|
+
var $parent = $list.parents("li");
|
6695
6951
|
var tabIndex = enableAccessibility ? $parent.attr("tabindex") : -1;
|
6696
6952
|
if (!tabIndex) {
|
6697
6953
|
tabIndex = 1;
|
@@ -6895,7 +7151,8 @@ var telerikReportViewer = (() => {
|
|
6895
7151
|
return;
|
6896
7152
|
}
|
6897
7153
|
each(menuAreas, function() {
|
6898
|
-
var $menu = $(this)
|
7154
|
+
var $menu = $(this);
|
7155
|
+
var menuItems = $menu.children("li.k-item");
|
6899
7156
|
$menu.attr("aria-label", stringResources[$menu.attr("aria-label")]);
|
6900
7157
|
each(menuItems, function() {
|
6901
7158
|
var $menuItem = $(this);
|
@@ -6928,7 +7185,33 @@ var telerikReportViewer = (() => {
|
|
6928
7185
|
var defaultOptions7 = {};
|
6929
7186
|
function Search(placeholder, options, viewerOptions) {
|
6930
7187
|
options = $.extend({}, defaultOptions7, options);
|
6931
|
-
var controller = options.controller
|
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 = "";
|
6932
7215
|
var highlightManager = {
|
6933
7216
|
shadedClassName: "trv-search-dialog-shaded-result",
|
6934
7217
|
//the results that are found, but not selected (highlighted)
|
@@ -7097,7 +7380,12 @@ var telerikReportViewer = (() => {
|
|
7097
7380
|
windowLocation = kendoWindow.offset();
|
7098
7381
|
}
|
7099
7382
|
function adjustDialogPosition() {
|
7100
|
-
var windowWidth = $(window).innerWidth()
|
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;
|
7101
7389
|
if (!windowLocation) {
|
7102
7390
|
var reportViewerCoords = reportViewerWrapper[0].getBoundingClientRect();
|
7103
7391
|
kendoWindow.css({
|
@@ -7111,7 +7399,10 @@ var telerikReportViewer = (() => {
|
|
7111
7399
|
}
|
7112
7400
|
});
|
7113
7401
|
} else {
|
7114
|
-
var left = windowLocation.left
|
7402
|
+
var left = windowLocation.left;
|
7403
|
+
var top = windowLocation.top;
|
7404
|
+
var right = left + width;
|
7405
|
+
var bottom = top + height;
|
7115
7406
|
if (right > windowWidth - padding) {
|
7116
7407
|
left = Math.max(padding, windowWidth - width - padding);
|
7117
7408
|
kendoWindow.css({ left });
|
@@ -7209,7 +7500,9 @@ var telerikReportViewer = (() => {
|
|
7209
7500
|
contentElement: "",
|
7210
7501
|
template: "<div class='trv-search-dialog-results-row'><span>#: description #</span> <span class='trv-search-dialog-results-pageSpan'>" + stringResources.searchDialogPageText + " #:page#</span></div>",
|
7211
7502
|
change: function() {
|
7212
|
-
var index = this.select().index()
|
7503
|
+
var index = this.select().index();
|
7504
|
+
var view = this.dataSource.view();
|
7505
|
+
var dataItem = view[index];
|
7213
7506
|
onSelectedItem(dataItem);
|
7214
7507
|
updateUI(index, view.length);
|
7215
7508
|
}
|
@@ -7324,7 +7617,9 @@ var telerikReportViewer = (() => {
|
|
7324
7617
|
if (!results || results.length === 0) {
|
7325
7618
|
return;
|
7326
7619
|
}
|
7327
|
-
var $parent = $placeholder.parent()
|
7620
|
+
var $parent = $placeholder.parent();
|
7621
|
+
var $pageContainer = $parent.find(".trv-page-container");
|
7622
|
+
var elements = $pageContainer.find("[data-search-id]");
|
7328
7623
|
each(results, function() {
|
7329
7624
|
var $searchElement = elements.filter("[data-search-id=" + this.id + "]");
|
7330
7625
|
if ($searchElement) {
|
@@ -7405,7 +7700,8 @@ var telerikReportViewer = (() => {
|
|
7405
7700
|
$listView.select($selected);
|
7406
7701
|
$listView.trigger("change");
|
7407
7702
|
} else {
|
7408
|
-
var index = $listView.select().trigger("change").index()
|
7703
|
+
var index = $listView.select().trigger("change").index();
|
7704
|
+
var view = $listView.dataSource.view();
|
7409
7705
|
var newIndex = Math.min(view.length - 1, Math.max(0, index + offset));
|
7410
7706
|
if (newIndex !== index) {
|
7411
7707
|
var dataItem = view[newIndex];
|
@@ -7447,7 +7743,14 @@ var telerikReportViewer = (() => {
|
|
7447
7743
|
if (!$search) {
|
7448
7744
|
return;
|
7449
7745
|
}
|
7450
|
-
var $searchCaption = $search.find(".trv-search-dialog-caption-label")
|
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']");
|
7451
7754
|
replaceAttribute($search, "aria-label");
|
7452
7755
|
replaceAttribute($searchOptions, "aria-label");
|
7453
7756
|
replaceText($searchCaption);
|
@@ -7512,7 +7815,24 @@ var telerikReportViewer = (() => {
|
|
7512
7815
|
var defaultOptions8 = {};
|
7513
7816
|
function SendEmail(placeholder, options, viewerOptions) {
|
7514
7817
|
options = $.extend({}, defaultOptions8, options);
|
7515
|
-
var controller = options.controller
|
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");
|
7516
7836
|
if (!controller) {
|
7517
7837
|
throw "No controller (telerikReporting.ReportViewerController) has been specified.";
|
7518
7838
|
}
|
@@ -7663,11 +7983,13 @@ var telerikReportViewer = (() => {
|
|
7663
7983
|
});
|
7664
7984
|
function setAttrs() {
|
7665
7985
|
$placeholder.find(".trv-send-email-field input").each(function() {
|
7666
|
-
var el = $(this)
|
7986
|
+
var el = $(this);
|
7987
|
+
var attrName = el.attr("name");
|
7667
7988
|
el.attr("id", selector2 + "-" + attrName);
|
7668
7989
|
});
|
7669
7990
|
$placeholder.find(".trv-send-email-label label").each(function() {
|
7670
|
-
var el = $(this)
|
7991
|
+
var el = $(this);
|
7992
|
+
var attrName = el.attr("for");
|
7671
7993
|
el.attr("for", selector2 + "-" + attrName);
|
7672
7994
|
});
|
7673
7995
|
}
|
@@ -7676,7 +7998,9 @@ var telerikReportViewer = (() => {
|
|
7676
7998
|
windowLocation = kendoWindow.offset();
|
7677
7999
|
}
|
7678
8000
|
function adjustDialogSize() {
|
7679
|
-
var kendoWindow = kendoSendEmailDialog.element.parent(".k-window")
|
8001
|
+
var kendoWindow = kendoSendEmailDialog.element.parent(".k-window");
|
8002
|
+
var windowWidth = $(window).width();
|
8003
|
+
var kendoWindowWidth = 350;
|
7680
8004
|
if (windowWidth > 800) {
|
7681
8005
|
kendoWindowWidth = 720;
|
7682
8006
|
}
|
@@ -7689,7 +8013,16 @@ var telerikReportViewer = (() => {
|
|
7689
8013
|
if (!windowLocation) {
|
7690
8014
|
kendoSendEmailDialog.center();
|
7691
8015
|
} else {
|
7692
|
-
var padding = 10
|
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;
|
7693
8026
|
if (right > windowWidth - padding) {
|
7694
8027
|
left = Math.max(padding, windowWidth - width - padding);
|
7695
8028
|
kendoWindow.css({ left });
|
@@ -7768,7 +8101,10 @@ var telerikReportViewer = (() => {
|
|
7768
8101
|
});
|
7769
8102
|
}
|
7770
8103
|
function validateFields() {
|
7771
|
-
var fromIsValid = isEmpty(inputFrom) || !isValidEmail(inputFrom, false)
|
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;
|
7772
8108
|
if (!hasFormat) {
|
7773
8109
|
showError(docFormatEl, "data-required-msg");
|
7774
8110
|
}
|
@@ -7841,7 +8177,9 @@ var telerikReportViewer = (() => {
|
|
7841
8177
|
if (!$sendEmailDialog) {
|
7842
8178
|
return;
|
7843
8179
|
}
|
7844
|
-
var labels = $sendEmailDialog.find(".trv-replace-string")
|
8180
|
+
var labels = $sendEmailDialog.find(".trv-replace-string");
|
8181
|
+
var ariaLabel = $sendEmailDialog.find("[aria-label]");
|
8182
|
+
var titles = $sendEmailDialog.find("[title]");
|
7845
8183
|
if (labels.length) {
|
7846
8184
|
$.each(labels, function(key, value) {
|
7847
8185
|
replaceText($(value));
|
@@ -7906,7 +8244,15 @@ var telerikReportViewer = (() => {
|
|
7906
8244
|
|
7907
8245
|
// src/sideMenu.js
|
7908
8246
|
function SideMenu(dom, rootOptions, otherOptions) {
|
7909
|
-
var options = $.extend({}, rootOptions, otherOptions)
|
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;
|
7910
8256
|
if (!controller) {
|
7911
8257
|
throw "No controller (telerikReporting.ReportViewerController) has been specified.";
|
7912
8258
|
}
|
@@ -7968,7 +8314,8 @@ var telerikReportViewer = (() => {
|
|
7968
8314
|
}
|
7969
8315
|
function fillFormats(formats) {
|
7970
8316
|
each($(dom).find("ul[data-command-list=export-format-list]"), function() {
|
7971
|
-
var $list = $(this)
|
8317
|
+
var $list = $(this);
|
8318
|
+
var $parent = $list.parents("li");
|
7972
8319
|
var tabIndex = $parent.attr("tabindex");
|
7973
8320
|
if (!tabIndex) {
|
7974
8321
|
tabIndex = DEFAULT_TABINDEX;
|
@@ -8096,10 +8443,12 @@ var telerikReportViewer = (() => {
|
|
8096
8443
|
return;
|
8097
8444
|
}
|
8098
8445
|
each(menuAreas, function() {
|
8099
|
-
var $menu = $(this)
|
8446
|
+
var $menu = $(this);
|
8447
|
+
var menuItems = $menu.children("li.k-panelbar-header");
|
8100
8448
|
$menu.attr("aria-label", stringResources[$menu.attr("aria-label")]);
|
8101
8449
|
each(menuItems, function() {
|
8102
|
-
var $menuItem = $(this)
|
8450
|
+
var $menuItem = $(this);
|
8451
|
+
var $a = $menuItem.find("a");
|
8103
8452
|
$menuItem.attr("aria-label", stringResources[$menuItem.attr("aria-label")]);
|
8104
8453
|
if ($a) {
|
8105
8454
|
var $span = $a.find("span:not(.k-icon)");
|
@@ -8317,18 +8666,31 @@ var telerikReportViewer = (() => {
|
|
8317
8666
|
};
|
8318
8667
|
}
|
8319
8668
|
function ReportViewer(dom, options) {
|
8320
|
-
var svcApiUrl = options.serviceUrl
|
8669
|
+
var svcApiUrl = options.serviceUrl;
|
8670
|
+
var reportServerUrlSVCApiUrl = "";
|
8321
8671
|
if (options.reportServer) {
|
8322
8672
|
reportServerUrlSVCApiUrl = rtrim(options.reportServer.url, "\\/");
|
8323
8673
|
svcApiUrl = reportServerUrlSVCApiUrl + "/api/reports";
|
8324
8674
|
}
|
8325
|
-
var $placeholder = $(dom)
|
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 = "";
|
8326
8688
|
options.viewerSelector = "reportViewer-" + generateGuidString();
|
8327
8689
|
$placeholder.attr("data-selector", options.viewerSelector);
|
8328
8690
|
if (!validateOptions(options)) {
|
8329
8691
|
return;
|
8330
8692
|
}
|
8331
|
-
var version = "18.0.24.
|
8693
|
+
var version = "18.0.24.305";
|
8332
8694
|
options = extend({}, getDefaultOptions(svcApiUrl, version), options);
|
8333
8695
|
settings = new ReportViewerSettings(
|
8334
8696
|
persistanceKey,
|
@@ -8518,7 +8880,8 @@ var telerikReportViewer = (() => {
|
|
8518
8880
|
VIEWER_TOOLTIP_OPENING: controller.Events.TOOLTIP_OPENING,
|
8519
8881
|
SEND_EMAIL_BEGIN: controller.Events.SEND_EMAIL_STARTED,
|
8520
8882
|
SEND_EMAIL_END: controller.Events.SEND_EMAIL_READY
|
8521
|
-
}
|
8883
|
+
};
|
8884
|
+
var $viewer = $(viewer);
|
8522
8885
|
for (var eventName in viewerEventsMapping) {
|
8523
8886
|
var controllerEventName = viewerEventsMapping[eventName];
|
8524
8887
|
controller.on(controllerEventName, function($viewer2, eventName2) {
|
@@ -8576,13 +8939,19 @@ var telerikReportViewer = (() => {
|
|
8576
8939
|
min: "50px",
|
8577
8940
|
size: "210px",
|
8578
8941
|
collapsible: true
|
8579
|
-
}
|
8942
|
+
};
|
8943
|
+
var parameterAreaTemplate = $placeholder.find(".trv-parameters-area");
|
8944
|
+
var parameterAreaPanes = [{}];
|
8945
|
+
var documentMapPaneOptions = {
|
8580
8946
|
max: "500px",
|
8581
8947
|
min: "50px",
|
8582
8948
|
size: "210px",
|
8583
8949
|
collapsible: true,
|
8584
8950
|
collapsed: true
|
8585
|
-
}
|
8951
|
+
};
|
8952
|
+
var documentMapTemplate = $placeholder.find(".trv-document-map");
|
8953
|
+
var documentMapPanes = [{}];
|
8954
|
+
var orientation = "horizontal";
|
8586
8955
|
if (options.documentMapAreaPosition === DocumentMapAreaPositions.RIGHT) {
|
8587
8956
|
documentMapTemplate.insertAfter($placeholder.find(".trv-pages-area"));
|
8588
8957
|
documentMapPanes.push(documentMapPaneOptions);
|
@@ -8898,7 +9267,7 @@ var telerikReportViewer = (() => {
|
|
8898
9267
|
return __toCommonJS(src_exports);
|
8899
9268
|
})();
|
8900
9269
|
|
8901
|
-
/* DO NOT MODIFY OR DELETE THIS LINE! UPGRADE WIZARD CHECKSUM
|
9270
|
+
/* DO NOT MODIFY OR DELETE THIS LINE! UPGRADE WIZARD CHECKSUM 16be669e2e6279564aec244028122f71 */
|
8902
9271
|
module.exports = {
|
8903
9272
|
ReportViewer: telerikReportViewer.ReportViewer
|
8904
9273
|
};
|