nexabase-report 0.6.3 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,63 @@
1
+ {
2
+ "clientes": [
3
+ {
4
+ "id": 1,
5
+ "nombre": "Acme Corp",
6
+ "ciudad": "Bogotá"
7
+ },
8
+ {
9
+ "id": 2,
10
+ "nombre": "Globex SA",
11
+ "ciudad": "Medellín"
12
+ },
13
+ {
14
+ "id": 3,
15
+ "nombre": "Iniciativa Verde SAS",
16
+ "ciudad": "Cali"
17
+ }
18
+ ],
19
+ "pedidos": [
20
+ {
21
+ "clienteId": 1,
22
+ "pedido": "P-1001",
23
+ "fecha": "2026-06-02",
24
+ "producto": "Recolección orgánicos",
25
+ "total": 150000
26
+ },
27
+ {
28
+ "clienteId": 1,
29
+ "pedido": "P-1002",
30
+ "fecha": "2026-06-15",
31
+ "producto": "Recolección biosanitarios",
32
+ "total": 220000
33
+ },
34
+ {
35
+ "clienteId": 1,
36
+ "pedido": "P-1003",
37
+ "fecha": "2026-06-28",
38
+ "producto": "Recolección cortopunzantes",
39
+ "total": 98000
40
+ },
41
+ {
42
+ "clienteId": 2,
43
+ "pedido": "P-2001",
44
+ "fecha": "2026-06-05",
45
+ "producto": "Recolección orgánicos",
46
+ "total": 175000
47
+ },
48
+ {
49
+ "clienteId": 2,
50
+ "pedido": "P-2002",
51
+ "fecha": "2026-06-20",
52
+ "producto": "Recolección envases",
53
+ "total": 60000
54
+ },
55
+ {
56
+ "clienteId": 3,
57
+ "pedido": "P-3001",
58
+ "fecha": "2026-06-10",
59
+ "producto": "Recolección medicamentos vencidos",
60
+ "total": 340000
61
+ }
62
+ ]
63
+ }
@@ -0,0 +1,371 @@
1
+ {
2
+ "metadata": {
3
+ "version": "1.0",
4
+ "name": "Clientes con Detalle de Pedidos (Demo SubReporte)",
5
+ "description": "Demo del binding de subreportes por fila: cada cliente imprime su propio subreporte de pedidos, filtrado 100% en el cliente via subReportDataSource + subReportBindings (sin depender de NexaBase).",
6
+ "author": "NexaBase",
7
+ "createdAt": "2026-07-16T00:00:00.000Z"
8
+ },
9
+ "documentType": "Report",
10
+ "layout": {
11
+ "page": {
12
+ "format": "A4",
13
+ "orientation": "portrait",
14
+ "margins": {
15
+ "top": 1,
16
+ "right": 1,
17
+ "bottom": 1,
18
+ "left": 1
19
+ }
20
+ },
21
+ "bands": [
22
+ {
23
+ "id": "rh_main",
24
+ "type": "ReportHeader",
25
+ "height": 60,
26
+ "elements": [
27
+ {
28
+ "id": "t_title",
29
+ "type": "Text",
30
+ "x": 0,
31
+ "y": 15,
32
+ "width": 500,
33
+ "height": 30,
34
+ "content": "Clientes con Detalle de Pedidos",
35
+ "style": {
36
+ "fontSize": "20px",
37
+ "fontWeight": "700",
38
+ "color": "#1e293b",
39
+ "fontFamily": "Inter, system-ui, sans-serif",
40
+ "textAlign": "left",
41
+ "verticalAlign": "middle",
42
+ "padding": 2
43
+ }
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "id": "pf_main",
49
+ "type": "PageFooter",
50
+ "height": 26,
51
+ "elements": [
52
+ {
53
+ "id": "t_page",
54
+ "type": "Text",
55
+ "x": 400,
56
+ "y": 4,
57
+ "width": 100,
58
+ "height": 18,
59
+ "content": "Página {{page}} de {{totalPages}}",
60
+ "style": {
61
+ "fontSize": "9px",
62
+ "color": "#64748b",
63
+ "fontFamily": "Inter, system-ui, sans-serif",
64
+ "textAlign": "right",
65
+ "verticalAlign": "middle",
66
+ "padding": 2
67
+ }
68
+ }
69
+ ]
70
+ },
71
+ {
72
+ "id": "db_clientes",
73
+ "type": "DataBand",
74
+ "height": 170,
75
+ "dataSource": "clientes",
76
+ "elements": [
77
+ {
78
+ "id": "t_nombre",
79
+ "type": "Text",
80
+ "x": 0,
81
+ "y": 6,
82
+ "width": 300,
83
+ "height": 20,
84
+ "content": "Cliente: {{nombre}} (ID: {{id}})",
85
+ "style": {
86
+ "fontSize": "13px",
87
+ "fontWeight": "600",
88
+ "color": "#1e293b",
89
+ "fontFamily": "Inter, system-ui, sans-serif",
90
+ "textAlign": "left",
91
+ "verticalAlign": "middle",
92
+ "padding": 2
93
+ }
94
+ },
95
+ {
96
+ "id": "t_ciudad",
97
+ "type": "Text",
98
+ "x": 0,
99
+ "y": 26,
100
+ "width": 300,
101
+ "height": 18,
102
+ "content": "Ciudad: {{ciudad}}",
103
+ "style": {
104
+ "fontSize": "10px",
105
+ "color": "#64748b",
106
+ "fontFamily": "Inter, system-ui, sans-serif",
107
+ "textAlign": "left",
108
+ "verticalAlign": "middle",
109
+ "padding": 2
110
+ }
111
+ },
112
+ {
113
+ "id": "el_subreport_pedidos",
114
+ "type": "SubReport",
115
+ "x": 0,
116
+ "y": 48,
117
+ "width": 500,
118
+ "height": 110,
119
+ "style": {},
120
+ "subReportDataSource": "pedidos",
121
+ "subReportBindings": [
122
+ {
123
+ "masterField": "id",
124
+ "childField": "clienteId"
125
+ }
126
+ ],
127
+ "subReportDefinition": {
128
+ "metadata": {
129
+ "version": "1.0",
130
+ "name": "Detalle de Pedidos",
131
+ "description": "SubReporte embebido: pedidos de un cliente. Se filtra en tiempo de renderizado via subReportBindings del elemento padre — este mismo JSON puede abrirse y editarse de forma independiente.",
132
+ "author": "NexaBase",
133
+ "createdAt": "2026-07-16T00:00:00.000Z"
134
+ },
135
+ "documentType": "Report",
136
+ "layout": {
137
+ "page": {
138
+ "format": "A4",
139
+ "orientation": "portrait",
140
+ "margins": {
141
+ "top": 0.3,
142
+ "right": 0.3,
143
+ "bottom": 0.3,
144
+ "left": 0.3
145
+ }
146
+ },
147
+ "bands": [
148
+ {
149
+ "id": "sub_rh",
150
+ "type": "ReportHeader",
151
+ "height": 26,
152
+ "elements": [
153
+ {
154
+ "id": "sub_title",
155
+ "type": "Text",
156
+ "x": 0,
157
+ "y": 2,
158
+ "width": 400,
159
+ "height": 20,
160
+ "content": "Pedidos",
161
+ "style": {
162
+ "fontSize": "13px",
163
+ "fontWeight": "700",
164
+ "color": "#1e293b",
165
+ "fontFamily": "Inter, system-ui, sans-serif",
166
+ "textAlign": "left",
167
+ "verticalAlign": "middle",
168
+ "padding": 2
169
+ }
170
+ }
171
+ ]
172
+ },
173
+ {
174
+ "id": "sub_db_pedidos",
175
+ "type": "DataBand",
176
+ "height": 90,
177
+ "dataSource": "pedidos",
178
+ "elements": [
179
+ {
180
+ "id": "sub_table",
181
+ "type": "Table",
182
+ "x": 0,
183
+ "y": 0,
184
+ "width": 500,
185
+ "height": 80,
186
+ "style": {
187
+ "fontSize": "10px"
188
+ },
189
+ "tableColumns": [
190
+ {
191
+ "id": "c1",
192
+ "binding": "pedido",
193
+ "title": "Pedido",
194
+ "width": 20
195
+ },
196
+ {
197
+ "id": "c2",
198
+ "binding": "fecha",
199
+ "title": "Fecha",
200
+ "width": 20
201
+ },
202
+ {
203
+ "id": "c3",
204
+ "binding": "producto",
205
+ "title": "Producto",
206
+ "width": 35
207
+ },
208
+ {
209
+ "id": "c4",
210
+ "binding": "total",
211
+ "title": "Total",
212
+ "width": 25,
213
+ "alignment": "right",
214
+ "format": "2",
215
+ "footerText": "Total: {[sum(total)]}"
216
+ }
217
+ ],
218
+ "tableShowFooter": true
219
+ }
220
+ ]
221
+ }
222
+ ]
223
+ },
224
+ "dataSources": [
225
+ {
226
+ "id": "sub_ds_pedidos",
227
+ "collection": "pedidos",
228
+ "alias": "pedidos",
229
+ "enabled": true,
230
+ "isManual": true,
231
+ "manualData": [
232
+ {
233
+ "clienteId": 1,
234
+ "pedido": "P-1001",
235
+ "fecha": "2026-06-02",
236
+ "producto": "Recolección orgánicos",
237
+ "total": 150000
238
+ },
239
+ {
240
+ "clienteId": 1,
241
+ "pedido": "P-1002",
242
+ "fecha": "2026-06-15",
243
+ "producto": "Recolección biosanitarios",
244
+ "total": 220000
245
+ },
246
+ {
247
+ "clienteId": 1,
248
+ "pedido": "P-1003",
249
+ "fecha": "2026-06-28",
250
+ "producto": "Recolección cortopunzantes",
251
+ "total": 98000
252
+ },
253
+ {
254
+ "clienteId": 2,
255
+ "pedido": "P-2001",
256
+ "fecha": "2026-06-05",
257
+ "producto": "Recolección orgánicos",
258
+ "total": 175000
259
+ },
260
+ {
261
+ "clienteId": 2,
262
+ "pedido": "P-2002",
263
+ "fecha": "2026-06-20",
264
+ "producto": "Recolección envases",
265
+ "total": 60000
266
+ },
267
+ {
268
+ "clienteId": 3,
269
+ "pedido": "P-3001",
270
+ "fecha": "2026-06-10",
271
+ "producto": "Recolección medicamentos vencidos",
272
+ "total": 340000
273
+ }
274
+ ]
275
+ }
276
+ ],
277
+ "dictionary": {
278
+ "dataSources": [],
279
+ "manualFields": []
280
+ }
281
+ },
282
+ "options": {
283
+ "subReportCollapsed": false
284
+ }
285
+ }
286
+ ]
287
+ }
288
+ ]
289
+ },
290
+ "dataSources": [
291
+ {
292
+ "id": "ds_clientes",
293
+ "collection": "clientes",
294
+ "alias": "clientes",
295
+ "enabled": true,
296
+ "isManual": true,
297
+ "manualData": [
298
+ {
299
+ "id": 1,
300
+ "nombre": "Acme Corp",
301
+ "ciudad": "Bogotá"
302
+ },
303
+ {
304
+ "id": 2,
305
+ "nombre": "Globex SA",
306
+ "ciudad": "Medellín"
307
+ },
308
+ {
309
+ "id": 3,
310
+ "nombre": "Iniciativa Verde SAS",
311
+ "ciudad": "Cali"
312
+ }
313
+ ]
314
+ },
315
+ {
316
+ "id": "ds_pedidos",
317
+ "collection": "pedidos",
318
+ "alias": "pedidos",
319
+ "enabled": true,
320
+ "isManual": true,
321
+ "manualData": [
322
+ {
323
+ "clienteId": 1,
324
+ "pedido": "P-1001",
325
+ "fecha": "2026-06-02",
326
+ "producto": "Recolección orgánicos",
327
+ "total": 150000
328
+ },
329
+ {
330
+ "clienteId": 1,
331
+ "pedido": "P-1002",
332
+ "fecha": "2026-06-15",
333
+ "producto": "Recolección biosanitarios",
334
+ "total": 220000
335
+ },
336
+ {
337
+ "clienteId": 1,
338
+ "pedido": "P-1003",
339
+ "fecha": "2026-06-28",
340
+ "producto": "Recolección cortopunzantes",
341
+ "total": 98000
342
+ },
343
+ {
344
+ "clienteId": 2,
345
+ "pedido": "P-2001",
346
+ "fecha": "2026-06-05",
347
+ "producto": "Recolección orgánicos",
348
+ "total": 175000
349
+ },
350
+ {
351
+ "clienteId": 2,
352
+ "pedido": "P-2002",
353
+ "fecha": "2026-06-20",
354
+ "producto": "Recolección envases",
355
+ "total": 60000
356
+ },
357
+ {
358
+ "clienteId": 3,
359
+ "pedido": "P-3001",
360
+ "fecha": "2026-06-10",
361
+ "producto": "Recolección medicamentos vencidos",
362
+ "total": 340000
363
+ }
364
+ ]
365
+ }
366
+ ],
367
+ "dictionary": {
368
+ "dataSources": [],
369
+ "manualFields": []
370
+ }
371
+ }
@@ -0,0 +1,155 @@
1
+ {
2
+ "metadata": {
3
+ "version": "1.0",
4
+ "name": "Detalle de Pedidos",
5
+ "description": "SubReporte embebido: pedidos de un cliente. Se filtra en tiempo de renderizado via subReportBindings del elemento padre — este mismo JSON puede abrirse y editarse de forma independiente.",
6
+ "author": "NexaBase",
7
+ "createdAt": "2026-07-16T00:00:00.000Z"
8
+ },
9
+ "documentType": "Report",
10
+ "layout": {
11
+ "page": {
12
+ "format": "A4",
13
+ "orientation": "portrait",
14
+ "margins": {
15
+ "top": 0.3,
16
+ "right": 0.3,
17
+ "bottom": 0.3,
18
+ "left": 0.3
19
+ }
20
+ },
21
+ "bands": [
22
+ {
23
+ "id": "sub_rh",
24
+ "type": "ReportHeader",
25
+ "height": 26,
26
+ "elements": [
27
+ {
28
+ "id": "sub_title",
29
+ "type": "Text",
30
+ "x": 0,
31
+ "y": 2,
32
+ "width": 400,
33
+ "height": 20,
34
+ "content": "Pedidos",
35
+ "style": {
36
+ "fontSize": "13px",
37
+ "fontWeight": "700",
38
+ "color": "#1e293b",
39
+ "fontFamily": "Inter, system-ui, sans-serif",
40
+ "textAlign": "left",
41
+ "verticalAlign": "middle",
42
+ "padding": 2
43
+ }
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "id": "sub_db_pedidos",
49
+ "type": "DataBand",
50
+ "height": 90,
51
+ "dataSource": "pedidos",
52
+ "elements": [
53
+ {
54
+ "id": "sub_table",
55
+ "type": "Table",
56
+ "x": 0,
57
+ "y": 0,
58
+ "width": 500,
59
+ "height": 80,
60
+ "style": {
61
+ "fontSize": "10px"
62
+ },
63
+ "tableColumns": [
64
+ {
65
+ "id": "c1",
66
+ "binding": "pedido",
67
+ "title": "Pedido",
68
+ "width": 20
69
+ },
70
+ {
71
+ "id": "c2",
72
+ "binding": "fecha",
73
+ "title": "Fecha",
74
+ "width": 20
75
+ },
76
+ {
77
+ "id": "c3",
78
+ "binding": "producto",
79
+ "title": "Producto",
80
+ "width": 35
81
+ },
82
+ {
83
+ "id": "c4",
84
+ "binding": "total",
85
+ "title": "Total",
86
+ "width": 25,
87
+ "alignment": "right",
88
+ "format": "2",
89
+ "footerText": "Total: {[sum(total)]}"
90
+ }
91
+ ],
92
+ "tableShowFooter": true
93
+ }
94
+ ]
95
+ }
96
+ ]
97
+ },
98
+ "dataSources": [
99
+ {
100
+ "id": "sub_ds_pedidos",
101
+ "collection": "pedidos",
102
+ "alias": "pedidos",
103
+ "enabled": true,
104
+ "isManual": true,
105
+ "manualData": [
106
+ {
107
+ "clienteId": 1,
108
+ "pedido": "P-1001",
109
+ "fecha": "2026-06-02",
110
+ "producto": "Recolección orgánicos",
111
+ "total": 150000
112
+ },
113
+ {
114
+ "clienteId": 1,
115
+ "pedido": "P-1002",
116
+ "fecha": "2026-06-15",
117
+ "producto": "Recolección biosanitarios",
118
+ "total": 220000
119
+ },
120
+ {
121
+ "clienteId": 1,
122
+ "pedido": "P-1003",
123
+ "fecha": "2026-06-28",
124
+ "producto": "Recolección cortopunzantes",
125
+ "total": 98000
126
+ },
127
+ {
128
+ "clienteId": 2,
129
+ "pedido": "P-2001",
130
+ "fecha": "2026-06-05",
131
+ "producto": "Recolección orgánicos",
132
+ "total": 175000
133
+ },
134
+ {
135
+ "clienteId": 2,
136
+ "pedido": "P-2002",
137
+ "fecha": "2026-06-20",
138
+ "producto": "Recolección envases",
139
+ "total": 60000
140
+ },
141
+ {
142
+ "clienteId": 3,
143
+ "pedido": "P-3001",
144
+ "fecha": "2026-06-10",
145
+ "producto": "Recolección medicamentos vencidos",
146
+ "total": 340000
147
+ }
148
+ ]
149
+ }
150
+ ],
151
+ "dictionary": {
152
+ "dataSources": [],
153
+ "manualFields": []
154
+ }
155
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexabase-report",
3
- "version": "0.6.3",
3
+ "version": "0.7.0",
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",