File tree 2 files changed +8
-0
lines changed 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import marked from 'marked';
3
3
import { unsafeHTML } from 'lit-html/directives/unsafe-html' ;
4
4
import FontStyles from '@/styles/font-styles' ;
5
5
import SchemaStyles from '@/styles/schema-styles' ;
6
+ import { schemaInObjectNotation } from '@/utils/schema-utils' ;
6
7
7
8
export default class SchemaTable extends LitElement {
8
9
static get properties ( ) {
@@ -17,6 +18,9 @@ export default class SchemaTable extends LitElement {
17
18
super . connectedCallback ( ) ;
18
19
if ( ! this . schemaExpandLevel || this . schemaExpandLevel < 1 ) { this . schemaExpandLevel = 99999 ; }
19
20
if ( ! this . schemaDescriptionExpanded || ! 'true false' . includes ( this . schemaDescriptionExpanded ) ) { this . schemaDescriptionExpanded = 'false' ; }
21
+ if ( ! this . data ) {
22
+ this . data = schemaInObjectNotation ( JSON . parse ( this . querySelector ( 'pre' ) . textContent ) , { } ) ;
23
+ }
20
24
}
21
25
22
26
static get styles ( ) {
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { unsafeHTML } from 'lit-html/directives/unsafe-html';
4
4
import FontStyles from '@/styles/font-styles' ;
5
5
import SchemaStyles from '@/styles/schema-styles' ;
6
6
import BorderStyles from '@/styles/border-styles' ;
7
+ import { schemaInObjectNotation } from '@/utils/schema-utils' ;
7
8
8
9
export default class SchemaTree extends LitElement {
9
10
static get properties ( ) {
@@ -18,6 +19,9 @@ export default class SchemaTree extends LitElement {
18
19
super . connectedCallback ( ) ;
19
20
if ( ! this . schemaExpandLevel || this . schemaExpandLevel < 1 ) { this . schemaExpandLevel = 99999 ; }
20
21
if ( ! this . schemaDescriptionExpanded || ! 'true false' . includes ( this . schemaDescriptionExpanded ) ) { this . schemaDescriptionExpanded = 'false' ; }
22
+ if ( ! this . data ) {
23
+ this . data = schemaInObjectNotation ( JSON . parse ( this . querySelector ( 'pre' ) . textContent ) , { } ) ;
24
+ }
21
25
}
22
26
23
27
static get styles ( ) {
You can’t perform that action at this time.
0 commit comments