nexabase-report 0.2.10 → 0.2.11
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/{html2canvas-BR5Zfk2I.js → html2canvas-9Wez5E_d.js} +1 -1
- package/dist/{html2canvas-CX3Va04O.js → html2canvas-BljFROJ3.js} +2 -2
- package/dist/{html2pdf-DWBRzG46.js → html2pdf-BnHxGKGb.js} +3 -3
- package/dist/{index-BPSYeQz4.js → index-TaXb6NxF.js} +15192 -15172
- package/dist/{index.es-tialsC4T.js → index.es-Cfi8g62z.js} +2 -2
- package/dist/{jspdf.es.min-Dcx0wUQ4.js → jspdf.es.min-BdLNvemB.js} +2 -2
- package/dist/nexabase-report.es.js +1 -1
- package/dist/nexabase-report.umd.js +128 -128
- package/examples/BlazorServer/Pages/FacturaReport.razor +52 -52
- package/examples/blazor-report/Components/App.razor +19 -19
- package/examples/blazor-report/Components/Layout/MainLayout.razor +7 -7
- package/examples/blazor-report/Components/Layout/NavMenu.razor +1 -1
- package/examples/blazor-report/Components/Layout/ReconnectModal.razor +1 -1
- package/examples/blazor-report/Components/Pages/Counter.razor +1 -1
- package/examples/blazor-report/Components/Pages/Error.razor +1 -1
- package/examples/blazor-report/Components/Pages/Factura.razor +36 -37
- package/examples/blazor-report/Components/Pages/Home.razor +16 -16
- package/examples/blazor-report/Components/Pages/NotFound.razor +2 -2
- package/examples/blazor-report/Components/Pages/Weather.razor +1 -1
- package/examples/blazor-report/Components/Routes.razor +1 -1
- package/examples/blazor-report/Components/_Imports.razor +1 -1
- package/examples/blazor-report/bin/Debug/net10.0/blazor-report.dll +0 -0
- package/examples/blazor-report/bin/Debug/net10.0/blazor-report.exe +0 -0
- package/examples/blazor-report/bin/Debug/net10.0/blazor-report.pdb +0 -0
- package/examples/blazor-report/bin/Debug/net10.0/blazor-report.staticwebassets.endpoints.json +1 -1
- package/examples/blazor-report/bin/Debug/net10.0/blazor-report.staticwebassets.runtime.json +1 -1
- package/examples/blazor-report/obj/Debug/net10.0/apphost.exe +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/blazor-report.AssemblyInfo.cs +1 -1
- package/examples/blazor-report/obj/Debug/net10.0/blazor-report.AssemblyInfoInputs.cache +1 -1
- package/examples/blazor-report/obj/Debug/net10.0/blazor-report.csproj.FileListAbsolute.txt +0 -2
- package/examples/blazor-report/obj/Debug/net10.0/blazor-report.dll +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/blazor-report.pdb +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/blazor-report.sourcelink.json +1 -1
- package/examples/blazor-report/obj/Debug/net10.0/rbcswa.dswa.cache.json +1 -1
- package/examples/blazor-report/obj/Debug/net10.0/ref/blazor-report.dll +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/refint/blazor-report.dll +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/rjimswa.dswa.cache.json +1 -1
- package/examples/blazor-report/obj/Debug/net10.0/rjsmcshtml.dswa.cache.json +1 -1
- package/examples/blazor-report/obj/Debug/net10.0/rjsmrazor.dswa.cache.json +1 -1
- package/examples/blazor-report/obj/Debug/net10.0/rpswa.dswa.cache.json +1 -1
- package/examples/blazor-report/obj/Debug/net10.0/staticwebassets.build.endpoints.json +1 -1
- package/examples/blazor-report/obj/Debug/net10.0/staticwebassets.build.json +1 -1
- package/examples/blazor-report/obj/Debug/net10.0/staticwebassets.build.json.cache +1 -1
- package/examples/blazor-report/obj/Debug/net10.0/staticwebassets.development.json +1 -1
- package/examples/integration/BlazorRazor.razor +84 -84
- package/examples/integration/BlazorServer.razor +91 -91
- package/examples/integration/index.html +100 -100
- package/examples/integration/integration-jquery.html +142 -142
- package/examples/integration-angular.html +99 -99
- package/examples/integration-api.html +80 -80
- package/examples/integration-react.html +80 -80
- package/examples/integration-vanilla.html +66 -66
- package/examples/integration-vue.html +85 -85
- package/examples/viewer.html +58 -58
- package/package.json +1 -1
- package/examples/blazor-report/obj/Debug/net10.0/compressed/4oukg00khs-{0}-p3yawhb8cp-p3yawhb8cp.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/6vz3ynifev-{0}-z72ixxujkx-z72ixxujkx.gz +0 -0
- package/examples/blazor-report/wwwroot/nexabase-report.umd.js +0 -517
- package/examples/blazor-report/wwwroot/style.css +0 -7
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
@page "/reports/factura"
|
|
2
|
-
@inject IHttpClientFactory HttpFactory
|
|
3
|
-
@inject IJSRuntime JS
|
|
4
|
-
|
|
5
|
-
<h1 style="color:#1e3a8a; margin-bottom:16px;">Factura de Recolección</h1>
|
|
6
|
-
|
|
7
|
-
<div style="height:800px; border:1px solid #e5e7eb; border-radius:8px; overflow:hidden; background:white;">
|
|
8
|
-
<nexa-viewer id="viewer"></nexa-viewer>
|
|
9
|
-
</div>
|
|
10
|
-
|
|
11
|
-
<div style="margin-top:16px; display:flex; gap:8px;">
|
|
12
|
-
<button @onclick="ExportPdf" style="padding:8px 16px; background:#1e40af; color:white; border:none; border-radius:6px; cursor:pointer;">PDF</button>
|
|
13
|
-
<button @onclick="ExportExcel" style="padding:8px 16px; background:#16a34a; color:white; border:none; border-radius:6px; cursor:pointer;">Excel</button>
|
|
14
|
-
<button @onclick="LoadReport" style="padding:8px 16px; background:#fff; border:1px solid #d1d5db; border-radius:6px; cursor:pointer;">Recargar</button>
|
|
15
|
-
</div>
|
|
16
|
-
|
|
17
|
-
@code {
|
|
18
|
-
private bool _loaded = false;
|
|
19
|
-
|
|
20
|
-
protected override async Task OnAfterRenderAsync(bool firstRender)
|
|
21
|
-
{
|
|
22
|
-
if (firstRender && !_loaded)
|
|
23
|
-
{
|
|
24
|
-
_loaded = true;
|
|
25
|
-
await LoadReport();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
private async Task LoadReport()
|
|
30
|
-
{
|
|
31
|
-
var http = HttpFactory.CreateClient();
|
|
32
|
-
var definition = await http.GetFromJsonAsync<object>("/examples/invoice-report.json");
|
|
33
|
-
var data = new Dictionary<string, object[]>
|
|
34
|
-
{
|
|
35
|
-
["main"] = new object[] { new { nofactura = "34", nombre = "CLIENTE EJEMPLO S.A.S.", nit = "900.123.456-7", direccion = "Calle 100 # 15-20" } }
|
|
36
|
-
};
|
|
37
|
-
await JS.InvokeVoidAsync("nexaReportRender", "viewer", definition, data);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
private async Task ExportPdf() => await JS.InvokeVoidAsync("nexaReportExportPdf", "viewer");
|
|
41
|
-
private async Task ExportExcel() => await JS.InvokeVoidAsync("nexaReportExportExcel", "viewer");
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
<script src="https://cdn.jsdelivr.net/npm/nexabase-report@0.2.
|
|
45
|
-
<script>
|
|
46
|
-
window.nexaReportRender = function(id, def, data) {
|
|
47
|
-
if (!window._nexaReg) { NexaReport.registerNexaReport(); window._nexaReg = true; }
|
|
48
|
-
setTimeout(() => { const v = document.getElementById(id); if (v) { v.definition = def; v.data = data; } }, 100);
|
|
49
|
-
};
|
|
50
|
-
window.nexaReportExportPdf = (id) => { const v = document.getElementById(id); v && v.exportPdf(); };
|
|
51
|
-
window.nexaReportExportExcel = (id) => { const v = document.getElementById(id); v && v.exportExcel(); };
|
|
52
|
-
</script>
|
|
1
|
+
@page "/reports/factura"
|
|
2
|
+
@inject IHttpClientFactory HttpFactory
|
|
3
|
+
@inject IJSRuntime JS
|
|
4
|
+
|
|
5
|
+
<h1 style="color:#1e3a8a; margin-bottom:16px;">Factura de Recolección</h1>
|
|
6
|
+
|
|
7
|
+
<div style="height:800px; border:1px solid #e5e7eb; border-radius:8px; overflow:hidden; background:white;">
|
|
8
|
+
<nexa-viewer id="viewer"></nexa-viewer>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div style="margin-top:16px; display:flex; gap:8px;">
|
|
12
|
+
<button @onclick="ExportPdf" style="padding:8px 16px; background:#1e40af; color:white; border:none; border-radius:6px; cursor:pointer;">PDF</button>
|
|
13
|
+
<button @onclick="ExportExcel" style="padding:8px 16px; background:#16a34a; color:white; border:none; border-radius:6px; cursor:pointer;">Excel</button>
|
|
14
|
+
<button @onclick="LoadReport" style="padding:8px 16px; background:#fff; border:1px solid #d1d5db; border-radius:6px; cursor:pointer;">Recargar</button>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
@code {
|
|
18
|
+
private bool _loaded = false;
|
|
19
|
+
|
|
20
|
+
protected override async Task OnAfterRenderAsync(bool firstRender)
|
|
21
|
+
{
|
|
22
|
+
if (firstRender && !_loaded)
|
|
23
|
+
{
|
|
24
|
+
_loaded = true;
|
|
25
|
+
await LoadReport();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
private async Task LoadReport()
|
|
30
|
+
{
|
|
31
|
+
var http = HttpFactory.CreateClient();
|
|
32
|
+
var definition = await http.GetFromJsonAsync<object>("/examples/invoice-report.json");
|
|
33
|
+
var data = new Dictionary<string, object[]>
|
|
34
|
+
{
|
|
35
|
+
["main"] = new object[] { new { nofactura = "34", nombre = "CLIENTE EJEMPLO S.A.S.", nit = "900.123.456-7", direccion = "Calle 100 # 15-20" } }
|
|
36
|
+
};
|
|
37
|
+
await JS.InvokeVoidAsync("nexaReportRender", "viewer", definition, data);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
private async Task ExportPdf() => await JS.InvokeVoidAsync("nexaReportExportPdf", "viewer");
|
|
41
|
+
private async Task ExportExcel() => await JS.InvokeVoidAsync("nexaReportExportExcel", "viewer");
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
<script src="https://cdn.jsdelivr.net/npm/nexabase-report@0.2.10/dist/nexabase-report.umd.js"></script>
|
|
45
|
+
<script>
|
|
46
|
+
window.nexaReportRender = function(id, def, data) {
|
|
47
|
+
if (!window._nexaReg) { NexaReport.registerNexaReport(); window._nexaReg = true; }
|
|
48
|
+
setTimeout(() => { const v = document.getElementById(id); if (v) { v.definition = def; v.data = data; } }, 100);
|
|
49
|
+
};
|
|
50
|
+
window.nexaReportExportPdf = (id) => { const v = document.getElementById(id); v && v.exportPdf(); };
|
|
51
|
+
window.nexaReportExportExcel = (id) => { const v = document.getElementById(id); v && v.exportExcel(); };
|
|
52
|
+
</script>
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
<html lang="es">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
-
<base href="/" />
|
|
7
|
-
<ImportMap />
|
|
8
|
-
<link rel="icon" type="image/png" href="favicon.png" />
|
|
9
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/nexabase-report@0.2.
|
|
10
|
-
<HeadOutlet />
|
|
11
|
-
</head>
|
|
12
|
-
<body>
|
|
13
|
-
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
|
|
14
|
-
<script src="https://cdn.jsdelivr.net/npm/nexabase-report@0.2.
|
|
15
|
-
<Routes />
|
|
16
|
-
<ReconnectModal />
|
|
17
|
-
<script src="_framework/blazor.web.js"></script>
|
|
18
|
-
</body>
|
|
19
|
-
</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
|
+
<base href="/" />
|
|
7
|
+
<ImportMap />
|
|
8
|
+
<link rel="icon" type="image/png" href="favicon.png" />
|
|
9
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/nexabase-report@0.2.10/dist/style.css" />
|
|
10
|
+
<HeadOutlet />
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
|
|
14
|
+
<script src="https://cdn.jsdelivr.net/npm/nexabase-report@0.2.10/dist/nexabase-report.umd.js"></script>
|
|
15
|
+
<Routes />
|
|
16
|
+
<ReconnectModal />
|
|
17
|
+
<script src="_framework/blazor.web.js"></script>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<div style="display:flex; flex-direction:column; height:100vh;">
|
|
4
|
-
<main style="flex:1; overflow:auto;">
|
|
5
|
-
@Body
|
|
6
|
-
</main>
|
|
7
|
-
</div>
|
|
1
|
+
@inherits LayoutComponentBase
|
|
2
|
+
|
|
3
|
+
<div style="display:flex; flex-direction:column; height:100vh;">
|
|
4
|
+
<main style="flex:1; overflow:auto;">
|
|
5
|
+
@Body
|
|
6
|
+
</main>
|
|
7
|
+
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
<script type="module" src="@Assets["Components/Layout/ReconnectModal.razor.js"]"></script>
|
|
2
2
|
|
|
3
3
|
<dialog id="components-reconnect-modal" data-nosnippet>
|
|
4
4
|
<div class="components-reconnect-container">
|
|
@@ -1,37 +1,36 @@
|
|
|
1
|
-
@page "/factura"
|
|
2
|
-
|
|
3
|
-
<div style="padding:20px;">
|
|
4
|
-
<a href="/">← Volver</a>
|
|
5
|
-
<h1 style="color:#1e3a8a; margin-top:16px;">Factura de Recolección de Residuos</h1>
|
|
6
|
-
<nexa-viewer id="viewer" style="width:100%; height:1200px;"></nexa-viewer>
|
|
7
|
-
</div>
|
|
8
|
-
|
|
9
|
-
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
|
|
10
|
-
<script src="/
|
|
11
|
-
<script
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
{ nofactura: "34", facturacionMinima: 0, kilosMinimos: 0, precio: 52200, residuo: "
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
document.getElementById('viewer').
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
</script>
|
|
1
|
+
@page "/factura"
|
|
2
|
+
|
|
3
|
+
<div style="padding:20px;">
|
|
4
|
+
<a href="/">← Volver</a>
|
|
5
|
+
<h1 style="color:#1e3a8a; margin-top:16px;">Factura de Recolección de Residuos</h1>
|
|
6
|
+
<nexa-viewer id="viewer" style="width:100%; height:1200px;"></nexa-viewer>
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
|
|
10
|
+
<script src="https://cdn.jsdelivr.net/npm/nexabase-report@0.2.11/dist/nexabase-report.umd.js"></script>
|
|
11
|
+
<script>
|
|
12
|
+
$.getJSON('factura_de_recolección_de_residuos.json', function(definition) {
|
|
13
|
+
var residuos = [];
|
|
14
|
+
var tipos = ['ÁCIDO CLORHÍDRICO', 'BIO SANITARIOS', 'CLORURO FÉRRICO', 'RESIDUO INDUSTRIAL', 'MATERIAL RECICLABLE'];
|
|
15
|
+
for (var i = 1; i <= 5000; i++) {
|
|
16
|
+
residuos.push({
|
|
17
|
+
nofactura: "34",
|
|
18
|
+
fechaRecoleccion: "2025-05-" + String(i % 30 + 1).padStart(2, '0'),
|
|
19
|
+
nombreResiduo: tipos[i % tipos.length],
|
|
20
|
+
cantidad: Math.floor(Math.random() * 20) + 1,
|
|
21
|
+
documentoRelacionado: String(20 + i)
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var data = {
|
|
26
|
+
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" }],
|
|
27
|
+
residuos: residuos,
|
|
28
|
+
tarifas: [
|
|
29
|
+
{ nofactura: "34", facturacionMinima: 0, kilosMinimos: 0, precio: 52200, residuo: "ÁCIDO CLORHÍDRICO", tipoTarifa: "Tarifa x Kilo" },
|
|
30
|
+
{ nofactura: "34", facturacionMinima: 0, kilosMinimos: 0, precio: 52200, residuo: "BIO SANITARIOS", tipoTarifa: "Tarifa x Kilo" }
|
|
31
|
+
]
|
|
32
|
+
};
|
|
33
|
+
document.getElementById('viewer').definition = definition;
|
|
34
|
+
document.getElementById('viewer').data = data;
|
|
35
|
+
});
|
|
36
|
+
</script>
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<PageTitle>nexabase-report</PageTitle>
|
|
4
|
-
|
|
5
|
-
<div style="max-width:800px; margin:40px auto; font-family:system-ui; padding:20px;">
|
|
6
|
-
<h1 style="color:#1e3a8a; font-size:28px; margin-bottom:10px;">nexabase-report</h1>
|
|
7
|
-
<p style="color:#666; margin-bottom:30px;">Visor de reportes en Blazor Server</p>
|
|
8
|
-
|
|
9
|
-
<div style="background:#f8fafc; border-radius:8px; padding:24px; border:1px solid #e2e8f0;">
|
|
10
|
-
<h2 style="color:#374151; font-size:18px; margin-bottom:16px;">Factura de
|
|
11
|
-
<a href="/factura"
|
|
12
|
-
style="display:inline-block; padding:12px 24px; background:#1e40af; color:white; text-decoration:none; border-radius:6px; font-weight:500;">
|
|
13
|
-
Ver Reporte
|
|
14
|
-
</a>
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
1
|
+
@page "/"
|
|
2
|
+
|
|
3
|
+
<PageTitle>nexabase-report</PageTitle>
|
|
4
|
+
|
|
5
|
+
<div style="max-width:800px; margin:40px auto; font-family:system-ui; padding:20px;">
|
|
6
|
+
<h1 style="color:#1e3a8a; font-size:28px; margin-bottom:10px;">nexabase-report</h1>
|
|
7
|
+
<p style="color:#666; margin-bottom:30px;">Visor de reportes en Blazor Server</p>
|
|
8
|
+
|
|
9
|
+
<div style="background:#f8fafc; border-radius:8px; padding:24px; border:1px solid #e2e8f0;">
|
|
10
|
+
<h2 style="color:#374151; font-size:18px; margin-bottom:16px;">Factura de Recolecci�n de Residuos</h2>
|
|
11
|
+
<a href="/factura"
|
|
12
|
+
style="display:inline-block; padding:12px 24px; background:#1e40af; color:white; text-decoration:none; border-radius:6px; font-weight:500;">
|
|
13
|
+
Ver Reporte ?
|
|
14
|
+
</a>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
<Router AppAssembly="typeof(Program).Assembly" NotFoundPage="typeof(Pages.NotFound)">
|
|
2
2
|
<Found Context="routeData">
|
|
3
3
|
<RouteView RouteData="routeData" DefaultLayout="typeof(Layout.MainLayout)" />
|
|
4
4
|
<FocusOnNavigate RouteData="routeData" Selector="h1" />
|
|
Binary file
|
|
Binary file
|
|
Binary file
|