ngx-emfular-integration 0.2.0 → 0.3.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.
@@ -208,23 +208,35 @@ class ReferencableBoxComponent {
208
208
  position;
209
209
  color = "#efad78";
210
210
  chooseElement = new EventEmitter();
211
+ chooseReference = new EventEmitter();
211
212
  isExpandedArray = [];
213
+ constructor() { }
212
214
  toggleExpand(i) {
213
215
  this.isExpandedArray[i] = !this.isExpandedArray[i];
214
216
  }
217
+ createBoxInLastPart(bb) {
218
+ return {
219
+ x: bb.x + bb.w - 25,
220
+ y: bb.y + bb.h - 25,
221
+ w: 25,
222
+ h: 25
223
+ };
224
+ }
215
225
  choose(element) {
216
226
  this.chooseElement.emit(element);
217
227
  }
218
- constructor() { }
228
+ chooseRef(ref) {
229
+ this.chooseReference.emit(ref);
230
+ }
219
231
  GraphicalHelper = GraphicalHelper;
220
232
  PositionHelper = PositionHelper;
221
233
  IdHelper = IdHelper;
222
234
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ReferencableBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
223
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.4", type: ReferencableBoxComponent, isStandalone: true, selector: "[referencable-box]", inputs: { referencable: "referencable", position: "position", color: "color" }, outputs: { chooseElement: "chooseElement" }, ngImport: i0, template: "<svg:g [attr.id]=\"referencable.$gId\">\n\n <g rectangle-with-text\n (click)=\"choose(referencable)\"\n [id]=\"referencable.$gId + '_main'\"\n [text]=\"IdHelper.getLabel(referencable)\"\n [position]=\"position\"\n [color]=\"color\"\n >\n </g>\n\n <!-- containers -->\n @for (container of referencable.$treeChildren;\n track referencable.$gId + '_' + container.referenceName\n ; let i = $index) {\n\n @let containerKey = referencable.$gId + '_' + container.referenceName;\n @let containerAnchorBox = PositionHelper.computeChildBBox(\n i,\n referencable.$treeChildren.length,\n position\n );\n\n <!-- reference box -->\n <g rectangle-with-text\n (click)=\"toggleExpand(i)\"\n [id]=\"containerKey + '_ref'\"\n [text]=\"container.referenceName\"\n [position]=\"containerAnchorBox\"\n color=\"#ede679\"\n >\n </g>\n\n <!-- arrow from main box to reference -->\n <g arrowElems\n [startGID]=\"referencable.$gId\"\n startSuffix=\"_main\"\n [endGID]=\"containerKey\"\n endSuffix=\"_ref\">\n </g>\n\n @if (isExpandedArray[i]) {\n <!-- real children inside this reference -->\n @let realChildren = GraphicalHelper.getAsList(container);\n\n @for (elem of realChildren; track elem.$gId; let j = $index) {\n\n @let elemBox = PositionHelper.computeChildBBox(\n j,\n realChildren.length,\n containerAnchorBox\n );\n <g referencable-box\n (chooseElement)=\"choose($event)\"\n [referencable]=\"elem\"\n [position]=\"elemBox\"\n >\n </g>\n <!-- arrow from reference to child box -->\n <g arrowElems\n [startGID]=\"containerKey\"\n startSuffix=\"_ref\"\n [endGID]=\"elem.$gId\"\n endSuffix=\"_main\">\n </g>\n }\n\n }\n }\n</svg:g>\n", styles: [""], dependencies: [{ kind: "component", type: ReferencableBoxComponent, selector: "[referencable-box]", inputs: ["referencable", "position", "color"], outputs: ["chooseElement"] }, { kind: "component", type: RectangleWithTextComponent, selector: "[rectangle-with-text]", inputs: ["id", "text", "position", "color"], outputs: ["textChange"] }, { kind: "component", type: ArrowBetweenElemsComponent, selector: "[arrowElems]", inputs: ["startGID", "startSuffix", "endGID", "endSuffix", "arrowType", "breaks", "text", "style"] }] });
235
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.4", type: ReferencableBoxComponent, isStandalone: true, selector: "[referencable-box]", inputs: { referencable: "referencable", position: "position", color: "color" }, outputs: { chooseElement: "chooseElement", chooseReference: "chooseReference" }, ngImport: i0, template: "<svg:g [attr.id]=\"referencable.$gId\">\n\n <g rectangle-with-text\n (click)=\"choose(referencable)\"\n [id]=\"referencable.$gId + '_main'\"\n [text]=\"IdHelper.getLabel(referencable)\"\n [position]=\"position\"\n [color]=\"color\"\n >\n </g>\n\n <!-- containers -->\n @for (container of referencable.$treeChildren;\n track referencable.$gId + '_' + container.referenceName\n ; let i = $index) {\n\n @let containerKey = referencable.$gId + '_' + container.referenceName;\n @let containerAnchorBox = PositionHelper.computeChildBBox(\n i,\n referencable.$treeChildren.length,\n position\n );\n\n <!-- reference box -->\n <g rectangle-with-text\n (click)=\"chooseRef(container)\"\n [id]=\"containerKey + '_ref'\"\n [text]=\"container.referenceName\"\n [position]=\"containerAnchorBox\"\n color=\"#ede679\"\n >\n </g>\n <g rectangle-with-text\n (click)=\"toggleExpand(i)\"\n [id]=\"containerKey + '_toggle'\"\n [text]=\"isExpandedArray[i]?'\u25CA':'V'\"\n [position]=\"createBoxInLastPart(containerAnchorBox)\"\n color=\"transparent\"\n ></g>\n\n <!-- arrow from main box to reference -->\n <g arrowElems\n [startGID]=\"referencable.$gId\"\n startSuffix=\"_main\"\n [endGID]=\"containerKey\"\n endSuffix=\"_ref\">\n </g>\n\n @if (isExpandedArray[i]) {\n <!-- real children inside this reference -->\n @let realChildren = GraphicalHelper.getAsList(container);\n\n @for (elem of realChildren; track elem.$gId; let j = $index) {\n\n @let elemBox = PositionHelper.computeChildBBox(\n j,\n realChildren.length,\n containerAnchorBox\n );\n <g referencable-box\n (chooseElement)=\"choose($event)\"\n [referencable]=\"elem\"\n [position]=\"elemBox\"\n >\n </g>\n <!-- arrow from reference to child box -->\n <g arrowElems\n [startGID]=\"containerKey\"\n startSuffix=\"_ref\"\n [endGID]=\"elem.$gId\"\n endSuffix=\"_main\">\n </g>\n }\n\n }\n }\n</svg:g>\n", styles: [""], dependencies: [{ kind: "component", type: ReferencableBoxComponent, selector: "[referencable-box]", inputs: ["referencable", "position", "color"], outputs: ["chooseElement", "chooseReference"] }, { kind: "component", type: RectangleWithTextComponent, selector: "[rectangle-with-text]", inputs: ["id", "text", "position", "color"], outputs: ["textChange"] }, { kind: "component", type: ArrowBetweenElemsComponent, selector: "[arrowElems]", inputs: ["startGID", "startSuffix", "endGID", "endSuffix", "arrowType", "breaks", "text", "style"] }] });
224
236
  }
225
237
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ReferencableBoxComponent, decorators: [{
226
238
  type: Component,
227
- args: [{ selector: '[referencable-box]', imports: [RectangleWithTextComponent, ArrowBetweenElemsComponent], template: "<svg:g [attr.id]=\"referencable.$gId\">\n\n <g rectangle-with-text\n (click)=\"choose(referencable)\"\n [id]=\"referencable.$gId + '_main'\"\n [text]=\"IdHelper.getLabel(referencable)\"\n [position]=\"position\"\n [color]=\"color\"\n >\n </g>\n\n <!-- containers -->\n @for (container of referencable.$treeChildren;\n track referencable.$gId + '_' + container.referenceName\n ; let i = $index) {\n\n @let containerKey = referencable.$gId + '_' + container.referenceName;\n @let containerAnchorBox = PositionHelper.computeChildBBox(\n i,\n referencable.$treeChildren.length,\n position\n );\n\n <!-- reference box -->\n <g rectangle-with-text\n (click)=\"toggleExpand(i)\"\n [id]=\"containerKey + '_ref'\"\n [text]=\"container.referenceName\"\n [position]=\"containerAnchorBox\"\n color=\"#ede679\"\n >\n </g>\n\n <!-- arrow from main box to reference -->\n <g arrowElems\n [startGID]=\"referencable.$gId\"\n startSuffix=\"_main\"\n [endGID]=\"containerKey\"\n endSuffix=\"_ref\">\n </g>\n\n @if (isExpandedArray[i]) {\n <!-- real children inside this reference -->\n @let realChildren = GraphicalHelper.getAsList(container);\n\n @for (elem of realChildren; track elem.$gId; let j = $index) {\n\n @let elemBox = PositionHelper.computeChildBBox(\n j,\n realChildren.length,\n containerAnchorBox\n );\n <g referencable-box\n (chooseElement)=\"choose($event)\"\n [referencable]=\"elem\"\n [position]=\"elemBox\"\n >\n </g>\n <!-- arrow from reference to child box -->\n <g arrowElems\n [startGID]=\"containerKey\"\n startSuffix=\"_ref\"\n [endGID]=\"elem.$gId\"\n endSuffix=\"_main\">\n </g>\n }\n\n }\n }\n</svg:g>\n" }]
239
+ args: [{ selector: '[referencable-box]', imports: [RectangleWithTextComponent, ArrowBetweenElemsComponent], template: "<svg:g [attr.id]=\"referencable.$gId\">\n\n <g rectangle-with-text\n (click)=\"choose(referencable)\"\n [id]=\"referencable.$gId + '_main'\"\n [text]=\"IdHelper.getLabel(referencable)\"\n [position]=\"position\"\n [color]=\"color\"\n >\n </g>\n\n <!-- containers -->\n @for (container of referencable.$treeChildren;\n track referencable.$gId + '_' + container.referenceName\n ; let i = $index) {\n\n @let containerKey = referencable.$gId + '_' + container.referenceName;\n @let containerAnchorBox = PositionHelper.computeChildBBox(\n i,\n referencable.$treeChildren.length,\n position\n );\n\n <!-- reference box -->\n <g rectangle-with-text\n (click)=\"chooseRef(container)\"\n [id]=\"containerKey + '_ref'\"\n [text]=\"container.referenceName\"\n [position]=\"containerAnchorBox\"\n color=\"#ede679\"\n >\n </g>\n <g rectangle-with-text\n (click)=\"toggleExpand(i)\"\n [id]=\"containerKey + '_toggle'\"\n [text]=\"isExpandedArray[i]?'\u25CA':'V'\"\n [position]=\"createBoxInLastPart(containerAnchorBox)\"\n color=\"transparent\"\n ></g>\n\n <!-- arrow from main box to reference -->\n <g arrowElems\n [startGID]=\"referencable.$gId\"\n startSuffix=\"_main\"\n [endGID]=\"containerKey\"\n endSuffix=\"_ref\">\n </g>\n\n @if (isExpandedArray[i]) {\n <!-- real children inside this reference -->\n @let realChildren = GraphicalHelper.getAsList(container);\n\n @for (elem of realChildren; track elem.$gId; let j = $index) {\n\n @let elemBox = PositionHelper.computeChildBBox(\n j,\n realChildren.length,\n containerAnchorBox\n );\n <g referencable-box\n (chooseElement)=\"choose($event)\"\n [referencable]=\"elem\"\n [position]=\"elemBox\"\n >\n </g>\n <!-- arrow from reference to child box -->\n <g arrowElems\n [startGID]=\"containerKey\"\n startSuffix=\"_ref\"\n [endGID]=\"elem.$gId\"\n endSuffix=\"_main\">\n </g>\n }\n\n }\n }\n</svg:g>\n" }]
228
240
  }], ctorParameters: () => [], propDecorators: { referencable: [{
229
241
  type: Input
230
242
  }], position: [{
@@ -233,6 +245,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImpor
233
245
  type: Input
234
246
  }], chooseElement: [{
235
247
  type: Output
248
+ }], chooseReference: [{
249
+ type: Output
236
250
  }] } });
237
251
 
238
252
  class ModelCanvasComponent {
@@ -241,6 +255,7 @@ class ModelCanvasComponent {
241
255
  initialBBox = { x: this.svgwidth / 2, y: 20, w: 200, h: 25 };
242
256
  modelService;
243
257
  chooseElement = new EventEmitter();
258
+ chooseReference = new EventEmitter();
244
259
  svgReady = new EventEmitter();
245
260
  svg;
246
261
  ngOnInit() {
@@ -250,18 +265,23 @@ class ModelCanvasComponent {
250
265
  choose(element) {
251
266
  this.chooseElement.emit(element);
252
267
  }
268
+ chooseRef(reference) {
269
+ this.chooseReference.emit(reference);
270
+ }
253
271
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ModelCanvasComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
254
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.4", type: ModelCanvasComponent, isStandalone: true, selector: "model-canvas", inputs: { modelService: "modelService" }, outputs: { chooseElement: "chooseElement", svgReady: "svgReady" }, viewQueries: [{ propertyName: "svg", first: true, predicate: ["svg"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"modeling-container\">\n <svg #svg id=\"svg\" class=\"canvas-svg\" [attr.width]=\"svgwidth\" [attr.height]=\"svgheigth\">\n <g referencable-box\n [referencable]=\"modelService.model\"\n [position]=\"initialBBox\"\n (chooseElement)=\"choose($event)\"\n >\n </g>\n </svg>\n</div>\n", styles: [".modeling-container{flex:1 1 auto;overflow:auto;background:#fff}.canvas-svg{display:block}\n"], dependencies: [{ kind: "component", type: ReferencableBoxComponent, selector: "[referencable-box]", inputs: ["referencable", "position", "color"], outputs: ["chooseElement"] }] });
272
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.4", type: ModelCanvasComponent, isStandalone: true, selector: "model-canvas", inputs: { modelService: "modelService" }, outputs: { chooseElement: "chooseElement", chooseReference: "chooseReference", svgReady: "svgReady" }, viewQueries: [{ propertyName: "svg", first: true, predicate: ["svg"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"modeling-container\">\n <svg #svg id=\"svg\" class=\"canvas-svg\" [attr.width]=\"svgwidth\" [attr.height]=\"svgheigth\">\n <g referencable-box\n [referencable]=\"modelService.model\"\n [position]=\"initialBBox\"\n (chooseElement)=\"choose($event)\"\n (chooseReference)=\"chooseRef($event)\"\n >\n </g>\n </svg>\n</div>\n", styles: [".modeling-container{flex:1 1 auto;overflow:auto;background:#fff}.canvas-svg{display:block}\n"], dependencies: [{ kind: "component", type: ReferencableBoxComponent, selector: "[referencable-box]", inputs: ["referencable", "position", "color"], outputs: ["chooseElement", "chooseReference"] }] });
255
273
  }
256
274
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ModelCanvasComponent, decorators: [{
257
275
  type: Component,
258
276
  args: [{ selector: 'model-canvas', imports: [
259
277
  ReferencableBoxComponent
260
- ], template: "<div class=\"modeling-container\">\n <svg #svg id=\"svg\" class=\"canvas-svg\" [attr.width]=\"svgwidth\" [attr.height]=\"svgheigth\">\n <g referencable-box\n [referencable]=\"modelService.model\"\n [position]=\"initialBBox\"\n (chooseElement)=\"choose($event)\"\n >\n </g>\n </svg>\n</div>\n", styles: [".modeling-container{flex:1 1 auto;overflow:auto;background:#fff}.canvas-svg{display:block}\n"] }]
278
+ ], template: "<div class=\"modeling-container\">\n <svg #svg id=\"svg\" class=\"canvas-svg\" [attr.width]=\"svgwidth\" [attr.height]=\"svgheigth\">\n <g referencable-box\n [referencable]=\"modelService.model\"\n [position]=\"initialBBox\"\n (chooseElement)=\"choose($event)\"\n (chooseReference)=\"chooseRef($event)\"\n >\n </g>\n </svg>\n</div>\n", styles: [".modeling-container{flex:1 1 auto;overflow:auto;background:#fff}.canvas-svg{display:block}\n"] }]
261
279
  }], propDecorators: { modelService: [{
262
280
  type: Input
263
281
  }], chooseElement: [{
264
282
  type: Output
283
+ }], chooseReference: [{
284
+ type: Output
265
285
  }], svgReady: [{
266
286
  type: Output
267
287
  }], svg: [{
@@ -339,8 +359,25 @@ class ModelDetailsComponent {
339
359
  getChildren() {
340
360
  return this.model.$treeChildren;
341
361
  }
362
+ chooseParent() {
363
+ this.detailsService
364
+ .openParentChoice(this.modelService)
365
+ .subscribe(chosen => {
366
+ if (!chosen)
367
+ return; // user cancelled
368
+ // todo what about type mismatches? and user should actually pick the container, not the parent
369
+ let oldParent = this.model.parent;
370
+ if (chosen == oldParent)
371
+ return;
372
+ this.model.setParent(chosen);
373
+ if (this.model.parent && this.model.parent != oldParent) { //todo should we catch wrong undefined setting?
374
+ this.modelService.saveCurrentState();
375
+ }
376
+ });
377
+ }
378
+ IdHelper = IdHelper;
342
379
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ModelDetailsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
343
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.4", type: ModelDetailsComponent, isStandalone: true, selector: "lib-model-details", inputs: { model: "model", modelService: "modelService", detailsService: "detailsService" }, ngImport: i0, template: "<h1>Detail-Editor</h1>\n<h2>{{model.getEClass()}}</h2>\n<div class=\"attribute-list\">\n <div class=\"attribute-row\" *ngFor=\"let attr of attributes\">\n <label>{{ attr.key }}</label>\n <input\n type=\"text\"\n [(ngModel)]=\"$any(model)[attr.key]\"\n />\n </div>\n</div>\n<h3>References</h3>\n<div class=\"reference-list\">\n <container-details\n *ngFor=\"let container of getChildren()\"\n [container]=\"container\"\n [isTree]=\"true\"\n [modelService]=\"modelService\"\n [detailsService]=\"detailsService\"\n >\n </container-details>\n <container-details\n *ngFor=\"let container of getLinks()\"\n [container]=\"container\"\n [isTree]=\"false\"\n [modelService]=\"modelService\"\n [detailsService]=\"detailsService\"\n >\n </container-details>\n</div>\n\n", styles: [".attribute-list{display:flex;flex-direction:column;gap:16px}.attribute-row{display:flex;flex-direction:column}.attribute-row label{font-weight:600;margin-bottom:4px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: ContainerDetailsComponent, selector: "container-details", inputs: ["container", "isTree", "modelService", "detailsService"] }] });
380
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.4", type: ModelDetailsComponent, isStandalone: true, selector: "lib-model-details", inputs: { model: "model", modelService: "modelService", detailsService: "detailsService" }, ngImport: i0, template: "<h1>Detail-Editor</h1>\n<h2>{{model.getEClass()}}</h2>\n<div class=\"parent-choice\">\n <label>Current Parent</label>\n <div class=\"ref-info\">\n <span class=\"ref-icon\">\uD83D\uDD17</span>\n <span class=\"ref-type\">{{ model.getParentReferencable().getEClass() }}</span>\n <span class=\"ref-label\">{{ IdHelper.getLabel(model.getParentReferencable()) }}</span>\n </div>\n <button (click)=\"chooseParent()\">\n Set Parent\n </button>\n</div>\n<div class=\"attribute-list\">\n <div class=\"attribute-row\" *ngFor=\"let attr of attributes\">\n <label>{{ attr.key }}</label>\n <input\n type=\"text\"\n [(ngModel)]=\"$any(model)[attr.key]\"\n />\n </div>\n</div>\n<h3>References</h3>\n<div class=\"reference-list\">\n <container-details\n *ngFor=\"let container of getChildren()\"\n [container]=\"container\"\n [isTree]=\"true\"\n [modelService]=\"modelService\"\n [detailsService]=\"detailsService\"\n >\n </container-details>\n <container-details\n *ngFor=\"let container of getLinks()\"\n [container]=\"container\"\n [isTree]=\"false\"\n [modelService]=\"modelService\"\n [detailsService]=\"detailsService\"\n >\n </container-details>\n</div>\n\n", styles: [".attribute-list{display:flex;flex-direction:column;gap:16px}.attribute-row{display:flex;flex-direction:column}.attribute-row label{font-weight:600;margin-bottom:4px}.ref-info{display:flex;align-items:center;gap:8px;min-width:0}.ref-icon{opacity:.7;font-size:14px}.ref-type{font-weight:600;font-size:13px;color:#333;white-space:nowrap}.ref-label{font-size:13px;color:#555;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: ContainerDetailsComponent, selector: "container-details", inputs: ["container", "isTree", "modelService", "detailsService"] }] });
344
381
  }
345
382
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ModelDetailsComponent, decorators: [{
346
383
  type: Component,
@@ -348,7 +385,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImpor
348
385
  FormsModule,
349
386
  NgForOf,
350
387
  ContainerDetailsComponent
351
- ], template: "<h1>Detail-Editor</h1>\n<h2>{{model.getEClass()}}</h2>\n<div class=\"attribute-list\">\n <div class=\"attribute-row\" *ngFor=\"let attr of attributes\">\n <label>{{ attr.key }}</label>\n <input\n type=\"text\"\n [(ngModel)]=\"$any(model)[attr.key]\"\n />\n </div>\n</div>\n<h3>References</h3>\n<div class=\"reference-list\">\n <container-details\n *ngFor=\"let container of getChildren()\"\n [container]=\"container\"\n [isTree]=\"true\"\n [modelService]=\"modelService\"\n [detailsService]=\"detailsService\"\n >\n </container-details>\n <container-details\n *ngFor=\"let container of getLinks()\"\n [container]=\"container\"\n [isTree]=\"false\"\n [modelService]=\"modelService\"\n [detailsService]=\"detailsService\"\n >\n </container-details>\n</div>\n\n", styles: [".attribute-list{display:flex;flex-direction:column;gap:16px}.attribute-row{display:flex;flex-direction:column}.attribute-row label{font-weight:600;margin-bottom:4px}\n"] }]
388
+ ], template: "<h1>Detail-Editor</h1>\n<h2>{{model.getEClass()}}</h2>\n<div class=\"parent-choice\">\n <label>Current Parent</label>\n <div class=\"ref-info\">\n <span class=\"ref-icon\">\uD83D\uDD17</span>\n <span class=\"ref-type\">{{ model.getParentReferencable().getEClass() }}</span>\n <span class=\"ref-label\">{{ IdHelper.getLabel(model.getParentReferencable()) }}</span>\n </div>\n <button (click)=\"chooseParent()\">\n Set Parent\n </button>\n</div>\n<div class=\"attribute-list\">\n <div class=\"attribute-row\" *ngFor=\"let attr of attributes\">\n <label>{{ attr.key }}</label>\n <input\n type=\"text\"\n [(ngModel)]=\"$any(model)[attr.key]\"\n />\n </div>\n</div>\n<h3>References</h3>\n<div class=\"reference-list\">\n <container-details\n *ngFor=\"let container of getChildren()\"\n [container]=\"container\"\n [isTree]=\"true\"\n [modelService]=\"modelService\"\n [detailsService]=\"detailsService\"\n >\n </container-details>\n <container-details\n *ngFor=\"let container of getLinks()\"\n [container]=\"container\"\n [isTree]=\"false\"\n [modelService]=\"modelService\"\n [detailsService]=\"detailsService\"\n >\n </container-details>\n</div>\n\n", styles: [".attribute-list{display:flex;flex-direction:column;gap:16px}.attribute-row{display:flex;flex-direction:column}.attribute-row label{font-weight:600;margin-bottom:4px}.ref-info{display:flex;align-items:center;gap:8px;min-width:0}.ref-icon{opacity:.7;font-size:14px}.ref-type{font-weight:600;font-size:13px;color:#333;white-space:nowrap}.ref-label{font-size:13px;color:#555;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"] }]
352
389
  }], propDecorators: { model: [{
353
390
  type: Input
354
391
  }], modelService: [{
@@ -402,6 +439,29 @@ class BasicModelDetailsService {
402
439
  });
403
440
  return subject.asObservable();
404
441
  }
442
+ openParentChoice(modelService) {
443
+ const subject = new Subject();
444
+ const overlayRef = this.overlay.create({
445
+ hasBackdrop: true,
446
+ backdropClass: 'cdk-overlay-dark-backdrop',
447
+ panelClass: 'basic-details-panel',
448
+ positionStrategy: this.overlay.position()
449
+ .global().centerHorizontally().centerVertically()
450
+ });
451
+ const portal = new ComponentPortal((ModelCanvasComponent));
452
+ const ref = overlayRef.attach(portal);
453
+ ref.instance.modelService = modelService;
454
+ ref.instance.chooseReference.subscribe(next => {
455
+ subject.next(next);
456
+ subject.complete();
457
+ overlayRef.dispose();
458
+ });
459
+ overlayRef.backdropClick().subscribe(() => {
460
+ subject.complete();
461
+ overlayRef.dispose();
462
+ });
463
+ return subject.asObservable();
464
+ }
405
465
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: BasicModelDetailsService, deps: [{ token: i1$2.Overlay }], target: i0.ɵɵFactoryTarget.Injectable });
406
466
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: BasicModelDetailsService, providedIn: 'root' });
407
467
  }
@@ -437,7 +497,7 @@ class TreeEditorComponent {
437
497
  this.effectiveDetailsService.openDetails(element, this.modelService);
438
498
  }
439
499
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: TreeEditorComponent, deps: [{ token: BasicModelDetailsService }], target: i0.ɵɵFactoryTarget.Component });
440
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.4", type: TreeEditorComponent, isStandalone: true, selector: "emfular-tree-editor", inputs: { modelService: "modelService", detailsService: "detailsService", customButtons: "customButtons" }, ngImport: i0, template: "<div class=\"tree-editor\" id=\"tree-editor\">\n <emfular-file-level-bar\n [svg]=\"svgElement\"\n [modelService]=\"modelService\">\n </emfular-file-level-bar>\n <div class=\"editor-main\">\n <!-- vertical model bar -->\n <emfular-model-editing-bar\n class=\"model-bar\"\n [buttons]=\"sidebarButtons\">\n </emfular-model-editing-bar>\n\n\n <model-canvas\n [modelService]=\"modelService\"\n (svgReady)=\"onSvgReady($event)\"\n (chooseElement)=\"choose($event)\"\n >\n </model-canvas>\n </div>\n</div>\n\n", styles: [".tree-editor{display:flex;flex-direction:column;width:100%;height:100%}emfular-file-level-bar{flex:0 0 auto}.editor-main{flex:1 1 auto;display:flex;overflow:hidden}.model-bar{flex:0 0 60px;background:#f5f5f5;border-right:1px solid #ccc;display:flex;flex-direction:column}\n"], dependencies: [{ kind: "component", type: FileLevelBarComponent, selector: "emfular-file-level-bar", inputs: ["svg", "modelService"] }, { kind: "component", type: ModelEditingBarComponent, selector: "emfular-model-editing-bar", inputs: ["buttons"] }, { kind: "component", type: ModelCanvasComponent, selector: "model-canvas", inputs: ["modelService"], outputs: ["chooseElement", "svgReady"] }] });
500
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.4", type: TreeEditorComponent, isStandalone: true, selector: "emfular-tree-editor", inputs: { modelService: "modelService", detailsService: "detailsService", customButtons: "customButtons" }, ngImport: i0, template: "<div class=\"tree-editor\" id=\"tree-editor\">\n <emfular-file-level-bar\n [svg]=\"svgElement\"\n [modelService]=\"modelService\">\n </emfular-file-level-bar>\n <div class=\"editor-main\">\n <!-- vertical model bar -->\n <emfular-model-editing-bar\n class=\"model-bar\"\n [buttons]=\"sidebarButtons\">\n </emfular-model-editing-bar>\n\n\n <model-canvas\n [modelService]=\"modelService\"\n (svgReady)=\"onSvgReady($event)\"\n (chooseElement)=\"choose($event)\"\n >\n </model-canvas>\n </div>\n</div>\n\n", styles: [".tree-editor{display:flex;flex-direction:column;width:100%;height:100%}emfular-file-level-bar{flex:0 0 auto}.editor-main{flex:1 1 auto;display:flex;overflow:hidden}.model-bar{flex:0 0 60px;background:#f5f5f5;border-right:1px solid #ccc;display:flex;flex-direction:column}\n"], dependencies: [{ kind: "component", type: FileLevelBarComponent, selector: "emfular-file-level-bar", inputs: ["svg", "modelService"] }, { kind: "component", type: ModelEditingBarComponent, selector: "emfular-model-editing-bar", inputs: ["buttons"] }, { kind: "component", type: ModelCanvasComponent, selector: "model-canvas", inputs: ["modelService"], outputs: ["chooseElement", "chooseReference", "svgReady"] }] });
441
501
  }
442
502
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: TreeEditorComponent, decorators: [{
443
503
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-emfular-integration.mjs","sources":["../../../projects/ngx-emfular-integration/src/lib/model.service.ts","../../../projects/ngx-emfular-integration/src/lib/editor/file-level-bar/file-level-bar.component.ts","../../../projects/ngx-emfular-integration/src/lib/editor/file-level-bar/file-level-bar.component.html","../../../projects/ngx-emfular-integration/src/lib/editor/model-editing-bar/model-editing-bar.component.ts","../../../projects/ngx-emfular-integration/src/lib/editor/model-editing-bar/model-editing-bar.component.html","../../../projects/ngx-emfular-integration/src/lib/utils/graphical-helper.ts","../../../projects/ngx-emfular-integration/src/lib/utils/id-helper.ts","../../../projects/ngx-emfular-integration/src/lib/graphical/referencable-box/referencable-box.component.ts","../../../projects/ngx-emfular-integration/src/lib/graphical/referencable-box/referencable-box.component.svg","../../../projects/ngx-emfular-integration/src/lib/editor/model-canvas/model-canvas.component.ts","../../../projects/ngx-emfular-integration/src/lib/editor/model-canvas/model-canvas.component.html","../../../projects/ngx-emfular-integration/src/lib/details/container-details/container-details.component.ts","../../../projects/ngx-emfular-integration/src/lib/details/container-details/container-details.component.html","../../../projects/ngx-emfular-integration/src/lib/details/model-details/model-details.component.ts","../../../projects/ngx-emfular-integration/src/lib/details/model-details/model-details.component.html","../../../projects/ngx-emfular-integration/src/lib/details/basic-model-details.service.ts","../../../projects/ngx-emfular-integration/src/lib/editor/tree-editor/tree-editor.component.ts","../../../projects/ngx-emfular-integration/src/lib/editor/tree-editor/tree-editor.component.html","../../../projects/ngx-emfular-integration/src/lib/editor/file-level-bar-material/file-level-bar-material.component.ts","../../../projects/ngx-emfular-integration/src/lib/editor/file-level-bar-material/file-level-bar-material.component.html","../../../projects/ngx-emfular-integration/src/public-api.ts","../../../projects/ngx-emfular-integration/src/ngx-emfular-integration.ts"],"sourcesContent":["import {Inject, Injectable, InjectionToken, PLATFORM_ID} from '@angular/core';\nimport {Deserializer, JsonDeserializable, JsonOf, Referencable} from \"emfular\";\nimport {HistoryService, IoService} from \"ngx-emfular-helper\";\n\nexport const HISTORY_SERVICE = new InjectionToken<HistoryService<any>>(\n 'HistoryService'\n);\nexport function provideHistoryForModel<M>(\n prefix: string = 'history_',\n bufferSize: number = 50\n) {\n return {\n provide: HISTORY_SERVICE,\n useFactory: (platformId: Object) => new HistoryService<JsonOf<M>>(prefix, bufferSize, platformId),\n deps: [PLATFORM_ID]\n };\n}\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport abstract class ModelService<M extends Referencable<any>> {\n\n private _model!: M\n get model(): M {\n return this._model;\n }\n protected set model(model: M) {\n this._model = this.adjustModel(model);\n this.adaptToModel()\n }\n\n protected constructor(\n @Inject(HISTORY_SERVICE) readonly historyService: HistoryService<JsonOf<M>>,\n readonly ioService: IoService,\n protected readonly modelClass: JsonDeserializable<M>,\n ) {\n this._model = new modelClass() //default initialization without calling set, since adjustments might need not yet initialized properties\n queueMicrotask(() => { //necessary to avoid timing issues if adjust model or adapt to model call services or other not initialized properties of the inheriting class\n this.historyService.state$.subscribe(state => {\n if (state) {\n this.applyJson(state);\n }\n });\n })\n }\n\n //default implementation to override if you need any normalization on a model before setting it\n adjustModel(model: M): M {\n return model;\n }\n\n //default implementation to override if you need adaptation of surroundings,\n // e.g. other attributes, notifications, signals etc\n adaptToModel() {}\n\n // override by either a fixed string or sth from the current model itself\n public fileTitle(): string {\n return \"model\"\n }\n\n newModel() {\n this.model = new this.modelClass()\n this.saveCurrentState()\n }\n\n serialize(): JsonOf<M> {\n return this.model.toJson()\n }\n\n deserialize(modelJson: JsonOf<M>): M {\n let modelEClass = new this.modelClass().getEClass();\n return Deserializer.fromJSON<M>(modelJson, modelEClass);\n }\n\n saveCurrentState() {\n this.historyService.save(this.serialize())\n }\n\n protected applyJson(modelJson: JsonOf<M>): M {\n this.model = this.deserialize(modelJson);\n return this.model;\n }\n\n loadFromJson(modelJson: JsonOf<M>): void {\n this.applyJson(modelJson);\n this.saveCurrentState()\n }\n\n loadFromFile(event: Event) {\n this.ioService.loadStringFromFile(event).then(txt => {\n //todo insert detection code for wrong files (no json, not appropriately structured\n this.loadFromJson(JSON.parse(txt));\n });\n }\n\n save() {\n const jsonString = JSON.stringify(this.serialize());\n this.ioService.saveJson(jsonString, this.fileTitle())\n }\n\n}\n","import {Component, Input} from '@angular/core';\nimport {InputHandler, IoService} from \"ngx-emfular-helper\";\nimport {Referencable} from \"emfular\";\nimport {ModelService} from \"../../model.service\";\n\n@Component({\n selector: 'emfular-file-level-bar',\n imports: [],\n templateUrl: './file-level-bar.component.html',\n styleUrl: './file-level-bar.component.css'\n})\nexport class FileLevelBarComponent<M extends Referencable<any>> {\n @Input() svg!: SVGElement\n @Input() modelService!: ModelService<M>\n protected readonly InputHandler = InputHandler;\n\n constructor(public ioService: IoService) {\n }\n\n openModel() {\n document.getElementById('openModel')?.click();\n }\n\n\n saveSVG() {\n const svgContent = this.svg;\n if(svgContent) {\n this.ioService.saveSVG(svgContent, this.modelService.fileTitle())\n }\n }\n\n saveSVGasPNG() {\n const svgContent = this.svg;\n if(svgContent) {\n this.ioService.saveSvgAsPng(svgContent, this.modelService.fileTitle())\n }\n }\n\n saveSVGasJPEG() {\n const svgContent = this.svg;\n if(svgContent) {\n this.ioService.saveSvgAsJpeg(svgContent, this.modelService.fileTitle())\n }\n }\n\n\n}\n","<input id=\"openModel\" type=\"file\" class=\"file-upload\" style=\"display:none\"\n (change)=\"modelService.loadFromFile($event)\"\n (click)=\"InputHandler.clearElem($event)\">\n\n<div class=\"file-level-bar\">\n <button (click)=\"modelService.newModel()\">New</button>\n <button (click)=\"openModel()\">Open</button>\n <span class=\"separator\"></span>\n <button (click)=\"modelService.historyService.undo()\" [disabled]=\"modelService.historyService.isUndoNotPossible()\">Undo</button>\n <button (click)=\"modelService.historyService.redo()\" [disabled]=\"modelService.historyService.isRedoNotPossible()\">Redo</button>\n <span class=\"separator\"></span>\n <button (click)=\"modelService.save()\">Save</button>\n <button (click)=\"saveSVG()\">Save SVG</button>\n <button (click)=\"saveSVGasPNG()\">Save PNG</button>\n <button (click)=\"saveSVGasJPEG()\">Save JPEG</button>\n</div>\n","import {Component, Input} from '@angular/core';\nimport {NgForOf, NgIf} from \"@angular/common\";\n\n@Component({\n selector: 'emfular-model-editing-bar',\n imports: [\n NgForOf,\n NgIf\n ],\n templateUrl: './model-editing-bar.component.html',\n styleUrl: './model-editing-bar.component.css'\n})\nexport class ModelEditingBarComponent {\n @Input() buttons: Array<{\n label: string;\n icon?: string;\n action: () => void;\n }> | null = null;\n\n\n}\n","<div class=\"model-editing-bar\">\n <button *ngFor=\"let b of buttons\" (click)=\"b.action()\">\n <span *ngIf=\"b.icon\" class=\"icon\">{{ b.icon }}</span>\n {{ b.label }}\n </button>\n</div>\n","import {ReContainer, Referencable } from \"emfular\";\n\nexport class GraphicalHelper {\n\n //todo, refactor into emfular\n static getAsList<T extends Referencable<any>>(refs: ReContainer<T, any>): T[] {\n const items: T[]|T|undefined = refs.get()\n if(items) {\n if(Array.isArray(items)) {\n return items\n }\n const result: T[] = [];\n result.push(items)\n return result\n } else {\n return [];\n }\n }\n\n}\n","import {getAllAttributes, Referencable } from \"emfular\";\n\nexport class IdHelper {\n\n static getLabel(ref: Referencable<any>): string {\n // 1. If the model has a \"name\" attribute → use it\n if ((ref as any).name) {\n return `${(ref as any).name}`;\n }\n\n // 2. Otherwise: first primitive attribute\n const attrs = getAllAttributes(ref.constructor);\n for (const [key] of attrs) {\n const value = (ref as any)[key];\n if (typeof value === \"string\" || typeof value === \"number\") {\n return `${value}`;\n }\n }\n\n /*\n // 3. Otherwise: use ID (EMFular always has stable IDs)\n if ((ref as any).id) {\n return `(id=${(ref as any).id})`;\n }*/\n\n // 4. Otherwise: fallback\n return \"(unnamed)\";\n }\n\n}\n","import {Component, EventEmitter, Input, Output} from '@angular/core';\nimport {Referencable} from 'emfular';\nimport {ArrowBetweenElemsComponent, BoundingBox, RectangleWithTextComponent, PositionHelper} from 'ngx-svg-graphics';\nimport {GraphicalHelper} from \"../../utils/graphical-helper\";\nimport {IdHelper} from \"../../utils/id-helper\";\n\n@Component({\n selector: '[referencable-box]',\n imports: [RectangleWithTextComponent, ArrowBetweenElemsComponent],\n templateUrl: './referencable-box.component.svg',\n styleUrl: './referencable-box.component.css'\n})\nexport class ReferencableBoxComponent {\n @Input() referencable!: Referencable<any>;\n @Input() position!: BoundingBox\n @Input() color?: string = \"#efad78\"\n @Output() chooseElement: EventEmitter<Referencable<any>> = new EventEmitter();\n\n\n isExpandedArray: boolean[] = []\n\n toggleExpand(i: number) {\n this.isExpandedArray[i]= !this.isExpandedArray[i];\n }\n\n choose(element: Referencable<any>) {\n this.chooseElement.emit(element);\n }\n\n constructor() {}\n\n protected readonly GraphicalHelper = GraphicalHelper;\n protected readonly PositionHelper = PositionHelper\n protected readonly IdHelper = IdHelper;\n}\n","<svg:g [attr.id]=\"referencable.$gId\">\n\n <g rectangle-with-text\n (click)=\"choose(referencable)\"\n [id]=\"referencable.$gId + '_main'\"\n [text]=\"IdHelper.getLabel(referencable)\"\n [position]=\"position\"\n [color]=\"color\"\n >\n </g>\n\n <!-- containers -->\n @for (container of referencable.$treeChildren;\n track referencable.$gId + '_' + container.referenceName\n ; let i = $index) {\n\n @let containerKey = referencable.$gId + '_' + container.referenceName;\n @let containerAnchorBox = PositionHelper.computeChildBBox(\n i,\n referencable.$treeChildren.length,\n position\n );\n\n <!-- reference box -->\n <g rectangle-with-text\n (click)=\"toggleExpand(i)\"\n [id]=\"containerKey + '_ref'\"\n [text]=\"container.referenceName\"\n [position]=\"containerAnchorBox\"\n color=\"#ede679\"\n >\n </g>\n\n <!-- arrow from main box to reference -->\n <g arrowElems\n [startGID]=\"referencable.$gId\"\n startSuffix=\"_main\"\n [endGID]=\"containerKey\"\n endSuffix=\"_ref\">\n </g>\n\n @if (isExpandedArray[i]) {\n <!-- real children inside this reference -->\n @let realChildren = GraphicalHelper.getAsList(container);\n\n @for (elem of realChildren; track elem.$gId; let j = $index) {\n\n @let elemBox = PositionHelper.computeChildBBox(\n j,\n realChildren.length,\n containerAnchorBox\n );\n <g referencable-box\n (chooseElement)=\"choose($event)\"\n [referencable]=\"elem\"\n [position]=\"elemBox\"\n >\n </g>\n <!-- arrow from reference to child box -->\n <g arrowElems\n [startGID]=\"containerKey\"\n startSuffix=\"_ref\"\n [endGID]=\"elem.$gId\"\n endSuffix=\"_main\">\n </g>\n }\n\n }\n }\n</svg:g>\n","import {Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core';\nimport {ReferencableBoxComponent} from \"../../graphical/referencable-box/referencable-box.component\";\nimport {ModelService} from \"../../model.service\";\nimport { Referencable } from 'emfular';\nimport { BoundingBox } from 'ngx-svg-graphics';\n\n@Component({\n selector: 'model-canvas',\n imports: [\n ReferencableBoxComponent\n ],\n templateUrl: './model-canvas.component.html',\n styleUrl: './model-canvas.component.css'\n})\nexport class ModelCanvasComponent<M extends Referencable<any>> implements OnInit {\n svgwidth = 1500;\n svgheigth = 1000;\n initialBBox : BoundingBox = {x: this.svgwidth/2, y: 20, w: 200, h: 25}\n\n @Input() modelService!: ModelService<M>\n @Output() chooseElement: EventEmitter<Referencable<any>> = new EventEmitter();\n @Output() svgReady: EventEmitter<SVGSVGElement> = new EventEmitter<SVGSVGElement>();\n @ViewChild('svg', { static: true })\n svg!: ElementRef<SVGSVGElement>;\n\n ngOnInit() {\n // Safe because static: true\n this.svgReady.emit(this.svg.nativeElement);\n }\n\n choose(element: Referencable<any>): void {\n this.chooseElement.emit(element);\n }\n\n}\n","<div class=\"modeling-container\">\n <svg #svg id=\"svg\" class=\"canvas-svg\" [attr.width]=\"svgwidth\" [attr.height]=\"svgheigth\">\n <g referencable-box\n [referencable]=\"modelService.model\"\n [position]=\"initialBBox\"\n (chooseElement)=\"choose($event)\"\n >\n </g>\n </svg>\n</div>\n","import {Component, Input} from '@angular/core';\nimport {ReContainer, Referencable } from 'emfular';\nimport {GraphicalHelper} from \"../../utils/graphical-helper\";\nimport {NgForOf, NgIf} from \"@angular/common\";\nimport {IdHelper} from \"../../utils/id-helper\";\nimport {ModelService} from \"../../model.service\";\nimport {ModelDetailsService} from \"../model-details-service\";\n\n@Component({\n selector: 'container-details',\n imports: [\n NgForOf,\n NgIf,\n ],\n templateUrl: './container-details.component.html',\n styleUrl: './container-details.component.css'\n})\nexport class ContainerDetailsComponent<M extends Referencable<any>> {\n @Input() container!: ReContainer<any, any>\n @Input() isTree!: boolean\n @Input() modelService!: ModelService<M>\n @Input() detailsService!: ModelDetailsService<M> //todo just enforce interface?\n\n open(ref: Referencable<any>) {\n this.detailsService.openDetails(ref, this.modelService)\n }\n\n remove(ref: Referencable<any>) {\n //todo service should do this... in order for single source of truth\n if(this.container.remove(ref))\n this.modelService.saveCurrentState()\n }\n\n add() {\n //create on tree and open choice by graphical model on other links\n if(this.isTree) {\n console.log(\"Creation for several possible sub types is not solved in a meta-agnostic scenario\")\n } else {\n this.detailsService\n .openModelChoice(this.modelService)\n .subscribe(chosen => {\n if (!chosen) return; // user cancelled\n // todo what about type mismatches?\n if (this.container.add(chosen)) {\n this.modelService.saveCurrentState();\n }\n });\n }\n }\n\n protected readonly GraphicalHelper = GraphicalHelper;\n protected readonly IdHelper = IdHelper;\n}\n","<h4>{{container.referenceName+\":\"}}</h4>\n\n<button *ngIf=\"!isTree\" class=\"add-ref\" (click)=\"add()\">Add</button>\n\n<div class=\"container-row\"\n *ngFor=\"let elem of GraphicalHelper.getAsList(container)\">\n <div class=\"ref-info\">\n <span class=\"ref-icon\">🔗</span>\n <span class=\"ref-type\">{{ elem.getEClass() }}</span>\n <span class=\"ref-label\">{{ IdHelper.getLabel(elem) }}</span>\n </div>\n\n <div class=\"ref-actions\">\n <button (click)=\"open(elem)\">Open</button>\n <button (click)=\"remove(elem)\">Remove</button>\n </div>\n</div>\n\n","import {Component, Input, OnInit} from '@angular/core';\nimport {AttributeOptions, Referencable, ReLinkContainer, ReTreeChildrenContainer } from 'emfular';\nimport {ModelService} from \"../../model.service\";\nimport { getAllAttributes } from \"emfular\";\nimport {FormsModule} from \"@angular/forms\";\nimport {NgForOf} from \"@angular/common\";\nimport {\n ContainerDetailsComponent\n} from \"../container-details/container-details.component\";\nimport {ModelDetailsService} from \"../model-details-service\";\n\n@Component({\n selector: 'lib-model-details',\n imports: [\n FormsModule,\n NgForOf,\n ContainerDetailsComponent\n ],\n templateUrl: './model-details.component.html',\n styleUrl: './model-details.component.css'\n})\nexport class ModelDetailsComponent<T extends Referencable<any>, M extends Referencable<any>> implements OnInit {\n @Input() model!: T\n @Input() modelService!: ModelService<M>\n @Input() detailsService!: ModelDetailsService<M>\n\n attributes: Array<{ key: string; options: AttributeOptions }> = [];\n\n ngOnInit() {\n const map = getAllAttributes(this.model.constructor);\n this.attributes = Array.from(map.entries()).map(([key, options]) => ({\n key,\n options\n }));\n }\n \n getLinks(): ReLinkContainer<any, any>[] {\n return this.model.$otherReferences\n }\n\n getChildren(): ReTreeChildrenContainer<any>[] {\n return this.model.$treeChildren\n }\n\n}\n","<h1>Detail-Editor</h1>\n<h2>{{model.getEClass()}}</h2>\n<div class=\"attribute-list\">\n <div class=\"attribute-row\" *ngFor=\"let attr of attributes\">\n <label>{{ attr.key }}</label>\n <input\n type=\"text\"\n [(ngModel)]=\"$any(model)[attr.key]\"\n />\n </div>\n</div>\n<h3>References</h3>\n<div class=\"reference-list\">\n <container-details\n *ngFor=\"let container of getChildren()\"\n [container]=\"container\"\n [isTree]=\"true\"\n [modelService]=\"modelService\"\n [detailsService]=\"detailsService\"\n >\n </container-details>\n <container-details\n *ngFor=\"let container of getLinks()\"\n [container]=\"container\"\n [isTree]=\"false\"\n [modelService]=\"modelService\"\n [detailsService]=\"detailsService\"\n >\n </container-details>\n</div>\n\n","import { Injectable } from '@angular/core';\nimport { Referencable } from 'emfular';\nimport {ModelService} from \"../model.service\";\nimport {ModelDetailsComponent} from \"./model-details/model-details.component\";\nimport { Overlay } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport {ModelCanvasComponent} from \"../editor/model-canvas/model-canvas.component\";\nimport {Observable, Subject} from \"rxjs\";\nimport {ModelDetailsService} from \"./model-details-service\";\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BasicModelDetailsService<M extends Referencable<any>> implements ModelDetailsService<M> {\n\n constructor( private overlay: Overlay) { }\n\n //actually T must be somewhere on M\n openDetails<\n T extends Referencable<any>\n >(elem: T, modelService: ModelService<M>) {\n // instead of opening the generic ModeldetailsCompoennt you might like to consider opening a specific one\n //by determining the eClass and switching based on elem.getEClass()\n\n const overlayRef = this.overlay.create(\n { hasBackdrop: true,\n backdropClass: 'cdk-overlay-dark-backdrop',\n panelClass: 'basic-details-panel',\n positionStrategy: this.overlay.position()\n .global() .centerHorizontally() .centerVertically()\n });\n const portal = new ComponentPortal(ModelDetailsComponent<T,M>);\n const ref = overlayRef.attach(portal);\n ref.instance.model = elem;\n ref.instance.modelService = modelService;\n ref.instance.detailsService = this\n overlayRef.backdropClick().subscribe(\n () => overlayRef.dispose()\n );\n }\n\n openModelChoice(\n modelService: ModelService<M>\n ): Observable<Referencable<any>> {\n\n const subject = new Subject<Referencable<any>>();\n\n const overlayRef = this.overlay.create({\n hasBackdrop: true,\n backdropClass: 'cdk-overlay-dark-backdrop',\n panelClass: 'basic-details-panel',\n positionStrategy: this.overlay.position()\n .global().centerHorizontally().centerVertically()\n });\n\n const portal = new ComponentPortal(ModelCanvasComponent<M>);\n const ref = overlayRef.attach(portal);\n\n ref.instance.modelService = modelService;\n ref.instance.chooseElement.subscribe(next => {\n subject.next(next);\n subject.complete();\n overlayRef.dispose();\n });\n\n overlayRef.backdropClick().subscribe(() => {\n subject.complete();\n overlayRef.dispose();\n });\n\n return subject.asObservable();\n }\n\n}\n","import {Component, Input} from '@angular/core';\nimport { Referencable} from \"emfular\";\nimport {FileLevelBarComponent} from \"../file-level-bar/file-level-bar.component\";\nimport {ModelEditingBarComponent} from \"../model-editing-bar/model-editing-bar.component\";\nimport {ModelService} from \"../../model.service\";\nimport {ModelCanvasComponent} from \"../model-canvas/model-canvas.component\";\nimport {ModelDetailsService} from \"../../details/model-details-service\";\nimport {BasicModelDetailsService} from \"../../details/basic-model-details.service\";\n\n@Component({\n selector: 'emfular-tree-editor',\n imports: [\n FileLevelBarComponent,\n ModelEditingBarComponent,\n ModelCanvasComponent\n ],\n templateUrl: './tree-editor.component.html',\n styleUrl: './tree-editor.component.css'\n})\nexport class TreeEditorComponent<M extends Referencable<any>> {\n svgElement!: SVGSVGElement;\n @Input() modelService!: ModelService<M>\n @Input() detailsService?: ModelDetailsService<M>\n @Input() customButtons: Array<{\n label: string;\n icon?: string;\n action: () => void;\n }> | null = null;\n\n constructor(private basicDetailsService: BasicModelDetailsService<M>) {}\n\n get sidebarButtons() {\n if (this.customButtons) return this.customButtons;\n else //todo replace by default create buttons\n return[{label: \"test\", action: () => {console.log(\"Button on model edition works\")}}];\n }\n\n get effectiveDetailsService(): ModelDetailsService<M> {\n return this.detailsService ?? this.basicDetailsService;\n }\n\n onSvgReady(svg: SVGSVGElement) {\n this.svgElement = svg;\n }\n\n choose(element: Referencable<any>) {\n this.effectiveDetailsService.openDetails(element, this.modelService)\n }\n}\n","<div class=\"tree-editor\" id=\"tree-editor\">\n <emfular-file-level-bar\n [svg]=\"svgElement\"\n [modelService]=\"modelService\">\n </emfular-file-level-bar>\n <div class=\"editor-main\">\n <!-- vertical model bar -->\n <emfular-model-editing-bar\n class=\"model-bar\"\n [buttons]=\"sidebarButtons\">\n </emfular-model-editing-bar>\n\n\n <model-canvas\n [modelService]=\"modelService\"\n (svgReady)=\"onSvgReady($event)\"\n (chooseElement)=\"choose($event)\"\n >\n </model-canvas>\n </div>\n</div>\n\n","import {Component, Input} from '@angular/core';\nimport {InputHandler, IoService} from \"ngx-emfular-helper\";\nimport {Referencable} from \"emfular\";\nimport { CommonModule } from '@angular/common';\nimport { MatToolbarModule } from '@angular/material/toolbar';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport {ModelService} from \"../../model.service\";\n\n@Component({\n selector: 'emfular-file-level-bar-material',\n imports: [CommonModule, MatToolbarModule, MatIconModule, MatButtonModule],\n templateUrl: './file-level-bar-material.component.html',\n styleUrl: './file-level-bar-material.component.css'\n})\nexport class FileLevelBarMaterialComponent<M extends Referencable<any>> {\n @Input() svg!: SVGElement\n @Input() modelService!: ModelService<M>\n protected readonly InputHandler = InputHandler;\n\n constructor(public ioService: IoService) {\n }\n\n openModel() {\n document.getElementById('openModel')?.click();\n }\n\n\n saveSVG() {\n const svgContent = this.svg;\n if(svgContent) {\n this.ioService.saveSVG(svgContent, this.modelService.fileTitle())\n }\n }\n\n saveSVGasPNG() {\n const svgContent = this.svg;\n if(svgContent) {\n this.ioService.saveSvgAsPng(svgContent, this.modelService.fileTitle())\n }\n }\n\n saveSVGasJPEG() {\n const svgContent = this.svg;\n if(svgContent) {\n this.ioService.saveSvgAsJpeg(svgContent, this.modelService.fileTitle())\n }\n }\n\n\n}\n","<input id=\"openModel\" type=\"file\" class=\"file-upload\" style=\"display: none\" (change)=\"modelService.loadFromFile($event)\" (click)=\"InputHandler.clearElem($event)\">\n<mat-toolbar class=\"file-level-bar\">\n <button (click)=\"modelService.newModel()\">\n <mat-icon aria-hidden=\"false\" fontIcon=\"insert_drive_file\" ></mat-icon>\n New\n </button>\n <button (click)=\"openModel()\">\n <mat-icon aria-hidden=\"false\" fontIcon=\"file_upload\" ></mat-icon>\n Open\n </button>\n <hr/>\n <button (click)=\"modelService.historyService.undo()\" [disabled]=\"modelService.historyService.isUndoNotPossible()\">\n <mat-icon aria-hidden=\"false\" fontIcon=\"undo\" ></mat-icon>\n Undo</button>\n <button (click)=\"modelService.historyService.redo()\" [disabled]=\"modelService.historyService.isRedoNotPossible()\">\n <mat-icon aria-hidden=\"false\" fontIcon=\"redo\" ></mat-icon>\n Redo</button>\n <hr />\n <button (click)=\"modelService.save()\">\n <mat-icon aria-hidden=\"false\" fontIcon=\"file_download\" ></mat-icon>\n Save\n </button>\n <button (click)=\"saveSVG()\">\n <mat-icon aria-hidden=\"false\" fontIcon=\"photo_library\" ></mat-icon>\n Save SVG\n </button>\n <button (click)=\"saveSVGasPNG()\">\n <mat-icon aria-hidden=\"false\" fontIcon=\"photo_library\" ></mat-icon>\n Save PNG\n </button>\n <button (click)=\"saveSVGasJPEG()\">\n <mat-icon aria-hidden=\"false\" fontIcon=\"photo_library\" ></mat-icon>\n Save JPEG\n </button>\n</mat-toolbar>\n","/*\n * Public API Surface of ngx-emfular-integration\n */\n\nexport * from './lib/model.service';\n\nexport * from './lib/editor/tree-editor/tree-editor.component'\nexport * from './lib/editor/file-level-bar/file-level-bar.component';\nexport * from './lib/editor/file-level-bar-material/file-level-bar-material.component';\nexport * from './lib/editor/model-editing-bar/model-editing-bar.component';\nexport * from './lib/editor/model-canvas/model-canvas.component';\n\nexport * from './lib/graphical/referencable-box/referencable-box.component';\n\nexport * from './lib/details/model-details-service'\nexport * from './lib/details/basic-model-details.service'\nexport * from './lib/details/model-details/model-details.component';\nexport * from './lib/details/container-details/container-details.component'\n\nexport * from './lib/utils/id-helper'","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i1.BasicModelDetailsService"],"mappings":";;;;;;;;;;;;;;;;;;MAIa,eAAe,GAAG,IAAI,cAAc,CAC7C,gBAAgB;SAEJ,sBAAsB,CAClC,SAAiB,UAAU,EAC3B,aAAqB,EAAE,EAAA;IAEzB,OAAO;AACL,QAAA,OAAO,EAAE,eAAe;AACxB,QAAA,UAAU,EAAE,CAAC,UAAkB,KAAK,IAAI,cAAc,CAAY,MAAM,EAAE,UAAU,EAAE,UAAU,CAAC;QACjG,IAAI,EAAE,CAAC,WAAW;KACnB;AACH;MAMsB,YAAY,CAAA;AAYM,IAAA,cAAA;AACzB,IAAA,SAAA;AACU,IAAA,UAAA;AAZf,IAAA,MAAM;AACd,IAAA,IAAI,KAAK,GAAA;QACP,OAAO,IAAI,CAAC,MAAM;;IAEpB,IAAc,KAAK,CAAC,KAAQ,EAAA;QAC1B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;QACrC,IAAI,CAAC,YAAY,EAAE;;AAGrB,IAAA,WAAA,CACsC,cAAyC,EAClE,SAAoB,EACV,UAAiC,EAAA;QAFlB,IAAc,CAAA,cAAA,GAAd,cAAc;QACvC,IAAS,CAAA,SAAA,GAAT,SAAS;QACC,IAAU,CAAA,UAAA,GAAV,UAAU;QAE/B,IAAI,CAAC,MAAM,GAAG,IAAI,UAAU,EAAE,CAAA;QAC9B,cAAc,CAAC,MAAK;YAClB,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,IAAG;gBAC3C,IAAI,KAAK,EAAE;AACT,oBAAA,IAAI,CAAC,SAAS,CAAC,KAA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AA,UAAA,EAAA,IAAA,EAAA,YAAY,8BAAE,gBAAgB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,aAAa,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,SAAA,EAAA,SAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,eAAe,EAAA,CAAA,EAAA,CAAA;;2FAI7D,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBANzC,SAAS;+BACE,iCAAiC,EAAA,OAAA,EAClC,CAAC,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,CAAC,EAAA,QAAA,EAAA,slDAAA,EAAA,MAAA,EAAA,CAAA,wUAAA,CAAA,EAAA;8EAKhE,GAAG,EAAA,CAAA;sBAAX;gBACQ,YAAY,EAAA,CAAA;sBAApB;;;AEjBH;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-emfular-integration.mjs","sources":["../../../projects/ngx-emfular-integration/src/lib/model.service.ts","../../../projects/ngx-emfular-integration/src/lib/editor/file-level-bar/file-level-bar.component.ts","../../../projects/ngx-emfular-integration/src/lib/editor/file-level-bar/file-level-bar.component.html","../../../projects/ngx-emfular-integration/src/lib/editor/model-editing-bar/model-editing-bar.component.ts","../../../projects/ngx-emfular-integration/src/lib/editor/model-editing-bar/model-editing-bar.component.html","../../../projects/ngx-emfular-integration/src/lib/utils/graphical-helper.ts","../../../projects/ngx-emfular-integration/src/lib/utils/id-helper.ts","../../../projects/ngx-emfular-integration/src/lib/graphical/referencable-box/referencable-box.component.ts","../../../projects/ngx-emfular-integration/src/lib/graphical/referencable-box/referencable-box.component.svg","../../../projects/ngx-emfular-integration/src/lib/editor/model-canvas/model-canvas.component.ts","../../../projects/ngx-emfular-integration/src/lib/editor/model-canvas/model-canvas.component.html","../../../projects/ngx-emfular-integration/src/lib/details/container-details/container-details.component.ts","../../../projects/ngx-emfular-integration/src/lib/details/container-details/container-details.component.html","../../../projects/ngx-emfular-integration/src/lib/details/model-details/model-details.component.ts","../../../projects/ngx-emfular-integration/src/lib/details/model-details/model-details.component.html","../../../projects/ngx-emfular-integration/src/lib/details/basic-model-details.service.ts","../../../projects/ngx-emfular-integration/src/lib/editor/tree-editor/tree-editor.component.ts","../../../projects/ngx-emfular-integration/src/lib/editor/tree-editor/tree-editor.component.html","../../../projects/ngx-emfular-integration/src/lib/editor/file-level-bar-material/file-level-bar-material.component.ts","../../../projects/ngx-emfular-integration/src/lib/editor/file-level-bar-material/file-level-bar-material.component.html","../../../projects/ngx-emfular-integration/src/public-api.ts","../../../projects/ngx-emfular-integration/src/ngx-emfular-integration.ts"],"sourcesContent":["import {Inject, Injectable, InjectionToken, PLATFORM_ID} from '@angular/core';\nimport {Deserializer, JsonDeserializable, JsonOf, Referencable} from \"emfular\";\nimport {HistoryService, IoService} from \"ngx-emfular-helper\";\n\nexport const HISTORY_SERVICE = new InjectionToken<HistoryService<any>>(\n 'HistoryService'\n);\nexport function provideHistoryForModel<M>(\n prefix: string = 'history_',\n bufferSize: number = 50\n) {\n return {\n provide: HISTORY_SERVICE,\n useFactory: (platformId: Object) => new HistoryService<JsonOf<M>>(prefix, bufferSize, platformId),\n deps: [PLATFORM_ID]\n };\n}\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport abstract class ModelService<M extends Referencable<any>> {\n\n private _model!: M\n get model(): M {\n return this._model;\n }\n protected set model(model: M) {\n this._model = this.adjustModel(model);\n this.adaptToModel()\n }\n\n protected constructor(\n @Inject(HISTORY_SERVICE) readonly historyService: HistoryService<JsonOf<M>>,\n readonly ioService: IoService,\n protected readonly modelClass: JsonDeserializable<M>,\n ) {\n this._model = new modelClass() //default initialization without calling set, since adjustments might need not yet initialized properties\n queueMicrotask(() => { //necessary to avoid timing issues if adjust model or adapt to model call services or other not initialized properties of the inheriting class\n this.historyService.state$.subscribe(state => {\n if (state) {\n this.applyJson(state);\n }\n });\n })\n }\n\n //default implementation to override if you need any normalization on a model before setting it\n adjustModel(model: M): M {\n return model;\n }\n\n //default implementation to override if you need adaptation of surroundings,\n // e.g. other attributes, notifications, signals etc\n adaptToModel() {}\n\n // override by either a fixed string or sth from the current model itself\n public fileTitle(): string {\n return \"model\"\n }\n\n newModel() {\n this.model = new this.modelClass()\n this.saveCurrentState()\n }\n\n serialize(): JsonOf<M> {\n return this.model.toJson()\n }\n\n deserialize(modelJson: JsonOf<M>): M {\n let modelEClass = new this.modelClass().getEClass();\n return Deserializer.fromJSON<M>(modelJson, modelEClass);\n }\n\n saveCurrentState() {\n this.historyService.save(this.serialize())\n }\n\n protected applyJson(modelJson: JsonOf<M>): M {\n this.model = this.deserialize(modelJson);\n return this.model;\n }\n\n loadFromJson(modelJson: JsonOf<M>): void {\n this.applyJson(modelJson);\n this.saveCurrentState()\n }\n\n loadFromFile(event: Event) {\n this.ioService.loadStringFromFile(event).then(txt => {\n //todo insert detection code for wrong files (no json, not appropriately structured\n this.loadFromJson(JSON.parse(txt));\n });\n }\n\n save() {\n const jsonString = JSON.stringify(this.serialize());\n this.ioService.saveJson(jsonString, this.fileTitle())\n }\n\n}\n","import {Component, Input} from '@angular/core';\nimport {InputHandler, IoService} from \"ngx-emfular-helper\";\nimport {Referencable} from \"emfular\";\nimport {ModelService} from \"../../model.service\";\n\n@Component({\n selector: 'emfular-file-level-bar',\n imports: [],\n templateUrl: './file-level-bar.component.html',\n styleUrl: './file-level-bar.component.css'\n})\nexport class FileLevelBarComponent<M extends Referencable<any>> {\n @Input() svg!: SVGElement\n @Input() modelService!: ModelService<M>\n protected readonly InputHandler = InputHandler;\n\n constructor(public ioService: IoService) {\n }\n\n openModel() {\n document.getElementById('openModel')?.click();\n }\n\n\n saveSVG() {\n const svgContent = this.svg;\n if(svgContent) {\n this.ioService.saveSVG(svgContent, this.modelService.fileTitle())\n }\n }\n\n saveSVGasPNG() {\n const svgContent = this.svg;\n if(svgContent) {\n this.ioService.saveSvgAsPng(svgContent, this.modelService.fileTitle())\n }\n }\n\n saveSVGasJPEG() {\n const svgContent = this.svg;\n if(svgContent) {\n this.ioService.saveSvgAsJpeg(svgContent, this.modelService.fileTitle())\n }\n }\n\n\n}\n","<input id=\"openModel\" type=\"file\" class=\"file-upload\" style=\"display:none\"\n (change)=\"modelService.loadFromFile($event)\"\n (click)=\"InputHandler.clearElem($event)\">\n\n<div class=\"file-level-bar\">\n <button (click)=\"modelService.newModel()\">New</button>\n <button (click)=\"openModel()\">Open</button>\n <span class=\"separator\"></span>\n <button (click)=\"modelService.historyService.undo()\" [disabled]=\"modelService.historyService.isUndoNotPossible()\">Undo</button>\n <button (click)=\"modelService.historyService.redo()\" [disabled]=\"modelService.historyService.isRedoNotPossible()\">Redo</button>\n <span class=\"separator\"></span>\n <button (click)=\"modelService.save()\">Save</button>\n <button (click)=\"saveSVG()\">Save SVG</button>\n <button (click)=\"saveSVGasPNG()\">Save PNG</button>\n <button (click)=\"saveSVGasJPEG()\">Save JPEG</button>\n</div>\n","import {Component, Input} from '@angular/core';\nimport {NgForOf, NgIf} from \"@angular/common\";\n\n@Component({\n selector: 'emfular-model-editing-bar',\n imports: [\n NgForOf,\n NgIf\n ],\n templateUrl: './model-editing-bar.component.html',\n styleUrl: './model-editing-bar.component.css'\n})\nexport class ModelEditingBarComponent {\n @Input() buttons: Array<{\n label: string;\n icon?: string;\n action: () => void;\n }> | null = null;\n\n\n}\n","<div class=\"model-editing-bar\">\n <button *ngFor=\"let b of buttons\" (click)=\"b.action()\">\n <span *ngIf=\"b.icon\" class=\"icon\">{{ b.icon }}</span>\n {{ b.label }}\n </button>\n</div>\n","import {ReContainer, Referencable } from \"emfular\";\n\nexport class GraphicalHelper {\n\n //todo, refactor into emfular\n static getAsList<T extends Referencable<any>>(refs: ReContainer<T, any>): T[] {\n const items: T[]|T|undefined = refs.get()\n if(items) {\n if(Array.isArray(items)) {\n return items\n }\n const result: T[] = [];\n result.push(items)\n return result\n } else {\n return [];\n }\n }\n\n}\n","import {getAllAttributes, Referencable } from \"emfular\";\n\nexport class IdHelper {\n\n static getLabel(ref: Referencable<any>): string {\n // 1. If the model has a \"name\" attribute → use it\n if ((ref as any).name) {\n return `${(ref as any).name}`;\n }\n\n // 2. Otherwise: first primitive attribute\n const attrs = getAllAttributes(ref.constructor);\n for (const [key] of attrs) {\n const value = (ref as any)[key];\n if (typeof value === \"string\" || typeof value === \"number\") {\n return `${value}`;\n }\n }\n\n /*\n // 3. Otherwise: use ID (EMFular always has stable IDs)\n if ((ref as any).id) {\n return `(id=${(ref as any).id})`;\n }*/\n\n // 4. Otherwise: fallback\n return \"(unnamed)\";\n }\n\n}\n","import {Component, EventEmitter, Input, Output} from '@angular/core';\nimport {Referencable, ReTreeChildrenContainer} from 'emfular';\nimport {ArrowBetweenElemsComponent, BoundingBox, RectangleWithTextComponent, PositionHelper} from 'ngx-svg-graphics';\nimport {GraphicalHelper} from \"../../utils/graphical-helper\";\nimport {IdHelper} from \"../../utils/id-helper\";\n\n@Component({\n selector: '[referencable-box]',\n imports: [RectangleWithTextComponent, ArrowBetweenElemsComponent],\n templateUrl: './referencable-box.component.svg',\n styleUrl: './referencable-box.component.css'\n})\nexport class ReferencableBoxComponent {\n @Input() referencable!: Referencable<any>;\n @Input() position!: BoundingBox\n @Input() color?: string = \"#efad78\"\n @Output() chooseElement: EventEmitter<Referencable<any>> = new EventEmitter();\n @Output() chooseReference: EventEmitter<ReTreeChildrenContainer<any>> = new EventEmitter();\n\n isExpandedArray: boolean[] = []\n\n constructor() {}\n\n toggleExpand(i: number) {\n this.isExpandedArray[i]= !this.isExpandedArray[i];\n }\n\n createBoxInLastPart(bb: BoundingBox): BoundingBox {\n return {\n x: bb.x+bb.w -25,\n y: bb.y+bb.h -25,\n w: 25,\n h: 25\n }\n }\n\n choose(element: Referencable<any>) {\n this.chooseElement.emit(element);\n }\n\n chooseRef(ref: ReTreeChildrenContainer<any>) {\n this.chooseReference.emit(ref)\n }\n\n\n protected readonly GraphicalHelper = GraphicalHelper;\n protected readonly PositionHelper = PositionHelper\n protected readonly IdHelper = IdHelper;\n}\n","<svg:g [attr.id]=\"referencable.$gId\">\n\n <g rectangle-with-text\n (click)=\"choose(referencable)\"\n [id]=\"referencable.$gId + '_main'\"\n [text]=\"IdHelper.getLabel(referencable)\"\n [position]=\"position\"\n [color]=\"color\"\n >\n </g>\n\n <!-- containers -->\n @for (container of referencable.$treeChildren;\n track referencable.$gId + '_' + container.referenceName\n ; let i = $index) {\n\n @let containerKey = referencable.$gId + '_' + container.referenceName;\n @let containerAnchorBox = PositionHelper.computeChildBBox(\n i,\n referencable.$treeChildren.length,\n position\n );\n\n <!-- reference box -->\n <g rectangle-with-text\n (click)=\"chooseRef(container)\"\n [id]=\"containerKey + '_ref'\"\n [text]=\"container.referenceName\"\n [position]=\"containerAnchorBox\"\n color=\"#ede679\"\n >\n </g>\n <g rectangle-with-text\n (click)=\"toggleExpand(i)\"\n [id]=\"containerKey + '_toggle'\"\n [text]=\"isExpandedArray[i]?'◊':'V'\"\n [position]=\"createBoxInLastPart(containerAnchorBox)\"\n color=\"transparent\"\n ></g>\n\n <!-- arrow from main box to reference -->\n <g arrowElems\n [startGID]=\"referencable.$gId\"\n startSuffix=\"_main\"\n [endGID]=\"containerKey\"\n endSuffix=\"_ref\">\n </g>\n\n @if (isExpandedArray[i]) {\n <!-- real children inside this reference -->\n @let realChildren = GraphicalHelper.getAsList(container);\n\n @for (elem of realChildren; track elem.$gId; let j = $index) {\n\n @let elemBox = PositionHelper.computeChildBBox(\n j,\n realChildren.length,\n containerAnchorBox\n );\n <g referencable-box\n (chooseElement)=\"choose($event)\"\n [referencable]=\"elem\"\n [position]=\"elemBox\"\n >\n </g>\n <!-- arrow from reference to child box -->\n <g arrowElems\n [startGID]=\"containerKey\"\n startSuffix=\"_ref\"\n [endGID]=\"elem.$gId\"\n endSuffix=\"_main\">\n </g>\n }\n\n }\n }\n</svg:g>\n","import {Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core';\nimport {ReferencableBoxComponent} from \"../../graphical/referencable-box/referencable-box.component\";\nimport {ModelService} from \"../../model.service\";\nimport { Referencable, ReTreeChildrenContainer } from 'emfular';\nimport { BoundingBox } from 'ngx-svg-graphics';\n\n@Component({\n selector: 'model-canvas',\n imports: [\n ReferencableBoxComponent\n ],\n templateUrl: './model-canvas.component.html',\n styleUrl: './model-canvas.component.css'\n})\nexport class ModelCanvasComponent<M extends Referencable<any>> implements OnInit {\n svgwidth = 1500;\n svgheigth = 1000;\n initialBBox : BoundingBox = {x: this.svgwidth/2, y: 20, w: 200, h: 25}\n\n @Input() modelService!: ModelService<M>\n @Output() chooseElement: EventEmitter<Referencable<any>> = new EventEmitter();\n @Output() chooseReference: EventEmitter<ReTreeChildrenContainer<any>> = new EventEmitter();\n @Output() svgReady: EventEmitter<SVGSVGElement> = new EventEmitter<SVGSVGElement>();\n @ViewChild('svg', { static: true })\n svg!: ElementRef<SVGSVGElement>;\n\n ngOnInit() {\n // Safe because static: true\n this.svgReady.emit(this.svg.nativeElement);\n }\n\n choose(element: Referencable<any>): void {\n this.chooseElement.emit(element);\n }\n\n chooseRef(reference: ReTreeChildrenContainer<any>) {\n this.chooseReference.emit(reference);\n }\n\n}\n","<div class=\"modeling-container\">\n <svg #svg id=\"svg\" class=\"canvas-svg\" [attr.width]=\"svgwidth\" [attr.height]=\"svgheigth\">\n <g referencable-box\n [referencable]=\"modelService.model\"\n [position]=\"initialBBox\"\n (chooseElement)=\"choose($event)\"\n (chooseReference)=\"chooseRef($event)\"\n >\n </g>\n </svg>\n</div>\n","import {Component, Input} from '@angular/core';\nimport {ReContainer, Referencable } from 'emfular';\nimport {GraphicalHelper} from \"../../utils/graphical-helper\";\nimport {NgForOf, NgIf} from \"@angular/common\";\nimport {IdHelper} from \"../../utils/id-helper\";\nimport {ModelService} from \"../../model.service\";\nimport {ModelDetailsService} from \"../model-details-service\";\n\n@Component({\n selector: 'container-details',\n imports: [\n NgForOf,\n NgIf,\n ],\n templateUrl: './container-details.component.html',\n styleUrl: './container-details.component.css'\n})\nexport class ContainerDetailsComponent<M extends Referencable<any>> {\n @Input() container!: ReContainer<any, any>\n @Input() isTree!: boolean\n @Input() modelService!: ModelService<M>\n @Input() detailsService!: ModelDetailsService<M> //todo just enforce interface?\n\n open(ref: Referencable<any>) {\n this.detailsService.openDetails(ref, this.modelService)\n }\n\n remove(ref: Referencable<any>) {\n //todo service should do this... in order for single source of truth\n if(this.container.remove(ref))\n this.modelService.saveCurrentState()\n }\n\n add() {\n //create on tree and open choice by graphical model on other links\n if(this.isTree) {\n console.log(\"Creation for several possible sub types is not solved in a meta-agnostic scenario\")\n } else {\n this.detailsService\n .openModelChoice(this.modelService)\n .subscribe(chosen => {\n if (!chosen) return; // user cancelled\n // todo what about type mismatches?\n if (this.container.add(chosen)) {\n this.modelService.saveCurrentState();\n }\n });\n }\n }\n\n protected readonly GraphicalHelper = GraphicalHelper;\n protected readonly IdHelper = IdHelper;\n}\n","<h4>{{container.referenceName+\":\"}}</h4>\n\n<button *ngIf=\"!isTree\" class=\"add-ref\" (click)=\"add()\">Add</button>\n\n<div class=\"container-row\"\n *ngFor=\"let elem of GraphicalHelper.getAsList(container)\">\n <div class=\"ref-info\">\n <span class=\"ref-icon\">🔗</span>\n <span class=\"ref-type\">{{ elem.getEClass() }}</span>\n <span class=\"ref-label\">{{ IdHelper.getLabel(elem) }}</span>\n </div>\n\n <div class=\"ref-actions\">\n <button (click)=\"open(elem)\">Open</button>\n <button (click)=\"remove(elem)\">Remove</button>\n </div>\n</div>\n\n","import {Component, Input, OnInit} from '@angular/core';\nimport {AttributeOptions, Referencable, ReLinkContainer, ReTreeChildrenContainer } from 'emfular';\nimport {ModelService} from \"../../model.service\";\nimport { getAllAttributes } from \"emfular\";\nimport {FormsModule} from \"@angular/forms\";\nimport {NgForOf} from \"@angular/common\";\nimport {\n ContainerDetailsComponent\n} from \"../container-details/container-details.component\";\nimport {ModelDetailsService} from \"../model-details-service\";\nimport {IdHelper} from \"../../utils/id-helper\";\n\n@Component({\n selector: 'lib-model-details',\n imports: [\n FormsModule,\n NgForOf,\n ContainerDetailsComponent\n ],\n templateUrl: './model-details.component.html',\n styleUrl: './model-details.component.css'\n})\nexport class ModelDetailsComponent<T extends Referencable<any>, M extends Referencable<any>> implements OnInit {\n @Input() model!: T\n @Input() modelService!: ModelService<M>\n @Input() detailsService!: ModelDetailsService<M>\n\n attributes: Array<{ key: string; options: AttributeOptions }> = [];\n\n ngOnInit() {\n const map = getAllAttributes(this.model.constructor);\n this.attributes = Array.from(map.entries()).map(([key, options]) => ({\n key,\n options\n }));\n }\n\n getLinks(): ReLinkContainer<any, any>[] {\n return this.model.$otherReferences\n }\n\n getChildren(): ReTreeChildrenContainer<any>[] {\n return this.model.$treeChildren\n }\n\n chooseParent() {\n this.detailsService\n .openParentChoice(this.modelService)\n .subscribe(chosen => {\n if (!chosen) return; // user cancelled\n // todo what about type mismatches? and user should actually pick the container, not the parent\n let oldParent = this.model.parent\n if(chosen == oldParent) return;\n this.model.setParent(chosen)\n if (this.model.parent && this.model.parent != oldParent) { //todo should we catch wrong undefined setting?\n this.modelService.saveCurrentState();\n }\n });\n }\n\n protected readonly IdHelper = IdHelper;\n}\n","<h1>Detail-Editor</h1>\n<h2>{{model.getEClass()}}</h2>\n<div class=\"parent-choice\">\n <label>Current Parent</label>\n <div class=\"ref-info\">\n <span class=\"ref-icon\">🔗</span>\n <span class=\"ref-type\">{{ model.getParentReferencable().getEClass() }}</span>\n <span class=\"ref-label\">{{ IdHelper.getLabel(model.getParentReferencable()) }}</span>\n </div>\n <button (click)=\"chooseParent()\">\n Set Parent\n </button>\n</div>\n<div class=\"attribute-list\">\n <div class=\"attribute-row\" *ngFor=\"let attr of attributes\">\n <label>{{ attr.key }}</label>\n <input\n type=\"text\"\n [(ngModel)]=\"$any(model)[attr.key]\"\n />\n </div>\n</div>\n<h3>References</h3>\n<div class=\"reference-list\">\n <container-details\n *ngFor=\"let container of getChildren()\"\n [container]=\"container\"\n [isTree]=\"true\"\n [modelService]=\"modelService\"\n [detailsService]=\"detailsService\"\n >\n </container-details>\n <container-details\n *ngFor=\"let container of getLinks()\"\n [container]=\"container\"\n [isTree]=\"false\"\n [modelService]=\"modelService\"\n [detailsService]=\"detailsService\"\n >\n </container-details>\n</div>\n\n","import { Injectable } from '@angular/core';\nimport { Referencable, ReTreeChildrenContainer } from 'emfular';\nimport {ModelService} from \"../model.service\";\nimport {ModelDetailsComponent} from \"./model-details/model-details.component\";\nimport { Overlay } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport {ModelCanvasComponent} from \"../editor/model-canvas/model-canvas.component\";\nimport {Observable, Subject} from \"rxjs\";\nimport {ModelDetailsService} from \"./model-details-service\";\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BasicModelDetailsService<M extends Referencable<any>> implements ModelDetailsService<M> {\n\n constructor( private overlay: Overlay) { }\n\n //actually T must be somewhere on M\n openDetails<\n T extends Referencable<any>\n >(elem: T, modelService: ModelService<M>) {\n // instead of opening the generic ModeldetailsCompoennt you might like to consider opening a specific one\n //by determining the eClass and switching based on elem.getEClass()\n\n const overlayRef = this.overlay.create(\n { hasBackdrop: true,\n backdropClass: 'cdk-overlay-dark-backdrop',\n panelClass: 'basic-details-panel',\n positionStrategy: this.overlay.position()\n .global() .centerHorizontally() .centerVertically()\n });\n const portal = new ComponentPortal(ModelDetailsComponent<T,M>);\n const ref = overlayRef.attach(portal);\n ref.instance.model = elem;\n ref.instance.modelService = modelService;\n ref.instance.detailsService = this\n overlayRef.backdropClick().subscribe(\n () => overlayRef.dispose()\n );\n }\n\n openModelChoice(\n modelService: ModelService<M>\n ): Observable<Referencable<any>> {\n\n const subject = new Subject<Referencable<any>>();\n\n const overlayRef = this.overlay.create({\n hasBackdrop: true,\n backdropClass: 'cdk-overlay-dark-backdrop',\n panelClass: 'basic-details-panel',\n positionStrategy: this.overlay.position()\n .global().centerHorizontally().centerVertically()\n });\n\n const portal = new ComponentPortal(ModelCanvasComponent<M>);\n const ref = overlayRef.attach(portal);\n\n ref.instance.modelService = modelService;\n ref.instance.chooseElement.subscribe(next => {\n subject.next(next);\n subject.complete();\n overlayRef.dispose();\n });\n\n overlayRef.backdropClick().subscribe(() => {\n subject.complete();\n overlayRef.dispose();\n });\n\n return subject.asObservable();\n }\n\n openParentChoice(\n modelService: ModelService<M>\n ): Observable<ReTreeChildrenContainer<any>> {\n const subject = new Subject<ReTreeChildrenContainer<any>>();\n\n const overlayRef = this.overlay.create({\n hasBackdrop: true,\n backdropClass: 'cdk-overlay-dark-backdrop',\n panelClass: 'basic-details-panel',\n positionStrategy: this.overlay.position()\n .global().centerHorizontally().centerVertically()\n });\n\n const portal = new ComponentPortal(ModelCanvasComponent<M>);\n const ref = overlayRef.attach(portal);\n\n ref.instance.modelService = modelService;\n ref.instance.chooseReference.subscribe(next => {\n subject.next(next);\n subject.complete();\n overlayRef.dispose();\n });\n\n overlayRef.backdropClick().subscribe(() => {\n subject.complete();\n overlayRef.dispose();\n });\n\n return subject.asObservable();\n }\n\n}\n","import {Component, Input} from '@angular/core';\nimport { Referencable} from \"emfular\";\nimport {FileLevelBarComponent} from \"../file-level-bar/file-level-bar.component\";\nimport {ModelEditingBarComponent} from \"../model-editing-bar/model-editing-bar.component\";\nimport {ModelService} from \"../../model.service\";\nimport {ModelCanvasComponent} from \"../model-canvas/model-canvas.component\";\nimport {ModelDetailsService} from \"../../details/model-details-service\";\nimport {BasicModelDetailsService} from \"../../details/basic-model-details.service\";\n\n@Component({\n selector: 'emfular-tree-editor',\n imports: [\n FileLevelBarComponent,\n ModelEditingBarComponent,\n ModelCanvasComponent\n ],\n templateUrl: './tree-editor.component.html',\n styleUrl: './tree-editor.component.css'\n})\nexport class TreeEditorComponent<M extends Referencable<any>> {\n svgElement!: SVGSVGElement;\n @Input() modelService!: ModelService<M>\n @Input() detailsService?: ModelDetailsService<M>\n @Input() customButtons: Array<{\n label: string;\n icon?: string;\n action: () => void;\n }> | null = null;\n\n constructor(private basicDetailsService: BasicModelDetailsService<M>) {}\n\n get sidebarButtons() {\n if (this.customButtons) return this.customButtons;\n else //todo replace by default create buttons\n return[{label: \"test\", action: () => {console.log(\"Button on model edition works\")}}];\n }\n\n get effectiveDetailsService(): ModelDetailsService<M> {\n return this.detailsService ?? this.basicDetailsService;\n }\n\n onSvgReady(svg: SVGSVGElement) {\n this.svgElement = svg;\n }\n\n choose(element: Referencable<any>) {\n this.effectiveDetailsService.openDetails(element, this.modelService)\n }\n}\n","<div class=\"tree-editor\" id=\"tree-editor\">\n <emfular-file-level-bar\n [svg]=\"svgElement\"\n [modelService]=\"modelService\">\n </emfular-file-level-bar>\n <div class=\"editor-main\">\n <!-- vertical model bar -->\n <emfular-model-editing-bar\n class=\"model-bar\"\n [buttons]=\"sidebarButtons\">\n </emfular-model-editing-bar>\n\n\n <model-canvas\n [modelService]=\"modelService\"\n (svgReady)=\"onSvgReady($event)\"\n (chooseElement)=\"choose($event)\"\n >\n </model-canvas>\n </div>\n</div>\n\n","import {Component, Input} from '@angular/core';\nimport {InputHandler, IoService} from \"ngx-emfular-helper\";\nimport {Referencable} from \"emfular\";\nimport { CommonModule } from '@angular/common';\nimport { MatToolbarModule } from '@angular/material/toolbar';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport {ModelService} from \"../../model.service\";\n\n@Component({\n selector: 'emfular-file-level-bar-material',\n imports: [CommonModule, MatToolbarModule, MatIconModule, MatButtonModule],\n templateUrl: './file-level-bar-material.component.html',\n styleUrl: './file-level-bar-material.component.css'\n})\nexport class FileLevelBarMaterialComponent<M extends Referencable<any>> {\n @Input() svg!: SVGElement\n @Input() modelService!: ModelService<M>\n protected readonly InputHandler = InputHandler;\n\n constructor(public ioService: IoService) {\n }\n\n openModel() {\n document.getElementById('openModel')?.click();\n }\n\n\n saveSVG() {\n const svgContent = this.svg;\n if(svgContent) {\n this.ioService.saveSVG(svgContent, this.modelService.fileTitle())\n }\n }\n\n saveSVGasPNG() {\n const svgContent = this.svg;\n if(svgContent) {\n this.ioService.saveSvgAsPng(svgContent, this.modelService.fileTitle())\n }\n }\n\n saveSVGasJPEG() {\n const svgContent = this.svg;\n if(svgContent) {\n this.ioService.saveSvgAsJpeg(svgContent, this.modelService.fileTitle())\n }\n }\n\n\n}\n","<input id=\"openModel\" type=\"file\" class=\"file-upload\" style=\"display: none\" (change)=\"modelService.loadFromFile($event)\" (click)=\"InputHandler.clearElem($event)\">\n<mat-toolbar class=\"file-level-bar\">\n <button (click)=\"modelService.newModel()\">\n <mat-icon aria-hidden=\"false\" fontIcon=\"insert_drive_file\" ></mat-icon>\n New\n </button>\n <button (click)=\"openModel()\">\n <mat-icon aria-hidden=\"false\" fontIcon=\"file_upload\" ></mat-icon>\n Open\n </button>\n <hr/>\n <button (click)=\"modelService.historyService.undo()\" [disabled]=\"modelService.historyService.isUndoNotPossible()\">\n <mat-icon aria-hidden=\"false\" fontIcon=\"undo\" ></mat-icon>\n Undo</button>\n <button (click)=\"modelService.historyService.redo()\" [disabled]=\"modelService.historyService.isRedoNotPossible()\">\n <mat-icon aria-hidden=\"false\" fontIcon=\"redo\" ></mat-icon>\n Redo</button>\n <hr />\n <button (click)=\"modelService.save()\">\n <mat-icon aria-hidden=\"false\" fontIcon=\"file_download\" ></mat-icon>\n Save\n </button>\n <button (click)=\"saveSVG()\">\n <mat-icon aria-hidden=\"false\" fontIcon=\"photo_library\" ></mat-icon>\n Save SVG\n </button>\n <button (click)=\"saveSVGasPNG()\">\n <mat-icon aria-hidden=\"false\" fontIcon=\"photo_library\" ></mat-icon>\n Save PNG\n </button>\n <button (click)=\"saveSVGasJPEG()\">\n <mat-icon aria-hidden=\"false\" fontIcon=\"photo_library\" ></mat-icon>\n Save JPEG\n </button>\n</mat-toolbar>\n","/*\n * Public API Surface of ngx-emfular-integration\n */\n\nexport * from './lib/model.service';\n\nexport * from './lib/editor/tree-editor/tree-editor.component'\nexport * from './lib/editor/file-level-bar/file-level-bar.component';\nexport * from './lib/editor/file-level-bar-material/file-level-bar-material.component';\nexport * from './lib/editor/model-editing-bar/model-editing-bar.component';\nexport * from './lib/editor/model-canvas/model-canvas.component';\n\nexport * from './lib/graphical/referencable-box/referencable-box.component';\n\nexport * from './lib/details/model-details-service'\nexport * from './lib/details/basic-model-details.service'\nexport * from './lib/details/model-details/model-details.component';\nexport * from './lib/details/container-details/container-details.component'\n\nexport * from './lib/utils/id-helper'","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i1.BasicModelDetailsService"],"mappings":";;;;;;;;;;;;;;;;;;MAIa,eAAe,GAAG,IAAI,cAAc,CAC7C,gBAAgB;SAEJ,sBAAsB,CAClC,SAAiB,UAAU,EAC3B,aAAqB,EAAE,EAAA;IAEzB,OAAO;AACL,QAAA,OAAO,EAAE,eAAe;AACxB,QAAA,UAAU,EAAE,CAAC,UAAkB,KAAK,IAAI,cAAc,CAAY,MAAM,EAAE,UAAU,EAAE,UAAU,CAAC;QACjG,IAAI,EAAE,CAAC,WAAW;KACnB;AACH;MAMsB,YAAY,CAAA;AAYM,IAAA,cAAA;AACzB,IAAA,SAAA;AACU,IAAA,UAAA;AAZf,IAAA,MAAM;AACd,IAAA,IAAI,KAAK,GAAA;QACP,OAAO,IAAI,CAAC,MAAM;;IAEpB,IAAc,KAAK,CAAC,KAAQ,EAAA;QAC1B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;QACrC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slDAmCA,EDxBY,MAAA,EAAA,CAAA,wUAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,YAAY,8BAAE,gBAAgB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,aAAa,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,SAAA,EAAA,SAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,eAAe,EAAA,CAAA,EAAA,CAAA;;2FAI7D,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBANzC,SAAS;+BACE,iCAAiC,EAAA,OAAA,EAClC,CAAC,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,CAAC,EAAA,QAAA,EAAA,slDAAA,EAAA,MAAA,EAAA,CAAA,wUAAA,CAAA,EAAA;8EAKhE,GAAG,EAAA,CAAA;sBAAX;gBACQ,YAAY,EAAA,CAAA;sBAApB;;;AEjBH;;AAEG;;ACFH;;AAEG;;;;"}
@@ -1,4 +1,4 @@
1
- import { Referencable } from 'emfular';
1
+ import { Referencable, ReTreeChildrenContainer } from 'emfular';
2
2
  import { ModelService } from "../model.service";
3
3
  import { Overlay } from '@angular/cdk/overlay';
4
4
  import { Observable } from "rxjs";
@@ -9,6 +9,7 @@ export declare class BasicModelDetailsService<M extends Referencable<any>> imple
9
9
  constructor(overlay: Overlay);
10
10
  openDetails<T extends Referencable<any>>(elem: T, modelService: ModelService<M>): void;
11
11
  openModelChoice(modelService: ModelService<M>): Observable<Referencable<any>>;
12
+ openParentChoice(modelService: ModelService<M>): Observable<ReTreeChildrenContainer<any>>;
12
13
  static ɵfac: i0.ɵɵFactoryDeclaration<BasicModelDetailsService<any>, never>;
13
14
  static ɵprov: i0.ɵɵInjectableDeclaration<BasicModelDetailsService<any>>;
14
15
  }
@@ -2,6 +2,7 @@ import { OnInit } from '@angular/core';
2
2
  import { AttributeOptions, Referencable, ReLinkContainer, ReTreeChildrenContainer } from 'emfular';
3
3
  import { ModelService } from "../../model.service";
4
4
  import { ModelDetailsService } from "../model-details-service";
5
+ import { IdHelper } from "../../utils/id-helper";
5
6
  import * as i0 from "@angular/core";
6
7
  export declare class ModelDetailsComponent<T extends Referencable<any>, M extends Referencable<any>> implements OnInit {
7
8
  model: T;
@@ -14,6 +15,8 @@ export declare class ModelDetailsComponent<T extends Referencable<any>, M extend
14
15
  ngOnInit(): void;
15
16
  getLinks(): ReLinkContainer<any, any>[];
16
17
  getChildren(): ReTreeChildrenContainer<any>[];
18
+ chooseParent(): void;
19
+ protected readonly IdHelper: typeof IdHelper;
17
20
  static ɵfac: i0.ɵɵFactoryDeclaration<ModelDetailsComponent<any, any>, never>;
18
21
  static ɵcmp: i0.ɵɵComponentDeclaration<ModelDetailsComponent<any, any>, "lib-model-details", never, { "model": { "alias": "model"; "required": false; }; "modelService": { "alias": "modelService"; "required": false; }; "detailsService": { "alias": "detailsService"; "required": false; }; }, {}, never, never, true, never>;
19
22
  }
@@ -1,7 +1,8 @@
1
- import { Referencable } from "emfular";
1
+ import { Referencable, ReTreeChildrenContainer } from "emfular";
2
2
  import { ModelService } from "../model.service";
3
3
  import { Observable } from "rxjs";
4
4
  export interface ModelDetailsService<M extends Referencable<any>> {
5
5
  openDetails<T extends Referencable<any>>(elem: T, modelService: ModelService<M>): void;
6
6
  openModelChoice(modelService: ModelService<M>): Observable<Referencable<any>>;
7
+ openParentChoice(modelService: ModelService<M>): Observable<ReTreeChildrenContainer<any>>;
7
8
  }
@@ -1,6 +1,6 @@
1
1
  import { ElementRef, EventEmitter, OnInit } from '@angular/core';
2
2
  import { ModelService } from "../../model.service";
3
- import { Referencable } from 'emfular';
3
+ import { Referencable, ReTreeChildrenContainer } from 'emfular';
4
4
  import { BoundingBox } from 'ngx-svg-graphics';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class ModelCanvasComponent<M extends Referencable<any>> implements OnInit {
@@ -9,10 +9,12 @@ export declare class ModelCanvasComponent<M extends Referencable<any>> implement
9
9
  initialBBox: BoundingBox;
10
10
  modelService: ModelService<M>;
11
11
  chooseElement: EventEmitter<Referencable<any>>;
12
+ chooseReference: EventEmitter<ReTreeChildrenContainer<any>>;
12
13
  svgReady: EventEmitter<SVGSVGElement>;
13
14
  svg: ElementRef<SVGSVGElement>;
14
15
  ngOnInit(): void;
15
16
  choose(element: Referencable<any>): void;
17
+ chooseRef(reference: ReTreeChildrenContainer<any>): void;
16
18
  static ɵfac: i0.ɵɵFactoryDeclaration<ModelCanvasComponent<any>, never>;
17
- static ɵcmp: i0.ɵɵComponentDeclaration<ModelCanvasComponent<any>, "model-canvas", never, { "modelService": { "alias": "modelService"; "required": false; }; }, { "chooseElement": "chooseElement"; "svgReady": "svgReady"; }, never, never, true, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<ModelCanvasComponent<any>, "model-canvas", never, { "modelService": { "alias": "modelService"; "required": false; }; }, { "chooseElement": "chooseElement"; "chooseReference": "chooseReference"; "svgReady": "svgReady"; }, never, never, true, never>;
18
20
  }
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from '@angular/core';
2
- import { Referencable } from 'emfular';
2
+ import { Referencable, ReTreeChildrenContainer } from 'emfular';
3
3
  import { BoundingBox, PositionHelper } from 'ngx-svg-graphics';
4
4
  import { GraphicalHelper } from "../../utils/graphical-helper";
5
5
  import { IdHelper } from "../../utils/id-helper";
@@ -9,13 +9,16 @@ export declare class ReferencableBoxComponent {
9
9
  position: BoundingBox;
10
10
  color?: string;
11
11
  chooseElement: EventEmitter<Referencable<any>>;
12
+ chooseReference: EventEmitter<ReTreeChildrenContainer<any>>;
12
13
  isExpandedArray: boolean[];
14
+ constructor();
13
15
  toggleExpand(i: number): void;
16
+ createBoxInLastPart(bb: BoundingBox): BoundingBox;
14
17
  choose(element: Referencable<any>): void;
15
- constructor();
18
+ chooseRef(ref: ReTreeChildrenContainer<any>): void;
16
19
  protected readonly GraphicalHelper: typeof GraphicalHelper;
17
20
  protected readonly PositionHelper: typeof PositionHelper;
18
21
  protected readonly IdHelper: typeof IdHelper;
19
22
  static ɵfac: i0.ɵɵFactoryDeclaration<ReferencableBoxComponent, never>;
20
- static ɵcmp: i0.ɵɵComponentDeclaration<ReferencableBoxComponent, "[referencable-box]", never, { "referencable": { "alias": "referencable"; "required": false; }; "position": { "alias": "position"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, { "chooseElement": "chooseElement"; }, never, never, true, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<ReferencableBoxComponent, "[referencable-box]", never, { "referencable": { "alias": "referencable"; "required": false; }; "position": { "alias": "position"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, { "chooseElement": "chooseElement"; "chooseReference": "chooseReference"; }, never, never, true, never>;
21
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-emfular-integration",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Integrates emfular with its ngx-helper to provide modeling services",
5
5
  "keywords": [
6
6
  "EMFular",