Initial commit

This commit is contained in:
2024-10-18 14:38:57 +02:00
commit 376c42c3e6
50 changed files with 15555 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
<main>
<section id="left">
<h3>Input</h3>
<ngx-monaco-editor (ngModelChange)="handleInputChange($event)"
[options]="inputOptions"
[(ngModel)]="input">
</ngx-monaco-editor>
</section>
<section id="right">
<h3>Output</h3>
<ngx-monaco-editor [options]="outputOptions"
[(ngModel)]="output">
</ngx-monaco-editor>
</section>
</main>

View File

@@ -0,0 +1,19 @@
main {
display: flex;
flex-direction: row;
height: 100%;
width: 100%;
#left {
flex: 0.5;
}
#right {
flex: 0.5;
}
ngx-monaco-editor {
height: 100%;
width: 100%;
}
}

View File

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { InputOutputComponent } from './input-output.component';
describe('InputOutputComponent', () => {
let component: InputOutputComponent;
let fixture: ComponentFixture<InputOutputComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [InputOutputComponent]
})
.compileComponents();
fixture = TestBed.createComponent(InputOutputComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,25 @@
import {Component, EventEmitter, Input, Output} from '@angular/core';
import {EditorComponent} from "ngx-monaco-editor-v2";
import {FormsModule} from "@angular/forms";
@Component({
selector: 'app-input-output',
standalone: true,
imports: [
EditorComponent,
FormsModule
],
templateUrl: './input-output.component.html',
styleUrl: './input-output.component.scss'
})
export class InputOutputComponent {
@Input() input!: string;
@Input() inputOptions!: any;
@Output() onInputChange = new EventEmitter();
@Input() output!: string;
@Input() outputOptions!: any;
handleInputChange($event: string) {
this.onInputChange.emit($event);
}
}