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==" "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
}, },
"sartography-workflow-lib": { "sartography-workflow-lib": {
"version": "0.0.415", "version": "0.0.456",
"resolved": "https://registry.npmjs.org/sartography-workflow-lib/-/sartography-workflow-lib-0.0.415.tgz", "resolved": "https://registry.npmjs.org/sartography-workflow-lib/-/sartography-workflow-lib-0.0.456.tgz",
"integrity": "sha512-dc/JObsAq0TqGra/NuHG23EpmXrfnQqxbhGWXXkTfySDcA9beRNxJ5nd7xlc8EZzbUiWXIKxVM3xiyBCBQ+88A==" "integrity": "sha512-CrS+OU6qAwIxCtQHXJaXUuRIav/ee/YSAhkeuqclroO39kPLtUFGND/zLvO+MD0tm2C4S9GjGmIo/vc9PTUxkw=="
}, },
"sass": { "sass": {
"version": "1.26.3", "version": "1.26.3",

View File

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

View File

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

View File

@ -1,4 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { ApiService } from 'sartography-workflow-lib';
@Component({ @Component({
selector: 'app-test-markdown-dialog', selector: 'app-test-markdown-dialog',
@ -6,7 +7,13 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./test-markdown-dialog.component.scss'] styleUrls: ['./test-markdown-dialog.component.scss']
}) })
export class TestMarkdownDialogComponent{ export class TestMarkdownDialogComponent{
data: string = "{}";
constructor() { } 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')"> <button mat-menu-item (click)="testEmailTemplate('df')">
<mat-icon>email</mat-icon> Test Email Template <mat-icon>email</mat-icon> Test Email Template
</button> </button>
<button mat-menu-item (click)="testMarkdown('sd')"> <button mat-menu-item (click)="testMarkdown()">
<mat-icon>search</mat-icon> Renderer Markdown <mat-icon>search</mat-icon> Renderer Markdown
</button> </button>
<button mat-menu-item [matMenuTriggerFor]="scripts"> <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 { DiagramComponent } from '../diagram/diagram.component';
import { ScriptDocDialogComponent } from '../_dialogs/script-doc-dialog/script-doc-dialog.component'; import { ScriptDocDialogComponent } from '../_dialogs/script-doc-dialog/script-doc-dialog.component';
import { TestEmailDialogComponent } from '../_dialogs/test-email-dialog/test-email-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({ @Component({
selector: 'app-modeler', selector: 'app-modeler',
@ -286,8 +287,10 @@ export class ModelerComponent implements AfterViewInit {
}); });
} }
testMarkdown(documentation: string) { testMarkdown() {
//this.displayScriptDocumentation(documentation); const dialogRef = this.dialog.open(TestMarkdownDialogComponent, {
});
} }