@progress/telerik-jquery-report-viewer 22.24.514 → 23.24.806
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/dist/cjs/accessibility.js +28 -38
- package/dist/cjs/base-component.js +26 -0
- package/dist/cjs/binder.js +45 -138
- package/dist/cjs/controller.js +25 -25
- package/dist/cjs/documentMapArea.js +4 -13
- package/dist/cjs/event-emitter.js +124 -10
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/mainMenu.js +22 -31
- package/dist/cjs/pagesArea.js +8 -27
- package/dist/cjs/parameterValidators.js +4 -7
- package/dist/cjs/parameters.js +13 -13
- package/dist/cjs/parametersArea.js +36 -49
- package/dist/cjs/print.js +3 -4
- package/dist/cjs/reportViewer.js +38 -27
- package/dist/cjs/scroll.js +4 -6
- package/dist/cjs/search.js +327 -377
- package/dist/cjs/sendEmail.js +52 -95
- package/dist/cjs/serviceClient.js +163 -257
- package/dist/cjs/sideMenu.js +15 -24
- package/dist/cjs/sr.js +4 -4
- package/dist/cjs/template-cache.js +6 -6
- package/dist/cjs/toolbar/link-button.js +42 -0
- package/dist/cjs/toolbar/page-count-label.js +18 -0
- package/dist/cjs/toolbar/page-number-input.js +64 -0
- package/dist/cjs/uiFreezeCoordinator.js +17 -16
- package/dist/cjs/utils.js +11 -14
- package/dist/es/accessibility.js +29 -39
- package/dist/es/base-component.js +22 -0
- package/dist/es/binder.js +45 -138
- package/dist/es/controller.js +26 -26
- package/dist/es/documentMapArea.js +4 -13
- package/dist/es/event-emitter.js +124 -10
- package/dist/es/index.js +1 -0
- package/dist/es/mainMenu.js +23 -32
- package/dist/es/pagesArea.js +9 -28
- package/dist/es/parameterValidators.js +5 -8
- package/dist/es/parameters.js +14 -14
- package/dist/es/parametersArea.js +37 -50
- package/dist/es/print.js +4 -5
- package/dist/es/reportViewer.js +39 -28
- package/dist/es/scroll.js +4 -6
- package/dist/es/search.js +328 -378
- package/dist/es/sendEmail.js +52 -95
- package/dist/es/serviceClient.js +164 -258
- package/dist/es/sideMenu.js +16 -25
- package/dist/es/sr.js +4 -4
- package/dist/es/template-cache.js +7 -7
- package/dist/es/toolbar/link-button.js +38 -0
- package/dist/es/toolbar/page-count-label.js +14 -0
- package/dist/es/toolbar/page-number-input.js +60 -0
- package/dist/es/uiFreezeCoordinator.js +17 -16
- package/dist/es/utils.js +11 -14
- package/dist/font/font-icons.css +4 -4
- package/dist/font/font-icons.min.css +3 -3
- package/dist/js/telerikReportViewer.js +1080 -1190
- package/dist/js/telerikReportViewer.min.js +1 -1
- package/dist/js/telerikReportViewer.stringResources.js +4 -4
- package/dist/styles/telerikReportViewer.css +3 -3
- package/dist/styles/telerikReportViewer.min.css +3 -3
- package/dist/templates/telerikReportViewerTemplate-FA.html +4 -4
- package/dist/templates/telerikReportViewerTemplate.html +6 -6
- package/package.json +3 -2
- /package/dist/font/{ReportingIcons-18.1.24.514.ttf → ReportingIcons-18.2.24.806.ttf} +0 -0
package/dist/cjs/reportViewer.js
CHANGED
@@ -25,6 +25,9 @@ var globalSettings = require('./globalSettings.js');
|
|
25
25
|
var memStorage = require('./mem-storage.js');
|
26
26
|
var templateCache = require('./template-cache.js');
|
27
27
|
var reportViewerSettings = require('./report-viewer/report-viewer-settings.js');
|
28
|
+
var linkButton = require('./toolbar/link-button.js');
|
29
|
+
var pageNumberInput = require('./toolbar/page-number-input.js');
|
30
|
+
var pageCountLabel = require('./toolbar/page-count-label.js');
|
28
31
|
|
29
32
|
const Instances = globalSettings.GlobalSettings.viewerInstances;
|
30
33
|
function getDefaultOptions(serviceUrl, version) {
|
@@ -85,8 +88,8 @@ function ReportViewer(dom, options) {
|
|
85
88
|
if (!validateOptions(options)) {
|
86
89
|
return;
|
87
90
|
}
|
88
|
-
var version = "18.
|
89
|
-
options =
|
91
|
+
var version = "18.2.24.806";
|
92
|
+
options = $.extend({}, getDefaultOptions(svcApiUrl, version), options);
|
90
93
|
settings = new reportViewerSettings.ReportViewerSettings(
|
91
94
|
persistanceKey,
|
92
95
|
options.persistSession ? window.sessionStorage : new memStorage.MemStorage(),
|
@@ -537,24 +540,21 @@ function ReportViewer(dom, options) {
|
|
537
540
|
return e.outerHTML;
|
538
541
|
}).toArray();
|
539
542
|
var promises = [];
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
})
|
554
|
-
);
|
555
|
-
}
|
543
|
+
Array.from(styleSheets).forEach((element) => {
|
544
|
+
if (currentStyleLinks.indexOf(element) === -1) {
|
545
|
+
promises.push(
|
546
|
+
new Promise(function(resolve, reject) {
|
547
|
+
var $link = $(element);
|
548
|
+
$link.on("load", resolve);
|
549
|
+
$link.on("onerror", function() {
|
550
|
+
utils.logError("error loading stylesheet " + element);
|
551
|
+
resolve();
|
552
|
+
});
|
553
|
+
$head.append($link);
|
554
|
+
})
|
555
|
+
);
|
556
556
|
}
|
557
|
-
);
|
557
|
+
});
|
558
558
|
return Promise.all(promises).then(controller$1.cssLoaded);
|
559
559
|
}
|
560
560
|
function browserSupportsAllFeatures() {
|
@@ -563,12 +563,11 @@ function ReportViewer(dom, options) {
|
|
563
563
|
function ensureKendo(version2) {
|
564
564
|
if (window.kendo) {
|
565
565
|
return Promise.resolve();
|
566
|
-
} else {
|
567
|
-
var kendoUrl = utils.rTrim(svcApiUrl, "\\/") + "/resources/js/telerikReportViewer.kendo-" + version2 + ".min.js/";
|
568
|
-
return utils.loadScript(kendoUrl).catch(function(errorData) {
|
569
|
-
utils.logError("Kendo could not be loaded automatically. Make sure 'options.serviceUrl' / 'options.reportServer.url' is correct and accessible. The error is: " + errorData.error);
|
570
|
-
});
|
571
566
|
}
|
567
|
+
var kendoUrl = utils.rTrim(svcApiUrl, "\\/") + "/resources/js/telerikReportViewer.kendo-" + version2 + ".min.js/";
|
568
|
+
return utils.loadScript(kendoUrl).catch(function(errorData) {
|
569
|
+
utils.logError("Kendo could not be loaded automatically. Make sure 'options.serviceUrl' / 'options.reportServer.url' is correct and accessible. The error is: " + errorData.error);
|
570
|
+
});
|
572
571
|
}
|
573
572
|
function main(version2) {
|
574
573
|
ensureKendo(version2).then(function() {
|
@@ -596,7 +595,7 @@ function ReportViewer(dom, options) {
|
|
596
595
|
if (browserSupportsAllFeatures()) {
|
597
596
|
main(version);
|
598
597
|
} else {
|
599
|
-
|
598
|
+
throw "The current browser does not support the Promise feature which is required for using the Report Viewer.";
|
600
599
|
}
|
601
600
|
return viewer;
|
602
601
|
}
|
@@ -605,7 +604,7 @@ $.fn[pluginName] = function(options) {
|
|
605
604
|
if (this.selector && !options.selector) {
|
606
605
|
options.selector = this.selector;
|
607
606
|
}
|
608
|
-
return
|
607
|
+
return this.each(function() {
|
609
608
|
if (!$.data(this, pluginName)) {
|
610
609
|
$.data(this, pluginName, new ReportViewer(this, options));
|
611
610
|
}
|
@@ -639,11 +638,23 @@ const plugins = [
|
|
639
638
|
{
|
640
639
|
name: "telerik_ReportViewer_SideMenu",
|
641
640
|
constructor: sideMenu.SideMenu
|
641
|
+
},
|
642
|
+
{
|
643
|
+
name: "telerik_ReportViewer_LinkButton",
|
644
|
+
constructor: linkButton.LinkButton
|
645
|
+
},
|
646
|
+
{
|
647
|
+
name: "telerik_ReportViewer_PageNumberInput",
|
648
|
+
constructor: pageNumberInput.PageNumberInput
|
649
|
+
},
|
650
|
+
{
|
651
|
+
name: "telerik_ReportViewer_PageCountLabel",
|
652
|
+
constructor: pageCountLabel.PageCountLabel
|
642
653
|
}
|
643
654
|
];
|
644
655
|
plugins.forEach((plugin) => {
|
645
656
|
$.fn[plugin.name] = function(options, otherOptions) {
|
646
|
-
return
|
657
|
+
return this.each(function() {
|
647
658
|
if (!$.data(this, plugin.name)) {
|
648
659
|
$.data(this, plugin.name, new plugin.constructor(this, options, otherOptions));
|
649
660
|
}
|
package/dist/cjs/scroll.js
CHANGED
@@ -282,11 +282,11 @@ var Scroll = {
|
|
282
282
|
_loadVisiblePages: function _loadVisiblePages() {
|
283
283
|
var that = this;
|
284
284
|
var pages = that.$placeholder.find(".trv-report-page");
|
285
|
-
|
285
|
+
Array.from(pages).forEach((value) => {
|
286
286
|
var pageItem = $(value);
|
287
287
|
var pageNumber = parseInt(pageItem.attr("data-page"));
|
288
288
|
if (that._scrolledInToView(pageItem) && that._isSkeletonScreen(pageItem, pageNumber)) {
|
289
|
-
that.controller.getPageData(pageNumber).then(
|
289
|
+
that.controller.getPageData(pageNumber).then((newPage) => {
|
290
290
|
that._render(newPage, false);
|
291
291
|
});
|
292
292
|
}
|
@@ -457,9 +457,8 @@ var Scroll = {
|
|
457
457
|
return that._findNewCurrentPage(pages.splice(middleIndex, Number.MAX_VALUE));
|
458
458
|
} else if (result > 0 && pages.length > 1) {
|
459
459
|
return that._findNewCurrentPage(pages.splice(0, middleIndex));
|
460
|
-
} else {
|
461
|
-
return -1;
|
462
460
|
}
|
461
|
+
return -1;
|
463
462
|
},
|
464
463
|
_findPageInViewPort: function _findPageInViewPort(index, pages) {
|
465
464
|
var pageItem = this.$placeholder.find(pages[index]);
|
@@ -476,9 +475,8 @@ var Scroll = {
|
|
476
475
|
}
|
477
476
|
if (pageBottom < additionalTopOffset) {
|
478
477
|
return -1;
|
479
|
-
} else {
|
480
|
-
return 1;
|
481
478
|
}
|
479
|
+
return 1;
|
482
480
|
},
|
483
481
|
_scrollDown: function _scrollDown(pages, scrollPosition) {
|
484
482
|
var that = this;
|