Fix all eslint issues

This commit is contained in:
Andrew Kingston 2021-06-15 19:36:56 +01:00
parent ef97b1e5ff
commit 38e064fa0f
97 changed files with 73 additions and 336 deletions

View File

@ -58,6 +58,7 @@
class:is-focused={open || focus} class:is-focused={open || focus}
> >
<input <input
{id}
type="text" type="text"
on:focus={() => (focus = true)} on:focus={() => (focus = true)}
on:blur={() => (focus = false)} on:blur={() => (focus = false)}

View File

@ -10,7 +10,6 @@
export let id = null export let id = null
export let disabled = false export let disabled = false
export let error = null export let error = null
export let isPlaceholder = false
export let enableTime = true export let enableTime = true
export let value = null export let value = null
export let placeholder = null export let placeholder = null

View File

@ -30,9 +30,6 @@
"bmp", "bmp",
"jfif", "jfif",
] ]
const onChange = event => {
dispatch("change", event.target.checked)
}
const fieldId = id || generateID() const fieldId = id || generateID()
let selectedImageIdx = 0 let selectedImageIdx = 0
@ -205,7 +202,8 @@
width="125" width="125"
height="60" height="60"
viewBox="0 0 199 97.7" viewBox="0 0 199 97.7"
><defs> >
<defs>
<style> <style>
.cls-1, .cls-1,
.cls-2 { .cls-2 {
@ -267,9 +265,9 @@
<p <p
class="spectrum-Body spectrum-Body--sizeS spectrum-IllustratedMessage-description" class="spectrum-Body spectrum-Body--sizeS spectrum-IllustratedMessage-description"
> >
<label for={fieldId} class="spectrum-Link" <label for={fieldId} class="spectrum-Link">
>Select a file to upload</label Select a file to upload
> </label>
<br /> <br />
from your computer from your computer
</p> </p>
@ -368,22 +366,11 @@
.right { .right {
right: 5px; right: 5px;
} }
i {
font-size: 2rem;
color: var(--ink);
}
i:hover {
cursor: pointer;
color: var(--background);
}
.delete-button { .delete-button {
transition: all 0.3s; transition: all 0.3s;
margin-left: 10px; margin-left: 10px;
display: flex; display: flex;
} }
.delete-button i {
font-size: 2em;
}
.delete-button:hover { .delete-button:hover {
cursor: pointer; cursor: pointer;
color: var(--red); color: var(--red);

View File

@ -10,6 +10,7 @@
export let options = [] export let options = []
export let getOptionLabel = option => option export let getOptionLabel = option => option
export let getOptionValue = option => option export let getOptionValue = option => option
export let readonly = false
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()
$: selectedLookupMap = getSelectedLookupMap(value) $: selectedLookupMap = getSelectedLookupMap(value)
@ -72,6 +73,7 @@
{id} {id}
{error} {error}
{disabled} {disabled}
{readonly}
{fieldText} {fieldText}
{options} {options}
isPlaceholder={!value?.length} isPlaceholder={!value?.length}

View File

@ -22,7 +22,7 @@
export let quiet = false export let quiet = false
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()
const onClick = e => { const onClick = () => {
dispatch("click") dispatch("click")
if (readonly) { if (readonly) {
return return

View File

@ -32,7 +32,9 @@
{disabled} {disabled}
/> />
<span class="spectrum-Radio-button" /> <span class="spectrum-Radio-button" />
<label class="spectrum-Radio-label">{getOptionLabel(option)}</label> <label for="" class="spectrum-Radio-label">
{getOptionLabel(option)}
</label>
</div> </div>
{/each} {/each}
{/if} {/if}

View File

@ -3,7 +3,6 @@
import { createEventDispatcher } from "svelte" import { createEventDispatcher } from "svelte"
export let value = false export let value = false
export let error = null
export let id = null export let id = null
export let text = null export let text = null
export let disabled = false export let disabled = false

View File

@ -25,6 +25,7 @@
<Multiselect <Multiselect
{error} {error}
{disabled} {disabled}
{readonly}
{value} {value}
{options} {options}
{placeholder} {placeholder}

View File

@ -10,7 +10,11 @@
export let hoverable = false export let hoverable = false
export let disabled = false export let disabled = false
$: rotation = directions.indexOf(direction) * 45 $: rotation = getRotation(direction)
const getRotation = direction => {
return directions.indexOf(direction) * 45
}
</script> </script>
<svg <svg

View File

@ -4,7 +4,7 @@
export let size = "M" export let size = "M"
</script> </script>
<label class={`spectrum-FieldLabel spectrum-FieldLabel--size${size}`}> <label for="" class={`spectrum-FieldLabel spectrum-FieldLabel--size${size}`}>
<slot /> <slot />
</label> </label>

View File

@ -4,14 +4,3 @@
</script> </script>
<Input label="Your Name" bind:value /> <Input label="Your Name" bind:value />
<style>
p {
font-size: var(--font-size-m);
margin: 0;
font-family: var(--font-sans);
font-weight: 400;
line-height: 1.5;
color: var(--grey-7);
}
</style>

View File

@ -1,5 +1,4 @@
<script> <script>
import { onMount } from "svelte"
import ModalContent from "./ModalContent.svelte" import ModalContent from "./ModalContent.svelte"
import Input from "../Form/Input.svelte" import Input from "../Form/Input.svelte"

View File

@ -8,7 +8,6 @@
export let duration = 1000 export let duration = 1000
export let width = false export let width = false
export let sideLabel = false export let sideLabel = false
export let overBackground = false
export let size = "M" export let size = "M"

View File

@ -10,7 +10,6 @@
export let value export let value
export let customRenderers = [] export let customRenderers = []
const plainTypes = ["string", "options", "number", "longform"]
const typeMap = { const typeMap = {
boolean: BooleanRenderer, boolean: BooleanRenderer,
datetime: DateTimeRenderer, datetime: DateTimeRenderer,

View File

@ -3,7 +3,6 @@
import ActionButton from "../ActionButton/ActionButton.svelte" import ActionButton from "../ActionButton/ActionButton.svelte"
export let selected export let selected
export let onToggleSelection
export let onEdit export let onEdit
export let allowSelectRows = false export let allowSelectRows = false
export let allowEditRows = false export let allowEditRows = false

View File

@ -48,7 +48,7 @@
return return
} }
formattedTagline = formattedTagline.replace( formattedTagline = formattedTagline.replace(
new RegExp(`{{\s*${inputPath}\s*}}`), new RegExp(`{{\\s*${inputPath}\\s*}}`),
prettyValue prettyValue
) )
} }

View File

@ -84,14 +84,4 @@
background-color: var(--grey-2); background-color: var(--grey-2);
color: var(--grey-8); color: var(--grey-8);
} }
header i {
font-size: 20px;
}
header i.delete {
opacity: 0.5;
}
header i.delete:hover {
cursor: pointer;
opacity: 1;
}
</style> </style>

View File

@ -53,8 +53,4 @@
text-decoration: underline; text-decoration: underline;
margin-left: var(--spectrum-alias-item-padding-s); margin-left: var(--spectrum-alias-item-padding-s);
} }
i {
font-size: 20px;
text-decoration: none;
}
</style> </style>

View File

@ -1,5 +1,5 @@
<script> <script>
import { Button, Select, Label, Heading, Input } from "@budibase/bbui" import { Button, Select, Input } from "@budibase/bbui"
export let value export let value

View File

@ -11,7 +11,6 @@
import * as api from "./api" import * as api from "./api"
import Table from "./Table.svelte" import Table from "./Table.svelte"
import { TableNames } from "constants" import { TableNames } from "constants"
import CreateEditUser from "./modals/CreateEditUser.svelte"
import CreateEditRow from "./modals/CreateEditRow.svelte" import CreateEditRow from "./modals/CreateEditRow.svelte"
let hideAutocolumns = true let hideAutocolumns = true

View File

@ -18,7 +18,6 @@
export let title export let title
export let allowEditing = false export let allowEditing = false
export let loading = false export let loading = false
export let theme = "alpine"
export let hideAutocolumns export let hideAutocolumns
export let rowCount export let rowCount
@ -149,11 +148,6 @@
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
} }
.table-title h1 {
font-size: var(--font-size-m);
font-weight: 600;
margin: 0;
}
.table-title > div { .table-title > div {
margin-left: var(--spacing-xs); margin-left: var(--spacing-xs);
} }

View File

@ -1,5 +1,5 @@
<script> <script>
import { Button, Icon } from "@budibase/bbui" import { Button } from "@budibase/bbui"
import ConfirmDialog from "components/common/ConfirmDialog.svelte" import ConfirmDialog from "components/common/ConfirmDialog.svelte"
export let selectedRows export let selectedRows

View File

@ -19,7 +19,6 @@
] ]
export let view = {} export let view = {}
export let onClosed
$: viewTable = $tables.list.find(({ _id }) => _id === $views.selected.tableId) $: viewTable = $tables.list.find(({ _id }) => _id === $views.selected.tableId)
$: fields = $: fields =

View File

@ -33,7 +33,6 @@
let fieldDefinitions = cloneDeep(FIELDS) let fieldDefinitions = cloneDeep(FIELDS)
const { hide } = getContext(Context.Modal) const { hide } = getContext(Context.Modal)
export let onClosed = () => {}
export let field = { export let field = {
type: "string", type: "string",
constraints: fieldDefinitions.STRING.constraints, constraints: fieldDefinitions.STRING.constraints,

View File

@ -5,8 +5,6 @@
import { tables } from "stores/backend" import { tables } from "stores/backend"
import analytics from "analytics" import analytics from "analytics"
export let onClosed
let name let name
let field let field

View File

@ -56,7 +56,6 @@
] ]
export let view = {} export let view = {}
export let onClosed
$: viewTable = $tables.list.find(({ _id }) => _id === $views.selected.tableId) $: viewTable = $tables.list.find(({ _id }) => _id === $views.selected.tableId)
$: fields = viewTable && Object.keys(viewTable.schema) $: fields = viewTable && Object.keys(viewTable.schema)

View File

@ -1,10 +1,9 @@
<script> <script>
import { Button, Select, ModalContent, notifications } from "@budibase/bbui" import { Select, ModalContent, notifications } from "@budibase/bbui"
import { tables, views } from "stores/backend" import { tables, views } from "stores/backend"
import { FIELDS } from "constants/backend" import { FIELDS } from "constants/backend"
export let view = {} export let view = {}
export let onClosed
$: viewTable = $tables.list.find(({ _id }) => _id === $views.selected.tableId) $: viewTable = $tables.list.find(({ _id }) => _id === $views.selected.tableId)
$: fields = $: fields =

View File

@ -12,7 +12,6 @@
export let resourceId export let resourceId
export let permissions export let permissions
export let onClosed
async function changePermission(level, role) { async function changePermission(level, role) {
await permissionsStore.save({ await permissionsStore.save({

View File

@ -2,7 +2,7 @@
import { goto } from "@roxi/routify" import { goto } from "@roxi/routify"
import { datasources } from "stores/backend" import { datasources } from "stores/backend"
import { notifications } from "@budibase/bbui" import { notifications } from "@budibase/bbui"
import { ActionMenu, MenuItem, Icon, Popover } from "@budibase/bbui" import { ActionMenu, MenuItem, Icon } from "@budibase/bbui"
import ConfirmDialog from "components/common/ConfirmDialog.svelte" import ConfirmDialog from "components/common/ConfirmDialog.svelte"
export let datasource export let datasource

View File

@ -27,7 +27,6 @@
$: tableNames = $tables.list.map(table => table.name) $: tableNames = $tables.list.map(table => table.name)
let modal
let name let name
let dataImport let dataImport
let error = "" let error = ""

View File

@ -117,22 +117,4 @@
margin-top: 4px; margin-top: 4px;
font-weight: 600; font-weight: 600;
} }
.actions {
padding: var(--spacing-xl);
display: grid;
grid-gap: var(--spacing-xl);
min-width: 400px;
}
h5 {
margin: 0;
font-weight: 600;
}
footer {
display: flex;
justify-content: flex-end;
gap: var(--spacing-m);
}
</style> </style>

View File

@ -15,7 +15,6 @@
export let view export let view
let editorModal let editorModal
let confirmDeleteDialogue
let originalName = view.name let originalName = view.name
let confirmDeleteDialog let confirmDeleteDialog

View File

@ -1,6 +1,6 @@
<script> <script>
import { join } from "lodash/fp" import { join } from "lodash/fp"
import { TextArea, Label } from "@budibase/bbui" import { TextArea } from "@budibase/bbui"
export let values export let values
export let label export let label

View File

@ -15,7 +15,6 @@
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()
export let bindingContainer
export let bindableProperties = [] export let bindableProperties = []
export let validity = true export let validity = true
export let value = "" export let value = ""
@ -50,9 +49,7 @@
<div class="section"> <div class="section">
{#each categories as [categoryName, bindings]} {#each categories as [categoryName, bindings]}
<Heading size="XS">{categoryName}</Heading> <Heading size="XS">{categoryName}</Heading>
{#each bindings.filter(binding => {#each bindings.filter( binding => binding.label.match(searchRgx) ) as binding}
binding.label.match(searchRgx)
) as binding}
<div <div
class="binding" class="binding"
on:click={() => { on:click={() => {

View File

@ -12,6 +12,7 @@
"", "",
requiredValidator requiredValidator
) )
// eslint-disable-next-line no-unused-vars
const [repeatPassword, _, repeatTouched] = createValidationStore( const [repeatPassword, _, repeatTouched] = createValidationStore(
"", "",
requiredValidator requiredValidator

View File

@ -3,7 +3,6 @@
import { ModalContent } from "@budibase/bbui" import { ModalContent } from "@budibase/bbui"
import { onMount } from "svelte" import { onMount } from "svelte"
import WebhookDisplay from "../automation/Shared/WebhookDisplay.svelte" import WebhookDisplay from "../automation/Shared/WebhookDisplay.svelte"
import analytics from "analytics"
let webhookUrls = [] let webhookUrls = []

View File

@ -14,7 +14,6 @@
const POLL_INTERVAL = 10000 const POLL_INTERVAL = 10000
let loading = false
let feedbackModal let feedbackModal
let deployments = [] let deployments = []
let poll let poll

View File

@ -2,7 +2,7 @@
import { onMount, onDestroy } from "svelte" import { onMount, onDestroy } from "svelte"
import Spinner from "components/common/Spinner.svelte" import Spinner from "components/common/Spinner.svelte"
import { slide } from "svelte/transition" import { slide } from "svelte/transition"
import { Heading, Body, Button, Modal, ModalContent } from "@budibase/bbui" import { Heading, Button, Modal, ModalContent } from "@budibase/bbui"
import api from "builderStore/api" import api from "builderStore/api"
import { notifications } from "@budibase/bbui" import { notifications } from "@budibase/bbui"
import CreateWebhookDeploymentModal from "./CreateWebhookDeploymentModal.svelte" import CreateWebhookDeploymentModal from "./CreateWebhookDeploymentModal.svelte"
@ -160,11 +160,6 @@
overflow-y: auto; overflow-y: auto;
} }
h4 {
margin-top: var(--spacing-xl);
margin-bottom: var(--spacing-s);
}
header { header {
padding-left: var(--spacing-l); padding-left: var(--spacing-l);
padding-bottom: var(--spacing-xl); padding-bottom: var(--spacing-xl);

View File

@ -1,14 +1,6 @@
<script> <script>
import { onMount, onDestroy } from "svelte" import { Icon, Modal, notifications, ModalContent } from "@budibase/bbui"
import {
Button,
Icon,
Modal,
notifications,
ModalContent,
} from "@budibase/bbui"
import { store } from "builderStore" import { store } from "builderStore"
import { apps } from "stores/portal"
import api from "builderStore/api" import api from "builderStore/api"
let revertModal let revertModal

View File

@ -1,11 +1,5 @@
<script> <script>
import { import { ActionMenu, ActionButton, MenuItem, Icon } from "@budibase/bbui"
ActionMenu,
ActionGroup,
ActionButton,
MenuItem,
Icon,
} from "@budibase/bbui"
import { store, currentAssetName } from "builderStore" import { store, currentAssetName } from "builderStore"
import structure from "./componentStructure.json" import structure from "./componentStructure.json"

View File

@ -1,6 +1,6 @@
<script> <script>
import { onMount } from "svelte" import { onMount } from "svelte"
import { store, currentAsset, selectedComponent } from "builderStore" import { store, currentAsset } from "builderStore"
import iframeTemplate from "./iframeTemplate" import iframeTemplate from "./iframeTemplate"
import { Screen } from "builderStore/store/screenTemplates/utils/Screen" import { Screen } from "builderStore/store/screenTemplates/utils/Screen"
import { FrontendTypes } from "constants" import { FrontendTypes } from "constants"

View File

@ -8,7 +8,6 @@
export let component export let component
let confirmDeleteDialog let confirmDeleteDialog
let anchor
$: definition = store.actions.components.getDefinition(component?._component) $: definition = store.actions.components.getDefinition(component?._component)
$: noChildrenAllowed = !component || !definition?.hasChildren $: noChildrenAllowed = !component || !definition?.hasChildren
@ -115,12 +114,3 @@
okText="Delete Component" okText="Delete Component"
onOk={deleteComponent} onOk={deleteComponent}
/> />
<style>
hr {
margin: 8px 0;
background-color: var(--grey-4);
height: 1px;
border: none;
}
</style>

View File

@ -1,6 +1,5 @@
<script> <script>
import { goto } from "@roxi/routify" import { store } from "builderStore"
import { store, currentAssetId } from "builderStore"
import { DropEffect, DropPosition } from "./dragDropStore" import { DropEffect, DropPosition } from "./dragDropStore"
import ComponentDropdownMenu from "../ComponentDropdownMenu.svelte" import ComponentDropdownMenu from "../ComponentDropdownMenu.svelte"
import NavItem from "components/common/NavItem.svelte" import NavItem from "components/common/NavItem.svelte"

View File

@ -1,5 +1,4 @@
<script> <script>
import { goto } from "@roxi/routify"
import { notifications } from "@budibase/bbui" import { notifications } from "@budibase/bbui"
import { store } from "builderStore" import { store } from "builderStore"
import { Input, ModalContent } from "@budibase/bbui" import { Input, ModalContent } from "@budibase/bbui"

View File

@ -1,7 +1,7 @@
<script> <script>
export let categories = [] export let categories = []
export let selectedCategory = {} export let selectedCategory = {}
export let onClick = category => {} export let onClick = () => {}
</script> </script>
<div class="tabs"> <div class="tabs">

View File

@ -131,8 +131,4 @@
min-height: 120px; min-height: 120px;
font-size: var(--font-size-xs); font-size: var(--font-size-xs);
} }
option {
text-transform: capitalize;
}
</style> </style>

View File

@ -3,17 +3,10 @@
import { store, selectedComponent, currentAsset } from "builderStore" import { store, selectedComponent, currentAsset } from "builderStore"
import { Tabs, Tab } from "@budibase/bbui" import { Tabs, Tab } from "@budibase/bbui"
import { FrontendTypes } from "constants" import { FrontendTypes } from "constants"
import CategoryTab from "./CategoryTab.svelte"
import DesignView from "./DesignView.svelte" import DesignView from "./DesignView.svelte"
import SettingsView from "./SettingsView.svelte" import SettingsView from "./SettingsView.svelte"
import { setWith } from "lodash" import { setWith } from "lodash"
const categories = [
{ value: "settings", name: "Settings" },
{ value: "design", name: "Design" },
]
let selectedCategory = categories[0]
$: definition = store.actions.components.getDefinition( $: definition = store.actions.components.getDefinition(
$selectedComponent._component $selectedComponent._component
) )

View File

@ -6,7 +6,6 @@
import { createEventDispatcher, onMount } from "svelte" import { createEventDispatcher, onMount } from "svelte"
export let value export let value
export let onChange
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()
const getValue = component => `{{ literal ${makePropSafe(component._id)} }}` const getValue = component => `{{ literal ${makePropSafe(component._id)} }}`

View File

@ -103,8 +103,9 @@
} }
function fetchQueryDefinition(query) { function fetchQueryDefinition(query) {
const source = $datasources.list.find(ds => ds._id === query.datasourceId) const source = $datasources.list.find(
.source ds => ds._id === query.datasourceId
).source
return $integrations[source].query[query.queryVerb] return $integrations[source].query[query.queryVerb]
} }
</script> </script>
@ -264,12 +265,6 @@
background-color: var(--spectrum-global-color-gray-200); background-color: var(--spectrum-global-color-gray-200);
} }
.drawer-contents {
padding: var(--spacing-l);
height: calc(40vh - 2 * var(--spacing-l));
overflow-y: auto;
}
i { i {
margin-left: 5px; margin-left: 5px;
display: flex; display: flex;

View File

@ -153,16 +153,6 @@
color: var(--ink); color: var(--ink);
} }
.available-action {
padding: var(--spacing-s);
font-size: var(--font-size-s);
cursor: pointer;
}
.available-action:hover {
background: var(--grey-2);
}
.action-container { .action-container {
border-bottom: 1px solid var(--grey-1); border-bottom: 1px solid var(--grey-1);
display: flex; display: flex;
@ -171,9 +161,4 @@
.action-container:last-child { .action-container:last-child {
border-bottom: none; border-bottom: none;
} }
i:hover {
color: var(--red);
cursor: pointer;
}
</style> </style>

View File

@ -1,5 +1,5 @@
<script> <script>
import { Select, Label, Layout } from "@budibase/bbui" import { Select, Layout } from "@budibase/bbui"
import { store, currentAsset } from "builderStore" import { store, currentAsset } from "builderStore"
import { datasources, integrations, queries } from "stores/backend" import { datasources, integrations, queries } from "stores/backend"
import { getBindableProperties } from "builderStore/dataBinding" import { getBindableProperties } from "builderStore/dataBinding"
@ -18,8 +18,9 @@
) )
function fetchQueryDefinition(query) { function fetchQueryDefinition(query) {
const source = $datasources.list.find(ds => ds._id === query.datasourceId) const source = $datasources.list.find(
.source ds => ds._id === query.datasourceId
).source
return $integrations[source].query[query.queryVerb] return $integrations[source].query[query.queryVerb]
} }
</script> </script>

View File

@ -6,9 +6,6 @@
export let parameters export let parameters
let bindingDrawer
let tempValue = parameters.url
$: bindings = getBindableProperties($currentAsset, $store.selectedComponentId) $: bindings = getBindableProperties($currentAsset, $store.selectedComponentId)
</script> </script>

View File

@ -9,7 +9,6 @@
export let componentInstance = {} export let componentInstance = {}
export let value = "" export let value = ""
export let multiselect = false
export let placeholder export let placeholder
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()

View File

@ -14,7 +14,6 @@
} from "builderStore/dataBinding" } from "builderStore/dataBinding"
import LuceneFilterBuilder from "./LuceneFilterBuilder.svelte" import LuceneFilterBuilder from "./LuceneFilterBuilder.svelte"
import { currentAsset } from "builderStore" import { currentAsset } from "builderStore"
import SaveFields from "../EventsEditor/actions/SaveFields.svelte"
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()

View File

@ -9,12 +9,9 @@
} from "@budibase/bbui" } from "@budibase/bbui"
import { store, currentAsset } from "builderStore" import { store, currentAsset } from "builderStore"
import { getBindableProperties } from "builderStore/dataBinding" import { getBindableProperties } from "builderStore/dataBinding"
import { createEventDispatcher } from "svelte"
import DrawerBindableInput from "components/common/bindings/DrawerBindableInput.svelte" import DrawerBindableInput from "components/common/bindings/DrawerBindableInput.svelte"
import { generate } from "shortid" import { generate } from "shortid"
const dispatch = createEventDispatcher()
export let schemaFields export let schemaFields
export let value export let value

View File

@ -6,7 +6,7 @@
export let isMultiSelect = false export let isMultiSelect = false
export let value = [] export let value = []
export let initialValue = "" export let initialValue = ""
export let onChange = selected => {} export let onChange = () => {}
onMount(() => { onMount(() => {
if (!value && !!initialValue) { if (!value && !!initialValue) {
@ -28,9 +28,6 @@
} }
onChange(val) onChange(val)
} }
const checkSelected = val =>
isMultiSelect ? value.includes(val) : value === val
</script> </script>
<div class="flatbutton-group"> <div class="flatbutton-group">

View File

@ -9,7 +9,6 @@
export let componentInstance export let componentInstance
export let value export let value
export let onChange
export let type export let type
$: form = findClosestMatchingComponent( $: form = findClosestMatchingComponent(

View File

@ -57,7 +57,7 @@
let loading = false let loading = false
function findIconByTerm(term) { function findIconByTerm(term) {
const r = new RegExp(`\^${term}`, "i") const r = new RegExp(`^${term}`, "i")
return icons.filter(i => r.test(i)) return icons.filter(i => r.test(i))
} }
@ -99,7 +99,7 @@
loading = false loading = false
} }
async function searchForIcon(e) { async function searchForIcon() {
currentPage = 1 currentPage = 1
loading = true loading = true
filteredIcons = findIconByTerm(searchTerm) filteredIcons = findIconByTerm(searchTerm)

View File

@ -9,7 +9,6 @@
export let componentInstance = {} export let componentInstance = {}
export let value = "" export let value = ""
export let multiselect = false
export let placeholder export let placeholder
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()

View File

@ -1,5 +1,5 @@
<script> <script>
import { Button, Icon, Drawer, Body } from "@budibase/bbui" import { Button, Icon, Drawer } from "@budibase/bbui"
import { store, currentAsset } from "builderStore" import { store, currentAsset } from "builderStore"
import { import {
getBindableProperties, getBindableProperties,

View File

@ -17,8 +17,11 @@
} }
const getControlProps = props => { const getControlProps = props => {
const { label, key, control, ...otherProps } = props || {} let controlProps = { ...(props || {}) }
return otherProps || {} delete controlProps.label
delete controlProps.key
delete controlProps.control
return controlProps
} }
</script> </script>

View File

@ -42,13 +42,6 @@
{ key: "routing.roleId", label: "Access", control: RoleSelect }, { key: "routing.roleId", label: "Access", control: RoleSelect },
{ key: "layoutId", label: "Layout", control: LayoutSelect }, { key: "layoutId", label: "Layout", control: LayoutSelect },
] ]
const assetProps = [
"title",
"description",
"routing.route",
"layoutId",
"routing.roleId",
]
let confirmResetFieldsDialog let confirmResetFieldsDialog
$: settings = componentDefinition?.settings ?? [] $: settings = componentDefinition?.settings ?? []

View File

@ -46,8 +46,4 @@
align-items: center; align-items: center;
margin-bottom: var(--spacing-m); margin-bottom: var(--spacing-m);
} }
.ri-close-circle-fill {
cursor: pointer;
}
</style> </style>

View File

@ -77,8 +77,6 @@
const refs = {} const refs = {}
let editor let editor
let updating_externally = false let updating_externally = false
let marker
let error_line
let destroyed = false let destroyed = false
$: if (editor && width && height) { $: if (editor && width && height) {

View File

@ -59,14 +59,6 @@
{/if} {/if}
<style> <style>
.field {
margin-bottom: var(--spacing-m);
display: grid;
grid-template-columns: 1fr;
grid-gap: var(--spacing-m);
align-items: center;
}
.horizontal { .horizontal {
display: grid; display: grid;
grid-template-columns: 20% 1fr; grid-template-columns: 20% 1fr;

View File

@ -216,15 +216,6 @@
gap: var(--spacing-l); gap: var(--spacing-l);
} }
.button-container {
display: flex;
}
.delete {
align-self: center;
cursor: pointer;
}
.viewer { .viewer {
min-height: 200px; min-height: 200px;
} }

View File

@ -17,10 +17,6 @@
</Modal> </Modal>
<style> <style>
i {
font-size: 18px;
color: var(--grey-7);
}
.topnavitemright { .topnavitemright {
cursor: pointer; cursor: pointer;
color: var(--grey-7); color: var(--grey-7);
@ -34,7 +30,4 @@
height: 24px; height: 24px;
width: 24px; width: 24px;
} }
.topnavitemright:hover i {
color: var(--ink);
}
</style> </style>

View File

@ -37,9 +37,4 @@
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
} }
.background {
border-radius: 5px;
background-color: var(--light-grey);
padding: 12px 12px 18px 12px;
}
</style> </style>

View File

@ -1,6 +1,5 @@
<script> <script>
import { Button, Heading, Body } from "@budibase/bbui" import { Button, Heading, Body } from "@budibase/bbui"
import AppCard from "./AppCard.svelte"
import Spinner from "components/common/Spinner.svelte" import Spinner from "components/common/Spinner.svelte"
import api from "builderStore/api" import api from "builderStore/api"
@ -27,7 +26,7 @@
<Heading size="S">{template.name}</Heading> <Heading size="S">{template.name}</Heading>
<Body size="M" grey>{template.category}</Body> <Body size="M" grey>{template.category}</Body>
<Body size="S" black>{template.description}</Body> <Body size="S" black>{template.description}</Body>
<div><img src={template.image} width="100%" /></div> <div><img alt="template" src={template.image} width="100%" /></div>
<div class="card-footer"> <div class="card-footer">
<Button secondary on:click={() => onSelect(template)}> <Button secondary on:click={() => onSelect(template)}>
Create Create

View File

@ -36,7 +36,7 @@
<section> <section>
<div class="container"> <div class="container">
<Layout> <Layout>
<img src={Logo} /> <img alt="logo" src={Logo} />
<Layout gap="XS" justifyItems="center" noPadding> <Layout gap="XS" justifyItems="center" noPadding>
<Heading size="M">Create an admin user</Heading> <Heading size="M">Create an admin user</Heading>
<Body size="M" textAlign="center"> <Body size="M" textAlign="center">

View File

@ -1,7 +1,7 @@
<script> <script>
import { store, automationStore } from "builderStore" import { store, automationStore } from "builderStore"
import { roles } from "stores/backend" import { roles } from "stores/backend"
import { Button, Icon, ActionGroup, Tabs, Tab } from "@budibase/bbui" import { Icon, ActionGroup, Tabs, Tab } from "@budibase/bbui"
import DeployModal from "components/deploy/DeployModal.svelte" import DeployModal from "components/deploy/DeployModal.svelte"
import RevertModal from "components/deploy/RevertModal.svelte" import RevertModal from "components/deploy/RevertModal.svelte"
import { get } from "builderStore/api" import { get } from "builderStore/api"
@ -113,11 +113,6 @@
flex-direction: column; flex-direction: column;
} }
a {
text-transform: none;
color: var(--grey-5);
}
.top-nav { .top-nav {
flex: 0 0 auto; flex: 0 0 auto;
background: var(--background); background: var(--background);
@ -150,23 +145,6 @@
margin-bottom: -1px; margin-bottom: -1px;
} }
.topnavitemright a {
cursor: pointer;
color: var(--grey-7);
margin: 0 12px 0 0;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
height: 24px;
width: 24px;
}
.topnavitemright a:hover {
color: var(--ink);
font-weight: 600;
}
.home-logo { .home-logo {
border-style: none; border-style: none;
background-color: rgba(0, 0, 0, 0); background-color: rgba(0, 0, 0, 0);
@ -184,12 +162,4 @@
.home-logo img { .home-logo img {
height: 30px; height: 30px;
} }
i {
font-size: 18px;
color: var(--grey-7);
}
i:hover {
color: var(--ink);
}
</style> </style>

View File

@ -3,17 +3,6 @@
import { database, queries } from "stores/backend" import { database, queries } from "stores/backend"
import QueryInterface from "components/integration/QueryViewer.svelte" import QueryInterface from "components/integration/QueryViewer.svelte"
async function fetchQueryConfig() {
try {
const response = await api.get(`/api/integrations/${datasource.source}`)
const json = await response.json()
config = json.query
} catch (err) {
notifications.error("Error fetching datasource configuration options.")
console.error(err)
}
}
$: selectedQuery = $queries.list.find( $: selectedQuery = $queries.list.find(
query => query._id === $queries.selected query => query._id === $queries.selected
) || { ) || {

View File

@ -28,7 +28,7 @@
unsaved = true unsaved = true
} }
$beforeUrlChange((event, store) => { $beforeUrlChange(() => {
if (unsaved) { if (unsaved) {
notifications.error( notifications.error(
"Unsaved changes. Please save your datasource configuration before leaving." "Unsaved changes. Please save your datasource configuration before leaving."

View File

@ -1,5 +1,5 @@
<script> <script>
import { datasources, tables } from "stores/backend" import { datasources } from "stores/backend"
import { goto } from "@roxi/routify" import { goto } from "@roxi/routify"
import { onMount } from "svelte" import { onMount } from "svelte"

View File

@ -13,7 +13,7 @@
} from "@budibase/bbui" } from "@budibase/bbui"
import { onMount } from "svelte" import { onMount } from "svelte"
import { apps, organisation, auth } from "stores/portal" import { apps, organisation, auth } from "stores/portal"
import { goto, redirect } from "@roxi/routify" import { goto } from "@roxi/routify"
import { AppStatus } from "constants" import { AppStatus } from "constants"
import { gradient } from "actions" import { gradient } from "actions"
import UpdateUserInfoModal from "components/settings/UpdateUserInfoModal.svelte" import UpdateUserInfoModal from "components/settings/UpdateUserInfoModal.svelte"
@ -46,7 +46,7 @@
<Page> <Page>
<div class="content"> <div class="content">
<Layout noPadding> <Layout noPadding>
<img src={$organisation.logoUrl || Logo} /> <img alt="logo" src={$organisation.logoUrl || Logo} />
<div class="info-title"> <div class="info-title">
<Layout noPadding gap="XS"> <Layout noPadding gap="XS">
<Heading size="L"> <Heading size="L">

View File

@ -35,8 +35,4 @@
.inner p { .inner p {
margin: 0; margin: 0;
} }
a {
text-decoration: none;
color: inherit;
}
</style> </style>

View File

@ -26,7 +26,7 @@
<div class="main"> <div class="main">
<Layout> <Layout>
<Layout noPadding justifyItems="center"> <Layout noPadding justifyItems="center">
<img src={$organisation.logoUrl || Logo} /> <img alt="logo" src={$organisation.logoUrl || Logo} />
</Layout> </Layout>
<Layout gap="XS" noPadding> <Layout gap="XS" noPadding>
<Heading textAlign="center">Forgotten your password?</Heading> <Heading textAlign="center">Forgotten your password?</Heading>

View File

@ -50,7 +50,7 @@
<div class="main"> <div class="main">
<Layout> <Layout>
<Layout noPadding justifyItems="center"> <Layout noPadding justifyItems="center">
<img src={Logo} /> <img alt="logo" src={Logo} />
<Heading>Sign in to Budibase</Heading> <Heading>Sign in to Budibase</Heading>
</Layout> </Layout>
<GoogleButton /> <GoogleButton />

View File

@ -25,7 +25,7 @@
<section> <section>
<div class="container"> <div class="container">
<Layout> <Layout>
<img src={Logo} /> <img src={Logo} alt="logo" />
<Layout gap="XS" justifyItems="center" noPadding> <Layout gap="XS" justifyItems="center" noPadding>
<Heading size="M">Accept Invitation</Heading> <Heading size="M">Accept Invitation</Heading>
<Body textAlign="center" size="M"> <Body textAlign="center" size="M">

View File

@ -6,7 +6,6 @@
Heading, Heading,
ActionButton, ActionButton,
Body, Body,
Page,
Layout, Layout,
notifications, notifications,
Tabs, Tabs,
@ -128,7 +127,7 @@
</Tab> </Tab>
<Tab title="Preview"> <Tab title="Preview">
<div class="preview"> <div class="preview">
<iframe srcdoc={previewContent} /> <iframe title="preview" srcdoc={previewContent} />
</div> </div>
</Tab> </Tab>
</Tabs> </Tabs>

View File

@ -51,10 +51,12 @@
if (response.status !== 200) { if (response.status !== 200) {
const error = await response.text() const error = await response.text()
let message = error let message
try { try {
message = JSON.parse(error).message message = JSON.parse(error).message
} catch (err) {} } catch (err) {
message = error
}
notifications.error(`Failed to save email settings, reason: ${message}`) notifications.error(`Failed to save email settings, reason: ${message}`)
} else { } else {
const json = await response.json() const json = await response.json()

View File

@ -12,7 +12,7 @@
notifications, notifications,
} from "@budibase/bbui" } from "@budibase/bbui"
import { auth, organisation } from "stores/portal" import { auth, organisation } from "stores/portal"
import { post, get } from "builderStore/api" import { post } from "builderStore/api"
import analytics from "analytics" import analytics from "analytics"
import { writable } from "svelte/store" import { writable } from "svelte/store"
import { redirect } from "@roxi/routify" import { redirect } from "@roxi/routify"

View File

@ -5,16 +5,9 @@
Body, Body,
Button, Button,
Divider, Divider,
Label,
Input,
Toggle,
Dropzone,
notifications, notifications,
} from "@budibase/bbui" } from "@budibase/bbui"
import { auth, organisation } from "stores/portal" import { auth } from "stores/portal"
import { post, get } from "builderStore/api"
import analytics from "analytics"
import { writable } from "svelte/store"
import { redirect } from "@roxi/routify" import { redirect } from "@roxi/routify"
// Only admins allowed here // Only admins allowed here
@ -27,7 +20,7 @@
async function updateBudibase() { async function updateBudibase() {
try { try {
notifications.info("Updating budibase..") notifications.info("Updating budibase..")
const response = await fetch("/v1/update", { await fetch("/v1/update", {
headers: { headers: {
Authorization: "Bearer budibase", Authorization: "Bearer budibase",
}, },

View File

@ -2,8 +2,6 @@
export let title = "" export let title = ""
export let favicon = "" export let favicon = ""
export let appId
export let production
export let clientLibPath export let clientLibPath
</script> </script>

View File

@ -4,7 +4,6 @@
const { styleable } = getContext("sdk") const { styleable } = getContext("sdk")
const component = getContext("component") const component = getContext("component")
export let className = "default"
export let disabled = false export let disabled = false
export let text = "" export let text = ""
export let onClick export let onClick

View File

@ -1,7 +1,7 @@
<script> <script>
import { getContext } from "svelte" import { getContext } from "svelte"
const { styleable, transition, builderStore } = getContext("sdk") const { styleable, transition } = getContext("sdk")
const component = getContext("component") const component = getContext("component")
export let direction export let direction

View File

@ -11,9 +11,8 @@
export let field export let field
export let defaultValue export let defaultValue
const dataContext = getContext("context")
const component = getContext("component") const component = getContext("component")
const { styleable, builderStore, ActionTypes, getAction } = getContext("sdk") const { styleable, ActionTypes, getAction } = getContext("sdk")
const setQuery = getAction(dataProvider?.id, ActionTypes.SetDataProviderQuery) const setQuery = getAction(dataProvider?.id, ActionTypes.SetDataProviderQuery)
const options = [ const options = [

View File

@ -1,7 +1,7 @@
<script> <script>
import { getContext } from "svelte" import { getContext } from "svelte"
const { authStore, linkable, styleable, builderStore } = getContext("sdk") const { linkable, styleable } = getContext("sdk")
const component = getContext("component") const component = getContext("component")
// BB emblem: https://i.imgur.com/Xhdt1YP.png // BB emblem: https://i.imgur.com/Xhdt1YP.png
@ -48,18 +48,6 @@
margin-right: 16px; margin-right: 16px;
} }
.nav__controls {
display: flex;
flex-direction: row;
justify-content: flex-end;
align-items: center;
gap: 16px;
}
.nav__controls > div:hover {
cursor: pointer;
color: #4285f4;
}
.nav__menu { .nav__menu {
display: flex; display: flex;
flex-direction: row; flex-direction: row;

View File

@ -5,9 +5,8 @@
export let dataProvider export let dataProvider
export let noRowsMessage export let noRowsMessage
const { API, styleable, builderStore, Provider } = getContext("sdk") const { styleable, Provider } = getContext("sdk")
const component = getContext("component") const component = getContext("component")
const context = getContext("context")
$: rows = dataProvider?.rows ?? [] $: rows = dataProvider?.rows ?? []
$: loaded = dataProvider?.loaded ?? true $: loaded = dataProvider?.loaded ?? true

View File

@ -10,7 +10,6 @@
export let yAxisLabel export let yAxisLabel
export let height export let height
export let width export let width
export let color
export let dataLabels export let dataLabels
export let animate export let animate
export let legend export let legend

View File

@ -11,7 +11,6 @@
export let yAxisLabel export let yAxisLabel
export let height export let height
export let width export let width
export let color
export let animate export let animate
export let dataLabels export let dataLabels
export let curve export let curve

View File

@ -8,7 +8,6 @@
export let valueColumn export let valueColumn
export let height export let height
export let width export let width
export let color
export let dataLabels export let dataLabels
export let animate export let animate
export let legend export let legend

View File

@ -9,14 +9,11 @@
let fieldState let fieldState
let fieldApi let fieldApi
let fieldSchema
const { API, notifications } = getContext("sdk") const { API, notifications } = getContext("sdk")
const formContext = getContext("form") const formContext = getContext("form")
const BYTES_IN_MB = 1000000 const BYTES_IN_MB = 1000000
export let files = []
const handleFileTooLarge = fileSizeLimit => { const handleFileTooLarge = fileSizeLimit => {
notifications.warning( notifications.warning(
`Files cannot exceed ${ `Files cannot exceed ${

View File

@ -2,7 +2,6 @@
import { getContext } from "svelte" import { getContext } from "svelte"
const fieldGroupContext = getContext("fieldGroup") const fieldGroupContext = getContext("fieldGroup")
const labelPosition = fieldGroupContext?.labelPosition || "above"
</script> </script>
{#if fieldGroupContext} {#if fieldGroupContext}

View File

@ -8,11 +8,9 @@
export let theme export let theme
export let size export let size
export let disabled = false export let disabled = false
export let actionType = "Create"
export let initialValues export let initialValues
const component = getContext("component") const component = getContext("component")
const context = getContext("context")
const { styleable, API, Provider, ActionTypes } = getContext("sdk") const { styleable, API, Provider, ActionTypes } = getContext("sdk")
let loaded = false let loaded = false

View File

@ -81,6 +81,7 @@
error={$fieldState.error} error={$fieldState.error}
getOptionLabel={getDisplayName} getOptionLabel={getDisplayName}
getOptionValue={option => option._id} getOptionValue={option => option._id}
{placeholder}
/> />
{/if} {/if}
</Field> </Field>

View File

@ -12,7 +12,7 @@
export let quiet export let quiet
const component = getContext("component") const component = getContext("component")
const { styleable, Provider } = getContext("sdk") const { styleable } = getContext("sdk")
const customColumnKey = `custom-${Math.random()}` const customColumnKey = `custom-${Math.random()}`
const customRenderers = [ const customRenderers = [
{ {