@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
@@ -2,11 +2,44 @@
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 binder = require('./binder.js');
7
+ var command = require('./command.js');
8
8
 
9
9
  var defaultOptions = {};
10
+ function replaceStringResources($sendEmailDialog) {
11
+ if (!$sendEmailDialog) {
12
+ return;
13
+ }
14
+ var labels = $sendEmailDialog.find(".trv-replace-string");
15
+ var ariaLabel = $sendEmailDialog.find("[aria-label]");
16
+ var titles = $sendEmailDialog.find("[title]");
17
+ if (labels.length) {
18
+ Array.from(labels).forEach((element) => {
19
+ replaceText($(element));
20
+ });
21
+ }
22
+ if (ariaLabel.length) {
23
+ Array.from(ariaLabel).forEach((element) => {
24
+ replaceAttribute($(element), "aria-label");
25
+ });
26
+ }
27
+ if (titles.length) {
28
+ Array.from(titles).forEach((element) => {
29
+ replaceAttribute($(element), "title");
30
+ });
31
+ }
32
+ }
33
+ function replaceText($el) {
34
+ if ($el) {
35
+ $el.text(stringResources.stringResources[$el.text()]);
36
+ }
37
+ }
38
+ function replaceAttribute($el, attribute) {
39
+ if ($el) {
40
+ $el.attr(attribute, stringResources.stringResources[$el.attr(attribute)]);
41
+ }
42
+ }
10
43
  function SendEmail(placeholder, options, viewerOptions) {
11
44
  options = $.extend({}, defaultOptions, options);
12
45
  var controller = options.controller;
@@ -105,9 +138,9 @@ function SendEmail(placeholder, options, viewerOptions) {
105
138
  }, 250);
106
139
  }
107
140
  }).data("kendoWindow");
108
- } catch (e) {
109
- console.error("Instantiation of Kendo Window for Send Email dialog threw an exception", e);
110
- throw e;
141
+ } catch (error) {
142
+ console.error("Instantiation of Kendo Window for Send Email dialog threw an exception", error);
143
+ throw error;
111
144
  }
112
145
  kendoSendEmailDialog.wrapper.addClass("trv-send-email");
113
146
  try {
@@ -121,13 +154,13 @@ function SendEmail(placeholder, options, viewerOptions) {
121
154
  this.trigger("change");
122
155
  }
123
156
  }).data("kendoComboBox");
124
- } catch (e) {
125
- console.error("Instantiation of Kendo ComboBox as document format selector threw an exception", e);
126
- throw e;
157
+ } catch (error) {
158
+ console.error("Instantiation of Kendo ComboBox as document format selector threw an exception", error);
159
+ throw error;
127
160
  }
128
- $placeholder.on("keydown", '[name="format_input"]', function(e) {
161
+ $placeholder.on("keydown", '[name="format_input"]', function(event) {
129
162
  var tabkey = 9;
130
- if (e.keyCode === tabkey && bodyEditor) {
163
+ if (event.keyCode === tabkey && bodyEditor) {
131
164
  setTimeout(function() {
132
165
  bodyEditor.focus();
133
166
  });
@@ -160,9 +193,9 @@ function SendEmail(placeholder, options, viewerOptions) {
160
193
  "superscript"
161
194
  ]
162
195
  }).data("kendoEditor");
163
- } catch (e) {
164
- console.error("Instantiation of Kendo Editor for Email body editor threw an exception", e);
165
- throw e;
196
+ } catch (error) {
197
+ console.error("Instantiation of Kendo Editor for Email body editor threw an exception", error);
198
+ throw error;
166
199
  }
167
200
  setDefaultValues(viewerOptions.sendEmail);
168
201
  initialized = true;
@@ -239,22 +272,14 @@ function SendEmail(placeholder, options, viewerOptions) {
239
272
  }
240
273
  function initCommands() {
241
274
  optionsCommandSet = {
242
- //the command names MUST match the commands in the template.html with the "telerik_Reportviewer" prefix so the binder could work.
243
- "sendEmail_Cancel": new command(function() {
275
+ "sendEmail_Cancel": new command.Command(function() {
244
276
  closeWindow();
245
277
  }),
246
- "sendEmail_Send": new command(function(e) {
278
+ "sendEmail_Send": new command.Command(function() {
247
279
  sendingEmail();
248
280
  })
249
281
  };
250
- binder.Binder.bind(
251
- $placeholder.find(".trv-send-email-actions"),
252
- {
253
- controller,
254
- commands: optionsCommandSet
255
- },
256
- viewerOptions
257
- );
282
+ binder.Binder.attachCommands($placeholder.find(".trv-send-email-actions"), optionsCommandSet, viewerOptions);
258
283
  }
259
284
  function sendingEmail(cmd, args) {
260
285
  var sendEmailArgs = {
@@ -272,17 +297,17 @@ function SendEmail(placeholder, options, viewerOptions) {
272
297
  }
273
298
  }
274
299
  function setValidation() {
275
- inputFrom.off("blur").on("blur", function(e) {
300
+ inputFrom.off("blur").on("blur", function(event) {
276
301
  if (!isEmpty($(this))) {
277
302
  isValidEmail($(this), false);
278
303
  }
279
304
  });
280
- inputTo.off("blur").on("blur", function(e) {
305
+ inputTo.off("blur").on("blur", function(event) {
281
306
  if (!isEmpty($(this))) {
282
307
  isValidEmail($(this), true);
283
308
  }
284
309
  });
285
- inputCC.off("blur").on("blur", function(e) {
310
+ inputCC.off("blur").on("blur", function(event) {
286
311
  if ($(this).val().length) {
287
312
  isValidEmail($(this), true);
288
313
  } else {
@@ -341,9 +366,8 @@ function SendEmail(placeholder, options, viewerOptions) {
341
366
  }
342
367
  }
343
368
  return true;
344
- } else {
345
- return _validateEmail(inputValue, $el);
346
369
  }
370
+ return _validateEmail(inputValue, $el);
347
371
  }
348
372
  function _validateEmail(email, $el) {
349
373
  var regexEmail = /\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;
@@ -363,73 +387,6 @@ function SendEmail(placeholder, options, viewerOptions) {
363
387
  function clearValidation() {
364
388
  $(".k-invalid-msg").removeClass("-visible");
365
389
  }
366
- function replaceStringResources($sendEmailDialog) {
367
- if (!$sendEmailDialog) {
368
- return;
369
- }
370
- var labels = $sendEmailDialog.find(".trv-replace-string");
371
- var ariaLabel = $sendEmailDialog.find("[aria-label]");
372
- var titles = $sendEmailDialog.find("[title]");
373
- if (labels.length) {
374
- $.each(labels, function(key, value) {
375
- replaceText($(value));
376
- });
377
- }
378
- if (ariaLabel.length) {
379
- $.each(ariaLabel, function(key, value) {
380
- replaceAttribute($(value), "aria-label");
381
- });
382
- }
383
- if (titles.length) {
384
- $.each(titles, function(key, value) {
385
- replaceAttribute($(value), "title");
386
- });
387
- }
388
- }
389
- function replaceText($el) {
390
- if ($el) {
391
- $el.text(stringResources.stringResources[$el.text()]);
392
- }
393
- }
394
- function replaceAttribute($el, attribute) {
395
- if ($el) {
396
- $el.attr(attribute, stringResources.stringResources[$el.attr(attribute)]);
397
- }
398
- }
399
- function command(execCallback) {
400
- var enabledState = true;
401
- var checkedState = false;
402
- var cmd = {
403
- enabled: function(state) {
404
- if (arguments.length === 0) {
405
- return enabledState;
406
- }
407
- var newState = Boolean(state);
408
- enabledState = newState;
409
- $(this).trigger("enabledChanged");
410
- return cmd;
411
- },
412
- checked: function(state) {
413
- if (arguments.length === 0) {
414
- return checkedState;
415
- }
416
- var newState = Boolean(state);
417
- checkedState = newState;
418
- $(this).trigger("checkedChanged");
419
- return cmd;
420
- },
421
- exec: execCallback
422
- };
423
- return cmd;
424
- }
425
390
  }
426
- var pluginName = "telerik_ReportViewer_SendEmail";
427
- $.fn[pluginName] = function(options, viewerOptions) {
428
- return utils.each(this, function() {
429
- if (!$.data(this, pluginName)) {
430
- $.data(this, pluginName, new SendEmail(this, options, viewerOptions));
431
- }
432
- });
433
- };
434
391
 
435
392
  exports.SendEmail = SendEmail;