Merge branch 'feat/linked-records-data-source' of github.com:Budibase/budibase into endpoint-renaming
This commit is contained in:
commit
5e9d32824c
|
@ -11,6 +11,7 @@
|
|||
"lerna": "3.14.1",
|
||||
"prettier": "^1.19.1",
|
||||
"prettier-plugin-svelte": "^0.7.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"rollup-plugin-replace": "^2.2.0",
|
||||
"svelte": "^3.28.0"
|
||||
},
|
||||
|
@ -20,6 +21,8 @@
|
|||
"initialise": "lerna run initialise",
|
||||
"publishdev": "lerna run publishdev",
|
||||
"publishnpm": "yarn build && lerna publish --force-publish",
|
||||
"restore": "npm run clean && npm run bootstrap && npm run build",
|
||||
"nuke": "rimraf ~/.budibase && npm run restore",
|
||||
"clean": "lerna clean",
|
||||
"dev": "node ./scripts/symlinkDev.js && lerna run --parallel dev:builder",
|
||||
"test": "lerna run test",
|
||||
|
|
|
@ -73,36 +73,42 @@ const componentInstanceToBindable = walkResult => i => {
|
|||
|
||||
const contextToBindables = (tables, walkResult) => context => {
|
||||
const contextParentPath = getParentPath(walkResult, context)
|
||||
const isTable = context.table?.isTable || typeof context.table === "string"
|
||||
const tableId =
|
||||
typeof context.table === "string" ? context.table : context.table.tableId
|
||||
const tableId = context.table?.tableId ?? context.table
|
||||
const table = tables.find(table => table._id === tableId)
|
||||
let schema =
|
||||
context.table?.type === "view"
|
||||
? table?.views?.[context.table.name]?.schema
|
||||
: table?.schema
|
||||
|
||||
// Avoid crashing whenever no data source has been selected
|
||||
if (table == null) {
|
||||
if (!schema) {
|
||||
return []
|
||||
}
|
||||
|
||||
const newBindable = key => ({
|
||||
type: "context",
|
||||
instance: context.instance,
|
||||
// how the binding expression persists, and is used in the app at runtime
|
||||
runtimeBinding: `${contextParentPath}data.${key}`,
|
||||
// how the binding exressions looks to the user of the builder
|
||||
readableBinding: `${context.instance._instanceName}.${table.name}.${key}`,
|
||||
// table / view info
|
||||
table: context.table,
|
||||
})
|
||||
|
||||
// see TableViewSelect.svelte for the format of context.table
|
||||
// ... this allows us to bind to Table schemas, or View schemas
|
||||
const schema = isTable ? table.schema : table.views[context.table.name].schema
|
||||
const newBindable = ([key, fieldSchema]) => {
|
||||
// Replace link bindings with a new property representing the count
|
||||
let runtimeBoundKey = key
|
||||
if (fieldSchema.type === "link") {
|
||||
runtimeBoundKey = `${key}_count`
|
||||
}
|
||||
return {
|
||||
type: "context",
|
||||
fieldSchema,
|
||||
instance: context.instance,
|
||||
// how the binding expression persists, and is used in the app at runtime
|
||||
runtimeBinding: `${contextParentPath}data.${runtimeBoundKey}`,
|
||||
// how the binding expressions looks to the user of the builder
|
||||
readableBinding: `${context.instance._instanceName}.${table.name}.${key}`,
|
||||
// table / view info
|
||||
table: context.table,
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
Object.keys(schema)
|
||||
Object.entries(schema)
|
||||
.map(newBindable)
|
||||
// add _id and _rev fields - not part of schema, but always valid
|
||||
.concat([newBindable("_id"), newBindable("_rev")])
|
||||
.concat([newBindable(["_id", "string"]), newBindable(["_rev", "string"])])
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ export const automationStore = getAutomationStore()
|
|||
|
||||
export const initialise = async () => {
|
||||
try {
|
||||
analytics.activate()
|
||||
await analytics.activate()
|
||||
analytics.captureEvent("Builder Started")
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
|
|
|
@ -292,6 +292,11 @@ const addChildComponent = store => (componentToAdd, presetProps = {}) => {
|
|||
? state.currentComponentInfo
|
||||
: getParent(state.currentPreviewItem.props, state.currentComponentInfo)
|
||||
|
||||
// Don't continue if there's no parent
|
||||
if (!targetParent) {
|
||||
return state
|
||||
}
|
||||
|
||||
targetParent._children = targetParent._children.concat(newComponent.props)
|
||||
|
||||
state.currentFrontEndType === "page"
|
||||
|
|
|
@ -86,7 +86,7 @@ const createScreen = table => ({
|
|||
},
|
||||
{
|
||||
_id: "",
|
||||
_component: "@budibase/standard-components/datatable",
|
||||
_component: "@budibase/standard-components/datagrid",
|
||||
_styles: {
|
||||
normal: {},
|
||||
hover: {},
|
||||
|
@ -100,10 +100,6 @@ const createScreen = table => ({
|
|||
tableId: table._id,
|
||||
isTable: true,
|
||||
},
|
||||
stripeColor: "",
|
||||
borderColor: "",
|
||||
backgroundColor: "",
|
||||
color: "",
|
||||
_instanceName: `${table.name} Table`,
|
||||
_children: [],
|
||||
},
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
<script>
|
||||
export let data
|
||||
export let currentPage
|
||||
export let currentPage = 0
|
||||
export let pageItemCount
|
||||
export let ITEMS_PER_PAGE
|
||||
|
||||
let numPages = 0
|
||||
$: numPages = Math.ceil((data?.length ?? 0) / ITEMS_PER_PAGE)
|
||||
$: displayAllPages = numPages <= 10
|
||||
$: pagesAroundCurrent = getPagesAroundCurrent(currentPage, numPages)
|
||||
|
||||
const next = () => {
|
||||
if (currentPage + 1 === numPages) return
|
||||
|
@ -20,18 +22,53 @@
|
|||
const selectPage = page => {
|
||||
currentPage = page
|
||||
}
|
||||
|
||||
function getPagesAroundCurrent(current, max) {
|
||||
console.log(current)
|
||||
const start = Math.max(current - 2, 1)
|
||||
const end = Math.min(current + 2, max - 2)
|
||||
let pages = []
|
||||
for (let i = start; i <= end; i++) {
|
||||
pages.push(i)
|
||||
}
|
||||
return pages
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="pagination">
|
||||
<div class="pagination__buttons">
|
||||
<button on:click={previous} disabled={currentPage === 0}><</button>
|
||||
{#each Array(numPages) as _, idx}
|
||||
<button
|
||||
class:selected={idx === currentPage}
|
||||
on:click={() => selectPage(idx)}>
|
||||
{idx + 1}
|
||||
{#if displayAllPages}
|
||||
{#each Array(numPages) as _, idx}
|
||||
<button
|
||||
class:selected={idx === currentPage}
|
||||
on:click={() => selectPage(idx)}>
|
||||
{idx + 1}
|
||||
</button>
|
||||
{/each}
|
||||
{:else}
|
||||
<button class:selected={currentPage === 0} on:click={() => selectPage(0)}>
|
||||
1
|
||||
</button>
|
||||
{/each}
|
||||
{#if currentPage > 3}
|
||||
<button disabled>...</button>
|
||||
{/if}
|
||||
{#each pagesAroundCurrent as idx}
|
||||
<button
|
||||
class:selected={idx === currentPage}
|
||||
on:click={() => selectPage(idx)}>
|
||||
{idx + 1}
|
||||
</button>
|
||||
{/each}
|
||||
{#if currentPage < numPages - 4}
|
||||
<button disabled>...</button>
|
||||
{/if}
|
||||
<button
|
||||
class:selected={currentPage === numPages - 1}
|
||||
on:click={() => selectPage(numPages - 1)}>
|
||||
{numPages}
|
||||
</button>
|
||||
{/if}
|
||||
<button
|
||||
on:click={next}
|
||||
disabled={currentPage === numPages - 1 || numPages === 0}>
|
||||
|
@ -65,7 +102,8 @@
|
|||
|
||||
.pagination__buttons button {
|
||||
display: inline-block;
|
||||
padding: var(--spacing-s) var(--spacing-m);
|
||||
padding: var(--spacing-s) 0;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
background: #fff;
|
||||
border: none;
|
||||
|
@ -74,6 +112,9 @@
|
|||
text-transform: capitalize;
|
||||
min-width: 20px;
|
||||
transition: 0.3s background-color;
|
||||
font-family: var(--font-sans);
|
||||
color: var(--grey-6);
|
||||
width: 40px;
|
||||
}
|
||||
.pagination__buttons button:last-child {
|
||||
border-right: none;
|
||||
|
@ -83,11 +124,13 @@
|
|||
background-color: var(--grey-1);
|
||||
}
|
||||
.pagination__buttons button.selected {
|
||||
background: var(--grey-2);
|
||||
background: var(--blue);
|
||||
color: white;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: var(--font-size-s);
|
||||
margin: var(--spacing-xl) 0;
|
||||
color: var(--grey-6);
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
|
||||
const dispatch = createEventDispatcher()
|
||||
export let bindableProperties
|
||||
console.log("Bindable Props: ", bindableProperties)
|
||||
export let value = ""
|
||||
export let close
|
||||
|
||||
|
|
|
@ -1,15 +1,10 @@
|
|||
<script>
|
||||
import { goto } from "@sveltech/routify"
|
||||
import { store } from "builderStore"
|
||||
import { getComponentDefinition } from "builderStore/storeUtils"
|
||||
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
||||
import { last, cloneDeep } from "lodash/fp"
|
||||
import {
|
||||
selectComponent,
|
||||
getParent,
|
||||
walkProps,
|
||||
saveCurrentPreviewItem,
|
||||
regenerateCssForCurrentScreen,
|
||||
} from "builderStore/storeUtils"
|
||||
import { getParent, saveCurrentPreviewItem } from "builderStore/storeUtils"
|
||||
import { uuid } from "builderStore/uuid"
|
||||
import { DropdownMenu } from "@budibase/bbui"
|
||||
|
||||
|
@ -29,6 +24,12 @@
|
|||
dropdown.hide()
|
||||
}
|
||||
|
||||
const selectComponent = component => {
|
||||
store.selectComponent(component)
|
||||
const path = store.getPathToComponent(component)
|
||||
$goto(`./:page/:screen/${path}`)
|
||||
}
|
||||
|
||||
const moveUpComponent = () => {
|
||||
store.update(s => {
|
||||
const parent = getParent(s.currentPreviewItem.props, component)
|
||||
|
@ -78,10 +79,10 @@
|
|||
|
||||
if (parent) {
|
||||
parent._children = parent._children.filter(c => c !== component)
|
||||
selectComponent(parent)
|
||||
}
|
||||
|
||||
saveCurrentPreviewItem(state)
|
||||
|
||||
return state
|
||||
})
|
||||
}
|
||||
|
|
|
@ -127,6 +127,9 @@
|
|||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
margin-left: -20px;
|
||||
margin-right: -20px;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
.instance-name {
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
{/each}
|
||||
{:else}
|
||||
<div class="no-design">
|
||||
<span>This component does not have any design properties</span>
|
||||
This component does not have any design properties.
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
@ -78,9 +78,12 @@
|
|||
flex: 1;
|
||||
overflow-y: auto;
|
||||
min-height: 0;
|
||||
margin: 0 -20px;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
.no-design {
|
||||
text-align: center;
|
||||
font-size: var(--font-size-s);
|
||||
color: var(--grey-6);
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
<script>
|
||||
import { fly } from "svelte/transition"
|
||||
export let item
|
||||
</script>
|
||||
|
||||
<div
|
||||
data-cy={item.name}
|
||||
class="item-item"
|
||||
in:fly={{ y: 100, duration: 1000 }}
|
||||
on:click>
|
||||
<div data-cy={item.name} class="item-item" on:click>
|
||||
<div class="item-icon">
|
||||
<i class={item.icon} />
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<script>
|
||||
import { goto } from "@sveltech/routify"
|
||||
import { store, backendUiStore } from "builderStore"
|
||||
import { Input, Button, Spacer, Select, ModalContent } from "@budibase/bbui"
|
||||
import getTemplates from "builderStore/store/screenTemplates"
|
||||
|
@ -71,14 +72,7 @@
|
|||
})
|
||||
}
|
||||
|
||||
finished()
|
||||
}
|
||||
|
||||
const finished = () => {
|
||||
templateIndex = 0
|
||||
name = ""
|
||||
route = ""
|
||||
baseComponent = CONTAINER
|
||||
$goto(`./:page/${name}`)
|
||||
}
|
||||
|
||||
const routeNameExists = route => {
|
||||
|
|
|
@ -164,10 +164,10 @@
|
|||
|
||||
.bb-select-container {
|
||||
outline: none;
|
||||
width: 160px;
|
||||
height: 36px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.bb-select-anchor {
|
||||
|
@ -237,6 +237,7 @@
|
|||
padding: 5px 0px;
|
||||
cursor: pointer;
|
||||
padding-left: 10px;
|
||||
font-size: var(--font-size-s);
|
||||
}
|
||||
|
||||
li:hover {
|
||||
|
|
|
@ -118,8 +118,7 @@
|
|||
position: relative;
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
min-width: 260px;
|
||||
margin: 8px 0px;
|
||||
margin: 8px 0;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
@ -128,7 +127,7 @@
|
|||
align-items: center;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
width: 100px;
|
||||
flex: 0 0 100px;
|
||||
text-align: left;
|
||||
color: var(--ink);
|
||||
margin-right: auto;
|
||||
|
@ -139,7 +138,7 @@
|
|||
flex: 1;
|
||||
display: flex;
|
||||
padding-left: 2px;
|
||||
max-width: 164px;
|
||||
overflow: hidden;
|
||||
}
|
||||
button {
|
||||
position: absolute;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<script>
|
||||
import { goto } from "@sveltech/routify"
|
||||
import { store } from "builderStore"
|
||||
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
||||
import api from "builderStore/api"
|
||||
|
@ -16,19 +17,27 @@
|
|||
}
|
||||
|
||||
const deleteScreen = () => {
|
||||
store.update(s => {
|
||||
const screens = s.screens.filter(c => c.name !== screen.name)
|
||||
s.screens = screens
|
||||
if (s.currentPreviewItem.name === screen.name) {
|
||||
s.currentPreviewItem = s.pages[s.currentPageName]
|
||||
s.currentFrontEndType = "page"
|
||||
store.update(state => {
|
||||
// Remove screen from screens
|
||||
const screens = state.screens.filter(c => c.name !== screen.name)
|
||||
state.screens = screens
|
||||
|
||||
// Remove screen from current page as well
|
||||
const pageScreens = state.pages[state.currentPageName]._screens.filter(
|
||||
scr => scr.name !== screen.name
|
||||
)
|
||||
state.pages[state.currentPageName]._screens = pageScreens
|
||||
|
||||
if (state.currentPreviewItem.name === screen.name) {
|
||||
store.setCurrentPage($store.currentPageName)
|
||||
$goto(`./:page/page-layout`)
|
||||
}
|
||||
|
||||
api.delete(
|
||||
`/_builder/api/pages/${s.currentPageName}/screens/${screen.name}`
|
||||
`/_builder/api/pages/${state.currentPageName}/screens/${screen.name}`
|
||||
)
|
||||
|
||||
return s
|
||||
return state
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -67,9 +67,22 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<DataList editable secondary on:blur={handleBlur} on:change bind:value>
|
||||
<option value="" />
|
||||
{#each urls as url}
|
||||
<option value={url.url}>{url.name}</option>
|
||||
{/each}
|
||||
</DataList>
|
||||
<div>
|
||||
<DataList editable secondary thin on:blur={handleBlur} on:change bind:value>
|
||||
<option value="" />
|
||||
{#each urls as url}
|
||||
<option value={url.url}>{url.name}</option>
|
||||
{/each}
|
||||
</DataList>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
div {
|
||||
flex: 1 1 auto;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
div :global(> div) {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -117,21 +117,21 @@
|
|||
control={definition.control}
|
||||
label={definition.label}
|
||||
key={definition.key}
|
||||
value={componentInstance[definition.key] || componentInstance[definition.key].defaultValue}
|
||||
value={componentInstance[definition.key] || componentInstance[definition.key]?.defaultValue}
|
||||
{componentInstance}
|
||||
{onChange}
|
||||
props={{ ...excludeProps(definition, ['control', 'label']) }} />
|
||||
{/if}
|
||||
{/each}
|
||||
{:else}
|
||||
<div>
|
||||
<span>This component does not have any settings.</span>
|
||||
</div>
|
||||
<div>This component does not have any settings.</div>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
div {
|
||||
text-align: center;
|
||||
font-size: var(--font-size-s);
|
||||
margin-top: var(--spacing-m);
|
||||
color: var(--grey-6);
|
||||
}
|
||||
|
||||
.duplicate-name {
|
||||
|
|
|
@ -5,9 +5,22 @@
|
|||
export let value
|
||||
</script>
|
||||
|
||||
<Select thin secondary wide on:change {value}>
|
||||
<option value="" />
|
||||
{#each $backendUiStore.tables as table}
|
||||
<option value={table._id}>{table.name}</option>
|
||||
{/each}
|
||||
</Select>
|
||||
<div>
|
||||
<Select thin secondary wide on:change {value}>
|
||||
<option value="">Choose a table</option>
|
||||
{#each $backendUiStore.tables as table}
|
||||
<option value={table._id}>{table.name}</option>
|
||||
{/each}
|
||||
</Select>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
div {
|
||||
flex: 1 1 auto;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
div :global(> *) {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -15,10 +15,12 @@
|
|||
? tables.find(m => m._id === componentInstance.datasource.tableId)
|
||||
: null
|
||||
|
||||
$: type = componentInstance.datasource.type
|
||||
$: if (table) {
|
||||
options = componentInstance.datasource.isTable
|
||||
? Object.keys(table.schema)
|
||||
: Object.keys(table.views[componentInstance.datasource.name].schema)
|
||||
options =
|
||||
type === "table" || type === "link"
|
||||
? Object.keys(table.schema)
|
||||
: Object.keys(table.views[componentInstance.datasource.name].schema)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<script>
|
||||
import { Button, Icon, DropdownMenu, Spacer, Heading } from "@budibase/bbui"
|
||||
import { createEventDispatcher } from "svelte"
|
||||
import { backendUiStore } from "builderStore"
|
||||
import { store, backendUiStore } from "builderStore"
|
||||
import fetchBindableProperties from "../../builderStore/fetchBindableProperties"
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
let anchorRight, dropdownRight
|
||||
|
@ -13,28 +14,47 @@
|
|||
dropdownRight.hide()
|
||||
}
|
||||
|
||||
const tables = $backendUiStore.tables.map(m => ({
|
||||
$: tables = $backendUiStore.tables.map(m => ({
|
||||
label: m.name,
|
||||
name: `all_${m._id}`,
|
||||
tableId: m._id,
|
||||
isTable: true,
|
||||
type: "table",
|
||||
}))
|
||||
|
||||
const views = $backendUiStore.tables.reduce((acc, cur) => {
|
||||
$: views = $backendUiStore.tables.reduce((acc, cur) => {
|
||||
let viewsArr = Object.entries(cur.views).map(([key, value]) => ({
|
||||
label: key,
|
||||
name: key,
|
||||
...value,
|
||||
type: "view",
|
||||
}))
|
||||
return [...acc, ...viewsArr]
|
||||
}, [])
|
||||
|
||||
$: bindableProperties = fetchBindableProperties({
|
||||
componentInstanceId: $store.currentComponentInfo._id,
|
||||
components: $store.components,
|
||||
screen: $store.currentPreviewItem,
|
||||
tables: $backendUiStore.tables,
|
||||
})
|
||||
|
||||
$: links = bindableProperties
|
||||
.filter(x => x.fieldSchema.type === "link")
|
||||
.map(property => ({
|
||||
label: property.readableBinding,
|
||||
fieldName: property.fieldSchema.name,
|
||||
name: `all_${property.fieldSchema.tableId}`,
|
||||
tableId: property.fieldSchema.tableId,
|
||||
type: "link",
|
||||
}))
|
||||
</script>
|
||||
|
||||
<div class="dropdownbutton" bind:this={anchorRight}>
|
||||
<Button secondary wide on:click={dropdownRight.show}>
|
||||
<span>{value.label ? value.label : 'Table / View'}</span>
|
||||
<Icon name="arrowdown" />
|
||||
</Button>
|
||||
<div
|
||||
class="dropdownbutton"
|
||||
bind:this={anchorRight}
|
||||
on:click={dropdownRight.show}>
|
||||
<span>{value.label ? value.label : 'Table / View'}</span>
|
||||
<Icon name="arrowdown" />
|
||||
</div>
|
||||
<DropdownMenu bind:this={dropdownRight} anchor={anchorRight}>
|
||||
<div class="dropdown">
|
||||
|
@ -63,13 +83,51 @@
|
|||
</li>
|
||||
{/each}
|
||||
</ul>
|
||||
<hr />
|
||||
<div class="title">
|
||||
<Heading extraSmall>Relationships</Heading>
|
||||
</div>
|
||||
<ul>
|
||||
{#each links as link}
|
||||
<li
|
||||
class:selected={value === link}
|
||||
on:click={() => handleSelected(link)}>
|
||||
{link.label}
|
||||
</li>
|
||||
{/each}
|
||||
</ul>
|
||||
</div>
|
||||
</DropdownMenu>
|
||||
|
||||
<style>
|
||||
.dropdownbutton {
|
||||
width: 100%;
|
||||
background-color: var(--grey-2);
|
||||
border: var(--border-transparent);
|
||||
padding: var(--spacing-m);
|
||||
border-radius: var(--border-radius-m);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
.dropdownbutton:hover {
|
||||
cursor: pointer;
|
||||
background-color: var(--grey-3);
|
||||
}
|
||||
.dropdownbutton span {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
flex: 1 1 auto;
|
||||
text-align: left;
|
||||
font-size: var(--font-size-xs);
|
||||
}
|
||||
.dropdownbutton :global(svg) {
|
||||
margin: -4px 0;
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
padding: var(--spacing-m) 0;
|
||||
z-index: 99999999;
|
||||
|
|
|
@ -346,6 +346,18 @@ export default {
|
|||
],
|
||||
placeholder: "alpine",
|
||||
},
|
||||
{
|
||||
label: "Height",
|
||||
key: "height",
|
||||
defaultValue: "500",
|
||||
control: Input,
|
||||
},
|
||||
{
|
||||
label: "Pagination",
|
||||
key: "pagination",
|
||||
valueKey: "checked",
|
||||
control: Checkbox,
|
||||
},
|
||||
],
|
||||
},
|
||||
children: [],
|
||||
|
|
|
@ -718,15 +718,6 @@
|
|||
svelte-flatpickr "^2.4.0"
|
||||
svelte-portal "^1.0.0"
|
||||
|
||||
"@budibase/client@^0.2.0":
|
||||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/client/-/client-0.2.0.tgz#247218de40538b31aeac7367f0e323c28fc8ca40"
|
||||
integrity sha512-FJibQ7OqYCQOpIw4GDBPZEfJI+MiVn9irevZ2UjQBGJjbZMxoQTRAD/FoAq2Yu3s9L4tA5mTMutuMNkjpTs85Q==
|
||||
dependencies:
|
||||
deep-equal "^2.0.1"
|
||||
mustache "^4.0.1"
|
||||
regexparam "^1.3.0"
|
||||
|
||||
"@budibase/colorpicker@^1.0.1":
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/colorpicker/-/colorpicker-1.0.1.tgz#940c180e7ebba0cb0756c4c8ef13f5dfab58e810"
|
||||
|
@ -1403,11 +1394,6 @@ array-equal@^1.0.0:
|
|||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93"
|
||||
|
||||
array-filter@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-1.0.0.tgz#baf79e62e6ef4c2a4c0b831232daffec251f9d83"
|
||||
integrity sha1-uveeYubvTCpMC4MSMtr/7CUfnYM=
|
||||
|
||||
array-union@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d"
|
||||
|
@ -1462,13 +1448,6 @@ atob@^2.1.2:
|
|||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
|
||||
|
||||
available-typed-arrays@^1.0.0, available-typed-arrays@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz#6b098ca9d8039079ee3f77f7b783c4480ba513f5"
|
||||
integrity sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ==
|
||||
dependencies:
|
||||
array-filter "^1.0.0"
|
||||
|
||||
aws-sign2@~0.7.0:
|
||||
version "0.7.0"
|
||||
resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
|
||||
|
@ -2418,26 +2397,6 @@ decode-uri-component@^0.2.0:
|
|||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
|
||||
|
||||
deep-equal@^2.0.1:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.0.4.tgz#6b0b407a074666033169df3acaf128e1c6f3eab6"
|
||||
integrity sha512-BUfaXrVoCfgkOQY/b09QdO9L3XNoF2XH0A3aY9IQwQL/ZjLOe8FQgCNVl1wiolhsFo8kFdO9zdPViCPbmaJA5w==
|
||||
dependencies:
|
||||
es-abstract "^1.18.0-next.1"
|
||||
es-get-iterator "^1.1.0"
|
||||
is-arguments "^1.0.4"
|
||||
is-date-object "^1.0.2"
|
||||
is-regex "^1.1.1"
|
||||
isarray "^2.0.5"
|
||||
object-is "^1.1.3"
|
||||
object-keys "^1.1.1"
|
||||
object.assign "^4.1.1"
|
||||
regexp.prototype.flags "^1.3.0"
|
||||
side-channel "^1.0.3"
|
||||
which-boxed-primitive "^1.0.1"
|
||||
which-collection "^1.0.1"
|
||||
which-typed-array "^1.1.2"
|
||||
|
||||
deep-is@~0.1.3:
|
||||
version "0.1.3"
|
||||
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
|
||||
|
@ -2607,54 +2566,6 @@ es-abstract@^1.17.0-next.1, es-abstract@^1.17.2, es-abstract@^1.17.5:
|
|||
string.prototype.trimleft "^2.1.1"
|
||||
string.prototype.trimright "^2.1.1"
|
||||
|
||||
es-abstract@^1.17.4:
|
||||
version "1.17.7"
|
||||
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.7.tgz#a4de61b2f66989fc7421676c1cb9787573ace54c"
|
||||
integrity sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==
|
||||
dependencies:
|
||||
es-to-primitive "^1.2.1"
|
||||
function-bind "^1.1.1"
|
||||
has "^1.0.3"
|
||||
has-symbols "^1.0.1"
|
||||
is-callable "^1.2.2"
|
||||
is-regex "^1.1.1"
|
||||
object-inspect "^1.8.0"
|
||||
object-keys "^1.1.1"
|
||||
object.assign "^4.1.1"
|
||||
string.prototype.trimend "^1.0.1"
|
||||
string.prototype.trimstart "^1.0.1"
|
||||
|
||||
es-abstract@^1.18.0-next.0, es-abstract@^1.18.0-next.1:
|
||||
version "1.18.0-next.1"
|
||||
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.0-next.1.tgz#6e3a0a4bda717e5023ab3b8e90bec36108d22c68"
|
||||
integrity sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==
|
||||
dependencies:
|
||||
es-to-primitive "^1.2.1"
|
||||
function-bind "^1.1.1"
|
||||
has "^1.0.3"
|
||||
has-symbols "^1.0.1"
|
||||
is-callable "^1.2.2"
|
||||
is-negative-zero "^2.0.0"
|
||||
is-regex "^1.1.1"
|
||||
object-inspect "^1.8.0"
|
||||
object-keys "^1.1.1"
|
||||
object.assign "^4.1.1"
|
||||
string.prototype.trimend "^1.0.1"
|
||||
string.prototype.trimstart "^1.0.1"
|
||||
|
||||
es-get-iterator@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.0.tgz#bb98ad9d6d63b31aacdc8f89d5d0ee57bcb5b4c8"
|
||||
integrity sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ==
|
||||
dependencies:
|
||||
es-abstract "^1.17.4"
|
||||
has-symbols "^1.0.1"
|
||||
is-arguments "^1.0.4"
|
||||
is-map "^2.0.1"
|
||||
is-set "^2.0.1"
|
||||
is-string "^1.0.5"
|
||||
isarray "^2.0.5"
|
||||
|
||||
es-to-primitive@^1.2.1:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a"
|
||||
|
@ -2961,7 +2872,7 @@ for-in@^1.0.2:
|
|||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
|
||||
|
||||
foreach@^2.0.5, foreach@~2.0.1:
|
||||
foreach@~2.0.1:
|
||||
version "2.0.5"
|
||||
resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99"
|
||||
integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k=
|
||||
|
@ -3335,31 +3246,16 @@ is-accessor-descriptor@^1.0.0:
|
|||
dependencies:
|
||||
kind-of "^6.0.0"
|
||||
|
||||
is-arguments@^1.0.4:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3"
|
||||
integrity sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==
|
||||
|
||||
is-arrayish@^0.2.1:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
|
||||
|
||||
is-bigint@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.0.tgz#73da8c33208d00f130e9b5e15d23eac9215601c4"
|
||||
integrity sha512-t5mGUXC/xRheCK431ylNiSkGGpBp8bHENBcENTkDT6ppwPzEVxNGZRvgvmOEfbWkFhA7D2GEuE2mmQTr78sl2g==
|
||||
|
||||
is-binary-path@~2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09"
|
||||
dependencies:
|
||||
binary-extensions "^2.0.0"
|
||||
|
||||
is-boolean-object@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.0.1.tgz#10edc0900dd127697a92f6f9807c7617d68ac48e"
|
||||
integrity sha512-TqZuVwa/sppcrhUCAYkGBk7w0yxfQQnxq28fjkO53tnK9FQXmdwz2JS5+GjsWQ6RByES1K40nI+yDic5c9/aAQ==
|
||||
|
||||
is-buffer@^1.1.5:
|
||||
version "1.1.6"
|
||||
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
|
||||
|
@ -3368,11 +3264,6 @@ is-callable@^1.1.4, is-callable@^1.1.5:
|
|||
version "1.1.5"
|
||||
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab"
|
||||
|
||||
is-callable@^1.2.2:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.2.tgz#c7c6715cd22d4ddb48d3e19970223aceabb080d9"
|
||||
integrity sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==
|
||||
|
||||
is-ci@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c"
|
||||
|
@ -3391,7 +3282,7 @@ is-data-descriptor@^1.0.0:
|
|||
dependencies:
|
||||
kind-of "^6.0.0"
|
||||
|
||||
is-date-object@^1.0.1, is-date-object@^1.0.2:
|
||||
is-date-object@^1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e"
|
||||
|
||||
|
@ -3456,25 +3347,10 @@ is-installed-globally@^0.3.2:
|
|||
global-dirs "^2.0.1"
|
||||
is-path-inside "^3.0.1"
|
||||
|
||||
is-map@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.1.tgz#520dafc4307bb8ebc33b813de5ce7c9400d644a1"
|
||||
integrity sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==
|
||||
|
||||
is-module@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591"
|
||||
|
||||
is-negative-zero@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.0.tgz#9553b121b0fac28869da9ed459e20c7543788461"
|
||||
integrity sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE=
|
||||
|
||||
is-number-object@^1.0.3:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.4.tgz#36ac95e741cf18b283fc1ddf5e83da798e3ec197"
|
||||
integrity sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==
|
||||
|
||||
is-number@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195"
|
||||
|
@ -3531,18 +3407,6 @@ is-regex@^1.0.5:
|
|||
dependencies:
|
||||
has "^1.0.3"
|
||||
|
||||
is-regex@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9"
|
||||
integrity sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==
|
||||
dependencies:
|
||||
has-symbols "^1.0.1"
|
||||
|
||||
is-set@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.1.tgz#d1604afdab1724986d30091575f54945da7e5f43"
|
||||
integrity sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA==
|
||||
|
||||
is-stream@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
|
||||
|
@ -3551,41 +3415,16 @@ is-stream@^2.0.0:
|
|||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3"
|
||||
|
||||
is-string@^1.0.4, is-string@^1.0.5:
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6"
|
||||
integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==
|
||||
|
||||
is-symbol@^1.0.2:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937"
|
||||
dependencies:
|
||||
has-symbols "^1.0.1"
|
||||
|
||||
is-typed-array@^1.1.3:
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.3.tgz#a4ff5a5e672e1a55f99c7f54e59597af5c1df04d"
|
||||
integrity sha512-BSYUBOK/HJibQ30wWkWold5txYwMUXQct9YHAQJr8fSwvZoiglcqB0pd7vEN23+Tsi9IUEjztdOSzl4qLVYGTQ==
|
||||
dependencies:
|
||||
available-typed-arrays "^1.0.0"
|
||||
es-abstract "^1.17.4"
|
||||
foreach "^2.0.5"
|
||||
has-symbols "^1.0.1"
|
||||
|
||||
is-typedarray@~1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
|
||||
|
||||
is-weakmap@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.1.tgz#5008b59bdc43b698201d18f62b37b2ca243e8cf2"
|
||||
integrity sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==
|
||||
|
||||
is-weakset@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.1.tgz#e9a0af88dbd751589f5e50d80f4c98b780884f83"
|
||||
integrity sha512-pi4vhbhVHGLxohUw7PhGsueT4vRGFoXhP7+RGN0jKIv9+8PWYCQTqtADngrxOm2g46hoH0+g8uZZBzMrvVGDmw==
|
||||
|
||||
is-windows@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
|
||||
|
@ -3606,11 +3445,6 @@ isarray@1.0.0, isarray@~1.0.0:
|
|||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
|
||||
|
||||
isarray@^2.0.5:
|
||||
version "2.0.5"
|
||||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723"
|
||||
integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==
|
||||
|
||||
isbuffer@~0.0.0:
|
||||
version "0.0.0"
|
||||
resolved "https://registry.yarnpkg.com/isbuffer/-/isbuffer-0.0.0.tgz#38c146d9df528b8bf9b0701c3d43cf12df3fc39b"
|
||||
|
@ -4730,19 +4564,6 @@ object-inspect@^1.7.0:
|
|||
version "1.7.0"
|
||||
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67"
|
||||
|
||||
object-inspect@^1.8.0:
|
||||
version "1.8.0"
|
||||
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0"
|
||||
integrity sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==
|
||||
|
||||
object-is@^1.1.3:
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.3.tgz#2e3b9e65560137455ee3bd62aec4d90a2ea1cc81"
|
||||
integrity sha512-teyqLvFWzLkq5B9ki8FVWA902UER2qkxmdA4nLf+wjOLAWgxzCWZNCxpDq9MvE8MmhWNr+I8w3BN49Vx36Y6Xg==
|
||||
dependencies:
|
||||
define-properties "^1.1.3"
|
||||
es-abstract "^1.18.0-next.1"
|
||||
|
||||
object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e"
|
||||
|
@ -4774,16 +4595,6 @@ object.assign@^4.1.0:
|
|||
has-symbols "^1.0.0"
|
||||
object-keys "^1.0.11"
|
||||
|
||||
object.assign@^4.1.1:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.1.tgz#303867a666cdd41936ecdedfb1f8f3e32a478cdd"
|
||||
integrity sha512-VT/cxmx5yaoHSOTSyrCygIDFco+RsibY2NM0a4RdEeY/4KgqezwFtK1yr3U67xYhqJSlASm2pKhLVzPj2lr4bA==
|
||||
dependencies:
|
||||
define-properties "^1.1.3"
|
||||
es-abstract "^1.18.0-next.0"
|
||||
has-symbols "^1.0.1"
|
||||
object-keys "^1.1.1"
|
||||
|
||||
object.getownpropertydescriptors@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649"
|
||||
|
@ -5264,19 +5075,6 @@ regex-not@^1.0.0, regex-not@^1.0.2:
|
|||
extend-shallow "^3.0.2"
|
||||
safe-regex "^1.1.0"
|
||||
|
||||
regexp.prototype.flags@^1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz#7aba89b3c13a64509dabcf3ca8d9fbb9bdf5cb75"
|
||||
integrity sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==
|
||||
dependencies:
|
||||
define-properties "^1.1.3"
|
||||
es-abstract "^1.17.0-next.1"
|
||||
|
||||
regexparam@^1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/regexparam/-/regexparam-1.3.0.tgz#2fe42c93e32a40eff6235d635e0ffa344b92965f"
|
||||
integrity sha512-6IQpFBv6e5vz1QAqI+V4k8P2e/3gRrqfCJ9FI+O1FLQTO+Uz6RXZEZOPmTJ6hlGj7gkERzY5BRCv09whKP96/g==
|
||||
|
||||
regexpu-core@^4.7.0:
|
||||
version "4.7.0"
|
||||
resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.0.tgz#fcbf458c50431b0bb7b45d6967b8192d91f3d938"
|
||||
|
@ -5684,14 +5482,6 @@ shortid@^2.2.15:
|
|||
dependencies:
|
||||
nanoid "^2.1.0"
|
||||
|
||||
side-channel@^1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.3.tgz#cdc46b057550bbab63706210838df5d4c19519c3"
|
||||
integrity sha512-A6+ByhlLkksFoUepsGxfj5x1gTSrs+OydsRptUxeNCabQpCFUvcwIczgOigI8vhY/OJCnPnyE9rGiwgvr9cS1g==
|
||||
dependencies:
|
||||
es-abstract "^1.18.0-next.0"
|
||||
object-inspect "^1.8.0"
|
||||
|
||||
signal-exit@^3.0.0, signal-exit@^3.0.2:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
|
||||
|
@ -5918,7 +5708,7 @@ string-width@^4.2.0:
|
|||
is-fullwidth-code-point "^3.0.0"
|
||||
strip-ansi "^6.0.0"
|
||||
|
||||
string.prototype.trimend@^1.0.0, string.prototype.trimend@^1.0.1:
|
||||
string.prototype.trimend@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913"
|
||||
dependencies:
|
||||
|
@ -5941,7 +5731,7 @@ string.prototype.trimright@^2.1.1:
|
|||
es-abstract "^1.17.5"
|
||||
string.prototype.trimend "^1.0.0"
|
||||
|
||||
string.prototype.trimstart@^1.0.0, string.prototype.trimstart@^1.0.1:
|
||||
string.prototype.trimstart@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54"
|
||||
dependencies:
|
||||
|
@ -6397,43 +6187,10 @@ whatwg-url@^8.0.0:
|
|||
tr46 "^2.0.2"
|
||||
webidl-conversions "^5.0.0"
|
||||
|
||||
which-boxed-primitive@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.1.tgz#cbe8f838ebe91ba2471bb69e9edbda67ab5a5ec1"
|
||||
integrity sha512-7BT4TwISdDGBgaemWU0N0OU7FeAEJ9Oo2P1PHRm/FCWoEi2VLWC9b6xvxAA3C/NMpxg3HXVgi0sMmGbNUbNepQ==
|
||||
dependencies:
|
||||
is-bigint "^1.0.0"
|
||||
is-boolean-object "^1.0.0"
|
||||
is-number-object "^1.0.3"
|
||||
is-string "^1.0.4"
|
||||
is-symbol "^1.0.2"
|
||||
|
||||
which-collection@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.1.tgz#70eab71ebbbd2aefaf32f917082fc62cdcb70906"
|
||||
integrity sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==
|
||||
dependencies:
|
||||
is-map "^2.0.1"
|
||||
is-set "^2.0.1"
|
||||
is-weakmap "^2.0.1"
|
||||
is-weakset "^2.0.1"
|
||||
|
||||
which-module@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
|
||||
|
||||
which-typed-array@^1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.2.tgz#e5f98e56bda93e3dac196b01d47c1156679c00b2"
|
||||
integrity sha512-KT6okrd1tE6JdZAy3o2VhMoYPh3+J6EMZLyrxBQsZflI1QCZIxMrIYLkosd8Twf+YfknVIHmYQPgJt238p8dnQ==
|
||||
dependencies:
|
||||
available-typed-arrays "^1.0.2"
|
||||
es-abstract "^1.17.5"
|
||||
foreach "^2.0.5"
|
||||
function-bind "^1.1.1"
|
||||
has-symbols "^1.0.1"
|
||||
is-typed-array "^1.1.3"
|
||||
|
||||
which@^1.2.9, which@^1.3.0:
|
||||
version "1.3.1"
|
||||
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
|
||||
|
|
|
@ -6,8 +6,8 @@ export const EVENT_TYPE_MEMBER_NAME = "##eventHandlerType"
|
|||
export const eventHandlers = routeTo => {
|
||||
const handlers = {
|
||||
"Navigate To": param => routeTo(param && param.url),
|
||||
"Update Record": api.updateRow,
|
||||
"Save Record": api.saveRow,
|
||||
"Update Row": api.updateRow,
|
||||
"Save Row": api.saveRow,
|
||||
"Trigger Workflow": api.triggerWorkflow,
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ const entityMap = {
|
|||
|
||||
mustache.escape = text =>
|
||||
String(text).replace(/[&<>"'`=/]/g, function fromEntityMap(s) {
|
||||
return entityMap[s]
|
||||
return entityMap[s] || s
|
||||
})
|
||||
|
||||
export default mustache.render
|
||||
|
|
|
@ -54,34 +54,6 @@
|
|||
"_instanceId": "inst_cf8ace4_69efc0d72e6f443db2d4c902c14d9394",
|
||||
"_instanceName": "Home Link",
|
||||
"_children": []
|
||||
},
|
||||
{
|
||||
"_id": "d3325634-0945-4387-8bb3-d9d9be186c1c",
|
||||
"_component": "@budibase/standard-components/link",
|
||||
"_styles": {
|
||||
"normal": {
|
||||
"font-family": "Inter",
|
||||
"font-weight": "400",
|
||||
"color": "#000000",
|
||||
"text-decoration-line": "none",
|
||||
"font-size": "16px"
|
||||
},
|
||||
"hover": {},
|
||||
"active": {},
|
||||
"selected": {}
|
||||
},
|
||||
"_code": "",
|
||||
"url": "/screen1",
|
||||
"openInNewTab": false,
|
||||
"text": "Screen 1",
|
||||
"color": "",
|
||||
"hoverColor": "",
|
||||
"underline": false,
|
||||
"fontSize": "",
|
||||
"fontFamily": "initial",
|
||||
"_instanceId": "inst_cf8ace4_69efc0d72e6f443db2d4c902c14d9394",
|
||||
"_instanceName": "Screen 1 Link",
|
||||
"_children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const fs = require("fs")
|
||||
const sharp = require("sharp")
|
||||
// const sharp = require("sharp")
|
||||
const fsPromises = fs.promises
|
||||
|
||||
const FORMATS = {
|
||||
|
@ -7,14 +7,14 @@ const FORMATS = {
|
|||
}
|
||||
|
||||
async function processImage(file) {
|
||||
const imgMeta = await sharp(file.path)
|
||||
.resize(300)
|
||||
.toFile(file.outputPath)
|
||||
|
||||
return {
|
||||
...file,
|
||||
...imgMeta,
|
||||
}
|
||||
// const imgMeta = await sharp(file.path)
|
||||
// .resize(300)
|
||||
// .toFile(file.outputPath)
|
||||
//
|
||||
// return {
|
||||
// ...file,
|
||||
// ...imgMeta,
|
||||
// }
|
||||
}
|
||||
|
||||
async function process(file) {
|
||||
|
|
|
@ -225,7 +225,7 @@
|
|||
"description": "a datagrid component with functionality to add, remove and edit rows.",
|
||||
"data": true,
|
||||
"props": {
|
||||
"datasource": "models",
|
||||
"datasource": "tables",
|
||||
"editable": "bool",
|
||||
"theme": {
|
||||
"type": "options",
|
||||
|
@ -237,7 +237,9 @@
|
|||
"balham-dark",
|
||||
"material"
|
||||
]
|
||||
}
|
||||
},
|
||||
"height": "number",
|
||||
"pagination": "bool"
|
||||
}
|
||||
},
|
||||
"dataform": {
|
||||
|
@ -287,23 +289,18 @@
|
|||
}
|
||||
},
|
||||
"rowdetail": {
|
||||
<<<<<<< HEAD
|
||||
"description": "Loads a row, using an ID in the url",
|
||||
"context": "table",
|
||||
=======
|
||||
"description": "Loads a record, using an ID in the url",
|
||||
"context": "model",
|
||||
>>>>>>> 3af1d8dc7f13091cc4673d53046919bad9ea28f7
|
||||
"children": true,
|
||||
"data": true,
|
||||
"baseComponent": true,
|
||||
"props": {
|
||||
"model": "models"
|
||||
"table": "tables"
|
||||
}
|
||||
},
|
||||
"newrow": {
|
||||
"description": "Prepares a new record for creation",
|
||||
"context": "model",
|
||||
"description": "Prepares a new row for creation",
|
||||
"context": "table",
|
||||
"children": true,
|
||||
"data": true,
|
||||
"baseComponent": true,
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
export let datasource = {}
|
||||
export let editable
|
||||
export let theme = "alpine"
|
||||
export let height
|
||||
export let pagination
|
||||
|
||||
let dataLoaded = false
|
||||
let data
|
||||
|
@ -32,7 +34,10 @@
|
|||
},
|
||||
rowSelection: editable ? "multiple" : false,
|
||||
suppressRowClickSelection: !editable,
|
||||
paginationAutoPageSize: true,
|
||||
pagination,
|
||||
}
|
||||
let store = _bb.store
|
||||
|
||||
onMount(async () => {
|
||||
if (datasource.tableId) {
|
||||
|
@ -40,7 +45,7 @@
|
|||
table = await jsonTable.json()
|
||||
const { schema } = table
|
||||
if (!isEmpty(datasource)) {
|
||||
data = await fetchData(datasource)
|
||||
data = await fetchData(datasource, $store)
|
||||
columnDefs = Object.keys(schema).map((key, i) => {
|
||||
return {
|
||||
headerCheckboxSelection: i === 0 && editable,
|
||||
|
@ -110,7 +115,7 @@
|
|||
href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css" />
|
||||
</svelte:head>
|
||||
|
||||
<div class="container">
|
||||
<div class="container" style="--grid-height: {height}px">
|
||||
{#if dataLoaded}
|
||||
{#if editable}
|
||||
<div class="controls">
|
||||
|
|
|
@ -110,7 +110,7 @@ function linkedRowRenderer(constraints, editable) {
|
|||
container.style.placeItems = "center"
|
||||
container.style.height = "100%"
|
||||
|
||||
container.innerText = params.value.length || 0
|
||||
container.innerText = params.value ? params.value.length : 0
|
||||
|
||||
return container
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
let sort = {}
|
||||
let sorted = []
|
||||
let schema = {}
|
||||
let store = _bb.store
|
||||
|
||||
$: cssVariables = {
|
||||
backgroundColor,
|
||||
|
@ -39,7 +40,7 @@
|
|||
|
||||
onMount(async () => {
|
||||
if (!isEmpty(datasource)) {
|
||||
data = await fetchData(datasource)
|
||||
data = await fetchData(datasource, $store)
|
||||
if (data && data.length) {
|
||||
await fetchTable(data[0].tableId)
|
||||
headers = Object.keys(schema).filter(shouldDisplayField)
|
||||
|
@ -99,9 +100,9 @@
|
|||
{#if schema[header].type === 'attachment'}
|
||||
<AttachmentList files={row[header]} />
|
||||
{:else if schema[header].type === 'link'}
|
||||
<td>{row[header]} related row(s)</td>
|
||||
{:else if row[header]}
|
||||
<td>{row[header]}</td>
|
||||
<td>{row[header] ? row[header].length : 0} related row(s)</td>
|
||||
{:else}
|
||||
<td>{row[header] == null ? '' : row[header]}</td>
|
||||
{/if}
|
||||
{/if}
|
||||
{/each}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<script>
|
||||
import { onMount } from "svelte"
|
||||
import { Select, Label, Multiselect } from "@budibase/bbui"
|
||||
import { Label, Multiselect } from "@budibase/bbui"
|
||||
import api from "./api"
|
||||
import { capitalise } from "./helpers"
|
||||
|
||||
|
@ -10,10 +9,11 @@
|
|||
export let secondary
|
||||
|
||||
let linkedTable
|
||||
let allRows = []
|
||||
|
||||
$: label = capitalise(schema.name)
|
||||
$: linkedTableId = schema.tableId
|
||||
$: rowsPromise = fetchRows(linkedTableId)
|
||||
$: fetchRows(linkedTableId)
|
||||
$: fetchTable(linkedTableId)
|
||||
|
||||
async function fetchTable() {
|
||||
|
@ -31,7 +31,7 @@
|
|||
}
|
||||
const FETCH_ROWS_URL = `/api/${linkedTableId}/rows`
|
||||
const response = await api.get(FETCH_ROWS_URL)
|
||||
return await response.json()
|
||||
allRows = await response.json()
|
||||
}
|
||||
|
||||
function getPrettyName(row) {
|
||||
|
@ -50,16 +50,14 @@
|
|||
table.
|
||||
</Label>
|
||||
{:else}
|
||||
{#await rowsPromise then rows}
|
||||
<Multiselect
|
||||
{secondary}
|
||||
bind:value={linkedRows}
|
||||
label={showLabel ? label : null}
|
||||
placeholder="Choose some options">
|
||||
{#each rows as row}
|
||||
<option value={row._id}>{getPrettyName(row)}</option>
|
||||
{/each}
|
||||
</Multiselect>
|
||||
{/await}
|
||||
<Multiselect
|
||||
{secondary}
|
||||
bind:value={linkedRows}
|
||||
label={showLabel ? label : null}
|
||||
placeholder="Choose some options">
|
||||
{#each allRows as row}
|
||||
<option value={row._id}>{getPrettyName(row)}</option>
|
||||
{/each}
|
||||
</Multiselect>
|
||||
{/if}
|
||||
{/if}
|
||||
|
|
|
@ -7,10 +7,11 @@
|
|||
export let datasource = []
|
||||
|
||||
let target
|
||||
let store = _bb.store
|
||||
|
||||
onMount(async () => {
|
||||
if (!isEmpty(datasource)) {
|
||||
const data = await fetchData(datasource)
|
||||
const data = await fetchData(datasource, $store)
|
||||
_bb.attachChildren(target, {
|
||||
hydrate: false,
|
||||
context: data,
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
async function fetchData() {
|
||||
const pathParts = window.location.pathname.split("/")
|
||||
|
||||
if (!table) {
|
||||
return
|
||||
}
|
||||
|
||||
let row
|
||||
// if srcdoc, then we assume this is the builder preview
|
||||
if (pathParts.length === 0 || pathParts[0] === "srcdoc") {
|
||||
|
@ -48,7 +52,9 @@
|
|||
const tableObj = await fetchTable(row.tableId)
|
||||
for (let key of Object.keys(tableObj.schema)) {
|
||||
if (tableObj.schema[key].type === "link") {
|
||||
row[key] = Array.isArray(row[key]) ? row[key].length : 0
|
||||
row[`${key}_count`] = Array.isArray(row[key])
|
||||
? row[key].length
|
||||
: 0
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
import api from "./api"
|
||||
|
||||
export default async function fetchData(datasource) {
|
||||
const { isTable, name } = datasource
|
||||
export default async function fetchData(datasource, store) {
|
||||
const { type, name } = datasource
|
||||
|
||||
if (name) {
|
||||
const rows = isTable ? await fetchTableData() : await fetchViewData()
|
||||
let rows = []
|
||||
if (type === "table") {
|
||||
rows = await fetchTableData()
|
||||
} else if (type === "view") {
|
||||
rows = await fetchViewData()
|
||||
} else if (type === "link") {
|
||||
rows = await fetchLinkedRowsData()
|
||||
}
|
||||
|
||||
// Fetch table schema so we can check for linked rows
|
||||
if (rows && rows.length) {
|
||||
|
@ -13,7 +20,9 @@ export default async function fetchData(datasource) {
|
|||
rows.forEach(row => {
|
||||
for (let key of keys) {
|
||||
if (table.schema[key].type === "link") {
|
||||
row[key] = Array.isArray(row[key]) ? row[key].length : 0
|
||||
row[`${key}_count`] = Array.isArray(row[key])
|
||||
? row[key].length
|
||||
: 0
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -53,4 +62,14 @@ export default async function fetchData(datasource) {
|
|||
const response = await api.get(QUERY_VIEW_URL)
|
||||
return await response.json()
|
||||
}
|
||||
|
||||
async function fetchLinkedRowsData() {
|
||||
if (!store || !store.data || !store.data._id) {
|
||||
return []
|
||||
}
|
||||
const QUERY_URL = `/api/${store.data.tableId}/${store.data._id}/enrich`
|
||||
const response = await api.get(QUERY_URL)
|
||||
const row = await response.json()
|
||||
return row[datasource.fieldName]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4007,6 +4007,13 @@ rimraf@2.6.3:
|
|||
dependencies:
|
||||
glob "^7.1.3"
|
||||
|
||||
rimraf@^3.0.2:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a"
|
||||
integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==
|
||||
dependencies:
|
||||
glob "^7.1.3"
|
||||
|
||||
rollup-plugin-replace@^2.2.0:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/rollup-plugin-replace/-/rollup-plugin-replace-2.2.0.tgz#f41ae5372e11e7a217cde349c8b5d5fd115e70e3"
|
||||
|
|
Loading…
Reference in New Issue