@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.
- package/README.md +1 -1
- package/dist/cjs/accessibility.js +28 -38
- package/dist/cjs/base-component.js +26 -0
- package/dist/cjs/binder.js +45 -138
- package/dist/cjs/controller.js +25 -25
- package/dist/cjs/documentMapArea.js +4 -13
- package/dist/cjs/event-emitter.js +124 -10
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/mainMenu.js +22 -31
- package/dist/cjs/pagesArea.js +8 -27
- package/dist/cjs/parameterValidators.js +4 -7
- package/dist/cjs/parameters.js +13 -13
- package/dist/cjs/parametersArea.js +36 -49
- package/dist/cjs/print.js +3 -4
- package/dist/cjs/reportViewer.js +38 -27
- package/dist/cjs/scroll.js +4 -6
- package/dist/cjs/search.js +327 -377
- package/dist/cjs/sendEmail.js +52 -95
- package/dist/cjs/serviceClient.js +163 -257
- package/dist/cjs/sideMenu.js +15 -24
- package/dist/cjs/sr.js +4 -4
- package/dist/cjs/template-cache.js +6 -6
- package/dist/cjs/toolbar/link-button.js +42 -0
- package/dist/cjs/toolbar/page-count-label.js +18 -0
- package/dist/cjs/toolbar/page-number-input.js +64 -0
- package/dist/cjs/uiFreezeCoordinator.js +17 -16
- package/dist/cjs/utils.js +11 -14
- package/dist/es/accessibility.js +29 -39
- package/dist/es/base-component.js +22 -0
- package/dist/es/binder.js +45 -138
- package/dist/es/controller.js +26 -26
- package/dist/es/documentMapArea.js +4 -13
- package/dist/es/event-emitter.js +124 -10
- package/dist/es/index.js +1 -0
- package/dist/es/mainMenu.js +23 -32
- package/dist/es/pagesArea.js +9 -28
- package/dist/es/parameterValidators.js +5 -8
- package/dist/es/parameters.js +14 -14
- package/dist/es/parametersArea.js +37 -50
- package/dist/es/print.js +4 -5
- package/dist/es/reportViewer.js +39 -28
- package/dist/es/scroll.js +4 -6
- package/dist/es/search.js +328 -378
- package/dist/es/sendEmail.js +52 -95
- package/dist/es/serviceClient.js +164 -258
- package/dist/es/sideMenu.js +16 -25
- package/dist/es/sr.js +4 -4
- package/dist/es/template-cache.js +7 -7
- package/dist/es/toolbar/link-button.js +38 -0
- package/dist/es/toolbar/page-count-label.js +14 -0
- package/dist/es/toolbar/page-number-input.js +60 -0
- package/dist/es/uiFreezeCoordinator.js +17 -16
- package/dist/es/utils.js +11 -14
- package/dist/font/font-icons.css +4 -4
- package/dist/font/font-icons.min.css +3 -3
- package/dist/js/telerikReportViewer.js +1080 -1190
- package/dist/js/telerikReportViewer.min.js +1 -1
- package/dist/js/telerikReportViewer.stringResources.js +4 -4
- package/dist/styles/telerikReportViewer.css +3 -3
- package/dist/styles/telerikReportViewer.min.css +3 -3
- package/dist/templates/telerikReportViewerTemplate-FA.html +4 -4
- package/dist/templates/telerikReportViewerTemplate.html +6 -6
- package/package.json +3 -2
- /package/dist/font/{ReportingIcons-18.1.24.514.ttf → ReportingIcons-18.2.24.806.ttf} +0 -0
package/dist/cjs/sendEmail.js
CHANGED
@@ -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 (
|
109
|
-
console.error("Instantiation of Kendo Window for Send Email dialog threw an exception",
|
110
|
-
throw
|
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 (
|
125
|
-
console.error("Instantiation of Kendo ComboBox as document format selector threw an exception",
|
126
|
-
throw
|
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(
|
161
|
+
$placeholder.on("keydown", '[name="format_input"]', function(event) {
|
129
162
|
var tabkey = 9;
|
130
|
-
if (
|
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 (
|
164
|
-
console.error("Instantiation of Kendo Editor for Email body editor threw an exception",
|
165
|
-
throw
|
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
|
-
|
243
|
-
"sendEmail_Cancel": new command(function() {
|
275
|
+
"sendEmail_Cancel": new command.Command(function() {
|
244
276
|
closeWindow();
|
245
277
|
}),
|
246
|
-
"sendEmail_Send": new command(function(
|
278
|
+
"sendEmail_Send": new command.Command(function() {
|
247
279
|
sendingEmail();
|
248
280
|
})
|
249
281
|
};
|
250
|
-
binder.Binder.
|
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(
|
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(
|
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(
|
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;
|