@zentto/report-viewer 0.1.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,39 @@
|
|
|
1
|
+
import { LitElement, type PropertyValues } from 'lit';
|
|
2
|
+
import type { ReportLayout, DataSet, RenderOptions } from '@zentto/report-core';
|
|
3
|
+
export declare class ZenttoReportViewer extends LitElement {
|
|
4
|
+
/** The report layout definition (JSON object) */
|
|
5
|
+
layout: ReportLayout | null;
|
|
6
|
+
/** The dataset to render (keyed by dataSource id) */
|
|
7
|
+
data: DataSet | null;
|
|
8
|
+
/** Render options (parameters, page size overrides, etc.) */
|
|
9
|
+
options: RenderOptions | null;
|
|
10
|
+
/** Current zoom level (percentage) */
|
|
11
|
+
zoom: number;
|
|
12
|
+
/** Current page (1-based) */
|
|
13
|
+
currentPage: number;
|
|
14
|
+
/** Show toolbar (zoom, page nav, print, download) */
|
|
15
|
+
showToolbar: boolean;
|
|
16
|
+
/** Theme: light or dark */
|
|
17
|
+
theme: 'light' | 'dark';
|
|
18
|
+
private _result;
|
|
19
|
+
private _error;
|
|
20
|
+
static styles: import("lit").CSSResult;
|
|
21
|
+
updated(changed: PropertyValues): void;
|
|
22
|
+
private _render;
|
|
23
|
+
private _prevPage;
|
|
24
|
+
private _nextPage;
|
|
25
|
+
private _zoomIn;
|
|
26
|
+
private _zoomOut;
|
|
27
|
+
private _fitWidth;
|
|
28
|
+
private _print;
|
|
29
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
30
|
+
private _renderToolbar;
|
|
31
|
+
private _renderPages;
|
|
32
|
+
}
|
|
33
|
+
declare global {
|
|
34
|
+
interface HTMLElementTagNameMap {
|
|
35
|
+
'zentto-report-viewer': ZenttoReportViewer;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export { ZenttoReportViewer as default };
|
|
39
|
+
//# sourceMappingURL=zentto-report-viewer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zentto-report-viewer.d.ts","sourceRoot":"","sources":["../src/zentto-report-viewer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAa,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAEjE,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAgB,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAG9F,qBACa,kBAAmB,SAAQ,UAAU;IAIhD,iDAAiD;IAEjD,MAAM,EAAE,YAAY,GAAG,IAAI,CAAQ;IAEnC,qDAAqD;IAErD,IAAI,EAAE,OAAO,GAAG,IAAI,CAAQ;IAE5B,6DAA6D;IAE7D,OAAO,EAAE,aAAa,GAAG,IAAI,CAAQ;IAErC,sCAAsC;IAEtC,IAAI,SAAO;IAEX,6BAA6B;IAE7B,WAAW,SAAK;IAEhB,qDAAqD;IAErD,WAAW,UAAQ;IAEnB,2BAA2B;IAE3B,KAAK,EAAE,OAAO,GAAG,MAAM,CAAW;IAIzB,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,MAAM,CAAuB;IAI9C,OAAgB,MAAM,0BAgGpB;IAIO,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAM/C,OAAO,CAAC,OAAO;IAsBf,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,OAAO;IAKf,OAAO,CAAC,QAAQ;IAKhB,OAAO,CAAC,SAAS;IAKjB,OAAO,CAAC,MAAM;IA4BL,MAAM;IAaf,OAAO,CAAC,cAAc;IAsBtB,OAAO,CAAC,YAAY;CAcrB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,sBAAsB,EAAE,kBAAkB,CAAC;KAC5C;CACF;AAED,OAAO,EAAE,kBAAkB,IAAI,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
// @zentto/report-viewer — Web component for rendering reports
|
|
8
|
+
import { LitElement, html, css } from 'lit';
|
|
9
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
|
10
|
+
import { renderToHtml } from '@zentto/report-core';
|
|
11
|
+
let ZenttoReportViewer = class ZenttoReportViewer extends LitElement {
|
|
12
|
+
constructor() {
|
|
13
|
+
// ─── Public Properties ──────────────────────────────────────────
|
|
14
|
+
super(...arguments);
|
|
15
|
+
/** The report layout definition (JSON object) */
|
|
16
|
+
this.layout = null;
|
|
17
|
+
/** The dataset to render (keyed by dataSource id) */
|
|
18
|
+
this.data = null;
|
|
19
|
+
/** Render options (parameters, page size overrides, etc.) */
|
|
20
|
+
this.options = null;
|
|
21
|
+
/** Current zoom level (percentage) */
|
|
22
|
+
this.zoom = 100;
|
|
23
|
+
/** Current page (1-based) */
|
|
24
|
+
this.currentPage = 1;
|
|
25
|
+
/** Show toolbar (zoom, page nav, print, download) */
|
|
26
|
+
this.showToolbar = true;
|
|
27
|
+
/** Theme: light or dark */
|
|
28
|
+
this.theme = 'light';
|
|
29
|
+
// ─── Internal State ─────────────────────────────────────────────
|
|
30
|
+
this._result = null;
|
|
31
|
+
this._error = null;
|
|
32
|
+
}
|
|
33
|
+
// ─── Styles ─────────────────────────────────────────────────────
|
|
34
|
+
static { this.styles = css `
|
|
35
|
+
:host {
|
|
36
|
+
display: block;
|
|
37
|
+
font-family: Arial, sans-serif;
|
|
38
|
+
--zr-bg: #e0e0e0;
|
|
39
|
+
--zr-toolbar-bg: #ffffff;
|
|
40
|
+
--zr-toolbar-border: #ddd;
|
|
41
|
+
--zr-text: #333;
|
|
42
|
+
--zr-btn-bg: #f5f5f5;
|
|
43
|
+
--zr-btn-hover: #e0e0e0;
|
|
44
|
+
--zr-page-shadow: rgba(0,0,0,0.15);
|
|
45
|
+
}
|
|
46
|
+
:host([theme="dark"]) {
|
|
47
|
+
--zr-bg: #1e1e1e;
|
|
48
|
+
--zr-toolbar-bg: #2d2d2d;
|
|
49
|
+
--zr-toolbar-border: #444;
|
|
50
|
+
--zr-text: #e0e0e0;
|
|
51
|
+
--zr-btn-bg: #3a3a3a;
|
|
52
|
+
--zr-btn-hover: #4a4a4a;
|
|
53
|
+
--zr-page-shadow: rgba(0,0,0,0.4);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.viewer-container {
|
|
57
|
+
display: flex;
|
|
58
|
+
flex-direction: column;
|
|
59
|
+
height: 100%;
|
|
60
|
+
background: var(--zr-bg);
|
|
61
|
+
color: var(--zr-text);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.toolbar {
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
gap: 8px;
|
|
68
|
+
padding: 8px 16px;
|
|
69
|
+
background: var(--zr-toolbar-bg);
|
|
70
|
+
border-bottom: 1px solid var(--zr-toolbar-border);
|
|
71
|
+
flex-shrink: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.toolbar button {
|
|
75
|
+
background: var(--zr-btn-bg);
|
|
76
|
+
border: 1px solid var(--zr-toolbar-border);
|
|
77
|
+
border-radius: 4px;
|
|
78
|
+
padding: 6px 12px;
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
color: var(--zr-text);
|
|
81
|
+
font-size: 13px;
|
|
82
|
+
}
|
|
83
|
+
.toolbar button:hover { background: var(--zr-btn-hover); }
|
|
84
|
+
.toolbar button:disabled { opacity: 0.4; cursor: default; }
|
|
85
|
+
|
|
86
|
+
.toolbar .page-info {
|
|
87
|
+
font-size: 13px;
|
|
88
|
+
min-width: 100px;
|
|
89
|
+
text-align: center;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.toolbar .zoom-info {
|
|
93
|
+
font-size: 13px;
|
|
94
|
+
min-width: 50px;
|
|
95
|
+
text-align: center;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.toolbar .spacer { flex: 1; }
|
|
99
|
+
|
|
100
|
+
.pages-container {
|
|
101
|
+
flex: 1;
|
|
102
|
+
overflow: auto;
|
|
103
|
+
padding: 20px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.page-wrapper {
|
|
107
|
+
display: flex;
|
|
108
|
+
justify-content: center;
|
|
109
|
+
margin-bottom: 20px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.page-content {
|
|
113
|
+
transform-origin: top center;
|
|
114
|
+
background: white;
|
|
115
|
+
box-shadow: 0 2px 8px var(--zr-page-shadow);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.error {
|
|
119
|
+
padding: 20px;
|
|
120
|
+
color: #d32f2f;
|
|
121
|
+
text-align: center;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.empty {
|
|
125
|
+
padding: 40px;
|
|
126
|
+
text-align: center;
|
|
127
|
+
color: #888;
|
|
128
|
+
font-size: 14px;
|
|
129
|
+
}
|
|
130
|
+
`; }
|
|
131
|
+
// ─── Lifecycle ──────────────────────────────────────────────────
|
|
132
|
+
updated(changed) {
|
|
133
|
+
if (changed.has('layout') || changed.has('data') || changed.has('options')) {
|
|
134
|
+
this._render();
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
_render() {
|
|
138
|
+
if (!this.layout || !this.data) {
|
|
139
|
+
this._result = null;
|
|
140
|
+
this._error = null;
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
try {
|
|
144
|
+
this._result = renderToHtml(this.layout, this.data, this.options || undefined);
|
|
145
|
+
this._error = null;
|
|
146
|
+
// Clamp current page
|
|
147
|
+
if (this.currentPage > this._result.totalPages) {
|
|
148
|
+
this.currentPage = this._result.totalPages;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
catch (err) {
|
|
152
|
+
this._error = err instanceof Error ? err.message : String(err);
|
|
153
|
+
this._result = null;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
// ─── Actions ────────────────────────────────────────────────────
|
|
157
|
+
_prevPage() {
|
|
158
|
+
if (this.currentPage > 1) {
|
|
159
|
+
this.currentPage--;
|
|
160
|
+
this.dispatchEvent(new CustomEvent('page-change', { detail: { page: this.currentPage } }));
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
_nextPage() {
|
|
164
|
+
if (this._result && this.currentPage < this._result.totalPages) {
|
|
165
|
+
this.currentPage++;
|
|
166
|
+
this.dispatchEvent(new CustomEvent('page-change', { detail: { page: this.currentPage } }));
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
_zoomIn() {
|
|
170
|
+
this.zoom = Math.min(this.zoom + 10, 200);
|
|
171
|
+
this.dispatchEvent(new CustomEvent('zoom-change', { detail: { zoom: this.zoom } }));
|
|
172
|
+
}
|
|
173
|
+
_zoomOut() {
|
|
174
|
+
this.zoom = Math.max(this.zoom - 10, 30);
|
|
175
|
+
this.dispatchEvent(new CustomEvent('zoom-change', { detail: { zoom: this.zoom } }));
|
|
176
|
+
}
|
|
177
|
+
_fitWidth() {
|
|
178
|
+
this.zoom = 100;
|
|
179
|
+
this.dispatchEvent(new CustomEvent('zoom-change', { detail: { zoom: this.zoom } }));
|
|
180
|
+
}
|
|
181
|
+
_print() {
|
|
182
|
+
if (!this._result)
|
|
183
|
+
return;
|
|
184
|
+
const allHtml = this._result.pages.map(p => p.html).join('\n');
|
|
185
|
+
const printWindow = window.open('', '_blank');
|
|
186
|
+
if (!printWindow)
|
|
187
|
+
return;
|
|
188
|
+
const unit = this.layout.pageSize.unit;
|
|
189
|
+
const w = this.layout.pageSize.width;
|
|
190
|
+
const h = this.layout.pageSize.height;
|
|
191
|
+
printWindow.document.write(`<!DOCTYPE html>
|
|
192
|
+
<html><head><title>${this.layout.name}</title>
|
|
193
|
+
<style>
|
|
194
|
+
@page { size: ${w}${unit} ${h}${unit}; margin: 0; }
|
|
195
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
196
|
+
body { font-family: ${this.layout.defaultStyle?.fontFamily || 'Arial, sans-serif'}; }
|
|
197
|
+
.zr-page { position: relative; overflow: hidden; page-break-after: always; }
|
|
198
|
+
.zr-band { position: absolute; left: 0; right: 0; overflow: hidden; }
|
|
199
|
+
.zr-element { position: absolute; overflow: hidden; }
|
|
200
|
+
.zr-line { position: absolute; }
|
|
201
|
+
</style>
|
|
202
|
+
</head><body>${allHtml}</body></html>`);
|
|
203
|
+
printWindow.document.close();
|
|
204
|
+
printWindow.print();
|
|
205
|
+
}
|
|
206
|
+
// ─── Render ─────────────────────────────────────────────────────
|
|
207
|
+
render() {
|
|
208
|
+
return html `
|
|
209
|
+
<div class="viewer-container">
|
|
210
|
+
${this.showToolbar ? this._renderToolbar() : null}
|
|
211
|
+
<div class="pages-container">
|
|
212
|
+
${this._error ? html `<div class="error">${this._error}</div>` : null}
|
|
213
|
+
${!this._result && !this._error ? html `<div class="empty">No report data. Set layout and data properties.</div>` : null}
|
|
214
|
+
${this._result ? this._renderPages() : null}
|
|
215
|
+
</div>
|
|
216
|
+
</div>
|
|
217
|
+
`;
|
|
218
|
+
}
|
|
219
|
+
_renderToolbar() {
|
|
220
|
+
const total = this._result?.totalPages || 0;
|
|
221
|
+
return html `
|
|
222
|
+
<div class="toolbar">
|
|
223
|
+
<button @click=${this._prevPage} ?disabled=${this.currentPage <= 1}>◀</button>
|
|
224
|
+
<span class="page-info">${this.currentPage} / ${total}</span>
|
|
225
|
+
<button @click=${this._nextPage} ?disabled=${this.currentPage >= total}>▶</button>
|
|
226
|
+
|
|
227
|
+
<span class="spacer"></span>
|
|
228
|
+
|
|
229
|
+
<button @click=${this._zoomOut}>-</button>
|
|
230
|
+
<span class="zoom-info">${this.zoom}%</span>
|
|
231
|
+
<button @click=${this._zoomIn}>+</button>
|
|
232
|
+
<button @click=${this._fitWidth}>Fit</button>
|
|
233
|
+
|
|
234
|
+
<span class="spacer"></span>
|
|
235
|
+
|
|
236
|
+
<button @click=${this._print}>Print</button>
|
|
237
|
+
</div>
|
|
238
|
+
`;
|
|
239
|
+
}
|
|
240
|
+
_renderPages() {
|
|
241
|
+
if (!this._result)
|
|
242
|
+
return null;
|
|
243
|
+
const scale = this.zoom / 100;
|
|
244
|
+
const page = this._result.pages[this.currentPage - 1];
|
|
245
|
+
if (!page)
|
|
246
|
+
return null;
|
|
247
|
+
return html `
|
|
248
|
+
<div class="page-wrapper">
|
|
249
|
+
<div class="page-content" style="transform:scale(${scale});">
|
|
250
|
+
<div .innerHTML=${page.html}></div>
|
|
251
|
+
</div>
|
|
252
|
+
</div>
|
|
253
|
+
`;
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
__decorate([
|
|
257
|
+
property({ type: Object })
|
|
258
|
+
], ZenttoReportViewer.prototype, "layout", void 0);
|
|
259
|
+
__decorate([
|
|
260
|
+
property({ type: Object })
|
|
261
|
+
], ZenttoReportViewer.prototype, "data", void 0);
|
|
262
|
+
__decorate([
|
|
263
|
+
property({ type: Object })
|
|
264
|
+
], ZenttoReportViewer.prototype, "options", void 0);
|
|
265
|
+
__decorate([
|
|
266
|
+
property({ type: Number })
|
|
267
|
+
], ZenttoReportViewer.prototype, "zoom", void 0);
|
|
268
|
+
__decorate([
|
|
269
|
+
property({ type: Number, attribute: 'current-page' })
|
|
270
|
+
], ZenttoReportViewer.prototype, "currentPage", void 0);
|
|
271
|
+
__decorate([
|
|
272
|
+
property({ type: Boolean, attribute: 'show-toolbar' })
|
|
273
|
+
], ZenttoReportViewer.prototype, "showToolbar", void 0);
|
|
274
|
+
__decorate([
|
|
275
|
+
property({ type: String })
|
|
276
|
+
], ZenttoReportViewer.prototype, "theme", void 0);
|
|
277
|
+
__decorate([
|
|
278
|
+
state()
|
|
279
|
+
], ZenttoReportViewer.prototype, "_result", void 0);
|
|
280
|
+
__decorate([
|
|
281
|
+
state()
|
|
282
|
+
], ZenttoReportViewer.prototype, "_error", void 0);
|
|
283
|
+
ZenttoReportViewer = __decorate([
|
|
284
|
+
customElement('zentto-report-viewer')
|
|
285
|
+
], ZenttoReportViewer);
|
|
286
|
+
export { ZenttoReportViewer };
|
|
287
|
+
export { ZenttoReportViewer as default };
|
|
288
|
+
//# sourceMappingURL=zentto-report-viewer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zentto-report-viewer.js","sourceRoot":"","sources":["../src/zentto-report-viewer.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA8D;AAC9D,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAuB,MAAM,KAAK,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAG5C,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,UAAU;IAA3C;QAEL,mEAAmE;;QAEnE,iDAAiD;QAEjD,WAAM,GAAwB,IAAI,CAAC;QAEnC,qDAAqD;QAErD,SAAI,GAAmB,IAAI,CAAC;QAE5B,6DAA6D;QAE7D,YAAO,GAAyB,IAAI,CAAC;QAErC,sCAAsC;QAEtC,SAAI,GAAG,GAAG,CAAC;QAEX,6BAA6B;QAE7B,gBAAW,GAAG,CAAC,CAAC;QAEhB,qDAAqD;QAErD,gBAAW,GAAG,IAAI,CAAC;QAEnB,2BAA2B;QAE3B,UAAK,GAAqB,OAAO,CAAC;QAElC,mEAAmE;QAElD,YAAO,GAAwB,IAAI,CAAC;QACpC,WAAM,GAAkB,IAAI,CAAC;IA8OhD,CAAC;IA5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ACC;AAI5B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDACU;AAIrC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDAChB;AAIX;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;uDACtC;AAIhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;uDACpC;AAInB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDACO;AAIjB;IAAhB,KAAK,EAAE;mDAA6C;AACpC;IAAhB,KAAK,EAAE;kDAAsC;AAnCnC,kBAAkB;IAD9B,aAAa,CAAC,sBAAsB,CAAC;GACzB,kBAAkB,CAiR9B;;AAQD,OAAO,EAAE,kBAAkB,IAAI,OAAO,EAAE,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@zentto/report-viewer",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Web component for rendering Zentto Report layouts with data. Read-only viewer with pagination, zoom, and print.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/zentto-report-viewer.js",
|
|
7
|
+
"types": "dist/zentto-report-viewer.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/zentto-report-viewer.d.ts",
|
|
11
|
+
"import": "./dist/zentto-report-viewer.js",
|
|
12
|
+
"default": "./dist/zentto-report-viewer.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsc",
|
|
21
|
+
"dev": "tsc --watch",
|
|
22
|
+
"clean": "rm -rf dist"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@zentto/report-core": "*",
|
|
26
|
+
"lit": "^3.2.0"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"typescript": "^5.7.0"
|
|
30
|
+
},
|
|
31
|
+
"license": "MIT",
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "https://github.com/zentto-erp/zentto-report"
|
|
35
|
+
},
|
|
36
|
+
"keywords": [
|
|
37
|
+
"report",
|
|
38
|
+
"viewer",
|
|
39
|
+
"web-component",
|
|
40
|
+
"zentto",
|
|
41
|
+
"pdf"
|
|
42
|
+
]
|
|
43
|
+
}
|