diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 0000000000..b89ca2f78c
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,14 @@
+---
+name: Feature Request
+about: Request a new budibase feature or enhancement
+title: ''
+labels: enhancement
+assignees: ''
+
+---
+
+**Describe the feature request**
+A clear and concise description of what the feature request.
+
+**Screenshots**
+If applicable, add screenshots to help explain your problem.
diff --git a/README.md b/README.md
index c57b319ec5..9f9092b399 100644
--- a/README.md
+++ b/README.md
@@ -57,7 +57,7 @@
- **Open source and extensible.** Budibase is open-source - licensed as GPL v3. This should fill you with confidence that Budibase will always be around. You can also code against Budibase or fork it and make changes as you please, providing a developer-friendly experience.
-- **Load data or start from scratch.** Budibase pulls in data from multiple sources, including MongoDB, CouchDB, PostgreSQL, mySQL, Airtable, S3, DyanmoDB, or a REST API. And unlike other platforms, with Budibase you can start from scratch and create business apps with no data sources. [Request new data sources](https://github.com/Budibase/budibase/discussions?discussions_q=category%3AIdeas).
+- **Load data or start from scratch.** Budibase pulls in data from multiple sources, including MongoDB, CouchDB, PostgreSQL, MySQL, Airtable, S3, DynamoDB, or a REST API. And unlike other platforms, with Budibase you can start from scratch and create business apps with no data sources. [Request new data sources](https://github.com/Budibase/budibase/discussions?discussions_q=category%3AIdeas).
- **Design and build apps with powerful pre-made components.** Budibase comes out of the box with beautifully designed, powerful components which you can use like building blocks to build your UI. We also expose a lot of your favourite CSS styling options so you can go that extra creative mile. [Request new component](https://github.com/Budibase/budibase/discussions?discussions_q=category%3AIdeas).
diff --git a/lerna.json b/lerna.json
index 5544fba007..b53d8a28b4 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,5 +1,5 @@
{
- "version": "0.9.87-alpha.7",
+ "version": "0.9.96",
"npmClient": "yarn",
"packages": [
"packages/*"
diff --git a/packages/auth/package.json b/packages/auth/package.json
index 010f6a60fc..05687014d3 100644
--- a/packages/auth/package.json
+++ b/packages/auth/package.json
@@ -1,6 +1,6 @@
{
"name": "@budibase/auth",
- "version": "0.9.87-alpha.7",
+ "version": "0.9.96",
"description": "Authentication middlewares for budibase builder and apps",
"main": "src/index.js",
"author": "Budibase",
diff --git a/packages/auth/src/middleware/authenticated.js b/packages/auth/src/middleware/authenticated.js
index 647ec659f5..b58e1917fd 100644
--- a/packages/auth/src/middleware/authenticated.js
+++ b/packages/auth/src/middleware/authenticated.js
@@ -66,6 +66,7 @@ module.exports = (noAuthPatterns = [], opts) => {
}
}
if (error) {
+ console.error("Auth Error", error)
// remove the cookie as the user does not exist anymore
clearCookie(ctx, Cookies.Auth)
} else {
diff --git a/packages/auth/src/middleware/passport/third-party-common.js b/packages/auth/src/middleware/passport/third-party-common.js
index 54252b329d..6c71614679 100644
--- a/packages/auth/src/middleware/passport/third-party-common.js
+++ b/packages/auth/src/middleware/passport/third-party-common.js
@@ -6,7 +6,6 @@ const { authError } = require("./utils")
const { newid } = require("../../hashing")
const { createASession } = require("../../security/sessions")
const { getGlobalUserByEmail } = require("../../utils")
-const fetch = require("node-fetch")
/**
* Common authentication logic for third parties. e.g. OAuth, OIDC.
diff --git a/packages/bbui/package.json b/packages/bbui/package.json
index c3c01e6cbb..2d5a4054c6 100644
--- a/packages/bbui/package.json
+++ b/packages/bbui/package.json
@@ -1,7 +1,7 @@
{
"name": "@budibase/bbui",
"description": "A UI solution used in the different Budibase projects.",
- "version": "0.9.87-alpha.7",
+ "version": "0.9.96",
"license": "AGPL-3.0",
"svelte": "src/index.js",
"module": "dist/bbui.es.js",
diff --git a/packages/bbui/src/Modal/Modal.svelte b/packages/bbui/src/Modal/Modal.svelte
index c93467bc75..f805dec0ad 100644
--- a/packages/bbui/src/Modal/Modal.svelte
+++ b/packages/bbui/src/Modal/Modal.svelte
@@ -70,6 +70,7 @@
>
+
-
-
-
+ {#if title}
+
+ {#if showDivider}
+
+ {/if}
+ {/if}
{/if}
{#if showCloseIcon}
-
@@ -96,6 +103,9 @@
.spectrum-Dialog-heading {
font-family: var(--font-sans);
}
+ .spectrum-Dialog-heading.noDivider {
+ margin-bottom: 12px;
+ }
.spectrum-Dialog-buttonGroup {
gap: var(--spectrum-global-dimension-static-size-200);
diff --git a/packages/bbui/src/Notification/Notification.svelte b/packages/bbui/src/Notification/Notification.svelte
new file mode 100644
index 0000000000..cebc859bda
--- /dev/null
+++ b/packages/bbui/src/Notification/Notification.svelte
@@ -0,0 +1,20 @@
+
+
+
+ {#if icon}
+
+
+
+ {/if}
+
+
diff --git a/packages/bbui/src/Notification/NotificationDisplay.svelte b/packages/bbui/src/Notification/NotificationDisplay.svelte
index 89e7666cc7..9d96bf7e70 100644
--- a/packages/bbui/src/Notification/NotificationDisplay.svelte
+++ b/packages/bbui/src/Notification/NotificationDisplay.svelte
@@ -2,30 +2,16 @@
import "@spectrum-css/toast/dist/index-vars.css"
import Portal from "svelte-portal"
import { flip } from "svelte/animate"
- import { fly } from "svelte/transition"
import { notifications } from "../Stores/notifications"
+ import Notification from "./Notification.svelte"
+ import { fly } from "svelte/transition"
{#each $notifications as { type, icon, message, id } (id)}
-
- {#if icon}
-
-
-
- {/if}
-
+
+
{/each}
@@ -34,7 +20,7 @@
diff --git a/packages/bbui/src/index.js b/packages/bbui/src/index.js
index 4d045e504b..3a491bfb54 100644
--- a/packages/bbui/src/index.js
+++ b/packages/bbui/src/index.js
@@ -38,6 +38,7 @@ export { default as MenuItem } from "./Menu/Item.svelte"
export { default as Modal } from "./Modal/Modal.svelte"
export { default as ModalContent } from "./Modal/ModalContent.svelte"
export { default as NotificationDisplay } from "./Notification/NotificationDisplay.svelte"
+export { default as Notification } from "./Notification/Notification.svelte"
export { default as SideNavigation } from "./SideNavigation/Navigation.svelte"
export { default as SideNavigationItem } from "./SideNavigation/Item.svelte"
export { default as DatePicker } from "./Form/DatePicker.svelte"
diff --git a/packages/builder/package.json b/packages/builder/package.json
index b5d93beb9d..5fa5b41e0b 100644
--- a/packages/builder/package.json
+++ b/packages/builder/package.json
@@ -1,6 +1,6 @@
{
"name": "@budibase/builder",
- "version": "0.9.87-alpha.7",
+ "version": "0.9.96",
"license": "AGPL-3.0",
"private": true,
"scripts": {
@@ -65,10 +65,10 @@
}
},
"dependencies": {
- "@budibase/bbui": "^0.9.87-alpha.7",
- "@budibase/client": "^0.9.87-alpha.7",
+ "@budibase/bbui": "^0.9.96",
+ "@budibase/client": "^0.9.96",
"@budibase/colorpicker": "1.1.2",
- "@budibase/string-templates": "^0.9.87-alpha.7",
+ "@budibase/string-templates": "^0.9.96",
"@sentry/browser": "5.19.1",
"@spectrum-css/page": "^3.0.1",
"@spectrum-css/vars": "^3.0.1",
diff --git a/packages/builder/src/builderStore/store/frontend.js b/packages/builder/src/builderStore/store/frontend.js
index f84e1c8735..3339ea07d6 100644
--- a/packages/builder/src/builderStore/store/frontend.js
+++ b/packages/builder/src/builderStore/store/frontend.js
@@ -70,7 +70,7 @@ export const getFrontendStore = () => {
url: application.url,
layouts,
screens,
- theme: application.theme,
+ theme: application.theme || "spectrum--light",
hasAppPackage: true,
appInstance: application.instance,
clientLibPath,
diff --git a/packages/builder/src/components/common/bindings/DrawerBindableCombobox.svelte b/packages/builder/src/components/common/bindings/DrawerBindableCombobox.svelte
index 38f8693f51..a48a91a44f 100644
--- a/packages/builder/src/components/common/bindings/DrawerBindableCombobox.svelte
+++ b/packages/builder/src/components/common/bindings/DrawerBindableCombobox.svelte
@@ -18,8 +18,8 @@
const dispatch = createEventDispatcher()
let bindingDrawer
- $: tempValue = Array.isArray(value) ? value : []
$: readableValue = runtimeToReadableBinding(bindings, value)
+ $: tempValue = readableValue
const handleClose = () => {
onChange(tempValue)
@@ -56,7 +56,7 @@
slot="body"
value={readableValue}
close={handleClose}
- on:update={event => (tempValue = event.detail)}
+ on:change={event => (tempValue = event.detail)}
bindableProperties={bindings}
/>
diff --git a/packages/builder/src/components/design/AppPreview/AppThemeSelect.svelte b/packages/builder/src/components/design/AppPreview/AppThemeSelect.svelte
index c9d937593b..21dae25708 100644
--- a/packages/builder/src/components/design/AppPreview/AppThemeSelect.svelte
+++ b/packages/builder/src/components/design/AppPreview/AppThemeSelect.svelte
@@ -24,7 +24,7 @@
store.actions.theme.save(e.detail)}
diff --git a/packages/builder/src/components/design/AppPreview/iframeTemplate.js b/packages/builder/src/components/design/AppPreview/iframeTemplate.js
index 9ae26bdaaf..1e3ff7c856 100644
--- a/packages/builder/src/components/design/AppPreview/iframeTemplate.js
+++ b/packages/builder/src/components/design/AppPreview/iframeTemplate.js
@@ -47,6 +47,18 @@ export default `
return
}
+ // Parse received message
+ // If parsing fails, just ignore and wait for the next message
+ let parsed
+ try {
+ parsed = JSON.parse(event.data)
+ } catch (error) {
+ // Ignore
+ }
+ if (!parsed) {
+ return
+ }
+
// Extract data from message
const {
selectedComponentId,
@@ -55,7 +67,7 @@ export default `
previewType,
appId,
theme
- } = JSON.parse(event.data)
+ } = parsed
// Set some flags so the app knows we're in the builder
window["##BUDIBASE_IN_BUILDER##"] = true
diff --git a/packages/builder/src/components/design/PropertiesPanel/ComponentSettingsSection.svelte b/packages/builder/src/components/design/PropertiesPanel/ComponentSettingsSection.svelte
index 0900bae1a7..972a2bb7fe 100644
--- a/packages/builder/src/components/design/PropertiesPanel/ComponentSettingsSection.svelte
+++ b/packages/builder/src/components/design/PropertiesPanel/ComponentSettingsSection.svelte
@@ -11,6 +11,7 @@
export let componentDefinition
export let componentInstance
export let assetInstance
+ export let bindings
const layoutDefinition = []
const screenDefinition = [
@@ -65,6 +66,7 @@
options: setting.options,
placeholder: setting.placeholder,
}}
+ {bindings}
/>
{/if}
{/each}
diff --git a/packages/builder/src/components/design/PropertiesPanel/ConditionalUISection.svelte b/packages/builder/src/components/design/PropertiesPanel/ConditionalUISection.svelte
index b1f65f3593..2802f38c2b 100644
--- a/packages/builder/src/components/design/PropertiesPanel/ConditionalUISection.svelte
+++ b/packages/builder/src/components/design/PropertiesPanel/ConditionalUISection.svelte
@@ -4,6 +4,7 @@
import ConditionalUIDrawer from "./PropertyControls/ConditionalUIDrawer.svelte"
export let componentInstance
+ export let bindings
let tempValue
let drawer
@@ -32,5 +33,5 @@
Show, hide and update components in response to conditions being met.
save()}>Save
-
+
diff --git a/packages/builder/src/components/design/PropertiesPanel/DesignSection.svelte b/packages/builder/src/components/design/PropertiesPanel/DesignSection.svelte
index 639ac90586..fa1a357f38 100644
--- a/packages/builder/src/components/design/PropertiesPanel/DesignSection.svelte
+++ b/packages/builder/src/components/design/PropertiesPanel/DesignSection.svelte
@@ -4,6 +4,7 @@
export let componentDefinition
export let componentInstance
+ export let bindings
const getStyles = def => {
if (!def?.styles?.length) {
@@ -29,6 +30,7 @@
columns={style.columns}
properties={style.settings}
{componentInstance}
+ {bindings}
/>
{/each}
{/if}
diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertiesPanel.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertiesPanel.svelte
index e85c30a171..27f6650cde 100644
--- a/packages/builder/src/components/design/PropertiesPanel/PropertiesPanel.svelte
+++ b/packages/builder/src/components/design/PropertiesPanel/PropertiesPanel.svelte
@@ -1,27 +1,45 @@
{#key componentInstance?._id}
-
-
-
-
-
+
+
+
+
+
{/key}
diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ConditionalUIDrawer.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ConditionalUIDrawer.svelte
index 8b9cad1b7c..006039edda 100644
--- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ConditionalUIDrawer.svelte
+++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ConditionalUIDrawer.svelte
@@ -13,12 +13,12 @@
import { generate } from "shortid"
import DrawerBindableInput from "components/common/bindings/DrawerBindableInput.svelte"
import { OperatorOptions, getValidOperatorsForType } from "helpers/lucene"
- import { getBindableProperties } from "builderStore/dataBinding"
- import { currentAsset, selectedComponent, store } from "builderStore"
+ import { selectedComponent, store } from "builderStore"
import { getComponentForSettingType } from "./componentSettings"
import PropertyControl from "./PropertyControl.svelte"
export let conditions = []
+ export let bindings = []
const flipDurationMs = 150
const actionOptions = [
@@ -64,10 +64,6 @@
value: setting.key,
}
})
- $: bindableProperties = getBindableProperties(
- $currentAsset,
- $store.selectedComponentId
- )
$: conditions.forEach(link => {
if (!link.id) {
link.id = generate()
@@ -194,6 +190,7 @@
placeholder: getSettingDefinition(condition.setting)
.placeholder,
}}
+ {bindings}
/>
{:else}
@@ -201,7 +198,7 @@
{/if}
IF
(condition.newValue = e.detail)}
@@ -222,7 +219,7 @@
{#if ["string", "number"].includes(condition.valueType)}
(condition.referenceValue = e.detail)}
diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/DataSourceSelect.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/DataSourceSelect.svelte
index c8ce846192..d86f13e100 100644
--- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/DataSourceSelect.svelte
+++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/DataSourceSelect.svelte
@@ -1,8 +1,5 @@
+
+
+ This action doesn't require any additional settings.
+
+ This action won't do anything if there isn't a screen modal open.
+
+
+
+
diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/DeleteRow.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/DeleteRow.svelte
index aa657beea5..35a1a6ec86 100644
--- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/DeleteRow.svelte
+++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/DeleteRow.svelte
@@ -1,14 +1,12 @@
diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/ExecuteQuery.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/ExecuteQuery.svelte
index d4e70dac05..5dc56a7d74 100644
--- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/ExecuteQuery.svelte
+++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/ExecuteQuery.svelte
@@ -1,21 +1,16 @@
@@ -18,19 +15,17 @@
on:change={value => (parameters.url = value.detail)}
{bindings}
/>
+
+
diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/SaveFields.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/SaveFields.svelte
index bf88ed2caf..52bd84c453 100644
--- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/SaveFields.svelte
+++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/SaveFields.svelte
@@ -1,7 +1,5 @@
-
+
diff --git a/packages/builder/src/components/design/PropertiesPanel/ScreenSettingsSection.svelte b/packages/builder/src/components/design/PropertiesPanel/ScreenSettingsSection.svelte
index a153c4fc87..79f262eaae 100644
--- a/packages/builder/src/components/design/PropertiesPanel/ScreenSettingsSection.svelte
+++ b/packages/builder/src/components/design/PropertiesPanel/ScreenSettingsSection.svelte
@@ -9,6 +9,7 @@
import { FrontendTypes } from "constants"
export let componentInstance
+ export let bindings
function setAssetProps(name, value) {
const selectedAsset = get(currentAsset)
@@ -44,6 +45,7 @@
key={def.key}
value={deepGet($currentAsset, def.key)}
onChange={val => setAssetProps(def.key, val)}
+ {bindings}
/>
{/each}
diff --git a/packages/builder/src/components/design/PropertiesPanel/StyleSection.svelte b/packages/builder/src/components/design/PropertiesPanel/StyleSection.svelte
index 0341c68534..18d63cfbce 100644
--- a/packages/builder/src/components/design/PropertiesPanel/StyleSection.svelte
+++ b/packages/builder/src/components/design/PropertiesPanel/StyleSection.svelte
@@ -7,6 +7,7 @@
export let columns
export let properties
export let componentInstance
+ export let bindings = []
$: style = componentInstance._styles.normal || {}
$: changed = properties?.some(prop => hasPropChanged(style, prop)) ?? false
@@ -36,6 +37,7 @@
value={style[prop.key]}
onChange={val => store.actions.components.updateStyle(prop.key, val)}
props={getControlProps(prop)}
+ {bindings}
/>
{/each}
diff --git a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/CreateEditRelationship/CreateEditRelationship.svelte b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/CreateEditRelationship/CreateEditRelationship.svelte
index 9a9b8b20b1..33ca4608ff 100644
--- a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/CreateEditRelationship/CreateEditRelationship.svelte
+++ b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/CreateEditRelationship/CreateEditRelationship.svelte
@@ -158,10 +158,16 @@
fieldName: fromTable.primary[0],
}
} else {
+ // the relateFrom.fieldName should remain the same, as it is the foreignKey in the other
+ // table, this is due to the way that budibase represents relationships, the fieldName in a
+ // link column schema is the column linked to (FK in this case). The foreignKey column is
+ // essentially what is linked to in the from table, this is unique to SQL as this isn't a feature
+ // of Budibase internal tables.
+ // Essentially this means the fieldName is what we are linking to in the other table, and the
+ // foreignKey is what is linking out of the current table.
relateFrom = {
...relateFrom,
- foreignKey: relateFrom.fieldName,
- fieldName: fromTable.primary[0],
+ foreignKey: fromTable.primary[0],
}
relateTo = {
...relateTo,
diff --git a/packages/cli/package.json b/packages/cli/package.json
index 97cf46b543..cff9d6ed48 100644
--- a/packages/cli/package.json
+++ b/packages/cli/package.json
@@ -1,6 +1,6 @@
{
"name": "@budibase/cli",
- "version": "0.9.87-alpha.7",
+ "version": "0.9.96",
"description": "Budibase CLI, for developers, self hosting and migrations.",
"main": "src/index.js",
"bin": {
diff --git a/packages/client/package.json b/packages/client/package.json
index b9be897525..270e5d64bf 100644
--- a/packages/client/package.json
+++ b/packages/client/package.json
@@ -1,6 +1,6 @@
{
"name": "@budibase/client",
- "version": "0.9.87-alpha.7",
+ "version": "0.9.96",
"license": "MPL-2.0",
"module": "dist/budibase-client.js",
"main": "dist/budibase-client.js",
@@ -18,9 +18,9 @@
"dev:builder": "rollup -cw"
},
"dependencies": {
- "@budibase/bbui": "^0.9.87-alpha.7",
- "@budibase/standard-components": "^0.9.87-alpha.7",
- "@budibase/string-templates": "^0.9.87-alpha.7",
+ "@budibase/bbui": "^0.9.96",
+ "@budibase/standard-components": "^0.9.96",
+ "@budibase/string-templates": "^0.9.96",
"regexparam": "^1.3.0",
"shortid": "^2.2.15",
"svelte-spa-router": "^3.0.5"
diff --git a/packages/client/src/api/api.js b/packages/client/src/api/api.js
index b915f14fd1..5449c3f219 100644
--- a/packages/client/src/api/api.js
+++ b/packages/client/src/api/api.js
@@ -38,15 +38,15 @@ const makeApiCall = async ({ method, url, body, json = true }) => {
case 200:
return response.json()
case 401:
- notificationStore.danger("Invalid credentials")
+ notificationStore.actions.error("Invalid credentials")
return handleError(`Invalid credentials`)
case 404:
- notificationStore.danger("Not found")
+ notificationStore.actions.warning("Not found")
return handleError(`${url}: Not Found`)
case 400:
return handleError(`${url}: Bad Request`)
case 403:
- notificationStore.danger(
+ notificationStore.actions.error(
"Your session has expired, or you don't have permission to access that data"
)
return handleError(`${url}: Forbidden`)
diff --git a/packages/client/src/api/automations.js b/packages/client/src/api/automations.js
index 4dd5958568..2b989f85ae 100644
--- a/packages/client/src/api/automations.js
+++ b/packages/client/src/api/automations.js
@@ -9,7 +9,7 @@ export const triggerAutomation = async (automationId, fields) => {
body: { fields },
})
res.error
- ? notificationStore.danger("An error has occurred")
- : notificationStore.success("Automation triggered")
+ ? notificationStore.actions.error("An error has occurred")
+ : notificationStore.actions.success("Automation triggered")
return res
}
diff --git a/packages/client/src/api/queries.js b/packages/client/src/api/queries.js
index 715841f0fa..a6ef1a763f 100644
--- a/packages/client/src/api/queries.js
+++ b/packages/client/src/api/queries.js
@@ -7,7 +7,7 @@ import API from "./api"
export const executeQuery = async ({ queryId, parameters }) => {
const query = await API.get({ url: `/api/queries/${queryId}` })
if (query?.datasourceId == null) {
- notificationStore.danger("That query couldn't be found")
+ notificationStore.actions.error("That query couldn't be found")
return
}
const res = await API.post({
@@ -17,9 +17,9 @@ export const executeQuery = async ({ queryId, parameters }) => {
},
})
if (res.error) {
- notificationStore.danger("An error has occurred")
+ notificationStore.actions.error("An error has occurred")
} else if (!query.readable) {
- notificationStore.success("Query executed successfully")
+ notificationStore.actions.success("Query executed successfully")
dataSourceStore.actions.invalidateDataSource(query.datasourceId)
}
return res
diff --git a/packages/client/src/api/rows.js b/packages/client/src/api/rows.js
index 14d696351d..21f8ec1f98 100644
--- a/packages/client/src/api/rows.js
+++ b/packages/client/src/api/rows.js
@@ -27,8 +27,8 @@ export const saveRow = async row => {
body: row,
})
res.error
- ? notificationStore.danger("An error has occurred")
- : notificationStore.success("Row saved")
+ ? notificationStore.actions.error("An error has occurred")
+ : notificationStore.actions.success("Row saved")
// Refresh related datasources
dataSourceStore.actions.invalidateDataSource(row.tableId)
@@ -48,8 +48,8 @@ export const updateRow = async row => {
body: row,
})
res.error
- ? notificationStore.danger("An error has occurred")
- : notificationStore.success("Row updated")
+ ? notificationStore.actions.error("An error has occurred")
+ : notificationStore.actions.success("Row updated")
// Refresh related datasources
dataSourceStore.actions.invalidateDataSource(row.tableId)
@@ -72,8 +72,8 @@ export const deleteRow = async ({ tableId, rowId, revId }) => {
},
})
res.error
- ? notificationStore.danger("An error has occurred")
- : notificationStore.success("Row deleted")
+ ? notificationStore.actions.error("An error has occurred")
+ : notificationStore.actions.success("Row deleted")
// Refresh related datasources
dataSourceStore.actions.invalidateDataSource(tableId)
@@ -95,8 +95,8 @@ export const deleteRows = async ({ tableId, rows }) => {
},
})
res.error
- ? notificationStore.danger("An error has occurred")
- : notificationStore.success(`${rows.length} row(s) deleted`)
+ ? notificationStore.actions.error("An error has occurred")
+ : notificationStore.actions.success(`${rows.length} row(s) deleted`)
// Refresh related datasources
dataSourceStore.actions.invalidateDataSource(tableId)
diff --git a/packages/client/src/components/ClientApp.svelte b/packages/client/src/components/ClientApp.svelte
index 44ef49e239..1afcc4594d 100644
--- a/packages/client/src/components/ClientApp.svelte
+++ b/packages/client/src/components/ClientApp.svelte
@@ -4,6 +4,7 @@
import Component from "./Component.svelte"
import NotificationDisplay from "./NotificationDisplay.svelte"
import ConfirmationDisplay from "./ConfirmationDisplay.svelte"
+ import PeekScreenDisplay from "./PeekScreenDisplay.svelte"
import Provider from "./Provider.svelte"
import SDK from "../sdk"
import {
@@ -93,13 +94,14 @@
{:else if $screenStore.activeLayout}
-
+
{#key $screenStore.activeLayout._id}
{/key}
+
{#key $builderStore.selectedComponentId}
{#if $builderStore.inBuilder}
@@ -131,6 +133,9 @@
#app-root {
position: relative;
}
+ #app-root.preview {
+ border: 1px solid var(--spectrum-global-color-gray-300);
+ }
/* Custom scrollbars */
:global(::-webkit-scrollbar) {
diff --git a/packages/client/src/components/NotificationDisplay.svelte b/packages/client/src/components/NotificationDisplay.svelte
index 1a960c383a..f03fb692fd 100644
--- a/packages/client/src/components/NotificationDisplay.svelte
+++ b/packages/client/src/components/NotificationDisplay.svelte
@@ -1,36 +1,34 @@
- {#each $notifications as notification (notification.id)}
-
-
{notification.message}
- {#if notification.icon}
{/if}
-
- {/each}
+ {#if $notificationStore}
+ {#key $notificationStore.id}
+
+
+
+ {/key}
+ {/if}
diff --git a/packages/client/src/components/PeekScreenDisplay.svelte b/packages/client/src/components/PeekScreenDisplay.svelte
new file mode 100644
index 0000000000..6d6e8c39c7
--- /dev/null
+++ b/packages/client/src/components/PeekScreenDisplay.svelte
@@ -0,0 +1,120 @@
+
+
+{#if $peekStore.showPeek}
+
+
+
+ Full screen
+
+
+ Close
+
+
+
+
+
+
+{/if}
+
+
diff --git a/packages/client/src/components/Router.svelte b/packages/client/src/components/Router.svelte
index f3af2e94a4..5632d812b5 100644
--- a/packages/client/src/components/Router.svelte
+++ b/packages/client/src/components/Router.svelte
@@ -1,6 +1,6 @@