nexabase-report 0.1.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 +106 -0
- package/dist/browser-lud4wlfC.js +1473 -0
- package/dist/favicon.svg +1 -0
- package/dist/html2canvas-BXLDsEU4.js +26 -0
- package/dist/html2canvas-CSJ68r_Q.js +4877 -0
- package/dist/html2pdf-DwP6YZUu.js +4242 -0
- package/dist/icons.svg +24 -0
- package/dist/index-BJcVIdAR.js +82960 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es-CLzdqdqQ.js +5646 -0
- package/dist/jspdf.es.min-CDx0J4wI.js +8109 -0
- package/dist/nexabase-report.es.js +7 -0
- package/dist/nexabase-report.umd.js +513 -0
- package/dist/purify.es-Bo7Q7b72.js +471 -0
- package/dist/style.css +1723 -0
- package/docs/API_REST.md +376 -0
- package/docs/EXPORT_REGRESSION.md +54 -0
- package/docs/EXTERNAL_INTEGRATION.md +211 -0
- package/docs/PUBLISHING.md +304 -0
- package/docs/QA_PLAN.md +138 -0
- package/docs/VIEWER_API.md +288 -0
- package/examples/report-agrupado-por-cliente.json +186 -0
- package/examples/report-codigos-qr-barcode.json +178 -0
- package/examples/report-crosstab-categoria-mes.json +123 -0
- package/examples/report-factura.json +287 -0
- package/examples/report-grafico-ventas-por-mes.json +127 -0
- package/examples/report-master-detail-ordenes.json +215 -0
- package/examples/report-productos.json +160 -0
- package/examples/report-ventas-logo-tabla.json +154 -0
- package/package.json +88 -0
package/README.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# NexaBase Report (Designer + Viewer)
|
|
2
|
+
|
|
3
|
+
Librería para diseñar y visualizar reportes tipo banded (inspirada en Stimulsoft) con exportación a PDF/Excel/Word.
|
|
4
|
+
|
|
5
|
+
## Instalación
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install nexabase-report
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Uso rápido: Viewer (apps externas)
|
|
12
|
+
|
|
13
|
+
El Viewer se expone como Custom Element: `<nexa-viewer />`.
|
|
14
|
+
|
|
15
|
+
### 1) Vue 3
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { registerNexaReport } from 'nexabase-report';
|
|
19
|
+
import 'nexabase-report/style.css';
|
|
20
|
+
|
|
21
|
+
registerNexaReport();
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```vue
|
|
25
|
+
<template>
|
|
26
|
+
<nexa-viewer
|
|
27
|
+
:definition="definition"
|
|
28
|
+
:data="data"
|
|
29
|
+
:parameters="{ fechaDesde: '2026-01-01' }"
|
|
30
|
+
minimal
|
|
31
|
+
skip-params-dialog
|
|
32
|
+
/>
|
|
33
|
+
</template>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 2) React
|
|
37
|
+
|
|
38
|
+
```tsx
|
|
39
|
+
import { useEffect, useRef } from 'react';
|
|
40
|
+
import { registerNexaReport } from 'nexabase-report';
|
|
41
|
+
import 'nexabase-report/style.css';
|
|
42
|
+
|
|
43
|
+
registerNexaReport();
|
|
44
|
+
|
|
45
|
+
export function ReportViewer({ definition, data, parameters }: any) {
|
|
46
|
+
const ref = useRef<any>(null);
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
if (!ref.current) return;
|
|
49
|
+
ref.current.definition = definition;
|
|
50
|
+
ref.current.data = data;
|
|
51
|
+
ref.current.parameters = parameters;
|
|
52
|
+
}, [definition, data, parameters]);
|
|
53
|
+
|
|
54
|
+
return <nexa-viewer ref={ref} minimal />;
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### 3) HTML puro (CDN / UMD)
|
|
59
|
+
|
|
60
|
+
```html
|
|
61
|
+
<link rel="stylesheet" href="https://unpkg.com/nexabase-report@0.1.0/dist/style.css">
|
|
62
|
+
<script src="https://unpkg.com/nexabase-report@0.1.0/dist/nexabase-report.umd.js"></script>
|
|
63
|
+
<script>
|
|
64
|
+
window.NexaReport.registerNexaReport();
|
|
65
|
+
</script>
|
|
66
|
+
|
|
67
|
+
<nexa-viewer id="viewer"></nexa-viewer>
|
|
68
|
+
<script>
|
|
69
|
+
const v = document.getElementById('viewer');
|
|
70
|
+
v.definition = {/* ... */};
|
|
71
|
+
v.data = [{/* ... */}];
|
|
72
|
+
</script>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Probar sin publicar (recomendado)
|
|
76
|
+
|
|
77
|
+
Desde este repo:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npm run build
|
|
81
|
+
npm pack
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
En el proyecto externo:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
npm install /ruta/al/nexabase-report-0.1.0.tgz
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Publicar en npm
|
|
91
|
+
|
|
92
|
+
Guía paso a paso: [docs/PUBLISHING.md](docs/PUBLISHING.md)
|
|
93
|
+
|
|
94
|
+
Resumen:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
npm run build
|
|
98
|
+
npm pack --dry-run
|
|
99
|
+
npm version patch
|
|
100
|
+
npm publish --access public
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Documentación
|
|
104
|
+
|
|
105
|
+
- API del Viewer: [docs/VIEWER_API.md](docs/VIEWER_API.md)
|
|
106
|
+
- Integración externa: [docs/EXTERNAL_INTEGRATION.md](docs/EXTERNAL_INTEGRATION.md)
|