@progress/telerik-jquery-report-viewer 21.24.130 → 22.24.514
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 +218 -0
- package/dist/cjs/binder.js +172 -0
- package/dist/cjs/command.js +32 -0
- package/dist/cjs/commandSet.js +167 -0
- package/dist/cjs/controller.js +1207 -0
- package/dist/cjs/documentMapArea.js +168 -0
- package/dist/cjs/domUtils.js +50 -0
- package/dist/cjs/enums.js +52 -0
- package/dist/cjs/event-emitter.js +17 -0
- package/dist/cjs/events.js +23 -0
- package/dist/cjs/globalSettings.js +9 -0
- package/dist/cjs/history.js +131 -0
- package/dist/cjs/index.js +58 -0
- package/dist/cjs/jqueryThrottleDebounce.js +48 -0
- package/dist/cjs/kendo-jquery.js +4 -0
- package/dist/cjs/mainMenu.js +332 -0
- package/dist/cjs/mem-storage.js +44 -0
- package/dist/cjs/pagesArea.js +641 -0
- package/dist/cjs/parameterValidators.js +167 -0
- package/dist/cjs/parameters.js +921 -0
- package/dist/cjs/parametersArea.js +502 -0
- package/dist/cjs/perspectives.js +138 -0
- package/dist/cjs/print.js +166 -0
- package/dist/cjs/report-viewer/report-viewer-settings.js +138 -0
- package/dist/cjs/reportViewer.js +654 -0
- package/dist/cjs/scroll.js +537 -0
- package/dist/cjs/search.js +634 -0
- package/dist/cjs/sendEmail.js +435 -0
- package/dist/cjs/service-client-sentinel.js +52 -0
- package/dist/cjs/serviceClient.js +405 -0
- package/dist/cjs/sideMenu.js +225 -0
- package/dist/cjs/sr.js +164 -0
- package/dist/cjs/stringResources.js +11 -0
- package/dist/cjs/telerikReportViewer.kendo.js +60196 -0
- package/dist/cjs/telerikReportViewer.kendo.min.js +19776 -0
- package/dist/cjs/template-cache.js +39 -0
- package/dist/cjs/touch.js +86 -0
- package/dist/cjs/uiController.js +142 -0
- package/dist/cjs/uiFreezeCoordinator.js +281 -0
- package/dist/cjs/utils.js +492 -0
- package/dist/es/accessibility.js +214 -0
- package/dist/es/binder.js +168 -0
- package/dist/es/command.js +28 -0
- package/dist/es/commandSet.js +163 -0
- package/dist/es/controller.js +1203 -0
- package/dist/es/documentMapArea.js +164 -0
- package/dist/es/domUtils.js +43 -0
- package/dist/es/enums.js +41 -0
- package/dist/es/event-emitter.js +13 -0
- package/dist/es/events.js +19 -0
- package/dist/es/globalSettings.js +5 -0
- package/dist/es/history.js +127 -0
- package/dist/es/index.js +24 -0
- package/dist/es/jqueryThrottleDebounce.js +46 -0
- package/dist/es/kendo-jquery.js +1 -0
- package/dist/es/mainMenu.js +328 -0
- package/dist/es/mem-storage.js +40 -0
- package/dist/es/pagesArea.js +637 -0
- package/dist/es/parameterValidators.js +163 -0
- package/dist/es/parameters.js +916 -0
- package/dist/es/parametersArea.js +498 -0
- package/dist/es/perspectives.js +134 -0
- package/dist/es/print.js +162 -0
- package/dist/es/report-viewer/report-viewer-settings.js +134 -0
- package/dist/es/reportViewer.js +650 -0
- package/dist/es/scroll.js +533 -0
- package/dist/es/search.js +630 -0
- package/dist/es/sendEmail.js +431 -0
- package/dist/es/service-client-sentinel.js +48 -0
- package/dist/es/serviceClient.js +401 -0
- package/dist/es/sideMenu.js +221 -0
- package/dist/es/sr.js +162 -0
- package/dist/es/stringResources.js +7 -0
- package/dist/es/telerikReportViewer.kendo.js +60194 -0
- package/dist/es/telerikReportViewer.kendo.min.js +19774 -0
- package/dist/es/template-cache.js +35 -0
- package/dist/es/touch.js +82 -0
- package/dist/es/uiController.js +138 -0
- package/dist/es/uiFreezeCoordinator.js +277 -0
- package/dist/es/utils.js +447 -0
- package/dist/font/font-icons.css +4 -4
- package/dist/font/font-icons.min.css +3 -3
- package/dist/js/telerikReportViewer.js +8574 -8249
- package/dist/js/telerikReportViewer.min.js +1 -17
- package/dist/js/telerikReportViewer.stringResources.js +166 -173
- package/dist/styles/telerikReportViewer.css +1 -1
- package/dist/styles/telerikReportViewer.min.css +1 -1
- package/dist/templates/telerikReportViewerTemplate-FA.html +3 -3
- package/dist/templates/telerikReportViewerTemplate.html +3 -3
- package/package.json +13 -7
- /package/dist/font/{ReportingIcons-18.0.24.130.ttf → ReportingIcons-18.1.24.514.ttf} +0 -0
@@ -0,0 +1,166 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var utils = require('./utils.js');
|
6
|
+
|
7
|
+
function IEHelper() {
|
8
|
+
function getPdfPlugin() {
|
9
|
+
var classIds = ["AcroPDF.PDF.1", "PDF.PdfCtrl.6", "PDF.PdfCtrl.5"];
|
10
|
+
var plugin = null;
|
11
|
+
utils.each(classIds, function(index, classId) {
|
12
|
+
try {
|
13
|
+
plugin = new ActiveXObject(classId);
|
14
|
+
if (plugin) {
|
15
|
+
return false;
|
16
|
+
}
|
17
|
+
} catch (ex) {
|
18
|
+
}
|
19
|
+
});
|
20
|
+
return plugin;
|
21
|
+
}
|
22
|
+
return {
|
23
|
+
hasPdfPlugin: function() {
|
24
|
+
return getPdfPlugin() !== null;
|
25
|
+
}
|
26
|
+
};
|
27
|
+
}
|
28
|
+
function FirefoxHelper() {
|
29
|
+
function hasPdfPlugin2() {
|
30
|
+
var matches = /Firefox[\/\s](\d+\.\d+)/.exec(navigator.userAgent);
|
31
|
+
if (null !== matches && matches.length > 1) {
|
32
|
+
var version = parseFloat(matches[1]);
|
33
|
+
if (version >= 19) {
|
34
|
+
return false;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
var pdfPlugins = navigator.mimeTypes["application/pdf"];
|
38
|
+
var pdfPlugin = pdfPlugins !== null ? pdfPlugins.enabledPlugin : null;
|
39
|
+
if (pdfPlugin) {
|
40
|
+
var description = pdfPlugin.description;
|
41
|
+
return description.indexOf("Adobe") !== -1 && (description.indexOf("Version") === -1 || parseFloat(description.split("Version")[1]) >= 6);
|
42
|
+
}
|
43
|
+
return false;
|
44
|
+
}
|
45
|
+
return {
|
46
|
+
hasPdfPlugin: function() {
|
47
|
+
return hasPdfPlugin2();
|
48
|
+
}
|
49
|
+
};
|
50
|
+
}
|
51
|
+
function ChromiumHelper(defaultPlugin) {
|
52
|
+
function hasPdfPlugin2() {
|
53
|
+
var navPlugins = navigator.plugins;
|
54
|
+
var found = false;
|
55
|
+
utils.each(navPlugins, function(key, value) {
|
56
|
+
if (navPlugins[key].name === defaultPlugin || navPlugins[key].name === "Adobe Acrobat") {
|
57
|
+
found = true;
|
58
|
+
return false;
|
59
|
+
}
|
60
|
+
});
|
61
|
+
return found;
|
62
|
+
}
|
63
|
+
return {
|
64
|
+
hasPdfPlugin: function() {
|
65
|
+
return hasPdfPlugin2();
|
66
|
+
}
|
67
|
+
};
|
68
|
+
}
|
69
|
+
function OtherBrowserHelper() {
|
70
|
+
return {
|
71
|
+
hasPdfPlugin: function() {
|
72
|
+
return false;
|
73
|
+
}
|
74
|
+
};
|
75
|
+
}
|
76
|
+
function selectBrowserHelper() {
|
77
|
+
if (window.navigator) {
|
78
|
+
var userAgent = window.navigator.userAgent.toLowerCase();
|
79
|
+
if (userAgent.indexOf("msie") > -1 || userAgent.indexOf("mozilla") > -1 && userAgent.indexOf("trident") > -1)
|
80
|
+
return IEHelper();
|
81
|
+
else if (userAgent.indexOf("firefox") > -1)
|
82
|
+
return FirefoxHelper();
|
83
|
+
else if (userAgent.indexOf("edg/") > -1)
|
84
|
+
return ChromiumHelper("Microsoft Edge PDF Plugin");
|
85
|
+
else if (userAgent.indexOf("chrome") > -1)
|
86
|
+
return ChromiumHelper("Chrome PDF Viewer");
|
87
|
+
else if (userAgent.indexOf("safari") > -1)
|
88
|
+
return ChromiumHelper("WebKit built-in PDF");
|
89
|
+
else
|
90
|
+
return OtherBrowserHelper();
|
91
|
+
}
|
92
|
+
return null;
|
93
|
+
}
|
94
|
+
var helper = selectBrowserHelper();
|
95
|
+
var hasPdfPlugin = helper ? helper.hasPdfPlugin() : false;
|
96
|
+
var PrintManager = function() {
|
97
|
+
var iframe;
|
98
|
+
function printDesktop(src) {
|
99
|
+
var sameOriginUrl = null;
|
100
|
+
if (!iframe) {
|
101
|
+
iframe = document.createElement("iframe");
|
102
|
+
iframe.style.display = "none";
|
103
|
+
iframe.onload = function() {
|
104
|
+
try {
|
105
|
+
iframe.contentDocument.execCommand("print", true, null);
|
106
|
+
} catch (e) {
|
107
|
+
utils.logError(e);
|
108
|
+
} finally {
|
109
|
+
if (sameOriginUrl) {
|
110
|
+
(window.URL || window.webkitURL).revokeObjectURL(sameOriginUrl);
|
111
|
+
}
|
112
|
+
}
|
113
|
+
};
|
114
|
+
}
|
115
|
+
if (isSameOriginUrl(src) && useMsBlobHandling()) {
|
116
|
+
iframe.src = src;
|
117
|
+
document.body.appendChild(iframe);
|
118
|
+
return;
|
119
|
+
}
|
120
|
+
var request = new XMLHttpRequest();
|
121
|
+
request.open("GET", src, true);
|
122
|
+
request.responseType = "arraybuffer";
|
123
|
+
request.onload = function(e) {
|
124
|
+
if (this.status === 200) {
|
125
|
+
var localPdf = new Blob([this.response], { type: "application/pdf" });
|
126
|
+
if (useMsBlobHandling()) {
|
127
|
+
window.navigator.msSaveOrOpenBlob(localPdf);
|
128
|
+
} else {
|
129
|
+
sameOriginUrl = (window.URL || window.webkitURL).createObjectURL(localPdf);
|
130
|
+
iframe.src = sameOriginUrl;
|
131
|
+
document.body.appendChild(iframe);
|
132
|
+
}
|
133
|
+
} else {
|
134
|
+
console.log("Could not retrieve remote PDF document.");
|
135
|
+
}
|
136
|
+
};
|
137
|
+
request.send();
|
138
|
+
}
|
139
|
+
function useMsBlobHandling() {
|
140
|
+
return window.navigator && window.navigator.msSaveOrOpenBlob;
|
141
|
+
}
|
142
|
+
function isSameOriginUrl(url) {
|
143
|
+
var location = window.location;
|
144
|
+
var anchor = document.createElement("a");
|
145
|
+
anchor.setAttribute("href", url);
|
146
|
+
if (anchor.host == "") {
|
147
|
+
anchor.href = anchor.href;
|
148
|
+
}
|
149
|
+
return location.hostname === anchor.hostname && location.protocol === anchor.protocol && location.port === anchor.port;
|
150
|
+
}
|
151
|
+
function printMobile(src) {
|
152
|
+
window.open(src, "_self");
|
153
|
+
}
|
154
|
+
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
155
|
+
var printFunc = isMobile ? printMobile : printDesktop;
|
156
|
+
return {
|
157
|
+
print: function(src) {
|
158
|
+
printFunc(src);
|
159
|
+
},
|
160
|
+
getDirectPrintState: function() {
|
161
|
+
return hasPdfPlugin;
|
162
|
+
}
|
163
|
+
};
|
164
|
+
}();
|
165
|
+
|
166
|
+
exports.PrintManager = PrintManager;
|
@@ -0,0 +1,138 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
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 ReportViewerSettings {
|
12
|
+
// #endregion
|
13
|
+
// #region constructor
|
14
|
+
constructor(id, storage, defaultSettings) {
|
15
|
+
// #region fields
|
16
|
+
__publicField(this, "_id");
|
17
|
+
__publicField(this, "_storage");
|
18
|
+
__publicField(this, "_defaults");
|
19
|
+
this._id = id;
|
20
|
+
this._storage = storage;
|
21
|
+
this._defaults = defaultSettings || {};
|
22
|
+
}
|
23
|
+
// #endregion
|
24
|
+
// #region methods
|
25
|
+
formatKey(key) {
|
26
|
+
return this._id + "_" + key;
|
27
|
+
}
|
28
|
+
getItem(key) {
|
29
|
+
var value = this._storage.getItem(this.formatKey(key));
|
30
|
+
if (typeof value === "string") {
|
31
|
+
try {
|
32
|
+
value = JSON.parse(value);
|
33
|
+
} catch (e) {
|
34
|
+
value = null;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
return value !== null && value !== void 0 ? value : this._defaults[key];
|
38
|
+
}
|
39
|
+
setItem(key, value) {
|
40
|
+
var formattedKey = this.formatKey(key);
|
41
|
+
this._storage.setItem(formattedKey, JSON.stringify(value));
|
42
|
+
}
|
43
|
+
// #endregion
|
44
|
+
// #region accessors
|
45
|
+
getViewMode() {
|
46
|
+
return this.getItem("viewMode");
|
47
|
+
}
|
48
|
+
setViewMode(value) {
|
49
|
+
this.setItem("viewMode", value);
|
50
|
+
}
|
51
|
+
getPageMode() {
|
52
|
+
return this.getItem("pageMode");
|
53
|
+
}
|
54
|
+
setPageMode(value) {
|
55
|
+
this.setItem("pageMode", value);
|
56
|
+
}
|
57
|
+
getPrintMode() {
|
58
|
+
return this.getItem("printMode");
|
59
|
+
}
|
60
|
+
setPrintMode(value) {
|
61
|
+
this.setItem("printMode", value);
|
62
|
+
}
|
63
|
+
getScale() {
|
64
|
+
return this.getItem("scale");
|
65
|
+
}
|
66
|
+
setScale(value) {
|
67
|
+
this.setItem("scale", value);
|
68
|
+
}
|
69
|
+
getScaleMode() {
|
70
|
+
return this.getItem("scaleMode");
|
71
|
+
}
|
72
|
+
setScaleMode(value) {
|
73
|
+
this.setItem("scaleMode", value);
|
74
|
+
}
|
75
|
+
getDocumentMapVisible() {
|
76
|
+
return this.getItem("documentMapVisible");
|
77
|
+
}
|
78
|
+
setDocumentMapVisible(value) {
|
79
|
+
this.setItem("documentMapVisible", value);
|
80
|
+
}
|
81
|
+
getParametersAreaVisible() {
|
82
|
+
return this.getItem("parametersAreaVisible");
|
83
|
+
}
|
84
|
+
setParametersAreaVisible(value) {
|
85
|
+
this.setItem("parametersAreaVisible", value);
|
86
|
+
}
|
87
|
+
getHistory() {
|
88
|
+
return this.getItem("history");
|
89
|
+
}
|
90
|
+
setHistory(value) {
|
91
|
+
this.setItem("history", value);
|
92
|
+
}
|
93
|
+
getClientId() {
|
94
|
+
return this.getItem("clientId");
|
95
|
+
}
|
96
|
+
setClientId(value) {
|
97
|
+
this.setItem("clientId", value);
|
98
|
+
}
|
99
|
+
getReportSource() {
|
100
|
+
return this.getItem("reportSource");
|
101
|
+
}
|
102
|
+
setReportSource(value) {
|
103
|
+
this.setItem("reportSource", value);
|
104
|
+
}
|
105
|
+
getPageNumber() {
|
106
|
+
return this.getItem("pageNumber");
|
107
|
+
}
|
108
|
+
setPageNumber(value) {
|
109
|
+
this.setItem("pageNumber", value);
|
110
|
+
}
|
111
|
+
getEnableAccessibility() {
|
112
|
+
return this.getItem("enableAccessibility");
|
113
|
+
}
|
114
|
+
setEnableAccessibility(value) {
|
115
|
+
this.setItem("enableAccessibility", value);
|
116
|
+
}
|
117
|
+
getAccessibilityKeyMap() {
|
118
|
+
return this.getItem("accessibilityKeyMap");
|
119
|
+
}
|
120
|
+
setAccessibilityKeyMap(value) {
|
121
|
+
this.setItem("accessibilityKeyMap", value);
|
122
|
+
}
|
123
|
+
getSearchMetadataOnDemand() {
|
124
|
+
return this.getItem("searchMetadataOnDemand");
|
125
|
+
}
|
126
|
+
setSearchMetadataOnDemand(value) {
|
127
|
+
this.setItem("searchMetadataOnDemand", value);
|
128
|
+
}
|
129
|
+
getKeepClientAlive() {
|
130
|
+
return this.getItem("keepClientAlive");
|
131
|
+
}
|
132
|
+
setKeepClientAlive(value) {
|
133
|
+
this.setItem("keepClientAlive", value);
|
134
|
+
}
|
135
|
+
// #endregion
|
136
|
+
}
|
137
|
+
|
138
|
+
exports.ReportViewerSettings = ReportViewerSettings;
|