Merge branch 'develop' of github.com:Budibase/budibase into feature/BUDI-7052
This commit is contained in:
commit
e1494e54d9
|
@ -5,7 +5,7 @@
|
|||
"jest": true,
|
||||
"node": true
|
||||
},
|
||||
"parser": "babel-eslint",
|
||||
"parser": "@babel/eslint-parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2019,
|
||||
"sourceType": "module",
|
||||
|
@ -18,17 +18,23 @@
|
|||
"*.spec.js",
|
||||
"bundle.js"
|
||||
],
|
||||
"plugins": ["svelte3"],
|
||||
"extends": ["eslint:recommended"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.svelte"],
|
||||
"processor": "svelte3/svelte3"
|
||||
"files": ["**/*.svelte"],
|
||||
"extends": "plugin:svelte/recommended",
|
||||
"parser": "svelte-eslint-parser",
|
||||
"parserOptions": {
|
||||
"parser": "@babel/eslint-parser",
|
||||
"ecmaVersion": 2019,
|
||||
"sourceType": "module",
|
||||
"allowImportExportEverywhere": true
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
"files": ["**/*.ts"],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"plugins": [],
|
||||
"extends": ["eslint:recommended"],
|
||||
"rules": {
|
||||
"no-unused-vars": "off",
|
||||
|
@ -41,7 +47,8 @@
|
|||
}
|
||||
],
|
||||
"rules": {
|
||||
"no-self-assign": "off"
|
||||
"no-self-assign": "off",
|
||||
"no-unused-vars": ["error", { "varsIgnorePattern": "^_", "argsIgnorePattern": "^_", "destructuredArrayIgnorePattern": "^_" }]
|
||||
},
|
||||
"globals": {
|
||||
"GeolocationPositionError": true
|
||||
|
|
|
@ -34,7 +34,6 @@ jobs:
|
|||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 14.x
|
||||
|
@ -58,9 +57,12 @@ jobs:
|
|||
echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} >> .npmrc
|
||||
yarn release
|
||||
|
||||
- name: "Get Previous tag"
|
||||
id: previoustag
|
||||
uses: "WyriHaximus/github-action-get-previous-tag@v1"
|
||||
- name: "Get Current tag"
|
||||
id: currenttag
|
||||
run: |
|
||||
version=v$(./scripts/getCurrentVersion.sh)
|
||||
echo 'Using tag $version'
|
||||
echo "::set-output name=tag::$resversionult"
|
||||
|
||||
- name: Build/release Docker images
|
||||
run: |
|
||||
|
@ -69,7 +71,7 @@ jobs:
|
|||
env:
|
||||
DOCKER_USER: ${{ secrets.DOCKER_USERNAME }}
|
||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }}
|
||||
BUDIBASE_RELEASE_VERSION: ${{ steps.previoustag.outputs.tag }}
|
||||
BUDIBASE_RELEASE_VERSION: ${{ steps.currenttag.outputs.tag }}
|
||||
|
||||
release-helm-chart:
|
||||
needs: [release-images]
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"presets": [["@babel/preset-env", { "targets": { "node": "current" } }]]
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "2.8.2-alpha.1",
|
||||
"version": "2.8.2-alpha.5",
|
||||
"npmClient": "yarn",
|
||||
"packages": [
|
||||
"packages/*"
|
||||
|
|
18
package.json
18
package.json
|
@ -6,12 +6,10 @@
|
|||
"@nx/js": "16.2.1",
|
||||
"@rollup/plugin-json": "^4.0.2",
|
||||
"@typescript-eslint/parser": "5.45.0",
|
||||
"babel-eslint": "^10.0.3",
|
||||
"esbuild": "^0.17.18",
|
||||
"esbuild-node-externals": "^1.7.0",
|
||||
"eslint": "^7.28.0",
|
||||
"eslint": "^8.44.0",
|
||||
"eslint-plugin-cypress": "^2.11.3",
|
||||
"eslint-plugin-svelte3": "^3.2.0",
|
||||
"husky": "^8.0.3",
|
||||
"js-yaml": "^4.1.0",
|
||||
"kill-port": "^1.6.1",
|
||||
|
@ -23,7 +21,12 @@
|
|||
"rimraf": "^3.0.2",
|
||||
"rollup-plugin-replace": "^2.2.0",
|
||||
"svelte": "^3.38.2",
|
||||
"typescript": "4.7.3"
|
||||
"typescript": "4.7.3",
|
||||
"@babel/core": "^7.22.5",
|
||||
"@babel/eslint-parser": "^7.22.5",
|
||||
"@babel/preset-env": "^7.22.5",
|
||||
"eslint-plugin-svelte": "^2.32.2",
|
||||
"svelte-eslint-parser": "^0.32.0"
|
||||
},
|
||||
"scripts": {
|
||||
"preinstall": "node scripts/syncProPackage.js",
|
||||
|
@ -52,10 +55,10 @@
|
|||
"dev:built": "yarn run kill-all && cd packages/server && yarn dev:stack:up && cd ../../ && lerna run --stream --parallel dev:built",
|
||||
"dev:docker": "yarn build:docker:pre && docker-compose -f hosting/docker-compose.build.yaml -f hosting/docker-compose.dev.yaml --env-file hosting/.env up --build --scale proxy-service=0",
|
||||
"test": "lerna run --stream test --stream",
|
||||
"lint:eslint": "eslint packages && eslint qa-core",
|
||||
"lint:eslint": "eslint packages qa-core --max-warnings=0",
|
||||
"lint:prettier": "prettier --check \"packages/**/*.{js,ts,svelte}\" && prettier --write \"examples/**/*.{js,ts,svelte}\" && prettier --check \"qa-core/**/*.{js,ts,svelte}\"",
|
||||
"lint": "yarn run lint:eslint && yarn run lint:prettier",
|
||||
"lint:fix:eslint": "eslint --fix packages qa-core",
|
||||
"lint:fix:eslint": "eslint --fix --max-warnings=0 packages qa-core",
|
||||
"lint:fix:prettier": "prettier --write \"packages/**/*.{js,ts,svelte}\" && prettier --write \"examples/**/*.{js,ts,svelte}\" && prettier --write \"qa-core/**/*.{js,ts,svelte}\"",
|
||||
"lint:fix": "yarn run lint:fix:prettier && yarn run lint:fix:eslint",
|
||||
"build:specs": "lerna run --stream specs",
|
||||
|
@ -103,5 +106,6 @@
|
|||
"@budibase/string-templates": "0.0.0",
|
||||
"@budibase/types": "0.0.0"
|
||||
},
|
||||
"dependencies": {}
|
||||
"dependencies": {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,8 +15,6 @@
|
|||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
$: placeholder = !value
|
||||
|
||||
const extractProperty = (value, property) => {
|
||||
if (value && typeof value === "object") {
|
||||
return value[property]
|
||||
|
|
|
@ -150,7 +150,7 @@
|
|||
</div>
|
||||
{:else if variables.length}
|
||||
<div style="max-height: 100px">
|
||||
{#each variables as variable, idx}
|
||||
{#each variables as variable}
|
||||
<li
|
||||
class="spectrum-Menu-item"
|
||||
role="option"
|
||||
|
|
|
@ -62,6 +62,13 @@
|
|||
}
|
||||
}
|
||||
|
||||
const getInputMode = type => {
|
||||
if (type === "bigint") {
|
||||
return "numeric"
|
||||
}
|
||||
return type === "number" ? "decimal" : "text"
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
focus = autofocus
|
||||
if (focus) field.focus()
|
||||
|
@ -103,7 +110,7 @@
|
|||
{type}
|
||||
class="spectrum-Textfield-input"
|
||||
style={align ? `text-align: ${align};` : ""}
|
||||
inputmode={type === "number" ? "decimal" : "text"}
|
||||
inputmode={getInputMode(type)}
|
||||
{autocomplete}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
$: type = getType(schema)
|
||||
$: customRenderer = customRenderers?.find(x => x.column === schema?.name)
|
||||
$: renderer = customRenderer?.component ?? typeMap[type] ?? StringRenderer
|
||||
$: width = schema?.width || "150px"
|
||||
$: cellValue = getCellValue(value, schema.template)
|
||||
|
||||
const getType = schema => {
|
||||
|
|
|
@ -379,7 +379,7 @@
|
|||
</div>
|
||||
{/if}
|
||||
{#if sortedRows?.length}
|
||||
{#each sortedRows as row, idx}
|
||||
{#each sortedRows as row}
|
||||
<div class="spectrum-Table-row" class:clickable={allowClickRows}>
|
||||
{#if showEditColumn}
|
||||
<div
|
||||
|
|
|
@ -135,5 +135,5 @@ export const userSelectedResourceMap = derived(userStore, $userStore => {
|
|||
})
|
||||
|
||||
export const isOnlyUser = derived(userStore, $userStore => {
|
||||
return $userStore.length === 1
|
||||
return $userStore.length < 2
|
||||
})
|
||||
|
|
|
@ -1333,7 +1333,7 @@ export const getFrontendStore = () => {
|
|||
links: {
|
||||
save: async (url, title) => {
|
||||
const navigation = get(store).navigation
|
||||
let links = [...navigation?.links]
|
||||
let links = [...(navigation?.links ?? [])]
|
||||
|
||||
// Skip if we have an identical link
|
||||
if (links.find(link => link.url === url && link.text === title)) {
|
||||
|
|
|
@ -4,6 +4,7 @@ import { getSchemaForDatasource } from "../../../dataBinding"
|
|||
const fieldTypeToComponentMap = {
|
||||
string: "stringfield",
|
||||
number: "numberfield",
|
||||
bigint: "bigintfield",
|
||||
options: "optionsfield",
|
||||
array: "multifieldselect",
|
||||
boolean: "booleanfield",
|
||||
|
|
|
@ -168,7 +168,7 @@
|
|||
<Layout noPadding gap="XS">
|
||||
<Detail size="S">Plugins</Detail>
|
||||
<div class="item-list">
|
||||
{#each Object.entries(plugins) as [idx, action]}
|
||||
{#each Object.entries(plugins) as [_, action]}
|
||||
<div
|
||||
class="item"
|
||||
class:selected={selectedAction === action.name}
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
</script>
|
||||
|
||||
<div>
|
||||
<!-- eslint-disable-next-line svelte/no-at-html-tags-->
|
||||
{@html html}
|
||||
</div>
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
<Layout noPadding gap="XS">
|
||||
<Label size="S">Trigger</Label>
|
||||
<div class="item-list">
|
||||
{#each triggers as [idx, trigger]}
|
||||
{#each triggers as [_, trigger]}
|
||||
<div
|
||||
class="item"
|
||||
class:selected={selectedTrigger === trigger.name}
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
import { goto, params } from "@roxi/routify"
|
||||
import { Table, Heading, Layout } from "@budibase/bbui"
|
||||
import Spinner from "components/common/Spinner.svelte"
|
||||
import CreateEditRow from "./modals/CreateEditRow.svelte"
|
||||
import CreateEditUser from "./modals/CreateEditUser.svelte"
|
||||
import {
|
||||
TableNames,
|
||||
UNEDITABLE_USER_FIELDS,
|
||||
|
@ -33,7 +31,6 @@
|
|||
$: selectedRows, dispatch("selectionUpdated", selectedRows)
|
||||
$: isUsersTable = tableId === TableNames.USERS
|
||||
$: data && resetSelectedRows()
|
||||
$: editRowComponent = isUsersTable ? CreateEditUser : CreateEditRow
|
||||
$: {
|
||||
UNSORTABLE_TYPES.forEach(type => {
|
||||
Object.values(schema || {}).forEach(col => {
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
|
||||
let table = $tables.selected
|
||||
let confirmDeleteDialog
|
||||
let deletion
|
||||
let savingColumn
|
||||
let deleteColName
|
||||
let jsonSchemaModal
|
||||
|
@ -215,7 +214,6 @@
|
|||
notifications.success(`Column ${editableColumn.name} deleted`)
|
||||
confirmDeleteDialog.hide()
|
||||
hide()
|
||||
deletion = false
|
||||
dispatch("updatecolumns")
|
||||
}
|
||||
} catch (error) {
|
||||
|
@ -266,13 +264,11 @@
|
|||
|
||||
function confirmDelete() {
|
||||
confirmDeleteDialog.show()
|
||||
deletion = true
|
||||
}
|
||||
|
||||
function hideDeleteDialog() {
|
||||
confirmDeleteDialog.hide()
|
||||
deleteColName = ""
|
||||
deletion = false
|
||||
}
|
||||
|
||||
function getRelationshipOptions(field) {
|
||||
|
@ -330,6 +326,7 @@
|
|||
FIELDS.NUMBER,
|
||||
FIELDS.BOOLEAN,
|
||||
FIELDS.FORMULA,
|
||||
FIELDS.BIGINT,
|
||||
]
|
||||
// no-sql or a spreadsheet
|
||||
if (!external || table.sql) {
|
||||
|
|
|
@ -169,7 +169,7 @@
|
|||
on:click={() => selectTable(TableNames.USERS)}
|
||||
selectedBy={$userSelectedResourceMap[TableNames.USERS]}
|
||||
/>
|
||||
{#each enrichedDataSources as datasource, idx}
|
||||
{#each enrichedDataSources as datasource}
|
||||
<NavItem
|
||||
border
|
||||
text={datasource.name}
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
let error = null
|
||||
let fileName = null
|
||||
let fileType = null
|
||||
|
||||
let loading = false
|
||||
let updateExistingRows = false
|
||||
|
@ -74,7 +73,6 @@
|
|||
const response = await parseFile(e)
|
||||
rows = response.rows
|
||||
fileName = response.fileName
|
||||
fileType = response.fileType
|
||||
} catch (e) {
|
||||
loading = false
|
||||
error = e
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
let fileInput
|
||||
let error = null
|
||||
let fileName = null
|
||||
let fileType = null
|
||||
|
||||
let loading = false
|
||||
let validation = {}
|
||||
|
@ -60,7 +59,6 @@
|
|||
rows = response.rows
|
||||
schema = response.schema
|
||||
fileName = response.fileName
|
||||
fileType = response.fileType
|
||||
} catch (e) {
|
||||
loading = false
|
||||
error = e
|
||||
|
|
|
@ -93,42 +93,42 @@
|
|||
`https://github.com/Budibase/budibase/issues/new?assignees=&labels=bug&template=bug_report.md&title=`
|
||||
),
|
||||
},
|
||||
...$datasources?.list.map(datasource => ({
|
||||
...($datasources?.list?.map(datasource => ({
|
||||
type: "Datasource",
|
||||
name: `${datasource.name}`,
|
||||
icon: "Data",
|
||||
action: () => $goto(`./data/datasource/${datasource._id}`),
|
||||
})),
|
||||
...$tables?.list.map(table => ({
|
||||
})) ?? []),
|
||||
...($tables?.list?.map(table => ({
|
||||
type: "Table",
|
||||
name: table.name,
|
||||
icon: "Table",
|
||||
action: () => $goto(`./data/table/${table._id}`),
|
||||
})),
|
||||
...$views?.list.map(view => ({
|
||||
})) ?? []),
|
||||
...($views?.list?.map(view => ({
|
||||
type: "View",
|
||||
name: view.name,
|
||||
icon: "Remove",
|
||||
action: () => $goto(`./data/view/${view.name}`),
|
||||
})),
|
||||
...$queries?.list.map(query => ({
|
||||
})) ?? []),
|
||||
...($queries?.list?.map(query => ({
|
||||
type: "Query",
|
||||
name: query.name,
|
||||
icon: "SQLQuery",
|
||||
action: () => $goto(`./data/query/${query._id}`),
|
||||
})),
|
||||
})) ?? []),
|
||||
...$sortedScreens.map(screen => ({
|
||||
type: "Screen",
|
||||
name: screen.routing.route,
|
||||
icon: "WebPage",
|
||||
action: () => $goto(`./design/${screen._id}/components`),
|
||||
})),
|
||||
...$automationStore?.automations.map(automation => ({
|
||||
...($automationStore?.automations?.map(automation => ({
|
||||
type: "Automation",
|
||||
name: automation.name,
|
||||
icon: "ShareAndroid",
|
||||
action: () => $goto(`./automation/${automation._id}`),
|
||||
})),
|
||||
})) ?? []),
|
||||
...Constants.Themes.map(theme => ({
|
||||
type: "Change Builder Theme",
|
||||
name: theme.name,
|
||||
|
@ -237,11 +237,11 @@
|
|||
<Input bind:value={search} quiet placeholder="Search for command" />
|
||||
</div>
|
||||
<div class="commands">
|
||||
{#each categories as [name, results], catIdx}
|
||||
{#each categories as [name, results]}
|
||||
<div class="category">
|
||||
<Detail>{name}</Detail>
|
||||
<div class="options">
|
||||
{#each results as command, cmdIdx}
|
||||
{#each results as command}
|
||||
<div
|
||||
class="command"
|
||||
on:click={() => runAction(command)}
|
||||
|
|
|
@ -20,4 +20,5 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<!-- eslint-disable-next-line svelte/no-at-html-tags-->
|
||||
{@html substituteSize(svgHtml)}
|
||||
|
|
|
@ -88,6 +88,7 @@
|
|||
{/if}
|
||||
{#if hoverTarget.description}
|
||||
<div class="helper__description">
|
||||
<!-- eslint-disable-next-line svelte/no-at-html-tags-->
|
||||
{@html hoverTarget.description}
|
||||
</div>
|
||||
{/if}
|
||||
|
@ -124,7 +125,6 @@
|
|||
/>
|
||||
</span>
|
||||
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<span
|
||||
class="search-input-icon"
|
||||
on:click={() => {
|
||||
|
@ -162,7 +162,6 @@
|
|||
</div>
|
||||
<ul>
|
||||
{#each category.bindings as binding}
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<li
|
||||
class="binding"
|
||||
on:mouseenter={e => {
|
||||
|
|
|
@ -139,7 +139,6 @@
|
|||
|
||||
<div class="action-top-nav">
|
||||
<div class="action-buttons">
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
{#if updateAvailable && $isOnlyUser}
|
||||
<div class="app-action-button version" on:click={versionModal.show}>
|
||||
<div class="app-action">
|
||||
|
@ -181,7 +180,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<div
|
||||
class="app-action-button publish app-action-popover"
|
||||
on:click={() => {
|
||||
|
@ -221,7 +219,6 @@
|
|||
>
|
||||
<div class="app-action-popover-content">
|
||||
<Layout noPadding gap="M">
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<Body size="M">
|
||||
<span
|
||||
class="app-link"
|
||||
|
|
|
@ -52,6 +52,7 @@ const componentMap = {
|
|||
"field/sortable": SortableFieldSelect,
|
||||
"field/string": FormFieldSelect,
|
||||
"field/number": FormFieldSelect,
|
||||
"field/bigint": FormFieldSelect,
|
||||
"field/options": FormFieldSelect,
|
||||
"field/boolean": FormFieldSelect,
|
||||
"field/longform": FormFieldSelect,
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
}
|
||||
})
|
||||
|
||||
$: hasAutomations = automations && automations.length > 0
|
||||
$: selectedAutomation = automations?.find(
|
||||
a => a._id === parameters?.automationId
|
||||
)
|
||||
|
@ -145,12 +144,6 @@
|
|||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.params {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
gap: 25px;
|
||||
}
|
||||
|
||||
.synchronous-info {
|
||||
display: flex;
|
||||
gap: var(--spacing-s);
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
getSchemaForDatasource,
|
||||
} from "builderStore/dataBinding"
|
||||
import { currentAsset } from "builderStore"
|
||||
import { getFields } from "helpers/searchFields"
|
||||
|
||||
export let componentInstance
|
||||
export let value = []
|
||||
|
@ -31,9 +30,6 @@
|
|||
$: options = Object.keys(schema || {})
|
||||
$: sanitisedValue = getValidColumns(value, options)
|
||||
$: updateBoundValue(sanitisedValue)
|
||||
$: enrichedSchemaFields = getFields(Object.values(schema || {}), {
|
||||
allowLinks: true,
|
||||
})
|
||||
|
||||
const getSchema = (asset, datasource) => {
|
||||
const schema = getSchemaForDatasource(asset, datasource).schema
|
||||
|
|
|
@ -192,7 +192,7 @@
|
|||
<Label>Filters</Label>
|
||||
</div>
|
||||
<div class="fields">
|
||||
{#each rawFilters as filter, idx}
|
||||
{#each rawFilters as filter}
|
||||
<Select
|
||||
bind:value={filter.field}
|
||||
options={fieldOptions}
|
||||
|
@ -228,7 +228,7 @@
|
|||
on:change={event => (filter.value = event.detail)}
|
||||
{fillWidth}
|
||||
/>
|
||||
{:else if ["string", "longform", "number", "formula"].includes(filter.type)}
|
||||
{:else if ["string", "longform", "number", "bigint", "formula"].includes(filter.type)}
|
||||
<Input disabled={filter.noValue} bind:value={filter.value} />
|
||||
{:else if filter.type === "array" || (filter.type === "options" && filter.operator === "oneOf")}
|
||||
<Multiselect
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
<i class={icon} />
|
||||
{:else}
|
||||
<span>
|
||||
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
||||
{@html text}
|
||||
</span>
|
||||
{/if}
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
$: nullishValue = value == null || value === ""
|
||||
$: allBindings = getAllBindings(bindings, componentBindings, nested)
|
||||
$: safeValue = getSafeValue(value, defaultValue, allBindings)
|
||||
$: tempValue = safeValue
|
||||
$: replaceBindings = val => readableToRuntimeBinding(allBindings, val)
|
||||
|
||||
const getAllBindings = (bindings, componentBindings, nested) => {
|
||||
|
@ -104,6 +103,7 @@
|
|||
/>
|
||||
</div>
|
||||
{#if info}
|
||||
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
||||
<div class="text">{@html info}</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
{text || ""}
|
||||
</a>
|
||||
{:else}
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<div class="text" on:click class:active class:disabled>
|
||||
{text || ""}
|
||||
</div>
|
||||
|
|
|
@ -53,6 +53,10 @@ export const FIELDS = {
|
|||
numericality: { greaterThanOrEqualTo: "", lessThanOrEqualTo: "" },
|
||||
},
|
||||
},
|
||||
BIGINT: {
|
||||
name: "BigInt",
|
||||
type: "bigint",
|
||||
},
|
||||
BOOLEAN: {
|
||||
name: "Boolean",
|
||||
type: "boolean",
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
import { groups, licensing, apps, users, auth, admin } from "stores/portal"
|
||||
import { fetchData } from "@budibase/frontend-core"
|
||||
import { API } from "api"
|
||||
import { onMount } from "svelte"
|
||||
import GroupIcon from "../../../portal/users/groups/_components/GroupIcon.svelte"
|
||||
import RoleSelect from "components/common/RoleSelect.svelte"
|
||||
import UpgradeModal from "components/common/users/UpgradeModal.svelte"
|
||||
|
@ -25,7 +24,6 @@
|
|||
|
||||
let query = null
|
||||
let loaded = false
|
||||
let rendered = false
|
||||
let inviting = false
|
||||
let searchFocus = false
|
||||
|
||||
|
@ -384,10 +382,6 @@
|
|||
|
||||
$: initSidePanel($store.builderSidePanel)
|
||||
|
||||
onMount(() => {
|
||||
rendered = true
|
||||
})
|
||||
|
||||
function handleKeyDown(evt) {
|
||||
if (evt.key === "Enter" && queryIsEmail && !inviting) {
|
||||
onInviteUser()
|
||||
|
|
|
@ -49,7 +49,6 @@
|
|||
return datasource.config.spreadsheetId
|
||||
}
|
||||
}
|
||||
$: subtitle = getSubtitle(datasource)
|
||||
</script>
|
||||
|
||||
<div class="button" on:click>
|
||||
|
|
|
@ -272,6 +272,7 @@
|
|||
{:else if error}
|
||||
<div class="center error">
|
||||
<Layout justifyItems="center" gap="S">
|
||||
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
||||
{@html ErrorSVG}
|
||||
<Heading size="L">App preview failed to load</Heading>
|
||||
<Body size="S">{error}</Body>
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
|
||||
let closedNodes = {}
|
||||
|
||||
$: currentScreen = get(selectedScreen)
|
||||
|
||||
$: filteredComponents = components?.filter(component => {
|
||||
return (
|
||||
!$store.componentToPaste?.isCut ||
|
||||
|
|
|
@ -15,12 +15,7 @@
|
|||
{
|
||||
"name": "Layout",
|
||||
"icon": "ClassicGridView",
|
||||
"children": [
|
||||
"container",
|
||||
"section",
|
||||
"grid",
|
||||
"sidepanel"
|
||||
]
|
||||
"children": ["container", "section", "grid", "sidepanel"]
|
||||
},
|
||||
{
|
||||
"name": "Data",
|
||||
|
@ -63,6 +58,7 @@
|
|||
"fieldgroup",
|
||||
"stringfield",
|
||||
"numberfield",
|
||||
"bigintfield",
|
||||
"passwordfield",
|
||||
"optionsfield",
|
||||
"booleanfield",
|
||||
|
@ -79,13 +75,6 @@
|
|||
{
|
||||
"name": "Chart",
|
||||
"icon": "GraphBarVertical",
|
||||
"children": [
|
||||
"bar",
|
||||
"line",
|
||||
"area",
|
||||
"candlestick",
|
||||
"pie",
|
||||
"donut"
|
||||
]
|
||||
"children": ["bar", "line", "area", "candlestick", "pie", "donut"]
|
||||
}
|
||||
]
|
||||
|
|
|
@ -144,7 +144,7 @@
|
|||
<Heading>Apps</Heading>
|
||||
<div class="group">
|
||||
<Layout gap="S" noPadding>
|
||||
{#each userApps as app, idx (app.appId)}
|
||||
{#each userApps as app (app.appId)}
|
||||
<a class="app" target="_blank" href={getUrl(app)}>
|
||||
<div class="preview" use:gradient={{ seed: app.name }} />
|
||||
<div class="app-info">
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
/>
|
||||
{/if}
|
||||
{/each}
|
||||
{#each $menu as { title, href, subPages }}
|
||||
{#each $menu as { title, subPages }}
|
||||
{#if subPages?.length}
|
||||
<div class="category">{title}</div>
|
||||
{#each subPages as { title, href }}
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
let template
|
||||
let creationModal = false
|
||||
let appLimitModal
|
||||
let creatingApp = false
|
||||
|
||||
const initiateAppCreation = () => {
|
||||
if ($licensing?.usageMetrics?.apps >= 100) {
|
||||
|
@ -19,13 +18,11 @@
|
|||
} else {
|
||||
template = null
|
||||
creationModal.show()
|
||||
creatingApp = true
|
||||
}
|
||||
}
|
||||
|
||||
const stopAppCreation = () => {
|
||||
template = null
|
||||
creatingApp = false
|
||||
}
|
||||
|
||||
const initiateAppImport = () => {
|
||||
|
@ -34,7 +31,6 @@
|
|||
} else {
|
||||
template = { fromFile: true }
|
||||
creationModal.show()
|
||||
creatingApp = true
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
let creationModal
|
||||
let appLimitModal
|
||||
let accountLockedModal
|
||||
let creatingApp = false
|
||||
let searchTerm = ""
|
||||
let creatingFromTemplate = false
|
||||
let automationErrors
|
||||
|
@ -123,14 +122,12 @@
|
|||
} else {
|
||||
template = null
|
||||
creationModal.show()
|
||||
creatingApp = true
|
||||
}
|
||||
}
|
||||
|
||||
const initiateAppImport = () => {
|
||||
template = { fromFile: true }
|
||||
creationModal.show()
|
||||
creatingApp = true
|
||||
}
|
||||
|
||||
const autoCreateApp = async () => {
|
||||
|
@ -173,7 +170,6 @@
|
|||
|
||||
const stopAppCreation = () => {
|
||||
template = null
|
||||
creatingApp = false
|
||||
}
|
||||
|
||||
function createAppFromTemplateUrl(templateKey) {
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
export let deleteUsersResponse
|
||||
|
||||
let successCount
|
||||
let failureCount
|
||||
let title
|
||||
let unsuccessfulUsers
|
||||
let message
|
||||
|
@ -37,7 +36,6 @@
|
|||
|
||||
onMount(() => {
|
||||
successCount = deleteUsersResponse.successful.length
|
||||
failureCount = deleteUsersResponse.unsuccessful.length
|
||||
setTitle()
|
||||
setMessage()
|
||||
setUsers()
|
||||
|
|
|
@ -183,7 +183,7 @@
|
|||
const currentUserEmails = (await users.fetch())?.map(x => x.email) || []
|
||||
const newUsers = []
|
||||
|
||||
for (const user of userData?.users) {
|
||||
for (const user of userData?.users ?? []) {
|
||||
const { email } = user
|
||||
|
||||
if (
|
||||
|
|
|
@ -2509,6 +2509,57 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"bigintfield": {
|
||||
"name": "BigInt Field",
|
||||
"icon": "TagBold",
|
||||
"styles": ["size"],
|
||||
"requiredAncestors": ["form"],
|
||||
"editable": true,
|
||||
"size": {
|
||||
"width": 400,
|
||||
"height": 50
|
||||
},
|
||||
"settings": [
|
||||
{
|
||||
"type": "field/bigint",
|
||||
"label": "Field",
|
||||
"key": "field",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"label": "Label",
|
||||
"key": "label"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"label": "Placeholder",
|
||||
"key": "placeholder"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"label": "Default value",
|
||||
"key": "defaultValue"
|
||||
},
|
||||
{
|
||||
"type": "event",
|
||||
"label": "On change",
|
||||
"key": "onChange",
|
||||
"context": [
|
||||
{
|
||||
"label": "Field Value",
|
||||
"key": "value"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"label": "Disabled",
|
||||
"key": "disabled",
|
||||
"defaultValue": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"passwordfield": {
|
||||
"name": "Password Field",
|
||||
"icon": "LockClosed",
|
||||
|
|
|
@ -142,6 +142,7 @@
|
|||
{#if permissionError}
|
||||
<div class="error">
|
||||
<Layout justifyItems="center" gap="S">
|
||||
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
||||
{@html ErrorSVG}
|
||||
<Heading size="L">
|
||||
You don't have permission to use this app
|
||||
|
@ -154,6 +155,7 @@
|
|||
{:else if !$screenStore.activeLayout}
|
||||
<div class="error">
|
||||
<Layout justifyItems="center" gap="S">
|
||||
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
||||
{@html ErrorSVG}
|
||||
<Heading size="L">
|
||||
Something went wrong rendering your app
|
||||
|
@ -166,6 +168,7 @@
|
|||
{:else if embedNoScreens}
|
||||
<div class="error">
|
||||
<Layout justifyItems="center" gap="S">
|
||||
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
||||
{@html ErrorSVG}
|
||||
<Heading size="L">
|
||||
This Budibase app is not publicly accessible
|
||||
|
|
|
@ -203,7 +203,7 @@
|
|||
type: instance._component,
|
||||
errorState,
|
||||
parent: id,
|
||||
ancestors: [...$component?.ancestors, instance._component],
|
||||
ancestors: [...($component?.ancestors ?? []), instance._component],
|
||||
})
|
||||
|
||||
const initialise = (instance, force = false) => {
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
{#if embed}
|
||||
<div class="embed" use:styleable={$component.styles}>
|
||||
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
||||
{@html embed}
|
||||
</div>
|
||||
{:else if $builderStore.inBuilder}
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
>
|
||||
{#if $builderStore.inBuilder}
|
||||
<div class="underlay">
|
||||
{#each coords as coord}
|
||||
{#each coords as _}
|
||||
<div class="placeholder" />
|
||||
{/each}
|
||||
</div>
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
const FieldTypeToComponentMap = {
|
||||
string: "stringfield",
|
||||
number: "numberfield",
|
||||
bigint: "bigintfield",
|
||||
options: "optionsfield",
|
||||
array: "multifieldselect",
|
||||
boolean: "booleanfield",
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
</Body>
|
||||
{#if filters?.length}
|
||||
<div class="fields">
|
||||
{#each filters as filter, idx}
|
||||
{#each filters as filter}
|
||||
<Select
|
||||
bind:value={filter.field}
|
||||
options={fieldOptions}
|
||||
|
@ -133,7 +133,7 @@
|
|||
on:change={e => onOperatorChange(filter, e.detail)}
|
||||
placeholder={null}
|
||||
/>
|
||||
{#if ["string", "longform", "number", "formula"].includes(filter.type)}
|
||||
{#if ["string", "longform", "number", "bigint", "formula"].includes(filter.type)}
|
||||
<Input disabled={filter.noValue} bind:value={filter.value} />
|
||||
{:else if ["options", "array"].includes(filter.type)}
|
||||
<Combobox
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<script>
|
||||
import StringField from "./StringField.svelte"
|
||||
|
||||
export let defaultValue
|
||||
</script>
|
||||
|
||||
<StringField {...$$props} type="bigint" {defaultValue} />
|
|
@ -33,7 +33,10 @@
|
|||
formStep
|
||||
)
|
||||
|
||||
$: schemaType = fieldSchema?.type !== "formula" ? fieldSchema?.type : "string"
|
||||
$: schemaType =
|
||||
fieldSchema?.type !== "formula" && fieldSchema?.type !== "bigint"
|
||||
? fieldSchema?.type
|
||||
: "string"
|
||||
|
||||
// Focus label when editing
|
||||
let labelNode
|
||||
|
|
|
@ -2,6 +2,7 @@ export { default as form } from "./Form.svelte"
|
|||
export { default as fieldgroup } from "./FieldGroup.svelte"
|
||||
export { default as stringfield } from "./StringField.svelte"
|
||||
export { default as numberfield } from "./NumberField.svelte"
|
||||
export { default as bigintfield } from "./BigIntField.svelte"
|
||||
export { default as optionsfield } from "./OptionsField.svelte"
|
||||
export { default as multifieldselect } from "./MultiFieldSelect.svelte"
|
||||
export { default as booleanfield } from "./BooleanField.svelte"
|
||||
|
|
|
@ -6,6 +6,7 @@ const schemaComponentMap = {
|
|||
string: "stringfield",
|
||||
options: "optionsfield",
|
||||
number: "numberfield",
|
||||
bigint: "bigintfield",
|
||||
datetime: "datetimefield",
|
||||
boolean: "booleanfield",
|
||||
formula: "stringfield",
|
||||
|
|
|
@ -37,8 +37,12 @@
|
|||
$: sortedBy = column.name === $sort.column
|
||||
$: canMoveLeft = orderable && idx > 0
|
||||
$: canMoveRight = orderable && idx < $renderedColumns.length - 1
|
||||
$: ascendingLabel = column.schema?.type === "number" ? "low-high" : "A-Z"
|
||||
$: descendingLabel = column.schema?.type === "number" ? "high-low" : "Z-A"
|
||||
$: ascendingLabel = ["number", "bigint"].includes(column.schema?.type)
|
||||
? "low-high"
|
||||
: "A-Z"
|
||||
$: descendingLabel = ["number", "bigint"].includes(column.schema?.type)
|
||||
? "high-low"
|
||||
: "Z-A"
|
||||
|
||||
const editColumn = () => {
|
||||
dispatch("edit-column", column.schema)
|
||||
|
|
|
@ -258,7 +258,7 @@
|
|||
class:wrap={editable || contentLines > 1}
|
||||
on:wheel={e => (focused ? e.stopPropagation() : null)}
|
||||
>
|
||||
{#each value || [] as relationship, idx}
|
||||
{#each value || [] as relationship}
|
||||
{#if relationship.primaryDisplay}
|
||||
<div class="badge">
|
||||
<span
|
||||
|
|
|
@ -18,6 +18,7 @@ const TypeIconMap = {
|
|||
link: "DataCorrelated",
|
||||
formula: "Calculator",
|
||||
json: "Brackets",
|
||||
bigint: "TagBold",
|
||||
}
|
||||
|
||||
export const getColumnIcon = column => {
|
||||
|
|
|
@ -2,16 +2,9 @@
|
|||
import { getContext } from "svelte"
|
||||
import { GutterWidth } from "../lib/constants"
|
||||
|
||||
const {
|
||||
columns,
|
||||
resize,
|
||||
renderedColumns,
|
||||
stickyColumn,
|
||||
isReordering,
|
||||
scrollLeft,
|
||||
} = getContext("grid")
|
||||
const { resize, renderedColumns, stickyColumn, isReordering, scrollLeft } =
|
||||
getContext("grid")
|
||||
|
||||
$: cutoff = $scrollLeft + GutterWidth + ($columns[0]?.width || 0)
|
||||
$: offset = GutterWidth + ($stickyColumn?.width || 0)
|
||||
$: activeColumn = $resize.column
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ export default class DataFetch {
|
|||
let sortType = "string"
|
||||
if (sortColumn) {
|
||||
const type = schema?.[sortColumn]?.type
|
||||
sortType = type === "number" ? "number" : "string"
|
||||
sortType = type === "number" || type === "bigint" ? "number" : "string"
|
||||
}
|
||||
this.options.sortType = sortType
|
||||
|
||||
|
|
|
@ -53,6 +53,9 @@ function generateSchema(
|
|||
schema.float(key)
|
||||
}
|
||||
break
|
||||
case FieldTypes.BIGINT:
|
||||
schema.bigint(key)
|
||||
break
|
||||
case FieldTypes.BOOLEAN:
|
||||
schema.boolean(key)
|
||||
break
|
||||
|
|
|
@ -48,7 +48,6 @@ const SQL_STRING_TYPE_MAP = {
|
|||
blob: FieldTypes.STRING,
|
||||
long: FieldTypes.STRING,
|
||||
text: FieldTypes.STRING,
|
||||
bigint: FieldTypes.STRING,
|
||||
}
|
||||
|
||||
const SQL_BOOLEAN_TYPE_MAP = {
|
||||
|
@ -59,6 +58,7 @@ const SQL_BOOLEAN_TYPE_MAP = {
|
|||
|
||||
const SQL_MISC_TYPE_MAP = {
|
||||
json: FieldTypes.JSON,
|
||||
bigint: FieldTypes.BIGINT,
|
||||
}
|
||||
|
||||
const SQL_TYPE_MAP = {
|
||||
|
|
|
@ -38,7 +38,7 @@ export const getValidOperatorsForType = (
|
|||
}[] = []
|
||||
if (type === "string") {
|
||||
ops = stringOps
|
||||
} else if (type === "number") {
|
||||
} else if (type === "number" || type === "bigint") {
|
||||
ops = numOps
|
||||
} else if (type === "options") {
|
||||
ops = [Op.Equals, Op.NotEquals, Op.Empty, Op.NotEmpty, Op.In]
|
||||
|
|
|
@ -15,6 +15,7 @@ export enum FieldType {
|
|||
JSON = "json",
|
||||
INTERNAL = "internal",
|
||||
BARCODEQR = "barcodeqr",
|
||||
BIGINT = "bigint",
|
||||
}
|
||||
|
||||
export interface RowAttachment {
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
version=$(cat lerna.json \
|
||||
| grep version \
|
||||
| head -1 \
|
||||
| awk -F: '{gsub(/"/,"",$2);gsub(/[[:space:]]*/,"",$2); print $2}' \
|
||||
| sed 's/[",]//g')
|
||||
echo $version
|
|
@ -1,9 +1,5 @@
|
|||
#!/bin/bash
|
||||
version=$(cat lerna.json \
|
||||
| grep version \
|
||||
| head -1 \
|
||||
| awk -F: '{gsub(/"/,"",$2);gsub(/[[:space:]]*/,"",$2); print $2}' \
|
||||
| sed 's/[",]//g')
|
||||
version=$(./scripts/getCurrentVersion.sh)
|
||||
echo "Setting version $version"
|
||||
yarn lerna exec "yarn version --no-git-tag-version --new-version=$version"
|
||||
echo "Updating dependencies"
|
||||
|
|
Loading…
Reference in New Issue