Formatting.
This commit is contained in:
parent
163d24a767
commit
68735f1b4f
|
@ -1,190 +1,186 @@
|
||||||
<script>
|
<script>
|
||||||
import groupBy from "lodash/fp/groupBy"
|
import groupBy from "lodash/fp/groupBy"
|
||||||
import { Input, TextArea, Heading, Spacer, Label } from "@budibase/bbui"
|
import { Input, TextArea, Heading, Spacer, Label } from "@budibase/bbui"
|
||||||
import { createEventDispatcher } from "svelte"
|
import { createEventDispatcher } from "svelte"
|
||||||
import { isValid } from "@budibase/string-templates"
|
import { isValid } from "@budibase/string-templates"
|
||||||
import { handlebarsCompletions } from "constants/completions"
|
import { handlebarsCompletions } from "constants/completions"
|
||||||
|
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
|
|
||||||
export let value = ""
|
export let value = ""
|
||||||
export let bindingDrawer
|
export let bindingDrawer
|
||||||
export let bindableProperties = []
|
export let bindableProperties = []
|
||||||
|
|
||||||
let originalValue = value
|
let originalValue = value
|
||||||
let helpers = handlebarsCompletions()
|
let helpers = handlebarsCompletions()
|
||||||
let getCaretPosition
|
let getCaretPosition
|
||||||
let search = ""
|
let search = ""
|
||||||
let validity = true
|
let validity = true
|
||||||
|
|
||||||
$: categories = Object.entries(groupBy("category", bindableProperties))
|
$: categories = Object.entries(groupBy("category", bindableProperties))
|
||||||
$: value && checkValid()
|
$: value && checkValid()
|
||||||
$: dispatch("update", value)
|
$: dispatch("update", value)
|
||||||
$: searchRgx = new RegExp(search, "ig")
|
$: searchRgx = new RegExp(search, "ig")
|
||||||
|
|
||||||
function checkValid() {
|
function checkValid() {
|
||||||
validity = isValid(value)
|
validity = isValid(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
function addToText(binding) {
|
function addToText(binding) {
|
||||||
const position = getCaretPosition()
|
const position = getCaretPosition()
|
||||||
const toAdd = `{{ ${binding.path} }}`
|
const toAdd = `{{ ${binding.path} }}`
|
||||||
if (position.start) {
|
if (position.start) {
|
||||||
value =
|
value =
|
||||||
value.substring(0, position.start) +
|
value.substring(0, position.start) +
|
||||||
toAdd +
|
toAdd +
|
||||||
value.substring(position.end, value.length)
|
value.substring(position.end, value.length)
|
||||||
} else {
|
} else {
|
||||||
value += toAdd
|
value += toAdd
|
||||||
}
|
|
||||||
}
|
|
||||||
export function cancel() {
|
|
||||||
dispatch("update", originalValue)
|
|
||||||
bindingDrawer.close()
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
export function cancel() {
|
||||||
|
dispatch("update", originalValue)
|
||||||
|
bindingDrawer.close()
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="list">
|
<div class="list">
|
||||||
<Heading small>Available bindings</Heading>
|
<Heading small>Available bindings</Heading>
|
||||||
<Spacer medium />
|
<Spacer medium />
|
||||||
<Input extraThin placeholder="Search" bind:value={search} />
|
<Input extraThin placeholder="Search" bind:value={search} />
|
||||||
<Spacer medium />
|
<Spacer medium />
|
||||||
{#each categories as [categoryName, bindings]}
|
{#each categories as [categoryName, bindings]}
|
||||||
<Heading extraSmall>{categoryName}</Heading>
|
<Heading extraSmall>{categoryName}</Heading>
|
||||||
<Spacer extraSmall />
|
<Spacer extraSmall />
|
||||||
{#each bindableProperties.filter(binding =>
|
{#each bindableProperties.filter(binding =>
|
||||||
binding.label.match(searchRgx)
|
binding.label.match(searchRgx)
|
||||||
) as binding}
|
) as binding}
|
||||||
<div class="binding" on:click={() => addToText(binding)}>
|
<div class="binding" on:click={() => addToText(binding)}>
|
||||||
<span class="binding__label">{binding.label}</span>
|
<span class="binding__label">{binding.label}</span>
|
||||||
<span class="binding__type">{binding.type}</span>
|
<span class="binding__type">{binding.type}</span>
|
||||||
<br />
|
<br />
|
||||||
<div class="binding__description">
|
<div class="binding__description">{binding.description || ''}</div>
|
||||||
{binding.description || ''}
|
</div>
|
||||||
</div>
|
{/each}
|
||||||
</div>
|
{/each}
|
||||||
{/each}
|
<Heading extraSmall>Helpers</Heading>
|
||||||
{/each}
|
<Spacer extraSmall />
|
||||||
<Heading extraSmall>Helpers</Heading>
|
{#each helpers.filter(helper => helper.label.match(searchRgx) || helper.description.match(searchRgx)) as helper}
|
||||||
<Spacer extraSmall />
|
<div class="binding" on:click={() => addToText(helper)}>
|
||||||
{#each helpers.filter(helper => helper.label.match(searchRgx) || helper.description.match(searchRgx)) as helper}
|
<span class="binding__label">{helper.label}</span>
|
||||||
<div class="binding" on:click={() => addToText(helper)}>
|
<br />
|
||||||
<span class="binding__label">{helper.label}</span>
|
<div class="binding__description">
|
||||||
<br />
|
{@html helper.description || ''}
|
||||||
<div class="binding__description">
|
</div>
|
||||||
{@html helper.description || ''}
|
<pre>{helper.example || ''}</pre>
|
||||||
</div>
|
</div>
|
||||||
<pre>{helper.example || ''}</pre>
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
<div class="text">
|
||||||
</div>
|
<TextArea
|
||||||
<div class="text">
|
bind:getCaretPosition
|
||||||
<TextArea
|
thin
|
||||||
bind:getCaretPosition
|
bind:value
|
||||||
thin
|
placeholder="Add text, or click the objects on the left to add them to the textbox." />
|
||||||
bind:value
|
{#if !validity}
|
||||||
placeholder="Add text, or click the objects on the left to add them to the textbox." />
|
<p class="syntax-error">
|
||||||
{#if !validity}
|
Current Handlebars syntax is invalid, please check the guide
|
||||||
<p class="syntax-error">
|
<a href="https://handlebarsjs.com/guide/">here</a>
|
||||||
Current Handlebars syntax is invalid, please check the guide
|
for more details.
|
||||||
<a href="https://handlebarsjs.com/guide/">here</a>
|
</p>
|
||||||
for more details.
|
{/if}
|
||||||
</p>
|
</div>
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.container {
|
.container {
|
||||||
height: 40vh;
|
height: 40vh;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 280px 1fr;
|
grid-template-columns: 280px 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list {
|
.list {
|
||||||
border-right: var(--border-light);
|
border-right: var(--border-light);
|
||||||
padding: var(--spacing-l);
|
padding: var(--spacing-l);
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
.list {
|
.list {
|
||||||
border-right: var(--border-light);
|
border-right: var(--border-light);
|
||||||
padding: var(--spacing-l);
|
padding: var(--spacing-l);
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list::-webkit-scrollbar {
|
.list::-webkit-scrollbar {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
padding: var(--spacing-l);
|
padding: var(--spacing-l);
|
||||||
font-family: var(--font-sans);
|
font-family: var(--font-sans);
|
||||||
}
|
}
|
||||||
.text :global(textarea) {
|
.text :global(textarea) {
|
||||||
min-height: 100px;
|
min-height: 100px;
|
||||||
}
|
}
|
||||||
.text :global(p) {
|
.text :global(p) {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.binding {
|
.binding {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
padding: var(--spacing-s);
|
padding: var(--spacing-s);
|
||||||
border-radius: var(--border-radius-m);
|
border-radius: var(--border-radius-m);
|
||||||
}
|
}
|
||||||
.binding:hover {
|
.binding:hover {
|
||||||
background-color: var(--grey-2);
|
background-color: var(--grey-2);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.binding__label {
|
.binding__label {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
}
|
}
|
||||||
.binding__description {
|
.binding__description {
|
||||||
color: var(--grey-8);
|
color: var(--grey-8);
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
.binding__type {
|
.binding__type {
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
background-color: var(--grey-2);
|
background-color: var(--grey-2);
|
||||||
border-radius: var(--border-radius-m);
|
border-radius: var(--border-radius-m);
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
margin-left: 2px;
|
margin-left: 2px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor {
|
.editor {
|
||||||
padding-left: var(--spacing-l);
|
padding-left: var(--spacing-l);
|
||||||
}
|
}
|
||||||
.editor :global(textarea) {
|
.editor :global(textarea) {
|
||||||
min-height: 60px;
|
min-height: 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.controls {
|
.controls {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr auto;
|
grid-template-columns: 1fr auto;
|
||||||
grid-gap: var(--spacing-l);
|
grid-gap: var(--spacing-l);
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: var(--spacing-m);
|
margin-top: var(--spacing-m);
|
||||||
}
|
}
|
||||||
|
|
||||||
.syntax-error {
|
.syntax-error {
|
||||||
color: var(--red);
|
color: var(--red);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.syntax-error a {
|
|
||||||
color: var(--red);
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
|
.syntax-error a {
|
||||||
|
color: var(--red);
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import { automationStore } from "builderStore"
|
import { automationStore } from "builderStore"
|
||||||
import WebhookDisplay from "../Shared/WebhookDisplay.svelte"
|
import WebhookDisplay from "../Shared/WebhookDisplay.svelte"
|
||||||
import DrawerBindableInput from "../../common/DrawerBindableInput.svelte"
|
import DrawerBindableInput from "../../common/DrawerBindableInput.svelte"
|
||||||
import AutomationBindingPanel from './AutomationBindingPanel.svelte'
|
import AutomationBindingPanel from "./AutomationBindingPanel.svelte"
|
||||||
|
|
||||||
export let block
|
export let block
|
||||||
export let webhookModal
|
export let webhookModal
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
type={'email'}
|
type={'email'}
|
||||||
extraThin
|
extraThin
|
||||||
value={block.inputs[key]}
|
value={block.inputs[key]}
|
||||||
on:change={e => block.inputs[key] = e.detail}
|
on:change={e => (block.inputs[key] = e.detail)}
|
||||||
{bindings} />
|
{bindings} />
|
||||||
{:else if value.customType === 'table'}
|
{:else if value.customType === 'table'}
|
||||||
<TableSelector bind:value={block.inputs[key]} />
|
<TableSelector bind:value={block.inputs[key]} />
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
type={value.customType}
|
type={value.customType}
|
||||||
extraThin
|
extraThin
|
||||||
value={block.inputs[key]}
|
value={block.inputs[key]}
|
||||||
on:change={e => block.inputs[key] = e.detail}
|
on:change={e => (block.inputs[key] = e.detail)}
|
||||||
{bindings} />
|
{bindings} />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import { backendUiStore } from "builderStore"
|
import { backendUiStore } from "builderStore"
|
||||||
import { Select } from "@budibase/bbui"
|
import { Select } from "@budibase/bbui"
|
||||||
import DrawerBindableInput from "../../common/DrawerBindableInput.svelte"
|
import DrawerBindableInput from "../../common/DrawerBindableInput.svelte"
|
||||||
import AutomationBindingPanel from './AutomationBindingPanel.svelte'
|
import AutomationBindingPanel from "./AutomationBindingPanel.svelte"
|
||||||
|
|
||||||
export let value
|
export let value
|
||||||
export let bindings
|
export let bindings
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
panel={AutomationBindingPanel}
|
panel={AutomationBindingPanel}
|
||||||
extraThin
|
extraThin
|
||||||
value={value[field]}
|
value={value[field]}
|
||||||
on:change={e => value[field] = e.detail}
|
on:change={e => (value[field] = e.detail)}
|
||||||
label={field}
|
label={field}
|
||||||
type="string"
|
type="string"
|
||||||
{bindings} />
|
{bindings} />
|
||||||
|
|
|
@ -25,10 +25,14 @@
|
||||||
]
|
]
|
||||||
|
|
||||||
const transitions = [
|
const transitions = [
|
||||||
'none', 'fade', 'blur', 'fly', 'scale' // slide is hidden because it does not seem to result in any effect
|
"none",
|
||||||
|
"fade",
|
||||||
|
"blur",
|
||||||
|
"fly",
|
||||||
|
"scale", // slide is hidden because it does not seem to result in any effect
|
||||||
]
|
]
|
||||||
|
|
||||||
const capitalize = ([first,...rest]) => first.toUpperCase() + rest.join('');
|
const capitalize = ([first, ...rest]) => first.toUpperCase() + rest.join("")
|
||||||
|
|
||||||
$: groups = componentDefinition?.styleable ? Object.keys(allStyles) : []
|
$: groups = componentDefinition?.styleable ? Object.keys(allStyles) : []
|
||||||
</script>
|
</script>
|
||||||
|
@ -72,13 +76,19 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{#if componentDefinition?.transitionable}
|
{#if componentDefinition?.transitionable}
|
||||||
<div class="transitions">
|
<div class="transitions">
|
||||||
<Select value={componentInstance._transition} on:change={event => onUpdateTransition(event.target.value)} name="transition" label="Transition" secondary thin>
|
<Select
|
||||||
{#each transitions as transition}
|
value={componentInstance._transition}
|
||||||
<option value={transition}>{capitalize(transition)}</option>
|
on:change={event => onUpdateTransition(event.target.value)}
|
||||||
{/each}
|
name="transition"
|
||||||
</Select>
|
label="Transition"
|
||||||
</div>
|
secondary
|
||||||
|
thin>
|
||||||
|
{#each transitions as transition}
|
||||||
|
<option value={transition}>{capitalize(transition)}</option>
|
||||||
|
{/each}
|
||||||
|
</Select>
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<script>
|
<script>
|
||||||
import {flip} from "svelte/animate";
|
import { flip } from "svelte/animate"
|
||||||
import {dndzone} from "svelte-dnd-action";
|
import { dndzone } from "svelte-dnd-action"
|
||||||
import { Button, DropdownMenu, Spacer } from "@budibase/bbui"
|
import { Button, DropdownMenu, Spacer } from "@budibase/bbui"
|
||||||
import actionTypes from "./actions"
|
import actionTypes from "./actions"
|
||||||
|
|
||||||
const flipDurationMs = 150;
|
const flipDurationMs = 150
|
||||||
|
|
||||||
const EVENT_TYPE_KEY = "##eventHandlerType"
|
const EVENT_TYPE_KEY = "##eventHandlerType"
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
// dndzone needs an id on the array items, so this adds some temporary ones.
|
// dndzone needs an id on the array items, so this adds some temporary ones.
|
||||||
if (actions) {
|
if (actions) {
|
||||||
actions = actions.map((action, i) => {
|
actions = actions.map((action, i) => {
|
||||||
return {...action, id: i}
|
return { ...action, id: i }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
const newAction = {
|
const newAction = {
|
||||||
parameters: {},
|
parameters: {},
|
||||||
[EVENT_TYPE_KEY]: actionType.name,
|
[EVENT_TYPE_KEY]: actionType.name,
|
||||||
id: actions ? actions.length + 1 : 0
|
id: actions ? actions.length + 1 : 0,
|
||||||
}
|
}
|
||||||
if (!actions) {
|
if (!actions) {
|
||||||
actions = []
|
actions = []
|
||||||
|
@ -56,11 +56,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDndConsider(e) {
|
function handleDndConsider(e) {
|
||||||
actions = e.detail.items;
|
actions = e.detail.items
|
||||||
}
|
}
|
||||||
function handleDndFinalize(e) {
|
function handleDndFinalize(e) {
|
||||||
actions = e.detail.items;
|
actions = e.detail.items
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="actions-container">
|
<div class="actions-container">
|
||||||
|
@ -87,9 +87,15 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if actions && actions.length > 0}
|
{#if actions && actions.length > 0}
|
||||||
<div class="action-dnd-container" use:dndzone={{items: actions, flipDurationMs, dropTargetStyle: { outline: 'none'}}} on:consider={handleDndConsider} on:finalize={handleDndFinalize}>
|
<div
|
||||||
|
class="action-dnd-container"
|
||||||
|
use:dndzone={{ items: actions, flipDurationMs, dropTargetStyle: { outline: 'none' } }}
|
||||||
|
on:consider={handleDndConsider}
|
||||||
|
on:finalize={handleDndFinalize}>
|
||||||
{#each actions as action, index (action.id)}
|
{#each actions as action, index (action.id)}
|
||||||
<div class="action-container" animate:flip={{duration: flipDurationMs}}>
|
<div
|
||||||
|
class="action-container"
|
||||||
|
animate:flip={{ duration: flipDurationMs }}>
|
||||||
<div
|
<div
|
||||||
class="action-header"
|
class="action-header"
|
||||||
class:selected={action === selectedAction}
|
class:selected={action === selectedAction}
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
id,
|
id,
|
||||||
children: children.length,
|
children: children.length,
|
||||||
styles: { ...styles, id },
|
styles: { ...styles, id },
|
||||||
transition
|
transition,
|
||||||
})
|
})
|
||||||
|
|
||||||
// Gets the component constructor for the specified component
|
// Gets the component constructor for the specified component
|
||||||
|
|
|
@ -8,55 +8,81 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if type === 'div'}
|
{#if type === 'div'}
|
||||||
<div in:transition={{type: $component.transition}} use:styleable={$component.styles}>
|
<div
|
||||||
|
in:transition={{ type: $component.transition }}
|
||||||
|
use:styleable={$component.styles}>
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
{:else if type === 'header'}
|
{:else if type === 'header'}
|
||||||
<header in:transition={{type: $component.transition}} use:styleable={$component.styles}>
|
<header
|
||||||
|
in:transition={{ type: $component.transition }}
|
||||||
|
use:styleable={$component.styles}>
|
||||||
<slot />
|
<slot />
|
||||||
</header>
|
</header>
|
||||||
{:else if type === 'main'}
|
{:else if type === 'main'}
|
||||||
<main in:transition={{type: $component.transition}} use:styleable={$component.styles}>
|
<main
|
||||||
|
in:transition={{ type: $component.transition }}
|
||||||
|
use:styleable={$component.styles}>
|
||||||
<slot />
|
<slot />
|
||||||
</main>
|
</main>
|
||||||
{:else if type === 'footer'}
|
{:else if type === 'footer'}
|
||||||
<footer in:transition={{type: $component.transition}} use:styleable={$component.styles}>
|
<footer
|
||||||
|
in:transition={{ type: $component.transition }}
|
||||||
|
use:styleable={$component.styles}>
|
||||||
<slot />
|
<slot />
|
||||||
</footer>
|
</footer>
|
||||||
{:else if type === 'aside'}
|
{:else if type === 'aside'}
|
||||||
<aside in:transition={{type: $component.transition}} use:styleable={$component.styles}>
|
<aside
|
||||||
|
in:transition={{ type: $component.transition }}
|
||||||
|
use:styleable={$component.styles}>
|
||||||
<slot />
|
<slot />
|
||||||
</aside>
|
</aside>
|
||||||
{:else if type === 'summary'}
|
{:else if type === 'summary'}
|
||||||
<summary in:transition={{type: $component.transition}} use:styleable={$component.styles}>
|
<summary
|
||||||
|
in:transition={{ type: $component.transition }}
|
||||||
|
use:styleable={$component.styles}>
|
||||||
<slot />
|
<slot />
|
||||||
</summary>
|
</summary>
|
||||||
{:else if type === 'details'}
|
{:else if type === 'details'}
|
||||||
<details in:transition={{type: $component.transition}} use:styleable={$component.styles}>
|
<details
|
||||||
|
in:transition={{ type: $component.transition }}
|
||||||
|
use:styleable={$component.styles}>
|
||||||
<slot />
|
<slot />
|
||||||
</details>
|
</details>
|
||||||
{:else if type === 'article'}
|
{:else if type === 'article'}
|
||||||
<article in:transition={{type: $component.transition}} use:styleable={$component.styles}>
|
<article
|
||||||
|
in:transition={{ type: $component.transition }}
|
||||||
|
use:styleable={$component.styles}>
|
||||||
<slot />
|
<slot />
|
||||||
</article>
|
</article>
|
||||||
{:else if type === 'nav'}
|
{:else if type === 'nav'}
|
||||||
<nav in:transition={{type: $component.transition}} use:styleable={$component.styles}>
|
<nav
|
||||||
|
in:transition={{ type: $component.transition }}
|
||||||
|
use:styleable={$component.styles}>
|
||||||
<slot />
|
<slot />
|
||||||
</nav>
|
</nav>
|
||||||
{:else if type === 'mark'}
|
{:else if type === 'mark'}
|
||||||
<mark in:transition={{type: $component.transition}} use:styleable={$component.styles}>
|
<mark
|
||||||
|
in:transition={{ type: $component.transition }}
|
||||||
|
use:styleable={$component.styles}>
|
||||||
<slot />
|
<slot />
|
||||||
</mark>
|
</mark>
|
||||||
{:else if type === 'figure'}
|
{:else if type === 'figure'}
|
||||||
<figure in:transition={{type: $component.transition}} use:styleable={$component.styles}>
|
<figure
|
||||||
|
in:transition={{ type: $component.transition }}
|
||||||
|
use:styleable={$component.styles}>
|
||||||
<slot />
|
<slot />
|
||||||
</figure>
|
</figure>
|
||||||
{:else if type === 'figcaption'}
|
{:else if type === 'figcaption'}
|
||||||
<figcaption in:transition={{type: $component.transition}} use:styleable={$component.styles}>
|
<figcaption
|
||||||
|
in:transition={{ type: $component.transition }}
|
||||||
|
use:styleable={$component.styles}>
|
||||||
<slot />
|
<slot />
|
||||||
</figcaption>
|
</figcaption>
|
||||||
{:else if type === 'paragraph'}
|
{:else if type === 'paragraph'}
|
||||||
<p in:transition={{type: $component.transition}} use:styleable={$component.styles}>
|
<p
|
||||||
|
in:transition={{ type: $component.transition }}
|
||||||
|
use:styleable={$component.styles}>
|
||||||
<slot />
|
<slot />
|
||||||
</p>
|
</p>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -152,7 +152,9 @@
|
||||||
{#if selectedRows.length > 0}
|
{#if selectedRows.length > 0}
|
||||||
<DeleteButton text small on:click={modal.show()}>
|
<DeleteButton text small on:click={modal.show()}>
|
||||||
<Icon name="addrow" />
|
<Icon name="addrow" />
|
||||||
Delete {selectedRows.length} row(s)
|
Delete
|
||||||
|
{selectedRows.length}
|
||||||
|
row(s)
|
||||||
</DeleteButton>
|
</DeleteButton>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue