@cwellt_software/cwellt-reactjs-lib 1.6.2 → 1.7.0
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/index.cjs.js +2522 -166
- package/dist/index.css +1 -1
- package/dist/index.d.ts +697 -5
- package/dist/index.es.js +2508 -167
- package/dist/src/components/control/choice/tag-selector/CwTagSelector.d.ts.map +1 -1
- package/dist/src/components/control/choice/tag-selector/CwTagSelector.stories.d.ts +2 -0
- package/dist/src/components/control/choice/tag-selector/CwTagSelector.stories.d.ts.map +1 -1
- package/dist/src/components/custom/report-viewer/CwReportGauge.d.ts +19 -0
- package/dist/src/components/custom/report-viewer/CwReportGauge.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/CwReportLineChart.d.ts +21 -0
- package/dist/src/components/custom/report-viewer/CwReportLineChart.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/CwReportPage.d.ts +36 -0
- package/dist/src/components/custom/report-viewer/CwReportPage.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/CwReportParameterForm.d.ts +26 -0
- package/dist/src/components/custom/report-viewer/CwReportParameterForm.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/CwReportPieChart.d.ts +13 -0
- package/dist/src/components/custom/report-viewer/CwReportPieChart.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/CwReportToolbar.d.ts +40 -0
- package/dist/src/components/custom/report-viewer/CwReportToolbar.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/CwReportViewer.d.ts +50 -0
- package/dist/src/components/custom/report-viewer/CwReportViewer.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/ReportItem.d.ts +21 -0
- package/dist/src/components/custom/report-viewer/ReportItem.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/ReportTextbox.d.ts +10 -0
- package/dist/src/components/custom/report-viewer/ReportTextbox.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/logic/rdlChartMarkers.d.ts +26 -0
- package/dist/src/components/custom/report-viewer/logic/rdlChartMarkers.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/logic/rdlChartScale.d.ts +75 -0
- package/dist/src/components/custom/report-viewer/logic/rdlChartScale.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/logic/rdlFind.d.ts +38 -0
- package/dist/src/components/custom/report-viewer/logic/rdlFind.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/logic/rdlGauge.d.ts +40 -0
- package/dist/src/components/custom/report-viewer/logic/rdlGauge.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/logic/rdlListMarkers.d.ts +12 -0
- package/dist/src/components/custom/report-viewer/logic/rdlListMarkers.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/logic/rdlNumberFormat.d.ts +8 -0
- package/dist/src/components/custom/report-viewer/logic/rdlNumberFormat.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/logic/rdlPageGeometry.d.ts +38 -0
- package/dist/src/components/custom/report-viewer/logic/rdlPageGeometry.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/logic/rdlParameterValues.d.ts +42 -0
- package/dist/src/components/custom/report-viewer/logic/rdlParameterValues.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/logic/rdlStyle.d.ts +62 -0
- package/dist/src/components/custom/report-viewer/logic/rdlStyle.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/logic/rdlTableLayout.d.ts +33 -0
- package/dist/src/components/custom/report-viewer/logic/rdlTableLayout.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/logic/rdlToggles.d.ts +20 -0
- package/dist/src/components/custom/report-viewer/logic/rdlToggles.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/logic/rdlUnits.d.ts +9 -0
- package/dist/src/components/custom/report-viewer/logic/rdlUnits.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/logic/reportOutputGuard.d.ts +20 -0
- package/dist/src/components/custom/report-viewer/logic/reportOutputGuard.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/logic/reportViewerLayout.d.ts +17 -0
- package/dist/src/components/custom/report-viewer/logic/reportViewerLayout.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/rdlTypes.d.ts +333 -0
- package/dist/src/components/custom/report-viewer/rdlTypes.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/reportChartShared.d.ts +53 -0
- package/dist/src/components/custom/report-viewer/reportChartShared.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/reportRenderContext.d.ts +25 -0
- package/dist/src/components/custom/report-viewer/reportRenderContext.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/useReportParameterForm.d.ts +30 -0
- package/dist/src/components/custom/report-viewer/useReportParameterForm.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/useReportViewerState.d.ts +74 -0
- package/dist/src/components/custom/report-viewer/useReportViewerState.d.ts.map +1 -0
- package/dist/src/components/custom/report-viewer/useSidebarResize.d.ts +22 -0
- package/dist/src/components/custom/report-viewer/useSidebarResize.d.ts.map +1 -0
- package/dist/src/components/custom/scheduler-new/presentation/Scheduler.stories.d.ts +18 -1
- package/dist/src/components/custom/scheduler-new/presentation/Scheduler.stories.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/row/DefaultRowHeader.d.ts +2 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/row/DefaultRowHeader.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/row/Event.d.ts +15 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/row/Event.d.ts.map +1 -1
- package/dist/src/components/custom/super-scheduler/PinRowHeader.d.ts +0 -1
- package/dist/src/components/custom/super-scheduler/PinRowHeader.d.ts.map +1 -1
- package/dist/src/components/display/data/table/CwTable.d.ts.map +1 -1
- package/dist/src/components/display/data/table/CwTable.stories.d.ts +2 -0
- package/dist/src/components/display/data/table/CwTable.stories.d.ts.map +1 -1
- package/dist/src/components/display/data/tooltip_manager/CwTooltipManager.d.ts +1 -1
- package/dist/src/components/display/data/tooltip_manager/CwTooltipManager.d.ts.map +1 -1
- package/dist/src/components/layout/card/CwCard.d.ts +2 -2
- package/dist/src/components/layout/card/CwCard.d.ts.map +1 -1
- package/dist/src/components/layout/card/CwCard.stories.d.ts +4 -2
- package/dist/src/components/layout/card/CwCard.stories.d.ts.map +1 -1
- package/dist/src/index.d.ts +16 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/playground/PlaygroundApp.d.ts.map +1 -1
- package/dist/src/playground/pages/ReportViewerPage.d.ts +8 -0
- package/dist/src/playground/pages/ReportViewerPage.d.ts.map +1 -0
- package/dist/src/playground/pages/reportViewerFakeData.d.ts +13 -0
- package/dist/src/playground/pages/reportViewerFakeData.d.ts.map +1 -0
- package/dist/test/components/custom/report-viewer/rdlChartMarkers.test.d.ts +2 -0
- package/dist/test/components/custom/report-viewer/rdlChartMarkers.test.d.ts.map +1 -0
- package/dist/test/components/custom/report-viewer/rdlChartScale.test.d.ts +2 -0
- package/dist/test/components/custom/report-viewer/rdlChartScale.test.d.ts.map +1 -0
- package/dist/test/components/custom/report-viewer/rdlFind.test.d.ts +2 -0
- package/dist/test/components/custom/report-viewer/rdlFind.test.d.ts.map +1 -0
- package/dist/test/components/custom/report-viewer/rdlGauge.test.d.ts +2 -0
- package/dist/test/components/custom/report-viewer/rdlGauge.test.d.ts.map +1 -0
- package/dist/test/components/custom/report-viewer/rdlNumberFormat.test.d.ts +2 -0
- package/dist/test/components/custom/report-viewer/rdlNumberFormat.test.d.ts.map +1 -0
- package/dist/test/components/custom/report-viewer/rdlParameterValues.test.d.ts +2 -0
- package/dist/test/components/custom/report-viewer/rdlParameterValues.test.d.ts.map +1 -0
- package/dist/test/components/custom/report-viewer/rdlTableLayout.test.d.ts +2 -0
- package/dist/test/components/custom/report-viewer/rdlTableLayout.test.d.ts.map +1 -0
- package/dist/test/components/custom/report-viewer/rdlText.test.d.ts +2 -0
- package/dist/test/components/custom/report-viewer/rdlText.test.d.ts.map +1 -0
- package/dist/test/components/custom/report-viewer/rdlToggles.test.d.ts +2 -0
- package/dist/test/components/custom/report-viewer/rdlToggles.test.d.ts.map +1 -0
- package/dist/test/components/custom/report-viewer/rdlUnits.test.d.ts +2 -0
- package/dist/test/components/custom/report-viewer/rdlUnits.test.d.ts.map +1 -0
- package/dist/test/components/custom/report-viewer/reportOutputGuard.test.d.ts +2 -0
- package/dist/test/components/custom/report-viewer/reportOutputGuard.test.d.ts.map +1 -0
- package/dist/test/components/custom/report-viewer/reportViewerLayout.test.d.ts +2 -0
- package/dist/test/components/custom/report-viewer/reportViewerLayout.test.d.ts.map +1 -0
- package/dist/test/components/custom/report-viewer/useReportParameterForm.test.d.ts +2 -0
- package/dist/test/components/custom/report-viewer/useReportParameterForm.test.d.ts.map +1 -0
- package/dist/test/components/custom/report-viewer/useReportViewerState.test.d.ts +2 -0
- package/dist/test/components/custom/report-viewer/useReportViewerState.test.d.ts.map +1 -0
- package/dist/test/helpers/renderHookHeadless.d.ts +8 -0
- package/dist/test/helpers/renderHookHeadless.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -793,8 +793,8 @@ interface CwCardProps {
|
|
|
793
793
|
* onDelete={confirmDeletion}
|
|
794
794
|
* footer="Last updated: 2 days ago"
|
|
795
795
|
* chips={[
|
|
796
|
-
* { label: 'Important',
|
|
797
|
-
* { label: 'Custom',
|
|
796
|
+
* { label: 'Important', color: 'danger' },
|
|
797
|
+
* { label: 'Custom', color: 'custom', customColor: '#8a2be2' }
|
|
798
798
|
* ]}
|
|
799
799
|
* >
|
|
800
800
|
* <p>This is the main content of the card.</p>
|
|
@@ -3729,6 +3729,7 @@ interface SchedulerEventDm {
|
|
|
3729
3729
|
width: number;
|
|
3730
3730
|
order?: number;
|
|
3731
3731
|
icons?: ReactElement;
|
|
3732
|
+
/** Colour bars shown instead of `name` / `label`, one equal-width bar per entry. */
|
|
3732
3733
|
rectangleColors?: string[];
|
|
3733
3734
|
tooltip?: ReactNode;
|
|
3734
3735
|
/** Optional content rendered in the strip above the (centered) event box, within the event's lane. */
|
|
@@ -3740,6 +3741,19 @@ interface SchedulerEventDm {
|
|
|
3740
3741
|
alpha?: number;
|
|
3741
3742
|
/** Extra inline styles applied to the event box. Merged last — overrides computed styles. */
|
|
3742
3743
|
style?: React.CSSProperties;
|
|
3744
|
+
/** Dot `CwBadge` sticking out of the top-right corner of the box, e.g. a warning on the event. */
|
|
3745
|
+
cornerMarker?: SchedulerEventCornerMarker;
|
|
3746
|
+
/** Content drawn inside the box behind the name and icons (e.g. segments, a hatch over part of the bar). Clipped to the box, never catches the mouse. The label gets a halo in the box colour so it stays readable over it. */
|
|
3747
|
+
underlay?: ReactNode;
|
|
3748
|
+
/** Replaces `name` inside the box with own content (e.g. a second line). It inherits the contrast text colour. `rectangleColors` replaces both, so the two are mutually exclusive. */
|
|
3749
|
+
label?: ReactNode;
|
|
3750
|
+
}
|
|
3751
|
+
interface SchedulerEventCornerMarker {
|
|
3752
|
+
color: BadgeColorScheme;
|
|
3753
|
+
/** Without it the marker lets clicks and hover through to the event. */
|
|
3754
|
+
tooltip?: ReactNode;
|
|
3755
|
+
/** Pulses the dot to tell the most urgent markers apart. */
|
|
3756
|
+
pulse?: boolean;
|
|
3743
3757
|
}
|
|
3744
3758
|
interface SchedulerEventState<T extends SchedulerEventDm> {
|
|
3745
3759
|
value: T;
|
|
@@ -3763,6 +3777,8 @@ interface RowHeaderDm {
|
|
|
3763
3777
|
subtitle?: string;
|
|
3764
3778
|
subtitle2?: string;
|
|
3765
3779
|
rowHeightRem?: number;
|
|
3780
|
+
/** Background of the header cell, any CSS colour (tokens included). Text contrast is up to the caller. */
|
|
3781
|
+
highlightColor?: string;
|
|
3766
3782
|
}
|
|
3767
3783
|
interface RowHeaderProps<T extends RowHeaderDm> {
|
|
3768
3784
|
value: T;
|
|
@@ -3851,7 +3867,6 @@ interface PinRowHeaderProps extends RowHeaderDm {
|
|
|
3851
3867
|
isPinned: boolean;
|
|
3852
3868
|
contextMenuItems: MenuOption[];
|
|
3853
3869
|
isLoading: boolean;
|
|
3854
|
-
highlightColor?: string;
|
|
3855
3870
|
tooltip?: ReactNode;
|
|
3856
3871
|
indicators?: ReactNode;
|
|
3857
3872
|
}
|
|
@@ -3890,6 +3905,683 @@ declare class OnClearPinned implements UiEvent {
|
|
|
3890
3905
|
constructor();
|
|
3891
3906
|
}
|
|
3892
3907
|
|
|
3908
|
+
/** Answer of the render, page and sort routes: one soft page of the processed report. */
|
|
3909
|
+
interface RdlRenderResult {
|
|
3910
|
+
RenderId: string;
|
|
3911
|
+
ReportId: string;
|
|
3912
|
+
Name: string;
|
|
3913
|
+
Culture: string;
|
|
3914
|
+
/** Width of the report body. */
|
|
3915
|
+
BodyWidth: number;
|
|
3916
|
+
/** Interactive page height used to cut soft pages (0 = one page). */
|
|
3917
|
+
PageHeight: number;
|
|
3918
|
+
PageCount: number;
|
|
3919
|
+
Page: RdlRenderPage;
|
|
3920
|
+
/** A dataset query was refused by the database permissions (legacy "SQL ERROR" dialog). */
|
|
3921
|
+
PermissionDenied: boolean;
|
|
3922
|
+
Warnings: string[];
|
|
3923
|
+
}
|
|
3924
|
+
interface RdlRenderPage {
|
|
3925
|
+
Number: number;
|
|
3926
|
+
/** Height of the body content on this page. */
|
|
3927
|
+
Height: number;
|
|
3928
|
+
/** Width of the page content: the body width or the right edge of the widest item, whichever is larger. Missing in older payloads. */
|
|
3929
|
+
Width?: number | null;
|
|
3930
|
+
Items: RdlRenderItem[];
|
|
3931
|
+
/** Null when the report has none or does not print it on this page. */
|
|
3932
|
+
Header?: RdlRenderPageSection | null;
|
|
3933
|
+
Footer?: RdlRenderPageSection | null;
|
|
3934
|
+
}
|
|
3935
|
+
interface RdlRenderPageSection {
|
|
3936
|
+
Height: number;
|
|
3937
|
+
Style?: RdlRenderStyle | null;
|
|
3938
|
+
Items: RdlRenderItem[];
|
|
3939
|
+
}
|
|
3940
|
+
/** The item is hidden while `InitiallyHidden` XOR "toggle `Id` was flipped" is true. */
|
|
3941
|
+
interface RdlToggleRef {
|
|
3942
|
+
Id: string;
|
|
3943
|
+
InitiallyHidden: boolean;
|
|
3944
|
+
}
|
|
3945
|
+
interface RdlRenderItemBase {
|
|
3946
|
+
Name: string;
|
|
3947
|
+
Top: number;
|
|
3948
|
+
Left: number;
|
|
3949
|
+
Width: number;
|
|
3950
|
+
Height: number;
|
|
3951
|
+
Style?: RdlRenderStyle | null;
|
|
3952
|
+
Toggles?: RdlToggleRef[] | null;
|
|
3953
|
+
}
|
|
3954
|
+
interface RdlRenderTextbox extends RdlRenderItemBase {
|
|
3955
|
+
Kind: "textbox";
|
|
3956
|
+
Paragraphs: RdlRenderParagraph[];
|
|
3957
|
+
CanGrow: boolean;
|
|
3958
|
+
/** Set when this textbox is a drilldown toggle: the id the toggled items refer to. */
|
|
3959
|
+
ToggleId?: string | null;
|
|
3960
|
+
/** Initial state of the +/- icon: true shows "-". */
|
|
3961
|
+
ToggleExpanded?: boolean | null;
|
|
3962
|
+
/** Set when the textbox carries an interactive sort. */
|
|
3963
|
+
SortId?: string | null;
|
|
3964
|
+
/** "Ascending" / "Descending" when this sort is active. */
|
|
3965
|
+
SortDirection?: string | null;
|
|
3966
|
+
}
|
|
3967
|
+
interface RdlRenderParagraph {
|
|
3968
|
+
Style?: RdlRenderStyle | null;
|
|
3969
|
+
/** "Bulleted" / "Numbered", else none. */
|
|
3970
|
+
ListStyle?: string | null;
|
|
3971
|
+
ListLevel: number;
|
|
3972
|
+
Runs: RdlRenderRun[];
|
|
3973
|
+
}
|
|
3974
|
+
/** Always plain text; a line break inside a run is "\n". */
|
|
3975
|
+
interface RdlRenderRun {
|
|
3976
|
+
Text: string;
|
|
3977
|
+
Style?: RdlRenderStyle | null;
|
|
3978
|
+
/** http(s) / mailto link. */
|
|
3979
|
+
Href?: string | null;
|
|
3980
|
+
}
|
|
3981
|
+
interface RdlRenderRectangle extends RdlRenderItemBase {
|
|
3982
|
+
Kind: "rectangle";
|
|
3983
|
+
Items: RdlRenderItem[];
|
|
3984
|
+
}
|
|
3985
|
+
interface RdlRenderLine extends RdlRenderItemBase {
|
|
3986
|
+
Kind: "line";
|
|
3987
|
+
}
|
|
3988
|
+
interface RdlRenderImage extends RdlRenderItemBase {
|
|
3989
|
+
Kind: "image";
|
|
3990
|
+
/** External, Embedded or Database. */
|
|
3991
|
+
Source: string;
|
|
3992
|
+
/** External: the evaluated http(s) URL. */
|
|
3993
|
+
Url?: string | null;
|
|
3994
|
+
/** Embedded / Database: the id for the image route. */
|
|
3995
|
+
ImageId?: string | null;
|
|
3996
|
+
/** AutoSize, Fit, FitProportional or Clip. */
|
|
3997
|
+
Sizing: string;
|
|
3998
|
+
}
|
|
3999
|
+
interface RdlRenderTable extends RdlRenderItemBase {
|
|
4000
|
+
Kind: "table";
|
|
4001
|
+
ColumnWidths: number[];
|
|
4002
|
+
Rows: RdlRenderTableRow[];
|
|
4003
|
+
NoRowsMessage?: string | null;
|
|
4004
|
+
Error?: string | null;
|
|
4005
|
+
}
|
|
4006
|
+
interface RdlRenderTableRow {
|
|
4007
|
+
Height: number;
|
|
4008
|
+
Cells: RdlRenderTableCell[];
|
|
4009
|
+
Toggles?: RdlToggleRef[] | null;
|
|
4010
|
+
/** Pagination hints already applied by the server; the viewer ignores them. */
|
|
4011
|
+
RepeatOnNewPage?: boolean | null;
|
|
4012
|
+
PageBreakBefore?: boolean | null;
|
|
4013
|
+
KeepWithNext?: boolean | null;
|
|
4014
|
+
KeepWithPrevious?: boolean | null;
|
|
4015
|
+
}
|
|
4016
|
+
interface RdlRenderTableCell {
|
|
4017
|
+
/** 0-based output column the cell starts in. */
|
|
4018
|
+
Column: number;
|
|
4019
|
+
ColSpan: number;
|
|
4020
|
+
RowSpan: number;
|
|
4021
|
+
Content?: RdlRenderItem | null;
|
|
4022
|
+
Toggles?: RdlToggleRef[] | null;
|
|
4023
|
+
}
|
|
4024
|
+
/** A category axis label at a position in category units: 0 = the first category's point, fractions lie between two. */
|
|
4025
|
+
interface RdlRenderChartAxisLabel {
|
|
4026
|
+
Position: number;
|
|
4027
|
+
Text: string;
|
|
4028
|
+
}
|
|
4029
|
+
interface RdlRenderChart extends RdlRenderItemBase {
|
|
4030
|
+
Kind: "chart";
|
|
4031
|
+
Titles: string[];
|
|
4032
|
+
CategoryAxisTitle?: string | null;
|
|
4033
|
+
ValueAxisTitle?: string | null;
|
|
4034
|
+
/** .NET format string of the primary value axis (<Format>, e.g. "N0", "0%", "#,##0.00"); null = none. */
|
|
4035
|
+
ValueAxisFormat?: string | null;
|
|
4036
|
+
/**
|
|
4037
|
+
* Category axis labels the server laid out (dates): drawn instead of the viewer's own labels.
|
|
4038
|
+
* Null unless the categories are dates.
|
|
4039
|
+
*/
|
|
4040
|
+
CategoryAxisLabels?: RdlRenderChartAxisLabel[] | null;
|
|
4041
|
+
/** Gridlines at the category labels. @default true */
|
|
4042
|
+
CategoryAxisGridLines?: boolean;
|
|
4043
|
+
/** Gridlines at the value axis ticks. @default true */
|
|
4044
|
+
ValueAxisGridLines?: boolean;
|
|
4045
|
+
LegendHidden: boolean;
|
|
4046
|
+
/** RDL ChartLegend Position (TopLeft, TopCenter, RightTop, LeftCenter, BottomCenter, ...); missing = the RDL default, a column on the right. */
|
|
4047
|
+
LegendPosition?: string | null;
|
|
4048
|
+
/** RDL palette name for series without a color of their own. */
|
|
4049
|
+
Palette?: string | null;
|
|
4050
|
+
Categories: string[];
|
|
4051
|
+
Series: RdlRenderChartSeries[];
|
|
4052
|
+
NoRowsMessage?: string | null;
|
|
4053
|
+
Error?: string | null;
|
|
4054
|
+
}
|
|
4055
|
+
interface RdlRenderChartSeries {
|
|
4056
|
+
Name: string;
|
|
4057
|
+
/** Line, Shape, Column, Bar, Area, ... */
|
|
4058
|
+
Type: string;
|
|
4059
|
+
/** Smooth, Stepped, Pie, ... */
|
|
4060
|
+
Subtype?: string | null;
|
|
4061
|
+
Color?: string | null;
|
|
4062
|
+
ShowDataLabels: boolean;
|
|
4063
|
+
/** One value per category; null = no data point. */
|
|
4064
|
+
Values: (number | null)[];
|
|
4065
|
+
/** None, Square, Circle, Diamond, Triangle, Cross (a "+"), Star4, Star5, Star6, Star10 (Auto resolved by the server); missing = no marker. */
|
|
4066
|
+
MarkerType?: string | null;
|
|
4067
|
+
/** Marker size as an RDL size ("10pt"); missing = 5pt. */
|
|
4068
|
+
MarkerSize?: string | null;
|
|
4069
|
+
}
|
|
4070
|
+
interface RdlRenderGaugePanel extends RdlRenderItemBase {
|
|
4071
|
+
Kind: "gauge";
|
|
4072
|
+
Gauges: RdlRenderGauge[];
|
|
4073
|
+
/** State indicators of the panel; missing in older payloads. */
|
|
4074
|
+
StateIndicators?: RdlRenderStateIndicator[] | null;
|
|
4075
|
+
Labels: string[];
|
|
4076
|
+
Error?: string | null;
|
|
4077
|
+
}
|
|
4078
|
+
/** A state indicator in its active state. Left, Top, Width and Height are percent of the panel box. */
|
|
4079
|
+
interface RdlRenderStateIndicator {
|
|
4080
|
+
Name: string;
|
|
4081
|
+
Value?: number | null;
|
|
4082
|
+
/** Color of the active state; null = nothing to draw. */
|
|
4083
|
+
Color?: string | null;
|
|
4084
|
+
/** RDL IndicatorStyle of the active state (Circle, TrafficLightUnrimmed, ...). */
|
|
4085
|
+
Shape?: string | null;
|
|
4086
|
+
Left: number;
|
|
4087
|
+
Top: number;
|
|
4088
|
+
Width: number;
|
|
4089
|
+
Height: number;
|
|
4090
|
+
}
|
|
4091
|
+
interface RdlRenderGauge {
|
|
4092
|
+
Name: string;
|
|
4093
|
+
/** RadialGauge or LinearGauge. */
|
|
4094
|
+
Kind: string;
|
|
4095
|
+
Scales: RdlRenderGaugeScale[];
|
|
4096
|
+
}
|
|
4097
|
+
interface RdlRenderGaugeScale {
|
|
4098
|
+
Minimum: number;
|
|
4099
|
+
Maximum: number;
|
|
4100
|
+
/** Major tick interval as computed by the server; missing = the viewer's nice step. */
|
|
4101
|
+
Interval?: number | null;
|
|
4102
|
+
/** Whether the scale shows its major tick marks and labels. @default true */
|
|
4103
|
+
ShowLabels?: boolean;
|
|
4104
|
+
Pointers: RdlRenderGaugePointer[];
|
|
4105
|
+
Ranges: RdlRenderGaugeRange[];
|
|
4106
|
+
}
|
|
4107
|
+
interface RdlRenderGaugePointer {
|
|
4108
|
+
Value?: number | null;
|
|
4109
|
+
/** Needle, Marker or Bar. */
|
|
4110
|
+
Type?: string | null;
|
|
4111
|
+
Color?: string | null;
|
|
4112
|
+
/** Thickness in percent of the gauge's own size (a horizontal linear gauge: its height). */
|
|
4113
|
+
Width?: number | null;
|
|
4114
|
+
/** Inside, Outside or Cross (relative to the scale). */
|
|
4115
|
+
Placement?: string | null;
|
|
4116
|
+
}
|
|
4117
|
+
interface RdlRenderGaugeRange {
|
|
4118
|
+
Start?: number | null;
|
|
4119
|
+
End?: number | null;
|
|
4120
|
+
/** The range background color of the RDL; missing = the palette. */
|
|
4121
|
+
Color?: string | null;
|
|
4122
|
+
/** Thickness in percent of the gauge's own size (a horizontal linear gauge: its height). */
|
|
4123
|
+
Width?: number | null;
|
|
4124
|
+
/** Inside, Outside or Cross (relative to the scale); missing = Cross. */
|
|
4125
|
+
Placement?: string | null;
|
|
4126
|
+
}
|
|
4127
|
+
/** An element the viewer does not support, drawn as an empty box. */
|
|
4128
|
+
interface RdlRenderPlaceholder extends RdlRenderItemBase {
|
|
4129
|
+
Kind: "placeholder";
|
|
4130
|
+
Element: string;
|
|
4131
|
+
Reason: string;
|
|
4132
|
+
}
|
|
4133
|
+
/** Discriminated by `Kind`. */
|
|
4134
|
+
type RdlRenderItem = RdlRenderTextbox | RdlRenderRectangle | RdlRenderLine | RdlRenderImage | RdlRenderTable | RdlRenderChart | RdlRenderGaugePanel | RdlRenderPlaceholder;
|
|
4135
|
+
type RdlRenderItemKind = RdlRenderItem["Kind"];
|
|
4136
|
+
/** A resolved style in the RDL vocabulary ("10pt", color names or #RRGGBB, BorderStyle Solid/Dotted/...). */
|
|
4137
|
+
interface RdlRenderStyle {
|
|
4138
|
+
BackgroundColor?: string | null;
|
|
4139
|
+
Color?: string | null;
|
|
4140
|
+
FontFamily?: string | null;
|
|
4141
|
+
FontSize?: string | null;
|
|
4142
|
+
FontStyle?: string | null;
|
|
4143
|
+
FontWeight?: string | null;
|
|
4144
|
+
TextDecoration?: string | null;
|
|
4145
|
+
TextAlign?: string | null;
|
|
4146
|
+
VerticalAlign?: string | null;
|
|
4147
|
+
LineHeight?: string | null;
|
|
4148
|
+
PaddingLeft?: string | null;
|
|
4149
|
+
PaddingRight?: string | null;
|
|
4150
|
+
PaddingTop?: string | null;
|
|
4151
|
+
PaddingBottom?: string | null;
|
|
4152
|
+
BorderTop?: RdlRenderBorder | null;
|
|
4153
|
+
BorderBottom?: RdlRenderBorder | null;
|
|
4154
|
+
BorderLeft?: RdlRenderBorder | null;
|
|
4155
|
+
BorderRight?: RdlRenderBorder | null;
|
|
4156
|
+
}
|
|
4157
|
+
interface RdlRenderBorder {
|
|
4158
|
+
Color?: string | null;
|
|
4159
|
+
Style?: string | null;
|
|
4160
|
+
Width?: string | null;
|
|
4161
|
+
}
|
|
4162
|
+
/** Body of the sort route. */
|
|
4163
|
+
interface RdlSortRequest {
|
|
4164
|
+
SortId: string;
|
|
4165
|
+
/** "Ascending" or "Descending"; anything else toggles the current direction. */
|
|
4166
|
+
Direction?: string | null;
|
|
4167
|
+
}
|
|
4168
|
+
/** A typed value as the API sends it: dates as ISO 8601 text, numbers, booleans or text. */
|
|
4169
|
+
type RdlParameterValue = string | number | boolean | null;
|
|
4170
|
+
/** The parameter form, in the order legacy showed it. */
|
|
4171
|
+
interface RdlReportParameters {
|
|
4172
|
+
ReportId: string;
|
|
4173
|
+
Culture: string;
|
|
4174
|
+
Parameters: RdlReportParameter[];
|
|
4175
|
+
}
|
|
4176
|
+
interface RdlReportParameter {
|
|
4177
|
+
Name: string;
|
|
4178
|
+
Prompt?: string | null;
|
|
4179
|
+
/** String, Boolean, DateTime, Integer or Float. */
|
|
4180
|
+
DataType: string;
|
|
4181
|
+
/** DropDownList, DateTime, Boolean, Float, Integer or TextBox. */
|
|
4182
|
+
InputType: string;
|
|
4183
|
+
Hidden: boolean;
|
|
4184
|
+
MultiValue: boolean;
|
|
4185
|
+
Nullable: boolean;
|
|
4186
|
+
AllowBlank: boolean;
|
|
4187
|
+
ValidValuesDataSet?: string | null;
|
|
4188
|
+
DefaultValuesDataSet?: string | null;
|
|
4189
|
+
ValidValues: RdlParameterOption[];
|
|
4190
|
+
/** Set when the valid-values query failed; the dropdown is then empty. */
|
|
4191
|
+
ValidValuesError?: string | null;
|
|
4192
|
+
/** The values the form shows, typed: submitted, else the default. Empty = none. */
|
|
4193
|
+
Values: RdlParameterValue[];
|
|
4194
|
+
/** Set when a default expression failed or a submitted value does not fit the data type. */
|
|
4195
|
+
ValueError?: string | null;
|
|
4196
|
+
/** Earlier parameters whose change alters this one's options or default. */
|
|
4197
|
+
DependsOn: string[];
|
|
4198
|
+
/** "UserName" or "IDCardID" when the server fills the value. */
|
|
4199
|
+
ServerValue?: string | null;
|
|
4200
|
+
}
|
|
4201
|
+
interface RdlParameterOption {
|
|
4202
|
+
Value: RdlParameterValue;
|
|
4203
|
+
Label: string;
|
|
4204
|
+
}
|
|
4205
|
+
/** Parameter name to its values as invariant text; null = NULL. Body of resolve and render. */
|
|
4206
|
+
type RdlParameterValues = Record<string, (string | null)[]>;
|
|
4207
|
+
/** Body of `parameters/resolve` (RdlParameterValuesRequest) and of `render` (RdlRenderRequest). */
|
|
4208
|
+
interface RdlParameterValuesRequest {
|
|
4209
|
+
Values: RdlParameterValues;
|
|
4210
|
+
}
|
|
4211
|
+
interface RdlReportDefinition {
|
|
4212
|
+
ReportId: string;
|
|
4213
|
+
Name: string;
|
|
4214
|
+
Description?: string | null;
|
|
4215
|
+
/** "2008", "2010", "2016" or "unknown". */
|
|
4216
|
+
SchemaVersion: string;
|
|
4217
|
+
Language?: string | null;
|
|
4218
|
+
Page: RdlPageSettings;
|
|
4219
|
+
SectionCount: number;
|
|
4220
|
+
ParameterCount: number;
|
|
4221
|
+
VisibleParameterCount: number;
|
|
4222
|
+
UnsupportedFeatures: RdlUnsupportedFeature[];
|
|
4223
|
+
}
|
|
4224
|
+
interface RdlPageSettings {
|
|
4225
|
+
PageWidth?: number | null;
|
|
4226
|
+
PageHeight?: number | null;
|
|
4227
|
+
InteractiveWidth?: number | null;
|
|
4228
|
+
InteractiveHeight?: number | null;
|
|
4229
|
+
LeftMargin?: number | null;
|
|
4230
|
+
RightMargin?: number | null;
|
|
4231
|
+
TopMargin?: number | null;
|
|
4232
|
+
BottomMargin?: number | null;
|
|
4233
|
+
}
|
|
4234
|
+
interface RdlUnsupportedFeature {
|
|
4235
|
+
Element: string;
|
|
4236
|
+
ItemName?: string | null;
|
|
4237
|
+
}
|
|
4238
|
+
/** Export formats of the viewer: PDF, Excel and Word. */
|
|
4239
|
+
type RdlExportFormat = "pdf" | "xlsx" | "docx";
|
|
4240
|
+
|
|
4241
|
+
/** One editor value: text (TextBox, numbers as typed, dropdown option values), a boolean or a date-time. */
|
|
4242
|
+
type RdlEditorScalar = string | boolean | Temporal.PlainDateTime;
|
|
4243
|
+
/** The editor state of one parameter: its values, none (or only empty text) for an empty field. */
|
|
4244
|
+
interface RdlParameterEdit {
|
|
4245
|
+
values: RdlEditorScalar[];
|
|
4246
|
+
}
|
|
4247
|
+
type RdlParameterEdits = Record<string, RdlParameterEdit>;
|
|
4248
|
+
/** The editor state of a whole form. */
|
|
4249
|
+
declare function initialParameterEdits(parameters: readonly RdlReportParameter[]): RdlParameterEdits;
|
|
4250
|
+
/**
|
|
4251
|
+
* The values the API takes (RdlParameterValuesRequest.Values): every parameter, each as an array of
|
|
4252
|
+
* invariant text. An empty field is [null] when the parameter is nullable, [""] for a single text,
|
|
4253
|
+
* else []. A parameter without an edit sends the values the server gave it.
|
|
4254
|
+
*
|
|
4255
|
+
* A nullable boolean whose value is NULL shows neither True nor False and keeps sending NULL until
|
|
4256
|
+
* the user picks one; from then on it sends "true" / "false" (a radio group cannot be emptied again).
|
|
4257
|
+
*/
|
|
4258
|
+
declare function toRdlParameterValues(parameters: readonly RdlReportParameter[], edits: RdlParameterEdits): RdlParameterValues;
|
|
4259
|
+
|
|
4260
|
+
/** The host's requests the parameter form sends out. */
|
|
4261
|
+
interface ReportParameterFormOptions {
|
|
4262
|
+
/** A parameter other parameters depend on changed: the host answers with a new `form`. */
|
|
4263
|
+
onResolve: (values: RdlParameterValues) => void;
|
|
4264
|
+
/** "View report" with valid values. */
|
|
4265
|
+
onRender: (values: RdlParameterValues) => void;
|
|
4266
|
+
}
|
|
4267
|
+
/** What `useReportParameterForm` returns: `CwReportParameterForm` (and `CwReportViewer`) take it as a prop. */
|
|
4268
|
+
interface ReportParameterFormController {
|
|
4269
|
+
/** The parameter form the editors belong to (the hook's `form` argument); null while it loads for the first time. */
|
|
4270
|
+
form: RdlReportParameters | null;
|
|
4271
|
+
edits: RdlParameterEdits;
|
|
4272
|
+
/** Client-side errors, shown once the user tried to view the report. */
|
|
4273
|
+
errors: Record<string, string>;
|
|
4274
|
+
/** Sets a parameter's editor value; `commit` re-resolves the form at once when other parameters depend on it. */
|
|
4275
|
+
setEdit: (name: string, edit: RdlParameterEdit, commit: boolean) => void;
|
|
4276
|
+
/** Commits a typed value (on blur): re-resolves when it changed and other parameters depend on it. */
|
|
4277
|
+
commit: (name: string) => void;
|
|
4278
|
+
/** Validates and, when valid, hands the values to `onRender`. */
|
|
4279
|
+
submit: () => void;
|
|
4280
|
+
}
|
|
4281
|
+
/**
|
|
4282
|
+
* Editor state of the report parameter form, owned by the host and handed to `CwReportParameterForm`
|
|
4283
|
+
* as `controller`. A new form object from the host (after a resolve) resets the editors to the values
|
|
4284
|
+
* it carries; the server echoes the submitted values, so nothing is lost.
|
|
4285
|
+
*/
|
|
4286
|
+
declare function useReportParameterForm(form: RdlReportParameters | null, options: ReportParameterFormOptions): ReportParameterFormController;
|
|
4287
|
+
|
|
4288
|
+
/** The ids of the drilldown toggles the user clicked an odd number of times, for one render. */
|
|
4289
|
+
type RdlFlippedToggles = ReadonlySet<string>;
|
|
4290
|
+
/** An item, row or cell is visible only when every toggle it depends on is in its visible state. */
|
|
4291
|
+
declare function isRdlVisible(toggles: readonly RdlToggleRef[] | null | undefined, flipped: RdlFlippedToggles): boolean;
|
|
4292
|
+
/** Returns a new set with `id` flipped (added when absent, removed when present). */
|
|
4293
|
+
declare function flipToggle(flipped: RdlFlippedToggles, id: string): Set<string>;
|
|
4294
|
+
|
|
4295
|
+
interface RdlFindMatch {
|
|
4296
|
+
/** Key of the run the match is in. */
|
|
4297
|
+
key: string;
|
|
4298
|
+
start: number;
|
|
4299
|
+
length: number;
|
|
4300
|
+
}
|
|
4301
|
+
/** Find over the visible text of one page. */
|
|
4302
|
+
declare function findInPage(page: RdlRenderPage, query: string, flipped: RdlFlippedToggles): RdlFindMatch[];
|
|
4303
|
+
|
|
4304
|
+
/** Zoom of the viewer: a factor (1 = 100%) or a fit mode measured against the visible area. */
|
|
4305
|
+
type CwReportZoom = number | "pageWidth" | "wholePage";
|
|
4306
|
+
/** The zoom steps of the toolbar, 50% to 200%. */
|
|
4307
|
+
declare const REPORT_ZOOM_STEPS: readonly number[];
|
|
4308
|
+
/** Margins around the body on the drawn sheet, in points. */
|
|
4309
|
+
interface RdlPageMargins {
|
|
4310
|
+
top: number;
|
|
4311
|
+
right: number;
|
|
4312
|
+
bottom: number;
|
|
4313
|
+
left: number;
|
|
4314
|
+
}
|
|
4315
|
+
|
|
4316
|
+
/** An export or a print the user asked for. */
|
|
4317
|
+
type ReportOutputAction = {
|
|
4318
|
+
kind: "export";
|
|
4319
|
+
format: RdlExportFormat;
|
|
4320
|
+
} | {
|
|
4321
|
+
kind: "print";
|
|
4322
|
+
};
|
|
4323
|
+
|
|
4324
|
+
/** The host's requests the viewer state sends out. */
|
|
4325
|
+
interface ReportViewerStateOptions {
|
|
4326
|
+
/** Go to a page (1-based) of the current render. */
|
|
4327
|
+
onPage: (pageNumber: number) => void;
|
|
4328
|
+
/**
|
|
4329
|
+
* Drilldown on the server, like the old ReportViewer: when given, a toggle click asks the host for
|
|
4330
|
+
* page `pageNumber` of the current render drawn with `toggles` (the flipped toggle ids, see
|
|
4331
|
+
* `flippedToggleIds`), and page changes go here too while any toggle is flipped. The host answers
|
|
4332
|
+
* with a new `result` (same RenderId). Without it, toggles are flipped in the browser.
|
|
4333
|
+
*/
|
|
4334
|
+
onView?: (toggles: readonly string[], pageNumber: number) => void;
|
|
4335
|
+
/**
|
|
4336
|
+
* Export of the current render. `toggles` are the drilldown toggle ids the user flipped relative to
|
|
4337
|
+
* the initial state, so the file can show what the screen shows (`flippedToggleIds`).
|
|
4338
|
+
*/
|
|
4339
|
+
onExport: (format: RdlExportFormat, toggles: readonly string[]) => void;
|
|
4340
|
+
/** Print (a PDF export) of the current render with the flipped toggle ids, as for `onExport`. */
|
|
4341
|
+
onPrint: (toggles: readonly string[]) => void;
|
|
4342
|
+
/** Zoom the viewer opens with (default 100%). */
|
|
4343
|
+
initialZoom?: CwReportZoom;
|
|
4344
|
+
}
|
|
4345
|
+
/** What `useReportViewerState` returns: `CwReportViewer` takes it as its `state` prop. */
|
|
4346
|
+
interface ReportViewerState {
|
|
4347
|
+
/** The render result this state belongs to (the hook's `result` argument). */
|
|
4348
|
+
result: RdlRenderResult | null;
|
|
4349
|
+
/** Whether drilldown runs on the server (`onView` given). */
|
|
4350
|
+
serverToggles: boolean;
|
|
4351
|
+
zoom: CwReportZoom;
|
|
4352
|
+
setZoom: (zoom: CwReportZoom) => void;
|
|
4353
|
+
/** The toggles the user flipped in this render (sent with export, print and server views). */
|
|
4354
|
+
flipped: RdlFlippedToggles;
|
|
4355
|
+
/** The flips the page is drawn with: `flipped`, or none when the server already drew the page for them. */
|
|
4356
|
+
drawnFlips: RdlFlippedToggles;
|
|
4357
|
+
/** A toggle click: with `onView` flips it and asks the host for the page drawn that way, else flips it in the browser. */
|
|
4358
|
+
toggle: (toggleId: string) => void;
|
|
4359
|
+
/** Replaces the flipped toggles of the current render, e.g. to restore them after a failed `onView` (`[]` resets). */
|
|
4360
|
+
setFlipped: (toggleIds: readonly string[]) => void;
|
|
4361
|
+
/** A page change: through `onView` while toggles are flipped and `onView` is given, else `onPage`. */
|
|
4362
|
+
goToPage: (pageNumber: number) => void;
|
|
4363
|
+
findText: string;
|
|
4364
|
+
setFindText: (text: string) => void;
|
|
4365
|
+
findMatches: RdlFindMatch[];
|
|
4366
|
+
findIndex: number;
|
|
4367
|
+
findNext: () => void;
|
|
4368
|
+
parametersVisible: boolean;
|
|
4369
|
+
toggleParameters: () => void;
|
|
4370
|
+
permissionDialogOpen: boolean;
|
|
4371
|
+
closePermissionDialog: () => void;
|
|
4372
|
+
/** An export or print waiting for the user to confirm it despite the render's warnings. */
|
|
4373
|
+
pendingOutput: ReportOutputAction | null;
|
|
4374
|
+
/** Export or print: a render with warnings asks first (`pendingOutput`), else it runs at once. */
|
|
4375
|
+
requestOutput: (action: ReportOutputAction) => void;
|
|
4376
|
+
/**
|
|
4377
|
+
* Runs the pending export or print with the flipped toggle ids. Synchronous, so called inside a
|
|
4378
|
+
* click it lets the host's print open its tab past the popup blocker.
|
|
4379
|
+
*/
|
|
4380
|
+
confirmOutput: () => void;
|
|
4381
|
+
cancelOutput: () => void;
|
|
4382
|
+
}
|
|
4383
|
+
/**
|
|
4384
|
+
* Client-side state of the report viewer around one render result, owned by the host and handed to
|
|
4385
|
+
* `CwReportViewer` as `state`. The drilldown toggles belong to a render: a new RenderId (new render,
|
|
4386
|
+
* sort) starts with none flipped, paging and server views of the same render keep them. With
|
|
4387
|
+
* `onView` the host re-renders the page for the flipped toggles, so the page and find use it as drawn
|
|
4388
|
+
* (`drawnFlips` = none). The find position belongs to the query and the page shown. The permission
|
|
4389
|
+
* dialog is dismissed per render, and a pending export / print question is dropped by a new render.
|
|
4390
|
+
*/
|
|
4391
|
+
declare function useReportViewerState(result: RdlRenderResult | null, options: ReportViewerStateOptions): ReportViewerState;
|
|
4392
|
+
|
|
4393
|
+
interface CwReportViewerProps {
|
|
4394
|
+
/** Report definition (name); optional. */
|
|
4395
|
+
definition?: RdlReportDefinition | null;
|
|
4396
|
+
/**
|
|
4397
|
+
* The viewer state from `useReportViewerState(result, { onPage, onView, onExport, onPrint })`,
|
|
4398
|
+
* called by the host: the current render (null before the first one), zoom, drilldown, find, the
|
|
4399
|
+
* parameter panel and the export / print confirmation.
|
|
4400
|
+
*/
|
|
4401
|
+
state: ReportViewerState;
|
|
4402
|
+
/**
|
|
4403
|
+
* The parameter form from `useReportParameterForm(parameters, { onResolve, onRender })`, called by
|
|
4404
|
+
* the host. Drawn in the sidebar; without a sidebar its `submit` runs "View report" on the canvas.
|
|
4405
|
+
*/
|
|
4406
|
+
parameterForm: ReportParameterFormController;
|
|
4407
|
+
/** The parameter form is loading or being re-resolved. */
|
|
4408
|
+
loadingParameters?: boolean;
|
|
4409
|
+
/** A render, page or sort request is running. */
|
|
4410
|
+
loadingRender?: boolean;
|
|
4411
|
+
/** A failed request, shown in place of the page. */
|
|
4412
|
+
error?: string | null;
|
|
4413
|
+
/** An interactive sort was clicked. */
|
|
4414
|
+
onSort: (sortId: string) => void;
|
|
4415
|
+
onRefresh: () => void;
|
|
4416
|
+
/** Shows a back button when given. */
|
|
4417
|
+
onBack?: () => void;
|
|
4418
|
+
/** URL of an embedded / database image of the current render. */
|
|
4419
|
+
getImageUrl: (imageId: string) => string;
|
|
4420
|
+
/** Initial width of the parameter sidebar in pixels. */
|
|
4421
|
+
sidebarWidth?: number;
|
|
4422
|
+
/** Minimum width of the parameter sidebar in pixels. */
|
|
4423
|
+
minSidebarWidth?: number;
|
|
4424
|
+
/** Maximum width of the parameter sidebar in pixels. */
|
|
4425
|
+
maxSidebarWidth?: number;
|
|
4426
|
+
/** Whether the parameter sidebar can be resized (drag or arrow keys on its edge). */
|
|
4427
|
+
resizable?: boolean;
|
|
4428
|
+
className?: string;
|
|
4429
|
+
}
|
|
4430
|
+
/**
|
|
4431
|
+
* The RDL report viewer: a resizable, collapsible parameter sidebar on the left, the toolbar and
|
|
4432
|
+
* the page on a neutral canvas on the right, like the old ReportViewer. The sidebar only exists
|
|
4433
|
+
* when the user has a parameter to fill in. Presentational: it fetches nothing and owns no report
|
|
4434
|
+
* state. The host calls `useReportViewerState` and `useReportParameterForm` and passes their results
|
|
4435
|
+
* as `state` and `parameterForm`; every request goes out through the callbacks given to those hooks
|
|
4436
|
+
* (or `onSort` / `onRefresh` / `onBack`) and comes back as their arguments.
|
|
4437
|
+
*/
|
|
4438
|
+
declare function CwReportViewer({ definition, state, parameterForm, loadingParameters, loadingRender, error, onSort, onRefresh, onBack, getImageUrl, sidebarWidth, minSidebarWidth, maxSidebarWidth, resizable, className }: CwReportViewerProps): React$1.JSX.Element;
|
|
4439
|
+
|
|
4440
|
+
interface CwReportPageProps {
|
|
4441
|
+
/** The page of the render result to draw. */
|
|
4442
|
+
page: RdlRenderPage;
|
|
4443
|
+
/** Width of the report body in points (`RdlRenderResult.BodyWidth`). */
|
|
4444
|
+
bodyWidth: number;
|
|
4445
|
+
/** Zoom factor, 1 = 100%. @default 1 */
|
|
4446
|
+
zoom?: number;
|
|
4447
|
+
/** Culture of the render (`RdlRenderResult.Culture`), used for chart value axis formats. */
|
|
4448
|
+
culture?: string | null;
|
|
4449
|
+
/** Margins around the body on the sheet, in points. @default 18pt on every side */
|
|
4450
|
+
margins?: RdlPageMargins;
|
|
4451
|
+
/** Drilldown toggles the user flipped in this render. @default none */
|
|
4452
|
+
flippedToggles?: RdlFlippedToggles;
|
|
4453
|
+
/** A drilldown +/- icon was clicked. */
|
|
4454
|
+
onToggle?: (toggleId: string) => void;
|
|
4455
|
+
/** An interactive sort indicator was clicked. */
|
|
4456
|
+
onSort?: (sortId: string) => void;
|
|
4457
|
+
/** URL of an embedded / database image (`RdlRenderImage.ImageId`). */
|
|
4458
|
+
getImageUrl?: (imageId: string) => string;
|
|
4459
|
+
/** Find matches on this page to highlight (from `findInPage`). */
|
|
4460
|
+
findMatches?: readonly RdlFindMatch[];
|
|
4461
|
+
/** Index of the current match in `findMatches`; it is highlighted strongly and scrolled into view. @default -1 */
|
|
4462
|
+
activeMatchIndex?: number;
|
|
4463
|
+
className?: string;
|
|
4464
|
+
}
|
|
4465
|
+
/**
|
|
4466
|
+
* One page of a rendered RDL report drawn as a sheet of paper: page header, body and page footer,
|
|
4467
|
+
* every item absolutely positioned in points scaled by the zoom. Presentational: toggle state,
|
|
4468
|
+
* sorting, images and find matches come from the host.
|
|
4469
|
+
*/
|
|
4470
|
+
declare function CwReportPage({ page, bodyWidth, zoom, culture, margins, flippedToggles, onToggle, onSort, getImageUrl, findMatches, activeMatchIndex, className }: CwReportPageProps): React$1.JSX.Element;
|
|
4471
|
+
|
|
4472
|
+
interface CwReportToolbarProps {
|
|
4473
|
+
/** Current page, 1-based. */
|
|
4474
|
+
pageNumber: number;
|
|
4475
|
+
pageCount: number;
|
|
4476
|
+
onPage: (pageNumber: number) => void;
|
|
4477
|
+
/** Re-runs the report with the current parameters. Hidden when not given. */
|
|
4478
|
+
onRefresh?: () => void;
|
|
4479
|
+
/** Back to where the viewer was opened from. Hidden when not given. */
|
|
4480
|
+
onBack?: () => void;
|
|
4481
|
+
zoom: CwReportZoom;
|
|
4482
|
+
onZoomChange: (zoom: CwReportZoom) => void;
|
|
4483
|
+
/** Find text of the current page. */
|
|
4484
|
+
findText: string;
|
|
4485
|
+
onFindTextChange: (text: string) => void;
|
|
4486
|
+
/** Goes to the next match (cycling). */
|
|
4487
|
+
onFindNext: () => void;
|
|
4488
|
+
findMatchCount: number;
|
|
4489
|
+
/** Index of the current match, -1 for none. */
|
|
4490
|
+
findMatchIndex: number;
|
|
4491
|
+
onExport: (format: RdlExportFormat) => void;
|
|
4492
|
+
onPrint: () => void;
|
|
4493
|
+
/** Render warnings; nothing is shown while the list is empty. */
|
|
4494
|
+
warnings?: readonly string[];
|
|
4495
|
+
/** Shows the parameter panel toggle when given. */
|
|
4496
|
+
onToggleParameters?: () => void;
|
|
4497
|
+
parametersVisible?: boolean;
|
|
4498
|
+
/** No report rendered yet: navigation, find, export and print are disabled. */
|
|
4499
|
+
disabled?: boolean;
|
|
4500
|
+
/** Name of the report, shown right after find (shortened with "...", full name as tooltip). */
|
|
4501
|
+
reportName?: string | null;
|
|
4502
|
+
}
|
|
4503
|
+
/**
|
|
4504
|
+
* The report viewer toolbar, like the old ReportViewer: page navigation, refresh, back, zoom,
|
|
4505
|
+
* find on the current page, export (PDF / Excel / Word) and print. Warnings stay invisible until
|
|
4506
|
+
* there are some (Dark Cockpit). Presentational: every action is a callback.
|
|
4507
|
+
*/
|
|
4508
|
+
declare function CwReportToolbar({ pageNumber, pageCount, onPage, onRefresh, onBack, zoom, onZoomChange, findText, onFindTextChange, onFindNext, findMatchCount, findMatchIndex, onExport, onPrint, warnings, onToggleParameters, parametersVisible, disabled, reportName }: CwReportToolbarProps): React$1.JSX.Element;
|
|
4509
|
+
|
|
4510
|
+
interface CwReportParameterFormProps {
|
|
4511
|
+
/**
|
|
4512
|
+
* The editor state from `useReportParameterForm(form, { onResolve, onRender })`, called by the host:
|
|
4513
|
+
* it carries the parameter form from the API (null while it loads for the first time).
|
|
4514
|
+
*/
|
|
4515
|
+
controller: ReportParameterFormController;
|
|
4516
|
+
/** The form is being loaded or re-resolved. */
|
|
4517
|
+
loading?: boolean;
|
|
4518
|
+
/** Disables "View report" (e.g. while a render runs). */
|
|
4519
|
+
rendering?: boolean;
|
|
4520
|
+
}
|
|
4521
|
+
/**
|
|
4522
|
+
* The report parameter form in the server's order: dropdowns (multi-value as tag selector with
|
|
4523
|
+
* select-all), date-time pickers, True/False, numbers and text. There is no NULL control: an empty
|
|
4524
|
+
* field of a nullable parameter is sent as NULL (see rdlParameterValues), as in the old WinOps
|
|
4525
|
+
* report page. Hidden parameters are not drawn; server-filled ones are read-only. Presentational:
|
|
4526
|
+
* the host owns the editor state (`useReportParameterForm`); a change to a parameter others depend
|
|
4527
|
+
* on calls its `onResolve`, "View report" its `onRender` with the values as invariant text
|
|
4528
|
+
* (`toRdlParameterValues`).
|
|
4529
|
+
*
|
|
4530
|
+
* The form fills its parent's height when the parent gives it one: the fields scroll and the
|
|
4531
|
+
* "View report" footer stays pinned at the bottom. In an unbounded parent it simply grows.
|
|
4532
|
+
*/
|
|
4533
|
+
declare function CwReportParameterForm({ controller, loading, rendering }: CwReportParameterFormProps): React$1.JSX.Element;
|
|
4534
|
+
|
|
4535
|
+
interface CwReportLineChartProps {
|
|
4536
|
+
/** The chart as the render tree delivers it. */
|
|
4537
|
+
chart: RdlRenderChart;
|
|
4538
|
+
/** Drawing size in CSS pixels. */
|
|
4539
|
+
width: number;
|
|
4540
|
+
height: number;
|
|
4541
|
+
/** Zoom factor of the page (scales the chart text). @default 1 */
|
|
4542
|
+
zoom?: number;
|
|
4543
|
+
/** Culture of the report (`RdlRenderResult.Culture`) for the value axis format. */
|
|
4544
|
+
culture?: string | null;
|
|
4545
|
+
}
|
|
4546
|
+
/**
|
|
4547
|
+
* A report chart over categories: Line (Smooth / Stepped), Area, Column and Scatter series share one
|
|
4548
|
+
* value axis; a chart made only of Bar series is drawn horizontally. Scatter series draw only their
|
|
4549
|
+
* markers, line series draw markers too when the report sets a marker type. Null values leave gaps.
|
|
4550
|
+
* The legend sits where the RDL legend Position says. Own SVG, no chart library; hover shows
|
|
4551
|
+
* category, series and value.
|
|
4552
|
+
*/
|
|
4553
|
+
declare function CwReportLineChart({ chart, width, height, zoom, culture }: CwReportLineChartProps): React$1.JSX.Element;
|
|
4554
|
+
|
|
4555
|
+
interface CwReportPieChartProps {
|
|
4556
|
+
/** The chart as the render tree delivers it; its first series is drawn over the categories. */
|
|
4557
|
+
chart: RdlRenderChart;
|
|
4558
|
+
/** Drawing size in CSS pixels. */
|
|
4559
|
+
width: number;
|
|
4560
|
+
height: number;
|
|
4561
|
+
/** Zoom factor of the page (scales the chart text). @default 1 */
|
|
4562
|
+
zoom?: number;
|
|
4563
|
+
}
|
|
4564
|
+
/** A pie of the chart's first series over its categories (RDL series Type "Shape"). Own SVG. */
|
|
4565
|
+
declare function CwReportPieChart({ chart, width, height, zoom }: CwReportPieChartProps): React$1.JSX.Element;
|
|
4566
|
+
|
|
4567
|
+
interface CwReportGaugeProps {
|
|
4568
|
+
/** The gauge panel as the render tree delivers it. */
|
|
4569
|
+
panel: RdlRenderGaugePanel;
|
|
4570
|
+
/** Drawing size in CSS pixels. */
|
|
4571
|
+
width: number;
|
|
4572
|
+
height: number;
|
|
4573
|
+
/** Zoom factor of the page (scales the gauge text). @default 1 */
|
|
4574
|
+
zoom?: number;
|
|
4575
|
+
}
|
|
4576
|
+
/**
|
|
4577
|
+
* A gauge panel: its gauges side by side (RadialGauge = 270 degree dial with colored ranges and a
|
|
4578
|
+
* needle or bar per pointer, LinearGauge = horizontal track with range bands, a bar or marker per
|
|
4579
|
+
* pointer and the major ticks), the state indicators at their percent boxes and the panel labels
|
|
4580
|
+
* below. The pointer value is not printed; only the report's own labels are. Only the first scale of
|
|
4581
|
+
* a gauge is drawn.
|
|
4582
|
+
*/
|
|
4583
|
+
declare function CwReportGauge({ panel, width, height, zoom }: CwReportGaugeProps): React$1.JSX.Element;
|
|
4584
|
+
|
|
3893
4585
|
type DisplayMode = "default" | "icao-only" | "iata-only" | "full-text";
|
|
3894
4586
|
/** Props for {@link CwFindAirport}. */
|
|
3895
4587
|
interface CwFindAirportProps {
|
|
@@ -4061,5 +4753,5 @@ declare class OnClickContextMenu implements UiEvent {
|
|
|
4061
4753
|
constructor(id: string, clickedMenu: string);
|
|
4062
4754
|
}
|
|
4063
4755
|
|
|
4064
|
-
export { CwAccordionContainer, CwAlign, CwAnchoredMenu, CwBadge, CwBtnApprove, CwBtnCancel, CwBtnDelete, CwBtnEdit, CwBtnSave, CwButton, CwButtonSplit, CwButtonSwitch, CwCard, CwCardList, CwCheck, CwCheckbox, CwCheckboxGroup, CwChip, CwColorPicker, CwConfirmationPopup, CwContextMenu, CwDatePicker, CwDatePickerTemporal, CwDateRangePicker, CwDateRangePickerTemporal, CwDateTimePicker, CwDateTimePickerCompact, CwDateTimePickerTemporal, CwDialog, CwDigit, CwDisplayMessage, CwDropdown, CwDropdownFilter, CwExpandable, CwFileUploadMultiple, CwFindAirport, CwFindCrewmember, CwGenericTooltip, CwHeadingMain, CwHeadingSecond, CwIcon, CwImageArea, CwImageGallery, CwImageZoom, CwInput, CwInputColor, CwInputDateText, CwInputDatetime, CwInputImage, CwInputNumber, CwInputPhone, CwInputText, CwKeyValueList, CwLabel, CwLoading, CwMasterDetail, CwMessage, CwMessageManager, CwMessageType, CwModal, CwModalHover, CwModalReportFunctional, CwMultiFilter, CwMultiFilterTag, CwNavMenu, CwNote, CwOption, CwPopoverButton, CwProgress, CwRadioGroup, CwReportModal, CwSearchAsync, CwSearchInput, CwSelect, CwSelectList, CwSelectListItems, CwSkeleton, CwSortableList, CwSortableTable, CwTable, CwTableGrouped, CwTableServerSide, CwTabs, CwTagSelector, CwTextArea, CwTime, CwTimePicker, CwToggle, CwTooltipManager, CwTooltipNew, CwTreeView, CwWeekdaySelector, DefaultRowHeader, OnClearPinned, OnClickContextMenu, OnClickEvent, OnClickRowEvent, OnClickRowHeader, OnClickUtc, OnDoubleClickEvent, OnDoubleClickRowEvent, OnDragEvent, OnDropCtrlEvent, OnDropEvent, OnEndClickHeaderEvent, OnLeftDragStart, OnMultiClickEvent, OnPinRow, OnRangeClickEvent, OnRightClickEvent, OnRightClickRow, OnRightDragStart, OnStartClickHeaderEvent, OnUnpinRow, PRESET_LIBRARY_TEMPORAL, PinRowHeader, Scheduler, SchedulerEvent, SuperScheduler, TooltipConstraintContext, UiEvent, Weekdays, configureCwLoading, eventIsVisible, filterNavItems, filterVisibleEvents, getCwLoadingDefaults, getDefaultDivisions, getEventSizes, getPresetsByKeysTemporal, itemsToMultiFilterTags, sortNavItems, useCwMessage, useSortableList, useSortableTable, useTooltipConstraint };
|
|
4065
|
-
export type { BackgroundEventDm, BadgeColorScheme, BadgeSize, BadgeVariant, CardChip, ChipColorScheme, ChipVariant, Column$1 as Column, ConfirmationPopupProps, CwAlignProps, CwBadgeProps, CwButtonSplitAction, CwButtonSplitProps, CwButtonSwitchOption, CwButtonSwitchProps, CwCardListProps, CwCardProps, CwChipProps, CwDataAttributes, CwDialogProps, CwDropdownOption, CwDropdownProps, CwExpandableProps, CwGroupLayoutProps, CwImageAreaMethods, CwImageAreaProps, CwInputDateTextProps, CwInputDatetimeProps, CwInputImageProps, CwInputNumberProps, CwInputPhoneProps, CwInputTextProps, CwInputTimeProps, CwKeyValueListProps, CwLabelProps, CwLayoutProps, CwLoadingDefaults, CwMasterDetailItem, CwMasterDetailProps, CwMessageProps, CwModalHoverProps, CwMultiFilterProps, CwMultiFilterTagProps, CwNavItem, CwNavMenuProps, CwNoteProps, CwPopoverButtonProps, CwProgressColor, CwProgressProps, CwRadioGroupProps, CwReportModalFunctionalProps, CwSearchAsyncOption, CwSearchAsyncProps, CwSelectListProps, CwSkeletonProps, CwSortableListProps, CwSortableTableProps, CwTableGroupedData, CwTableGroupedData_Group, CwTableGroupedData_Row, CwTableGroupedProps, CwTagSelectorOption, CwTagSelectorProps, CwTextAreaProps, CwTreeNode, DataItem, DateRangePresetTemporal, DateRangeValue, DateRangeValueTemporal, ICwMultiFilterTag, ImageItem, IndicatorRowDm, MenuOption, OnEvent, PinRowHeaderProps, RowHeaderDm, RowHeaderProps, SchedulerEventDm, SchedulerEventState, SchedulerRowProps, SchedulerState, ServerSideTableState, SortableColumn, SortableTableDragState, SuperSchedulerProps, Tab, UseSortableTableReturn, Weekday, ZoomImageItem };
|
|
4756
|
+
export { CwAccordionContainer, CwAlign, CwAnchoredMenu, CwBadge, CwBtnApprove, CwBtnCancel, CwBtnDelete, CwBtnEdit, CwBtnSave, CwButton, CwButtonSplit, CwButtonSwitch, CwCard, CwCardList, CwCheck, CwCheckbox, CwCheckboxGroup, CwChip, CwColorPicker, CwConfirmationPopup, CwContextMenu, CwDatePicker, CwDatePickerTemporal, CwDateRangePicker, CwDateRangePickerTemporal, CwDateTimePicker, CwDateTimePickerCompact, CwDateTimePickerTemporal, CwDialog, CwDigit, CwDisplayMessage, CwDropdown, CwDropdownFilter, CwExpandable, CwFileUploadMultiple, CwFindAirport, CwFindCrewmember, CwGenericTooltip, CwHeadingMain, CwHeadingSecond, CwIcon, CwImageArea, CwImageGallery, CwImageZoom, CwInput, CwInputColor, CwInputDateText, CwInputDatetime, CwInputImage, CwInputNumber, CwInputPhone, CwInputText, CwKeyValueList, CwLabel, CwLoading, CwMasterDetail, CwMessage, CwMessageManager, CwMessageType, CwModal, CwModalHover, CwModalReportFunctional, CwMultiFilter, CwMultiFilterTag, CwNavMenu, CwNote, CwOption, CwPopoverButton, CwProgress, CwRadioGroup, CwReportGauge, CwReportLineChart, CwReportModal, CwReportPage, CwReportParameterForm, CwReportPieChart, CwReportToolbar, CwReportViewer, CwSearchAsync, CwSearchInput, CwSelect, CwSelectList, CwSelectListItems, CwSkeleton, CwSortableList, CwSortableTable, CwTable, CwTableGrouped, CwTableServerSide, CwTabs, CwTagSelector, CwTextArea, CwTime, CwTimePicker, CwToggle, CwTooltipManager, CwTooltipNew, CwTreeView, CwWeekdaySelector, DefaultRowHeader, OnClearPinned, OnClickContextMenu, OnClickEvent, OnClickRowEvent, OnClickRowHeader, OnClickUtc, OnDoubleClickEvent, OnDoubleClickRowEvent, OnDragEvent, OnDropCtrlEvent, OnDropEvent, OnEndClickHeaderEvent, OnLeftDragStart, OnMultiClickEvent, OnPinRow, OnRangeClickEvent, OnRightClickEvent, OnRightClickRow, OnRightDragStart, OnStartClickHeaderEvent, OnUnpinRow, PRESET_LIBRARY_TEMPORAL, PinRowHeader, REPORT_ZOOM_STEPS, Scheduler, SchedulerEvent, SuperScheduler, TooltipConstraintContext, UiEvent, Weekdays, configureCwLoading, eventIsVisible, filterNavItems, filterVisibleEvents, findInPage, flipToggle, getCwLoadingDefaults, getDefaultDivisions, getEventSizes, getPresetsByKeysTemporal, initialParameterEdits, isRdlVisible, itemsToMultiFilterTags, sortNavItems, toRdlParameterValues, useCwMessage, useReportParameterForm, useReportViewerState, useSortableList, useSortableTable, useTooltipConstraint };
|
|
4757
|
+
export type { BackgroundEventDm, BadgeColorScheme, BadgeSize, BadgeVariant, CardChip, ChipColorScheme, ChipVariant, Column$1 as Column, ConfirmationPopupProps, CwAlignProps, CwBadgeProps, CwButtonSplitAction, CwButtonSplitProps, CwButtonSwitchOption, CwButtonSwitchProps, CwCardListProps, CwCardProps, CwChipProps, CwDataAttributes, CwDialogProps, CwDropdownOption, CwDropdownProps, CwExpandableProps, CwGroupLayoutProps, CwImageAreaMethods, CwImageAreaProps, CwInputDateTextProps, CwInputDatetimeProps, CwInputImageProps, CwInputNumberProps, CwInputPhoneProps, CwInputTextProps, CwInputTimeProps, CwKeyValueListProps, CwLabelProps, CwLayoutProps, CwLoadingDefaults, CwMasterDetailItem, CwMasterDetailProps, CwMessageProps, CwModalHoverProps, CwMultiFilterProps, CwMultiFilterTagProps, CwNavItem, CwNavMenuProps, CwNoteProps, CwPopoverButtonProps, CwProgressColor, CwProgressProps, CwRadioGroupProps, CwReportGaugeProps, CwReportLineChartProps, CwReportModalFunctionalProps, CwReportPageProps, CwReportParameterFormProps, CwReportPieChartProps, CwReportToolbarProps, CwReportViewerProps, CwReportZoom, CwSearchAsyncOption, CwSearchAsyncProps, CwSelectListProps, CwSkeletonProps, CwSortableListProps, CwSortableTableProps, CwTableGroupedData, CwTableGroupedData_Group, CwTableGroupedData_Row, CwTableGroupedProps, CwTagSelectorOption, CwTagSelectorProps, CwTextAreaProps, CwTreeNode, DataItem, DateRangePresetTemporal, DateRangeValue, DateRangeValueTemporal, ICwMultiFilterTag, ImageItem, IndicatorRowDm, MenuOption, OnEvent, PinRowHeaderProps, RdlEditorScalar, RdlExportFormat, RdlFindMatch, RdlFlippedToggles, RdlPageMargins, RdlPageSettings, RdlParameterEdit, RdlParameterEdits, RdlParameterOption, RdlParameterValue, RdlParameterValues, RdlParameterValuesRequest, RdlRenderBorder, RdlRenderChart, RdlRenderChartSeries, RdlRenderGauge, RdlRenderGaugePanel, RdlRenderGaugePointer, RdlRenderGaugeRange, RdlRenderGaugeScale, RdlRenderImage, RdlRenderItem, RdlRenderItemBase, RdlRenderItemKind, RdlRenderLine, RdlRenderPage, RdlRenderPageSection, RdlRenderParagraph, RdlRenderPlaceholder, RdlRenderRectangle, RdlRenderResult, RdlRenderRun, RdlRenderStyle, RdlRenderTable, RdlRenderTableCell, RdlRenderTableRow, RdlRenderTextbox, RdlReportDefinition, RdlReportParameter, RdlReportParameters, RdlSortRequest, RdlToggleRef, RdlUnsupportedFeature, ReportOutputAction, ReportParameterFormController, ReportParameterFormOptions, ReportViewerState, ReportViewerStateOptions, RowHeaderDm, RowHeaderProps, SchedulerEventCornerMarker, SchedulerEventDm, SchedulerEventState, SchedulerRowProps, SchedulerState, ServerSideTableState, SortableColumn, SortableTableDragState, SuperSchedulerProps, Tab, UseSortableTableReturn, Weekday, ZoomImageItem };
|