@progress/telerik-jquery-report-viewer 25.25.211 → 26.25.521
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 +22 -64
- package/dist/cjs/aiPrompt.js +311 -0
- package/dist/cjs/base-component.js +8 -11
- package/dist/cjs/binder.js +12 -12
- package/dist/cjs/command.js +44 -25
- package/dist/cjs/commandSet.js +78 -53
- package/dist/cjs/components/button.js +41 -0
- package/dist/cjs/components/toggle-button.js +47 -0
- package/dist/cjs/constants.js +22 -0
- package/dist/cjs/documentMapArea.js +114 -93
- package/dist/cjs/event-emitter.js +2 -8
- package/dist/cjs/history.js +13 -12
- package/dist/cjs/index.js +4 -12
- package/dist/cjs/mainMenu.js +38 -28
- package/dist/cjs/mem-storage.js +7 -13
- package/dist/cjs/notificationService.js +128 -0
- package/dist/cjs/parameterValidators.js +26 -25
- package/dist/cjs/parameters.js +180 -161
- package/dist/cjs/parametersArea.js +306 -298
- package/dist/cjs/perspectives.js +23 -27
- package/dist/cjs/report-viewer/report-viewer-settings.js +4 -10
- package/dist/cjs/reportViewer.js +441 -190
- package/dist/cjs/search.js +218 -328
- package/dist/cjs/sendEmail.js +259 -264
- package/dist/cjs/service-client-sentinel.js +1 -1
- package/dist/cjs/sideMenu.js +20 -16
- package/dist/cjs/sr.js +9 -5
- package/dist/cjs/template-cache.js +2 -2
- package/dist/cjs/toolbar/button.js +18 -0
- package/dist/cjs/toolbar/link-button.js +6 -12
- package/dist/cjs/toolbar/page-count-label.js +1 -1
- package/dist/cjs/toolbar/page-number-input.js +16 -14
- package/dist/cjs/toolbar.js +186 -0
- package/dist/cjs/touch.js +8 -8
- package/dist/cjs/uiController.js +70 -57
- package/dist/cjs/utils.js +20 -207
- package/dist/font/font-icons.css +25 -222
- package/dist/font/font-icons.min.css +3 -3
- package/dist/js/telerikReportViewer.js +8173 -9110
- package/dist/js/telerikReportViewer.kendo.js +105616 -60642
- package/dist/js/telerikReportViewer.kendo.min.js +2 -2
- package/dist/js/telerikReportViewer.min.js +1 -1
- package/dist/js/telerikReportViewer.stringResources.js +9 -5
- package/dist/styles/telerikReportViewer.css +3 -3
- package/dist/styles/telerikReportViewer.min.css +3 -3
- package/dist/templates/telerikReportViewerTemplate.html +299 -238
- package/package.json +2 -3
- package/dist/cjs/controller.js +0 -1226
- package/dist/cjs/kendo-jquery.js +0 -4
- package/dist/cjs/pagesArea.js +0 -625
- package/dist/cjs/print.js +0 -165
- package/dist/cjs/scroll.js +0 -535
- package/dist/cjs/serviceClient.js +0 -311
- package/dist/cjs/telerikReportViewer.kendo.js +0 -60196
- package/dist/cjs/telerikReportViewer.kendo.min.js +0 -19776
- package/dist/cjs/uiFreezeCoordinator.js +0 -282
- package/dist/es/accessibility.js +0 -204
- package/dist/es/base-component.js +0 -22
- package/dist/es/binder.js +0 -75
- package/dist/es/command.js +0 -28
- package/dist/es/commandSet.js +0 -163
- package/dist/es/controller.js +0 -1222
- package/dist/es/documentMapArea.js +0 -161
- package/dist/es/domUtils.js +0 -43
- package/dist/es/enums.js +0 -41
- package/dist/es/event-emitter.js +0 -127
- package/dist/es/events.js +0 -20
- package/dist/es/globalSettings.js +0 -5
- package/dist/es/history.js +0 -131
- package/dist/es/index.js +0 -25
- package/dist/es/jqueryThrottleDebounce.js +0 -46
- package/dist/es/kendo-jquery.js +0 -1
- package/dist/es/mainMenu.js +0 -319
- package/dist/es/mem-storage.js +0 -40
- package/dist/es/pagesArea.js +0 -621
- package/dist/es/parameterValidators.js +0 -160
- package/dist/es/parameters.js +0 -916
- package/dist/es/parametersArea.js +0 -493
- package/dist/es/perspectives.js +0 -134
- package/dist/es/print.js +0 -161
- package/dist/es/report-viewer/report-viewer-settings.js +0 -134
- package/dist/es/reportViewer.js +0 -666
- package/dist/es/scroll.js +0 -531
- package/dist/es/search.js +0 -580
- package/dist/es/sendEmail.js +0 -388
- package/dist/es/service-client-sentinel.js +0 -49
- package/dist/es/serviceClient.js +0 -307
- package/dist/es/sideMenu.js +0 -212
- package/dist/es/sr.js +0 -164
- package/dist/es/stringResources.js +0 -7
- package/dist/es/telerikReportViewer.kendo.js +0 -60194
- package/dist/es/telerikReportViewer.kendo.min.js +0 -19774
- package/dist/es/template-cache.js +0 -35
- package/dist/es/toolbar/link-button.js +0 -38
- package/dist/es/toolbar/page-count-label.js +0 -14
- package/dist/es/toolbar/page-number-input.js +0 -60
- package/dist/es/touch.js +0 -82
- package/dist/es/uiController.js +0 -138
- package/dist/es/uiFreezeCoordinator.js +0 -278
- package/dist/es/utils.js +0 -444
- package/dist/templates/telerikReportViewerTemplate-FA.html +0 -317
- /package/dist/font/{ReportingIcons-19.0.25.211.ttf → ReportingIcons-19.1.25.521.ttf} +0 -0
package/dist/es/serviceClient.js
DELETED
@@ -1,307 +0,0 @@
|
|
1
|
-
import { rTrim, $ajax, stringFormat } from './utils.js';
|
2
|
-
|
3
|
-
var __defProp = Object.defineProperty;
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
8
|
-
var __spreadValues = (a, b) => {
|
9
|
-
for (var prop in b || (b = {}))
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
12
|
-
if (__getOwnPropSymbols)
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
14
|
-
if (__propIsEnum.call(b, prop))
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
16
|
-
}
|
17
|
-
return a;
|
18
|
-
};
|
19
|
-
var JSON_CONTENT_TYPE = "application/json; charset=UTF-8";
|
20
|
-
var URLENCODED_CONTENT_TYPE = "application/x-www-form-urlencoded; charset=UTF-8";
|
21
|
-
var HTTP_GET = "GET";
|
22
|
-
var HTTP_POST = "POST";
|
23
|
-
var HTTP_DELETE = "DELETE";
|
24
|
-
var defaultOptions = {};
|
25
|
-
function getHeaders(authorizationToken) {
|
26
|
-
const headers = {
|
27
|
-
"Accept": "application/json, text/javascript, */*; q=0.01"
|
28
|
-
};
|
29
|
-
if (authorizationToken) {
|
30
|
-
headers["Authorization"] = "Bearer " + authorizationToken;
|
31
|
-
}
|
32
|
-
return headers;
|
33
|
-
}
|
34
|
-
function ServiceClient(options) {
|
35
|
-
options = $.extend({}, defaultOptions, options);
|
36
|
-
var baseUrl = rTrim(options.serviceUrl || options.baseUrl, "\\/");
|
37
|
-
var loginPromise;
|
38
|
-
var _ajax = $ajax;
|
39
|
-
function validateClientID(clientID) {
|
40
|
-
if (!clientID) {
|
41
|
-
throw "Invalid clientID";
|
42
|
-
}
|
43
|
-
}
|
44
|
-
function urlFromTemplate(template, args) {
|
45
|
-
args = $.extend({}, { baseUrl }, args);
|
46
|
-
return stringFormat(template, args);
|
47
|
-
}
|
48
|
-
function login() {
|
49
|
-
if (!loginPromise) {
|
50
|
-
var loginInfo = options.loginInfo;
|
51
|
-
if (loginInfo && loginInfo.url && (loginInfo.username || loginInfo.password)) {
|
52
|
-
const endPoint = loginInfo.url;
|
53
|
-
loginPromise = _ajax(endPoint, {
|
54
|
-
method: HTTP_POST,
|
55
|
-
data: {
|
56
|
-
grant_type: "password",
|
57
|
-
username: loginInfo.username,
|
58
|
-
password: loginInfo.password
|
59
|
-
},
|
60
|
-
dataType: "json",
|
61
|
-
contentType: URLENCODED_CONTENT_TYPE
|
62
|
-
}).then(function(result) {
|
63
|
-
return result.access_token;
|
64
|
-
});
|
65
|
-
} else {
|
66
|
-
loginPromise = Promise.resolve();
|
67
|
-
}
|
68
|
-
}
|
69
|
-
return loginPromise;
|
70
|
-
}
|
71
|
-
return {
|
72
|
-
_urlFromTemplate: urlFromTemplate,
|
73
|
-
registerClient: function(settings) {
|
74
|
-
const endPoint = `${baseUrl}/clients`;
|
75
|
-
return login().then(function(authorizationToken) {
|
76
|
-
return _ajax(endPoint, __spreadValues({
|
77
|
-
headers: getHeaders(authorizationToken),
|
78
|
-
method: HTTP_POST,
|
79
|
-
dataType: "json",
|
80
|
-
// Used to avoid Chrome caching functionality for simple async requests
|
81
|
-
// when the first request is not completed the second request is not send
|
82
|
-
// and the same response is used for both of the request. In this case the
|
83
|
-
// second client is not registered to the service and the same clientId is used.
|
84
|
-
data: JSON.stringify({ timeStamp: Date.now() })
|
85
|
-
}, settings));
|
86
|
-
}).then(function(clientData) {
|
87
|
-
if (clientData.Message) {
|
88
|
-
throw clientData.Message;
|
89
|
-
}
|
90
|
-
return clientData.clientId;
|
91
|
-
});
|
92
|
-
},
|
93
|
-
unregisterClient: function(clientID, settings) {
|
94
|
-
validateClientID(clientID);
|
95
|
-
const endPoint = `${baseUrl}/clients/${clientID}`;
|
96
|
-
return login().then(function(authorizationToken) {
|
97
|
-
return _ajax(endPoint, __spreadValues({
|
98
|
-
headers: getHeaders(authorizationToken),
|
99
|
-
method: HTTP_DELETE
|
100
|
-
}, settings));
|
101
|
-
});
|
102
|
-
},
|
103
|
-
getParameters: function(clientID, report, parameterValues, settings) {
|
104
|
-
validateClientID(clientID);
|
105
|
-
const endPoint = `${baseUrl}/clients/${clientID}/parameters`;
|
106
|
-
return login().then(function(authorizationToken) {
|
107
|
-
return _ajax(endPoint, __spreadValues({
|
108
|
-
headers: getHeaders(authorizationToken),
|
109
|
-
method: HTTP_POST,
|
110
|
-
contentType: JSON_CONTENT_TYPE,
|
111
|
-
dataType: "json",
|
112
|
-
data: JSON.stringify({ report, parameterValues })
|
113
|
-
}, settings));
|
114
|
-
});
|
115
|
-
},
|
116
|
-
createReportInstance: function(clientID, report, parameterValues, settings) {
|
117
|
-
validateClientID(clientID);
|
118
|
-
const endPoint = `${baseUrl}/clients/${clientID}/instances`;
|
119
|
-
return login().then(function(authorizationToken) {
|
120
|
-
return _ajax(endPoint, __spreadValues({
|
121
|
-
headers: getHeaders(authorizationToken),
|
122
|
-
method: HTTP_POST,
|
123
|
-
contentType: JSON_CONTENT_TYPE,
|
124
|
-
dataType: "json",
|
125
|
-
data: JSON.stringify({ report, parameterValues })
|
126
|
-
}, settings));
|
127
|
-
}).then(function(instanceData) {
|
128
|
-
return instanceData.instanceId;
|
129
|
-
});
|
130
|
-
},
|
131
|
-
deleteReportInstance: function(clientID, instanceID, settings) {
|
132
|
-
validateClientID(clientID);
|
133
|
-
const endPoint = `${baseUrl}/clients/${clientID}/instances/${instanceID}`;
|
134
|
-
return login().then(function(authorizationToken) {
|
135
|
-
return _ajax(endPoint, __spreadValues({
|
136
|
-
headers: getHeaders(authorizationToken),
|
137
|
-
method: HTTP_DELETE
|
138
|
-
}, settings));
|
139
|
-
});
|
140
|
-
},
|
141
|
-
// eslint-disable-next-line max-params
|
142
|
-
createReportDocument: function(clientID, instanceID, format, deviceInfo, useCache, baseDocumentID, actionID, settings) {
|
143
|
-
validateClientID(clientID);
|
144
|
-
const endPoint = `${baseUrl}/clients/${clientID}/instances/${instanceID}/documents`;
|
145
|
-
return login().then(function(authorizationToken) {
|
146
|
-
deviceInfo = deviceInfo || {};
|
147
|
-
deviceInfo["BasePath"] = baseUrl;
|
148
|
-
return _ajax(endPoint, __spreadValues({
|
149
|
-
headers: getHeaders(authorizationToken),
|
150
|
-
method: HTTP_POST,
|
151
|
-
contentType: JSON_CONTENT_TYPE,
|
152
|
-
dataType: "json",
|
153
|
-
data: JSON.stringify({
|
154
|
-
format,
|
155
|
-
deviceInfo,
|
156
|
-
useCache,
|
157
|
-
baseDocumentID,
|
158
|
-
actionID
|
159
|
-
})
|
160
|
-
}, settings));
|
161
|
-
}).then(function(documentData) {
|
162
|
-
return documentData.documentId;
|
163
|
-
});
|
164
|
-
},
|
165
|
-
// eslint-disable-next-line max-params
|
166
|
-
sendDocument: function(clientID, instanceID, documentID, mailArgs, settings) {
|
167
|
-
validateClientID(clientID);
|
168
|
-
const endPoint = `${baseUrl}/clients/${clientID}/instances/${instanceID}/documents/${documentID}/send`;
|
169
|
-
return login().then(function(authorizationToken) {
|
170
|
-
return _ajax(endPoint, __spreadValues({
|
171
|
-
headers: getHeaders(authorizationToken),
|
172
|
-
method: HTTP_POST,
|
173
|
-
contentType: JSON_CONTENT_TYPE,
|
174
|
-
data: JSON.stringify({
|
175
|
-
from: mailArgs.from,
|
176
|
-
to: mailArgs.to,
|
177
|
-
cc: mailArgs.cc,
|
178
|
-
subject: mailArgs.subject,
|
179
|
-
body: mailArgs.body
|
180
|
-
})
|
181
|
-
}, settings));
|
182
|
-
});
|
183
|
-
},
|
184
|
-
deleteReportDocument: function(clientID, instanceID, documentID, settings) {
|
185
|
-
validateClientID(clientID);
|
186
|
-
const endPoint = `${baseUrl}/clients/${clientID}/instances/${instanceID}/documents/${documentID}`;
|
187
|
-
return login().then(function(authorizationToken) {
|
188
|
-
return _ajax(endPoint, __spreadValues({
|
189
|
-
headers: getHeaders(authorizationToken),
|
190
|
-
method: HTTP_DELETE
|
191
|
-
}, settings));
|
192
|
-
});
|
193
|
-
},
|
194
|
-
getDocumentInfo: function(clientID, instanceID, documentID, settings) {
|
195
|
-
validateClientID(clientID);
|
196
|
-
const endPoint = `${baseUrl}/clients/${clientID}/instances/${instanceID}/documents/${documentID}/info`;
|
197
|
-
return login().then(function(authorizationToken) {
|
198
|
-
return _ajax(endPoint, __spreadValues({
|
199
|
-
headers: getHeaders(authorizationToken),
|
200
|
-
method: HTTP_GET,
|
201
|
-
dataType: "json"
|
202
|
-
}, settings));
|
203
|
-
});
|
204
|
-
},
|
205
|
-
// eslint-disable-next-line max-params
|
206
|
-
getPage: function(clientID, instanceID, documentID, pageNumber, settings) {
|
207
|
-
validateClientID(clientID);
|
208
|
-
const endPoint = `${baseUrl}/clients/${clientID}/instances/${instanceID}/documents/${documentID}/pages/${pageNumber}`;
|
209
|
-
return login().then(function(authorizationToken) {
|
210
|
-
return _ajax(endPoint, __spreadValues({
|
211
|
-
headers: getHeaders(authorizationToken),
|
212
|
-
method: HTTP_GET,
|
213
|
-
dataType: "json"
|
214
|
-
}, settings));
|
215
|
-
});
|
216
|
-
},
|
217
|
-
get: function(url) {
|
218
|
-
return _ajax(url, {
|
219
|
-
method: HTTP_GET
|
220
|
-
});
|
221
|
-
},
|
222
|
-
formatDocumentUrl: function(clientID, instanceID, documentID, queryString) {
|
223
|
-
var url = `${baseUrl}/clients/${clientID}/instances/${instanceID}/documents/${documentID}`;
|
224
|
-
if (queryString) {
|
225
|
-
url += "?" + queryString;
|
226
|
-
}
|
227
|
-
return url;
|
228
|
-
},
|
229
|
-
getDocumentFormats: function(settings) {
|
230
|
-
const endPoint = `${baseUrl}/formats`;
|
231
|
-
return login().then(function(authorizationToken) {
|
232
|
-
return _ajax(endPoint, __spreadValues({
|
233
|
-
headers: getHeaders(authorizationToken),
|
234
|
-
method: HTTP_GET,
|
235
|
-
dataType: "json"
|
236
|
-
}, settings));
|
237
|
-
});
|
238
|
-
},
|
239
|
-
getServiceVersion: function(settings) {
|
240
|
-
const endPoint = `${baseUrl}/version`;
|
241
|
-
return login().then(function(authorizationToken) {
|
242
|
-
return _ajax(endPoint, __spreadValues({
|
243
|
-
headers: getHeaders(authorizationToken),
|
244
|
-
method: HTTP_GET,
|
245
|
-
dataType: "json"
|
246
|
-
}, settings));
|
247
|
-
});
|
248
|
-
},
|
249
|
-
// eslint-disable-next-line max-params
|
250
|
-
getResource: function(clientID, instanceID, documentID, resourceID, settings) {
|
251
|
-
validateClientID(clientID);
|
252
|
-
const endPoint = `${baseUrl}/clients/${clientID}/instances/${instanceID}/documents/${documentID}/resources/${resourceID}`;
|
253
|
-
return login().then(function(authorizationToken) {
|
254
|
-
return _ajax(endPoint, __spreadValues({
|
255
|
-
headers: getHeaders(authorizationToken),
|
256
|
-
method: HTTP_GET,
|
257
|
-
dataType: (settings == null ? void 0 : settings.dataType) || "json"
|
258
|
-
}, settings));
|
259
|
-
});
|
260
|
-
},
|
261
|
-
// eslint-disable-next-line max-params
|
262
|
-
getSearchResults: function(clientID, instanceID, documentID, searchToken, matchCase, matchWholeWord, useRegex, settings) {
|
263
|
-
validateClientID(clientID);
|
264
|
-
const endPoint = `${baseUrl}/clients/${clientID}/instances/${instanceID}/documents/${documentID}/search`;
|
265
|
-
return login().then(function(authorizationToken) {
|
266
|
-
return _ajax(endPoint, __spreadValues({
|
267
|
-
headers: getHeaders(authorizationToken),
|
268
|
-
method: HTTP_POST,
|
269
|
-
contentType: JSON_CONTENT_TYPE,
|
270
|
-
dataType: "json",
|
271
|
-
data: JSON.stringify({
|
272
|
-
searchToken,
|
273
|
-
matchCase,
|
274
|
-
matchWholeWord,
|
275
|
-
useRegularExpressions: useRegex
|
276
|
-
})
|
277
|
-
}, settings));
|
278
|
-
});
|
279
|
-
},
|
280
|
-
setAccessToken: function(accessToken) {
|
281
|
-
loginPromise = Promise.resolve(accessToken);
|
282
|
-
},
|
283
|
-
login,
|
284
|
-
keepClientAlive: function(clientID, settings) {
|
285
|
-
const endPoint = `${baseUrl}/clients/keepAlive/${clientID}`;
|
286
|
-
return login().then(function(authorizationToken) {
|
287
|
-
return _ajax(endPoint, __spreadValues({
|
288
|
-
headers: getHeaders(authorizationToken),
|
289
|
-
method: HTTP_POST
|
290
|
-
}, settings));
|
291
|
-
});
|
292
|
-
},
|
293
|
-
getClientsSessionTimeoutSeconds: function(settings) {
|
294
|
-
const endPoint = `${baseUrl}/clients/sessionTimeout`;
|
295
|
-
return login().then(function(authorizationToken) {
|
296
|
-
return _ajax(endPoint, __spreadValues({
|
297
|
-
headers: getHeaders(authorizationToken),
|
298
|
-
method: HTTP_GET
|
299
|
-
}, settings));
|
300
|
-
}).then(function(sessionTimeoutData) {
|
301
|
-
return sessionTimeoutData.clientSessionTimeout;
|
302
|
-
});
|
303
|
-
}
|
304
|
-
};
|
305
|
-
}
|
306
|
-
|
307
|
-
export { ServiceClient };
|
package/dist/es/sideMenu.js
DELETED
@@ -1,212 +0,0 @@
|
|
1
|
-
import { stringFormat } from './utils.js';
|
2
|
-
import { stringResources } from './stringResources.js';
|
3
|
-
|
4
|
-
function SideMenu(dom, rootOptions, otherOptions) {
|
5
|
-
var options = $.extend({}, rootOptions, otherOptions);
|
6
|
-
var menu = $(dom).data("kendoMenu");
|
7
|
-
var enableAccessibility = options.enableAccessibility;
|
8
|
-
var DEFAULT_TABINDEX = 3;
|
9
|
-
var panelBar;
|
10
|
-
var sideMenuVisible = false;
|
11
|
-
var controller = options.controller;
|
12
|
-
if (!controller) {
|
13
|
-
throw "No controller (telerikReporting.ReportViewerController) has been specified.";
|
14
|
-
}
|
15
|
-
if (!menu) {
|
16
|
-
init(dom);
|
17
|
-
}
|
18
|
-
function init(root) {
|
19
|
-
var $root = $(root);
|
20
|
-
try {
|
21
|
-
panelBar = $root.children("ul").kendoPanelBar().data("kendoPanelBar");
|
22
|
-
} catch (e) {
|
23
|
-
console.error("Instantiation of Kendo PanelBar as side menu threw an exception", e);
|
24
|
-
throw e;
|
25
|
-
}
|
26
|
-
panelBar.bind("expand", onSubmenuOpen);
|
27
|
-
panelBar.element.off("keydown", onPanelKeyDown);
|
28
|
-
panelBar.element.on("keydown", onPanelKeyDown);
|
29
|
-
setTabIndexes($root);
|
30
|
-
enableCloseOnClick($root);
|
31
|
-
$root.click(function(e) {
|
32
|
-
if (e.target == root) {
|
33
|
-
controller.setSideMenuVisible({ visible: !sideMenuVisible });
|
34
|
-
}
|
35
|
-
});
|
36
|
-
replaceStringResources();
|
37
|
-
}
|
38
|
-
controller.setSideMenuVisible(function(event, args) {
|
39
|
-
setSideMenuVisibility();
|
40
|
-
if (enableAccessibility) {
|
41
|
-
panelBar.element.focus();
|
42
|
-
}
|
43
|
-
sideMenuVisible = args.visible;
|
44
|
-
if (!sideMenuVisible) {
|
45
|
-
panelBar.collapse($("#trv-side-menu-export-command"));
|
46
|
-
}
|
47
|
-
}).getSideMenuVisible(function(event, args) {
|
48
|
-
args.visible = sideMenuVisible;
|
49
|
-
});
|
50
|
-
function setSideMenuVisibility() {
|
51
|
-
var $root = panelBar.element.parent();
|
52
|
-
var hidden = $root.position().left < 0 || !$root.is(":visible");
|
53
|
-
if (hidden) {
|
54
|
-
$root.show();
|
55
|
-
} else {
|
56
|
-
window.setTimeout(function() {
|
57
|
-
$root.hide();
|
58
|
-
}, 500);
|
59
|
-
}
|
60
|
-
}
|
61
|
-
function onSubmenuOpen(e) {
|
62
|
-
var $item = $(e.item);
|
63
|
-
panelBar.unbind("expand", onSubmenuOpen);
|
64
|
-
panelBar.append({ text: stringResources.loadingFormats, spriteCssClass: "k-icon k-loading" }, $item);
|
65
|
-
options.controller.getDocumentFormats().then(fillFormats).then(function() {
|
66
|
-
panelBar.expand($item);
|
67
|
-
}).then(function() {
|
68
|
-
panelBar.bind("expand", onSubmenuOpen);
|
69
|
-
});
|
70
|
-
}
|
71
|
-
function fillFormats(formats) {
|
72
|
-
Array.from($(dom).find("ul[data-command-list=export-format-list]")).forEach((list) => {
|
73
|
-
var $list = $(list);
|
74
|
-
var $parent = $list.parents("li");
|
75
|
-
var tabIndex = $parent.attr("tabindex");
|
76
|
-
if (!tabIndex) {
|
77
|
-
tabIndex = DEFAULT_TABINDEX;
|
78
|
-
}
|
79
|
-
$list.empty();
|
80
|
-
Array.from(formats).forEach((format) => {
|
81
|
-
var ariaLabel = enableAccessibility ? stringFormat('aria-label="{localizedName}" ', format) : " ";
|
82
|
-
var li = "<li " + ariaLabel + stringFormat('tabindex="' + tabIndex + '"><a tabindex="-1" href="#" data-command="telerik_ReportViewer_export" data-command-parameter="{name}"><span>{localizedName}</span></a></li>', format);
|
83
|
-
panelBar.append(li, $parent);
|
84
|
-
});
|
85
|
-
setListItemsTabIndex($parent.find("li"), tabIndex);
|
86
|
-
enableCloseOnClick($parent);
|
87
|
-
});
|
88
|
-
}
|
89
|
-
function enableCloseOnClick(root) {
|
90
|
-
Array.from(root.find("li")).forEach((listItem) => {
|
91
|
-
var isLeaf = $(listItem).children("ul").length === 0;
|
92
|
-
if (isLeaf) {
|
93
|
-
$(listItem).children("a").on("click", (event) => {
|
94
|
-
controller.setSideMenuVisible({ visible: !sideMenuVisible });
|
95
|
-
});
|
96
|
-
}
|
97
|
-
});
|
98
|
-
}
|
99
|
-
function setTabIndexes(root) {
|
100
|
-
if (!root) {
|
101
|
-
return;
|
102
|
-
}
|
103
|
-
var $list = root.children("ul");
|
104
|
-
var parentTabIndex = root.attr("tabindex");
|
105
|
-
var listIndex = parentTabIndex ? parentTabIndex : DEFAULT_TABINDEX;
|
106
|
-
setListItemsTabIndex($list, listIndex);
|
107
|
-
}
|
108
|
-
function setListItemsTabIndex(list, tabIndex) {
|
109
|
-
list.attr("tabindex", tabIndex);
|
110
|
-
var items = list.find("li");
|
111
|
-
Array.from(items).forEach((item) => {
|
112
|
-
var $item = $(item);
|
113
|
-
$item.attr("tabindex", tabIndex);
|
114
|
-
var anchor = $item.children("a");
|
115
|
-
if (anchor.length > 0) {
|
116
|
-
var $anchor = $(anchor);
|
117
|
-
$anchor.attr("tabindex", -1);
|
118
|
-
}
|
119
|
-
$item.on("focus", (event) => {
|
120
|
-
var anchor2 = $item.children("a");
|
121
|
-
if (anchor2.length > 0) {
|
122
|
-
anchor2.addClass("k-focus");
|
123
|
-
}
|
124
|
-
});
|
125
|
-
$item.on("blur", (event) => {
|
126
|
-
var anchor2 = $item.children("a");
|
127
|
-
if (anchor2.length > 0) {
|
128
|
-
anchor2.removeClass("k-focus");
|
129
|
-
}
|
130
|
-
});
|
131
|
-
$item.off("keydown", onItemKeyDown);
|
132
|
-
$item.on("keydown", onItemKeyDown);
|
133
|
-
});
|
134
|
-
}
|
135
|
-
function onPanelKeyDown(e) {
|
136
|
-
if (e.which == kendo.keys.ENTER) {
|
137
|
-
var $item;
|
138
|
-
var isSelectedFocusedItem = false;
|
139
|
-
var focusedItem = document.activeElement;
|
140
|
-
if (focusedItem && focusedItem.localName == "li") {
|
141
|
-
var items = panelBar.element.find("li.k-item");
|
142
|
-
for (var i = 0; i < items.length; i++) {
|
143
|
-
var listItem = items[i];
|
144
|
-
if (focusedItem === listItem) {
|
145
|
-
$item = $(listItem);
|
146
|
-
isSelectedFocusedItem = true;
|
147
|
-
break;
|
148
|
-
}
|
149
|
-
}
|
150
|
-
} else {
|
151
|
-
$item = panelBar.select();
|
152
|
-
}
|
153
|
-
if (!$item || !$item.length > 0) {
|
154
|
-
return;
|
155
|
-
}
|
156
|
-
handleItemSelect($item, isSelectedFocusedItem);
|
157
|
-
}
|
158
|
-
}
|
159
|
-
function onItemKeyDown(e) {
|
160
|
-
if (e.which == kendo.keys.ENTER) {
|
161
|
-
handleItemSelect($(e.target), false);
|
162
|
-
}
|
163
|
-
}
|
164
|
-
function handleItemSelect(item, handleExpandCollapse) {
|
165
|
-
if (!item.length > 0) {
|
166
|
-
return;
|
167
|
-
}
|
168
|
-
var isLeaf = item.children("ul").length === 0;
|
169
|
-
if (!isLeaf) {
|
170
|
-
if (handleExpandCollapse) {
|
171
|
-
if (item.hasClass("k-active")) {
|
172
|
-
panelBar.collapse(item);
|
173
|
-
} else {
|
174
|
-
panelBar.expand(item);
|
175
|
-
}
|
176
|
-
}
|
177
|
-
} else {
|
178
|
-
var $anchor = item.find("a");
|
179
|
-
if ($anchor.length > 0) {
|
180
|
-
$anchor[0].click();
|
181
|
-
}
|
182
|
-
}
|
183
|
-
}
|
184
|
-
function replaceStringResources() {
|
185
|
-
var menuAreas = findMenuArea();
|
186
|
-
if (!menuAreas) {
|
187
|
-
return;
|
188
|
-
}
|
189
|
-
Array.from(menuAreas).forEach((menu2) => {
|
190
|
-
var $menu = $(menu2);
|
191
|
-
var menuItems = $menu.children("li.k-panelbar-header");
|
192
|
-
$menu.attr("aria-label", stringResources[$menu.attr("aria-label")]);
|
193
|
-
Array.from(menuItems).forEach((menuItem) => {
|
194
|
-
var $menuItem = $(menuItem);
|
195
|
-
var $a = $menuItem.find("a");
|
196
|
-
$menuItem.attr("aria-label", stringResources[$menuItem.attr("aria-label")]);
|
197
|
-
if ($a) {
|
198
|
-
var $span = $a.find("span:not(.k-icon)");
|
199
|
-
$a.attr("title", stringResources[$a.attr("title")]);
|
200
|
-
if ($span) {
|
201
|
-
$span.text(stringResources[$span.text()]);
|
202
|
-
}
|
203
|
-
}
|
204
|
-
});
|
205
|
-
});
|
206
|
-
}
|
207
|
-
function findMenuArea() {
|
208
|
-
return $("div[data-role=telerik_ReportViewer_SideMenu] > ul");
|
209
|
-
}
|
210
|
-
}
|
211
|
-
|
212
|
-
export { SideMenu };
|
package/dist/es/sr.js
DELETED
@@ -1,164 +0,0 @@
|
|
1
|
-
var _a;
|
2
|
-
var sr = {
|
3
|
-
// warning and error string resources
|
4
|
-
controllerNotInitialized: "Controller is not initialized.",
|
5
|
-
noReportInstance: "No report instance.",
|
6
|
-
missingTemplate: "!obsolete resource!",
|
7
|
-
noReport: "No report.",
|
8
|
-
noReportDocument: "No report document.",
|
9
|
-
missingOrInvalidParameter: "There are missing or invalid parameter values. Please input valid data for the following parameters:\n",
|
10
|
-
invalidParameter: "Please input a valid value.",
|
11
|
-
invalidDateTimeValue: "Please input a valid date.",
|
12
|
-
parameterIsEmpty: "Parameter value cannot be empty.",
|
13
|
-
cannotValidateType: "Cannot validate parameter of type {type}.",
|
14
|
-
loadingFormats: "Loading...",
|
15
|
-
loadingReport: "Loading report...",
|
16
|
-
loadingParameters: "Loading parameters...",
|
17
|
-
autoRunDisabled: "Please validate the report parameter values and press Preview to generate the 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);
|