ngx-relationship-visualiser 2.0.6 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -10
- package/esm2022/projects/ngx-relationship-visualiser-lib/lib/db/graphDatabase.mjs +3 -3
- package/esm2022/projects/ngx-relationship-visualiser-lib/lib/models/data.interface.mjs +1 -1
- package/esm2022/projects/ngx-relationship-visualiser-lib/lib/ngx-relationship-visualiser.module.mjs +4 -4
- package/esm2022/projects/ngx-relationship-visualiser-lib/lib/visualiser/context-menus/context-menus.component.mjs +3 -3
- package/esm2022/projects/ngx-relationship-visualiser-lib/lib/visualiser/modals/abstract-modal-form-handler.mjs +7 -3
- package/esm2022/projects/ngx-relationship-visualiser-lib/lib/visualiser/modals/modals.component.mjs +28 -5
- package/esm2022/projects/ngx-relationship-visualiser-lib/lib/visualiser/services/dagre-layout.service.mjs +3 -3
- package/esm2022/projects/ngx-relationship-visualiser-lib/lib/visualiser/services/visualiser-graph.service.mjs +5 -5
- package/esm2022/projects/ngx-relationship-visualiser-lib/lib/visualiser/visualiser-graph/visualiser-graph.component.mjs +6 -5
- package/fesm2022/ngx-relationship-visualiser.mjs +55 -27
- package/fesm2022/ngx-relationship-visualiser.mjs.map +1 -1
- package/package.json +8 -8
- package/projects/ngx-relationship-visualiser-lib/lib/models/data.interface.d.ts +1 -1
- package/projects/ngx-relationship-visualiser-lib/lib/visualiser/modals/modals.component.d.ts +5 -1
- package/projects/ngx-relationship-visualiser-lib/lib/visualiser/services/visualiser-graph.service.d.ts +1 -1
|
@@ -92,10 +92,10 @@ class ContextMenusComponent {
|
|
|
92
92
|
return null;
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
96
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
95
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ContextMenusComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
96
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ContextMenusComponent, selector: "app-context-menus", outputs: { editNodeContextMenuEvent: "editNodeContextMenuEvent", findCreateNodesContextMenuEvent: "findCreateNodesContextMenuEvent", createLinkContextMenuEvent: "createLinkContextMenuEvent", editLinkLabelContextMenuEvent: "editLinkLabelContextMenuEvent", editLinksContextMenuEvent: "editLinksContextMenuEvent" }, viewQueries: [{ propertyName: "editNodeContextMenu", first: true, predicate: ["editNodeContextMenu"], descendants: true }, { propertyName: "findCreateNodesContextMenu", first: true, predicate: ["findCreateNodesContextMenu"], descendants: true }, { propertyName: "createEditLinkContextMenu", first: true, predicate: ["createEditLinkContextMenu"], descendants: true }, { propertyName: "editLinkLabelContextMenu", first: true, predicate: ["editLinkLabelContextMenu"], descendants: true }], ngImport: i0, template: "<context-menu #editNodeContextMenu>\n <ng-template contextMenuItem let-item (execute)=\"editNode()\">\n Edit Node...\n </ng-template>\n</context-menu>\n\n<context-menu #findCreateNodesContextMenu>\n <ng-template contextMenuItem let-item (execute)=\"findNodes()\">\n Search Nodes...\n </ng-template>\n <ng-template contextMenuItem let-item (execute)=\"createNode()\">\n Create Node...\n </ng-template>\n</context-menu>\n\n<context-menu #createEditLinkContextMenu>\n <ng-template [visible]=\"linksDoNotExist\" contextMenuItem let-item (execute)=\"createLink($event.item)\">\n Create Link...\n </ng-template>\n <ng-template [visible]=\"linksExist\" (execute)=\"editLinks($event.item)\" contextMenuItem let-item>\n Edit Links...\n </ng-template>\n</context-menu>\n\n<context-menu #editLinkLabelContextMenu>\n <ng-template contextMenuItem let-item (execute)=\"editLinkLabel()\">\n Edit Link label...\n </ng-template>\n</context-menu>", dependencies: [{ kind: "component", type: i2.ContextMenuComponent, selector: "context-menu", inputs: ["menuClass", "autoFocus", "useBootstrap4", "disabled"], outputs: ["close", "open"] }, { kind: "directive", type: i2.ContextMenuItemDirective, selector: "[contextMenuItem]", inputs: ["subMenu", "divider", "enabled", "passive", "visible"], outputs: ["execute"] }] });
|
|
97
97
|
}
|
|
98
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ContextMenusComponent, decorators: [{
|
|
99
99
|
type: Component,
|
|
100
100
|
args: [{ selector: 'app-context-menus', template: "<context-menu #editNodeContextMenu>\n <ng-template contextMenuItem let-item (execute)=\"editNode()\">\n Edit Node...\n </ng-template>\n</context-menu>\n\n<context-menu #findCreateNodesContextMenu>\n <ng-template contextMenuItem let-item (execute)=\"findNodes()\">\n Search Nodes...\n </ng-template>\n <ng-template contextMenuItem let-item (execute)=\"createNode()\">\n Create Node...\n </ng-template>\n</context-menu>\n\n<context-menu #createEditLinkContextMenu>\n <ng-template [visible]=\"linksDoNotExist\" contextMenuItem let-item (execute)=\"createLink($event.item)\">\n Create Link...\n </ng-template>\n <ng-template [visible]=\"linksExist\" (execute)=\"editLinks($event.item)\" contextMenuItem let-item>\n Edit Links...\n </ng-template>\n</context-menu>\n\n<context-menu #editLinkLabelContextMenu>\n <ng-template contextMenuItem let-item (execute)=\"editLinkLabel()\">\n Edit Link label...\n </ng-template>\n</context-menu>" }]
|
|
101
101
|
}], propDecorators: { editNodeContextMenu: [{
|
|
@@ -364,7 +364,7 @@ class AbstractModalFormHandler {
|
|
|
364
364
|
addLabel() {
|
|
365
365
|
const labelGroup = this.fb.group({
|
|
366
366
|
label: ['', Validators.required],
|
|
367
|
-
linkIcon: [
|
|
367
|
+
linkIcon: [''],
|
|
368
368
|
});
|
|
369
369
|
this.labelArray.push(labelGroup);
|
|
370
370
|
}
|
|
@@ -414,7 +414,11 @@ class AbstractModalFormHandler {
|
|
|
414
414
|
const labelGroup = this.fb.group({
|
|
415
415
|
labelIndex: [relationship.labelIndex, Validators.required],
|
|
416
416
|
label: [relationship.label, Validators.required],
|
|
417
|
-
linkIcon: [
|
|
417
|
+
linkIcon: [
|
|
418
|
+
typeof relationship.linkIcon === 'string'
|
|
419
|
+
? relationship.linkIcon
|
|
420
|
+
: relationship.linkIcon ? '\uf0c1' : ''
|
|
421
|
+
]
|
|
418
422
|
});
|
|
419
423
|
this.labelArray.push(labelGroup);
|
|
420
424
|
});
|
|
@@ -472,10 +476,10 @@ class DexieService extends Dexie {
|
|
|
472
476
|
async deleteGraphData(dataId) {
|
|
473
477
|
await this.graphData.delete(dataId);
|
|
474
478
|
}
|
|
475
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
476
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
479
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DexieService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
480
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DexieService, providedIn: 'root' });
|
|
477
481
|
}
|
|
478
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
482
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DexieService, decorators: [{
|
|
479
483
|
type: Injectable,
|
|
480
484
|
args: [{
|
|
481
485
|
providedIn: 'root'
|
|
@@ -523,6 +527,7 @@ class ModalsComponent extends AbstractModalFormHandler {
|
|
|
523
527
|
}
|
|
524
528
|
if (changes.editNodeData && this.editNodeData) {
|
|
525
529
|
this.resetNodeForm();
|
|
530
|
+
this.loadSelectedNodeIcons(this.editNodeData);
|
|
526
531
|
this.populateEditNodeForm(this.editNodeData);
|
|
527
532
|
}
|
|
528
533
|
}
|
|
@@ -543,6 +548,7 @@ class ModalsComponent extends AbstractModalFormHandler {
|
|
|
543
548
|
}
|
|
544
549
|
if (template === this.createLinkModal) {
|
|
545
550
|
this.resetLinksForm();
|
|
551
|
+
this.addLabel();
|
|
546
552
|
void this.findEditLabelsAndImagesfromIDs();
|
|
547
553
|
}
|
|
548
554
|
if (template === this.createNodeModal) {
|
|
@@ -639,12 +645,33 @@ class ModalsComponent extends AbstractModalFormHandler {
|
|
|
639
645
|
this.resetLinksForm();
|
|
640
646
|
this.closeModal('modalRef');
|
|
641
647
|
}
|
|
648
|
+
toggleLinkIcon(index, event) {
|
|
649
|
+
const checkbox = event.target;
|
|
650
|
+
if (!(checkbox instanceof HTMLInputElement)) {
|
|
651
|
+
return;
|
|
652
|
+
}
|
|
653
|
+
this.labelArray.at(index).get('linkIcon')?.setValue(checkbox.checked ? '\uf0c1' : '');
|
|
654
|
+
}
|
|
655
|
+
getRelationshipIcon(linkIcon) {
|
|
656
|
+
return typeof linkIcon === 'string' ? linkIcon : linkIcon ? '\uf0c1' : '';
|
|
657
|
+
}
|
|
642
658
|
clearImageUrl() {
|
|
643
659
|
this.createNodeForm.get('imageUrl')?.setValue('');
|
|
644
660
|
}
|
|
661
|
+
onIconTypeChange(iconType) {
|
|
662
|
+
const controlToClear = iconType === 'url' ? 'icon' : 'imageUrl';
|
|
663
|
+
this.createNodeForm.get(controlToClear)?.setValue('');
|
|
664
|
+
}
|
|
645
665
|
trackByFn(item) {
|
|
646
666
|
return item.id;
|
|
647
667
|
}
|
|
668
|
+
loadSelectedNodeIcons(node) {
|
|
669
|
+
const lastSelectedIconIndex = [node.icon, node.additionalIcon].reduce((lastIndex, selectedIcon) => Math.max(lastIndex, this.fontAwesomeIcons.findIndex(({ icon }) => icon === selectedIcon)), -1);
|
|
670
|
+
const requiredLength = lastSelectedIconIndex + 1;
|
|
671
|
+
if (requiredLength > this.iconsBuffer.length) {
|
|
672
|
+
this.iconsBuffer = this.fontAwesomeIcons.slice(0, requiredLength);
|
|
673
|
+
}
|
|
674
|
+
}
|
|
648
675
|
onScrollToEnd() {
|
|
649
676
|
this.fetchMore();
|
|
650
677
|
}
|
|
@@ -664,12 +691,12 @@ class ModalsComponent extends AbstractModalFormHandler {
|
|
|
664
691
|
this.loading = false;
|
|
665
692
|
this.iconsBuffer = this.iconsBuffer.concat(more);
|
|
666
693
|
}
|
|
667
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
668
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ModalsComponent, selector: "app-modals", inputs: { editNodeData: "editNodeData", editLinksData: "editLinksData" }, outputs: { closeModalEvent: "closeModalEvent", createEditLinkEvent: "createEditLinkEvent", createEditNodeEvent: "createEditNodeEvent", deleteLinkEvent: "deleteLinkEvent", deleteNodeEvent: "deleteNodeEvent" }, viewQueries: [{ propertyName: "editNodeModal", first: true, predicate: ["editNodeModal"], descendants: true }, { propertyName: "createNodeModal", first: true, predicate: ["createNodeModal"], descendants: true }, { propertyName: "createLinkModal", first: true, predicate: ["createLinkModal"], descendants: true }, { propertyName: "editLinksModal", first: true, predicate: ["editLinksModal"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<!--EDIT NODE MODAL-->\n<ng-template #editNodeModal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title pull-left\">Edit Node</h4>\n <button type=\"button\" class=\"btn-close close pull-right\" aria-label=\"Close\" (click)=\"closeModal('modalRef')\">\n <span aria-hidden=\"true\" class=\"visually-hidden\">×</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"createNodeForm\">\n <div class=\"form-group\">\n <label for=\"iconType\">Icon Type</label>\n <div>\n <input type=\"radio\" id=\"imageUrl\" formControlName=\"iconType\" value=\"url\"> Image URL\n <input class=\"ml-5\" type=\"radio\" id=\"iconTypeSelect\" formControlName=\"iconType\" value=\"select\"> Choose Icon\n </div>\n </div>\n <div class=\"form-group\" *ngIf=\"createNodeForm.get('iconType')?.value === 'url'\">\n <label for=\"imageUrl\">Image URL</label>\n <div class=\"input-group\">\n <input type=\"text\" id=\"imageUrl\" formControlName=\"imageUrl\" class=\"form-control\" placeholder=\"Image URL\">\n <button type=\"button\" class=\"btn btn-outline-secondary\" (click)=\"clearImageUrl()\">Clear</button>\n </div>\n </div>\n <div class=\"form-group\" *ngIf=\"createNodeForm.get('iconType')?.value === 'select'\">\n <label for=\"nodeIcon\">Choose Icon</label>\n <ng-select\n formControlName=\"icon\"\n [items]=\"iconsBuffer\"\n [virtualScroll]=\"true\"\n [loading]=\"loading\"\n bindLabel=\"name\"\n bindValue=\"icon\"\n [editableSearchTerm]=\"true\"\n placeholder=\"Select icon\"\n appendTo=\"body\"\n [trackByFn]=\"trackByFn\"\n (scroll)=\"onScroll($event)\"\n (scrollToEnd)=\"onScrollToEnd()\"\n >\n <ng-template ng-header-tmp>\n <small class=\"form-text text-muted\"\n >Loaded {{ iconsBuffer.length }} of {{ fontAwesomeIcons.length }}</small\n >\n </ng-template>\n <ng-template ng-option-tmp let-item=\"item\">\n <i class=\"fa fa-light\">{{item.icon}}</i>\n <span class=\"ml-3\">{{ item.name }}</span>\n </ng-template>\n </ng-select>\n </div>\n <div *ngIf=\"createNodeForm.errors?.iconOrImage\" class=\"text-danger\">\n Please provide either an Image URL or choose an Icon, but not both.\n </div>\n <div class=\"form-group\">\n <label for=\"label\">Labels</label>\n <div formArrayName=\"label\">\n <div *ngFor=\"let label of nodeLabelArray.controls; let i = index\" [formGroupName]=\"i\"\n class=\"d-flex flex-column align-items-start\">\n <div class=\"d-flex align-items-center w-100\">\n <input formControlName=\"label\" class=\"form-control mb-2\" placeholder=\"Label\" [id]=\"'node-label-' + i\">\n <button type=\"button\" class=\"btn btn-danger ml-2\" (click)=\"removeNodeLabel(i)\" [disabled]=\"nodeLabelArray.length <= 1\">Remove</button>\n </div>\n </div>\n </div>\n <button type=\"button\" class=\"btn btn-secondary mt-2\" (click)=\"addNodeLabel()\">Add Label</button>\n </div>\n <div class=\"form-group\">\n <label for=\"nodeAdditionalIcon\">Additional icon</label>\n <ng-select\n formControlName=\"additionalIcon\"\n [items]=\"iconsBuffer\"\n [virtualScroll]=\"true\"\n [loading]=\"loading\"\n bindLabel=\"name\"\n bindValue=\"icon\"\n [editableSearchTerm]=\"true\"\n placeholder=\"Select icon\"\n appendTo=\"body\"\n [trackByFn]=\"trackByFn\"\n (scroll)=\"onScroll($event)\"\n (scrollToEnd)=\"onScrollToEnd()\"\n >\n <ng-template ng-header-tmp>\n <small class=\"form-text text-muted\"\n >Loaded {{ iconsBuffer.length }} of {{ fontAwesomeIcons.length }}</small\n >\n </ng-template>\n <ng-template ng-option-tmp let-item=\"item\">\n <i class=\"fa fa-light\">{{item.icon}}</i>\n <span class=\"ml-3\">{{ item.name }}</span>\n </ng-template>\n </ng-select>\n </div>\n </form>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"closeModal('modalRef')\">Cancel</button>\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"createEditNode('editNodeModal')\" [disabled]=\"!createNodeForm.valid\">Save Changes</button>\n <button type=\"button\" class=\"btn btn-danger\" (click)=\"deleteNode()\">Delete Node</button>\n </div>\n</ng-template>\n<!-- ./MODAL-->\n\n<!--CREATE NODE MODAL-->\n<ng-template #createNodeModal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title pull-left\">Create Node</h4>\n <button type=\"button\" class=\"btn-close close pull-right\" aria-label=\"Close\" (click)=\"closeModal('modalRef')\">\n <span aria-hidden=\"true\" class=\"visually-hidden\">×</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"createNodeForm\">\n <div class=\"form-group\">\n <label for=\"iconType\">Icon Type</label>\n <div>\n <input type=\"radio\" id=\"imageUrl\" formControlName=\"iconType\" value=\"url\"> Image URL\n <input class=\"ml-5\" type=\"radio\" id=\"iconTypeSelect\" formControlName=\"iconType\" value=\"select\"> Choose Icon\n </div>\n </div>\n <div class=\"form-group\" *ngIf=\"createNodeForm.get('iconType')?.value === 'url'\">\n <label for=\"imageUrl\">Image URL</label>\n <div class=\"input-group\">\n <input type=\"text\" id=\"imageUrl\" formControlName=\"imageUrl\" class=\"form-control\" placeholder=\"Image URL\">\n <button type=\"button\" class=\"btn btn-outline-secondary\" (click)=\"clearImageUrl()\">Clear</button>\n </div>\n </div>\n <div class=\"form-group\" *ngIf=\"createNodeForm.get('iconType')?.value === 'select'\">\n <label for=\"nodeIcon\">Choose Icon</label>\n <ng-select\n formControlName=\"icon\"\n [items]=\"iconsBuffer\"\n [virtualScroll]=\"true\"\n [loading]=\"loading\"\n bindLabel=\"name\"\n bindValue=\"icon\"\n [editableSearchTerm]=\"true\"\n placeholder=\"Select icon\"\n appendTo=\"body\"\n [trackByFn]=\"trackByFn\"\n (scroll)=\"onScroll($event)\"\n (scrollToEnd)=\"onScrollToEnd()\"\n >\n <ng-template ng-header-tmp>\n <small class=\"form-text text-muted\"\n >Loaded {{ iconsBuffer.length }} of {{ fontAwesomeIcons.length }}</small\n >\n </ng-template>\n <ng-template ng-option-tmp let-item=\"item\">\n <i class=\"fa fa-light\">{{item.icon}}</i>\n <span class=\"ml-3\">{{ item.name }}</span>\n </ng-template>\n </ng-select>\n </div>\n <div *ngIf=\"createNodeForm.errors?.iconOrImage\" class=\"text-danger\">\n Please provide either an Image URL or choose an Icon, but not both.\n </div>\n <div class=\"form-group\">\n <label for=\"label\">Labels</label>\n <div formArrayName=\"label\">\n <div *ngFor=\"let label of nodeLabelArray.controls; let i = index\" [formGroupName]=\"i\"\n class=\"d-flex flex-column align-items-start\">\n <div class=\"d-flex align-items-center w-100\">\n <input formControlName=\"label\" class=\"form-control mb-2\" placeholder=\"Label\" [id]=\"'node-label-' + i\">\n <button type=\"button\" class=\"btn btn-danger ml-2\" (click)=\"removeNodeLabel(i)\" [disabled]=\"nodeLabelArray.length <= 1\">Remove</button>\n </div>\n </div>\n </div>\n <button type=\"button\" class=\"btn btn-secondary mt-2\" (click)=\"addNodeLabel()\">Add Label</button>\n </div>\n <div class=\"form-group\">\n <label for=\"nodeAdditionalIcon\">Additional icon</label>\n <ng-select\n formControlName=\"additionalIcon\"\n [items]=\"iconsBuffer\"\n [virtualScroll]=\"true\"\n [loading]=\"loading\"\n bindLabel=\"name\"\n bindValue=\"icon\"\n [editableSearchTerm]=\"true\"\n placeholder=\"Select icon\"\n appendTo=\"body\"\n [trackByFn]=\"trackByFn\"\n (scroll)=\"onScroll($event)\"\n (scrollToEnd)=\"onScrollToEnd()\"\n >\n <ng-template ng-header-tmp>\n <small class=\"form-text text-muted\"\n >Loaded {{ iconsBuffer.length }} of {{ fontAwesomeIcons.length }}</small\n >\n </ng-template>\n <ng-template ng-option-tmp let-item=\"item\">\n <i class=\"fa fa-light\">{{item.icon}}</i>\n <span class=\"ml-3\">{{ item.name }}</span>\n </ng-template>\n </ng-select>\n </div>\n </form>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"closeModal('modalRef')\">Cancel</button>\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"createEditNode('createNodeModal')\" [disabled]=\"!createNodeForm.valid\">Create Node</button>\n </div>\n</ng-template>\n<!-- ./MODAL-->\n\n<!--EDIT LINKS MODAL-->\n<ng-template #editLinksModal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title pull-left\">Edit Links</h4>\n <button type=\"button\" class=\"btn-close close pull-right\" aria-label=\"Close\" (click)=\"closeModal('modalRef')\">\n <span aria-hidden=\"true\" class=\"visually-hidden\">×</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"createLinkForm\">\n <div class=\"col-sm-12 d-flex flex-column\">\n <div class=\"d-flex mb-3\">\n <div class=\"iconImage\">\n <span><i class=\"fas fa-arrow-left\"></i></span>\n <span class=\"arrow\">\n <input type=\"checkbox\" id=\"sourceArrow\" formControlName=\"sourceArrow\" class=\"form-check-input\">\n <label class=\"d-none form-check-label\" for=\"leftArrow\"></label>\n </span>\n </div>\n <div class=\"iconImage ml-3\">\n <ng-container *ngIf=\"targetImageUrl; else targetIconTemplate\">\n <img class=\"imageUrl\" [src]=\"targetImageUrl\" />\n </ng-container>\n <ng-template #targetIconTemplate>\n <i class=\"fa-solid fa-2x\">{{targetIcon}}</i>\n </ng-template>\n </div>\n <div\n [ngClass]=\"{\n 'link-line-solid': createLinkForm.get('lineStyle')?.value === 'Solid',\n 'link-line-dotted': createLinkForm.get('lineStyle')?.value === 'Dotted'\n }\"\n >\n </div>\n <div class=\"iconImage mr-3\">\n <ng-container *ngIf=\"sourceImageUrl; else sourceIconTemplate\">\n <img class=\"imageUrl\" [src]=\"sourceImageUrl\" />\n </ng-container>\n <ng-template #sourceIconTemplate>\n <i class=\"fa-solid fa-2x\">{{sourceIcon}}</i>\n </ng-template>\n </div>\n <div class=\"iconImage\">\n <span><i class=\"fas fa-arrow-right\"></i></span>\n <span class=\"arrow\">\n <input type=\"checkbox\" id=\"targetArrow\" formControlName=\"targetArrow\" class=\"form-check-input\">\n <label class=\"form-check-label\" for=\"rightArrow\"></label>\n </span>\n </div>\n </div>\n <div class=\"d-flex justify-content-between mb-3\">\n <div class=\"text-left d-block font-weight-bold\" style=\"font-size: 12px\">\n <span class=\"d-block\" *ngFor=\"let label of targetLabels\">{{ label }}</span>\n </div>\n <div class=\"text-right d-block font-weight-bold\" style=\"font-size: 12px\">\n <span class=\"d-block\" *ngFor=\"let label of sourceLabels\">{{ label }}</span>\n </div>\n </div>\n <div *ngIf=\"createLinkForm.get('label')?.value?.length\" class=\"labelPosition text-center\">\n <span *ngFor=\"let label of createLinkForm.get('label')?.value\">\n <span class=\"d-block\">{{ label.label }} <span style=\"color: #856404;\" *ngIf=\"label.linkIcon\"><i class=\"fas fa-link\"></i></span></span>\n </span>\n </div>\n </div>\n <div class=\"form-group\">\n <label for=\"lineStyle\">Line Style</label>\n <select id=\"lineStyle\" formControlName=\"lineStyle\" class=\"form-control\">\n <option value=\"Solid\">Solid</option>\n <option value=\"Dotted\">Dotted</option>\n </select>\n </div>\n\n <div class=\"form-group\">\n <label for=\"label\">Labels</label>\n <div formArrayName=\"label\">\n <div *ngFor=\"let label of labelArray.controls; let i = index\" [formGroupName]=\"i\"\n class=\"d-flex flex-column align-items-start\">\n <div class=\"d-flex align-items-center w-100\">\n <input formControlName=\"label\" class=\"form-control\" placeholder=\"Label\" [id]=\"'label-' + i\">\n <button type=\"button\" class=\"btn btn-danger ml-2\" (click)=\"removeLabel(i)\" [disabled]=\"labelArray.length <= 1\">Remove</button>\n </div>\n <div class=\"form-group form-check\">\n <input type=\"checkbox\" formControlName=\"linkIcon\" class=\"form-check-input\" [id]=\"'linkIcon-' + i\">\n <label [for]=\"'linkIcon-' + i\">Link Icon?</label>\n </div>\n </div>\n </div>\n <button type=\"button\" class=\"btn btn-secondary mt-2\" (click)=\"addLabel()\">Add Label</button>\n </div>\n </form>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"closeModal('modalRef')\">Cancel</button>\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"createEditLink('editLinkModal')\" [disabled]=\"!createLinkForm.valid\">Save Changes</button>\n <button type=\"button\" class=\"btn btn-danger\" (click)=\"deleteLink()\">Delete Link</button>\n </div>\n</ng-template>\n<!-- ./MODAL-->\n\n\n<!--CREATE LINK MODAL-->\n<ng-template #createLinkModal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title pull-left\">Create Link</h4>\n <button type=\"button\" class=\"btn-close close pull-right\" aria-label=\"Close\" (click)=\"closeModal('modalRef')\">\n <span aria-hidden=\"true\" class=\"visually-hidden\">×</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"createLinkForm\">\n <div class=\"col-sm-12 d-flex flex-column\">\n <div class=\"d-flex mb-3\">\n <div class=\"iconImage\">\n <span><i class=\"fas fa-arrow-left\"></i></span>\n <span class=\"arrow\">\n <input type=\"checkbox\" id=\"sourceArrow\" formControlName=\"sourceArrow\" class=\"form-check-input\">\n <label class=\"d-none form-check-label\" for=\"leftArrow\"></label>\n </span>\n </div>\n <div class=\"iconImage ml-3\">\n <ng-container *ngIf=\"targetImageUrl; else targetIconTemplate\">\n <img class=\"imageUrl\" [src]=\"targetImageUrl\" />\n </ng-container>\n <ng-template #targetIconTemplate>\n <i class=\"fa-solid fa-2x\">{{targetIcon}}</i>\n </ng-template>\n </div>\n <div\n [ngClass]=\"{\n 'link-line-solid': createLinkForm.get('lineStyle')?.value === 'Solid',\n 'link-line-dotted': createLinkForm.get('lineStyle')?.value === 'Dotted'\n }\"\n >\n </div>\n <div class=\"iconImage mr-3\">\n <ng-container *ngIf=\"sourceImageUrl; else sourceIconTemplate\">\n <img class=\"imageUrl\" [src]=\"sourceImageUrl\" />\n </ng-container>\n <ng-template #sourceIconTemplate>\n <i class=\"fa-solid fa-2x\">{{sourceIcon}}</i>\n </ng-template>\n </div>\n <div class=\"iconImage\">\n <span><i class=\"fas fa-arrow-right\"></i></span>\n <span class=\"arrow\">\n <input type=\"checkbox\" id=\"targetArrow\" formControlName=\"targetArrow\" class=\"form-check-input\">\n <label class=\"form-check-label\" for=\"rightArrow\"></label>\n </span>\n </div>\n </div>\n <div class=\"d-flex justify-content-between mb-3\">\n <div class=\"text-left d-block font-weight-bold\" style=\"font-size: 12px\">\n <span class=\"d-block\" *ngFor=\"let label of targetLabels\">{{ label }}</span>\n </div>\n <div class=\"text-right d-block font-weight-bold\" style=\"font-size: 12px\">\n <span class=\"d-block\" *ngFor=\"let label of sourceLabels\">{{ label }}</span>\n </div>\n </div>\n <div *ngIf=\"createLinkForm.get('label')?.value?.length\" class=\"labelPosition text-center\">\n <span *ngFor=\"let label of createLinkForm.get('label')?.value\">\n <span class=\"d-block\">{{ label.label }} <span style=\"color: #856404;\" *ngIf=\"label.linkIcon\"><i class=\"fas fa-link\"></i></span></span>\n </span>\n </div>\n </div>\n <div class=\"form-group\">\n <label for=\"lineStyle\">Line Style</label>\n <select id=\"lineStyle\" formControlName=\"lineStyle\" class=\"form-control\">\n <option value=\"Solid\">Solid</option>\n <option value=\"Dotted\">Dotted</option>\n </select>\n </div>\n\n <div class=\"form-group\">\n <label for=\"label\">Labels</label>\n <div formArrayName=\"label\">\n <div *ngFor=\"let label of labelArray.controls; let i = index\" [formGroupName]=\"i\"\n class=\"d-flex flex-column align-items-start\">\n <div class=\"d-flex align-items-center w-100\">\n <input formControlName=\"label\" class=\"form-control\" placeholder=\"Label\" [id]=\"'label-' + i\">\n <button type=\"button\" class=\"btn btn-danger ml-2\" (click)=\"removeLabel(i)\" [disabled]=\"labelArray.length <= 1\">Remove</button>\n </div>\n <div class=\"form-group form-check\">\n <input type=\"checkbox\" formControlName=\"linkIcon\" class=\"form-check-input\" [id]=\"'linkIcon-' + i\">\n <label [for]=\"'linkIcon-' + i\">Link Icon?</label>\n </div>\n </div>\n </div>\n <button type=\"button\" class=\"btn btn-secondary mt-2\" (click)=\"addLabel()\">Add Label</button>\n </div>\n </form>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"closeModal('modalRef')\">Cancel</button>\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"createEditLink('createLinkModal')\" [disabled]=\"!createLinkForm.valid\">Create Link</button>\n </div>\n</ng-template>\n<!-- ./MODAL-->", styles: [".imageUrl{max-width:30px}.labelPosition{position:relative;top:-55px;margin-right:30px;margin-left:30px}.link-line-solid{width:100%;position:relative;margin:15px;border-top:2px solid #777}.link-line-dotted{width:100%;position:relative;margin:15px;background-image:repeating-linear-gradient(to right,#cacaca,#cacaca 7px,transparent 7px,transparent 15px);height:2px}.iconImage{position:relative;top:4px}.arrow{position:absolute;top:20px;left:20px}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$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: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2$1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: i5.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i5.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "directive", type: i5.NgHeaderTemplateDirective, selector: "[ng-header-tmp]" }] });
|
|
694
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ModalsComponent, deps: [{ token: i1.BsModalService }, { token: i2$1.FormBuilder }, { token: DexieService }], target: i0.ɵɵFactoryTarget.Component });
|
|
695
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ModalsComponent, selector: "app-modals", inputs: { editNodeData: "editNodeData", editLinksData: "editLinksData" }, outputs: { closeModalEvent: "closeModalEvent", createEditLinkEvent: "createEditLinkEvent", createEditNodeEvent: "createEditNodeEvent", deleteLinkEvent: "deleteLinkEvent", deleteNodeEvent: "deleteNodeEvent" }, viewQueries: [{ propertyName: "editNodeModal", first: true, predicate: ["editNodeModal"], descendants: true }, { propertyName: "createNodeModal", first: true, predicate: ["createNodeModal"], descendants: true }, { propertyName: "createLinkModal", first: true, predicate: ["createLinkModal"], descendants: true }, { propertyName: "editLinksModal", first: true, predicate: ["editLinksModal"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<!--EDIT NODE MODAL-->\n<ng-template #editNodeModal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title pull-left\">Edit Node</h4>\n <button type=\"button\" class=\"btn-close close pull-right\" aria-label=\"Close\" (click)=\"closeModal('modalRef')\">\n <span aria-hidden=\"true\" class=\"visually-hidden\">×</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"createNodeForm\">\n <div class=\"form-group\">\n <label for=\"iconType\">Icon Type</label>\n <div>\n <input type=\"radio\" id=\"imageUrl\" formControlName=\"iconType\" value=\"url\" (change)=\"onIconTypeChange('url')\"> Image URL\n <input class=\"ml-5\" type=\"radio\" id=\"iconTypeSelect\" formControlName=\"iconType\" value=\"select\" (change)=\"onIconTypeChange('select')\"> Choose Icon\n </div>\n </div>\n @if (createNodeForm.get('iconType')?.value === 'url') {\n <div class=\"form-group\">\n <label for=\"imageUrl\">Image URL</label>\n <div class=\"input-group\">\n <input type=\"text\" id=\"imageUrl\" formControlName=\"imageUrl\" class=\"form-control\" placeholder=\"Image URL\">\n <button type=\"button\" class=\"btn btn-outline-secondary\" (click)=\"clearImageUrl()\">Clear</button>\n </div>\n </div>\n }\n @if (createNodeForm.get('iconType')?.value === 'select') {\n <div class=\"form-group\">\n <label for=\"nodeIcon\">Choose Icon</label>\n <ng-select\n formControlName=\"icon\"\n [items]=\"iconsBuffer\"\n [virtualScroll]=\"true\"\n [loading]=\"loading\"\n bindLabel=\"name\"\n bindValue=\"icon\"\n placeholder=\"Select icon\"\n appendTo=\"body\"\n [trackByFn]=\"trackByFn\"\n (scroll)=\"onScroll($event)\"\n (scrollToEnd)=\"onScrollToEnd()\"\n >\n <ng-template ng-header-tmp>\n <small class=\"form-text text-muted\"\n >Loaded {{ iconsBuffer.length }} of {{ fontAwesomeIcons.length }}</small\n >\n </ng-template>\n <ng-template ng-option-tmp let-item=\"item\">\n <i class=\"fa fa-light\">{{item.icon}}</i>\n <span class=\"ml-3\">{{ item.name }}</span>\n </ng-template>\n </ng-select>\n </div>\n }\n @if (createNodeForm.errors?.iconOrImage) {\n <div class=\"text-danger\">\n Please provide either an Image URL or choose an Icon, but not both.\n </div>\n }\n <div class=\"form-group\">\n <label for=\"label\">Labels</label>\n <div formArrayName=\"label\">\n @for (label of nodeLabelArray.controls; track label; let i = $index) {\n <div [formGroupName]=\"i\"\n class=\"d-flex flex-column align-items-start\">\n <div class=\"d-flex align-items-center w-100\">\n <input formControlName=\"label\" class=\"form-control mb-2\" placeholder=\"Label\" [id]=\"'node-label-' + i\">\n <button type=\"button\" class=\"btn btn-danger ml-2\" (click)=\"removeNodeLabel(i)\" [disabled]=\"nodeLabelArray.length <= 1\">Remove</button>\n </div>\n </div>\n }\n </div>\n <button type=\"button\" class=\"btn btn-secondary mt-2\" (click)=\"addNodeLabel()\">Add Label</button>\n </div>\n <div class=\"form-group\">\n <label for=\"nodeAdditionalIcon\">Additional icon</label>\n <ng-select\n formControlName=\"additionalIcon\"\n [items]=\"iconsBuffer\"\n [virtualScroll]=\"true\"\n [loading]=\"loading\"\n bindLabel=\"name\"\n bindValue=\"icon\"\n placeholder=\"Select icon\"\n appendTo=\"body\"\n [trackByFn]=\"trackByFn\"\n (scroll)=\"onScroll($event)\"\n (scrollToEnd)=\"onScrollToEnd()\"\n >\n <ng-template ng-header-tmp>\n <small class=\"form-text text-muted\"\n >Loaded {{ iconsBuffer.length }} of {{ fontAwesomeIcons.length }}</small\n >\n </ng-template>\n <ng-template ng-option-tmp let-item=\"item\">\n <i class=\"fa fa-light\">{{item.icon}}</i>\n <span class=\"ml-3\">{{ item.name }}</span>\n </ng-template>\n </ng-select>\n </div>\n </form>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"closeModal('modalRef')\">Cancel</button>\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"createEditNode('editNodeModal')\" [disabled]=\"!createNodeForm.valid\">Save Changes</button>\n <button type=\"button\" class=\"btn btn-danger\" (click)=\"deleteNode()\">Delete Node</button>\n </div>\n </ng-template>\n <!-- ./MODAL-->\n\n <!--CREATE NODE MODAL-->\n <ng-template #createNodeModal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title pull-left\">Create Node</h4>\n <button type=\"button\" class=\"btn-close close pull-right\" aria-label=\"Close\" (click)=\"closeModal('modalRef')\">\n <span aria-hidden=\"true\" class=\"visually-hidden\">×</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"createNodeForm\">\n <div class=\"form-group\">\n <label for=\"iconType\">Icon Type</label>\n <div>\n <input type=\"radio\" id=\"imageUrl\" formControlName=\"iconType\" value=\"url\" (change)=\"onIconTypeChange('url')\"> Image URL\n <input class=\"ml-5\" type=\"radio\" id=\"iconTypeSelect\" formControlName=\"iconType\" value=\"select\" (change)=\"onIconTypeChange('select')\"> Choose Icon\n </div>\n </div>\n @if (createNodeForm.get('iconType')?.value === 'url') {\n <div class=\"form-group\">\n <label for=\"imageUrl\">Image URL</label>\n <div class=\"input-group\">\n <input type=\"text\" id=\"imageUrl\" formControlName=\"imageUrl\" class=\"form-control\" placeholder=\"Image URL\">\n <button type=\"button\" class=\"btn btn-outline-secondary\" (click)=\"clearImageUrl()\">Clear</button>\n </div>\n </div>\n }\n @if (createNodeForm.get('iconType')?.value === 'select') {\n <div class=\"form-group\">\n <label for=\"nodeIcon\">Choose Icon</label>\n <ng-select\n formControlName=\"icon\"\n [items]=\"iconsBuffer\"\n [virtualScroll]=\"true\"\n [loading]=\"loading\"\n bindLabel=\"name\"\n bindValue=\"icon\"\n placeholder=\"Select icon\"\n appendTo=\"body\"\n [trackByFn]=\"trackByFn\"\n (scroll)=\"onScroll($event)\"\n (scrollToEnd)=\"onScrollToEnd()\"\n >\n <ng-template ng-header-tmp>\n <small class=\"form-text text-muted\"\n >Loaded {{ iconsBuffer.length }} of {{ fontAwesomeIcons.length }}</small\n >\n </ng-template>\n <ng-template ng-option-tmp let-item=\"item\">\n <i class=\"fa fa-light\">{{item.icon}}</i>\n <span class=\"ml-3\">{{ item.name }}</span>\n </ng-template>\n </ng-select>\n </div>\n }\n @if (createNodeForm.errors?.iconOrImage) {\n <div class=\"text-danger\">\n Please provide either an Image URL or choose an Icon, but not both.\n </div>\n }\n <div class=\"form-group\">\n <label for=\"label\">Labels</label>\n <div formArrayName=\"label\">\n @for (label of nodeLabelArray.controls; track label; let i = $index) {\n <div [formGroupName]=\"i\"\n class=\"d-flex flex-column align-items-start\">\n <div class=\"d-flex align-items-center w-100\">\n <input formControlName=\"label\" class=\"form-control mb-2\" placeholder=\"Label\" [id]=\"'node-label-' + i\">\n <button type=\"button\" class=\"btn btn-danger ml-2\" (click)=\"removeNodeLabel(i)\" [disabled]=\"nodeLabelArray.length <= 1\">Remove</button>\n </div>\n </div>\n }\n </div>\n <button type=\"button\" class=\"btn btn-secondary mt-2\" (click)=\"addNodeLabel()\">Add Label</button>\n </div>\n <div class=\"form-group\">\n <label for=\"nodeAdditionalIcon\">Additional icon</label>\n <ng-select\n formControlName=\"additionalIcon\"\n [items]=\"iconsBuffer\"\n [virtualScroll]=\"true\"\n [loading]=\"loading\"\n bindLabel=\"name\"\n bindValue=\"icon\"\n placeholder=\"Select icon\"\n appendTo=\"body\"\n [trackByFn]=\"trackByFn\"\n (scroll)=\"onScroll($event)\"\n (scrollToEnd)=\"onScrollToEnd()\"\n >\n <ng-template ng-header-tmp>\n <small class=\"form-text text-muted\"\n >Loaded {{ iconsBuffer.length }} of {{ fontAwesomeIcons.length }}</small\n >\n </ng-template>\n <ng-template ng-option-tmp let-item=\"item\">\n <i class=\"fa fa-light\">{{item.icon}}</i>\n <span class=\"ml-3\">{{ item.name }}</span>\n </ng-template>\n </ng-select>\n </div>\n </form>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"closeModal('modalRef')\">Cancel</button>\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"createEditNode('createNodeModal')\" [disabled]=\"!createNodeForm.valid\">Create Node</button>\n </div>\n </ng-template>\n <!-- ./MODAL-->\n\n <!--EDIT LINKS MODAL-->\n <ng-template #editLinksModal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title pull-left\">Edit Links</h4>\n <button type=\"button\" class=\"btn-close close pull-right\" aria-label=\"Close\" (click)=\"closeModal('modalRef')\">\n <span aria-hidden=\"true\" class=\"visually-hidden\">×</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"createLinkForm\">\n <div class=\"col-sm-12 d-flex flex-column\">\n <div class=\"d-flex mb-3\">\n <div class=\"iconImage\">\n <span><i class=\"fas fa-arrow-left\"></i></span>\n <span class=\"arrow\">\n <input type=\"checkbox\" id=\"sourceArrow\" formControlName=\"sourceArrow\" class=\"form-check-input\">\n <label class=\"d-none form-check-label\" for=\"leftArrow\"></label>\n </span>\n </div>\n <div class=\"iconImage ml-3\">\n @if (targetImageUrl) {\n <img class=\"imageUrl\" [src]=\"targetImageUrl\" />\n } @else {\n <i class=\"fa-solid fa-2x\">{{targetIcon}}</i>\n }\n </div>\n <div\n [ngClass]=\"{\n 'link-line-solid': createLinkForm.get('lineStyle')?.value === 'Solid',\n 'link-line-dotted': createLinkForm.get('lineStyle')?.value === 'Dotted'\n }\"\n >\n </div>\n <div class=\"iconImage mr-3\">\n @if (sourceImageUrl) {\n <img class=\"imageUrl\" [src]=\"sourceImageUrl\" />\n } @else {\n <i class=\"fa-solid fa-2x\">{{sourceIcon}}</i>\n }\n </div>\n <div class=\"iconImage\">\n <span><i class=\"fas fa-arrow-right\"></i></span>\n <span class=\"arrow\">\n <input type=\"checkbox\" id=\"targetArrow\" formControlName=\"targetArrow\" class=\"form-check-input\">\n <label class=\"form-check-label\" for=\"rightArrow\"></label>\n </span>\n </div>\n </div>\n <div class=\"d-flex justify-content-between mb-3\">\n <div class=\"text-left d-block font-weight-bold\" style=\"font-size: 12px\">\n @for (label of targetLabels; track $index) {\n <span class=\"d-block\">{{ label }}</span>\n }\n </div>\n <div class=\"text-right d-block font-weight-bold\" style=\"font-size: 12px\">\n @for (label of sourceLabels; track $index) {\n <span class=\"d-block\">{{ label }}</span>\n }\n </div>\n </div>\n @if (createLinkForm.get('label')?.value?.length) {\n <div class=\"labelPosition text-center\">\n @for (label of createLinkForm.get('label')?.value; track label) {\n <span>\n <span class=\"d-block\">{{ label.label }} @if (label.linkIcon) {\n <span style=\"color: #856404;\"><i class=\"fa fa-light\">{{ getRelationshipIcon(label.linkIcon) }}</i></span>\n }</span>\n </span>\n }\n </div>\n }\n </div>\n <div class=\"form-group\">\n <label for=\"lineStyle\">Line Style</label>\n <select id=\"lineStyle\" formControlName=\"lineStyle\" class=\"form-control\">\n <option value=\"Solid\">Solid</option>\n <option value=\"Dotted\">Dotted</option>\n </select>\n </div>\n\n <div class=\"form-group\">\n <label for=\"label\">Labels</label>\n <div formArrayName=\"label\">\n @for (label of labelArray.controls; track label; let i = $index) {\n <div [formGroupName]=\"i\"\n class=\"d-flex flex-column align-items-start\">\n <div class=\"d-flex align-items-center w-100\">\n <input formControlName=\"label\" class=\"form-control\" placeholder=\"Label\" [id]=\"'label-' + i\">\n <button type=\"button\" class=\"btn btn-danger ml-2\" (click)=\"removeLabel(i)\" [disabled]=\"labelArray.length <= 1\">Remove</button>\n </div>\n <div class=\"form-group form-check\">\n <input type=\"checkbox\" class=\"form-check-input\" [id]=\"'linkIcon-' + i\" [checked]=\"!!label.get('linkIcon')?.value\" (change)=\"toggleLinkIcon(i, $event)\">\n <label [for]=\"'linkIcon-' + i\">Link Icon?</label>\n </div>\n @if (label.get('linkIcon')?.value) {\n <ng-select\n class=\"link-icon-select\"\n formControlName=\"linkIcon\"\n [items]=\"fontAwesomeIcons\"\n bindLabel=\"name\"\n bindValue=\"icon\"\n placeholder=\"Select link icon\"\n appendTo=\"body\"\n [trackByFn]=\"trackByFn\">\n <ng-template ng-option-tmp let-item=\"item\">\n <i class=\"fa fa-light\">{{ item.icon }}</i>\n <span class=\"ml-3\">{{ item.name }}</span>\n </ng-template>\n </ng-select>\n }\n </div>\n }\n </div>\n <button type=\"button\" class=\"btn btn-secondary mt-2\" (click)=\"addLabel()\">Add another label</button>\n </div>\n </form>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"closeModal('modalRef')\">Cancel</button>\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"createEditLink('editLinkModal')\" [disabled]=\"!createLinkForm.valid\">Save Changes</button>\n <button type=\"button\" class=\"btn btn-danger\" (click)=\"deleteLink()\">Delete Link</button>\n </div>\n </ng-template>\n <!-- ./MODAL-->\n\n\n <!--CREATE LINK MODAL-->\n <ng-template #createLinkModal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title pull-left\">Create Link</h4>\n <button type=\"button\" class=\"btn-close close pull-right\" aria-label=\"Close\" (click)=\"closeModal('modalRef')\">\n <span aria-hidden=\"true\" class=\"visually-hidden\">×</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"createLinkForm\">\n <div class=\"col-sm-12 d-flex flex-column\">\n <div class=\"d-flex mb-3\">\n <div class=\"iconImage\">\n <span><i class=\"fas fa-arrow-left\"></i></span>\n <span class=\"arrow\">\n <input type=\"checkbox\" id=\"sourceArrow\" formControlName=\"sourceArrow\" class=\"form-check-input\">\n <label class=\"d-none form-check-label\" for=\"leftArrow\"></label>\n </span>\n </div>\n <div class=\"iconImage ml-3\">\n @if (targetImageUrl) {\n <img class=\"imageUrl\" [src]=\"targetImageUrl\" />\n } @else {\n <i class=\"fa-solid fa-2x\">{{targetIcon}}</i>\n }\n </div>\n <div\n [ngClass]=\"{\n 'link-line-solid': createLinkForm.get('lineStyle')?.value === 'Solid',\n 'link-line-dotted': createLinkForm.get('lineStyle')?.value === 'Dotted'\n }\"\n >\n </div>\n <div class=\"iconImage mr-3\">\n @if (sourceImageUrl) {\n <img class=\"imageUrl\" [src]=\"sourceImageUrl\" />\n } @else {\n <i class=\"fa-solid fa-2x\">{{sourceIcon}}</i>\n }\n </div>\n <div class=\"iconImage\">\n <span><i class=\"fas fa-arrow-right\"></i></span>\n <span class=\"arrow\">\n <input type=\"checkbox\" id=\"targetArrow\" formControlName=\"targetArrow\" class=\"form-check-input\">\n <label class=\"form-check-label\" for=\"rightArrow\"></label>\n </span>\n </div>\n </div>\n <div class=\"d-flex justify-content-between mb-3\">\n <div class=\"text-left d-block font-weight-bold\" style=\"font-size: 12px\">\n @for (label of targetLabels; track $index) {\n <span class=\"d-block\">{{ label }}</span>\n }\n </div>\n <div class=\"text-right d-block font-weight-bold\" style=\"font-size: 12px\">\n @for (label of sourceLabels; track $index) {\n <span class=\"d-block\">{{ label }}</span>\n }\n </div>\n </div>\n @if (createLinkForm.get('label')?.value?.length) {\n <div class=\"labelPosition text-center\">\n @for (label of createLinkForm.get('label')?.value; track label) {\n <span>\n <span class=\"d-block\">{{ label.label }} @if (label.linkIcon) {\n <span style=\"color: #856404;\"><i class=\"fa fa-light\">{{ getRelationshipIcon(label.linkIcon) }}</i></span>\n }</span>\n </span>\n }\n </div>\n }\n </div>\n <div class=\"form-group\">\n <label for=\"lineStyle\">Line Style</label>\n <select id=\"lineStyle\" formControlName=\"lineStyle\" class=\"form-control\">\n <option value=\"Solid\">Solid</option>\n <option value=\"Dotted\">Dotted</option>\n </select>\n </div>\n\n <div class=\"form-group\">\n <label for=\"label\">Labels</label>\n <div formArrayName=\"label\">\n @for (label of labelArray.controls; track label; let i = $index) {\n <div [formGroupName]=\"i\"\n class=\"d-flex flex-column align-items-start\">\n <div class=\"d-flex align-items-center w-100\">\n <input formControlName=\"label\" class=\"form-control\" placeholder=\"Label\" [id]=\"'label-' + i\">\n <button type=\"button\" class=\"btn btn-danger ml-2\" (click)=\"removeLabel(i)\" [disabled]=\"labelArray.length <= 1\">Remove</button>\n </div>\n <div class=\"form-group form-check\">\n <input type=\"checkbox\" class=\"form-check-input\" [id]=\"'linkIcon-' + i\" [checked]=\"!!label.get('linkIcon')?.value\" (change)=\"toggleLinkIcon(i, $event)\">\n <label [for]=\"'linkIcon-' + i\">Link Icon?</label>\n </div>\n @if (label.get('linkIcon')?.value) {\n <ng-select\n class=\"link-icon-select\"\n formControlName=\"linkIcon\"\n [items]=\"fontAwesomeIcons\"\n bindLabel=\"name\"\n bindValue=\"icon\"\n placeholder=\"Select link icon\"\n appendTo=\"body\"\n [trackByFn]=\"trackByFn\">\n <ng-template ng-option-tmp let-item=\"item\">\n <i class=\"fa fa-light\">{{ item.icon }}</i>\n <span class=\"ml-3\">{{ item.name }}</span>\n </ng-template>\n </ng-select>\n }\n </div>\n }\n </div>\n <button type=\"button\" class=\"btn btn-secondary mt-2\" (click)=\"addLabel()\">Add another label</button>\n </div>\n </form>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"closeModal('modalRef')\">Cancel</button>\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"createEditLink('createLinkModal')\" [disabled]=\"!createLinkForm.valid\">Create Link</button>\n </div>\n </ng-template>\n <!-- ./MODAL-->", styles: [".imageUrl{max-width:30px}.labelPosition{position:relative;top:-55px;margin-right:30px;margin-left:30px}.link-line-solid{width:100%;position:relative;margin:15px;border-top:2px solid #777}.link-line-dotted{width:100%;position:relative;margin:15px;background-image:repeating-linear-gradient(to right,#cacaca,#cacaca 7px,transparent 7px,transparent 15px);height:2px}.iconImage{position:relative;top:4px}.link-icon-select{width:250px}.arrow{position:absolute;top:20px;left:20px}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$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: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2$1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: i5.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "ariaLabel", "markFirst", "placeholder", "fixedPlaceholder", "notFoundText", "typeToSearchText", "preventToggleOnRightClick", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "ngClass", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick", "keyDownFn"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i5.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "directive", type: i5.NgHeaderTemplateDirective, selector: "[ng-header-tmp]" }] });
|
|
669
696
|
}
|
|
670
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
697
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ModalsComponent, decorators: [{
|
|
671
698
|
type: Component,
|
|
672
|
-
args: [{ selector: 'app-modals', template: "<!--EDIT NODE MODAL-->\n<ng-template #editNodeModal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title pull-left\">Edit Node</h4>\n <button type=\"button\" class=\"btn-close close pull-right\" aria-label=\"Close\" (click)=\"closeModal('modalRef')\">\n <span aria-hidden=\"true\" class=\"visually-hidden\">×</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"createNodeForm\">\n <div class=\"form-group\">\n <label for=\"iconType\">Icon Type</label>\n <div>\n <input type=\"radio\" id=\"imageUrl\" formControlName=\"iconType\" value=\"url\"> Image URL\n <input class=\"ml-5\" type=\"radio\" id=\"iconTypeSelect\" formControlName=\"iconType\" value=\"select\"> Choose Icon\n </div>\n </div>\n <div class=\"form-group\" *ngIf=\"createNodeForm.get('iconType')?.value === 'url'\">\n <label for=\"imageUrl\">Image URL</label>\n <div class=\"input-group\">\n <input type=\"text\" id=\"imageUrl\" formControlName=\"imageUrl\" class=\"form-control\" placeholder=\"Image URL\">\n <button type=\"button\" class=\"btn btn-outline-secondary\" (click)=\"clearImageUrl()\">Clear</button>\n </div>\n </div>\n <div class=\"form-group\" *ngIf=\"createNodeForm.get('iconType')?.value === 'select'\">\n <label for=\"nodeIcon\">Choose Icon</label>\n <ng-select\n formControlName=\"icon\"\n [items]=\"iconsBuffer\"\n [virtualScroll]=\"true\"\n [loading]=\"loading\"\n bindLabel=\"name\"\n bindValue=\"icon\"\n [editableSearchTerm]=\"true\"\n placeholder=\"Select icon\"\n appendTo=\"body\"\n [trackByFn]=\"trackByFn\"\n (scroll)=\"onScroll($event)\"\n (scrollToEnd)=\"onScrollToEnd()\"\n >\n <ng-template ng-header-tmp>\n <small class=\"form-text text-muted\"\n >Loaded {{ iconsBuffer.length }} of {{ fontAwesomeIcons.length }}</small\n >\n </ng-template>\n <ng-template ng-option-tmp let-item=\"item\">\n <i class=\"fa fa-light\">{{item.icon}}</i>\n <span class=\"ml-3\">{{ item.name }}</span>\n </ng-template>\n </ng-select>\n </div>\n <div *ngIf=\"createNodeForm.errors?.iconOrImage\" class=\"text-danger\">\n Please provide either an Image URL or choose an Icon, but not both.\n </div>\n <div class=\"form-group\">\n <label for=\"label\">Labels</label>\n <div formArrayName=\"label\">\n <div *ngFor=\"let label of nodeLabelArray.controls; let i = index\" [formGroupName]=\"i\"\n class=\"d-flex flex-column align-items-start\">\n <div class=\"d-flex align-items-center w-100\">\n <input formControlName=\"label\" class=\"form-control mb-2\" placeholder=\"Label\" [id]=\"'node-label-' + i\">\n <button type=\"button\" class=\"btn btn-danger ml-2\" (click)=\"removeNodeLabel(i)\" [disabled]=\"nodeLabelArray.length <= 1\">Remove</button>\n </div>\n </div>\n </div>\n <button type=\"button\" class=\"btn btn-secondary mt-2\" (click)=\"addNodeLabel()\">Add Label</button>\n </div>\n <div class=\"form-group\">\n <label for=\"nodeAdditionalIcon\">Additional icon</label>\n <ng-select\n formControlName=\"additionalIcon\"\n [items]=\"iconsBuffer\"\n [virtualScroll]=\"true\"\n [loading]=\"loading\"\n bindLabel=\"name\"\n bindValue=\"icon\"\n [editableSearchTerm]=\"true\"\n placeholder=\"Select icon\"\n appendTo=\"body\"\n [trackByFn]=\"trackByFn\"\n (scroll)=\"onScroll($event)\"\n (scrollToEnd)=\"onScrollToEnd()\"\n >\n <ng-template ng-header-tmp>\n <small class=\"form-text text-muted\"\n >Loaded {{ iconsBuffer.length }} of {{ fontAwesomeIcons.length }}</small\n >\n </ng-template>\n <ng-template ng-option-tmp let-item=\"item\">\n <i class=\"fa fa-light\">{{item.icon}}</i>\n <span class=\"ml-3\">{{ item.name }}</span>\n </ng-template>\n </ng-select>\n </div>\n </form>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"closeModal('modalRef')\">Cancel</button>\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"createEditNode('editNodeModal')\" [disabled]=\"!createNodeForm.valid\">Save Changes</button>\n <button type=\"button\" class=\"btn btn-danger\" (click)=\"deleteNode()\">Delete Node</button>\n </div>\n</ng-template>\n<!-- ./MODAL-->\n\n<!--CREATE NODE MODAL-->\n<ng-template #createNodeModal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title pull-left\">Create Node</h4>\n <button type=\"button\" class=\"btn-close close pull-right\" aria-label=\"Close\" (click)=\"closeModal('modalRef')\">\n <span aria-hidden=\"true\" class=\"visually-hidden\">×</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"createNodeForm\">\n <div class=\"form-group\">\n <label for=\"iconType\">Icon Type</label>\n <div>\n <input type=\"radio\" id=\"imageUrl\" formControlName=\"iconType\" value=\"url\"> Image URL\n <input class=\"ml-5\" type=\"radio\" id=\"iconTypeSelect\" formControlName=\"iconType\" value=\"select\"> Choose Icon\n </div>\n </div>\n <div class=\"form-group\" *ngIf=\"createNodeForm.get('iconType')?.value === 'url'\">\n <label for=\"imageUrl\">Image URL</label>\n <div class=\"input-group\">\n <input type=\"text\" id=\"imageUrl\" formControlName=\"imageUrl\" class=\"form-control\" placeholder=\"Image URL\">\n <button type=\"button\" class=\"btn btn-outline-secondary\" (click)=\"clearImageUrl()\">Clear</button>\n </div>\n </div>\n <div class=\"form-group\" *ngIf=\"createNodeForm.get('iconType')?.value === 'select'\">\n <label for=\"nodeIcon\">Choose Icon</label>\n <ng-select\n formControlName=\"icon\"\n [items]=\"iconsBuffer\"\n [virtualScroll]=\"true\"\n [loading]=\"loading\"\n bindLabel=\"name\"\n bindValue=\"icon\"\n [editableSearchTerm]=\"true\"\n placeholder=\"Select icon\"\n appendTo=\"body\"\n [trackByFn]=\"trackByFn\"\n (scroll)=\"onScroll($event)\"\n (scrollToEnd)=\"onScrollToEnd()\"\n >\n <ng-template ng-header-tmp>\n <small class=\"form-text text-muted\"\n >Loaded {{ iconsBuffer.length }} of {{ fontAwesomeIcons.length }}</small\n >\n </ng-template>\n <ng-template ng-option-tmp let-item=\"item\">\n <i class=\"fa fa-light\">{{item.icon}}</i>\n <span class=\"ml-3\">{{ item.name }}</span>\n </ng-template>\n </ng-select>\n </div>\n <div *ngIf=\"createNodeForm.errors?.iconOrImage\" class=\"text-danger\">\n Please provide either an Image URL or choose an Icon, but not both.\n </div>\n <div class=\"form-group\">\n <label for=\"label\">Labels</label>\n <div formArrayName=\"label\">\n <div *ngFor=\"let label of nodeLabelArray.controls; let i = index\" [formGroupName]=\"i\"\n class=\"d-flex flex-column align-items-start\">\n <div class=\"d-flex align-items-center w-100\">\n <input formControlName=\"label\" class=\"form-control mb-2\" placeholder=\"Label\" [id]=\"'node-label-' + i\">\n <button type=\"button\" class=\"btn btn-danger ml-2\" (click)=\"removeNodeLabel(i)\" [disabled]=\"nodeLabelArray.length <= 1\">Remove</button>\n </div>\n </div>\n </div>\n <button type=\"button\" class=\"btn btn-secondary mt-2\" (click)=\"addNodeLabel()\">Add Label</button>\n </div>\n <div class=\"form-group\">\n <label for=\"nodeAdditionalIcon\">Additional icon</label>\n <ng-select\n formControlName=\"additionalIcon\"\n [items]=\"iconsBuffer\"\n [virtualScroll]=\"true\"\n [loading]=\"loading\"\n bindLabel=\"name\"\n bindValue=\"icon\"\n [editableSearchTerm]=\"true\"\n placeholder=\"Select icon\"\n appendTo=\"body\"\n [trackByFn]=\"trackByFn\"\n (scroll)=\"onScroll($event)\"\n (scrollToEnd)=\"onScrollToEnd()\"\n >\n <ng-template ng-header-tmp>\n <small class=\"form-text text-muted\"\n >Loaded {{ iconsBuffer.length }} of {{ fontAwesomeIcons.length }}</small\n >\n </ng-template>\n <ng-template ng-option-tmp let-item=\"item\">\n <i class=\"fa fa-light\">{{item.icon}}</i>\n <span class=\"ml-3\">{{ item.name }}</span>\n </ng-template>\n </ng-select>\n </div>\n </form>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"closeModal('modalRef')\">Cancel</button>\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"createEditNode('createNodeModal')\" [disabled]=\"!createNodeForm.valid\">Create Node</button>\n </div>\n</ng-template>\n<!-- ./MODAL-->\n\n<!--EDIT LINKS MODAL-->\n<ng-template #editLinksModal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title pull-left\">Edit Links</h4>\n <button type=\"button\" class=\"btn-close close pull-right\" aria-label=\"Close\" (click)=\"closeModal('modalRef')\">\n <span aria-hidden=\"true\" class=\"visually-hidden\">×</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"createLinkForm\">\n <div class=\"col-sm-12 d-flex flex-column\">\n <div class=\"d-flex mb-3\">\n <div class=\"iconImage\">\n <span><i class=\"fas fa-arrow-left\"></i></span>\n <span class=\"arrow\">\n <input type=\"checkbox\" id=\"sourceArrow\" formControlName=\"sourceArrow\" class=\"form-check-input\">\n <label class=\"d-none form-check-label\" for=\"leftArrow\"></label>\n </span>\n </div>\n <div class=\"iconImage ml-3\">\n <ng-container *ngIf=\"targetImageUrl; else targetIconTemplate\">\n <img class=\"imageUrl\" [src]=\"targetImageUrl\" />\n </ng-container>\n <ng-template #targetIconTemplate>\n <i class=\"fa-solid fa-2x\">{{targetIcon}}</i>\n </ng-template>\n </div>\n <div\n [ngClass]=\"{\n 'link-line-solid': createLinkForm.get('lineStyle')?.value === 'Solid',\n 'link-line-dotted': createLinkForm.get('lineStyle')?.value === 'Dotted'\n }\"\n >\n </div>\n <div class=\"iconImage mr-3\">\n <ng-container *ngIf=\"sourceImageUrl; else sourceIconTemplate\">\n <img class=\"imageUrl\" [src]=\"sourceImageUrl\" />\n </ng-container>\n <ng-template #sourceIconTemplate>\n <i class=\"fa-solid fa-2x\">{{sourceIcon}}</i>\n </ng-template>\n </div>\n <div class=\"iconImage\">\n <span><i class=\"fas fa-arrow-right\"></i></span>\n <span class=\"arrow\">\n <input type=\"checkbox\" id=\"targetArrow\" formControlName=\"targetArrow\" class=\"form-check-input\">\n <label class=\"form-check-label\" for=\"rightArrow\"></label>\n </span>\n </div>\n </div>\n <div class=\"d-flex justify-content-between mb-3\">\n <div class=\"text-left d-block font-weight-bold\" style=\"font-size: 12px\">\n <span class=\"d-block\" *ngFor=\"let label of targetLabels\">{{ label }}</span>\n </div>\n <div class=\"text-right d-block font-weight-bold\" style=\"font-size: 12px\">\n <span class=\"d-block\" *ngFor=\"let label of sourceLabels\">{{ label }}</span>\n </div>\n </div>\n <div *ngIf=\"createLinkForm.get('label')?.value?.length\" class=\"labelPosition text-center\">\n <span *ngFor=\"let label of createLinkForm.get('label')?.value\">\n <span class=\"d-block\">{{ label.label }} <span style=\"color: #856404;\" *ngIf=\"label.linkIcon\"><i class=\"fas fa-link\"></i></span></span>\n </span>\n </div>\n </div>\n <div class=\"form-group\">\n <label for=\"lineStyle\">Line Style</label>\n <select id=\"lineStyle\" formControlName=\"lineStyle\" class=\"form-control\">\n <option value=\"Solid\">Solid</option>\n <option value=\"Dotted\">Dotted</option>\n </select>\n </div>\n\n <div class=\"form-group\">\n <label for=\"label\">Labels</label>\n <div formArrayName=\"label\">\n <div *ngFor=\"let label of labelArray.controls; let i = index\" [formGroupName]=\"i\"\n class=\"d-flex flex-column align-items-start\">\n <div class=\"d-flex align-items-center w-100\">\n <input formControlName=\"label\" class=\"form-control\" placeholder=\"Label\" [id]=\"'label-' + i\">\n <button type=\"button\" class=\"btn btn-danger ml-2\" (click)=\"removeLabel(i)\" [disabled]=\"labelArray.length <= 1\">Remove</button>\n </div>\n <div class=\"form-group form-check\">\n <input type=\"checkbox\" formControlName=\"linkIcon\" class=\"form-check-input\" [id]=\"'linkIcon-' + i\">\n <label [for]=\"'linkIcon-' + i\">Link Icon?</label>\n </div>\n </div>\n </div>\n <button type=\"button\" class=\"btn btn-secondary mt-2\" (click)=\"addLabel()\">Add Label</button>\n </div>\n </form>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"closeModal('modalRef')\">Cancel</button>\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"createEditLink('editLinkModal')\" [disabled]=\"!createLinkForm.valid\">Save Changes</button>\n <button type=\"button\" class=\"btn btn-danger\" (click)=\"deleteLink()\">Delete Link</button>\n </div>\n</ng-template>\n<!-- ./MODAL-->\n\n\n<!--CREATE LINK MODAL-->\n<ng-template #createLinkModal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title pull-left\">Create Link</h4>\n <button type=\"button\" class=\"btn-close close pull-right\" aria-label=\"Close\" (click)=\"closeModal('modalRef')\">\n <span aria-hidden=\"true\" class=\"visually-hidden\">×</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"createLinkForm\">\n <div class=\"col-sm-12 d-flex flex-column\">\n <div class=\"d-flex mb-3\">\n <div class=\"iconImage\">\n <span><i class=\"fas fa-arrow-left\"></i></span>\n <span class=\"arrow\">\n <input type=\"checkbox\" id=\"sourceArrow\" formControlName=\"sourceArrow\" class=\"form-check-input\">\n <label class=\"d-none form-check-label\" for=\"leftArrow\"></label>\n </span>\n </div>\n <div class=\"iconImage ml-3\">\n <ng-container *ngIf=\"targetImageUrl; else targetIconTemplate\">\n <img class=\"imageUrl\" [src]=\"targetImageUrl\" />\n </ng-container>\n <ng-template #targetIconTemplate>\n <i class=\"fa-solid fa-2x\">{{targetIcon}}</i>\n </ng-template>\n </div>\n <div\n [ngClass]=\"{\n 'link-line-solid': createLinkForm.get('lineStyle')?.value === 'Solid',\n 'link-line-dotted': createLinkForm.get('lineStyle')?.value === 'Dotted'\n }\"\n >\n </div>\n <div class=\"iconImage mr-3\">\n <ng-container *ngIf=\"sourceImageUrl; else sourceIconTemplate\">\n <img class=\"imageUrl\" [src]=\"sourceImageUrl\" />\n </ng-container>\n <ng-template #sourceIconTemplate>\n <i class=\"fa-solid fa-2x\">{{sourceIcon}}</i>\n </ng-template>\n </div>\n <div class=\"iconImage\">\n <span><i class=\"fas fa-arrow-right\"></i></span>\n <span class=\"arrow\">\n <input type=\"checkbox\" id=\"targetArrow\" formControlName=\"targetArrow\" class=\"form-check-input\">\n <label class=\"form-check-label\" for=\"rightArrow\"></label>\n </span>\n </div>\n </div>\n <div class=\"d-flex justify-content-between mb-3\">\n <div class=\"text-left d-block font-weight-bold\" style=\"font-size: 12px\">\n <span class=\"d-block\" *ngFor=\"let label of targetLabels\">{{ label }}</span>\n </div>\n <div class=\"text-right d-block font-weight-bold\" style=\"font-size: 12px\">\n <span class=\"d-block\" *ngFor=\"let label of sourceLabels\">{{ label }}</span>\n </div>\n </div>\n <div *ngIf=\"createLinkForm.get('label')?.value?.length\" class=\"labelPosition text-center\">\n <span *ngFor=\"let label of createLinkForm.get('label')?.value\">\n <span class=\"d-block\">{{ label.label }} <span style=\"color: #856404;\" *ngIf=\"label.linkIcon\"><i class=\"fas fa-link\"></i></span></span>\n </span>\n </div>\n </div>\n <div class=\"form-group\">\n <label for=\"lineStyle\">Line Style</label>\n <select id=\"lineStyle\" formControlName=\"lineStyle\" class=\"form-control\">\n <option value=\"Solid\">Solid</option>\n <option value=\"Dotted\">Dotted</option>\n </select>\n </div>\n\n <div class=\"form-group\">\n <label for=\"label\">Labels</label>\n <div formArrayName=\"label\">\n <div *ngFor=\"let label of labelArray.controls; let i = index\" [formGroupName]=\"i\"\n class=\"d-flex flex-column align-items-start\">\n <div class=\"d-flex align-items-center w-100\">\n <input formControlName=\"label\" class=\"form-control\" placeholder=\"Label\" [id]=\"'label-' + i\">\n <button type=\"button\" class=\"btn btn-danger ml-2\" (click)=\"removeLabel(i)\" [disabled]=\"labelArray.length <= 1\">Remove</button>\n </div>\n <div class=\"form-group form-check\">\n <input type=\"checkbox\" formControlName=\"linkIcon\" class=\"form-check-input\" [id]=\"'linkIcon-' + i\">\n <label [for]=\"'linkIcon-' + i\">Link Icon?</label>\n </div>\n </div>\n </div>\n <button type=\"button\" class=\"btn btn-secondary mt-2\" (click)=\"addLabel()\">Add Label</button>\n </div>\n </form>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"closeModal('modalRef')\">Cancel</button>\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"createEditLink('createLinkModal')\" [disabled]=\"!createLinkForm.valid\">Create Link</button>\n </div>\n</ng-template>\n<!-- ./MODAL-->", styles: [".imageUrl{max-width:30px}.labelPosition{position:relative;top:-55px;margin-right:30px;margin-left:30px}.link-line-solid{width:100%;position:relative;margin:15px;border-top:2px solid #777}.link-line-dotted{width:100%;position:relative;margin:15px;background-image:repeating-linear-gradient(to right,#cacaca,#cacaca 7px,transparent 7px,transparent 15px);height:2px}.iconImage{position:relative;top:4px}.arrow{position:absolute;top:20px;left:20px}\n"] }]
|
|
699
|
+
args: [{ selector: 'app-modals', template: "<!--EDIT NODE MODAL-->\n<ng-template #editNodeModal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title pull-left\">Edit Node</h4>\n <button type=\"button\" class=\"btn-close close pull-right\" aria-label=\"Close\" (click)=\"closeModal('modalRef')\">\n <span aria-hidden=\"true\" class=\"visually-hidden\">×</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"createNodeForm\">\n <div class=\"form-group\">\n <label for=\"iconType\">Icon Type</label>\n <div>\n <input type=\"radio\" id=\"imageUrl\" formControlName=\"iconType\" value=\"url\" (change)=\"onIconTypeChange('url')\"> Image URL\n <input class=\"ml-5\" type=\"radio\" id=\"iconTypeSelect\" formControlName=\"iconType\" value=\"select\" (change)=\"onIconTypeChange('select')\"> Choose Icon\n </div>\n </div>\n @if (createNodeForm.get('iconType')?.value === 'url') {\n <div class=\"form-group\">\n <label for=\"imageUrl\">Image URL</label>\n <div class=\"input-group\">\n <input type=\"text\" id=\"imageUrl\" formControlName=\"imageUrl\" class=\"form-control\" placeholder=\"Image URL\">\n <button type=\"button\" class=\"btn btn-outline-secondary\" (click)=\"clearImageUrl()\">Clear</button>\n </div>\n </div>\n }\n @if (createNodeForm.get('iconType')?.value === 'select') {\n <div class=\"form-group\">\n <label for=\"nodeIcon\">Choose Icon</label>\n <ng-select\n formControlName=\"icon\"\n [items]=\"iconsBuffer\"\n [virtualScroll]=\"true\"\n [loading]=\"loading\"\n bindLabel=\"name\"\n bindValue=\"icon\"\n placeholder=\"Select icon\"\n appendTo=\"body\"\n [trackByFn]=\"trackByFn\"\n (scroll)=\"onScroll($event)\"\n (scrollToEnd)=\"onScrollToEnd()\"\n >\n <ng-template ng-header-tmp>\n <small class=\"form-text text-muted\"\n >Loaded {{ iconsBuffer.length }} of {{ fontAwesomeIcons.length }}</small\n >\n </ng-template>\n <ng-template ng-option-tmp let-item=\"item\">\n <i class=\"fa fa-light\">{{item.icon}}</i>\n <span class=\"ml-3\">{{ item.name }}</span>\n </ng-template>\n </ng-select>\n </div>\n }\n @if (createNodeForm.errors?.iconOrImage) {\n <div class=\"text-danger\">\n Please provide either an Image URL or choose an Icon, but not both.\n </div>\n }\n <div class=\"form-group\">\n <label for=\"label\">Labels</label>\n <div formArrayName=\"label\">\n @for (label of nodeLabelArray.controls; track label; let i = $index) {\n <div [formGroupName]=\"i\"\n class=\"d-flex flex-column align-items-start\">\n <div class=\"d-flex align-items-center w-100\">\n <input formControlName=\"label\" class=\"form-control mb-2\" placeholder=\"Label\" [id]=\"'node-label-' + i\">\n <button type=\"button\" class=\"btn btn-danger ml-2\" (click)=\"removeNodeLabel(i)\" [disabled]=\"nodeLabelArray.length <= 1\">Remove</button>\n </div>\n </div>\n }\n </div>\n <button type=\"button\" class=\"btn btn-secondary mt-2\" (click)=\"addNodeLabel()\">Add Label</button>\n </div>\n <div class=\"form-group\">\n <label for=\"nodeAdditionalIcon\">Additional icon</label>\n <ng-select\n formControlName=\"additionalIcon\"\n [items]=\"iconsBuffer\"\n [virtualScroll]=\"true\"\n [loading]=\"loading\"\n bindLabel=\"name\"\n bindValue=\"icon\"\n placeholder=\"Select icon\"\n appendTo=\"body\"\n [trackByFn]=\"trackByFn\"\n (scroll)=\"onScroll($event)\"\n (scrollToEnd)=\"onScrollToEnd()\"\n >\n <ng-template ng-header-tmp>\n <small class=\"form-text text-muted\"\n >Loaded {{ iconsBuffer.length }} of {{ fontAwesomeIcons.length }}</small\n >\n </ng-template>\n <ng-template ng-option-tmp let-item=\"item\">\n <i class=\"fa fa-light\">{{item.icon}}</i>\n <span class=\"ml-3\">{{ item.name }}</span>\n </ng-template>\n </ng-select>\n </div>\n </form>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"closeModal('modalRef')\">Cancel</button>\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"createEditNode('editNodeModal')\" [disabled]=\"!createNodeForm.valid\">Save Changes</button>\n <button type=\"button\" class=\"btn btn-danger\" (click)=\"deleteNode()\">Delete Node</button>\n </div>\n </ng-template>\n <!-- ./MODAL-->\n\n <!--CREATE NODE MODAL-->\n <ng-template #createNodeModal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title pull-left\">Create Node</h4>\n <button type=\"button\" class=\"btn-close close pull-right\" aria-label=\"Close\" (click)=\"closeModal('modalRef')\">\n <span aria-hidden=\"true\" class=\"visually-hidden\">×</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"createNodeForm\">\n <div class=\"form-group\">\n <label for=\"iconType\">Icon Type</label>\n <div>\n <input type=\"radio\" id=\"imageUrl\" formControlName=\"iconType\" value=\"url\" (change)=\"onIconTypeChange('url')\"> Image URL\n <input class=\"ml-5\" type=\"radio\" id=\"iconTypeSelect\" formControlName=\"iconType\" value=\"select\" (change)=\"onIconTypeChange('select')\"> Choose Icon\n </div>\n </div>\n @if (createNodeForm.get('iconType')?.value === 'url') {\n <div class=\"form-group\">\n <label for=\"imageUrl\">Image URL</label>\n <div class=\"input-group\">\n <input type=\"text\" id=\"imageUrl\" formControlName=\"imageUrl\" class=\"form-control\" placeholder=\"Image URL\">\n <button type=\"button\" class=\"btn btn-outline-secondary\" (click)=\"clearImageUrl()\">Clear</button>\n </div>\n </div>\n }\n @if (createNodeForm.get('iconType')?.value === 'select') {\n <div class=\"form-group\">\n <label for=\"nodeIcon\">Choose Icon</label>\n <ng-select\n formControlName=\"icon\"\n [items]=\"iconsBuffer\"\n [virtualScroll]=\"true\"\n [loading]=\"loading\"\n bindLabel=\"name\"\n bindValue=\"icon\"\n placeholder=\"Select icon\"\n appendTo=\"body\"\n [trackByFn]=\"trackByFn\"\n (scroll)=\"onScroll($event)\"\n (scrollToEnd)=\"onScrollToEnd()\"\n >\n <ng-template ng-header-tmp>\n <small class=\"form-text text-muted\"\n >Loaded {{ iconsBuffer.length }} of {{ fontAwesomeIcons.length }}</small\n >\n </ng-template>\n <ng-template ng-option-tmp let-item=\"item\">\n <i class=\"fa fa-light\">{{item.icon}}</i>\n <span class=\"ml-3\">{{ item.name }}</span>\n </ng-template>\n </ng-select>\n </div>\n }\n @if (createNodeForm.errors?.iconOrImage) {\n <div class=\"text-danger\">\n Please provide either an Image URL or choose an Icon, but not both.\n </div>\n }\n <div class=\"form-group\">\n <label for=\"label\">Labels</label>\n <div formArrayName=\"label\">\n @for (label of nodeLabelArray.controls; track label; let i = $index) {\n <div [formGroupName]=\"i\"\n class=\"d-flex flex-column align-items-start\">\n <div class=\"d-flex align-items-center w-100\">\n <input formControlName=\"label\" class=\"form-control mb-2\" placeholder=\"Label\" [id]=\"'node-label-' + i\">\n <button type=\"button\" class=\"btn btn-danger ml-2\" (click)=\"removeNodeLabel(i)\" [disabled]=\"nodeLabelArray.length <= 1\">Remove</button>\n </div>\n </div>\n }\n </div>\n <button type=\"button\" class=\"btn btn-secondary mt-2\" (click)=\"addNodeLabel()\">Add Label</button>\n </div>\n <div class=\"form-group\">\n <label for=\"nodeAdditionalIcon\">Additional icon</label>\n <ng-select\n formControlName=\"additionalIcon\"\n [items]=\"iconsBuffer\"\n [virtualScroll]=\"true\"\n [loading]=\"loading\"\n bindLabel=\"name\"\n bindValue=\"icon\"\n placeholder=\"Select icon\"\n appendTo=\"body\"\n [trackByFn]=\"trackByFn\"\n (scroll)=\"onScroll($event)\"\n (scrollToEnd)=\"onScrollToEnd()\"\n >\n <ng-template ng-header-tmp>\n <small class=\"form-text text-muted\"\n >Loaded {{ iconsBuffer.length }} of {{ fontAwesomeIcons.length }}</small\n >\n </ng-template>\n <ng-template ng-option-tmp let-item=\"item\">\n <i class=\"fa fa-light\">{{item.icon}}</i>\n <span class=\"ml-3\">{{ item.name }}</span>\n </ng-template>\n </ng-select>\n </div>\n </form>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"closeModal('modalRef')\">Cancel</button>\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"createEditNode('createNodeModal')\" [disabled]=\"!createNodeForm.valid\">Create Node</button>\n </div>\n </ng-template>\n <!-- ./MODAL-->\n\n <!--EDIT LINKS MODAL-->\n <ng-template #editLinksModal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title pull-left\">Edit Links</h4>\n <button type=\"button\" class=\"btn-close close pull-right\" aria-label=\"Close\" (click)=\"closeModal('modalRef')\">\n <span aria-hidden=\"true\" class=\"visually-hidden\">×</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"createLinkForm\">\n <div class=\"col-sm-12 d-flex flex-column\">\n <div class=\"d-flex mb-3\">\n <div class=\"iconImage\">\n <span><i class=\"fas fa-arrow-left\"></i></span>\n <span class=\"arrow\">\n <input type=\"checkbox\" id=\"sourceArrow\" formControlName=\"sourceArrow\" class=\"form-check-input\">\n <label class=\"d-none form-check-label\" for=\"leftArrow\"></label>\n </span>\n </div>\n <div class=\"iconImage ml-3\">\n @if (targetImageUrl) {\n <img class=\"imageUrl\" [src]=\"targetImageUrl\" />\n } @else {\n <i class=\"fa-solid fa-2x\">{{targetIcon}}</i>\n }\n </div>\n <div\n [ngClass]=\"{\n 'link-line-solid': createLinkForm.get('lineStyle')?.value === 'Solid',\n 'link-line-dotted': createLinkForm.get('lineStyle')?.value === 'Dotted'\n }\"\n >\n </div>\n <div class=\"iconImage mr-3\">\n @if (sourceImageUrl) {\n <img class=\"imageUrl\" [src]=\"sourceImageUrl\" />\n } @else {\n <i class=\"fa-solid fa-2x\">{{sourceIcon}}</i>\n }\n </div>\n <div class=\"iconImage\">\n <span><i class=\"fas fa-arrow-right\"></i></span>\n <span class=\"arrow\">\n <input type=\"checkbox\" id=\"targetArrow\" formControlName=\"targetArrow\" class=\"form-check-input\">\n <label class=\"form-check-label\" for=\"rightArrow\"></label>\n </span>\n </div>\n </div>\n <div class=\"d-flex justify-content-between mb-3\">\n <div class=\"text-left d-block font-weight-bold\" style=\"font-size: 12px\">\n @for (label of targetLabels; track $index) {\n <span class=\"d-block\">{{ label }}</span>\n }\n </div>\n <div class=\"text-right d-block font-weight-bold\" style=\"font-size: 12px\">\n @for (label of sourceLabels; track $index) {\n <span class=\"d-block\">{{ label }}</span>\n }\n </div>\n </div>\n @if (createLinkForm.get('label')?.value?.length) {\n <div class=\"labelPosition text-center\">\n @for (label of createLinkForm.get('label')?.value; track label) {\n <span>\n <span class=\"d-block\">{{ label.label }} @if (label.linkIcon) {\n <span style=\"color: #856404;\"><i class=\"fa fa-light\">{{ getRelationshipIcon(label.linkIcon) }}</i></span>\n }</span>\n </span>\n }\n </div>\n }\n </div>\n <div class=\"form-group\">\n <label for=\"lineStyle\">Line Style</label>\n <select id=\"lineStyle\" formControlName=\"lineStyle\" class=\"form-control\">\n <option value=\"Solid\">Solid</option>\n <option value=\"Dotted\">Dotted</option>\n </select>\n </div>\n\n <div class=\"form-group\">\n <label for=\"label\">Labels</label>\n <div formArrayName=\"label\">\n @for (label of labelArray.controls; track label; let i = $index) {\n <div [formGroupName]=\"i\"\n class=\"d-flex flex-column align-items-start\">\n <div class=\"d-flex align-items-center w-100\">\n <input formControlName=\"label\" class=\"form-control\" placeholder=\"Label\" [id]=\"'label-' + i\">\n <button type=\"button\" class=\"btn btn-danger ml-2\" (click)=\"removeLabel(i)\" [disabled]=\"labelArray.length <= 1\">Remove</button>\n </div>\n <div class=\"form-group form-check\">\n <input type=\"checkbox\" class=\"form-check-input\" [id]=\"'linkIcon-' + i\" [checked]=\"!!label.get('linkIcon')?.value\" (change)=\"toggleLinkIcon(i, $event)\">\n <label [for]=\"'linkIcon-' + i\">Link Icon?</label>\n </div>\n @if (label.get('linkIcon')?.value) {\n <ng-select\n class=\"link-icon-select\"\n formControlName=\"linkIcon\"\n [items]=\"fontAwesomeIcons\"\n bindLabel=\"name\"\n bindValue=\"icon\"\n placeholder=\"Select link icon\"\n appendTo=\"body\"\n [trackByFn]=\"trackByFn\">\n <ng-template ng-option-tmp let-item=\"item\">\n <i class=\"fa fa-light\">{{ item.icon }}</i>\n <span class=\"ml-3\">{{ item.name }}</span>\n </ng-template>\n </ng-select>\n }\n </div>\n }\n </div>\n <button type=\"button\" class=\"btn btn-secondary mt-2\" (click)=\"addLabel()\">Add another label</button>\n </div>\n </form>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"closeModal('modalRef')\">Cancel</button>\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"createEditLink('editLinkModal')\" [disabled]=\"!createLinkForm.valid\">Save Changes</button>\n <button type=\"button\" class=\"btn btn-danger\" (click)=\"deleteLink()\">Delete Link</button>\n </div>\n </ng-template>\n <!-- ./MODAL-->\n\n\n <!--CREATE LINK MODAL-->\n <ng-template #createLinkModal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title pull-left\">Create Link</h4>\n <button type=\"button\" class=\"btn-close close pull-right\" aria-label=\"Close\" (click)=\"closeModal('modalRef')\">\n <span aria-hidden=\"true\" class=\"visually-hidden\">×</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"createLinkForm\">\n <div class=\"col-sm-12 d-flex flex-column\">\n <div class=\"d-flex mb-3\">\n <div class=\"iconImage\">\n <span><i class=\"fas fa-arrow-left\"></i></span>\n <span class=\"arrow\">\n <input type=\"checkbox\" id=\"sourceArrow\" formControlName=\"sourceArrow\" class=\"form-check-input\">\n <label class=\"d-none form-check-label\" for=\"leftArrow\"></label>\n </span>\n </div>\n <div class=\"iconImage ml-3\">\n @if (targetImageUrl) {\n <img class=\"imageUrl\" [src]=\"targetImageUrl\" />\n } @else {\n <i class=\"fa-solid fa-2x\">{{targetIcon}}</i>\n }\n </div>\n <div\n [ngClass]=\"{\n 'link-line-solid': createLinkForm.get('lineStyle')?.value === 'Solid',\n 'link-line-dotted': createLinkForm.get('lineStyle')?.value === 'Dotted'\n }\"\n >\n </div>\n <div class=\"iconImage mr-3\">\n @if (sourceImageUrl) {\n <img class=\"imageUrl\" [src]=\"sourceImageUrl\" />\n } @else {\n <i class=\"fa-solid fa-2x\">{{sourceIcon}}</i>\n }\n </div>\n <div class=\"iconImage\">\n <span><i class=\"fas fa-arrow-right\"></i></span>\n <span class=\"arrow\">\n <input type=\"checkbox\" id=\"targetArrow\" formControlName=\"targetArrow\" class=\"form-check-input\">\n <label class=\"form-check-label\" for=\"rightArrow\"></label>\n </span>\n </div>\n </div>\n <div class=\"d-flex justify-content-between mb-3\">\n <div class=\"text-left d-block font-weight-bold\" style=\"font-size: 12px\">\n @for (label of targetLabels; track $index) {\n <span class=\"d-block\">{{ label }}</span>\n }\n </div>\n <div class=\"text-right d-block font-weight-bold\" style=\"font-size: 12px\">\n @for (label of sourceLabels; track $index) {\n <span class=\"d-block\">{{ label }}</span>\n }\n </div>\n </div>\n @if (createLinkForm.get('label')?.value?.length) {\n <div class=\"labelPosition text-center\">\n @for (label of createLinkForm.get('label')?.value; track label) {\n <span>\n <span class=\"d-block\">{{ label.label }} @if (label.linkIcon) {\n <span style=\"color: #856404;\"><i class=\"fa fa-light\">{{ getRelationshipIcon(label.linkIcon) }}</i></span>\n }</span>\n </span>\n }\n </div>\n }\n </div>\n <div class=\"form-group\">\n <label for=\"lineStyle\">Line Style</label>\n <select id=\"lineStyle\" formControlName=\"lineStyle\" class=\"form-control\">\n <option value=\"Solid\">Solid</option>\n <option value=\"Dotted\">Dotted</option>\n </select>\n </div>\n\n <div class=\"form-group\">\n <label for=\"label\">Labels</label>\n <div formArrayName=\"label\">\n @for (label of labelArray.controls; track label; let i = $index) {\n <div [formGroupName]=\"i\"\n class=\"d-flex flex-column align-items-start\">\n <div class=\"d-flex align-items-center w-100\">\n <input formControlName=\"label\" class=\"form-control\" placeholder=\"Label\" [id]=\"'label-' + i\">\n <button type=\"button\" class=\"btn btn-danger ml-2\" (click)=\"removeLabel(i)\" [disabled]=\"labelArray.length <= 1\">Remove</button>\n </div>\n <div class=\"form-group form-check\">\n <input type=\"checkbox\" class=\"form-check-input\" [id]=\"'linkIcon-' + i\" [checked]=\"!!label.get('linkIcon')?.value\" (change)=\"toggleLinkIcon(i, $event)\">\n <label [for]=\"'linkIcon-' + i\">Link Icon?</label>\n </div>\n @if (label.get('linkIcon')?.value) {\n <ng-select\n class=\"link-icon-select\"\n formControlName=\"linkIcon\"\n [items]=\"fontAwesomeIcons\"\n bindLabel=\"name\"\n bindValue=\"icon\"\n placeholder=\"Select link icon\"\n appendTo=\"body\"\n [trackByFn]=\"trackByFn\">\n <ng-template ng-option-tmp let-item=\"item\">\n <i class=\"fa fa-light\">{{ item.icon }}</i>\n <span class=\"ml-3\">{{ item.name }}</span>\n </ng-template>\n </ng-select>\n }\n </div>\n }\n </div>\n <button type=\"button\" class=\"btn btn-secondary mt-2\" (click)=\"addLabel()\">Add another label</button>\n </div>\n </form>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"closeModal('modalRef')\">Cancel</button>\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"createEditLink('createLinkModal')\" [disabled]=\"!createLinkForm.valid\">Create Link</button>\n </div>\n </ng-template>\n <!-- ./MODAL-->", styles: [".imageUrl{max-width:30px}.labelPosition{position:relative;top:-55px;margin-right:30px;margin-left:30px}.link-line-solid{width:100%;position:relative;margin:15px;border-top:2px solid #777}.link-line-dotted{width:100%;position:relative;margin:15px;background-image:repeating-linear-gradient(to right,#cacaca,#cacaca 7px,transparent 7px,transparent 15px);height:2px}.iconImage{position:relative;top:4px}.link-icon-select{width:250px}.arrow{position:absolute;top:20px;left:20px}\n"] }]
|
|
673
700
|
}], ctorParameters: () => [{ type: i1.BsModalService }, { type: i2$1.FormBuilder }, { type: DexieService }], propDecorators: { editNodeData: [{
|
|
674
701
|
type: Input
|
|
675
702
|
}], editLinksData: [{
|
|
@@ -1617,7 +1644,7 @@ class VisualiserGraphService {
|
|
|
1617
1644
|
.style('fill', '#856404')
|
|
1618
1645
|
.style('font-weight', '700')
|
|
1619
1646
|
.attr('class', 'fa')
|
|
1620
|
-
.text(' \uf0c1');
|
|
1647
|
+
.text((d) => ` ${typeof d.linkIcon === 'string' ? d.linkIcon : '\uf0c1'}`);
|
|
1621
1648
|
// on normal label link click - highlight labels
|
|
1622
1649
|
svg.selectAll('.edgelabel').on('click', () => {
|
|
1623
1650
|
_d3.event.stopPropagation();
|
|
@@ -2039,10 +2066,10 @@ class VisualiserGraphService {
|
|
|
2039
2066
|
// Call the update method again to re-simulate the graph with the new data
|
|
2040
2067
|
this.update(initialData, element, zoom, zoomToFit);
|
|
2041
2068
|
}
|
|
2042
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2043
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2069
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: VisualiserGraphService, deps: [{ token: DexieService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2070
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: VisualiserGraphService, providedIn: 'root' });
|
|
2044
2071
|
}
|
|
2045
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2072
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: VisualiserGraphService, decorators: [{
|
|
2046
2073
|
type: Injectable,
|
|
2047
2074
|
args: [{
|
|
2048
2075
|
providedIn: 'root',
|
|
@@ -2194,10 +2221,10 @@ class DagreNodesOnlyLayout {
|
|
|
2194
2221
|
}
|
|
2195
2222
|
return this.dagreGraph;
|
|
2196
2223
|
}
|
|
2197
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2198
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2224
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DagreNodesOnlyLayout, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2225
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DagreNodesOnlyLayout, providedIn: 'root' });
|
|
2199
2226
|
}
|
|
2200
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DagreNodesOnlyLayout, decorators: [{
|
|
2201
2228
|
type: Injectable,
|
|
2202
2229
|
args: [{
|
|
2203
2230
|
providedIn: 'root',
|
|
@@ -2612,6 +2639,7 @@ class VisualiserGraphComponent {
|
|
|
2612
2639
|
title: "Editing a link label will save graph data, are you sure?",
|
|
2613
2640
|
input: "text",
|
|
2614
2641
|
inputValue,
|
|
2642
|
+
inputValidator: (value) => value.trim().length > 0 ? undefined : "A link label must contain at least one character.",
|
|
2615
2643
|
text: "You won't be able to revert this!",
|
|
2616
2644
|
icon: "warning",
|
|
2617
2645
|
showCancelButton: true,
|
|
@@ -2768,12 +2796,12 @@ class VisualiserGraphComponent {
|
|
|
2768
2796
|
console.error(`Modal template ${modal} is not available.`);
|
|
2769
2797
|
}
|
|
2770
2798
|
}
|
|
2771
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2772
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2799
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: VisualiserGraphComponent, deps: [{ token: VisualiserGraphService }, { token: i2.ContextMenuService }, { token: DagreNodesOnlyLayout }, { token: DexieService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2800
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: VisualiserGraphComponent, selector: "visualiser-graph", inputs: { readOnly: "readOnly", zoom: "zoom", controls: "controls", zoomToFit: "zoomToFit", data: "data" }, outputs: { saveGraphDataEvent: "saveGraphDataEvent" }, viewQueries: [{ propertyName: "graphElement", first: true, predicate: ["svgId"], descendants: true }, { propertyName: "contextMenu", first: true, predicate: ContextMenusComponent, descendants: true }, { propertyName: "modalsComponent", first: true, predicate: ModalsComponent, descendants: true }], ngImport: i0, template: "<div class=\"page\" id=\"pageId\" (window:resize)=\"onResize()\">\n <div id=\"draggable\" class=\"buttonBar\" [style.right]=\"buttonBarRightPosition\">\n @if (controls) {\n <div>\n <div class=\"d-flex justify-content-end\">\n <div class=\"btn-group\" role=\"group\" aria-label=\"Controls\">\n <button type=\"button\" id=\"draggableHandle\" class=\"btn btn-light\" data-toggle=\"tooltip\" data-placement=\"top\"\n title=\"Move toolbar\">\n <i class=\"bi bi-grip-vertical\"></i>\n </button>\n <button type=\"button\" id=\"dagre_layout\" class=\"btn btn-secondary\" data-toggle=\"tooltip\" data-placement=\"top\"\n title=\"Dagre layout\" (click)=\"applyLayout()\">\n <i class=\"bi bi-diagram-3\"></i>\n </button>\n <button type=\"button\" id=\"save_graph\" class=\"btn btn-secondary\" data-toggle=\"tooltip\" data-placement=\"top\"\n title=\"Save data\" (click)=\"onConfirmSave()\">\n <i class=\"bi bi-save\"></i>\n </button>\n <button type=\"button\" id=\"reset_graph\" class=\"btn btn-secondary\" data-toggle=\"tooltip\" data-placement=\"top\"\n title=\"Reset data\" (click)=\"resetGraph()\">\n <i class=\"bi bi-skip-backward\"></i>\n </button>\n @if (zoom) {\n <button type=\"button\" class=\"btn btn-secondary\" data-toggle=\"tooltip\" data-placement=\"top\"\n title=\"Zoom in\" id=\"zoom_in\">\n <i class=\"bi bi-zoom-in\"></i>\n </button>\n }\n @if (zoom) {\n <button type=\"button\" class=\"btn btn-secondary\" data-toggle=\"tooltip\" data-placement=\"top\"\n title=\"Zoom out\" id=\"zoom_out\">\n <i class=\"bi bi-zoom-out\"></i>\n </button>\n }\n @if (zoom) {\n <button type=\"button\" class=\"btn btn-secondary\" data-toggle=\"tooltip\" data-placement=\"top\"\n title=\"Zoom reset\" id=\"zoom_reset\" disabled=\"true\">\n <i class=\"bi bi-arrow-counterclockwise\"></i>\n </button>\n }\n @if (zoom) {\n <button type=\"button\" class=\"btn btn-secondary\" data-toggle=\"tooltip\" data-placement=\"top\"\n title=\"Zoom to fit\" id=\"zoom_to_fit\">\n <i class=\"bi bi-arrows-fullscreen\"></i>\n </button>\n }\n @if (zoom) {\n <button type=\"button\" class=\"btn btn-secondary\" data-toggle=\"tooltip\" data-placement=\"top\"\n title=\"Select all\" id=\"select_all\">\n <i class=\"bi bi-grid-fill\"></i>\n </button>\n }\n @if (zoom) {\n <button type=\"button\" class=\"btn btn-secondary\" data-toggle=\"tooltip\" data-placement=\"top\"\n title=\"Invert selection\" id=\"toggle_selection\">\n <i class=\"bi bi-ui-checks-grid\"></i>\n </button>\n }\n <button type=\"button\" class=\"btn btn-secondary\" data-toggle=\"tooltip\" data-placement=\"top\"\n title=\"Toggle search\" id=\"toggle_search\"\n [ngClass]=\"{'searchButtonActive': showSearch, 'searchButtonInactive': !showSearch}\"\n (click)=\"toggleSearch()\">\n <i class=\"bi bi-search\"></i>\n </button>\n </div>\n </div>\n <div class=\"search float-right input-group mt-3 pr-0\" [hidden]=\"!showSearch\">\n <div class=\"input-group-prepend\">\n <button type=\"button\" id=\"prevButton\" class=\"btn btn-secondary\" data-toggle=\"tooltip\" data-placement=\"top\"\n title=\"Previous\" disabled>\n <i class=\"bi bi-arrow-left-square\"></i>\n </button>\n <button type=\"button\" id=\"nextButton\" class=\"btn btn-secondary\" data-toggle=\"tooltip\" data-placement=\"top\"\n title=\"Next\" disabled>\n <i class=\"bi bi-arrow-right-square\"></i>\n </button>\n </div>\n <input type=\"text\" id=\"searchInput\" class=\"form-control\" placeholder=\"Search\" aria-label=\"Search\"\n aria-describedby=\"search\" />\n <div class=\"input-group-append\">\n <button class=\"btn btn-outline-secondary\" type=\"button\" id=\"searchButton\" data-toggle=\"tooltip\"\n data-placement=\"top\" title=\"Search\">\n <i class=\"bi bi-search\"></i>\n </button>\n </div>\n <div class=\"input-group-append\">\n <button class=\"btn btn-outline-secondary\" type=\"button\" id=\"clearButton\" data-toggle=\"tooltip\"\n data-placement=\"top\" title=\"Clear\" disabled>\n clear\n </button>\n </div>\n </div>\n </div>\n }\n <div [hidden]=\"!showSearch\" id=\"noMatchesText\" class=\"noMatchesText float-right\">No matches found</div>\n </div>\n <!-- Zoom indicator-->\n @if (zoom) {\n <div class=\"zoomIndicator\">\n <span id=\"zoom_level\"></span>\n </div>\n }\n\n <app-context-menus\n (editNodeContextMenuEvent)=\"handleEditNodesEvent($event)\"\n (findCreateNodesContextMenuEvent)=\"findCreateNodesEvent($event)\"\n (createLinkContextMenuEvent)=\"handleCreateLinksEvent($event)\"\n (editLinkLabelContextMenuEvent)=\"onEditLinkLabel()\"\n (editLinksContextMenuEvent)=\"handleEditLinksEvent($event)\">\n </app-context-menus>\n\n <app-modals\n [editNodeData]=\"editNodeData\"\n [editLinksData]=\"editLinksData\"\n (createEditLinkEvent)=\"onCreateEditLink($event)\"\n (createEditNodeEvent)=\"onCreateEditNode($event)\"\n (deleteLinkEvent)=\"onDeleteLink($event)\"\n (deleteNodeEvent)=\"onDeleteNode()\">\n </app-modals>\n\n <svg #svgId [attr.width]=\"width\" height=\"780\" (click)=\"dismissContextMenu($event)\" (contextmenu)=\"visualiserContextMenus($event)\"></svg>\n</div>", styles: ["@import\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css\";@import\"https://cdnjs.cloudflare.com/ajax/libs/bootstrap/4.6.2/css/bootstrap.min.css\";@import\"https://cdn.jsdelivr.net/npm/bootstrap-icons@1.3.0/font/bootstrap-icons.css\";#zoom_level{position:relative;background-color:#000c;color:#fff;padding:5px;border-radius:5px;opacity:0;transition:opacity 1s ease-in-out}.buttonBar{position:absolute;padding:10px}.zoomIndicator{position:absolute;left:0;padding:10px}.noMatchesText{opacity:0;transition:opacity .5s;color:red}.noMatchesText.show{opacity:1}@keyframes floatInFromTop{0%{opacity:0;transform:translateY(-100%)}to{opacity:1;transform:translateY(0)}}.input-group{animation-name:floatInFromTop;animation-duration:.3s;animation-fill-mode:forwards;position:relative;width:407px}.searchButtonActive{outline:none;-webkit-box-shadow:inset 0px 0px 5px #323232;-moz-box-shadow:inset 0px 0px 5px #323232;box-shadow:inset 0 0 5px #323232}.searchButtonActive:focus,.searchButtonActive:active{outline:none;-webkit-box-shadow:inset 0px 0px 5px #323232;-moz-box-shadow:inset 0px 0px 5px #323232;box-shadow:inset 0 0 5px #323232}.searchButtonInactive{opacity:1;outline:none;box-shadow:none;background-color:#6c757d!important;border-color:#6c757d!important}#draggableHandle{cursor:move}@media (max-width: 768px){.buttonBar{flex-direction:column;align-items:flex-start}.btn-group{flex-direction:column}.btn-group .btn{width:100%;margin-bottom:5px}}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ContextMenusComponent, selector: "app-context-menus", outputs: ["editNodeContextMenuEvent", "findCreateNodesContextMenuEvent", "createLinkContextMenuEvent", "editLinkLabelContextMenuEvent", "editLinksContextMenuEvent"] }, { kind: "component", type: ModalsComponent, selector: "app-modals", inputs: ["editNodeData", "editLinksData"], outputs: ["closeModalEvent", "createEditLinkEvent", "createEditNodeEvent", "deleteLinkEvent", "deleteNodeEvent"] }] });
|
|
2773
2801
|
}
|
|
2774
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2802
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: VisualiserGraphComponent, decorators: [{
|
|
2775
2803
|
type: Component,
|
|
2776
|
-
args: [{ selector: 'visualiser-graph', template: "<div class=\"page\" id=\"pageId\" (window:resize)=\"onResize()\">\n <div id=\"draggable\" class=\"buttonBar\" [style.right]=\"buttonBarRightPosition\">\n
|
|
2804
|
+
args: [{ selector: 'visualiser-graph', template: "<div class=\"page\" id=\"pageId\" (window:resize)=\"onResize()\">\n <div id=\"draggable\" class=\"buttonBar\" [style.right]=\"buttonBarRightPosition\">\n @if (controls) {\n <div>\n <div class=\"d-flex justify-content-end\">\n <div class=\"btn-group\" role=\"group\" aria-label=\"Controls\">\n <button type=\"button\" id=\"draggableHandle\" class=\"btn btn-light\" data-toggle=\"tooltip\" data-placement=\"top\"\n title=\"Move toolbar\">\n <i class=\"bi bi-grip-vertical\"></i>\n </button>\n <button type=\"button\" id=\"dagre_layout\" class=\"btn btn-secondary\" data-toggle=\"tooltip\" data-placement=\"top\"\n title=\"Dagre layout\" (click)=\"applyLayout()\">\n <i class=\"bi bi-diagram-3\"></i>\n </button>\n <button type=\"button\" id=\"save_graph\" class=\"btn btn-secondary\" data-toggle=\"tooltip\" data-placement=\"top\"\n title=\"Save data\" (click)=\"onConfirmSave()\">\n <i class=\"bi bi-save\"></i>\n </button>\n <button type=\"button\" id=\"reset_graph\" class=\"btn btn-secondary\" data-toggle=\"tooltip\" data-placement=\"top\"\n title=\"Reset data\" (click)=\"resetGraph()\">\n <i class=\"bi bi-skip-backward\"></i>\n </button>\n @if (zoom) {\n <button type=\"button\" class=\"btn btn-secondary\" data-toggle=\"tooltip\" data-placement=\"top\"\n title=\"Zoom in\" id=\"zoom_in\">\n <i class=\"bi bi-zoom-in\"></i>\n </button>\n }\n @if (zoom) {\n <button type=\"button\" class=\"btn btn-secondary\" data-toggle=\"tooltip\" data-placement=\"top\"\n title=\"Zoom out\" id=\"zoom_out\">\n <i class=\"bi bi-zoom-out\"></i>\n </button>\n }\n @if (zoom) {\n <button type=\"button\" class=\"btn btn-secondary\" data-toggle=\"tooltip\" data-placement=\"top\"\n title=\"Zoom reset\" id=\"zoom_reset\" disabled=\"true\">\n <i class=\"bi bi-arrow-counterclockwise\"></i>\n </button>\n }\n @if (zoom) {\n <button type=\"button\" class=\"btn btn-secondary\" data-toggle=\"tooltip\" data-placement=\"top\"\n title=\"Zoom to fit\" id=\"zoom_to_fit\">\n <i class=\"bi bi-arrows-fullscreen\"></i>\n </button>\n }\n @if (zoom) {\n <button type=\"button\" class=\"btn btn-secondary\" data-toggle=\"tooltip\" data-placement=\"top\"\n title=\"Select all\" id=\"select_all\">\n <i class=\"bi bi-grid-fill\"></i>\n </button>\n }\n @if (zoom) {\n <button type=\"button\" class=\"btn btn-secondary\" data-toggle=\"tooltip\" data-placement=\"top\"\n title=\"Invert selection\" id=\"toggle_selection\">\n <i class=\"bi bi-ui-checks-grid\"></i>\n </button>\n }\n <button type=\"button\" class=\"btn btn-secondary\" data-toggle=\"tooltip\" data-placement=\"top\"\n title=\"Toggle search\" id=\"toggle_search\"\n [ngClass]=\"{'searchButtonActive': showSearch, 'searchButtonInactive': !showSearch}\"\n (click)=\"toggleSearch()\">\n <i class=\"bi bi-search\"></i>\n </button>\n </div>\n </div>\n <div class=\"search float-right input-group mt-3 pr-0\" [hidden]=\"!showSearch\">\n <div class=\"input-group-prepend\">\n <button type=\"button\" id=\"prevButton\" class=\"btn btn-secondary\" data-toggle=\"tooltip\" data-placement=\"top\"\n title=\"Previous\" disabled>\n <i class=\"bi bi-arrow-left-square\"></i>\n </button>\n <button type=\"button\" id=\"nextButton\" class=\"btn btn-secondary\" data-toggle=\"tooltip\" data-placement=\"top\"\n title=\"Next\" disabled>\n <i class=\"bi bi-arrow-right-square\"></i>\n </button>\n </div>\n <input type=\"text\" id=\"searchInput\" class=\"form-control\" placeholder=\"Search\" aria-label=\"Search\"\n aria-describedby=\"search\" />\n <div class=\"input-group-append\">\n <button class=\"btn btn-outline-secondary\" type=\"button\" id=\"searchButton\" data-toggle=\"tooltip\"\n data-placement=\"top\" title=\"Search\">\n <i class=\"bi bi-search\"></i>\n </button>\n </div>\n <div class=\"input-group-append\">\n <button class=\"btn btn-outline-secondary\" type=\"button\" id=\"clearButton\" data-toggle=\"tooltip\"\n data-placement=\"top\" title=\"Clear\" disabled>\n clear\n </button>\n </div>\n </div>\n </div>\n }\n <div [hidden]=\"!showSearch\" id=\"noMatchesText\" class=\"noMatchesText float-right\">No matches found</div>\n </div>\n <!-- Zoom indicator-->\n @if (zoom) {\n <div class=\"zoomIndicator\">\n <span id=\"zoom_level\"></span>\n </div>\n }\n\n <app-context-menus\n (editNodeContextMenuEvent)=\"handleEditNodesEvent($event)\"\n (findCreateNodesContextMenuEvent)=\"findCreateNodesEvent($event)\"\n (createLinkContextMenuEvent)=\"handleCreateLinksEvent($event)\"\n (editLinkLabelContextMenuEvent)=\"onEditLinkLabel()\"\n (editLinksContextMenuEvent)=\"handleEditLinksEvent($event)\">\n </app-context-menus>\n\n <app-modals\n [editNodeData]=\"editNodeData\"\n [editLinksData]=\"editLinksData\"\n (createEditLinkEvent)=\"onCreateEditLink($event)\"\n (createEditNodeEvent)=\"onCreateEditNode($event)\"\n (deleteLinkEvent)=\"onDeleteLink($event)\"\n (deleteNodeEvent)=\"onDeleteNode()\">\n </app-modals>\n\n <svg #svgId [attr.width]=\"width\" height=\"780\" (click)=\"dismissContextMenu($event)\" (contextmenu)=\"visualiserContextMenus($event)\"></svg>\n</div>", styles: ["@import\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css\";@import\"https://cdnjs.cloudflare.com/ajax/libs/bootstrap/4.6.2/css/bootstrap.min.css\";@import\"https://cdn.jsdelivr.net/npm/bootstrap-icons@1.3.0/font/bootstrap-icons.css\";#zoom_level{position:relative;background-color:#000c;color:#fff;padding:5px;border-radius:5px;opacity:0;transition:opacity 1s ease-in-out}.buttonBar{position:absolute;padding:10px}.zoomIndicator{position:absolute;left:0;padding:10px}.noMatchesText{opacity:0;transition:opacity .5s;color:red}.noMatchesText.show{opacity:1}@keyframes floatInFromTop{0%{opacity:0;transform:translateY(-100%)}to{opacity:1;transform:translateY(0)}}.input-group{animation-name:floatInFromTop;animation-duration:.3s;animation-fill-mode:forwards;position:relative;width:407px}.searchButtonActive{outline:none;-webkit-box-shadow:inset 0px 0px 5px #323232;-moz-box-shadow:inset 0px 0px 5px #323232;box-shadow:inset 0 0 5px #323232}.searchButtonActive:focus,.searchButtonActive:active{outline:none;-webkit-box-shadow:inset 0px 0px 5px #323232;-moz-box-shadow:inset 0px 0px 5px #323232;box-shadow:inset 0 0 5px #323232}.searchButtonInactive{opacity:1;outline:none;box-shadow:none;background-color:#6c757d!important;border-color:#6c757d!important}#draggableHandle{cursor:move}@media (max-width: 768px){.buttonBar{flex-direction:column;align-items:flex-start}.btn-group{flex-direction:column}.btn-group .btn{width:100%;margin-bottom:5px}}\n"] }]
|
|
2777
2805
|
}], ctorParameters: () => [{ type: VisualiserGraphService }, { type: i2.ContextMenuService }, { type: DagreNodesOnlyLayout }, { type: DexieService }], propDecorators: { graphElement: [{
|
|
2778
2806
|
type: ViewChild,
|
|
2779
2807
|
args: ['svgId']
|
|
@@ -2798,20 +2826,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2798
2826
|
}] } });
|
|
2799
2827
|
|
|
2800
2828
|
class NgxRelationshipVisualiserModule {
|
|
2801
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2802
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
2829
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NgxRelationshipVisualiserModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2830
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: NgxRelationshipVisualiserModule, declarations: [VisualiserGraphComponent,
|
|
2803
2831
|
ContextMenusComponent,
|
|
2804
2832
|
ModalsComponent], imports: [BrowserModule,
|
|
2805
2833
|
ReactiveFormsModule, i1.ModalModule, i2.ContextMenuModule, NgSelectModule,
|
|
2806
2834
|
FormsModule], exports: [VisualiserGraphComponent] });
|
|
2807
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2835
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NgxRelationshipVisualiserModule, imports: [BrowserModule,
|
|
2808
2836
|
ReactiveFormsModule,
|
|
2809
2837
|
ModalModule.forRoot(),
|
|
2810
2838
|
ContextMenuModule.forRoot({ useBootstrap4: true }),
|
|
2811
2839
|
NgSelectModule,
|
|
2812
2840
|
FormsModule] });
|
|
2813
2841
|
}
|
|
2814
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2842
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NgxRelationshipVisualiserModule, decorators: [{
|
|
2815
2843
|
type: NgModule,
|
|
2816
2844
|
args: [{
|
|
2817
2845
|
declarations: [
|