-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
245 additions
and
2 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
...omponents/design/PropertiesPanel/PropertyControls/ButtonActionEditor/actions/Debug.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<script> | ||
import { Select, Body } from "@budibase/bbui" | ||
import { onMount } from "svelte" | ||
export let parameters | ||
const debugOptions = [ | ||
{ | ||
label: "true", | ||
value: "true", | ||
}, | ||
{ | ||
label: "false", | ||
value: "false", | ||
}, | ||
] | ||
onMount(() => { | ||
if (!parameters.debug) { | ||
parameters.debug = "false" | ||
} | ||
}) | ||
</script> | ||
|
||
<div class="root"> | ||
<Body size="S"> | ||
Enable/Disable debug mode, print actions executions debug information | ||
to browser console. This action must place at top of actions list. | ||
</Body> | ||
<Select | ||
bind:value={parameters.debug} | ||
options={debugOptions} | ||
placeholder={null} | ||
/> | ||
</div> | ||
|
||
<style> | ||
.root { | ||
display: flex; | ||
flex-direction: column; | ||
gap: var(--spacing-l); | ||
justify-content: flex-start; | ||
align-items: stretch; | ||
max-width: 400px; | ||
margin: 0 auto; | ||
} | ||
</style> |
95 changes: 95 additions & 0 deletions
95
...mponents/design/PropertiesPanel/PropertyControls/ButtonActionEditor/actions/GotoIf.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<script> | ||
import { Select, Body, Label } from "@budibase/bbui" | ||
import { onMount } from "svelte" | ||
import DrawerBindableInput from "components/common/bindings/DrawerBindableInput.svelte" | ||
export let parameters | ||
export let bindings | ||
const operatorOptions = [ | ||
{ | ||
label: "Equals", | ||
value: "equal", | ||
}, | ||
{ | ||
label: "Not equals", | ||
value: "notEqual", | ||
}, | ||
{ | ||
label: "Greater than", | ||
value: "greaterThan", | ||
}, | ||
{ | ||
label: "Less than", | ||
value: "lessThan", | ||
}, | ||
{ | ||
label: "Greater than or equal to", | ||
value: "greaterThanOrEqual", | ||
}, | ||
{ | ||
label: "Less than or equal to", | ||
value: "lessThanOrEqual", | ||
} | ||
] | ||
onMount(() => { | ||
if (!parameters.operator) { | ||
parameters.operator = "equal" | ||
} | ||
if (!parameters.maxloop) { | ||
parameters.maxloop = 100 | ||
} | ||
}) | ||
</script> | ||
|
||
<div class="root"> | ||
<Body size="S"> | ||
Configure a condition to be evaluated which can goto other actions step. | ||
</Body> | ||
<Label small>Value</Label> | ||
<DrawerBindableInput | ||
placeholder="Value" | ||
value={parameters.value} | ||
on:change={e => (parameters.value = e.detail)} | ||
{bindings} | ||
/> | ||
<Label small>Operator</Label> | ||
<Select | ||
bind:value={parameters.operator} | ||
options={operatorOptions} | ||
placeholder={null} | ||
/> | ||
<Label small>Reference value</Label> | ||
<DrawerBindableInput | ||
placeholder="Reference value" | ||
bind:value={parameters.referenceValue} | ||
on:change={e => (parameters.referenceValue = e.detail)} | ||
{bindings} | ||
/> | ||
<Label small>Goto Step Number</Label> | ||
<DrawerBindableInput | ||
placeholder="Goto Step Number" | ||
bind:value={parameters.gotostep} | ||
on:change={e => (parameters.gotostep = e.detail)} | ||
{bindings} | ||
/> | ||
<Label small>Max Loop</Label> | ||
<DrawerBindableInput | ||
placeholder="Max Loop iterations to prevent infinite goto loop" | ||
bind:value={parameters.maxloop} | ||
on:change={e => (parameters.maxloop = e.detail)} | ||
{bindings} | ||
/> | ||
</div> | ||
|
||
<style> | ||
.root { | ||
display: flex; | ||
flex-direction: column; | ||
gap: var(--spacing-l); | ||
justify-content: flex-start; | ||
align-items: stretch; | ||
max-width: 400px; | ||
margin: 0 auto; | ||
} | ||
</style> |
25 changes: 25 additions & 0 deletions
25
...components/design/PropertiesPanel/PropertyControls/ButtonActionEditor/actions/Stop.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<script> | ||
import { Select, Body } from "@budibase/bbui" | ||
import { onMount } from "svelte" | ||
onMount(() => { | ||
}) | ||
</script> | ||
|
||
<div class="root"> | ||
<Body size="S"> | ||
Stop actions from being executed from here. | ||
</Body> | ||
</div> | ||
|
||
<style> | ||
.root { | ||
display: flex; | ||
flex-direction: column; | ||
gap: var(--spacing-l); | ||
justify-content: flex-start; | ||
align-items: stretch; | ||
max-width: 400px; | ||
margin: 0 auto; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters