Merge branch 'develop' into feature/environment-variables
This commit is contained in:
commit
da2c809a09
|
@ -6,7 +6,7 @@ labels: bug
|
|||
assignees: ''
|
||||
|
||||
---
|
||||
## Checklist
|
||||
**Checklist**
|
||||
- [ ] I have searched budibase discussions and github issues to check if my issue already exists
|
||||
|
||||
**Hosting**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "2.2.12-alpha.21",
|
||||
"version": "2.2.12-alpha.41",
|
||||
"npmClient": "yarn",
|
||||
"packages": [
|
||||
"packages/*"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/backend-core",
|
||||
"version": "2.2.12-alpha.21",
|
||||
"version": "2.2.12-alpha.41",
|
||||
"description": "Budibase backend core libraries used in server and worker",
|
||||
"main": "dist/src/index.js",
|
||||
"types": "dist/src/index.d.ts",
|
||||
|
@ -23,7 +23,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@budibase/nano": "10.1.1",
|
||||
"@budibase/types": "2.2.12-alpha.21",
|
||||
"@budibase/types": "2.2.12-alpha.41",
|
||||
"@shopify/jest-koa-mocks": "5.0.1",
|
||||
"@techpass/passport-openidconnect": "0.3.2",
|
||||
"aws-cloudfront-sign": "2.2.0",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@budibase/bbui",
|
||||
"description": "A UI solution used in the different Budibase projects.",
|
||||
"version": "2.2.12-alpha.21",
|
||||
"version": "2.2.12-alpha.41",
|
||||
"license": "MPL-2.0",
|
||||
"svelte": "src/index.js",
|
||||
"module": "dist/bbui.es.js",
|
||||
|
@ -38,7 +38,8 @@
|
|||
],
|
||||
"dependencies": {
|
||||
"@adobe/spectrum-css-workflow-icons": "1.2.1",
|
||||
"@budibase/string-templates": "2.2.12-alpha.21",
|
||||
"@budibase/string-templates": "2.2.12-alpha.41",
|
||||
"@spectrum-css/accordion": "3.0.24",
|
||||
"@spectrum-css/actionbutton": "1.0.1",
|
||||
"@spectrum-css/actiongroup": "1.0.1",
|
||||
"@spectrum-css/avatar": "3.0.2",
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
<script>
|
||||
import "@spectrum-css/accordion"
|
||||
|
||||
export let itemName
|
||||
export let initialOpen
|
||||
export let header
|
||||
|
||||
let isOpen
|
||||
|
||||
function getOpenClass(isOpen) {
|
||||
if (isOpen === undefined) {
|
||||
isOpen = initialOpen
|
||||
}
|
||||
return isOpen ? "is-open" : ""
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="spectrum-Accordion" role={itemName}>
|
||||
<div class="spectrum-Accordion-item {getOpenClass(isOpen)}">
|
||||
<h3 class="spectrum-Accordion-itemHeading">
|
||||
<button
|
||||
class="spectrum-Accordion-itemHeader"
|
||||
type="button"
|
||||
on:click={() => (isOpen = !isOpen)}
|
||||
>
|
||||
{header}
|
||||
</button>
|
||||
<svg
|
||||
class="spectrum-Icon spectrum-UIIcon-ChevronRight100 spectrum-Accordion-itemIndicator"
|
||||
focusable="false"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<use xlink:href="#spectrum-css-icon-Chevron100" />
|
||||
</svg>
|
||||
</h3>
|
||||
<div class="spectrum-Accordion-itemContent" role={itemName}>
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.spectrum-Accordion {
|
||||
margin-left: -20px;
|
||||
}
|
||||
.spectrum-Accordion-item {
|
||||
border: none;
|
||||
}
|
||||
.spectrum-Accordion-itemContent {
|
||||
width: 97%;
|
||||
padding-left: 30px;
|
||||
}
|
||||
.spectrum-Accordion-itemHeader {
|
||||
text-transform: none;
|
||||
font-weight: bold;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
</style>
|
|
@ -88,6 +88,7 @@
|
|||
}
|
||||
.is-selected:not(.spectrum-ActionButton--emphasized) {
|
||||
background: var(--spectrum-global-color-gray-300);
|
||||
border-color: var(--spectrum-global-color-gray-700);
|
||||
}
|
||||
.noPadding {
|
||||
padding: 0;
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
<script>
|
||||
import Icon from "../Icon/Icon.svelte"
|
||||
import FancyField from "./FancyField.svelte"
|
||||
|
||||
export let icon
|
||||
export let disabled
|
||||
</script>
|
||||
|
||||
<FancyField on:click clickable {disabled}>
|
||||
{#if icon}
|
||||
{#if icon.includes("/")}
|
||||
<img src={icon} alt="button" />
|
||||
{:else}
|
||||
<Icon name={icon} />
|
||||
{/if}
|
||||
{/if}
|
||||
<div>
|
||||
<slot />
|
||||
</div>
|
||||
</FancyField>
|
||||
|
||||
<style>
|
||||
img {
|
||||
width: 22px;
|
||||
}
|
||||
div {
|
||||
font-size: var(--font-size-l);
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,70 @@
|
|||
<script>
|
||||
import { createEventDispatcher } from "svelte"
|
||||
import FancyField from "./FancyField.svelte"
|
||||
import FancyFieldLabel from "./FancyFieldLabel.svelte"
|
||||
import ActionButton from "../ActionButton/ActionButton.svelte"
|
||||
|
||||
export let label
|
||||
export let value
|
||||
export let disabled = false
|
||||
export let error = null
|
||||
export let validate = null
|
||||
export let options = []
|
||||
export let getOptionLabel = option => extractProperty(option, "label")
|
||||
export let getOptionValue = option => extractProperty(option, "value")
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
$: placeholder = !value
|
||||
|
||||
const extractProperty = (value, property) => {
|
||||
if (value && typeof value === "object") {
|
||||
return value[property]
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
const onChange = newValue => {
|
||||
dispatch("change", newValue)
|
||||
value = newValue
|
||||
if (validate) {
|
||||
error = validate(newValue)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<FancyField {error} {value} {validate} {disabled} autoHeight>
|
||||
{#if label}
|
||||
<FancyFieldLabel placeholder={false}>{label}</FancyFieldLabel>
|
||||
{/if}
|
||||
|
||||
<div class="options">
|
||||
{#each options as option}
|
||||
<ActionButton
|
||||
selected={getOptionValue(option) === value}
|
||||
on:click={() => onChange(getOptionValue(option))}
|
||||
>
|
||||
{getOptionLabel(option)}
|
||||
</ActionButton>
|
||||
{/each}
|
||||
</div>
|
||||
</FancyField>
|
||||
|
||||
<style>
|
||||
.options {
|
||||
margin-top: 34px;
|
||||
margin-bottom: 14px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.options :global(.spectrum-ActionButton) {
|
||||
font-size: 15px;
|
||||
line-height: 17px;
|
||||
height: auto;
|
||||
padding: 6px 10px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,53 @@
|
|||
<script>
|
||||
import { createEventDispatcher } from "svelte"
|
||||
import FancyField from "./FancyField.svelte"
|
||||
import Checkbox from "../Form/Core/Checkbox.svelte"
|
||||
|
||||
export let value
|
||||
export let text
|
||||
export let disabled = false
|
||||
export let error = null
|
||||
export let validate = null
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
const onChange = () => {
|
||||
const newValue = !value
|
||||
dispatch("change", newValue)
|
||||
value = newValue
|
||||
if (validate) {
|
||||
error = validate(newValue)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<FancyField {error} {value} {validate} {disabled} clickable on:click={onChange}>
|
||||
<span>
|
||||
<Checkbox {disabled} {value} />
|
||||
</span>
|
||||
<div class="text">
|
||||
{#if text}
|
||||
{text}
|
||||
{/if}
|
||||
<slot />
|
||||
</div>
|
||||
</FancyField>
|
||||
|
||||
<style>
|
||||
span {
|
||||
pointer-events: none;
|
||||
}
|
||||
.text {
|
||||
font-size: 15px;
|
||||
line-height: 17px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
.text > :global(*) {
|
||||
font-size: inherit !important;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,126 @@
|
|||
<script>
|
||||
import Icon from "../Icon/Icon.svelte"
|
||||
import { getContext, onMount } from "svelte"
|
||||
import { slide } from "svelte/transition"
|
||||
|
||||
export let disabled = false
|
||||
export let error = null
|
||||
export let focused = false
|
||||
export let clickable = false
|
||||
export let validate
|
||||
export let value
|
||||
export let ref
|
||||
export let autoHeight
|
||||
|
||||
const formContext = getContext("fancy-form")
|
||||
const id = Math.random()
|
||||
const API = {
|
||||
validate: () => {
|
||||
if (validate) {
|
||||
error = validate(value)
|
||||
}
|
||||
return !error
|
||||
},
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
if (formContext) {
|
||||
formContext.registerField(id, API)
|
||||
}
|
||||
return () => {
|
||||
if (formContext) {
|
||||
formContext.unregisterField(id)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<div
|
||||
bind:this={ref}
|
||||
class="fancy-field"
|
||||
class:error
|
||||
class:disabled
|
||||
class:focused
|
||||
class:clickable
|
||||
class:auto-height={autoHeight}
|
||||
>
|
||||
<div class="content" on:click>
|
||||
<div class="field">
|
||||
<slot />
|
||||
</div>
|
||||
{#if error}
|
||||
<div class="error-icon">
|
||||
<Icon name="Alert" />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{#if error}
|
||||
<div transition:slide|local={{ duration: 130 }} class="error-message">
|
||||
{error}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.fancy-field {
|
||||
max-width: 400px;
|
||||
background: var(--spectrum-global-color-gray-75);
|
||||
border: 1px solid var(--spectrum-global-color-gray-300);
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
transition: border-color 130ms ease-out, background 130ms ease-out,
|
||||
background 130ms ease-out;
|
||||
color: var(--spectrum-global-color-gray-800);
|
||||
}
|
||||
.fancy-field:hover {
|
||||
border-color: var(--spectrum-global-color-gray-400);
|
||||
}
|
||||
.fancy-field.clickable:hover {
|
||||
background: var(--spectrum-global-color-gray-200);
|
||||
cursor: pointer;
|
||||
}
|
||||
.fancy-field.focused {
|
||||
border-color: var(--spectrum-global-color-blue-400);
|
||||
}
|
||||
.fancy-field.error {
|
||||
border-color: var(--spectrum-global-color-red-400);
|
||||
}
|
||||
.fancy-field.disabled {
|
||||
background: var(--spectrum-global-color-gray-200);
|
||||
color: var(--spectrum-global-color-gray-400);
|
||||
border: 1px solid var(--spectrum-global-color-gray-300);
|
||||
pointer-events: none;
|
||||
}
|
||||
.content {
|
||||
position: relative;
|
||||
height: 64px;
|
||||
padding: 0 16px;
|
||||
}
|
||||
.fancy-field.auto-height .content {
|
||||
height: auto;
|
||||
}
|
||||
.content,
|
||||
.field {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
}
|
||||
.field {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
.error-message {
|
||||
background: var(--spectrum-global-color-red-400);
|
||||
color: white;
|
||||
font-size: 14px;
|
||||
padding: 6px 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.error-icon {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
.error-icon :global(.spectrum-Icon) {
|
||||
fill: var(--spectrum-global-color-red-400);
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,25 @@
|
|||
<script>
|
||||
export let placeholder = true
|
||||
</script>
|
||||
|
||||
<div class:placeholder>
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
<style>
|
||||
div {
|
||||
font-size: 14px;
|
||||
line-height: 15px;
|
||||
font-weight: 500;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
color: var(--spectrum-global-color-gray-600);
|
||||
transition: font-size 130ms ease-out, top 130ms ease-out,
|
||||
transform 130ms ease-out;
|
||||
}
|
||||
div.placeholder {
|
||||
top: 50%;
|
||||
font-size: 15px;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,40 @@
|
|||
<script>
|
||||
import { setContext } from "svelte"
|
||||
|
||||
let fields = {}
|
||||
|
||||
setContext("fancy-form", {
|
||||
registerField: (id, api) => {
|
||||
fields = { ...fields, [id]: api }
|
||||
},
|
||||
unregisterField: id => {
|
||||
delete fields[id]
|
||||
fields = fields
|
||||
},
|
||||
})
|
||||
|
||||
export const validate = () => {
|
||||
let valid = true
|
||||
Object.values(fields).forEach(api => {
|
||||
if (!api.validate()) {
|
||||
valid = false
|
||||
}
|
||||
})
|
||||
return valid
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="fancy-form">
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.fancy-form :global(.fancy-field:not(:first-of-type)) {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
.fancy-form :global(.fancy-field:not(:last-of-type)) {
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,77 @@
|
|||
<script>
|
||||
import { createEventDispatcher } from "svelte"
|
||||
import FancyField from "./FancyField.svelte"
|
||||
import FancyFieldLabel from "./FancyFieldLabel.svelte"
|
||||
import { fade } from "svelte/transition"
|
||||
|
||||
export let label
|
||||
export let value
|
||||
export let type = "text"
|
||||
export let disabled = false
|
||||
export let error = null
|
||||
export let validate = null
|
||||
export let suffix = null
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
let focused = false
|
||||
$: placeholder = !focused && !value
|
||||
|
||||
const onChange = e => {
|
||||
const newValue = e.target.value
|
||||
dispatch("change", newValue)
|
||||
value = newValue
|
||||
if (validate) {
|
||||
error = validate(newValue)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<FancyField {error} {value} {validate} {disabled} {focused}>
|
||||
{#if label}
|
||||
<FancyFieldLabel {placeholder}>{label}</FancyFieldLabel>
|
||||
{/if}
|
||||
<input
|
||||
{disabled}
|
||||
value={value || ""}
|
||||
type={type || "text"}
|
||||
on:input={onChange}
|
||||
on:focus={() => (focused = true)}
|
||||
on:blur={() => (focused = false)}
|
||||
class:placeholder
|
||||
/>
|
||||
{#if suffix && !placeholder}
|
||||
<div in:fade|local={{ duration: 130 }} class="suffix">{suffix}</div>
|
||||
{/if}
|
||||
</FancyField>
|
||||
|
||||
<style>
|
||||
input {
|
||||
width: 100%;
|
||||
transition: transform 130ms ease-out;
|
||||
transform: translateY(9px);
|
||||
background: transparent;
|
||||
font-size: 15px;
|
||||
line-height: 17px;
|
||||
font-family: var(--font-sans);
|
||||
color: var(--spectrum-global-color-gray-900);
|
||||
outline: none;
|
||||
border: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
input.placeholder {
|
||||
transform: translateY(0);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
}
|
||||
.suffix {
|
||||
color: var(--spectrum-global-color-gray-600);
|
||||
transform: translateY(9px);
|
||||
font-size: 15px;
|
||||
line-height: 17px;
|
||||
font-family: var(--font-sans);
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,147 @@
|
|||
<script>
|
||||
import { createEventDispatcher } from "svelte"
|
||||
import FancyField from "./FancyField.svelte"
|
||||
import Icon from "../Icon/Icon.svelte"
|
||||
import Popover from "../Popover/Popover.svelte"
|
||||
import FancyFieldLabel from "./FancyFieldLabel.svelte"
|
||||
|
||||
export let label
|
||||
export let value
|
||||
export let disabled = false
|
||||
export let error = null
|
||||
export let validate = null
|
||||
export let options = []
|
||||
export let getOptionLabel = option => extractProperty(option, "label")
|
||||
export let getOptionValue = option => extractProperty(option, "value")
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
let open = false
|
||||
let popover
|
||||
let wrapper
|
||||
|
||||
$: placeholder = !value
|
||||
$: selectedLabel = getSelectedLabel(value)
|
||||
|
||||
const extractProperty = (value, property) => {
|
||||
if (value && typeof value === "object") {
|
||||
return value[property]
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
const onChange = newValue => {
|
||||
dispatch("change", newValue)
|
||||
value = newValue
|
||||
if (validate) {
|
||||
error = validate(newValue)
|
||||
}
|
||||
open = false
|
||||
}
|
||||
|
||||
const getSelectedLabel = value => {
|
||||
if (!value || !options?.length) {
|
||||
return ""
|
||||
}
|
||||
const selectedOption = options.find(x => getOptionValue(x) === value)
|
||||
if (!selectedOption) {
|
||||
return value
|
||||
}
|
||||
return getOptionLabel(selectedOption)
|
||||
}
|
||||
</script>
|
||||
|
||||
<FancyField
|
||||
bind:ref={wrapper}
|
||||
{error}
|
||||
{value}
|
||||
{validate}
|
||||
{disabled}
|
||||
clickable
|
||||
on:click={() => (open = true)}
|
||||
>
|
||||
{#if label}
|
||||
<FancyFieldLabel {placeholder}>{label}</FancyFieldLabel>
|
||||
{/if}
|
||||
|
||||
<div class="value" class:placeholder>
|
||||
{selectedLabel || ""}
|
||||
</div>
|
||||
|
||||
<div class="arrow">
|
||||
<Icon name="ChevronDown" />
|
||||
</div>
|
||||
</FancyField>
|
||||
|
||||
<Popover
|
||||
anchor={wrapper}
|
||||
align="left"
|
||||
portalTarget={document.documentElement}
|
||||
bind:this={popover}
|
||||
{open}
|
||||
on:close={() => (open = false)}
|
||||
useAnchorWidth={true}
|
||||
maxWidth={null}
|
||||
>
|
||||
<div class="popover-content">
|
||||
{#if options.length}
|
||||
{#each options as option, idx}
|
||||
<div
|
||||
class="popover-option"
|
||||
tabindex="0"
|
||||
on:click={() => onChange(getOptionValue(option, idx))}
|
||||
>
|
||||
<span class="option-text">
|
||||
{getOptionLabel(option, idx)}
|
||||
</span>
|
||||
{#if value === getOptionValue(option, idx)}
|
||||
<Icon name="Checkmark" />
|
||||
{/if}
|
||||
</div>
|
||||
{/each}
|
||||
{/if}
|
||||
</div>
|
||||
</Popover>
|
||||
|
||||
<style>
|
||||
.value {
|
||||
display: block;
|
||||
flex: 1 1 auto;
|
||||
font-size: 15px;
|
||||
line-height: 17px;
|
||||
color: var(--spectrum-global-color-gray-900);
|
||||
transition: transform 130ms ease-out, opacity 130ms ease-out;
|
||||
opacity: 1;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
width: 0;
|
||||
transform: translateY(9px);
|
||||
}
|
||||
.value.placeholder {
|
||||
transform: translateY(0);
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
margin-top: 0;
|
||||
}
|
||||
.popover-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
align-items: stretch;
|
||||
padding: 7px 0;
|
||||
}
|
||||
.popover-option {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 7px 16px;
|
||||
transition: background 130ms ease-out;
|
||||
font-size: 15px;
|
||||
}
|
||||
.popover-option:hover {
|
||||
background: var(--spectrum-global-color-gray-200);
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,6 @@
|
|||
export { default as FancyInput } from "./FancyInput.svelte"
|
||||
export { default as FancyCheckbox } from "./FancyCheckbox.svelte"
|
||||
export { default as FancySelect } from "./FancySelect.svelte"
|
||||
export { default as FancyButton } from "./FancyButton.svelte"
|
||||
export { default as FancyForm } from "./FancyForm.svelte"
|
||||
export { default as FancyButtonRadio } from "./FancyButtonRadio.svelte"
|
|
@ -45,7 +45,9 @@
|
|||
getOptionLabel
|
||||
)
|
||||
|
||||
const onClick = () => {
|
||||
const onClick = e => {
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
dispatch("click")
|
||||
if (readonly) {
|
||||
return
|
||||
|
@ -88,7 +90,6 @@
|
|||
class:is-open={open}
|
||||
aria-haspopup="listbox"
|
||||
on:click={onClick}
|
||||
use:clickOutside={() => (open = false)}
|
||||
bind:this={button}
|
||||
>
|
||||
{#if fieldIcon}
|
||||
|
@ -130,14 +131,17 @@
|
|||
<Popover
|
||||
anchor={button}
|
||||
align="left"
|
||||
portalTarget={document.documentElement}
|
||||
bind:this={popover}
|
||||
{open}
|
||||
on:close={() => (open = false)}
|
||||
useAnchorWidth={!autoWidth}
|
||||
maxWidth={autoWidth ? 400 : null}
|
||||
>
|
||||
<div class="popover-content" class:auto-width={autoWidth}>
|
||||
<div
|
||||
class="popover-content"
|
||||
class:auto-width={autoWidth}
|
||||
use:clickOutside={() => (open = false)}
|
||||
>
|
||||
{#if autocomplete}
|
||||
<Search
|
||||
value={searchTerm}
|
||||
|
|
|
@ -18,8 +18,11 @@
|
|||
export let autoWidth = false
|
||||
export let autocomplete = false
|
||||
export let sort = false
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
let open = false
|
||||
|
||||
$: fieldText = getFieldText(value, options, placeholder)
|
||||
$: fieldIcon = getFieldAttribute(getOptionIcon, value, options)
|
||||
$: fieldColour = getFieldAttribute(getOptionColour, value, options)
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
<div class="main">
|
||||
<div class="content" class:wide class:noPadding class:narrow>
|
||||
<slot />
|
||||
<div class="fix-scroll-padding" />
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
|
@ -55,9 +56,14 @@
|
|||
max-width: 1080px;
|
||||
margin: 0 auto;
|
||||
flex: 1 1 auto;
|
||||
padding: 50px;
|
||||
padding: 50px 50px 0 50px;
|
||||
z-index: 1;
|
||||
}
|
||||
.fix-scroll-padding {
|
||||
content: "";
|
||||
display: block;
|
||||
flex: 0 0 50px;
|
||||
}
|
||||
.content.wide {
|
||||
max-width: none;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<script>
|
||||
import "@spectrum-css/link/dist/index-vars.css"
|
||||
import { createEventDispatcher } from "svelte"
|
||||
|
||||
export let href = "#"
|
||||
export let size = "M"
|
||||
|
@ -9,10 +10,12 @@
|
|||
export let overBackground = false
|
||||
export let target
|
||||
export let download
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
</script>
|
||||
|
||||
<a
|
||||
on:click
|
||||
on:click={e => dispatch("click") && e.stopPropagation()}
|
||||
{href}
|
||||
{target}
|
||||
{download}
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
import positionDropdown from "../Actions/position_dropdown"
|
||||
import clickOutside from "../Actions/click_outside"
|
||||
import { fly } from "svelte/transition"
|
||||
import { getContext } from "svelte"
|
||||
import Context from "../context"
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
|
@ -24,6 +26,7 @@
|
|||
$: tooltipClasses = showTip
|
||||
? `spectrum-Popover--withTip spectrum-Popover--${direction}`
|
||||
: ""
|
||||
$: target = portalTarget || getContext(Context.PopoverRoot) || ".spectrum"
|
||||
|
||||
export const show = () => {
|
||||
dispatch("open")
|
||||
|
@ -61,7 +64,7 @@
|
|||
</script>
|
||||
|
||||
{#if open}
|
||||
<Portal target={portalTarget}>
|
||||
<Portal {target}>
|
||||
<div
|
||||
tabindex="0"
|
||||
use:positionDropdown={{ anchor, align, maxWidth, useAnchorWidth }}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export default {
|
||||
Modal: "bbui-modal",
|
||||
PopoverRoot: "bbui-popover-root",
|
||||
}
|
||||
|
|
|
@ -76,6 +76,7 @@ export { default as ListItem } from "./List/ListItem.svelte"
|
|||
export { default as IconSideNav } from "./IconSideNav/IconSideNav.svelte"
|
||||
export { default as IconSideNavItem } from "./IconSideNav/IconSideNavItem.svelte"
|
||||
export { default as Slider } from "./Form/Slider.svelte"
|
||||
export { default as Accordion } from "./Accordion/Accordion.svelte"
|
||||
|
||||
// Renderers
|
||||
export { default as BoldRenderer } from "./Table/BoldRenderer.svelte"
|
||||
|
@ -102,3 +103,6 @@ export { banner, BANNER_TYPES } from "./Stores/banner"
|
|||
|
||||
// Helpers
|
||||
export * as Helpers from "./helpers"
|
||||
|
||||
// Fancy form components
|
||||
export * from "./FancyForm"
|
||||
|
|
|
@ -109,6 +109,11 @@
|
|||
estree-walker "^1.0.1"
|
||||
picomatch "^2.2.2"
|
||||
|
||||
"@spectrum-css/accordion@3.0.24":
|
||||
version "3.0.24"
|
||||
resolved "https://registry.yarnpkg.com/@spectrum-css/accordion/-/accordion-3.0.24.tgz#f89066c120c57b0cfc9aba66d60c39fc1cf69f74"
|
||||
integrity sha512-jNOmUsxmiT3lRLButnN5KKHM94fd+87fjiF8L0c4uRNgJl6ZsBuxPXrM15lV4y1f8D2IACAw01/ZkGRAeaCOFA==
|
||||
|
||||
"@spectrum-css/actionbutton@1.0.1":
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@spectrum-css/actionbutton/-/actionbutton-1.0.1.tgz#9c75da37ea6915919fb574c74bd60dacc03b6577"
|
||||
|
|
|
@ -11,9 +11,5 @@
|
|||
"WORKER_PORT": "4200",
|
||||
"JWT_SECRET": "test",
|
||||
"HOST_IP": ""
|
||||
},
|
||||
"retries": {
|
||||
"runMode": 1,
|
||||
"openMode": 0
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@ import filterTests from "../../support/filterTests"
|
|||
// const interact = require("../support/interact")
|
||||
|
||||
filterTests(["smoke", "all"], () => {
|
||||
context("Auth Configuration", () => {
|
||||
xcontext("Auth Configuration", () => {
|
||||
before(() => {
|
||||
cy.login()
|
||||
})
|
||||
|
@ -21,7 +21,7 @@ filterTests(["smoke", "all"], () => {
|
|||
cy.get("[data-cy=oidc-active]").should('not.be.checked')
|
||||
|
||||
cy.intercept("POST", "/api/global/configs").as("updateAuth")
|
||||
cy.get("button[data-cy=oidc-save]").contains("Save").click({force: true})
|
||||
cy.get("button[data-cy=oidc-save]").contains("Save").click({ force: true })
|
||||
cy.wait("@updateAuth")
|
||||
cy.get("@updateAuth").its("response.statusCode").should("eq", 200)
|
||||
|
||||
|
@ -45,7 +45,7 @@ filterTests(["smoke", "all"], () => {
|
|||
cy.get("button[data-cy=oidc-save]").should("not.be.disabled");
|
||||
|
||||
cy.intercept("POST", "/api/global/configs").as("updateAuth")
|
||||
cy.get("button[data-cy=oidc-save]").contains("Save").click({force: true})
|
||||
cy.get("button[data-cy=oidc-save]").contains("Save").click({ force: true })
|
||||
cy.wait("@updateAuth")
|
||||
cy.get("@updateAuth").its("response.statusCode").should("eq", 200)
|
||||
|
||||
|
@ -85,11 +85,11 @@ filterTests(["smoke", "all"], () => {
|
|||
cy.get(".auth-form input.spectrum-Textfield-input").type("Another ")
|
||||
cy.get(".spectrum-Tags").find(".spectrum-Tags-item").its("length").should("eq", 6)
|
||||
cy.get(".spectrum-Tags-item").contains("Another")
|
||||
|
||||
|
||||
cy.get("button[data-cy=oidc-save]").should("not.be.disabled");
|
||||
|
||||
cy.intercept("POST", "/api/global/configs").as("updateAuth")
|
||||
cy.get("button[data-cy=oidc-save]").contains("Save").click({force: true})
|
||||
cy.get("button[data-cy=oidc-save]").contains("Save").click({ force: true })
|
||||
cy.wait("@updateAuth")
|
||||
cy.get("@updateAuth").its("response.statusCode").should("eq", 200)
|
||||
|
||||
|
@ -123,7 +123,7 @@ filterTests(["smoke", "all"], () => {
|
|||
cy.get("button[data-cy=oidc-save]").should("not.be.disabled");
|
||||
|
||||
cy.intercept("POST", "/api/global/configs").as("updateAuth")
|
||||
cy.get("button[data-cy=oidc-save]").contains("Save").click({force: true})
|
||||
cy.get("button[data-cy=oidc-save]").contains("Save").click({ force: true })
|
||||
cy.wait("@updateAuth")
|
||||
cy.get("@updateAuth").its("response.statusCode").should("eq", 200)
|
||||
|
||||
|
@ -144,7 +144,7 @@ filterTests(["smoke", "all"], () => {
|
|||
|
||||
cy.get("div.content").scrollTo("bottom")
|
||||
|
||||
cy.get("[data-cy=restore-oidc-default-scopes]").click({force: true})
|
||||
cy.get("[data-cy=restore-oidc-default-scopes]").click({ force: true })
|
||||
|
||||
cy.get(".spectrum-Tags").find(".spectrum-Tags-item").its("length").should("eq", 4)
|
||||
|
||||
|
|
|
@ -3,107 +3,112 @@ const interact = require('../../support/interact')
|
|||
|
||||
filterTests(["smoke", "all"], () => {
|
||||
context("User Settings Menu", () => {
|
||||
|
||||
|
||||
before(() => {
|
||||
cy.login()
|
||||
})
|
||||
|
||||
|
||||
it("should update user information via user settings menu", () => {
|
||||
const fname = "test"
|
||||
const lname = "user"
|
||||
const fname = "test"
|
||||
const lname = "user"
|
||||
|
||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
||||
cy.updateUserInformation(fname, lname)
|
||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
||||
cy.updateUserInformation(fname, lname)
|
||||
|
||||
// Go to user info and confirm name update
|
||||
cy.contains("Users").click()
|
||||
cy.contains("test@test.com").click()
|
||||
// Go to user info and confirm name update
|
||||
cy.contains("Users").click()
|
||||
cy.contains("test@test.com").click()
|
||||
|
||||
cy.get(interact.FIELD, { timeout: 1000 }).eq(1).within(() => {
|
||||
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT).should('have.value', fname)
|
||||
})
|
||||
cy.get(interact.FIELD).eq(2).within(() => {
|
||||
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT).should('have.value', lname)
|
||||
})
|
||||
cy.get(interact.FIELD, { timeout: 1000 }).eq(1).within(() => {
|
||||
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT).should('have.value', fname)
|
||||
})
|
||||
cy.get(interact.FIELD).eq(2).within(() => {
|
||||
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT).should('have.value', lname)
|
||||
})
|
||||
})
|
||||
|
||||
it("should allow copying of the users API key", () => {
|
||||
cy.get(".user-dropdown .avatar > .icon", { timeout: 2000 }).click({ force: true })
|
||||
cy.get(interact.SPECTRUM_MENU_ITEM).contains("View API key").click({ force: true })
|
||||
cy.get(interact.SPECTRUM_DIALOG_CONTENT).within(() => {
|
||||
cy.get(interact.SPECTRUM_ICON).click({force: true})
|
||||
})
|
||||
// There may be timing issues with this on the smoke build
|
||||
cy.wait(500)
|
||||
cy.get(".spectrum-Toast-content")
|
||||
xit("should allow copying of the users API key", () => {
|
||||
cy.get(".user-dropdown .avatar > .icon", { timeout: 2000 }).click({ force: true })
|
||||
cy.get(interact.SPECTRUM_MENU_ITEM).contains("View API key").click({ force: true })
|
||||
cy.get(interact.SPECTRUM_DIALOG_CONTENT).within(() => {
|
||||
cy.get(interact.SPECTRUM_ICON).click({ force: true })
|
||||
})
|
||||
// There may be timing issues with this on the smoke build
|
||||
cy.wait(500)
|
||||
cy.get(".spectrum-Toast-content")
|
||||
.contains("URL copied to clipboard")
|
||||
.should("be.visible")
|
||||
})
|
||||
|
||||
it("should allow API key regeneration", () => {
|
||||
// Get initial API key value
|
||||
cy.get(interact.SPECTRUM_DIALOG_CONTENT)
|
||||
cy.get(".user-dropdown .icon", { timeout: 2000 }).click({ force: true })
|
||||
cy.get(interact.SPECTRUM_MENU_ITEM).contains("View API key").click({ force: true })
|
||||
cy.get(interact.SPECTRUM_DIALOG_CONTENT).within(() => {
|
||||
cy.get(interact.SPECTRUM_ICON).click({ force: true })
|
||||
})
|
||||
// Get initial API key value
|
||||
cy.get(interact.SPECTRUM_DIALOG_CONTENT)
|
||||
.find(interact.SPECTRUM_TEXTFIELD_INPUT).invoke('val').as('keyOne')
|
||||
|
||||
// Click re-generate key button
|
||||
cy.get("button").contains("Re-generate key").click({ force: true })
|
||||
// Click re-generate key button
|
||||
cy.get("button").contains("Regenerate key").click({ force: true })
|
||||
|
||||
// Verify API key was changed
|
||||
cy.get(interact.SPECTRUM_DIALOG_CONTENT).within(() => {
|
||||
cy.get('@keyOne').then((keyOne) => {
|
||||
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT).invoke('val').should('not.eq', keyOne)
|
||||
})
|
||||
// Verify API key was changed
|
||||
cy.get(interact.SPECTRUM_DIALOG_CONTENT).within(() => {
|
||||
cy.get('@keyOne').then((keyOne) => {
|
||||
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT).invoke('val').should('not.eq', keyOne)
|
||||
})
|
||||
cy.closeModal()
|
||||
})
|
||||
cy.closeModal()
|
||||
})
|
||||
|
||||
it("should update password", () => {
|
||||
// Access Update password modal
|
||||
cy.get(".user-dropdown .avatar > .icon", { timeout: 2000 }).click({ force: true })
|
||||
cy.get(interact.SPECTRUM_MENU_ITEM).contains("Update password").click({ force: true })
|
||||
// Access Update password modal
|
||||
cy.get(".user-dropdown .icon", { timeout: 2000 }).click({ force: true })
|
||||
cy.get(interact.SPECTRUM_MENU_ITEM).contains("Update password").click({ force: true })
|
||||
|
||||
// Enter new password and update
|
||||
cy.get(interact.SPECTRUM_DIALOG_GRID).within(() => {
|
||||
for (let i = 0; i < 2; i++) {
|
||||
// password set to 'newpwd'
|
||||
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT).eq(i).type("newpwd")
|
||||
}
|
||||
cy.get("button").contains("Update password").click({ force: true })
|
||||
})
|
||||
// Enter new password and update
|
||||
cy.get(interact.SPECTRUM_DIALOG_GRID).within(() => {
|
||||
for (let i = 0; i < 2; i++) {
|
||||
// password set to 'newpwd'
|
||||
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT).eq(i).type("newpwd")
|
||||
}
|
||||
cy.get("button").contains("Update password").click({ force: true })
|
||||
})
|
||||
|
||||
// Logout & in with new password
|
||||
//cy.logOut()
|
||||
cy.login("test@test.com", "newpwd")
|
||||
// Logout & in with new password
|
||||
//cy.logOut()
|
||||
cy.login("test@test.com", "newpwd")
|
||||
})
|
||||
|
||||
it("should open and close developer mode", () => {
|
||||
cy.get(".user-dropdown .avatar > .icon", { timeout: 2000 }).click({ force: true })
|
||||
|
||||
// Close developer mode & verify
|
||||
cy.get(interact.SPECTRUM_MENU_ITEM).contains("Close developer mode").click({ force: true })
|
||||
cy.get(interact.SPECTRUM_SIDENAV).should('not.exist') // No config sections
|
||||
cy.get(interact.CREATE_APP_BUTTON).should('not.exist') // No create app button
|
||||
cy.get(".app").should('not.exist') // At least one app should be available
|
||||
xit("should open and close developer mode", () => {
|
||||
cy.get(".user-dropdown .icon", { timeout: 2000 }).click({ force: true })
|
||||
|
||||
// Open developer mode & verify
|
||||
cy.get(".avatar > .icon").click({ force: true })
|
||||
cy.get(interact.SPECTRUM_MENU_ITEM).contains("Open developer mode").click({ force: true })
|
||||
cy.get(interact.SPECTRUM_SIDENAV).should('exist') // config sections available
|
||||
cy.get(interact.CREATE_APP_BUTTON).should('exist') // create app button available
|
||||
// Close developer mode & verify
|
||||
cy.get(interact.SPECTRUM_MENU_ITEM).contains("Close developer mode").click({ force: true })
|
||||
cy.get(interact.SPECTRUM_SIDENAV).should('not.exist') // No config sections
|
||||
cy.get(interact.CREATE_APP_BUTTON).should('not.exist') // No create app button
|
||||
cy.get(".app").should('not.exist') // At least one app should be available
|
||||
|
||||
// Open developer mode & verify
|
||||
cy.get(".avatar > .icon").click({ force: true })
|
||||
cy.get(interact.SPECTRUM_MENU_ITEM).contains("Open developer mode").click({ force: true })
|
||||
cy.get(".app-table").should('exist') // config sections available
|
||||
cy.get(interact.CREATE_APP_BUTTON).should('exist') // create app button available
|
||||
})
|
||||
|
||||
after(() => {
|
||||
// Change password back to original value
|
||||
cy.get(".user-dropdown .avatar > .icon", { timeout: 2000 }).click({ force: true })
|
||||
cy.get(interact.SPECTRUM_MENU_ITEM).contains("Update password").click({ force: true })
|
||||
cy.get(interact.SPECTRUM_DIALOG_GRID).within(() => {
|
||||
for (let i = 0; i < 2; i++) {
|
||||
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT).eq(i).type("test")
|
||||
}
|
||||
cy.get("button").contains("Update password").click({ force: true })
|
||||
})
|
||||
// Remove users name
|
||||
cy.updateUserInformation()
|
||||
// Change password back to original value
|
||||
cy.get(".user-dropdown .icon", { timeout: 2000 }).click({ force: true })
|
||||
cy.get(interact.SPECTRUM_MENU_ITEM).contains("Update password").click({ force: true })
|
||||
cy.get(interact.SPECTRUM_DIALOG_GRID).within(() => {
|
||||
for (let i = 0; i < 2; i++) {
|
||||
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT).eq(i).type("test")
|
||||
}
|
||||
cy.get("button").contains("Update password").click({ force: true })
|
||||
})
|
||||
// Remove users name
|
||||
cy.updateUserInformation()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -2,7 +2,7 @@ import filterTests from "../support/filterTests"
|
|||
import clientPackage from "@budibase/client/package.json"
|
||||
|
||||
filterTests(["all"], () => {
|
||||
context("Application Overview screen", () => {
|
||||
xcontext("Application Overview screen", () => {
|
||||
before(() => {
|
||||
cy.login()
|
||||
cy.deleteAllApps()
|
||||
|
|
|
@ -14,15 +14,15 @@ filterTests(['smoke', 'all'], () => {
|
|||
cy.visit(`${Cypress.config().baseUrl}/builder/portal/apps/create`, { timeout: 5000 }) //added /portal/apps/create
|
||||
cy.wait(1000)
|
||||
cy.get(interact.CREATE_APP_BUTTON, { timeout: 10000 }).contains('Start from scratch').should("exist")
|
||||
|
||||
|
||||
cy.get(interact.TEMPLATE_CATEGORY_FILTER).should("exist")
|
||||
cy.get(interact.TEMPLATE_CATEGORY).should("exist")
|
||||
|
||||
|
||||
cy.get(interact.APP_TABLE).should("not.exist")
|
||||
})
|
||||
}
|
||||
|
||||
it("should provide filterable templates", () => {
|
||||
xit("should provide filterable templates", () => {
|
||||
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000 })
|
||||
cy.wait(500)
|
||||
|
||||
|
@ -30,16 +30,16 @@ filterTests(['smoke', 'all'], () => {
|
|||
.its("body")
|
||||
.then(val => {
|
||||
if (val.length > 0) {
|
||||
cy.get(interact.SPECTRUM_BUTTON).contains("Templates").click({force: true})
|
||||
cy.get(interact.SPECTRUM_BUTTON).contains("View Templates").click({ force: true })
|
||||
}
|
||||
})
|
||||
|
||||
cy.get(interact.TEMPLATE_CATEGORY_FILTER).should("exist")
|
||||
cy.get(interact.TEMPLATE_CATEGORY).should("exist")
|
||||
|
||||
|
||||
cy.get(interact.TEMPLATE_CATEGORY_ACTIONGROUP).its('length').should('be.gt', 1)
|
||||
cy.get(interact.TEMPLATE_CATEGORY_FILTER_ACTIONBUTTON).its('length').should('be.gt', 2)
|
||||
|
||||
|
||||
cy.get(interact.TEMPLATE_CATEGORY_FILTER_ACTIONBUTTON).eq(1).click()
|
||||
cy.get(interact.TEMPLATE_CATEGORY_ACTIONGROUP).should('have.length', 1)
|
||||
|
||||
|
@ -104,14 +104,14 @@ filterTests(['smoke', 'all'], () => {
|
|||
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000 })
|
||||
|
||||
cy.updateUserInformation("Ted", "Userman")
|
||||
|
||||
|
||||
cy.createApp("", false)
|
||||
cy.applicationInAppTable("Teds app")
|
||||
cy.deleteApp("Teds app")
|
||||
|
||||
// Accomodate names that end in 'S'
|
||||
cy.updateUserInformation("Chris", "Userman")
|
||||
|
||||
|
||||
cy.createApp("", false)
|
||||
cy.applicationInAppTable("Chris app")
|
||||
cy.deleteApp("Chris app")
|
||||
|
@ -123,35 +123,49 @@ filterTests(['smoke', 'all'], () => {
|
|||
const exportedApp = 'cypress/fixtures/exported-app.txt'
|
||||
|
||||
cy.importApp(exportedApp, "")
|
||||
|
||||
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 2000 })
|
||||
|
||||
cy.applicationInAppTable("My app")
|
||||
|
||||
cy.get(".appTable .name").eq(0).click()
|
||||
|
||||
cy.deleteApp("My app")
|
||||
cy.get(".app-table .name").eq(0).click()
|
||||
cy.closeModal()
|
||||
cy.get(`[aria-label="ShowMenu"]`).click()
|
||||
cy.get(".spectrum-Menu").within(() => {
|
||||
cy.contains("Overview").click()
|
||||
})
|
||||
cy.get(".app-overview-actions-icon").within(() => {
|
||||
cy.get(".spectrum-Icon").click({ force: true })
|
||||
})
|
||||
cy.get(".spectrum-Menu").contains("Delete").click({ force: true })
|
||||
cy.get(".spectrum-Dialog-grid").within(() => {
|
||||
cy.get("input").type("My app")
|
||||
})
|
||||
cy.get(".spectrum-Button--warning").click()
|
||||
})
|
||||
|
||||
it("should create an application from an export, using the users first name as the default app name", () => {
|
||||
const exportedApp = 'cypress/fixtures/exported-app.txt'
|
||||
|
||||
cy.updateUserInformation("Ted", "Userman")
|
||||
|
||||
cy.importApp(exportedApp, "")
|
||||
|
||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
||||
|
||||
cy.applicationInAppTable("Teds app")
|
||||
|
||||
cy.get(".appTable .name").eq(0).click()
|
||||
|
||||
cy.deleteApp("Teds app")
|
||||
|
||||
cy.get(".app-table .name").eq(0).click()
|
||||
cy.closeModal()
|
||||
cy.get(`[aria-label="ShowMenu"]`).click()
|
||||
cy.get(".spectrum-Menu").within(() => {
|
||||
cy.contains("Overview").click()
|
||||
})
|
||||
cy.get(".app-overview-actions-icon").within(() => {
|
||||
cy.get(".spectrum-Icon").click({ force: true })
|
||||
})
|
||||
cy.get(".spectrum-Menu").contains("Delete").click({ force: true })
|
||||
cy.get(".spectrum-Dialog-grid").within(() => {
|
||||
cy.get("input").type("Teds app")
|
||||
})
|
||||
cy.get(".spectrum-Button--warning").click()
|
||||
cy.updateUserInformation("", "")
|
||||
})
|
||||
|
||||
it("should generate the first application from a template", () => {
|
||||
xit("should generate the first application from a template", () => {
|
||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
||||
cy.wait(500)
|
||||
|
||||
|
@ -172,28 +186,28 @@ filterTests(['smoke', 'all'], () => {
|
|||
const card = cy.get('.template-card').eq(0).should("exist");
|
||||
const cardOverlay = card.get('.template-thumbnail-action-overlay').should("exist")
|
||||
cardOverlay.invoke("show")
|
||||
cardOverlay.get("button").contains("Use template").should("exist").click({force: true})
|
||||
cardOverlay.get("button").contains("Use template").should("exist").click({ force: true })
|
||||
})
|
||||
|
||||
// CMD Create app from theme card
|
||||
cy.get(".spectrum-Modal").should('be.visible')
|
||||
|
||||
|
||||
const templateName = cy.get(".spectrum-Modal .template-thumbnail-text")
|
||||
templateName.invoke('text')
|
||||
.then(templateNameText => {
|
||||
const templateNameParsed = "/"+templateNameText.toLowerCase().replace(/\s+/g, "-")
|
||||
cy.get(interact.SPECTRUM_MODAL_INPUT).eq(0).should("have.value", templateNameText)
|
||||
cy.get(interact.SPECTRUM_MODAL_INPUT).eq(1).should("have.value", templateNameParsed)
|
||||
.then(templateNameText => {
|
||||
const templateNameParsed = "/" + templateNameText.toLowerCase().replace(/\s+/g, "-")
|
||||
cy.get(interact.SPECTRUM_MODAL_INPUT).eq(0).should("have.value", templateNameText)
|
||||
cy.get(interact.SPECTRUM_MODAL_INPUT).eq(1).should("have.value", templateNameParsed)
|
||||
|
||||
cy.get(".spectrum-Modal .spectrum-ButtonGroup").contains("Create app").click()
|
||||
cy.wait(5000)
|
||||
|
||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
||||
cy.wait(2000)
|
||||
cy.get(".spectrum-Modal .spectrum-ButtonGroup").contains("Create app").click()
|
||||
cy.wait(5000)
|
||||
|
||||
cy.applicationInAppTable(templateNameText)
|
||||
cy.deleteApp(templateNameText)
|
||||
});
|
||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
||||
cy.wait(2000)
|
||||
|
||||
cy.applicationInAppTable(templateNameText)
|
||||
cy.deleteApp(templateNameText)
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
|
@ -217,5 +231,5 @@ filterTests(['smoke', 'all'], () => {
|
|||
cy.deleteApp(secondAppName)
|
||||
})
|
||||
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -101,7 +101,7 @@ Cypress.Commands.add("deleteUser", email => {
|
|||
})
|
||||
|
||||
Cypress.Commands.add("updateUserInformation", (firstName, lastName) => {
|
||||
cy.get(".user-dropdown .avatar > .icon", { timeout: 2000 }).click({
|
||||
cy.get(".user-dropdown .icon", { timeout: 2000 }).click({
|
||||
force: true,
|
||||
})
|
||||
|
||||
|
@ -132,7 +132,7 @@ Cypress.Commands.add("updateUserInformation", (firstName, lastName) => {
|
|||
.blur()
|
||||
}
|
||||
cy.get(".confirm-wrap").within(() => {
|
||||
cy.get("button").contains("Update information").click({ force: true })
|
||||
cy.get("button").contains("Save").click({ force: true })
|
||||
})
|
||||
cy.get(".spectrum-Dialog-grid").should("not.exist")
|
||||
})
|
||||
|
@ -222,9 +222,12 @@ Cypress.Commands.add("deleteApp", name => {
|
|||
// Go to app overview
|
||||
const appIdParsed = appId.split("_").pop()
|
||||
const actionEleId = `[data-cy=row_actions_${appIdParsed}]`
|
||||
cy.get(actionEleId).within(() => {
|
||||
cy.contains("Manage").click({ force: true })
|
||||
cy.get(actionEleId).click()
|
||||
cy.get(`[aria-label="ShowMenu"]`).click()
|
||||
cy.get(".spectrum-Menu").within(() => {
|
||||
cy.contains("Overview").click()
|
||||
})
|
||||
|
||||
cy.wait(500)
|
||||
|
||||
// Unpublish first if needed
|
||||
|
@ -400,7 +403,7 @@ Cypress.Commands.add("searchForApplication", appName => {
|
|||
return
|
||||
} else {
|
||||
// Searches for the app
|
||||
cy.get(".filter").then(() => {
|
||||
cy.get(".spectrum-Search").then(() => {
|
||||
cy.get(".spectrum-Textfield").within(() => {
|
||||
cy.get("input").eq(0).clear({ force: true })
|
||||
cy.get("input").eq(0).type(appName, { force: true })
|
||||
|
@ -413,7 +416,7 @@ Cypress.Commands.add("searchForApplication", appName => {
|
|||
// Assumes there are no others
|
||||
Cypress.Commands.add("applicationInAppTable", appName => {
|
||||
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 30000 })
|
||||
cy.get(".appTable", { timeout: 30000 }).within(() => {
|
||||
cy.get(".app-table", { timeout: 30000 }).within(() => {
|
||||
cy.get(".title").contains(appName).should("exist")
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/builder",
|
||||
"version": "2.2.12-alpha.21",
|
||||
"version": "2.2.12-alpha.41",
|
||||
"license": "GPL-3.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
@ -71,11 +71,12 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@budibase/bbui": "2.2.12-alpha.21",
|
||||
"@budibase/client": "2.2.12-alpha.21",
|
||||
"@budibase/frontend-core": "2.2.12-alpha.21",
|
||||
"@budibase/string-templates": "2.2.12-alpha.21",
|
||||
"@budibase/bbui": "2.2.12-alpha.41",
|
||||
"@budibase/client": "2.2.12-alpha.41",
|
||||
"@budibase/frontend-core": "2.2.12-alpha.41",
|
||||
"@budibase/string-templates": "2.2.12-alpha.41",
|
||||
"@sentry/browser": "5.19.1",
|
||||
"@spectrum-css/accordion": "^3.0.24",
|
||||
"@spectrum-css/page": "^3.0.1",
|
||||
"@spectrum-css/vars": "^3.0.1",
|
||||
"codemirror": "^5.59.0",
|
||||
|
|
|
@ -398,6 +398,7 @@ const getProviderContextBindings = (asset, dataProviders) => {
|
|||
providerId,
|
||||
// Table ID is used by JSON fields to know what table the field is in
|
||||
tableId: table?._id,
|
||||
component: component._component,
|
||||
category: component._instanceName,
|
||||
icon: def.icon,
|
||||
display: {
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
TextArea,
|
||||
Modal,
|
||||
EnvDropdown,
|
||||
Accordion,
|
||||
} from "@budibase/bbui"
|
||||
import KeyValueBuilder from "components/integration/KeyValueBuilder.svelte"
|
||||
import { capitalise } from "helpers"
|
||||
|
@ -59,15 +60,24 @@
|
|||
|
||||
let addButton
|
||||
|
||||
function getDisplayName(key) {
|
||||
function getDisplayName(key, fieldKey) {
|
||||
let name
|
||||
if (schema[key]?.display) {
|
||||
if (fieldKey && schema[key]["fields"][fieldKey]?.display) {
|
||||
name = schema[key]["fields"][fieldKey].display
|
||||
} else if (fieldKey) {
|
||||
name = fieldKey
|
||||
} else if (schema[key]?.display) {
|
||||
name = schema[key].display
|
||||
} else {
|
||||
name = key
|
||||
}
|
||||
return capitalise(name)
|
||||
}
|
||||
function getFieldGroupKeys(fieldGroup) {
|
||||
return Object.entries(schema[fieldGroup].fields || {})
|
||||
.filter(el => filter(el))
|
||||
.map(([key]) => key)
|
||||
}
|
||||
|
||||
function save(data) {
|
||||
environment.createVariable(data)
|
||||
|
@ -135,6 +145,27 @@
|
|||
error={$validation.errors[configKey]}
|
||||
/>
|
||||
</div>
|
||||
{:else if schema[configKey].type === "fieldGroup"}
|
||||
<Accordion
|
||||
itemName={configKey}
|
||||
initialOpen={getFieldGroupKeys(configKey).some(
|
||||
fieldKey => !!config[fieldKey]
|
||||
)}
|
||||
header={getDisplayName(configKey)}
|
||||
>
|
||||
<Layout gap="S">
|
||||
{#each getFieldGroupKeys(configKey) as fieldKey}
|
||||
<div class="form-row">
|
||||
<Label>{getDisplayName(configKey, fieldKey)}</Label>
|
||||
<Input
|
||||
type={schema[configKey]["fields"][fieldKey]?.type}
|
||||
on:change
|
||||
bind:value={config[fieldKey]}
|
||||
/>
|
||||
</div>
|
||||
{/each}
|
||||
</Layout>
|
||||
</Accordion>
|
||||
{:else}
|
||||
<div class="form-row">
|
||||
<Label>{getDisplayName(configKey)}</Label>
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
} from "@budibase/bbui"
|
||||
import { tables } from "stores/backend"
|
||||
import { Helpers } from "@budibase/bbui"
|
||||
import { writable } from "svelte/store"
|
||||
|
||||
export let save
|
||||
export let datasource
|
||||
|
@ -18,41 +17,97 @@
|
|||
export let fromRelationship = {}
|
||||
export let toRelationship = {}
|
||||
export let close
|
||||
export let selectedFromTable
|
||||
|
||||
let originalFromName = fromRelationship.name,
|
||||
originalToName = toRelationship.name
|
||||
let fromTable, toTable, through, linkTable, tableOptions
|
||||
let isManyToMany, isManyToOne, relationshipTypes
|
||||
let errors, valid
|
||||
let currentTables = {}
|
||||
const colNotSet = "Please specify a column name"
|
||||
const relationshipAlreadyExists =
|
||||
"A relationship between these tables already exists."
|
||||
const relationshipTypes = [
|
||||
{
|
||||
label: "One to Many",
|
||||
value: RelationshipTypes.MANY_TO_ONE,
|
||||
},
|
||||
{
|
||||
label: "Many to Many",
|
||||
value: RelationshipTypes.MANY_TO_MANY,
|
||||
},
|
||||
]
|
||||
|
||||
if (fromRelationship && !fromRelationship.relationshipType) {
|
||||
fromRelationship.relationshipType = RelationshipTypes.MANY_TO_ONE
|
||||
}
|
||||
let originalFromColumnName = toRelationship.name,
|
||||
originalToColumnName = fromRelationship.name
|
||||
let originalFromTable = plusTables.find(
|
||||
table => table._id === toRelationship?.tableId
|
||||
)
|
||||
let originalToTable = plusTables.find(
|
||||
table => table._id === fromRelationship?.tableId
|
||||
)
|
||||
|
||||
if (toRelationship && selectedFromTable) {
|
||||
toRelationship.tableId = selectedFromTable._id
|
||||
}
|
||||
let tableOptions
|
||||
let errors = {}
|
||||
let hasClickedSave = !!fromRelationship.relationshipType
|
||||
let fromPrimary,
|
||||
fromForeign,
|
||||
fromTable,
|
||||
toTable,
|
||||
throughTable,
|
||||
fromColumn,
|
||||
toColumn
|
||||
let fromId, toId, throughId, throughToKey, throughFromKey
|
||||
let isManyToMany, isManyToOne, relationshipType
|
||||
|
||||
function inSchema(table, prop, ogName) {
|
||||
if (!table || !prop || prop === ogName) {
|
||||
return false
|
||||
$: {
|
||||
if (!fromPrimary) {
|
||||
fromPrimary = fromRelationship.foreignKey
|
||||
fromForeign = toRelationship.foreignKey
|
||||
}
|
||||
if (!fromColumn && !errors.fromColumn) {
|
||||
fromColumn = toRelationship.name
|
||||
}
|
||||
if (!toColumn && !errors.toColumn) {
|
||||
toColumn = fromRelationship.name
|
||||
}
|
||||
if (!fromId) {
|
||||
fromId = toRelationship.tableId
|
||||
}
|
||||
if (!toId) {
|
||||
toId = fromRelationship.tableId
|
||||
}
|
||||
if (!throughId) {
|
||||
throughId = fromRelationship.through
|
||||
throughFromKey = fromRelationship.throughFrom
|
||||
throughToKey = fromRelationship.throughTo
|
||||
}
|
||||
if (!relationshipType) {
|
||||
relationshipType = fromRelationship.relationshipType
|
||||
}
|
||||
const keys = Object.keys(table.schema).map(key => key.toLowerCase())
|
||||
return keys.indexOf(prop.toLowerCase()) !== -1
|
||||
}
|
||||
|
||||
const touched = writable({})
|
||||
$: tableOptions = plusTables.map(table => ({
|
||||
label: table.name,
|
||||
value: table._id,
|
||||
}))
|
||||
$: valid = getErrorCount(errors) === 0 || !hasClickedSave
|
||||
|
||||
function invalidThroughTable({ through, throughTo, throughFrom }) {
|
||||
$: isManyToMany = relationshipType === RelationshipTypes.MANY_TO_MANY
|
||||
$: isManyToOne = relationshipType === RelationshipTypes.MANY_TO_ONE
|
||||
$: fromTable = plusTables.find(table => table._id === fromId)
|
||||
$: toTable = plusTables.find(table => table._id === toId)
|
||||
$: throughTable = plusTables.find(table => table._id === throughId)
|
||||
|
||||
$: toRelationship.relationshipType = fromRelationship?.relationshipType
|
||||
|
||||
const getErrorCount = errors =>
|
||||
Object.entries(errors)
|
||||
.filter(entry => !!entry[1])
|
||||
.map(entry => entry[0]).length
|
||||
|
||||
function invalidThroughTable() {
|
||||
// need to know the foreign key columns to check error
|
||||
if (!through || !throughTo || !throughFrom) {
|
||||
if (!throughId || !throughToKey || !throughFromKey) {
|
||||
return false
|
||||
}
|
||||
const throughTable = plusTables.find(tbl => tbl._id === through)
|
||||
const otherColumns = Object.values(throughTable.schema).filter(
|
||||
col => col.name !== throughFrom && col.name !== throughTo
|
||||
const throughTbl = plusTables.find(tbl => tbl._id === throughId)
|
||||
const otherColumns = Object.values(throughTbl.schema).filter(
|
||||
col => col.name !== throughFromKey && col.name !== throughToKey
|
||||
)
|
||||
for (let col of otherColumns) {
|
||||
if (col.constraints?.presence && !col.autocolumn) {
|
||||
|
@ -62,142 +117,138 @@
|
|||
return false
|
||||
}
|
||||
|
||||
function checkForErrors(fromRelate, toRelate) {
|
||||
const isMany =
|
||||
fromRelate.relationshipType === RelationshipTypes.MANY_TO_MANY
|
||||
function validate() {
|
||||
const isMany = relationshipType === RelationshipTypes.MANY_TO_MANY
|
||||
const tableNotSet = "Please specify a table"
|
||||
const foreignKeyNotSet = "Please pick a foreign key"
|
||||
const errObj = {}
|
||||
if ($touched.from && !fromTable) {
|
||||
errObj.from = tableNotSet
|
||||
if (!relationshipType) {
|
||||
errObj.relationshipType = "Please specify a relationship type"
|
||||
}
|
||||
if ($touched.to && !toTable) {
|
||||
errObj.to = tableNotSet
|
||||
if (!fromTable) {
|
||||
errObj.fromTable = tableNotSet
|
||||
}
|
||||
if ($touched.through && isMany && !fromRelate.through) {
|
||||
errObj.through = tableNotSet
|
||||
if (!toTable) {
|
||||
errObj.toTable = tableNotSet
|
||||
}
|
||||
if ($touched.through && invalidThroughTable(fromRelate)) {
|
||||
errObj.through =
|
||||
"Ensure all columns in table are nullable or auto generated"
|
||||
if (isMany && !throughTable) {
|
||||
errObj.throughTable = tableNotSet
|
||||
}
|
||||
if ($touched.foreign && !isMany && !fromRelate.fieldName) {
|
||||
errObj.foreign = "Please pick the foreign key"
|
||||
if (isMany && !throughFromKey) {
|
||||
errObj.throughFromKey = foreignKeyNotSet
|
||||
}
|
||||
const colNotSet = "Please specify a column name"
|
||||
if ($touched.fromCol && !fromRelate.name) {
|
||||
errObj.fromCol = colNotSet
|
||||
if (isMany && !throughToKey) {
|
||||
errObj.throughToKey = foreignKeyNotSet
|
||||
}
|
||||
if ($touched.toCol && !toRelate.name) {
|
||||
errObj.toCol = colNotSet
|
||||
if (invalidThroughTable()) {
|
||||
errObj.throughTable =
|
||||
"Ensure non-key columns are nullable or auto-generated"
|
||||
}
|
||||
if ($touched.primary && !fromPrimary) {
|
||||
errObj.primary = "Please pick the primary key"
|
||||
if (!isMany && !fromForeign) {
|
||||
errObj.fromForeign = foreignKeyNotSet
|
||||
}
|
||||
if (!fromColumn) {
|
||||
errObj.fromColumn = colNotSet
|
||||
}
|
||||
if (!toColumn) {
|
||||
errObj.toColumn = colNotSet
|
||||
}
|
||||
if (!isMany && !fromPrimary) {
|
||||
errObj.fromPrimary = "Please pick the primary key"
|
||||
}
|
||||
if (isMany && relationshipExists()) {
|
||||
errObj.fromTable = relationshipAlreadyExists
|
||||
errObj.toTable = relationshipAlreadyExists
|
||||
}
|
||||
|
||||
// currently don't support relationships back onto the table itself, needs to relate out
|
||||
const tableError = "From/to/through tables must be different"
|
||||
if (fromTable && (fromTable === toTable || fromTable === through)) {
|
||||
errObj.from = tableError
|
||||
if (fromTable && (fromTable === toTable || fromTable === throughTable)) {
|
||||
errObj.fromTable = tableError
|
||||
}
|
||||
if (toTable && (toTable === fromTable || toTable === through)) {
|
||||
errObj.to = tableError
|
||||
if (toTable && (toTable === fromTable || toTable === throughTable)) {
|
||||
errObj.toTable = tableError
|
||||
}
|
||||
if (through && (through === fromTable || through === toTable)) {
|
||||
errObj.through = tableError
|
||||
if (
|
||||
throughTable &&
|
||||
(throughTable === fromTable || throughTable === toTable)
|
||||
) {
|
||||
errObj.throughTable = tableError
|
||||
}
|
||||
const colError = "Column name cannot be an existing column"
|
||||
if (inSchema(fromTable, fromRelate.name, originalFromName)) {
|
||||
errObj.fromCol = colError
|
||||
if (isColumnNameBeingUsed(toTable, fromColumn, originalFromColumnName)) {
|
||||
errObj.fromColumn = colError
|
||||
}
|
||||
if (inSchema(toTable, toRelate.name, originalToName)) {
|
||||
errObj.toCol = colError
|
||||
if (isColumnNameBeingUsed(fromTable, toColumn, originalToColumnName)) {
|
||||
errObj.toColumn = colError
|
||||
}
|
||||
|
||||
let fromType, toType
|
||||
if (fromPrimary && fromRelate.fieldName) {
|
||||
if (fromPrimary && fromForeign) {
|
||||
fromType = fromTable?.schema[fromPrimary]?.type
|
||||
toType = toTable?.schema[fromRelate.fieldName]?.type
|
||||
toType = toTable?.schema[fromForeign]?.type
|
||||
}
|
||||
if (fromType && toType && fromType !== toType) {
|
||||
errObj.foreign =
|
||||
errObj.fromForeign =
|
||||
"Column type of the foreign key must match the primary key"
|
||||
}
|
||||
|
||||
errors = errObj
|
||||
return getErrorCount(errors) === 0
|
||||
}
|
||||
|
||||
let fromPrimary
|
||||
$: {
|
||||
if (!fromPrimary && fromTable) {
|
||||
fromPrimary = fromTable.primary[0]
|
||||
}
|
||||
}
|
||||
$: isManyToMany =
|
||||
fromRelationship?.relationshipType === RelationshipTypes.MANY_TO_MANY
|
||||
$: isManyToOne =
|
||||
fromRelationship?.relationshipType === RelationshipTypes.MANY_TO_ONE
|
||||
$: tableOptions = plusTables.map(table => ({
|
||||
label: table.name,
|
||||
value: table._id,
|
||||
}))
|
||||
$: fromTable = plusTables.find(table => table._id === toRelationship?.tableId)
|
||||
$: toTable = plusTables.find(table => table._id === fromRelationship?.tableId)
|
||||
$: through = plusTables.find(table => table._id === fromRelationship?.through)
|
||||
$: checkForErrors(fromRelationship, toRelationship)
|
||||
$: valid =
|
||||
Object.keys(errors).length === 0 && Object.keys($touched).length !== 0
|
||||
$: linkTable = through || toTable
|
||||
$: relationshipTypes = [
|
||||
{
|
||||
label: "Many",
|
||||
value: RelationshipTypes.MANY_TO_MANY,
|
||||
},
|
||||
{
|
||||
label: "One",
|
||||
value: RelationshipTypes.MANY_TO_ONE,
|
||||
},
|
||||
]
|
||||
$: updateRelationshipType(fromRelationship?.relationshipType)
|
||||
$: tableChanged(fromTable, toTable)
|
||||
|
||||
function updateRelationshipType(fromType) {
|
||||
if (fromType === RelationshipTypes.MANY_TO_MANY) {
|
||||
toRelationship.relationshipType = RelationshipTypes.MANY_TO_MANY
|
||||
} else {
|
||||
toRelationship.relationshipType = RelationshipTypes.MANY_TO_ONE
|
||||
function isColumnNameBeingUsed(table, columnName, originalName) {
|
||||
if (!table || !columnName || columnName === originalName) {
|
||||
return false
|
||||
}
|
||||
const keys = Object.keys(table.schema).map(key => key.toLowerCase())
|
||||
return keys.indexOf(columnName.toLowerCase()) !== -1
|
||||
}
|
||||
|
||||
function buildRelationships() {
|
||||
// if any to many only need to check from
|
||||
const manyToMany =
|
||||
fromRelationship.relationshipType === RelationshipTypes.MANY_TO_MANY
|
||||
// main is simply used to know this is the side the user configured it from
|
||||
const id = Helpers.uuid()
|
||||
if (!manyToMany) {
|
||||
delete fromRelationship.through
|
||||
delete toRelationship.through
|
||||
}
|
||||
//Map temporary variables
|
||||
let relateFrom = {
|
||||
...fromRelationship,
|
||||
tableId: toId,
|
||||
name: toColumn,
|
||||
relationshipType,
|
||||
fieldName: fromForeign,
|
||||
through: throughId,
|
||||
throughFrom: throughFromKey,
|
||||
throughTo: throughToKey,
|
||||
type: "link",
|
||||
main: true,
|
||||
_id: id,
|
||||
}
|
||||
let relateTo = {
|
||||
let relateTo = (toRelationship = {
|
||||
...toRelationship,
|
||||
tableId: fromId,
|
||||
name: fromColumn,
|
||||
through: throughId,
|
||||
type: "link",
|
||||
_id: id,
|
||||
})
|
||||
|
||||
// if any to many only need to check from
|
||||
const manyToMany =
|
||||
relateFrom.relationshipType === RelationshipTypes.MANY_TO_MANY
|
||||
|
||||
if (!manyToMany) {
|
||||
delete relateFrom.through
|
||||
delete relateTo.through
|
||||
}
|
||||
|
||||
// [0] is because we don't support composite keys for relationships right now
|
||||
if (manyToMany) {
|
||||
relateFrom = {
|
||||
...relateFrom,
|
||||
through: through._id,
|
||||
through: throughTable._id,
|
||||
fieldName: toTable.primary[0],
|
||||
}
|
||||
relateTo = {
|
||||
...relateTo,
|
||||
through: through._id,
|
||||
through: throughTable._id,
|
||||
fieldName: fromTable.primary[0],
|
||||
throughFrom: relateFrom.throughTo,
|
||||
throughTo: relateFrom.throughFrom,
|
||||
|
@ -226,9 +277,56 @@
|
|||
toRelationship = relateTo
|
||||
}
|
||||
|
||||
// save the relationship on to the datasource
|
||||
function relationshipExists() {
|
||||
if (
|
||||
originalFromTable &&
|
||||
originalToTable &&
|
||||
originalFromTable === fromTable &&
|
||||
originalToTable === toTable
|
||||
) {
|
||||
return false
|
||||
}
|
||||
let fromThroughLinks = Object.values(
|
||||
datasource.entities[fromTable.name].schema
|
||||
).filter(value => value.through)
|
||||
let toThroughLinks = Object.values(
|
||||
datasource.entities[toTable.name].schema
|
||||
).filter(value => value.through)
|
||||
|
||||
const matchAgainstUserInput = (fromTableId, toTableId) =>
|
||||
(fromTableId === fromId && toTableId === toId) ||
|
||||
(fromTableId === toId && toTableId === fromId)
|
||||
|
||||
return !!fromThroughLinks.find(from =>
|
||||
toThroughLinks.find(
|
||||
to =>
|
||||
from.through === to.through &&
|
||||
matchAgainstUserInput(from.tableId, to.tableId)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
function removeExistingRelationship() {
|
||||
if (originalFromTable && originalFromColumnName) {
|
||||
delete datasource.entities[originalFromTable.name].schema[
|
||||
originalToColumnName
|
||||
]
|
||||
}
|
||||
if (originalToTable && originalToColumnName) {
|
||||
delete datasource.entities[originalToTable.name].schema[
|
||||
originalFromColumnName
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
async function saveRelationship() {
|
||||
hasClickedSave = true
|
||||
if (!validate()) {
|
||||
return false
|
||||
}
|
||||
buildRelationships()
|
||||
removeExistingRelationship()
|
||||
|
||||
// source of relationship
|
||||
datasource.entities[fromTable.name].schema[fromRelationship.name] =
|
||||
fromRelationship
|
||||
|
@ -236,43 +334,14 @@
|
|||
datasource.entities[toTable.name].schema[toRelationship.name] =
|
||||
toRelationship
|
||||
|
||||
// If relationship has been renamed
|
||||
if (originalFromName !== fromRelationship.name) {
|
||||
delete datasource.entities[fromTable.name].schema[originalFromName]
|
||||
}
|
||||
if (originalToName !== toRelationship.name) {
|
||||
delete datasource.entities[toTable.name].schema[originalToName]
|
||||
}
|
||||
|
||||
// store the original names so it won't cause an error
|
||||
originalToName = toRelationship.name
|
||||
originalFromName = fromRelationship.name
|
||||
await save()
|
||||
}
|
||||
|
||||
async function deleteRelationship() {
|
||||
delete datasource.entities[fromTable.name].schema[fromRelationship.name]
|
||||
delete datasource.entities[toTable.name].schema[toRelationship.name]
|
||||
removeExistingRelationship()
|
||||
await save()
|
||||
await tables.fetch()
|
||||
close()
|
||||
}
|
||||
|
||||
function tableChanged(fromTbl, toTbl) {
|
||||
if (
|
||||
(currentTables?.from?._id === fromTbl?._id &&
|
||||
currentTables?.to?._id === toTbl?._id) ||
|
||||
originalFromName ||
|
||||
originalToName
|
||||
) {
|
||||
return
|
||||
}
|
||||
fromRelationship.name = toTbl?.name || ""
|
||||
errors.fromCol = ""
|
||||
toRelationship.name = fromTbl?.name || ""
|
||||
errors.toCol = ""
|
||||
currentTables = { from: fromTbl, to: toTbl }
|
||||
}
|
||||
</script>
|
||||
|
||||
<ModalContent
|
||||
|
@ -284,7 +353,9 @@
|
|||
<Select
|
||||
label="Relationship type"
|
||||
options={relationshipTypes}
|
||||
bind:value={fromRelationship.relationshipType}
|
||||
bind:value={relationshipType}
|
||||
bind:error={errors.relationshipType}
|
||||
on:change={() => (errors.relationshipType = null)}
|
||||
/>
|
||||
<div class="headings">
|
||||
<Detail>Tables</Detail>
|
||||
|
@ -292,58 +363,89 @@
|
|||
<Select
|
||||
label="Select from table"
|
||||
options={tableOptions}
|
||||
disabled={!!selectedFromTable}
|
||||
on:change={() => ($touched.from = true)}
|
||||
bind:error={errors.from}
|
||||
bind:value={toRelationship.tableId}
|
||||
bind:value={fromId}
|
||||
bind:error={errors.fromTable}
|
||||
on:change={e => {
|
||||
fromColumn = tableOptions.find(opt => opt.value === e.detail)?.label || ""
|
||||
if (errors.fromTable === relationshipAlreadyExists) {
|
||||
errors.toColumn = null
|
||||
}
|
||||
errors.fromTable = null
|
||||
errors.fromColumn = null
|
||||
errors.toTable = null
|
||||
errors.throughTable = null
|
||||
}}
|
||||
/>
|
||||
{#if isManyToOne && fromTable}
|
||||
<Select
|
||||
label={`Primary Key (${fromTable?.name})`}
|
||||
options={Object.keys(fromTable?.schema)}
|
||||
on:change={() => ($touched.primary = true)}
|
||||
bind:error={errors.primary}
|
||||
label={`Primary Key (${fromTable.name})`}
|
||||
options={Object.keys(fromTable.schema)}
|
||||
bind:value={fromPrimary}
|
||||
bind:error={errors.fromPrimary}
|
||||
on:change={() => (errors.fromPrimary = null)}
|
||||
/>
|
||||
{/if}
|
||||
<Select
|
||||
label={"Select to table"}
|
||||
options={tableOptions}
|
||||
on:change={() => ($touched.to = true)}
|
||||
bind:error={errors.to}
|
||||
bind:value={fromRelationship.tableId}
|
||||
bind:value={toId}
|
||||
bind:error={errors.toTable}
|
||||
on:change={e => {
|
||||
toColumn = tableOptions.find(opt => opt.value === e.detail)?.label || ""
|
||||
if (errors.toTable === relationshipAlreadyExists) {
|
||||
errors.fromColumn = null
|
||||
}
|
||||
errors.toTable = null
|
||||
errors.toColumn = null
|
||||
errors.fromTable = null
|
||||
errors.throughTable = null
|
||||
}}
|
||||
/>
|
||||
{#if isManyToMany}
|
||||
<Select
|
||||
label={"Through"}
|
||||
options={tableOptions}
|
||||
on:change={() => ($touched.through = true)}
|
||||
bind:error={errors.through}
|
||||
bind:value={fromRelationship.through}
|
||||
bind:value={throughId}
|
||||
bind:error={errors.throughTable}
|
||||
on:change={() => {
|
||||
errors.fromTable = null
|
||||
errors.toTable = null
|
||||
errors.throughTable = null
|
||||
}}
|
||||
/>
|
||||
{#if fromTable && toTable && through}
|
||||
{#if fromTable && toTable && throughTable}
|
||||
<Select
|
||||
label={`Foreign Key (${fromTable?.name})`}
|
||||
options={Object.keys(through?.schema)}
|
||||
on:change={() => ($touched.fromForeign = true)}
|
||||
bind:error={errors.fromForeign}
|
||||
bind:value={fromRelationship.throughTo}
|
||||
options={Object.keys(throughTable?.schema)}
|
||||
bind:value={throughToKey}
|
||||
bind:error={errors.throughToKey}
|
||||
on:change={e => {
|
||||
if (throughFromKey === e.detail) {
|
||||
throughFromKey = null
|
||||
}
|
||||
errors.throughToKey = null
|
||||
}}
|
||||
/>
|
||||
<Select
|
||||
label={`Foreign Key (${toTable?.name})`}
|
||||
options={Object.keys(through?.schema)}
|
||||
on:change={() => ($touched.toForeign = true)}
|
||||
bind:error={errors.toForeign}
|
||||
bind:value={fromRelationship.throughFrom}
|
||||
options={Object.keys(throughTable?.schema)}
|
||||
bind:value={throughFromKey}
|
||||
bind:error={errors.throughFromKey}
|
||||
on:change={e => {
|
||||
if (throughToKey === e.detail) {
|
||||
throughToKey = null
|
||||
}
|
||||
errors.throughFromKey = null
|
||||
}}
|
||||
/>
|
||||
{/if}
|
||||
{:else if isManyToOne && toTable}
|
||||
<Select
|
||||
label={`Foreign Key (${toTable?.name})`}
|
||||
options={Object.keys(toTable?.schema)}
|
||||
on:change={() => ($touched.foreign = true)}
|
||||
bind:error={errors.foreign}
|
||||
bind:value={fromRelationship.fieldName}
|
||||
bind:value={fromForeign}
|
||||
bind:error={errors.fromForeign}
|
||||
on:change={() => (errors.fromForeign = null)}
|
||||
/>
|
||||
{/if}
|
||||
<div class="headings">
|
||||
|
@ -354,19 +456,21 @@
|
|||
provide a name for these columns.
|
||||
</Body>
|
||||
<Input
|
||||
on:blur={() => ($touched.fromCol = true)}
|
||||
bind:error={errors.fromCol}
|
||||
label="From table column"
|
||||
bind:value={fromRelationship.name}
|
||||
bind:value={fromColumn}
|
||||
bind:error={errors.fromColumn}
|
||||
on:change={e => {
|
||||
errors.fromColumn = e.detail?.length > 0 ? null : colNotSet
|
||||
}}
|
||||
/>
|
||||
<Input
|
||||
on:blur={() => ($touched.toCol = true)}
|
||||
bind:error={errors.toCol}
|
||||
label="To table column"
|
||||
bind:value={toRelationship.name}
|
||||
bind:value={toColumn}
|
||||
bind:error={errors.toColumn}
|
||||
on:change={e => (errors.toColumn = e.detail?.length > 0 ? null : colNotSet)}
|
||||
/>
|
||||
<div slot="footer">
|
||||
{#if originalFromName != null}
|
||||
{#if originalFromColumnName != null}
|
||||
<Button warning text on:click={deleteRelationship}>Delete</Button>
|
||||
{/if}
|
||||
</div>
|
||||
|
|
|
@ -70,7 +70,10 @@
|
|||
type: "provider",
|
||||
}))
|
||||
$: links = bindings
|
||||
// Get only link bindings
|
||||
.filter(x => x.fieldSchema?.type === "link")
|
||||
// Filter out bindings provided by forms
|
||||
.filter(x => !x.component?.endsWith("/form"))
|
||||
.map(binding => {
|
||||
const { providerId, readableBinding, fieldSchema } = binding || {}
|
||||
const { name, tableId } = fieldSchema || {}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</script>
|
||||
|
||||
<a on:click href={url} class:active>
|
||||
{text}
|
||||
{text || ""}
|
||||
</a>
|
||||
|
||||
<style>
|
||||
|
|
|
@ -176,7 +176,6 @@
|
|||
const addComponent = async component => {
|
||||
try {
|
||||
await store.actions.components.create(component)
|
||||
$goto("../")
|
||||
} catch (error) {
|
||||
notifications.error(error || "Error creating component")
|
||||
}
|
||||
|
|
|
@ -7,9 +7,10 @@
|
|||
{#if $admin.cloud && $auth?.user?.accountPortalAccess}
|
||||
<Button
|
||||
cta
|
||||
size="S"
|
||||
on:click
|
||||
on:click={() => {
|
||||
$goto($admin.accountPortalUrl + "/portal/upgrade")
|
||||
window.open($admin.accountPortalUrl + "/portal/upgrade", "_blank")
|
||||
}}
|
||||
>
|
||||
Upgrade
|
||||
|
|
|
@ -26,9 +26,6 @@
|
|||
<Avatar size="M" initials={$auth.initials} url={$auth.user.pictureUrl} />
|
||||
<Icon size="XL" name="ChevronDown" />
|
||||
</div>
|
||||
<MenuItem icon="Moon" on:click={() => themeModal.show()} dataCy="theme">
|
||||
Theme
|
||||
</MenuItem>
|
||||
<MenuItem
|
||||
icon="UserEdit"
|
||||
on:click={() => profileModal.show()}
|
||||
|
@ -36,6 +33,9 @@
|
|||
>
|
||||
My profile
|
||||
</MenuItem>
|
||||
<MenuItem icon="Moon" on:click={() => themeModal.show()} dataCy="theme">
|
||||
Theme
|
||||
</MenuItem>
|
||||
<MenuItem icon="LockClosed" on:click={() => updatePasswordModal.show()}>
|
||||
Update password
|
||||
</MenuItem>
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
/* Customise tabs appearance*/
|
||||
.nav :global(.spectrum-Tabs) {
|
||||
margin-bottom: -2px;
|
||||
padding: 7px 0;
|
||||
padding: 5px 0;
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
.nav :global(.spectrum-Tabs-content) {
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
<script>
|
||||
import { isActive } from "@roxi/routify"
|
||||
import { goto, isActive } from "@roxi/routify"
|
||||
import { Page } from "@budibase/bbui"
|
||||
import { Content, SideNav, SideNavItem } from "components/portal/page"
|
||||
import { menu } from "stores/portal"
|
||||
|
||||
$: pages = $menu.find(x => x.title === "Account").subPages
|
||||
$: pages = $menu.find(x => x.title === "Account")?.subPages || []
|
||||
$: !pages.length && $goto("../")
|
||||
</script>
|
||||
|
||||
<Page narrow>
|
||||
<Content>
|
||||
<Page>
|
||||
<Content narrow>
|
||||
<div slot="side-nav">
|
||||
<SideNav>
|
||||
{#each pages as { title, href }}
|
||||
|
|
|
@ -227,7 +227,7 @@
|
|||
{/each}
|
||||
<div class="title">
|
||||
<div class="welcome">
|
||||
<Layout noPadding gap="S">
|
||||
<Layout noPadding gap="XS">
|
||||
<Heading size="L">{welcomeHeader}</Heading>
|
||||
<Body size="M">
|
||||
Manage your apps and get a head start with templates
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
<script>
|
||||
import { isActive } from "@roxi/routify"
|
||||
import { goto, isActive } from "@roxi/routify"
|
||||
import { Page } from "@budibase/bbui"
|
||||
import { Content, SideNav, SideNavItem } from "components/portal/page"
|
||||
import { menu } from "stores/portal"
|
||||
|
||||
$: wide = $isActive("./email/:template")
|
||||
$: pages = $menu.find(x => x.title === "Settings").subPages
|
||||
$: pages = $menu.find(x => x.title === "Settings")?.subPages || []
|
||||
$: !pages.length && $goto("../")
|
||||
</script>
|
||||
|
||||
<Page>
|
||||
|
|
|
@ -172,6 +172,8 @@
|
|||
delete element.createdAt
|
||||
delete element.updatedAt
|
||||
|
||||
const { activated } = element.config
|
||||
|
||||
if (element.type === ConfigTypes.OIDC) {
|
||||
// Add a UUID here so each config is distinguishable when it arrives at the login page
|
||||
for (let config of element.config.configs) {
|
||||
|
@ -181,30 +183,26 @@
|
|||
// Callback urls shouldn't be included
|
||||
delete config.callbackURL
|
||||
}
|
||||
if (partialOidc) {
|
||||
if (!oidcComplete) {
|
||||
notifications.error(
|
||||
`Please fill in all required ${ConfigTypes.OIDC} fields`
|
||||
)
|
||||
} else {
|
||||
calls.push(API.saveConfig(element))
|
||||
// Turn the save button grey when clicked
|
||||
oidcSaveButtonDisabled = true
|
||||
originalOidcDoc = cloneDeep(providers.oidc)
|
||||
}
|
||||
if ((partialOidc || activated) && !oidcComplete) {
|
||||
notifications.error(
|
||||
`Please fill in all required ${ConfigTypes.OIDC} fields`
|
||||
)
|
||||
} else if (oidcComplete || !activated) {
|
||||
calls.push(API.saveConfig(element))
|
||||
// Turn the save button grey when clicked
|
||||
oidcSaveButtonDisabled = true
|
||||
originalOidcDoc = cloneDeep(providers.oidc)
|
||||
}
|
||||
}
|
||||
if (element.type === ConfigTypes.Google) {
|
||||
if (partialGoogle) {
|
||||
if (!googleComplete) {
|
||||
notifications.error(
|
||||
`Please fill in all required ${ConfigTypes.Google} fields`
|
||||
)
|
||||
} else {
|
||||
calls.push(API.saveConfig(element))
|
||||
googleSaveButtonDisabled = true
|
||||
originalGoogleDoc = cloneDeep(providers.google)
|
||||
}
|
||||
if ((partialGoogle || activated) && !googleComplete) {
|
||||
notifications.error(
|
||||
`Please fill in all required ${ConfigTypes.Google} fields`
|
||||
)
|
||||
} else if (googleComplete || !activated) {
|
||||
calls.push(API.saveConfig(element))
|
||||
googleSaveButtonDisabled = true
|
||||
originalGoogleDoc = cloneDeep(providers.google)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
Divider,
|
||||
notifications,
|
||||
Label,
|
||||
Modal,
|
||||
ModalContent,
|
||||
} from "@budibase/bbui"
|
||||
import { API } from "api"
|
||||
import { auth, admin } from "stores/portal"
|
||||
|
@ -15,6 +17,11 @@
|
|||
|
||||
let version
|
||||
let loaded = false
|
||||
let githubVersion
|
||||
let githubPublishedDate
|
||||
let githubPublishedTime
|
||||
let needsUpdate = true
|
||||
let updateModal
|
||||
|
||||
// Only admins allowed here
|
||||
$: {
|
||||
|
@ -47,8 +54,37 @@
|
|||
}
|
||||
}
|
||||
|
||||
async function getLatestVersion() {
|
||||
try {
|
||||
//Check github API for the latest release
|
||||
const githubCheck = await fetch(
|
||||
"https://api.github.com/repos/Budibase/budibase/releases/latest"
|
||||
)
|
||||
const githubResponse = await githubCheck.json()
|
||||
|
||||
//Get tag and remove the v infront of the tage name e.g. v1.0.0 is 1.0.0
|
||||
githubVersion = githubResponse.tag_name.slice(1)
|
||||
|
||||
//Get the release date and output it in the local time format
|
||||
githubPublishedDate = new Date(githubResponse.published_at)
|
||||
githubPublishedTime = githubPublishedDate.toLocaleTimeString()
|
||||
githubPublishedDate = githubPublishedDate.toLocaleDateString()
|
||||
|
||||
//Does Budibase need to be updated?
|
||||
if (githubVersion === version) {
|
||||
needsUpdate = false
|
||||
} else {
|
||||
needsUpdate = true
|
||||
}
|
||||
} catch (error) {
|
||||
notifications.error("Error getting the latest Budibase version")
|
||||
githubVersion = null
|
||||
}
|
||||
}
|
||||
|
||||
onMount(async () => {
|
||||
await getVersion()
|
||||
await getLatestVersion()
|
||||
loaded = true
|
||||
})
|
||||
</script>
|
||||
|
@ -69,9 +105,32 @@
|
|||
<Heading size="S">
|
||||
{version || "-"}
|
||||
</Heading>
|
||||
<Divider />
|
||||
<Label size="L">Latest version</Label>
|
||||
<Heading size="S">
|
||||
{githubVersion}
|
||||
</Heading>
|
||||
<Label size="L"
|
||||
>This version was released on {githubPublishedDate} at {githubPublishedTime}</Label
|
||||
>
|
||||
</Layout>
|
||||
<Divider />
|
||||
<div>
|
||||
<Button cta on:click={updateBudibase}>Check for updates</Button>
|
||||
<Button cta on:click={updateModal.show} disabled={!needsUpdate}
|
||||
>Update Budibase</Button
|
||||
>
|
||||
<Modal bind:this={updateModal}>
|
||||
<ModalContent
|
||||
title="Update Budibase"
|
||||
confirmText="Update"
|
||||
onConfirm={updateBudibase}
|
||||
>
|
||||
<span
|
||||
>Are you sure you want to update your budibase installation to the
|
||||
latest version?</span
|
||||
>
|
||||
</ModalContent>
|
||||
</Modal>
|
||||
</div>
|
||||
{/if}
|
||||
</Layout>
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
<script>
|
||||
import { Page } from "@budibase/bbui"
|
||||
import { SideNav, SideNavItem, Content } from "components/portal/page"
|
||||
import { isActive } from "@roxi/routify"
|
||||
import { isActive, goto } from "@roxi/routify"
|
||||
import { menu } from "stores/portal"
|
||||
|
||||
$: wide = $isActive("./users/index") || $isActive("./groups/index")
|
||||
$: pages = $menu.find(x => x.title === "Users").subPages
|
||||
$: pages = $menu.find(x => x.title === "Users")?.subPages || []
|
||||
$: !pages.length && $goto("../")
|
||||
</script>
|
||||
|
||||
<Page>
|
||||
|
|
|
@ -1356,6 +1356,11 @@
|
|||
dependencies:
|
||||
"@sinonjs/commons" "^1.7.0"
|
||||
|
||||
"@spectrum-css/accordion@^3.0.24":
|
||||
version "3.0.24"
|
||||
resolved "https://registry.yarnpkg.com/@spectrum-css/accordion/-/accordion-3.0.24.tgz#f89066c120c57b0cfc9aba66d60c39fc1cf69f74"
|
||||
integrity sha512-jNOmUsxmiT3lRLButnN5KKHM94fd+87fjiF8L0c4uRNgJl6ZsBuxPXrM15lV4y1f8D2IACAw01/ZkGRAeaCOFA==
|
||||
|
||||
"@spectrum-css/page@^3.0.1":
|
||||
version "3.0.8"
|
||||
resolved "https://registry.yarnpkg.com/@spectrum-css/page/-/page-3.0.8.tgz#001efa9e4c10095df9b2b37cf7d7d6eb60140190"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/cli",
|
||||
"version": "2.2.12-alpha.21",
|
||||
"version": "2.2.12-alpha.41",
|
||||
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
||||
"main": "src/index.js",
|
||||
"bin": {
|
||||
|
@ -26,9 +26,9 @@
|
|||
"outputPath": "build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@budibase/backend-core": "2.2.12-alpha.21",
|
||||
"@budibase/string-templates": "2.2.12-alpha.21",
|
||||
"@budibase/types": "2.2.12-alpha.21",
|
||||
"@budibase/backend-core": "2.2.12-alpha.41",
|
||||
"@budibase/string-templates": "2.2.12-alpha.41",
|
||||
"@budibase/types": "2.2.12-alpha.41",
|
||||
"axios": "0.21.2",
|
||||
"chalk": "4.1.0",
|
||||
"cli-progress": "3.11.2",
|
||||
|
|
|
@ -4019,7 +4019,8 @@
|
|||
{
|
||||
"type": "filter",
|
||||
"label": "Filtering",
|
||||
"key": "filter"
|
||||
"key": "filter",
|
||||
"nested": true
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
|
@ -4535,7 +4536,8 @@
|
|||
{
|
||||
"type": "filter",
|
||||
"label": "Filtering",
|
||||
"key": "filter"
|
||||
"key": "filter",
|
||||
"nested": true
|
||||
},
|
||||
{
|
||||
"type": "searchfield",
|
||||
|
@ -4665,7 +4667,8 @@
|
|||
{
|
||||
"type": "filter",
|
||||
"label": "Filtering",
|
||||
"key": "filter"
|
||||
"key": "filter",
|
||||
"nested": true
|
||||
},
|
||||
{
|
||||
"type": "field/sortable",
|
||||
|
@ -4831,7 +4834,8 @@
|
|||
{
|
||||
"type": "filter",
|
||||
"label": "Filtering",
|
||||
"key": "filter"
|
||||
"key": "filter",
|
||||
"nested": true
|
||||
},
|
||||
{
|
||||
"type": "field/sortable",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/client",
|
||||
"version": "2.2.12-alpha.21",
|
||||
"version": "2.2.12-alpha.41",
|
||||
"license": "MPL-2.0",
|
||||
"module": "dist/budibase-client.js",
|
||||
"main": "dist/budibase-client.js",
|
||||
|
@ -19,9 +19,9 @@
|
|||
"dev:builder": "rollup -cw"
|
||||
},
|
||||
"dependencies": {
|
||||
"@budibase/bbui": "2.2.12-alpha.21",
|
||||
"@budibase/frontend-core": "2.2.12-alpha.21",
|
||||
"@budibase/string-templates": "2.2.12-alpha.21",
|
||||
"@budibase/bbui": "2.2.12-alpha.41",
|
||||
"@budibase/frontend-core": "2.2.12-alpha.41",
|
||||
"@budibase/string-templates": "2.2.12-alpha.41",
|
||||
"@spectrum-css/button": "^3.0.3",
|
||||
"@spectrum-css/card": "^3.0.3",
|
||||
"@spectrum-css/divider": "^1.0.3",
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
...$component.styles?.normal,
|
||||
},
|
||||
custom:
|
||||
definition._styles?.custom || "" + $component.styles?.custom || "",
|
||||
(definition._styles?.custom || "") + ($component.styles?.custom || ""),
|
||||
}
|
||||
|
||||
// Create component tree
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<script>
|
||||
import { themeStore } from "stores"
|
||||
import { setContext } from "svelte"
|
||||
import { Context } from "@budibase/bbui"
|
||||
|
||||
setContext(Context.PopoverRoot, "#theme-root")
|
||||
</script>
|
||||
|
||||
<div style={$themeStore.customThemeCss} id="theme-root">
|
||||
|
|
|
@ -36,9 +36,12 @@
|
|||
let dataProviderId
|
||||
let repeaterId
|
||||
let schema
|
||||
let enrichedSearchColumns
|
||||
|
||||
$: fetchSchema(dataSource)
|
||||
$: enrichedSearchColumns = enrichSearchColumns(searchColumns, schema)
|
||||
$: enrichSearchColumns(searchColumns, schema).then(
|
||||
val => (enrichedSearchColumns = val)
|
||||
)
|
||||
$: enrichedFilter = enrichFilter(filter, enrichedSearchColumns, formId)
|
||||
$: cardWidth = cardHorizontal ? 420 : 300
|
||||
$: fullCardURL = buildFullCardUrl(
|
||||
|
|
|
@ -36,9 +36,12 @@
|
|||
let newRowSidePanelId
|
||||
let schema
|
||||
let primaryDisplay
|
||||
let enrichedSearchColumns
|
||||
|
||||
$: fetchSchema(dataSource)
|
||||
$: enrichedSearchColumns = enrichSearchColumns(searchColumns, schema)
|
||||
$: enrichSearchColumns(searchColumns, schema).then(
|
||||
val => (enrichedSearchColumns = val)
|
||||
)
|
||||
$: enrichedFilter = enrichFilter(filter, enrichedSearchColumns, formId)
|
||||
$: editTitle = getEditTitle(detailsFormBlockId, primaryDisplay)
|
||||
$: normalFields = getNormalFields(schema)
|
||||
|
|
|
@ -24,6 +24,11 @@
|
|||
let table
|
||||
|
||||
$: fetchSchema(dataSource)
|
||||
$: schemaKey = generateSchemaKey(schema)
|
||||
$: initialValues = getInitialValues(actionType, dataSource, $context)
|
||||
$: resetKey = Helpers.hashString(
|
||||
schemaKey + JSON.stringify(initialValues) + disabled
|
||||
)
|
||||
|
||||
// Returns the closes data context which isn't a built in context
|
||||
const getInitialValues = (type, dataSource, context) => {
|
||||
|
@ -57,13 +62,17 @@
|
|||
schema = res || {}
|
||||
}
|
||||
|
||||
$: initialValues = getInitialValues(actionType, dataSource, $context)
|
||||
$: resetKey = Helpers.hashString(
|
||||
!!schema +
|
||||
JSON.stringify(initialValues) +
|
||||
JSON.stringify(dataSource) +
|
||||
disabled
|
||||
)
|
||||
// Generates a predictable string that uniquely identifies a schema. We can't
|
||||
// simply stringify the whole schema as there are array fields which have
|
||||
// random order.
|
||||
const generateSchemaKey = schema => {
|
||||
if (!schema) {
|
||||
return null
|
||||
}
|
||||
const fields = Object.keys(schema)
|
||||
fields.sort()
|
||||
return fields.map(field => `${field}:${schema[field].type}`).join("-")
|
||||
}
|
||||
</script>
|
||||
|
||||
{#key resetKey}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { makePropSafe as safe } from "@budibase/string-templates"
|
||||
import { API } from "../api/index.js"
|
||||
|
||||
// Map of data types to component types for search fields inside blocks
|
||||
const schemaComponentMap = {
|
||||
|
@ -15,10 +16,28 @@ const schemaComponentMap = {
|
|||
* @param searchColumns the search columns to use
|
||||
* @param schema the datasource schema
|
||||
*/
|
||||
export const enrichSearchColumns = (searchColumns, schema) => {
|
||||
export const enrichSearchColumns = async (searchColumns, schema) => {
|
||||
if (!searchColumns?.length || !schema) {
|
||||
return []
|
||||
}
|
||||
let enrichedColumns = []
|
||||
searchColumns?.forEach(column => {
|
||||
const schemaType = schema?.[column]?.type
|
||||
for (let column of searchColumns) {
|
||||
let schemaType = schema[column]?.type
|
||||
|
||||
// Check if this is a field in another related table. The only way we can
|
||||
// check this is checking for a "." inside the column, then checking if we
|
||||
// have a link field named the same as that field prefix.
|
||||
if (column.includes(".")) {
|
||||
const split = column.split(".")
|
||||
const sourceField = split[0]
|
||||
const linkField = split.slice(1).join(".")
|
||||
const linkSchema = schema[sourceField]
|
||||
if (linkSchema?.type === "link") {
|
||||
const linkedDef = await API.fetchTableDefinition(linkSchema.tableId)
|
||||
schemaType = linkedDef?.schema?.[linkField]?.type
|
||||
}
|
||||
}
|
||||
|
||||
const componentType = schemaComponentMap[schemaType]
|
||||
if (componentType) {
|
||||
enrichedColumns.push({
|
||||
|
@ -27,7 +46,7 @@ export const enrichSearchColumns = (searchColumns, schema) => {
|
|||
type: schemaType,
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
return enrichedColumns.slice(0, 5)
|
||||
}
|
||||
|
||||
|
@ -57,12 +76,14 @@ export const enrichFilter = (filter, columns, formId) => {
|
|||
value: `{{ ${binding} }}`,
|
||||
})
|
||||
const format = "YYYY-MM-DDTHH:mm:ss.SSSZ"
|
||||
let hbs = `{{ date (add (date ${binding} "x") 86399999) "${format}" }}`
|
||||
hbs = `{{#if ${binding} }}${hbs}{{/if}}`
|
||||
enrichedFilter.push({
|
||||
field: column.name,
|
||||
type: column.type,
|
||||
operator: "rangeHigh",
|
||||
valueType: "Binding",
|
||||
value: `{{ date (add (date ${binding} "x") 86399999) "${format}" }}`,
|
||||
value: hbs,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@budibase/frontend-core",
|
||||
"version": "2.2.12-alpha.21",
|
||||
"version": "2.2.12-alpha.41",
|
||||
"description": "Budibase frontend core libraries used in builder and client",
|
||||
"author": "Budibase",
|
||||
"license": "MPL-2.0",
|
||||
"svelte": "src/index.js",
|
||||
"dependencies": {
|
||||
"@budibase/bbui": "2.2.12-alpha.21",
|
||||
"@budibase/bbui": "2.2.12-alpha.41",
|
||||
"lodash": "^4.17.21",
|
||||
"svelte": "^3.46.2"
|
||||
}
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
<div class="split-page">
|
||||
<div class="left">
|
||||
<div class="content">
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<slot name="right" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.split-page {
|
||||
height: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: max(50%, 380px) 1fr;
|
||||
justify-content: stretch;
|
||||
overflow: hidden;
|
||||
}
|
||||
.left {
|
||||
background: var(--background);
|
||||
display: grid;
|
||||
place-items: center;
|
||||
padding: 40px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.right {
|
||||
background: linear-gradient(
|
||||
to bottom right,
|
||||
var(--spectrum-global-color-gray-300) 0%,
|
||||
var(--background) 100%
|
||||
);
|
||||
}
|
||||
.content {
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
@media (max-width: 740px) {
|
||||
.split-page {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
.left {
|
||||
padding: 20px;
|
||||
}
|
||||
.right {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,63 @@
|
|||
<script>
|
||||
import SplitPage from "./SplitPage.svelte"
|
||||
import { Layout } from "@budibase/bbui"
|
||||
</script>
|
||||
|
||||
<SplitPage>
|
||||
<slot />
|
||||
<div class="wrapper" slot="right">
|
||||
<div class="testimonial">
|
||||
<Layout noPadding gap="S">
|
||||
<div class="text">
|
||||
"Here is an example of how Budibase changed my life for the better and
|
||||
now all I do is eat, sleep, build apps, repeat."
|
||||
</div>
|
||||
<div class="user">
|
||||
<img
|
||||
alt="a-happy-budibase-user"
|
||||
src="https://icon-library.com/images/male-user-icon/male-user-icon-24.jpg"
|
||||
/>
|
||||
<div class="author">
|
||||
<div class="name">No-code Enthusiast</div>
|
||||
<div class="company">Bedroom TLD</div>
|
||||
</div>
|
||||
</div>
|
||||
</Layout>
|
||||
</div>
|
||||
</div>
|
||||
</SplitPage>
|
||||
|
||||
<style>
|
||||
.wrapper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
}
|
||||
.testimonial {
|
||||
width: 280px;
|
||||
padding: 40px;
|
||||
}
|
||||
.text {
|
||||
font-size: var(--font-size-l);
|
||||
font-style: italic;
|
||||
}
|
||||
img {
|
||||
width: 40px;
|
||||
}
|
||||
.user {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
gap: var(--spacing-s);
|
||||
}
|
||||
.name {
|
||||
font-weight: bold;
|
||||
color: var(--spectrum-global-color-gray-900);
|
||||
font-size: var(--font-size-l);
|
||||
}
|
||||
.company {
|
||||
color: var(--spectrum-global-color-gray-700);
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,2 @@
|
|||
export { default as SplitPage } from "./SplitPage.svelte"
|
||||
export { default as TestimonialPage } from "./TestimonialPage.svelte"
|
|
@ -3,3 +3,4 @@ export { fetchData } from "./fetch/fetchData"
|
|||
export * as Constants from "./constants"
|
||||
export * from "./stores"
|
||||
export * from "./utils"
|
||||
export * from "./components"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/sdk",
|
||||
"version": "2.2.12-alpha.21",
|
||||
"version": "2.2.12-alpha.41",
|
||||
"description": "Budibase Public API SDK",
|
||||
"author": "Budibase",
|
||||
"license": "MPL-2.0",
|
||||
|
|
|
@ -225,9 +225,9 @@ concat-map@0.0.1:
|
|||
integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==
|
||||
|
||||
cookiejar@^2.1.2:
|
||||
version "2.1.3"
|
||||
resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.3.tgz#fc7a6216e408e74414b90230050842dacda75acc"
|
||||
integrity sha512-JxbCBUdrfr6AQjOXrxoTvAMJO4HBTUIlBzslcJPAz+/KT8yk53fXun51u+RenNYvad/+Vc2DIz5o9UxlCDymFQ==
|
||||
version "2.1.4"
|
||||
resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.4.tgz#ee669c1fea2cf42dc31585469d193fef0d65771b"
|
||||
integrity sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==
|
||||
|
||||
debug@^4.1.1:
|
||||
version "4.3.4"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@budibase/server",
|
||||
"email": "hi@budibase.com",
|
||||
"version": "2.2.12-alpha.21",
|
||||
"version": "2.2.12-alpha.41",
|
||||
"description": "Budibase Web Server",
|
||||
"main": "src/index.ts",
|
||||
"repository": {
|
||||
|
@ -43,11 +43,11 @@
|
|||
"license": "GPL-3.0",
|
||||
"dependencies": {
|
||||
"@apidevtools/swagger-parser": "10.0.3",
|
||||
"@budibase/backend-core": "2.2.12-alpha.21",
|
||||
"@budibase/client": "2.2.12-alpha.21",
|
||||
"@budibase/pro": "2.2.12-alpha.21",
|
||||
"@budibase/string-templates": "2.2.12-alpha.21",
|
||||
"@budibase/types": "2.2.12-alpha.21",
|
||||
"@budibase/backend-core": "2.2.12-alpha.41",
|
||||
"@budibase/client": "2.2.12-alpha.41",
|
||||
"@budibase/pro": "2.2.12-alpha.41",
|
||||
"@budibase/string-templates": "2.2.12-alpha.41",
|
||||
"@budibase/types": "2.2.12-alpha.41",
|
||||
"@bull-board/api": "3.7.0",
|
||||
"@bull-board/koa": "3.9.4",
|
||||
"@elastic/elasticsearch": "7.10.0",
|
||||
|
@ -77,7 +77,7 @@
|
|||
"joi": "17.6.0",
|
||||
"js-yaml": "4.1.0",
|
||||
"jsonschema": "1.4.0",
|
||||
"knex": "0.95.15",
|
||||
"knex": "2.4.0",
|
||||
"koa": "2.13.4",
|
||||
"koa-body": "4.2.0",
|
||||
"koa-compress": "4.0.1",
|
||||
|
|
|
@ -681,6 +681,12 @@ export class ExternalRequest {
|
|||
config,
|
||||
table
|
||||
)
|
||||
//if the sort column is a formula, remove it
|
||||
for (let sortColumn of Object.keys(sort || {})) {
|
||||
if (table.schema[sortColumn]?.type === "formula") {
|
||||
delete sort?.[sortColumn]
|
||||
}
|
||||
}
|
||||
filters = buildFilters(id, filters || {}, table)
|
||||
const relationships = this.buildRelationships(table)
|
||||
// clean up row on ingress using schema
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
import * as automation from "../index"
|
||||
import * as triggers from "../triggers"
|
||||
import { loopAutomation } from "../../tests/utilities/structures"
|
||||
import { context } from "@budibase/backend-core"
|
||||
import * as setup from "./utilities"
|
||||
|
||||
describe("Attempt to run a basic loop automation", () => {
|
||||
let config = setup.getConfig(),
|
||||
table: any,
|
||||
row: any
|
||||
|
||||
beforeEach(async () => {
|
||||
await automation.init()
|
||||
await config.init()
|
||||
table = await config.createTable()
|
||||
row = await config.createRow()
|
||||
})
|
||||
|
||||
afterAll(setup.afterAll)
|
||||
|
||||
async function runLoop(loopOpts?: any) {
|
||||
const appId = config.getAppId()
|
||||
return await context.doInAppContext(appId, async () => {
|
||||
const params = { fields: { appId } }
|
||||
return await triggers.externalTrigger(
|
||||
loopAutomation(table._id, loopOpts),
|
||||
params,
|
||||
{ getResponses: true }
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
it("attempt to run a basic loop", async () => {
|
||||
const resp = await runLoop()
|
||||
expect(resp.steps[2].outputs.iterations).toBe(1)
|
||||
})
|
||||
|
||||
it("test a loop with a string", async () => {
|
||||
const resp = await runLoop({
|
||||
type: "String",
|
||||
binding: "a,b,c",
|
||||
})
|
||||
expect(resp.steps[2].outputs.iterations).toBe(3)
|
||||
})
|
||||
})
|
|
@ -109,8 +109,13 @@ export async function externalTrigger(
|
|||
}
|
||||
params.fields = coercedFields
|
||||
}
|
||||
const data = { automation, event: params }
|
||||
const data: Record<string, any> = { automation, event: params }
|
||||
if (getResponses) {
|
||||
data.event = {
|
||||
...data.event,
|
||||
appId: context.getAppId(),
|
||||
automation,
|
||||
}
|
||||
return utils.processEvent({ data })
|
||||
} else {
|
||||
return automationQueue.add(data, JOB_OPTS)
|
||||
|
|
|
@ -12,11 +12,16 @@ import {
|
|||
FindOneAndUpdateOptions,
|
||||
UpdateOptions,
|
||||
OperationOptions,
|
||||
MongoClientOptions,
|
||||
} from "mongodb"
|
||||
import environment from "../environment"
|
||||
|
||||
interface MongoDBConfig {
|
||||
connectionString: string
|
||||
db: string
|
||||
tlsCertificateFile: string
|
||||
tlsCertificateKeyFile: string
|
||||
tlsCAFile: string
|
||||
}
|
||||
|
||||
interface MongoDBQuery {
|
||||
|
@ -26,292 +31,331 @@ interface MongoDBQuery {
|
|||
}
|
||||
}
|
||||
|
||||
const SCHEMA: Integration = {
|
||||
docs: "https://github.com/mongodb/node-mongodb-native",
|
||||
friendlyName: "MongoDB",
|
||||
type: "Non-relational",
|
||||
description:
|
||||
"MongoDB is a general purpose, document-based, distributed database built for modern application developers and for the cloud era.",
|
||||
datasource: {
|
||||
connectionString: {
|
||||
type: DatasourceFieldType.STRING,
|
||||
required: true,
|
||||
default: "mongodb://localhost:27017",
|
||||
},
|
||||
db: {
|
||||
type: DatasourceFieldType.STRING,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
query: {
|
||||
create: {
|
||||
type: QueryType.JSON,
|
||||
},
|
||||
read: {
|
||||
type: QueryType.JSON,
|
||||
},
|
||||
update: {
|
||||
type: QueryType.JSON,
|
||||
},
|
||||
delete: {
|
||||
type: QueryType.JSON,
|
||||
},
|
||||
aggregate: {
|
||||
type: QueryType.JSON,
|
||||
readable: true,
|
||||
steps: [
|
||||
{
|
||||
key: "$addFields",
|
||||
template: "{\n\t\n}",
|
||||
},
|
||||
{
|
||||
key: "$bucket",
|
||||
template: `{
|
||||
"groupBy": "",
|
||||
"boundaries": [],
|
||||
"default": "",
|
||||
"output": {}
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$bucketAuto",
|
||||
template: `{
|
||||
"groupBy": "",
|
||||
"buckets": 1,
|
||||
"output": {},
|
||||
"granularity": "R5"
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$changeStream",
|
||||
template: `{
|
||||
"allChangesForCluster": true,
|
||||
"fullDocument": "",
|
||||
"fullDocumentBeforeChange": "",
|
||||
"resumeAfter": 1,
|
||||
"showExpandedEvents": true,
|
||||
"startAfter": {},
|
||||
"startAtOperationTime": ""
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$collStats",
|
||||
template: `{
|
||||
"latencyStats": { "histograms": true } },
|
||||
"storageStats": { "scale": 1 } },
|
||||
"count": {},
|
||||
"queryExecStats": {}
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$count",
|
||||
template: ``,
|
||||
},
|
||||
{
|
||||
key: "$densify",
|
||||
template: `{
|
||||
"field": "",
|
||||
"partitionByFields": [],
|
||||
"range": {
|
||||
"step": 1,
|
||||
"unit": 1,
|
||||
"bounds": "full"
|
||||
}
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$documents",
|
||||
template: `[]`,
|
||||
},
|
||||
{
|
||||
key: "$facet",
|
||||
template: `{\n\t\n}`,
|
||||
},
|
||||
{
|
||||
key: "$fill",
|
||||
template: `{
|
||||
"partitionBy": "",
|
||||
"partitionByFields": [],
|
||||
"sortBy": {},
|
||||
"output": {}
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$geoNear",
|
||||
template: `{
|
||||
"near": {
|
||||
"type": "Point",
|
||||
"coordinates": [
|
||||
-73.98142, 40.71782
|
||||
]
|
||||
},
|
||||
"key": "location",
|
||||
"distanceField": "dist.calculated",
|
||||
"query": { "category": "Parks" }
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$graphLookup",
|
||||
template: `{
|
||||
"from": "",
|
||||
"startWith": "",
|
||||
"connectFromField": "",
|
||||
"connectToField": "",
|
||||
"as": "",
|
||||
"maxDepth": 1,
|
||||
"depthField": "",
|
||||
"restrictSearchWithMatch": {}
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$group",
|
||||
template: `{
|
||||
"_id": ""
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$indexStats",
|
||||
template: "{\n\t\n}",
|
||||
},
|
||||
{
|
||||
key: "$limit",
|
||||
template: `1`,
|
||||
},
|
||||
{
|
||||
key: "$listLocalSessions",
|
||||
template: `{\n\t\n}`,
|
||||
},
|
||||
{
|
||||
key: "$listSessions",
|
||||
template: `{\n\t\n}`,
|
||||
},
|
||||
{
|
||||
key: "$lookup",
|
||||
template: `{
|
||||
"from": "",
|
||||
"localField": "",
|
||||
"foreignField": "",
|
||||
"as": ""
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$match",
|
||||
template: "{\n\t\n}",
|
||||
},
|
||||
{
|
||||
key: "$merge",
|
||||
template: `{
|
||||
"into": {},
|
||||
"on": "_id",
|
||||
"whenMatched": "replace",
|
||||
"whenNotMatched": "insert"
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$out",
|
||||
template: `{
|
||||
"db": "",
|
||||
"coll": ""
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$planCacheStats",
|
||||
template: "{\n\t\n}",
|
||||
},
|
||||
{
|
||||
key: "$project",
|
||||
template: "{\n\t\n}",
|
||||
},
|
||||
{
|
||||
key: "$redact",
|
||||
template: "",
|
||||
},
|
||||
{
|
||||
key: "$replaceRoot",
|
||||
template: `{ "newRoot": "" }`,
|
||||
},
|
||||
{
|
||||
key: "$replaceWith",
|
||||
template: ``,
|
||||
},
|
||||
{
|
||||
key: "$sample",
|
||||
template: `{ "size": 3 }`,
|
||||
},
|
||||
{
|
||||
key: "$set",
|
||||
template: "{\n\t\n}",
|
||||
},
|
||||
{
|
||||
key: "$setWindowFields",
|
||||
template: `{
|
||||
"partitionBy": "",
|
||||
"sortBy": {},
|
||||
"output": {}
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$skip",
|
||||
template: `1`,
|
||||
},
|
||||
{
|
||||
key: "$sort",
|
||||
template: "{\n\t\n}",
|
||||
},
|
||||
{
|
||||
key: "$sortByCount",
|
||||
template: "",
|
||||
},
|
||||
{
|
||||
key: "$unionWith",
|
||||
template: `{
|
||||
"coll": "",
|
||||
"pipeline": []
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$unset",
|
||||
template: "",
|
||||
},
|
||||
{
|
||||
key: "$unwind",
|
||||
template: `{
|
||||
"path": "",
|
||||
"includeArrayIndex": "",
|
||||
"preserveNullAndEmptyArrays": true
|
||||
}`,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
extra: {
|
||||
collection: {
|
||||
displayName: "Collection",
|
||||
type: DatasourceFieldType.STRING,
|
||||
required: true,
|
||||
},
|
||||
actionType: {
|
||||
displayName: "Query Type",
|
||||
type: DatasourceFieldType.LIST,
|
||||
required: true,
|
||||
data: {
|
||||
read: ["find", "findOne", "findOneAndUpdate", "count", "distinct"],
|
||||
create: ["insertOne", "insertMany"],
|
||||
update: ["updateOne", "updateMany"],
|
||||
delete: ["deleteOne", "deleteMany"],
|
||||
aggregate: ["json", "pipeline"],
|
||||
const getSchema = () => {
|
||||
let schema = {
|
||||
docs: "https://github.com/mongodb/node-mongodb-native",
|
||||
friendlyName: "MongoDB",
|
||||
type: "Non-relational",
|
||||
description:
|
||||
"MongoDB is a general purpose, document-based, distributed database built for modern application developers and for the cloud era.",
|
||||
datasource: {
|
||||
connectionString: {
|
||||
type: DatasourceFieldType.STRING,
|
||||
required: true,
|
||||
default: "mongodb://localhost:27017",
|
||||
display: "Connection string",
|
||||
},
|
||||
db: {
|
||||
type: DatasourceFieldType.STRING,
|
||||
required: true,
|
||||
display: "DB",
|
||||
},
|
||||
},
|
||||
},
|
||||
query: {
|
||||
create: {
|
||||
type: QueryType.JSON,
|
||||
},
|
||||
read: {
|
||||
type: QueryType.JSON,
|
||||
},
|
||||
update: {
|
||||
type: QueryType.JSON,
|
||||
},
|
||||
delete: {
|
||||
type: QueryType.JSON,
|
||||
},
|
||||
aggregate: {
|
||||
type: QueryType.JSON,
|
||||
readable: true,
|
||||
steps: [
|
||||
{
|
||||
key: "$addFields",
|
||||
template: "{\n\t\n}",
|
||||
},
|
||||
{
|
||||
key: "$bucket",
|
||||
template: `{
|
||||
"groupBy": "",
|
||||
"boundaries": [],
|
||||
"default": "",
|
||||
"output": {}
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$bucketAuto",
|
||||
template: `{
|
||||
"groupBy": "",
|
||||
"buckets": 1,
|
||||
"output": {},
|
||||
"granularity": "R5"
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$changeStream",
|
||||
template: `{
|
||||
"allChangesForCluster": true,
|
||||
"fullDocument": "",
|
||||
"fullDocumentBeforeChange": "",
|
||||
"resumeAfter": 1,
|
||||
"showExpandedEvents": true,
|
||||
"startAfter": {},
|
||||
"startAtOperationTime": ""
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$collStats",
|
||||
template: `{
|
||||
"latencyStats": { "histograms": true } },
|
||||
"storageStats": { "scale": 1 } },
|
||||
"count": {},
|
||||
"queryExecStats": {}
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$count",
|
||||
template: ``,
|
||||
},
|
||||
{
|
||||
key: "$densify",
|
||||
template: `{
|
||||
"field": "",
|
||||
"partitionByFields": [],
|
||||
"range": {
|
||||
"step": 1,
|
||||
"unit": 1,
|
||||
"bounds": "full"
|
||||
}
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$documents",
|
||||
template: `[]`,
|
||||
},
|
||||
{
|
||||
key: "$facet",
|
||||
template: `{\n\t\n}`,
|
||||
},
|
||||
{
|
||||
key: "$fill",
|
||||
template: `{
|
||||
"partitionBy": "",
|
||||
"partitionByFields": [],
|
||||
"sortBy": {},
|
||||
"output": {}
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$geoNear",
|
||||
template: `{
|
||||
"near": {
|
||||
"type": "Point",
|
||||
"coordinates": [
|
||||
-73.98142, 40.71782
|
||||
]
|
||||
},
|
||||
"key": "location",
|
||||
"distanceField": "dist.calculated",
|
||||
"query": { "category": "Parks" }
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$graphLookup",
|
||||
template: `{
|
||||
"from": "",
|
||||
"startWith": "",
|
||||
"connectFromField": "",
|
||||
"connectToField": "",
|
||||
"as": "",
|
||||
"maxDepth": 1,
|
||||
"depthField": "",
|
||||
"restrictSearchWithMatch": {}
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$group",
|
||||
template: `{
|
||||
"_id": ""
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$indexStats",
|
||||
template: "{\n\t\n}",
|
||||
},
|
||||
{
|
||||
key: "$limit",
|
||||
template: `1`,
|
||||
},
|
||||
{
|
||||
key: "$listLocalSessions",
|
||||
template: `{\n\t\n}`,
|
||||
},
|
||||
{
|
||||
key: "$listSessions",
|
||||
template: `{\n\t\n}`,
|
||||
},
|
||||
{
|
||||
key: "$lookup",
|
||||
template: `{
|
||||
"from": "",
|
||||
"localField": "",
|
||||
"foreignField": "",
|
||||
"as": ""
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$match",
|
||||
template: "{\n\t\n}",
|
||||
},
|
||||
{
|
||||
key: "$merge",
|
||||
template: `{
|
||||
"into": {},
|
||||
"on": "_id",
|
||||
"whenMatched": "replace",
|
||||
"whenNotMatched": "insert"
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$out",
|
||||
template: `{
|
||||
"db": "",
|
||||
"coll": ""
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$planCacheStats",
|
||||
template: "{\n\t\n}",
|
||||
},
|
||||
{
|
||||
key: "$project",
|
||||
template: "{\n\t\n}",
|
||||
},
|
||||
{
|
||||
key: "$redact",
|
||||
template: "",
|
||||
},
|
||||
{
|
||||
key: "$replaceRoot",
|
||||
template: `{ "newRoot": "" }`,
|
||||
},
|
||||
{
|
||||
key: "$replaceWith",
|
||||
template: ``,
|
||||
},
|
||||
{
|
||||
key: "$sample",
|
||||
template: `{ "size": 3 }`,
|
||||
},
|
||||
{
|
||||
key: "$set",
|
||||
template: "{\n\t\n}",
|
||||
},
|
||||
{
|
||||
key: "$setWindowFields",
|
||||
template: `{
|
||||
"partitionBy": "",
|
||||
"sortBy": {},
|
||||
"output": {}
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$skip",
|
||||
template: `1`,
|
||||
},
|
||||
{
|
||||
key: "$sort",
|
||||
template: "{\n\t\n}",
|
||||
},
|
||||
{
|
||||
key: "$sortByCount",
|
||||
template: "",
|
||||
},
|
||||
{
|
||||
key: "$unionWith",
|
||||
template: `{
|
||||
"coll": "",
|
||||
"pipeline": []
|
||||
}`,
|
||||
},
|
||||
{
|
||||
key: "$unset",
|
||||
template: "",
|
||||
},
|
||||
{
|
||||
key: "$unwind",
|
||||
template: `{
|
||||
"path": "",
|
||||
"includeArrayIndex": "",
|
||||
"preserveNullAndEmptyArrays": true
|
||||
}`,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
extra: {
|
||||
collection: {
|
||||
displayName: "Collection",
|
||||
type: DatasourceFieldType.STRING,
|
||||
required: true,
|
||||
},
|
||||
actionType: {
|
||||
displayName: "Query Type",
|
||||
type: DatasourceFieldType.LIST,
|
||||
required: true,
|
||||
data: {
|
||||
read: ["find", "findOne", "findOneAndUpdate", "count", "distinct"],
|
||||
create: ["insertOne", "insertMany"],
|
||||
update: ["updateOne", "updateMany"],
|
||||
delete: ["deleteOne", "deleteMany"],
|
||||
aggregate: ["json", "pipeline"],
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
if (environment.SELF_HOSTED) {
|
||||
schema.datasource = {
|
||||
...schema.datasource,
|
||||
//@ts-ignore
|
||||
tls: {
|
||||
type: DatasourceFieldType.FIELD_GROUP,
|
||||
display: "Configure SSL",
|
||||
fields: {
|
||||
tlsCertificateFile: {
|
||||
type: DatasourceFieldType.STRING,
|
||||
required: false,
|
||||
display: "Certificate file path",
|
||||
},
|
||||
tlsCertificateKeyFile: {
|
||||
type: DatasourceFieldType.STRING,
|
||||
required: false,
|
||||
display: "Certificate Key file path",
|
||||
},
|
||||
tlsCAFile: {
|
||||
type: DatasourceFieldType.STRING,
|
||||
required: false,
|
||||
display: "CA file path",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
return schema
|
||||
}
|
||||
|
||||
const SCHEMA: Integration = getSchema()
|
||||
|
||||
class MongoIntegration implements IntegrationBase {
|
||||
private config: MongoDBConfig
|
||||
private client: any
|
||||
|
||||
constructor(config: MongoDBConfig) {
|
||||
this.config = config
|
||||
this.client = new MongoClient(config.connectionString)
|
||||
const options: MongoClientOptions = {
|
||||
tlsCertificateFile: config.tlsCertificateFile || undefined,
|
||||
tlsCertificateKeyFile: config.tlsCertificateKeyFile || undefined,
|
||||
tlsCAFile: config.tlsCAFile || undefined,
|
||||
}
|
||||
this.client = new MongoClient(config.connectionString, options)
|
||||
}
|
||||
|
||||
async connect() {
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
import { roles, permissions } from "@budibase/backend-core"
|
||||
import { permissions, roles } from "@budibase/backend-core"
|
||||
import { createHomeScreen } from "../../constants/screens"
|
||||
import { EMPTY_LAYOUT } from "../../constants/layouts"
|
||||
import { cloneDeep } from "lodash/fp"
|
||||
import { TRIGGER_DEFINITIONS, ACTION_DEFINITIONS } from "../../automations"
|
||||
import { ACTION_DEFINITIONS, TRIGGER_DEFINITIONS } from "../../automations"
|
||||
import {
|
||||
Automation,
|
||||
AutomationActionStepId,
|
||||
AutomationTriggerStepId,
|
||||
} from "@budibase/types"
|
||||
|
||||
const { v4: uuidv4 } = require("uuid")
|
||||
|
||||
export const TENANT_ID = "default"
|
||||
|
@ -116,6 +122,63 @@ export function basicAutomation() {
|
|||
}
|
||||
}
|
||||
|
||||
export function loopAutomation(tableId: string, loopOpts?: any): Automation {
|
||||
if (!loopOpts) {
|
||||
loopOpts = {
|
||||
option: "Array",
|
||||
binding: "{{ steps.1.rows }}",
|
||||
}
|
||||
}
|
||||
const automation: any = {
|
||||
name: "looping",
|
||||
type: "automation",
|
||||
definition: {
|
||||
steps: [
|
||||
{
|
||||
id: "b",
|
||||
type: "ACTION",
|
||||
stepId: AutomationActionStepId.QUERY_ROWS,
|
||||
internal: true,
|
||||
inputs: {
|
||||
tableId,
|
||||
},
|
||||
schema: ACTION_DEFINITIONS.QUERY_ROWS.schema,
|
||||
},
|
||||
{
|
||||
id: "c",
|
||||
type: "ACTION",
|
||||
stepId: AutomationActionStepId.LOOP,
|
||||
internal: true,
|
||||
inputs: loopOpts,
|
||||
blockToLoop: "d",
|
||||
schema: ACTION_DEFINITIONS.LOOP.schema,
|
||||
},
|
||||
{
|
||||
id: "d",
|
||||
type: "ACTION",
|
||||
internal: true,
|
||||
stepId: AutomationActionStepId.SERVER_LOG,
|
||||
inputs: {
|
||||
text: "log statement",
|
||||
},
|
||||
schema: ACTION_DEFINITIONS.SERVER_LOG.schema,
|
||||
},
|
||||
],
|
||||
trigger: {
|
||||
id: "a",
|
||||
type: "TRIGGER",
|
||||
event: "row:save",
|
||||
stepId: AutomationTriggerStepId.ROW_SAVED,
|
||||
inputs: {
|
||||
tableId,
|
||||
},
|
||||
schema: TRIGGER_DEFINITIONS.ROW_SAVED.schema,
|
||||
},
|
||||
},
|
||||
}
|
||||
return automation as Automation
|
||||
}
|
||||
|
||||
export function basicRow(tableId: string) {
|
||||
return {
|
||||
name: "Test Contact",
|
||||
|
|
|
@ -37,9 +37,13 @@ function getLoopIterations(loopStep: LoopStep, input: LoopInput) {
|
|||
if (!loopStep || !binding) {
|
||||
return 1
|
||||
}
|
||||
return Array.isArray(binding)
|
||||
? binding.length
|
||||
: automationUtils.stringSplit(binding).length
|
||||
if (Array.isArray(binding)) {
|
||||
return binding.length
|
||||
}
|
||||
if (typeof binding === "string") {
|
||||
return automationUtils.stringSplit(binding).length
|
||||
}
|
||||
return 1
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -282,13 +286,13 @@ class Orchestrator {
|
|||
break
|
||||
}
|
||||
|
||||
let item
|
||||
let item = []
|
||||
if (
|
||||
typeof loopStep.inputs.binding === "string" &&
|
||||
loopStep.inputs.option === "String"
|
||||
) {
|
||||
item = automationUtils.stringSplit(newInput.binding)
|
||||
} else {
|
||||
} else if (Array.isArray(loopStep.inputs.binding)) {
|
||||
item = loopStep.inputs.binding
|
||||
}
|
||||
this._context.steps[loopStepNumber] = {
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
}
|
||||
},
|
||||
"ts-node": {
|
||||
"require": ["tsconfig-paths/register"]
|
||||
"require": ["tsconfig-paths/register"],
|
||||
"swc": true
|
||||
},
|
||||
"references": [
|
||||
{ "path": "../types" },
|
||||
|
|
|
@ -1273,13 +1273,13 @@
|
|||
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||
|
||||
"@budibase/backend-core@2.2.12-alpha.21":
|
||||
version "2.2.12-alpha.21"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.2.12-alpha.21.tgz#99844f641cddb99ca6b6abd6a8af7d990e6b92e1"
|
||||
integrity sha512-4ZFcLTRtApF1aCE2CJrgMO44O0rkQq9bmyBxXxMUMjmv83lsue8rpWV00G5Z7fCg2C/Z2VdzeOJU97OumT3dmQ==
|
||||
"@budibase/backend-core@2.2.12-alpha.41":
|
||||
version "2.2.12-alpha.41"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.2.12-alpha.41.tgz#9fa210c3c94481c38af5aad71ac246451dda6e43"
|
||||
integrity sha512-vYb8x6JgncYdT8VqVi/WfScg4Ng0O1wtt9SspNPKnOX2CR7rA8VH6PW1QMRa5uUYvBFupg6UbY9jFqu2XXtujg==
|
||||
dependencies:
|
||||
"@budibase/nano" "10.1.1"
|
||||
"@budibase/types" "2.2.12-alpha.21"
|
||||
"@budibase/types" "2.2.12-alpha.41"
|
||||
"@shopify/jest-koa-mocks" "5.0.1"
|
||||
"@techpass/passport-openidconnect" "0.3.2"
|
||||
aws-cloudfront-sign "2.2.0"
|
||||
|
@ -1374,13 +1374,13 @@
|
|||
qs "^6.11.0"
|
||||
tough-cookie "^4.1.2"
|
||||
|
||||
"@budibase/pro@2.2.12-alpha.21":
|
||||
version "2.2.12-alpha.21"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.2.12-alpha.21.tgz#5419fd78ac68ed9feddc4af52da8a79ff874cbfc"
|
||||
integrity sha512-Fvm4ruWP9V514PJMqO9n2T4CQ2DGJpXDbK/hRSRooGyrAfR3lDJC6TB1boa4WYC+1YACF+f757adLPcNvUNCnA==
|
||||
"@budibase/pro@2.2.12-alpha.41":
|
||||
version "2.2.12-alpha.41"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.2.12-alpha.41.tgz#c1923d52d7cd2ace665e44b196c91578b1b50bbe"
|
||||
integrity sha512-J1yN74Gixa8UzkD44Ydzj2iR+5WRbJtjZzn7NFI3VB1A2sTLxmilSBRyCALzhF3UMpueaBRjwWBovbF/De106A==
|
||||
dependencies:
|
||||
"@budibase/backend-core" "2.2.12-alpha.21"
|
||||
"@budibase/types" "2.2.12-alpha.21"
|
||||
"@budibase/backend-core" "2.2.12-alpha.41"
|
||||
"@budibase/types" "2.2.12-alpha.41"
|
||||
"@koa/router" "8.0.8"
|
||||
bull "4.10.1"
|
||||
joi "17.6.0"
|
||||
|
@ -1405,10 +1405,10 @@
|
|||
svelte-apexcharts "^1.0.2"
|
||||
svelte-flatpickr "^3.1.0"
|
||||
|
||||
"@budibase/types@2.2.12-alpha.21":
|
||||
version "2.2.12-alpha.21"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.2.12-alpha.21.tgz#9344fae4504cf5d9a3a92ffb94434f988389c9a9"
|
||||
integrity sha512-F+UMqKvrYqHYtJUcmvT9kRBFtPRPGBhbktJgYHa8D3X+CK/nf93UYN8j9nTeXme7iOA+i/cmg+zALFuHyZi45Q==
|
||||
"@budibase/types@2.2.12-alpha.41":
|
||||
version "2.2.12-alpha.41"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.2.12-alpha.41.tgz#662115c5ba09f3c2057a96321e233c819cfae84b"
|
||||
integrity sha512-+uzr668cuvDTMqy7roWiG/qQzOzQO7uWYtysaHPsQQG5PxA0ZuwixJOvvX1qOr1rgv9Is54p9J7dvzvtKW/wAw==
|
||||
|
||||
"@bull-board/api@3.7.0":
|
||||
version "3.7.0"
|
||||
|
@ -5301,15 +5301,10 @@ color@^3.1.3:
|
|||
color-convert "^1.9.3"
|
||||
color-string "^1.6.0"
|
||||
|
||||
colorette@2.0.16:
|
||||
version "2.0.16"
|
||||
resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.16.tgz#713b9af84fdb000139f04546bd4a93f62a5085da"
|
||||
integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g==
|
||||
|
||||
colorette@^2.0.14:
|
||||
version "2.0.17"
|
||||
resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.17.tgz#5dd4c0d15e2984b7433cb4a9f2ead45063b80c47"
|
||||
integrity sha512-hJo+3Bkn0NCHybn9Tu35fIeoOKGOk5OCC32y4Hz2It+qlCO2Q3DeQ1hRn/tDDMQKRYUEzqsl7jbF6dYKjlE60g==
|
||||
colorette@2.0.19, colorette@^2.0.14:
|
||||
version "2.0.19"
|
||||
resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798"
|
||||
integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==
|
||||
|
||||
colorspace@1.1.x:
|
||||
version "1.1.4"
|
||||
|
@ -5346,7 +5341,7 @@ commander@^5.1.0:
|
|||
resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae"
|
||||
integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==
|
||||
|
||||
commander@^7.0.0, commander@^7.1.0:
|
||||
commander@^7.0.0:
|
||||
version "7.2.0"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7"
|
||||
integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==
|
||||
|
@ -5356,6 +5351,11 @@ commander@^8.3.0:
|
|||
resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66"
|
||||
integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==
|
||||
|
||||
commander@^9.1.0:
|
||||
version "9.5.0"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30"
|
||||
integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==
|
||||
|
||||
commoner@^0.10.1:
|
||||
version "0.10.8"
|
||||
resolved "https://registry.yarnpkg.com/commoner/-/commoner-0.10.8.tgz#34fc3672cd24393e8bb47e70caa0293811f4f2c5"
|
||||
|
@ -5474,9 +5474,9 @@ cookie@^0.5.0:
|
|||
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
|
||||
|
||||
cookiejar@^2.1.0:
|
||||
version "2.1.3"
|
||||
resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.3.tgz#fc7a6216e408e74414b90230050842dacda75acc"
|
||||
integrity sha512-JxbCBUdrfr6AQjOXrxoTvAMJO4HBTUIlBzslcJPAz+/KT8yk53fXun51u+RenNYvad/+Vc2DIz5o9UxlCDymFQ==
|
||||
version "2.1.4"
|
||||
resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.4.tgz#ee669c1fea2cf42dc31585469d193fef0d65771b"
|
||||
integrity sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==
|
||||
|
||||
cookies@~0.8.0:
|
||||
version "0.8.0"
|
||||
|
@ -5659,20 +5659,13 @@ dayjs@^1.10.4, dayjs@^1.10.5:
|
|||
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.3.tgz#4754eb694a624057b9ad2224b67b15d552589258"
|
||||
integrity sha512-xxwlswWOlGhzgQ4TKzASQkUhqERI3egRNqgV4ScR8wlANA/A9tZ7miXa44vTTKEq5l7vWoL5G57bG3zA+Kow0A==
|
||||
|
||||
debug@4, debug@^4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2:
|
||||
debug@4, debug@4.3.4, debug@^4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2:
|
||||
version "4.3.4"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
|
||||
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
|
||||
dependencies:
|
||||
ms "2.1.2"
|
||||
|
||||
debug@4.3.2:
|
||||
version "4.3.2"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b"
|
||||
integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==
|
||||
dependencies:
|
||||
ms "2.1.2"
|
||||
|
||||
debug@^2.2.0, debug@^2.3.3:
|
||||
version "2.6.9"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
|
||||
|
@ -7441,10 +7434,10 @@ get-value@^2.0.3, get-value@^2.0.6:
|
|||
resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
|
||||
integrity sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==
|
||||
|
||||
getopts@2.2.5:
|
||||
version "2.2.5"
|
||||
resolved "https://registry.yarnpkg.com/getopts/-/getopts-2.2.5.tgz#67a0fe471cacb9c687d817cab6450b96dde8313b"
|
||||
integrity sha512-9jb7AW5p3in+IiJWhQiZmmwkpLaR/ccTWdWQCtZM66HJcHHLegowh4q4tSD7gouUyeNvFWRavfK9GXosQHDpFA==
|
||||
getopts@2.3.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/getopts/-/getopts-2.3.0.tgz#71e5593284807e03e2427449d4f6712a268666f4"
|
||||
integrity sha512-5eDf9fuSXwxBL6q5HX+dhDj+dslFGWzU5thZ9kNKUkcPtaPdatmUFKwHFrLb/uf/WpA4BHET+AX3Scl56cAjpA==
|
||||
|
||||
getpass@^0.1.1:
|
||||
version "0.1.7"
|
||||
|
@ -9825,23 +9818,24 @@ kleur@^3.0.3:
|
|||
resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e"
|
||||
integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==
|
||||
|
||||
knex@0.95.15:
|
||||
version "0.95.15"
|
||||
resolved "https://registry.yarnpkg.com/knex/-/knex-0.95.15.tgz#39d7e7110a6e2ad7de5d673d2dea94143015e0e7"
|
||||
integrity sha512-Loq6WgHaWlmL2bfZGWPsy4l8xw4pOE+tmLGkPG0auBppxpI0UcK+GYCycJcqz9W54f2LiGewkCVLBm3Wq4ur/w==
|
||||
knex@2.4.0:
|
||||
version "2.4.0"
|
||||
resolved "https://registry.yarnpkg.com/knex/-/knex-2.4.0.tgz#7d33cc36f320cdac98741010544b4c6a98b8b19e"
|
||||
integrity sha512-i0GWwqYp1Hs2yvc2rlDO6nzzkLhwdyOZKRdsMTB8ZxOs2IXQyL5rBjSbS1krowCh6V65T4X9CJaKtuIfkaPGSA==
|
||||
dependencies:
|
||||
colorette "2.0.16"
|
||||
commander "^7.1.0"
|
||||
debug "4.3.2"
|
||||
colorette "2.0.19"
|
||||
commander "^9.1.0"
|
||||
debug "4.3.4"
|
||||
escalade "^3.1.1"
|
||||
esm "^3.2.25"
|
||||
getopts "2.2.5"
|
||||
get-package-type "^0.1.0"
|
||||
getopts "2.3.0"
|
||||
interpret "^2.2.0"
|
||||
lodash "^4.17.21"
|
||||
pg-connection-string "2.5.0"
|
||||
rechoir "0.7.0"
|
||||
rechoir "^0.8.0"
|
||||
resolve-from "^5.0.0"
|
||||
tarn "^3.0.1"
|
||||
tarn "^3.0.2"
|
||||
tildify "2.0.0"
|
||||
|
||||
koa-body@4.2.0:
|
||||
|
@ -12561,13 +12555,6 @@ recast@^0.11.17:
|
|||
private "~0.1.5"
|
||||
source-map "~0.5.0"
|
||||
|
||||
rechoir@0.7.0:
|
||||
version "0.7.0"
|
||||
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.0.tgz#32650fd52c21ab252aa5d65b19310441c7e03aca"
|
||||
integrity sha512-ADsDEH2bvbjltXEP+hTIAmeFekTFK0V2BTxMkok6qILyAJEXV0AFfoWcAq4yfll5VdIMd/RVXq0lR+wQi5ZU3Q==
|
||||
dependencies:
|
||||
resolve "^1.9.0"
|
||||
|
||||
rechoir@^0.7.0:
|
||||
version "0.7.1"
|
||||
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.1.tgz#9478a96a1ca135b5e88fc027f03ee92d6c645686"
|
||||
|
@ -12575,6 +12562,13 @@ rechoir@^0.7.0:
|
|||
dependencies:
|
||||
resolve "^1.9.0"
|
||||
|
||||
rechoir@^0.8.0:
|
||||
version "0.8.0"
|
||||
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.8.0.tgz#49f866e0d32146142da3ad8f0eff352b3215ff22"
|
||||
integrity sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==
|
||||
dependencies:
|
||||
resolve "^1.20.0"
|
||||
|
||||
redis-commands@1.7.0, redis-commands@^1.7.0:
|
||||
version "1.7.0"
|
||||
resolved "https://registry.yarnpkg.com/redis-commands/-/redis-commands-1.7.0.tgz#15a6fea2d58281e27b1cd1acfb4b293e278c3a89"
|
||||
|
@ -14051,7 +14045,7 @@ tarn@^1.1.5:
|
|||
resolved "https://registry.yarnpkg.com/tarn/-/tarn-1.1.5.tgz#7be88622e951738b9fa3fb77477309242cdddc2d"
|
||||
integrity sha512-PMtJ3HCLAZeedWjJPgGnCvcphbCOMbtZpjKgLq3qM5Qq9aQud+XHrL0WlrlgnTyS8U+jrjGbEXprFcQrxPy52g==
|
||||
|
||||
tarn@^3.0.1:
|
||||
tarn@^3.0.2:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/tarn/-/tarn-3.0.2.tgz#73b6140fbb881b71559c4f8bfde3d9a4b3d27693"
|
||||
integrity sha512-51LAVKUSZSVfI05vjPESNc5vwqqZpbXCsU+/+wxlOrUjk2SnFTt97v9ZgQrD4YmxYW1Px6w2KjaDitCfkvgxMQ==
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/string-templates",
|
||||
"version": "2.2.12-alpha.21",
|
||||
"version": "2.2.12-alpha.41",
|
||||
"description": "Handlebars wrapper for Budibase templating.",
|
||||
"main": "src/index.cjs",
|
||||
"module": "dist/bundle.mjs",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/types",
|
||||
"version": "2.2.12-alpha.21",
|
||||
"version": "2.2.12-alpha.41",
|
||||
"description": "Budibase types",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
|
|
@ -50,6 +50,7 @@ export interface AutomationStepSchema {
|
|||
internal?: boolean
|
||||
deprecated?: boolean
|
||||
stepId: AutomationTriggerStepId | AutomationActionStepId
|
||||
blockToLoop?: string
|
||||
inputs: {
|
||||
[key: string]: any
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ export enum DatasourceFieldType {
|
|||
OBJECT = "object",
|
||||
JSON = "json",
|
||||
FILE = "file",
|
||||
FIELD_GROUP = "fieldGroup",
|
||||
}
|
||||
|
||||
export enum SourceName {
|
||||
|
@ -97,6 +98,16 @@ export interface ExtraQueryConfig {
|
|||
}
|
||||
}
|
||||
|
||||
export interface DatasourceConfig {
|
||||
[key: string]: {
|
||||
type: string
|
||||
display?: string
|
||||
required?: boolean
|
||||
default?: any
|
||||
deprecated?: boolean
|
||||
}
|
||||
}
|
||||
|
||||
export interface Integration {
|
||||
docs: string
|
||||
plus?: boolean
|
||||
|
@ -106,16 +117,7 @@ export interface Integration {
|
|||
friendlyName: string
|
||||
type?: string
|
||||
iconUrl?: string
|
||||
datasource: Record<
|
||||
string,
|
||||
{
|
||||
type: string
|
||||
display?: string
|
||||
deprecated?: boolean
|
||||
default?: any
|
||||
required?: boolean
|
||||
}
|
||||
>
|
||||
datasource: DatasourceConfig
|
||||
query: {
|
||||
[key: string]: QueryDefinition
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@budibase/worker",
|
||||
"email": "hi@budibase.com",
|
||||
"version": "2.2.12-alpha.21",
|
||||
"version": "2.2.12-alpha.41",
|
||||
"description": "Budibase background service",
|
||||
"main": "src/index.ts",
|
||||
"repository": {
|
||||
|
@ -36,10 +36,10 @@
|
|||
"author": "Budibase",
|
||||
"license": "GPL-3.0",
|
||||
"dependencies": {
|
||||
"@budibase/backend-core": "2.2.12-alpha.21",
|
||||
"@budibase/pro": "2.2.12-alpha.21",
|
||||
"@budibase/string-templates": "2.2.12-alpha.21",
|
||||
"@budibase/types": "2.2.12-alpha.21",
|
||||
"@budibase/backend-core": "2.2.12-alpha.41",
|
||||
"@budibase/pro": "2.2.12-alpha.41",
|
||||
"@budibase/string-templates": "2.2.12-alpha.41",
|
||||
"@budibase/types": "2.2.12-alpha.41",
|
||||
"@koa/router": "8.0.8",
|
||||
"@sentry/node": "6.17.7",
|
||||
"@techpass/passport-openidconnect": "0.3.2",
|
||||
|
|
|
@ -34,8 +34,8 @@ function settingValidation() {
|
|||
function googleValidation() {
|
||||
// prettier-ignore
|
||||
return Joi.object({
|
||||
clientID: Joi.string().required(),
|
||||
clientSecret: Joi.string().required(),
|
||||
clientID: Joi.when('activated', { is: true, then: Joi.string().required() }),
|
||||
clientSecret: Joi.when('activated', { is: true, then: Joi.string().required() }),
|
||||
activated: Joi.boolean().required(),
|
||||
}).unknown(true)
|
||||
}
|
||||
|
@ -45,12 +45,12 @@ function oidcValidation() {
|
|||
return Joi.object({
|
||||
configs: Joi.array().items(
|
||||
Joi.object({
|
||||
clientID: Joi.string().required(),
|
||||
clientSecret: Joi.string().required(),
|
||||
configUrl: Joi.string().required(),
|
||||
clientID: Joi.when('activated', { is: true, then: Joi.string().required() }),
|
||||
clientSecret: Joi.when('activated', { is: true, then: Joi.string().required() }),
|
||||
configUrl: Joi.when('activated', { is: true, then: Joi.string().required() }),
|
||||
logo: Joi.string().allow("", null),
|
||||
name: Joi.string().allow("", null),
|
||||
uuid: Joi.string().required(),
|
||||
uuid: Joi.when('activated', { is: true, then: Joi.string().required() }),
|
||||
activated: Joi.boolean().required(),
|
||||
scopes: Joi.array().optional()
|
||||
})
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
}
|
||||
},
|
||||
"ts-node": {
|
||||
"require": ["tsconfig-paths/register"]
|
||||
"require": ["tsconfig-paths/register"],
|
||||
"swc": true
|
||||
},
|
||||
"references": [
|
||||
{ "path": "../types" },
|
||||
|
|
|
@ -470,13 +470,13 @@
|
|||
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||
|
||||
"@budibase/backend-core@2.2.12-alpha.21":
|
||||
version "2.2.12-alpha.21"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.2.12-alpha.21.tgz#99844f641cddb99ca6b6abd6a8af7d990e6b92e1"
|
||||
integrity sha512-4ZFcLTRtApF1aCE2CJrgMO44O0rkQq9bmyBxXxMUMjmv83lsue8rpWV00G5Z7fCg2C/Z2VdzeOJU97OumT3dmQ==
|
||||
"@budibase/backend-core@2.2.12-alpha.41":
|
||||
version "2.2.12-alpha.41"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.2.12-alpha.41.tgz#9fa210c3c94481c38af5aad71ac246451dda6e43"
|
||||
integrity sha512-vYb8x6JgncYdT8VqVi/WfScg4Ng0O1wtt9SspNPKnOX2CR7rA8VH6PW1QMRa5uUYvBFupg6UbY9jFqu2XXtujg==
|
||||
dependencies:
|
||||
"@budibase/nano" "10.1.1"
|
||||
"@budibase/types" "2.2.12-alpha.21"
|
||||
"@budibase/types" "2.2.12-alpha.41"
|
||||
"@shopify/jest-koa-mocks" "5.0.1"
|
||||
"@techpass/passport-openidconnect" "0.3.2"
|
||||
aws-cloudfront-sign "2.2.0"
|
||||
|
@ -521,23 +521,23 @@
|
|||
qs "^6.11.0"
|
||||
tough-cookie "^4.1.2"
|
||||
|
||||
"@budibase/pro@2.2.12-alpha.21":
|
||||
version "2.2.12-alpha.21"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.2.12-alpha.21.tgz#5419fd78ac68ed9feddc4af52da8a79ff874cbfc"
|
||||
integrity sha512-Fvm4ruWP9V514PJMqO9n2T4CQ2DGJpXDbK/hRSRooGyrAfR3lDJC6TB1boa4WYC+1YACF+f757adLPcNvUNCnA==
|
||||
"@budibase/pro@2.2.12-alpha.41":
|
||||
version "2.2.12-alpha.41"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.2.12-alpha.41.tgz#c1923d52d7cd2ace665e44b196c91578b1b50bbe"
|
||||
integrity sha512-J1yN74Gixa8UzkD44Ydzj2iR+5WRbJtjZzn7NFI3VB1A2sTLxmilSBRyCALzhF3UMpueaBRjwWBovbF/De106A==
|
||||
dependencies:
|
||||
"@budibase/backend-core" "2.2.12-alpha.21"
|
||||
"@budibase/types" "2.2.12-alpha.21"
|
||||
"@budibase/backend-core" "2.2.12-alpha.41"
|
||||
"@budibase/types" "2.2.12-alpha.41"
|
||||
"@koa/router" "8.0.8"
|
||||
bull "4.10.1"
|
||||
joi "17.6.0"
|
||||
jsonwebtoken "8.5.1"
|
||||
node-fetch "^2.6.1"
|
||||
|
||||
"@budibase/types@2.2.12-alpha.21":
|
||||
version "2.2.12-alpha.21"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.2.12-alpha.21.tgz#9344fae4504cf5d9a3a92ffb94434f988389c9a9"
|
||||
integrity sha512-F+UMqKvrYqHYtJUcmvT9kRBFtPRPGBhbktJgYHa8D3X+CK/nf93UYN8j9nTeXme7iOA+i/cmg+zALFuHyZi45Q==
|
||||
"@budibase/types@2.2.12-alpha.41":
|
||||
version "2.2.12-alpha.41"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.2.12-alpha.41.tgz#662115c5ba09f3c2057a96321e233c819cfae84b"
|
||||
integrity sha512-+uzr668cuvDTMqy7roWiG/qQzOzQO7uWYtysaHPsQQG5PxA0ZuwixJOvvX1qOr1rgv9Is54p9J7dvzvtKW/wAw==
|
||||
|
||||
"@cspotcode/source-map-support@^0.8.0":
|
||||
version "0.8.1"
|
||||
|
@ -2680,9 +2680,9 @@ cookie@^0.5.0:
|
|||
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
|
||||
|
||||
cookiejar@^2.1.3:
|
||||
version "2.1.3"
|
||||
resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.3.tgz#fc7a6216e408e74414b90230050842dacda75acc"
|
||||
integrity sha512-JxbCBUdrfr6AQjOXrxoTvAMJO4HBTUIlBzslcJPAz+/KT8yk53fXun51u+RenNYvad/+Vc2DIz5o9UxlCDymFQ==
|
||||
version "2.1.4"
|
||||
resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.4.tgz#ee669c1fea2cf42dc31585469d193fef0d65771b"
|
||||
integrity sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==
|
||||
|
||||
cookies@~0.8.0:
|
||||
version "0.8.0"
|
||||
|
|
|
@ -11,5 +11,8 @@ Addresses:
|
|||
## Screenshots
|
||||
_If a UI facing feature, a short video of the happy path, and some screenshots of the new functionality._
|
||||
|
||||
## Documentation
|
||||
- [ ] I have reviewed the budibase documentatation to verify if this feature requires any changes. If changes or new docs are required I have written them.
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue