nexabase-report 0.2.6 → 0.2.9
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 +255 -171
- package/dist/{html2canvas-CVvkCg-2.js → html2canvas-C7YA4nkW.js} +1 -1
- package/dist/{html2canvas-CVos72rP.js → html2canvas-Ch6xQdU-.js} +2 -2
- package/dist/{html2pdf-Cyvo1NsU.js → html2pdf-BmsoJhgy.js} +3 -3
- package/dist/{index-DxNI7UUB.js → index-TKDtDVn8.js} +22644 -20905
- package/dist/{index.es-Cl2FwCxT.js → index.es-DVVUHaBy.js} +2 -2
- package/dist/{jspdf.es.min-CluyHBde.js → jspdf.es.min-C0JdIV8T.js} +2 -2
- package/dist/lib/styles/_primevue-core.css +4 -4
- package/dist/nexabase-report.es.js +1 -1
- package/dist/nexabase-report.umd.js +151 -151
- package/examples/BlazorServer/Pages/FacturaReport.razor +52 -0
- package/examples/blazor-report/.vs/blazor-report/CopilotIndices/18.5.39187.10602/CodeChunks.db +0 -0
- package/examples/blazor-report/.vs/blazor-report/CopilotIndices/18.5.39187.10602/CodeChunks.db-shm +0 -0
- package/examples/blazor-report/.vs/blazor-report/CopilotIndices/18.5.39187.10602/CodeChunks.db-wal +0 -0
- package/examples/blazor-report/.vs/blazor-report/CopilotIndices/18.5.39187.10602/SemanticSymbols.db +0 -0
- package/examples/blazor-report/.vs/blazor-report/CopilotIndices/18.5.39187.10602/SemanticSymbols.db-shm +0 -0
- package/examples/blazor-report/.vs/blazor-report/CopilotIndices/18.5.39187.10602/SemanticSymbols.db-wal +0 -0
- package/examples/blazor-report/.vs/blazor-report.slnx/FileContentIndex/703a57d7-cf1c-457c-aa2c-6fb9398c8bf7.vsidx +0 -0
- package/examples/blazor-report/.vs/blazor-report.slnx/FileContentIndex/70741c74-9514-4067-90f8-96624e5a719f.vsidx +0 -0
- package/examples/blazor-report/.vs/blazor-report.slnx/FileContentIndex/7ca4089f-e321-418f-8d92-4cb41fb5a7fc.vsidx +0 -0
- package/examples/blazor-report/Components/App.razor +19 -0
- package/examples/blazor-report/Components/Layout/MainLayout.razor +23 -0
- package/examples/blazor-report/Components/Layout/MainLayout.razor.css +98 -0
- package/examples/blazor-report/Components/Layout/NavMenu.razor +30 -0
- package/examples/blazor-report/Components/Layout/NavMenu.razor.css +105 -0
- package/examples/blazor-report/Components/Layout/ReconnectModal.razor +31 -0
- package/examples/blazor-report/Components/Layout/ReconnectModal.razor.css +157 -0
- package/examples/blazor-report/Components/Layout/ReconnectModal.razor.js +63 -0
- package/examples/blazor-report/Components/Pages/Counter.razor +19 -0
- package/examples/blazor-report/Components/Pages/Error.razor +36 -0
- package/examples/blazor-report/Components/Pages/Factura.razor +32 -0
- package/examples/blazor-report/Components/Pages/Home.razor +16 -0
- package/examples/blazor-report/Components/Pages/NotFound.razor +5 -0
- package/examples/blazor-report/Components/Pages/Weather.razor +64 -0
- package/examples/blazor-report/Components/Routes.razor +6 -0
- package/examples/blazor-report/Components/_Imports.razor +11 -0
- package/examples/blazor-report/Program.cs +18 -0
- package/examples/blazor-report/Properties/launchSettings.json +23 -0
- package/examples/blazor-report/appsettings.Development.json +8 -0
- package/examples/blazor-report/appsettings.json +9 -0
- package/examples/blazor-report/bin/Debug/net10.0/appsettings.Development.json +8 -0
- package/examples/blazor-report/bin/Debug/net10.0/appsettings.json +9 -0
- package/examples/blazor-report/bin/Debug/net10.0/blazor-report.deps.json +23 -0
- 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.runtimeconfig.json +20 -0
- package/examples/blazor-report/bin/Debug/net10.0/blazor-report.staticwebassets.endpoints.json +1 -0
- package/examples/blazor-report/bin/Debug/net10.0/blazor-report.staticwebassets.runtime.json +1 -0
- package/examples/blazor-report/blazor-report.csproj +12 -0
- package/examples/blazor-report/blazor-report.csproj.user +6 -0
- package/examples/blazor-report/obj/Debug/net10.0/.NETCoreApp,Version=v10.0.AssemblyAttributes.cs +4 -0
- package/examples/blazor-report/obj/Debug/net10.0/ApiEndpoints.json +1 -0
- package/examples/blazor-report/obj/Debug/net10.0/EmbeddedAttribute.cs +7 -0
- package/examples/blazor-report/obj/Debug/net10.0/ValidatableTypeAttribute.cs +9 -0
- package/examples/blazor-report/obj/Debug/net10.0/apphost.exe +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/blazor-report.AssemblyInfo.cs +23 -0
- package/examples/blazor-report/obj/Debug/net10.0/blazor-report.AssemblyInfoInputs.cache +1 -0
- package/examples/blazor-report/obj/Debug/net10.0/blazor-report.GeneratedMSBuildEditorConfig.editorconfig +71 -0
- package/examples/blazor-report/obj/Debug/net10.0/blazor-report.GlobalUsings.g.cs +18 -0
- package/examples/blazor-report/obj/Debug/net10.0/blazor-report.MvcApplicationPartsAssemblyInfo.cache +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/blazor-report.assets.cache +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/blazor-report.csproj.BuildWithSkipAnalyzers +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/blazor-report.csproj.CoreCompileInputs.cache +1 -0
- package/examples/blazor-report/obj/Debug/net10.0/blazor-report.csproj.FileListAbsolute.txt +87 -0
- package/examples/blazor-report/obj/Debug/net10.0/blazor-report.dll +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/blazor-report.genruntimeconfig.cache +1 -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 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/01gcr5ok0d-{0}-tdbxkamptv-tdbxkamptv.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/0u122lzsqf-{0}-v0zj4ognzu-v0zj4ognzu.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/19vuobcugt-{0}-ausgxo2sd3-ausgxo2sd3.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/2w8s7d0tmu-{0}-c2oey78nd0-c2oey78nd0.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/3seby862hk-{0}-pj5nd1wqec-pj5nd1wqec.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/4z6vyi198a-{0}-c2jlpeoesf-c2jlpeoesf.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/56erzxf847-{0}-rzd6atqjts-rzd6atqjts.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/6pye2umi32-{0}-nvvlpmu67g-nvvlpmu67g.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/6rkf7abng5-{0}-xbbil6v7co-xbbil6v7co.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/7qckystb2n-{0}-jj8uyg4cgr-jj8uyg4cgr.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/7y9tnc1ana-{0}-hwaxidwiwj-hwaxidwiwj.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/7zwf5lrnue-{0}-notf2xhcfb-notf2xhcfb.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/83pb0ayzsm-{0}-k8d9w2qqmf-k8d9w2qqmf.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/88dhp3hbzx-{0}-37tfw0ft22-37tfw0ft22.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/a0n8vocv65-{0}-khv3u5hwcm-khv3u5hwcm.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/acjalqkfgt-{0}-7ma0977mvv-7ma0977mvv.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/bgsbrgy7vf-{0}-h1s4sie4z3-h1s4sie4z3.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/c6laszq5ww-{0}-46ein0sx1k-46ein0sx1k.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/dm27gmg8ll-{0}-fvhpjtyr6v-fvhpjtyr6v.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/es0hst4x17-{0}-ee0r1s7dh0-ee0r1s7dh0.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/f4eerlwe3k-{0}-63fj8s7r0e-63fj8s7r0e.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/f5b7s575cu-{0}-ub07r2b239-ub07r2b239.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/gi3zzjjv2d-{0}-iovd86k7lj-iovd86k7lj.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/h9k7hhwqjn-{0}-m2jb7tclhy-m2jb7tclhy.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/hd6b60w7a9-{0}-pk9g2wxc8p-pk9g2wxc8p.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/iepu09js1p-{0}-493y06b0oq-493y06b0oq.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/k77ggeojrw-{0}-bqjiyaj88i-bqjiyaj88i.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/kpxymjsba6-{0}-kbrnm935zg-kbrnm935zg.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/kq868t8x5q-{0}-fsbi9cje9m-fsbi9cje9m.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/lbvdfe28z6-{0}-b7pk76d08c-b7pk76d08c.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/ltulwrnpym-{0}-erw9l3u2r3-erw9l3u2r3.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/pcqcp3y12o-{0}-lcd1t2u6c8-lcd1t2u6c8.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/q6ii8s1dt0-{0}-abdmv1u4y3-abdmv1u4y3.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/r8rcl1ft48-{0}-ft3s53vfgj-ft3s53vfgj.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/relgedb7iz-{0}-6pdc2jztkx-6pdc2jztkx.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/s7ng5by487-{0}-hrwsygsryq-hrwsygsryq.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/sezds5me7x-{0}-d7shbmvgxk-d7shbmvgxk.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/soo3rna5ha-{0}-0j3bgjxly4-0j3bgjxly4.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/t11mfcypsb-{0}-s35ty4nyc5-s35ty4nyc5.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/t35fshhzld-{0}-06098lyss8-06098lyss8.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/tb3gndp62e-{0}-dxx9fxp4il-dxx9fxp4il.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/tmx7wa8ilq-{0}-vr1egmr9el-vr1egmr9el.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/v33f9mpzye-{0}-r4e9w2rdcm-r4e9w2rdcm.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/va8x872qf1-{0}-aexeepp0ev-aexeepp0ev.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/w5d5wye635-{0}-j5mq2jizvt-j5mq2jizvt.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/weriyjrep0-{0}-y7v9cxd14o-y7v9cxd14o.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/ycnqkrbal1-{0}-m2jb7tclhy-m2jb7tclhy.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/yl0vb4jg87-{0}-jd9uben2k1-jd9uben2k1.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/z5nx2tkgl4-{0}-khy4lop6wu-khy4lop6wu.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/zeckyeunui-{0}-6cfz1n2cew-6cfz1n2cew.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/compressed/zu2f3ffzwm-{0}-cosvhxvwiu-cosvhxvwiu.gz +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/rbcswa.dswa.cache.json +1 -0
- 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 -0
- package/examples/blazor-report/obj/Debug/net10.0/rjsmcshtml.dswa.cache.json +1 -0
- package/examples/blazor-report/obj/Debug/net10.0/rjsmrazor.dswa.cache.json +1 -0
- package/examples/blazor-report/obj/Debug/net10.0/rpswa.dswa.cache.json +1 -0
- package/examples/blazor-report/obj/Debug/net10.0/scopedcss/Components/Layout/MainLayout.razor.rz.scp.css +98 -0
- package/examples/blazor-report/obj/Debug/net10.0/scopedcss/Components/Layout/NavMenu.razor.rz.scp.css +105 -0
- package/examples/blazor-report/obj/Debug/net10.0/scopedcss/Components/Layout/ReconnectModal.razor.rz.scp.css +157 -0
- package/examples/blazor-report/obj/Debug/net10.0/scopedcss/bundle/blazor-report.styles.css +363 -0
- package/examples/blazor-report/obj/Debug/net10.0/scopedcss/projectbundle/blazor-report.bundle.scp.css +363 -0
- package/examples/blazor-report/obj/Debug/net10.0/staticwebassets.build.endpoints.json +1 -0
- package/examples/blazor-report/obj/Debug/net10.0/staticwebassets.build.json +1 -0
- package/examples/blazor-report/obj/Debug/net10.0/staticwebassets.build.json.cache +1 -0
- package/examples/blazor-report/obj/Debug/net10.0/staticwebassets.development.json +1 -0
- package/examples/blazor-report/obj/Debug/net10.0/staticwebassets.references.upToDateCheck.txt +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/staticwebassets.removed.txt +0 -0
- package/examples/blazor-report/obj/Debug/net10.0/swae.build.ex.cache +0 -0
- package/examples/blazor-report/obj/blazor-report.csproj.nuget.dgspec.json +499 -0
- package/examples/blazor-report/obj/blazor-report.csproj.nuget.g.props +19 -0
- package/examples/blazor-report/obj/blazor-report.csproj.nuget.g.targets +6 -0
- package/examples/blazor-report/obj/project.assets.json +542 -0
- package/examples/blazor-report/obj/project.nuget.cache +10 -0
- package/examples/blazor-report/wwwroot/app.css +60 -0
- package/examples/blazor-report/wwwroot/factura_de_recolecci/303/263n_de_residuos.json +528 -0
- package/examples/blazor-report/wwwroot/favicon.png +0 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css +4085 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map +1 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css +6 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map +1 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css +4084 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map +1 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css +6 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map +1 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css +597 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map +1 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css +6 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map +1 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css +594 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map +1 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css +6 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map +1 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css +5402 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css.map +1 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css +6 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map +1 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css +5393 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map +1 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css +6 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map +1 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap.css +12057 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map +1 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css +6 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map +1 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css +12030 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css.map +1 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css +6 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map +1 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js +6314 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js.map +1 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js +7 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map +1 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js +4447 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js.map +1 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js +7 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js.map +1 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/js/bootstrap.js +4494 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/js/bootstrap.js.map +1 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js +7 -0
- package/examples/blazor-report/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js.map +1 -0
- package/examples/integration/AspNetCoreRazorPages.cshtml +52 -0
- package/examples/integration/BlazorRazor.razor +84 -0
- package/examples/integration/BlazorServer.razor +91 -0
- package/examples/integration/index.html +100 -0
- package/examples/integration/integration-jquery.html +142 -0
- package/examples/viewer.html +58 -0
- package/package.json +4 -4
- package/dist/browser-lud4wlfC.js +0 -1473
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
@page "/reports/view/{id:int}"
|
|
2
|
+
@model MyApp.Pages.Reports.ViewModel
|
|
3
|
+
@inject IReportService ReportService
|
|
4
|
+
|
|
5
|
+
@{
|
|
6
|
+
var reportDef = await ReportService.GetDefinitionAsync(Model.Id);
|
|
7
|
+
var reportData = await ReportService.GetDataAsync(Model.Id);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
<link rel="stylesheet" href="~/lib/nexabase-report/style.css" />
|
|
11
|
+
|
|
12
|
+
<div class="report-viewer" style="height: 800px;">
|
|
13
|
+
<nexa-viewer id="viewer" minimal></nexa-viewer>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<div class="actions mt-3">
|
|
17
|
+
<button onclick="exportPdf()" class="btn btn-primary">PDF</button>
|
|
18
|
+
<button onclick="exportExcel()" class="btn btn-success">Excel</button>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
@section Scripts {
|
|
22
|
+
<script src="~/lib/nexabase-report/nexabase-report.umd.js"></script>
|
|
23
|
+
<script>
|
|
24
|
+
let initialized = false;
|
|
25
|
+
|
|
26
|
+
document.addEventListener('DOMContentLoaded', function() {
|
|
27
|
+
if (!initialized) {
|
|
28
|
+
NexaReport.registerNexaReport();
|
|
29
|
+
initialized = true;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const viewer = document.getElementById('viewer');
|
|
33
|
+
viewer.definition = @Html.Raw(reportDef);
|
|
34
|
+
viewer.data = @Html.Raw(reportData);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
function exportPdf() {
|
|
38
|
+
document.getElementById('viewer').exportPdf();
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function exportExcel() {
|
|
42
|
+
document.getElementById('viewer').exportExcel();
|
|
43
|
+
}
|
|
44
|
+
</script>
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
<style>
|
|
48
|
+
.report-viewer { border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; background: white; }
|
|
49
|
+
.btn { padding: 8px 16px; border: none; border-radius: 6px; cursor: pointer; margin-right: 8px; }
|
|
50
|
+
.btn-primary { background: #1e40af; color: white; }
|
|
51
|
+
.btn-success { background: #16a34a; color: white; }
|
|
52
|
+
</style>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
@page "/reports/{id:int}"
|
|
2
|
+
@using System.Text.Json
|
|
3
|
+
@inject HttpClient Http
|
|
4
|
+
@inject IJSRuntime JS
|
|
5
|
+
|
|
6
|
+
<div class="report-container" style="height: @Height">
|
|
7
|
+
<nexa-viewer id="@ViewerId" minimal></nexa-viewer>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
@code {
|
|
11
|
+
[Parameter] public int Id { get; set; }
|
|
12
|
+
[Parameter] public string Height { get; set; } = "800px";
|
|
13
|
+
|
|
14
|
+
private const string ViewerId = "nexa-report-viewer";
|
|
15
|
+
private bool _initialized = false;
|
|
16
|
+
|
|
17
|
+
protected override async Task OnAfterRenderAsync(bool firstRender)
|
|
18
|
+
{
|
|
19
|
+
if (firstRender && !_initialized)
|
|
20
|
+
{
|
|
21
|
+
_initialized = true;
|
|
22
|
+
await InitializeReport();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
private async Task InitializeReport()
|
|
27
|
+
{
|
|
28
|
+
try
|
|
29
|
+
{
|
|
30
|
+
// Cargar definición del reporte
|
|
31
|
+
var definition = await Http.GetFromJsonAsync<JsonElement>($"/api/reports/{Id}/definition");
|
|
32
|
+
|
|
33
|
+
// Cargar datos (puede venir de una API diferente)
|
|
34
|
+
var data = await Http.GetFromJsonAsync<List<Dictionary<string, object>>>($"/api/reports/{Id}/data");
|
|
35
|
+
|
|
36
|
+
await JS.InvokeVoidAsync("nexaReportRender", ViewerId, definition, data);
|
|
37
|
+
}
|
|
38
|
+
catch (Exception ex)
|
|
39
|
+
{
|
|
40
|
+
Console.Error.WriteLine($"Error cargando reporte: {ex.Message}");
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
public async Task ExportPdf()
|
|
45
|
+
{
|
|
46
|
+
await JS.InvokeVoidAsync("nexaReportExportPdf", ViewerId);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
public async Task ExportExcel()
|
|
50
|
+
{
|
|
51
|
+
await JS.InvokeVoidAsync("nexaReportExportExcel", ViewerId);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@section Scripts {
|
|
56
|
+
<script src="_content/nexabase-report/nexabase-report.umd.js"></script>
|
|
57
|
+
<script>
|
|
58
|
+
let nexaRegistered = false;
|
|
59
|
+
|
|
60
|
+
function nexaReportRender(viewerId, definition, data) {
|
|
61
|
+
if (!nexaRegistered) {
|
|
62
|
+
NexaReport.registerNexaReport();
|
|
63
|
+
nexaRegistered = true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// pequeña demora para asegurar que el custom element está listo
|
|
67
|
+
setTimeout(() => {
|
|
68
|
+
const viewer = document.getElementById(viewerId);
|
|
69
|
+
if (viewer) {
|
|
70
|
+
viewer.definition = definition;
|
|
71
|
+
viewer.data = data;
|
|
72
|
+
}
|
|
73
|
+
}, 50);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function nexaReportExportPdf(viewerId) {
|
|
77
|
+
document.getElementById(viewerId)?.exportPdf();
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function nexaReportExportExcel(viewerId) {
|
|
81
|
+
document.getElementById(viewerId)?.exportExcel();
|
|
82
|
+
}
|
|
83
|
+
</script>
|
|
84
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
@page "/report/{ReportId:int}"
|
|
2
|
+
@inject IHttpClientFactory HttpFactory
|
|
3
|
+
@inject IJSRuntime JS
|
|
4
|
+
|
|
5
|
+
<PageTitle>Reporte #@ReportId</PageTitle>
|
|
6
|
+
|
|
7
|
+
<div class="report-wrapper" style="height: @Height; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden;">
|
|
8
|
+
<nexa-viewer ref="viewerElement" id="@($"r-{ReportId}")"></nexa-viewer>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div class="report-actions mt-4 flex gap-2">
|
|
12
|
+
<button class="btn btn-primary" @onclick="ExportPdf">
|
|
13
|
+
<i class="pi pi-file-pdf"></i> Exportar PDF
|
|
14
|
+
</button>
|
|
15
|
+
<button class="btn btn-success" @onclick="ExportExcel">
|
|
16
|
+
<i class="pi pi-file-excel"></i> Exportar Excel
|
|
17
|
+
</button>
|
|
18
|
+
<button class="btn btn-outline" @onclick="Refresh">
|
|
19
|
+
<i class="pi pi-refresh"></i> Recargar
|
|
20
|
+
</button>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
@code {
|
|
24
|
+
[Parameter] public int ReportId { get; set; }
|
|
25
|
+
[Parameter] public string Height { get; set; } = "800px";
|
|
26
|
+
|
|
27
|
+
private ElementReference viewerElement;
|
|
28
|
+
private HttpClient? _http;
|
|
29
|
+
|
|
30
|
+
protected override void OnInitialized()
|
|
31
|
+
{
|
|
32
|
+
_http = HttpFactory.CreateClient("NexaBaseApi");
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
protected override async Task OnAfterRenderAsync(bool firstRender)
|
|
36
|
+
{
|
|
37
|
+
if (firstRender)
|
|
38
|
+
{
|
|
39
|
+
await LoadReport();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
private async Task LoadReport()
|
|
44
|
+
{
|
|
45
|
+
try
|
|
46
|
+
{
|
|
47
|
+
var definition = await _http!.GetFromJsonAsync<dynamic>($"/api/reports/{ReportId}");
|
|
48
|
+
var data = await _http!.GetFromJsonAsync<dynamic>($"/api/reports/{ReportId}/data");
|
|
49
|
+
|
|
50
|
+
await JS.InvokeVoidAsync("blazorInterop.renderReport", viewerElement, definition, data);
|
|
51
|
+
}
|
|
52
|
+
catch (Exception ex)
|
|
53
|
+
{
|
|
54
|
+
Console.WriteLine($"Error: {ex.Message}");
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
private async Task ExportPdf()
|
|
59
|
+
{
|
|
60
|
+
await JS.InvokeVoidAsync("blazorInterop.exportPdf", viewerElement);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
private async Task ExportExcel()
|
|
64
|
+
{
|
|
65
|
+
await JS.InvokeVoidAsync("blazorInterop.exportExcel", viewerElement);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
private async Task Refresh()
|
|
69
|
+
{
|
|
70
|
+
await LoadReport();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
<style>
|
|
75
|
+
.report-wrapper {
|
|
76
|
+
background: white;
|
|
77
|
+
}
|
|
78
|
+
.btn {
|
|
79
|
+
padding: 8px 16px;
|
|
80
|
+
border-radius: 6px;
|
|
81
|
+
border: none;
|
|
82
|
+
cursor: pointer;
|
|
83
|
+
display: inline-flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
gap: 6px;
|
|
86
|
+
font-size: 14px;
|
|
87
|
+
}
|
|
88
|
+
.btn-primary { background: #1e40af; color: white; }
|
|
89
|
+
.btn-success { background: #16a34a; color: white; }
|
|
90
|
+
.btn-outline { background: white; color: #374151; border: 1px solid #d1d5db; }
|
|
91
|
+
</style>
|
|
@@ -0,0 +1,100 @@
|
|
|
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>nexabase-report - Ejemplos de Integración</title>
|
|
7
|
+
<style>
|
|
8
|
+
body { font-family: system-ui, sans-serif; max-width: 900px; margin: 40px auto; padding: 20px; background: #f9fafb; }
|
|
9
|
+
h1 { color: #1e3a8a; }
|
|
10
|
+
h2 { color: #374151; margin-top: 32px; border-bottom: 2px solid #e5e7eb; padding-bottom: 8px; }
|
|
11
|
+
.card { background: white; border: 1px solid #e5e7eb; border-radius: 8px; padding: 20px; margin-bottom: 16px; }
|
|
12
|
+
.card h3 { margin: 0 0 8px 0; color: #1e40af; }
|
|
13
|
+
.card p { margin: 0 0 12px 0; color: #64748b; font-size: 14px; }
|
|
14
|
+
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 500; }
|
|
15
|
+
.badge-razor { background: #eff6ff; color: #1e40af; }
|
|
16
|
+
.badge-blazor { background: #f0fdf4; color: #16a34a; }
|
|
17
|
+
.badge-html { background: #fef3c7; color: #92400e; }
|
|
18
|
+
.badge-jquery { background: #ede9fe; color: #6d28d9; }
|
|
19
|
+
code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: 13px; }
|
|
20
|
+
pre { background: #1f2937; color: #f9fafb; padding: 16px; border-radius: 8px; overflow-x: auto; }
|
|
21
|
+
pre code { background: none; color: inherit; }
|
|
22
|
+
.file-link { color: #1e40af; text-decoration: none; font-size: 13px; }
|
|
23
|
+
.file-link:hover { text-decoration: underline; }
|
|
24
|
+
</style>
|
|
25
|
+
</head>
|
|
26
|
+
<body>
|
|
27
|
+
<h1>📊 nexabase-report — Ejemplos de Integración</h1>
|
|
28
|
+
<p>Ejemplos funcionales de cómo integrar el visor de reportes en diferentes tecnologías.</p>
|
|
29
|
+
|
|
30
|
+
<h2>🟦 Blazor Server / Razor</h2>
|
|
31
|
+
|
|
32
|
+
<div class="card">
|
|
33
|
+
<h3>Blazor Razor Page</h3>
|
|
34
|
+
<p>Componente para Blazor Server (.NET 8) con IJSRuntime para interactuar con el custom element.</p>
|
|
35
|
+
<span class="badge badge-razor">Razor</span>
|
|
36
|
+
<a class="file-link" href="BlazorRazor.razor">Ver archivo →</a>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<div class="card">
|
|
40
|
+
<h3>Blazor Server Page (code-behind)</h3>
|
|
41
|
+
<p>Page completa con Injected HttpClient, manejo de parámetros y botones de exportación.</p>
|
|
42
|
+
<span class="badge badge-blazor">Blazor Server</span>
|
|
43
|
+
<a class="file-link" href="BlazorServer.razor">Ver archivo →</a>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<h2>🟩 ASP.NET Core Razor Pages</h2>
|
|
47
|
+
|
|
48
|
+
<div class="card">
|
|
49
|
+
<h3>Razor Pages (.cshtml)</h3>
|
|
50
|
+
<p>Ejemplo clásico de Razor Pages con section Scripts y HTML helpers para serializar datos.</p>
|
|
51
|
+
<span class="badge badge-razor">Razor Pages</span>
|
|
52
|
+
<a class="file-link" href="AspNetCoreRazorPages.cshtml">Ver archivo →</a>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<h2>🟨 Vanilla HTML + JS</h2>
|
|
56
|
+
|
|
57
|
+
<div class="card">
|
|
58
|
+
<h3>jQuery + HTML</h3>
|
|
59
|
+
<p>Ejemplo puro con jQuery que genera datos simulados (como haría un backend .NET) y los pasa al visor.</p>
|
|
60
|
+
<span class="badge badge-jquery">jQuery</span>
|
|
61
|
+
<a class="file-link" href="integration-jquery.html">Ver archivo →</a>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<h2>📁 Archivos de Definición de Reportes</h2>
|
|
65
|
+
|
|
66
|
+
<div class="card">
|
|
67
|
+
<h3>invoice-report.json</h3>
|
|
68
|
+
<p>Reporte de factura de venta listo para cargar. Compatible con todos los ejemplos de arriba.</p>
|
|
69
|
+
<a class="file-link" href="../blazor-razor-invoice/invoice-report.json">Ver archivo →</a>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<h2>🔧 Cómo usar</h2>
|
|
73
|
+
|
|
74
|
+
<pre><code># 1. Build del proyecto
|
|
75
|
+
npm run build
|
|
76
|
+
|
|
77
|
+
# 2. Copiar dist/ a tu proyecto ASP.NET
|
|
78
|
+
# o usar un CDN (jsDelivr, unpkg)
|
|
79
|
+
|
|
80
|
+
# 3. En tu .cshtml o .razor:
|
|
81
|
+
<link rel="stylesheet" href="~/lib/nexabase-report/style.css" />
|
|
82
|
+
<script src="~/lib/nexabase-report/nexabase-report.umd.js"></script>
|
|
83
|
+
|
|
84
|
+
# 4. Registrar y usar
|
|
85
|
+
NexaReport.registerNexaReport();
|
|
86
|
+
const viewer = document.getElementById('viewer');
|
|
87
|
+
viewer.definition = definitionJson;
|
|
88
|
+
viewer.data = dataArray;</code></pre>
|
|
89
|
+
|
|
90
|
+
<h2>⚡ Tips para .NET</h2>
|
|
91
|
+
|
|
92
|
+
<ul>
|
|
93
|
+
<li>Usa <code>JsonSerializer.Serialize()</code> para convertir tus modelos a JSON</li>
|
|
94
|
+
<li>Pasa los datos como <code>List<Dictionary<string, object>></code> o tu modelo directamente</li>
|
|
95
|
+
<li>Para datos de múltiples fuentes, usa el formato <code>{ "alias": [...] }</code></li>
|
|
96
|
+
<li>El viewer funciona tanto en Blazor Server (con IJSRuntime) como en Blazor WebAssembly</li>
|
|
97
|
+
</ul>
|
|
98
|
+
|
|
99
|
+
</body>
|
|
100
|
+
</html>
|
|
@@ -0,0 +1,142 @@
|
|
|
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>Reporte - Ejemplo jQuery + nexabase-report</title>
|
|
7
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/nexabase-report@0.2.8/dist/style.css">
|
|
8
|
+
<style>
|
|
9
|
+
body { font-family: system-ui, sans-serif; margin: 20px; background: #f9fafb; }
|
|
10
|
+
.report-container { height: 800px; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; background: white; }
|
|
11
|
+
.toolbar { margin-bottom: 12px; display: flex; gap: 8px; }
|
|
12
|
+
.btn { padding: 8px 16px; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; }
|
|
13
|
+
.btn-primary { background: #1e40af; color: white; }
|
|
14
|
+
.btn-success { background: #16a34a; color: white; }
|
|
15
|
+
.btn-outline { background: white; border: 1px solid #d1d5db; }
|
|
16
|
+
.info { margin-top: 12px; padding: 12px; background: #eff6ff; border-radius: 6px; font-size: 13px; }
|
|
17
|
+
</style>
|
|
18
|
+
</head>
|
|
19
|
+
<body>
|
|
20
|
+
<h2>Reporte de Factura</h2>
|
|
21
|
+
|
|
22
|
+
<div class="toolbar">
|
|
23
|
+
<button class="btn btn-primary" id="btnPdf">Exportar PDF</button>
|
|
24
|
+
<button class="btn btn-success" id="btnExcel">Exportar Excel</button>
|
|
25
|
+
<button class="btn btn-outline" id="btnCsv">Exportar CSV</button>
|
|
26
|
+
<button class="btn btn-outline" id="btnReload">Recargar</button>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<nexa-viewer id="reportViewer"></nexa-viewer>
|
|
30
|
+
|
|
31
|
+
<div class="info">
|
|
32
|
+
<strong>Datos simulados generados por jQuery/JavaScript:</strong><br>
|
|
33
|
+
Los datos de factura e items son construidos dinámicamente en el cliente.
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<script src="https://cdn.jsdelivr.net/npm/nexabase-report@0.2.8/dist/nexabase-report.umd.js"></script>
|
|
37
|
+
<script>
|
|
38
|
+
$(function() {
|
|
39
|
+
// Registrar el custom element una vez
|
|
40
|
+
NexaReport.registerNexaReport();
|
|
41
|
+
|
|
42
|
+
// Datos simulados (como vendrían de un API en .NET)
|
|
43
|
+
var facturaData = {
|
|
44
|
+
numeroFactura: "FV-2026-00456",
|
|
45
|
+
fecha: "2026-05-09",
|
|
46
|
+
nombreCliente: "CLIENTE EJEMPLO S.A.S.",
|
|
47
|
+
nitCliente: "900.987.654-3",
|
|
48
|
+
direccionCliente: "Carrera 15 # 88-40, Bogotá D.C.",
|
|
49
|
+
formaPago: "Crédito 30 días",
|
|
50
|
+
vendedor: "Carlos Mendoza"
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
var itemsData = [
|
|
54
|
+
{ codigo: "P-001", descripcion: "Portátil HP ProBook 450 G10", cantidad: 2, precioUnitario: 3250000, descuentoPorcentaje: 5, subtotal: 6175000 },
|
|
55
|
+
{ codigo: "P-002", descripcion: "Monitor Dell 27'' UltraSharp", cantidad: 2, precioUnitario: 1450000, descuentoPorcentaje: 0, subtotal: 2900000 },
|
|
56
|
+
{ codigo: "P-003", descripcion: "Teclado mecánico Logitech MX", cantidad: 5, precioUnitario: 285000, descuentoPorcentaje: 10, subtotal: 1282500 },
|
|
57
|
+
{ codigo: "P-004", descripcion: "Mouse wireless Logitech MX Master 3", cantidad: 5, precioUnitario: 380000, descuentoPorcentaje: 10, subtotal: 1710000 },
|
|
58
|
+
{ codigo: "P-005", descripcion: "Webcam Logitech Brio 4K", cantidad: 3, precioUnitario: 650000, descuentoPorcentaje: 0, subtotal: 1950000 },
|
|
59
|
+
{ codigo: "P-006", descripcion: "Docking station Dell WD19TBS", cantidad: 2, precioUnitario: 890000, descuentoPorcentaje: 5, subtotal: 1691000 }
|
|
60
|
+
];
|
|
61
|
+
|
|
62
|
+
var definition = {
|
|
63
|
+
metadata: {
|
|
64
|
+
name: "Factura de Venta",
|
|
65
|
+
author: "Sistema .NET",
|
|
66
|
+
createdAt: new Date().toISOString()
|
|
67
|
+
},
|
|
68
|
+
layout: {
|
|
69
|
+
page: { format: "A4", orientation: "portrait", margins: { top: 1.5, right: 1, bottom: 1, left: 1 } },
|
|
70
|
+
bands: [
|
|
71
|
+
{
|
|
72
|
+
id: "rh_factura", type: "ReportHeader", height: 250,
|
|
73
|
+
elements: [
|
|
74
|
+
{ id: "t_titulo", type: "Text", x: 20, y: 10, width: 300, height: 24, content: "MI EMPRESA S.A.", style: { fontSize: "20px", fontWeight: "bold", color: "#1e3a8a" } },
|
|
75
|
+
{ id: "t_num", type: "Text", x: 450, y: 10, width: 210, height: 24, content: "FACTURA N° {{numeroFactura}}", style: { fontSize: "18px", fontWeight: "bold", color: "#1e40af", textAlign: "right" } },
|
|
76
|
+
{ id: "t_cliente", type: "Text", x: 20, y: 112, width: 280, height: 16, content: "{{nombreCliente}}", style: { fontSize: "12px", color: "#1e293b" } },
|
|
77
|
+
{ id: "t_nit", type: "Text", x: 20, y: 130, width: 200, height: 14, content: "NIT: {{nitCliente}}", style: { fontSize: "11px", color: "#64748b" } },
|
|
78
|
+
{ id: "t_direccion", type: "Text", x: 20, y: 146, width: 350, height: 14, content: "{{direccionCliente}}", style: { fontSize: "11px", color: "#64748b" } },
|
|
79
|
+
{ id: "t_fecha", type: "Text", x: 450, y: 58, width: 210, height: 14, content: "Fecha: {{fecha}}", style: { fontSize: "11px", color: "#64748b", textAlign: "right" } },
|
|
80
|
+
{ id: "t_vendedor", type: "Text", x: 480, y: 130, width: 180, height: 14, content: "Vendedor: {{vendedor}}", style: { fontSize: "11px", color: "#475569", textAlign: "right" } }
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
id: "db_items", type: "DataBand", height: 280, dataSource: "items",
|
|
85
|
+
elements: [
|
|
86
|
+
{
|
|
87
|
+
id: "table_items", type: "Table", x: 0, y: 30, width: 680, height: 240,
|
|
88
|
+
tableColumns: [
|
|
89
|
+
{ id: "c1", title: "Código", width: 80, binding: "codigo" },
|
|
90
|
+
{ id: "c2", title: "Producto", width: 260, binding: "descripcion" },
|
|
91
|
+
{ id: "c3", title: "Cant.", width: 70, binding: "cantidad" },
|
|
92
|
+
{ id: "c4", title: "Precio Unit.", width: 110, binding: "precioUnitario" },
|
|
93
|
+
{ id: "c5", title: "Desc.", width: 60, binding: "descuentoPorcentaje" },
|
|
94
|
+
{ id: "c6", title: "Subtotal", width: 100, binding: "subtotal" }
|
|
95
|
+
],
|
|
96
|
+
tableShowFooter: true,
|
|
97
|
+
style: { fontSize: "11px" }
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
id: "rf_totales", type: "ReportFooter", height: 120,
|
|
103
|
+
elements: [
|
|
104
|
+
{ id: "t_subtotal_label", type: "Text", x: 400, y: 8, width: 120, height: 18, content: "Subtotal:", style: { fontSize: "12px", fontWeight: "bold", textAlign: "right" } },
|
|
105
|
+
{ id: "t_subtotal_val", type: "Text", x: 530, y: 8, width: 150, height: 18, content: "${[sum(subtotal)]}", style: { fontSize: "12px", textAlign: "right" } },
|
|
106
|
+
{ id: "t_total_label", type: "Text", x: 400, y: 76, width: 120, height: 28, content: "TOTAL:", style: { fontSize: "16px", fontWeight: "bold", color: "#1e3a8a", textAlign: "right" } },
|
|
107
|
+
{ id: "t_total_val", type: "Text", x: 530, y: 76, width: 150, height: 28, content: "${[sum(subtotal) * 1.19]}", style: { fontSize: "18px", fontWeight: "bold", color: "#1e3a8a", textAlign: "right" } }
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: "pf_pagina", type: "PageFooter", height: 30,
|
|
112
|
+
elements: [
|
|
113
|
+
{ id: "t_pagina", type: "Text", x: 0, y: 8, width: 680, height: 16, content: "Página {{Page}} de {{TotalPages}}", style: { fontSize: "9px", color: "#94a3b8", textAlign: "center" } }
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
watermark: { text: "", opacity: 0 }
|
|
118
|
+
},
|
|
119
|
+
dataSources: [
|
|
120
|
+
{ id: "ds_factura", alias: "factura", enabled: true, isManual: true, manualData: [facturaData] },
|
|
121
|
+
{ id: "ds_items", alias: "items", enabled: true, isManual: true, manualData: itemsData }
|
|
122
|
+
],
|
|
123
|
+
documentType: "Report"
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
// Asignar al viewer
|
|
127
|
+
var viewer = document.getElementById('reportViewer');
|
|
128
|
+
viewer.definition = definition;
|
|
129
|
+
viewer.data = { factura: [facturaData], items: itemsData };
|
|
130
|
+
|
|
131
|
+
// Botones
|
|
132
|
+
$('#btnPdf').click(function() { viewer.exportPdf(); });
|
|
133
|
+
$('#btnExcel').click(function() { viewer.exportExcel(); });
|
|
134
|
+
$('#btnCsv').click(function() { viewer.exportCsv(); });
|
|
135
|
+
$('#btnReload').click(function() {
|
|
136
|
+
viewer.definition = null;
|
|
137
|
+
setTimeout(function() { viewer.definition = definition; }, 50);
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
</script>
|
|
141
|
+
</body>
|
|
142
|
+
</html>
|
|
@@ -0,0 +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.8/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.
|
|
3
|
+
"version": "0.2.9",
|
|
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",
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
"test": "vitest run",
|
|
62
62
|
"test:watch": "vitest",
|
|
63
63
|
"test:coverage": "vitest run --coverage",
|
|
64
|
-
"release:patch": "npm test && npm run build && npm version patch
|
|
65
|
-
"release:minor": "npm test && npm run build && npm version minor
|
|
66
|
-
"release:major": "npm test && npm run build && npm version major
|
|
64
|
+
"release:patch": "npm test && npm run build && npm version patch",
|
|
65
|
+
"release:minor": "npm test && npm run build && npm version minor",
|
|
66
|
+
"release:major": "npm test && npm run build && npm version major",
|
|
67
67
|
"prepack": "npm run build",
|
|
68
68
|
"lint": "eslint src/lib/",
|
|
69
69
|
"lint:fix": "eslint src/lib/ --fix"
|