@mescius/activereportsnet-viewer 19.0.0 → 19.0.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.
- package/dist/jsViewer.min.js +17 -17
- package/esm/jsViewer.min.js +17 -17
- package/package.json +1 -1
- package/types/jsViewer.min.d.ts +98 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mescius/activereportsnet-viewer",
|
|
3
|
-
"version": "19.0.
|
|
3
|
+
"version": "19.0.1",
|
|
4
4
|
"description": "Fast, full featured, JavaScript report viewer for ActiveReports report definition files. Features include printing, exporting, and searching.",
|
|
5
5
|
"main": "./dist/jsViewer.min.js",
|
|
6
6
|
"module": "./esm/jsViewer.min.js",
|
package/types/jsViewer.min.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { ColorTheme } from '@dt/core-ui';
|
|
2
|
-
export { ColorTheme, ColorThemeShades } from '@dt/core-ui';
|
|
3
|
-
|
|
4
1
|
/** Type representing a viewer's sidebar instance. */
|
|
5
2
|
interface Sidebar {
|
|
6
3
|
/**
|
|
@@ -201,6 +198,37 @@ interface Toolbar {
|
|
|
201
198
|
fullscreen: ToolbarItems;
|
|
202
199
|
}
|
|
203
200
|
|
|
201
|
+
/** Represents a color item with multiple shades. */
|
|
202
|
+
type ColorThemeShades = {
|
|
203
|
+
veryLight: string;
|
|
204
|
+
light: string;
|
|
205
|
+
lighter: string;
|
|
206
|
+
lightMedium: string;
|
|
207
|
+
medium: string;
|
|
208
|
+
base: string;
|
|
209
|
+
darkMedium: string;
|
|
210
|
+
darker: string;
|
|
211
|
+
dark: string;
|
|
212
|
+
veryDark: string;
|
|
213
|
+
};
|
|
214
|
+
/** Specifies the type of the color theme. */
|
|
215
|
+
type ColorThemeType = 'light' | 'dark';
|
|
216
|
+
/** Represents a color item in a color theme. */
|
|
217
|
+
type ColorThemeItem = string | ColorThemeShades;
|
|
218
|
+
/** Represents the UI theme settings for customizing the appearance. */
|
|
219
|
+
type ColorTheme = {
|
|
220
|
+
name: string;
|
|
221
|
+
type: ColorThemeType;
|
|
222
|
+
backgroundMain: string;
|
|
223
|
+
backgroundPanels: string;
|
|
224
|
+
primary?: ColorThemeItem;
|
|
225
|
+
secondary?: ColorThemeItem;
|
|
226
|
+
neutral?: ColorThemeItem;
|
|
227
|
+
error?: ColorThemeItem;
|
|
228
|
+
warning?: ColorThemeItem;
|
|
229
|
+
fontFamily?: string;
|
|
230
|
+
};
|
|
231
|
+
/** Represents the default themes */
|
|
204
232
|
declare const ColorThemes: {
|
|
205
233
|
default: ColorTheme;
|
|
206
234
|
defaultDark: ColorTheme;
|
|
@@ -211,6 +239,36 @@ declare const ColorThemes: {
|
|
|
211
239
|
activeReportsDark: ColorTheme;
|
|
212
240
|
};
|
|
213
241
|
|
|
242
|
+
/** Result of an action. */
|
|
243
|
+
interface ActionResult {
|
|
244
|
+
/** Whether the action should be canceled. */
|
|
245
|
+
cancel: boolean;
|
|
246
|
+
}
|
|
247
|
+
/** Information about an action. */
|
|
248
|
+
interface ActionInfo {
|
|
249
|
+
/** Type of the action. */
|
|
250
|
+
type: ActionType;
|
|
251
|
+
/** Parameters associated with the action, if any. */
|
|
252
|
+
parameters?: ActionParameter[];
|
|
253
|
+
/** Target of the action, if any. */
|
|
254
|
+
target?: ActionTarget;
|
|
255
|
+
}
|
|
256
|
+
/** Possible action types. */
|
|
257
|
+
type ActionType = 'toggle' | 'sort' | 'bookmark' | 'hyperlink' | 'drillthrough' | 'applyParameters';
|
|
258
|
+
/** Parameters for an action. */
|
|
259
|
+
type ActionParameter = {
|
|
260
|
+
/** Parameter name. */
|
|
261
|
+
name: string;
|
|
262
|
+
/** Type of the apply parameter. */
|
|
263
|
+
type?: 'Set' | 'Reset' | 'Toggle';
|
|
264
|
+
/** Values associated with the parameter. */
|
|
265
|
+
values: any[];
|
|
266
|
+
};
|
|
267
|
+
/** Target of an action. */
|
|
268
|
+
type ActionTarget = {
|
|
269
|
+
pageNumber: number;
|
|
270
|
+
selector?: string;
|
|
271
|
+
} | string;
|
|
214
272
|
/** Report types. */
|
|
215
273
|
declare enum ReportType {
|
|
216
274
|
Section = 0,
|
|
@@ -446,6 +504,9 @@ type HoverChartAnimationOptions = {
|
|
|
446
504
|
/** The following options can be set during initialization or at run time while working with the JS Viewer. */
|
|
447
505
|
interface InitializationOptions {
|
|
448
506
|
/**
|
|
507
|
+
* * @deprecated This property is deprecated and will be removed in future versions.
|
|
508
|
+
* Use the new `onAction` property instead.
|
|
509
|
+
*
|
|
449
510
|
* The callback that is invoked before the JS Viewer opens the hyperlink, bookmark link,
|
|
450
511
|
* drill down report or toggles the report control visibility.
|
|
451
512
|
* @example Usage example:
|
|
@@ -465,6 +526,39 @@ interface InitializationOptions {
|
|
|
465
526
|
* ```
|
|
466
527
|
*/
|
|
467
528
|
action?: (actionType: string, actionParams: any[], actionTarget: string) => void;
|
|
529
|
+
/**
|
|
530
|
+
* The callback that is triggered before the JS Viewer executes an action.
|
|
531
|
+
*
|
|
532
|
+
* @param action - An object containing details about the action being triggered.
|
|
533
|
+
* @returns A promise that resolves to an `ActionResult`, determining how the action should be handled.
|
|
534
|
+
*
|
|
535
|
+
* @example Usage example:
|
|
536
|
+
* ```javascript
|
|
537
|
+
* // ESM usage
|
|
538
|
+
* import { createViewer } from './jsViewer.min.js';
|
|
539
|
+
* const viewer = createViewer({
|
|
540
|
+
* onAction: async (action) => {
|
|
541
|
+
* if (action.type === 'hyperlink') {
|
|
542
|
+
* return { cancel: true }; // Prevent opening the link
|
|
543
|
+
* }
|
|
544
|
+
* return { cancel: false };
|
|
545
|
+
* }
|
|
546
|
+
* });
|
|
547
|
+
* ```
|
|
548
|
+
* @example Usage example:
|
|
549
|
+
* ```javascript
|
|
550
|
+
* // UMD usage
|
|
551
|
+
* var viewer = GrapeCity.ActiveReports.JSViewer.create({
|
|
552
|
+
* onAction: async (action) => {
|
|
553
|
+
* if (action.type === 'hyperlink') {
|
|
554
|
+
* return { cancel: true }; // Prevent opening the link
|
|
555
|
+
* }
|
|
556
|
+
* return { cancel: false };
|
|
557
|
+
* }
|
|
558
|
+
* });
|
|
559
|
+
* ```
|
|
560
|
+
*/
|
|
561
|
+
onAction?: (action: ActionInfo) => Promise<ActionResult>;
|
|
468
562
|
/** The report view animation options.
|
|
469
563
|
* @example Usage example:
|
|
470
564
|
* ```javascript
|
|
@@ -1698,4 +1792,4 @@ declare function createViewer(params: InitializationOptions): JSViewer;
|
|
|
1698
1792
|
*/
|
|
1699
1793
|
declare function printReport(printOptions: PrintOptions, isCancelRequested?: () => boolean): Promise<void>;
|
|
1700
1794
|
|
|
1701
|
-
export { type AnimationOptions, ColorThemes, 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 ParameterValue, type ParametersPanelSettings, type Percentage, type PrintOptions, type RenderFormat, type RenderMode, type ReportInfo, type ReportItemsStyles, type ReportServiceSettings, ReportType, type SearchOptions, type Sidebar, type SizeType, type ThemeSettings, type Toolbar, ToolbarButtons, type ViewMode, type ViewerType, createViewer, exportReport, printReport };
|
|
1795
|
+
export { type ActionInfo, type ActionParameter, type ActionResult, type ActionTarget, type ActionType, type AnimationOptions, type ColorTheme, type ColorThemeShades, ColorThemes, 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 ParameterValue, type ParametersPanelSettings, type Percentage, type PrintOptions, type RenderFormat, type RenderMode, type ReportInfo, type ReportItemsStyles, type ReportServiceSettings, ReportType, type SearchOptions, type Sidebar, type SizeType, type ThemeSettings, type Toolbar, ToolbarButtons, type ViewMode, type ViewerType, createViewer, exportReport, printReport };
|