2021-12-01 18:41:49 +00:00
|
|
|
<div ...attributes>
|
2021-12-17 03:44:29 +00:00
|
|
|
{{#if this.getShowToolbar}}
|
|
|
|
<div data-test-component="json-editor-toolbar">
|
|
|
|
<Toolbar>
|
|
|
|
<label class="is-label" data-test-component="json-editor-title">
|
|
|
|
{{@title}}
|
|
|
|
{{#if @subTitle}}
|
|
|
|
<span class="is-size-9 is-lowercase has-text-grey">({{@subTitle}})</span>
|
|
|
|
{{/if}}
|
|
|
|
</label>
|
|
|
|
<ToolbarActions>
|
|
|
|
{{yield}}
|
|
|
|
<div class="toolbar-separator"></div>
|
|
|
|
<CopyButton
|
|
|
|
class="button is-transparent"
|
|
|
|
@clipboardText={{@value}}
|
|
|
|
@buttonType="button"
|
|
|
|
@success={{action (set-flash-message "Data copied!")}}
|
|
|
|
>
|
|
|
|
<Icon @name="clipboard-copy" aria-label="Copy" />
|
|
|
|
</CopyButton>
|
|
|
|
</ToolbarActions>
|
|
|
|
</Toolbar>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2021-12-01 18:41:49 +00:00
|
|
|
|
2021-12-17 03:44:29 +00:00
|
|
|
<IvyCodemirror
|
|
|
|
@data-test-component="json-editor"
|
|
|
|
@value={{@value}}
|
|
|
|
@options={{this.options}}
|
|
|
|
@valueUpdated={{action "updateValue"}}
|
|
|
|
@onFocusOut={{action "onFocus"}}
|
|
|
|
/>
|
2021-12-01 18:41:49 +00:00
|
|
|
|
2021-12-17 03:44:29 +00:00
|
|
|
{{#if @helpText}}
|
|
|
|
<div class="box is-shadowless is-fullwidth has-short-padding">
|
|
|
|
<p class="sub-text">{{@helpText}}</p>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2021-12-07 17:05:14 +00:00
|
|
|
</div>
|