ngx-emfular-tool 1.0.0 → 1.1.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/README.md +68 -38
- package/fesm2022/ngx-emfular-tool.mjs +72 -29
- package/fesm2022/ngx-emfular-tool.mjs.map +1 -1
- package/lib/alerting/alert/alert.component.d.ts +3 -3
- package/lib/alerting/alert.service.d.ts +3 -4
- package/lib/modal/modal-instance.d.ts +6 -0
- package/lib/modal/modal-ref.d.ts +8 -0
- package/lib/modal/modal.service.d.ts +11 -0
- package/package.json +2 -3
- package/public-api.d.ts +3 -0
package/README.md
CHANGED
|
@@ -1,63 +1,93 @@
|
|
|
1
|
-
#
|
|
1
|
+
# EMFular-Tool
|
|
2
2
|
|
|
3
|
-
This project
|
|
3
|
+
This project supplies model-agnostic Angular utilities for building EMFular editors.
|
|
4
|
+
In the EMFular megamodel, Tool is the layer for editor functionality that is not part of the model semantics of `EMFular-Core` and not part of the SVG rendering contracts of `EMFular-Diagram`.
|
|
5
|
+
It provides browser-side facilities for history, file input/output, export, input normalization, and alert dialogs.
|
|
4
6
|
|
|
5
|
-
##
|
|
7
|
+
## Concepts
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
The EMFular megamodel identifies three Tool concepts: ***Graphical-File Management***, ***JSON-History Management***, and ***JSON-File Management***.
|
|
10
|
+
They map to the code as follows.
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
### Graphical-File Management
|
|
13
|
+
|
|
14
|
+
Graphical-file management is implemented by the SVG export part of `IoService`.
|
|
15
|
+
It receives an `SVGElement`, removes Angular runtime artifacts from a cloned SVG, serializes the SVG, and saves it either as SVG directly or as PNG/JPEG through an intermediate canvas.
|
|
16
|
+
|
|
17
|
+
Code sections:
|
|
12
18
|
|
|
13
|
-
|
|
19
|
+
- `projects/tool/src/lib/io/io.service.ts`: `cleanCopySVGAsBlob`, `saveSVG`, `saveSvgAsPng`, `saveSvgAsJpeg`
|
|
20
|
+
- `projects/tool/src/lib/io/io.service.ts`: private conversion helpers `convertSvgBlobToPngOrJpegAndDownload`, `loadImgToCanvas`, `canvasToPng`, `canvasToJpeg`
|
|
14
21
|
|
|
15
|
-
```
|
|
16
|
-
|
|
22
|
+
```ts
|
|
23
|
+
export class IoService {
|
|
24
|
+
cleanCopySVGAsBlob(svg: SVGElement): Blob;
|
|
25
|
+
saveSVG(svgContent: SVGElement, title: string): void;
|
|
26
|
+
saveSvgAsPng(svgContent: SVGElement, title: string): void;
|
|
27
|
+
saveSvgAsJpeg(svgContent: SVGElement, title: string): void;
|
|
28
|
+
}
|
|
17
29
|
```
|
|
18
30
|
|
|
19
|
-
|
|
31
|
+
### JSON-History Management
|
|
20
32
|
|
|
21
|
-
|
|
33
|
+
JSON-history management is implemented by `HistoryService<T>`.
|
|
34
|
+
The service is generic, but in an EMFular editor it is normally instantiated as `HistoryService<JsonOf<M>>`, so each history entry is the JSON representation of a model state.
|
|
35
|
+
The states are stored in a circular `localStorage` buffer and exposed through `state$` for undo, redo, and session recovery.
|
|
22
36
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
37
|
+
Code sections:
|
|
38
|
+
|
|
39
|
+
- `projects/tool/src/lib/history/history.service.ts`: circular history buffer, `state$`, `save`, `undo`, `redo`, `clearHistory`
|
|
26
40
|
|
|
27
|
-
|
|
41
|
+
```ts
|
|
42
|
+
export class HistoryService<T> {
|
|
43
|
+
state$: Observable<T | null>;
|
|
28
44
|
|
|
29
|
-
|
|
45
|
+
constructor(prefix?: string, bufferSize?: number, platformId?: Object);
|
|
30
46
|
|
|
31
|
-
|
|
47
|
+
clearHistory(): void;
|
|
48
|
+
save(elem: T): void;
|
|
49
|
+
undo(): T | null;
|
|
50
|
+
redo(): T | null;
|
|
51
|
+
isUndoNotPossible(): boolean;
|
|
52
|
+
isRedoNotPossible(): boolean;
|
|
53
|
+
}
|
|
54
|
+
```
|
|
32
55
|
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
cd dist/tool
|
|
36
|
-
```
|
|
56
|
+
### JSON-File Management
|
|
37
57
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
npm publish
|
|
41
|
-
```
|
|
58
|
+
JSON-file management is split between Tool and Integration.
|
|
59
|
+
Tool provides the browser file primitives in `IoService`: reading a selected file as text and saving a JSON string as a `.json` download.
|
|
42
60
|
|
|
43
|
-
|
|
61
|
+
Code sections:
|
|
44
62
|
|
|
45
|
-
|
|
63
|
+
- `projects/tool/src/lib/io/io.service.ts`: `loadStringFromFile`, `saveJson`, `saveFile`
|
|
46
64
|
|
|
47
|
-
```
|
|
48
|
-
|
|
65
|
+
```ts
|
|
66
|
+
export class IoService {
|
|
67
|
+
loadStringFromFile(event: Event): Promise<string>;
|
|
68
|
+
saveFile(contentBlob: Blob, fileName: string): void;
|
|
69
|
+
saveJson(json: string, title: string): void;
|
|
70
|
+
}
|
|
49
71
|
```
|
|
50
72
|
|
|
51
|
-
|
|
73
|
+
### Additional Tool Helpers
|
|
52
74
|
|
|
53
|
-
|
|
75
|
+
The package also exports small helper APIs that are not separate Tool concepts in the megamodel:
|
|
54
76
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
77
|
+
- `InputHandler` normalizes browser input events, especially numeric input and repeated file selections.
|
|
78
|
+
- `AlertService` and `AlertComponent` provide a minimal CDK-based alerting via pop-ups.
|
|
79
|
+
|
|
80
|
+
## Support
|
|
81
|
+
|
|
82
|
+
Support is currently offered by the main developer, Susanne Göbel under goebel@uni-koblenz.de.
|
|
83
|
+
|
|
84
|
+
## Contributing
|
|
58
85
|
|
|
59
|
-
|
|
86
|
+
We are open to contributors. Maybe you would like to write your bachelor's or master's thesis on EMFular? Read our [arXiv-paper](https://arxiv.org/abs/2606.11442) and get in touch with Susanne Göbel goebel@uni-koblenz.de.
|
|
60
87
|
|
|
61
|
-
##
|
|
88
|
+
## License
|
|
62
89
|
|
|
63
|
-
|
|
90
|
+
EMFular-diagram is subject to (C) 2026, SoftLang Research Team, University of Koblenz, Faculty of CS, contact Susanne Göbel or Ralf Lämmel.
|
|
91
|
+
It is provided under the ***CC BY 4.0 license***.
|
|
92
|
+
Basically, you are free to share and adapt the material as long as you give proper credit to us and our project.
|
|
93
|
+
Feel free to include EMFular into your research but please cite us.
|
|
@@ -1,10 +1,51 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BehaviorSubject } from 'rxjs';
|
|
1
|
+
import { Subject, BehaviorSubject } from 'rxjs';
|
|
3
2
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Inject, PLATFORM_ID, Component
|
|
3
|
+
import { Injectable, Inject, PLATFORM_ID, Component } from '@angular/core';
|
|
4
|
+
import { ComponentPortal } from '@angular/cdk/portal';
|
|
5
|
+
import * as i1 from '@angular/cdk/overlay';
|
|
6
|
+
import { __decorate, __param } from 'tslib';
|
|
5
7
|
import { isPlatformBrowser } from '@angular/common';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
|
|
9
|
+
class ModalRef {
|
|
10
|
+
overlayRef;
|
|
11
|
+
closedSubject = new Subject();
|
|
12
|
+
closed = this.closedSubject.asObservable();
|
|
13
|
+
constructor(overlayRef) {
|
|
14
|
+
this.overlayRef = overlayRef;
|
|
15
|
+
}
|
|
16
|
+
close(result) {
|
|
17
|
+
if (!this.overlayRef.hasAttached()) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
this.overlayRef.dispose();
|
|
21
|
+
this.closedSubject.next(result);
|
|
22
|
+
this.closedSubject.complete();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
class ModalService {
|
|
27
|
+
overlay;
|
|
28
|
+
constructor(overlay) {
|
|
29
|
+
this.overlay = overlay;
|
|
30
|
+
}
|
|
31
|
+
createModal(component, config) {
|
|
32
|
+
const overlayRef = this.overlay.create(config);
|
|
33
|
+
const ref = new ModalRef(overlayRef);
|
|
34
|
+
overlayRef.backdropClick().subscribe(() => {
|
|
35
|
+
ref.close();
|
|
36
|
+
});
|
|
37
|
+
const componentRef = overlayRef.attach(new ComponentPortal(component));
|
|
38
|
+
return { ref, componentRef };
|
|
39
|
+
}
|
|
40
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: ModalService, deps: [{ token: i1.Overlay }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
41
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: ModalService, providedIn: 'root' });
|
|
42
|
+
}
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: ModalService, decorators: [{
|
|
44
|
+
type: Injectable,
|
|
45
|
+
args: [{
|
|
46
|
+
providedIn: 'root'
|
|
47
|
+
}]
|
|
48
|
+
}], ctorParameters: () => [{ type: i1.Overlay }] });
|
|
8
49
|
|
|
9
50
|
let HistoryService = class HistoryService {
|
|
10
51
|
// history in a circular buffer
|
|
@@ -155,36 +196,38 @@ HistoryService = __decorate([
|
|
|
155
196
|
], HistoryService);
|
|
156
197
|
|
|
157
198
|
class AlertComponent {
|
|
158
|
-
|
|
199
|
+
overlayRef;
|
|
159
200
|
message;
|
|
160
|
-
constructor(
|
|
161
|
-
this.
|
|
201
|
+
constructor(overlayRef) {
|
|
202
|
+
this.overlayRef = overlayRef;
|
|
162
203
|
}
|
|
163
204
|
closeMe() {
|
|
164
|
-
this.
|
|
205
|
+
this.overlayRef.dispose();
|
|
165
206
|
}
|
|
166
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AlertComponent, deps: [{ token: i1.
|
|
167
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: AlertComponent, isStandalone: true, selector: "alert-component", ngImport: i0, template: "<div style=\"text-align: center\">\n <h3>Warning</h3>\n <p>{{message}}</p>\n <button class=\"tool-button-text\" (click)=\"closeMe()\">\n
|
|
207
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AlertComponent, deps: [{ token: i1.OverlayRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
208
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: AlertComponent, isStandalone: true, selector: "alert-component", ngImport: i0, template: "<div style=\"text-align: center\">\n <h3>Warning</h3>\n <p>{{message}}</p>\n <button class=\"tool-button-text\" (click)=\"closeMe()\">\n Ok\n </button>\n</div>\n", styles: [".tool-button-text{margin:1rem;text-align:center;vertical-align:middle;color:orange;height:3rem;width:6rem;background:#fff;border:2px solid orange;border-radius:4px}.tool-button-text:hover{box-shadow:0 12px 16px #0000003d,0 17px 50px #00000030}\n"] });
|
|
168
209
|
}
|
|
169
210
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AlertComponent, decorators: [{
|
|
170
211
|
type: Component,
|
|
171
|
-
args: [{ selector: 'alert-component', imports: [
|
|
172
|
-
|
|
173
|
-
], template: "<div style=\"text-align: center\">\n <h3>Warning</h3>\n <p>{{message}}</p>\n <button class=\"tool-button-text\" (click)=\"closeMe()\">\n <mat-icon aria-hidden=\"false\" fontIcon=\"check\"></mat-icon>\n Ok\n </button>\n</div>\n", styles: [".tool-button-text{margin:1rem;text-align:center;vertical-align:middle;color:orange;height:3rem;width:6rem;background:#fff;border:2px solid orange;border-radius:4px}.tool-button-text:hover{box-shadow:0 12px 16px #0000003d,0 17px 50px #00000030}\n"] }]
|
|
174
|
-
}], ctorParameters: () => [{ type: i1.MatDialogRef }] });
|
|
212
|
+
args: [{ selector: 'alert-component', imports: [], template: "<div style=\"text-align: center\">\n <h3>Warning</h3>\n <p>{{message}}</p>\n <button class=\"tool-button-text\" (click)=\"closeMe()\">\n Ok\n </button>\n</div>\n", styles: [".tool-button-text{margin:1rem;text-align:center;vertical-align:middle;color:orange;height:3rem;width:6rem;background:#fff;border:2px solid orange;border-radius:4px}.tool-button-text:hover{box-shadow:0 12px 16px #0000003d,0 17px 50px #00000030}\n"] }]
|
|
213
|
+
}], ctorParameters: () => [{ type: i1.OverlayRef }] });
|
|
175
214
|
|
|
176
215
|
class AlertService {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
this.dialog = dialog;
|
|
181
|
-
AlertService.instance = this;
|
|
216
|
+
modalService;
|
|
217
|
+
constructor(modalService) {
|
|
218
|
+
this.modalService = modalService;
|
|
182
219
|
}
|
|
183
220
|
alert(msg) {
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
221
|
+
const modalInstance = this.modalService.createModal(AlertComponent, {
|
|
222
|
+
width: '20%',
|
|
223
|
+
height: '30%',
|
|
224
|
+
hasBackdrop: true,
|
|
225
|
+
backdropClass: 'cdk-overlay-dark-backdrop',
|
|
226
|
+
panelClass: 'alert-overlay'
|
|
227
|
+
});
|
|
228
|
+
modalInstance.componentRef.instance.message = msg;
|
|
229
|
+
}
|
|
230
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AlertService, deps: [{ token: ModalService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
188
231
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AlertService, providedIn: 'root' });
|
|
189
232
|
}
|
|
190
233
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AlertService, decorators: [{
|
|
@@ -192,7 +235,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
192
235
|
args: [{
|
|
193
236
|
providedIn: 'root'
|
|
194
237
|
}]
|
|
195
|
-
}], ctorParameters: () => [{ type:
|
|
238
|
+
}], ctorParameters: () => [{ type: ModalService }] });
|
|
196
239
|
|
|
197
240
|
class InputHandler {
|
|
198
241
|
//helps with converting an event from a number input (!) into a number...
|
|
@@ -203,7 +246,7 @@ class InputHandler {
|
|
|
203
246
|
}
|
|
204
247
|
// this needs to be called on all input elements to allow them to accept the same value twice
|
|
205
248
|
static clearElem(event) {
|
|
206
|
-
|
|
249
|
+
const target = event.target;
|
|
207
250
|
target.value = '';
|
|
208
251
|
}
|
|
209
252
|
}
|
|
@@ -243,11 +286,11 @@ class IoService {
|
|
|
243
286
|
}
|
|
244
287
|
saveSvgAsPng(svgContent, title) {
|
|
245
288
|
const contentBlob = this.cleanCopySVGAsBlob(svgContent);
|
|
246
|
-
this.convertSvgBlobToPngOrJpegAndDownload(contentBlob, title, true);
|
|
289
|
+
this.convertSvgBlobToPngOrJpegAndDownload(contentBlob, title + '.png', true);
|
|
247
290
|
}
|
|
248
291
|
saveSvgAsJpeg(svgContent, title) {
|
|
249
292
|
const contentBlob = this.cleanCopySVGAsBlob(svgContent);
|
|
250
|
-
this.convertSvgBlobToPngOrJpegAndDownload(contentBlob, title, false);
|
|
293
|
+
this.convertSvgBlobToPngOrJpegAndDownload(contentBlob, title + '.jpeg', false);
|
|
251
294
|
}
|
|
252
295
|
convertSvgBlobToPngOrJpegAndDownload(svgBlob, title, usePng) {
|
|
253
296
|
const reader = new FileReader();
|
|
@@ -329,5 +372,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
329
372
|
* Generated bundle index. Do not edit.
|
|
330
373
|
*/
|
|
331
374
|
|
|
332
|
-
export { AlertComponent, AlertService, HistoryService, InputHandler, IoService };
|
|
375
|
+
export { AlertComponent, AlertService, HistoryService, InputHandler, IoService, ModalRef, ModalService };
|
|
333
376
|
//# sourceMappingURL=ngx-emfular-tool.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-emfular-tool.mjs","sources":["../../src/lib/history/history.service.ts","../../src/lib/alerting/alert/alert.component.ts","../../src/lib/alerting/alert/alert.component.html","../../src/lib/alerting/alert.service.ts","../../src/lib/io/input-handler.ts","../../src/lib/io/io.service.ts","../../src/public-api.ts","../../src/ngx-emfular-tool.ts"],"sourcesContent":["import {BehaviorSubject} from \"rxjs\";\nimport {Inject, PLATFORM_ID} from \"@angular/core\";\nimport { isPlatformBrowser } from \"@angular/common\";\n\nexport class HistoryService<T> {\n\n // history in a circular buffer\n //bufferSize entries: entries are 0 to bufferSize-1, -1 is not defined\n\n private readonly prefix: string;\n private readonly bufferSize: number;\n readonly oldestEntryName: string;\n readonly newestEntryName: string;\n readonly currentEntryName: string;\n private oldestEntry: number = -1;\n private newestEntry: number = -1;\n private currentEntry: number = -1;\n\n private stateSubject = new BehaviorSubject<T | null>(null);\n state$ = this.stateSubject.asObservable();\n\n constructor(\n prefix: string = 'history_',\n bufferSize: number = 50,\n @Inject(PLATFORM_ID) platformId: Object\n ) {\n this.prefix = prefix;\n this.oldestEntryName = prefix + 'oldestEntry';\n this.newestEntryName = prefix + 'newestEntry';\n this.currentEntryName = prefix + 'currentEntry';\n this.bufferSize = bufferSize;\n if (isPlatformBrowser(platformId)) {\n this.init()\n }\n }\n\n init() {\n this.oldestEntry = this.readNumber(this.oldestEntryName)\n this.newestEntry = this.readNumber(this.newestEntryName)\n this.currentEntry = this.readNumber(this.currentEntryName)\n if (this.oldestEntry == -1 || this.newestEntry == -1 || this.currentEntry == -1) {\n this.clearHistory()\n } else {\n let entry = this.loadFromStorage(this.currentEntry)\n this.stateSubject.next(entry)\n }\n }\n\n clearHistory() {\n this.oldestEntry = -1;\n this.newestEntry = -1;\n this.currentEntry = -1;\n this.saveNumber(this.oldestEntryName, this.oldestEntry)\n this.saveNumber(this.newestEntryName, this.newestEntry)\n this.saveNumber(this.currentEntryName, this.currentEntry)\n for (let i = 1; i < this.bufferSize; i++) {\n this.deleteEntry(i);\n }\n }\n\n save(elem: T) {\n // needs to invalidate any element between the newest Entry and the current Entry, then save new Entry\n this.invalidateTooYoungEntries()\n // also remove one oldest entry if you need to make space\n let next = this.incrementNumber(this.currentEntry)\n\n if (next == this.oldestEntry || this.oldestEntry == -1) {\n this.invalidateOldestEntry()\n }\n this.newestEntry = next\n this.currentEntry = next\n this.saveNumber(this.newestEntryName, this.newestEntry)\n this.saveNumber(this.currentEntryName, this.currentEntry)\n this.saveToStorage(next, elem)\n }\n\n undo(): T | null {\n if (this.currentEntry == this.oldestEntry) { //current Entry is oldest, no decrement possible\n console.error(\"Cannot undo - already reached oldest entry\")\n return null\n } else {\n this.currentEntry = this.decrementNumber(this.currentEntry)\n this.saveNumber(this.currentEntryName, this.currentEntry)\n let entry = this.loadFromStorage(this.currentEntry)\n this.stateSubject.next(entry)\n return entry\n }\n }\n\n isUndoNotPossible(): boolean {\n return (this.currentEntry == this.oldestEntry)\n }\n\n redo(): T | null {\n if (this.currentEntry == this.newestEntry) {\n console.error(\"Cannot redo - already reached newest entry\")\n return null\n } else {\n this.currentEntry = this.incrementNumber(this.currentEntry)\n this.saveNumber(this.currentEntryName, this.currentEntry)\n let entry = this.loadFromStorage(this.currentEntry)\n this.stateSubject.next(entry)\n return entry\n }\n }\n\n isRedoNotPossible(): boolean {\n return (this.currentEntry == this.newestEntry)\n }\n\n private loadFromStorage(index: number): T | null {\n let itemString = localStorage.getItem(this.prefix + index)\n if (itemString == null) {\n return null\n } else {\n return JSON.parse(itemString)\n }\n }\n\n private saveToStorage(index: number, elem: T): void {\n localStorage.setItem(this.prefix + index, JSON.stringify(elem))\n }\n\n private deleteEntry(index: number): void {\n localStorage.removeItem(this.prefix + index)\n }\n\n private invalidateTooYoungEntries(): void {\n while (this.newestEntry != this.currentEntry) {\n this.deleteEntry(this.newestEntry);\n this.newestEntry = this.decrementNumber(this.newestEntry)\n }\n this.saveNumber(this.newestEntryName, this.newestEntry)\n }\n\n private invalidateOldestEntry(): void {\n this.deleteEntry(this.oldestEntry)\n this.oldestEntry = this.incrementNumber(this.oldestEntry)\n this.saveNumber(this.oldestEntryName, this.oldestEntry)\n }\n\n private readNumber(name: string): number {\n let maybeN = localStorage.getItem(name)\n if (maybeN) {\n return parseInt(maybeN, 10)\n } else {\n return -1\n }\n }\n\n private saveNumber(name: string, num: number): void {\n localStorage.setItem(name, num.toString(10))\n }\n\n private decrementNumber(num: number): number {\n if (num === 0) return this.bufferSize-1\n else return num-1\n }\n\n private incrementNumber(num: number): number {\n if (num === this.bufferSize-1) return 0\n else return num+1\n }\n}\n","import { Component } from '@angular/core';\nimport {MatDialogRef} from \"@angular/material/dialog\";\nimport {MatIcon} from \"@angular/material/icon\";\n\n@Component({\n selector: 'alert-component',\n imports: [\n MatIcon,\n ],\n templateUrl: './alert.component.html',\n styleUrl: './alert.component.css'\n})\nexport class AlertComponent {\n\n public message!: string;\n\n constructor(\n public dialogRef: MatDialogRef<AlertComponent>\n ) {}\n\n closeMe(): void {\n this.dialogRef.close();\n }\n}\n","<div style=\"text-align: center\">\n <h3>Warning</h3>\n <p>{{message}}</p>\n <button class=\"tool-button-text\" (click)=\"closeMe()\">\n <mat-icon aria-hidden=\"false\" fontIcon=\"check\"></mat-icon>\n Ok\n </button>\n</div>\n","import { Injectable } from '@angular/core';\nimport {MatDialog} from \"@angular/material/dialog\";\nimport {AlertComponent} from \"./alert/alert.component\";\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AlertService {\n\n static instance: AlertService;\n constructor(\n private dialog: MatDialog,\n ) {\n AlertService.instance = this;\n }\n\n\n alert(msg: string) {\n const dialogRef = this.dialog.open(\n AlertComponent,\n {width: '20%', height: '30%'}\n )\n dialogRef.componentInstance.message = msg;\n }\n}\n","export class InputHandler {\n\n //helps with converting an event from a number input (!) into a number...\n // should be called on (input) while (ngModelChange) delivers the value immediately on $event\n static getNewValueFromEvent($event: Event): number {\n const input = $event.target as HTMLInputElement;\n return Number(input.value);\n }\n\n // this needs to be called on all input elements to allow them to accept the same value twice\n static clearElem(event: Event) {\n let target = event.target as HTMLInputElement;\n target.value = ''\n }\n}\n","import {Injectable} from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class IoService {\n\n constructor() { }\n\n async loadStringFromFile(event: Event): Promise<string> {\n const target = event.target as HTMLInputElement;\n const files = target.files as FileList;\n return files[0].text();\n }\n\n saveFile(contentBlob: Blob, fileName: string) {\n const link = document.createElement('a')\n link.style.display = 'none'\n // Attach the content to the anchor\n link.href = URL.createObjectURL(contentBlob);\n link.download = fileName;\n // Append to DOM and simulate click (this will trigger the download)\n document.body.appendChild(link);\n link.click();\n // Cleanup\n document.body.removeChild(link);\n }\n\n saveJson(json: string, title: string) {\n const contentBlob = new Blob([json], {type: 'application/json'});\n this.saveFile(contentBlob, title+'.json');\n }\n\n cleanCopySVGAsBlob(svg: SVGElement): Blob {\n const clonedSvg = svg.cloneNode(true) as SVGElement;\n clonedSvg.removeAttribute('ng-version'); // remove Angular artifacts\n const svgText = new XMLSerializer().serializeToString(clonedSvg);\n return new Blob([svgText], { type: 'image/svg+xml' });\n }\n\n saveSVG(svgContent: SVGElement, title: string) {\n const contentBlob = this.cleanCopySVGAsBlob(svgContent);\n this.saveFile(contentBlob, title+'.svg');\n }\n\n saveSvgAsPng(svgContent: SVGElement, title: string) {\n const contentBlob = this.cleanCopySVGAsBlob(svgContent);\n this.convertSvgBlobToPngOrJpegAndDownload(contentBlob, title, true);\n }\n\n saveSvgAsJpeg(svgContent: SVGElement, title: string) {\n const contentBlob = this.cleanCopySVGAsBlob(svgContent);\n this.convertSvgBlobToPngOrJpegAndDownload(contentBlob, title, false);\n }\n\n private convertSvgBlobToPngOrJpegAndDownload(svgBlob: Blob, title: string, usePng?: boolean): void {\n const reader = new FileReader();\n\n reader.onload = () => {\n const svgText = reader.result as string;\n\n const img = new Image();\n const svgBase64 = btoa(\n new TextEncoder()\n .encode(svgText)\n .reduce((data, byte) => data + String.fromCharCode(byte), '')\n )\n img.src = `data:image/svg+xml;base64,${svgBase64}`;\n\n img.onload = () => {\n this.loadImgToCanvas(img, title, usePng)\n }\n\n img.onerror = (err) => {\n console.error('Error loading SVG image:', err);\n };\n };\n\n reader.onerror = (err) => {\n console.error('Error reading SVG blob:', err);\n };\n\n reader.readAsText(svgBlob);\n }\n\n private canvasToPng(canvas: HTMLCanvasElement, fileName: string) {\n canvas.toBlob((pngBlob) => {\n if (!pngBlob) {\n console.error('Failed to convert canvas to PNG blob');\n return;\n } else {\n this.saveFile(pngBlob, fileName+'.png')\n }\n }, 'image/png');\n }\n\n private canvasToJpeg(canvas: HTMLCanvasElement, fileName: string) {\n canvas.toBlob((jpgBlob) => {\n if (!jpgBlob) {\n console.error('Failed to convert canvas to JPEG blob');\n return;\n } else {\n this.saveFile(jpgBlob, fileName+'.jpeg')\n }\n }, 'image/jpeg', 1);\n }\n\n private loadImgToCanvas(img: HTMLImageElement, fileName: string, usePng=true) {\n const canvas = document.createElement('canvas');\n canvas.width = img.width;\n canvas.height = img.height;\n\n const ctx = canvas.getContext('2d');\n if (!ctx) {\n console.error('Canvas context not available');\n return;\n }\n\n ctx.fillStyle = '#ffffff'; // white\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n ctx.drawImage(img, 0, 0);\n\n if(usePng) {\n this.canvasToPng(canvas, fileName);\n } else {\n this.canvasToJpeg(canvas, fileName);\n }\n }\n}\n","/*\n * Public API Surface of tool\n */\nexport * from './lib/history/history.service';\n\nexport * from './lib/alerting/alert.service';\nexport * from './lib/alerting/alert/alert.component';\n\nexport * from './lib/io/input-handler';\nexport * from './lib/io/io.service'","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAIO,IAAM,cAAc,GAApB,MAAM,cAAc,CAAA;;;AAKR,IAAA,MAAM;AACN,IAAA,UAAU;AAClB,IAAA,eAAe;AACf,IAAA,eAAe;AACf,IAAA,gBAAgB;IACjB,WAAW,GAAW,CAAC,CAAC;IACxB,WAAW,GAAW,CAAC,CAAC;IACxB,YAAY,GAAW,CAAC,CAAC;AAEzB,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,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM;QAE1B,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC;QACnC,IAAI,CAAC,GAAG,EAAE;AACR,YAAA,OAAO,CAAC,KAAK,CAAC,8BAA8B,CAAC;YAC7C;QACF;AAEA,QAAA,GAAG,CAAC,SAAS,GAAG,SAAS,CAAC;AAC1B,QAAA,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC;QAC/C,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;QAExB,IAAG,MAAM,EAAE;AACT,YAAA,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;QACpC;aAAO;AACL,YAAA,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC;QACrC;IACF;wGA1HW,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAT,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,SAAS,cAFR,MAAM,EAAA,CAAA;;4FAEP,SAAS,EAAA,UAAA,EAAA,CAAA;kBAHrB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACJD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-emfular-tool.mjs","sources":["../../src/lib/modal/modal-ref.ts","../../src/lib/modal/modal.service.ts","../../src/lib/history/history.service.ts","../../src/lib/alerting/alert/alert.component.ts","../../src/lib/alerting/alert/alert.component.html","../../src/lib/alerting/alert.service.ts","../../src/lib/io/input-handler.ts","../../src/lib/io/io.service.ts","../../src/public-api.ts","../../src/ngx-emfular-tool.ts"],"sourcesContent":["import {Subject} from 'rxjs';\nimport {OverlayRef} from \"@angular/cdk/overlay\";\n\nexport class ModalRef<R = void> {\n\n private readonly closedSubject = new Subject<R | undefined>();\n\n readonly closed = this.closedSubject.asObservable();\n\n constructor(\n private readonly overlayRef: OverlayRef\n ) {}\n\n close(result?: R): void {\n if (!this.overlayRef.hasAttached()) {\n return;\n }\n\n this.overlayRef.dispose();\n this.closedSubject.next(result);\n this.closedSubject.complete();\n }\n}","import {Injectable} from \"@angular/core\";\nimport {Overlay, OverlayConfig} from \"@angular/cdk/overlay\";\nimport {ComponentPortal, ComponentType} from \"@angular/cdk/portal\";\nimport {ModalRef} from \"./modal-ref\";\nimport {ModalInstance} from \"./modal-instance\";\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ModalService {\n\n constructor(\n private readonly overlay: Overlay,\n ) {}\n\n createModal<T, R = void>(\n component: ComponentType<T>,\n config: OverlayConfig\n ): ModalInstance<T, R> {\n const overlayRef = this.overlay.create(config);\n const ref = new ModalRef<R>(overlayRef);\n overlayRef.backdropClick().subscribe(() => {\n ref.close();\n });\n\n const componentRef = overlayRef.attach(\n new ComponentPortal(component)\n );\n return { ref, componentRef };\n }\n}","import {BehaviorSubject} from \"rxjs\";\nimport {Inject, PLATFORM_ID} from \"@angular/core\";\nimport { isPlatformBrowser } from \"@angular/common\";\n\nexport class HistoryService<T> {\n\n // history in a circular buffer\n //bufferSize entries: entries are 0 to bufferSize-1, -1 is not defined\n\n private readonly prefix: string;\n private readonly bufferSize: number;\n readonly oldestEntryName: string;\n readonly newestEntryName: string;\n readonly currentEntryName: string;\n private oldestEntry: number = -1;\n private newestEntry: number = -1;\n private currentEntry: number = -1;\n\n private stateSubject = new BehaviorSubject<T | null>(null);\n state$ = this.stateSubject.asObservable();\n\n constructor(\n prefix: string = 'history_',\n bufferSize: number = 50,\n @Inject(PLATFORM_ID) platformId: Object\n ) {\n this.prefix = prefix;\n this.oldestEntryName = prefix + 'oldestEntry';\n this.newestEntryName = prefix + 'newestEntry';\n this.currentEntryName = prefix + 'currentEntry';\n this.bufferSize = bufferSize;\n if (isPlatformBrowser(platformId)) {\n this.init()\n }\n }\n\n init() {\n this.oldestEntry = this.readNumber(this.oldestEntryName)\n this.newestEntry = this.readNumber(this.newestEntryName)\n this.currentEntry = this.readNumber(this.currentEntryName)\n if (this.oldestEntry == -1 || this.newestEntry == -1 || this.currentEntry == -1) {\n this.clearHistory()\n } else {\n let entry = this.loadFromStorage(this.currentEntry)\n this.stateSubject.next(entry)\n }\n }\n\n clearHistory() {\n this.oldestEntry = -1;\n this.newestEntry = -1;\n this.currentEntry = -1;\n this.saveNumber(this.oldestEntryName, this.oldestEntry)\n this.saveNumber(this.newestEntryName, this.newestEntry)\n this.saveNumber(this.currentEntryName, this.currentEntry)\n for (let i = 1; i < this.bufferSize; i++) {\n this.deleteEntry(i);\n }\n }\n\n save(elem: T) {\n // needs to invalidate any element between the newest Entry and the current Entry, then save new Entry\n this.invalidateTooYoungEntries()\n // also remove one oldest entry if you need to make space\n let next = this.incrementNumber(this.currentEntry)\n\n if (next == this.oldestEntry || this.oldestEntry == -1) {\n this.invalidateOldestEntry()\n }\n this.newestEntry = next\n this.currentEntry = next\n this.saveNumber(this.newestEntryName, this.newestEntry)\n this.saveNumber(this.currentEntryName, this.currentEntry)\n this.saveToStorage(next, elem)\n }\n\n undo(): T | null {\n if (this.currentEntry == this.oldestEntry) { //current Entry is oldest, no decrement possible\n console.error(\"Cannot undo - already reached oldest entry\")\n return null\n } else {\n this.currentEntry = this.decrementNumber(this.currentEntry)\n this.saveNumber(this.currentEntryName, this.currentEntry)\n let entry = this.loadFromStorage(this.currentEntry)\n this.stateSubject.next(entry)\n return entry\n }\n }\n\n isUndoNotPossible(): boolean {\n return (this.currentEntry == this.oldestEntry)\n }\n\n redo(): T | null {\n if (this.currentEntry == this.newestEntry) {\n console.error(\"Cannot redo - already reached newest entry\")\n return null\n } else {\n this.currentEntry = this.incrementNumber(this.currentEntry)\n this.saveNumber(this.currentEntryName, this.currentEntry)\n let entry = this.loadFromStorage(this.currentEntry)\n this.stateSubject.next(entry)\n return entry\n }\n }\n\n isRedoNotPossible(): boolean {\n return (this.currentEntry == this.newestEntry)\n }\n\n private loadFromStorage(index: number): T | null {\n let itemString = localStorage.getItem(this.prefix + index)\n if (itemString == null) {\n return null\n } else {\n return JSON.parse(itemString)\n }\n }\n\n private saveToStorage(index: number, elem: T): void {\n localStorage.setItem(this.prefix + index, JSON.stringify(elem))\n }\n\n private deleteEntry(index: number): void {\n localStorage.removeItem(this.prefix + index)\n }\n\n private invalidateTooYoungEntries(): void {\n while (this.newestEntry != this.currentEntry) {\n this.deleteEntry(this.newestEntry);\n this.newestEntry = this.decrementNumber(this.newestEntry)\n }\n this.saveNumber(this.newestEntryName, this.newestEntry)\n }\n\n private invalidateOldestEntry(): void {\n this.deleteEntry(this.oldestEntry)\n this.oldestEntry = this.incrementNumber(this.oldestEntry)\n this.saveNumber(this.oldestEntryName, this.oldestEntry)\n }\n\n private readNumber(name: string): number {\n let maybeN = localStorage.getItem(name)\n if (maybeN) {\n return parseInt(maybeN, 10)\n } else {\n return -1\n }\n }\n\n private saveNumber(name: string, num: number): void {\n localStorage.setItem(name, num.toString(10))\n }\n\n private decrementNumber(num: number): number {\n if (num === 0) return this.bufferSize-1\n else return num-1\n }\n\n private incrementNumber(num: number): number {\n if (num === this.bufferSize-1) return 0\n else return num+1\n }\n}\n","import { Component } from '@angular/core';\nimport {OverlayRef} from \"@angular/cdk/overlay\";\n\n@Component({\n selector: 'alert-component',\n imports: [],\n templateUrl: './alert.component.html',\n styleUrl: './alert.component.css'\n})\nexport class AlertComponent {\n\n public message!: string;\n\n constructor(\n private readonly overlayRef: OverlayRef\n ) {}\n\n closeMe(): void {\n this.overlayRef.dispose();\n }\n}\n","<div style=\"text-align: center\">\n <h3>Warning</h3>\n <p>{{message}}</p>\n <button class=\"tool-button-text\" (click)=\"closeMe()\">\n Ok\n </button>\n</div>\n","import { Injectable } from '@angular/core';\nimport {AlertComponent} from \"./alert/alert.component\";\nimport {ModalService} from \"../modal/modal.service\";\nimport {ModalInstance} from \"../modal/modal-instance\";\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AlertService {\n\n constructor(\n private readonly modalService: ModalService\n ) {}\n\n alert(msg: string): void {\n const modalInstance: ModalInstance<AlertComponent, void> = this.modalService.createModal<AlertComponent, void>(\n AlertComponent,\n {\n width: '20%',\n height: '30%',\n hasBackdrop: true,\n backdropClass: 'cdk-overlay-dark-backdrop',\n panelClass: 'alert-overlay'\n }\n );\n modalInstance.componentRef.instance.message = msg;\n }\n}\n","export class InputHandler {\n\n //helps with converting an event from a number input (!) into a number...\n // should be called on (input) while (ngModelChange) delivers the value immediately on $event\n static getNewValueFromEvent($event: Event): number {\n const input = $event.target as HTMLInputElement;\n return Number(input.value);\n }\n\n // this needs to be called on all input elements to allow them to accept the same value twice\n static clearElem(event: Event) {\n const target = event.target as HTMLInputElement;\n target.value = ''\n }\n}\n","import {Injectable} from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class IoService {\n\n constructor() { }\n\n async loadStringFromFile(event: Event): Promise<string> {\n const target = event.target as HTMLInputElement;\n const files = target.files as FileList;\n return files[0].text();\n }\n\n saveFile(contentBlob: Blob, fileName: string) {\n const link = document.createElement('a')\n link.style.display = 'none'\n // Attach the content to the anchor\n link.href = URL.createObjectURL(contentBlob);\n link.download = fileName;\n // Append to DOM and simulate click (this will trigger the download)\n document.body.appendChild(link);\n link.click();\n // Cleanup\n document.body.removeChild(link);\n }\n\n saveJson(json: string, title: string) {\n const contentBlob = new Blob([json], {type: 'application/json'});\n this.saveFile(contentBlob, title+'.json');\n }\n\n cleanCopySVGAsBlob(svg: SVGElement): Blob {\n const clonedSvg = svg.cloneNode(true) as SVGElement;\n clonedSvg.removeAttribute('ng-version'); // remove Angular artifacts\n const svgText = new XMLSerializer().serializeToString(clonedSvg);\n return new Blob([svgText], { type: 'image/svg+xml' });\n }\n\n saveSVG(svgContent: SVGElement, title: string) {\n const contentBlob = this.cleanCopySVGAsBlob(svgContent);\n this.saveFile(contentBlob, title+'.svg');\n }\n\n saveSvgAsPng(svgContent: SVGElement, title: string) {\n const contentBlob = this.cleanCopySVGAsBlob(svgContent);\n this.convertSvgBlobToPngOrJpegAndDownload(contentBlob, title+'.png', true);\n }\n\n saveSvgAsJpeg(svgContent: SVGElement, title: string) {\n const contentBlob = this.cleanCopySVGAsBlob(svgContent);\n this.convertSvgBlobToPngOrJpegAndDownload(contentBlob, title+'.jpeg', false);\n }\n\n private convertSvgBlobToPngOrJpegAndDownload(svgBlob: Blob, title: string, usePng?: boolean): void {\n const reader = new FileReader();\n\n reader.onload = () => {\n const svgText = reader.result as string;\n\n const img = new Image();\n const svgBase64 = btoa(\n new TextEncoder()\n .encode(svgText)\n .reduce((data, byte) => data + String.fromCharCode(byte), '')\n )\n img.src = `data:image/svg+xml;base64,${svgBase64}`;\n\n img.onload = () => {\n this.loadImgToCanvas(img, title, usePng)\n }\n\n img.onerror = (err) => {\n console.error('Error loading SVG image:', err);\n };\n };\n\n reader.onerror = (err) => {\n console.error('Error reading SVG blob:', err);\n };\n\n reader.readAsText(svgBlob);\n }\n\n private canvasToPng(canvas: HTMLCanvasElement, fileName: string) {\n canvas.toBlob((pngBlob) => {\n if (!pngBlob) {\n console.error('Failed to convert canvas to PNG blob');\n return;\n } else {\n this.saveFile(pngBlob, fileName+'.png')\n }\n }, 'image/png');\n }\n\n private canvasToJpeg(canvas: HTMLCanvasElement, fileName: string) {\n canvas.toBlob((jpgBlob) => {\n if (!jpgBlob) {\n console.error('Failed to convert canvas to JPEG blob');\n return;\n } else {\n this.saveFile(jpgBlob, fileName+'.jpeg')\n }\n }, 'image/jpeg', 1);\n }\n\n private loadImgToCanvas(img: HTMLImageElement, fileName: string, usePng=true) {\n const canvas = document.createElement('canvas');\n canvas.width = img.width;\n canvas.height = img.height;\n\n const ctx = canvas.getContext('2d');\n if (!ctx) {\n console.error('Canvas context not available');\n return;\n }\n\n ctx.fillStyle = '#ffffff'; // white\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n ctx.drawImage(img, 0, 0);\n\n if(usePng) {\n this.canvasToPng(canvas, fileName);\n } else {\n this.canvasToJpeg(canvas, fileName);\n }\n }\n}\n","/*\n * Public API Surface of tool\n */\nexport * from './lib/modal/modal-ref';\nexport type {ModalInstance} from './lib/modal/modal-instance';\nexport * from './lib/modal/modal.service';\n\nexport * from './lib/history/history.service';\n\nexport * from './lib/alerting/alert.service';\nexport * from './lib/alerting/alert/alert.component';\n\nexport * from './lib/io/input-handler';\nexport * from './lib/io/io.service'","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.ModalService"],"mappings":";;;;;;;;MAGa,QAAQ,CAAA;AAOI,IAAA,UAAA;AALJ,IAAA,aAAa,GAAG,IAAI,OAAO,EAAiB;AAEpD,IAAA,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE;AAEnD,IAAA,WAAA,CACqB,UAAsB,EAAA;QAAtB,IAAA,CAAA,UAAU,GAAV,UAAU;IAC5B;AAEH,IAAA,KAAK,CAAC,MAAU,EAAA;QACZ,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,EAAE;YAChC;QACJ;AAEA,QAAA,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE;AACzB,QAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC;AAC/B,QAAA,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE;IACjC;AACH;;MCbY,YAAY,CAAA;AAGA,IAAA,OAAA;AADrB,IAAA,WAAA,CACqB,OAAgB,EAAA;QAAhB,IAAA,CAAA,OAAO,GAAP,OAAO;IACzB;IAEH,WAAW,CACP,SAA2B,EAC3B,MAAqB,EAAA;QAErB,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,MA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CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;QAExB,IAAG,MAAM,EAAE;AACT,YAAA,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;QACpC;aAAO;AACL,YAAA,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC;QACrC;IACF;wGA1HW,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAT,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,SAAS,cAFR,MAAM,EAAA,CAAA;;4FAEP,SAAS,EAAA,UAAA,EAAA,CAAA;kBAHrB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACJD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OverlayRef } from "@angular/cdk/overlay";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class AlertComponent {
|
|
4
|
-
|
|
4
|
+
private readonly overlayRef;
|
|
5
5
|
message: string;
|
|
6
|
-
constructor(
|
|
6
|
+
constructor(overlayRef: OverlayRef);
|
|
7
7
|
closeMe(): void;
|
|
8
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<AlertComponent, never>;
|
|
9
9
|
static ɵcmp: i0.ɵɵComponentDeclaration<AlertComponent, "alert-component", never, {}, {}, never, never, true, never>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModalService } from "../modal/modal.service";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class AlertService {
|
|
4
|
-
private
|
|
5
|
-
|
|
6
|
-
constructor(dialog: MatDialog);
|
|
4
|
+
private readonly modalService;
|
|
5
|
+
constructor(modalService: ModalService);
|
|
7
6
|
alert(msg: string): void;
|
|
8
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<AlertService, never>;
|
|
9
8
|
static ɵprov: i0.ɵɵInjectableDeclaration<AlertService>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { OverlayRef } from "@angular/cdk/overlay";
|
|
2
|
+
export declare class ModalRef<R = void> {
|
|
3
|
+
private readonly overlayRef;
|
|
4
|
+
private readonly closedSubject;
|
|
5
|
+
readonly closed: import("rxjs").Observable<R>;
|
|
6
|
+
constructor(overlayRef: OverlayRef);
|
|
7
|
+
close(result?: R): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Overlay, OverlayConfig } from "@angular/cdk/overlay";
|
|
2
|
+
import { ComponentType } from "@angular/cdk/portal";
|
|
3
|
+
import { ModalInstance } from "./modal-instance";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class ModalService {
|
|
6
|
+
private readonly overlay;
|
|
7
|
+
constructor(overlay: Overlay);
|
|
8
|
+
createModal<T, R = void>(component: ComponentType<T>, config: OverlayConfig): ModalInstance<T, R>;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ModalService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ModalService>;
|
|
11
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-emfular-tool",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Small Angular library with helper schematics for EMFular, currently alerting, history, and io facilities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"EMFular",
|
|
@@ -21,8 +21,7 @@
|
|
|
21
21
|
"@angular/common": "^19.2.7",
|
|
22
22
|
"@angular/core": "^19.2.7",
|
|
23
23
|
"@angular/forms": "^19.2.7",
|
|
24
|
-
"@types/uuid": "^10.0.0"
|
|
25
|
-
"@angular/material": "^19.2.7"
|
|
24
|
+
"@types/uuid": "^10.0.0"
|
|
26
25
|
},
|
|
27
26
|
"dependencies": {
|
|
28
27
|
"tslib": "^2.3.0"
|
package/public-api.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export * from './lib/modal/modal-ref';
|
|
2
|
+
export type { ModalInstance } from './lib/modal/modal-instance';
|
|
3
|
+
export * from './lib/modal/modal.service';
|
|
1
4
|
export * from './lib/history/history.service';
|
|
2
5
|
export * from './lib/alerting/alert.service';
|
|
3
6
|
export * from './lib/alerting/alert/alert.component';
|