@progress/telerik-react-report-viewer 29.26.304 → 29.26.402
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/reportViewer.js +18 -7
- package/dist/cjs/telerik-report-viewer.js +346 -336
- package/dist/dependencies/telerikReportViewer.d.ts +85 -83
- package/dist/dependencies/telerikReportViewer.js +275 -67
- package/dist/dependencies/telerikReportViewerTemplate.html +3 -3
- package/dist/es/reportViewer.js +14 -3
- package/dist/es/telerik-report-viewer.js +346 -336
- package/package.json +2 -2
|
@@ -8,11 +8,6 @@ require("../dependencies/initExtDeps");
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _telerikReportViewer = require("../dependencies/telerikReportViewer.js");
|
|
10
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
14
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
15
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
16
11
|
/**
|
|
17
12
|
* Defines options for configuring report parameter editors in the React Report Viewer.
|
|
18
13
|
*
|
|
@@ -28,8 +23,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
28
23
|
* - Default: "LIST_VIEW"
|
|
29
24
|
*
|
|
30
25
|
* @example
|
|
31
|
-
* //
|
|
32
|
-
*
|
|
26
|
+
* // Specify editor types for report parameters
|
|
33
27
|
* <TelerikReportViewer
|
|
34
28
|
* serviceUrl="api/reports/"
|
|
35
29
|
* reportSource={{ report: "Dashboard.trdp" }}
|
|
@@ -60,19 +54,19 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
60
54
|
|
|
61
55
|
/**
|
|
62
56
|
* Configuration for connecting to a Telerik Report Server instance.
|
|
63
|
-
*
|
|
57
|
+
*
|
|
64
58
|
* The authentication method depends on the Report Server version:
|
|
65
59
|
* - Report Server for .NET: Supports Token authentication (getPersonalAccessToken) or username/password authentication. The token can be from any user, including the Guest user.
|
|
66
60
|
* - Report Server for .NET Framework 4.6.2: Supports username/password authentication or Guest account (url only, if Guest is enabled on the server).
|
|
67
|
-
*
|
|
61
|
+
*
|
|
68
62
|
* @typedef {Object} ReportServer
|
|
69
|
-
* @property {string} url - The URL
|
|
70
|
-
* @property {function} [getPersonalAccessToken] - A callback
|
|
71
|
-
* @property {string} [username] - A registered username
|
|
72
|
-
* @property {string} [password] - The password for the provided username.
|
|
63
|
+
* @property {string} url - The URL of the Telerik Report Server instance.
|
|
64
|
+
* @property {function} [getPersonalAccessToken] - A callback that returns a Promise resolving to a Personal Access Token for authentication. Recommended for Report Server for .NET. The token can be from any user account, including the Guest user.
|
|
65
|
+
* @property {string} [username] - A registered username for Report Server authentication. Supported by both Report Server for .NET and Report Server for .NET Framework. When omitted with Report Server for .NET Framework and Guest enabled, the built-in Guest account is used.
|
|
66
|
+
* @property {string} [password] - The password for the provided username. Can be omitted only when connecting with the Guest account to Report Server for .NET Framework.
|
|
73
67
|
*
|
|
74
68
|
* @example <propertyName>getPersonalAccessToken</propertyName>
|
|
75
|
-
* //
|
|
69
|
+
* // Report Server for .NET - Token authentication (recommended)
|
|
76
70
|
* <TelerikReportViewer
|
|
77
71
|
* reportServer={{
|
|
78
72
|
* url: "https://my-report-server-net/",
|
|
@@ -84,7 +78,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
84
78
|
* />
|
|
85
79
|
*
|
|
86
80
|
* @example <propertyName>getPersonalAccessToken</propertyName>
|
|
87
|
-
* //
|
|
81
|
+
* // Report Server for .NET - Token authentication with a secure endpoint
|
|
88
82
|
* <TelerikReportViewer
|
|
89
83
|
* reportServer={{
|
|
90
84
|
* url: "https://my-report-server-net/",
|
|
@@ -97,7 +91,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
97
91
|
* />
|
|
98
92
|
*
|
|
99
93
|
* @example <propertyName>getPersonalAccessToken</propertyName>
|
|
100
|
-
* //
|
|
94
|
+
* // Report Server for .NET - Token authentication with Guest user token
|
|
101
95
|
* <TelerikReportViewer
|
|
102
96
|
* reportServer={{
|
|
103
97
|
* url: "https://my-report-server-net/",
|
|
@@ -109,7 +103,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
109
103
|
* />
|
|
110
104
|
*
|
|
111
105
|
* @example <propertyName>username</propertyName>
|
|
112
|
-
* //
|
|
106
|
+
* // Report Server for .NET - Username/password authentication
|
|
113
107
|
* <TelerikReportViewer
|
|
114
108
|
* reportServer={{
|
|
115
109
|
* url: "https://my-report-server-net/",
|
|
@@ -120,7 +114,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
120
114
|
* />
|
|
121
115
|
*
|
|
122
116
|
* @example <propertyName>username</propertyName>
|
|
123
|
-
* //
|
|
117
|
+
* // Report Server for .NET Framework - Username/password authentication
|
|
124
118
|
* <TelerikReportViewer
|
|
125
119
|
* reportServer={{
|
|
126
120
|
* url: "https://my-report-server-framework/",
|
|
@@ -131,7 +125,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
131
125
|
* />
|
|
132
126
|
*
|
|
133
127
|
* @example <propertyName>url</propertyName>
|
|
134
|
-
* //
|
|
128
|
+
* // Report Server for .NET Framework - Guest account (requires Guest enabled on server)
|
|
135
129
|
* <TelerikReportViewer
|
|
136
130
|
* reportServer={{
|
|
137
131
|
* url: "https://my-report-server-framework/"
|
|
@@ -140,7 +134,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
140
134
|
* />
|
|
141
135
|
*
|
|
142
136
|
* @example <propertyName>reportServer</propertyName>
|
|
143
|
-
* //
|
|
137
|
+
* // Complete initialization with Report Server for .NET using Token authentication
|
|
144
138
|
* <TelerikReportViewer
|
|
145
139
|
* reportServer={{
|
|
146
140
|
* url: "https://my-report-server-net/",
|
|
@@ -160,19 +154,19 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
160
154
|
/**
|
|
161
155
|
* Configuration object that identifies the report to be displayed and provides initial parameter values.
|
|
162
156
|
* @typedef {Object} ReportSource
|
|
163
|
-
* @property {string} [report] - A string
|
|
164
|
-
* @property {ReportParameters} [parameters] -
|
|
157
|
+
* @property {string} [report] - A string identifying the report to display. This can be a path to a report definition file (e.g., 'Dashboard.trdp' or 'Dashboard.trdx'), a type name, or a custom identifier resolved by the server-side report source resolver. For Report Server, use the format '{Category}/{ReportName}'.
|
|
158
|
+
* @property {ReportParameters} [parameters] - An object whose keys are report parameter names and values are the corresponding parameter values.
|
|
165
159
|
*
|
|
166
160
|
* @example <propertyName>report</propertyName>
|
|
167
|
-
* //
|
|
161
|
+
* // Minimal report source with only the report file name
|
|
168
162
|
* const reportSource = {
|
|
169
|
-
* report: "MyReport"
|
|
163
|
+
* report: "MyReport.trdp"
|
|
170
164
|
* };
|
|
171
165
|
*
|
|
172
166
|
* @example <propertyName>parameters</propertyName>
|
|
173
|
-
* //
|
|
167
|
+
* // Report source with parameters
|
|
174
168
|
* const reportSource = {
|
|
175
|
-
* report: "SalesReport",
|
|
169
|
+
* report: "SalesReport.trdp",
|
|
176
170
|
* parameters: {
|
|
177
171
|
* StartDate: "2024-01-01",
|
|
178
172
|
* EndDate: "2024-12-31",
|
|
@@ -181,13 +175,13 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
181
175
|
* };
|
|
182
176
|
*
|
|
183
177
|
* @example <propertyName>report</propertyName>
|
|
184
|
-
* //
|
|
178
|
+
* // Report Server format
|
|
185
179
|
* const reportSource = {
|
|
186
180
|
* report: "Finance/MonthlyReport"
|
|
187
181
|
* };
|
|
188
182
|
*
|
|
189
183
|
* @example
|
|
190
|
-
* //
|
|
184
|
+
* // Using ReportSource with the React Report Viewer
|
|
191
185
|
* <TelerikReportViewer
|
|
192
186
|
* serviceUrl="api/reports/"
|
|
193
187
|
* reportSource={{
|
|
@@ -223,8 +217,8 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
223
217
|
* @property {string} [to] - E-mail address used for the MailMessage TO value.
|
|
224
218
|
* @property {string} [cc] - E-mail address used for the MailMessage Carbon Copy value.
|
|
225
219
|
* @property {string} [subject] - A string used for the MailMessage Subject value.
|
|
226
|
-
* @property {string} [body] -
|
|
227
|
-
* @property {string} [format] - The preselected report
|
|
220
|
+
* @property {string} [body] - Text content for the email body.
|
|
221
|
+
* @property {string} [format] - The preselected document format for the report attachment (e.g., 'PDF', 'XLSX').
|
|
228
222
|
*
|
|
229
223
|
* @example
|
|
230
224
|
* // Enable Send Email with default values and PDF as the default format
|
|
@@ -256,63 +250,79 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
256
250
|
|
|
257
251
|
/**
|
|
258
252
|
* Represents the API of a parameter editor instance returned by createEditor.
|
|
253
|
+
*
|
|
254
|
+
* Implementations must provide `beginEdit`, `addAccessibility`, and `setAccessibilityErrorState`.
|
|
255
|
+
* The viewer calls `addAccessibility` / `setAccessibilityErrorState` when `enableAccessibility` is true.
|
|
256
|
+
* Optional members like `clearPendingChange` and `destroy` are lifecycle hooks for editors
|
|
257
|
+
* that manage external widgets or pending async updates.
|
|
259
258
|
* @typedef {Object} ParameterEditorInstance
|
|
260
259
|
* @property {function(Object):void} beginEdit - Creates the editor UI and populates it with the parameter settings.
|
|
261
|
-
* @property {function(Object):void} addAccessibility - Adds accessibility to the parameter editor and populates its string resources.
|
|
262
|
-
* @property {function(Object):void} setAccessibilityErrorState - Sets the error state of the parameter editor's accessibility functionality and its error attributes.
|
|
263
|
-
* @
|
|
264
|
-
* @property {function():void}
|
|
265
|
-
* @property {function():void} [
|
|
260
|
+
* @property {function(Object):void} addAccessibility - Adds accessibility to the parameter editor and populates its string resources. Called by the viewer when `enableAccessibility` is true.
|
|
261
|
+
* @property {function(Object):void} setAccessibilityErrorState - Sets the error state of the parameter editor's accessibility functionality and its error attributes. Called by the viewer when `enableAccessibility` is true and the user changes value.
|
|
262
|
+
* @internal
|
|
263
|
+
* @property {function(boolean):void} enable - Enables or disables the parameter editor (e.g., when the "use default value" checkbox is toggled).
|
|
264
|
+
* @property {function():void} [clearPendingChange] - Invoked when parameter changes.
|
|
265
|
+
* @property {function():void} [destroy] - Invoked to destroy the parameter editor.
|
|
266
266
|
*/
|
|
267
267
|
|
|
268
268
|
/**
|
|
269
|
-
* Describes a parameter editor for the Telerik Report Viewer
|
|
269
|
+
* Describes a parameter editor for the Telerik Report Viewer parameters area.
|
|
270
270
|
* @typedef {Object} ParameterEditor
|
|
271
271
|
* @property {function(Object): boolean} match - Determines if the editor is suitable for the parameter.
|
|
272
|
-
* @property {function(HTMLElement, Object): ParameterEditorInstance} createEditor - Creates the editor UI.
|
|
272
|
+
* @property {function(HTMLElement, Object): ParameterEditorInstance} createEditor - Creates the editor UI and returns an editor instance.
|
|
273
273
|
* @example
|
|
274
|
-
* //
|
|
275
|
-
*
|
|
276
|
-
* // Use parameter properties to determine if this editor should be used
|
|
274
|
+
* // Custom match function for single-select parameters
|
|
275
|
+
* function match(parameter) {
|
|
277
276
|
* return Boolean(parameter.availableValues) && !parameter.multivalue;
|
|
278
|
-
* }
|
|
277
|
+
* }
|
|
279
278
|
*
|
|
280
279
|
* @example
|
|
281
|
-
* //
|
|
280
|
+
* // Custom createEditor function using Kendo DateTimePicker
|
|
282
281
|
* function match(parameter) {
|
|
283
282
|
* return parameter.type === "System.DateTime";
|
|
284
283
|
* }
|
|
285
284
|
*
|
|
286
285
|
* function createEditor(placeholder, options) {
|
|
287
|
-
*
|
|
288
|
-
* parameter
|
|
289
|
-
* valueChangedCallback = options.parameterChanged
|
|
290
|
-
*
|
|
286
|
+
* const container = $(placeholder).html('<input type="datetime"/>');
|
|
287
|
+
* let parameter;
|
|
288
|
+
* const valueChangedCallback = options.parameterChanged;
|
|
289
|
+
* let picker;
|
|
290
|
+
*
|
|
291
291
|
* function onChange() {
|
|
292
|
-
*
|
|
292
|
+
* const val = picker.value();
|
|
293
293
|
* valueChangedCallback(parameter, val);
|
|
294
294
|
* }
|
|
295
|
+
*
|
|
295
296
|
* return {
|
|
296
297
|
* beginEdit: function (param) {
|
|
297
298
|
* parameter = param;
|
|
298
|
-
* $(
|
|
299
|
+
* $(container).find("input").kendoDateTimePicker({
|
|
299
300
|
* dataTextField: "name",
|
|
300
301
|
* dataValueField: "value",
|
|
301
302
|
* value: parameter.value,
|
|
302
303
|
* dataSource: parameter.availableValues,
|
|
303
304
|
* change: onChange
|
|
304
305
|
* });
|
|
305
|
-
*
|
|
306
|
+
* picker = $(container).find("input").data("kendoDateTimePicker");
|
|
307
|
+
* },
|
|
308
|
+
*
|
|
309
|
+
* addAccessibility: function (accessibilityOptions) {
|
|
310
|
+
* // Apply ARIA attributes, labels, etc. to the editor input.
|
|
311
|
+
* },
|
|
312
|
+
*
|
|
313
|
+
* setAccessibilityErrorState: function (hasError) {
|
|
314
|
+
* // Update ARIA error attributes on the editor input.
|
|
306
315
|
* }
|
|
307
316
|
* };
|
|
308
317
|
* }
|
|
309
318
|
*
|
|
310
319
|
* @example
|
|
311
|
-
* //
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
*
|
|
315
|
-
* }
|
|
320
|
+
* // Registering a custom parameter editor
|
|
321
|
+
* <TelerikReportViewer
|
|
322
|
+
* serviceUrl="api/reports/"
|
|
323
|
+
* reportSource={{ report: "Dashboard.trdp" }}
|
|
324
|
+
* parameterEditors={[{ match, createEditor }]}
|
|
325
|
+
* />
|
|
316
326
|
*
|
|
317
327
|
*/
|
|
318
328
|
|
|
@@ -360,7 +370,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
360
370
|
* reportSource={{ report: "Finance/Dashboard" }}
|
|
361
371
|
* />
|
|
362
372
|
*
|
|
363
|
-
* @property {string} [templateUrl] - Sets the address of the
|
|
373
|
+
* @property {string} [templateUrl] - Sets the address of the HTML page that contains the viewer templates. If omitted, the default template will be downloaded from the REST service.
|
|
364
374
|
* @example <propertyName>templateUrl</propertyName>
|
|
365
375
|
* // Use a custom template
|
|
366
376
|
* <TelerikReportViewer
|
|
@@ -472,45 +482,90 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
472
482
|
* }}
|
|
473
483
|
* />
|
|
474
484
|
*
|
|
475
|
-
* @property {ParameterEditor} [parameterEditors] - Allows the user to define custom editors for the report parameters.
|
|
485
|
+
* @property {ParameterEditor[]} [parameterEditors] - Allows the user to define custom editors for the report parameters.
|
|
476
486
|
* @example <propertyName>parameterEditors</propertyName>
|
|
477
487
|
* // Register custom parameter editors
|
|
478
488
|
* const customEditors = [{
|
|
479
489
|
* match: function(param) { return param.name === "MyParam"; },
|
|
480
|
-
* createEditor: function(placeholder, options) {
|
|
490
|
+
* createEditor: function(placeholder, options) {
|
|
491
|
+
* return {
|
|
492
|
+
* beginEdit: function(param) {
|
|
493
|
+
* // Create and initialize the editor UI inside placeholder.
|
|
494
|
+
* },
|
|
495
|
+
* addAccessibility: function(accessibilityOptions) {
|
|
496
|
+
* // Apply ARIA attributes and accessibility strings.
|
|
497
|
+
* },
|
|
498
|
+
* setAccessibilityErrorState: function(hasError) {
|
|
499
|
+
* // Update accessibility error state on the editor.
|
|
500
|
+
* }
|
|
501
|
+
* };
|
|
502
|
+
* }
|
|
481
503
|
* }];
|
|
482
|
-
*
|
|
504
|
+
*
|
|
505
|
+
* <TelerikReportViewer
|
|
506
|
+
* serviceUrl="api/reports/"
|
|
507
|
+
* reportSource={{ report: "Dashboard.trdp" }}
|
|
508
|
+
* parameterEditors={customEditors}
|
|
509
|
+
* />
|
|
483
510
|
*
|
|
484
511
|
* @property {string} [authenticationToken] - If provided, a Bearer token will be set in the Authorization header for every request to the REST service.
|
|
485
512
|
* @example <propertyName>authenticationToken</propertyName>
|
|
486
|
-
* // Set authentication token
|
|
487
|
-
*
|
|
488
|
-
*
|
|
513
|
+
* // Set a Bearer authentication token for REST service requests
|
|
514
|
+
* <TelerikReportViewer
|
|
515
|
+
* serviceUrl="api/reports/"
|
|
516
|
+
* reportSource={{ report: "Dashboard.trdp" }}
|
|
517
|
+
* authenticationToken="YOUR_AUTH_TOKEN"
|
|
518
|
+
* />
|
|
489
519
|
*
|
|
490
520
|
* @property {string} [printMode] - Specifies how the viewer should print reports. Available values: "AUTO_SELECT" (automatically decide based on browser), "FORCE_PDF_FILE" (download as PDF file), "FORCE_PDF_PLUGIN" (use PDF plug-in). Default value is "AUTO_SELECT".
|
|
491
521
|
* @example <propertyName>printMode</propertyName>
|
|
492
|
-
* // Force PDF file for printing
|
|
493
|
-
*
|
|
522
|
+
* // Force PDF file download for printing
|
|
523
|
+
* <TelerikReportViewer
|
|
524
|
+
* serviceUrl="api/reports/"
|
|
525
|
+
* reportSource={{ report: "Dashboard.trdp" }}
|
|
526
|
+
* printMode="FORCE_PDF_FILE"
|
|
527
|
+
* />
|
|
494
528
|
*
|
|
495
|
-
* @property {string} [selector] - A selector
|
|
529
|
+
* @property {string} [selector] - A CSS selector that identifies the viewer's container element. Required when using external command buttons via data-attributes. External buttons must set their `data-target-report-viewer` attribute to this same value so the viewer can resolve which instance to command and apply `disabledButtonClass` / `checkedButtonClass` toggling.
|
|
496
530
|
* @example <propertyName>selector</propertyName>
|
|
497
|
-
* //
|
|
498
|
-
*
|
|
531
|
+
* // The selector must match the viewer's own container id (same value used in data-target-report-viewer on external buttons)
|
|
532
|
+
* <TelerikReportViewer
|
|
533
|
+
* id="rv1"
|
|
534
|
+
* serviceUrl="api/reports/"
|
|
535
|
+
* reportSource={{ report: "Dashboard.trdp" }}
|
|
536
|
+
* selector="#rv1"
|
|
537
|
+
* disabledButtonClass="btn-disabled"
|
|
538
|
+
* checkedButtonClass="btn-checked"
|
|
539
|
+
* />
|
|
499
540
|
*
|
|
500
|
-
*
|
|
541
|
+
* // External buttons reference the same selector in data-target-report-viewer:
|
|
542
|
+
* // <button data-command="telerik_ReportViewer_goToNextPage" data-target-report-viewer="#rv1">Next</button>
|
|
543
|
+
*
|
|
544
|
+
* @property {string} [disabledButtonClass] - A CSS class added to external command buttons (bound via data-attributes) when the command is in a disabled state.
|
|
501
545
|
* @example <propertyName>disabledButtonClass</propertyName>
|
|
502
|
-
* //
|
|
503
|
-
*
|
|
546
|
+
* // Apply custom styling to disabled command buttons
|
|
547
|
+
* <TelerikReportViewer
|
|
548
|
+
* id="rv1"
|
|
549
|
+
* serviceUrl="api/reports/"
|
|
550
|
+
* reportSource={{ report: "Dashboard.trdp" }}
|
|
551
|
+
* selector="#rv1"
|
|
552
|
+
* disabledButtonClass="btn-disabled"
|
|
553
|
+
* />
|
|
504
554
|
*
|
|
505
|
-
* @property {string} [checkedButtonClass] - A class
|
|
555
|
+
* @property {string} [checkedButtonClass] - A CSS class added to external command buttons (bound via data-attributes) when the command is in a checked state.
|
|
506
556
|
* @example <propertyName>checkedButtonClass</propertyName>
|
|
507
|
-
* //
|
|
508
|
-
*
|
|
557
|
+
* // Apply custom styling to checked/active command buttons
|
|
558
|
+
* <TelerikReportViewer
|
|
559
|
+
* id="rv1"
|
|
560
|
+
* serviceUrl="api/reports/"
|
|
561
|
+
* reportSource={{ report: "Dashboard.trdp" }}
|
|
562
|
+
* selector="#rv1"
|
|
563
|
+
* checkedButtonClass="btn-active"
|
|
564
|
+
* />
|
|
509
565
|
*
|
|
510
566
|
* @property {boolean} [enableAccessibility] - Determines whether the viewer should provide support for accessibility features. Default value is false.
|
|
511
567
|
* @example <propertyName>enableAccessibility</propertyName>
|
|
512
568
|
* // Enable accessibility features
|
|
513
|
-
* // Use with component: enableAccessibility={true}
|
|
514
569
|
* <TelerikReportViewer
|
|
515
570
|
* serviceUrl="api/reports/"
|
|
516
571
|
* reportSource={{ report: "Dashboard.trdp" }}
|
|
@@ -571,7 +626,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
571
626
|
* initialPageAreaImageUrl="/images/reportBackground.png"
|
|
572
627
|
* />
|
|
573
628
|
*
|
|
574
|
-
* @property {boolean} [keepClientAlive] - Determines whether the client
|
|
629
|
+
* @property {boolean} [keepClientAlive] - Determines whether the viewer sends periodic keep-alive requests to the server to prevent the client session from expiring. Default value is true.
|
|
575
630
|
* @example <propertyName>keepClientAlive</propertyName>
|
|
576
631
|
* // Keep client alive
|
|
577
632
|
* <TelerikReportViewer
|
|
@@ -593,6 +648,19 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
593
648
|
* }}
|
|
594
649
|
* />
|
|
595
650
|
*
|
|
651
|
+
* @property {Object} [localizationResources] - An object containing all or a subset of the viewer's localization resources in a chosen language.
|
|
652
|
+
* @example <propertyName>localizationResources</propertyName>
|
|
653
|
+
* // Set localization resources
|
|
654
|
+
* <TelerikReportViewer
|
|
655
|
+
* serviceUrl="api/reports/"
|
|
656
|
+
* reportSource={{ report: "Dashboard.trdp" }}
|
|
657
|
+
* localizationResources={{
|
|
658
|
+
* loadingFormats: "Loading...",
|
|
659
|
+
* loadingReport: "Loading report...",
|
|
660
|
+
* loadingParameters: "Loading parameters...",
|
|
661
|
+
* }}
|
|
662
|
+
* />
|
|
663
|
+
*
|
|
596
664
|
* @property {function} [ready] - A callback function that is called when the viewer content has been loaded from the template and is ready to display reports or perform any other operations.
|
|
597
665
|
* @example <propertyName>ready</propertyName>
|
|
598
666
|
* // Ready callback
|
|
@@ -654,11 +722,9 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
654
722
|
* serviceUrl="api/reports/"
|
|
655
723
|
* reportSource={{ report: "Dashboard.trdp" }}
|
|
656
724
|
* renderingBegin={(e, args) => {
|
|
657
|
-
* //
|
|
658
|
-
*
|
|
659
|
-
* args.deviceInfo["
|
|
660
|
-
* args.deviceInfo["CurrentUICulture"] = culture;
|
|
661
|
-
* console.log("About to render the report.");
|
|
725
|
+
* // Use deviceInfo to set a specific culture for rendering
|
|
726
|
+
* args.deviceInfo["CurrentCulture"] = "de-DE";
|
|
727
|
+
* args.deviceInfo["CurrentUICulture"] = "de-DE";
|
|
662
728
|
* }}
|
|
663
729
|
* />
|
|
664
730
|
*
|
|
@@ -865,7 +931,9 @@ class TelerikReportViewer extends _react.default.Component {
|
|
|
865
931
|
documentMapVisible: this.props.documentMapVisible,
|
|
866
932
|
documentMapAreaPosition: this.props.documentMapAreaPosition,
|
|
867
933
|
parametersAreaPosition: this.props.parametersAreaPosition,
|
|
868
|
-
keepClientAlive: keepClientAlive
|
|
934
|
+
keepClientAlive: keepClientAlive,
|
|
935
|
+
localizationResources: this.props.localizationResources,
|
|
936
|
+
wrapper: "react"
|
|
869
937
|
});
|
|
870
938
|
this.commands = this.viewerObject.commands;
|
|
871
939
|
}
|
|
@@ -875,7 +943,9 @@ class TelerikReportViewer extends _react.default.Component {
|
|
|
875
943
|
render() {
|
|
876
944
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
877
945
|
id: this.state.reportViewerID,
|
|
878
|
-
style:
|
|
946
|
+
style: {
|
|
947
|
+
...this.props.viewerContainerStyle
|
|
948
|
+
},
|
|
879
949
|
ref: el => this.el = el
|
|
880
950
|
});
|
|
881
951
|
}
|
|
@@ -912,7 +982,7 @@ class TelerikReportViewer extends _react.default.Component {
|
|
|
912
982
|
/**
|
|
913
983
|
* Sets the report source - report and parameters. Automatically reloads the report (if any) into the view.
|
|
914
984
|
* @function
|
|
915
|
-
* @param {{report: string, parameters: Object}}
|
|
985
|
+
* @param {{report: string, parameters: Object}} reportSource - The report source object to set. Object with properties: report (string) and parameters (JSON).
|
|
916
986
|
* @returns {TelerikReportViewer} The current ReportViewer object.
|
|
917
987
|
* @example
|
|
918
988
|
* // Set a new report source
|
|
@@ -921,8 +991,8 @@ class TelerikReportViewer extends _react.default.Component {
|
|
|
921
991
|
* parameters: { StartDate: "2024-01-01", EndDate: "2024-12-31" }
|
|
922
992
|
* });
|
|
923
993
|
*/
|
|
924
|
-
setReportSource(
|
|
925
|
-
return this.viewerObject.reportSource(
|
|
994
|
+
setReportSource(reportSource) {
|
|
995
|
+
return this.viewerObject.reportSource(reportSource);
|
|
926
996
|
}
|
|
927
997
|
|
|
928
998
|
/**
|
|
@@ -939,16 +1009,16 @@ class TelerikReportViewer extends _react.default.Component {
|
|
|
939
1009
|
}
|
|
940
1010
|
|
|
941
1011
|
/**
|
|
942
|
-
* Sets the view mode and automatically reloads the current report
|
|
1012
|
+
* Sets the view mode and automatically reloads the current report into the new view.
|
|
943
1013
|
* @function
|
|
944
|
-
* @param {string}
|
|
1014
|
+
* @param {string} viewMode - The view mode to set ("INTERACTIVE" or "PRINT_PREVIEW").
|
|
945
1015
|
* @returns {TelerikReportViewer} The current ReportViewer object.
|
|
946
1016
|
* @example
|
|
947
1017
|
* // Set view mode to print preview
|
|
948
1018
|
* reportViewerRef.current.setViewMode("PRINT_PREVIEW");
|
|
949
1019
|
*/
|
|
950
|
-
setViewMode(
|
|
951
|
-
return this.viewerObject.viewMode(
|
|
1020
|
+
setViewMode(viewMode) {
|
|
1021
|
+
return this.viewerObject.viewMode(viewMode);
|
|
952
1022
|
}
|
|
953
1023
|
|
|
954
1024
|
/**
|
|
@@ -1017,9 +1087,9 @@ class TelerikReportViewer extends _react.default.Component {
|
|
|
1017
1087
|
}
|
|
1018
1088
|
|
|
1019
1089
|
/**
|
|
1020
|
-
* Gets the shortcut keys used when the report viewer is in accessible mode (enableAccessibility=true).
|
|
1090
|
+
* Gets the shortcut keys used when the report viewer is in accessible mode (enableAccessibility={true}).
|
|
1021
1091
|
* @function
|
|
1022
|
-
* @returns {Object} The current accessibility key map.
|
|
1092
|
+
* @returns {Object|undefined} The current accessibility key map, or undefined if accessibility is not enabled.
|
|
1023
1093
|
* @example
|
|
1024
1094
|
* // Get accessibility key map
|
|
1025
1095
|
* const keyMap = reportViewerRef.current.getAccessibilityKeyMap();
|
|
@@ -1032,7 +1102,7 @@ class TelerikReportViewer extends _react.default.Component {
|
|
|
1032
1102
|
}
|
|
1033
1103
|
|
|
1034
1104
|
/**
|
|
1035
|
-
* Sets the shortcut keys used when the report viewer is in accessible mode.
|
|
1105
|
+
* Sets the shortcut keys used when the report viewer is in accessible mode. Set the new key map after the report rendering is complete, because the accessibility routines require the report viewer template to be loaded.
|
|
1036
1106
|
* @function
|
|
1037
1107
|
* @param {Object} keyMap - The key map object with keyboard shortcuts.
|
|
1038
1108
|
* @returns {TelerikReportViewer} The current ReportViewer object.
|
|
@@ -1116,14 +1186,14 @@ class TelerikReportViewer extends _react.default.Component {
|
|
|
1116
1186
|
/**
|
|
1117
1187
|
* Sets the page mode of the viewer.
|
|
1118
1188
|
* @function
|
|
1119
|
-
* @param {string}
|
|
1120
|
-
* @returns {
|
|
1189
|
+
* @param {string} pageMode - The page mode to set ("SINGLE_PAGE" or "CONTINUOUS_SCROLL").
|
|
1190
|
+
* @returns {TelerikReportViewer} The current ReportViewer object.
|
|
1121
1191
|
* @example
|
|
1122
1192
|
* // Set page mode to single page
|
|
1123
1193
|
* reportViewerRef.current.setPageMode("SINGLE_PAGE");
|
|
1124
1194
|
*/
|
|
1125
|
-
setPageMode(
|
|
1126
|
-
return this.viewerObject.pageMode(
|
|
1195
|
+
setPageMode(pageMode) {
|
|
1196
|
+
return this.viewerObject.pageMode(pageMode);
|
|
1127
1197
|
}
|
|
1128
1198
|
|
|
1129
1199
|
/**
|
|
@@ -1176,7 +1246,7 @@ var _default = exports.default = TelerikReportViewer;
|
|
|
1176
1246
|
* - checked(): Returns a boolean indicating if the command is in a checked state (for toggle commands).
|
|
1177
1247
|
*
|
|
1178
1248
|
* @typedef {Object} ReportViewerCommand
|
|
1179
|
-
* @property {Function} exec - Executes the command. Some commands accept parameters (see
|
|
1249
|
+
* @property {Function} exec - Executes the command. Some commands accept parameters (see each command's exec example).
|
|
1180
1250
|
* @property {Function} enabled - Returns whether the command is currently enabled.
|
|
1181
1251
|
* @property {Function} checked - Returns whether the command is in a checked state (for toggle commands).
|
|
1182
1252
|
*/
|
|
@@ -1184,357 +1254,297 @@ var _default = exports.default = TelerikReportViewer;
|
|
|
1184
1254
|
* Collection of all available commands for the report viewer. Each property is a command name mapped to a {@link ReportViewerCommand} instance.
|
|
1185
1255
|
*
|
|
1186
1256
|
* @typedef {Object} ReportViewerCommands
|
|
1187
|
-
|
|
1188
1257
|
* @property {ReportViewerCommand} historyBack - Goes back to the previously rendered report from history.
|
|
1189
1258
|
* @example <propertyName>historyBack</propertyName>
|
|
1190
|
-
* //
|
|
1191
|
-
*
|
|
1192
|
-
*
|
|
1193
|
-
* <>
|
|
1194
|
-
* <TelerikReportViewer />
|
|
1195
|
-
* <button onClick={() => viewer.commands.historyBack.exec()}>Back</button>
|
|
1196
|
-
* </>
|
|
1197
|
-
* );
|
|
1259
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1260
|
+
* // Navigate back to the previous report in history
|
|
1261
|
+
* reportViewerRef.current.commands.historyBack.exec();
|
|
1198
1262
|
* @example <propertyName>historyBack</propertyName>
|
|
1263
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1199
1264
|
* // Check if the command is enabled
|
|
1200
|
-
* const isEnabled =
|
|
1265
|
+
* const isEnabled = reportViewerRef.current.commands.historyBack.enabled();
|
|
1201
1266
|
* @example <propertyName>historyBack</propertyName>
|
|
1267
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1202
1268
|
* // Check if the command is checked
|
|
1203
|
-
* const isChecked =
|
|
1269
|
+
* const isChecked = reportViewerRef.current.commands.historyBack.checked();
|
|
1270
|
+
*
|
|
1204
1271
|
* @property {ReportViewerCommand} historyForward - Goes forward to the next rendered report from history.
|
|
1205
1272
|
* @example <propertyName>historyForward</propertyName>
|
|
1206
|
-
* //
|
|
1207
|
-
*
|
|
1208
|
-
*
|
|
1209
|
-
* <>
|
|
1210
|
-
* <TelerikReportViewer />
|
|
1211
|
-
* <button onClick={() => viewer.commands.historyForward.exec()}>Forward</button>
|
|
1212
|
-
* </>
|
|
1213
|
-
* );
|
|
1273
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1274
|
+
* // Navigate forward to the next report in history
|
|
1275
|
+
* reportViewerRef.current.commands.historyForward.exec();
|
|
1214
1276
|
* @example <propertyName>historyForward</propertyName>
|
|
1277
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1215
1278
|
* // Check if the command is enabled
|
|
1216
|
-
* const isEnabled =
|
|
1279
|
+
* const isEnabled = reportViewerRef.current.commands.historyForward.enabled();
|
|
1217
1280
|
* @example <propertyName>historyForward</propertyName>
|
|
1281
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1218
1282
|
* // Check if the command is checked
|
|
1219
|
-
* const isChecked =
|
|
1283
|
+
* const isChecked = reportViewerRef.current.commands.historyForward.checked();
|
|
1284
|
+
*
|
|
1220
1285
|
* @property {ReportViewerCommand} refresh - Refreshes the report.
|
|
1221
1286
|
* @example <propertyName>refresh</propertyName>
|
|
1222
|
-
* //
|
|
1223
|
-
*
|
|
1224
|
-
*
|
|
1225
|
-
* <>
|
|
1226
|
-
* <TelerikReportViewer />
|
|
1227
|
-
* <button onClick={() => viewer.commands.refresh.exec()}>Refresh</button>
|
|
1228
|
-
* </>
|
|
1229
|
-
* );
|
|
1287
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1288
|
+
* // Refresh the current report
|
|
1289
|
+
* reportViewerRef.current.commands.refresh.exec();
|
|
1230
1290
|
* @example <propertyName>refresh</propertyName>
|
|
1291
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1231
1292
|
* // Check if the command is enabled
|
|
1232
|
-
* const isEnabled =
|
|
1293
|
+
* const isEnabled = reportViewerRef.current.commands.refresh.enabled();
|
|
1233
1294
|
* @example <propertyName>refresh</propertyName>
|
|
1295
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1234
1296
|
* // Check if the command is checked
|
|
1235
|
-
* const isChecked =
|
|
1297
|
+
* const isChecked = reportViewerRef.current.commands.refresh.checked();
|
|
1298
|
+
*
|
|
1236
1299
|
* @property {ReportViewerCommand} goToFirstPage - Goes to the first page of the report.
|
|
1237
1300
|
* @example <propertyName>goToFirstPage</propertyName>
|
|
1238
|
-
* //
|
|
1239
|
-
*
|
|
1240
|
-
*
|
|
1241
|
-
* <>
|
|
1242
|
-
* <TelerikReportViewer />
|
|
1243
|
-
* <button onClick={() => viewer.commands.goToFirstPage.exec()}>First Page</button>
|
|
1244
|
-
* </>
|
|
1245
|
-
* );
|
|
1301
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1302
|
+
* // Navigate to the first page
|
|
1303
|
+
* reportViewerRef.current.commands.goToFirstPage.exec();
|
|
1246
1304
|
* @example <propertyName>goToFirstPage</propertyName>
|
|
1305
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1247
1306
|
* // Check if the command is enabled
|
|
1248
|
-
* const isEnabled =
|
|
1307
|
+
* const isEnabled = reportViewerRef.current.commands.goToFirstPage.enabled();
|
|
1249
1308
|
* @example <propertyName>goToFirstPage</propertyName>
|
|
1309
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1250
1310
|
* // Check if the command is checked
|
|
1251
|
-
* const isChecked =
|
|
1311
|
+
* const isChecked = reportViewerRef.current.commands.goToFirstPage.checked();
|
|
1312
|
+
*
|
|
1252
1313
|
* @property {ReportViewerCommand} goToPrevPage - Goes to the previous page of the report.
|
|
1253
1314
|
* @example <propertyName>goToPrevPage</propertyName>
|
|
1254
|
-
* //
|
|
1255
|
-
*
|
|
1256
|
-
*
|
|
1257
|
-
* <>
|
|
1258
|
-
* <TelerikReportViewer />
|
|
1259
|
-
* <button onClick={() => viewer.commands.goToPrevPage.exec()}>Previous</button>
|
|
1260
|
-
* </>
|
|
1261
|
-
* );
|
|
1315
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1316
|
+
* // Navigate to the previous page
|
|
1317
|
+
* reportViewerRef.current.commands.goToPrevPage.exec();
|
|
1262
1318
|
* @example <propertyName>goToPrevPage</propertyName>
|
|
1319
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1263
1320
|
* // Check if the command is enabled
|
|
1264
|
-
* const isEnabled =
|
|
1321
|
+
* const isEnabled = reportViewerRef.current.commands.goToPrevPage.enabled();
|
|
1265
1322
|
* @example <propertyName>goToPrevPage</propertyName>
|
|
1323
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1266
1324
|
* // Check if the command is checked
|
|
1267
|
-
* const isChecked =
|
|
1268
|
-
*
|
|
1325
|
+
* const isChecked = reportViewerRef.current.commands.goToPrevPage.checked();
|
|
1326
|
+
*
|
|
1327
|
+
* @property {ReportViewerCommand} goToPage - Goes to a specific page of the report. Pass the page number to exec().
|
|
1269
1328
|
* @example <propertyName>goToPage</propertyName>
|
|
1270
|
-
* //
|
|
1271
|
-
*
|
|
1272
|
-
*
|
|
1273
|
-
* <>
|
|
1274
|
-
* <TelerikReportViewer />
|
|
1275
|
-
* <button onClick={() => viewer.commands.goToPage.exec(5)}>Go to Page 5</button>
|
|
1276
|
-
* </>
|
|
1277
|
-
* );
|
|
1329
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1330
|
+
* // Navigate to page 5
|
|
1331
|
+
* reportViewerRef.current.commands.goToPage.exec(5);
|
|
1278
1332
|
* @example <propertyName>goToPage</propertyName>
|
|
1333
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1279
1334
|
* // Check if the command is enabled
|
|
1280
|
-
* const isEnabled =
|
|
1335
|
+
* const isEnabled = reportViewerRef.current.commands.goToPage.enabled();
|
|
1281
1336
|
* @example <propertyName>goToPage</propertyName>
|
|
1337
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1282
1338
|
* // Check if the command is checked
|
|
1283
|
-
* const isChecked =
|
|
1339
|
+
* const isChecked = reportViewerRef.current.commands.goToPage.checked();
|
|
1340
|
+
*
|
|
1284
1341
|
* @property {ReportViewerCommand} goToNextPage - Goes to the next page of the report.
|
|
1285
1342
|
* @example <propertyName>goToNextPage</propertyName>
|
|
1286
|
-
* //
|
|
1287
|
-
*
|
|
1288
|
-
*
|
|
1289
|
-
* <>
|
|
1290
|
-
* <TelerikReportViewer />
|
|
1291
|
-
* <button onClick={() => viewer.commands.goToNextPage.exec()}>Next</button>
|
|
1292
|
-
* </>
|
|
1293
|
-
* );
|
|
1343
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1344
|
+
* // Navigate to the next page
|
|
1345
|
+
* reportViewerRef.current.commands.goToNextPage.exec();
|
|
1294
1346
|
* @example <propertyName>goToNextPage</propertyName>
|
|
1347
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1295
1348
|
* // Check if the command is enabled
|
|
1296
|
-
* const isEnabled =
|
|
1349
|
+
* const isEnabled = reportViewerRef.current.commands.goToNextPage.enabled();
|
|
1297
1350
|
* @example <propertyName>goToNextPage</propertyName>
|
|
1351
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1298
1352
|
* // Check if the command is checked
|
|
1299
|
-
* const isChecked =
|
|
1353
|
+
* const isChecked = reportViewerRef.current.commands.goToNextPage.checked();
|
|
1354
|
+
*
|
|
1300
1355
|
* @property {ReportViewerCommand} goToLastPage - Goes to the last page of the report.
|
|
1301
1356
|
* @example <propertyName>goToLastPage</propertyName>
|
|
1302
|
-
* //
|
|
1303
|
-
*
|
|
1304
|
-
*
|
|
1305
|
-
* <>
|
|
1306
|
-
* <TelerikReportViewer />
|
|
1307
|
-
* <button onClick={() => viewer.commands.goToLastPage.exec()}>Last Page</button>
|
|
1308
|
-
* </>
|
|
1309
|
-
* );
|
|
1357
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1358
|
+
* // Navigate to the last page
|
|
1359
|
+
* reportViewerRef.current.commands.goToLastPage.exec();
|
|
1310
1360
|
* @example <propertyName>goToLastPage</propertyName>
|
|
1361
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1311
1362
|
* // Check if the command is enabled
|
|
1312
|
-
* const isEnabled =
|
|
1363
|
+
* const isEnabled = reportViewerRef.current.commands.goToLastPage.enabled();
|
|
1313
1364
|
* @example <propertyName>goToLastPage</propertyName>
|
|
1365
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1314
1366
|
* // Check if the command is checked
|
|
1315
|
-
* const isChecked =
|
|
1367
|
+
* const isChecked = reportViewerRef.current.commands.goToLastPage.checked();
|
|
1368
|
+
*
|
|
1316
1369
|
* @property {ReportViewerCommand} togglePrintPreview - Toggles between Print Preview and Interactive view modes.
|
|
1317
1370
|
* @example <propertyName>togglePrintPreview</propertyName>
|
|
1318
|
-
* //
|
|
1319
|
-
*
|
|
1320
|
-
*
|
|
1321
|
-
* <>
|
|
1322
|
-
* <TelerikReportViewer />
|
|
1323
|
-
* <button onClick={() => viewer.commands.togglePrintPreview.exec()}>Toggle Print Preview</button>
|
|
1324
|
-
* </>
|
|
1325
|
-
* );
|
|
1371
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1372
|
+
* // Toggle between Print Preview and Interactive modes
|
|
1373
|
+
* reportViewerRef.current.commands.togglePrintPreview.exec();
|
|
1326
1374
|
* @example <propertyName>togglePrintPreview</propertyName>
|
|
1375
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1327
1376
|
* // Check if the command is enabled
|
|
1328
|
-
* const isEnabled =
|
|
1377
|
+
* const isEnabled = reportViewerRef.current.commands.togglePrintPreview.enabled();
|
|
1329
1378
|
* @example <propertyName>togglePrintPreview</propertyName>
|
|
1330
|
-
* //
|
|
1331
|
-
*
|
|
1332
|
-
*
|
|
1379
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1380
|
+
* // Check if the command is checked (true when in Print Preview mode)
|
|
1381
|
+
* const isChecked = reportViewerRef.current.commands.togglePrintPreview.checked();
|
|
1382
|
+
*
|
|
1383
|
+
* @property {ReportViewerCommand} export - Exports the report. Pass the rendering extension name to exec() (e.g., "PDF", "XLSX", "CSV", "DOCX").
|
|
1384
|
+
* @example <propertyName>export</propertyName>
|
|
1385
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1386
|
+
* // Export the report as PDF
|
|
1387
|
+
* reportViewerRef.current.commands.export.exec("PDF");
|
|
1333
1388
|
* @example <propertyName>export</propertyName>
|
|
1334
|
-
* //
|
|
1335
|
-
* let viewer;
|
|
1336
|
-
* ReactDOM.render(
|
|
1337
|
-
* <>
|
|
1338
|
-
* <TelerikReportViewer />
|
|
1339
|
-
* <button onClick={() => viewer.commands.export.exec('PDF')}>Export PDF</button>
|
|
1340
|
-
* </>
|
|
1341
|
-
* );
|
|
1342
|
-
* @example <propertyName>export</propertyName>
|
|
1389
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1343
1390
|
* // Check if the command is enabled
|
|
1344
|
-
* const isEnabled =
|
|
1391
|
+
* const isEnabled = reportViewerRef.current.commands.export.enabled();
|
|
1345
1392
|
* @example <propertyName>export</propertyName>
|
|
1393
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1346
1394
|
* // Check if the command is checked
|
|
1347
|
-
* const isChecked =
|
|
1395
|
+
* const isChecked = reportViewerRef.current.commands.export.checked();
|
|
1396
|
+
*
|
|
1348
1397
|
* @property {ReportViewerCommand} print - Triggers the report printing.
|
|
1349
1398
|
* @example <propertyName>print</propertyName>
|
|
1350
|
-
* //
|
|
1351
|
-
*
|
|
1352
|
-
*
|
|
1353
|
-
* <>
|
|
1354
|
-
* <TelerikReportViewer />
|
|
1355
|
-
* <button onClick={() => viewer.commands.print.exec()}>Print</button>
|
|
1356
|
-
* </>
|
|
1357
|
-
* );
|
|
1399
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1400
|
+
* // Print the current report
|
|
1401
|
+
* reportViewerRef.current.commands.print.exec();
|
|
1358
1402
|
* @example <propertyName>print</propertyName>
|
|
1403
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1359
1404
|
* // Check if the command is enabled
|
|
1360
|
-
* const isEnabled =
|
|
1405
|
+
* const isEnabled = reportViewerRef.current.commands.print.enabled();
|
|
1361
1406
|
* @example <propertyName>print</propertyName>
|
|
1407
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1362
1408
|
* // Check if the command is checked
|
|
1363
|
-
* const isChecked =
|
|
1409
|
+
* const isChecked = reportViewerRef.current.commands.print.checked();
|
|
1410
|
+
*
|
|
1364
1411
|
* @property {ReportViewerCommand} toggleDocumentMap - Shows or hides the document map.
|
|
1365
1412
|
* @example <propertyName>toggleDocumentMap</propertyName>
|
|
1366
|
-
* //
|
|
1367
|
-
*
|
|
1368
|
-
*
|
|
1369
|
-
* <>
|
|
1370
|
-
* <TelerikReportViewer />
|
|
1371
|
-
* <button onClick={() => viewer.commands.toggleDocumentMap.exec()}>Toggle Document Map</button>
|
|
1372
|
-
* </>
|
|
1373
|
-
* );
|
|
1413
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1414
|
+
* // Toggle the document map visibility
|
|
1415
|
+
* reportViewerRef.current.commands.toggleDocumentMap.exec();
|
|
1374
1416
|
* @example <propertyName>toggleDocumentMap</propertyName>
|
|
1417
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1375
1418
|
* // Check if the command is enabled
|
|
1376
|
-
* const isEnabled =
|
|
1419
|
+
* const isEnabled = reportViewerRef.current.commands.toggleDocumentMap.enabled();
|
|
1377
1420
|
* @example <propertyName>toggleDocumentMap</propertyName>
|
|
1378
|
-
* //
|
|
1379
|
-
*
|
|
1421
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1422
|
+
* // Check if the command is checked (true when document map is visible)
|
|
1423
|
+
* const isChecked = reportViewerRef.current.commands.toggleDocumentMap.checked();
|
|
1424
|
+
*
|
|
1380
1425
|
* @property {ReportViewerCommand} toggleParametersArea - Shows or hides the parameters area.
|
|
1381
1426
|
* @example <propertyName>toggleParametersArea</propertyName>
|
|
1382
|
-
* //
|
|
1383
|
-
*
|
|
1384
|
-
*
|
|
1385
|
-
* <>
|
|
1386
|
-
* <TelerikReportViewer />
|
|
1387
|
-
* <button onClick={() => viewer.commands.toggleParametersArea.exec()}>Toggle Parameters</button>
|
|
1388
|
-
* </>
|
|
1389
|
-
* );
|
|
1427
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1428
|
+
* // Toggle the parameters area visibility
|
|
1429
|
+
* reportViewerRef.current.commands.toggleParametersArea.exec();
|
|
1390
1430
|
* @example <propertyName>toggleParametersArea</propertyName>
|
|
1431
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1391
1432
|
* // Check if the command is enabled
|
|
1392
|
-
* const isEnabled =
|
|
1433
|
+
* const isEnabled = reportViewerRef.current.commands.toggleParametersArea.enabled();
|
|
1393
1434
|
* @example <propertyName>toggleParametersArea</propertyName>
|
|
1394
|
-
* //
|
|
1395
|
-
*
|
|
1396
|
-
*
|
|
1435
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1436
|
+
* // Check if the command is checked (true when parameters area is visible)
|
|
1437
|
+
* const isChecked = reportViewerRef.current.commands.toggleParametersArea.checked();
|
|
1438
|
+
*
|
|
1439
|
+
* @property {ReportViewerCommand} zoomIn - Zooms in on the report.
|
|
1397
1440
|
* @example <propertyName>zoomIn</propertyName>
|
|
1398
|
-
* //
|
|
1399
|
-
*
|
|
1400
|
-
*
|
|
1401
|
-
* <>
|
|
1402
|
-
* <TelerikReportViewer />
|
|
1403
|
-
* <button onClick={() => viewer.commands.zoomIn.exec()}>Zoom In</button>
|
|
1404
|
-
* </>
|
|
1405
|
-
* );
|
|
1441
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1442
|
+
* // Zoom in on the report
|
|
1443
|
+
* reportViewerRef.current.commands.zoomIn.exec();
|
|
1406
1444
|
* @example <propertyName>zoomIn</propertyName>
|
|
1445
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1407
1446
|
* // Check if the command is enabled
|
|
1408
|
-
* const isEnabled =
|
|
1447
|
+
* const isEnabled = reportViewerRef.current.commands.zoomIn.enabled();
|
|
1409
1448
|
* @example <propertyName>zoomIn</propertyName>
|
|
1449
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1410
1450
|
* // Check if the command is checked
|
|
1411
|
-
* const isChecked =
|
|
1412
|
-
*
|
|
1451
|
+
* const isChecked = reportViewerRef.current.commands.zoomIn.checked();
|
|
1452
|
+
*
|
|
1453
|
+
* @property {ReportViewerCommand} zoomOut - Zooms out of the report.
|
|
1413
1454
|
* @example <propertyName>zoomOut</propertyName>
|
|
1414
|
-
* //
|
|
1415
|
-
*
|
|
1416
|
-
*
|
|
1417
|
-
* <>
|
|
1418
|
-
* <TelerikReportViewer />
|
|
1419
|
-
* <button onClick={() => viewer.commands.zoomOut.exec()}>Zoom Out</button>
|
|
1420
|
-
* </>
|
|
1421
|
-
* );
|
|
1455
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1456
|
+
* // Zoom out of the report
|
|
1457
|
+
* reportViewerRef.current.commands.zoomOut.exec();
|
|
1422
1458
|
* @example <propertyName>zoomOut</propertyName>
|
|
1459
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1423
1460
|
* // Check if the command is enabled
|
|
1424
|
-
* const isEnabled =
|
|
1461
|
+
* const isEnabled = reportViewerRef.current.commands.zoomOut.enabled();
|
|
1425
1462
|
* @example <propertyName>zoomOut</propertyName>
|
|
1463
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1426
1464
|
* // Check if the command is checked
|
|
1427
|
-
* const isChecked =
|
|
1428
|
-
*
|
|
1465
|
+
* const isChecked = reportViewerRef.current.commands.zoomOut.checked();
|
|
1466
|
+
*
|
|
1467
|
+
* @property {ReportViewerCommand} zoom - Zooms to a specified ratio. Pass the zoom ratio to exec() (e.g., 1.5 for 150%).
|
|
1429
1468
|
* @example <propertyName>zoom</propertyName>
|
|
1430
|
-
* //
|
|
1431
|
-
*
|
|
1432
|
-
*
|
|
1433
|
-
* <>
|
|
1434
|
-
* <TelerikReportViewer />
|
|
1435
|
-
* <button onClick={() => viewer.commands.zoom.exec(1.5)}>Zoom 150%</button>
|
|
1436
|
-
* </>
|
|
1437
|
-
* );
|
|
1469
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1470
|
+
* // Zoom to 150%
|
|
1471
|
+
* reportViewerRef.current.commands.zoom.exec(1.5);
|
|
1438
1472
|
* @example <propertyName>zoom</propertyName>
|
|
1473
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1439
1474
|
* // Check if the command is enabled
|
|
1440
|
-
* const isEnabled =
|
|
1475
|
+
* const isEnabled = reportViewerRef.current.commands.zoom.enabled();
|
|
1441
1476
|
* @example <propertyName>zoom</propertyName>
|
|
1477
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1442
1478
|
* // Check if the command is checked
|
|
1443
|
-
* const isChecked =
|
|
1444
|
-
*
|
|
1479
|
+
* const isChecked = reportViewerRef.current.commands.zoom.checked();
|
|
1480
|
+
*
|
|
1481
|
+
* @property {ReportViewerCommand} toggleZoomMode - Cycles the zoom mode of the report between FIT_PAGE_WIDTH, FIT_PAGE, and SPECIFIC.
|
|
1445
1482
|
* @example <propertyName>toggleZoomMode</propertyName>
|
|
1446
|
-
* //
|
|
1447
|
-
*
|
|
1448
|
-
*
|
|
1449
|
-
* <>
|
|
1450
|
-
* <TelerikReportViewer />
|
|
1451
|
-
* <button onClick={() => viewer.commands.toggleZoomMode.exec()}>Toggle Zoom Mode</button>
|
|
1452
|
-
* </>
|
|
1453
|
-
* );
|
|
1483
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1484
|
+
* // Cycle to the next zoom mode
|
|
1485
|
+
* reportViewerRef.current.commands.toggleZoomMode.exec();
|
|
1454
1486
|
* @example <propertyName>toggleZoomMode</propertyName>
|
|
1487
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1455
1488
|
* // Check if the command is enabled
|
|
1456
|
-
* const isEnabled =
|
|
1489
|
+
* const isEnabled = reportViewerRef.current.commands.toggleZoomMode.enabled();
|
|
1457
1490
|
* @example <propertyName>toggleZoomMode</propertyName>
|
|
1491
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1458
1492
|
* // Check if the command is checked
|
|
1459
|
-
* const isChecked =
|
|
1460
|
-
*
|
|
1461
|
-
* @example <propertyName>toggleSideMenu</propertyName>
|
|
1462
|
-
* // Execute the command
|
|
1463
|
-
* let viewer;
|
|
1464
|
-
* ReactDOM.render(
|
|
1465
|
-
* <>
|
|
1466
|
-
* <TelerikReportViewer />
|
|
1467
|
-
* <button onClick={() => viewer.commands.toggleSideMenu.exec()}>Toggle Side Menu</button>
|
|
1468
|
-
* </>
|
|
1469
|
-
* );
|
|
1470
|
-
* @example <propertyName>toggleSideMenu</propertyName>
|
|
1471
|
-
* // Check if the command is enabled
|
|
1472
|
-
* const isEnabled = viewer.commands.toggleSideMenu.enabled();
|
|
1473
|
-
* @example <propertyName>toggleSideMenu</propertyName>
|
|
1474
|
-
* // Check if the command is checked
|
|
1475
|
-
* const isChecked = viewer.commands.toggleSideMenu.checked();
|
|
1493
|
+
* const isChecked = reportViewerRef.current.commands.toggleZoomMode.checked();
|
|
1494
|
+
*
|
|
1476
1495
|
* @property {ReportViewerCommand} toggleSearchDialog - Shows or hides the search dialog.
|
|
1477
1496
|
* @example <propertyName>toggleSearchDialog</propertyName>
|
|
1478
|
-
* //
|
|
1479
|
-
*
|
|
1480
|
-
*
|
|
1481
|
-
* <>
|
|
1482
|
-
* <TelerikReportViewer />
|
|
1483
|
-
* <button onClick={() => viewer.commands.toggleSearchDialog.exec()}>Toggle Search</button>
|
|
1484
|
-
* </>
|
|
1485
|
-
* );
|
|
1497
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1498
|
+
* // Toggle the search dialog visibility
|
|
1499
|
+
* reportViewerRef.current.commands.toggleSearchDialog.exec();
|
|
1486
1500
|
* @example <propertyName>toggleSearchDialog</propertyName>
|
|
1501
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1487
1502
|
* // Check if the command is enabled
|
|
1488
|
-
* const isEnabled =
|
|
1503
|
+
* const isEnabled = reportViewerRef.current.commands.toggleSearchDialog.enabled();
|
|
1489
1504
|
* @example <propertyName>toggleSearchDialog</propertyName>
|
|
1490
|
-
* //
|
|
1491
|
-
*
|
|
1505
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1506
|
+
* // Check if the command is checked (true when search dialog is visible)
|
|
1507
|
+
* const isChecked = reportViewerRef.current.commands.toggleSearchDialog.checked();
|
|
1508
|
+
*
|
|
1492
1509
|
* @property {ReportViewerCommand} stopRendering - Stops the rendering of the current report.
|
|
1493
1510
|
* @example <propertyName>stopRendering</propertyName>
|
|
1494
|
-
* //
|
|
1495
|
-
*
|
|
1496
|
-
*
|
|
1497
|
-
* <>
|
|
1498
|
-
* <TelerikReportViewer />
|
|
1499
|
-
* <button onClick={() => viewer.commands.stopRendering.exec()}>Stop Rendering</button>
|
|
1500
|
-
* </>
|
|
1501
|
-
* );
|
|
1511
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1512
|
+
* // Stop the current report rendering
|
|
1513
|
+
* reportViewerRef.current.commands.stopRendering.exec();
|
|
1502
1514
|
* @example <propertyName>stopRendering</propertyName>
|
|
1515
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1503
1516
|
* // Check if the command is enabled
|
|
1504
|
-
* const isEnabled =
|
|
1517
|
+
* const isEnabled = reportViewerRef.current.commands.stopRendering.enabled();
|
|
1505
1518
|
* @example <propertyName>stopRendering</propertyName>
|
|
1519
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1506
1520
|
* // Check if the command is checked
|
|
1507
|
-
* const isChecked =
|
|
1521
|
+
* const isChecked = reportViewerRef.current.commands.stopRendering.checked();
|
|
1522
|
+
*
|
|
1508
1523
|
* @property {ReportViewerCommand} toggleSendEmailDialog - Shows or hides the send email dialog.
|
|
1509
1524
|
* @example <propertyName>toggleSendEmailDialog</propertyName>
|
|
1510
|
-
* //
|
|
1511
|
-
*
|
|
1512
|
-
*
|
|
1513
|
-
* <>
|
|
1514
|
-
* <TelerikReportViewer />
|
|
1515
|
-
* <button onClick={() => viewer.commands.toggleSendEmailDialog.exec()}>Toggle Send Email</button>
|
|
1516
|
-
* </>
|
|
1517
|
-
* );
|
|
1525
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1526
|
+
* // Toggle the send email dialog visibility
|
|
1527
|
+
* reportViewerRef.current.commands.toggleSendEmailDialog.exec();
|
|
1518
1528
|
* @example <propertyName>toggleSendEmailDialog</propertyName>
|
|
1529
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1519
1530
|
* // Check if the command is enabled
|
|
1520
|
-
* const isEnabled =
|
|
1531
|
+
* const isEnabled = reportViewerRef.current.commands.toggleSendEmailDialog.enabled();
|
|
1521
1532
|
* @example <propertyName>toggleSendEmailDialog</propertyName>
|
|
1522
|
-
* //
|
|
1523
|
-
*
|
|
1533
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1534
|
+
* // Check if the command is checked (true when send email dialog is visible)
|
|
1535
|
+
* const isChecked = reportViewerRef.current.commands.toggleSendEmailDialog.checked();
|
|
1536
|
+
*
|
|
1524
1537
|
* @property {ReportViewerCommand} toggleAiPromptDialog - Shows or hides the AI prompt dialog.
|
|
1525
1538
|
* @example <propertyName>toggleAiPromptDialog</propertyName>
|
|
1526
|
-
* //
|
|
1527
|
-
*
|
|
1528
|
-
*
|
|
1529
|
-
* <>
|
|
1530
|
-
* <TelerikReportViewer />
|
|
1531
|
-
* <button onClick={() => viewer.commands.toggleAiPromptDialog.exec()}>Toggle AI Prompt</button>
|
|
1532
|
-
* </>
|
|
1533
|
-
* );
|
|
1539
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1540
|
+
* // Toggle the AI prompt dialog visibility
|
|
1541
|
+
* reportViewerRef.current.commands.toggleAiPromptDialog.exec();
|
|
1534
1542
|
* @example <propertyName>toggleAiPromptDialog</propertyName>
|
|
1543
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1535
1544
|
* // Check if the command is enabled
|
|
1536
|
-
* const isEnabled =
|
|
1545
|
+
* const isEnabled = reportViewerRef.current.commands.toggleAiPromptDialog.enabled();
|
|
1537
1546
|
* @example <propertyName>toggleAiPromptDialog</propertyName>
|
|
1538
|
-
* //
|
|
1539
|
-
*
|
|
1547
|
+
* // Assume reportViewerRef = useRef(null) and pass it to the component ref prop.
|
|
1548
|
+
* // Check if the command is checked (true when AI prompt dialog is visible)
|
|
1549
|
+
* const isChecked = reportViewerRef.current.commands.toggleAiPromptDialog.checked();
|
|
1540
1550
|
*/
|