conversion of buttons in builder
This commit is contained in:
parent
2963d1d945
commit
a2a1722baf
|
@ -1,7 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { sortBy } from "lodash/fp"
|
import { sortBy } from "lodash/fp"
|
||||||
import { automationStore } from "builderStore"
|
import { automationStore } from "builderStore"
|
||||||
import { DropdownMenu, Modal } from "@budibase/bbui"
|
import { Button, DropdownMenu, Modal } from "@budibase/bbui"
|
||||||
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
||||||
import CreateWebhookModal from "../Shared/CreateWebhookModal.svelte"
|
import CreateWebhookModal from "../Shared/CreateWebhookModal.svelte"
|
||||||
|
|
||||||
|
@ -10,19 +10,19 @@
|
||||||
{
|
{
|
||||||
label: "Trigger",
|
label: "Trigger",
|
||||||
value: "TRIGGER",
|
value: "TRIGGER",
|
||||||
icon: "ri-organization-chart",
|
icon: "Algorithm",
|
||||||
disabled: hasTrigger,
|
disabled: hasTrigger,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Action",
|
label: "Action",
|
||||||
value: "ACTION",
|
value: "ACTION",
|
||||||
icon: "ri-flow-chart",
|
icon: "Actions",
|
||||||
disabled: !hasTrigger,
|
disabled: !hasTrigger,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Logic",
|
label: "Logic",
|
||||||
value: "LOGIC",
|
value: "LOGIC",
|
||||||
icon: "ri-filter-line",
|
icon: "Filter",
|
||||||
disabled: !hasTrigger,
|
disabled: !hasTrigger,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
@ -63,15 +63,15 @@
|
||||||
|
|
||||||
<div class="tab-container">
|
<div class="tab-container">
|
||||||
{#each tabs as tab, idx}
|
{#each tabs as tab, idx}
|
||||||
<div
|
<div bind:this={anchors[idx]}>
|
||||||
bind:this={anchors[idx]}
|
<Button
|
||||||
class="tab"
|
size="S"
|
||||||
class:disabled={tab.disabled}
|
quiet
|
||||||
on:click={tab.disabled ? null : () => onChangeTab(idx)}
|
icon={tab.icon}
|
||||||
class:active={idx === selectedIndex}>
|
disabled={tab.disabled}
|
||||||
{#if tab.icon}<i class={tab.icon} />{/if}
|
on:click={tab.disabled ? null : () => onChangeTab(idx)}>
|
||||||
<span>{tab.label}</span>
|
{tab.label}
|
||||||
<i class="ri-arrow-down-s-line arrow" />
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
@ -100,32 +100,6 @@
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: var(--spacing-l);
|
|
||||||
min-height: 24px;
|
min-height: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab {
|
|
||||||
color: var(--grey-7);
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: flex-start;
|
|
||||||
align-items: center;
|
|
||||||
gap: var(--spacing-xs);
|
|
||||||
font-size: var(--font-size-xs);
|
|
||||||
}
|
|
||||||
.tab span {
|
|
||||||
font-weight: 500;
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
.tab.active,
|
|
||||||
.tab:not(.disabled):hover {
|
|
||||||
color: var(--ink);
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.tab.disabled {
|
|
||||||
color: var(--grey-5);
|
|
||||||
}
|
|
||||||
.tab i:not(:last-child) {
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -75,6 +75,7 @@
|
||||||
</div>
|
</div>
|
||||||
<Modal bind:this={modal}>
|
<Modal bind:this={modal}>
|
||||||
<ModalContent
|
<ModalContent
|
||||||
|
size="large"
|
||||||
showCancelButton={false}
|
showCancelButton={false}
|
||||||
showConfirmButton={false}
|
showConfirmButton={false}
|
||||||
title={`Edit Column: ${field.name}`}>
|
title={`Edit Column: ${field.name}`}>
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
</Button>
|
</Button>
|
||||||
<Modal bind:this={modal}>
|
<Modal bind:this={modal}>
|
||||||
<ModalContent
|
<ModalContent
|
||||||
|
size="large"
|
||||||
showCancelButton={false}
|
showCancelButton={false}
|
||||||
showConfirmButton={false}
|
showConfirmButton={false}
|
||||||
title={'Create Column'}>
|
title={'Create Column'}>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
import { Popover, TextButton, Icon } from "@budibase/bbui"
|
import { Popover, Button } from "@budibase/bbui"
|
||||||
import GroupByPopover from "../popovers/GroupByPopover.svelte"
|
import GroupByPopover from "../popovers/GroupByPopover.svelte"
|
||||||
|
|
||||||
export let view = {}
|
export let view = {}
|
||||||
|
@ -9,9 +9,9 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div bind:this={anchor}>
|
<div bind:this={anchor}>
|
||||||
<TextButton icon="Group" type="overBackground" size="S" quiet active={!!view.groupBy} on:click={dropdown.show}>
|
<Button icon="Group" type="overBackground" size="S" quiet active={!!view.groupBy} on:click={dropdown.show}>
|
||||||
Group By
|
Group By
|
||||||
</TextButton>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<Popover bind:this={dropdown} {anchor} align="left">
|
<Popover bind:this={dropdown} {anchor} align="left">
|
||||||
<GroupByPopover {view} onClosed={dropdown.hide} />
|
<GroupByPopover {view} onClosed={dropdown.hide} />
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
Input,
|
Input,
|
||||||
Button,
|
Button,
|
||||||
Label,
|
Label,
|
||||||
TextButton,
|
|
||||||
Select,
|
Select,
|
||||||
Toggle,
|
Toggle,
|
||||||
Radio,
|
Radio,
|
||||||
|
@ -289,7 +288,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
<footer class="create-column-options">
|
<footer class="create-column-options">
|
||||||
{#if !uneditable && originalName != null}
|
{#if !uneditable && originalName != null}
|
||||||
<TextButton text on:click={confirmDelete}>Delete Column</TextButton>
|
<Button type="warning" size="S" text on:click={confirmDelete}>Delete Column</Button>
|
||||||
{/if}
|
{/if}
|
||||||
<Button on:click={onClosed}>Cancel</Button>
|
<Button on:click={onClosed}>Cancel</Button>
|
||||||
<Button type="cta" on:click={saveColumn} bind:disabled={invalid}>
|
<Button type="cta" on:click={saveColumn} bind:disabled={invalid}>
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { Label, TextButton, Spacer, Select, Input } from "@budibase/bbui"
|
import { Label, Button, Spacer, Select, Input } from "@budibase/bbui"
|
||||||
import { store, currentAsset } from "builderStore"
|
import { store, currentAsset } from "builderStore"
|
||||||
import { getBindableProperties } from "builderStore/dataBinding"
|
import { getBindableProperties } from "builderStore/dataBinding"
|
||||||
import { CloseCircleIcon, AddIcon } from "components/common/Icons"
|
|
||||||
import { createEventDispatcher } from "svelte"
|
import { createEventDispatcher } from "svelte"
|
||||||
import DrawerBindableInput from "components/common/DrawerBindableInput.svelte"
|
import DrawerBindableInput from "components/common/DrawerBindableInput.svelte"
|
||||||
|
|
||||||
|
@ -77,20 +76,15 @@
|
||||||
bindings={bindableProperties}
|
bindings={bindableProperties}
|
||||||
on:change={event => updateFieldValue(idx, event.detail)} />
|
on:change={event => updateFieldValue(idx, event.detail)} />
|
||||||
<div class="remove-field-container">
|
<div class="remove-field-container">
|
||||||
<TextButton text small on:click={() => removeField(field[0])}>
|
<Button icon="Close" size="S" quiet on:click={() => removeField(field[0])} />
|
||||||
<CloseCircleIcon />
|
|
||||||
</TextButton>
|
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
<div>
|
<div>
|
||||||
<Spacer small />
|
<Spacer small />
|
||||||
<TextButton text small blue on:click={addField}>
|
<Button icon="AddCircle" size="S" type="cta" on:click={addField}>
|
||||||
Add
|
Add
|
||||||
{fieldLabel}
|
{fieldLabel}
|
||||||
<div style="height: 20px; width: 20px;">
|
</Button>
|
||||||
<AddIcon />
|
|
||||||
</div>
|
|
||||||
</TextButton>
|
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<Heading small lh>Parameters</Heading>
|
<Heading small lh>Parameters</Heading>
|
||||||
{#if !bindable}
|
{#if !bindable}
|
||||||
<Button secondary on:click={newQueryParameter}>Add Param</Button>
|
<Button on:click={newQueryParameter}>Add Param</Button>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<Body small grey>
|
<Body small grey>
|
||||||
|
|
Loading…
Reference in New Issue