@zentto/report-designer 1.6.0 → 1.6.2
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/data-panel/db-connector.d.ts.map +1 -1
- package/dist/data-panel/db-connector.js +64 -82
- package/dist/data-panel/db-connector.js.map +1 -1
- package/dist/data-panel/zentto-connector.d.ts +47 -0
- package/dist/data-panel/zentto-connector.d.ts.map +1 -0
- package/dist/data-panel/zentto-connector.js +308 -0
- package/dist/data-panel/zentto-connector.js.map +1 -0
- package/dist/zentto-report-designer.d.ts +6 -0
- package/dist/zentto-report-designer.d.ts.map +1 -1
- package/dist/zentto-report-designer.js +59 -21
- package/dist/zentto-report-designer.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,10 +4,13 @@ import './data-panel/data-source-tree.js';
|
|
|
4
4
|
import './data-panel/relation-editor.js';
|
|
5
5
|
import './data-panel/er-diagram.js';
|
|
6
6
|
import './data-panel/db-connector.js';
|
|
7
|
+
import './data-panel/zentto-connector.js';
|
|
7
8
|
import type { DataPanelProvider } from './data-panel/data-source-tree.js';
|
|
8
9
|
import type { DbConnectorProvider } from './data-panel/db-connector.js';
|
|
10
|
+
import type { ZenttoConnectorProvider } from './data-panel/zentto-connector.js';
|
|
9
11
|
export type { DataPanelProvider, DbTableInfo } from './data-panel/data-source-tree.js';
|
|
10
12
|
export type { DbConnectorProvider, DbConnectionConfig, DbColumnInfo } from './data-panel/db-connector.js';
|
|
13
|
+
export type { ZenttoConnectorProvider } from './data-panel/zentto-connector.js';
|
|
11
14
|
export declare class ZenttoReportDesigner extends LitElement {
|
|
12
15
|
/** The report layout being designed */
|
|
13
16
|
layout: ReportLayout | null;
|
|
@@ -19,6 +22,8 @@ export declare class ZenttoReportDesigner extends LitElement {
|
|
|
19
22
|
dataProvider: DataPanelProvider | null;
|
|
20
23
|
/** DB connector provider — enables native database connections in the web component */
|
|
21
24
|
dbProvider: DbConnectorProvider | null;
|
|
25
|
+
/** Zentto ERP connector provider — enables Zentto API data sources */
|
|
26
|
+
zenttoProvider: ZenttoConnectorProvider | null;
|
|
22
27
|
/** Grid snap size in layout units (mm) */
|
|
23
28
|
gridSnap: number;
|
|
24
29
|
/** Show live preview panel */
|
|
@@ -50,6 +55,7 @@ export declare class ZenttoReportDesigner extends LitElement {
|
|
|
50
55
|
private _editingRelation;
|
|
51
56
|
private _erOverlayOpen;
|
|
52
57
|
private _dbConnectorOpen;
|
|
58
|
+
private _zenttoConnectorOpen;
|
|
53
59
|
private _undoStack;
|
|
54
60
|
private _redoStack;
|
|
55
61
|
private _editingReportName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zentto-report-designer.d.ts","sourceRoot":"","sources":["../src/zentto-report-designer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAsB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAE1E,OAAO,KAAK,EACV,YAAY,EAKZ,aAAa,EACb,OAAO,EAIR,MAAM,qBAAqB,CAAC;AAM7B,OAAO,kCAAkC,CAAC;AAC1C,OAAO,iCAAiC,CAAC;AACzC,OAAO,4BAA4B,CAAC;AACpC,OAAO,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAe,MAAM,kCAAkC,CAAC;AACvF,OAAO,KAAK,EAAE,mBAAmB,EAAoE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"zentto-report-designer.d.ts","sourceRoot":"","sources":["../src/zentto-report-designer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAsB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAE1E,OAAO,KAAK,EACV,YAAY,EAKZ,aAAa,EACb,OAAO,EAIR,MAAM,qBAAqB,CAAC;AAM7B,OAAO,kCAAkC,CAAC;AAC1C,OAAO,iCAAiC,CAAC;AACzC,OAAO,4BAA4B,CAAC;AACpC,OAAO,8BAA8B,CAAC;AACtC,OAAO,kCAAkC,CAAC;AA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AO,CAAC,kBAAkB;IAe1B,OAAO,CAAC,sBAAsB;IA8I9B,OAAO,CAAC,eAAe;IAkCvB,OAAO,CAAC,mBAAmB;IA2F3B,OAAO,CAAC,uBAAuB;IAS/B,OAAO,CAAC,eAAe;IAmBvB,OAAO,CAAC,aAAa;IAKrB,OAAO,CAAC,WAAW;IAwCnB,OAAO,CAAC,gBAAgB;IA0ExB,OAAO,CAAC,iBAAiB;IAqDzB,OAAO,CAAC,cAAc;IAkBtB,OAAO,CAAC,gBAAgB;IAkExB,OAAO,CAAC,eAAe;IAavB,OAAO,CAAC,gBAAgB;IAgCxB,OAAO,CAAC,mBAAmB;IAqB3B,OAAO,CAAC,aAAa;IAgCrB,OAAO,CAAC,mBAAmB;IAU3B,OAAO,CAAC,eAAe;IAgBvB,OAAO,CAAC,WAAW;IAqDnB,kEAAkE;IAClE,OAAO,CAAC,aAAa;IAWrB,8DAA8D;IAC9D,OAAO,CAAC,WAAW;IAyBnB,kEAAkE;IAClE,OAAO,CAAC,cAAc;IAgBtB,OAAO,CAAC,oBAAoB;IAiG5B,OAAO,CAAC,kBAAkB;IAuE1B,OAAO,CAAC,sBAAsB;IA2hB9B,OAAO,CAAC,kBAAkB;CAkB3B;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,wBAAwB,EAAE,oBAAoB,CAAC;KAChD;CACF;AAED,OAAO,EAAE,oBAAoB,IAAI,OAAO,EAAE,CAAC"}
|
|
@@ -8,11 +8,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
import { LitElement, html, css, nothing } from 'lit';
|
|
9
9
|
import { customElement, property, state } from 'lit/decorators.js';
|
|
10
10
|
import { createBlankLayout, toPx, PAGE_SIZES, mergeStyles, styleToCss } from '@zentto/report-core';
|
|
11
|
-
// Data panel components (tree, relation editor, ER diagram, DB connector)
|
|
11
|
+
// Data panel components (tree, relation editor, ER diagram, DB connector, Zentto connector)
|
|
12
12
|
import './data-panel/data-source-tree.js';
|
|
13
13
|
import './data-panel/relation-editor.js';
|
|
14
14
|
import './data-panel/er-diagram.js';
|
|
15
15
|
import './data-panel/db-connector.js';
|
|
16
|
+
import './data-panel/zentto-connector.js';
|
|
16
17
|
const BAND_LABELS = {
|
|
17
18
|
reportHeader: 'Report Header',
|
|
18
19
|
pageHeader: 'Page Header',
|
|
@@ -92,6 +93,8 @@ let ZenttoReportDesigner = class ZenttoReportDesigner extends LitElement {
|
|
|
92
93
|
this.dataProvider = null;
|
|
93
94
|
/** DB connector provider — enables native database connections in the web component */
|
|
94
95
|
this.dbProvider = null;
|
|
96
|
+
/** Zentto ERP connector provider — enables Zentto API data sources */
|
|
97
|
+
this.zenttoProvider = null;
|
|
95
98
|
/** Grid snap size in layout units (mm) */
|
|
96
99
|
this.gridSnap = 1;
|
|
97
100
|
/** Show live preview panel */
|
|
@@ -122,6 +125,7 @@ let ZenttoReportDesigner = class ZenttoReportDesigner extends LitElement {
|
|
|
122
125
|
this._editingRelation = null;
|
|
123
126
|
this._erOverlayOpen = false;
|
|
124
127
|
this._dbConnectorOpen = false;
|
|
128
|
+
this._zenttoConnectorOpen = false;
|
|
125
129
|
this._undoStack = [];
|
|
126
130
|
this._redoStack = [];
|
|
127
131
|
this._editingReportName = false;
|
|
@@ -2976,21 +2980,55 @@ REGLAS:
|
|
|
2976
2980
|
}
|
|
2977
2981
|
// ─── Data Panel (Tree + Actions) ─────────────────────────────
|
|
2978
2982
|
_renderDataPanel() {
|
|
2983
|
+
// When DB connector is open, show it inline replacing the tree
|
|
2984
|
+
if (this._dbConnectorOpen) {
|
|
2985
|
+
return html `
|
|
2986
|
+
<zrd-db-connector
|
|
2987
|
+
.open=${true}
|
|
2988
|
+
.provider=${this.dbProvider}
|
|
2989
|
+
@datasources-ready=${(e) => this._onDatasourcesReady(e.detail)}
|
|
2990
|
+
@connector-close=${() => { this._dbConnectorOpen = false; }}
|
|
2991
|
+
></zrd-db-connector>
|
|
2992
|
+
${this._renderOverlays()}
|
|
2993
|
+
`;
|
|
2994
|
+
}
|
|
2995
|
+
// When Zentto connector is open, show it inline replacing the tree
|
|
2996
|
+
if (this._zenttoConnectorOpen) {
|
|
2997
|
+
return html `
|
|
2998
|
+
<zrd-zentto-connector
|
|
2999
|
+
.open=${true}
|
|
3000
|
+
.provider=${this.zenttoProvider}
|
|
3001
|
+
@datasources-ready=${(e) => this._onDatasourcesReady(e.detail)}
|
|
3002
|
+
@connector-close=${() => { this._zenttoConnectorOpen = false; }}
|
|
3003
|
+
></zrd-zentto-connector>
|
|
3004
|
+
${this._renderOverlays()}
|
|
3005
|
+
`;
|
|
3006
|
+
}
|
|
3007
|
+
// Action buttons bar
|
|
3008
|
+
const hasActions = this.dbProvider || this.zenttoProvider || this._layout.dataSources.length > 0;
|
|
2979
3009
|
return html `
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
3010
|
+
${hasActions ? html `
|
|
3011
|
+
<div style="padding:6px 8px;display:flex;gap:4px;border-bottom:1px solid var(--zrd-border,#e0e0e0);flex-shrink:0;flex-wrap:wrap;">
|
|
3012
|
+
${this.dbProvider ? html `
|
|
3013
|
+
<button style="flex:1;padding:5px 6px;border:1px solid var(--zrd-border,#ddd);border-radius:4px;cursor:pointer;font-size:10px;font-weight:600;background:var(--zrd-input-bg,#fff);color:var(--zrd-primary,#1976d2);min-width:70px;"
|
|
3014
|
+
@click=${() => { this._dbConnectorOpen = true; }}>
|
|
3015
|
+
\u{1F5C4} DB
|
|
3016
|
+
</button>
|
|
3017
|
+
` : nothing}
|
|
3018
|
+
${this.zenttoProvider ? html `
|
|
3019
|
+
<button style="flex:1;padding:5px 6px;border:1px solid var(--zrd-border,#ddd);border-radius:4px;cursor:pointer;font-size:10px;font-weight:600;background:var(--zrd-input-bg,#fff);color:#e65100;min-width:70px;"
|
|
3020
|
+
@click=${() => { this._zenttoConnectorOpen = true; }}>
|
|
3021
|
+
\u{1F310} Zentto
|
|
3022
|
+
</button>
|
|
3023
|
+
` : nothing}
|
|
3024
|
+
${this._layout.dataSources.length > 0 ? html `
|
|
3025
|
+
<button style="flex:1;padding:5px 6px;border:1px solid var(--zrd-border,#ddd);border-radius:4px;cursor:pointer;font-size:10px;font-weight:600;background:var(--zrd-input-bg,#fff);color:var(--zrd-text,#555);min-width:70px;"
|
|
3026
|
+
@click=${() => { this._erOverlayOpen = true; }}>
|
|
3027
|
+
\u{1F4CA} ER
|
|
3028
|
+
</button>
|
|
3029
|
+
` : nothing}
|
|
3030
|
+
</div>
|
|
3031
|
+
` : nothing}
|
|
2994
3032
|
<zrd-data-source-tree
|
|
2995
3033
|
.dataSources=${this._layout.dataSources}
|
|
2996
3034
|
.relations=${this._layout.relations || []}
|
|
@@ -3012,12 +3050,6 @@ REGLAS:
|
|
|
3012
3050
|
@relation-save=${(e) => this._onRelationSave(e.detail.relation)}
|
|
3013
3051
|
@relation-cancel=${() => { this._relationEditorOpen = false; this._editingRelation = null; }}
|
|
3014
3052
|
></zrd-relation-editor>
|
|
3015
|
-
<zrd-db-connector
|
|
3016
|
-
.open=${this._dbConnectorOpen}
|
|
3017
|
-
.provider=${this.dbProvider}
|
|
3018
|
-
@datasources-ready=${(e) => this._onDatasourcesReady(e.detail)}
|
|
3019
|
-
@connector-close=${() => { this._dbConnectorOpen = false; }}
|
|
3020
|
-
></zrd-db-connector>
|
|
3021
3053
|
`;
|
|
3022
3054
|
}
|
|
3023
3055
|
_renderErOverlay() {
|
|
@@ -3974,6 +4006,9 @@ __decorate([
|
|
|
3974
4006
|
__decorate([
|
|
3975
4007
|
property({ attribute: false })
|
|
3976
4008
|
], ZenttoReportDesigner.prototype, "dbProvider", void 0);
|
|
4009
|
+
__decorate([
|
|
4010
|
+
property({ attribute: false })
|
|
4011
|
+
], ZenttoReportDesigner.prototype, "zenttoProvider", void 0);
|
|
3977
4012
|
__decorate([
|
|
3978
4013
|
property({ type: Number, attribute: 'grid-snap' })
|
|
3979
4014
|
], ZenttoReportDesigner.prototype, "gridSnap", void 0);
|
|
@@ -4034,6 +4069,9 @@ __decorate([
|
|
|
4034
4069
|
__decorate([
|
|
4035
4070
|
state()
|
|
4036
4071
|
], ZenttoReportDesigner.prototype, "_dbConnectorOpen", void 0);
|
|
4072
|
+
__decorate([
|
|
4073
|
+
state()
|
|
4074
|
+
], ZenttoReportDesigner.prototype, "_zenttoConnectorOpen", void 0);
|
|
4037
4075
|
__decorate([
|
|
4038
4076
|
state()
|
|
4039
4077
|
], ZenttoReportDesigner.prototype, "_undoStack", void 0);
|