@progress/telerik-jquery-report-viewer 22.24.514 → 22.24.709

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) 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 +22 -25
  6. package/dist/cjs/documentMapArea.js +4 -13
  7. package/dist/cjs/event-emitter.js +124 -10
  8. package/dist/cjs/mainMenu.js +22 -31
  9. package/dist/cjs/pagesArea.js +8 -27
  10. package/dist/cjs/parameterValidators.js +4 -7
  11. package/dist/cjs/parameters.js +13 -13
  12. package/dist/cjs/parametersArea.js +31 -47
  13. package/dist/cjs/print.js +3 -4
  14. package/dist/cjs/reportViewer.js +38 -27
  15. package/dist/cjs/scroll.js +4 -6
  16. package/dist/cjs/search.js +327 -377
  17. package/dist/cjs/sendEmail.js +52 -95
  18. package/dist/cjs/serviceClient.js +163 -257
  19. package/dist/cjs/sideMenu.js +15 -24
  20. package/dist/cjs/sr.js +4 -4
  21. package/dist/cjs/template-cache.js +6 -6
  22. package/dist/cjs/toolbar/link-button.js +42 -0
  23. package/dist/cjs/toolbar/page-count-label.js +18 -0
  24. package/dist/cjs/toolbar/page-number-input.js +64 -0
  25. package/dist/cjs/uiFreezeCoordinator.js +17 -16
  26. package/dist/cjs/utils.js +11 -14
  27. package/dist/es/accessibility.js +29 -39
  28. package/dist/es/base-component.js +22 -0
  29. package/dist/es/binder.js +45 -138
  30. package/dist/es/controller.js +23 -26
  31. package/dist/es/documentMapArea.js +4 -13
  32. package/dist/es/event-emitter.js +124 -10
  33. package/dist/es/mainMenu.js +23 -32
  34. package/dist/es/pagesArea.js +9 -28
  35. package/dist/es/parameterValidators.js +5 -8
  36. package/dist/es/parameters.js +14 -14
  37. package/dist/es/parametersArea.js +32 -48
  38. package/dist/es/print.js +4 -5
  39. package/dist/es/reportViewer.js +39 -28
  40. package/dist/es/scroll.js +4 -6
  41. package/dist/es/search.js +328 -378
  42. package/dist/es/sendEmail.js +52 -95
  43. package/dist/es/serviceClient.js +164 -258
  44. package/dist/es/sideMenu.js +16 -25
  45. package/dist/es/sr.js +4 -4
  46. package/dist/es/template-cache.js +7 -7
  47. package/dist/es/toolbar/link-button.js +38 -0
  48. package/dist/es/toolbar/page-count-label.js +14 -0
  49. package/dist/es/toolbar/page-number-input.js +60 -0
  50. package/dist/es/uiFreezeCoordinator.js +17 -16
  51. package/dist/es/utils.js +11 -14
  52. package/dist/font/font-icons.css +4 -4
  53. package/dist/font/font-icons.min.css +3 -3
  54. package/dist/js/telerikReportViewer.js +1071 -1188
  55. package/dist/js/telerikReportViewer.min.js +1 -1
  56. package/dist/js/telerikReportViewer.stringResources.js +4 -4
  57. package/dist/styles/telerikReportViewer.css +3 -3
  58. package/dist/styles/telerikReportViewer.min.css +3 -3
  59. package/dist/templates/telerikReportViewerTemplate-FA.html +4 -4
  60. package/dist/templates/telerikReportViewerTemplate.html +6 -6
  61. package/package.json +3 -2
  62. /package/dist/font/{ReportingIcons-18.1.24.514.ttf → ReportingIcons-18.1.24.709.ttf} +0 -0
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  This package is part of [Telerik Reporting](https://www.telerik.com/reporting).
4
4
 
5
- This version of Telerik jQuery Report Viewer requires Telerik Report Server or Telerik Reporting REST Service 18.1.24.514.
5
+ This version of Telerik jQuery Report Viewer requires Telerik Report Server or Telerik Reporting REST Service 18.1.24.709.
6
6
 
7
7
  __Intended for internal purposes only.__
8
8
 
@@ -12,16 +12,15 @@ function Accessibility(options) {
12
12
  var areas;
13
13
  var lastArea;
14
14
  var keyMap = {
15
- //keys for navigating on areas. Used in conjunction with CTRL+ALT to avoid duplicating default shortcuts behavior.
16
15
  CONFIRM_KEY: 13,
16
+ // C
17
17
  CONTENT_AREA_KEY: 67,
18
- //C
18
+ // D
19
19
  DOCUMENT_MAP_AREA_KEY: 68,
20
- //D
20
+ // M
21
21
  MENU_AREA_KEY: 77,
22
- //M
22
+ // P
23
23
  PARAMETERS_AREA_KEY: 80
24
- //P
25
24
  };
26
25
  options = $.extend({}, defaultOptions, options);
27
26
  controller = options.controller;
@@ -55,8 +54,7 @@ function Accessibility(options) {
55
54
  }
56
55
  }
57
56
  function focusOnErrorMessage() {
58
- var selectorChain = ["div.trv-pages-area", "div.trv-error-message"];
59
- var $errMsg = utils.findElement(selectorChain);
57
+ var $errMsg = $("div.trv-pages-area div.trv-error-message");
60
58
  if ($errMsg.length === 0) {
61
59
  return;
62
60
  }
@@ -72,24 +70,16 @@ function Accessibility(options) {
72
70
  setContentAreaKeyDown(area);
73
71
  }
74
72
  function setPageSelector() {
75
- var $pagers = $(".trv-report-pager");
76
- if ($pagers.length > 0) {
77
- var pageNumber = controller.getCurrentPageNumber();
78
- var pageCount = controller.getPageCount();
79
- utils.each($pagers, function() {
80
- var $pager = $(this);
81
- $pager.attr("aria-label", utils.stringFormat(stringResources.stringResources.ariaLabelPageNumberSelector, [pageNumber, pageCount]));
82
- var $pageInputs = $pager.find("input[data-role=telerik_ReportViewer_PageNumberInput]");
83
- if ($pageInputs.length > 0) {
84
- utils.each($pageInputs, function() {
85
- var $this = $(this);
86
- $this.attr("aria-label", stringResources.stringResources.ariaLabelPageNumberEditor);
87
- $this.attr("min", "1");
88
- $this.attr("max", "" + pageCount);
89
- });
90
- }
73
+ var pagers = document.querySelectorAll(".trv-report-pager");
74
+ var pageNumber = this._controller.getCurrentPageNumber();
75
+ var pageCount = this._controller.getPageCount();
76
+ pagers.forEach((pager) => {
77
+ pager.setAttribute("aria-label", utils.stringFormat(stringResources.stringResources.ariaLabelPageNumberSelector, [pageNumber, pageCount]));
78
+ var pageInputs = pager.querySelectorAll("input[data-role=telerik_ReportViewer_PageNumberInput]");
79
+ pageInputs.forEach((input) => {
80
+ input.setAttribute("aria-label", stringResources.stringResources.ariaLabelPageNumberEditor);
91
81
  });
92
- }
82
+ });
93
83
  }
94
84
  function initAreas() {
95
85
  areas = {};
@@ -103,16 +93,16 @@ function Accessibility(options) {
103
93
  }
104
94
  }
105
95
  function findContentArea() {
106
- return utils.findElement(["div[data-role=telerik_ReportViewer_PagesArea]"]);
96
+ return $("div[data-role=telerik_ReportViewer_PagesArea]");
107
97
  }
108
98
  function findDocumentMapArea() {
109
- return utils.findElement(["div[data-role=telerik_ReportViewer_DocumentMapArea]", "div[data-role=treeview]"]);
99
+ return $("div[data-role=telerik_ReportViewer_DocumentMapArea] div[data-role=treeview]");
110
100
  }
111
101
  function findMenuArea() {
112
- return utils.findElement("ul[data-role=telerik_ReportViewer_MainMenu]");
102
+ return $("ul[data-role=telerik_ReportViewer_MainMenu]");
113
103
  }
114
104
  function findParametersArea() {
115
- return utils.findElement(["div[data-role=telerik_ReportViewer_ParametersArea]", "div.trv-parameters-area-content"]);
105
+ return $("div[data-role=telerik_ReportViewer_ParametersArea] div.trv-parameters-area-content");
116
106
  }
117
107
  function processKeyDown(event) {
118
108
  if (!areas) {
@@ -145,8 +135,8 @@ function Accessibility(options) {
145
135
  if (!IsAreaContainerVisible($paramsArea)) {
146
136
  return;
147
137
  }
148
- utils.each(parametersAreaContent.children(), function() {
149
- $(this).keydown(function(event) {
138
+ Array.from(parametersAreaContent.children()).forEach((child) => {
139
+ $(child).on("keydown", (event) => {
150
140
  if (event.which == keyMap.CONFIRM_KEY) {
151
141
  var paramsButton = $paramsArea.find("button.trv-parameters-area-preview-button");
152
142
  paramsButton.focus();
@@ -166,11 +156,11 @@ function Accessibility(options) {
166
156
  if (!actions.length > 0) {
167
157
  return;
168
158
  }
169
- utils.each(actions, function() {
170
- var $action = $(this);
171
- $action.keydown(function(event) {
159
+ Array.from(actions).forEach((action) => {
160
+ var $action = $(action);
161
+ $action.on("keydown", (event) => {
172
162
  if (event.which == keyMap.CONFIRM_KEY) {
173
- $action.click();
163
+ $action.trigger("click");
174
164
  }
175
165
  });
176
166
  });
@@ -180,11 +170,11 @@ function Accessibility(options) {
180
170
  if (!menuAreas) {
181
171
  return;
182
172
  }
183
- utils.each(menuAreas, function() {
184
- var $menu = $(this);
173
+ Array.from(menuAreas).forEach((menu) => {
174
+ var $menu = $(menu);
185
175
  var menuItems = $menu.children("li.k-item");
186
- utils.each(menuItems, function() {
187
- var $menuItem = $(this);
176
+ Array.from(menuItems).forEach((menuItem) => {
177
+ var $menuItem = $(menuItem);
188
178
  if (!$menuItem.hasClass("trv-report-pager")) {
189
179
  var ariaLabel = $menuItem.attr("aria-label");
190
180
  var expandableSr = utils.stringFormat(". {0}", [stringResources.stringResources.ariaLabelExpandable]);
@@ -0,0 +1,26 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var __defProp = Object.defineProperty;
6
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
+ var __publicField = (obj, key, value) => {
8
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
9
+ return value;
10
+ };
11
+ class BaseComponent {
12
+ // #endregion
13
+ // #region constructor
14
+ constructor(element, options) {
15
+ // #region fields
16
+ __publicField(this, "element");
17
+ __publicField(this, "$element");
18
+ __publicField(this, "options");
19
+ this.element = element;
20
+ this.$element = $(element);
21
+ this.options = options;
22
+ }
23
+ // #endregion
24
+ }
25
+
26
+ exports.BaseComponent = BaseComponent;
@@ -2,59 +2,57 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var utils = require('./utils.js');
6
5
  var globalSettings = require('./globalSettings.js');
7
6
 
8
- var Binder = {
9
- bind: function($element) {
10
- var args = Array.prototype.slice.call(arguments, 1);
11
- attachCommands($element, args);
12
- var result = $element.find('[data-role^="telerik_ReportViewer_"]');
13
- utils.each(result, function() {
14
- var $this = $(this);
15
- var f = $.fn[$this.attr("data-role")];
16
- if (typeof f === "function") {
17
- f.apply($this, args);
7
+ class Binder {
8
+ static bind($element, ...args) {
9
+ const commands = args[0].commands;
10
+ const viewerOptions = args[1];
11
+ Binder.attachCommands($element, commands, viewerOptions);
12
+ var plugins = $element.find('[data-role^="telerik_ReportViewer_"]');
13
+ Array.from(plugins).forEach((element) => {
14
+ var $element2 = $(element);
15
+ var fn = $.fn[$element2.attr("data-role")];
16
+ if (typeof fn === "function") {
17
+ fn.apply($element2, args);
18
18
  }
19
19
  });
20
20
  }
21
- };
22
- function attachCommands($element, args) {
23
- var commands = args[0].commands;
24
- var viewerOptions = args[1];
25
- var elementSelector = '[data-command^="telerik_ReportViewer_"]';
26
- var customElementSelector = "[data-target-report-viewer]" + elementSelector;
27
- $element.on("click", elementSelector, commandHandler);
28
- if (!globalSettings.GlobalSettings.CommandHandlerAttached) {
29
- $(document.body).on("click", customElementSelector, customCommandHandler);
30
- globalSettings.GlobalSettings.CommandHandlerAttached = true;
31
- }
32
- utils.each(commands, function(key, command) {
33
- attachCommand(key, command, viewerOptions, $element);
34
- });
35
- function commandHandler(e) {
36
- var prefixedDataCommand = $(this).attr("data-command");
37
- if (prefixedDataCommand) {
38
- var dataCommand = prefixedDataCommand.substring("telerik_ReportViewer_".length);
39
- var cmd = commands[dataCommand];
40
- if (cmd && cmd.enabled()) {
41
- cmd.exec($(this).attr("data-command-parameter"));
21
+ static attachCommands($element, commands, viewerOptions) {
22
+ var elementSelector = '[data-command^="telerik_ReportViewer_"]';
23
+ var customElementSelector = "[data-target-report-viewer]" + elementSelector;
24
+ $element.on("click", elementSelector, commandHandler);
25
+ if (!globalSettings.GlobalSettings.CommandHandlerAttached) {
26
+ $(document.body).on("click", customElementSelector, customCommandHandler);
27
+ globalSettings.GlobalSettings.CommandHandlerAttached = true;
28
+ }
29
+ Object.entries(commands).forEach(([key, command]) => {
30
+ attachCommand(key, command, viewerOptions, $element);
31
+ });
32
+ function commandHandler(event) {
33
+ var prefixedDataCommand = $(this).attr("data-command");
34
+ if (prefixedDataCommand) {
35
+ var dataCommand = prefixedDataCommand.substring("telerik_ReportViewer_".length);
36
+ var cmd = commands[dataCommand];
37
+ if (cmd && cmd.enabled()) {
38
+ cmd.exec($(this).attr("data-command-parameter"));
39
+ }
40
+ event.preventDefault();
42
41
  }
43
- e.preventDefault();
44
42
  }
45
- }
46
- function customCommandHandler(e) {
47
- var $this = $(this);
48
- var prefixedDataCommand = $this.attr("data-command");
49
- var reportViewerTarget = $this.attr("data-target-report-viewer");
50
- if (prefixedDataCommand && reportViewerTarget) {
51
- var dataCommand = prefixedDataCommand.substring("telerik_ReportViewer_".length);
52
- var reportViewer = $(reportViewerTarget).data("telerik_ReportViewer");
53
- var cmd = reportViewer.commands[dataCommand];
54
- if (cmd.enabled()) {
55
- cmd.exec($(this).attr("data-command-parameter"));
43
+ function customCommandHandler(event) {
44
+ var $this = $(this);
45
+ var prefixedDataCommand = $this.attr("data-command");
46
+ var reportViewerTarget = $this.attr("data-target-report-viewer");
47
+ if (prefixedDataCommand && reportViewerTarget) {
48
+ var dataCommand = prefixedDataCommand.substring("telerik_ReportViewer_".length);
49
+ var reportViewer = $(reportViewerTarget).data("telerik_ReportViewer");
50
+ var cmd = reportViewer.commands[dataCommand];
51
+ if (cmd.enabled()) {
52
+ cmd.exec($(this).attr("data-command-parameter"));
53
+ }
54
+ event.preventDefault();
56
55
  }
57
- e.preventDefault();
58
56
  }
59
57
  }
60
58
  }
@@ -64,10 +62,10 @@ function attachCommand(dataCommand, cmd, viewerOptions, $element) {
64
62
  var customElementSelector = '[data-target-report-viewer="' + viewerOptions.selector + '"]' + elementSelector;
65
63
  var $defaultElement = $element.find(elementSelector);
66
64
  var $customElement = $(customElementSelector);
67
- $(cmd).on("enabledChanged", function(e) {
65
+ $(cmd).on("enabledChanged", function(event) {
68
66
  (cmd.enabled() ? $.fn.removeClass : $.fn.addClass).call($defaultElement.parent("li"), "k-disabled");
69
67
  (cmd.enabled() ? $.fn.removeClass : $.fn.addClass).call($customElement, viewerOptions.disabledButtonClass);
70
- }).on("checkedChanged", function(e) {
68
+ }).on("checkedChanged", function(event) {
71
69
  var defaultTarget = $defaultElement.parent("li");
72
70
  (cmd.checked() ? $.fn.addClass : $.fn.removeClass).call(defaultTarget, getSelectedClassName(defaultTarget));
73
71
  (cmd.checked() ? $.fn.addClass : $.fn.removeClass).call($customElement, viewerOptions.checkedButtonClass);
@@ -77,96 +75,5 @@ function attachCommand(dataCommand, cmd, viewerOptions, $element) {
77
75
  function getSelectedClassName($element) {
78
76
  return $element.hasClass("trv-menu-toggleable") ? "k-selected !k-bg-primary" : "k-selected";
79
77
  }
80
- function LinkButton(dom, options) {
81
- var cmd;
82
- var $element = $(dom);
83
- var dataCommand = $element.attr("data-command");
84
- if (dataCommand) {
85
- cmd = options.commands[dataCommand];
86
- }
87
- if (cmd) {
88
- $element.click(function(e) {
89
- if (cmd.enabled()) {
90
- cmd.exec($(this).attr("data-command-parameter"));
91
- } else {
92
- e.preventDefault();
93
- }
94
- });
95
- $(cmd).on("enabledChanged", function(e) {
96
- (cmd.enabled() ? $.fn.removeClass : $.fn.addClass).call($element, "disabled");
97
- }).on("checkedChanged", function(e) {
98
- (cmd.checked() ? $.fn.addClass : $.fn.removeClass).call($element, "checked");
99
- });
100
- }
101
- }
102
- var linkButton_pluginName = "telerik_ReportViewer_LinkButton";
103
- $.fn[linkButton_pluginName] = function(options) {
104
- return utils.each(this, function() {
105
- if (!$.data(this, linkButton_pluginName)) {
106
- $.data(this, linkButton_pluginName, new LinkButton(this, options));
107
- }
108
- });
109
- };
110
- function PageNumberInput(dom, options) {
111
- var $element = $(dom);
112
- var oldValue = 0;
113
- var cmd = options.commands["goToPage"];
114
- function setPageNumber(value) {
115
- if (oldValue !== value || !$element.is(":focus")) {
116
- $element.val(value);
117
- oldValue = value;
118
- }
119
- }
120
- options.controller.pageNumberChange(function(e, value) {
121
- setPageNumber(value);
122
- });
123
- $element.change(function() {
124
- var val = $(this).val();
125
- var num = utils.tryParseInt(val);
126
- if (!isNaN(num)) {
127
- var result = cmd.exec(num);
128
- setPageNumber(result);
129
- }
130
- });
131
- $element.keydown(function(e) {
132
- if (e.which == 13) {
133
- $(this).change();
134
- return e.preventDefault();
135
- }
136
- });
137
- function validateValue(value) {
138
- return /^([0-9]+)$/.test(value);
139
- }
140
- $element.keypress(function(event) {
141
- if (utils.isSpecialKey(event.keyCode)) {
142
- return true;
143
- }
144
- var newValue = $element.val() + String.fromCharCode(event.charCode);
145
- return validateValue(newValue);
146
- }).on("paste", function(event) {
147
- });
148
- }
149
- var pageNumberInput_pluginName = "telerik_ReportViewer_PageNumberInput";
150
- $.fn[pageNumberInput_pluginName] = function(options) {
151
- return utils.each(this, function() {
152
- if (!$.data(this, pageNumberInput_pluginName)) {
153
- $.data(this, pageNumberInput_pluginName, new PageNumberInput(this, options));
154
- }
155
- });
156
- };
157
- function PageCountLabel(dom, options) {
158
- var $element = $(dom);
159
- options.controller.pageCountChange(function(e, value) {
160
- $element.text(value);
161
- });
162
- }
163
- var pageCountLabel_pluginName = "telerik_ReportViewer_PageCountLabel";
164
- $.fn[pageCountLabel_pluginName] = function(options) {
165
- return utils.each(this, function() {
166
- if (!$.data(this, pageCountLabel_pluginName)) {
167
- $.data(this, pageCountLabel_pluginName, new PageCountLabel(this, options));
168
- }
169
- });
170
- };
171
78
 
172
79
  exports.Binder = Binder;
@@ -38,7 +38,7 @@ function ReportViewerController(options) {
38
38
  var eventEmitter$1 = new eventEmitter.EventEmitter();
39
39
  var serviceClientSentinel$1;
40
40
  clearReportState();
41
- options = utils.extend({}, defaultOptions, options);
41
+ options = $.extend({}, defaultOptions, options);
42
42
  var settings = options.settings;
43
43
  if (typeof settings.getPrintMode === "function") {
44
44
  printMode = settings.getPrintMode();
@@ -177,18 +177,16 @@ function ReportViewerController(options) {
177
177
  return client.getDocumentInfo(clientId2, instanceId, documentId).catch(handleRequestError).then(function(info) {
178
178
  if (info && info.documentReady) {
179
179
  return info;
180
- } else {
181
- info["promise"] = new Promise(function(resolve, reject) {
182
- window.setTimeout(resolve, options2.documentInfoPollIntervalMs);
183
- }).then(function() {
184
- return getDocumentInfoRecursive(clientId2, instanceId, documentId, options2);
185
- });
186
- return info;
187
180
  }
181
+ info["promise"] = new Promise(function(resolve, reject) {
182
+ window.setTimeout(resolve, options2.documentInfoPollIntervalMs);
183
+ }).then(function() {
184
+ return getDocumentInfoRecursive(clientId2, instanceId, documentId, options2);
185
+ });
186
+ return info;
188
187
  });
189
- } else {
190
- return Promise.reject();
191
188
  }
189
+ return Promise.reject();
192
190
  }
193
191
  function ReportLoader(reportHost, useCache, baseDocumentId, actionId) {
194
192
  var loaderOptions = {};
@@ -546,7 +544,7 @@ function ReportViewerController(options) {
546
544
  if (typeof args[0] === "function") {
547
545
  eventEmitter$1.on(event, args[0]);
548
546
  } else {
549
- eventEmitter$1.trigger(event, args);
547
+ eventEmitter$1.trigger(event, ...args);
550
548
  }
551
549
  return controller;
552
550
  }
@@ -575,11 +573,10 @@ function ReportViewerController(options) {
575
573
  var node = nodes[i];
576
574
  if (node.id === id) {
577
575
  return node.page;
578
- } else {
579
- var page = getPageForBookmark(node.items, id);
580
- if (page) {
581
- return page;
582
- }
576
+ }
577
+ var page = getPageForBookmark(node.items, id);
578
+ if (page) {
579
+ return page;
583
580
  }
584
581
  }
585
582
  }
@@ -756,7 +753,7 @@ function ReportViewerController(options) {
756
753
  MISSING_OR_INVALID_PARAMETERS: "missingOrInvalidParameters",
757
754
  RENDERING_STOPPED: "renderingStopped"
758
755
  };
759
- utils.extend(
756
+ $.extend(
760
757
  controller,
761
758
  {
762
759
  getPageData: function(pageNumber) {
@@ -771,7 +768,7 @@ function ReportViewerController(options) {
771
768
  }
772
769
  return {
773
770
  report,
774
- parameters: utils.extend({}, parameterValues)
771
+ parameters: $.extend({}, parameterValues)
775
772
  };
776
773
  },
777
774
  setReportSource: function(rs) {
@@ -787,7 +784,7 @@ function ReportViewerController(options) {
787
784
  return this;
788
785
  },
789
786
  updateSettings: function(settings2) {
790
- options.settings = utils.extend({}, settings2, options.settings);
787
+ options.settings = $.extend({}, settings2, options.settings);
791
788
  },
792
789
  clearReportSource: function() {
793
790
  report = parameterValues = null;
@@ -929,13 +926,13 @@ function ReportViewerController(options) {
929
926
  var parameterValues2 = {};
930
927
  var invalidParameters = [];
931
928
  var hasError = false;
932
- utils.each(parameters || [], function() {
929
+ Array.from(parameters || []).forEach((parameter) => {
933
930
  try {
934
- var value = parameterValidators$1.validate(this, this.value);
935
- parameterValues2[this.id] = value;
931
+ var value = parameterValidators$1.validate(parameter, parameter.value);
932
+ parameterValues2[parameter.id] = value;
936
933
  } catch (e) {
937
934
  hasError = true;
938
- invalidParameters.push(this);
935
+ invalidParameters.push(parameter);
939
936
  return;
940
937
  }
941
938
  });
@@ -1012,8 +1009,8 @@ function ReportViewerController(options) {
1012
1009
  eventEmitter$1.on(eventName, handler);
1013
1010
  return controller;
1014
1011
  },
1015
- trigger: function(eventName, args) {
1016
- eventEmitter$1.trigger(eventName, args);
1012
+ trigger: function(eventName, ...args) {
1013
+ eventEmitter$1.trigger(eventName, ...args);
1017
1014
  return controller;
1018
1015
  },
1019
1016
  showNotification: function(...args) {
@@ -2,7 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var utils = require('./utils.js');
6
5
  var stringResources = require('./stringResources.js');
7
6
  var enums = require('./enums.js');
8
7
  var globalSettings = require('./globalSettings.js');
@@ -45,8 +44,8 @@ function DocumentMapArea(placeholder, options, otherOptions) {
45
44
  }
46
45
  function setNodeAccessibilityAttributes(node) {
47
46
  var $items = $(node).find("li");
48
- utils.each($items, function() {
49
- var $li = $(this);
47
+ Array.from($items).forEach((item) => {
48
+ var $li = $(item);
50
49
  $li.attr("aria-label", $li[0].innerText);
51
50
  });
52
51
  }
@@ -78,8 +77,8 @@ function DocumentMapArea(placeholder, options, otherOptions) {
78
77
  treeView.bind("expand", onTreeViewNodeExpand);
79
78
  treeView.element.attr("aria-label", stringResources.stringResources.ariaLabelDocumentMap);
80
79
  var listItems = treeView.element.find("ul");
81
- utils.each(listItems, function() {
82
- setNodeAccessibilityAttributes(this);
80
+ Array.from(listItems).forEach((list) => {
81
+ setNodeAccessibilityAttributes(list);
83
82
  });
84
83
  if (documentMapNecessary) {
85
84
  setSplitbarAccessibilityAttributes();
@@ -156,13 +155,5 @@ function DocumentMapArea(placeholder, options, otherOptions) {
156
155
  $documentMapOverlay.attr("aria-label", stringResources.stringResources[$documentMapOverlay.attr("aria-label")]);
157
156
  }
158
157
  }
159
- var pluginName = "telerik_ReportViewer_DocumentMapArea";
160
- $.fn[pluginName] = function(options, otherOptions) {
161
- return utils.each(this, function() {
162
- if (!$.data(this, pluginName)) {
163
- $.data(this, pluginName, new DocumentMapArea(this, options, otherOptions));
164
- }
165
- });
166
- };
167
158
 
168
159
  exports.DocumentMapArea = DocumentMapArea;
@@ -2,16 +2,130 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- function EventEmitter() {
6
- var _emitter = $({});
7
- return {
8
- on: function(eventName, handler) {
9
- _emitter.on(eventName, handler);
10
- },
11
- trigger: function(eventName, ...args) {
12
- _emitter.trigger(eventName, ...args);
13
- }
14
- };
5
+ var __defProp = Object.defineProperty;
6
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
+ var __publicField = (obj, key, value) => {
8
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
9
+ return value;
10
+ };
11
+ class EventEmitter extends EventTarget {
12
+ constructor() {
13
+ super();
14
+ __publicField(this, "_events");
15
+ __publicField(this, "_eventsCount");
16
+ this._events = {};
17
+ this._eventsCount = 0;
18
+ }
19
+ /**
20
+ * @param {string} type
21
+ * @param {(event: CustomEvent, ...args: any[]) => void} listener
22
+ * @returns
23
+ */
24
+ addListener(type, listener) {
25
+ if (typeof listener !== "function") {
26
+ throw new TypeError("listener must be a function");
27
+ }
28
+ if (!this._events[type]) {
29
+ this._events[type] = [];
30
+ }
31
+ function wrappedListener(event) {
32
+ listener.call(this, event, ...event.detail);
33
+ }
34
+ wrappedListener.listener = listener;
35
+ this._events[type].push(wrappedListener);
36
+ this._eventsCount++;
37
+ this.addEventListener(type, wrappedListener.bind(this));
38
+ return this;
39
+ }
40
+ /**
41
+ * @alias addListener
42
+ * @param {string} type
43
+ * @param {(event: CustomEvent, ...args: any[]) => void} listener
44
+ * @returns
45
+ */
46
+ on(type, listener) {
47
+ return this.addListener(type, listener);
48
+ }
49
+ /**
50
+ * @param {string} type
51
+ * @param {any[]} args
52
+ * @returns
53
+ */
54
+ trigger(type, ...args) {
55
+ if (!this._events[type]) {
56
+ return void 0;
57
+ }
58
+ const event = new CustomEvent(type, {
59
+ detail: args,
60
+ cancelable: true
61
+ });
62
+ return this.dispatchEvent(event);
63
+ }
64
+ /**
65
+ * @alias trigger
66
+ * @param {string} type
67
+ * @param {any[]} args
68
+ * @returns
69
+ */
70
+ emit(type, ...args) {
71
+ return this.trigger(type, ...args);
72
+ }
73
+ /**
74
+ * @param {string} type
75
+ * @param {(event: CustomEvent, ...args: any[]) => void} listener
76
+ * @returns
77
+ */
78
+ removeListener(type, listener) {
79
+ if (!this._events[type]) {
80
+ return this;
81
+ }
82
+ this._events[type] = this._events[type].filter((wrappedListener) => {
83
+ if (wrappedListener.listener !== listener) {
84
+ return true;
85
+ }
86
+ this.removeEventListener(type, wrappedListener);
87
+ return false;
88
+ });
89
+ if (this._events[type].length === 0) {
90
+ delete this._events[type];
91
+ this._eventsCount--;
92
+ }
93
+ return this;
94
+ }
95
+ /**
96
+ * @param {string} type
97
+ * @returns
98
+ */
99
+ removeAllListeners(type) {
100
+ if (type === void 0) {
101
+ Object.keys(this._events).forEach((eventType) => {
102
+ this.removeAllListeners(eventType);
103
+ });
104
+ return this;
105
+ }
106
+ if (this._events[type]) {
107
+ this._events[type].forEach((wrappedListener) => {
108
+ this.removeEventListener(type, wrappedListener);
109
+ });
110
+ delete this._events[type];
111
+ this._eventsCount--;
112
+ }
113
+ return this;
114
+ }
115
+ /**
116
+ * @param {string} type
117
+ * @param {(event: CustomEvent, ...args: any[]) => void} listener
118
+ * @returns
119
+ */
120
+ off(type, listener) {
121
+ if (type === void 0) {
122
+ return this.removeAllListeners();
123
+ }
124
+ if (listener === void 0) {
125
+ return this.removeAllListeners(type);
126
+ }
127
+ return this.removeListener(type, listener);
128
+ }
15
129
  }
16
130
 
17
131
  exports.EventEmitter = EventEmitter;