@progress/telerik-jquery-report-viewer 21.24.305 → 22.24.709

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/accessibility.js +208 -0
  3. package/dist/cjs/base-component.js +26 -0
  4. package/dist/cjs/binder.js +79 -0
  5. package/dist/cjs/command.js +32 -0
  6. package/dist/cjs/commandSet.js +167 -0
  7. package/dist/cjs/controller.js +1204 -0
  8. package/dist/cjs/documentMapArea.js +159 -0
  9. package/dist/cjs/domUtils.js +50 -0
  10. package/dist/cjs/enums.js +52 -0
  11. package/dist/cjs/event-emitter.js +131 -0
  12. package/dist/cjs/events.js +23 -0
  13. package/dist/cjs/globalSettings.js +9 -0
  14. package/dist/cjs/history.js +131 -0
  15. package/dist/cjs/index.js +58 -0
  16. package/dist/cjs/jqueryThrottleDebounce.js +48 -0
  17. package/dist/cjs/kendo-jquery.js +4 -0
  18. package/dist/cjs/mainMenu.js +323 -0
  19. package/dist/cjs/mem-storage.js +44 -0
  20. package/dist/cjs/pagesArea.js +622 -0
  21. package/dist/cjs/parameterValidators.js +164 -0
  22. package/dist/cjs/parameters.js +921 -0
  23. package/dist/cjs/parametersArea.js +486 -0
  24. package/dist/cjs/perspectives.js +138 -0
  25. package/dist/cjs/print.js +165 -0
  26. package/dist/cjs/report-viewer/report-viewer-settings.js +138 -0
  27. package/dist/cjs/reportViewer.js +665 -0
  28. package/dist/cjs/scroll.js +535 -0
  29. package/dist/cjs/search.js +584 -0
  30. package/dist/cjs/sendEmail.js +392 -0
  31. package/dist/cjs/service-client-sentinel.js +52 -0
  32. package/dist/cjs/serviceClient.js +311 -0
  33. package/dist/cjs/sideMenu.js +216 -0
  34. package/dist/cjs/sr.js +164 -0
  35. package/dist/cjs/stringResources.js +11 -0
  36. package/dist/cjs/telerikReportViewer.kendo.js +60196 -0
  37. package/dist/cjs/telerikReportViewer.kendo.min.js +19776 -0
  38. package/dist/cjs/template-cache.js +39 -0
  39. package/dist/cjs/toolbar/link-button.js +42 -0
  40. package/dist/cjs/toolbar/page-count-label.js +18 -0
  41. package/dist/cjs/toolbar/page-number-input.js +64 -0
  42. package/dist/cjs/touch.js +86 -0
  43. package/dist/cjs/uiController.js +142 -0
  44. package/dist/cjs/uiFreezeCoordinator.js +282 -0
  45. package/dist/cjs/utils.js +489 -0
  46. package/dist/es/accessibility.js +204 -0
  47. package/dist/es/base-component.js +22 -0
  48. package/dist/es/binder.js +75 -0
  49. package/dist/es/command.js +28 -0
  50. package/dist/es/commandSet.js +163 -0
  51. package/dist/es/controller.js +1200 -0
  52. package/dist/es/documentMapArea.js +155 -0
  53. package/dist/es/domUtils.js +43 -0
  54. package/dist/es/enums.js +41 -0
  55. package/dist/es/event-emitter.js +127 -0
  56. package/dist/es/events.js +19 -0
  57. package/dist/es/globalSettings.js +5 -0
  58. package/dist/es/history.js +127 -0
  59. package/dist/es/index.js +24 -0
  60. package/dist/es/jqueryThrottleDebounce.js +46 -0
  61. package/dist/es/kendo-jquery.js +1 -0
  62. package/dist/es/mainMenu.js +319 -0
  63. package/dist/es/mem-storage.js +40 -0
  64. package/dist/es/pagesArea.js +618 -0
  65. package/dist/es/parameterValidators.js +160 -0
  66. package/dist/es/parameters.js +916 -0
  67. package/dist/es/parametersArea.js +482 -0
  68. package/dist/es/perspectives.js +134 -0
  69. package/dist/es/print.js +161 -0
  70. package/dist/es/report-viewer/report-viewer-settings.js +134 -0
  71. package/dist/es/reportViewer.js +661 -0
  72. package/dist/es/scroll.js +531 -0
  73. package/dist/es/search.js +580 -0
  74. package/dist/es/sendEmail.js +388 -0
  75. package/dist/es/service-client-sentinel.js +48 -0
  76. package/dist/es/serviceClient.js +307 -0
  77. package/dist/es/sideMenu.js +212 -0
  78. package/dist/es/sr.js +162 -0
  79. package/dist/es/stringResources.js +7 -0
  80. package/dist/es/telerikReportViewer.kendo.js +60194 -0
  81. package/dist/es/telerikReportViewer.kendo.min.js +19774 -0
  82. package/dist/es/template-cache.js +35 -0
  83. package/dist/es/toolbar/link-button.js +38 -0
  84. package/dist/es/toolbar/page-count-label.js +14 -0
  85. package/dist/es/toolbar/page-number-input.js +60 -0
  86. package/dist/es/touch.js +82 -0
  87. package/dist/es/uiController.js +138 -0
  88. package/dist/es/uiFreezeCoordinator.js +278 -0
  89. package/dist/es/utils.js +444 -0
  90. package/dist/font/font-icons.css +4 -4
  91. package/dist/font/font-icons.min.css +3 -3
  92. package/dist/js/telerikReportViewer.js +8346 -8507
  93. package/dist/js/telerikReportViewer.min.js +1 -17
  94. package/dist/js/telerikReportViewer.stringResources.js +166 -173
  95. package/dist/styles/telerikReportViewer.css +3 -3
  96. package/dist/styles/telerikReportViewer.min.css +3 -3
  97. package/dist/templates/telerikReportViewerTemplate-FA.html +4 -4
  98. package/dist/templates/telerikReportViewerTemplate.html +6 -6
  99. package/package.json +14 -7
  100. /package/dist/font/{ReportingIcons-18.0.24.305.ttf → ReportingIcons-18.1.24.709.ttf} +0 -0
@@ -0,0 +1,161 @@
1
+ import { logError } 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
+ return OtherBrowserHelper();
86
+ }
87
+ return null;
88
+ }
89
+ var helper = selectBrowserHelper();
90
+ var hasPdfPlugin = helper ? helper.hasPdfPlugin() : false;
91
+ var PrintManager = function() {
92
+ var iframe;
93
+ function printDesktop(src) {
94
+ var sameOriginUrl = null;
95
+ if (!iframe) {
96
+ iframe = document.createElement("iframe");
97
+ iframe.style.display = "none";
98
+ iframe.onload = function() {
99
+ try {
100
+ iframe.contentDocument.execCommand("print", true, null);
101
+ } catch (e) {
102
+ logError(e);
103
+ } finally {
104
+ if (sameOriginUrl) {
105
+ (window.URL || window.webkitURL).revokeObjectURL(sameOriginUrl);
106
+ }
107
+ }
108
+ };
109
+ }
110
+ if (isSameOriginUrl(src) && useMsBlobHandling()) {
111
+ iframe.src = src;
112
+ document.body.appendChild(iframe);
113
+ return;
114
+ }
115
+ var request = new XMLHttpRequest();
116
+ request.open("GET", src, true);
117
+ request.responseType = "arraybuffer";
118
+ request.onload = function(e) {
119
+ if (this.status === 200) {
120
+ var localPdf = new Blob([this.response], { type: "application/pdf" });
121
+ if (useMsBlobHandling()) {
122
+ window.navigator.msSaveOrOpenBlob(localPdf);
123
+ } else {
124
+ sameOriginUrl = (window.URL || window.webkitURL).createObjectURL(localPdf);
125
+ iframe.src = sameOriginUrl;
126
+ document.body.appendChild(iframe);
127
+ }
128
+ } else {
129
+ console.log("Could not retrieve remote PDF document.");
130
+ }
131
+ };
132
+ request.send();
133
+ }
134
+ function useMsBlobHandling() {
135
+ return window.navigator && window.navigator.msSaveOrOpenBlob;
136
+ }
137
+ function isSameOriginUrl(url) {
138
+ var location = window.location;
139
+ var anchor = document.createElement("a");
140
+ anchor.setAttribute("href", url);
141
+ if (anchor.host == "") {
142
+ anchor.href = anchor.href;
143
+ }
144
+ return location.hostname === anchor.hostname && location.protocol === anchor.protocol && location.port === anchor.port;
145
+ }
146
+ function printMobile(src) {
147
+ window.open(src, "_self");
148
+ }
149
+ var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
150
+ var printFunc = isMobile ? printMobile : printDesktop;
151
+ return {
152
+ print: function(src) {
153
+ printFunc(src);
154
+ },
155
+ getDirectPrintState: function() {
156
+ return hasPdfPlugin;
157
+ }
158
+ };
159
+ }();
160
+
161
+ 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 };