nexabase-report 0.2.10 → 0.2.12

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 (59) hide show
  1. package/dist/{html2canvas-CX3Va04O.js → html2canvas-CfXDaoV_.js} +2 -2
  2. package/dist/{html2canvas-BR5Zfk2I.js → html2canvas-LflXVpnS.js} +1 -1
  3. package/dist/{html2pdf-DWBRzG46.js → html2pdf-Bi79Idsl.js} +3 -3
  4. package/dist/{index-BPSYeQz4.js → index-Bg8Qh7hD.js} +15258 -15235
  5. package/dist/{index.es-tialsC4T.js → index.es-48wJ6bnG.js} +2 -2
  6. package/dist/{jspdf.es.min-Dcx0wUQ4.js → jspdf.es.min-COz5Nq2T.js} +2 -2
  7. package/dist/nexabase-report.es.js +1 -1
  8. package/dist/nexabase-report.umd.js +128 -128
  9. package/examples/BlazorServer/Pages/FacturaReport.razor +52 -52
  10. package/examples/blazor-report/Components/App.razor +19 -19
  11. package/examples/blazor-report/Components/Layout/MainLayout.razor +7 -7
  12. package/examples/blazor-report/Components/Layout/NavMenu.razor +1 -1
  13. package/examples/blazor-report/Components/Layout/ReconnectModal.razor +1 -1
  14. package/examples/blazor-report/Components/Pages/Counter.razor +1 -1
  15. package/examples/blazor-report/Components/Pages/Error.razor +1 -1
  16. package/examples/blazor-report/Components/Pages/Factura.razor +36 -37
  17. package/examples/blazor-report/Components/Pages/Home.razor +16 -16
  18. package/examples/blazor-report/Components/Pages/NotFound.razor +2 -2
  19. package/examples/blazor-report/Components/Pages/Weather.razor +1 -1
  20. package/examples/blazor-report/Components/Routes.razor +1 -1
  21. package/examples/blazor-report/Components/_Imports.razor +1 -1
  22. package/examples/blazor-report/bin/Debug/net10.0/blazor-report.dll +0 -0
  23. package/examples/blazor-report/bin/Debug/net10.0/blazor-report.exe +0 -0
  24. package/examples/blazor-report/bin/Debug/net10.0/blazor-report.pdb +0 -0
  25. package/examples/blazor-report/bin/Debug/net10.0/blazor-report.staticwebassets.endpoints.json +1 -1
  26. package/examples/blazor-report/bin/Debug/net10.0/blazor-report.staticwebassets.runtime.json +1 -1
  27. package/examples/blazor-report/obj/Debug/net10.0/apphost.exe +0 -0
  28. package/examples/blazor-report/obj/Debug/net10.0/blazor-report.AssemblyInfo.cs +1 -1
  29. package/examples/blazor-report/obj/Debug/net10.0/blazor-report.AssemblyInfoInputs.cache +1 -1
  30. package/examples/blazor-report/obj/Debug/net10.0/blazor-report.csproj.FileListAbsolute.txt +0 -2
  31. package/examples/blazor-report/obj/Debug/net10.0/blazor-report.dll +0 -0
  32. package/examples/blazor-report/obj/Debug/net10.0/blazor-report.pdb +0 -0
  33. package/examples/blazor-report/obj/Debug/net10.0/blazor-report.sourcelink.json +1 -1
  34. package/examples/blazor-report/obj/Debug/net10.0/rbcswa.dswa.cache.json +1 -1
  35. package/examples/blazor-report/obj/Debug/net10.0/ref/blazor-report.dll +0 -0
  36. package/examples/blazor-report/obj/Debug/net10.0/refint/blazor-report.dll +0 -0
  37. package/examples/blazor-report/obj/Debug/net10.0/rjimswa.dswa.cache.json +1 -1
  38. package/examples/blazor-report/obj/Debug/net10.0/rjsmcshtml.dswa.cache.json +1 -1
  39. package/examples/blazor-report/obj/Debug/net10.0/rjsmrazor.dswa.cache.json +1 -1
  40. package/examples/blazor-report/obj/Debug/net10.0/rpswa.dswa.cache.json +1 -1
  41. package/examples/blazor-report/obj/Debug/net10.0/staticwebassets.build.endpoints.json +1 -1
  42. package/examples/blazor-report/obj/Debug/net10.0/staticwebassets.build.json +1 -1
  43. package/examples/blazor-report/obj/Debug/net10.0/staticwebassets.build.json.cache +1 -1
  44. package/examples/blazor-report/obj/Debug/net10.0/staticwebassets.development.json +1 -1
  45. package/examples/integration/BlazorRazor.razor +84 -84
  46. package/examples/integration/BlazorServer.razor +91 -91
  47. package/examples/integration/index.html +100 -100
  48. package/examples/integration/integration-jquery.html +142 -142
  49. package/examples/integration-angular.html +99 -99
  50. package/examples/integration-api.html +80 -80
  51. package/examples/integration-react.html +80 -80
  52. package/examples/integration-vanilla.html +66 -66
  53. package/examples/integration-vue.html +85 -85
  54. package/examples/viewer.html +58 -58
  55. package/package.json +1 -1
  56. package/examples/blazor-report/obj/Debug/net10.0/compressed/4oukg00khs-{0}-p3yawhb8cp-p3yawhb8cp.gz +0 -0
  57. package/examples/blazor-report/obj/Debug/net10.0/compressed/6vz3ynifev-{0}-z72ixxujkx-z72ixxujkx.gz +0 -0
  58. package/examples/blazor-report/wwwroot/nexabase-report.umd.js +0 -517
  59. package/examples/blazor-report/wwwroot/style.css +0 -7
@@ -1,66 +1,66 @@
1
- <!DOCTYPE html>
2
- <html lang="es">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>NexaReport — HTML puro</title>
7
- <link rel="stylesheet" href="../dist/style.css">
8
- <style>
9
- body { margin: 0; font-family: system-ui, sans-serif; }
10
- #app { height: 100vh; display: flex; flex-direction: column; }
11
- header { padding: 12px 20px; background: #1e293b; color: #fff; display: flex; align-items: center; gap: 12px; }
12
- header h1 { margin: 0; font-size: 18px; font-weight: 600; }
13
- header small { opacity: 0.7; }
14
- nexa-viewer { flex: 1; display: block; }
15
- </style>
16
- </head>
17
- <body>
18
- <div id="app">
19
- <header>
20
- <h1>NexaReport</h1>
21
- <small>Vanilla HTML · Demo</small>
22
- </header>
23
- <nexa-viewer id="viewer" minimal></nexa-viewer>
24
- </div>
25
-
26
- <script src="../dist/nexabase-report.umd.js"></script>
27
- <script>
28
- window.NexaReport.registerNexaReport();
29
-
30
- const viewer = document.getElementById('viewer');
31
-
32
- // Definición inline del reporte
33
- viewer.definition = {
34
- metadata: { version: '1', name: 'Productos', createdAt: new Date().toISOString() },
35
- layout: {
36
- page: { format: 'A4', orientation: 'portrait', margins: { top: 1, right: 1, bottom: 1, left: 1 } },
37
- bands: [
38
- { id: 'b_hdr', type: 'ReportHeader', height: 60, elements: [
39
- { id: 'e_titulo', type: 'Text', x: 20, y: 10, width: 500, height: 30,
40
- content: 'Listado de Productos', style: { fontSize: '22px', fontWeight: 'bold' } }
41
- ]},
42
- { id: 'b_data', type: 'DataBand', height: 30, dataSource: 'main', elements: [
43
- { id: 'e_nombre', type: 'Text', x: 20, y: 5, width: 250, height: 20,
44
- binding: 'nombre', style: { fontSize: '12px' } },
45
- { id: 'e_precio', type: 'Text', x: 300, y: 5, width: 100, height: 20,
46
- binding: 'precio', style: { fontSize: '12px', textAlign: 'right' } }
47
- ]},
48
- { id: 'b_ftr', type: 'PageFooter', height: 30, elements: [
49
- { id: 'e_page', type: 'Text', x: 20, y: 5, width: 200, height: 20,
50
- content: 'Página {[Page]} de {[TotalPages]}', style: { fontSize: '10px', color: '#666' } }
51
- ]}
52
- ]
53
- },
54
- dataSources: [{ id: 'ds1', collection: '', alias: 'main', enabled: true }]
55
- };
56
-
57
- viewer.data = [
58
- { nombre: 'Laptop Gamer', precio: 25000 },
59
- { nombre: 'Mouse Inalámbrico', precio: 850 },
60
- { nombre: 'Teclado Mecánico', precio: 1200 },
61
- { nombre: 'Monitor 27"', precio: 5800 },
62
- { nombre: 'Audífonos Bluetooth', precio: 990 },
63
- ];
64
- </script>
65
- </body>
66
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="es">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>NexaReport — HTML puro</title>
7
+ <link rel="stylesheet" href="../dist/style.css">
8
+ <style>
9
+ body { margin: 0; font-family: system-ui, sans-serif; }
10
+ #app { height: 100vh; display: flex; flex-direction: column; }
11
+ header { padding: 12px 20px; background: #1e293b; color: #fff; display: flex; align-items: center; gap: 12px; }
12
+ header h1 { margin: 0; font-size: 18px; font-weight: 600; }
13
+ header small { opacity: 0.7; }
14
+ nexa-viewer { flex: 1; display: block; }
15
+ </style>
16
+ </head>
17
+ <body>
18
+ <div id="app">
19
+ <header>
20
+ <h1>NexaReport</h1>
21
+ <small>Vanilla HTML · Demo</small>
22
+ </header>
23
+ <nexa-viewer id="viewer" minimal></nexa-viewer>
24
+ </div>
25
+
26
+ <script src="../dist/nexabase-report.umd.js"></script>
27
+ <script>
28
+ window.NexaReport.registerNexaReport();
29
+
30
+ const viewer = document.getElementById('viewer');
31
+
32
+ // Definición inline del reporte
33
+ viewer.definition = {
34
+ metadata: { version: '1', name: 'Productos', createdAt: new Date().toISOString() },
35
+ layout: {
36
+ page: { format: 'A4', orientation: 'portrait', margins: { top: 1, right: 1, bottom: 1, left: 1 } },
37
+ bands: [
38
+ { id: 'b_hdr', type: 'ReportHeader', height: 60, elements: [
39
+ { id: 'e_titulo', type: 'Text', x: 20, y: 10, width: 500, height: 30,
40
+ content: 'Listado de Productos', style: { fontSize: '22px', fontWeight: 'bold' } }
41
+ ]},
42
+ { id: 'b_data', type: 'DataBand', height: 30, dataSource: 'main', elements: [
43
+ { id: 'e_nombre', type: 'Text', x: 20, y: 5, width: 250, height: 20,
44
+ binding: 'nombre', style: { fontSize: '12px' } },
45
+ { id: 'e_precio', type: 'Text', x: 300, y: 5, width: 100, height: 20,
46
+ binding: 'precio', style: { fontSize: '12px', textAlign: 'right' } }
47
+ ]},
48
+ { id: 'b_ftr', type: 'PageFooter', height: 30, elements: [
49
+ { id: 'e_page', type: 'Text', x: 20, y: 5, width: 200, height: 20,
50
+ content: 'Página {[Page]} de {[TotalPages]}', style: { fontSize: '10px', color: '#666' } }
51
+ ]}
52
+ ]
53
+ },
54
+ dataSources: [{ id: 'ds1', collection: '', alias: 'main', enabled: true }]
55
+ };
56
+
57
+ viewer.data = [
58
+ { nombre: 'Laptop Gamer', precio: 25000 },
59
+ { nombre: 'Mouse Inalámbrico', precio: 850 },
60
+ { nombre: 'Teclado Mecánico', precio: 1200 },
61
+ { nombre: 'Monitor 27"', precio: 5800 },
62
+ { nombre: 'Audífonos Bluetooth', precio: 990 },
63
+ ];
64
+ </script>
65
+ </body>
66
+ </html>
@@ -1,85 +1,85 @@
1
- <!DOCTYPE html>
2
- <html lang="es">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>NexaReport — Vue 3</title>
7
- <link rel="stylesheet" href="../dist/style.css">
8
- <style>
9
- body { margin: 0; font-family: system-ui, sans-serif; }
10
- #app { height: 100vh; display: flex; flex-direction: column; }
11
- header { padding: 12px 20px; background: #1e293b; color: #fff; display: flex; align-items: center; gap: 12px; }
12
- header h1 { margin: 0; font-size: 18px; font-weight: 600; }
13
- header small { opacity: 0.7; }
14
- nexa-viewer { flex: 1; display: block; }
15
- </style>
16
- </head>
17
- <body>
18
- <div id="app">
19
- <header>
20
- <h1>NexaReport</h1>
21
- <small>Vue 3 · Demo</small>
22
- </header>
23
- <nexa-viewer id="viewer" minimal></nexa-viewer>
24
- </div>
25
-
26
- <script src="https://unpkg.com/vue@3/dist/vue.global.prod.js"></script>
27
- <script src="../dist/nexabase-report.umd.js"></script>
28
- <script>
29
- const { createApp, ref } = Vue;
30
- NexaReport.registerNexaReport();
31
-
32
- const reportDef = {
33
- metadata: { version: '1', name: 'Ventas', createdAt: new Date().toISOString() },
34
- layout: {
35
- page: { format: 'A4', orientation: 'portrait', margins: { top: 1, right: 1, bottom: 1, left: 1 } },
36
- bands: [
37
- { id: 'b_hdr', type: 'ReportHeader', height: 60, elements: [
38
- { id: 'e_titulo', type: 'Text', x: 20, y: 10, width: 500, height: 30,
39
- content: 'Reporte de Ventas', style: { fontSize: '22px', fontWeight: 'bold' } }
40
- ]},
41
- { id: 'b_data', type: 'DataBand', height: 30, dataSource: 'main', elements: [
42
- { id: 'e_prod', type: 'Text', x: 20, y: 5, width: 200, height: 20,
43
- binding: 'producto', style: { fontSize: '12px' } },
44
- { id: 'e_cant', type: 'Text', x: 250, y: 5, width: 80, height: 20,
45
- binding: 'cantidad', style: { fontSize: '12px', textAlign: 'center' } },
46
- { id: 'e_total', type: 'Text', x: 350, y: 5, width: 100, height: 20,
47
- binding: 'total', style: { fontSize: '12px', textAlign: 'right' } }
48
- ]},
49
- { id: 'b_ftr', type: 'PageFooter', height: 30, elements: [
50
- { id: 'e_page', type: 'Text', x: 20, y: 5, width: 200, height: 20,
51
- content: 'Página {[Page]} de {[TotalPages]}', style: { fontSize: '10px', color: '#666' } }
52
- ]}
53
- ]
54
- },
55
- dataSources: [{ id: 'ds1', collection: '', alias: 'main', enabled: true }]
56
- };
57
-
58
- const data = [
59
- { producto: 'Laptop', cantidad: 2, total: 50000 },
60
- { producto: 'Mouse', cantidad: 10, total: 8500 },
61
- { producto: 'Teclado', cantidad: 5, total: 6000 },
62
- { producto: 'Monitor', cantidad: 3, total: 17400 },
63
- ];
64
-
65
- const app = createApp({
66
- setup() {
67
- const definition = ref(null);
68
- const reportData = ref([]);
69
-
70
- definition.value = reportDef;
71
- reportData.value = data;
72
-
73
- return { definition, reportData };
74
- }
75
- });
76
-
77
- app.mount('#app');
78
-
79
- // Sincronizar props con el custom element
80
- const viewer = document.getElementById('viewer');
81
- viewer.definition = reportDef;
82
- viewer.data = data;
83
- </script>
84
- </body>
85
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="es">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>NexaReport — Vue 3</title>
7
+ <link rel="stylesheet" href="../dist/style.css">
8
+ <style>
9
+ body { margin: 0; font-family: system-ui, sans-serif; }
10
+ #app { height: 100vh; display: flex; flex-direction: column; }
11
+ header { padding: 12px 20px; background: #1e293b; color: #fff; display: flex; align-items: center; gap: 12px; }
12
+ header h1 { margin: 0; font-size: 18px; font-weight: 600; }
13
+ header small { opacity: 0.7; }
14
+ nexa-viewer { flex: 1; display: block; }
15
+ </style>
16
+ </head>
17
+ <body>
18
+ <div id="app">
19
+ <header>
20
+ <h1>NexaReport</h1>
21
+ <small>Vue 3 · Demo</small>
22
+ </header>
23
+ <nexa-viewer id="viewer" minimal></nexa-viewer>
24
+ </div>
25
+
26
+ <script src="https://unpkg.com/vue@3/dist/vue.global.prod.js"></script>
27
+ <script src="../dist/nexabase-report.umd.js"></script>
28
+ <script>
29
+ const { createApp, ref } = Vue;
30
+ NexaReport.registerNexaReport();
31
+
32
+ const reportDef = {
33
+ metadata: { version: '1', name: 'Ventas', createdAt: new Date().toISOString() },
34
+ layout: {
35
+ page: { format: 'A4', orientation: 'portrait', margins: { top: 1, right: 1, bottom: 1, left: 1 } },
36
+ bands: [
37
+ { id: 'b_hdr', type: 'ReportHeader', height: 60, elements: [
38
+ { id: 'e_titulo', type: 'Text', x: 20, y: 10, width: 500, height: 30,
39
+ content: 'Reporte de Ventas', style: { fontSize: '22px', fontWeight: 'bold' } }
40
+ ]},
41
+ { id: 'b_data', type: 'DataBand', height: 30, dataSource: 'main', elements: [
42
+ { id: 'e_prod', type: 'Text', x: 20, y: 5, width: 200, height: 20,
43
+ binding: 'producto', style: { fontSize: '12px' } },
44
+ { id: 'e_cant', type: 'Text', x: 250, y: 5, width: 80, height: 20,
45
+ binding: 'cantidad', style: { fontSize: '12px', textAlign: 'center' } },
46
+ { id: 'e_total', type: 'Text', x: 350, y: 5, width: 100, height: 20,
47
+ binding: 'total', style: { fontSize: '12px', textAlign: 'right' } }
48
+ ]},
49
+ { id: 'b_ftr', type: 'PageFooter', height: 30, elements: [
50
+ { id: 'e_page', type: 'Text', x: 20, y: 5, width: 200, height: 20,
51
+ content: 'Página {[Page]} de {[TotalPages]}', style: { fontSize: '10px', color: '#666' } }
52
+ ]}
53
+ ]
54
+ },
55
+ dataSources: [{ id: 'ds1', collection: '', alias: 'main', enabled: true }]
56
+ };
57
+
58
+ const data = [
59
+ { producto: 'Laptop', cantidad: 2, total: 50000 },
60
+ { producto: 'Mouse', cantidad: 10, total: 8500 },
61
+ { producto: 'Teclado', cantidad: 5, total: 6000 },
62
+ { producto: 'Monitor', cantidad: 3, total: 17400 },
63
+ ];
64
+
65
+ const app = createApp({
66
+ setup() {
67
+ const definition = ref(null);
68
+ const reportData = ref([]);
69
+
70
+ definition.value = reportDef;
71
+ reportData.value = data;
72
+
73
+ return { definition, reportData };
74
+ }
75
+ });
76
+
77
+ app.mount('#app');
78
+
79
+ // Sincronizar props con el custom element
80
+ const viewer = document.getElementById('viewer');
81
+ viewer.definition = reportDef;
82
+ viewer.data = data;
83
+ </script>
84
+ </body>
85
+ </html>
@@ -1,58 +1,58 @@
1
- <!DOCTYPE html>
2
- <html lang="es">
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>Factura - nexabase-report</title>
7
- <style>
8
- body { font-family: system-ui; margin: 0; padding: 20px; background: #f8fafc; }
9
- .container { max-width: 900px; margin: 0 auto; }
10
- h1 { color: #1e3a8a; }
11
- #viewer-container { height: 850px; background: white; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
12
- nexa-viewer { display: block; height: 100%; }
13
- .btn { padding: 10px 20px; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; margin-right: 8px; }
14
- .btn-pdf { background: #1e40af; color: white; }
15
- .btn-excel { background: #16a34a; color: white; }
16
- </style>
17
- </head>
18
- <body>
19
- <div class="container">
20
- <h1>Factura de Recolección de Residuos</h1>
21
- <div id="viewer-container">
22
- <nexa-viewer id="viewer"></nexa-viewer>
23
- </div>
24
- <div style="margin-top:16px;">
25
- <button class="btn btn-pdf" onclick="window._viewer?.exportPdf()">Exportar PDF</button>
26
- <button class="btn btn-excel" onclick="window._viewer?.exportExcel()">Exportar Excel</button>
27
- </div>
28
- </div>
29
-
30
- <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
31
- <script src="https://cdn.jsdelivr.net/npm/nexabase-report@0.2.9/dist/nexabase-report.umd.js"></script>
32
- <script>
33
- $(function() {
34
- $.getJSON('factura_de_recolección_de_residuos.json', function(definition) {
35
- var data = {
36
- cliente: [{ nofactura: "34", nombre: "CLIENTE EJEMPLO S.A.S.", nit: "900.123.456-7", direccion: "Calle 100 # 15-20", ciudad: "Bogotá D.C.", fechaRecoleccion: "2025-05-01" }],
37
- residuos: [
38
- { nofactura: "34", fechaRecoleccion: "2025-05-01", nombreResiduo: "ÁCIDO CLORHÍDRICO", cantidad: 5, documentoRelacionado: "25" },
39
- { nofactura: "34", fechaRecoleccion: "2025-05-02", nombreResiduo: "ÁCIDO CLORHÍDRICO", cantidad: 3, documentoRelacionado: "26" },
40
- { nofactura: "34", fechaRecoleccion: "2025-05-01", nombreResiduo: "BIO SANITARIOS", cantidad: 5, documentoRelacionado: "28" },
41
- { nofactura: "34", fechaRecoleccion: "2025-05-03", nombreResiduo: "BIO SANITARIOS", cantidad: 2, documentoRelacionado: "30" },
42
- { nofactura: "34", fechaRecoleccion: "2025-05-01", nombreResiduo: "CLORURO FÉRRICO", cantidad: 8, documentoRelacionado: "31" }
43
- ],
44
- tarifas: [
45
- { nofactura: "34", facturacionMinima: 0, kilosMinimos: 0, precio: 52200, residuo: "ÁCIDO CLORHÍDRICO", tipoTarifa: "Tarifa x Kilo" },
46
- { nofactura: "34", facturacionMinima: 0, kilosMinimos: 0, precio: 52200, residuo: "BIO SANITARIOS", tipoTarifa: "Tarifa x Kilo" }
47
- ]
48
- };
49
-
50
- var viewer = document.getElementById('viewer');
51
- window._viewer = viewer;
52
- viewer.definition = definition;
53
- viewer.data = data;
54
- });
55
- });
56
- </script>
57
- </body>
58
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="es">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Factura - nexabase-report</title>
7
+ <style>
8
+ body { font-family: system-ui; margin: 0; padding: 20px; background: #f8fafc; }
9
+ .container { max-width: 900px; margin: 0 auto; }
10
+ h1 { color: #1e3a8a; }
11
+ #viewer-container { height: 850px; background: white; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
12
+ nexa-viewer { display: block; height: 100%; }
13
+ .btn { padding: 10px 20px; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; margin-right: 8px; }
14
+ .btn-pdf { background: #1e40af; color: white; }
15
+ .btn-excel { background: #16a34a; color: white; }
16
+ </style>
17
+ </head>
18
+ <body>
19
+ <div class="container">
20
+ <h1>Factura de Recolección de Residuos</h1>
21
+ <div id="viewer-container">
22
+ <nexa-viewer id="viewer"></nexa-viewer>
23
+ </div>
24
+ <div style="margin-top:16px;">
25
+ <button class="btn btn-pdf" onclick="window._viewer?.exportPdf()">Exportar PDF</button>
26
+ <button class="btn btn-excel" onclick="window._viewer?.exportExcel()">Exportar Excel</button>
27
+ </div>
28
+ </div>
29
+
30
+ <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
31
+ <script src="https://cdn.jsdelivr.net/npm/nexabase-report@0.2.12/dist/nexabase-report.umd.js"></script>
32
+ <script>
33
+ $(function() {
34
+ $.getJSON('factura_de_recolección_de_residuos.json', function(definition) {
35
+ var data = {
36
+ cliente: [{ nofactura: "34", nombre: "CLIENTE EJEMPLO S.A.S.", nit: "900.123.456-7", direccion: "Calle 100 # 15-20", ciudad: "Bogotá D.C.", fechaRecoleccion: "2025-05-01" }],
37
+ residuos: [
38
+ { nofactura: "34", fechaRecoleccion: "2025-05-01", nombreResiduo: "ÁCIDO CLORHÍDRICO", cantidad: 5, documentoRelacionado: "25" },
39
+ { nofactura: "34", fechaRecoleccion: "2025-05-02", nombreResiduo: "ÁCIDO CLORHÍDRICO", cantidad: 3, documentoRelacionado: "26" },
40
+ { nofactura: "34", fechaRecoleccion: "2025-05-01", nombreResiduo: "BIO SANITARIOS", cantidad: 5, documentoRelacionado: "28" },
41
+ { nofactura: "34", fechaRecoleccion: "2025-05-03", nombreResiduo: "BIO SANITARIOS", cantidad: 2, documentoRelacionado: "30" },
42
+ { nofactura: "34", fechaRecoleccion: "2025-05-01", nombreResiduo: "CLORURO FÉRRICO", cantidad: 8, documentoRelacionado: "31" }
43
+ ],
44
+ tarifas: [
45
+ { nofactura: "34", facturacionMinima: 0, kilosMinimos: 0, precio: 52200, residuo: "ÁCIDO CLORHÍDRICO", tipoTarifa: "Tarifa x Kilo" },
46
+ { nofactura: "34", facturacionMinima: 0, kilosMinimos: 0, precio: 52200, residuo: "BIO SANITARIOS", tipoTarifa: "Tarifa x Kilo" }
47
+ ]
48
+ };
49
+
50
+ var viewer = document.getElementById('viewer');
51
+ window._viewer = viewer;
52
+ viewer.definition = definition;
53
+ viewer.data = data;
54
+ });
55
+ });
56
+ </script>
57
+ </body>
58
+ </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexabase-report",
3
- "version": "0.2.10",
3
+ "version": "0.2.12",
4
4
  "description": "Professional report designer and viewer for NexaBase — drag & drop designer, PDF/Excel export, charts, crosstabs, subreports.",
5
5
  "license": "MIT",
6
6
  "author": "NexaBase Team",