Merge branch 'develop' into clear_form_action
# Conflicts: # packages/client/src/utils/buttonActions.js
This commit is contained in:
commit
cc7a1679f0
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "0.9.80-alpha.4",
|
"version": "0.9.80-alpha.7",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/auth",
|
"name": "@budibase/auth",
|
||||||
"version": "0.9.80-alpha.4",
|
"version": "0.9.80-alpha.7",
|
||||||
"description": "Authentication middlewares for budibase builder and apps",
|
"description": "Authentication middlewares for budibase builder and apps",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/bbui",
|
"name": "@budibase/bbui",
|
||||||
"description": "A UI solution used in the different Budibase projects.",
|
"description": "A UI solution used in the different Budibase projects.",
|
||||||
"version": "0.9.80-alpha.4",
|
"version": "0.9.80-alpha.7",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"svelte": "src/index.js",
|
"svelte": "src/index.js",
|
||||||
"module": "dist/bbui.es.js",
|
"module": "dist/bbui.es.js",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/builder",
|
"name": "@budibase/builder",
|
||||||
"version": "0.9.80-alpha.4",
|
"version": "0.9.80-alpha.7",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -65,10 +65,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^0.9.80-alpha.4",
|
"@budibase/bbui": "^0.9.80-alpha.7",
|
||||||
"@budibase/client": "^0.9.80-alpha.4",
|
"@budibase/client": "^0.9.80-alpha.7",
|
||||||
"@budibase/colorpicker": "1.1.2",
|
"@budibase/colorpicker": "1.1.2",
|
||||||
"@budibase/string-templates": "^0.9.80-alpha.4",
|
"@budibase/string-templates": "^0.9.80-alpha.7",
|
||||||
"@sentry/browser": "5.19.1",
|
"@sentry/browser": "5.19.1",
|
||||||
"@spectrum-css/page": "^3.0.1",
|
"@spectrum-css/page": "^3.0.1",
|
||||||
"@spectrum-css/vars": "^3.0.1",
|
"@spectrum-css/vars": "^3.0.1",
|
||||||
|
|
|
@ -58,5 +58,6 @@
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
gap: var(--spacing-l);
|
gap: var(--spacing-l);
|
||||||
background-color: var(--background);
|
background-color: var(--background);
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -19,7 +19,8 @@
|
||||||
import { fetchData } from "helpers"
|
import { fetchData } from "helpers"
|
||||||
import { users, auth } from "stores/portal"
|
import { users, auth } from "stores/portal"
|
||||||
|
|
||||||
import TagsRenderer from "./_components/TagsTableRenderer.svelte"
|
import TagsRenderer from "./_components/RolesTagsTableRenderer.svelte"
|
||||||
|
|
||||||
import UpdateRolesModal from "./_components/UpdateRolesModal.svelte"
|
import UpdateRolesModal from "./_components/UpdateRolesModal.svelte"
|
||||||
import ForceResetPasswordModal from "./_components/ForceResetPasswordModal.svelte"
|
import ForceResetPasswordModal from "./_components/ForceResetPasswordModal.svelte"
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
<script>
|
||||||
|
import TagsTableRenderer from "./TagsTableRenderer.svelte"
|
||||||
|
export let value
|
||||||
|
|
||||||
|
$: roles = value?.filter(role => role != null).map(role => role.name) ?? []
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<TagsTableRenderer value={roles} />
|
|
@ -4,9 +4,9 @@
|
||||||
|
|
||||||
const displayLimit = 5
|
const displayLimit = 5
|
||||||
|
|
||||||
$: roles = value?.filter(role => role != null).map(role => role.name) ?? []
|
$: values = value?.filter(value => value != null) ?? []
|
||||||
$: tags = roles.slice(0, displayLimit)
|
$: tags = values.slice(0, displayLimit)
|
||||||
$: leftover = roles.length - tags.length
|
$: leftover = values.length - tags.length
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="tag-renderer">
|
<div class="tag-renderer">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/cli",
|
"name": "@budibase/cli",
|
||||||
"version": "0.9.80-alpha.4",
|
"version": "0.9.80-alpha.7",
|
||||||
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/client",
|
"name": "@budibase/client",
|
||||||
"version": "0.9.80-alpha.4",
|
"version": "0.9.80-alpha.7",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"module": "dist/budibase-client.js",
|
"module": "dist/budibase-client.js",
|
||||||
"main": "dist/budibase-client.js",
|
"main": "dist/budibase-client.js",
|
||||||
|
@ -18,9 +18,9 @@
|
||||||
"dev:builder": "rollup -cw"
|
"dev:builder": "rollup -cw"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^0.9.80-alpha.4",
|
"@budibase/bbui": "^0.9.80-alpha.7",
|
||||||
"@budibase/standard-components": "^0.9.80-alpha.4",
|
"@budibase/standard-components": "^0.9.80-alpha.7",
|
||||||
"@budibase/string-templates": "^0.9.80-alpha.4",
|
"@budibase/string-templates": "^0.9.80-alpha.7",
|
||||||
"regexparam": "^1.3.0",
|
"regexparam": "^1.3.0",
|
||||||
"shortid": "^2.2.15",
|
"shortid": "^2.2.15",
|
||||||
"svelte-spa-router": "^3.0.5"
|
"svelte-spa-router": "^3.0.5"
|
||||||
|
|
|
@ -6,8 +6,15 @@ const createAppStore = () => {
|
||||||
|
|
||||||
// Fetches the app definition including screens, layouts and theme
|
// Fetches the app definition including screens, layouts and theme
|
||||||
const fetchAppDefinition = async () => {
|
const fetchAppDefinition = async () => {
|
||||||
const appDefinition = await API.fetchAppPackage(get(store).appId)
|
const appId = get(store)?.appId
|
||||||
store.set(appDefinition)
|
if (!appId) {
|
||||||
|
throw "Cannot fetch app definition without app ID set"
|
||||||
|
}
|
||||||
|
const appDefinition = await API.fetchAppPackage(appId)
|
||||||
|
store.set({
|
||||||
|
...appDefinition,
|
||||||
|
appId: appDefinition?.application?.appId,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets the initial app ID
|
// Sets the initial app ID
|
||||||
|
|
|
@ -10,9 +10,14 @@ const createAuthStore = () => {
|
||||||
store.set(user)
|
store.set(user)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const logOut = async () => {
|
||||||
|
window.document.cookie = `budibase:auth=; budibase:currentapp=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;`
|
||||||
|
window.location = "/builder/auth/login"
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
subscribe: store.subscribe,
|
subscribe: store.subscribe,
|
||||||
actions: { fetchUser },
|
actions: { fetchUser, logOut },
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
import { get } from "svelte/store"
|
import { get } from "svelte/store"
|
||||||
import { routeStore, builderStore, confirmationStore } from "../store"
|
import {
|
||||||
|
routeStore,
|
||||||
|
builderStore,
|
||||||
|
confirmationStore,
|
||||||
|
authStore,
|
||||||
|
} from "../store"
|
||||||
import { saveRow, deleteRow, executeQuery, triggerAutomation } from "../api"
|
import { saveRow, deleteRow, executeQuery, triggerAutomation } from "../api"
|
||||||
import { ActionTypes } from "../constants"
|
import { ActionTypes } from "../constants"
|
||||||
|
|
||||||
|
@ -77,6 +82,10 @@ const refreshDatasourceHandler = async (action, context) => {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const logoutHandler = async () => {
|
||||||
|
await authStore.actions.logOut()
|
||||||
|
}
|
||||||
|
|
||||||
const clearFormHandler = async (action, context) => {
|
const clearFormHandler = async (action, context) => {
|
||||||
return await executeActionHandler(
|
return await executeActionHandler(
|
||||||
context,
|
context,
|
||||||
|
@ -93,6 +102,7 @@ const handlerMap = {
|
||||||
["Trigger Automation"]: triggerAutomationHandler,
|
["Trigger Automation"]: triggerAutomationHandler,
|
||||||
["Validate Form"]: validateFormHandler,
|
["Validate Form"]: validateFormHandler,
|
||||||
["Refresh Datasource"]: refreshDatasourceHandler,
|
["Refresh Datasource"]: refreshDatasourceHandler,
|
||||||
|
["Log Out"]: logoutHandler,
|
||||||
["Clear Form"]: clearFormHandler
|
["Clear Form"]: clearFormHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/server",
|
"name": "@budibase/server",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "0.9.80-alpha.4",
|
"version": "0.9.80-alpha.7",
|
||||||
"description": "Budibase Web Server",
|
"description": "Budibase Web Server",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -60,9 +60,9 @@
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/auth": "^0.9.80-alpha.4",
|
"@budibase/auth": "^0.9.80-alpha.7",
|
||||||
"@budibase/client": "^0.9.80-alpha.4",
|
"@budibase/client": "^0.9.80-alpha.7",
|
||||||
"@budibase/string-templates": "^0.9.80-alpha.4",
|
"@budibase/string-templates": "^0.9.80-alpha.7",
|
||||||
"@elastic/elasticsearch": "7.10.0",
|
"@elastic/elasticsearch": "7.10.0",
|
||||||
"@koa/router": "8.0.0",
|
"@koa/router": "8.0.0",
|
||||||
"@sendgrid/mail": "7.1.1",
|
"@sendgrid/mail": "7.1.1",
|
||||||
|
@ -115,7 +115,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.14.3",
|
"@babel/core": "^7.14.3",
|
||||||
"@babel/preset-env": "^7.14.4",
|
"@babel/preset-env": "^7.14.4",
|
||||||
"@budibase/standard-components": "^0.9.80-alpha.4",
|
"@budibase/standard-components": "^0.9.80-alpha.7",
|
||||||
"@jest/test-sequencer": "^24.8.0",
|
"@jest/test-sequencer": "^24.8.0",
|
||||||
"@types/bull": "^3.15.1",
|
"@types/bull": "^3.15.1",
|
||||||
"@types/jest": "^26.0.23",
|
"@types/jest": "^26.0.23",
|
||||||
|
|
|
@ -29,11 +29,11 @@
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"svelte"
|
"svelte"
|
||||||
],
|
],
|
||||||
"version": "0.9.80-alpha.4",
|
"version": "0.9.80-alpha.7",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc",
|
"gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^0.9.80-alpha.4",
|
"@budibase/bbui": "^0.9.80-alpha.7",
|
||||||
"@spectrum-css/card": "^3.0.3",
|
"@spectrum-css/card": "^3.0.3",
|
||||||
"@spectrum-css/link": "^3.1.3",
|
"@spectrum-css/link": "^3.1.3",
|
||||||
"@spectrum-css/page": "^3.0.1",
|
"@spectrum-css/page": "^3.0.1",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/string-templates",
|
"name": "@budibase/string-templates",
|
||||||
"version": "0.9.80-alpha.4",
|
"version": "0.9.80-alpha.7",
|
||||||
"description": "Handlebars wrapper for Budibase templating.",
|
"description": "Handlebars wrapper for Budibase templating.",
|
||||||
"main": "src/index.cjs",
|
"main": "src/index.cjs",
|
||||||
"module": "dist/bundle.mjs",
|
"module": "dist/bundle.mjs",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/worker",
|
"name": "@budibase/worker",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "0.9.80-alpha.4",
|
"version": "0.9.80-alpha.7",
|
||||||
"description": "Budibase background service",
|
"description": "Budibase background service",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -21,8 +21,8 @@
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/auth": "^0.9.80-alpha.4",
|
"@budibase/auth": "^0.9.80-alpha.7",
|
||||||
"@budibase/string-templates": "^0.9.80-alpha.4",
|
"@budibase/string-templates": "^0.9.80-alpha.7",
|
||||||
"@koa/router": "^8.0.0",
|
"@koa/router": "^8.0.0",
|
||||||
"@techpass/passport-openidconnect": "^0.3.0",
|
"@techpass/passport-openidconnect": "^0.3.0",
|
||||||
"aws-sdk": "^2.811.0",
|
"aws-sdk": "^2.811.0",
|
||||||
|
|
Loading…
Reference in New Issue