@object-ui/plugin-report 0.1.0 → 3.0.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/README.md ADDED
@@ -0,0 +1,137 @@
1
+ # @object-ui/plugin-report
2
+
3
+ Report components for Object UI — build, view, render, and export reports with scheduling support.
4
+
5
+ ## Features
6
+
7
+ - 📊 **Report Builder** - Visual drag-and-drop report construction
8
+ - 👁️ **Report Viewer** - Interactive report viewing with toolbar controls
9
+ - 🖨️ **Report Renderer** - Render reports from JSON definitions with charts
10
+ - 📤 **Multi-Format Export** - Export to CSV, JSON, HTML, PDF, and Excel
11
+ - 🔄 **Live Data Export** - Export with real-time data via `exportWithLiveData`
12
+ - 📈 **Excel Formulas** - Export Excel files with live formulas via `exportExcelWithFormulas`
13
+ - ⏰ **Schedule Config** - Configure recurring report generation and delivery
14
+ - 📦 **Auto-registered** - Components register with `ComponentRegistry` on import
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ npm install @object-ui/plugin-report
20
+ ```
21
+
22
+ **Peer Dependencies:**
23
+ - `react` ^18.0.0 || ^19.0.0
24
+ - `react-dom` ^18.0.0 || ^19.0.0
25
+ - `@object-ui/core`
26
+
27
+ ## Quick Start
28
+
29
+ ```tsx
30
+ import { ReportBuilder, ReportViewer, ReportRenderer } from '@object-ui/plugin-report';
31
+
32
+ function ReportEditorPage() {
33
+ return <ReportBuilder report={initialReport} />;
34
+ }
35
+
36
+ function ReportViewPage() {
37
+ return <ReportViewer report={reportDefinition} showToolbar />;
38
+ }
39
+
40
+ function EmbeddedReport() {
41
+ return (
42
+ <ReportRenderer
43
+ title="Monthly Sales"
44
+ description="Sales performance overview"
45
+ chart={chartConfig}
46
+ />
47
+ );
48
+ }
49
+ ```
50
+
51
+ ## API
52
+
53
+ ### ReportBuilder
54
+
55
+ Visual report construction interface:
56
+
57
+ ```tsx
58
+ <ReportBuilder report={initialReport} />
59
+ ```
60
+
61
+ ### ReportViewer
62
+
63
+ Interactive report viewer with toolbar:
64
+
65
+ ```tsx
66
+ <ReportViewer report={reportDefinition} showToolbar />
67
+ ```
68
+
69
+ ### ReportRenderer
70
+
71
+ Renders a report from a JSON chart configuration:
72
+
73
+ ```tsx
74
+ <ReportRenderer title="Revenue" description="Q4 Revenue" chart={chartConfig} />
75
+ ```
76
+
77
+ ### Export Functions
78
+
79
+ Export reports in multiple formats:
80
+
81
+ ```tsx
82
+ import {
83
+ exportReport,
84
+ exportAsCSV,
85
+ exportAsJSON,
86
+ exportAsHTML,
87
+ exportAsPDF,
88
+ exportAsExcel,
89
+ } from '@object-ui/plugin-report';
90
+
91
+ await exportAsCSV(reportData, 'sales-report.csv');
92
+ await exportAsPDF(reportData, 'sales-report.pdf');
93
+ await exportAsExcel(reportData, 'sales-report.xlsx');
94
+ ```
95
+
96
+ ### Live Export
97
+
98
+ Export with real-time data and Excel formulas:
99
+
100
+ ```tsx
101
+ import { exportWithLiveData, exportExcelWithFormulas } from '@object-ui/plugin-report';
102
+
103
+ await exportWithLiveData(reportConfig, { format: 'pdf' });
104
+ await exportExcelWithFormulas(reportConfig, {
105
+ columns: [{ field: 'total', formula: 'SUM(B2:B100)' }],
106
+ });
107
+ ```
108
+
109
+ ### ScheduleConfig
110
+
111
+ Configure recurring report generation:
112
+
113
+ ```tsx
114
+ import { ScheduleConfig, createScheduleTrigger } from '@object-ui/plugin-report';
115
+
116
+ <ScheduleConfig
117
+ reportId="monthly-sales"
118
+ onSave={(schedule) => saveSchedule(schedule)}
119
+ />
120
+
121
+ const trigger = createScheduleTrigger((reportId) => generateReport(reportId));
122
+ ```
123
+
124
+ ### Schema-Driven Usage
125
+
126
+ Components auto-register with `ComponentRegistry`:
127
+
128
+ ```json
129
+ {
130
+ "type": "report-builder",
131
+ "report": { "sections": [] }
132
+ }
133
+ ```
134
+
135
+ ## License
136
+
137
+ MIT
package/dist/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from './src/index'
1
+ export * from './plugin-report/src/index'