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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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/es/sr.js CHANGED
@@ -1,6 +1,6 @@
1
1
  var _a;
2
2
  var sr = {
3
- //warning and error string resources
3
+ // warning and error string resources
4
4
  controllerNotInitialized: "Controller is not initialized.",
5
5
  noReportInstance: "No report instance.",
6
6
  missingTemplate: "!obsolete resource!",
@@ -33,7 +33,7 @@ var sr = {
33
33
  promisesChainStopError: "Error shown. Throwing promises chain stop error.",
34
34
  renderingCanceled: "Report processing was canceled.",
35
35
  tryReportPreview: "The report may now be previewed.",
36
- //viewer template string resources
36
+ // viewer template string resources
37
37
  parameterEditorSelectNone: "clear selection",
38
38
  parameterEditorSelectAll: "select all",
39
39
  parametersAreaPreviewButton: "Preview",
@@ -77,7 +77,7 @@ var sr = {
77
77
  sendEmailFormatLabel: "Format:",
78
78
  sendEmailSendLabel: "Send",
79
79
  sendEmailCancelLabel: "Cancel",
80
- //accessibility string resources
80
+ // accessibility string resources
81
81
  ariaLabelPageNumberSelector: "Page number selector. Showing page {0} of {1}.",
82
82
  ariaLabelPageNumberEditor: "Page number editor",
83
83
  ariaLabelExpandable: "Expandable",
@@ -137,7 +137,7 @@ var sr = {
137
137
  ariaLabelSendEmailFormat: "Report format:",
138
138
  ariaLabelSendEmailSend: "Send email",
139
139
  ariaLabelSendEmailCancel: "Cancel sending email",
140
- //search dialog resources
140
+ // search dialog resources
141
141
  searchDialogTitle: "Search in report contents",
142
142
  searchDialogSearchInProgress: "searching...",
143
143
  searchDialogNoResultsLabel: "No results",
@@ -1,4 +1,4 @@
1
- import { rTrim, replaceAll, each, trim, filterUniqueLastOccurance } from './utils.js';
1
+ import { rTrim, replaceAll, trim, filterUniqueLastOccurrence } from './utils.js';
2
2
 
3
3
  const TemplateCache = function() {
4
4
  var cache = {};
@@ -13,14 +13,14 @@ const TemplateCache = function() {
13
13
  html = replaceAll(html, "{service}/", baseUri);
14
14
  html = replaceAll(html, "{service}", baseUri);
15
15
  var viewerTemplate = $("<div></div>").html(html);
16
- each(viewerTemplate.find("template"), function(index, e) {
17
- var $e = $(e);
18
- templates[$e.attr("id")] = trim($e.html(), "\n ");
16
+ Array.from(viewerTemplate.find("template")).forEach((element) => {
17
+ var $element = $(element);
18
+ templates[$element.attr("id")] = trim($element.html(), "\n ");
19
19
  });
20
- each(viewerTemplate.find("link"), function(index, e) {
21
- styleSheets.push(trim(e.outerHTML, "\n "));
20
+ Array.from(viewerTemplate.find("link")).forEach((element) => {
21
+ styleSheets.push(trim(element.outerHTML, "\n "));
22
22
  });
23
- styleSheets = filterUniqueLastOccurance(styleSheets);
23
+ styleSheets = filterUniqueLastOccurrence(styleSheets);
24
24
  return {
25
25
  templates,
26
26
  styleSheets
@@ -0,0 +1,38 @@
1
+ import { BaseComponent } from '../base-component.js';
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5
+ var __publicField = (obj, key, value) => {
6
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
7
+ return value;
8
+ };
9
+ class LinkButton extends BaseComponent {
10
+ // #endregion
11
+ // #region constructor
12
+ constructor(element, options) {
13
+ super(element, options);
14
+ // #region fields
15
+ __publicField(this, "cmd");
16
+ var dataCommand = this.$element.attr("data-command");
17
+ if (dataCommand) {
18
+ this.cmd = this.options.commands[dataCommand];
19
+ }
20
+ if (this.cmd) {
21
+ this.$element.on("click", (event) => {
22
+ if (this.cmd.enabled()) {
23
+ this.cmd.exec($(this).attr("data-command-parameter"));
24
+ } else {
25
+ event.preventDefault();
26
+ }
27
+ });
28
+ $(this.cmd).on("enabledChanged", (event) => {
29
+ (this.cmd.enabled() ? $.fn.removeClass : $.fn.addClass).call(this.$element, "disabled");
30
+ }).on("checkedChanged", (event) => {
31
+ (this.cmd.checked() ? $.fn.addClass : $.fn.removeClass).call(this.$element, "checked");
32
+ });
33
+ }
34
+ }
35
+ // #endregion
36
+ }
37
+
38
+ export { LinkButton };
@@ -0,0 +1,14 @@
1
+ import { BaseComponent } from '../base-component.js';
2
+
3
+ class PageCountLabel extends BaseComponent {
4
+ // #region constructor
5
+ constructor(element, options) {
6
+ super(element, options);
7
+ this.options.controller.pageCountChange((event, value) => {
8
+ this.$element.text(value);
9
+ });
10
+ }
11
+ // #endregion
12
+ }
13
+
14
+ export { PageCountLabel };
@@ -0,0 +1,60 @@
1
+ import { BaseComponent } from '../base-component.js';
2
+ import { tryParseInt } from '../utils.js';
3
+
4
+ var __defProp = Object.defineProperty;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __publicField = (obj, key, value) => {
7
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
8
+ return value;
9
+ };
10
+ class PageNumberInput extends BaseComponent {
11
+ // #endregion
12
+ // #region constructor
13
+ constructor(element, options) {
14
+ super(element, options);
15
+ // #region fields
16
+ __publicField(this, "cmd");
17
+ __publicField(this, "_numeric");
18
+ this.cmd = this.options.commands["goToPage"];
19
+ this._numeric = new kendo.ui.NumericTextBox(this.element, {
20
+ format: "0",
21
+ decimals: 0,
22
+ min: 0,
23
+ spinners: false,
24
+ change: this._onChange.bind(this),
25
+ spin: this._onChange.bind(this)
26
+ });
27
+ this._numeric._text[0].dataset.role = "telerik_ReportViewer_PageNumberInput";
28
+ this._numeric.element[0].dataset.role = "";
29
+ this.options.controller.on("reportLoadComplete", (event, reportInfo) => {
30
+ this._numeric.max(reportInfo.pageCount);
31
+ this._numeric.min(Math.min(1, reportInfo.pageCount));
32
+ this._numeric.value(Math.min(1, reportInfo.pageCount));
33
+ }).on("loadedReportChange", (event) => {
34
+ this._numeric.min(0);
35
+ this._numeric.max(0);
36
+ this._numeric.value(0);
37
+ }).on("renderingStopped", (event) => {
38
+ this._numeric.min(0);
39
+ this._numeric.max(0);
40
+ this._numeric.value(0);
41
+ }).pageNumberChange((event, value) => {
42
+ this._numeric.value(value);
43
+ });
44
+ }
45
+ // #endregion
46
+ // #region event handlers
47
+ _onChange(event, data) {
48
+ var val = this._numeric.value();
49
+ var num = tryParseInt(val);
50
+ if (!isNaN(num)) {
51
+ this.cmd.exec(num);
52
+ }
53
+ }
54
+ _onSpin(event, data) {
55
+ return this._onChange(event, data);
56
+ }
57
+ // #endregion
58
+ }
59
+
60
+ export { PageNumberInput };
@@ -3,21 +3,21 @@ import { rectangle, getColorAlphaValue } from './utils.js';
3
3
  var UIFreezeCoordinator = {
4
4
  $placeholder: null,
5
5
  $scrollableContainer: null,
6
- itemsInitialState: {},
7
6
  // Holds all items initial position per container
7
+ itemsInitialState: {},
8
+ // Holds the bounds of the frozen areas by X per container
8
9
  xFrozenAreasBounds: {},
9
- //Holds the bounds of the frozen areas by X per container
10
+ // Holds the bounds of the frozen areas by Y per container
10
11
  yFrozenAreasBounds: {},
11
- //Holds the bounds of the frozen areas by Y per container
12
12
  freezeMaxZIndex: {},
13
13
  zIndex: 1,
14
- freezeBGColor: {},
15
14
  // Holds default background-color value per container
16
- currentlyfreezedContainer: {
15
+ freezeBGColor: {},
16
+ // Holds whether freezing has been applied per container.
17
+ currentlyFrozenContainer: {
17
18
  vertical: {},
18
19
  horizontal: {}
19
20
  },
20
- //Holds whether freezing has been applied per container.
21
21
  isInitialize: false,
22
22
  scaleFactor: null,
23
23
  /**
@@ -145,28 +145,28 @@ var UIFreezeCoordinator = {
145
145
  var horizontalMoveOffset = scrollableContainerScrollLeft - elementWrapperLeftPosition;
146
146
  if (hasFixColumn && verticalMoveOffset > 0) {
147
147
  if (scrollableContainerScrollTop <= $elementWrapper.outerHeight() * this.scaleFactor + elementWrapperTopPosition - this.yFrozenAreasBounds[freezeItemsContainerID].height) {
148
- this.currentlyfreezedContainer.vertical[freezeItemsContainerID] = true;
148
+ this.currentlyFrozenContainer.vertical[freezeItemsContainerID] = true;
149
149
  this._updateUIElementsPosition($colHeaders, "top", verticalMoveOffset / this.scaleFactor, freezeItemsContainerID);
150
150
  }
151
151
  } else {
152
- if (this.currentlyfreezedContainer.vertical[freezeItemsContainerID]) {
153
- delete this.currentlyfreezedContainer.vertical[freezeItemsContainerID];
152
+ if (this.currentlyFrozenContainer.vertical[freezeItemsContainerID]) {
153
+ delete this.currentlyFrozenContainer.vertical[freezeItemsContainerID];
154
154
  this._updateUIElementsPosition($colHeaders, "top", -1, freezeItemsContainerID);
155
155
  }
156
156
  }
157
157
  if (hasFixRow && horizontalMoveOffset > 0) {
158
158
  if (scrollableContainerScrollLeft <= $elementWrapper.outerWidth() * this.scaleFactor + elementWrapperLeftPosition - this.xFrozenAreasBounds[freezeItemsContainerID].width) {
159
- this.currentlyfreezedContainer.horizontal[freezeItemsContainerID] = true;
159
+ this.currentlyFrozenContainer.horizontal[freezeItemsContainerID] = true;
160
160
  this._updateUIElementsPosition($rowHeaders, "left", horizontalMoveOffset / this.scaleFactor, freezeItemsContainerID);
161
161
  }
162
162
  } else {
163
- if (this.currentlyfreezedContainer.horizontal[freezeItemsContainerID]) {
164
- delete this.currentlyfreezedContainer.horizontal[freezeItemsContainerID];
163
+ if (this.currentlyFrozenContainer.horizontal[freezeItemsContainerID]) {
164
+ delete this.currentlyFrozenContainer.horizontal[freezeItemsContainerID];
165
165
  this._updateUIElementsPosition($rowHeaders, "left", -1, freezeItemsContainerID);
166
166
  }
167
167
  }
168
168
  } else {
169
- if (this.currentlyfreezedContainer.horizontal[freezeItemsContainerID] || this.currentlyfreezedContainer.vertical[freezeItemsContainerID]) {
169
+ if (this.currentlyFrozenContainer.horizontal[freezeItemsContainerID] || this.currentlyFrozenContainer.vertical[freezeItemsContainerID]) {
170
170
  this._resetToDefaultPosition(freezeItemsContainerID);
171
171
  }
172
172
  }
@@ -181,8 +181,8 @@ var UIFreezeCoordinator = {
181
181
  var $colHeaders = $("[data-sticky-direction*='Vertical'][data-sticky-id='" + freezeItemsContainerID + "']");
182
182
  this._updateUIElementsPosition($colHeaders, "top", -1, freezeItemsContainerID);
183
183
  this._updateUIElementsPosition($rowHeaders, "left", -1, freezeItemsContainerID);
184
- delete this.currentlyfreezedContainer.horizontal[freezeItemsContainerID];
185
- delete this.currentlyfreezedContainer.vertical[freezeItemsContainerID];
184
+ delete this.currentlyFrozenContainer.horizontal[freezeItemsContainerID];
185
+ delete this.currentlyFrozenContainer.vertical[freezeItemsContainerID];
186
186
  },
187
187
  /**
188
188
  * Update the freeze elements position
@@ -225,6 +225,7 @@ var UIFreezeCoordinator = {
225
225
  $item.css(newStyleRules);
226
226
  }
227
227
  },
228
+ // eslint-disable-next-line max-params
228
229
  _applyBgColorOnScroll: function($item, isItemFrozenBothDirection, hasInitialBgColor, shouldApplyBGColor, freezeItemsContainerID) {
229
230
  if ($item.is("img")) {
230
231
  return true;
@@ -243,7 +244,7 @@ var UIFreezeCoordinator = {
243
244
  return getColorAlphaValue(bgColorValue) > 0;
244
245
  },
245
246
  _isFrozen: function(freezeItemsContainerID) {
246
- return this.currentlyfreezedContainer.horizontal[freezeItemsContainerID] || this.currentlyfreezedContainer.vertical[freezeItemsContainerID];
247
+ return this.currentlyFrozenContainer.horizontal[freezeItemsContainerID] || this.currentlyFrozenContainer.vertical[freezeItemsContainerID];
247
248
  },
248
249
  /**
249
250
  * Checks if an UI element is in the visible part of the scrollable container
package/dist/es/utils.js CHANGED
@@ -168,13 +168,11 @@ function areEqualArrays(array1, array2) {
168
168
  if (array1 === null) {
169
169
  if (array2 !== null) {
170
170
  return false;
171
- } else {
172
- return true;
173
- }
174
- } else {
175
- if (array2 === null) {
176
- return false;
177
171
  }
172
+ return true;
173
+ }
174
+ if (array2 === null) {
175
+ return false;
178
176
  }
179
177
  if (array1.length !== array2.length) {
180
178
  return false;
@@ -300,7 +298,7 @@ function selector() {
300
298
  function isArray(obj) {
301
299
  if (Array.isArray(obj))
302
300
  return true;
303
- var length = !!obj && "length" in obj && obj.length;
301
+ var length = Boolean(obj) && "length" in obj && obj.length;
304
302
  if (typeof length === "number") {
305
303
  return true;
306
304
  }
@@ -320,12 +318,11 @@ function loadScriptWithCallback(src, done, version) {
320
318
  function loadScript(url) {
321
319
  var ajaxOptions = {
322
320
  dataType: "script",
323
- cache: true,
324
- url
321
+ cache: true
325
322
  };
326
- return $ajax(ajaxOptions);
323
+ return $ajax(url, ajaxOptions);
327
324
  }
328
- function filterUniqueLastOccurance(array) {
325
+ function filterUniqueLastOccurrence(array) {
329
326
  function onlyLastUnique(value, index, self) {
330
327
  return self.lastIndexOf(value) === index;
331
328
  }
@@ -384,9 +381,9 @@ function getColorAlphaValue(color) {
384
381
  var alpha = colorComponents.length === 4 ? parseFloat((parseFloat(colorComponents[3].replace(/[()]/g, "")) / 255).toFixed(2)) : 1;
385
382
  return alpha;
386
383
  }
387
- function $ajax(ajaxSettings) {
384
+ function $ajax(url, ajaxSettings) {
388
385
  return new Promise(function(resolve, reject) {
389
- $.ajax(ajaxSettings).done(function(data) {
386
+ $.ajax(url, ajaxSettings).done(function(data) {
390
387
  return resolve(data);
391
388
  }).fail(function(xhr, status, error) {
392
389
  reject(toXhrErrorData(xhr, status, error));
@@ -444,4 +441,4 @@ function isEqual(a, b) {
444
441
  return false;
445
442
  }
446
443
 
447
- export { $ajax, adjustTimezone, areEqual, areEqualArrays, each, escapeHtml, exceptionTypeNamesMatch, extend, filterUniqueLastOccurance, findElement, generateGuidString, getColorAlphaValue, getExceptionInstance, isApplicationException, isApplicationExceptionInstance, isArray, isEqual, isExceptionOfType, isInternalServerError, isInvalidClientException, isRgbColor, isSpecialKey, isSvgSupported, isSystemArgumentException, lTrim, loadScript, loadScriptWithCallback, logError, parseJSON, parseToLocalDate, rTrim, rectangle, replaceAll, reportSourcesAreEqual, selector, stringFormat, toRgbColor, trim, tryParseFloat, tryParseInt, type, unadjustTimezone };
444
+ export { $ajax, adjustTimezone, areEqual, areEqualArrays, each, escapeHtml, exceptionTypeNamesMatch, extend, filterUniqueLastOccurrence, findElement, generateGuidString, getColorAlphaValue, getExceptionInstance, isApplicationException, isApplicationExceptionInstance, isArray, isEqual, isExceptionOfType, isInternalServerError, isInvalidClientException, isRgbColor, isSpecialKey, isSvgSupported, isSystemArgumentException, lTrim, loadScript, loadScriptWithCallback, logError, parseJSON, parseToLocalDate, rTrim, rectangle, replaceAll, reportSourcesAreEqual, selector, stringFormat, toRgbColor, trim, tryParseFloat, tryParseInt, type, unadjustTimezone };
@@ -1,5 +1,5 @@
1
1
  /*
2
- * TelerikReporting v18.1.24.514 (https://www.telerik.com/products/reporting.aspx)
2
+ * TelerikReporting v18.2.24.806 (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
@@ -10,14 +10,14 @@
10
10
  font-family: "ReportingIcons";
11
11
  font-style: normal;
12
12
  font-weight: normal;
13
- src: url("../ReportingIcons-18.1.24.514.ttf/") format("truetype");
13
+ src: url("../ReportingIcons-18.2.24.806.ttf/") format("truetype");
14
14
  /*unicode-range: U+E0ED, U+E0EE, U+E0E6, U+E132, U+E12F, U+E008, U+E00B, U+E09C, U+E096, U+E07E, U+E086, U+E06C, U+E07F, U+E080, U+E081, U+E149, U+E087;*/
15
15
  }
16
16
  @font-face {
17
17
  font-family: "WebComponentsIcons";
18
18
  font-style: normal;
19
19
  font-weight: normal;
20
- src: url("../ReportingIcons-18.1.24.514.ttf/") format("truetype");
20
+ src: url("../ReportingIcons-18.2.24.806.ttf/") format("truetype");
21
21
  }
22
22
  .k-icon {
23
23
  /* use !important to prevent issues with browser extensions that change fonts */
@@ -4449,4 +4449,4 @@
4449
4449
  .trv-report-viewer .k-splitbar-vertical .k-expand-next:before {
4450
4450
  content: "\e004";
4451
4451
  }
4452
- /* DO NOT MODIFY OR DELETE THIS LINE! UPGRADE WIZARD CHECKSUM 55e6b05b5b9caa058570a41fccc26289 */
4452
+ /* DO NOT MODIFY OR DELETE THIS LINE! UPGRADE WIZARD CHECKSUM d622ada83057d6e5f29f7703d15feccc */