@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.
- package/README.md +1 -1
- package/dist/cjs/accessibility.js +208 -0
- package/dist/cjs/base-component.js +26 -0
- package/dist/cjs/binder.js +79 -0
- package/dist/cjs/command.js +32 -0
- package/dist/cjs/commandSet.js +167 -0
- package/dist/cjs/controller.js +1204 -0
- package/dist/cjs/documentMapArea.js +159 -0
- package/dist/cjs/domUtils.js +50 -0
- package/dist/cjs/enums.js +52 -0
- package/dist/cjs/event-emitter.js +131 -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 +323 -0
- package/dist/cjs/mem-storage.js +44 -0
- package/dist/cjs/pagesArea.js +622 -0
- package/dist/cjs/parameterValidators.js +164 -0
- package/dist/cjs/parameters.js +921 -0
- package/dist/cjs/parametersArea.js +486 -0
- package/dist/cjs/perspectives.js +138 -0
- package/dist/cjs/print.js +165 -0
- package/dist/cjs/report-viewer/report-viewer-settings.js +138 -0
- package/dist/cjs/reportViewer.js +665 -0
- package/dist/cjs/scroll.js +535 -0
- package/dist/cjs/search.js +584 -0
- package/dist/cjs/sendEmail.js +392 -0
- package/dist/cjs/service-client-sentinel.js +52 -0
- package/dist/cjs/serviceClient.js +311 -0
- package/dist/cjs/sideMenu.js +216 -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/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/touch.js +86 -0
- package/dist/cjs/uiController.js +142 -0
- package/dist/cjs/uiFreezeCoordinator.js +282 -0
- package/dist/cjs/utils.js +489 -0
- package/dist/es/accessibility.js +204 -0
- package/dist/es/base-component.js +22 -0
- package/dist/es/binder.js +75 -0
- package/dist/es/command.js +28 -0
- package/dist/es/commandSet.js +163 -0
- package/dist/es/controller.js +1200 -0
- package/dist/es/documentMapArea.js +155 -0
- package/dist/es/domUtils.js +43 -0
- package/dist/es/enums.js +41 -0
- package/dist/es/event-emitter.js +127 -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 +319 -0
- package/dist/es/mem-storage.js +40 -0
- package/dist/es/pagesArea.js +618 -0
- package/dist/es/parameterValidators.js +160 -0
- package/dist/es/parameters.js +916 -0
- package/dist/es/parametersArea.js +482 -0
- package/dist/es/perspectives.js +134 -0
- package/dist/es/print.js +161 -0
- package/dist/es/report-viewer/report-viewer-settings.js +134 -0
- package/dist/es/reportViewer.js +661 -0
- package/dist/es/scroll.js +531 -0
- package/dist/es/search.js +580 -0
- package/dist/es/sendEmail.js +388 -0
- package/dist/es/service-client-sentinel.js +48 -0
- package/dist/es/serviceClient.js +307 -0
- package/dist/es/sideMenu.js +212 -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/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/touch.js +82 -0
- package/dist/es/uiController.js +138 -0
- package/dist/es/uiFreezeCoordinator.js +278 -0
- package/dist/es/utils.js +444 -0
- package/dist/font/font-icons.css +4 -4
- package/dist/font/font-icons.min.css +3 -3
- package/dist/js/telerikReportViewer.js +8346 -8507
- package/dist/js/telerikReportViewer.min.js +1 -17
- package/dist/js/telerikReportViewer.stringResources.js +166 -173
- 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 +14 -7
- /package/dist/font/{ReportingIcons-18.0.24.305.ttf → ReportingIcons-18.1.24.709.ttf} +0 -0
@@ -0,0 +1,311 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var utils = require('./utils.js');
|
6
|
+
|
7
|
+
var __defProp = Object.defineProperty;
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
12
|
+
var __spreadValues = (a, b) => {
|
13
|
+
for (var prop in b || (b = {}))
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
16
|
+
if (__getOwnPropSymbols)
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
18
|
+
if (__propIsEnum.call(b, prop))
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
20
|
+
}
|
21
|
+
return a;
|
22
|
+
};
|
23
|
+
var JSON_CONTENT_TYPE = "application/json; charset=UTF-8";
|
24
|
+
var URLENCODED_CONTENT_TYPE = "application/x-www-form-urlencoded; charset=UTF-8";
|
25
|
+
var HTTP_GET = "GET";
|
26
|
+
var HTTP_POST = "POST";
|
27
|
+
var HTTP_DELETE = "DELETE";
|
28
|
+
var defaultOptions = {};
|
29
|
+
function getHeaders(authorizationToken) {
|
30
|
+
const headers = {
|
31
|
+
"Accept": "application/json, text/javascript, */*; q=0.01"
|
32
|
+
};
|
33
|
+
if (authorizationToken) {
|
34
|
+
headers["Authorization"] = "Bearer " + authorizationToken;
|
35
|
+
}
|
36
|
+
return headers;
|
37
|
+
}
|
38
|
+
function ServiceClient(options) {
|
39
|
+
options = $.extend({}, defaultOptions, options);
|
40
|
+
var baseUrl = utils.rTrim(options.serviceUrl || options.baseUrl, "\\/");
|
41
|
+
var loginPromise;
|
42
|
+
var _ajax = utils.$ajax;
|
43
|
+
function validateClientID(clientID) {
|
44
|
+
if (!clientID) {
|
45
|
+
throw "Invalid clientID";
|
46
|
+
}
|
47
|
+
}
|
48
|
+
function urlFromTemplate(template, args) {
|
49
|
+
args = $.extend({}, { baseUrl }, args);
|
50
|
+
return utils.stringFormat(template, args);
|
51
|
+
}
|
52
|
+
function login() {
|
53
|
+
if (!loginPromise) {
|
54
|
+
var loginInfo = options.loginInfo;
|
55
|
+
if (loginInfo && loginInfo.url && (loginInfo.username || loginInfo.password)) {
|
56
|
+
const endPoint = loginInfo.url;
|
57
|
+
loginPromise = _ajax(endPoint, {
|
58
|
+
method: HTTP_POST,
|
59
|
+
data: {
|
60
|
+
grant_type: "password",
|
61
|
+
username: loginInfo.username,
|
62
|
+
password: loginInfo.password
|
63
|
+
},
|
64
|
+
dataType: "json",
|
65
|
+
contentType: URLENCODED_CONTENT_TYPE
|
66
|
+
}).then(function(result) {
|
67
|
+
return result.access_token;
|
68
|
+
});
|
69
|
+
} else {
|
70
|
+
loginPromise = Promise.resolve();
|
71
|
+
}
|
72
|
+
}
|
73
|
+
return loginPromise;
|
74
|
+
}
|
75
|
+
return {
|
76
|
+
_urlFromTemplate: urlFromTemplate,
|
77
|
+
registerClient: function(settings) {
|
78
|
+
const endPoint = `${baseUrl}/clients`;
|
79
|
+
return login().then(function(authorizationToken) {
|
80
|
+
return _ajax(endPoint, __spreadValues({
|
81
|
+
headers: getHeaders(authorizationToken),
|
82
|
+
method: HTTP_POST,
|
83
|
+
dataType: "json",
|
84
|
+
// Used to avoid Chrome caching functionality for simple async requests
|
85
|
+
// when the first request is not completed the second request is not send
|
86
|
+
// and the same response is used for both of the request. In this case the
|
87
|
+
// second client is not registered to the service and the same clientId is used.
|
88
|
+
data: JSON.stringify({ timeStamp: Date.now() })
|
89
|
+
}, settings));
|
90
|
+
}).then(function(clientData) {
|
91
|
+
if (clientData.Message) {
|
92
|
+
throw clientData.Message;
|
93
|
+
}
|
94
|
+
return clientData.clientId;
|
95
|
+
});
|
96
|
+
},
|
97
|
+
unregisterClient: function(clientID, settings) {
|
98
|
+
validateClientID(clientID);
|
99
|
+
const endPoint = `${baseUrl}/clients/${clientID}`;
|
100
|
+
return login().then(function(authorizationToken) {
|
101
|
+
return _ajax(endPoint, __spreadValues({
|
102
|
+
headers: getHeaders(authorizationToken),
|
103
|
+
method: HTTP_DELETE
|
104
|
+
}, settings));
|
105
|
+
});
|
106
|
+
},
|
107
|
+
getParameters: function(clientID, report, parameterValues, settings) {
|
108
|
+
validateClientID(clientID);
|
109
|
+
const endPoint = `${baseUrl}/clients/${clientID}/parameters`;
|
110
|
+
return login().then(function(authorizationToken) {
|
111
|
+
return _ajax(endPoint, __spreadValues({
|
112
|
+
headers: getHeaders(authorizationToken),
|
113
|
+
method: HTTP_POST,
|
114
|
+
contentType: JSON_CONTENT_TYPE,
|
115
|
+
dataType: "json",
|
116
|
+
data: JSON.stringify({ report, parameterValues })
|
117
|
+
}, settings));
|
118
|
+
});
|
119
|
+
},
|
120
|
+
createReportInstance: function(clientID, report, parameterValues, settings) {
|
121
|
+
validateClientID(clientID);
|
122
|
+
const endPoint = `${baseUrl}/clients/${clientID}/instances`;
|
123
|
+
return login().then(function(authorizationToken) {
|
124
|
+
return _ajax(endPoint, __spreadValues({
|
125
|
+
headers: getHeaders(authorizationToken),
|
126
|
+
method: HTTP_POST,
|
127
|
+
contentType: JSON_CONTENT_TYPE,
|
128
|
+
dataType: "json",
|
129
|
+
data: JSON.stringify({ report, parameterValues })
|
130
|
+
}, settings));
|
131
|
+
}).then(function(instanceData) {
|
132
|
+
return instanceData.instanceId;
|
133
|
+
});
|
134
|
+
},
|
135
|
+
deleteReportInstance: function(clientID, instanceID, settings) {
|
136
|
+
validateClientID(clientID);
|
137
|
+
const endPoint = `${baseUrl}/clients/${clientID}/instances/${instanceID}`;
|
138
|
+
return login().then(function(authorizationToken) {
|
139
|
+
return _ajax(endPoint, __spreadValues({
|
140
|
+
headers: getHeaders(authorizationToken),
|
141
|
+
method: HTTP_DELETE
|
142
|
+
}, settings));
|
143
|
+
});
|
144
|
+
},
|
145
|
+
// eslint-disable-next-line max-params
|
146
|
+
createReportDocument: function(clientID, instanceID, format, deviceInfo, useCache, baseDocumentID, actionID, settings) {
|
147
|
+
validateClientID(clientID);
|
148
|
+
const endPoint = `${baseUrl}/clients/${clientID}/instances/${instanceID}/documents`;
|
149
|
+
return login().then(function(authorizationToken) {
|
150
|
+
deviceInfo = deviceInfo || {};
|
151
|
+
deviceInfo["BasePath"] = baseUrl;
|
152
|
+
return _ajax(endPoint, __spreadValues({
|
153
|
+
headers: getHeaders(authorizationToken),
|
154
|
+
method: HTTP_POST,
|
155
|
+
contentType: JSON_CONTENT_TYPE,
|
156
|
+
dataType: "json",
|
157
|
+
data: JSON.stringify({
|
158
|
+
format,
|
159
|
+
deviceInfo,
|
160
|
+
useCache,
|
161
|
+
baseDocumentID,
|
162
|
+
actionID
|
163
|
+
})
|
164
|
+
}, settings));
|
165
|
+
}).then(function(documentData) {
|
166
|
+
return documentData.documentId;
|
167
|
+
});
|
168
|
+
},
|
169
|
+
// eslint-disable-next-line max-params
|
170
|
+
sendDocument: function(clientID, instanceID, documentID, mailArgs, settings) {
|
171
|
+
validateClientID(clientID);
|
172
|
+
const endPoint = `${baseUrl}/clients/${clientID}/instances/${instanceID}/documents/${documentID}/send`;
|
173
|
+
return login().then(function(authorizationToken) {
|
174
|
+
return _ajax(endPoint, __spreadValues({
|
175
|
+
headers: getHeaders(authorizationToken),
|
176
|
+
method: HTTP_POST,
|
177
|
+
contentType: JSON_CONTENT_TYPE,
|
178
|
+
data: JSON.stringify({
|
179
|
+
from: mailArgs.from,
|
180
|
+
to: mailArgs.to,
|
181
|
+
cc: mailArgs.cc,
|
182
|
+
subject: mailArgs.subject,
|
183
|
+
body: mailArgs.body
|
184
|
+
})
|
185
|
+
}, settings));
|
186
|
+
});
|
187
|
+
},
|
188
|
+
deleteReportDocument: function(clientID, instanceID, documentID, settings) {
|
189
|
+
validateClientID(clientID);
|
190
|
+
const endPoint = `${baseUrl}/clients/${clientID}/instances/${instanceID}/documents/${documentID}`;
|
191
|
+
return login().then(function(authorizationToken) {
|
192
|
+
return _ajax(endPoint, __spreadValues({
|
193
|
+
headers: getHeaders(authorizationToken),
|
194
|
+
method: HTTP_DELETE
|
195
|
+
}, settings));
|
196
|
+
});
|
197
|
+
},
|
198
|
+
getDocumentInfo: function(clientID, instanceID, documentID, settings) {
|
199
|
+
validateClientID(clientID);
|
200
|
+
const endPoint = `${baseUrl}/clients/${clientID}/instances/${instanceID}/documents/${documentID}/info`;
|
201
|
+
return login().then(function(authorizationToken) {
|
202
|
+
return _ajax(endPoint, __spreadValues({
|
203
|
+
headers: getHeaders(authorizationToken),
|
204
|
+
method: HTTP_GET,
|
205
|
+
dataType: "json"
|
206
|
+
}, settings));
|
207
|
+
});
|
208
|
+
},
|
209
|
+
// eslint-disable-next-line max-params
|
210
|
+
getPage: function(clientID, instanceID, documentID, pageNumber, settings) {
|
211
|
+
validateClientID(clientID);
|
212
|
+
const endPoint = `${baseUrl}/clients/${clientID}/instances/${instanceID}/documents/${documentID}/pages/${pageNumber}`;
|
213
|
+
return login().then(function(authorizationToken) {
|
214
|
+
return _ajax(endPoint, __spreadValues({
|
215
|
+
headers: getHeaders(authorizationToken),
|
216
|
+
method: HTTP_GET,
|
217
|
+
dataType: "json"
|
218
|
+
}, settings));
|
219
|
+
});
|
220
|
+
},
|
221
|
+
get: function(url) {
|
222
|
+
return _ajax(url, {
|
223
|
+
method: HTTP_GET
|
224
|
+
});
|
225
|
+
},
|
226
|
+
formatDocumentUrl: function(clientID, instanceID, documentID, queryString) {
|
227
|
+
var url = `${baseUrl}/clients/${clientID}/instances/${instanceID}/documents/${documentID}`;
|
228
|
+
if (queryString) {
|
229
|
+
url += "?" + queryString;
|
230
|
+
}
|
231
|
+
return url;
|
232
|
+
},
|
233
|
+
getDocumentFormats: function(settings) {
|
234
|
+
const endPoint = `${baseUrl}/formats`;
|
235
|
+
return login().then(function(authorizationToken) {
|
236
|
+
return _ajax(endPoint, __spreadValues({
|
237
|
+
headers: getHeaders(authorizationToken),
|
238
|
+
method: HTTP_GET,
|
239
|
+
dataType: "json"
|
240
|
+
}, settings));
|
241
|
+
});
|
242
|
+
},
|
243
|
+
getServiceVersion: function(settings) {
|
244
|
+
const endPoint = `${baseUrl}/version`;
|
245
|
+
return login().then(function(authorizationToken) {
|
246
|
+
return _ajax(endPoint, __spreadValues({
|
247
|
+
headers: getHeaders(authorizationToken),
|
248
|
+
method: HTTP_GET,
|
249
|
+
dataType: "json"
|
250
|
+
}, settings));
|
251
|
+
});
|
252
|
+
},
|
253
|
+
// eslint-disable-next-line max-params
|
254
|
+
getResource: function(clientID, instanceID, documentID, resourceID, settings) {
|
255
|
+
validateClientID(clientID);
|
256
|
+
const endPoint = `${baseUrl}/clients/${clientID}/instances/${instanceID}/documents/${documentID}/resources/${resourceID}`;
|
257
|
+
return login().then(function(authorizationToken) {
|
258
|
+
return _ajax(endPoint, __spreadValues({
|
259
|
+
headers: getHeaders(authorizationToken),
|
260
|
+
method: HTTP_GET,
|
261
|
+
dataType: (settings == null ? void 0 : settings.dataType) || "json"
|
262
|
+
}, settings));
|
263
|
+
});
|
264
|
+
},
|
265
|
+
// eslint-disable-next-line max-params
|
266
|
+
getSearchResults: function(clientID, instanceID, documentID, searchToken, matchCase, matchWholeWord, useRegex, settings) {
|
267
|
+
validateClientID(clientID);
|
268
|
+
const endPoint = `${baseUrl}/clients/${clientID}/instances/${instanceID}/documents/${documentID}/search`;
|
269
|
+
return login().then(function(authorizationToken) {
|
270
|
+
return _ajax(endPoint, __spreadValues({
|
271
|
+
headers: getHeaders(authorizationToken),
|
272
|
+
method: HTTP_POST,
|
273
|
+
contentType: JSON_CONTENT_TYPE,
|
274
|
+
dataType: "json",
|
275
|
+
data: JSON.stringify({
|
276
|
+
searchToken,
|
277
|
+
matchCase,
|
278
|
+
matchWholeWord,
|
279
|
+
useRegularExpressions: useRegex
|
280
|
+
})
|
281
|
+
}, settings));
|
282
|
+
});
|
283
|
+
},
|
284
|
+
setAccessToken: function(accessToken) {
|
285
|
+
loginPromise = Promise.resolve(accessToken);
|
286
|
+
},
|
287
|
+
login,
|
288
|
+
keepClientAlive: function(clientID, settings) {
|
289
|
+
const endPoint = `${baseUrl}/clients/keepAlive/${clientID}`;
|
290
|
+
return login().then(function(authorizationToken) {
|
291
|
+
return _ajax(endPoint, __spreadValues({
|
292
|
+
headers: getHeaders(authorizationToken),
|
293
|
+
method: HTTP_POST
|
294
|
+
}, settings));
|
295
|
+
});
|
296
|
+
},
|
297
|
+
getClientsSessionTimeoutSeconds: function(settings) {
|
298
|
+
const endPoint = `${baseUrl}/clients/sessionTimeout`;
|
299
|
+
return login().then(function(authorizationToken) {
|
300
|
+
return _ajax(endPoint, __spreadValues({
|
301
|
+
headers: getHeaders(authorizationToken),
|
302
|
+
method: HTTP_GET
|
303
|
+
}, settings));
|
304
|
+
}).then(function(sessionTimeoutData) {
|
305
|
+
return sessionTimeoutData.clientSessionTimeout;
|
306
|
+
});
|
307
|
+
}
|
308
|
+
};
|
309
|
+
}
|
310
|
+
|
311
|
+
exports.ServiceClient = ServiceClient;
|
@@ -0,0 +1,216 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var utils = require('./utils.js');
|
6
|
+
var stringResources = require('./stringResources.js');
|
7
|
+
|
8
|
+
function SideMenu(dom, rootOptions, otherOptions) {
|
9
|
+
var options = $.extend({}, rootOptions, otherOptions);
|
10
|
+
var menu = $(dom).data("kendoMenu");
|
11
|
+
var enableAccessibility = options.enableAccessibility;
|
12
|
+
var DEFAULT_TABINDEX = 3;
|
13
|
+
var panelBar;
|
14
|
+
var sideMenuVisible = false;
|
15
|
+
var controller = options.controller;
|
16
|
+
if (!controller) {
|
17
|
+
throw "No controller (telerikReporting.ReportViewerController) has been specified.";
|
18
|
+
}
|
19
|
+
if (!menu) {
|
20
|
+
init(dom);
|
21
|
+
}
|
22
|
+
function init(root) {
|
23
|
+
var $root = $(root);
|
24
|
+
try {
|
25
|
+
panelBar = $root.children("ul").kendoPanelBar().data("kendoPanelBar");
|
26
|
+
} catch (e) {
|
27
|
+
console.error("Instantiation of Kendo PanelBar as side menu threw an exception", e);
|
28
|
+
throw e;
|
29
|
+
}
|
30
|
+
panelBar.bind("expand", onSubmenuOpen);
|
31
|
+
panelBar.element.off("keydown", onPanelKeyDown);
|
32
|
+
panelBar.element.on("keydown", onPanelKeyDown);
|
33
|
+
setTabIndexes($root);
|
34
|
+
enableCloseOnClick($root);
|
35
|
+
$root.click(function(e) {
|
36
|
+
if (e.target == root) {
|
37
|
+
controller.setSideMenuVisible({ visible: !sideMenuVisible });
|
38
|
+
}
|
39
|
+
});
|
40
|
+
replaceStringResources();
|
41
|
+
}
|
42
|
+
controller.setSideMenuVisible(function(event, args) {
|
43
|
+
setSideMenuVisibility();
|
44
|
+
if (enableAccessibility) {
|
45
|
+
panelBar.element.focus();
|
46
|
+
}
|
47
|
+
sideMenuVisible = args.visible;
|
48
|
+
if (!sideMenuVisible) {
|
49
|
+
panelBar.collapse($("#trv-side-menu-export-command"));
|
50
|
+
}
|
51
|
+
}).getSideMenuVisible(function(event, args) {
|
52
|
+
args.visible = sideMenuVisible;
|
53
|
+
});
|
54
|
+
function setSideMenuVisibility() {
|
55
|
+
var $root = panelBar.element.parent();
|
56
|
+
var hidden = $root.position().left < 0 || !$root.is(":visible");
|
57
|
+
if (hidden) {
|
58
|
+
$root.show();
|
59
|
+
} else {
|
60
|
+
window.setTimeout(function() {
|
61
|
+
$root.hide();
|
62
|
+
}, 500);
|
63
|
+
}
|
64
|
+
}
|
65
|
+
function onSubmenuOpen(e) {
|
66
|
+
var $item = $(e.item);
|
67
|
+
panelBar.unbind("expand", onSubmenuOpen);
|
68
|
+
panelBar.append({ text: stringResources.stringResources.loadingFormats, spriteCssClass: "k-icon k-loading" }, $item);
|
69
|
+
options.controller.getDocumentFormats().then(fillFormats).then(function() {
|
70
|
+
panelBar.expand($item);
|
71
|
+
}).then(function() {
|
72
|
+
panelBar.bind("expand", onSubmenuOpen);
|
73
|
+
});
|
74
|
+
}
|
75
|
+
function fillFormats(formats) {
|
76
|
+
Array.from($(dom).find("ul[data-command-list=export-format-list]")).forEach((list) => {
|
77
|
+
var $list = $(list);
|
78
|
+
var $parent = $list.parents("li");
|
79
|
+
var tabIndex = $parent.attr("tabindex");
|
80
|
+
if (!tabIndex) {
|
81
|
+
tabIndex = DEFAULT_TABINDEX;
|
82
|
+
}
|
83
|
+
$list.empty();
|
84
|
+
Array.from(formats).forEach((format) => {
|
85
|
+
var ariaLabel = enableAccessibility ? utils.stringFormat('aria-label="{localizedName}" ', format) : " ";
|
86
|
+
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);
|
87
|
+
panelBar.append(li, $parent);
|
88
|
+
});
|
89
|
+
setListItemsTabIndex($parent.find("li"), tabIndex);
|
90
|
+
enableCloseOnClick($parent);
|
91
|
+
});
|
92
|
+
}
|
93
|
+
function enableCloseOnClick(root) {
|
94
|
+
Array.from(root.find("li")).forEach((listItem) => {
|
95
|
+
var isLeaf = $(listItem).children("ul").length === 0;
|
96
|
+
if (isLeaf) {
|
97
|
+
$(listItem).children("a").on("click", (event) => {
|
98
|
+
controller.setSideMenuVisible({ visible: !sideMenuVisible });
|
99
|
+
});
|
100
|
+
}
|
101
|
+
});
|
102
|
+
}
|
103
|
+
function setTabIndexes(root) {
|
104
|
+
if (!root) {
|
105
|
+
return;
|
106
|
+
}
|
107
|
+
var $list = root.children("ul");
|
108
|
+
var parentTabIndex = root.attr("tabindex");
|
109
|
+
var listIndex = parentTabIndex ? parentTabIndex : DEFAULT_TABINDEX;
|
110
|
+
setListItemsTabIndex($list, listIndex);
|
111
|
+
}
|
112
|
+
function setListItemsTabIndex(list, tabIndex) {
|
113
|
+
list.attr("tabindex", tabIndex);
|
114
|
+
var items = list.find("li");
|
115
|
+
Array.from(items).forEach((item) => {
|
116
|
+
var $item = $(item);
|
117
|
+
$item.attr("tabindex", tabIndex);
|
118
|
+
var anchor = $item.children("a");
|
119
|
+
if (anchor.length > 0) {
|
120
|
+
var $anchor = $(anchor);
|
121
|
+
$anchor.attr("tabindex", -1);
|
122
|
+
}
|
123
|
+
$item.on("focus", (event) => {
|
124
|
+
var anchor2 = $item.children("a");
|
125
|
+
if (anchor2.length > 0) {
|
126
|
+
anchor2.addClass("k-focus");
|
127
|
+
}
|
128
|
+
});
|
129
|
+
$item.on("blur", (event) => {
|
130
|
+
var anchor2 = $item.children("a");
|
131
|
+
if (anchor2.length > 0) {
|
132
|
+
anchor2.removeClass("k-focus");
|
133
|
+
}
|
134
|
+
});
|
135
|
+
$item.off("keydown", onItemKeyDown);
|
136
|
+
$item.on("keydown", onItemKeyDown);
|
137
|
+
});
|
138
|
+
}
|
139
|
+
function onPanelKeyDown(e) {
|
140
|
+
if (e.which == kendo.keys.ENTER) {
|
141
|
+
var $item;
|
142
|
+
var isSelectedFocusedItem = false;
|
143
|
+
var focusedItem = document.activeElement;
|
144
|
+
if (focusedItem && focusedItem.localName == "li") {
|
145
|
+
var items = panelBar.element.find("li.k-item");
|
146
|
+
for (var i = 0; i < items.length; i++) {
|
147
|
+
var listItem = items[i];
|
148
|
+
if (focusedItem === listItem) {
|
149
|
+
$item = $(listItem);
|
150
|
+
isSelectedFocusedItem = true;
|
151
|
+
break;
|
152
|
+
}
|
153
|
+
}
|
154
|
+
} else {
|
155
|
+
$item = panelBar.select();
|
156
|
+
}
|
157
|
+
if (!$item || !$item.length > 0) {
|
158
|
+
return;
|
159
|
+
}
|
160
|
+
handleItemSelect($item, isSelectedFocusedItem);
|
161
|
+
}
|
162
|
+
}
|
163
|
+
function onItemKeyDown(e) {
|
164
|
+
if (e.which == kendo.keys.ENTER) {
|
165
|
+
handleItemSelect($(e.target), false);
|
166
|
+
}
|
167
|
+
}
|
168
|
+
function handleItemSelect(item, handleExpandCollapse) {
|
169
|
+
if (!item.length > 0) {
|
170
|
+
return;
|
171
|
+
}
|
172
|
+
var isLeaf = item.children("ul").length === 0;
|
173
|
+
if (!isLeaf) {
|
174
|
+
if (handleExpandCollapse) {
|
175
|
+
if (item.hasClass("k-active")) {
|
176
|
+
panelBar.collapse(item);
|
177
|
+
} else {
|
178
|
+
panelBar.expand(item);
|
179
|
+
}
|
180
|
+
}
|
181
|
+
} else {
|
182
|
+
var $anchor = item.find("a");
|
183
|
+
if ($anchor.length > 0) {
|
184
|
+
$anchor[0].click();
|
185
|
+
}
|
186
|
+
}
|
187
|
+
}
|
188
|
+
function replaceStringResources() {
|
189
|
+
var menuAreas = findMenuArea();
|
190
|
+
if (!menuAreas) {
|
191
|
+
return;
|
192
|
+
}
|
193
|
+
Array.from(menuAreas).forEach((menu2) => {
|
194
|
+
var $menu = $(menu2);
|
195
|
+
var menuItems = $menu.children("li.k-panelbar-header");
|
196
|
+
$menu.attr("aria-label", stringResources.stringResources[$menu.attr("aria-label")]);
|
197
|
+
Array.from(menuItems).forEach((menuItem) => {
|
198
|
+
var $menuItem = $(menuItem);
|
199
|
+
var $a = $menuItem.find("a");
|
200
|
+
$menuItem.attr("aria-label", stringResources.stringResources[$menuItem.attr("aria-label")]);
|
201
|
+
if ($a) {
|
202
|
+
var $span = $a.find("span:not(.k-icon)");
|
203
|
+
$a.attr("title", stringResources.stringResources[$a.attr("title")]);
|
204
|
+
if ($span) {
|
205
|
+
$span.text(stringResources.stringResources[$span.text()]);
|
206
|
+
}
|
207
|
+
}
|
208
|
+
});
|
209
|
+
});
|
210
|
+
}
|
211
|
+
function findMenuArea() {
|
212
|
+
return $("div[data-role=telerik_ReportViewer_SideMenu] > ul");
|
213
|
+
}
|
214
|
+
}
|
215
|
+
|
216
|
+
exports.SideMenu = SideMenu;
|
package/dist/cjs/sr.js
ADDED
@@ -0,0 +1,164 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var _a;
|
4
|
+
var sr = {
|
5
|
+
// warning and error string resources
|
6
|
+
controllerNotInitialized: "Controller is not initialized.",
|
7
|
+
noReportInstance: "No report instance.",
|
8
|
+
missingTemplate: "!obsolete resource!",
|
9
|
+
noReport: "No report.",
|
10
|
+
noReportDocument: "No report document.",
|
11
|
+
missingOrInvalidParameter: "There are missing or invalid parameter values. Please input valid data for the following parameters:\n",
|
12
|
+
invalidParameter: "Please input a valid value.",
|
13
|
+
invalidDateTimeValue: "Please input a valid date.",
|
14
|
+
parameterIsEmpty: "Parameter value cannot be empty.",
|
15
|
+
cannotValidateType: "Cannot validate parameter of type {type}.",
|
16
|
+
loadingFormats: "Loading...",
|
17
|
+
loadingReport: "Loading report...",
|
18
|
+
preparingDownload: "Preparing document to download. Please wait...",
|
19
|
+
preparingPrint: "Preparing document to print. Please wait...",
|
20
|
+
errorLoadingTemplates: "Error loading the report viewer's templates. (templateUrl = '{0}').",
|
21
|
+
errorServiceUrl: "Cannot access the Reporting REST service. (serviceUrl = '{0}'). Make sure the service address is correct and enable CORS if needed. (https://enable-cors.org)",
|
22
|
+
errorServiceVersion: "The version of the Report Viewer '{1}' does not match the version of the Reporting REST Service '{0}'. Please make sure both are running same version.",
|
23
|
+
loadingReportPagesInProgress: "{0} pages loaded so far...",
|
24
|
+
loadedReportPagesComplete: "Done. Total {0} pages loaded.",
|
25
|
+
noPageToDisplay: "No page to display.",
|
26
|
+
errorDeletingReportInstance: "Error deleting report instance: '{0}'.",
|
27
|
+
errorRegisteringViewer: "Error registering the viewer with the service.",
|
28
|
+
noServiceClient: "No serviceClient has been specified for this controller.",
|
29
|
+
errorRegisteringClientInstance: "Error registering client instance.",
|
30
|
+
errorCreatingReportInstance: "Error creating report instance (Report = '{0}').",
|
31
|
+
errorCreatingReportDocument: "Error creating report document (Report = '{0}'; Format = '{1}').",
|
32
|
+
unableToGetReportParameters: "Unable to get report parameters.",
|
33
|
+
errorObtainingAuthenticationToken: "Error obtaining authentication token.",
|
34
|
+
clientExpired: "Click 'Refresh' to restore client session.",
|
35
|
+
promisesChainStopError: "Error shown. Throwing promises chain stop error.",
|
36
|
+
renderingCanceled: "Report processing was canceled.",
|
37
|
+
tryReportPreview: "The report may now be previewed.",
|
38
|
+
// viewer template string resources
|
39
|
+
parameterEditorSelectNone: "clear selection",
|
40
|
+
parameterEditorSelectAll: "select all",
|
41
|
+
parametersAreaPreviewButton: "Preview",
|
42
|
+
menuNavigateBackwardText: "Navigate Backward",
|
43
|
+
menuNavigateBackwardTitle: "Navigate Backward",
|
44
|
+
menuNavigateForwardText: "Navigate Forward",
|
45
|
+
menuNavigateForwardTitle: "Navigate Forward",
|
46
|
+
menuStopRenderingText: "Stop Rendering",
|
47
|
+
menuStopRenderingTitle: "Stop Rendering",
|
48
|
+
menuRefreshText: "Refresh",
|
49
|
+
menuRefreshTitle: "Refresh",
|
50
|
+
menuFirstPageText: "First Page",
|
51
|
+
menuFirstPageTitle: "First Page",
|
52
|
+
menuLastPageText: "Last Page",
|
53
|
+
menuLastPageTitle: "Last Page",
|
54
|
+
menuPreviousPageTitle: "Previous Page",
|
55
|
+
menuNextPageTitle: "Next Page",
|
56
|
+
menuPageNumberTitle: "Page Number Selector",
|
57
|
+
menuDocumentMapTitle: "Toggle Document Map",
|
58
|
+
menuParametersAreaTitle: "Toggle Parameters Area",
|
59
|
+
menuZoomInTitle: "Zoom In",
|
60
|
+
menuZoomOutTitle: "Zoom Out",
|
61
|
+
menuPageStateTitle: "Toggle FullPage/PageWidth",
|
62
|
+
menuPrintText: "Print...",
|
63
|
+
menuContinuousScrollText: "Toggle Continuous Scrolling",
|
64
|
+
menuSendMailText: "Send an email",
|
65
|
+
menuPrintTitle: "Print",
|
66
|
+
menuContinuousScrollTitle: "Toggle Continuous Scrolling",
|
67
|
+
menuSendMailTitle: "Send an email",
|
68
|
+
menuExportText: "Export",
|
69
|
+
menuExportTitle: "Export",
|
70
|
+
menuPrintPreviewText: "Toggle Print Preview",
|
71
|
+
menuPrintPreviewTitle: "Toggle Print Preview",
|
72
|
+
menuSearchText: "Search",
|
73
|
+
menuSearchTitle: "Toggle Search",
|
74
|
+
menuSideMenuTitle: "Toggle Side Menu",
|
75
|
+
sendEmailFromLabel: "From:",
|
76
|
+
sendEmailToLabel: "To:",
|
77
|
+
sendEmailCCLabel: "CC:",
|
78
|
+
sendEmailSubjectLabel: "Subject:",
|
79
|
+
sendEmailFormatLabel: "Format:",
|
80
|
+
sendEmailSendLabel: "Send",
|
81
|
+
sendEmailCancelLabel: "Cancel",
|
82
|
+
// accessibility string resources
|
83
|
+
ariaLabelPageNumberSelector: "Page number selector. Showing page {0} of {1}.",
|
84
|
+
ariaLabelPageNumberEditor: "Page number editor",
|
85
|
+
ariaLabelExpandable: "Expandable",
|
86
|
+
ariaLabelSelected: "Selected",
|
87
|
+
ariaLabelParameter: "parameter",
|
88
|
+
ariaLabelErrorMessage: "Error message",
|
89
|
+
ariaLabelParameterInfo: "Contains {0} options",
|
90
|
+
ariaLabelMultiSelect: "Multiselect",
|
91
|
+
ariaLabelMultiValue: "Multivalue",
|
92
|
+
ariaLabelSingleValue: "Single value",
|
93
|
+
ariaLabelParameterDateTime: "DateTime",
|
94
|
+
ariaLabelParameterString: "String",
|
95
|
+
ariaLabelParameterNumerical: "Numerical",
|
96
|
+
ariaLabelParameterBoolean: "Boolean",
|
97
|
+
ariaLabelParametersAreaPreviewButton: "Preview the report",
|
98
|
+
ariaLabelMainMenu: "Main menu",
|
99
|
+
ariaLabelCompactMenu: "Compact menu",
|
100
|
+
ariaLabelSideMenu: "Side menu",
|
101
|
+
ariaLabelDocumentMap: "Document map area",
|
102
|
+
ariaLabelDocumentMapSplitter: "Document map area splitbar.",
|
103
|
+
ariaLabelParametersAreaSplitter: "Parameters area splitbar.",
|
104
|
+
ariaLabelPagesArea: "Report contents area",
|
105
|
+
ariaLabelSearchDialogArea: "Search area",
|
106
|
+
ariaLabelSendEmailDialogArea: "Send email area",
|
107
|
+
ariaLabelSearchDialogStop: "Stop search",
|
108
|
+
ariaLabelSearchDialogOptions: "Search options",
|
109
|
+
ariaLabelSearchDialogNavigateUp: "Navigate up",
|
110
|
+
ariaLabelSearchDialogNavigateDown: "Navigate down",
|
111
|
+
ariaLabelSearchDialogMatchCase: "Match case",
|
112
|
+
ariaLabelSearchDialogMatchWholeWord: "Match whole word",
|
113
|
+
ariaLabelSearchDialogUseRegex: "Use regex",
|
114
|
+
ariaLabelMenuNavigateBackward: "Navigate backward",
|
115
|
+
ariaLabelMenuNavigateForward: "Navigate forward",
|
116
|
+
ariaLabelMenuStopRendering: "Stop rendering",
|
117
|
+
ariaLabelMenuRefresh: "Refresh",
|
118
|
+
ariaLabelMenuFirstPage: "First page",
|
119
|
+
ariaLabelMenuLastPage: "Last page",
|
120
|
+
ariaLabelMenuPreviousPage: "Previous page",
|
121
|
+
ariaLabelMenuNextPage: "Next page",
|
122
|
+
ariaLabelMenuPageNumber: "Page number selector",
|
123
|
+
ariaLabelMenuDocumentMap: "Toggle document map",
|
124
|
+
ariaLabelMenuParametersArea: "Toggle parameters area",
|
125
|
+
ariaLabelMenuZoomIn: "Zoom in",
|
126
|
+
ariaLabelMenuZoomOut: "Zoom out",
|
127
|
+
ariaLabelMenuPageState: "Toggle FullPage/PageWidth",
|
128
|
+
ariaLabelMenuPrint: "Print",
|
129
|
+
ariaLabelMenuContinuousScroll: "Continuous scrolling",
|
130
|
+
ariaLabelMenuSendMail: "Send an email",
|
131
|
+
ariaLabelMenuExport: "Export",
|
132
|
+
ariaLabelMenuPrintPreview: "Toggle print preview",
|
133
|
+
ariaLabelMenuSearch: "Search in report contents",
|
134
|
+
ariaLabelMenuSideMenu: "Toggle side menu",
|
135
|
+
ariaLabelSendEmailFrom: "From email address",
|
136
|
+
ariaLabelSendEmailTo: "Recipient email address",
|
137
|
+
ariaLabelSendEmailCC: "Carbon Copy email address",
|
138
|
+
ariaLabelSendEmailSubject: "Email subject:",
|
139
|
+
ariaLabelSendEmailFormat: "Report format:",
|
140
|
+
ariaLabelSendEmailSend: "Send email",
|
141
|
+
ariaLabelSendEmailCancel: "Cancel sending email",
|
142
|
+
// search dialog resources
|
143
|
+
searchDialogTitle: "Search in report contents",
|
144
|
+
searchDialogSearchInProgress: "searching...",
|
145
|
+
searchDialogNoResultsLabel: "No results",
|
146
|
+
searchDialogResultsFormatLabel: "Result {0} of {1}",
|
147
|
+
searchDialogStopTitle: "Stop Search",
|
148
|
+
searchDialogNavigateUpTitle: "Navigate Up",
|
149
|
+
searchDialogNavigateDownTitle: "Navigate Down",
|
150
|
+
searchDialogMatchCaseTitle: "Match Case",
|
151
|
+
searchDialogMatchWholeWordTitle: "Match Whole Word",
|
152
|
+
searchDialogUseRegexTitle: "Use Regex",
|
153
|
+
searchDialogCaptionText: "Find",
|
154
|
+
searchDialogPageText: "page",
|
155
|
+
// Send Email dialog resources
|
156
|
+
sendEmailDialogTitle: "Send Email",
|
157
|
+
sendEmailValidationEmailRequired: "Email field is required",
|
158
|
+
sendEmailValidationEmailFormat: "Email format is not valid",
|
159
|
+
sendEmailValidationSingleEmail: "The field accepts a single email address only",
|
160
|
+
sendEmailValidationFormatRequired: "Format field is required",
|
161
|
+
errorSendingDocument: "Error sending report document (Report = '{0}')."
|
162
|
+
};
|
163
|
+
window.telerikReportViewer || (window.telerikReportViewer = {});
|
164
|
+
(_a = window.telerikReportViewer).sr || (_a.sr = sr);
|