@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.
Files changed (64) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/accessibility.js +28 -38
  3. package/dist/cjs/base-component.js +26 -0
  4. package/dist/cjs/binder.js +45 -138
  5. package/dist/cjs/controller.js +25 -25
  6. package/dist/cjs/documentMapArea.js +4 -13
  7. package/dist/cjs/event-emitter.js +124 -10
  8. package/dist/cjs/index.js +2 -0
  9. package/dist/cjs/mainMenu.js +22 -31
  10. package/dist/cjs/pagesArea.js +8 -27
  11. package/dist/cjs/parameterValidators.js +4 -7
  12. package/dist/cjs/parameters.js +13 -13
  13. package/dist/cjs/parametersArea.js +36 -49
  14. package/dist/cjs/print.js +3 -4
  15. package/dist/cjs/reportViewer.js +38 -27
  16. package/dist/cjs/scroll.js +4 -6
  17. package/dist/cjs/search.js +327 -377
  18. package/dist/cjs/sendEmail.js +52 -95
  19. package/dist/cjs/serviceClient.js +163 -257
  20. package/dist/cjs/sideMenu.js +15 -24
  21. package/dist/cjs/sr.js +4 -4
  22. package/dist/cjs/template-cache.js +6 -6
  23. package/dist/cjs/toolbar/link-button.js +42 -0
  24. package/dist/cjs/toolbar/page-count-label.js +18 -0
  25. package/dist/cjs/toolbar/page-number-input.js +64 -0
  26. package/dist/cjs/uiFreezeCoordinator.js +17 -16
  27. package/dist/cjs/utils.js +11 -14
  28. package/dist/es/accessibility.js +29 -39
  29. package/dist/es/base-component.js +22 -0
  30. package/dist/es/binder.js +45 -138
  31. package/dist/es/controller.js +26 -26
  32. package/dist/es/documentMapArea.js +4 -13
  33. package/dist/es/event-emitter.js +124 -10
  34. package/dist/es/index.js +1 -0
  35. package/dist/es/mainMenu.js +23 -32
  36. package/dist/es/pagesArea.js +9 -28
  37. package/dist/es/parameterValidators.js +5 -8
  38. package/dist/es/parameters.js +14 -14
  39. package/dist/es/parametersArea.js +37 -50
  40. package/dist/es/print.js +4 -5
  41. package/dist/es/reportViewer.js +39 -28
  42. package/dist/es/scroll.js +4 -6
  43. package/dist/es/search.js +328 -378
  44. package/dist/es/sendEmail.js +52 -95
  45. package/dist/es/serviceClient.js +164 -258
  46. package/dist/es/sideMenu.js +16 -25
  47. package/dist/es/sr.js +4 -4
  48. package/dist/es/template-cache.js +7 -7
  49. package/dist/es/toolbar/link-button.js +38 -0
  50. package/dist/es/toolbar/page-count-label.js +14 -0
  51. package/dist/es/toolbar/page-number-input.js +60 -0
  52. package/dist/es/uiFreezeCoordinator.js +17 -16
  53. package/dist/es/utils.js +11 -14
  54. package/dist/font/font-icons.css +4 -4
  55. package/dist/font/font-icons.min.css +3 -3
  56. package/dist/js/telerikReportViewer.js +1080 -1190
  57. package/dist/js/telerikReportViewer.min.js +1 -1
  58. package/dist/js/telerikReportViewer.stringResources.js +4 -4
  59. package/dist/styles/telerikReportViewer.css +3 -3
  60. package/dist/styles/telerikReportViewer.min.css +3 -3
  61. package/dist/templates/telerikReportViewerTemplate-FA.html +4 -4
  62. package/dist/templates/telerikReportViewerTemplate.html +6 -6
  63. package/package.json +3 -2
  64. /package/dist/font/{ReportingIcons-18.1.24.514.ttf → ReportingIcons-18.2.24.806.ttf} +0 -0
@@ -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.1.24.514";
89
- options = utils.extend({}, getDefaultOptions(svcApiUrl, version), 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
- utils.each(
541
- styleSheets,
542
- function(i, e) {
543
- if (-1 === currentStyleLinks.indexOf(e)) {
544
- promises.push(
545
- new Promise(function(resolve, reject) {
546
- var $link = $(e);
547
- $link.on("load", resolve);
548
- $link.on("onerror", function() {
549
- utils.logError("error loading stylesheet " + e);
550
- resolve();
551
- });
552
- $head.append($link);
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
- utils.loadScriptWithCallback("https://cdn.polyfill.io/v2/polyfill.min.js?features=Promise", main, version);
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 utils.each(this, function() {
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 utils.each(this, function() {
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
  }
@@ -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
- $.each(pages, function(index, value) {
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(function(newPage) {
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;