@mescius/activereportsnet-viewer 18.0.1 → 18.1.1

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.
@@ -1,1706 +1,1708 @@
1
- declare class Color {
2
- R: number;
3
- G: number;
4
- B: number;
5
- A: number | undefined;
6
- constructor(r: number, g: number, b: number, a?: number | undefined);
7
- static fromHEX(color: string): Color;
8
- }
9
- type UITheme<T extends Record<string, string> = Record<string, string>> = {
10
- name: string;
11
- accent: Color;
12
- accentText: Color;
13
- accentSecondary: Color;
14
- accentWarning: Color;
15
- accentWarningText?: Color;
16
- accentError: Color;
17
- accentErrorText?: Color;
18
- colorContrast: Color;
19
- colorContrastText: Color;
20
- backgroundBody: Color;
21
- backgroundBodyOverlay?: Color;
22
- backgroundPanels: Color;
23
- backgroundPanelsSection?: Color;
24
- backgroundPanelsBorder?: Color;
25
- backgroundPanelsOverlay?: Color;
26
- shadow: string;
27
- shadowBorder: string;
28
- overlay: Color;
29
- textColor: Color;
30
- textFamily?: string;
31
- borderRadius: number;
32
- elemBackground: Color;
33
- elemBackgroundHover: Color;
34
- btnGroupHeader: Color;
35
- btnGroupHeaderHover: Color;
36
- dropdownBackground: Color;
37
- dropdownBackgroundHover?: Color;
38
- dropdownBorder?: Color;
39
- bindingModified?: Color;
40
- bindingBound?: Color;
41
- custom?: T;
42
- };
43
- declare const UIThemes: {
44
- default: UITheme<Record<string, string>> | undefined;
45
- defaultDark: UITheme<Record<string, string>> | undefined;
46
- darkOled: UITheme<Record<string, string>> | undefined;
47
- highContrast: UITheme<Record<string, string>> | undefined;
48
- highContrastDark: UITheme<Record<string, string>> | undefined;
1
+ declare class Color {
2
+ R: number;
3
+ G: number;
4
+ B: number;
5
+ A: number | undefined;
6
+ constructor(r: number, g: number, b: number, a?: number | undefined);
7
+ static fromHEX(color: string): Color;
8
+ }
9
+ type UITheme$1<T extends Record<string, string> = Record<string, string>> = {
10
+ name: string;
11
+ accent: Color;
12
+ accentText: Color;
13
+ accentSecondary: Color;
14
+ accentWarning: Color;
15
+ accentWarningText?: Color;
16
+ accentError: Color;
17
+ accentErrorText?: Color;
18
+ colorContrast: Color;
19
+ colorContrastText: Color;
20
+ backgroundBody: Color;
21
+ backgroundBodyOverlay?: Color;
22
+ backgroundPanels: Color;
23
+ backgroundPanelsSection?: Color;
24
+ backgroundPanelsBorder?: Color;
25
+ backgroundPanelsOverlay?: Color;
26
+ shadow: string;
27
+ shadowBorder: string;
28
+ overlay: Color;
29
+ textColor: Color;
30
+ textFamily?: string;
31
+ borderRadius: number;
32
+ elemBackground: Color;
33
+ elemBackgroundHover: Color;
34
+ btnGroupHeader: Color;
35
+ btnGroupHeaderHover: Color;
36
+ dropdownBackground: Color;
37
+ dropdownBackgroundHover?: Color;
38
+ dropdownBorder?: Color;
39
+ bindingModified?: Color;
40
+ bindingBound?: Color;
41
+ custom?: T;
42
+ };
43
+ declare const UIThemes: {
44
+ default: UITheme$1<Record<string, string>> | undefined;
45
+ defaultDark: UITheme$1<Record<string, string>> | undefined;
46
+ darkOled: UITheme$1<Record<string, string>> | undefined;
47
+ highContrast: UITheme$1<Record<string, string>> | undefined;
48
+ highContrastDark: UITheme$1<Record<string, string>> | undefined;
49
49
  };
50
50
 
51
- /** Type representing a viewer's sidebar instance. */
52
- interface Sidebar {
53
- /**
54
- * Toggles the sidebar visibility.
55
- * @param show Pass **true** to switch sidebar ON, and vise-versa. Do not pass any value to toggle visibility.
56
- * @example Usage example:
57
- * ```javascript
58
- * viewer.sidebar.toggle(false); // hide sidebar
59
- * ```
60
- */
61
- toggle: (show?: boolean) => void;
51
+ /** Type representing a viewer's sidebar instance. */
52
+ interface Sidebar {
53
+ /**
54
+ * Toggles the sidebar visibility.
55
+ * @param show Pass **true** to switch sidebar ON, and vise-versa. Do not pass any value to toggle visibility.
56
+ * @example Usage example:
57
+ * ```javascript
58
+ * viewer.sidebar.toggle(false); // hide sidebar
59
+ * ```
60
+ */
61
+ toggle: (show?: boolean) => void;
62
62
  }
63
63
 
64
- /**
65
- * Default toolbar buttons.
66
- * @example Usage example:
67
- * ```javascript
68
- * viewer.toolbar.desktop.layout([ToolbarButtons.Refresh, ToolbarButtons.Zoom, ToolbarButtons.Print]);
69
- * ```
70
- */
71
- declare enum ToolbarButtons {
72
- /** Toolbar items splitter. */
73
- Splitter = "$split",
74
- /** Pages navigation buttons group. */
75
- Navigation = "$navigation",
76
- /** Refresh report. */
77
- Refresh = "$refresh",
78
- /** Zoom controls group. */
79
- Zoom = "$zoom",
80
- /** Move tool button. */
81
- MouseMode = "$mousemode",
82
- /** Fullscreen switcher button. */
83
- Fullscreen = "$fullscreen",
84
- /** 'Go back', 'Go forward', 'Back to parent' buttons group. */
85
- History = "$history",
86
- /** Single page mode switcher button. */
87
- SinglePageMode = "$singlepagemode",
88
- /** Continuous mode switcher button. */
89
- ContiniousMode = "$continuousmode",
90
- /** Galley mode switcher button. */
91
- GalleyMode = "$galleymode",
92
- /** 'Print' button. */
93
- Print = "$print"
94
- }
95
- /**
96
- * Type representing a viewer's toolbar item.
97
- * @example Usage example:
98
- * ```javascript
99
- * var pdfExportButton: ToolbarItem = {
100
- * key: '$pdfExportButtonKey',
101
- * checked: true,
102
- * enabled: true,
103
- * iconCssClass: 'mdi mdi-file-pdf',
104
- * text: 'Export to PDF',
105
- * title: 'Export to PDF',
106
- * action: function(item) {
107
- * console.log('Export to PDF function works here');
108
- * },
109
- * onUpdate: function(arg, item) {
110
- * console.log('Something in viewer was updated, check/update button state here');
111
- * }
112
- * };
113
- * viewer.toolbar.desktop.addItem(pdfExportButton);
114
- * ```
115
- */
116
- interface ToolbarItem {
117
- /**
118
- * The uniq identifier of the toolbar item.
119
- * See keys of the standard viewer's toolbar buttons here: [[ToolbarButtons]]
120
- */
121
- key: string;
122
- /** Shows whether the toolbar item is checked. */
123
- checked?: boolean;
124
- /** Shows whether the toolbar item is enabled. */
125
- enabled?: boolean;
126
- /** Specifies css class for the icon of the toolbar item. */
127
- iconCssClass?: string;
128
- /** Specifies the text of the toolbar item. */
129
- text?: string;
130
- /** Specifies the tooltip of the toolbar item. */
131
- title?: string;
132
- /** Action handler for the toolbar item. */
133
- action: () => void;
134
- /** The function called to update toolbar item state. */
135
- onUpdate: () => ToolbarItem;
136
- }
137
- interface ToolbarItems {
138
- /** Adds a new item to the toolbar.
139
- * @param item An item to be added.
140
- * @example Usage example:
141
- * ```javascript
142
- * var pdfExportButton = {
143
- * key: '$pdfExportButtonKey',
144
- * iconCssClass: 'mdi mdi-file-pdf',
145
- * enabled: true,
146
- * action: function(item) {
147
- * console.log('Export to PDF function works here');
148
- * },
149
- * onUpdate: function(arg, item) {
150
- * console.log('Something in viewer was updated, check/update button state here');
151
- * }
152
- * };
153
- * viewer.toolbar.desktop.addItem(pdfExportButton);
154
- * ```
155
- */
156
- addItem: (item: ToolbarItem) => void;
157
- /** Updates a previously added toolbar item.
158
- *
159
- * @param key the toolbar item key, as it was specified in the addItem parameters.
160
- * @param itemUpdate New toolbar item settings.
161
- */
162
- updateItem: (key: string, itemUpdate: ToolbarItem) => void;
163
- /** Removes existing item from the toolbar.
164
- * @param key The toolbar item key, as it was specified in the addItem parameters.
165
- * @example Usage example:
166
- * ```javascript
167
- * viewer.toolbar.desktop.removeItem(pdfExportButton);
168
- * ```
169
- */
170
- removeItem: (key: string) => void;
171
- /**
172
- * Returns identifiers of default and added buttons in the order in which they will be displayed in the toolbar.
173
- * @example Usage example:
174
- * ```javascript
175
- * viewer.toolbar.desktop.layout(viewer.toolbar.desktop.getKeys().reverse())
176
- * ```
177
- */
178
- getKeys: () => string[];
179
- /** Sets the keys of the visible toolbar items and their order.
180
- * @param keys The array of the keys of toolbar items to be visible on toolbar in the desired order.
181
- * @example Usage example:
182
- * ```javascript
183
- * viewer.toolbar.desktop.addItem(pdfExportButton);
184
- * // now you want to remove everything except pdfExportButton and the navigation block.
185
- * viewer.toolbar.desktop.layout(['$pdfExportButtonKey', '$navigation']);
186
- * ```
187
- * will create a toolbar with the export button and the "navigation" block.
188
- */
189
- layout: (keys: string[]) => void;
190
- }
191
- /** Type representing a viewer's toolbar instance. */
192
- interface Toolbar {
193
- /**
194
- * Toggles the toolbar visibility.
195
- * @param show Pass **true** to switch toolbar ON, and vise-versa. Do not pass any value to toggle visibility.
196
- * @example Usage example:
197
- * ```javascript
198
- * viewer.toolbar.toggle(false); // hide toolbar
199
- * ```
200
- */
201
- toggle: (show?: boolean) => void;
202
- /**
203
- * Desktop layout toolbar items.
204
- * @example Usage example:
205
- * ```javascript
206
- * viewer.toolbar.desktop.addItem({
207
- * key: 'coolButton',
208
- * title: 'Cool Button',
209
- * iconCssClass: 'mdi mdi-emoticon-cool',
210
- * action: () => {
211
- * console.log('Cool!');
212
- * }}
213
- * )
214
- * ```
215
- */
216
- desktop: ToolbarItems;
217
- /**
218
- * Mobile layout toolbar items.
219
- * @example Usage example:
220
- * ```javascript
221
- * viewer.toolbar.mobile.addItem({
222
- * key: 'pizzaButton',
223
- * title: 'Cool Pizza',
224
- * iconCssClass: 'mdi mdi-pizza',
225
- * action: () => {
226
- * console.log('Pizza Time!');
227
- * }}
228
- * )
229
- * ```
230
- */
231
- mobile: ToolbarItems;
232
- /**
233
- * Fullscreen mode toolbar items.
234
- * @example Usage example:
235
- * ```javascript
236
- * viewer.toolbar.fullscreen.addItem({
237
- * key: 'fishButton',
238
- * title: 'Fish',
239
- * iconCssClass: 'mdi mdi-fish',
240
- * action: () => {
241
- * console.log('Just a fish.');
242
- * }}
243
- * )
244
- * ```
245
- */
246
- fullscreen: ToolbarItems;
64
+ /**
65
+ * Default toolbar buttons.
66
+ * @example Usage example:
67
+ * ```javascript
68
+ * viewer.toolbar.desktop.layout([ToolbarButtons.Refresh, ToolbarButtons.Zoom, ToolbarButtons.Print]);
69
+ * ```
70
+ */
71
+ declare enum ToolbarButtons {
72
+ /** Toolbar items splitter. */
73
+ Splitter = "$split",
74
+ /** Pages navigation buttons group. */
75
+ Navigation = "$navigation",
76
+ /** Refresh report. */
77
+ Refresh = "$refresh",
78
+ /** Zoom controls group. */
79
+ Zoom = "$zoom",
80
+ /** Move tool button. */
81
+ MouseMode = "$mousemode",
82
+ /** Fullscreen switcher button. */
83
+ Fullscreen = "$fullscreen",
84
+ /** 'Go back', 'Go forward', 'Back to parent' buttons group. */
85
+ History = "$history",
86
+ /** Single page mode switcher button. */
87
+ SinglePageMode = "$singlepagemode",
88
+ /** Continuous mode switcher button. */
89
+ ContiniousMode = "$continuousmode",
90
+ /** Galley mode switcher button. */
91
+ GalleyMode = "$galleymode",
92
+ /** 'Print' button. */
93
+ Print = "$print"
94
+ }
95
+ /**
96
+ * Type representing a viewer's toolbar item.
97
+ * @example Usage example:
98
+ * ```javascript
99
+ * var pdfExportButton: ToolbarItem = {
100
+ * key: '$pdfExportButtonKey',
101
+ * checked: true,
102
+ * enabled: true,
103
+ * iconCssClass: 'mdi mdi-file-pdf',
104
+ * text: 'Export to PDF',
105
+ * title: 'Export to PDF',
106
+ * action: function(item) {
107
+ * console.log('Export to PDF function works here');
108
+ * },
109
+ * onUpdate: function(arg, item) {
110
+ * console.log('Something in viewer was updated, check/update button state here');
111
+ * }
112
+ * };
113
+ * viewer.toolbar.desktop.addItem(pdfExportButton);
114
+ * ```
115
+ */
116
+ interface ToolbarItem {
117
+ /**
118
+ * The uniq identifier of the toolbar item.
119
+ * See keys of the standard viewer's toolbar buttons here: [[ToolbarButtons]]
120
+ */
121
+ key: string;
122
+ /** Shows whether the toolbar item is checked. */
123
+ checked?: boolean;
124
+ /** Shows whether the toolbar item is enabled. */
125
+ enabled?: boolean;
126
+ /** Specifies css class for the icon of the toolbar item. */
127
+ iconCssClass?: string;
128
+ /** Specifies the text of the toolbar item. */
129
+ text?: string;
130
+ /** Specifies the tooltip of the toolbar item. */
131
+ title?: string;
132
+ /** Action handler for the toolbar item. */
133
+ action: () => void;
134
+ /** The function called to update toolbar item state. */
135
+ onUpdate: () => ToolbarItem;
136
+ }
137
+ interface ToolbarItems {
138
+ /** Adds a new item to the toolbar.
139
+ * @param item An item to be added.
140
+ * @example Usage example:
141
+ * ```javascript
142
+ * var pdfExportButton = {
143
+ * key: '$pdfExportButtonKey',
144
+ * iconCssClass: 'mdi mdi-file-pdf',
145
+ * enabled: true,
146
+ * action: function(item) {
147
+ * console.log('Export to PDF function works here');
148
+ * },
149
+ * onUpdate: function(arg, item) {
150
+ * console.log('Something in viewer was updated, check/update button state here');
151
+ * }
152
+ * };
153
+ * viewer.toolbar.desktop.addItem(pdfExportButton);
154
+ * ```
155
+ */
156
+ addItem: (item: ToolbarItem) => void;
157
+ /** Updates a previously added toolbar item.
158
+ *
159
+ * @param key the toolbar item key, as it was specified in the addItem parameters.
160
+ * @param itemUpdate New toolbar item settings.
161
+ */
162
+ updateItem: (key: string, itemUpdate: ToolbarItem) => void;
163
+ /** Removes existing item from the toolbar.
164
+ * @param key The toolbar item key, as it was specified in the addItem parameters.
165
+ * @example Usage example:
166
+ * ```javascript
167
+ * viewer.toolbar.desktop.removeItem(pdfExportButton);
168
+ * ```
169
+ */
170
+ removeItem: (key: string) => void;
171
+ /**
172
+ * Returns identifiers of default and added buttons in the order in which they will be displayed in the toolbar.
173
+ * @example Usage example:
174
+ * ```javascript
175
+ * viewer.toolbar.desktop.layout(viewer.toolbar.desktop.getKeys().reverse())
176
+ * ```
177
+ */
178
+ getKeys: () => string[];
179
+ /** Sets the keys of the visible toolbar items and their order.
180
+ * @param keys The array of the keys of toolbar items to be visible on toolbar in the desired order.
181
+ * @example Usage example:
182
+ * ```javascript
183
+ * viewer.toolbar.desktop.addItem(pdfExportButton);
184
+ * // now you want to remove everything except pdfExportButton and the navigation block.
185
+ * viewer.toolbar.desktop.layout(['$pdfExportButtonKey', '$navigation']);
186
+ * ```
187
+ * will create a toolbar with the export button and the "navigation" block.
188
+ */
189
+ layout: (keys: string[]) => void;
247
190
  }
191
+ /** Type representing a viewer's toolbar instance. */
192
+ interface Toolbar {
193
+ /**
194
+ * Toggles the toolbar visibility.
195
+ * @param show Pass **true** to switch toolbar ON, and vise-versa. Do not pass any value to toggle visibility.
196
+ * @example Usage example:
197
+ * ```javascript
198
+ * viewer.toolbar.toggle(false); // hide toolbar
199
+ * ```
200
+ */
201
+ toggle: (show?: boolean) => void;
202
+ /**
203
+ * Desktop layout toolbar items.
204
+ * @example Usage example:
205
+ * ```javascript
206
+ * viewer.toolbar.desktop.addItem({
207
+ * key: 'coolButton',
208
+ * title: 'Cool Button',
209
+ * iconCssClass: 'mdi mdi-emoticon-cool',
210
+ * action: () => {
211
+ * console.log('Cool!');
212
+ * }}
213
+ * )
214
+ * ```
215
+ */
216
+ desktop: ToolbarItems;
217
+ /**
218
+ * Mobile layout toolbar items.
219
+ * @example Usage example:
220
+ * ```javascript
221
+ * viewer.toolbar.mobile.addItem({
222
+ * key: 'pizzaButton',
223
+ * title: 'Cool Pizza',
224
+ * iconCssClass: 'mdi mdi-pizza',
225
+ * action: () => {
226
+ * console.log('Pizza Time!');
227
+ * }}
228
+ * )
229
+ * ```
230
+ */
231
+ mobile: ToolbarItems;
232
+ /**
233
+ * Fullscreen mode toolbar items.
234
+ * @example Usage example:
235
+ * ```javascript
236
+ * viewer.toolbar.fullscreen.addItem({
237
+ * key: 'fishButton',
238
+ * title: 'Fish',
239
+ * iconCssClass: 'mdi mdi-fish',
240
+ * action: () => {
241
+ * console.log('Just a fish.');
242
+ * }}
243
+ * )
244
+ * ```
245
+ */
246
+ fullscreen: ToolbarItems;
247
+ }
248
+
249
+ type UITheme = UITheme$1;
248
250
 
249
- /** Report types. */
250
- declare enum ReportType {
251
- Section = 0,
252
- Page = 1,
253
- Rdl = 2
254
- }
255
- /** All supported exports. */
256
- type ExportTypes = 'Pdf' | 'Xlsx' | 'Xls' | 'Doc' | 'Docx' | 'Rtf' | 'Json' | 'Xml' | 'Csv' | 'Txt' | 'Tiff' | 'Mht' | 'XlsxData' | 'CsvData' | 'TextPrint';
257
- /** Describes the parameter value. */
258
- interface ParameterValue {
259
- label: string;
260
- value: any;
261
- }
262
- /** Describes the parameter. */
263
- interface ParameterDescriptor {
264
- name: string;
265
- prompt: string;
266
- dataType: any;
267
- selectAllValue: any;
268
- allowBlank: boolean;
269
- nullable: boolean;
270
- multiValue: boolean;
271
- multiline: boolean;
272
- hidden: boolean;
273
- usedInQuery: boolean;
274
- dateOnly: boolean;
275
- dependsOn: string[];
276
- validValues: ParameterValue;
277
- defaultValue: ParameterValue;
278
- displayFormat: string;
279
- actualDefaultValues: ParameterValue[];
280
- }
281
- /** Describes the report. */
282
- interface ReportInfo {
283
- /** The name of the report. */
284
- name: string;
285
- /** The parameters of the report. */
286
- parameters: ParameterDescriptor[];
287
- /** Contains layout for custom parameters panel. */
288
- parametersView: string;
289
- /** The display type of the report. */
290
- displayType: ViewMode;
291
- /** Indicates whether GalleyMode is allowed. */
292
- galleyModeAllowed: boolean;
293
- /** The size type of the report. */
294
- sizeType: SizeType;
295
- /** Export types available for a given report. */
296
- exports: ExportTypes[];
297
- /**The type of the report. */
298
- type: ReportType;
299
- /** The preffered type of viewer to use. */
300
- viewerType: ViewerType;
301
- /** List of report section names*/
302
- sections: string[];
303
- }
304
- /**
305
- * Report:
306
- * Uses standard UI and default rendering settings
307
- * Dashboard:
308
- * Uses dashboard UI and dashboard rendering settings, which include:
309
- * rendering all pages in galley mode, with report background color as viewer area background
310
- */
311
- type ViewerType = 'Report' | 'Dashboard';
312
- /** All supported paging modes. */
313
- type ViewMode = 'Single' | 'Continuous';
314
- /** Report render modes. */
315
- type RenderMode = 'Paginated' | 'Galley';
316
- /** Report render backend. */
317
- type RenderFormat = 'auto' | 'html' | 'svg';
318
- /** All supported size types. */
319
- type SizeType = 'Default' | 'FitToWidth' | 'FitToPage' | 'Stretch';
320
- /** Describes the initial zoom percentage value. */
321
- type Percentage = {
322
- percentage: number;
323
- };
324
- /** All supported initial zoom modes. */
325
- type InitialZoomMode = 'FitToPage' | 'FitToWidth' | Percentage;
326
- /** Export callback */
327
- type ExportCallback = (uri: string) => void;
328
- /** Describes the parameter value used to run the report. */
329
- interface Parameter {
330
- /** The name of the parameter. */
331
- name: string;
332
- /** The value(s) of the parameter. */
333
- values: string[];
334
- }
335
- /** Describes the search options. */
336
- interface SearchOptions {
337
- /** Whether the search should respect the case. */
338
- matchCase: boolean;
339
- /** Whether the search should look for a whole phrase. */
340
- wholePhrase: boolean;
341
- }
342
- /** Describes the error severity. */
343
- type ErrorSeverity = 'error' | 'warn' | 'info' | 'debug';
344
- /** Describes the error. */
345
- interface ErrorInfo {
346
- /** Error message. */
347
- message: string;
348
- /** Error details. */
349
- details: string;
350
- /** Error severity. */
351
- severity: ErrorSeverity;
352
- }
353
- /** Describes the settings for parameters panel. */
354
- interface ParametersPanelSettings {
355
- /**
356
- * Adjusts the position of the parameters panel.
357
- * @example Usage example:
358
- * ```javascript
359
- * location: 'top'
360
- * ```
361
- * Adjusts the opening mode of the parameters panel.
362
- * @example Usage example:
363
- * ```javascript
364
- * open: 'always'
365
- * ```
366
- */
367
- location: 'top' | 'default';
368
- open: 'always' | 'auto';
369
- }
370
- /** Describes the position of panels (search, parameters etc). */
371
- type PanelsLocation = 'sidebar' | 'toolbar';
372
- /** Describes the settings to connect the Web API. */
373
- interface ReportServiceSettings {
374
- /**
375
- * The url to connect the Web API.
376
- * @example Usage example (prefix only):
377
- * ```javascript
378
- * url: '/api/reporting' // default value
379
- * ```
380
- * @example Usage example (full URL):
381
- * ```javascript
382
- * url: 'http:example.com/api/reporting'
383
- * ```
384
- */
385
- url?: string;
386
- /**
387
- * The security key needed to access the Web API.
388
- * @example Usage example:
389
- * ```javascript
390
- * securityToken: 'security_token',
391
- * ```
392
- */
393
- securityToken?: string;
394
- /**
395
- * Callback before any request.
396
- * Allows to change RequestInit object before fetch request - https://fetch.spec.whatwg.org/#requestinit.
397
- * @example Usage example:
398
- * ```javascript
399
- onRequestAsync: (init) => {
400
- return new Promise((resolve, reject) => {
401
- init.headers.Authorization = 'security_token';
402
- return resolve(init);
403
- });
404
- * ```
405
- */
406
- onRequestAsync?: (init: RequestInit) => Promise<RequestInit>;
407
- /**
408
- * Callback before any request.
409
- * Allows to change RequestInit object before fetch request - https://fetch.spec.whatwg.org/#requestinit.
410
- * @example Usage example:
411
- * ```javascript
412
- onRequest: (init) => init.headers.Authorization = 'security_token';
413
- * ```
414
- */
415
- onRequest?: Function;
416
- }
417
- /** Describes custom default settings. */
418
- interface DefaultExportSettings {
419
- [exportFormat: string]: {
420
- [settingName: string]: {
421
- value?: string | boolean | number;
422
- visible?: boolean;
423
- };
424
- };
425
- }
426
- /** Describes page view options. */
427
- interface PageViewOptions {
428
- /** Defines horizontal alignment for report page inside view area */
429
- horizontalAlignment?: 'left' | 'right' | 'center';
430
- /** Specifies how the report page is shown inside the viewer.
431
- * If value is 'standard' the page rendered on the virtual paper which placed on the gray virtual desktop.
432
- * If value is 'noPaper' the page rendered whithout gray area arond.
433
- * */
434
- viewMode?: 'standard' | 'noPaper';
435
- }
436
- /** Describes animation that can be applied to the report view */
437
- interface AnimationOptions {
438
- loadChart?: LoadChartAnimationOptions;
439
- hoverChart?: HoverChartAnimationOptions;
440
- hoverTable?: HoverTableAnimationOptions;
441
- }
442
- interface HoverTableAnimationOptions {
443
- /**
444
- * Enable hover table and tablix animation. Default value: false.
445
- * @example
446
- * enabled: true
447
- */
448
- enabled?: boolean;
449
- /**
450
- * Specifies the background color on hover over the table and tablix row. Default value: 'LightGray'.
451
- * @example
452
- * backgroundColor: 'LightGray'
453
- */
454
- backgroundColor?: string;
455
- /**
456
- * Specifies the text color on hover over the table and tablix row. Default value: `undefined`.\
457
- * If the value is `undefined`, text color of row cells remains unchanged on hover.
458
- * @example
459
- * textColor: 'DarkGray'
460
- */
461
- textColor?: string;
462
- }
463
- /** Describes load chart animation that can be applied to the report view. */
464
- type LoadChartAnimationOptions = {
465
- /**
466
- * Enable load chart animation. Default value: false.
467
- * @example
468
- * enabled: true
469
- */
470
- enabled?: boolean;
471
- };
472
- /** Describes hover chart animation that can be applied to the report view. */
473
- type HoverChartAnimationOptions = {
474
- /**
475
- * Enable hover chart animation. Default value: false.
476
- * @example
477
- * enabled: true
478
- */
479
- enabled?: boolean;
480
- };
481
- /** The following options can be set during initialization or at run time while working with the JS Viewer. */
482
- interface InitializationOptions {
483
- /**
484
- * The callback that is invoked before the JS Viewer opens the hyperlink, bookmark link,
485
- * drill down report or toggles the report control visibility.
486
- * @example Usage example:
487
- * ```javascript
488
- * // ESM usage
489
- * import { createViewer } from './jsViewer.min.js';
490
- * const viewer = createViewer({
491
- * action: (actionType, actionParams) => console.log('Action type: ' + actionType + '; Action parameters: ' + actionParams)
492
- * });
493
- * ```
494
- * @example Usage example:
495
- * ```javascript
496
- * // UMD usage
497
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
498
- * action: (actionType, actionParams) => console.log('Action type: ' + actionType + '; Action parameters: ' + actionParams)
499
- * });
500
- * ```
501
- */
502
- action?: (actionType: string, actionParams: any[]) => void;
503
- /** The report view animation options.
504
- * @example Usage example:
505
- * ```javascript
506
- * // ESM usage
507
- * import { createViewer } from './jsViewer.min.js';
508
- * const viewer = createViewer({
509
- * animation: {
510
- * loadChart: {
511
- * enabled: true
512
- * },
513
- * hoverChart: {
514
- * enabled: true
515
- * },
516
- * hoverTable: {
517
- * enabled: true,
518
- * backgroundColor: 'LightGray',
519
- * textColor: 'DarkGray'
520
- * }
521
- * }
522
- * });
523
- * ```
524
- * @example Usage example:
525
- * ```javascript
526
- * // UMD usage
527
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
528
- * animation: {
529
- * loadChart: {
530
- * enabled: true
531
- * },
532
- * hoverChart: {
533
- * enabled: true
534
- * },
535
- * hoverTable: {
536
- * enabled: true,
537
- * backgroundColor: 'LightGray',
538
- * textColor: 'DarkGray'
539
- * }
540
- * }
541
- * });
542
- * ```
543
- */
544
- animation?: AnimationOptions;
545
- /**
546
- * When true, view area background color is filled with report body color
547
- * available only for dashboard reports
548
- * @example Usage example:
549
- * ```javascript
550
- * // ESM usage
551
- * import { createViewer } from './jsViewer.min.js';
552
- * const viewer = createViewer({
553
- * autoBackgroundColor : true;
554
- * });
555
- * ```
556
- * @example Usage example:
557
- * ```javascript
558
- * // UMD usage
559
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
560
- * autoBackgroundColor : true;
561
- * });
562
- * ```
563
- */
564
- autoBackgroundColor?: boolean;
565
- /**
566
- * The array of export types available via Export functionality of JS Viewer. By default,
567
- * Mht, Pdf, Tiff, Xls, Xlsx, Csv, Doc, Docx, Json, Xml, TextPrint, XlsxData and CsvData exports are available for page reports,
568
- * Mht, Pdf, Tiff, Xls, Xlsx, Rtf and Txt exports are available for section reports.
569
- * @example Usage example:
570
- * ```javascript
571
- * // ESM usage
572
- * import { createViewer } from './jsViewer.min.js';
573
- * const viewer = createViewer({
574
- * availableExports: ['Xml', 'Pdf']
575
- * });
576
- * ```
577
- * @example Usage example:
578
- * ```javascript
579
- * // UMD usage
580
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
581
- * availableExports: ['Xml', 'Pdf']
582
- * });
583
- * ```
584
- */
585
- availableExports?: ExportTypes[];
586
- /**
587
- * The object containing custom default export settings. Use to set default value and visibility of any field in the export panel.
588
- * Format keys are mht, pdf, tiff, xls, xlsx, csv, doc, docx, json, xml, xlsxData, csvData, rtf and txt.
589
- * Settings' keys are the export settings which are available for RenderingExtensions.
590
- * @example Usage example:
591
- * ```javascript
592
- * // ESM usage
593
- * import { createViewer } from './jsViewer.min.js';
594
- * const viewer = createViewer({
595
- * defaultExportSettings: {
596
- * xls: {
597
- * FileName: {
598
- * value: "Hihihi",
599
- * visible: false
600
- * }
601
- * }
602
- * }
603
- * });
604
- * ```
605
- * @example Usage example:
606
- * ```javascript
607
- * // UMD usage
608
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
609
- * defaultExportSettings: {
610
- * xls: {
611
- * FileName: {
612
- * value: "Hihihi",
613
- * visible: false
614
- * }
615
- * }
616
- * }
617
- * });
618
- * ```
619
- */
620
- defaultExportSettings?: DefaultExportSettings;
621
- /**
622
- * Set up single page or continuous page.
623
- * @example Usage example:
624
- * ```javascript
625
- * // ESM usage
626
- * import { createViewer } from './jsViewer.min.js';
627
- * const viewer = createViewer({
628
- * displayMode: 'Continuous'
629
- * });
630
- * ```
631
- * @example Usage example:
632
- * ```javascript
633
- * // UMD usage
634
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
635
- * displayMode: 'Continuous'
636
- * });
637
- * ```
638
- */
639
- displayMode?: ViewMode;
640
- /**
641
- * The callback that is invoked when a document is loaded entirely on the server.
642
- * @example Usage example:
643
- * ```javascript
644
- * // ESM usage
645
- * import { createViewer } from './jsViewer.min.js';
646
- * const viewer = createViewer({
647
- * documentLoaded: () => console.log('The document is loaded entirely on the server')
648
- * });
649
- * ```
650
- * @example Usage example:
651
- * ```javascript
652
- * // UMD usage
653
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
654
- * documentLoaded: () => console.log('The document is loaded entirely on the server')
655
- * });
656
- * ```
657
- */
658
- documentLoaded?: () => void;
659
- /**
660
- * JQuery selector that specifies the element that hosts the JS Viewer control.
661
- * @example Usage example:
662
- * ```javascript
663
- * // ESM usage
664
- * import { createViewer } from './jsViewer.min.js';
665
- * const viewer = createViewer({
666
- * element: '#viewerContainer'
667
- * });
668
- * ```
669
- * @example Usage example:
670
- * ```javascript
671
- * // UMD usage
672
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
673
- * element: '#viewerContainer'
674
- * });
675
- * ```
676
- */
677
- element: string;
678
- /**
679
- * The callback that is invoked when an error occurs in the process of displaying the report.
680
- * The default error panel does not appear if the callback doesn't reurn proper object.
681
- * The error parameter is an object that has a message property which allows the users to customize
682
- * the error message and caption property which allows to customize error caption.
683
- * @example To hide the default error panel:
684
- * ```javascript
685
- * // ESM usage
686
- * import { createViewer } from './jsViewer.min.js';
687
- * const viewer = createViewer({
688
- * error: (error) => {
689
- * if (error.message) {
690
- * // show error message.
691
- * alert("Internal error! Please ask administrator.");
692
- * // do not show default error message.
693
- * return true;
694
- * }
695
- * }
696
- * });
697
- * ```
698
- * @example To hide the default error panel:
699
- * ```javascript
700
- * // UMD usage
701
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
702
- * error: (error) => {
703
- * if (error.message) {
704
- * // show error message.
705
- * alert("Internal error! Please ask administrator.");
706
- * // do not show default error message.
707
- * return true;
708
- * }
709
- * }
710
- * });
711
- * ```
712
- */
713
- error?: (error: ErrorInfo) => boolean;
714
- /**
715
- * Set up the initial zoom mode.
716
- * @example Usage example:
717
- * ```javascript
718
- * // ESM usage
719
- * import { createViewer } from './jsViewer.min.js';
720
- * const viewer = createViewer({
721
- * initialZoomMode: 'FitToWidth';
722
- * });
723
- * ```
724
- * @example Usage example:
725
- * ```javascript
726
- * // UMD usage
727
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
728
- * initialZoomMode: 'FitToWidth';
729
- * });
730
- * ```
731
- */
732
- initialZoomMode?: InitialZoomMode;
733
- /**
734
- * Specifies locale used for displaying Viewer.
735
- * If **locale** is not specified explicitly here, the locale corresponding to the browser preferences is used.
736
- * @example Usage example:
737
- * ```javascript
738
- * // ESM usage
739
- * import { createViewer } from './jsViewer.min.js';
740
- * const viewer = createViewer({
741
- * locale: 'ja-JP'
742
- * });
743
- * ```
744
- * @example Usage example:
745
- * ```javascript
746
- * // UMD usage
747
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
748
- * locale: 'ja-JP'
749
- * });
750
- * ```
751
- */
752
- locale?: string;
753
- /**
754
- * The JSON containing the localization strings.
755
- * Not all strings are necessary — missing values ​​will be displayed using EN localization data.
756
- * @example Usage example:
757
- * ```javascript
758
- * // ESM usage
759
- * import { createViewer } from './jsViewer.min.js';
760
- * const viewer = createViewer({
761
- * localeData: JSON.parse( `{
762
- * "export": {
763
- * "boolTextFalse": "Нет",
764
- * "boolTextTrue": "Да"
765
- * },
766
- * "viewer": {
767
- * "toolbar": {
768
- * "refresh": "Обновить"
769
- * }
770
- * }
771
- * }`
772
- * )
773
- *});
774
- * ```
775
- * @example Usage example:
776
- * ```javascript
777
- * // UMD usage
778
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
779
- * localeData: JSON.parse( `{
780
- * "export": {
781
- * "boolTextFalse": "Нет",
782
- * "boolTextTrue": "Да"
783
- * },
784
- * "viewer": {
785
- * "toolbar": {
786
- * "refresh": "Обновить"
787
- * }
788
- * }
789
- * }`
790
- * )
791
- *});
792
- * ```
793
- */
794
- localeData?: JSON;
795
- /**
796
- * The url of the file containing the localization strings.
797
- * Not all strings are necessary — missing values ​​will be displayed using EN localization data.
798
- * @example Usage example:
799
- * ```javascript
800
- * // ESM usage
801
- * import { createViewer } from './jsViewer.min.js';
802
- * const viewer = createViewer({
803
- * localeUri: './locale.json'
804
- * });
805
- * ```
806
- * locale.json:
807
- * ```json
808
- * {
809
- * "export": {
810
- * "boolTextFalse": "Нет",
811
- * "boolTextTrue": "Да",
812
- * ...
813
- * },
814
- * "exportcsv": {
815
- * "friendlyName": "-CSV-",
816
- * "settings": {
817
- * "ColumnsDelimiter": {
818
- * "label": "Разделитель Столбцов",
819
- * "category": "Прочее"
820
- * },
821
- * ...
822
- * },
823
- * ...
824
- * },
825
- * ...
826
- * }
827
- * ```
828
- * @example Usage example:
829
- * ```javascript
830
- * // UMD usage
831
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
832
- * localeUri: './locale.json'
833
- * });
834
- * ```
835
- * locale.json:
836
- * ```json
837
- * {
838
- * "export": {
839
- * "boolTextFalse": "Нет",
840
- * "boolTextTrue": "Да",
841
- * ...
842
- * },
843
- * "exportcsv": {
844
- * "friendlyName": "-CSV-",
845
- * "settings": {
846
- * "ColumnsDelimiter": {
847
- * "label": "Разделитель Столбцов",
848
- * "category": "Прочее"
849
- * },
850
- * ...
851
- * },
852
- * ...
853
- * },
854
- * ...
855
- * }
856
- * ```
857
- */
858
- localeUri?: string;
859
- /** Defines horizontal alignment and view for report page like part of the WebPage or 'paper view'
860
- * @example Usage example:
861
- * ```javascript
862
- * // ESM usage
863
- * import { createViewer } from './jsViewer.min.js';
864
- * const viewer = createViewer({
865
- * pageView: {
866
- * horizontalAlignment: 'left',
867
- * viewMode: 'standard'
868
- * }
869
- * });
870
- * ```
871
- * @example Usage example:
872
- * ```javascript
873
- * // UMD usage
874
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
875
- * pageView: {
876
- * horizontalAlignment: 'left',
877
- * viewMode: 'standard'
878
- * }
879
- * });
880
- * ```
881
- */
882
- pageView?: PageViewOptions;
883
- /**
884
- * Set up the parameters panel settings.
885
- * @example Usage example:
886
- * ```javascript
887
- * // ESM usage
888
- * import { createViewer } from './jsViewer.min.js';
889
- * const viewer = createViewer({
890
- * parametersPanel: {
891
- * * location: 'top',
892
- * * open: 'always'
893
- * }});
894
- * ```
895
- * @example Usage example:
896
- * ```javascript
897
- * // UMD usage
898
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
899
- * parametersPanel: {
900
- * * location: 'top',
901
- * * open: 'always'
902
- * }});
903
- * ```
904
- */
905
- parametersPanel?: ParametersPanelSettings;
906
- /**
907
- * The position of panels (search, parameters etc): 'toolbar' or 'sidebar'. Default value is 'toolbar'.
908
- * @example Usage example:
909
- * ```javascript
910
- * // ESM usage
911
- * import { createViewer } from './jsViewer.min.js';
912
- * const viewer = createViewer({
913
- * panelsLocation: 'sidebar'
914
- * });
915
- * ```
916
- * @example Usage example:
917
- * ```javascript
918
- * // UMD usage
919
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
920
- * panelsLocation: 'sidebar'
921
- * });
922
- * ```
923
- */
924
- panelsLocation?: PanelsLocation;
925
- /**
926
- * Set up render mode: 'auto', 'html' or 'svg'
927
- * @example Usage example:
928
- * ```javascript
929
- * // ESM usage
930
- * import { createViewer } from './jsViewer.min.js';
931
- * const viewer = createViewer({
932
- * renderFormat : 'auto'
933
- * });
934
- * ```
935
- * @example Usage example:
936
- * ```javascript
937
- * // UMD usage
938
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
939
- * renderFormat : 'auto'
940
- * });
941
- * ```
942
- */
943
- renderFormat?: RenderFormat;
944
- /**
945
- * Set up initial render mode: 'Paginated' or 'Galley'. Default value is 'Paginated'.
946
- * @example Usage example:
947
- * ```javascript
948
- * import { createViewer } from './jsViewer.min.js';
949
- * const viewer = createViewer({
950
- * renderMode: 'Galley'
951
- * });
952
- * ```
953
- * @example Usage example:
954
- * ```javascript
955
- * // UMD usage
956
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
957
- * renderMode: 'Galley'
958
- * });
959
- * ```
960
- */
961
- renderMode?: RenderMode;
962
- /**
963
- * The id of the report to be shown by the JS Viewer.
964
- * @example Usage example:
965
- * ```javascript
966
- * // ESM usage
967
- * import { createViewer } from './jsViewer.min.js';
968
- * const viewer = createViewer({
969
- * reportID: 'AnnualReport.rdlx'
970
- * });
971
- * ```
972
- * @example Usage example:
973
- * ```javascript
974
- * // UMD usage
975
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
976
- * reportID: 'AnnualReport.rdlx'
977
- * });
978
- * ```
979
- */
980
- reportID?: string;
981
- /**
982
- * The callback that is invoked when the JS Viewer obtains the information about the requested report.
983
- * @example Usage example:
984
- * ```javascript
985
- * // ESM usage
986
- * import { createViewer } from './jsViewer.min.js';
987
- * const viewer = createViewer({
988
- * reportLoaded: (reportInfo) => console.log('The report ' + reportInfo.name + ' was successfully loaded!')
989
- * });
990
- * ```
991
- * @example Usage example:
992
- * ```javascript
993
- * // UMD usage
994
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
995
- * reportLoaded: (reportInfo) => console.log('The report ' + reportInfo.name + ' was successfully loaded!')
996
- * });
997
- * ```
998
- */
999
- reportLoaded?: (reportInfo: ReportInfo) => void;
1000
- /**
1001
- * The array of the {name, value} pairs that describe the parameters values used to run the report.
1002
- * @example Usage example:
1003
- * ```javascript
1004
- * // ESM usage
1005
- * import { createViewer } from './jsViewer.min.js';
1006
- * const viewer = createViewer({
1007
- * reportParameters: [{ name: 'ReportParameter1', values: ['1']}]
1008
- * });
1009
- * ```
1010
- * @example Usage example:
1011
- * ```javascript
1012
- * // UMD usage
1013
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1014
- * reportParameters: [{ name: 'ReportParameter1', values: ['1']}]
1015
- * });
1016
- * ```
1017
- */
1018
- reportParameters?: Parameter[];
1019
- /**
1020
- * Set up the settings to connect the Web API.
1021
- * @example Usage example:
1022
- * ```javascript
1023
- * // ESM usage
1024
- * import { createViewer } from './jsViewer.min.js';
1025
- * const viewer = createViewer({
1026
- * reportService: {
1027
- * url: 'http://example.com/api/reporting',
1028
- * securityToken: '42A9CD80A4F3445A9BB60A221D042FCC',
1029
- * }
1030
- * });
1031
- * ```
1032
- * @example Usage example:
1033
- * ```javascript
1034
- * // UMD usage
1035
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1036
- * reportService: {
1037
- * url: 'http://example.com/api/reporting',
1038
- * securityToken: '42A9CD80A4F3445A9BB60A221D042FCC',
1039
- * }
1040
- * });
1041
- * ```
1042
- */
1043
- reportService?: ReportServiceSettings;
1044
- /**
1045
- * JQuery selector that specifies the element that hosts the JS Viewer control.
1046
- * @example Usage example:
1047
- * ```javascript
1048
- * // ESM usage
1049
- * import { createViewer } from './jsViewer.min.js';
1050
- * const viewer = createViewer({
1051
- * silentPrint: true
1052
- * });
1053
- * ```
1054
- * @example Usage example:
1055
- * ```javascript
1056
- * // UMD usage
1057
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1058
- * silentPrint: true
1059
- * });
1060
- * ```
1061
- */
1062
- silentPrint?: boolean;
1063
- /**
1064
- * Viewer's UI theme.
1065
- * @example Pre-defined theme selection USM example:
1066
- * ```javascript
1067
- * // ESM usage
1068
- * import {createViewer, UIThemes} from './jsViewer.min.js';
1069
- * const viewer = createViewer({
1070
- * element: '#root',
1071
- * theme: UIThemes.defaultDark
1072
- * });
1073
- * ```
1074
- *
1075
- * @example Pre-defined theme selection example:
1076
- * ```javascript
1077
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1078
- * theme: GrapeCity.ActiveReports.JSViewer.Themes.darkOled
1079
- * });
1080
- * ```
1081
- */
1082
- theme?: UITheme;
1083
- }
1084
- /** The following options can be set during initialization or at run time while working with the JS Viewer. */
1085
- interface ExportOptions extends PrintOptions {
1086
- /**
1087
- * The document format type to report be exported to.
1088
- * @example Usage example:
1089
- * ```javascript
1090
- * // ESM usage
1091
- * import {exportReport} from './jsViewer.min.js';
1092
- * exportReport({
1093
- * exportType: 'Pdf'
1094
- * });
1095
- * ```
1096
- * @example Usage example:
1097
- * ```javascript
1098
- * // UMD usage
1099
- * GrapeCity.ActiveReports.JSViewer.export({
1100
- * exportType: 'Pdf'
1101
- * });
1102
- * ```
1103
- */
1104
- exportType: ExportTypes;
1105
- /**
1106
- * The callback that is invoked before the export result request sent.
1107
- * @example Usage example:
1108
- * ```javascript
1109
- * // ESM usage
1110
- * import {exportReport} from './jsViewer.min.js';
1111
- * exportReport({
1112
- * callback: ()=>console.log('test')
1113
- * });
1114
- * ```
1115
- * @example Usage example:
1116
- * ```javascript
1117
- * // UMD usage
1118
- * GrapeCity.ActiveReports.JSViewer.export({
1119
- * callback: ()=>console.log('test')
1120
- * });
1121
- * ```
1122
- */
1123
- callback: ExportCallback;
1124
- /**
1125
- * Export settings
1126
- * @example Usage example:
1127
- * ```javascript
1128
- * // ESM usage
1129
- * import {exportReport} from './jsViewer.min.js';
1130
- * exportReport({
1131
- * settings : {
1132
- * EmbedFonts:'All',
1133
- * Title:'MyInvoice'
1134
- *}});
1135
- * ```
1136
- * @example Usage example:
1137
- * ```javascript
1138
- * // UMD usage
1139
- * GrapeCity.ActiveReports.JSViewer.export({
1140
- * settings : {
1141
- * EmbedFonts:'All',
1142
- * Title:'MyInvoice'
1143
- *}});
1144
- * ```
1145
- */
1146
- settings?: any;
1147
- /**
1148
- * @example Usage example:
1149
- * ```javascript
1150
- * // ESM usage
1151
- * import {exportReport} from './jsViewer.min.js';
1152
- * exportReport({
1153
- * saveAsDialog: true
1154
- * });
1155
- * ```
1156
- * @example Usage example:
1157
- * ```javascript
1158
- * // UMD usage
1159
- * GrapeCity.ActiveReports.JSViewer.export({
1160
- * saveAsDialog: true
1161
- * });
1162
- * ```
1163
- */
1164
- saveAsDialog?: boolean;
1165
- }
1166
- /** The following options can be set at run time while working with the JS Viewer. */
1167
- interface PrintOptions {
1168
- /**
1169
- * The id of the report to be shown by the JS Viewer.
1170
- * @example Usage example:
1171
- * ```javascript
1172
- * // ESM usage
1173
- * import { printReport } from './jsViewer.min.js';
1174
- * printReport({
1175
- * reportID: 'AnnualReport.rdlx'
1176
- * }):
1177
- * ```
1178
- * @example Usage example:
1179
- * ```javascript
1180
- * // UMD usage
1181
- * GrapeCity.ActiveReports.JSViewer.print({
1182
- * reportID: 'AnnualReport.rdlx'
1183
- * }):
1184
- * ```
1185
- */
1186
- reportID: string;
1187
- /**
1188
- * The array of the {name, value} pairs that describe the parameters values used to run the report.
1189
- * @example Usage example:
1190
- * ```javascript
1191
- * // ESM usage
1192
- * import { printReport } from './jsViewer.min.js';
1193
- * printReport({
1194
- * reportParameters: [{ name: 'ReportParameter1', values: ['1']}]
1195
- * }):
1196
- * ```
1197
- * @example Usage example:
1198
- * ```javascript
1199
- * // UMD usage
1200
- * GrapeCity.ActiveReports.JSViewer.print({
1201
- * reportParameters: [{ name: 'ReportParameter1', values: ['1']}]
1202
- * }):
1203
- * ```
1204
- */
1205
- reportParameters?: Parameter[];
1206
- /**
1207
- * The callback that is invoked when an error occurs in the process of displaying the report.
1208
- * The default error panel does not appear if the callback returns true.
1209
- * The error parameter is an object that has a message property which allows the users to customize
1210
- * the error message and details property which allows to customize error details.
1211
- * @example To hide the default error panel:
1212
- * ```javascript
1213
- * // ESM usage
1214
- * import { printReport } from './jsViewer.min.js';
1215
- * printReport({
1216
- * error: (error) => {
1217
- * if (error.message) {
1218
- * // show error message.
1219
- * alert("Internal error! Please ask administrator.");
1220
- * // do not show default error message.
1221
- * }
1222
- * }
1223
- * }):
1224
- * ```
1225
- * * @example To customize the error message:
1226
- * ```javascript
1227
- * // ESM usage
1228
- * import { printReport } from './jsViewer.min.js';
1229
- * printReport({
1230
- * error: (error) => {
1231
- * if (error.message) {
1232
- * // show error message.
1233
- * return {message = "Custom message", caption = "Custom caption"};
1234
- * }
1235
- * }
1236
- * }):
1237
- * ```
1238
- * @example To hide the default error panel:
1239
- * ```javascript
1240
- * // UMD usage
1241
- * GrapeCity.ActiveReports.JSViewer.print({
1242
- * error: (error) => {
1243
- * if (error.message) {
1244
- * // show error message.
1245
- * alert("Internal error! Please ask administrator.");
1246
- * // do not show default error message.
1247
- * }
1248
- * }
1249
- * }):
1250
- * ```
1251
- * * @example To customize the error message:
1252
- * ```javascript
1253
- * // UMD usage
1254
- * GrapeCity.ActiveReports.JSViewer.print({
1255
- * error: (error) => {
1256
- * if (error.message) {
1257
- * // show error message.
1258
- * return {message = "Custom message", caption = "Custom caption"};
1259
- * }
1260
- * }
1261
- * }):
1262
- * ```
1263
- */
1264
- error: (error: ErrorInfo) => ErrorInfo;
1265
- /**
1266
- * Set up the settings to connect the Web API.
1267
- * @example Usage example:
1268
- * ```javascript
1269
- * // ESM usage
1270
- * import { printReport } from './jsViewer.min.js';
1271
- * printReport({
1272
- * reportService: {
1273
- * url: 'http://example.com/api/reporting',
1274
- * securityToken: '42A9CD80A4F3445A9BB60A221D042FCC',
1275
- * }
1276
- * }):
1277
- * ```
1278
- * @example Usage example:
1279
- * ```javascript
1280
- * // UMD usage
1281
- * GrapeCity.ActiveReports.JSViewer.print({
1282
- * reportService: {
1283
- * url: 'http://example.com/api/reporting',
1284
- * securityToken: '42A9CD80A4F3445A9BB60A221D042FCC',
1285
- * }
1286
- * }):
1287
- * ```
1288
- */
1289
- reportService?: ReportServiceSettings;
1290
- }
1291
- interface JSViewer {
1292
- /**
1293
- * Apply slicers to the opened report.
1294
- * @param slicers The array of the slicers values.
1295
- * @example Usage example:
1296
- * ```javascript
1297
- * viewer.applySlicers([{name:'Year', type: 'Set', value: '2022' }])
1298
- * ```
1299
- */
1300
- /**
1301
- * Open report.
1302
- * @param reportID The id of the report.
1303
- * @param reportParameters The array of the parameters values.
1304
- * @example Usage example:
1305
- * ```javascript
1306
- * // ESM usage
1307
- * import { createViewer } from './jsViewer.min.js';
1308
- * const viewer = createViewer({
1309
- * element: '#root'
1310
- * });
1311
- * viewer.openReport('Invoice.rdlx')
1312
- * ```
1313
- * @example Usage example:
1314
- * ```javascript
1315
- * // UMD usage
1316
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1317
- * element: '#root'
1318
- * });
1319
- * viewer.openReport('Invoice.rdlx')
1320
- * ```
1321
- */
1322
- openReport: (reportID: string, reportParameters?: Parameter[]) => void;
1323
- /**
1324
- * Refreshes the report preview.
1325
- * @example Usage example:
1326
- * ```javascript
1327
- * // ESM usage
1328
- * import { createViewer } from './jsViewer.min.js';
1329
- * const viewer = createViewer({
1330
- * element: '#root'
1331
- * });
1332
- * viewer.refresh()
1333
- * ```
1334
- * @example Usage example:
1335
- * ```javascript
1336
- * // UMD usage
1337
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1338
- * element: '#root'
1339
- * });
1340
- * viewer.refresh()
1341
- * ```
1342
- */
1343
- refresh: () => void;
1344
- /**
1345
- * Prints the currently displayed report if any.
1346
- * @example Usage example:
1347
- * ```javascript
1348
- * // ESM usage
1349
- * import { createViewer } from './jsViewer.min.js';
1350
- * const viewer = createViewer({
1351
- * element: '#root',
1352
- * reportID: 'AnnualReport.rdlx'
1353
- * });
1354
- * viewer.print()
1355
- * ```
1356
- * @example Usage example:
1357
- * ```javascript
1358
- * // UMD usage
1359
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1360
- * element: '#root',
1361
- * reportID: 'AnnualReport.rdlx'
1362
- * });
1363
- * viewer.print()
1364
- * ```
1365
- */
1366
- print: () => void;
1367
- /**
1368
- * Makes the viewer to display the specific page. Page numeration starts with 1.
1369
- * @param pageNumber The number of pages to go to.
1370
- * @example Usage example:
1371
- * ```javascript
1372
- * // ESM usage
1373
- * import { createViewer } from './jsViewer.min.js';
1374
- * const viewer = createViewer({
1375
- * element: '#root',
1376
- * reportID: 'AnnualReport.rdlx'
1377
- * });
1378
- * viewer.goToPage(1)
1379
- * ```
1380
- * @example Usage example:
1381
- * ```javascript
1382
- * // UMD usage
1383
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1384
- * element: '#root',
1385
- * reportID: 'AnnualReport.rdlx'
1386
- * });
1387
- * viewer.goToPage(1)
1388
- * ```
1389
- */
1390
- goToPage: (pageNumber: number) => void;
1391
- /**
1392
- * Makes the viewer to display the parent report of the drill-down report.
1393
- * @example Usage example:
1394
- * ```javascript
1395
- * // ESM usage
1396
- * import { createViewer } from './jsViewer.min.js';
1397
- * const viewer = createViewer({
1398
- * element: '#root',
1399
- * reportID: 'AnnualReport.rdlx'
1400
- * });
1401
- * viewer.backToParent()
1402
- * ```
1403
- * @example Usage example:
1404
- * ```javascript
1405
- * // UMD usage
1406
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1407
- * element: '#root',
1408
- * reportID: 'AnnualReport.rdlx'
1409
- * });
1410
- * viewer.backToParent()
1411
- * ```
1412
- */
1413
- backToParent: () => void;
1414
- /**
1415
- * Removes the viewer content from the element.
1416
- * @example Usage example:
1417
- * ```javascript
1418
- * // ESM usage
1419
- * import { createViewer } from './jsViewer.min.js';
1420
- * const viewer = createViewer({
1421
- * element: '#root'
1422
- * });
1423
- * viewer.destroy()
1424
- * ```
1425
- * @example Usage example:
1426
- * ```javascript
1427
- * // UMD usage
1428
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1429
- * element: '#root'
1430
- * });
1431
- * viewer.destroy()
1432
- * ```
1433
- */
1434
- destroy: () => void;
1435
- /**
1436
- * Exports the currently displayed report.
1437
- * @param exportType Specifies export format.
1438
- * @param callback Function that is invoked once the export result is available (its Url is passed in the callback).
1439
- * @param saveAsDialog Indicates whether the save as dialog should be shown immediately once the export result is ready.
1440
- * @param settings The export settings are available for RenderingExtensions.
1441
- * @param isCancelRequested The function is periodically called with a check to cancel the export task.
1442
- * @example Usage example:
1443
- * ```javascript
1444
- * // ESM usage
1445
- * import { createViewer } from './jsViewer.min.js';
1446
- * const viewer = createViewer({
1447
- * element: '#root',
1448
- * reportID: 'AnnualReport.rdlx',
1449
- * availableExports: ['Pdf']
1450
- * });
1451
- * viewer.export('Pdf', downloadReport, true, { Title: '1997 Annual Report' })
1452
- *
1453
- * // function fetches the report from uri(callback function)
1454
- * var downloadReport = function (uri) {
1455
- * var newWin = null;
1456
- * // open uri in new window
1457
- * try {
1458
- * newWin = window.open(uri);
1459
- * } catch (e) { }
1460
- * // if browser rejects opening new window, open uri in current window
1461
- * if (!newWin) {
1462
- * window.location = uri;
1463
- * }
1464
- * };
1465
- * ```
1466
- * @example Usage example:
1467
- * ```javascript
1468
- * // UMD usage
1469
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1470
- * element: '#root',
1471
- * reportID: 'AnnualReport.rdlx',
1472
- * availableExports: ['Pdf']
1473
- * });
1474
- * viewer.export('Pdf', downloadReport, true, { Title: '1997 Annual Report' })
1475
- *
1476
- * // function fetches the report from uri(callback function)
1477
- * var downloadReport = function (uri) {
1478
- * var newWin = null;
1479
- * // open uri in new window
1480
- * try {
1481
- * newWin = window.open(uri);
1482
- * } catch (e) { }
1483
- * // if browser rejects opening new window, open uri in current window
1484
- * if (!newWin) {
1485
- * window.location = uri;
1486
- * }
1487
- * };
1488
- * ```
1489
- */
1490
- export: (exportType: ExportTypes, callback: ExportCallback, saveAsDialog: boolean, settings: any, isCancelRequested?: () => boolean | Promise<boolean>) => void;
1491
- /**
1492
- * Performs the search of a specific term with specific search options (match case, whole word)
1493
- * and invokes the specific callback with the search result passed.
1494
- * @param searchTerm String to find.
1495
- * @param searchOptions The object optionally defines the search options.
1496
- * @param callback The function to call after performing search.
1497
- * @example Usage example:
1498
- * ```javascript
1499
- * // ESM usage
1500
- * import { createViewer } from './jsViewer.min.js';
1501
- * const viewer = createViewer({
1502
- * element: '#root',
1503
- * reportID: 'AnnualReport.rdlx'
1504
- * });
1505
- * viewer.search('a', { matchCase: true, wholePhrase: false }, (results) => console.log(results))
1506
- * ```
1507
- * @example Usage example:
1508
- * ```javascript
1509
- * // UMD usage
1510
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1511
- * element: '#root',
1512
- * reportID: 'AnnualReport.rdlx'
1513
- * });
1514
- * viewer.search('a', { matchCase: true, wholePhrase: false }, (results) => console.log(results))
1515
- * ```
1516
- */
1517
- search: (searchTerm: string, searchOptions: SearchOptions, callback: (searchResult: any) => void) => void;
1518
- /**
1519
- * Obtains the report TOC.
1520
- * @returns TOC tree.
1521
- * @example Usage example:
1522
- * ```javascript
1523
- * // ESM usage
1524
- * import { createViewer } from './jsViewer.min.js';
1525
- * const viewer = createViewer({
1526
- * element: '#root',
1527
- * reportID: 'AnnualReport.rdlx'
1528
- * });
1529
- * console.log(viewer.getToc())
1530
- * ```
1531
- * @example Usage example:
1532
- * ```javascript
1533
- * // UMD usage
1534
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1535
- * element: '#root',
1536
- * reportID: 'AnnualReport.rdlx'
1537
- * });
1538
- * console.log(viewer.getToc())
1539
- * ```
1540
- */
1541
- getToc: () => any;
1542
- /**
1543
- * Gets the page count of the currently displayed report.
1544
- * @returns An integer representing page count.
1545
- * @example Usage example:
1546
- * ```javascript
1547
- * // ESM usage
1548
- * import { createViewer } from './jsViewer.min.js';
1549
- * const viewer = createViewer({
1550
- * element: '#root',
1551
- * reportID: 'AnnualReport.rdlx'
1552
- * });
1553
- * console.log(viewer.pageCount())
1554
- * ```
1555
- * @example Usage example:
1556
- * ```javascript
1557
- * // UMD usage
1558
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1559
- * element: '#root',
1560
- * reportID: 'AnnualReport.rdlx'
1561
- * });
1562
- * console.log(viewer.pageCount())
1563
- * ```
1564
- */
1565
- pageCount: () => number;
1566
- /**
1567
- * Gets the currently displayed page number.
1568
- * @returns An integer representing currently displayed page number.
1569
- * @example Usage example:
1570
- * ```javascript
1571
- * // ESM usage
1572
- * import { createViewer } from './jsViewer.min.js';
1573
- * const viewer = createViewer({
1574
- * element: '#root',
1575
- * reportID: 'AnnualReport.rdlx'
1576
- * });
1577
- * console.log(viewer.currentPage())
1578
- * ```
1579
- * @example Usage example:
1580
- * ```javascript
1581
- * // UMD usage
1582
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1583
- * element: '#root',
1584
- * reportID: 'AnnualReport.rdlx'
1585
- * });
1586
- * console.log(viewer.currentPage())
1587
- * ```
1588
- */
1589
- currentPage: () => number;
1590
- /**
1591
- * The viewer's sidebar instance. The developer may use it to toggle the sidebar visibility.
1592
- * @example Usage example:
1593
- * ```javascript
1594
- * // ESM usage
1595
- * import { createViewer } from './jsViewer.min.js';
1596
- * const viewer = createViewer({
1597
- * element: '#root'
1598
- * });
1599
- * viewer.sidebar.toggle(false); // hide sidebar
1600
- * ```
1601
- * @example Usage example:
1602
- * ```javascript
1603
- * // UMD usage
1604
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1605
- * element: '#root'
1606
- * });
1607
- * viewer.sidebar.toggle(false); // hide sidebar
1608
- * ```
1609
- */
1610
- sidebar: Sidebar;
1611
- /**
1612
- * The viewer's toolbar instance. The developer may use it to add the custom elements or remove the existing ones.
1613
- * @example Usage example:
1614
- * ```javascript
1615
- * // ESM usage
1616
- * import { createViewer } from './jsViewer.min.js';
1617
- * const viewer = createViewer({
1618
- * element: '#root'
1619
- * });
1620
- * viewer.toolbar.toggle(false); // hide toolbar
1621
- * ```
1622
- * @example Usage example:
1623
- * ```javascript
1624
- * // UMD usage
1625
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1626
- * element: '#root'
1627
- * });
1628
- * viewer.toolbar.toggle(false); // hide toolbar
1629
- * ```
1630
- */
1631
- toolbar: Toolbar;
1632
- /**
1633
- * Gets or sets the viewer UI theme.
1634
- * @example Usage example ESM:
1635
- * ```javascript
1636
- * import {createViewer, UIThemes} from './jsViewer.min.js';
1637
- * const viewer = createViewer({
1638
- * element: '#root',
1639
- * });
1640
- *
1641
- * viewer.theme = UIThemes.defaultDark;
1642
- * ```
1643
- *
1644
- * @example Usage example UMD:
1645
- * ```javascript
1646
- * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1647
- * element: '#root'
1648
- * });
1649
- * viewer.theme: GrapeCity.ActiveReports.JSViewer.Themes.defaultDark
1650
- * ```
1651
- */
1652
- theme?: UITheme;
251
+ /** Report types. */
252
+ declare enum ReportType {
253
+ Section = 0,
254
+ Page = 1,
255
+ Rdl = 2
256
+ }
257
+ /** All supported exports. */
258
+ type ExportTypes = 'Pdf' | 'Xlsx' | 'Xls' | 'Doc' | 'Docx' | 'Rtf' | 'Json' | 'Xml' | 'Csv' | 'Txt' | 'Tiff' | 'Mht' | 'XlsxData' | 'CsvData' | 'TextPrint';
259
+ /** Describes the parameter value. */
260
+ interface ParameterValue {
261
+ label: string;
262
+ value: any;
263
+ }
264
+ /** Describes the parameter. */
265
+ interface ParameterDescriptor {
266
+ name: string;
267
+ prompt: string;
268
+ dataType: any;
269
+ selectAllValue: any;
270
+ allowBlank: boolean;
271
+ nullable: boolean;
272
+ multiValue: boolean;
273
+ multiline: boolean;
274
+ hidden: boolean;
275
+ usedInQuery: boolean;
276
+ dateOnly: boolean;
277
+ dependsOn: string[];
278
+ validValues: ParameterValue;
279
+ defaultValue: ParameterValue;
280
+ displayFormat: string;
281
+ actualDefaultValues: ParameterValue[];
282
+ }
283
+ /** Describes the report. */
284
+ interface ReportInfo {
285
+ /** The name of the report. */
286
+ name: string;
287
+ /** The parameters of the report. */
288
+ parameters: ParameterDescriptor[];
289
+ /** Contains layout for custom parameters panel. */
290
+ parametersView: string;
291
+ /** The display type of the report. */
292
+ displayType: ViewMode;
293
+ /** Indicates whether GalleyMode is allowed. */
294
+ galleyModeAllowed: boolean;
295
+ /** The size type of the report. */
296
+ sizeType: SizeType;
297
+ /** Export types available for a given report. */
298
+ exports: ExportTypes[];
299
+ /**The type of the report. */
300
+ type: ReportType;
301
+ /** The preffered type of viewer to use. */
302
+ viewerType: ViewerType;
303
+ /** List of report section names*/
304
+ sections: string[];
305
+ }
306
+ /**
307
+ * Report:
308
+ * Uses standard UI and default rendering settings
309
+ * Dashboard:
310
+ * Uses dashboard UI and dashboard rendering settings, which include:
311
+ * rendering all pages in galley mode, with report background color as viewer area background
312
+ */
313
+ type ViewerType = 'Report' | 'Dashboard';
314
+ /** All supported paging modes. */
315
+ type ViewMode = 'Single' | 'Continuous';
316
+ /** Report render modes. */
317
+ type RenderMode = 'Paginated' | 'Galley';
318
+ /** Report render backend. */
319
+ type RenderFormat = 'auto' | 'html' | 'svg';
320
+ /** All supported size types. */
321
+ type SizeType = 'Default' | 'FitToWidth' | 'FitToPage' | 'Stretch';
322
+ /** Describes the initial zoom percentage value. */
323
+ type Percentage = {
324
+ percentage: number;
325
+ };
326
+ /** All supported initial zoom modes. */
327
+ type InitialZoomMode = 'FitToPage' | 'FitToWidth' | Percentage;
328
+ /** Export callback */
329
+ type ExportCallback = (uri: string) => void;
330
+ /** Describes the parameter value used to run the report. */
331
+ interface Parameter {
332
+ /** The name of the parameter. */
333
+ name: string;
334
+ /** The value(s) of the parameter. */
335
+ values: string[];
336
+ }
337
+ /** Describes the search options. */
338
+ interface SearchOptions {
339
+ /** Whether the search should respect the case. */
340
+ matchCase: boolean;
341
+ /** Whether the search should look for a whole phrase. */
342
+ wholePhrase: boolean;
343
+ }
344
+ /** Describes the error severity. */
345
+ type ErrorSeverity = 'error' | 'warn' | 'info' | 'debug';
346
+ /** Describes the error. */
347
+ interface ErrorInfo {
348
+ /** Error message. */
349
+ message: string;
350
+ /** Error details. */
351
+ details: string;
352
+ /** Error severity. */
353
+ severity: ErrorSeverity;
354
+ }
355
+ /** Describes the settings for parameters panel. */
356
+ interface ParametersPanelSettings {
357
+ /**
358
+ * Adjusts the position of the parameters panel.
359
+ * @example Usage example:
360
+ * ```javascript
361
+ * location: 'top'
362
+ * ```
363
+ * Adjusts the opening mode of the parameters panel.
364
+ * @example Usage example:
365
+ * ```javascript
366
+ * open: 'always'
367
+ * ```
368
+ */
369
+ location: 'top' | 'default';
370
+ open: 'always' | 'auto';
371
+ }
372
+ /** Describes the position of panels (search, parameters etc). */
373
+ type PanelsLocation = 'sidebar' | 'toolbar';
374
+ /** Describes the settings to connect the Web API. */
375
+ interface ReportServiceSettings {
376
+ /**
377
+ * The url to connect the Web API.
378
+ * @example Usage example (prefix only):
379
+ * ```javascript
380
+ * url: '/api/reporting' // default value
381
+ * ```
382
+ * @example Usage example (full URL):
383
+ * ```javascript
384
+ * url: 'http:example.com/api/reporting'
385
+ * ```
386
+ */
387
+ url?: string;
388
+ /**
389
+ * The security key needed to access the Web API.
390
+ * @example Usage example:
391
+ * ```javascript
392
+ * securityToken: 'security_token',
393
+ * ```
394
+ */
395
+ securityToken?: string;
396
+ /**
397
+ * Callback before any request.
398
+ * Allows to change RequestInit object before fetch request - https://fetch.spec.whatwg.org/#requestinit.
399
+ * @example Usage example:
400
+ * ```javascript
401
+ onRequestAsync: (init) => {
402
+ return new Promise((resolve, reject) => {
403
+ init.headers.Authorization = 'security_token';
404
+ return resolve(init);
405
+ });
406
+ * ```
407
+ */
408
+ onRequestAsync?: (init: RequestInit) => Promise<RequestInit>;
409
+ /**
410
+ * Callback before any request.
411
+ * Allows to change RequestInit object before fetch request - https://fetch.spec.whatwg.org/#requestinit.
412
+ * @example Usage example:
413
+ * ```javascript
414
+ onRequest: (init) => init.headers.Authorization = 'security_token';
415
+ * ```
416
+ */
417
+ onRequest?: Function;
418
+ }
419
+ /** Describes custom default settings. */
420
+ interface DefaultExportSettings {
421
+ [exportFormat: string]: {
422
+ [settingName: string]: {
423
+ value?: string | boolean | number;
424
+ visible?: boolean;
425
+ };
426
+ };
427
+ }
428
+ /** Describes page view options. */
429
+ interface PageViewOptions {
430
+ /** Defines horizontal alignment for report page inside view area */
431
+ horizontalAlignment?: 'left' | 'right' | 'center';
432
+ /** Specifies how the report page is shown inside the viewer.
433
+ * If value is 'standard' the page rendered on the virtual paper which placed on the gray virtual desktop.
434
+ * If value is 'noPaper' the page rendered whithout gray area arond.
435
+ * */
436
+ viewMode?: 'standard' | 'noPaper';
437
+ }
438
+ /** Describes animation that can be applied to the report view */
439
+ interface AnimationOptions {
440
+ loadChart?: LoadChartAnimationOptions;
441
+ hoverChart?: HoverChartAnimationOptions;
442
+ hoverTable?: HoverTableAnimationOptions;
443
+ }
444
+ interface HoverTableAnimationOptions {
445
+ /**
446
+ * Enable hover table and tablix animation. Default value: false.
447
+ * @example
448
+ * enabled: true
449
+ */
450
+ enabled?: boolean;
451
+ /**
452
+ * Specifies the background color on hover over the table and tablix row. Default value: 'LightGray'.
453
+ * @example
454
+ * backgroundColor: 'LightGray'
455
+ */
456
+ backgroundColor?: string;
457
+ /**
458
+ * Specifies the text color on hover over the table and tablix row. Default value: `undefined`.\
459
+ * If the value is `undefined`, text color of row cells remains unchanged on hover.
460
+ * @example
461
+ * textColor: 'DarkGray'
462
+ */
463
+ textColor?: string;
464
+ }
465
+ /** Describes load chart animation that can be applied to the report view. */
466
+ type LoadChartAnimationOptions = {
467
+ /**
468
+ * Enable load chart animation. Default value: false.
469
+ * @example
470
+ * enabled: true
471
+ */
472
+ enabled?: boolean;
473
+ };
474
+ /** Describes hover chart animation that can be applied to the report view. */
475
+ type HoverChartAnimationOptions = {
476
+ /**
477
+ * Enable hover chart animation. Default value: false.
478
+ * @example
479
+ * enabled: true
480
+ */
481
+ enabled?: boolean;
482
+ };
483
+ /** The following options can be set during initialization or at run time while working with the JS Viewer. */
484
+ interface InitializationOptions {
485
+ /**
486
+ * The callback that is invoked before the JS Viewer opens the hyperlink, bookmark link,
487
+ * drill down report or toggles the report control visibility.
488
+ * @example Usage example:
489
+ * ```javascript
490
+ * // ESM usage
491
+ * import { createViewer } from './jsViewer.min.js';
492
+ * const viewer = createViewer({
493
+ * action: (actionType, actionParams) => console.log('Action type: ' + actionType + '; Action parameters: ' + actionParams)
494
+ * });
495
+ * ```
496
+ * @example Usage example:
497
+ * ```javascript
498
+ * // UMD usage
499
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
500
+ * action: (actionType, actionParams) => console.log('Action type: ' + actionType + '; Action parameters: ' + actionParams)
501
+ * });
502
+ * ```
503
+ */
504
+ action?: (actionType: string, actionParams: any[]) => void;
505
+ /** The report view animation options.
506
+ * @example Usage example:
507
+ * ```javascript
508
+ * // ESM usage
509
+ * import { createViewer } from './jsViewer.min.js';
510
+ * const viewer = createViewer({
511
+ * animation: {
512
+ * loadChart: {
513
+ * enabled: true
514
+ * },
515
+ * hoverChart: {
516
+ * enabled: true
517
+ * },
518
+ * hoverTable: {
519
+ * enabled: true,
520
+ * backgroundColor: 'LightGray',
521
+ * textColor: 'DarkGray'
522
+ * }
523
+ * }
524
+ * });
525
+ * ```
526
+ * @example Usage example:
527
+ * ```javascript
528
+ * // UMD usage
529
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
530
+ * animation: {
531
+ * loadChart: {
532
+ * enabled: true
533
+ * },
534
+ * hoverChart: {
535
+ * enabled: true
536
+ * },
537
+ * hoverTable: {
538
+ * enabled: true,
539
+ * backgroundColor: 'LightGray',
540
+ * textColor: 'DarkGray'
541
+ * }
542
+ * }
543
+ * });
544
+ * ```
545
+ */
546
+ animation?: AnimationOptions;
547
+ /**
548
+ * When true, view area background color is filled with report body color
549
+ * available only for dashboard reports
550
+ * @example Usage example:
551
+ * ```javascript
552
+ * // ESM usage
553
+ * import { createViewer } from './jsViewer.min.js';
554
+ * const viewer = createViewer({
555
+ * autoBackgroundColor : true;
556
+ * });
557
+ * ```
558
+ * @example Usage example:
559
+ * ```javascript
560
+ * // UMD usage
561
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
562
+ * autoBackgroundColor : true;
563
+ * });
564
+ * ```
565
+ */
566
+ autoBackgroundColor?: boolean;
567
+ /**
568
+ * The array of export types available via Export functionality of JS Viewer. By default,
569
+ * Mht, Pdf, Tiff, Xls, Xlsx, Csv, Doc, Docx, Json, Xml, TextPrint, XlsxData and CsvData exports are available for page reports,
570
+ * Mht, Pdf, Tiff, Xls, Xlsx, Rtf and Txt exports are available for section reports.
571
+ * @example Usage example:
572
+ * ```javascript
573
+ * // ESM usage
574
+ * import { createViewer } from './jsViewer.min.js';
575
+ * const viewer = createViewer({
576
+ * availableExports: ['Xml', 'Pdf']
577
+ * });
578
+ * ```
579
+ * @example Usage example:
580
+ * ```javascript
581
+ * // UMD usage
582
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
583
+ * availableExports: ['Xml', 'Pdf']
584
+ * });
585
+ * ```
586
+ */
587
+ availableExports?: ExportTypes[];
588
+ /**
589
+ * The object containing custom default export settings. Use to set default value and visibility of any field in the export panel.
590
+ * Format keys are mht, pdf, tiff, xls, xlsx, csv, doc, docx, json, xml, xlsxData, csvData, rtf and txt.
591
+ * Settings' keys are the export settings which are available for RenderingExtensions.
592
+ * @example Usage example:
593
+ * ```javascript
594
+ * // ESM usage
595
+ * import { createViewer } from './jsViewer.min.js';
596
+ * const viewer = createViewer({
597
+ * defaultExportSettings: {
598
+ * xls: {
599
+ * FileName: {
600
+ * value: "Hihihi",
601
+ * visible: false
602
+ * }
603
+ * }
604
+ * }
605
+ * });
606
+ * ```
607
+ * @example Usage example:
608
+ * ```javascript
609
+ * // UMD usage
610
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
611
+ * defaultExportSettings: {
612
+ * xls: {
613
+ * FileName: {
614
+ * value: "Hihihi",
615
+ * visible: false
616
+ * }
617
+ * }
618
+ * }
619
+ * });
620
+ * ```
621
+ */
622
+ defaultExportSettings?: DefaultExportSettings;
623
+ /**
624
+ * Set up single page or continuous page.
625
+ * @example Usage example:
626
+ * ```javascript
627
+ * // ESM usage
628
+ * import { createViewer } from './jsViewer.min.js';
629
+ * const viewer = createViewer({
630
+ * displayMode: 'Continuous'
631
+ * });
632
+ * ```
633
+ * @example Usage example:
634
+ * ```javascript
635
+ * // UMD usage
636
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
637
+ * displayMode: 'Continuous'
638
+ * });
639
+ * ```
640
+ */
641
+ displayMode?: ViewMode;
642
+ /**
643
+ * The callback that is invoked when a document is loaded entirely on the server.
644
+ * @example Usage example:
645
+ * ```javascript
646
+ * // ESM usage
647
+ * import { createViewer } from './jsViewer.min.js';
648
+ * const viewer = createViewer({
649
+ * documentLoaded: () => console.log('The document is loaded entirely on the server')
650
+ * });
651
+ * ```
652
+ * @example Usage example:
653
+ * ```javascript
654
+ * // UMD usage
655
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
656
+ * documentLoaded: () => console.log('The document is loaded entirely on the server')
657
+ * });
658
+ * ```
659
+ */
660
+ documentLoaded?: () => void;
661
+ /**
662
+ * JQuery selector that specifies the element that hosts the JS Viewer control.
663
+ * @example Usage example:
664
+ * ```javascript
665
+ * // ESM usage
666
+ * import { createViewer } from './jsViewer.min.js';
667
+ * const viewer = createViewer({
668
+ * element: '#viewerContainer'
669
+ * });
670
+ * ```
671
+ * @example Usage example:
672
+ * ```javascript
673
+ * // UMD usage
674
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
675
+ * element: '#viewerContainer'
676
+ * });
677
+ * ```
678
+ */
679
+ element: string;
680
+ /**
681
+ * The callback that is invoked when an error occurs in the process of displaying the report.
682
+ * The default error panel does not appear if the callback doesn't reurn proper object.
683
+ * The error parameter is an object that has a message property which allows the users to customize
684
+ * the error message and caption property which allows to customize error caption.
685
+ * @example To hide the default error panel:
686
+ * ```javascript
687
+ * // ESM usage
688
+ * import { createViewer } from './jsViewer.min.js';
689
+ * const viewer = createViewer({
690
+ * error: (error) => {
691
+ * if (error.message) {
692
+ * // show error message.
693
+ * alert("Internal error! Please ask administrator.");
694
+ * // do not show default error message.
695
+ * return true;
696
+ * }
697
+ * }
698
+ * });
699
+ * ```
700
+ * @example To hide the default error panel:
701
+ * ```javascript
702
+ * // UMD usage
703
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
704
+ * error: (error) => {
705
+ * if (error.message) {
706
+ * // show error message.
707
+ * alert("Internal error! Please ask administrator.");
708
+ * // do not show default error message.
709
+ * return true;
710
+ * }
711
+ * }
712
+ * });
713
+ * ```
714
+ */
715
+ error?: (error: ErrorInfo) => boolean;
716
+ /**
717
+ * Set up the initial zoom mode.
718
+ * @example Usage example:
719
+ * ```javascript
720
+ * // ESM usage
721
+ * import { createViewer } from './jsViewer.min.js';
722
+ * const viewer = createViewer({
723
+ * initialZoomMode: 'FitToWidth';
724
+ * });
725
+ * ```
726
+ * @example Usage example:
727
+ * ```javascript
728
+ * // UMD usage
729
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
730
+ * initialZoomMode: 'FitToWidth';
731
+ * });
732
+ * ```
733
+ */
734
+ initialZoomMode?: InitialZoomMode;
735
+ /**
736
+ * Specifies locale used for displaying Viewer.
737
+ * If **locale** is not specified explicitly here, the locale corresponding to the browser preferences is used.
738
+ * @example Usage example:
739
+ * ```javascript
740
+ * // ESM usage
741
+ * import { createViewer } from './jsViewer.min.js';
742
+ * const viewer = createViewer({
743
+ * locale: 'ja-JP'
744
+ * });
745
+ * ```
746
+ * @example Usage example:
747
+ * ```javascript
748
+ * // UMD usage
749
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
750
+ * locale: 'ja-JP'
751
+ * });
752
+ * ```
753
+ */
754
+ locale?: string;
755
+ /**
756
+ * The JSON containing the localization strings.
757
+ * Not all strings are necessary — missing values ​​will be displayed using EN localization data.
758
+ * @example Usage example:
759
+ * ```javascript
760
+ * // ESM usage
761
+ * import { createViewer } from './jsViewer.min.js';
762
+ * const viewer = createViewer({
763
+ * localeData: JSON.parse( `{
764
+ * "export": {
765
+ * "boolTextFalse": "Нет",
766
+ * "boolTextTrue": "Да"
767
+ * },
768
+ * "viewer": {
769
+ * "toolbar": {
770
+ * "refresh": "Обновить"
771
+ * }
772
+ * }
773
+ * }`
774
+ * )
775
+ *});
776
+ * ```
777
+ * @example Usage example:
778
+ * ```javascript
779
+ * // UMD usage
780
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
781
+ * localeData: JSON.parse( `{
782
+ * "export": {
783
+ * "boolTextFalse": "Нет",
784
+ * "boolTextTrue": "Да"
785
+ * },
786
+ * "viewer": {
787
+ * "toolbar": {
788
+ * "refresh": "Обновить"
789
+ * }
790
+ * }
791
+ * }`
792
+ * )
793
+ *});
794
+ * ```
795
+ */
796
+ localeData?: JSON;
797
+ /**
798
+ * The url of the file containing the localization strings.
799
+ * Not all strings are necessary — missing values ​​will be displayed using EN localization data.
800
+ * @example Usage example:
801
+ * ```javascript
802
+ * // ESM usage
803
+ * import { createViewer } from './jsViewer.min.js';
804
+ * const viewer = createViewer({
805
+ * localeUri: './locale.json'
806
+ * });
807
+ * ```
808
+ * locale.json:
809
+ * ```json
810
+ * {
811
+ * "export": {
812
+ * "boolTextFalse": "Нет",
813
+ * "boolTextTrue": "Да",
814
+ * ...
815
+ * },
816
+ * "exportcsv": {
817
+ * "friendlyName": "-CSV-",
818
+ * "settings": {
819
+ * "ColumnsDelimiter": {
820
+ * "label": "Разделитель Столбцов",
821
+ * "category": "Прочее"
822
+ * },
823
+ * ...
824
+ * },
825
+ * ...
826
+ * },
827
+ * ...
828
+ * }
829
+ * ```
830
+ * @example Usage example:
831
+ * ```javascript
832
+ * // UMD usage
833
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
834
+ * localeUri: './locale.json'
835
+ * });
836
+ * ```
837
+ * locale.json:
838
+ * ```json
839
+ * {
840
+ * "export": {
841
+ * "boolTextFalse": "Нет",
842
+ * "boolTextTrue": "Да",
843
+ * ...
844
+ * },
845
+ * "exportcsv": {
846
+ * "friendlyName": "-CSV-",
847
+ * "settings": {
848
+ * "ColumnsDelimiter": {
849
+ * "label": "Разделитель Столбцов",
850
+ * "category": "Прочее"
851
+ * },
852
+ * ...
853
+ * },
854
+ * ...
855
+ * },
856
+ * ...
857
+ * }
858
+ * ```
859
+ */
860
+ localeUri?: string;
861
+ /** Defines horizontal alignment and view for report page like part of the WebPage or 'paper view'
862
+ * @example Usage example:
863
+ * ```javascript
864
+ * // ESM usage
865
+ * import { createViewer } from './jsViewer.min.js';
866
+ * const viewer = createViewer({
867
+ * pageView: {
868
+ * horizontalAlignment: 'left',
869
+ * viewMode: 'standard'
870
+ * }
871
+ * });
872
+ * ```
873
+ * @example Usage example:
874
+ * ```javascript
875
+ * // UMD usage
876
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
877
+ * pageView: {
878
+ * horizontalAlignment: 'left',
879
+ * viewMode: 'standard'
880
+ * }
881
+ * });
882
+ * ```
883
+ */
884
+ pageView?: PageViewOptions;
885
+ /**
886
+ * Set up the parameters panel settings.
887
+ * @example Usage example:
888
+ * ```javascript
889
+ * // ESM usage
890
+ * import { createViewer } from './jsViewer.min.js';
891
+ * const viewer = createViewer({
892
+ * parametersPanel: {
893
+ * * location: 'top',
894
+ * * open: 'always'
895
+ * }});
896
+ * ```
897
+ * @example Usage example:
898
+ * ```javascript
899
+ * // UMD usage
900
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
901
+ * parametersPanel: {
902
+ * * location: 'top',
903
+ * * open: 'always'
904
+ * }});
905
+ * ```
906
+ */
907
+ parametersPanel?: ParametersPanelSettings;
908
+ /**
909
+ * The position of panels (search, parameters etc): 'toolbar' or 'sidebar'. Default value is 'toolbar'.
910
+ * @example Usage example:
911
+ * ```javascript
912
+ * // ESM usage
913
+ * import { createViewer } from './jsViewer.min.js';
914
+ * const viewer = createViewer({
915
+ * panelsLocation: 'sidebar'
916
+ * });
917
+ * ```
918
+ * @example Usage example:
919
+ * ```javascript
920
+ * // UMD usage
921
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
922
+ * panelsLocation: 'sidebar'
923
+ * });
924
+ * ```
925
+ */
926
+ panelsLocation?: PanelsLocation;
927
+ /**
928
+ * Set up render mode: 'auto', 'html' or 'svg'
929
+ * @example Usage example:
930
+ * ```javascript
931
+ * // ESM usage
932
+ * import { createViewer } from './jsViewer.min.js';
933
+ * const viewer = createViewer({
934
+ * renderFormat : 'auto'
935
+ * });
936
+ * ```
937
+ * @example Usage example:
938
+ * ```javascript
939
+ * // UMD usage
940
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
941
+ * renderFormat : 'auto'
942
+ * });
943
+ * ```
944
+ */
945
+ renderFormat?: RenderFormat;
946
+ /**
947
+ * Set up initial render mode: 'Paginated' or 'Galley'. Default value is 'Paginated'.
948
+ * @example Usage example:
949
+ * ```javascript
950
+ * import { createViewer } from './jsViewer.min.js';
951
+ * const viewer = createViewer({
952
+ * renderMode: 'Galley'
953
+ * });
954
+ * ```
955
+ * @example Usage example:
956
+ * ```javascript
957
+ * // UMD usage
958
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
959
+ * renderMode: 'Galley'
960
+ * });
961
+ * ```
962
+ */
963
+ renderMode?: RenderMode;
964
+ /**
965
+ * The id of the report to be shown by the JS Viewer.
966
+ * @example Usage example:
967
+ * ```javascript
968
+ * // ESM usage
969
+ * import { createViewer } from './jsViewer.min.js';
970
+ * const viewer = createViewer({
971
+ * reportID: 'AnnualReport.rdlx'
972
+ * });
973
+ * ```
974
+ * @example Usage example:
975
+ * ```javascript
976
+ * // UMD usage
977
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
978
+ * reportID: 'AnnualReport.rdlx'
979
+ * });
980
+ * ```
981
+ */
982
+ reportID?: string;
983
+ /**
984
+ * The callback that is invoked when the JS Viewer obtains the information about the requested report.
985
+ * @example Usage example:
986
+ * ```javascript
987
+ * // ESM usage
988
+ * import { createViewer } from './jsViewer.min.js';
989
+ * const viewer = createViewer({
990
+ * reportLoaded: (reportInfo) => console.log('The report ' + reportInfo.name + ' was successfully loaded!')
991
+ * });
992
+ * ```
993
+ * @example Usage example:
994
+ * ```javascript
995
+ * // UMD usage
996
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
997
+ * reportLoaded: (reportInfo) => console.log('The report ' + reportInfo.name + ' was successfully loaded!')
998
+ * });
999
+ * ```
1000
+ */
1001
+ reportLoaded?: (reportInfo: ReportInfo) => void;
1002
+ /**
1003
+ * The array of the {name, value} pairs that describe the parameters values used to run the report.
1004
+ * @example Usage example:
1005
+ * ```javascript
1006
+ * // ESM usage
1007
+ * import { createViewer } from './jsViewer.min.js';
1008
+ * const viewer = createViewer({
1009
+ * reportParameters: [{ name: 'ReportParameter1', values: ['1']}]
1010
+ * });
1011
+ * ```
1012
+ * @example Usage example:
1013
+ * ```javascript
1014
+ * // UMD usage
1015
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1016
+ * reportParameters: [{ name: 'ReportParameter1', values: ['1']}]
1017
+ * });
1018
+ * ```
1019
+ */
1020
+ reportParameters?: Parameter[];
1021
+ /**
1022
+ * Set up the settings to connect the Web API.
1023
+ * @example Usage example:
1024
+ * ```javascript
1025
+ * // ESM usage
1026
+ * import { createViewer } from './jsViewer.min.js';
1027
+ * const viewer = createViewer({
1028
+ * reportService: {
1029
+ * url: 'http://example.com/api/reporting',
1030
+ * securityToken: '42A9CD80A4F3445A9BB60A221D042FCC',
1031
+ * }
1032
+ * });
1033
+ * ```
1034
+ * @example Usage example:
1035
+ * ```javascript
1036
+ * // UMD usage
1037
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1038
+ * reportService: {
1039
+ * url: 'http://example.com/api/reporting',
1040
+ * securityToken: '42A9CD80A4F3445A9BB60A221D042FCC',
1041
+ * }
1042
+ * });
1043
+ * ```
1044
+ */
1045
+ reportService?: ReportServiceSettings;
1046
+ /**
1047
+ * JQuery selector that specifies the element that hosts the JS Viewer control.
1048
+ * @example Usage example:
1049
+ * ```javascript
1050
+ * // ESM usage
1051
+ * import { createViewer } from './jsViewer.min.js';
1052
+ * const viewer = createViewer({
1053
+ * silentPrint: true
1054
+ * });
1055
+ * ```
1056
+ * @example Usage example:
1057
+ * ```javascript
1058
+ * // UMD usage
1059
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1060
+ * silentPrint: true
1061
+ * });
1062
+ * ```
1063
+ */
1064
+ silentPrint?: boolean;
1065
+ /**
1066
+ * Viewer's UI theme.
1067
+ * @example Pre-defined theme selection USM example:
1068
+ * ```javascript
1069
+ * // ESM usage
1070
+ * import {createViewer, UIThemes} from './jsViewer.min.js';
1071
+ * const viewer = createViewer({
1072
+ * element: '#root',
1073
+ * theme: UIThemes.defaultDark
1074
+ * });
1075
+ * ```
1076
+ *
1077
+ * @example Pre-defined theme selection example:
1078
+ * ```javascript
1079
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1080
+ * theme: GrapeCity.ActiveReports.JSViewer.Themes.darkOled
1081
+ * });
1082
+ * ```
1083
+ */
1084
+ theme?: UITheme;
1085
+ }
1086
+ /** The following options can be set during initialization or at run time while working with the JS Viewer. */
1087
+ interface ExportOptions extends PrintOptions {
1088
+ /**
1089
+ * The document format type to report be exported to.
1090
+ * @example Usage example:
1091
+ * ```javascript
1092
+ * // ESM usage
1093
+ * import {exportReport} from './jsViewer.min.js';
1094
+ * exportReport({
1095
+ * exportType: 'Pdf'
1096
+ * });
1097
+ * ```
1098
+ * @example Usage example:
1099
+ * ```javascript
1100
+ * // UMD usage
1101
+ * GrapeCity.ActiveReports.JSViewer.export({
1102
+ * exportType: 'Pdf'
1103
+ * });
1104
+ * ```
1105
+ */
1106
+ exportType: ExportTypes;
1107
+ /**
1108
+ * The callback that is invoked before the export result request sent.
1109
+ * @example Usage example:
1110
+ * ```javascript
1111
+ * // ESM usage
1112
+ * import {exportReport} from './jsViewer.min.js';
1113
+ * exportReport({
1114
+ * callback: ()=>console.log('test')
1115
+ * });
1116
+ * ```
1117
+ * @example Usage example:
1118
+ * ```javascript
1119
+ * // UMD usage
1120
+ * GrapeCity.ActiveReports.JSViewer.export({
1121
+ * callback: ()=>console.log('test')
1122
+ * });
1123
+ * ```
1124
+ */
1125
+ callback: ExportCallback;
1126
+ /**
1127
+ * Export settings
1128
+ * @example Usage example:
1129
+ * ```javascript
1130
+ * // ESM usage
1131
+ * import {exportReport} from './jsViewer.min.js';
1132
+ * exportReport({
1133
+ * settings : {
1134
+ * EmbedFonts:'All',
1135
+ * Title:'MyInvoice'
1136
+ *}});
1137
+ * ```
1138
+ * @example Usage example:
1139
+ * ```javascript
1140
+ * // UMD usage
1141
+ * GrapeCity.ActiveReports.JSViewer.export({
1142
+ * settings : {
1143
+ * EmbedFonts:'All',
1144
+ * Title:'MyInvoice'
1145
+ *}});
1146
+ * ```
1147
+ */
1148
+ settings?: any;
1149
+ /**
1150
+ * @example Usage example:
1151
+ * ```javascript
1152
+ * // ESM usage
1153
+ * import {exportReport} from './jsViewer.min.js';
1154
+ * exportReport({
1155
+ * saveAsDialog: true
1156
+ * });
1157
+ * ```
1158
+ * @example Usage example:
1159
+ * ```javascript
1160
+ * // UMD usage
1161
+ * GrapeCity.ActiveReports.JSViewer.export({
1162
+ * saveAsDialog: true
1163
+ * });
1164
+ * ```
1165
+ */
1166
+ saveAsDialog?: boolean;
1167
+ }
1168
+ /** The following options can be set at run time while working with the JS Viewer. */
1169
+ interface PrintOptions {
1170
+ /**
1171
+ * The id of the report to be shown by the JS Viewer.
1172
+ * @example Usage example:
1173
+ * ```javascript
1174
+ * // ESM usage
1175
+ * import { printReport } from './jsViewer.min.js';
1176
+ * printReport({
1177
+ * reportID: 'AnnualReport.rdlx'
1178
+ * }):
1179
+ * ```
1180
+ * @example Usage example:
1181
+ * ```javascript
1182
+ * // UMD usage
1183
+ * GrapeCity.ActiveReports.JSViewer.print({
1184
+ * reportID: 'AnnualReport.rdlx'
1185
+ * }):
1186
+ * ```
1187
+ */
1188
+ reportID: string;
1189
+ /**
1190
+ * The array of the {name, value} pairs that describe the parameters values used to run the report.
1191
+ * @example Usage example:
1192
+ * ```javascript
1193
+ * // ESM usage
1194
+ * import { printReport } from './jsViewer.min.js';
1195
+ * printReport({
1196
+ * reportParameters: [{ name: 'ReportParameter1', values: ['1']}]
1197
+ * }):
1198
+ * ```
1199
+ * @example Usage example:
1200
+ * ```javascript
1201
+ * // UMD usage
1202
+ * GrapeCity.ActiveReports.JSViewer.print({
1203
+ * reportParameters: [{ name: 'ReportParameter1', values: ['1']}]
1204
+ * }):
1205
+ * ```
1206
+ */
1207
+ reportParameters?: Parameter[];
1208
+ /**
1209
+ * The callback that is invoked when an error occurs in the process of displaying the report.
1210
+ * The default error panel does not appear if the callback returns true.
1211
+ * The error parameter is an object that has a message property which allows the users to customize
1212
+ * the error message and details property which allows to customize error details.
1213
+ * @example To hide the default error panel:
1214
+ * ```javascript
1215
+ * // ESM usage
1216
+ * import { printReport } from './jsViewer.min.js';
1217
+ * printReport({
1218
+ * error: (error) => {
1219
+ * if (error.message) {
1220
+ * // show error message.
1221
+ * alert("Internal error! Please ask administrator.");
1222
+ * // do not show default error message.
1223
+ * }
1224
+ * }
1225
+ * }):
1226
+ * ```
1227
+ * * @example To customize the error message:
1228
+ * ```javascript
1229
+ * // ESM usage
1230
+ * import { printReport } from './jsViewer.min.js';
1231
+ * printReport({
1232
+ * error: (error) => {
1233
+ * if (error.message) {
1234
+ * // show error message.
1235
+ * return {message = "Custom message", caption = "Custom caption"};
1236
+ * }
1237
+ * }
1238
+ * }):
1239
+ * ```
1240
+ * @example To hide the default error panel:
1241
+ * ```javascript
1242
+ * // UMD usage
1243
+ * GrapeCity.ActiveReports.JSViewer.print({
1244
+ * error: (error) => {
1245
+ * if (error.message) {
1246
+ * // show error message.
1247
+ * alert("Internal error! Please ask administrator.");
1248
+ * // do not show default error message.
1249
+ * }
1250
+ * }
1251
+ * }):
1252
+ * ```
1253
+ * * @example To customize the error message:
1254
+ * ```javascript
1255
+ * // UMD usage
1256
+ * GrapeCity.ActiveReports.JSViewer.print({
1257
+ * error: (error) => {
1258
+ * if (error.message) {
1259
+ * // show error message.
1260
+ * return {message = "Custom message", caption = "Custom caption"};
1261
+ * }
1262
+ * }
1263
+ * }):
1264
+ * ```
1265
+ */
1266
+ error: (error: ErrorInfo) => ErrorInfo;
1267
+ /**
1268
+ * Set up the settings to connect the Web API.
1269
+ * @example Usage example:
1270
+ * ```javascript
1271
+ * // ESM usage
1272
+ * import { printReport } from './jsViewer.min.js';
1273
+ * printReport({
1274
+ * reportService: {
1275
+ * url: 'http://example.com/api/reporting',
1276
+ * securityToken: '42A9CD80A4F3445A9BB60A221D042FCC',
1277
+ * }
1278
+ * }):
1279
+ * ```
1280
+ * @example Usage example:
1281
+ * ```javascript
1282
+ * // UMD usage
1283
+ * GrapeCity.ActiveReports.JSViewer.print({
1284
+ * reportService: {
1285
+ * url: 'http://example.com/api/reporting',
1286
+ * securityToken: '42A9CD80A4F3445A9BB60A221D042FCC',
1287
+ * }
1288
+ * }):
1289
+ * ```
1290
+ */
1291
+ reportService?: ReportServiceSettings;
1292
+ }
1293
+ interface JSViewer {
1294
+ /**
1295
+ * Apply slicers to the opened report.
1296
+ * @param slicers The array of the slicers values.
1297
+ * @example Usage example:
1298
+ * ```javascript
1299
+ * viewer.applySlicers([{name:'Year', type: 'Set', value: '2022' }])
1300
+ * ```
1301
+ */
1302
+ /**
1303
+ * Open report.
1304
+ * @param reportID The id of the report.
1305
+ * @param reportParameters The array of the parameters values.
1306
+ * @example Usage example:
1307
+ * ```javascript
1308
+ * // ESM usage
1309
+ * import { createViewer } from './jsViewer.min.js';
1310
+ * const viewer = createViewer({
1311
+ * element: '#root'
1312
+ * });
1313
+ * viewer.openReport('Invoice.rdlx')
1314
+ * ```
1315
+ * @example Usage example:
1316
+ * ```javascript
1317
+ * // UMD usage
1318
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1319
+ * element: '#root'
1320
+ * });
1321
+ * viewer.openReport('Invoice.rdlx')
1322
+ * ```
1323
+ */
1324
+ openReport: (reportID: string, reportParameters?: Parameter[]) => void;
1325
+ /**
1326
+ * Refreshes the report preview.
1327
+ * @example Usage example:
1328
+ * ```javascript
1329
+ * // ESM usage
1330
+ * import { createViewer } from './jsViewer.min.js';
1331
+ * const viewer = createViewer({
1332
+ * element: '#root'
1333
+ * });
1334
+ * viewer.refresh()
1335
+ * ```
1336
+ * @example Usage example:
1337
+ * ```javascript
1338
+ * // UMD usage
1339
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1340
+ * element: '#root'
1341
+ * });
1342
+ * viewer.refresh()
1343
+ * ```
1344
+ */
1345
+ refresh: () => void;
1346
+ /**
1347
+ * Prints the currently displayed report if any.
1348
+ * @example Usage example:
1349
+ * ```javascript
1350
+ * // ESM usage
1351
+ * import { createViewer } from './jsViewer.min.js';
1352
+ * const viewer = createViewer({
1353
+ * element: '#root',
1354
+ * reportID: 'AnnualReport.rdlx'
1355
+ * });
1356
+ * viewer.print()
1357
+ * ```
1358
+ * @example Usage example:
1359
+ * ```javascript
1360
+ * // UMD usage
1361
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1362
+ * element: '#root',
1363
+ * reportID: 'AnnualReport.rdlx'
1364
+ * });
1365
+ * viewer.print()
1366
+ * ```
1367
+ */
1368
+ print: () => void;
1369
+ /**
1370
+ * Makes the viewer to display the specific page. Page numeration starts with 1.
1371
+ * @param pageNumber The number of pages to go to.
1372
+ * @example Usage example:
1373
+ * ```javascript
1374
+ * // ESM usage
1375
+ * import { createViewer } from './jsViewer.min.js';
1376
+ * const viewer = createViewer({
1377
+ * element: '#root',
1378
+ * reportID: 'AnnualReport.rdlx'
1379
+ * });
1380
+ * viewer.goToPage(1)
1381
+ * ```
1382
+ * @example Usage example:
1383
+ * ```javascript
1384
+ * // UMD usage
1385
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1386
+ * element: '#root',
1387
+ * reportID: 'AnnualReport.rdlx'
1388
+ * });
1389
+ * viewer.goToPage(1)
1390
+ * ```
1391
+ */
1392
+ goToPage: (pageNumber: number) => void;
1393
+ /**
1394
+ * Makes the viewer to display the parent report of the drill-down report.
1395
+ * @example Usage example:
1396
+ * ```javascript
1397
+ * // ESM usage
1398
+ * import { createViewer } from './jsViewer.min.js';
1399
+ * const viewer = createViewer({
1400
+ * element: '#root',
1401
+ * reportID: 'AnnualReport.rdlx'
1402
+ * });
1403
+ * viewer.backToParent()
1404
+ * ```
1405
+ * @example Usage example:
1406
+ * ```javascript
1407
+ * // UMD usage
1408
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1409
+ * element: '#root',
1410
+ * reportID: 'AnnualReport.rdlx'
1411
+ * });
1412
+ * viewer.backToParent()
1413
+ * ```
1414
+ */
1415
+ backToParent: () => void;
1416
+ /**
1417
+ * Removes the viewer content from the element.
1418
+ * @example Usage example:
1419
+ * ```javascript
1420
+ * // ESM usage
1421
+ * import { createViewer } from './jsViewer.min.js';
1422
+ * const viewer = createViewer({
1423
+ * element: '#root'
1424
+ * });
1425
+ * viewer.destroy()
1426
+ * ```
1427
+ * @example Usage example:
1428
+ * ```javascript
1429
+ * // UMD usage
1430
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1431
+ * element: '#root'
1432
+ * });
1433
+ * viewer.destroy()
1434
+ * ```
1435
+ */
1436
+ destroy: () => void;
1437
+ /**
1438
+ * Exports the currently displayed report.
1439
+ * @param exportType Specifies export format.
1440
+ * @param callback Function that is invoked once the export result is available (its Url is passed in the callback).
1441
+ * @param saveAsDialog Indicates whether the save as dialog should be shown immediately once the export result is ready.
1442
+ * @param settings The export settings are available for RenderingExtensions.
1443
+ * @param isCancelRequested The function is periodically called with a check to cancel the export task.
1444
+ * @example Usage example:
1445
+ * ```javascript
1446
+ * // ESM usage
1447
+ * import { createViewer } from './jsViewer.min.js';
1448
+ * const viewer = createViewer({
1449
+ * element: '#root',
1450
+ * reportID: 'AnnualReport.rdlx',
1451
+ * availableExports: ['Pdf']
1452
+ * });
1453
+ * viewer.export('Pdf', downloadReport, true, { Title: '1997 Annual Report' })
1454
+ *
1455
+ * // function fetches the report from uri(callback function)
1456
+ * var downloadReport = function (uri) {
1457
+ * var newWin = null;
1458
+ * // open uri in new window
1459
+ * try {
1460
+ * newWin = window.open(uri);
1461
+ * } catch (e) { }
1462
+ * // if browser rejects opening new window, open uri in current window
1463
+ * if (!newWin) {
1464
+ * window.location = uri;
1465
+ * }
1466
+ * };
1467
+ * ```
1468
+ * @example Usage example:
1469
+ * ```javascript
1470
+ * // UMD usage
1471
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1472
+ * element: '#root',
1473
+ * reportID: 'AnnualReport.rdlx',
1474
+ * availableExports: ['Pdf']
1475
+ * });
1476
+ * viewer.export('Pdf', downloadReport, true, { Title: '1997 Annual Report' })
1477
+ *
1478
+ * // function fetches the report from uri(callback function)
1479
+ * var downloadReport = function (uri) {
1480
+ * var newWin = null;
1481
+ * // open uri in new window
1482
+ * try {
1483
+ * newWin = window.open(uri);
1484
+ * } catch (e) { }
1485
+ * // if browser rejects opening new window, open uri in current window
1486
+ * if (!newWin) {
1487
+ * window.location = uri;
1488
+ * }
1489
+ * };
1490
+ * ```
1491
+ */
1492
+ export: (exportType: ExportTypes, callback: ExportCallback, saveAsDialog: boolean, settings: any, isCancelRequested?: () => boolean | Promise<boolean>) => void;
1493
+ /**
1494
+ * Performs the search of a specific term with specific search options (match case, whole word)
1495
+ * and invokes the specific callback with the search result passed.
1496
+ * @param searchTerm String to find.
1497
+ * @param searchOptions The object optionally defines the search options.
1498
+ * @param callback The function to call after performing search.
1499
+ * @example Usage example:
1500
+ * ```javascript
1501
+ * // ESM usage
1502
+ * import { createViewer } from './jsViewer.min.js';
1503
+ * const viewer = createViewer({
1504
+ * element: '#root',
1505
+ * reportID: 'AnnualReport.rdlx'
1506
+ * });
1507
+ * viewer.search('a', { matchCase: true, wholePhrase: false }, (results) => console.log(results))
1508
+ * ```
1509
+ * @example Usage example:
1510
+ * ```javascript
1511
+ * // UMD usage
1512
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1513
+ * element: '#root',
1514
+ * reportID: 'AnnualReport.rdlx'
1515
+ * });
1516
+ * viewer.search('a', { matchCase: true, wholePhrase: false }, (results) => console.log(results))
1517
+ * ```
1518
+ */
1519
+ search: (searchTerm: string, searchOptions: SearchOptions, callback: (searchResult: any) => void) => void;
1520
+ /**
1521
+ * Obtains the report TOC.
1522
+ * @returns TOC tree.
1523
+ * @example Usage example:
1524
+ * ```javascript
1525
+ * // ESM usage
1526
+ * import { createViewer } from './jsViewer.min.js';
1527
+ * const viewer = createViewer({
1528
+ * element: '#root',
1529
+ * reportID: 'AnnualReport.rdlx'
1530
+ * });
1531
+ * console.log(viewer.getToc())
1532
+ * ```
1533
+ * @example Usage example:
1534
+ * ```javascript
1535
+ * // UMD usage
1536
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1537
+ * element: '#root',
1538
+ * reportID: 'AnnualReport.rdlx'
1539
+ * });
1540
+ * console.log(viewer.getToc())
1541
+ * ```
1542
+ */
1543
+ getToc: () => any;
1544
+ /**
1545
+ * Gets the page count of the currently displayed report.
1546
+ * @returns An integer representing page count.
1547
+ * @example Usage example:
1548
+ * ```javascript
1549
+ * // ESM usage
1550
+ * import { createViewer } from './jsViewer.min.js';
1551
+ * const viewer = createViewer({
1552
+ * element: '#root',
1553
+ * reportID: 'AnnualReport.rdlx'
1554
+ * });
1555
+ * console.log(viewer.pageCount())
1556
+ * ```
1557
+ * @example Usage example:
1558
+ * ```javascript
1559
+ * // UMD usage
1560
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1561
+ * element: '#root',
1562
+ * reportID: 'AnnualReport.rdlx'
1563
+ * });
1564
+ * console.log(viewer.pageCount())
1565
+ * ```
1566
+ */
1567
+ pageCount: () => number;
1568
+ /**
1569
+ * Gets the currently displayed page number.
1570
+ * @returns An integer representing currently displayed page number.
1571
+ * @example Usage example:
1572
+ * ```javascript
1573
+ * // ESM usage
1574
+ * import { createViewer } from './jsViewer.min.js';
1575
+ * const viewer = createViewer({
1576
+ * element: '#root',
1577
+ * reportID: 'AnnualReport.rdlx'
1578
+ * });
1579
+ * console.log(viewer.currentPage())
1580
+ * ```
1581
+ * @example Usage example:
1582
+ * ```javascript
1583
+ * // UMD usage
1584
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1585
+ * element: '#root',
1586
+ * reportID: 'AnnualReport.rdlx'
1587
+ * });
1588
+ * console.log(viewer.currentPage())
1589
+ * ```
1590
+ */
1591
+ currentPage: () => number;
1592
+ /**
1593
+ * The viewer's sidebar instance. The developer may use it to toggle the sidebar visibility.
1594
+ * @example Usage example:
1595
+ * ```javascript
1596
+ * // ESM usage
1597
+ * import { createViewer } from './jsViewer.min.js';
1598
+ * const viewer = createViewer({
1599
+ * element: '#root'
1600
+ * });
1601
+ * viewer.sidebar.toggle(false); // hide sidebar
1602
+ * ```
1603
+ * @example Usage example:
1604
+ * ```javascript
1605
+ * // UMD usage
1606
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1607
+ * element: '#root'
1608
+ * });
1609
+ * viewer.sidebar.toggle(false); // hide sidebar
1610
+ * ```
1611
+ */
1612
+ sidebar: Sidebar;
1613
+ /**
1614
+ * The viewer's toolbar instance. The developer may use it to add the custom elements or remove the existing ones.
1615
+ * @example Usage example:
1616
+ * ```javascript
1617
+ * // ESM usage
1618
+ * import { createViewer } from './jsViewer.min.js';
1619
+ * const viewer = createViewer({
1620
+ * element: '#root'
1621
+ * });
1622
+ * viewer.toolbar.toggle(false); // hide toolbar
1623
+ * ```
1624
+ * @example Usage example:
1625
+ * ```javascript
1626
+ * // UMD usage
1627
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1628
+ * element: '#root'
1629
+ * });
1630
+ * viewer.toolbar.toggle(false); // hide toolbar
1631
+ * ```
1632
+ */
1633
+ toolbar: Toolbar;
1634
+ /**
1635
+ * Gets or sets the viewer UI theme.
1636
+ * @example Usage example ESM:
1637
+ * ```javascript
1638
+ * import {createViewer, UIThemes} from './jsViewer.min.js';
1639
+ * const viewer = createViewer({
1640
+ * element: '#root',
1641
+ * });
1642
+ *
1643
+ * viewer.theme = UIThemes.defaultDark;
1644
+ * ```
1645
+ *
1646
+ * @example Usage example UMD:
1647
+ * ```javascript
1648
+ * var viewer = GrapeCity.ActiveReports.JSViewer.create({
1649
+ * element: '#root'
1650
+ * });
1651
+ * viewer.theme: GrapeCity.ActiveReports.JSViewer.Themes.defaultDark
1652
+ * ```
1653
+ */
1654
+ theme?: UITheme;
1653
1655
  }
1654
1656
 
1655
- /**
1656
- * Do export of the report without showing a viewer.
1657
- * @param params The export options.
1658
- * @param isCancelRequested The function is periodically called with a check to cancel the export task.
1659
- * @example Usage example:
1660
- * ```javascript
1661
- * // ESM usage
1662
- * import {exportReport} from './jsViewer.min.js';
1663
- * exportReport({
1664
- * reportID:'Invoice.rdlx',
1665
- * exportType: 'Pdf',
1666
- * saveAsDialog: true,
1667
- * settings : {
1668
- * EmbedFonts:'All',
1669
- * Title:'MyInvoice'
1670
- * }});
1671
- * ```
1672
- */
1657
+ /**
1658
+ * Do export of the report without showing a viewer.
1659
+ * @param params The export options.
1660
+ * @param isCancelRequested The function is periodically called with a check to cancel the export task.
1661
+ * @example Usage example:
1662
+ * ```javascript
1663
+ * // ESM usage
1664
+ * import {exportReport} from './jsViewer.min.js';
1665
+ * exportReport({
1666
+ * reportID:'Invoice.rdlx',
1667
+ * exportType: 'Pdf',
1668
+ * saveAsDialog: true,
1669
+ * settings : {
1670
+ * EmbedFonts:'All',
1671
+ * Title:'MyInvoice'
1672
+ * }});
1673
+ * ```
1674
+ */
1673
1675
  declare function exportReport(exportOptions: ExportOptions, isCancelRequested?: () => boolean): Promise<void>;
1674
1676
 
1675
- /**
1676
- * Create and initialize JS Viewer.
1677
- * @param params Initialization options.
1678
- * @returns {JSViewer} JS Viewer instance.
1679
- * @example Usage example:
1680
- * ```javascript
1681
- * // ESM usage
1682
- * import { createViewer } from './jsViewer.min.js';
1683
- * const viewer = createViewer({
1684
- * element: '#root',
1685
- * // other properties
1686
- * });
1687
- * ```
1688
- */
1677
+ /**
1678
+ * Create and initialize JS Viewer.
1679
+ * @param params Initialization options.
1680
+ * @returns {JSViewer} JS Viewer instance.
1681
+ * @example Usage example:
1682
+ * ```javascript
1683
+ * // ESM usage
1684
+ * import { createViewer } from './jsViewer.min.js';
1685
+ * const viewer = createViewer({
1686
+ * element: '#root',
1687
+ * // other properties
1688
+ * });
1689
+ * ```
1690
+ */
1689
1691
  declare function createViewer(params: InitializationOptions): JSViewer;
1690
1692
 
1691
- /**
1692
- * Print the report without showing a viewer.
1693
- * @param params The print options.
1694
- * @param isCancelRequested The function is periodically called with a check to cancel the export task.
1695
- * @example Usage example:
1696
- * ```javascript
1697
- * // ESM usage
1698
- * import { printReport } from './jsViewer.min.js';
1699
- * printReport({
1700
- * reportID: 'AnnualReport.rdlx'
1701
- * });
1702
- * ```
1703
- */
1693
+ /**
1694
+ * Print the report without showing a viewer.
1695
+ * @param params The print options.
1696
+ * @param isCancelRequested The function is periodically called with a check to cancel the export task.
1697
+ * @example Usage example:
1698
+ * ```javascript
1699
+ * // ESM usage
1700
+ * import { printReport } from './jsViewer.min.js';
1701
+ * printReport({
1702
+ * reportID: 'AnnualReport.rdlx'
1703
+ * });
1704
+ * ```
1705
+ */
1704
1706
  declare function printReport(printOptions: PrintOptions, isCancelRequested?: () => boolean): Promise<void>;
1705
1707
 
1706
- export { AnimationOptions, Color, DefaultExportSettings, ErrorInfo, ErrorSeverity, ExportCallback, ExportOptions, ExportTypes, HoverChartAnimationOptions, HoverTableAnimationOptions, InitialZoomMode, InitializationOptions, JSViewer, LoadChartAnimationOptions, PageViewOptions, PanelsLocation, Parameter, ParameterDescriptor, ParametersPanelSettings, Percentage, PrintOptions, RenderFormat, RenderMode, ReportInfo, ReportServiceSettings, ReportType, SearchOptions, Sidebar, SizeType, Toolbar, ToolbarButtons, UITheme, UIThemes, ViewMode, ViewerType, createViewer, exportReport, printReport };
1708
+ export { type AnimationOptions, Color, type DefaultExportSettings, type ErrorInfo, type ErrorSeverity, type ExportCallback, type ExportOptions, type ExportTypes, type HoverChartAnimationOptions, type HoverTableAnimationOptions, type InitialZoomMode, type InitializationOptions, type JSViewer, type LoadChartAnimationOptions, type PageViewOptions, type PanelsLocation, type Parameter, type ParameterDescriptor, type ParametersPanelSettings, type Percentage, type PrintOptions, type RenderFormat, type RenderMode, type ReportInfo, type ReportServiceSettings, ReportType, type SearchOptions, type Sidebar, type SizeType, type Toolbar, ToolbarButtons, type UITheme, UIThemes, type ViewMode, type ViewerType, createViewer, exportReport, printReport };