Skip to content
Snippets Groups Projects
Commit 2857eac9 authored by Florent Poittevin's avatar Florent Poittevin
Browse files

fix(sparql code editor): add button to copy query

parent 0848d285
Branches
Tags
No related merge requests found
......@@ -37,6 +37,7 @@ import {LabelTranslateEnum} from "@shared/enums/label-translate.enum";
import {
CodeEditorPresentational,
isNullOrUndefined,
NotificationService,
SsrUtil,
} from "solidify-frontend";
......@@ -51,13 +52,17 @@ export class SharedSparqlCodeEditorPresentational extends CodeEditorPresentation
override syntaxValidMessage: string = LabelTranslateEnum.queryValid;
override syntaxInvalidMessage: string = LabelTranslateEnum.queryInvalid;
override COPY_BUTTON_LABEL: string = LabelTranslateEnum.copyQuery;
protected override _COPY_NOTIFICATION_LABEL: string = LabelTranslateEnum.copiedQueryToClipboard;
override mode: "sparql" = "sparql";
constructor(protected readonly _injector: Injector,
@Self() @Optional() protected readonly _ngControl: NgControl,
protected readonly _store: Store,
protected readonly _changeDetector: ChangeDetectorRef) {
super(_injector, environment, _ngControl, _store, _changeDetector);
protected readonly _changeDetector: ChangeDetectorRef,
protected readonly _notificationService: NotificationService) {
super(_injector, environment, _ngControl, _store, _changeDetector, _notificationService);
if (SsrUtil.isBrowser) {
this.sparqlParser = new (require("sparqljs").Parser)({skipValidation: false});
this.parser = (value: string) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment