nexabase-report 0.5.13 → 0.5.15
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/{html2pdf-CVyxZKQW.js → html2pdf-BJCI6sQ_.js} +2 -2
- package/dist/{index-DbpCi5uz.js → index-BPG5Uqxm.js} +32376 -32380
- package/dist/{index.es-m9_uegWC.js → index.es-BbCfzP8m.js} +2 -2
- package/dist/{jspdf.es.min-COMU5-uZ.js → jspdf.es.min-B07iBse7.js} +1 -1
- package/dist/lib/styles/_designer.css +211 -5
- package/dist/lib/styles/_primevue-overrides.css +41 -0
- package/dist/nexabase-report.es.js +1 -1
- package/dist/nexabase-report.umd.js +220 -220
- package/examples/report-factura-fixed.json +512 -0
- package/examples/report-factura-nueva.json +463 -0
- package/examples/report-factura.json +219 -183
- package/package.json +1 -1
|
@@ -1,276 +1,312 @@
|
|
|
1
1
|
{
|
|
2
2
|
"metadata": {
|
|
3
3
|
"version": "1.0",
|
|
4
|
-
"name": "Factura
|
|
5
|
-
"description": "Factura comercial con tabla de items, subtotal
|
|
6
|
-
"author": "
|
|
7
|
-
"createdAt": "
|
|
4
|
+
"name": "Factura Estándar",
|
|
5
|
+
"description": "Factura comercial con tabla de items, subtotal y total",
|
|
6
|
+
"author": "Antigravity",
|
|
7
|
+
"createdAt": "2026-07-11T00:00:00.000Z"
|
|
8
8
|
},
|
|
9
9
|
"layout": {
|
|
10
10
|
"page": {
|
|
11
11
|
"format": "A4",
|
|
12
12
|
"orientation": "portrait",
|
|
13
|
-
"margins": {
|
|
13
|
+
"margins": {
|
|
14
|
+
"top": 1.5,
|
|
15
|
+
"right": 1.5,
|
|
16
|
+
"bottom": 1.5,
|
|
17
|
+
"left": 1.5
|
|
18
|
+
}
|
|
14
19
|
},
|
|
15
20
|
"bands": [
|
|
16
21
|
{
|
|
17
|
-
"id": "
|
|
18
|
-
"type": "
|
|
22
|
+
"id": "band_invoice_header",
|
|
23
|
+
"type": "GroupHeader",
|
|
19
24
|
"height": 180,
|
|
25
|
+
"dataSource": "main",
|
|
26
|
+
"groupExpression": "folio",
|
|
20
27
|
"elements": [
|
|
21
28
|
{
|
|
22
|
-
"id": "
|
|
23
|
-
"type": "
|
|
24
|
-
"x":
|
|
29
|
+
"id": "el_logo",
|
|
30
|
+
"type": "Image",
|
|
31
|
+
"x": 0,
|
|
25
32
|
"y": 10,
|
|
26
|
-
"width":
|
|
33
|
+
"width": 140,
|
|
27
34
|
"height": 60,
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"y": 20,
|
|
36
|
-
"width": 160,
|
|
37
|
-
"height": 20,
|
|
38
|
-
"content": "MI EMPRESA S.A.",
|
|
39
|
-
"style": { "fontSize": "14px", "fontWeight": "bold", "color": "#3b82f6" }
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"id": "el_company_sub",
|
|
43
|
-
"type": "Text",
|
|
44
|
-
"x": 40,
|
|
45
|
-
"y": 42,
|
|
46
|
-
"width": 160,
|
|
47
|
-
"height": 16,
|
|
48
|
-
"content": "RUT: 76.123.456-7",
|
|
49
|
-
"style": { "fontSize": "10px", "color": "#64748b" }
|
|
35
|
+
"style": {
|
|
36
|
+
"objectFit": "contain"
|
|
37
|
+
},
|
|
38
|
+
"options": {
|
|
39
|
+
"imageSource": "url",
|
|
40
|
+
"imageUrl": "https://nexabase.online/logo.png"
|
|
41
|
+
}
|
|
50
42
|
},
|
|
51
43
|
{
|
|
52
44
|
"id": "el_invoice_title",
|
|
53
45
|
"type": "Text",
|
|
54
|
-
"x":
|
|
55
|
-
"y":
|
|
46
|
+
"x": 420,
|
|
47
|
+
"y": 10,
|
|
56
48
|
"width": 300,
|
|
57
49
|
"height": 30,
|
|
58
|
-
"content": "FACTURA
|
|
59
|
-
"style": {
|
|
50
|
+
"content": "FACTURA DE VENTA",
|
|
51
|
+
"style": {
|
|
52
|
+
"fontSize": "20px",
|
|
53
|
+
"fontWeight": "bold",
|
|
54
|
+
"color": "#0f172a",
|
|
55
|
+
"textAlign": "right"
|
|
56
|
+
}
|
|
60
57
|
},
|
|
61
58
|
{
|
|
62
59
|
"id": "el_invoice_num",
|
|
63
60
|
"type": "Text",
|
|
64
|
-
"x":
|
|
65
|
-
"y":
|
|
61
|
+
"x": 420,
|
|
62
|
+
"y": 40,
|
|
66
63
|
"width": 300,
|
|
67
64
|
"height": 16,
|
|
68
65
|
"content": "Nº {{folio}}",
|
|
69
|
-
"style": {
|
|
66
|
+
"style": {
|
|
67
|
+
"fontSize": "14px",
|
|
68
|
+
"color": "#64748b",
|
|
69
|
+
"textAlign": "right",
|
|
70
|
+
"fontWeight": "bold"
|
|
71
|
+
}
|
|
70
72
|
},
|
|
71
73
|
{
|
|
72
74
|
"id": "el_invoice_date",
|
|
73
75
|
"type": "Text",
|
|
74
|
-
"x":
|
|
75
|
-
"y":
|
|
76
|
+
"x": 420,
|
|
77
|
+
"y": 60,
|
|
76
78
|
"width": 300,
|
|
77
79
|
"height": 16,
|
|
78
80
|
"content": "Fecha: {{fecha_emision}}",
|
|
79
|
-
"style": {
|
|
81
|
+
"style": {
|
|
82
|
+
"fontSize": "12px",
|
|
83
|
+
"color": "#64748b",
|
|
84
|
+
"textAlign": "right"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"id": "el_barcode",
|
|
89
|
+
"type": "Barcode",
|
|
90
|
+
"x": 540,
|
|
91
|
+
"y": 80,
|
|
92
|
+
"width": 180,
|
|
93
|
+
"height": 40,
|
|
94
|
+
"binding": "folio",
|
|
95
|
+
"options": {
|
|
96
|
+
"barcodeFormat": "CODE128",
|
|
97
|
+
"displayValue": false
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"id": "box_client",
|
|
102
|
+
"type": "Rectangle",
|
|
103
|
+
"x": 0,
|
|
104
|
+
"y": 85,
|
|
105
|
+
"width": 350,
|
|
106
|
+
"height": 80,
|
|
107
|
+
"shapeType": "Rectangle",
|
|
108
|
+
"options": {
|
|
109
|
+
"lineColor": "#e2e8f0",
|
|
110
|
+
"strokeWidth": 1,
|
|
111
|
+
"backgroundColor": "#f8fafc"
|
|
112
|
+
},
|
|
113
|
+
"style": {
|
|
114
|
+
"borderRadius": "6px"
|
|
115
|
+
}
|
|
80
116
|
},
|
|
81
117
|
{
|
|
82
118
|
"id": "el_client_label",
|
|
83
119
|
"type": "Text",
|
|
84
|
-
"x":
|
|
85
|
-
"y":
|
|
120
|
+
"x": 10,
|
|
121
|
+
"y": 95,
|
|
86
122
|
"width": 100,
|
|
87
123
|
"height": 16,
|
|
88
|
-
"content": "
|
|
89
|
-
"style": {
|
|
124
|
+
"content": "CLIENTE:",
|
|
125
|
+
"style": {
|
|
126
|
+
"fontSize": "10px",
|
|
127
|
+
"fontWeight": "bold",
|
|
128
|
+
"color": "#64748b"
|
|
129
|
+
}
|
|
90
130
|
},
|
|
91
131
|
{
|
|
92
132
|
"id": "el_client_name",
|
|
93
133
|
"type": "Text",
|
|
94
|
-
"x":
|
|
95
|
-
"y":
|
|
96
|
-
"width":
|
|
134
|
+
"x": 10,
|
|
135
|
+
"y": 112,
|
|
136
|
+
"width": 330,
|
|
97
137
|
"height": 16,
|
|
98
|
-
"binding": "cliente_nombre",
|
|
99
138
|
"content": "{{cliente_nombre}}",
|
|
100
|
-
"style": {
|
|
139
|
+
"style": {
|
|
140
|
+
"fontSize": "13px",
|
|
141
|
+
"color": "#1e293b",
|
|
142
|
+
"fontWeight": "bold"
|
|
143
|
+
}
|
|
101
144
|
},
|
|
102
145
|
{
|
|
103
146
|
"id": "el_client_rut",
|
|
104
147
|
"type": "Text",
|
|
105
|
-
"x":
|
|
106
|
-
"y":
|
|
107
|
-
"width":
|
|
148
|
+
"x": 10,
|
|
149
|
+
"y": 130,
|
|
150
|
+
"width": 330,
|
|
108
151
|
"height": 14,
|
|
109
|
-
"binding": "cliente_rut",
|
|
110
152
|
"content": "RUT: {{cliente_rut}}",
|
|
111
|
-
"style": {
|
|
153
|
+
"style": {
|
|
154
|
+
"fontSize": "11px",
|
|
155
|
+
"color": "#475569"
|
|
156
|
+
}
|
|
112
157
|
},
|
|
113
158
|
{
|
|
114
159
|
"id": "el_client_addr",
|
|
115
160
|
"type": "Text",
|
|
116
|
-
"x":
|
|
117
|
-
"y":
|
|
118
|
-
"width":
|
|
161
|
+
"x": 10,
|
|
162
|
+
"y": 146,
|
|
163
|
+
"width": 330,
|
|
119
164
|
"height": 14,
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
"id": "el_barcode",
|
|
126
|
-
"type": "Barcode",
|
|
127
|
-
"x": 550,
|
|
128
|
-
"y": 95,
|
|
129
|
-
"width": 180,
|
|
130
|
-
"height": 50,
|
|
131
|
-
"binding": "folio",
|
|
132
|
-
"options": { "barcodeFormat": "CODE128", "displayValue": true }
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
"id": "el_header_line",
|
|
136
|
-
"type": "Line",
|
|
137
|
-
"x": 30,
|
|
138
|
-
"y": 165,
|
|
139
|
-
"width": 700,
|
|
140
|
-
"height": 2,
|
|
141
|
-
"shapeType": "Line",
|
|
142
|
-
"options": { "lineColor": "#3b82f6", "strokeWidth": 2 }
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
"id": "el_items_label",
|
|
146
|
-
"type": "Text",
|
|
147
|
-
"x": 30,
|
|
148
|
-
"y": 155,
|
|
149
|
-
"width": 200,
|
|
150
|
-
"height": 16,
|
|
151
|
-
"content": "Detalle de Items",
|
|
152
|
-
"style": { "fontSize": "12px", "fontWeight": "bold", "color": "#1e293b" }
|
|
165
|
+
"content": "Dirección: {{cliente_direccion}}",
|
|
166
|
+
"style": {
|
|
167
|
+
"fontSize": "11px",
|
|
168
|
+
"color": "#475569"
|
|
169
|
+
}
|
|
153
170
|
}
|
|
154
171
|
]
|
|
155
172
|
},
|
|
156
173
|
{
|
|
157
|
-
"id": "
|
|
174
|
+
"id": "band_items",
|
|
158
175
|
"type": "DataBand",
|
|
159
|
-
"height":
|
|
176
|
+
"height": 600,
|
|
160
177
|
"dataSource": "main",
|
|
161
178
|
"elements": [
|
|
162
179
|
{
|
|
163
|
-
"id": "
|
|
180
|
+
"id": "tbl_items",
|
|
164
181
|
"type": "Table",
|
|
165
|
-
"x":
|
|
166
|
-
"y":
|
|
167
|
-
"width":
|
|
168
|
-
"height":
|
|
182
|
+
"x": 0,
|
|
183
|
+
"y": 10,
|
|
184
|
+
"width": 720,
|
|
185
|
+
"height": 580,
|
|
186
|
+
"style": {
|
|
187
|
+
"fontSize": "11px"
|
|
188
|
+
},
|
|
169
189
|
"tableColumns": [
|
|
170
|
-
{
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
190
|
+
{
|
|
191
|
+
"id": "c1",
|
|
192
|
+
"title": "Cód.",
|
|
193
|
+
"width": 60,
|
|
194
|
+
"binding": "codigo"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"id": "c2",
|
|
198
|
+
"title": "Descripción",
|
|
199
|
+
"width": 320,
|
|
200
|
+
"binding": "descripcion"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"id": "c3",
|
|
204
|
+
"title": "Cant.",
|
|
205
|
+
"width": 80,
|
|
206
|
+
"binding": "cantidad"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"id": "c4",
|
|
210
|
+
"title": "Precio U.",
|
|
211
|
+
"width": 130,
|
|
212
|
+
"binding": "precio_unitario"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"id": "c5",
|
|
216
|
+
"title": "Total",
|
|
217
|
+
"width": 130,
|
|
218
|
+
"binding": "total_linea"
|
|
219
|
+
}
|
|
175
220
|
],
|
|
176
|
-
"
|
|
221
|
+
"conditionalFormats": []
|
|
177
222
|
}
|
|
178
223
|
]
|
|
179
224
|
},
|
|
180
225
|
{
|
|
181
226
|
"id": "band_totals",
|
|
182
|
-
"type": "
|
|
183
|
-
"height":
|
|
227
|
+
"type": "GroupFooter",
|
|
228
|
+
"height": 100,
|
|
229
|
+
"dataSource": "main",
|
|
184
230
|
"elements": [
|
|
185
231
|
{
|
|
186
|
-
"id": "
|
|
187
|
-
"type": "
|
|
188
|
-
"x":
|
|
232
|
+
"id": "box_totals",
|
|
233
|
+
"type": "Rectangle",
|
|
234
|
+
"x": 480,
|
|
189
235
|
"y": 10,
|
|
190
|
-
"width":
|
|
191
|
-
"height":
|
|
192
|
-
"shapeType": "
|
|
193
|
-
"options": {
|
|
236
|
+
"width": 240,
|
|
237
|
+
"height": 50,
|
|
238
|
+
"shapeType": "Rectangle",
|
|
239
|
+
"options": {
|
|
240
|
+
"lineColor": "#e2e8f0",
|
|
241
|
+
"strokeWidth": 1,
|
|
242
|
+
"backgroundColor": "#f1f5f9"
|
|
243
|
+
},
|
|
244
|
+
"style": {
|
|
245
|
+
"borderRadius": "6px"
|
|
246
|
+
}
|
|
194
247
|
},
|
|
195
248
|
{
|
|
196
|
-
"id": "
|
|
249
|
+
"id": "el_total_label",
|
|
197
250
|
"type": "Text",
|
|
198
|
-
"x":
|
|
199
|
-
"y":
|
|
200
|
-
"width":
|
|
201
|
-
"height":
|
|
202
|
-
"content": "
|
|
203
|
-
"style": {
|
|
251
|
+
"x": 490,
|
|
252
|
+
"y": 25,
|
|
253
|
+
"width": 100,
|
|
254
|
+
"height": 20,
|
|
255
|
+
"content": "TOTAL A PAGAR:",
|
|
256
|
+
"style": {
|
|
257
|
+
"fontSize": "12px",
|
|
258
|
+
"fontWeight": "bold",
|
|
259
|
+
"color": "#334155"
|
|
260
|
+
}
|
|
204
261
|
},
|
|
205
262
|
{
|
|
206
|
-
"id": "
|
|
263
|
+
"id": "el_total_val",
|
|
207
264
|
"type": "Text",
|
|
208
|
-
"x":
|
|
265
|
+
"x": 590,
|
|
209
266
|
"y": 20,
|
|
210
|
-
"width":
|
|
211
|
-
"height":
|
|
212
|
-
"content": "
|
|
213
|
-
"style": {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
"type": "Text",
|
|
228
|
-
"x": 570,
|
|
229
|
-
"y": 42,
|
|
230
|
-
"width": 150,
|
|
231
|
-
"height": 18,
|
|
232
|
-
"content": "${[sum(total_linea) * 0.19]}",
|
|
233
|
-
"style": { "fontSize": "12px", "color": "#1e293b", "textAlign": "right" }
|
|
234
|
-
},
|
|
267
|
+
"width": 120,
|
|
268
|
+
"height": 25,
|
|
269
|
+
"content": "{{[sum(total_linea)]}}",
|
|
270
|
+
"style": {
|
|
271
|
+
"fontSize": "18px",
|
|
272
|
+
"fontWeight": "bold",
|
|
273
|
+
"color": "#0f172a",
|
|
274
|
+
"textAlign": "right"
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
]
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"id": "band_page_footer",
|
|
281
|
+
"type": "PageFooter",
|
|
282
|
+
"height": 30,
|
|
283
|
+
"elements": [
|
|
235
284
|
{
|
|
236
|
-
"id": "
|
|
285
|
+
"id": "el_footer_line",
|
|
237
286
|
"type": "Line",
|
|
238
|
-
"x":
|
|
239
|
-
"y":
|
|
240
|
-
"width":
|
|
241
|
-
"height":
|
|
287
|
+
"x": 0,
|
|
288
|
+
"y": 5,
|
|
289
|
+
"width": 720,
|
|
290
|
+
"height": 1,
|
|
242
291
|
"shapeType": "Line",
|
|
243
|
-
"options": {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
"type": "Text",
|
|
248
|
-
"x": 410,
|
|
249
|
-
"y": 72,
|
|
250
|
-
"width": 150,
|
|
251
|
-
"height": 22,
|
|
252
|
-
"content": "TOTAL:",
|
|
253
|
-
"style": { "fontSize": "14px", "fontWeight": "bold", "color": "#1e293b", "textAlign": "right" }
|
|
292
|
+
"options": {
|
|
293
|
+
"lineColor": "#cbd5e1",
|
|
294
|
+
"strokeWidth": 1
|
|
295
|
+
}
|
|
254
296
|
},
|
|
255
297
|
{
|
|
256
|
-
"id": "
|
|
298
|
+
"id": "el_page_number",
|
|
257
299
|
"type": "Text",
|
|
258
|
-
"x":
|
|
259
|
-
"y":
|
|
260
|
-
"width":
|
|
261
|
-
"height": 22,
|
|
262
|
-
"content": "${[sum(total_linea) * 1.19]}",
|
|
263
|
-
"style": { "fontSize": "16px", "fontWeight": "bold", "color": "#3b82f6", "textAlign": "right" }
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
"id": "el_page_footer",
|
|
267
|
-
"type": "Text",
|
|
268
|
-
"x": 30,
|
|
269
|
-
"y": 110,
|
|
270
|
-
"width": 200,
|
|
300
|
+
"x": 0,
|
|
301
|
+
"y": 10,
|
|
302
|
+
"width": 720,
|
|
271
303
|
"height": 14,
|
|
272
|
-
"content": "Página {{Page}} de {{TotalPages}}
|
|
273
|
-
"style": {
|
|
304
|
+
"content": "Página {{Page}} de {{TotalPages}}",
|
|
305
|
+
"style": {
|
|
306
|
+
"fontSize": "10px",
|
|
307
|
+
"color": "#94a3b8",
|
|
308
|
+
"textAlign": "center"
|
|
309
|
+
}
|
|
274
310
|
}
|
|
275
311
|
]
|
|
276
312
|
}
|
|
@@ -279,9 +315,9 @@
|
|
|
279
315
|
"dataSources": [
|
|
280
316
|
{
|
|
281
317
|
"id": "ds_main",
|
|
282
|
-
"collection": "
|
|
318
|
+
"collection": "facturas",
|
|
283
319
|
"alias": "main",
|
|
284
320
|
"enabled": true
|
|
285
321
|
}
|
|
286
322
|
]
|
|
287
|
-
}
|
|
323
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nexabase-report",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.15",
|
|
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",
|