Updated Modeler

This commit is contained in:
NWalker4483 2021-04-16 08:58:31 -04:00
parent 52289daf3f
commit 01b6a39155
6 changed files with 29 additions and 12 deletions

6
package-lock.json generated
View File

@ -12033,9 +12033,9 @@
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"sartography-workflow-lib": {
"version": "0.0.415",
"resolved": "https://registry.npmjs.org/sartography-workflow-lib/-/sartography-workflow-lib-0.0.415.tgz",
"integrity": "sha512-dc/JObsAq0TqGra/NuHG23EpmXrfnQqxbhGWXXkTfySDcA9beRNxJ5nd7xlc8EZzbUiWXIKxVM3xiyBCBQ+88A=="
"version": "0.0.456",
"resolved": "https://registry.npmjs.org/sartography-workflow-lib/-/sartography-workflow-lib-0.0.456.tgz",
"integrity": "sha512-CrS+OU6qAwIxCtQHXJaXUuRIav/ee/YSAhkeuqclroO39kPLtUFGND/zLvO+MD0tm2C4S9GjGmIo/vc9PTUxkw=="
},
"sass": {
"version": "1.26.3",

View File

@ -53,7 +53,7 @@
"ngx-highlightjs": "^4.1.1",
"ngx-markdown": "^9.1.1",
"rxjs": "~6.5.4",
"sartography-workflow-lib": "0.0.415",
"sartography-workflow-lib": "0.0.456",
"tslib": "^1.13.0",
"uuid": "^7.0.2",
"zone.js": "^0.10.3"

View File

@ -2,10 +2,17 @@
<p>
<mat-form-field appearance="fill">
<mat-label>Textarea</mat-label>
<textarea matInput></textarea>
<textarea matInput
(change)="render()"
[(ngModel)]="template"
></textarea>
</mat-form-field>
</p>
<markdown [data]="result"></markdown>
<div mat-dialog-actions>
<button mat-button [mat-dialog-close]="">Exit</button>
</div>
<button mat-button (click)="render()">Render</button>
</div>
</mat-card>

View File

@ -1,4 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { ApiService } from 'sartography-workflow-lib';
@Component({
selector: 'app-test-markdown-dialog',
@ -6,7 +7,13 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./test-markdown-dialog.component.scss']
})
export class TestMarkdownDialogComponent{
constructor() { }
data: string = "{}";
template: string = "";
result: string = "";
constructor(
private api: ApiService) { }
render(){
this.api.renderMarkdown(this.template, this.data).subscribe(data => this.result = data);
}
}

View File

@ -84,7 +84,7 @@
<button mat-menu-item (click)="testEmailTemplate('df')">
<mat-icon>email</mat-icon> Test Email Template
</button>
<button mat-menu-item (click)="testMarkdown('sd')">
<button mat-menu-item (click)="testMarkdown()">
<mat-icon>search</mat-icon> Renderer Markdown
</button>
<button mat-menu-item [matMenuTriggerFor]="scripts">

View File

@ -25,6 +25,7 @@ import { ImportEvent } from '../_interfaces/import-event';
import { DiagramComponent } from '../diagram/diagram.component';
import { ScriptDocDialogComponent } from '../_dialogs/script-doc-dialog/script-doc-dialog.component';
import { TestEmailDialogComponent } from '../_dialogs/test-email-dialog/test-email-dialog.component';
import { TestMarkdownDialogComponent } from '../_dialogs/test-markdown-dialog/test-markdown-dialog.component';
@Component({
selector: 'app-modeler',
@ -286,8 +287,10 @@ export class ModelerComponent implements AfterViewInit {
});
}
testMarkdown(documentation: string) {
//this.displayScriptDocumentation(documentation);
testMarkdown() {
const dialogRef = this.dialog.open(TestMarkdownDialogComponent, {
});
}