nexabase-report 0.1.6 → 0.2.1

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/style.css CHANGED
@@ -2231,7 +2231,6 @@ html, body, #app {
2231
2231
  cursor: move;
2232
2232
  transition: border-color var(--transition), box-shadow var(--transition);
2233
2233
  z-index: 5;
2234
- overflow: hidden;
2235
2234
  display: flex;
2236
2235
  align-items: center;
2237
2236
  justify-content: center;
@@ -2281,6 +2280,7 @@ html, body, #app {
2281
2280
  .nd-shape-render svg {
2282
2281
  width: 100%;
2283
2282
  height: 100%;
2283
+ overflow: visible;
2284
2284
  }
2285
2285
 
2286
2286
  .nd-shape-label {
@@ -0,0 +1,74 @@
1
+ {
2
+ "metadata": {
3
+ "name": "Anexo Factura de Venta",
4
+ "version": "2.0",
5
+ "description": "Reporte profesional con múltiples orígenes de datos"
6
+ },
7
+ "layout": {
8
+ "page": {
9
+ "format": "Letter",
10
+ "orientation": "portrait",
11
+ "margins": { "top": 1, "right": 1, "bottom": 1, "left": 1 }
12
+ },
13
+ "bands": [
14
+ {
15
+ "id": "header_band",
16
+ "type": "ReportHeader",
17
+ "height": 180,
18
+ "dataSource": "cliente",
19
+ "elements": [
20
+ { "id": "el_title", "type": "Text", "content": "ANEXO DE FACTURA", "x": 0, "y": 0, "width": 750, "height": 40, "style": { "fontSize": "24px", "fontWeight": "bold", "textAlign": "center" } },
21
+ { "id": "el_cli", "type": "Text", "content": "Cliente: {{nombre}}", "x": 20, "y": 60, "width": 400, "height": 20, "style": { "fontWeight": "bold" } },
22
+ { "id": "el_nit", "type": "Text", "content": "NIT: {{nit}}", "x": 20, "y": 85, "width": 400, "height": 20 },
23
+ { "id": "el_dir", "type": "Text", "content": "Dirección: {{direccion}}", "x": 20, "y": 110, "width": 400, "height": 20 },
24
+ { "id": "el_ciu", "type": "Text", "content": "Ciudad: {{ciudad}}", "x": 20, "y": 135, "width": 400, "height": 20 }
25
+ ]
26
+ },
27
+ {
28
+ "id": "data_band",
29
+ "type": "DataBand",
30
+ "height": 200,
31
+ "dataSource": "main",
32
+ "elements": [
33
+ {
34
+ "id": "el_table",
35
+ "type": "Table",
36
+ "x": 0, "y": 10, "width": 750, "height": 180,
37
+ "tableColumns": [
38
+ { "id": "c1", "title": "CÓDIGO", "binding": "sku", "width": 100 },
39
+ { "id": "c2", "title": "PRODUCTO", "binding": "nombre", "width": 400 },
40
+ { "id": "c3", "title": "CANT.", "binding": "cantidad", "width": 80 },
41
+ { "id": "c4", "title": "PRECIO", "binding": "precio", "width": 170 }
42
+ ]
43
+ }
44
+ ]
45
+ }
46
+ ]
47
+ },
48
+ "dataSources": [
49
+ {
50
+ "id": "ds_cliente",
51
+ "alias": "cliente",
52
+ "isManual": true,
53
+ "manualData": [
54
+ {
55
+ "nombre": "CLIENTE EJEMPLO S.A.S.",
56
+ "nit": "900.123.456-7",
57
+ "direccion": "Calle 100 # 15-20",
58
+ "ciudad": "Bogotá D.C."
59
+ }
60
+ ]
61
+ },
62
+ {
63
+ "id": "ds_main",
64
+ "alias": "main",
65
+ "isManual": true,
66
+ "manualData": [
67
+ { "sku": "P001", "nombre": "Camiseta Básica Blanca", "cantidad": 5, "precio": 25000 },
68
+ { "sku": "P002", "nombre": "Jean Slim Fit Azul", "cantidad": 2, "precio": 85000 },
69
+ { "sku": "P003", "nombre": "Zapatos Deportivos Runner", "cantidad": 1, "precio": 120000 },
70
+ { "sku": "P010", "nombre": "Reloj Digital Sport", "cantidad": 1, "precio": 110000 }
71
+ ]
72
+ }
73
+ ]
74
+ }
@@ -0,0 +1,353 @@
1
+ {
2
+ "metadata": {
3
+ "version": "1.0",
4
+ "name": "Factura de Recolección de Residuos",
5
+ "description": "Ejemplo de factura ambiental con datos del cliente, detalle de residuos recolectados y tarifas aplicadas. Usa tres DataSources manuales relacionados por nofactura.",
6
+ "author": "NexaBase",
7
+ "createdAt": "2025-05-01T00:00:00.000Z"
8
+ },
9
+ "layout": {
10
+ "page": {
11
+ "format": "A4",
12
+ "orientation": "portrait",
13
+ "margins": { "top": 1.5, "right": 1.5, "bottom": 1.5, "left": 1.5 }
14
+ },
15
+ "bands": [
16
+ {
17
+ "id": "rh_factura",
18
+ "type": "ReportHeader",
19
+ "height": 230,
20
+ "elements": [
21
+ {
22
+ "id": "rect_header",
23
+ "type": "Rectangle",
24
+ "x": 0,
25
+ "y": 0,
26
+ "width": 720,
27
+ "height": 120,
28
+ "shapeType": "Rectangle",
29
+ "options": { "lineColor": "#1e40af", "strokeWidth": 2, "fillColor": "#f8fafc" }
30
+ },
31
+ {
32
+ "id": "t_titulo",
33
+ "type": "Text",
34
+ "x": 20,
35
+ "y": 15,
36
+ "width": 400,
37
+ "height": 28,
38
+ "content": "FACTURA DE RECOLECCIÓN",
39
+ "style": { "fontSize": "18px", "fontWeight": "bold", "color": "#1e3a8a" }
40
+ },
41
+ {
42
+ "id": "t_nofactura",
43
+ "type": "Text",
44
+ "x": 500,
45
+ "y": 15,
46
+ "width": 200,
47
+ "height": 24,
48
+ "content": "N° {{nofactura}}",
49
+ "style": { "fontSize": "16px", "fontWeight": "bold", "color": "#1e40af", "textAlign": "right" }
50
+ },
51
+ {
52
+ "id": "t_razon",
53
+ "type": "Text",
54
+ "x": 20,
55
+ "y": 50,
56
+ "width": 350,
57
+ "height": 18,
58
+ "content": "{{nombre}}",
59
+ "style": { "fontSize": "14px", "fontWeight": "bold", "color": "#0f172a" }
60
+ },
61
+ {
62
+ "id": "t_nit",
63
+ "type": "Text",
64
+ "x": 20,
65
+ "y": 70,
66
+ "width": 250,
67
+ "height": 16,
68
+ "content": "NIT: {{nit}}",
69
+ "style": { "fontSize": "11px", "color": "#475569" }
70
+ },
71
+ {
72
+ "id": "t_direccion",
73
+ "type": "Text",
74
+ "x": 20,
75
+ "y": 88,
76
+ "width": 350,
77
+ "height": 16,
78
+ "content": "{{direccion}}",
79
+ "style": { "fontSize": "11px", "color": "#64748b" }
80
+ },
81
+ {
82
+ "id": "t_ciudad",
83
+ "type": "Text",
84
+ "x": 20,
85
+ "y": 104,
86
+ "width": 250,
87
+ "height": 16,
88
+ "content": "{{ciudad}}",
89
+ "style": { "fontSize": "11px", "color": "#64748b" }
90
+ },
91
+ {
92
+ "id": "line_div",
93
+ "type": "Line",
94
+ "x": 0,
95
+ "y": 125,
96
+ "width": 720,
97
+ "height": 2,
98
+ "shapeType": "Line",
99
+ "options": { "lineColor": "#1e40af", "strokeWidth": 2 }
100
+ },
101
+ {
102
+ "id": "t_fecha",
103
+ "type": "Text",
104
+ "x": 500,
105
+ "y": 130,
106
+ "width": 200,
107
+ "height": 16,
108
+ "content": "Fecha: {{fechaRecoleccion}}",
109
+ "style": { "fontSize": "11px", "color": "#64748b", "textAlign": "right" }
110
+ }
111
+ ]
112
+ },
113
+ {
114
+ "id": "db_residuos",
115
+ "type": "DataBand",
116
+ "height": 180,
117
+ "dataSource": "residuos",
118
+ "elements": [
119
+ {
120
+ "id": "t_items_title",
121
+ "type": "Text",
122
+ "x": 0,
123
+ "y": 5,
124
+ "width": 300,
125
+ "height": 20,
126
+ "content": "Detalle de Residuos Recolectados",
127
+ "style": { "fontSize": "13px", "fontWeight": "bold", "color": "#1e3a8a" }
128
+ },
129
+ {
130
+ "id": "table_residuos",
131
+ "type": "Table",
132
+ "x": 0,
133
+ "y": 30,
134
+ "width": 720,
135
+ "height": 140,
136
+ "tableColumns": [
137
+ { "id": "col1", "title": "Fecha Recolección", "width": 140, "binding": "fechaRecoleccion" },
138
+ { "id": "col2", "title": "Nombre del Residuo", "width": 280, "binding": "nombreResiduo" },
139
+ { "id": "col3", "title": "Cantidad (kg)", "width": 120, "binding": "cantidad" },
140
+ { "id": "col4", "title": "Doc. Relacionado", "width": 160, "binding": "documentoRelacionado" }
141
+ ],
142
+ "style": { "fontSize": "11px" }
143
+ }
144
+ ]
145
+ },
146
+ {
147
+ "id": "db_tarifas",
148
+ "type": "DataBand",
149
+ "height": 160,
150
+ "dataSource": "tarifas",
151
+ "elements": [
152
+ {
153
+ "id": "t_tarifas_title",
154
+ "type": "Text",
155
+ "x": 0,
156
+ "y": 5,
157
+ "width": 300,
158
+ "height": 20,
159
+ "content": "Tarifas Aplicadas",
160
+ "style": { "fontSize": "13px", "fontWeight": "bold", "color": "#1e3a8a" }
161
+ },
162
+ {
163
+ "id": "table_tarifas",
164
+ "type": "Table",
165
+ "x": 0,
166
+ "y": 30,
167
+ "width": 720,
168
+ "height": 110,
169
+ "tableColumns": [
170
+ { "id": "col1", "title": "Residuo", "width": 240, "binding": "residuo" },
171
+ { "id": "col2", "title": "Tipo Tarifa", "width": 140, "binding": "tipoTarifa" },
172
+ { "id": "col3", "title": "Precio Unit.", "width": 120, "binding": "precio" },
173
+ { "id": "col4", "title": "Kilos Mínimos", "width": 100, "binding": "kilosMinimos" },
174
+ { "id": "col5", "title": "Fact. Mínima", "width": 100, "binding": "facturacionMinima" }
175
+ ],
176
+ "style": { "fontSize": "11px" }
177
+ }
178
+ ]
179
+ },
180
+ {
181
+ "id": "rf_totales",
182
+ "type": "ReportFooter",
183
+ "height": 100,
184
+ "elements": [
185
+ {
186
+ "id": "line_footer",
187
+ "type": "Line",
188
+ "x": 300,
189
+ "y": 0,
190
+ "width": 400,
191
+ "height": 1,
192
+ "shapeType": "Line",
193
+ "options": { "lineColor": "#94a3b8", "strokeWidth": 1 }
194
+ },
195
+ {
196
+ "id": "t_resumen",
197
+ "type": "Text",
198
+ "x": 350,
199
+ "y": 10,
200
+ "width": 150,
201
+ "height": 20,
202
+ "content": "Subtotal:",
203
+ "style": { "fontSize": "12px", "fontWeight": "bold", "color": "#374151", "textAlign": "right" }
204
+ },
205
+ {
206
+ "id": "t_subtotal_val",
207
+ "type": "Text",
208
+ "x": 510,
209
+ "y": 10,
210
+ "width": 180,
211
+ "height": 20,
212
+ "content": "${[sum(precio) * cantidad]}",
213
+ "style": { "fontSize": "12px", "color": "#1e40af", "textAlign": "right" }
214
+ },
215
+ {
216
+ "id": "t_iva_label",
217
+ "type": "Text",
218
+ "x": 350,
219
+ "y": 32,
220
+ "width": 150,
221
+ "height": 18,
222
+ "content": "Total Items:",
223
+ "style": { "fontSize": "11px", "color": "#64748b", "textAlign": "right" }
224
+ },
225
+ {
226
+ "id": "t_total_items",
227
+ "type": "Text",
228
+ "x": 510,
229
+ "y": 32,
230
+ "width": 180,
231
+ "height": 18,
232
+ "content": "${[count(nofactura)]}",
233
+ "style": { "fontSize": "11px", "color": "#475569", "textAlign": "right" }
234
+ },
235
+ {
236
+ "id": "line_total",
237
+ "type": "Line",
238
+ "x": 350,
239
+ "y": 55,
240
+ "width": 340,
241
+ "height": 2,
242
+ "shapeType": "Line",
243
+ "options": { "lineColor": "#1e40af", "strokeWidth": 2 }
244
+ },
245
+ {
246
+ "id": "t_total_label",
247
+ "type": "Text",
248
+ "x": 350,
249
+ "y": 60,
250
+ "width": 150,
251
+ "height": 24,
252
+ "content": "TOTAL A PAGAR:",
253
+ "style": { "fontSize": "14px", "fontWeight": "bold", "color": "#1e3a8a", "textAlign": "right" }
254
+ },
255
+ {
256
+ "id": "t_total_val",
257
+ "type": "Text",
258
+ "x": 510,
259
+ "y": 60,
260
+ "width": 180,
261
+ "height": 24,
262
+ "content": "${[sum(precio) * cantidad]}",
263
+ "style": { "fontSize": "16px", "fontWeight": "bold", "color": "#1e40af", "textAlign": "right" }
264
+ }
265
+ ]
266
+ },
267
+ {
268
+ "id": "pf_factura",
269
+ "type": "PageFooter",
270
+ "height": 30,
271
+ "elements": [
272
+ {
273
+ "id": "t_pagina",
274
+ "type": "Text",
275
+ "x": 0,
276
+ "y": 8,
277
+ "width": 720,
278
+ "height": 16,
279
+ "content": "Página {{Page}} de {{TotalPages}} — Generado: {{Now}}",
280
+ "style": { "fontSize": "9px", "color": "#94a3b8", "textAlign": "center" }
281
+ }
282
+ ]
283
+ }
284
+ ]
285
+ },
286
+ "dataSources": [
287
+ {
288
+ "id": "ds_cliente",
289
+ "collection": "",
290
+ "alias": "cliente",
291
+ "enabled": true,
292
+ "isManual": true,
293
+ "manualData": [
294
+ {
295
+ "nofactura": "34",
296
+ "nombre": "CLIENTE EJEMPLO S.A.S.",
297
+ "nit": "900.123.456-7",
298
+ "direccion": "Calle 100 # 15-20",
299
+ "ciudad": "Bogotá D.C.",
300
+ "fechaRecoleccion": "2025-05-01"
301
+ }
302
+ ]
303
+ },
304
+ {
305
+ "id": "ds_residuos",
306
+ "collection": "",
307
+ "alias": "residuos",
308
+ "enabled": true,
309
+ "isManual": true,
310
+ "manualData": [
311
+ {
312
+ "nofactura": "34",
313
+ "fechaRecoleccion": "2025-05-01",
314
+ "nombreResiduo": "ÁCIDO CLORHÍDRICO",
315
+ "cantidad": 5,
316
+ "documentoRelacionado": "25"
317
+ },
318
+ {
319
+ "nofactura": "34",
320
+ "fechaRecoleccion": "2025-05-01",
321
+ "nombreResiduo": "BIO SANITARIOS",
322
+ "cantidad": 5,
323
+ "documentoRelacionado": "28"
324
+ }
325
+ ]
326
+ },
327
+ {
328
+ "id": "ds_tarifas",
329
+ "collection": "",
330
+ "alias": "tarifas",
331
+ "enabled": true,
332
+ "isManual": true,
333
+ "manualData": [
334
+ {
335
+ "nofactura": "34",
336
+ "facturacionMinima": 0,
337
+ "kilosMinimos": 0,
338
+ "precio": 52200,
339
+ "residuo": "ÁCIDO CLORHÍDRICO",
340
+ "tipoTarifa": "Tarifa x Kilo"
341
+ },
342
+ {
343
+ "nofactura": "34",
344
+ "facturacionMinima": 0,
345
+ "kilosMinimos": 0,
346
+ "precio": 52200,
347
+ "residuo": "BIO SANITARIOS",
348
+ "tipoTarifa": "Tarifa x Kilo"
349
+ }
350
+ ]
351
+ }
352
+ ]
353
+ }
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexabase-report",
3
- "version": "0.1.6",
3
+ "version": "0.2.1",
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",