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