@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/es/sendEmail.js
CHANGED
@@ -1,8 +1,41 @@
|
|
1
|
-
import { each } from './utils.js';
|
2
1
|
import { stringResources } from './stringResources.js';
|
3
2
|
import { Binder } from './binder.js';
|
3
|
+
import { Command } from './command.js';
|
4
4
|
|
5
5
|
var defaultOptions = {};
|
6
|
+
function replaceStringResources($sendEmailDialog) {
|
7
|
+
if (!$sendEmailDialog) {
|
8
|
+
return;
|
9
|
+
}
|
10
|
+
var labels = $sendEmailDialog.find(".trv-replace-string");
|
11
|
+
var ariaLabel = $sendEmailDialog.find("[aria-label]");
|
12
|
+
var titles = $sendEmailDialog.find("[title]");
|
13
|
+
if (labels.length) {
|
14
|
+
Array.from(labels).forEach((element) => {
|
15
|
+
replaceText($(element));
|
16
|
+
});
|
17
|
+
}
|
18
|
+
if (ariaLabel.length) {
|
19
|
+
Array.from(ariaLabel).forEach((element) => {
|
20
|
+
replaceAttribute($(element), "aria-label");
|
21
|
+
});
|
22
|
+
}
|
23
|
+
if (titles.length) {
|
24
|
+
Array.from(titles).forEach((element) => {
|
25
|
+
replaceAttribute($(element), "title");
|
26
|
+
});
|
27
|
+
}
|
28
|
+
}
|
29
|
+
function replaceText($el) {
|
30
|
+
if ($el) {
|
31
|
+
$el.text(stringResources[$el.text()]);
|
32
|
+
}
|
33
|
+
}
|
34
|
+
function replaceAttribute($el, attribute) {
|
35
|
+
if ($el) {
|
36
|
+
$el.attr(attribute, stringResources[$el.attr(attribute)]);
|
37
|
+
}
|
38
|
+
}
|
6
39
|
function SendEmail(placeholder, options, viewerOptions) {
|
7
40
|
options = $.extend({}, defaultOptions, options);
|
8
41
|
var controller = options.controller;
|
@@ -101,9 +134,9 @@ function SendEmail(placeholder, options, viewerOptions) {
|
|
101
134
|
}, 250);
|
102
135
|
}
|
103
136
|
}).data("kendoWindow");
|
104
|
-
} catch (
|
105
|
-
console.error("Instantiation of Kendo Window for Send Email dialog threw an exception",
|
106
|
-
throw
|
137
|
+
} catch (error) {
|
138
|
+
console.error("Instantiation of Kendo Window for Send Email dialog threw an exception", error);
|
139
|
+
throw error;
|
107
140
|
}
|
108
141
|
kendoSendEmailDialog.wrapper.addClass("trv-send-email");
|
109
142
|
try {
|
@@ -117,13 +150,13 @@ function SendEmail(placeholder, options, viewerOptions) {
|
|
117
150
|
this.trigger("change");
|
118
151
|
}
|
119
152
|
}).data("kendoComboBox");
|
120
|
-
} catch (
|
121
|
-
console.error("Instantiation of Kendo ComboBox as document format selector threw an exception",
|
122
|
-
throw
|
153
|
+
} catch (error) {
|
154
|
+
console.error("Instantiation of Kendo ComboBox as document format selector threw an exception", error);
|
155
|
+
throw error;
|
123
156
|
}
|
124
|
-
$placeholder.on("keydown", '[name="format_input"]', function(
|
157
|
+
$placeholder.on("keydown", '[name="format_input"]', function(event) {
|
125
158
|
var tabkey = 9;
|
126
|
-
if (
|
159
|
+
if (event.keyCode === tabkey && bodyEditor) {
|
127
160
|
setTimeout(function() {
|
128
161
|
bodyEditor.focus();
|
129
162
|
});
|
@@ -156,9 +189,9 @@ function SendEmail(placeholder, options, viewerOptions) {
|
|
156
189
|
"superscript"
|
157
190
|
]
|
158
191
|
}).data("kendoEditor");
|
159
|
-
} catch (
|
160
|
-
console.error("Instantiation of Kendo Editor for Email body editor threw an exception",
|
161
|
-
throw
|
192
|
+
} catch (error) {
|
193
|
+
console.error("Instantiation of Kendo Editor for Email body editor threw an exception", error);
|
194
|
+
throw error;
|
162
195
|
}
|
163
196
|
setDefaultValues(viewerOptions.sendEmail);
|
164
197
|
initialized = true;
|
@@ -235,22 +268,14 @@ function SendEmail(placeholder, options, viewerOptions) {
|
|
235
268
|
}
|
236
269
|
function initCommands() {
|
237
270
|
optionsCommandSet = {
|
238
|
-
|
239
|
-
"sendEmail_Cancel": new command(function() {
|
271
|
+
"sendEmail_Cancel": new Command(function() {
|
240
272
|
closeWindow();
|
241
273
|
}),
|
242
|
-
"sendEmail_Send": new
|
274
|
+
"sendEmail_Send": new Command(function() {
|
243
275
|
sendingEmail();
|
244
276
|
})
|
245
277
|
};
|
246
|
-
Binder.
|
247
|
-
$placeholder.find(".trv-send-email-actions"),
|
248
|
-
{
|
249
|
-
controller,
|
250
|
-
commands: optionsCommandSet
|
251
|
-
},
|
252
|
-
viewerOptions
|
253
|
-
);
|
278
|
+
Binder.attachCommands($placeholder.find(".trv-send-email-actions"), optionsCommandSet, viewerOptions);
|
254
279
|
}
|
255
280
|
function sendingEmail(cmd, args) {
|
256
281
|
var sendEmailArgs = {
|
@@ -268,17 +293,17 @@ function SendEmail(placeholder, options, viewerOptions) {
|
|
268
293
|
}
|
269
294
|
}
|
270
295
|
function setValidation() {
|
271
|
-
inputFrom.off("blur").on("blur", function(
|
296
|
+
inputFrom.off("blur").on("blur", function(event) {
|
272
297
|
if (!isEmpty($(this))) {
|
273
298
|
isValidEmail($(this), false);
|
274
299
|
}
|
275
300
|
});
|
276
|
-
inputTo.off("blur").on("blur", function(
|
301
|
+
inputTo.off("blur").on("blur", function(event) {
|
277
302
|
if (!isEmpty($(this))) {
|
278
303
|
isValidEmail($(this), true);
|
279
304
|
}
|
280
305
|
});
|
281
|
-
inputCC.off("blur").on("blur", function(
|
306
|
+
inputCC.off("blur").on("blur", function(event) {
|
282
307
|
if ($(this).val().length) {
|
283
308
|
isValidEmail($(this), true);
|
284
309
|
} else {
|
@@ -337,9 +362,8 @@ function SendEmail(placeholder, options, viewerOptions) {
|
|
337
362
|
}
|
338
363
|
}
|
339
364
|
return true;
|
340
|
-
} else {
|
341
|
-
return _validateEmail(inputValue, $el);
|
342
365
|
}
|
366
|
+
return _validateEmail(inputValue, $el);
|
343
367
|
}
|
344
368
|
function _validateEmail(email, $el) {
|
345
369
|
var regexEmail = /\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;
|
@@ -359,73 +383,6 @@ function SendEmail(placeholder, options, viewerOptions) {
|
|
359
383
|
function clearValidation() {
|
360
384
|
$(".k-invalid-msg").removeClass("-visible");
|
361
385
|
}
|
362
|
-
function replaceStringResources($sendEmailDialog) {
|
363
|
-
if (!$sendEmailDialog) {
|
364
|
-
return;
|
365
|
-
}
|
366
|
-
var labels = $sendEmailDialog.find(".trv-replace-string");
|
367
|
-
var ariaLabel = $sendEmailDialog.find("[aria-label]");
|
368
|
-
var titles = $sendEmailDialog.find("[title]");
|
369
|
-
if (labels.length) {
|
370
|
-
$.each(labels, function(key, value) {
|
371
|
-
replaceText($(value));
|
372
|
-
});
|
373
|
-
}
|
374
|
-
if (ariaLabel.length) {
|
375
|
-
$.each(ariaLabel, function(key, value) {
|
376
|
-
replaceAttribute($(value), "aria-label");
|
377
|
-
});
|
378
|
-
}
|
379
|
-
if (titles.length) {
|
380
|
-
$.each(titles, function(key, value) {
|
381
|
-
replaceAttribute($(value), "title");
|
382
|
-
});
|
383
|
-
}
|
384
|
-
}
|
385
|
-
function replaceText($el) {
|
386
|
-
if ($el) {
|
387
|
-
$el.text(stringResources[$el.text()]);
|
388
|
-
}
|
389
|
-
}
|
390
|
-
function replaceAttribute($el, attribute) {
|
391
|
-
if ($el) {
|
392
|
-
$el.attr(attribute, stringResources[$el.attr(attribute)]);
|
393
|
-
}
|
394
|
-
}
|
395
|
-
function command(execCallback) {
|
396
|
-
var enabledState = true;
|
397
|
-
var checkedState = false;
|
398
|
-
var cmd = {
|
399
|
-
enabled: function(state) {
|
400
|
-
if (arguments.length === 0) {
|
401
|
-
return enabledState;
|
402
|
-
}
|
403
|
-
var newState = Boolean(state);
|
404
|
-
enabledState = newState;
|
405
|
-
$(this).trigger("enabledChanged");
|
406
|
-
return cmd;
|
407
|
-
},
|
408
|
-
checked: function(state) {
|
409
|
-
if (arguments.length === 0) {
|
410
|
-
return checkedState;
|
411
|
-
}
|
412
|
-
var newState = Boolean(state);
|
413
|
-
checkedState = newState;
|
414
|
-
$(this).trigger("checkedChanged");
|
415
|
-
return cmd;
|
416
|
-
},
|
417
|
-
exec: execCallback
|
418
|
-
};
|
419
|
-
return cmd;
|
420
|
-
}
|
421
386
|
}
|
422
|
-
var pluginName = "telerik_ReportViewer_SendEmail";
|
423
|
-
$.fn[pluginName] = function(options, viewerOptions) {
|
424
|
-
return each(this, function() {
|
425
|
-
if (!$.data(this, pluginName)) {
|
426
|
-
$.data(this, pluginName, new SendEmail(this, options, viewerOptions));
|
427
|
-
}
|
428
|
-
});
|
429
|
-
};
|
430
387
|
|
431
388
|
export { SendEmail };
|