@progress/telerik-jquery-report-viewer 22.24.514 → 22.24.709
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.
- 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 +22 -25
- package/dist/cjs/documentMapArea.js +4 -13
- package/dist/cjs/event-emitter.js +124 -10
- 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 +31 -47
- 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 +23 -26
- package/dist/es/documentMapArea.js +4 -13
- package/dist/es/event-emitter.js +124 -10
- 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 +32 -48
- 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 +1071 -1188
- 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.1.24.709.ttf} +0 -0
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
|
-
if (
|
219
|
-
processedParameterValues[
|
211
|
+
recentParameterValues[parameter.id] = parameter.value;
|
212
|
+
if (parameter.availableValues) {
|
213
|
+
processedParameterValues[parameter.id] = { valueMember: parameter.value, displayMember: parameter.label, availableValues: parameter.availableValues, multivalue: parameter.multivalue };
|
220
214
|
} else {
|
221
|
-
processedParameterValues[
|
215
|
+
processedParameterValues[parameter.id] = parameter.value;
|
222
216
|
}
|
223
217
|
} else {
|
224
|
-
|
218
|
+
parameter.Error = stringResources.stringResources.invalidParameter;
|
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() {
|
@@ -490,13 +482,5 @@ function ParametersArea(placeholder, options, otherOptions) {
|
|
490
482
|
);
|
491
483
|
return parametersArea;
|
492
484
|
}
|
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
485
|
|
502
486
|
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
|
}
|
package/dist/cjs/reportViewer.js
CHANGED
@@ -25,6 +25,9 @@ var globalSettings = require('./globalSettings.js');
|
|
25
25
|
var memStorage = require('./mem-storage.js');
|
26
26
|
var templateCache = require('./template-cache.js');
|
27
27
|
var reportViewerSettings = require('./report-viewer/report-viewer-settings.js');
|
28
|
+
var linkButton = require('./toolbar/link-button.js');
|
29
|
+
var pageNumberInput = require('./toolbar/page-number-input.js');
|
30
|
+
var pageCountLabel = require('./toolbar/page-count-label.js');
|
28
31
|
|
29
32
|
const Instances = globalSettings.GlobalSettings.viewerInstances;
|
30
33
|
function getDefaultOptions(serviceUrl, version) {
|
@@ -85,8 +88,8 @@ function ReportViewer(dom, options) {
|
|
85
88
|
if (!validateOptions(options)) {
|
86
89
|
return;
|
87
90
|
}
|
88
|
-
var version = "18.1.24.
|
89
|
-
options =
|
91
|
+
var version = "18.1.24.709";
|
92
|
+
options = $.extend({}, getDefaultOptions(svcApiUrl, version), options);
|
90
93
|
settings = new reportViewerSettings.ReportViewerSettings(
|
91
94
|
persistanceKey,
|
92
95
|
options.persistSession ? window.sessionStorage : new memStorage.MemStorage(),
|
@@ -537,24 +540,21 @@ function ReportViewer(dom, options) {
|
|
537
540
|
return e.outerHTML;
|
538
541
|
}).toArray();
|
539
542
|
var promises = [];
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
})
|
554
|
-
);
|
555
|
-
}
|
543
|
+
Array.from(styleSheets).forEach((element) => {
|
544
|
+
if (currentStyleLinks.indexOf(element) === -1) {
|
545
|
+
promises.push(
|
546
|
+
new Promise(function(resolve, reject) {
|
547
|
+
var $link = $(element);
|
548
|
+
$link.on("load", resolve);
|
549
|
+
$link.on("onerror", function() {
|
550
|
+
utils.logError("error loading stylesheet " + element);
|
551
|
+
resolve();
|
552
|
+
});
|
553
|
+
$head.append($link);
|
554
|
+
})
|
555
|
+
);
|
556
556
|
}
|
557
|
-
);
|
557
|
+
});
|
558
558
|
return Promise.all(promises).then(controller$1.cssLoaded);
|
559
559
|
}
|
560
560
|
function browserSupportsAllFeatures() {
|
@@ -563,12 +563,11 @@ function ReportViewer(dom, options) {
|
|
563
563
|
function ensureKendo(version2) {
|
564
564
|
if (window.kendo) {
|
565
565
|
return Promise.resolve();
|
566
|
-
} else {
|
567
|
-
var kendoUrl = utils.rTrim(svcApiUrl, "\\/") + "/resources/js/telerikReportViewer.kendo-" + version2 + ".min.js/";
|
568
|
-
return utils.loadScript(kendoUrl).catch(function(errorData) {
|
569
|
-
utils.logError("Kendo could not be loaded automatically. Make sure 'options.serviceUrl' / 'options.reportServer.url' is correct and accessible. The error is: " + errorData.error);
|
570
|
-
});
|
571
566
|
}
|
567
|
+
var kendoUrl = utils.rTrim(svcApiUrl, "\\/") + "/resources/js/telerikReportViewer.kendo-" + version2 + ".min.js/";
|
568
|
+
return utils.loadScript(kendoUrl).catch(function(errorData) {
|
569
|
+
utils.logError("Kendo could not be loaded automatically. Make sure 'options.serviceUrl' / 'options.reportServer.url' is correct and accessible. The error is: " + errorData.error);
|
570
|
+
});
|
572
571
|
}
|
573
572
|
function main(version2) {
|
574
573
|
ensureKendo(version2).then(function() {
|
@@ -596,7 +595,7 @@ function ReportViewer(dom, options) {
|
|
596
595
|
if (browserSupportsAllFeatures()) {
|
597
596
|
main(version);
|
598
597
|
} else {
|
599
|
-
|
598
|
+
throw "The current browser does not support the Promise feature which is required for using the Report Viewer.";
|
600
599
|
}
|
601
600
|
return viewer;
|
602
601
|
}
|
@@ -605,7 +604,7 @@ $.fn[pluginName] = function(options) {
|
|
605
604
|
if (this.selector && !options.selector) {
|
606
605
|
options.selector = this.selector;
|
607
606
|
}
|
608
|
-
return
|
607
|
+
return this.each(function() {
|
609
608
|
if (!$.data(this, pluginName)) {
|
610
609
|
$.data(this, pluginName, new ReportViewer(this, options));
|
611
610
|
}
|
@@ -639,11 +638,23 @@ const plugins = [
|
|
639
638
|
{
|
640
639
|
name: "telerik_ReportViewer_SideMenu",
|
641
640
|
constructor: sideMenu.SideMenu
|
641
|
+
},
|
642
|
+
{
|
643
|
+
name: "telerik_ReportViewer_LinkButton",
|
644
|
+
constructor: linkButton.LinkButton
|
645
|
+
},
|
646
|
+
{
|
647
|
+
name: "telerik_ReportViewer_PageNumberInput",
|
648
|
+
constructor: pageNumberInput.PageNumberInput
|
649
|
+
},
|
650
|
+
{
|
651
|
+
name: "telerik_ReportViewer_PageCountLabel",
|
652
|
+
constructor: pageCountLabel.PageCountLabel
|
642
653
|
}
|
643
654
|
];
|
644
655
|
plugins.forEach((plugin) => {
|
645
656
|
$.fn[plugin.name] = function(options, otherOptions) {
|
646
|
-
return
|
657
|
+
return this.each(function() {
|
647
658
|
if (!$.data(this, plugin.name)) {
|
648
659
|
$.data(this, plugin.name, new plugin.constructor(this, options, otherOptions));
|
649
660
|
}
|
package/dist/cjs/scroll.js
CHANGED
@@ -282,11 +282,11 @@ var Scroll = {
|
|
282
282
|
_loadVisiblePages: function _loadVisiblePages() {
|
283
283
|
var that = this;
|
284
284
|
var pages = that.$placeholder.find(".trv-report-page");
|
285
|
-
|
285
|
+
Array.from(pages).forEach((value) => {
|
286
286
|
var pageItem = $(value);
|
287
287
|
var pageNumber = parseInt(pageItem.attr("data-page"));
|
288
288
|
if (that._scrolledInToView(pageItem) && that._isSkeletonScreen(pageItem, pageNumber)) {
|
289
|
-
that.controller.getPageData(pageNumber).then(
|
289
|
+
that.controller.getPageData(pageNumber).then((newPage) => {
|
290
290
|
that._render(newPage, false);
|
291
291
|
});
|
292
292
|
}
|
@@ -457,9 +457,8 @@ var Scroll = {
|
|
457
457
|
return that._findNewCurrentPage(pages.splice(middleIndex, Number.MAX_VALUE));
|
458
458
|
} else if (result > 0 && pages.length > 1) {
|
459
459
|
return that._findNewCurrentPage(pages.splice(0, middleIndex));
|
460
|
-
} else {
|
461
|
-
return -1;
|
462
460
|
}
|
461
|
+
return -1;
|
463
462
|
},
|
464
463
|
_findPageInViewPort: function _findPageInViewPort(index, pages) {
|
465
464
|
var pageItem = this.$placeholder.find(pages[index]);
|
@@ -476,9 +475,8 @@ var Scroll = {
|
|
476
475
|
}
|
477
476
|
if (pageBottom < additionalTopOffset) {
|
478
477
|
return -1;
|
479
|
-
} else {
|
480
|
-
return 1;
|
481
478
|
}
|
479
|
+
return 1;
|
482
480
|
},
|
483
481
|
_scrollDown: function _scrollDown(pages, scrollPosition) {
|
484
482
|
var that = this;
|