-
-
{item.label || item.field}
+ >
+
+
+ {item.field}
+
+
+
{readableText}
@@ -53,4 +81,20 @@
.list-item-body {
justify-content: space-between;
}
+ .type-icon {
+ display: flex;
+ gap: var(--spacing-m);
+ margin: var(--spacing-xl);
+ margin-bottom: 0px;
+ height: var(--spectrum-alias-item-height-m);
+ padding: 0px var(--spectrum-alias-item-padding-m);
+ border-width: var(--spectrum-actionbutton-border-size);
+ border-radius: var(--spectrum-alias-border-radius-regular);
+ border: 1px solid
+ var(
+ --spectrum-actionbutton-m-border-color,
+ var(--spectrum-alias-border-color)
+ );
+ align-items: center;
+ }
diff --git a/packages/builder/src/components/integration/RestQueryViewer.svelte b/packages/builder/src/components/integration/RestQueryViewer.svelte
index 254f65fcaf..e6913b0953 100644
--- a/packages/builder/src/components/integration/RestQueryViewer.svelte
+++ b/packages/builder/src/components/integration/RestQueryViewer.svelte
@@ -196,8 +196,36 @@
}
}
+ const validateQuery = async () => {
+ const forbiddenBindings = /{{\s?user(\.(\w|\$)*\s?|\s?)}}/g
+ const bindingError = new Error(
+ "'user' is a protected binding and cannot be used"
+ )
+
+ if (forbiddenBindings.test(url)) {
+ throw bindingError
+ }
+
+ if (forbiddenBindings.test(query.fields.requestBody ?? "")) {
+ throw bindingError
+ }
+
+ Object.values(requestBindings).forEach(bindingValue => {
+ if (forbiddenBindings.test(bindingValue)) {
+ throw bindingError
+ }
+ })
+
+ Object.values(query.fields.headers).forEach(headerValue => {
+ if (forbiddenBindings.test(headerValue)) {
+ throw bindingError
+ }
+ })
+ }
+
async function runQuery() {
try {
+ await validateQuery()
response = await queries.preview(buildQuery())
if (response.rows.length === 0) {
notifications.info("Request did not return any data")
diff --git a/packages/builder/src/pages/builder/app/[application]/_components/BuilderSidePanel.svelte b/packages/builder/src/pages/builder/app/[application]/_components/BuilderSidePanel.svelte
index a7d9584330..f9a40b09a6 100644
--- a/packages/builder/src/pages/builder/app/[application]/_components/BuilderSidePanel.svelte
+++ b/packages/builder/src/pages/builder/app/[application]/_components/BuilderSidePanel.svelte
@@ -516,6 +516,13 @@
}
return null
}
+
+ const parseRole = user => {
+ if (user.isAdminOrGlobalBuilder) {
+ return Constants.Roles.CREATOR
+ }
+ return user.role
+ }
@@ -725,7 +732,7 @@
diff --git a/packages/builder/src/pages/builder/app/[application]/data/table/[tableId]/index.svelte b/packages/builder/src/pages/builder/app/[application]/data/table/[tableId]/index.svelte
index 414722a177..a68a782bed 100644
--- a/packages/builder/src/pages/builder/app/[application]/data/table/[tableId]/index.svelte
+++ b/packages/builder/src/pages/builder/app/[application]/data/table/[tableId]/index.svelte
@@ -53,7 +53,8 @@
}
.alert-wrap {
display: flex;
- width: 100%;
+ flex: 0 0 auto;
+ margin: -28px -40px 14px -40px;
}
.alert-wrap :global(> *) {
flex: 1;
diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Component/ComponentSettingsPanel.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Component/ComponentSettingsPanel.svelte
index afcada4138..affa115ca2 100644
--- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Component/ComponentSettingsPanel.svelte
+++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Component/ComponentSettingsPanel.svelte
@@ -1,10 +1,12 @@
+
+
+
{#if styles?.length > 0}
{#each styles as style}
{
- if (component._instanceName) {
- return component._instanceName
- }
- const type =
- component._component.replace("@budibase/standard-components/", "") ||
- "component"
- return capitalise(type)
- }
-
const getComponentIcon = component => {
const def = store.actions.components.getDefinition(component?._component)
return def?.icon
diff --git a/packages/builder/src/pages/builder/app/[application]/design/_components/NewScreen/CreateScreenModal.svelte b/packages/builder/src/pages/builder/app/[application]/design/_components/NewScreen/CreateScreenModal.svelte
index 9a96242b30..92ed3dcfc7 100644
--- a/packages/builder/src/pages/builder/app/[application]/design/_components/NewScreen/CreateScreenModal.svelte
+++ b/packages/builder/src/pages/builder/app/[application]/design/_components/NewScreen/CreateScreenModal.svelte
@@ -12,6 +12,7 @@
import { capitalise } from "helpers"
import { goto } from "@roxi/routify"
+ let mode
let pendingScreen
// Modal refs
@@ -100,14 +101,15 @@
}
// Handler for NewScreenModal
- export const show = mode => {
+ export const show = newMode => {
+ mode = newMode
selectedTemplates = null
blankScreenUrl = null
screenMode = mode
pendingScreen = null
screenAccessRole = Roles.BASIC
- if (mode === "table") {
+ if (mode === "table" || mode === "grid") {
datasourceModal.show()
} else if (mode === "blank") {
let templates = getTemplates($tables.list)
@@ -123,6 +125,7 @@
// Handler for DatasourceModal confirmation, move to screen access select
const confirmScreenDatasources = async ({ templates }) => {
+ console.log(templates)
selectedTemplates = templates
screenAccessRoleModal.show()
}
@@ -177,6 +180,7 @@
diff --git a/packages/builder/src/pages/builder/app/[application]/design/_components/NewScreen/DatasourceModal.svelte b/packages/builder/src/pages/builder/app/[application]/design/_components/NewScreen/DatasourceModal.svelte
index a866cd23d4..731c60a406 100644
--- a/packages/builder/src/pages/builder/app/[application]/design/_components/NewScreen/DatasourceModal.svelte
+++ b/packages/builder/src/pages/builder/app/[application]/design/_components/NewScreen/DatasourceModal.svelte
@@ -7,6 +7,7 @@
import rowListScreen from "builderStore/store/screenTemplates/rowListScreen"
import DatasourceTemplateRow from "./DatasourceTemplateRow.svelte"
+ export let mode
export let onCancel
export let onConfirm
export let initialScreens = []
@@ -24,7 +25,10 @@
screen => screen.resourceId !== resourceId
)
} else {
- selectedScreens = [...selectedScreens, rowListScreen([datasource])[0]]
+ selectedScreens = [
+ ...selectedScreens,
+ rowListScreen([datasource], mode)[0],
+ ]
}
}
diff --git a/packages/builder/src/pages/builder/app/[application]/design/_components/NewScreen/grid.png b/packages/builder/src/pages/builder/app/[application]/design/_components/NewScreen/grid.png
new file mode 100644
index 0000000000..c3efa30a67
Binary files /dev/null and b/packages/builder/src/pages/builder/app/[application]/design/_components/NewScreen/grid.png differ
diff --git a/packages/builder/src/pages/builder/app/[application]/design/_components/NewScreen/index.svelte b/packages/builder/src/pages/builder/app/[application]/design/_components/NewScreen/index.svelte
index b504940ca7..6b080747b0 100644
--- a/packages/builder/src/pages/builder/app/[application]/design/_components/NewScreen/index.svelte
+++ b/packages/builder/src/pages/builder/app/[application]/design/_components/NewScreen/index.svelte
@@ -3,6 +3,7 @@
import CreationPage from "components/common/CreationPage.svelte"
import blankImage from "./blank.png"
import tableImage from "./table.png"
+ import gridImage from "./grid.png"
import CreateScreenModal from "./CreateScreenModal.svelte"
import { store } from "builderStore"
@@ -43,6 +44,16 @@
View, edit and delete rows on a table