@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
@@ -2,16 +2,130 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
5
|
+
var __defProp = Object.defineProperty;
|
6
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
7
|
+
var __publicField = (obj, key, value) => {
|
8
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
9
|
+
return value;
|
10
|
+
};
|
11
|
+
class EventEmitter extends EventTarget {
|
12
|
+
constructor() {
|
13
|
+
super();
|
14
|
+
__publicField(this, "_events");
|
15
|
+
__publicField(this, "_eventsCount");
|
16
|
+
this._events = {};
|
17
|
+
this._eventsCount = 0;
|
18
|
+
}
|
19
|
+
/**
|
20
|
+
* @param {string} type
|
21
|
+
* @param {(event: CustomEvent, ...args: any[]) => void} listener
|
22
|
+
* @returns
|
23
|
+
*/
|
24
|
+
addListener(type, listener) {
|
25
|
+
if (typeof listener !== "function") {
|
26
|
+
throw new TypeError("listener must be a function");
|
27
|
+
}
|
28
|
+
if (!this._events[type]) {
|
29
|
+
this._events[type] = [];
|
30
|
+
}
|
31
|
+
function wrappedListener(event) {
|
32
|
+
listener.call(this, event, ...event.detail);
|
33
|
+
}
|
34
|
+
wrappedListener.listener = listener;
|
35
|
+
this._events[type].push(wrappedListener);
|
36
|
+
this._eventsCount++;
|
37
|
+
this.addEventListener(type, wrappedListener.bind(this));
|
38
|
+
return this;
|
39
|
+
}
|
40
|
+
/**
|
41
|
+
* @alias addListener
|
42
|
+
* @param {string} type
|
43
|
+
* @param {(event: CustomEvent, ...args: any[]) => void} listener
|
44
|
+
* @returns
|
45
|
+
*/
|
46
|
+
on(type, listener) {
|
47
|
+
return this.addListener(type, listener);
|
48
|
+
}
|
49
|
+
/**
|
50
|
+
* @param {string} type
|
51
|
+
* @param {any[]} args
|
52
|
+
* @returns
|
53
|
+
*/
|
54
|
+
trigger(type, ...args) {
|
55
|
+
if (!this._events[type]) {
|
56
|
+
return void 0;
|
57
|
+
}
|
58
|
+
const event = new CustomEvent(type, {
|
59
|
+
detail: args,
|
60
|
+
cancelable: true
|
61
|
+
});
|
62
|
+
return this.dispatchEvent(event);
|
63
|
+
}
|
64
|
+
/**
|
65
|
+
* @alias trigger
|
66
|
+
* @param {string} type
|
67
|
+
* @param {any[]} args
|
68
|
+
* @returns
|
69
|
+
*/
|
70
|
+
emit(type, ...args) {
|
71
|
+
return this.trigger(type, ...args);
|
72
|
+
}
|
73
|
+
/**
|
74
|
+
* @param {string} type
|
75
|
+
* @param {(event: CustomEvent, ...args: any[]) => void} listener
|
76
|
+
* @returns
|
77
|
+
*/
|
78
|
+
removeListener(type, listener) {
|
79
|
+
if (!this._events[type]) {
|
80
|
+
return this;
|
81
|
+
}
|
82
|
+
this._events[type] = this._events[type].filter((wrappedListener) => {
|
83
|
+
if (wrappedListener.listener !== listener) {
|
84
|
+
return true;
|
85
|
+
}
|
86
|
+
this.removeEventListener(type, wrappedListener);
|
87
|
+
return false;
|
88
|
+
});
|
89
|
+
if (this._events[type].length === 0) {
|
90
|
+
delete this._events[type];
|
91
|
+
this._eventsCount--;
|
92
|
+
}
|
93
|
+
return this;
|
94
|
+
}
|
95
|
+
/**
|
96
|
+
* @param {string} type
|
97
|
+
* @returns
|
98
|
+
*/
|
99
|
+
removeAllListeners(type) {
|
100
|
+
if (type === void 0) {
|
101
|
+
Object.keys(this._events).forEach((eventType) => {
|
102
|
+
this.removeAllListeners(eventType);
|
103
|
+
});
|
104
|
+
return this;
|
105
|
+
}
|
106
|
+
if (this._events[type]) {
|
107
|
+
this._events[type].forEach((wrappedListener) => {
|
108
|
+
this.removeEventListener(type, wrappedListener);
|
109
|
+
});
|
110
|
+
delete this._events[type];
|
111
|
+
this._eventsCount--;
|
112
|
+
}
|
113
|
+
return this;
|
114
|
+
}
|
115
|
+
/**
|
116
|
+
* @param {string} type
|
117
|
+
* @param {(event: CustomEvent, ...args: any[]) => void} listener
|
118
|
+
* @returns
|
119
|
+
*/
|
120
|
+
off(type, listener) {
|
121
|
+
if (type === void 0) {
|
122
|
+
return this.removeAllListeners();
|
123
|
+
}
|
124
|
+
if (listener === void 0) {
|
125
|
+
return this.removeAllListeners(type);
|
126
|
+
}
|
127
|
+
return this.removeListener(type, listener);
|
128
|
+
}
|
15
129
|
}
|
16
130
|
|
17
131
|
exports.EventEmitter = EventEmitter;
|
package/dist/cjs/index.js
CHANGED
@@ -24,6 +24,7 @@ require('./sr.js');
|
|
24
24
|
var touch = require('./touch.js');
|
25
25
|
var uiController = require('./uiController.js');
|
26
26
|
var uiFreezeCoordinator = require('./uiFreezeCoordinator.js');
|
27
|
+
var parametersArea = require('./parametersArea.js');
|
27
28
|
|
28
29
|
|
29
30
|
|
@@ -56,3 +57,4 @@ exports.ServiceClient = serviceClient.ServiceClient;
|
|
56
57
|
exports.TouchBehavior = touch.TouchBehavior;
|
57
58
|
exports.UIController = uiController.UIController;
|
58
59
|
exports.UIFreezeCoordinator = uiFreezeCoordinator.UIFreezeCoordinator;
|
60
|
+
exports.ParametersArea = parametersArea.ParametersArea;
|
package/dist/cjs/mainMenu.js
CHANGED
@@ -48,9 +48,9 @@ function MainMenu(dom, rootOptions, otherOptions) {
|
|
48
48
|
replaceStringResources();
|
49
49
|
}
|
50
50
|
function setTabIndexes() {
|
51
|
-
var $menus =
|
52
|
-
|
53
|
-
var $menuArea = $(
|
51
|
+
var $menus = $('[data-role="telerik_ReportViewer_MainMenu"]');
|
52
|
+
Array.from($menus).forEach((menu2) => {
|
53
|
+
var $menuArea = $(menu2);
|
54
54
|
var listItems = $menuArea.find("li");
|
55
55
|
var menuTabIndex = 0;
|
56
56
|
var tabIndexAttr = $menuArea.attr("tabIndex");
|
@@ -68,13 +68,13 @@ function MainMenu(dom, rootOptions, otherOptions) {
|
|
68
68
|
});
|
69
69
|
}
|
70
70
|
function setMenuItemsTabIndexes(listItems, menuTabIndex) {
|
71
|
-
|
72
|
-
var $item = $(
|
71
|
+
Array.from(listItems).forEach((item) => {
|
72
|
+
var $item = $(item);
|
73
73
|
$item.attr("tabindex", menuTabIndex);
|
74
|
-
$item.focus(
|
74
|
+
$item.on("focus", (event) => {
|
75
75
|
$item.addClass("k-focus");
|
76
76
|
});
|
77
|
-
$item.blur(
|
77
|
+
$item.on("blur", (event) => {
|
78
78
|
$item.removeClass("k-focus");
|
79
79
|
});
|
80
80
|
var anchor = $item.children("a");
|
@@ -93,16 +93,15 @@ function MainMenu(dom, rootOptions, otherOptions) {
|
|
93
93
|
});
|
94
94
|
}
|
95
95
|
function fillFormats(formats) {
|
96
|
-
|
97
|
-
var $list = $(
|
96
|
+
Array.from($(dom).find("ul[data-command-list=export-format-list]")).forEach((list) => {
|
97
|
+
var $list = $(list);
|
98
98
|
var $parent = $list.parents("li");
|
99
99
|
var tabIndex = enableAccessibility ? $parent.attr("tabindex") : -1;
|
100
100
|
if (!tabIndex) {
|
101
101
|
tabIndex = 1;
|
102
102
|
}
|
103
103
|
$list.empty();
|
104
|
-
|
105
|
-
var format = this;
|
104
|
+
Array.from(formats).forEach((format) => {
|
106
105
|
var ariaLabel = enableAccessibility ? utils.stringFormat('aria-label="{localizedName}" ', format) : " ";
|
107
106
|
var li = "<li " + ariaLabel + utils.stringFormat('tabindex="' + tabIndex + '"><a tabindex="-1" href="#" data-command="telerik_ReportViewer_export" data-command-parameter="{name}"><span>{localizedName}</span></a></li>', format);
|
108
107
|
menu.append(li, $parent);
|
@@ -113,10 +112,10 @@ function MainMenu(dom, rootOptions, otherOptions) {
|
|
113
112
|
});
|
114
113
|
}
|
115
114
|
function setInternalListAccessibilityKeyEvents(listItems) {
|
116
|
-
|
117
|
-
var $item = $(
|
115
|
+
Array.from(listItems).forEach((item) => {
|
116
|
+
var $item = $(item);
|
118
117
|
$item.off("keydown");
|
119
|
-
$item.on("keydown",
|
118
|
+
$item.on("keydown", (event) => {
|
120
119
|
switch (event.which) {
|
121
120
|
case kendo.keys.ENTER:
|
122
121
|
clickOnMenuItem($item);
|
@@ -124,17 +123,17 @@ function MainMenu(dom, rootOptions, otherOptions) {
|
|
124
123
|
case kendo.keys.UP:
|
125
124
|
var $prev = $item.prev();
|
126
125
|
if ($prev.length > 0) {
|
127
|
-
$prev.focus
|
126
|
+
$prev.trigger("focus");
|
128
127
|
} else {
|
129
|
-
$item.parents("li").focus
|
128
|
+
$item.parents("li").trigger("focus");
|
130
129
|
}
|
131
130
|
break;
|
132
131
|
case kendo.keys.DOWN:
|
133
132
|
var $next = $item.next();
|
134
133
|
if ($next.length > 0) {
|
135
|
-
$next.focus
|
134
|
+
$next.trigger("focus");
|
136
135
|
} else {
|
137
|
-
$item.parent().children("li").first().focus
|
136
|
+
$item.parent().children("li").first().trigger("focus");
|
138
137
|
}
|
139
138
|
break;
|
140
139
|
}
|
@@ -298,12 +297,12 @@ function MainMenu(dom, rootOptions, otherOptions) {
|
|
298
297
|
if (!menuAreas) {
|
299
298
|
return;
|
300
299
|
}
|
301
|
-
|
302
|
-
var $menu = $(
|
300
|
+
Array.from(menuAreas).forEach((menu2) => {
|
301
|
+
var $menu = $(menu2);
|
303
302
|
var menuItems = $menu.children("li.k-item");
|
304
303
|
$menu.attr("aria-label", stringResources.stringResources[$menu.attr("aria-label")]);
|
305
|
-
|
306
|
-
var $menuItem = $(
|
304
|
+
Array.from(menuItems).forEach((menuItem) => {
|
305
|
+
var $menuItem = $(menuItem);
|
307
306
|
$menuItem.attr("aria-label", stringResources.stringResources[$menuItem.attr("aria-label")]);
|
308
307
|
if (!$menuItem.hasClass("trv-report-pager")) {
|
309
308
|
var $a = $menuItem.find("a");
|
@@ -317,16 +316,8 @@ function MainMenu(dom, rootOptions, otherOptions) {
|
|
317
316
|
});
|
318
317
|
}
|
319
318
|
function findMenuArea() {
|
320
|
-
return
|
319
|
+
return $("ul[data-role=telerik_ReportViewer_MainMenu]");
|
321
320
|
}
|
322
321
|
}
|
323
|
-
var pluginName = "telerik_ReportViewer_MainMenu";
|
324
|
-
$.fn[pluginName] = function(options, otherOptions) {
|
325
|
-
return utils.each(this, function() {
|
326
|
-
if (!$.data(this, pluginName)) {
|
327
|
-
$.data(this, pluginName, new MainMenu(this, options, otherOptions));
|
328
|
-
}
|
329
|
-
});
|
330
|
-
};
|
331
322
|
|
332
323
|
exports.MainMenu = MainMenu;
|
package/dist/cjs/pagesArea.js
CHANGED
@@ -37,7 +37,7 @@ function PagesArea(placeholder, options, otherOptions) {
|
|
37
37
|
var reportPageIsLoaded = false;
|
38
38
|
var pageAreaImageStyle = '.trv-page-container {background: #ffffff url("{0}") no-repeat center 50px}';
|
39
39
|
var pageAreaImageID = "trv-initial-image-styles";
|
40
|
-
var scroll$1 =
|
40
|
+
var scroll$1 = $.extend({}, scroll.Scroll);
|
41
41
|
var uiFreezeCoordinator$1 = null;
|
42
42
|
init();
|
43
43
|
if (scroll$1) {
|
@@ -123,7 +123,7 @@ function PagesArea(placeholder, options, otherOptions) {
|
|
123
123
|
enableInteractivity();
|
124
124
|
}
|
125
125
|
if (args.containsFrozenContent && !uiFreezeCoordinator$1) {
|
126
|
-
uiFreezeCoordinator$1 =
|
126
|
+
uiFreezeCoordinator$1 = $.extend({}, uiFreezeCoordinator.UIFreezeCoordinator);
|
127
127
|
if (controller.getViewMode() === enums.ViewModes.INTERACTIVE) {
|
128
128
|
uiFreezeCoordinator$1.init($placeholder);
|
129
129
|
}
|
@@ -263,19 +263,13 @@ function PagesArea(placeholder, options, otherOptions) {
|
|
263
263
|
var result;
|
264
264
|
var allPages = $pageContainer.find(".trv-report-page");
|
265
265
|
if (controller.getPageMode() === enums.PageModes.SINGLE_PAGE) {
|
266
|
-
|
267
|
-
|
268
|
-
result = page;
|
269
|
-
}
|
270
|
-
return !result;
|
266
|
+
result = Array.from(allPages).find((page) => {
|
267
|
+
return pageNo(page) === pageNumber;
|
271
268
|
});
|
272
269
|
} else {
|
273
|
-
|
270
|
+
result = Array.from(allPages).find((page) => {
|
274
271
|
var dataPageNumber = parseInt($(page).attr("data-page"));
|
275
|
-
|
276
|
-
result = page;
|
277
|
-
return false;
|
278
|
-
}
|
272
|
+
return dataPageNumber === pageNumber;
|
279
273
|
});
|
280
274
|
}
|
281
275
|
return result;
|
@@ -487,14 +481,9 @@ function PagesArea(placeholder, options, otherOptions) {
|
|
487
481
|
}
|
488
482
|
function getAction(actionId) {
|
489
483
|
if (actions) {
|
490
|
-
|
491
|
-
|
492
|
-
if (this.Id === actionId) {
|
493
|
-
action = this;
|
494
|
-
}
|
495
|
-
return action === void 0;
|
484
|
+
return Array.from(actions).find(function(action) {
|
485
|
+
return action.Id === actionId;
|
496
486
|
});
|
497
|
-
return action;
|
498
487
|
}
|
499
488
|
return null;
|
500
489
|
}
|
@@ -629,13 +618,5 @@ function PagesArea(placeholder, options, otherOptions) {
|
|
629
618
|
$("#" + pageAreaImageID).remove();
|
630
619
|
}
|
631
620
|
}
|
632
|
-
var pluginName = "telerik_ReportViewer_PagesArea";
|
633
|
-
$.fn[pluginName] = function(options, otherOptions) {
|
634
|
-
return utils.each(this, function() {
|
635
|
-
if (!$.data(this, pluginName)) {
|
636
|
-
$.data(this, pluginName, new PagesArea(this, options, otherOptions));
|
637
|
-
}
|
638
|
-
});
|
639
|
-
};
|
640
621
|
|
641
622
|
exports.PagesArea = PagesArea;
|
@@ -16,9 +16,8 @@ var ParameterValidators = function() {
|
|
16
16
|
if (value == null || value.length == 0) {
|
17
17
|
if (parameter.allowNull) {
|
18
18
|
return value;
|
19
|
-
} else {
|
20
|
-
throw stringResources.stringResources.invalidParameter;
|
21
19
|
}
|
20
|
+
throw stringResources.stringResources.invalidParameter;
|
22
21
|
}
|
23
22
|
return values;
|
24
23
|
}
|
@@ -29,10 +28,8 @@ var ParameterValidators = function() {
|
|
29
28
|
}
|
30
29
|
function checkAvailableValues(parameter, value, compareFunc) {
|
31
30
|
if (parameter.availableValues) {
|
32
|
-
var found =
|
33
|
-
|
34
|
-
found = compareFunc(value, av.value);
|
35
|
-
return !found;
|
31
|
+
var found = Array.from(parameter.availableValues).some(function(av) {
|
32
|
+
return compareFunc(value, av.value);
|
36
33
|
});
|
37
34
|
if (!found) {
|
38
35
|
if (parameter.allowNull && !value) {
|
@@ -139,7 +136,7 @@ var ParameterValidators = function() {
|
|
139
136
|
parameter,
|
140
137
|
value,
|
141
138
|
function(value2) {
|
142
|
-
if (-1 != ["true", "false"].indexOf((
|
139
|
+
if (-1 != ["true", "false"].indexOf(String(value2).toLowerCase())) {
|
143
140
|
return Boolean(value2);
|
144
141
|
}
|
145
142
|
if (isNull(parameter, value2)) {
|
package/dist/cjs/parameters.js
CHANGED
@@ -232,8 +232,8 @@ var ParameterEditors = [
|
|
232
232
|
}
|
233
233
|
function applyAriaSelected(selection) {
|
234
234
|
var children = $list.find(".trv-listviewitem");
|
235
|
-
|
236
|
-
var $item = $(
|
235
|
+
Array.from(children).forEach((item) => {
|
236
|
+
var $item = $(item);
|
237
237
|
var isSelected = selection.filter($item).length > 0;
|
238
238
|
$item.attr("aria-selected", isSelected);
|
239
239
|
});
|
@@ -316,9 +316,9 @@ var ParameterEditors = [
|
|
316
316
|
items = [items];
|
317
317
|
}
|
318
318
|
var children = $list.find(".trv-listviewitem");
|
319
|
-
|
319
|
+
$.each(parameter.availableValues, (i, av) => {
|
320
320
|
var selected = false;
|
321
|
-
|
321
|
+
$.each(items, (j, v) => {
|
322
322
|
var availableValue = av.value;
|
323
323
|
if (v instanceof Date) {
|
324
324
|
availableValue = utils.parseToLocalDate(av.value);
|
@@ -357,8 +357,8 @@ var ParameterEditors = [
|
|
357
357
|
addAccessibilityAttributes($list, stringResources.stringResources.ariaLabelMultiSelect, param.text, info, param.Error);
|
358
358
|
$list.attr("aria-multiselectable", "true");
|
359
359
|
var items = $list.find(".trv-listviewitem");
|
360
|
-
|
361
|
-
$(
|
360
|
+
Array.from(items).forEach((item) => {
|
361
|
+
$(item).attr("aria-label", item.innerText);
|
362
362
|
});
|
363
363
|
},
|
364
364
|
setAccessibilityErrorState: function(param) {
|
@@ -487,8 +487,8 @@ var ParameterEditors = [
|
|
487
487
|
var info = utils.stringFormat(stringResources.stringResources.ariaLabelParameterInfo, [param.availableValues.length]);
|
488
488
|
addAccessibilityAttributes($accessibilityDom, stringResources.stringResources.ariaLabelMultiSelect, param.text, info, param.Error);
|
489
489
|
var items = editor.items();
|
490
|
-
|
491
|
-
$(
|
490
|
+
Array.from(items).forEach((item) => {
|
491
|
+
$(item).attr("aria-label", item.innerText);
|
492
492
|
});
|
493
493
|
},
|
494
494
|
setAccessibilityErrorState: function(param) {
|
@@ -550,7 +550,7 @@ var ParameterEditors = [
|
|
550
550
|
}
|
551
551
|
function setSelectedItems(value) {
|
552
552
|
var items = $list.find(".trv-listviewitem");
|
553
|
-
|
553
|
+
$.each(parameter.availableValues, (i, av) => {
|
554
554
|
var availableValue = av.value;
|
555
555
|
if (value instanceof Date) {
|
556
556
|
availableValue = utils.parseToLocalDate(av.value);
|
@@ -594,8 +594,8 @@ var ParameterEditors = [
|
|
594
594
|
var info = utils.stringFormat(stringResources.stringResources.ariaLabelParameterInfo, [param.availableValues.length]);
|
595
595
|
addAccessibilityAttributes($list, stringResources.stringResources.ariaLabelSingleValue, param.text, info, param.Error);
|
596
596
|
var items = $list.find(".trv-listviewitem");
|
597
|
-
|
598
|
-
$(
|
597
|
+
Array.from(items).forEach((item) => {
|
598
|
+
$(item).attr("aria-label", item.innerText);
|
599
599
|
});
|
600
600
|
},
|
601
601
|
setAccessibilityErrorState: function(param) {
|
@@ -685,8 +685,8 @@ var ParameterEditors = [
|
|
685
685
|
var info = utils.stringFormat(stringResources.stringResources.ariaLabelParameterInfo, [param.availableValues.length]);
|
686
686
|
addAccessibilityAttributes($accessibilityDom, stringResources.stringResources.ariaLabelSingleValue, param.text, info, param.Error);
|
687
687
|
var items = editor.items();
|
688
|
-
|
689
|
-
$(
|
688
|
+
Array.from(items).forEach((item) => {
|
689
|
+
$(item).attr("aria-label", item.innerText);
|
690
690
|
});
|
691
691
|
},
|
692
692
|
setAccessibilityErrorState: function(param) {
|
@@ -160,12 +160,8 @@ function ParametersArea(placeholder, options, otherOptions) {
|
|
160
160
|
}
|
161
161
|
}
|
162
162
|
function selectParameterEditorFactory(parameter, editorsType) {
|
163
|
-
var factory
|
164
|
-
|
165
|
-
if (this && this.match(parameter, editorsType)) {
|
166
|
-
factory = this;
|
167
|
-
}
|
168
|
-
return !factory;
|
163
|
+
var factory = Array.from(parameterEditors).find((editor) => {
|
164
|
+
return editor.match(parameter, editorsType);
|
169
165
|
});
|
170
166
|
return factory;
|
171
167
|
}
|
@@ -177,23 +173,21 @@ function ParametersArea(placeholder, options, otherOptions) {
|
|
177
173
|
(allParametersAutoRefresh() ? $.fn.removeClass : $.fn.addClass).call($placeholder, "preview");
|
178
174
|
}
|
179
175
|
function allParametersAutoRefresh() {
|
180
|
-
var allAuto =
|
181
|
-
|
182
|
-
return allAuto = !this.isVisible || this.autoRefresh;
|
176
|
+
var allAuto = Array.from(parameters$1).every((parameter) => {
|
177
|
+
return !parameter.isVisible || parameter.autoRefresh;
|
183
178
|
});
|
184
179
|
return allAuto;
|
185
180
|
}
|
186
181
|
function allParametersValid() {
|
187
|
-
var allValid =
|
188
|
-
|
189
|
-
return allValid = !this.Error;
|
182
|
+
var allValid = Array.from(parameters$1).every((parameter) => {
|
183
|
+
return !parameter.Error;
|
190
184
|
});
|
191
185
|
return allValid;
|
192
186
|
}
|
193
187
|
function clearEditors() {
|
194
|
-
|
195
|
-
if (
|
196
|
-
|
188
|
+
Object.entries(editors).forEach(([key, editor]) => {
|
189
|
+
if (typeof editor.destroy === "function") {
|
190
|
+
editor.destroy();
|
197
191
|
}
|
198
192
|
});
|
199
193
|
editors = {};
|
@@ -205,26 +199,26 @@ function ParametersArea(placeholder, options, otherOptions) {
|
|
205
199
|
clearEditors();
|
206
200
|
var $parameterContainer;
|
207
201
|
var $tempContainer = $("<div></div>");
|
208
|
-
|
202
|
+
Array.from(parameters$1).forEach((parameter) => {
|
209
203
|
try {
|
210
|
-
|
204
|
+
parameter.value = parameterValidators.ParameterValidators.validate(parameter, parameter.value);
|
211
205
|
} catch (e) {
|
212
|
-
|
206
|
+
parameter.Error = parameter.Error || e;
|
213
207
|
}
|
214
|
-
var hasError = Boolean(
|
208
|
+
var hasError = Boolean(parameter.Error);
|
215
209
|
var hasValue = !hasError;
|
216
210
|
if (hasValue) {
|
217
|
-
recentParameterValues[
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
}
|
211
|
+
recentParameterValues[parameter.id] = parameter.value;
|
212
|
+
} else {
|
213
|
+
parameter.Error = stringResources.stringResources.invalidParameter;
|
214
|
+
}
|
215
|
+
if (parameter.availableValues) {
|
216
|
+
processedParameterValues[parameter.id] = { valueMember: parameter.value, displayMember: parameter.label, availableValues: parameter.availableValues, multivalue: parameter.multivalue };
|
223
217
|
} else {
|
224
|
-
|
218
|
+
processedParameterValues[parameter.id] = parameter.value;
|
225
219
|
}
|
226
|
-
if (
|
227
|
-
$parameterContainer = createParameterUI(
|
220
|
+
if (parameter.isVisible || options.showHiddenParameters) {
|
221
|
+
$parameterContainer = createParameterUI(parameter);
|
228
222
|
if ($parameterContainer) {
|
229
223
|
$tempContainer.append($parameterContainer);
|
230
224
|
}
|
@@ -233,17 +227,17 @@ function ParametersArea(placeholder, options, otherOptions) {
|
|
233
227
|
if (initialParameterValues !== void 0) {
|
234
228
|
if (null === initialParameterValues) {
|
235
229
|
initialParameterValues = {};
|
236
|
-
|
237
|
-
if (
|
238
|
-
initialParameterValues[
|
230
|
+
Array.from(parameters$1).forEach((parameter) => {
|
231
|
+
if (parameter.isVisible) {
|
232
|
+
initialParameterValues[parameter.id] = parameter.value;
|
239
233
|
} else {
|
240
|
-
delete recentParameterValues[
|
234
|
+
delete recentParameterValues[parameter.id];
|
241
235
|
}
|
242
236
|
});
|
243
237
|
} else {
|
244
|
-
|
245
|
-
if (!(
|
246
|
-
delete recentParameterValues[
|
238
|
+
Array.from(parameters$1).forEach((parameter) => {
|
239
|
+
if (!(parameter.id in initialParameterValues)) {
|
240
|
+
delete recentParameterValues[parameter.id];
|
247
241
|
}
|
248
242
|
});
|
249
243
|
}
|
@@ -286,7 +280,7 @@ function ParametersArea(placeholder, options, otherOptions) {
|
|
286
280
|
}
|
287
281
|
function invalidateChildParameters(parameter) {
|
288
282
|
if (parameter.childParameters) {
|
289
|
-
|
283
|
+
Array.from(parameter.childParameters).forEach((parameterId) => {
|
290
284
|
var childParameter = getParameterById(parameterId);
|
291
285
|
if (childParameter) {
|
292
286
|
invalidateChildParameters(childParameter);
|
@@ -345,12 +339,10 @@ function ParametersArea(placeholder, options, otherOptions) {
|
|
345
339
|
if (!params || null === params) {
|
346
340
|
return false;
|
347
341
|
}
|
348
|
-
var
|
349
|
-
|
350
|
-
result = this.isVisible;
|
351
|
-
return !result;
|
342
|
+
var hasVisible = Array.from(params).some((parameter) => {
|
343
|
+
return parameter.isVisible;
|
352
344
|
});
|
353
|
-
return
|
345
|
+
return hasVisible;
|
354
346
|
}
|
355
347
|
var loadingCount = 0;
|
356
348
|
function beginLoad() {
|
@@ -483,6 +475,9 @@ function ParametersArea(placeholder, options, otherOptions) {
|
|
483
475
|
parametersReady: function() {
|
484
476
|
return eventFactory(Events.PARAMETERS_READY, arguments);
|
485
477
|
},
|
478
|
+
fill: function(parameters2) {
|
479
|
+
return fill(parameters2);
|
480
|
+
},
|
486
481
|
setParameters: function(parameterValues) {
|
487
482
|
initialParameterValues = null === parameterValues ? null : $.extend({}, parameterValues);
|
488
483
|
}
|
@@ -490,13 +485,5 @@ function ParametersArea(placeholder, options, otherOptions) {
|
|
490
485
|
);
|
491
486
|
return parametersArea;
|
492
487
|
}
|
493
|
-
var pluginName = "telerik_ReportViewer_ParametersArea";
|
494
|
-
$.fn[pluginName] = function(options, otherOptions) {
|
495
|
-
return utils.each(this, function() {
|
496
|
-
if (!$.data(this, pluginName)) {
|
497
|
-
$.data(this, pluginName, new ParametersArea(this, options, otherOptions));
|
498
|
-
}
|
499
|
-
});
|
500
|
-
};
|
501
488
|
|
502
489
|
exports.ParametersArea = ParametersArea;
|
package/dist/cjs/print.js
CHANGED
@@ -8,7 +8,7 @@ function IEHelper() {
|
|
8
8
|
function getPdfPlugin() {
|
9
9
|
var classIds = ["AcroPDF.PDF.1", "PDF.PdfCtrl.6", "PDF.PdfCtrl.5"];
|
10
10
|
var plugin = null;
|
11
|
-
|
11
|
+
$.each(classIds, function(index, classId) {
|
12
12
|
try {
|
13
13
|
plugin = new ActiveXObject(classId);
|
14
14
|
if (plugin) {
|
@@ -52,7 +52,7 @@ function ChromiumHelper(defaultPlugin) {
|
|
52
52
|
function hasPdfPlugin2() {
|
53
53
|
var navPlugins = navigator.plugins;
|
54
54
|
var found = false;
|
55
|
-
|
55
|
+
$.each(navPlugins, function(key, value) {
|
56
56
|
if (navPlugins[key].name === defaultPlugin || navPlugins[key].name === "Adobe Acrobat") {
|
57
57
|
found = true;
|
58
58
|
return false;
|
@@ -86,8 +86,7 @@ function selectBrowserHelper() {
|
|
86
86
|
return ChromiumHelper("Chrome PDF Viewer");
|
87
87
|
else if (userAgent.indexOf("safari") > -1)
|
88
88
|
return ChromiumHelper("WebKit built-in PDF");
|
89
|
-
|
90
|
-
return OtherBrowserHelper();
|
89
|
+
return OtherBrowserHelper();
|
91
90
|
}
|
92
91
|
return null;
|
93
92
|
}
|