@dashadmin/dash-reports 1.3.73 → 1.3.74-srcfree.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.
Files changed (75) hide show
  1. package/dist/ReportFilters.d.ts +9 -0
  2. package/dist/ReportFiltersDrawer.d.ts +12 -0
  3. package/dist/ReportPage.d.ts +9 -0
  4. package/dist/ReportsDashboard.d.ts +7 -0
  5. package/dist/ReportsIndex.d.ts +7 -0
  6. package/dist/ReportsModule.d.ts +7 -0
  7. package/dist/TenantDashboard.d.ts +12 -0
  8. package/dist/adapters/mui/BarWidget.d.ts +3 -0
  9. package/dist/adapters/mui/DoughnutWidget.d.ts +3 -0
  10. package/dist/adapters/mui/FunnelWidget.d.ts +3 -0
  11. package/dist/adapters/mui/KpiWidget.d.ts +3 -0
  12. package/dist/adapters/mui/LineWidget.d.ts +3 -0
  13. package/dist/adapters/mui/PieWidget.d.ts +3 -0
  14. package/dist/adapters/mui/PreviewWidget.d.ts +10 -0
  15. package/dist/adapters/mui/TableWidget.d.ts +16 -0
  16. package/dist/adapters/mui/chartSetup.d.ts +2 -0
  17. package/dist/adapters/mui/chartTheme.d.ts +71 -0
  18. package/dist/adapters/mui/index.d.ts +12 -0
  19. package/dist/adapters/mui/palette.d.ts +9 -0
  20. package/dist/adapters/mui/useChartData.d.ts +14 -0
  21. package/dist/core/formatBucket.d.ts +4 -0
  22. package/dist/core/label.d.ts +3 -0
  23. package/dist/core/queryParams.d.ts +3 -0
  24. package/dist/core/types.d.ts +94 -0
  25. package/dist/core/useDashboard.d.ts +50 -0
  26. package/dist/core/useReportExport.d.ts +7 -0
  27. package/dist/core/useReportList.d.ts +7 -0
  28. package/dist/core/useReportPreview.d.ts +7 -0
  29. package/dist/core/useReportSeries.d.ts +8 -0
  30. package/dist/core/useReportSpec.d.ts +9 -0
  31. package/dist/core/useReportTable.d.ts +10 -0
  32. package/dist/core/visualizationLayout.d.ts +13 -0
  33. package/dist/core/visualizationRegistry.d.ts +14 -0
  34. package/dist/createReportsResource.d.ts +40 -0
  35. package/dist/i18n/en.d.ts +83 -0
  36. package/dist/i18n/es.d.ts +83 -0
  37. package/{src/index.tsx → dist/index.d.ts} +3 -31
  38. package/package.json +13 -10
  39. package/src/ReportFilters.tsx +0 -145
  40. package/src/ReportFiltersDrawer.tsx +0 -73
  41. package/src/ReportPage.tsx +0 -280
  42. package/src/ReportsDashboard.tsx +0 -61
  43. package/src/ReportsIndex.tsx +0 -113
  44. package/src/ReportsModule.tsx +0 -42
  45. package/src/TenantDashboard.tsx +0 -290
  46. package/src/adapters/mui/BarWidget.tsx +0 -66
  47. package/src/adapters/mui/DoughnutWidget.tsx +0 -112
  48. package/src/adapters/mui/FunnelWidget.tsx +0 -108
  49. package/src/adapters/mui/KpiWidget.tsx +0 -123
  50. package/src/adapters/mui/LineWidget.tsx +0 -70
  51. package/src/adapters/mui/PieWidget.tsx +0 -16
  52. package/src/adapters/mui/PreviewWidget.tsx +0 -123
  53. package/src/adapters/mui/TableWidget.tsx +0 -141
  54. package/src/adapters/mui/chartSetup.ts +0 -53
  55. package/src/adapters/mui/chartTheme.ts +0 -84
  56. package/src/adapters/mui/index.ts +0 -29
  57. package/src/adapters/mui/palette.ts +0 -85
  58. package/src/adapters/mui/useChartData.ts +0 -62
  59. package/src/core/formatBucket.ts +0 -73
  60. package/src/core/label.ts +0 -28
  61. package/src/core/queryParams.ts +0 -27
  62. package/src/core/types.ts +0 -157
  63. package/src/core/useDashboard.ts +0 -161
  64. package/src/core/useReportExport.ts +0 -68
  65. package/src/core/useReportList.ts +0 -51
  66. package/src/core/useReportPreview.ts +0 -68
  67. package/src/core/useReportSeries.ts +0 -59
  68. package/src/core/useReportSpec.ts +0 -79
  69. package/src/core/useReportTable.ts +0 -71
  70. package/src/core/visualizationLayout.ts +0 -34
  71. package/src/core/visualizationRegistry.ts +0 -39
  72. package/src/createReportsResource.tsx +0 -81
  73. package/src/i18n/en.ts +0 -95
  74. package/src/i18n/es.ts +0 -84
  75. /package/{src/i18n/index.ts → dist/i18n/index.d.ts} +0 -0
@@ -0,0 +1,9 @@
1
+ import type { ReportFilterState, ReportSpec, TranslateFn } from './core/types';
2
+ export interface ReportFiltersProps {
3
+ spec: ReportSpec;
4
+ value: ReportFilterState;
5
+ onChange: (next: ReportFilterState) => void;
6
+ translate: TranslateFn;
7
+ }
8
+ export declare function ReportFilters({ spec, value, onChange, translate }: ReportFiltersProps): import("react").JSX.Element;
9
+ export default ReportFilters;
@@ -0,0 +1,12 @@
1
+ import type { ReportFilterState, ReportSpec, TranslateFn } from './core/types';
2
+ export interface ReportFiltersDrawerProps {
3
+ open: boolean;
4
+ onClose: () => void;
5
+ spec: ReportSpec;
6
+ value: ReportFilterState;
7
+ onChange: (next: ReportFilterState) => void;
8
+ onReset: () => void;
9
+ translate: TranslateFn;
10
+ }
11
+ export declare function ReportFiltersDrawer({ open, onClose, spec, value, onChange, onReset, translate, }: ReportFiltersDrawerProps): import("react").JSX.Element;
12
+ export default ReportFiltersDrawer;
@@ -0,0 +1,9 @@
1
+ import type { TranslateFn } from './core/types';
2
+ import './adapters/mui';
3
+ export interface ReportPageProps {
4
+ reportKey: string;
5
+ translate: TranslateFn;
6
+ title?: string;
7
+ }
8
+ export declare function ReportPage({ reportKey, translate, title }: ReportPageProps): import("react").JSX.Element;
9
+ export default ReportPage;
@@ -0,0 +1,7 @@
1
+ import type { TranslateFn } from './core/types';
2
+ export interface ReportsDashboardProps {
3
+ translate: TranslateFn;
4
+ title?: string;
5
+ }
6
+ export declare function ReportsDashboard({ translate, title }: ReportsDashboardProps): import("react").JSX.Element;
7
+ export default ReportsDashboard;
@@ -0,0 +1,7 @@
1
+ import type { TranslateFn } from './core/types';
2
+ export interface ReportsIndexProps {
3
+ translate: TranslateFn;
4
+ onOpen: (reportKey: string) => void;
5
+ }
6
+ export declare function ReportsIndex({ translate, onOpen }: ReportsIndexProps): import("react").JSX.Element;
7
+ export default ReportsIndex;
@@ -0,0 +1,7 @@
1
+ import type { TranslateFn } from './core/types';
2
+ export interface ReportsModuleProps {
3
+ translate: TranslateFn;
4
+ basePath: string;
5
+ }
6
+ export declare function ReportsModule({ translate, basePath }: ReportsModuleProps): import("react").JSX.Element;
7
+ export default ReportsModule;
@@ -0,0 +1,12 @@
1
+ import type { TranslateFn } from './core/types';
2
+ import './adapters/mui';
3
+ export interface TenantDashboardProps {
4
+ tenantId: string;
5
+ tenantName?: string;
6
+ translate: TranslateFn;
7
+ showHeading?: boolean;
8
+ period?: string;
9
+ hidePeriodPicker?: boolean;
10
+ }
11
+ export declare function TenantDashboard({ tenantId, tenantName, translate, showHeading, period: pinnedPeriod, hidePeriodPicker, }: TenantDashboardProps): import("react").JSX.Element;
12
+ export default TenantDashboard;
@@ -0,0 +1,3 @@
1
+ import type { VisualizationProps } from '../../core/visualizationRegistry';
2
+ export declare function BarWidget(props: VisualizationProps): import("react").JSX.Element;
3
+ export default BarWidget;
@@ -0,0 +1,3 @@
1
+ import type { VisualizationProps } from '../../core/visualizationRegistry';
2
+ export declare function DoughnutWidget({ result, spec, translate, height }: VisualizationProps): import("react").JSX.Element;
3
+ export default DoughnutWidget;
@@ -0,0 +1,3 @@
1
+ import type { VisualizationProps } from '../../core/visualizationRegistry';
2
+ export declare function FunnelWidget({ result, spec, translate }: VisualizationProps): import("react").JSX.Element;
3
+ export default FunnelWidget;
@@ -0,0 +1,3 @@
1
+ import type { VisualizationProps } from '../../core/visualizationRegistry';
2
+ export declare function KpiWidget({ result, spec, translate }: VisualizationProps): import("react").JSX.Element;
3
+ export default KpiWidget;
@@ -0,0 +1,3 @@
1
+ import type { VisualizationProps } from '../../core/visualizationRegistry';
2
+ export declare function LineWidget(props: VisualizationProps): import("react").JSX.Element;
3
+ export default LineWidget;
@@ -0,0 +1,3 @@
1
+ import type { VisualizationProps } from '../../core/visualizationRegistry';
2
+ export declare function PieWidget(props: VisualizationProps): import("react").JSX.Element;
3
+ export default PieWidget;
@@ -0,0 +1,10 @@
1
+ import type { ReportMetric, ReportResult, TranslateFn, VisualizationType } from '../../core/types';
2
+ export interface PreviewWidgetProps {
3
+ result: ReportResult | null;
4
+ loading: boolean;
5
+ type: VisualizationType;
6
+ translate: TranslateFn;
7
+ metrics?: ReportMetric[];
8
+ }
9
+ export declare function PreviewWidget({ result, loading, type, translate, metrics }: PreviewWidgetProps): import("react").JSX.Element;
10
+ export default PreviewWidget;
@@ -0,0 +1,16 @@
1
+ import type { VisualizationProps } from '../../core/visualizationRegistry';
2
+ export declare function SeriesTableWidget({ result, translate }: VisualizationProps): import("react").JSX.Element;
3
+ export interface DetailTableProps {
4
+ page: {
5
+ data: Array<Record<string, unknown>>;
6
+ total: number;
7
+ page: number;
8
+ perPage: number;
9
+ } | null;
10
+ loading: boolean;
11
+ currentPage: number;
12
+ onPageChange: (page: number) => void;
13
+ translate: (key: string, options?: Record<string, unknown>) => string;
14
+ }
15
+ export declare function DetailTable({ page, loading, currentPage, onPageChange, translate }: DetailTableProps): import("react").JSX.Element;
16
+ export default SeriesTableWidget;
@@ -0,0 +1,2 @@
1
+ export declare function ensureChartsRegistered(): void;
2
+ export default ensureChartsRegistered;
@@ -0,0 +1,71 @@
1
+ import type { Theme } from '@mui/material';
2
+ export interface ChartChrome {
3
+ dark: boolean;
4
+ grid: string;
5
+ axisText: string;
6
+ tooltipBg: string;
7
+ tooltipText: string;
8
+ surface: string;
9
+ }
10
+ export declare function chartChrome(theme: Theme): ChartChrome;
11
+ export declare function baseChartOptions(chrome: ChartChrome, showLegend: boolean): {
12
+ responsive: boolean;
13
+ maintainAspectRatio: boolean;
14
+ interaction: {
15
+ mode: "index";
16
+ intersect: boolean;
17
+ };
18
+ plugins: {
19
+ legend: {
20
+ display: boolean;
21
+ position: "bottom";
22
+ labels: {
23
+ color: string;
24
+ usePointStyle: boolean;
25
+ pointStyle: "circle";
26
+ boxWidth: number;
27
+ boxHeight: number;
28
+ padding: number;
29
+ };
30
+ };
31
+ tooltip: {
32
+ backgroundColor: string;
33
+ titleColor: string;
34
+ bodyColor: string;
35
+ borderColor: string;
36
+ borderWidth: number;
37
+ padding: number;
38
+ cornerRadius: number;
39
+ displayColors: boolean;
40
+ usePointStyle: boolean;
41
+ };
42
+ };
43
+ scales: {
44
+ x: {
45
+ grid: {
46
+ display: boolean;
47
+ };
48
+ border: {
49
+ color: string;
50
+ };
51
+ ticks: {
52
+ color: string;
53
+ maxRotation: number;
54
+ autoSkipPadding: number;
55
+ };
56
+ };
57
+ y: {
58
+ beginAtZero: boolean;
59
+ grid: {
60
+ color: string;
61
+ };
62
+ border: {
63
+ display: boolean;
64
+ };
65
+ ticks: {
66
+ color: string;
67
+ precision: number;
68
+ };
69
+ };
70
+ };
71
+ };
@@ -0,0 +1,12 @@
1
+ import { BarWidget } from './BarWidget';
2
+ import { LineWidget } from './LineWidget';
3
+ import { DoughnutWidget } from './DoughnutWidget';
4
+ import { PieWidget } from './PieWidget';
5
+ import { KpiWidget } from './KpiWidget';
6
+ import { FunnelWidget } from './FunnelWidget';
7
+ import { SeriesTableWidget } from './TableWidget';
8
+ export { BarWidget, LineWidget, DoughnutWidget, PieWidget, KpiWidget, FunnelWidget, SeriesTableWidget };
9
+ export { DetailTable } from './TableWidget';
10
+ export { PreviewWidget } from './PreviewWidget';
11
+ export * from './palette';
12
+ export { chartChrome, baseChartOptions } from './chartTheme';
@@ -0,0 +1,9 @@
1
+ import type { ReportSpec } from '../../core/types';
2
+ export declare const SERIES_LIGHT: readonly ["#2a78d6", "#eb6834", "#1baf7a", "#eda100", "#e87ba4", "#008300", "#4a3aa7", "#e34948"];
3
+ export declare const SERIES_DARK: readonly ["#3987e5", "#d95926", "#199e70", "#c98500", "#d55181", "#008300", "#9085e9", "#e66767"];
4
+ export declare const OTHER_LIGHT = "#8a8a80";
5
+ export declare const OTHER_DARK = "#6f6f66";
6
+ export declare const MAX_SERIES: 8;
7
+ export declare function seriesPalette(dark: boolean): readonly string[];
8
+ export declare function buildSlotMap(spec: ReportSpec | null, pivotKey: string | undefined, seriesKeys: string[]): Map<string, number>;
9
+ export declare function colorForSlot(slot: number, dark: boolean): string;
@@ -0,0 +1,14 @@
1
+ import type { VisualizationProps } from '../../core/visualizationRegistry';
2
+ export declare function useChartData({ result, spec, translate }: VisualizationProps): {
3
+ chrome: import("./chartTheme").ChartChrome;
4
+ datasets: {
5
+ key: string;
6
+ label: string;
7
+ data: number[];
8
+ color: string;
9
+ }[];
10
+ labels: string[];
11
+ longLabels: string[];
12
+ foldedCount: number;
13
+ };
14
+ export default useChartData;
@@ -0,0 +1,4 @@
1
+ import type { Granularity, TranslateFn } from './types';
2
+ export declare function formatBucket(bucket: string | number, granularity: Granularity, translate: TranslateFn): string;
3
+ export declare function formatBucketLong(bucket: string | number, granularity: Granularity, translate: TranslateFn): string;
4
+ export default formatBucket;
@@ -0,0 +1,3 @@
1
+ import type { TranslateFn } from './types';
2
+ export declare function label(translate: TranslateFn, key: string | undefined, text?: string): string;
3
+ export default label;
@@ -0,0 +1,3 @@
1
+ import type { ReportFilterState } from './types';
2
+ export declare function toQueryParams(filters: ReportFilterState): Record<string, unknown>;
3
+ export default toQueryParams;
@@ -0,0 +1,94 @@
1
+ export type Granularity = 'total' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'hourOfDay' | 'dayOfWeek';
2
+ export type VisualizationType = 'Bar' | 'Line' | 'Pie' | 'Doughnut' | 'Kpi' | 'Funnel' | 'Table';
3
+ export interface DimensionValue {
4
+ value: string | number | boolean;
5
+ label: string;
6
+ labelText?: string;
7
+ icon?: string;
8
+ }
9
+ export interface ReportDimension {
10
+ key: string;
11
+ label: string;
12
+ labelText?: string;
13
+ type: 'column' | 'jsonpath' | 'relation';
14
+ multiple?: boolean;
15
+ source?: string;
16
+ visibleTo?: string[];
17
+ values?: DimensionValue[];
18
+ }
19
+ export interface ReportMetric {
20
+ key: string;
21
+ label: string;
22
+ labelText?: string;
23
+ kind: 'count' | 'countNotNull' | 'countDistinct' | 'sum' | 'avg' | 'min' | 'max';
24
+ decimal: boolean;
25
+ unit?: string | null;
26
+ }
27
+ export interface ReportVisualization {
28
+ type: VisualizationType;
29
+ options?: Record<string, unknown>;
30
+ }
31
+ export interface ReportSpec {
32
+ key: string;
33
+ title: string;
34
+ titleText?: string;
35
+ granularities: Granularity[];
36
+ defaultGranularity: Granularity;
37
+ timezone: string;
38
+ dimensions: ReportDimension[];
39
+ metrics: ReportMetric[];
40
+ visualizations: ReportVisualization[];
41
+ defaultVisualization: VisualizationType;
42
+ previewGranularity: Granularity;
43
+ filters: Record<string, {
44
+ type: string;
45
+ }>;
46
+ exporters: string[];
47
+ defaultRangeDays: number;
48
+ }
49
+ export interface ReportSeries {
50
+ key: string;
51
+ label: string;
52
+ labelText?: string;
53
+ metric: string;
54
+ data: Array<number | null>;
55
+ }
56
+ export interface ReportResult {
57
+ key: string;
58
+ granularity: Granularity;
59
+ timezone: string;
60
+ buckets: Array<string | number>;
61
+ series: ReportSeries[];
62
+ totals: Record<string, number | null>;
63
+ meta?: {
64
+ start?: string;
65
+ end?: string;
66
+ pivot?: string | null;
67
+ scopedTenantIds?: string[] | null;
68
+ };
69
+ }
70
+ export interface ReportTablePage {
71
+ data: Array<Record<string, unknown>>;
72
+ total: number;
73
+ page: number;
74
+ perPage: number;
75
+ lastPage: number;
76
+ }
77
+ export interface ReportListEntry {
78
+ key: string;
79
+ title: string;
80
+ titleText?: string;
81
+ metrics?: ReportMetric[];
82
+ visualizations: ReportVisualization[];
83
+ defaultVisualization: VisualizationType;
84
+ previewGranularity: Granularity;
85
+ defaultRangeDays: number;
86
+ }
87
+ export interface ReportFilterState {
88
+ start: string;
89
+ end: string;
90
+ granularity: Granularity;
91
+ pivot?: string;
92
+ dimensions: Record<string, Array<string | number | boolean>>;
93
+ }
94
+ export type TranslateFn = (key: string, options?: Record<string, unknown>) => string;
@@ -0,0 +1,50 @@
1
+ import type { ReportMetric, ReportResult, VisualizationType } from './types';
2
+ export interface DashboardPeriod {
3
+ id: string;
4
+ label: string;
5
+ start: string;
6
+ end: string;
7
+ isOpen: boolean;
8
+ }
9
+ export interface DashboardWidget {
10
+ key: string;
11
+ reportKey: string;
12
+ title: string;
13
+ titleText?: string;
14
+ pivot?: string;
15
+ metrics?: string[];
16
+ visualization?: VisualizationType;
17
+ size?: 'sm' | 'md' | 'lg' | 'full';
18
+ result?: ReportResult & {
19
+ metrics?: ReportMetric[];
20
+ };
21
+ error?: string;
22
+ }
23
+ export interface DashboardTenant {
24
+ tenant: {
25
+ id: string;
26
+ name: string;
27
+ };
28
+ period: DashboardPeriod | null;
29
+ }
30
+ export declare function useDashboardTenants(): {
31
+ tenants: DashboardTenant[];
32
+ widgets: DashboardWidget[];
33
+ loading: boolean;
34
+ error: Error;
35
+ };
36
+ export interface DashboardData {
37
+ tenantId: string;
38
+ period: DashboardPeriod;
39
+ source: string;
40
+ widgets: DashboardWidget[];
41
+ }
42
+ export declare function useTenantDashboard(tenantId: string | null, period?: string): {
43
+ data: DashboardData;
44
+ loading: boolean;
45
+ error: Error;
46
+ };
47
+ export declare function useTenantPeriods(tenantId: string | null): {
48
+ periods: DashboardPeriod[];
49
+ loading: boolean;
50
+ };
@@ -0,0 +1,7 @@
1
+ import type { ReportFilterState } from './types';
2
+ export declare function useReportExport(reportKey: string): {
3
+ exporting: boolean;
4
+ error: Error;
5
+ exportReport: (filters: ReportFilterState, format?: string) => Promise<void>;
6
+ };
7
+ export default useReportExport;
@@ -0,0 +1,7 @@
1
+ import type { ReportListEntry } from './types';
2
+ export declare function useReportList(): {
3
+ reports: ReportListEntry[];
4
+ loading: boolean;
5
+ error: Error;
6
+ };
7
+ export default useReportList;
@@ -0,0 +1,7 @@
1
+ import type { Granularity, ReportResult } from './types';
2
+ export declare function useReportPreview(reportKey: string, granularity: Granularity, rangeDays: number, enabled?: boolean): {
3
+ result: ReportResult;
4
+ loading: boolean;
5
+ error: Error;
6
+ };
7
+ export default useReportPreview;
@@ -0,0 +1,8 @@
1
+ import type { ReportFilterState, ReportResult } from './types';
2
+ export interface UseReportSeriesResult {
3
+ result: ReportResult | null;
4
+ loading: boolean;
5
+ error: Error | null;
6
+ }
7
+ export declare function useReportSeries(reportKey: string, filters: ReportFilterState | null): UseReportSeriesResult;
8
+ export default useReportSeries;
@@ -0,0 +1,9 @@
1
+ import type { ReportSpec } from './types';
2
+ export interface UseReportSpecResult {
3
+ spec: ReportSpec | null;
4
+ loading: boolean;
5
+ error: Error | null;
6
+ reload: () => void;
7
+ }
8
+ export declare function useReportSpec(reportKey: string): UseReportSpecResult;
9
+ export default useReportSpec;
@@ -0,0 +1,10 @@
1
+ import type { ReportFilterState, ReportTablePage } from './types';
2
+ export interface UseReportTableResult {
3
+ page: ReportTablePage | null;
4
+ loading: boolean;
5
+ error: Error | null;
6
+ setPage: (page: number) => void;
7
+ currentPage: number;
8
+ }
9
+ export declare function useReportTable(reportKey: string, filters: ReportFilterState | null, enabled?: boolean, perPage?: number): UseReportTableResult;
10
+ export default useReportTable;
@@ -0,0 +1,13 @@
1
+ export declare function isCanvasVisualization(type: string | null | undefined): boolean;
2
+ export declare function visualizationBoxSx(type: string | null | undefined, height: number): {
3
+ height: number;
4
+ minHeight: number;
5
+ maxHeight: number;
6
+ overflow: string;
7
+ } | {
8
+ minHeight: number;
9
+ height?: undefined;
10
+ maxHeight?: undefined;
11
+ overflow?: undefined;
12
+ };
13
+ export default isCanvasVisualization;
@@ -0,0 +1,14 @@
1
+ import type { ComponentType } from 'react';
2
+ import type { ReportResult, ReportSpec, TranslateFn, VisualizationType } from './types';
3
+ export interface VisualizationProps {
4
+ result: ReportResult;
5
+ spec: ReportSpec;
6
+ translate: TranslateFn;
7
+ options?: Record<string, unknown>;
8
+ height?: number;
9
+ }
10
+ declare const registry: Map<VisualizationType, ComponentType<VisualizationProps>>;
11
+ export declare function registerVisualization(type: VisualizationType, component: ComponentType<VisualizationProps>): void;
12
+ export declare function getVisualization(type: VisualizationType): ComponentType<VisualizationProps> | null;
13
+ export declare function registeredVisualizations(): VisualizationType[];
14
+ export default registry;
@@ -0,0 +1,40 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { TranslateFn } from './core/types';
3
+ export interface CreateReportsResourceOptions {
4
+ model?: string;
5
+ label?: string;
6
+ group?: string;
7
+ icon?: ReactElement;
8
+ roles?: string[];
9
+ menuTitle?: string;
10
+ translate?: TranslateFn;
11
+ urlPrefix?: string;
12
+ }
13
+ export declare function createReportsResource(options?: CreateReportsResourceOptions): {
14
+ model: string;
15
+ label: string;
16
+ group: string;
17
+ icon: ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
18
+ roles: string[];
19
+ schema: any[];
20
+ list: boolean;
21
+ create: boolean;
22
+ edit: boolean;
23
+ view: boolean;
24
+ delete: boolean;
25
+ listViewButton: {
26
+ enabled: boolean;
27
+ };
28
+ listEditButton: {
29
+ enabled: boolean;
30
+ };
31
+ listDeleteButton: {
32
+ enabled: boolean;
33
+ };
34
+ customRoutes: () => import("react").JSX.Element;
35
+ menu: {
36
+ title: string;
37
+ redirect: string;
38
+ }[];
39
+ };
40
+ export default createReportsResource;
@@ -0,0 +1,83 @@
1
+ export declare const en: {
2
+ dash_reports: {
3
+ title: string;
4
+ units: {
5
+ seconds: string;
6
+ minutes: string;
7
+ hours: string;
8
+ };
9
+ dashboard: {
10
+ title: string;
11
+ };
12
+ period: {
13
+ open: string;
14
+ closed: string;
15
+ current: string;
16
+ };
17
+ back_to_list: string;
18
+ no_reports: string;
19
+ loading: string;
20
+ no_data: string;
21
+ no_rows: string;
22
+ other: string;
23
+ show_detail: string;
24
+ hide_detail: string;
25
+ week_of: string;
26
+ filters: {
27
+ title: string;
28
+ reset: string;
29
+ done: string;
30
+ start: string;
31
+ end: string;
32
+ granularity: string;
33
+ pivot: string;
34
+ no_pivot: string;
35
+ };
36
+ granularity: {
37
+ daily: string;
38
+ weekly: string;
39
+ monthly: string;
40
+ yearly: string;
41
+ total: string;
42
+ hourOfDay: string;
43
+ dayOfWeek: string;
44
+ };
45
+ viz: {
46
+ Bar: string;
47
+ Line: string;
48
+ Pie: string;
49
+ Doughnut: string;
50
+ Kpi: string;
51
+ Funnel: string;
52
+ Table: string;
53
+ };
54
+ funnel: {
55
+ step: string;
56
+ skipped: string;
57
+ };
58
+ table: {
59
+ period: string;
60
+ };
61
+ weekdays: {
62
+ monday: string;
63
+ tuesday: string;
64
+ wednesday: string;
65
+ thursday: string;
66
+ friday: string;
67
+ saturday: string;
68
+ sunday: string;
69
+ };
70
+ export: {
71
+ xlsx: string;
72
+ csv: string;
73
+ };
74
+ errors: {
75
+ spec: string;
76
+ list: string;
77
+ series: string;
78
+ dashboard: string;
79
+ widget: string;
80
+ };
81
+ };
82
+ };
83
+ export default en;