@progress/telerik-jquery-report-viewer 21.24.116 → 21.24.305
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/dist/font/font-icons.css +4 -4
- package/dist/font/font-icons.min.css +3 -3
- package/dist/js/telerikReportViewer.js +497 -122
- package/dist/js/telerikReportViewer.min.js +9 -7
- package/dist/js/telerikReportViewer.stringResources.js +1 -1
- package/dist/styles/telerikReportViewer.css +1 -1
- package/dist/styles/telerikReportViewer.min.css +1 -1
- package/dist/templates/telerikReportViewerTemplate-FA.html +3 -3
- package/dist/templates/telerikReportViewerTemplate.html +3 -3
- package/package.json +1 -1
- /package/dist/font/{ReportingIcons-18.0.24.116.ttf → ReportingIcons-18.0.24.305.ttf} +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* TelerikReporting v18.0.24.
|
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
|
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
|
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
|
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])
|
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
|
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])
|
892
|
-
var
|
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 =
|
942
|
+
var result = $element.find('[data-role^="telerik_ReportViewer_"]');
|
928
943
|
each(result, function() {
|
929
|
-
var $this = $(this)
|
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
|
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)
|
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)
|
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)
|
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 + '"]'
|
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
|
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)
|
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
|
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 = {}
|
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
|
-
}
|
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()
|
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)
|
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)
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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"))
|
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
|
3451
|
+
var that = this;
|
3452
|
+
var pages = that.$placeholder.find(".trv-report-page");
|
3361
3453
|
$.each(pages, function(index, value) {
|
3362
|
-
var pageItem = $(value)
|
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()
|
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
|
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))
|
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
|
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
|
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
|
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
|
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")
|
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")
|
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)
|
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
|
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])
|
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"))
|
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])
|
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
|
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)
|
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
|
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]
|
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)
|
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)
|
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
|
4356
|
+
var pageWidth;
|
4357
|
+
var pageHeight;
|
4358
|
+
var box = $target.data("box");
|
4188
4359
|
if (!box) {
|
4189
|
-
var margins = getMargins($target)
|
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
|
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")
|
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({
|
@@ -4323,10 +4499,16 @@ var telerikReportViewer = (() => {
|
|
4323
4499
|
var $container = $(toolTipTemplate);
|
4324
4500
|
var $titleSpan = $container.find(".trv-pages-area-kendo-tooltip-title");
|
4325
4501
|
var $textSpan = $container.find(".trv-pages-area-kendo-tooltip-text");
|
4326
|
-
$titleSpan.
|
4327
|
-
$textSpan.
|
4502
|
+
$titleSpan.html(replaceNewLineSymbols(toolTipArgs.toolTip.title));
|
4503
|
+
$textSpan.html(replaceNewLineSymbols(toolTipArgs.toolTip.text));
|
4328
4504
|
return $container.clone().wrap("<p>").parent().html();
|
4329
4505
|
}
|
4506
|
+
function replaceNewLineSymbols(tooltipText) {
|
4507
|
+
tooltipText = escapeHtml(tooltipText);
|
4508
|
+
tooltipText = tooltipText.replaceAll("\r\n", "<br>");
|
4509
|
+
tooltipText = tooltipText.replaceAll("\n", "<br>");
|
4510
|
+
return tooltipText;
|
4511
|
+
}
|
4330
4512
|
function positionToolTip(toolTip, e) {
|
4331
4513
|
var x = e.pageX;
|
4332
4514
|
var y = e.pageY;
|
@@ -4369,7 +4551,10 @@ var telerikReportViewer = (() => {
|
|
4369
4551
|
function setPageContent(page) {
|
4370
4552
|
actions = JSON.parse(page.pageActions);
|
4371
4553
|
updatePageStyle(page);
|
4372
|
-
var pageNumber = page.pageNumber
|
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>');
|
4373
4558
|
$pageContent.css("margin", 0);
|
4374
4559
|
$page.append($pageContent).append($('<div class="trv-page-overlay"></div>'));
|
4375
4560
|
var $target = $pageWrapper.empty().removeData().data("pageNumber", pageNumber).append($page);
|
@@ -4570,7 +4755,12 @@ var telerikReportViewer = (() => {
|
|
4570
4755
|
containerTabIndex = 300;
|
4571
4756
|
}
|
4572
4757
|
}
|
4573
|
-
var wrapper = editor.closest(".trv-parameter-value")
|
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;
|
4574
4764
|
if (selectAll && selectAll.length) {
|
4575
4765
|
selectAll.attr("tabindex", containerTabIndex + ++editorsIndex);
|
4576
4766
|
}
|
@@ -4612,7 +4802,14 @@ var telerikReportViewer = (() => {
|
|
4612
4802
|
var $placeholder = $(placeholder);
|
4613
4803
|
var enabled = true;
|
4614
4804
|
$placeholder.html(options.templates["trv-parameter-editor-available-values-multiselect"]);
|
4615
|
-
var $list = $placeholder.find(".trv-list")
|
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;
|
4616
4813
|
$selectAll.text(stringResources[$selectAll.text()]);
|
4617
4814
|
$selectAll.click(function(e) {
|
4618
4815
|
e.preventDefault();
|
@@ -4644,7 +4841,8 @@ var telerikReportViewer = (() => {
|
|
4644
4841
|
});
|
4645
4842
|
}
|
4646
4843
|
function notifyParameterChanged(selection) {
|
4647
|
-
var availableValues = parameter.availableValues
|
4844
|
+
var availableValues = parameter.availableValues;
|
4845
|
+
var values = $.map(selection, function(item) {
|
4648
4846
|
return availableValues[$(item).index()].value;
|
4649
4847
|
});
|
4650
4848
|
clearPendingChange();
|
@@ -4777,7 +4975,18 @@ var telerikReportViewer = (() => {
|
|
4777
4975
|
{
|
4778
4976
|
match: parameterEditorsMatch.MultiSelectCombo,
|
4779
4977
|
createEditor: function(placeholder, options) {
|
4780
|
-
var $placeholder = $(placeholder)
|
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;
|
4781
4990
|
$placeholder.html(options.templates[template]);
|
4782
4991
|
$editorDom = $placeholder.find(selector2);
|
4783
4992
|
$selectNone = $placeholder.find(".trv-select-none");
|
@@ -4899,7 +5108,11 @@ var telerikReportViewer = (() => {
|
|
4899
5108
|
var $placeholder = $(placeholder);
|
4900
5109
|
var enabled = true;
|
4901
5110
|
$placeholder.html(options.templates["trv-parameter-editor-available-values"]);
|
4902
|
-
var $list = $placeholder.find(".trv-list")
|
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;
|
4903
5116
|
if ($selectNone) {
|
4904
5117
|
$selectNone.text(stringResources[$selectNone.text()]);
|
4905
5118
|
$selectNone.click(function(e) {
|
@@ -4912,7 +5125,8 @@ var telerikReportViewer = (() => {
|
|
4912
5125
|
notifyParameterChanged(selection);
|
4913
5126
|
}
|
4914
5127
|
function notifyParameterChanged(selection) {
|
4915
|
-
var availableValues = parameter.availableValues
|
5128
|
+
var availableValues = parameter.availableValues;
|
5129
|
+
var values = $.map(selection, function(item) {
|
4916
5130
|
return availableValues[$(item).index()].value;
|
4917
5131
|
});
|
4918
5132
|
if (Array.isArray(values)) {
|
@@ -4998,7 +5212,15 @@ var telerikReportViewer = (() => {
|
|
4998
5212
|
{
|
4999
5213
|
match: parameterEditorsMatch.SingleSelectCombo,
|
5000
5214
|
createEditor: function(placeholder, options) {
|
5001
|
-
var $placeholder = $(placeholder)
|
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;
|
5002
5224
|
$placeholder.html(options.templates[template]);
|
5003
5225
|
$editorDom = $placeholder.find(selector2);
|
5004
5226
|
$selectNone = $placeholder.find(".trv-select-none");
|
@@ -5014,7 +5236,8 @@ var telerikReportViewer = (() => {
|
|
5014
5236
|
notifyParameterChanged(selection, value);
|
5015
5237
|
}
|
5016
5238
|
function notifyParameterChanged(selection, value) {
|
5017
|
-
var values = value || ""
|
5239
|
+
var values = value || "";
|
5240
|
+
var availableValues;
|
5018
5241
|
if (!value && selection >= 0) {
|
5019
5242
|
availableValues = parameter.availableValues;
|
5020
5243
|
values = availableValues[selection].value;
|
@@ -5082,7 +5305,8 @@ var telerikReportViewer = (() => {
|
|
5082
5305
|
{
|
5083
5306
|
match: parameterEditorsMatch.MultiValue,
|
5084
5307
|
createEditor: function(placeholder, options) {
|
5085
|
-
var $placeholder = $(placeholder)
|
5308
|
+
var $placeholder = $(placeholder);
|
5309
|
+
var parameter;
|
5086
5310
|
$placeholder.html(options.templates["trv-parameter-editor-multivalue"]);
|
5087
5311
|
var $textArea = $placeholder.find("textarea").on("change", function() {
|
5088
5312
|
if (options.parameterChanged) {
|
@@ -5115,7 +5339,8 @@ var telerikReportViewer = (() => {
|
|
5115
5339
|
{
|
5116
5340
|
match: parameterEditorsMatch.DateTime,
|
5117
5341
|
createEditor: function(placeholder, options) {
|
5118
|
-
var $placeholder = $(placeholder)
|
5342
|
+
var $placeholder = $(placeholder);
|
5343
|
+
var parameter;
|
5119
5344
|
$placeholder.html(options.templates["trv-parameter-editor-datetime"]);
|
5120
5345
|
try {
|
5121
5346
|
var $dateTimePicker = $placeholder.find("input[type=datetime]").kendoDatePicker({
|
@@ -5173,7 +5398,8 @@ var telerikReportViewer = (() => {
|
|
5173
5398
|
{
|
5174
5399
|
match: parameterEditorsMatch.String,
|
5175
5400
|
createEditor: function(placeholder, options) {
|
5176
|
-
var $placeholder = $(placeholder)
|
5401
|
+
var $placeholder = $(placeholder);
|
5402
|
+
var parameter;
|
5177
5403
|
$placeholder.html(options.templates["trv-parameter-editor-text"]);
|
5178
5404
|
var $input = $placeholder.find('input[type="text"]').change(function() {
|
5179
5405
|
if (options.parameterChanged) {
|
@@ -5207,7 +5433,9 @@ var telerikReportViewer = (() => {
|
|
5207
5433
|
{
|
5208
5434
|
match: parameterEditorsMatch.Number,
|
5209
5435
|
createEditor: function(placeholder, options) {
|
5210
|
-
var $placeholder = $(placeholder)
|
5436
|
+
var $placeholder = $(placeholder);
|
5437
|
+
var parameter;
|
5438
|
+
var inputBehavior;
|
5211
5439
|
$placeholder.html(options.templates["trv-parameter-editor-number"]);
|
5212
5440
|
var $input = $placeholder.find("input[type=number]").on("change", function() {
|
5213
5441
|
if (options.parameterChanged) {
|
@@ -5249,7 +5477,8 @@ var telerikReportViewer = (() => {
|
|
5249
5477
|
{
|
5250
5478
|
match: parameterEditorsMatch.Boolean,
|
5251
5479
|
createEditor: function(placeholder, options) {
|
5252
|
-
var $placeholder = $(placeholder)
|
5480
|
+
var $placeholder = $(placeholder);
|
5481
|
+
var parameter;
|
5253
5482
|
$placeholder.html(options.templates["trv-parameter-editor-boolean"]);
|
5254
5483
|
var $input = $placeholder.find("input[type=checkbox]").on("change", function() {
|
5255
5484
|
if (options.parameterChanged) {
|
@@ -5298,7 +5527,8 @@ var telerikReportViewer = (() => {
|
|
5298
5527
|
|
5299
5528
|
// src/perspectives.js
|
5300
5529
|
function PerspectiveManager(dom, controller) {
|
5301
|
-
var smallMenu = dom.querySelectorAll ? dom.querySelectorAll(".trv-menu-small")[0] : false
|
5530
|
+
var smallMenu = dom.querySelectorAll ? dom.querySelectorAll(".trv-menu-small")[0] : false;
|
5531
|
+
var perspectives = {
|
5302
5532
|
"small": {
|
5303
5533
|
documentMapVisible: false,
|
5304
5534
|
parametersAreaVisible: false,
|
@@ -5325,7 +5555,8 @@ var telerikReportViewer = (() => {
|
|
5325
5555
|
documentMapVisible: true,
|
5326
5556
|
parametersAreaVisible: true
|
5327
5557
|
}
|
5328
|
-
}
|
5558
|
+
};
|
5559
|
+
var currentPerspective;
|
5329
5560
|
function init2() {
|
5330
5561
|
currentPerspective = getPerspective();
|
5331
5562
|
initStateFromController(perspectives["large"]);
|
@@ -5387,7 +5618,8 @@ var telerikReportViewer = (() => {
|
|
5387
5618
|
window.removeEventListener("resize", onWindowResize);
|
5388
5619
|
}
|
5389
5620
|
function getPerspective() {
|
5390
|
-
var windowWidthInEm = $(window).width() / parseFloat($("body").css("font-size"))
|
5621
|
+
var windowWidthInEm = $(window).width() / parseFloat($("body").css("font-size"));
|
5622
|
+
var windowMinWidth = 40.5;
|
5391
5623
|
return smallMenu && windowWidthInEm <= windowMinWidth ? "small" : "large";
|
5392
5624
|
}
|
5393
5625
|
function initStateFromController(state) {
|
@@ -5436,7 +5668,8 @@ var telerikReportViewer = (() => {
|
|
5436
5668
|
var defaultOptions4 = {};
|
5437
5669
|
function ServiceClient(options) {
|
5438
5670
|
options = extend({}, defaultOptions4, options);
|
5439
|
-
var baseUrl = rtrim(options.serviceUrl || options.baseUrl, "\\/")
|
5671
|
+
var baseUrl = rtrim(options.serviceUrl || options.baseUrl, "\\/");
|
5672
|
+
var loginPromise;
|
5440
5673
|
var _ajax = $ajax;
|
5441
5674
|
function validateClientID(clientID) {
|
5442
5675
|
if (!clientID)
|
@@ -5842,7 +6075,11 @@ var telerikReportViewer = (() => {
|
|
5842
6075
|
state &= ~flags;
|
5843
6076
|
}
|
5844
6077
|
}
|
5845
|
-
var controller = options.controller
|
6078
|
+
var controller = options.controller;
|
6079
|
+
var historyManager = options.history;
|
6080
|
+
var state = 0;
|
6081
|
+
var refreshUI;
|
6082
|
+
var commands = options.commands;
|
5846
6083
|
if (!controller) {
|
5847
6084
|
throw "No controller (telerikReporting.ReportViewerController) has been specified.";
|
5848
6085
|
}
|
@@ -5972,7 +6209,8 @@ var telerikReportViewer = (() => {
|
|
5972
6209
|
if (!controller) {
|
5973
6210
|
throw "No controller (telerikReporting.reportViewerController) has been specified.";
|
5974
6211
|
}
|
5975
|
-
var $placeholder = $(placeholder)
|
6212
|
+
var $placeholder = $(placeholder);
|
6213
|
+
var $documentMap;
|
5976
6214
|
var documentMapVisible = options.documentMapVisible !== false;
|
5977
6215
|
var enableAccessibility = options.enableAccessibility;
|
5978
6216
|
var currentReport = null;
|
@@ -5985,7 +6223,9 @@ var telerikReportViewer = (() => {
|
|
5985
6223
|
replaceStringResources($placeholder);
|
5986
6224
|
}
|
5987
6225
|
function onTreeViewSelectionChanged(e) {
|
5988
|
-
var documentMapNode = this.dataItem(e.node)
|
6226
|
+
var documentMapNode = this.dataItem(e.node);
|
6227
|
+
var page = documentMapNode.page;
|
6228
|
+
var id = documentMapNode.id;
|
5989
6229
|
controller.navigateToPage(page, {
|
5990
6230
|
type: "bookmark",
|
5991
6231
|
id
|
@@ -6059,7 +6299,8 @@ var telerikReportViewer = (() => {
|
|
6059
6299
|
$placeholder.removeClass("trv-loading");
|
6060
6300
|
}
|
6061
6301
|
function showDocumentMap(show) {
|
6062
|
-
var splitter = GlobalSettings.viewerInstances.find((element) => element.id === options.viewerSelector + "-document-map-splitter").instance
|
6302
|
+
var splitter = GlobalSettings.viewerInstances.find((element) => element.id === options.viewerSelector + "-document-map-splitter").instance;
|
6303
|
+
var sibling = $placeholder.next();
|
6063
6304
|
if (options.documentMapAreaPosition === DocumentMapAreaPositions.RIGHT) {
|
6064
6305
|
sibling = $placeholder.prev();
|
6065
6306
|
}
|
@@ -6135,8 +6376,14 @@ var telerikReportViewer = (() => {
|
|
6135
6376
|
throw "No controller (telerikReporting.reportViewerController) has been specified.";
|
6136
6377
|
}
|
6137
6378
|
var parameterEditors = [].concat(options.parameterEditors, ParameterEditors);
|
6138
|
-
var recentParameterValues
|
6139
|
-
var
|
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");
|
6140
6387
|
$previewButton.text(stringResources[$previewButton.text()]);
|
6141
6388
|
$previewButton.attr("aria-label", stringResources[$previewButton.attr("aria-label")]);
|
6142
6389
|
$previewButton.on("click", function(e) {
|
@@ -6167,7 +6414,14 @@ var telerikReportViewer = (() => {
|
|
6167
6414
|
return $(parameterContainerTemplate);
|
6168
6415
|
}
|
6169
6416
|
function createParameterUI(parameter) {
|
6170
|
-
var $container = createParameterContainer()
|
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);
|
6171
6425
|
var parameterText = escapeHtml(parameter.text);
|
6172
6426
|
var isHiddenParameter = !parameter.isVisible;
|
6173
6427
|
if (isHiddenParameter) {
|
@@ -6301,14 +6555,16 @@ var telerikReportViewer = (() => {
|
|
6301
6555
|
processedParameterValues = {};
|
6302
6556
|
parameters = newParameters || [];
|
6303
6557
|
clearEditors();
|
6304
|
-
var $parameterContainer
|
6558
|
+
var $parameterContainer;
|
6559
|
+
var $tempContainer = $("<div></div>");
|
6305
6560
|
each(parameters, function() {
|
6306
6561
|
try {
|
6307
6562
|
this.value = ParameterValidators.validate(this, this.value);
|
6308
6563
|
} catch (e) {
|
6309
6564
|
this.Error = this.Error || e;
|
6310
6565
|
}
|
6311
|
-
var hasError = Boolean(this.Error)
|
6566
|
+
var hasError = Boolean(this.Error);
|
6567
|
+
var hasValue = !hasError;
|
6312
6568
|
if (hasValue) {
|
6313
6569
|
recentParameterValues[this.id] = this.value;
|
6314
6570
|
if (this.availableValues) {
|
@@ -6526,7 +6782,8 @@ var telerikReportViewer = (() => {
|
|
6526
6782
|
}
|
6527
6783
|
function showParametersArea(show) {
|
6528
6784
|
var trv = window.telerikReportViewer;
|
6529
|
-
var splitter = GlobalSettings.viewerInstances.find((element) => element.id === options.viewerSelector + "-parameters-splitter").instance
|
6785
|
+
var splitter = GlobalSettings.viewerInstances.find((element) => element.id === options.viewerSelector + "-parameters-splitter").instance;
|
6786
|
+
var sibling = $placeholder.prev();
|
6530
6787
|
if (options.parametersAreaPosition === ParametersAreaPositions.TOP || options.parametersAreaPosition === ParametersAreaPositions.LEFT) {
|
6531
6788
|
sibling = $placeholder.next();
|
6532
6789
|
}
|
@@ -6602,7 +6859,11 @@ var telerikReportViewer = (() => {
|
|
6602
6859
|
var lastSelectedMenuItem;
|
6603
6860
|
var lastSelectedSubmenuItem;
|
6604
6861
|
function MainMenu(dom, rootOptions, otherOptions) {
|
6605
|
-
var options = $.extend({}, rootOptions, otherOptions)
|
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;
|
6606
6867
|
if (!controller) {
|
6607
6868
|
throw "No controller (telerikReporting.ReportViewerController) has been specified.";
|
6608
6869
|
}
|
@@ -6684,7 +6945,8 @@ var telerikReportViewer = (() => {
|
|
6684
6945
|
}
|
6685
6946
|
function fillFormats(formats) {
|
6686
6947
|
each($(dom).find("ul[data-command-list=export-format-list]"), function() {
|
6687
|
-
var $list = $(this)
|
6948
|
+
var $list = $(this);
|
6949
|
+
var $parent = $list.parents("li");
|
6688
6950
|
var tabIndex = enableAccessibility ? $parent.attr("tabindex") : -1;
|
6689
6951
|
if (!tabIndex) {
|
6690
6952
|
tabIndex = 1;
|
@@ -6888,7 +7150,8 @@ var telerikReportViewer = (() => {
|
|
6888
7150
|
return;
|
6889
7151
|
}
|
6890
7152
|
each(menuAreas, function() {
|
6891
|
-
var $menu = $(this)
|
7153
|
+
var $menu = $(this);
|
7154
|
+
var menuItems = $menu.children("li.k-item");
|
6892
7155
|
$menu.attr("aria-label", stringResources[$menu.attr("aria-label")]);
|
6893
7156
|
each(menuItems, function() {
|
6894
7157
|
var $menuItem = $(this);
|
@@ -6921,7 +7184,33 @@ var telerikReportViewer = (() => {
|
|
6921
7184
|
var defaultOptions7 = {};
|
6922
7185
|
function Search(placeholder, options, viewerOptions) {
|
6923
7186
|
options = $.extend({}, defaultOptions7, options);
|
6924
|
-
var controller = options.controller
|
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 = "";
|
6925
7214
|
var highlightManager = {
|
6926
7215
|
shadedClassName: "trv-search-dialog-shaded-result",
|
6927
7216
|
//the results that are found, but not selected (highlighted)
|
@@ -7090,7 +7379,12 @@ var telerikReportViewer = (() => {
|
|
7090
7379
|
windowLocation = kendoWindow.offset();
|
7091
7380
|
}
|
7092
7381
|
function adjustDialogPosition() {
|
7093
|
-
var windowWidth = $(window).innerWidth()
|
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;
|
7094
7388
|
if (!windowLocation) {
|
7095
7389
|
var reportViewerCoords = reportViewerWrapper[0].getBoundingClientRect();
|
7096
7390
|
kendoWindow.css({
|
@@ -7104,7 +7398,10 @@ var telerikReportViewer = (() => {
|
|
7104
7398
|
}
|
7105
7399
|
});
|
7106
7400
|
} else {
|
7107
|
-
var left = windowLocation.left
|
7401
|
+
var left = windowLocation.left;
|
7402
|
+
var top = windowLocation.top;
|
7403
|
+
var right = left + width;
|
7404
|
+
var bottom = top + height;
|
7108
7405
|
if (right > windowWidth - padding) {
|
7109
7406
|
left = Math.max(padding, windowWidth - width - padding);
|
7110
7407
|
kendoWindow.css({ left });
|
@@ -7202,7 +7499,9 @@ var telerikReportViewer = (() => {
|
|
7202
7499
|
contentElement: "",
|
7203
7500
|
template: "<div class='trv-search-dialog-results-row'><span>#: description #</span> <span class='trv-search-dialog-results-pageSpan'>" + stringResources.searchDialogPageText + " #:page#</span></div>",
|
7204
7501
|
change: function() {
|
7205
|
-
var index = this.select().index()
|
7502
|
+
var index = this.select().index();
|
7503
|
+
var view = this.dataSource.view();
|
7504
|
+
var dataItem = view[index];
|
7206
7505
|
onSelectedItem(dataItem);
|
7207
7506
|
updateUI(index, view.length);
|
7208
7507
|
}
|
@@ -7317,7 +7616,9 @@ var telerikReportViewer = (() => {
|
|
7317
7616
|
if (!results || results.length === 0) {
|
7318
7617
|
return;
|
7319
7618
|
}
|
7320
|
-
var $parent = $placeholder.parent()
|
7619
|
+
var $parent = $placeholder.parent();
|
7620
|
+
var $pageContainer = $parent.find(".trv-page-container");
|
7621
|
+
var elements = $pageContainer.find("[data-search-id]");
|
7321
7622
|
each(results, function() {
|
7322
7623
|
var $searchElement = elements.filter("[data-search-id=" + this.id + "]");
|
7323
7624
|
if ($searchElement) {
|
@@ -7398,7 +7699,8 @@ var telerikReportViewer = (() => {
|
|
7398
7699
|
$listView.select($selected);
|
7399
7700
|
$listView.trigger("change");
|
7400
7701
|
} else {
|
7401
|
-
var index = $listView.select().trigger("change").index()
|
7702
|
+
var index = $listView.select().trigger("change").index();
|
7703
|
+
var view = $listView.dataSource.view();
|
7402
7704
|
var newIndex = Math.min(view.length - 1, Math.max(0, index + offset));
|
7403
7705
|
if (newIndex !== index) {
|
7404
7706
|
var dataItem = view[newIndex];
|
@@ -7440,7 +7742,14 @@ var telerikReportViewer = (() => {
|
|
7440
7742
|
if (!$search) {
|
7441
7743
|
return;
|
7442
7744
|
}
|
7443
|
-
var $searchCaption = $search.find(".trv-search-dialog-caption-label")
|
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']");
|
7444
7753
|
replaceAttribute($search, "aria-label");
|
7445
7754
|
replaceAttribute($searchOptions, "aria-label");
|
7446
7755
|
replaceText($searchCaption);
|
@@ -7505,7 +7814,24 @@ var telerikReportViewer = (() => {
|
|
7505
7814
|
var defaultOptions8 = {};
|
7506
7815
|
function SendEmail(placeholder, options, viewerOptions) {
|
7507
7816
|
options = $.extend({}, defaultOptions8, options);
|
7508
|
-
var controller = options.controller
|
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");
|
7509
7835
|
if (!controller) {
|
7510
7836
|
throw "No controller (telerikReporting.ReportViewerController) has been specified.";
|
7511
7837
|
}
|
@@ -7656,11 +7982,13 @@ var telerikReportViewer = (() => {
|
|
7656
7982
|
});
|
7657
7983
|
function setAttrs() {
|
7658
7984
|
$placeholder.find(".trv-send-email-field input").each(function() {
|
7659
|
-
var el = $(this)
|
7985
|
+
var el = $(this);
|
7986
|
+
var attrName = el.attr("name");
|
7660
7987
|
el.attr("id", selector2 + "-" + attrName);
|
7661
7988
|
});
|
7662
7989
|
$placeholder.find(".trv-send-email-label label").each(function() {
|
7663
|
-
var el = $(this)
|
7990
|
+
var el = $(this);
|
7991
|
+
var attrName = el.attr("for");
|
7664
7992
|
el.attr("for", selector2 + "-" + attrName);
|
7665
7993
|
});
|
7666
7994
|
}
|
@@ -7669,7 +7997,9 @@ var telerikReportViewer = (() => {
|
|
7669
7997
|
windowLocation = kendoWindow.offset();
|
7670
7998
|
}
|
7671
7999
|
function adjustDialogSize() {
|
7672
|
-
var kendoWindow = kendoSendEmailDialog.element.parent(".k-window")
|
8000
|
+
var kendoWindow = kendoSendEmailDialog.element.parent(".k-window");
|
8001
|
+
var windowWidth = $(window).width();
|
8002
|
+
var kendoWindowWidth = 350;
|
7673
8003
|
if (windowWidth > 800) {
|
7674
8004
|
kendoWindowWidth = 720;
|
7675
8005
|
}
|
@@ -7682,7 +8012,16 @@ var telerikReportViewer = (() => {
|
|
7682
8012
|
if (!windowLocation) {
|
7683
8013
|
kendoSendEmailDialog.center();
|
7684
8014
|
} else {
|
7685
|
-
var padding = 10
|
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;
|
7686
8025
|
if (right > windowWidth - padding) {
|
7687
8026
|
left = Math.max(padding, windowWidth - width - padding);
|
7688
8027
|
kendoWindow.css({ left });
|
@@ -7761,7 +8100,10 @@ var telerikReportViewer = (() => {
|
|
7761
8100
|
});
|
7762
8101
|
}
|
7763
8102
|
function validateFields() {
|
7764
|
-
var fromIsValid = isEmpty(inputFrom) || !isValidEmail(inputFrom, false)
|
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;
|
7765
8107
|
if (!hasFormat) {
|
7766
8108
|
showError(docFormatEl, "data-required-msg");
|
7767
8109
|
}
|
@@ -7834,7 +8176,9 @@ var telerikReportViewer = (() => {
|
|
7834
8176
|
if (!$sendEmailDialog) {
|
7835
8177
|
return;
|
7836
8178
|
}
|
7837
|
-
var labels = $sendEmailDialog.find(".trv-replace-string")
|
8179
|
+
var labels = $sendEmailDialog.find(".trv-replace-string");
|
8180
|
+
var ariaLabel = $sendEmailDialog.find("[aria-label]");
|
8181
|
+
var titles = $sendEmailDialog.find("[title]");
|
7838
8182
|
if (labels.length) {
|
7839
8183
|
$.each(labels, function(key, value) {
|
7840
8184
|
replaceText($(value));
|
@@ -7899,7 +8243,15 @@ var telerikReportViewer = (() => {
|
|
7899
8243
|
|
7900
8244
|
// src/sideMenu.js
|
7901
8245
|
function SideMenu(dom, rootOptions, otherOptions) {
|
7902
|
-
var options = $.extend({}, rootOptions, otherOptions)
|
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;
|
7903
8255
|
if (!controller) {
|
7904
8256
|
throw "No controller (telerikReporting.ReportViewerController) has been specified.";
|
7905
8257
|
}
|
@@ -7961,7 +8313,8 @@ var telerikReportViewer = (() => {
|
|
7961
8313
|
}
|
7962
8314
|
function fillFormats(formats) {
|
7963
8315
|
each($(dom).find("ul[data-command-list=export-format-list]"), function() {
|
7964
|
-
var $list = $(this)
|
8316
|
+
var $list = $(this);
|
8317
|
+
var $parent = $list.parents("li");
|
7965
8318
|
var tabIndex = $parent.attr("tabindex");
|
7966
8319
|
if (!tabIndex) {
|
7967
8320
|
tabIndex = DEFAULT_TABINDEX;
|
@@ -8089,10 +8442,12 @@ var telerikReportViewer = (() => {
|
|
8089
8442
|
return;
|
8090
8443
|
}
|
8091
8444
|
each(menuAreas, function() {
|
8092
|
-
var $menu = $(this)
|
8445
|
+
var $menu = $(this);
|
8446
|
+
var menuItems = $menu.children("li.k-panelbar-header");
|
8093
8447
|
$menu.attr("aria-label", stringResources[$menu.attr("aria-label")]);
|
8094
8448
|
each(menuItems, function() {
|
8095
|
-
var $menuItem = $(this)
|
8449
|
+
var $menuItem = $(this);
|
8450
|
+
var $a = $menuItem.find("a");
|
8096
8451
|
$menuItem.attr("aria-label", stringResources[$menuItem.attr("aria-label")]);
|
8097
8452
|
if ($a) {
|
8098
8453
|
var $span = $a.find("span:not(.k-icon)");
|
@@ -8310,18 +8665,31 @@ var telerikReportViewer = (() => {
|
|
8310
8665
|
};
|
8311
8666
|
}
|
8312
8667
|
function ReportViewer(dom, options) {
|
8313
|
-
var svcApiUrl = options.serviceUrl
|
8668
|
+
var svcApiUrl = options.serviceUrl;
|
8669
|
+
var reportServerUrlSVCApiUrl = "";
|
8314
8670
|
if (options.reportServer) {
|
8315
8671
|
reportServerUrlSVCApiUrl = rtrim(options.reportServer.url, "\\/");
|
8316
8672
|
svcApiUrl = reportServerUrlSVCApiUrl + "/api/reports";
|
8317
8673
|
}
|
8318
|
-
var $placeholder = $(dom)
|
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 = "";
|
8319
8687
|
options.viewerSelector = "reportViewer-" + generateGuidString();
|
8320
8688
|
$placeholder.attr("data-selector", options.viewerSelector);
|
8321
8689
|
if (!validateOptions(options)) {
|
8322
8690
|
return;
|
8323
8691
|
}
|
8324
|
-
var version = "18.0.24.
|
8692
|
+
var version = "18.0.24.305";
|
8325
8693
|
options = extend({}, getDefaultOptions(svcApiUrl, version), options);
|
8326
8694
|
settings = new ReportViewerSettings(
|
8327
8695
|
persistanceKey,
|
@@ -8511,7 +8879,8 @@ var telerikReportViewer = (() => {
|
|
8511
8879
|
VIEWER_TOOLTIP_OPENING: controller.Events.TOOLTIP_OPENING,
|
8512
8880
|
SEND_EMAIL_BEGIN: controller.Events.SEND_EMAIL_STARTED,
|
8513
8881
|
SEND_EMAIL_END: controller.Events.SEND_EMAIL_READY
|
8514
|
-
}
|
8882
|
+
};
|
8883
|
+
var $viewer = $(viewer);
|
8515
8884
|
for (var eventName in viewerEventsMapping) {
|
8516
8885
|
var controllerEventName = viewerEventsMapping[eventName];
|
8517
8886
|
controller.on(controllerEventName, function($viewer2, eventName2) {
|
@@ -8569,13 +8938,19 @@ var telerikReportViewer = (() => {
|
|
8569
8938
|
min: "50px",
|
8570
8939
|
size: "210px",
|
8571
8940
|
collapsible: true
|
8572
|
-
}
|
8941
|
+
};
|
8942
|
+
var parameterAreaTemplate = $placeholder.find(".trv-parameters-area");
|
8943
|
+
var parameterAreaPanes = [{}];
|
8944
|
+
var documentMapPaneOptions = {
|
8573
8945
|
max: "500px",
|
8574
8946
|
min: "50px",
|
8575
8947
|
size: "210px",
|
8576
8948
|
collapsible: true,
|
8577
8949
|
collapsed: true
|
8578
|
-
}
|
8950
|
+
};
|
8951
|
+
var documentMapTemplate = $placeholder.find(".trv-document-map");
|
8952
|
+
var documentMapPanes = [{}];
|
8953
|
+
var orientation = "horizontal";
|
8579
8954
|
if (options.documentMapAreaPosition === DocumentMapAreaPositions.RIGHT) {
|
8580
8955
|
documentMapTemplate.insertAfter($placeholder.find(".trv-pages-area"));
|
8581
8956
|
documentMapPanes.push(documentMapPaneOptions);
|
@@ -8891,4 +9266,4 @@ var telerikReportViewer = (() => {
|
|
8891
9266
|
return __toCommonJS(src_exports);
|
8892
9267
|
})();
|
8893
9268
|
|
8894
|
-
/* DO NOT MODIFY OR DELETE THIS LINE! UPGRADE WIZARD CHECKSUM
|
9269
|
+
/* DO NOT MODIFY OR DELETE THIS LINE! UPGRADE WIZARD CHECKSUM 16be669e2e6279564aec244028122f71 */
|