@progress/telerik-react-report-viewer 20.23.1114 → 21.24.116
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/main.js +1 -1
- package/dist/cjs/telerik-report-viewer.js +130 -201
- package/dist/dependencies/telerikReportViewer.js +61 -42
- package/dist/dependencies/telerikReportViewerTemplate.html +3 -3
- package/dist/es/telerik-report-viewer.js +129 -199
- package/package.json +1 -1
package/README.md
CHANGED
@@ -17,7 +17,7 @@ While the component is not native (the theming mechanism uses Kendo UI for jQuer
|
|
17
17
|
and has a dependency to jQuery itself), it brings reporting value to your React applications
|
18
18
|
in no time.
|
19
19
|
|
20
|
-
This version of the React Report Viewer requires Telerik Report Server or Telerik Reporting REST Service
|
20
|
+
This version of the React Report Viewer requires Telerik Report Server or Telerik Reporting REST Service 18.0.24.116
|
21
21
|
|
22
22
|
## License
|
23
23
|
|
package/dist/cjs/main.js
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
5
4
|
value: true
|
6
5
|
});
|
@@ -9,206 +8,136 @@ require("../dependencies/initExtDeps");
|
|
9
8
|
var _react = _interopRequireDefault(require("react"));
|
10
9
|
var _telerikReportViewer = require("../dependencies/telerikReportViewer.js");
|
11
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
17
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
18
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
19
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
20
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
21
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
22
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
23
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
24
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
25
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
26
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
27
|
-
var TelerikReportViewer = /*#__PURE__*/function (_React$Component) {
|
28
|
-
_inherits(TelerikReportViewer, _React$Component);
|
29
|
-
var _super = _createSuper(TelerikReportViewer);
|
30
|
-
function TelerikReportViewer() {
|
31
|
-
var _this;
|
32
|
-
_classCallCheck(this, TelerikReportViewer);
|
33
|
-
_this = _super.call(this);
|
34
|
-
_this.state = {
|
11
|
+
class TelerikReportViewer extends _react.default.Component {
|
12
|
+
constructor() {
|
13
|
+
super();
|
14
|
+
this.state = {
|
35
15
|
reportViewerID: ''
|
36
16
|
};
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
this.
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
}
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
}
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
}
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
}
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
return this.viewerObject.accessibilityKeyMap();
|
163
|
-
}
|
164
|
-
}, {
|
165
|
-
key: "setAccessibilityKeyMap",
|
166
|
-
value: function setAccessibilityKeyMap(keyMap) {
|
167
|
-
return this.viewerObject.accessibilityKeyMap(keyMap);
|
168
|
-
}
|
169
|
-
}, {
|
170
|
-
key: "bind",
|
171
|
-
value: function bind(eventName, eventHandler) {
|
172
|
-
this.viewerObject.bind(eventName, eventHandler);
|
173
|
-
}
|
174
|
-
}, {
|
175
|
-
key: "unbind",
|
176
|
-
value: function unbind(eventName, eventHandler) {
|
177
|
-
this.viewerObject.unbind(eventName, eventHandler);
|
178
|
-
}
|
179
|
-
}, {
|
180
|
-
key: "unbindAll",
|
181
|
-
value: function unbindAll(eventName) {
|
182
|
-
this.viewerObject.unbind(eventName);
|
183
|
-
}
|
184
|
-
}, {
|
185
|
-
key: "getPageMode",
|
186
|
-
value: function getPageMode() {
|
187
|
-
return this.viewerObject.pageMode();
|
188
|
-
}
|
189
|
-
}, {
|
190
|
-
key: "setPageMode",
|
191
|
-
value: function setPageMode(psm) {
|
192
|
-
return this.viewerObject.pageMode(psm);
|
193
|
-
}
|
194
|
-
}, {
|
195
|
-
key: "clearReportSource",
|
196
|
-
value: function clearReportSource() {
|
197
|
-
return this.viewerObject.clearReportSource();
|
198
|
-
}
|
199
|
-
}, {
|
200
|
-
key: "dispose",
|
201
|
-
value: function dispose() {
|
202
|
-
return this.viewerObject.dispose();
|
203
|
-
}
|
204
|
-
}, {
|
205
|
-
key: "getReportParameters",
|
206
|
-
value: function getReportParameters() {
|
207
|
-
return this.viewerObject.getReportParameters();
|
208
|
-
}
|
209
|
-
}]);
|
210
|
-
return TelerikReportViewer;
|
211
|
-
}(_react.default.Component);
|
17
|
+
}
|
18
|
+
componentDidMount() {
|
19
|
+
this.setState({
|
20
|
+
reportViewerID: this.props.id || "reportViewer1"
|
21
|
+
});
|
22
|
+
const keepClientAlive = this.props.keepClientAlive === undefined ? true : this.props.keepClientAlive;
|
23
|
+
this.viewerObject = new _telerikReportViewer.ReportViewer(this.el, {
|
24
|
+
id: this.state.reportViewerID,
|
25
|
+
serviceUrl: this.props.serviceUrl,
|
26
|
+
reportServer: this.props.reportServer,
|
27
|
+
trvTemplateUrl: this.props.templateUrl,
|
28
|
+
initialPageAreaImageUrl: this.props.initialPageAreaImageUrl,
|
29
|
+
reportSource: this.props.reportSource,
|
30
|
+
sendEmail: this.props.sendEmail,
|
31
|
+
scale: this.props.scale,
|
32
|
+
scaleMode: this.props.scaleMode,
|
33
|
+
viewMode: this.props.viewMode,
|
34
|
+
pageMode: this.props.pageMode,
|
35
|
+
parameters: this.props.parameters,
|
36
|
+
persistSession: this.props.persistSession,
|
37
|
+
parameterEditors: this.props.parameterEditors,
|
38
|
+
authenticationToken: this.props.authenticationToken,
|
39
|
+
ready: this.props.ready,
|
40
|
+
printMode: this.props.printMode,
|
41
|
+
selector: this.props.selector,
|
42
|
+
disabledButtonClass: this.props.disabledButtonClass,
|
43
|
+
checkedButtonClass: this.props.checkedButtonClass,
|
44
|
+
exportBegin: this.props.exportBegin,
|
45
|
+
exportEnd: this.props.exportEnd,
|
46
|
+
printBegin: this.props.printBegin,
|
47
|
+
printEnd: this.props.printEnd,
|
48
|
+
renderingBegin: this.props.renderingBegin,
|
49
|
+
renderingEnd: this.props.renderingEnd,
|
50
|
+
sendEmailBegin: this.props.sendEmailBegin,
|
51
|
+
sendEmailEnd: this.props.sendEmailEnd,
|
52
|
+
updateUi: this.props.updateUi,
|
53
|
+
pageReady: this.props.pageReady,
|
54
|
+
error: this.props.error,
|
55
|
+
interactiveActionExecuting: this.props.interactiveActionExecuting,
|
56
|
+
interactiveActionEnter: this.props.interactiveActionEnter,
|
57
|
+
interactiveActionLeave: this.props.interactiveActionLeave,
|
58
|
+
viewerToolTipOpening: this.props.viewerToolTipOpening,
|
59
|
+
enableAccessibility: this.props.enableAccessibility,
|
60
|
+
searchMetadataOnDemand: this.props.searchMetadataOnDemand,
|
61
|
+
parametersAreaVisible: this.props.parametersAreaVisible,
|
62
|
+
documentMapVisible: this.props.documentMapVisible,
|
63
|
+
documentMapAreaPosition: this.props.documentMapAreaPosition,
|
64
|
+
parametersAreaPosition: this.props.parametersAreaPosition,
|
65
|
+
keepClientAlive: keepClientAlive
|
66
|
+
});
|
67
|
+
this.commands = this.viewerObject.commands;
|
68
|
+
}
|
69
|
+
componentWillUnmount() {
|
70
|
+
this.dispose();
|
71
|
+
}
|
72
|
+
render() {
|
73
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
74
|
+
id: this.state.reportViewerID,
|
75
|
+
style: {
|
76
|
+
...this.props.viewerContainerStyle
|
77
|
+
},
|
78
|
+
ref: el => this.el = el
|
79
|
+
});
|
80
|
+
}
|
81
|
+
refreshReport() {
|
82
|
+
return this.viewerObject.refreshReport();
|
83
|
+
}
|
84
|
+
getReportSource() {
|
85
|
+
return this.viewerObject.reportSource();
|
86
|
+
}
|
87
|
+
setReportSource(rs) {
|
88
|
+
return this.viewerObject.reportSource(rs);
|
89
|
+
}
|
90
|
+
getViewMode() {
|
91
|
+
return this.viewerObject.viewMode();
|
92
|
+
}
|
93
|
+
setViewMode(vm) {
|
94
|
+
return this.viewerObject.viewMode(vm);
|
95
|
+
}
|
96
|
+
getScale() {
|
97
|
+
return this.viewerObject.scale();
|
98
|
+
}
|
99
|
+
setScale(scale) {
|
100
|
+
return this.viewerObject.scale(scale);
|
101
|
+
}
|
102
|
+
pageCount() {
|
103
|
+
return this.viewerObject.pageCount();
|
104
|
+
}
|
105
|
+
currentPage() {
|
106
|
+
return this.viewerObject.currentPage();
|
107
|
+
}
|
108
|
+
setAuthenticationToken(token) {
|
109
|
+
return this.viewerObject.authenticationToken(token);
|
110
|
+
}
|
111
|
+
getAccessibilityKeyMap() {
|
112
|
+
return this.viewerObject.accessibilityKeyMap();
|
113
|
+
}
|
114
|
+
setAccessibilityKeyMap(keyMap) {
|
115
|
+
return this.viewerObject.accessibilityKeyMap(keyMap);
|
116
|
+
}
|
117
|
+
bind(eventName, eventHandler) {
|
118
|
+
this.viewerObject.bind(eventName, eventHandler);
|
119
|
+
}
|
120
|
+
unbind(eventName, eventHandler) {
|
121
|
+
this.viewerObject.unbind(eventName, eventHandler);
|
122
|
+
}
|
123
|
+
unbindAll(eventName) {
|
124
|
+
this.viewerObject.unbind(eventName);
|
125
|
+
}
|
126
|
+
getPageMode() {
|
127
|
+
return this.viewerObject.pageMode();
|
128
|
+
}
|
129
|
+
setPageMode(psm) {
|
130
|
+
return this.viewerObject.pageMode(psm);
|
131
|
+
}
|
132
|
+
clearReportSource() {
|
133
|
+
return this.viewerObject.clearReportSource();
|
134
|
+
}
|
135
|
+
dispose() {
|
136
|
+
return this.viewerObject.dispose();
|
137
|
+
}
|
138
|
+
getReportParameters() {
|
139
|
+
return this.viewerObject.getReportParameters();
|
140
|
+
}
|
141
|
+
}
|
212
142
|
exports.TelerikReportViewer = TelerikReportViewer;
|
213
|
-
var _default = TelerikReportViewer;
|
214
|
-
exports.default = _default;
|
143
|
+
var _default = exports.default = TelerikReportViewer;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
var $ = require("jquery");
|
2
2
|
/*
|
3
|
-
* TelerikReporting
|
4
|
-
* Copyright
|
3
|
+
* TelerikReporting v18.0.24.116 (https://www.telerik.com/products/reporting.aspx)
|
4
|
+
* Copyright 2024 Progress Software EAD. All rights reserved.
|
5
5
|
*
|
6
6
|
* Telerik Reporting commercial licenses may be obtained at
|
7
7
|
* https://www.telerik.com/purchase/license-agreement/reporting.aspx
|
@@ -78,11 +78,15 @@ var telerikReportViewer = (() => {
|
|
78
78
|
areEqualArrays: () => areEqualArrays,
|
79
79
|
each: () => each,
|
80
80
|
escapeHtml: () => escapeHtml,
|
81
|
+
exceptionTypeNamesMatch: () => exceptionTypeNamesMatch,
|
81
82
|
extend: () => extend,
|
82
83
|
filterUniqueLastOccurance: () => filterUniqueLastOccurance,
|
83
84
|
findElement: () => findElement,
|
84
85
|
generateGuidString: () => generateGuidString,
|
85
86
|
getColorAlphaValue: () => getColorAlphaValue,
|
87
|
+
getExceptionInstance: () => getExceptionInstance,
|
88
|
+
isApplicationException: () => isApplicationException,
|
89
|
+
isApplicationExceptionInstance: () => isApplicationExceptionInstance,
|
86
90
|
isArray: () => isArray,
|
87
91
|
isExceptionOfType: () => isExceptionOfType,
|
88
92
|
isInternalServerError: () => isInternalServerError,
|
@@ -90,6 +94,7 @@ var telerikReportViewer = (() => {
|
|
90
94
|
isRgbColor: () => isRgbColor,
|
91
95
|
isSpecialKey: () => isSpecialKey,
|
92
96
|
isSvgSupported: () => isSvgSupported,
|
97
|
+
isSystemArgumentException: () => isSystemArgumentException,
|
93
98
|
loadScript: () => loadScript,
|
94
99
|
loadScriptWithCallback: () => loadScriptWithCallback,
|
95
100
|
logError: () => logError,
|
@@ -309,20 +314,31 @@ var telerikReportViewer = (() => {
|
|
309
314
|
}
|
310
315
|
return false;
|
311
316
|
}
|
317
|
+
function isSystemArgumentException(xhr) {
|
318
|
+
var exceptionShortName = "ArgumentException";
|
319
|
+
var exceptionInstance = getExceptionInstance(xhr);
|
320
|
+
return isExceptionInstanceOfType(exceptionInstance, exceptionShortName, "System." + exceptionShortName);
|
321
|
+
}
|
312
322
|
function isInvalidClientException(xhr) {
|
313
|
-
|
323
|
+
var exceptionShortName = "InvalidClientException";
|
324
|
+
var exceptionInstance = getExceptionInstance(xhr);
|
325
|
+
return isExceptionInstanceOfType(exceptionInstance, exceptionShortName, "Telerik.Reporting.Services.Engine." + exceptionShortName);
|
326
|
+
}
|
327
|
+
function isApplicationException(xhr) {
|
328
|
+
return isApplicationExceptionInstance(getExceptionInstance(xhr));
|
329
|
+
}
|
330
|
+
function isApplicationExceptionInstance(exception) {
|
331
|
+
var exceptionShortName = "DrawingFactoryUnavailableException";
|
332
|
+
return isExceptionInstanceOfType(exception, exceptionShortName, "Telerik.Drawing.Contract." + exceptionShortName);
|
314
333
|
}
|
315
334
|
function isExceptionOfType(xhr, exceptionType) {
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
if (!json.exceptionType)
|
324
|
-
return false;
|
325
|
-
return json.exceptionType === exceptionType;
|
335
|
+
return isExceptionInstanceOfType(getExceptionInstance(xhr), exceptionType, exceptionType);
|
336
|
+
}
|
337
|
+
function isExceptionInstanceOfType(exceptionInstance, exceptionTypeShortName, exceptionTypeFullName) {
|
338
|
+
return exceptionInstance && exceptionInstance.exceptionType && exceptionTypeNamesMatch(exceptionInstance.exceptionType, exceptionTypeShortName, exceptionTypeFullName);
|
339
|
+
}
|
340
|
+
function exceptionTypeNamesMatch(instanceTypeName, exceptionTypeShortName, exceptionTypeFullName) {
|
341
|
+
return instanceTypeName && (instanceTypeName === exceptionTypeFullName || instanceTypeName.endsWith(exceptionTypeShortName));
|
326
342
|
}
|
327
343
|
function parseJSON(json) {
|
328
344
|
try {
|
@@ -343,6 +359,12 @@ var telerikReportViewer = (() => {
|
|
343
359
|
return null;
|
344
360
|
}
|
345
361
|
}
|
362
|
+
function getExceptionInstance(xhr) {
|
363
|
+
if (!xhr || !xhr.responseText) {
|
364
|
+
return false;
|
365
|
+
}
|
366
|
+
return parseJSON(xhr.responseText);
|
367
|
+
}
|
346
368
|
function extend() {
|
347
369
|
var src, copy, name, options, target, i = 0, length = arguments.length;
|
348
370
|
target = length > 1 ? arguments[i++] || {} : {};
|
@@ -681,7 +703,7 @@ var telerikReportViewer = (() => {
|
|
681
703
|
errorSendingDocument: "Error sending report document (Report = '{0}')."
|
682
704
|
};
|
683
705
|
window.telerikReportViewer ||= {};
|
684
|
-
window.telerikReportViewer.sr
|
706
|
+
window.telerikReportViewer.sr ||= sr;
|
685
707
|
|
686
708
|
// src/stringResources.js
|
687
709
|
var sr2 = sr2 || {};
|
@@ -1662,19 +1684,25 @@ var telerikReportViewer = (() => {
|
|
1662
1684
|
raiseError(formatXhrError({ "responseText": errorMessage }, null, null, null));
|
1663
1685
|
throw errorMessage;
|
1664
1686
|
}
|
1665
|
-
|
1687
|
+
var xhr = xhrData.xhr;
|
1688
|
+
if (isInvalidClientException(xhr)) {
|
1666
1689
|
onClientExpired();
|
1667
1690
|
}
|
1668
1691
|
var formattedError = formatXhrError(
|
1669
|
-
|
1692
|
+
xhr,
|
1670
1693
|
xhrData.status,
|
1671
1694
|
isInternalServerError(xhrData.error) ? "" : xhrData.error,
|
1672
1695
|
localizedMessage
|
1673
1696
|
);
|
1674
1697
|
raiseError(formattedError);
|
1675
1698
|
if (!suppressErrorBubbling) {
|
1676
|
-
|
1677
|
-
|
1699
|
+
if (isApplicationException(xhr)) {
|
1700
|
+
var exception = getExceptionInstance(xhr);
|
1701
|
+
if (exception) {
|
1702
|
+
throw exception;
|
1703
|
+
}
|
1704
|
+
}
|
1705
|
+
throw xhr.responseJSON && exception.exceptionMessage ? xhr.responseJSON.exceptionMessage : stringResources.promisesChainStopError;
|
1678
1706
|
}
|
1679
1707
|
}
|
1680
1708
|
function initializeClientAsync() {
|
@@ -1892,19 +1920,15 @@ var telerikReportViewer = (() => {
|
|
1892
1920
|
deviceInfo.enableSearch = enableSearch;
|
1893
1921
|
return deviceInfo;
|
1894
1922
|
}
|
1895
|
-
function
|
1896
|
-
|
1897
|
-
|
1898
|
-
return stringResources.missingOrInvalidParameter;
|
1899
|
-
default:
|
1900
|
-
return "";
|
1901
|
-
}
|
1923
|
+
function tryResolveClientErrorByExceptionType(exceptionType) {
|
1924
|
+
var parameterExceptionShortName = "InvalidParameterException";
|
1925
|
+
return exceptionTypeNamesMatch(exceptionType, parameterExceptionShortName, "Telerik.Reporting.Services.Engine." + parameterExceptionShortName) ? stringResources.missingOrInvalidParameter : "";
|
1902
1926
|
}
|
1903
1927
|
function formatXhrError(xhr, status, error, localizedMessage) {
|
1904
1928
|
var parsedXhr = parseJSON(xhr.responseText);
|
1905
1929
|
var result = "";
|
1906
1930
|
if (parsedXhr) {
|
1907
|
-
var errorMessage =
|
1931
|
+
var errorMessage = tryResolveClientErrorByExceptionType(parsedXhr.exceptionType || parsedXhr.error);
|
1908
1932
|
if (errorMessage) {
|
1909
1933
|
return errorMessage;
|
1910
1934
|
}
|
@@ -2329,7 +2353,7 @@ var telerikReportViewer = (() => {
|
|
2329
2353
|
return client.getSearchResults(clientId, reportInstanceId, reportDocumentId, args.searchToken, args.matchCase, args.matchWholeWord, args.useRegex).catch(handleSearchResultsError);
|
2330
2354
|
}
|
2331
2355
|
function handleSearchResultsError(xhrData) {
|
2332
|
-
if (!
|
2356
|
+
if (!isSystemArgumentException(xhrData.xhr)) {
|
2333
2357
|
handleRequestError(xhrData, null, true);
|
2334
2358
|
throw null;
|
2335
2359
|
}
|
@@ -6592,6 +6616,11 @@ var telerikReportViewer = (() => {
|
|
6592
6616
|
menu._oldHoverItem.toggleClass("k-focus");
|
6593
6617
|
}
|
6594
6618
|
}
|
6619
|
+
if (!args.renderingExtensions) {
|
6620
|
+
controller.getDocumentFormats().then(fillFormats);
|
6621
|
+
} else {
|
6622
|
+
fillFormats(args.renderingExtensions);
|
6623
|
+
}
|
6595
6624
|
});
|
6596
6625
|
function init2() {
|
6597
6626
|
try {
|
@@ -6600,7 +6629,6 @@ var telerikReportViewer = (() => {
|
|
6600
6629
|
console.error("Instantiation of Kendo Menu as Main Menu threw an exception", e);
|
6601
6630
|
throw e;
|
6602
6631
|
}
|
6603
|
-
menu.bind("open", onSubmenuOpen);
|
6604
6632
|
menu.bind("activate", onSubmenuActivate);
|
6605
6633
|
menu.bind("deactivate", onSubmenuDeactivate);
|
6606
6634
|
menu.element.off("keydown", onMenuKeyDown);
|
@@ -6655,16 +6683,6 @@ var telerikReportViewer = (() => {
|
|
6655
6683
|
});
|
6656
6684
|
});
|
6657
6685
|
}
|
6658
|
-
function onSubmenuOpen(e) {
|
6659
|
-
var $item = $(e.item);
|
6660
|
-
menu.unbind("open", onSubmenuOpen);
|
6661
|
-
menu.append({ text: stringResources.loadingFormats, spriteCssClass: "k-icon k-loading" }, $item);
|
6662
|
-
controller.getDocumentFormats().then(fillFormats).then(function() {
|
6663
|
-
menu.open($item);
|
6664
|
-
}).then(function() {
|
6665
|
-
menu.bind("open", onSubmenuOpen);
|
6666
|
-
});
|
6667
|
-
}
|
6668
6686
|
function fillFormats(formats) {
|
6669
6687
|
each($(dom).find("ul[data-command-list=export-format-list]"), function() {
|
6670
6688
|
var $list = $(this), $parent = $list.parents("li");
|
@@ -8304,7 +8322,7 @@ var telerikReportViewer = (() => {
|
|
8304
8322
|
if (!validateOptions(options)) {
|
8305
8323
|
return;
|
8306
8324
|
}
|
8307
|
-
var version = "
|
8325
|
+
var version = "18.0.24.116";
|
8308
8326
|
options = extend({}, getDefaultOptions(svcApiUrl, version), options);
|
8309
8327
|
settings = new ReportViewerSettings(
|
8310
8328
|
persistanceKey,
|
@@ -8795,8 +8813,9 @@ var telerikReportViewer = (() => {
|
|
8795
8813
|
ensureKendo(version2).then(function() {
|
8796
8814
|
}).then(function() {
|
8797
8815
|
viewer.authenticationToken(options.authenticationToken);
|
8798
|
-
controller.getServiceVersion().catch(function() {
|
8799
|
-
|
8816
|
+
controller.getServiceVersion().catch(function(ex) {
|
8817
|
+
var errorOutput = isApplicationExceptionInstance(ex) ? ex.exceptionMessage : stringFormat(stringResources.errorServiceUrl, [escapeHtml(svcApiUrl)]);
|
8818
|
+
$placeholder.text(errorOutput);
|
8800
8819
|
return Promise.reject();
|
8801
8820
|
}).then(function(data) {
|
8802
8821
|
if (data !== version2) {
|
@@ -8873,7 +8892,7 @@ var telerikReportViewer = (() => {
|
|
8873
8892
|
return __toCommonJS(src_exports);
|
8874
8893
|
})();
|
8875
8894
|
|
8876
|
-
/* DO NOT MODIFY OR DELETE THIS LINE! UPGRADE WIZARD CHECKSUM
|
8895
|
+
/* DO NOT MODIFY OR DELETE THIS LINE! UPGRADE WIZARD CHECKSUM 158555f9b27bbf1db6fe5ef8bdd09a06 */
|
8877
8896
|
module.exports = {
|
8878
8897
|
ReportViewer: telerikReportViewer.ReportViewer
|
8879
8898
|
};
|
@@ -4,8 +4,8 @@
|
|
4
4
|
<title>Telerik HTML5 Report Viewer Templates</title>
|
5
5
|
|
6
6
|
<!--Telerik served resources. For more information see: http://docs.telerik.com/reporting/html5-report-viewer-styling-and-appearance -->
|
7
|
-
<link href="{service}resources/font/fonticons-
|
8
|
-
<link href="{service}resources/styles/telerikReportViewer-
|
7
|
+
<link href="{service}resources/font/fonticons-18.0.24.116.css/" rel="stylesheet" />
|
8
|
+
<link href="{service}resources/styles/telerikReportViewer-18.0.24.116.css/" rel="stylesheet" />
|
9
9
|
|
10
10
|
</head>
|
11
11
|
<body>
|
@@ -329,4 +329,4 @@
|
|
329
329
|
|
330
330
|
</body>
|
331
331
|
</html>
|
332
|
-
<!-- DO NOT MODIFY OR DELETE THIS LINE! UPGRADE WIZARD CHECKSUM
|
332
|
+
<!-- DO NOT MODIFY OR DELETE THIS LINE! UPGRADE WIZARD CHECKSUM 1c1b6b254bc960722558f9294a39b516 -->
|
@@ -1,205 +1,135 @@
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
4
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
5
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
6
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
7
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
8
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
9
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
10
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
11
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
12
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
13
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
14
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
15
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
16
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
17
1
|
import '../dependencies/initExtDeps';
|
18
2
|
import React from 'react';
|
19
3
|
import { ReportViewer } from '../dependencies/telerikReportViewer.js';
|
20
|
-
export
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
var _this;
|
25
|
-
_classCallCheck(this, TelerikReportViewer);
|
26
|
-
_this = _super.call(this);
|
27
|
-
_this.state = {
|
4
|
+
export class TelerikReportViewer extends React.Component {
|
5
|
+
constructor() {
|
6
|
+
super();
|
7
|
+
this.state = {
|
28
8
|
reportViewerID: ''
|
29
9
|
};
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
}
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
}
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
}
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
}
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
return this.viewerObject.accessibilityKeyMap();
|
156
|
-
}
|
157
|
-
}, {
|
158
|
-
key: "setAccessibilityKeyMap",
|
159
|
-
value: function setAccessibilityKeyMap(keyMap) {
|
160
|
-
return this.viewerObject.accessibilityKeyMap(keyMap);
|
161
|
-
}
|
162
|
-
}, {
|
163
|
-
key: "bind",
|
164
|
-
value: function bind(eventName, eventHandler) {
|
165
|
-
this.viewerObject.bind(eventName, eventHandler);
|
166
|
-
}
|
167
|
-
}, {
|
168
|
-
key: "unbind",
|
169
|
-
value: function unbind(eventName, eventHandler) {
|
170
|
-
this.viewerObject.unbind(eventName, eventHandler);
|
171
|
-
}
|
172
|
-
}, {
|
173
|
-
key: "unbindAll",
|
174
|
-
value: function unbindAll(eventName) {
|
175
|
-
this.viewerObject.unbind(eventName);
|
176
|
-
}
|
177
|
-
}, {
|
178
|
-
key: "getPageMode",
|
179
|
-
value: function getPageMode() {
|
180
|
-
return this.viewerObject.pageMode();
|
181
|
-
}
|
182
|
-
}, {
|
183
|
-
key: "setPageMode",
|
184
|
-
value: function setPageMode(psm) {
|
185
|
-
return this.viewerObject.pageMode(psm);
|
186
|
-
}
|
187
|
-
}, {
|
188
|
-
key: "clearReportSource",
|
189
|
-
value: function clearReportSource() {
|
190
|
-
return this.viewerObject.clearReportSource();
|
191
|
-
}
|
192
|
-
}, {
|
193
|
-
key: "dispose",
|
194
|
-
value: function dispose() {
|
195
|
-
return this.viewerObject.dispose();
|
196
|
-
}
|
197
|
-
}, {
|
198
|
-
key: "getReportParameters",
|
199
|
-
value: function getReportParameters() {
|
200
|
-
return this.viewerObject.getReportParameters();
|
201
|
-
}
|
202
|
-
}]);
|
203
|
-
return TelerikReportViewer;
|
204
|
-
}(React.Component);
|
10
|
+
}
|
11
|
+
componentDidMount() {
|
12
|
+
this.setState({
|
13
|
+
reportViewerID: this.props.id || "reportViewer1"
|
14
|
+
});
|
15
|
+
const keepClientAlive = this.props.keepClientAlive === undefined ? true : this.props.keepClientAlive;
|
16
|
+
this.viewerObject = new ReportViewer(this.el, {
|
17
|
+
id: this.state.reportViewerID,
|
18
|
+
serviceUrl: this.props.serviceUrl,
|
19
|
+
reportServer: this.props.reportServer,
|
20
|
+
trvTemplateUrl: this.props.templateUrl,
|
21
|
+
initialPageAreaImageUrl: this.props.initialPageAreaImageUrl,
|
22
|
+
reportSource: this.props.reportSource,
|
23
|
+
sendEmail: this.props.sendEmail,
|
24
|
+
scale: this.props.scale,
|
25
|
+
scaleMode: this.props.scaleMode,
|
26
|
+
viewMode: this.props.viewMode,
|
27
|
+
pageMode: this.props.pageMode,
|
28
|
+
parameters: this.props.parameters,
|
29
|
+
persistSession: this.props.persistSession,
|
30
|
+
parameterEditors: this.props.parameterEditors,
|
31
|
+
authenticationToken: this.props.authenticationToken,
|
32
|
+
ready: this.props.ready,
|
33
|
+
printMode: this.props.printMode,
|
34
|
+
selector: this.props.selector,
|
35
|
+
disabledButtonClass: this.props.disabledButtonClass,
|
36
|
+
checkedButtonClass: this.props.checkedButtonClass,
|
37
|
+
exportBegin: this.props.exportBegin,
|
38
|
+
exportEnd: this.props.exportEnd,
|
39
|
+
printBegin: this.props.printBegin,
|
40
|
+
printEnd: this.props.printEnd,
|
41
|
+
renderingBegin: this.props.renderingBegin,
|
42
|
+
renderingEnd: this.props.renderingEnd,
|
43
|
+
sendEmailBegin: this.props.sendEmailBegin,
|
44
|
+
sendEmailEnd: this.props.sendEmailEnd,
|
45
|
+
updateUi: this.props.updateUi,
|
46
|
+
pageReady: this.props.pageReady,
|
47
|
+
error: this.props.error,
|
48
|
+
interactiveActionExecuting: this.props.interactiveActionExecuting,
|
49
|
+
interactiveActionEnter: this.props.interactiveActionEnter,
|
50
|
+
interactiveActionLeave: this.props.interactiveActionLeave,
|
51
|
+
viewerToolTipOpening: this.props.viewerToolTipOpening,
|
52
|
+
enableAccessibility: this.props.enableAccessibility,
|
53
|
+
searchMetadataOnDemand: this.props.searchMetadataOnDemand,
|
54
|
+
parametersAreaVisible: this.props.parametersAreaVisible,
|
55
|
+
documentMapVisible: this.props.documentMapVisible,
|
56
|
+
documentMapAreaPosition: this.props.documentMapAreaPosition,
|
57
|
+
parametersAreaPosition: this.props.parametersAreaPosition,
|
58
|
+
keepClientAlive: keepClientAlive
|
59
|
+
});
|
60
|
+
this.commands = this.viewerObject.commands;
|
61
|
+
}
|
62
|
+
componentWillUnmount() {
|
63
|
+
this.dispose();
|
64
|
+
}
|
65
|
+
render() {
|
66
|
+
return /*#__PURE__*/React.createElement("div", {
|
67
|
+
id: this.state.reportViewerID,
|
68
|
+
style: {
|
69
|
+
...this.props.viewerContainerStyle
|
70
|
+
},
|
71
|
+
ref: el => this.el = el
|
72
|
+
});
|
73
|
+
}
|
74
|
+
refreshReport() {
|
75
|
+
return this.viewerObject.refreshReport();
|
76
|
+
}
|
77
|
+
getReportSource() {
|
78
|
+
return this.viewerObject.reportSource();
|
79
|
+
}
|
80
|
+
setReportSource(rs) {
|
81
|
+
return this.viewerObject.reportSource(rs);
|
82
|
+
}
|
83
|
+
getViewMode() {
|
84
|
+
return this.viewerObject.viewMode();
|
85
|
+
}
|
86
|
+
setViewMode(vm) {
|
87
|
+
return this.viewerObject.viewMode(vm);
|
88
|
+
}
|
89
|
+
getScale() {
|
90
|
+
return this.viewerObject.scale();
|
91
|
+
}
|
92
|
+
setScale(scale) {
|
93
|
+
return this.viewerObject.scale(scale);
|
94
|
+
}
|
95
|
+
pageCount() {
|
96
|
+
return this.viewerObject.pageCount();
|
97
|
+
}
|
98
|
+
currentPage() {
|
99
|
+
return this.viewerObject.currentPage();
|
100
|
+
}
|
101
|
+
setAuthenticationToken(token) {
|
102
|
+
return this.viewerObject.authenticationToken(token);
|
103
|
+
}
|
104
|
+
getAccessibilityKeyMap() {
|
105
|
+
return this.viewerObject.accessibilityKeyMap();
|
106
|
+
}
|
107
|
+
setAccessibilityKeyMap(keyMap) {
|
108
|
+
return this.viewerObject.accessibilityKeyMap(keyMap);
|
109
|
+
}
|
110
|
+
bind(eventName, eventHandler) {
|
111
|
+
this.viewerObject.bind(eventName, eventHandler);
|
112
|
+
}
|
113
|
+
unbind(eventName, eventHandler) {
|
114
|
+
this.viewerObject.unbind(eventName, eventHandler);
|
115
|
+
}
|
116
|
+
unbindAll(eventName) {
|
117
|
+
this.viewerObject.unbind(eventName);
|
118
|
+
}
|
119
|
+
getPageMode() {
|
120
|
+
return this.viewerObject.pageMode();
|
121
|
+
}
|
122
|
+
setPageMode(psm) {
|
123
|
+
return this.viewerObject.pageMode(psm);
|
124
|
+
}
|
125
|
+
clearReportSource() {
|
126
|
+
return this.viewerObject.clearReportSource();
|
127
|
+
}
|
128
|
+
dispose() {
|
129
|
+
return this.viewerObject.dispose();
|
130
|
+
}
|
131
|
+
getReportParameters() {
|
132
|
+
return this.viewerObject.getReportParameters();
|
133
|
+
}
|
134
|
+
}
|
205
135
|
export default TelerikReportViewer;
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@progress/telerik-react-report-viewer",
|
3
3
|
"description": "Progress® Telerik® Report Viewer for React",
|
4
|
-
"version": "
|
4
|
+
"version": "21.24.116",
|
5
5
|
"author": "Progress",
|
6
6
|
"license": "See LICENSE.md",
|
7
7
|
"homepage": "https://www.telerik.com/reporting",
|