From 816b4d38d53c3c7713cd841cd49b57685af5dad6 Mon Sep 17 00:00:00 2001 From: ck-c8y Date: Thu, 28 Nov 2024 20:20:41 +0100 Subject: [PATCH] fix bug in styling jsoneditor --- .../src/mapping-tree/tree.component.ts | 21 ++++---- .../src/mapping/shared/mapping.style.css | 16 +----- .../snoop-explorer-modal.component.html | 8 +-- .../snoop-explorer-modal.component.ts | 17 ++++-- .../mapping-stepper.component.html | 2 +- .../snooping-stepper.component.ts | 2 +- .../shared/editor2/jsoneditor2.component.ts | 52 ++++++++++--------- .../src/shared/editor2/jsoneditor2.style.css | 2 +- 8 files changed, 56 insertions(+), 64 deletions(-) diff --git a/dynamic-mapping-ui/src/mapping-tree/tree.component.ts b/dynamic-mapping-ui/src/mapping-tree/tree.component.ts index 94f12846..1ea3cabc 100644 --- a/dynamic-mapping-ui/src/mapping-tree/tree.component.ts +++ b/dynamic-mapping-ui/src/mapping-tree/tree.component.ts @@ -33,22 +33,21 @@ import { BehaviorSubject } from 'rxjs'; export class MappingTreeComponent implements OnInit { constructor( private service: MappingTreeService, - private route: ActivatedRoute - ) {} + private route: ActivatedRoute, + ) { } @ViewChild('editorTree', { static: false }) editorTree: JsonEditor2Component; mappingTree$: BehaviorSubject = new BehaviorSubject([]); - editorOptionsTree: any = {}; + editorOptionsTree: any = { + mode: 'tree', + removeModes: ['text', 'table'], + mainMenuBar: true, + navigationBar: false, + statusBar: false, + readOnly: true, + }; ngOnInit() { - this.editorOptionsTree = { - mode: 'tree', - mainMenuBar: true, - navigationBar: false, - statusBar: false, - readOnly: false, - name: 'root' - }; this.mappingTree$.next(this.route.snapshot.data['mappingTree']); } diff --git a/dynamic-mapping-ui/src/mapping/shared/mapping.style.css b/dynamic-mapping-ui/src/mapping/shared/mapping.style.css index e1ca37f7..1289e036 100644 --- a/dynamic-mapping-ui/src/mapping/shared/mapping.style.css +++ b/dynamic-mapping-ui/src/mapping/shared/mapping.style.css @@ -40,11 +40,6 @@ c8y-data-grid button[title='Reload'] { font-size: smaller !important; } -json-editor > div { - max-height: 300px; - overflow: auto !important; -} - .column-left-border { border-left: 1px solid; border-color: var(--c8y-form-legend-color); @@ -58,10 +53,6 @@ json-editor > div { /* border-color: var(--c8y-root-component-separator-color); */ } -.reduced-top { - top: -20px; -} - @keyframes background-color { from { background-color: var(--brand-light, var(--c8y-brand-light)); @@ -70,10 +61,7 @@ json-editor > div { background-color: white; } } + .c8y-switch > button { display: none; -} -.not-p-b-24 { - padding-bottom: 6px; - padding-left: 0px; -} +} \ No newline at end of file diff --git a/dynamic-mapping-ui/src/mapping/snoop-explorer/snoop-explorer-modal.component.html b/dynamic-mapping-ui/src/mapping/snoop-explorer/snoop-explorer-modal.component.html index 674f7ce0..8c316918 100644 --- a/dynamic-mapping-ui/src/mapping/snoop-explorer/snoop-explorer-modal.component.html +++ b/dynamic-mapping-ui/src/mapping/snoop-explorer/snoop-explorer-modal.component.html @@ -30,16 +30,12 @@

Explore snooped templates

>
-