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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/accessibility.js +28 -38
  3. package/dist/cjs/base-component.js +26 -0
  4. package/dist/cjs/binder.js +45 -138
  5. package/dist/cjs/controller.js +25 -25
  6. package/dist/cjs/documentMapArea.js +4 -13
  7. package/dist/cjs/event-emitter.js +124 -10
  8. package/dist/cjs/index.js +2 -0
  9. package/dist/cjs/mainMenu.js +22 -31
  10. package/dist/cjs/pagesArea.js +8 -27
  11. package/dist/cjs/parameterValidators.js +4 -7
  12. package/dist/cjs/parameters.js +13 -13
  13. package/dist/cjs/parametersArea.js +36 -49
  14. package/dist/cjs/print.js +3 -4
  15. package/dist/cjs/reportViewer.js +38 -27
  16. package/dist/cjs/scroll.js +4 -6
  17. package/dist/cjs/search.js +327 -377
  18. package/dist/cjs/sendEmail.js +52 -95
  19. package/dist/cjs/serviceClient.js +163 -257
  20. package/dist/cjs/sideMenu.js +15 -24
  21. package/dist/cjs/sr.js +4 -4
  22. package/dist/cjs/template-cache.js +6 -6
  23. package/dist/cjs/toolbar/link-button.js +42 -0
  24. package/dist/cjs/toolbar/page-count-label.js +18 -0
  25. package/dist/cjs/toolbar/page-number-input.js +64 -0
  26. package/dist/cjs/uiFreezeCoordinator.js +17 -16
  27. package/dist/cjs/utils.js +11 -14
  28. package/dist/es/accessibility.js +29 -39
  29. package/dist/es/base-component.js +22 -0
  30. package/dist/es/binder.js +45 -138
  31. package/dist/es/controller.js +26 -26
  32. package/dist/es/documentMapArea.js +4 -13
  33. package/dist/es/event-emitter.js +124 -10
  34. package/dist/es/index.js +1 -0
  35. package/dist/es/mainMenu.js +23 -32
  36. package/dist/es/pagesArea.js +9 -28
  37. package/dist/es/parameterValidators.js +5 -8
  38. package/dist/es/parameters.js +14 -14
  39. package/dist/es/parametersArea.js +37 -50
  40. package/dist/es/print.js +4 -5
  41. package/dist/es/reportViewer.js +39 -28
  42. package/dist/es/scroll.js +4 -6
  43. package/dist/es/search.js +328 -378
  44. package/dist/es/sendEmail.js +52 -95
  45. package/dist/es/serviceClient.js +164 -258
  46. package/dist/es/sideMenu.js +16 -25
  47. package/dist/es/sr.js +4 -4
  48. package/dist/es/template-cache.js +7 -7
  49. package/dist/es/toolbar/link-button.js +38 -0
  50. package/dist/es/toolbar/page-count-label.js +14 -0
  51. package/dist/es/toolbar/page-number-input.js +60 -0
  52. package/dist/es/uiFreezeCoordinator.js +17 -16
  53. package/dist/es/utils.js +11 -14
  54. package/dist/font/font-icons.css +4 -4
  55. package/dist/font/font-icons.min.css +3 -3
  56. package/dist/js/telerikReportViewer.js +1080 -1190
  57. package/dist/js/telerikReportViewer.min.js +1 -1
  58. package/dist/js/telerikReportViewer.stringResources.js +4 -4
  59. package/dist/styles/telerikReportViewer.css +3 -3
  60. package/dist/styles/telerikReportViewer.min.css +3 -3
  61. package/dist/templates/telerikReportViewerTemplate-FA.html +4 -4
  62. package/dist/templates/telerikReportViewerTemplate.html +6 -6
  63. package/package.json +3 -2
  64. /package/dist/font/{ReportingIcons-18.1.24.514.ttf → ReportingIcons-18.2.24.806.ttf} +0 -0
@@ -4,39 +4,58 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var utils = require('./utils.js');
6
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
+ };
7
23
  var JSON_CONTENT_TYPE = "application/json; charset=UTF-8";
8
24
  var URLENCODED_CONTENT_TYPE = "application/x-www-form-urlencoded; charset=UTF-8";
9
25
  var HTTP_GET = "GET";
10
26
  var HTTP_POST = "POST";
11
27
  var HTTP_DELETE = "DELETE";
12
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
+ }
13
38
  function ServiceClient(options) {
14
- options = utils.extend({}, defaultOptions, options);
39
+ options = $.extend({}, defaultOptions, options);
15
40
  var baseUrl = utils.rTrim(options.serviceUrl || options.baseUrl, "\\/");
16
41
  var loginPromise;
17
42
  var _ajax = utils.$ajax;
18
43
  function validateClientID(clientID) {
19
- if (!clientID)
44
+ if (!clientID) {
20
45
  throw "Invalid clientID";
46
+ }
21
47
  }
22
48
  function urlFromTemplate(template, args) {
23
- args = utils.extend({}, { baseUrl }, args);
49
+ args = $.extend({}, { baseUrl }, args);
24
50
  return utils.stringFormat(template, args);
25
51
  }
26
- function getHeaderSettings(authorizationToken) {
27
- return authorizationToken ? {
28
- headers: {
29
- Authorization: "Bearer " + authorizationToken
30
- }
31
- } : {};
32
- }
33
52
  function login() {
34
53
  if (!loginPromise) {
35
54
  var loginInfo = options.loginInfo;
36
55
  if (loginInfo && loginInfo.url && (loginInfo.username || loginInfo.password)) {
37
- loginPromise = _ajax({
38
- url: loginInfo.url,
39
- type: HTTP_POST,
56
+ const endPoint = loginInfo.url;
57
+ loginPromise = _ajax(endPoint, {
58
+ method: HTTP_POST,
40
59
  data: {
41
60
  grant_type: "password",
42
61
  username: loginInfo.username,
@@ -56,22 +75,18 @@ function ServiceClient(options) {
56
75
  return {
57
76
  _urlFromTemplate: urlFromTemplate,
58
77
  registerClient: function(settings) {
78
+ const endPoint = `${baseUrl}/clients`;
59
79
  return login().then(function(authorizationToken) {
60
- var ajaxSettings = utils.extend(
61
- getHeaderSettings(authorizationToken),
62
- settings,
63
- {
64
- type: HTTP_POST,
65
- url: urlFromTemplate("{baseUrl}/clients"),
66
- dataType: "json",
67
- //Used to avoid Chrome caching functionality for simple async requests
68
- //when the first request is not completed the second request is not send
69
- //and the same response is used for both of the request. In this case the
70
- //second client is not registered to the service and the same clientId is used.
71
- data: JSON.stringify({ timeStamp: Date.now() })
72
- }
73
- );
74
- return _ajax(ajaxSettings);
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));
75
90
  }).then(function(clientData) {
76
91
  if (clientData.Message) {
77
92
  throw clientData.Message;
@@ -81,290 +96,189 @@ function ServiceClient(options) {
81
96
  },
82
97
  unregisterClient: function(clientID, settings) {
83
98
  validateClientID(clientID);
99
+ const endPoint = `${baseUrl}/clients/${clientID}`;
84
100
  return login().then(function(authorizationToken) {
85
- var ajaxSettings = utils.extend(
86
- getHeaderSettings(authorizationToken),
87
- settings,
88
- {
89
- type: HTTP_DELETE,
90
- url: urlFromTemplate("{baseUrl}/clients/{clientID}", { clientID })
91
- }
92
- );
93
- return _ajax(ajaxSettings);
101
+ return _ajax(endPoint, __spreadValues({
102
+ headers: getHeaders(authorizationToken),
103
+ method: HTTP_DELETE
104
+ }, settings));
94
105
  });
95
106
  },
96
107
  getParameters: function(clientID, report, parameterValues, settings) {
97
108
  validateClientID(clientID);
109
+ const endPoint = `${baseUrl}/clients/${clientID}/parameters`;
98
110
  return login().then(function(authorizationToken) {
99
- var ajaxSettings = utils.extend(
100
- getHeaderSettings(authorizationToken),
101
- settings,
102
- {
103
- type: HTTP_POST,
104
- url: urlFromTemplate("{baseUrl}/clients/{clientID}/parameters", { clientID }),
105
- contentType: JSON_CONTENT_TYPE,
106
- dataType: "json",
107
- data: JSON.stringify({ report, parameterValues })
108
- }
109
- );
110
- return _ajax(ajaxSettings);
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));
111
118
  });
112
119
  },
113
120
  createReportInstance: function(clientID, report, parameterValues, settings) {
114
121
  validateClientID(clientID);
122
+ const endPoint = `${baseUrl}/clients/${clientID}/instances`;
115
123
  return login().then(function(authorizationToken) {
116
- var ajaxSettings = utils.extend(
117
- getHeaderSettings(authorizationToken),
118
- settings,
119
- {
120
- type: HTTP_POST,
121
- url: urlFromTemplate("{baseUrl}/clients/{clientID}/instances", { clientID }),
122
- contentType: JSON_CONTENT_TYPE,
123
- dataType: "json",
124
- data: JSON.stringify({ report, parameterValues })
125
- }
126
- );
127
- return _ajax(ajaxSettings);
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));
128
131
  }).then(function(instanceData) {
129
132
  return instanceData.instanceId;
130
133
  });
131
134
  },
132
135
  deleteReportInstance: function(clientID, instanceID, settings) {
133
136
  validateClientID(clientID);
137
+ const endPoint = `${baseUrl}/clients/${clientID}/instances/${instanceID}`;
134
138
  return login().then(function(authorizationToken) {
135
- var ajaxSettings = utils.extend(
136
- getHeaderSettings(authorizationToken),
137
- settings,
138
- {
139
- type: HTTP_DELETE,
140
- url: urlFromTemplate("{baseUrl}/clients/{clientID}/instances/{instanceID}", { clientID, instanceID })
141
- }
142
- );
143
- return _ajax(ajaxSettings);
139
+ return _ajax(endPoint, __spreadValues({
140
+ headers: getHeaders(authorizationToken),
141
+ method: HTTP_DELETE
142
+ }, settings));
144
143
  });
145
144
  },
145
+ // eslint-disable-next-line max-params
146
146
  createReportDocument: function(clientID, instanceID, format, deviceInfo, useCache, baseDocumentID, actionID, settings) {
147
147
  validateClientID(clientID);
148
+ const endPoint = `${baseUrl}/clients/${clientID}/instances/${instanceID}/documents`;
148
149
  return login().then(function(authorizationToken) {
149
150
  deviceInfo = deviceInfo || {};
150
151
  deviceInfo["BasePath"] = baseUrl;
151
- var ajaxSettings = utils.extend(
152
- getHeaderSettings(authorizationToken),
153
- settings,
154
- {
155
- type: HTTP_POST,
156
- url: urlFromTemplate("{baseUrl}/clients/{clientID}/instances/{instanceID}/documents", { clientID, instanceID }),
157
- contentType: JSON_CONTENT_TYPE,
158
- dataType: "json",
159
- data: JSON.stringify(
160
- {
161
- format,
162
- deviceInfo,
163
- useCache,
164
- baseDocumentID,
165
- actionID
166
- }
167
- )
168
- }
169
- );
170
- return _ajax(ajaxSettings);
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));
171
165
  }).then(function(documentData) {
172
166
  return documentData.documentId;
173
167
  });
174
168
  },
169
+ // eslint-disable-next-line max-params
175
170
  sendDocument: function(clientID, instanceID, documentID, mailArgs, settings) {
176
171
  validateClientID(clientID);
172
+ const endPoint = `${baseUrl}/clients/${clientID}/instances/${instanceID}/documents/${documentID}/send`;
177
173
  return login().then(function(authorizationToken) {
178
- var ajaxSettings = utils.extend(
179
- getHeaderSettings(authorizationToken),
180
- settings,
181
- {
182
- type: HTTP_POST,
183
- url: urlFromTemplate(
184
- "{baseUrl}/clients/{clientID}/instances/{instanceID}/documents/{documentID}/send",
185
- { clientID, instanceID, documentID }
186
- ),
187
- contentType: JSON_CONTENT_TYPE,
188
- data: JSON.stringify(
189
- {
190
- from: mailArgs.from,
191
- to: mailArgs.to,
192
- cc: mailArgs.cc,
193
- subject: mailArgs.subject,
194
- body: mailArgs.body
195
- }
196
- )
197
- }
198
- );
199
- return _ajax(ajaxSettings);
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));
200
186
  });
201
187
  },
202
188
  deleteReportDocument: function(clientID, instanceID, documentID, settings) {
203
189
  validateClientID(clientID);
190
+ const endPoint = `${baseUrl}/clients/${clientID}/instances/${instanceID}/documents/${documentID}`;
204
191
  return login().then(function(authorizationToken) {
205
- var ajaxSettings = utils.extend(
206
- getHeaderSettings(authorizationToken),
207
- settings,
208
- {
209
- type: HTTP_DELETE,
210
- url: urlFromTemplate(
211
- "{baseUrl}/clients/{clientID}/instances/{instanceID}/documents/{documentID}",
212
- { clientID, instanceID, documentID }
213
- )
214
- }
215
- );
216
- return _ajax(ajaxSettings);
192
+ return _ajax(endPoint, __spreadValues({
193
+ headers: getHeaders(authorizationToken),
194
+ method: HTTP_DELETE
195
+ }, settings));
217
196
  });
218
197
  },
219
198
  getDocumentInfo: function(clientID, instanceID, documentID, settings) {
220
199
  validateClientID(clientID);
200
+ const endPoint = `${baseUrl}/clients/${clientID}/instances/${instanceID}/documents/${documentID}/info`;
221
201
  return login().then(function(authorizationToken) {
222
- var ajaxSettings = utils.extend(
223
- getHeaderSettings(authorizationToken),
224
- settings,
225
- {
226
- type: HTTP_GET,
227
- url: urlFromTemplate(
228
- "{baseUrl}/clients/{clientID}/instances/{instanceID}/documents/{documentID}/info",
229
- {
230
- clientID,
231
- instanceID,
232
- documentID
233
- }
234
- ),
235
- dataType: "json"
236
- }
237
- );
238
- return _ajax(ajaxSettings);
202
+ return _ajax(endPoint, __spreadValues({
203
+ headers: getHeaders(authorizationToken),
204
+ method: HTTP_GET,
205
+ dataType: "json"
206
+ }, settings));
239
207
  });
240
208
  },
209
+ // eslint-disable-next-line max-params
241
210
  getPage: function(clientID, instanceID, documentID, pageNumber, settings) {
242
211
  validateClientID(clientID);
212
+ const endPoint = `${baseUrl}/clients/${clientID}/instances/${instanceID}/documents/${documentID}/pages/${pageNumber}`;
243
213
  return login().then(function(authorizationToken) {
244
- var ajaxSettings = utils.extend(
245
- getHeaderSettings(authorizationToken),
246
- settings,
247
- {
248
- type: HTTP_GET,
249
- url: urlFromTemplate(
250
- "{baseUrl}/clients/{clientID}/instances/{instanceID}/documents/{documentID}/pages/{pageNumber}",
251
- {
252
- clientID,
253
- instanceID,
254
- documentID,
255
- pageNumber
256
- }
257
- ),
258
- dataType: "json"
259
- }
260
- );
261
- return _ajax(ajaxSettings);
214
+ return _ajax(endPoint, __spreadValues({
215
+ headers: getHeaders(authorizationToken),
216
+ method: HTTP_GET,
217
+ dataType: "json"
218
+ }, settings));
262
219
  });
263
220
  },
264
221
  get: function(url) {
265
- var ajaxSettings = {
266
- type: HTTP_GET,
267
- url
268
- };
269
- return _ajax(ajaxSettings);
222
+ return _ajax(url, {
223
+ method: HTTP_GET
224
+ });
270
225
  },
271
226
  formatDocumentUrl: function(clientID, instanceID, documentID, queryString) {
272
- var url = urlFromTemplate(
273
- "{baseUrl}/clients/{clientID}/instances/{instanceID}/documents/{documentID}",
274
- {
275
- clientID,
276
- instanceID,
277
- documentID
278
- }
279
- );
227
+ var url = `${baseUrl}/clients/${clientID}/instances/${instanceID}/documents/${documentID}`;
280
228
  if (queryString) {
281
229
  url += "?" + queryString;
282
230
  }
283
231
  return url;
284
232
  },
285
233
  getDocumentFormats: function(settings) {
234
+ const endPoint = `${baseUrl}/formats`;
286
235
  return login().then(function(authorizationToken) {
287
- var ajaxSettings = utils.extend(
288
- getHeaderSettings(authorizationToken),
289
- settings,
290
- {
291
- type: HTTP_GET,
292
- url: urlFromTemplate("{baseUrl}/formats"),
293
- // anonymous
294
- dataType: "json"
295
- }
296
- );
297
- return _ajax(ajaxSettings);
236
+ return _ajax(endPoint, __spreadValues({
237
+ headers: getHeaders(authorizationToken),
238
+ method: HTTP_GET,
239
+ dataType: "json"
240
+ }, settings));
298
241
  });
299
242
  },
300
243
  getServiceVersion: function(settings) {
244
+ const endPoint = `${baseUrl}/version`;
301
245
  return login().then(function(authorizationToken) {
302
- var ajaxSettings = utils.extend(
303
- getHeaderSettings(authorizationToken),
304
- settings,
305
- {
306
- type: HTTP_GET,
307
- url: urlFromTemplate("{baseUrl}/version"),
308
- // anonymous
309
- dataType: "json"
310
- }
311
- );
312
- return _ajax(ajaxSettings);
246
+ return _ajax(endPoint, __spreadValues({
247
+ headers: getHeaders(authorizationToken),
248
+ method: HTTP_GET,
249
+ dataType: "json"
250
+ }, settings));
313
251
  });
314
252
  },
253
+ // eslint-disable-next-line max-params
315
254
  getResource: function(clientID, instanceID, documentID, resourceID, settings) {
316
255
  validateClientID(clientID);
256
+ const endPoint = `${baseUrl}/clients/${clientID}/instances/${instanceID}/documents/${documentID}/resources/${resourceID}`;
317
257
  return login().then(function(authorizationToken) {
318
- var ajaxSettings = utils.extend(
319
- getHeaderSettings(authorizationToken),
320
- settings,
321
- {
322
- type: HTTP_GET,
323
- url: urlFromTemplate(
324
- "{baseUrl}/clients/{clientID}/instances/{instanceID}/documents/{documentID}/resources/{resourceID}",
325
- {
326
- clientID,
327
- instanceID,
328
- documentID,
329
- resourceID
330
- }
331
- ),
332
- dataType: (settings == null ? void 0 : settings.dataType) || "json"
333
- }
334
- );
335
- return _ajax(ajaxSettings);
258
+ return _ajax(endPoint, __spreadValues({
259
+ headers: getHeaders(authorizationToken),
260
+ method: HTTP_GET,
261
+ dataType: (settings == null ? void 0 : settings.dataType) || "json"
262
+ }, settings));
336
263
  });
337
264
  },
265
+ // eslint-disable-next-line max-params
338
266
  getSearchResults: function(clientID, instanceID, documentID, searchToken, matchCase, matchWholeWord, useRegex, settings) {
339
267
  validateClientID(clientID);
340
- var searchUrl = urlFromTemplate(
341
- "{baseUrl}/clients/{clientID}/instances/{instanceID}/documents/{documentID}/search",
342
- {
343
- clientID,
344
- instanceID,
345
- documentID
346
- }
347
- );
268
+ const endPoint = `${baseUrl}/clients/${clientID}/instances/${instanceID}/documents/${documentID}/search`;
348
269
  return login().then(function(authorizationToken) {
349
- var ajaxSettings = utils.extend(
350
- getHeaderSettings(authorizationToken),
351
- settings,
352
- {
353
- type: HTTP_POST,
354
- url: searchUrl,
355
- contentType: JSON_CONTENT_TYPE,
356
- dataType: "json",
357
- data: JSON.stringify(
358
- {
359
- searchToken,
360
- matchCase,
361
- matchWholeWord,
362
- useRegularExpressions: useRegex
363
- }
364
- )
365
- }
366
- );
367
- return _ajax(ajaxSettings);
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));
368
282
  });
369
283
  },
370
284
  setAccessToken: function(accessToken) {
@@ -372,29 +286,21 @@ function ServiceClient(options) {
372
286
  },
373
287
  login,
374
288
  keepClientAlive: function(clientID, settings) {
289
+ const endPoint = `${baseUrl}/clients/keepAlive/${clientID}`;
375
290
  return login().then(function(authorizationToken) {
376
- var ajaxSettings = utils.extend(
377
- getHeaderSettings(authorizationToken),
378
- settings,
379
- {
380
- type: HTTP_POST,
381
- url: urlFromTemplate("{baseUrl}/clients/keepAlive/{clientID}", { clientID })
382
- }
383
- );
384
- return _ajax(ajaxSettings);
291
+ return _ajax(endPoint, __spreadValues({
292
+ headers: getHeaders(authorizationToken),
293
+ method: HTTP_POST
294
+ }, settings));
385
295
  });
386
296
  },
387
297
  getClientsSessionTimeoutSeconds: function(settings) {
298
+ const endPoint = `${baseUrl}/clients/sessionTimeout`;
388
299
  return login().then(function(authorizationToken) {
389
- var ajaxSettings = utils.extend(
390
- getHeaderSettings(authorizationToken),
391
- settings,
392
- {
393
- type: HTTP_GET,
394
- url: urlFromTemplate("{baseUrl}/clients/sessionTimeout")
395
- }
396
- );
397
- return _ajax(ajaxSettings);
300
+ return _ajax(endPoint, __spreadValues({
301
+ headers: getHeaders(authorizationToken),
302
+ method: HTTP_GET
303
+ }, settings));
398
304
  }).then(function(sessionTimeoutData) {
399
305
  return sessionTimeoutData.clientSessionTimeout;
400
306
  });
@@ -73,16 +73,15 @@ function SideMenu(dom, rootOptions, otherOptions) {
73
73
  });
74
74
  }
75
75
  function fillFormats(formats) {
76
- utils.each($(dom).find("ul[data-command-list=export-format-list]"), function() {
77
- var $list = $(this);
76
+ Array.from($(dom).find("ul[data-command-list=export-format-list]")).forEach((list) => {
77
+ var $list = $(list);
78
78
  var $parent = $list.parents("li");
79
79
  var tabIndex = $parent.attr("tabindex");
80
80
  if (!tabIndex) {
81
81
  tabIndex = DEFAULT_TABINDEX;
82
82
  }
83
83
  $list.empty();
84
- utils.each(formats, function(i) {
85
- var format = this;
84
+ Array.from(formats).forEach((format) => {
86
85
  var ariaLabel = enableAccessibility ? utils.stringFormat('aria-label="{localizedName}" ', format) : " ";
87
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);
88
87
  panelBar.append(li, $parent);
@@ -92,10 +91,10 @@ function SideMenu(dom, rootOptions, otherOptions) {
92
91
  });
93
92
  }
94
93
  function enableCloseOnClick(root) {
95
- utils.each(root.find("li"), function() {
96
- var isLeaf = $(this).children("ul").length === 0;
94
+ Array.from(root.find("li")).forEach((listItem) => {
95
+ var isLeaf = $(listItem).children("ul").length === 0;
97
96
  if (isLeaf) {
98
- $(this).children("a").click(function() {
97
+ $(listItem).children("a").on("click", (event) => {
99
98
  controller.setSideMenuVisible({ visible: !sideMenuVisible });
100
99
  });
101
100
  }
@@ -113,21 +112,21 @@ function SideMenu(dom, rootOptions, otherOptions) {
113
112
  function setListItemsTabIndex(list, tabIndex) {
114
113
  list.attr("tabindex", tabIndex);
115
114
  var items = list.find("li");
116
- utils.each(items, function() {
117
- var $item = $(this);
115
+ Array.from(items).forEach((item) => {
116
+ var $item = $(item);
118
117
  $item.attr("tabindex", tabIndex);
119
118
  var anchor = $item.children("a");
120
119
  if (anchor.length > 0) {
121
120
  var $anchor = $(anchor);
122
121
  $anchor.attr("tabindex", -1);
123
122
  }
124
- $item.focus(function() {
123
+ $item.on("focus", (event) => {
125
124
  var anchor2 = $item.children("a");
126
125
  if (anchor2.length > 0) {
127
126
  anchor2.addClass("k-focus");
128
127
  }
129
128
  });
130
- $item.blur(function() {
129
+ $item.on("blur", (event) => {
131
130
  var anchor2 = $item.children("a");
132
131
  if (anchor2.length > 0) {
133
132
  anchor2.removeClass("k-focus");
@@ -191,12 +190,12 @@ function SideMenu(dom, rootOptions, otherOptions) {
191
190
  if (!menuAreas) {
192
191
  return;
193
192
  }
194
- utils.each(menuAreas, function() {
195
- var $menu = $(this);
193
+ Array.from(menuAreas).forEach((menu2) => {
194
+ var $menu = $(menu2);
196
195
  var menuItems = $menu.children("li.k-panelbar-header");
197
196
  $menu.attr("aria-label", stringResources.stringResources[$menu.attr("aria-label")]);
198
- utils.each(menuItems, function() {
199
- var $menuItem = $(this);
197
+ Array.from(menuItems).forEach((menuItem) => {
198
+ var $menuItem = $(menuItem);
200
199
  var $a = $menuItem.find("a");
201
200
  $menuItem.attr("aria-label", stringResources.stringResources[$menuItem.attr("aria-label")]);
202
201
  if ($a) {
@@ -210,16 +209,8 @@ function SideMenu(dom, rootOptions, otherOptions) {
210
209
  });
211
210
  }
212
211
  function findMenuArea() {
213
- return utils.findElement("div[data-role=telerik_ReportViewer_SideMenu] > ul");
212
+ return $("div[data-role=telerik_ReportViewer_SideMenu] > ul");
214
213
  }
215
214
  }
216
- var pluginName = "telerik_ReportViewer_SideMenu";
217
- $.fn[pluginName] = function(options, otherOptions) {
218
- return utils.each(this, function() {
219
- if (!$.data(this, pluginName)) {
220
- $.data(this, pluginName, new SideMenu(this, options, otherOptions));
221
- }
222
- });
223
- };
224
215
 
225
216
  exports.SideMenu = SideMenu;