@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
package/dist/cjs/sr.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  var _a;
4
4
  var sr = {
5
- //warning and error string resources
5
+ // warning and error string resources
6
6
  controllerNotInitialized: "Controller is not initialized.",
7
7
  noReportInstance: "No report instance.",
8
8
  missingTemplate: "!obsolete resource!",
@@ -35,7 +35,7 @@ var sr = {
35
35
  promisesChainStopError: "Error shown. Throwing promises chain stop error.",
36
36
  renderingCanceled: "Report processing was canceled.",
37
37
  tryReportPreview: "The report may now be previewed.",
38
- //viewer template string resources
38
+ // viewer template string resources
39
39
  parameterEditorSelectNone: "clear selection",
40
40
  parameterEditorSelectAll: "select all",
41
41
  parametersAreaPreviewButton: "Preview",
@@ -79,7 +79,7 @@ var sr = {
79
79
  sendEmailFormatLabel: "Format:",
80
80
  sendEmailSendLabel: "Send",
81
81
  sendEmailCancelLabel: "Cancel",
82
- //accessibility string resources
82
+ // accessibility string resources
83
83
  ariaLabelPageNumberSelector: "Page number selector. Showing page {0} of {1}.",
84
84
  ariaLabelPageNumberEditor: "Page number editor",
85
85
  ariaLabelExpandable: "Expandable",
@@ -139,7 +139,7 @@ var sr = {
139
139
  ariaLabelSendEmailFormat: "Report format:",
140
140
  ariaLabelSendEmailSend: "Send email",
141
141
  ariaLabelSendEmailCancel: "Cancel sending email",
142
- //search dialog resources
142
+ // search dialog resources
143
143
  searchDialogTitle: "Search in report contents",
144
144
  searchDialogSearchInProgress: "searching...",
145
145
  searchDialogNoResultsLabel: "No results",
@@ -17,14 +17,14 @@ const TemplateCache = function() {
17
17
  html = utils.replaceAll(html, "{service}/", baseUri);
18
18
  html = utils.replaceAll(html, "{service}", baseUri);
19
19
  var viewerTemplate = $("<div></div>").html(html);
20
- utils.each(viewerTemplate.find("template"), function(index, e) {
21
- var $e = $(e);
22
- templates[$e.attr("id")] = utils.trim($e.html(), "\n ");
20
+ Array.from(viewerTemplate.find("template")).forEach((element) => {
21
+ var $element = $(element);
22
+ templates[$element.attr("id")] = utils.trim($element.html(), "\n ");
23
23
  });
24
- utils.each(viewerTemplate.find("link"), function(index, e) {
25
- styleSheets.push(utils.trim(e.outerHTML, "\n "));
24
+ Array.from(viewerTemplate.find("link")).forEach((element) => {
25
+ styleSheets.push(utils.trim(element.outerHTML, "\n "));
26
26
  });
27
- styleSheets = utils.filterUniqueLastOccurance(styleSheets);
27
+ styleSheets = utils.filterUniqueLastOccurrence(styleSheets);
28
28
  return {
29
29
  templates,
30
30
  styleSheets
@@ -0,0 +1,42 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var baseComponent = require('../base-component.js');
6
+
7
+ var __defProp = Object.defineProperty;
8
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
+ var __publicField = (obj, key, value) => {
10
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
11
+ return value;
12
+ };
13
+ class LinkButton extends baseComponent.BaseComponent {
14
+ // #endregion
15
+ // #region constructor
16
+ constructor(element, options) {
17
+ super(element, options);
18
+ // #region fields
19
+ __publicField(this, "cmd");
20
+ var dataCommand = this.$element.attr("data-command");
21
+ if (dataCommand) {
22
+ this.cmd = this.options.commands[dataCommand];
23
+ }
24
+ if (this.cmd) {
25
+ this.$element.on("click", (event) => {
26
+ if (this.cmd.enabled()) {
27
+ this.cmd.exec($(this).attr("data-command-parameter"));
28
+ } else {
29
+ event.preventDefault();
30
+ }
31
+ });
32
+ $(this.cmd).on("enabledChanged", (event) => {
33
+ (this.cmd.enabled() ? $.fn.removeClass : $.fn.addClass).call(this.$element, "disabled");
34
+ }).on("checkedChanged", (event) => {
35
+ (this.cmd.checked() ? $.fn.addClass : $.fn.removeClass).call(this.$element, "checked");
36
+ });
37
+ }
38
+ }
39
+ // #endregion
40
+ }
41
+
42
+ exports.LinkButton = LinkButton;
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var baseComponent = require('../base-component.js');
6
+
7
+ class PageCountLabel extends baseComponent.BaseComponent {
8
+ // #region constructor
9
+ constructor(element, options) {
10
+ super(element, options);
11
+ this.options.controller.pageCountChange((event, value) => {
12
+ this.$element.text(value);
13
+ });
14
+ }
15
+ // #endregion
16
+ }
17
+
18
+ exports.PageCountLabel = PageCountLabel;
@@ -0,0 +1,64 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var baseComponent = require('../base-component.js');
6
+ var utils = require('../utils.js');
7
+
8
+ var __defProp = Object.defineProperty;
9
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
+ var __publicField = (obj, key, value) => {
11
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
12
+ return value;
13
+ };
14
+ class PageNumberInput extends baseComponent.BaseComponent {
15
+ // #endregion
16
+ // #region constructor
17
+ constructor(element, options) {
18
+ super(element, options);
19
+ // #region fields
20
+ __publicField(this, "cmd");
21
+ __publicField(this, "_numeric");
22
+ this.cmd = this.options.commands["goToPage"];
23
+ this._numeric = new kendo.ui.NumericTextBox(this.element, {
24
+ format: "0",
25
+ decimals: 0,
26
+ min: 0,
27
+ spinners: false,
28
+ change: this._onChange.bind(this),
29
+ spin: this._onChange.bind(this)
30
+ });
31
+ this._numeric._text[0].dataset.role = "telerik_ReportViewer_PageNumberInput";
32
+ this._numeric.element[0].dataset.role = "";
33
+ this.options.controller.on("reportLoadComplete", (event, reportInfo) => {
34
+ this._numeric.max(reportInfo.pageCount);
35
+ this._numeric.min(Math.min(1, reportInfo.pageCount));
36
+ this._numeric.value(Math.min(1, reportInfo.pageCount));
37
+ }).on("loadedReportChange", (event) => {
38
+ this._numeric.min(0);
39
+ this._numeric.max(0);
40
+ this._numeric.value(0);
41
+ }).on("renderingStopped", (event) => {
42
+ this._numeric.min(0);
43
+ this._numeric.max(0);
44
+ this._numeric.value(0);
45
+ }).pageNumberChange((event, value) => {
46
+ this._numeric.value(value);
47
+ });
48
+ }
49
+ // #endregion
50
+ // #region event handlers
51
+ _onChange(event, data) {
52
+ var val = this._numeric.value();
53
+ var num = utils.tryParseInt(val);
54
+ if (!isNaN(num)) {
55
+ this.cmd.exec(num);
56
+ }
57
+ }
58
+ _onSpin(event, data) {
59
+ return this._onChange(event, data);
60
+ }
61
+ // #endregion
62
+ }
63
+
64
+ exports.PageNumberInput = PageNumberInput;
@@ -7,21 +7,21 @@ var utils = require('./utils.js');
7
7
  var UIFreezeCoordinator = {
8
8
  $placeholder: null,
9
9
  $scrollableContainer: null,
10
- itemsInitialState: {},
11
10
  // Holds all items initial position per container
11
+ itemsInitialState: {},
12
+ // Holds the bounds of the frozen areas by X per container
12
13
  xFrozenAreasBounds: {},
13
- //Holds the bounds of the frozen areas by X per container
14
+ // Holds the bounds of the frozen areas by Y per container
14
15
  yFrozenAreasBounds: {},
15
- //Holds the bounds of the frozen areas by Y per container
16
16
  freezeMaxZIndex: {},
17
17
  zIndex: 1,
18
- freezeBGColor: {},
19
18
  // Holds default background-color value per container
20
- currentlyfreezedContainer: {
19
+ freezeBGColor: {},
20
+ // Holds whether freezing has been applied per container.
21
+ currentlyFrozenContainer: {
21
22
  vertical: {},
22
23
  horizontal: {}
23
24
  },
24
- //Holds whether freezing has been applied per container.
25
25
  isInitialize: false,
26
26
  scaleFactor: null,
27
27
  /**
@@ -149,28 +149,28 @@ var UIFreezeCoordinator = {
149
149
  var horizontalMoveOffset = scrollableContainerScrollLeft - elementWrapperLeftPosition;
150
150
  if (hasFixColumn && verticalMoveOffset > 0) {
151
151
  if (scrollableContainerScrollTop <= $elementWrapper.outerHeight() * this.scaleFactor + elementWrapperTopPosition - this.yFrozenAreasBounds[freezeItemsContainerID].height) {
152
- this.currentlyfreezedContainer.vertical[freezeItemsContainerID] = true;
152
+ this.currentlyFrozenContainer.vertical[freezeItemsContainerID] = true;
153
153
  this._updateUIElementsPosition($colHeaders, "top", verticalMoveOffset / this.scaleFactor, freezeItemsContainerID);
154
154
  }
155
155
  } else {
156
- if (this.currentlyfreezedContainer.vertical[freezeItemsContainerID]) {
157
- delete this.currentlyfreezedContainer.vertical[freezeItemsContainerID];
156
+ if (this.currentlyFrozenContainer.vertical[freezeItemsContainerID]) {
157
+ delete this.currentlyFrozenContainer.vertical[freezeItemsContainerID];
158
158
  this._updateUIElementsPosition($colHeaders, "top", -1, freezeItemsContainerID);
159
159
  }
160
160
  }
161
161
  if (hasFixRow && horizontalMoveOffset > 0) {
162
162
  if (scrollableContainerScrollLeft <= $elementWrapper.outerWidth() * this.scaleFactor + elementWrapperLeftPosition - this.xFrozenAreasBounds[freezeItemsContainerID].width) {
163
- this.currentlyfreezedContainer.horizontal[freezeItemsContainerID] = true;
163
+ this.currentlyFrozenContainer.horizontal[freezeItemsContainerID] = true;
164
164
  this._updateUIElementsPosition($rowHeaders, "left", horizontalMoveOffset / this.scaleFactor, freezeItemsContainerID);
165
165
  }
166
166
  } else {
167
- if (this.currentlyfreezedContainer.horizontal[freezeItemsContainerID]) {
168
- delete this.currentlyfreezedContainer.horizontal[freezeItemsContainerID];
167
+ if (this.currentlyFrozenContainer.horizontal[freezeItemsContainerID]) {
168
+ delete this.currentlyFrozenContainer.horizontal[freezeItemsContainerID];
169
169
  this._updateUIElementsPosition($rowHeaders, "left", -1, freezeItemsContainerID);
170
170
  }
171
171
  }
172
172
  } else {
173
- if (this.currentlyfreezedContainer.horizontal[freezeItemsContainerID] || this.currentlyfreezedContainer.vertical[freezeItemsContainerID]) {
173
+ if (this.currentlyFrozenContainer.horizontal[freezeItemsContainerID] || this.currentlyFrozenContainer.vertical[freezeItemsContainerID]) {
174
174
  this._resetToDefaultPosition(freezeItemsContainerID);
175
175
  }
176
176
  }
@@ -185,8 +185,8 @@ var UIFreezeCoordinator = {
185
185
  var $colHeaders = $("[data-sticky-direction*='Vertical'][data-sticky-id='" + freezeItemsContainerID + "']");
186
186
  this._updateUIElementsPosition($colHeaders, "top", -1, freezeItemsContainerID);
187
187
  this._updateUIElementsPosition($rowHeaders, "left", -1, freezeItemsContainerID);
188
- delete this.currentlyfreezedContainer.horizontal[freezeItemsContainerID];
189
- delete this.currentlyfreezedContainer.vertical[freezeItemsContainerID];
188
+ delete this.currentlyFrozenContainer.horizontal[freezeItemsContainerID];
189
+ delete this.currentlyFrozenContainer.vertical[freezeItemsContainerID];
190
190
  },
191
191
  /**
192
192
  * Update the freeze elements position
@@ -229,6 +229,7 @@ var UIFreezeCoordinator = {
229
229
  $item.css(newStyleRules);
230
230
  }
231
231
  },
232
+ // eslint-disable-next-line max-params
232
233
  _applyBgColorOnScroll: function($item, isItemFrozenBothDirection, hasInitialBgColor, shouldApplyBGColor, freezeItemsContainerID) {
233
234
  if ($item.is("img")) {
234
235
  return true;
@@ -247,7 +248,7 @@ var UIFreezeCoordinator = {
247
248
  return utils.getColorAlphaValue(bgColorValue) > 0;
248
249
  },
249
250
  _isFrozen: function(freezeItemsContainerID) {
250
- return this.currentlyfreezedContainer.horizontal[freezeItemsContainerID] || this.currentlyfreezedContainer.vertical[freezeItemsContainerID];
251
+ return this.currentlyFrozenContainer.horizontal[freezeItemsContainerID] || this.currentlyFrozenContainer.vertical[freezeItemsContainerID];
251
252
  },
252
253
  /**
253
254
  * Checks if an UI element is in the visible part of the scrollable container
package/dist/cjs/utils.js CHANGED
@@ -172,13 +172,11 @@ function areEqualArrays(array1, array2) {
172
172
  if (array1 === null) {
173
173
  if (array2 !== null) {
174
174
  return false;
175
- } else {
176
- return true;
177
- }
178
- } else {
179
- if (array2 === null) {
180
- return false;
181
175
  }
176
+ return true;
177
+ }
178
+ if (array2 === null) {
179
+ return false;
182
180
  }
183
181
  if (array1.length !== array2.length) {
184
182
  return false;
@@ -304,7 +302,7 @@ function selector() {
304
302
  function isArray(obj) {
305
303
  if (Array.isArray(obj))
306
304
  return true;
307
- var length = !!obj && "length" in obj && obj.length;
305
+ var length = Boolean(obj) && "length" in obj && obj.length;
308
306
  if (typeof length === "number") {
309
307
  return true;
310
308
  }
@@ -324,12 +322,11 @@ function loadScriptWithCallback(src, done, version) {
324
322
  function loadScript(url) {
325
323
  var ajaxOptions = {
326
324
  dataType: "script",
327
- cache: true,
328
- url
325
+ cache: true
329
326
  };
330
- return $ajax(ajaxOptions);
327
+ return $ajax(url, ajaxOptions);
331
328
  }
332
- function filterUniqueLastOccurance(array) {
329
+ function filterUniqueLastOccurrence(array) {
333
330
  function onlyLastUnique(value, index, self) {
334
331
  return self.lastIndexOf(value) === index;
335
332
  }
@@ -388,9 +385,9 @@ function getColorAlphaValue(color) {
388
385
  var alpha = colorComponents.length === 4 ? parseFloat((parseFloat(colorComponents[3].replace(/[()]/g, "")) / 255).toFixed(2)) : 1;
389
386
  return alpha;
390
387
  }
391
- function $ajax(ajaxSettings) {
388
+ function $ajax(url, ajaxSettings) {
392
389
  return new Promise(function(resolve, reject) {
393
- $.ajax(ajaxSettings).done(function(data) {
390
+ $.ajax(url, ajaxSettings).done(function(data) {
394
391
  return resolve(data);
395
392
  }).fail(function(xhr, status, error) {
396
393
  reject(toXhrErrorData(xhr, status, error));
@@ -456,7 +453,7 @@ exports.each = each;
456
453
  exports.escapeHtml = escapeHtml;
457
454
  exports.exceptionTypeNamesMatch = exceptionTypeNamesMatch;
458
455
  exports.extend = extend;
459
- exports.filterUniqueLastOccurance = filterUniqueLastOccurance;
456
+ exports.filterUniqueLastOccurrence = filterUniqueLastOccurrence;
460
457
  exports.findElement = findElement;
461
458
  exports.generateGuidString = generateGuidString;
462
459
  exports.getColorAlphaValue = getColorAlphaValue;
@@ -1,4 +1,4 @@
1
- import { findElement, each, stringFormat } from './utils.js';
1
+ import { stringFormat } from './utils.js';
2
2
  import { stringResources } from './stringResources.js';
3
3
 
4
4
  var defaultOptions = {};
@@ -8,16 +8,15 @@ function Accessibility(options) {
8
8
  var areas;
9
9
  var lastArea;
10
10
  var keyMap = {
11
- //keys for navigating on areas. Used in conjunction with CTRL+ALT to avoid duplicating default shortcuts behavior.
12
11
  CONFIRM_KEY: 13,
12
+ // C
13
13
  CONTENT_AREA_KEY: 67,
14
- //C
14
+ // D
15
15
  DOCUMENT_MAP_AREA_KEY: 68,
16
- //D
16
+ // M
17
17
  MENU_AREA_KEY: 77,
18
- //M
18
+ // P
19
19
  PARAMETERS_AREA_KEY: 80
20
- //P
21
20
  };
22
21
  options = $.extend({}, defaultOptions, options);
23
22
  controller = options.controller;
@@ -51,8 +50,7 @@ function Accessibility(options) {
51
50
  }
52
51
  }
53
52
  function focusOnErrorMessage() {
54
- var selectorChain = ["div.trv-pages-area", "div.trv-error-message"];
55
- var $errMsg = findElement(selectorChain);
53
+ var $errMsg = $("div.trv-pages-area div.trv-error-message");
56
54
  if ($errMsg.length === 0) {
57
55
  return;
58
56
  }
@@ -68,24 +66,16 @@ function Accessibility(options) {
68
66
  setContentAreaKeyDown(area);
69
67
  }
70
68
  function setPageSelector() {
71
- var $pagers = $(".trv-report-pager");
72
- if ($pagers.length > 0) {
73
- var pageNumber = controller.getCurrentPageNumber();
74
- var pageCount = controller.getPageCount();
75
- each($pagers, function() {
76
- var $pager = $(this);
77
- $pager.attr("aria-label", stringFormat(stringResources.ariaLabelPageNumberSelector, [pageNumber, pageCount]));
78
- var $pageInputs = $pager.find("input[data-role=telerik_ReportViewer_PageNumberInput]");
79
- if ($pageInputs.length > 0) {
80
- each($pageInputs, function() {
81
- var $this = $(this);
82
- $this.attr("aria-label", stringResources.ariaLabelPageNumberEditor);
83
- $this.attr("min", "1");
84
- $this.attr("max", "" + pageCount);
85
- });
86
- }
69
+ var pagers = document.querySelectorAll(".trv-report-pager");
70
+ var pageNumber = this._controller.getCurrentPageNumber();
71
+ var pageCount = this._controller.getPageCount();
72
+ pagers.forEach((pager) => {
73
+ pager.setAttribute("aria-label", stringFormat(stringResources.ariaLabelPageNumberSelector, [pageNumber, pageCount]));
74
+ var pageInputs = pager.querySelectorAll("input[data-role=telerik_ReportViewer_PageNumberInput]");
75
+ pageInputs.forEach((input) => {
76
+ input.setAttribute("aria-label", stringResources.ariaLabelPageNumberEditor);
87
77
  });
88
- }
78
+ });
89
79
  }
90
80
  function initAreas() {
91
81
  areas = {};
@@ -99,16 +89,16 @@ function Accessibility(options) {
99
89
  }
100
90
  }
101
91
  function findContentArea() {
102
- return findElement(["div[data-role=telerik_ReportViewer_PagesArea]"]);
92
+ return $("div[data-role=telerik_ReportViewer_PagesArea]");
103
93
  }
104
94
  function findDocumentMapArea() {
105
- return findElement(["div[data-role=telerik_ReportViewer_DocumentMapArea]", "div[data-role=treeview]"]);
95
+ return $("div[data-role=telerik_ReportViewer_DocumentMapArea] div[data-role=treeview]");
106
96
  }
107
97
  function findMenuArea() {
108
- return findElement("ul[data-role=telerik_ReportViewer_MainMenu]");
98
+ return $("ul[data-role=telerik_ReportViewer_MainMenu]");
109
99
  }
110
100
  function findParametersArea() {
111
- return findElement(["div[data-role=telerik_ReportViewer_ParametersArea]", "div.trv-parameters-area-content"]);
101
+ return $("div[data-role=telerik_ReportViewer_ParametersArea] div.trv-parameters-area-content");
112
102
  }
113
103
  function processKeyDown(event) {
114
104
  if (!areas) {
@@ -141,8 +131,8 @@ function Accessibility(options) {
141
131
  if (!IsAreaContainerVisible($paramsArea)) {
142
132
  return;
143
133
  }
144
- each(parametersAreaContent.children(), function() {
145
- $(this).keydown(function(event) {
134
+ Array.from(parametersAreaContent.children()).forEach((child) => {
135
+ $(child).on("keydown", (event) => {
146
136
  if (event.which == keyMap.CONFIRM_KEY) {
147
137
  var paramsButton = $paramsArea.find("button.trv-parameters-area-preview-button");
148
138
  paramsButton.focus();
@@ -162,11 +152,11 @@ function Accessibility(options) {
162
152
  if (!actions.length > 0) {
163
153
  return;
164
154
  }
165
- each(actions, function() {
166
- var $action = $(this);
167
- $action.keydown(function(event) {
155
+ Array.from(actions).forEach((action) => {
156
+ var $action = $(action);
157
+ $action.on("keydown", (event) => {
168
158
  if (event.which == keyMap.CONFIRM_KEY) {
169
- $action.click();
159
+ $action.trigger("click");
170
160
  }
171
161
  });
172
162
  });
@@ -176,11 +166,11 @@ function Accessibility(options) {
176
166
  if (!menuAreas) {
177
167
  return;
178
168
  }
179
- each(menuAreas, function() {
180
- var $menu = $(this);
169
+ Array.from(menuAreas).forEach((menu) => {
170
+ var $menu = $(menu);
181
171
  var menuItems = $menu.children("li.k-item");
182
- each(menuItems, function() {
183
- var $menuItem = $(this);
172
+ Array.from(menuItems).forEach((menuItem) => {
173
+ var $menuItem = $(menuItem);
184
174
  if (!$menuItem.hasClass("trv-report-pager")) {
185
175
  var ariaLabel = $menuItem.attr("aria-label");
186
176
  var expandableSr = stringFormat(". {0}", [stringResources.ariaLabelExpandable]);
@@ -0,0 +1,22 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => {
4
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
+ return value;
6
+ };
7
+ class BaseComponent {
8
+ // #endregion
9
+ // #region constructor
10
+ constructor(element, options) {
11
+ // #region fields
12
+ __publicField(this, "element");
13
+ __publicField(this, "$element");
14
+ __publicField(this, "options");
15
+ this.element = element;
16
+ this.$element = $(element);
17
+ this.options = options;
18
+ }
19
+ // #endregion
20
+ }
21
+
22
+ export { BaseComponent };