@progress/telerik-jquery-report-viewer 21.24.130 → 22.24.514

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