Type plugins page
This commit is contained in:
parent
aa133e9253
commit
2bd48dde39
|
@ -3,7 +3,7 @@
|
|||
import AbsTooltip from "../Tooltip/AbsTooltip.svelte"
|
||||
import { createEventDispatcher } from "svelte"
|
||||
|
||||
export let type
|
||||
export let type = undefined
|
||||
export let disabled = false
|
||||
export let size = "M"
|
||||
export let cta = false
|
||||
|
@ -16,8 +16,8 @@
|
|||
export let active = false
|
||||
export let tooltip = undefined
|
||||
export let newStyles = true
|
||||
export let id
|
||||
export let ref
|
||||
export let id = undefined
|
||||
export let ref = undefined
|
||||
export let reverse = false
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
export let disabled = false
|
||||
export let updateOnChange = true
|
||||
export let quiet = false
|
||||
export let inputRef
|
||||
export let inputRef = undefined
|
||||
export let helpText = null
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
|
|
@ -17,18 +17,18 @@
|
|||
export let getOptionIcon = option => option?.icon
|
||||
export let getOptionColour = option => option?.colour
|
||||
export let useOptionIconImage = false
|
||||
export let isOptionEnabled
|
||||
export let isOptionEnabled = undefined
|
||||
export let quiet = false
|
||||
export let autoWidth = false
|
||||
export let sort = false
|
||||
export let tooltip = ""
|
||||
export let autocomplete = false
|
||||
export let customPopoverHeight
|
||||
export let align
|
||||
export let customPopoverHeight = undefined
|
||||
export let align = undefined
|
||||
export let footer = null
|
||||
export let tag = null
|
||||
export let helpText = null
|
||||
export let compare
|
||||
export let compare = undefined
|
||||
export let onOptionMouseenter = () => {}
|
||||
export let onOptionMouseleave = () => {}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
export let showHeaderBorder = true
|
||||
export let placeholderText = "No rows found"
|
||||
export let snippets = []
|
||||
export let defaultSortColumn
|
||||
export let defaultSortColumn = undefined
|
||||
export let defaultSortOrder = "Ascending"
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<script>
|
||||
<script lang="ts">
|
||||
import "@spectrum-css/typography/dist/index-vars.css"
|
||||
|
||||
// Sizes
|
||||
export let size = "M"
|
||||
export let textAlign
|
||||
export let textAlign = undefined
|
||||
export let noPadding = false
|
||||
export let weight = "default" // light, heavy, default
|
||||
</script>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<script>
|
||||
<script lang="ts">
|
||||
import {
|
||||
Layout,
|
||||
Heading,
|
||||
|
@ -42,23 +42,25 @@
|
|||
{ column: "edit", component: EditPluginRenderer },
|
||||
]
|
||||
|
||||
let modal
|
||||
let searchTerm = ""
|
||||
let filter = "all"
|
||||
let modal: any
|
||||
let searchTerm: any = ""
|
||||
let filter: any = "all"
|
||||
let filterOptions = [
|
||||
{ label: "All plugins", value: "all" },
|
||||
{ label: "Components", value: "component" },
|
||||
]
|
||||
|
||||
const searchPlaceholder: any = "Search"
|
||||
|
||||
if (!$admin.cloud) {
|
||||
filterOptions.push({ label: "Datasources", value: "datasource" })
|
||||
}
|
||||
|
||||
$: filteredPlugins = $plugins
|
||||
.filter(plugin => {
|
||||
.filter((plugin: any) => {
|
||||
return filter === "all" || plugin.schema.type === filter
|
||||
})
|
||||
.filter(plugin => {
|
||||
.filter((plugin: any) => {
|
||||
return (
|
||||
!searchTerm ||
|
||||
plugin?.name?.toLowerCase().includes(searchTerm.toLowerCase())
|
||||
|
@ -85,8 +87,8 @@
|
|||
<Button
|
||||
on:click={() =>
|
||||
window
|
||||
.open("https://github.com/Budibase/plugins", "_blank")
|
||||
.focus()}
|
||||
?.open("https://github.com/Budibase/plugins", "_blank")
|
||||
?.focus()}
|
||||
secondary
|
||||
>
|
||||
GitHub repo
|
||||
|
@ -98,12 +100,12 @@
|
|||
<div class="select">
|
||||
<Select
|
||||
bind:value={filter}
|
||||
placeholder={null}
|
||||
placeholder={undefined}
|
||||
options={filterOptions}
|
||||
autoWidth
|
||||
/>
|
||||
</div>
|
||||
<Search bind:value={searchTerm} placeholder="Search" />
|
||||
<Search bind:value={searchTerm} placeholder={searchPlaceholder} />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue