stimulsoft-reports-js-angular 2025.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/designer.js ADDED
@@ -0,0 +1,147 @@
1
+ import * as i0 from "@angular/core";
2
+ import { EventEmitter } from "@angular/core";
3
+
4
+ import { } from "./stimulsoft.reports.engine.mjs";
5
+ import { } from "./stimulsoft.reports.chart.mjs";
6
+ import { } from "./stimulsoft.reports.export.mjs";
7
+ import { } from "./stimulsoft.reports.import.xlsx.mjs";
8
+ import { } from "./stimulsoft.reports.maps.mjs";
9
+ import { } from "./stimulsoft.viewer.mjs";
10
+ import { } from "./stimulsoft.designer.mjs";
11
+ import { Stimulsoft } from "./stimulsoft.blockly.editor.mjs";
12
+ export { Stimulsoft }
13
+
14
+ export class Designer {
15
+ #designer;
16
+ #parentRef;
17
+
18
+ #createDesigner() {
19
+ this.#designer = new Stimulsoft.Designer.StiDesigner(this.options, this.id, false);
20
+ this.#designer.renderHtml(this.#parentRef.nativeElement);
21
+ this.#bindEvents();
22
+
23
+ this.#designer.visible = this.visible;
24
+ }
25
+
26
+ #bindEvents() {
27
+ if (this.#designer) {
28
+ this.#designer.onPrepareVariables = (args) => this.onPrepareVariables.emit(args);
29
+ this.#designer.onBeginProcessData = (args) => this.onBeginProcessData.emit(args);
30
+ this.#designer.onEndProcessData = (args) => this.onEndProcessData.emit(args);
31
+ this.#designer.onCreateReport = (args) => this.onCreateReport.emit(args);
32
+ this.#designer.onCloseReport = (args) => this.onCloseReport.emit(args);
33
+ this.#designer.onOpenReport = (args) => {
34
+ args.preventDefault = false;
35
+ this.onOpenReport.emit(args);
36
+ }
37
+ this.#designer.onOpenedReport = (args) => this.onOpenedReport.emit(args);
38
+ this.#designer.onSaveReport = (args) => {
39
+ args.preventDefault = false;
40
+ this.onSaveReport.emit(args);
41
+ }
42
+ this.#designer.onSaveAsReport = (args) => this.onSaveAsReport.emit(args);
43
+ this.#designer.onPreviewReport = (args) => this.onPreviewReport.emit(args);
44
+ this.#designer.onExit = (args) => this.onExit.emit(args);
45
+
46
+ this.#designer.onAssignedReport = (args) => {
47
+ this.onAssignedReport.emit(args);
48
+ this.reportChange.emit(args.report);
49
+ }
50
+ }
51
+ }
52
+ ngAfterViewInit() {
53
+ this.#createDesigner();
54
+ this.#designer.report = this.report;
55
+ }
56
+ ngOnChanges(changes) {
57
+ for (let propName in changes) {
58
+ switch (propName) {
59
+ case "options": {
60
+ if (this.#designer) {
61
+ this.#createDesigner();
62
+ this.#designer.report = this.report;
63
+ }
64
+ break;
65
+ }
66
+ case "report": {
67
+ if (this.#designer)
68
+ this.#designer.report = changes[propName].currentValue;
69
+ break;
70
+ }
71
+ case "visible": {
72
+ if (this.#designer)
73
+ this.#designer.visible = changes[propName].currentValue;
74
+ break;
75
+ }
76
+ case "id": {
77
+ if (this.#designer) {
78
+ this.#createDesigner();
79
+ this.#designer.report = this.report;
80
+ }
81
+ break;
82
+ }
83
+ }
84
+ }
85
+ }
86
+ ngOnDestroy() {
87
+ if (this.#designer != null)
88
+ this.#designer.dispose();
89
+ }
90
+
91
+ report = undefined;
92
+ reportChange = new EventEmitter();
93
+ visible = true;
94
+ options = undefined;
95
+ id = undefined;
96
+
97
+ onPrepareVariables = new EventEmitter();
98
+ onBeginProcessData = new EventEmitter();
99
+ onEndProcessData = new EventEmitter();
100
+ onCreateReport = new EventEmitter();
101
+ onCloseReport = new EventEmitter();
102
+ onOpenReport = new EventEmitter();
103
+ onOpenedReport = new EventEmitter();
104
+ onSaveReport = new EventEmitter();
105
+ onSaveAsReport = new EventEmitter();
106
+ onPreviewReport = new EventEmitter();
107
+ onExit = new EventEmitter();
108
+ onAssignedReport = new EventEmitter();
109
+
110
+ static ɵfac = i0.ɵɵngDeclareFactory({
111
+ minVersion: "12.0.0", version: "19.0.0", ngImport: i0,
112
+ type: Designer,
113
+ deps: [],
114
+ target: i0.ɵɵFactoryTarget.Component
115
+ });
116
+ static ɵcmp = i0.ɵɵngDeclareComponent({
117
+ minVersion: "12.0.0", version: "19.0.0", ngImport: i0,
118
+ type: Designer,
119
+ isStandalone: true,
120
+ selector: "sti-designer",
121
+ inputs: {
122
+ report: "report",
123
+ visible: "visible",
124
+ options: "options",
125
+ id: "id"
126
+ },
127
+ outputs: {
128
+ reportChange: "reportChange",
129
+ onPrepareVariables: "onPrepareVariables",
130
+ onBeginProcessData: "onBeginProcessData",
131
+ onEndProcessData: "onEndProcessData",
132
+ onCreateReport: "onCreateReport",
133
+ onCloseReport: "onCloseReport",
134
+ onOpenReport: "onOpenReport",
135
+ onOpenedReport: "onOpenedReport",
136
+ onSaveReport: "onSaveReport",
137
+ onSaveAsReport: "onSaveAsReport",
138
+ onPreviewReport: "onPreviewReport",
139
+ onExit: "onExit",
140
+ onAssignedReport: "onAssignedReport"
141
+ },
142
+ viewQueries: [{ propertyName: "#parentRef", first: true, predicate: ["parentRef"], descendants: true }],
143
+ usesOnChanges: true,
144
+ template: `<div #parentRef></div>`,
145
+ isInline: true
146
+ });
147
+ }
package/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import { Stimulsoft } from "./stimulsoft.reports"
2
+ export { Stimulsoft }
package/index.js ADDED
@@ -0,0 +1,6 @@
1
+ import { } from "./stimulsoft.reports.engine.mjs";
2
+ import { } from "./stimulsoft.reports.chart.mjs";
3
+ import { } from "./stimulsoft.reports.export.mjs";
4
+ import { } from "./stimulsoft.reports.import.xlsx.mjs";
5
+ import { Stimulsoft } from "./stimulsoft.reports.maps.mjs";
6
+ export { Stimulsoft };
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "stimulsoft-reports-js-angular",
3
+ "version": "2025.2.1",
4
+ "description": "Stimulsoft Reports.JS is a reporting tool for Angular",
5
+ "main": "index.js",
6
+ "types": "index.d.ts",
7
+ "type": "module",
8
+ "keywords": [
9
+ "Stimulsoft",
10
+ "Reports",
11
+ "Stimulsoft.Reports.JS",
12
+ "Reporting tool",
13
+ "Report builder",
14
+ "Report generator",
15
+ "Data visualization",
16
+ "Data analytics",
17
+ "Create reports",
18
+ "Business intelligence",
19
+ "Reporting software",
20
+ "JavaScript Report Designer",
21
+ "JavaScript Report Viewer",
22
+ "Angular reporting tool"
23
+ ],
24
+ "files": [
25
+ "THIRD-PARTY.md",
26
+ "LICENSE.md",
27
+ "package.json",
28
+ "README.md",
29
+ "*.d.ts",
30
+ "*.mjs",
31
+ "*.js"
32
+ ],
33
+ "author": {
34
+ "name": "Stimulsoft",
35
+ "url": "http://www.stimulsoft.com"
36
+ },
37
+ "homepage": "http://www.stimulsoft.com",
38
+ "license": "Closed Source",
39
+ "dependencies": {
40
+ "@angular/core": "^19.2.3"
41
+ }
42
+ }