Linting.
This commit is contained in:
parent
43b3159947
commit
182353d555
|
@ -20,10 +20,7 @@
|
|||
</script>
|
||||
|
||||
<div on:click|stopPropagation bind:this={anchor}>
|
||||
<TextButton
|
||||
text
|
||||
on:click={dropdown.show}
|
||||
active={false}>
|
||||
<TextButton text on:click={dropdown.show} active={false}>
|
||||
<Icon name="add" />
|
||||
Add Parameters
|
||||
</TextButton>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
import { notificationStore } from "builderStore/store/notifications"
|
||||
import { flip } from 'svelte/animate';
|
||||
import { flip } from "svelte/animate"
|
||||
import { fly } from "svelte/transition"
|
||||
|
||||
export let themes = {
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
</script>
|
||||
|
||||
<form on:submit|preventDefault>
|
||||
<div class="field">
|
||||
<div class="field">
|
||||
{#each schemaKeys as field}
|
||||
<Input
|
||||
placeholder="Enter {field} name"
|
||||
|
@ -34,7 +34,7 @@
|
|||
required={schema.fields[field]?.required}
|
||||
bind:value={fields[field]} />
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{#if schema.customisable}
|
||||
<Editor
|
||||
|
|
|
@ -136,7 +136,10 @@
|
|||
</div>
|
||||
{#if config}
|
||||
<div class="props">
|
||||
<div class="query-type">Query type: <span class="query-type-span">{config[query.queryVerb].type}</span></div>
|
||||
<div class="query-type">
|
||||
Query type:
|
||||
<span class="query-type-span">{config[query.queryVerb].type}</span>
|
||||
</div>
|
||||
<div class="select">
|
||||
<Select primary thin bind:value={query.queryVerb}>
|
||||
{#each Object.keys(config) as queryVerb}
|
||||
|
@ -145,7 +148,9 @@
|
|||
</Select>
|
||||
</div>
|
||||
</div>
|
||||
<EditQueryParamsPopover bind:parameters={query.parameters} bindable={false} />
|
||||
<EditQueryParamsPopover
|
||||
bind:parameters={query.parameters}
|
||||
bindable={false} />
|
||||
{/if}
|
||||
</header>
|
||||
<Spacer extraLarge />
|
||||
|
@ -162,10 +167,7 @@
|
|||
<Spacer large />
|
||||
|
||||
<div class="viewer-controls">
|
||||
<Button
|
||||
blue
|
||||
disabled={data.length === 0}
|
||||
on:click={saveQuery}>
|
||||
<Button blue disabled={data.length === 0} on:click={saveQuery}>
|
||||
Save Query
|
||||
</Button>
|
||||
<Button primary on:click={previewQuery}>Run Query</Button>
|
||||
|
@ -182,7 +184,11 @@
|
|||
{#each fields as field, idx}
|
||||
<Spacer small />
|
||||
<div class="field">
|
||||
<Input outline placeholder="Field Name" type={'text'} bind:value={field.name} />
|
||||
<Input
|
||||
outline
|
||||
placeholder="Field Name"
|
||||
type={'text'}
|
||||
bind:value={field.name} />
|
||||
<Select thin border bind:value={field.type}>
|
||||
<option value={''}>Select a field type</option>
|
||||
<option value={'STRING'}>Text</option>
|
||||
|
@ -206,7 +212,6 @@
|
|||
{/if}
|
||||
|
||||
<style>
|
||||
|
||||
.input {
|
||||
width: 300px;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
|
||||
{#if schema}
|
||||
{#key query._id}
|
||||
{#if schema.type === QueryTypes.SQL}
|
||||
|
|
|
@ -59,7 +59,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
|
|
|
@ -2,9 +2,14 @@
|
|||
import { writable } from "svelte/store"
|
||||
import { setContext, onMount } from "svelte"
|
||||
import Component from "./Component.svelte"
|
||||
import NotificationDisplay from './NotificationDisplay.svelte'
|
||||
import NotificationDisplay from "./NotificationDisplay.svelte"
|
||||
import SDK from "../sdk"
|
||||
import { createDataStore, initialise, screenStore, notificationStore } from "../store"
|
||||
import {
|
||||
createDataStore,
|
||||
initialise,
|
||||
screenStore,
|
||||
notificationStore,
|
||||
} from "../store"
|
||||
|
||||
// Provide contexts
|
||||
setContext("sdk", SDK)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script>
|
||||
import { flip } from 'svelte/animate';
|
||||
import { flip } from "svelte/animate"
|
||||
import { fly } from "svelte/transition"
|
||||
import { getContext } from "svelte"
|
||||
const { notifications } = getContext("sdk")
|
||||
|
@ -11,9 +11,9 @@
|
|||
info: "#5bc0de",
|
||||
default: "#aaaaaa",
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<div class="notifications">
|
||||
<div class="notifications">
|
||||
{#each $notifications as notification (notification.id)}
|
||||
<div
|
||||
animate:flip
|
||||
|
@ -24,9 +24,9 @@
|
|||
{#if notification.icon}<i class={notification.icon} />{/if}
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
<style>
|
||||
.notifications {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
|
@ -56,5 +56,4 @@
|
|||
color: white;
|
||||
font-weight: 500;
|
||||
}
|
||||
</style>
|
||||
|
||||
</style>
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
const Helper = require("./Helper")
|
||||
const { SafeString } = require("handlebars")
|
||||
const externalHandlebars = require("./external")
|
||||
const { HelperFunctionNames, HelperFunctionBuiltin, LITERAL_MARKER } = require("./constants")
|
||||
const {
|
||||
HelperFunctionNames,
|
||||
HelperFunctionBuiltin,
|
||||
LITERAL_MARKER,
|
||||
} = require("./constants")
|
||||
|
||||
const HTML_SWAPS = {
|
||||
"<": "<",
|
||||
|
@ -29,10 +33,10 @@ const HELPERS = [
|
|||
}),
|
||||
// adds a note for post-processor
|
||||
new Helper(HelperFunctionNames.LITERAL, value => {
|
||||
const type = typeof(value)
|
||||
const type = typeof value
|
||||
const outputVal = type === "object" ? JSON.stringify(value) : value
|
||||
return `{{-${LITERAL_MARKER}-${type}-${outputVal}-}}`
|
||||
})
|
||||
}),
|
||||
]
|
||||
|
||||
module.exports.HelperNames = () => {
|
||||
|
|
|
@ -39,5 +39,5 @@ module.exports.processors = [
|
|||
return JSON.parse(value)
|
||||
}
|
||||
return value
|
||||
})
|
||||
}),
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue