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