Merge branch 'develop' into cypress-testing

This commit is contained in:
Mitch-Budibase 2022-06-21 18:26:16 +01:00
commit f98f306491
15 changed files with 1356 additions and 132 deletions

View File

@ -1,5 +1,5 @@
{ {
"version": "1.0.207-alpha.5", "version": "1.0.207-alpha.6",
"npmClient": "yarn", "npmClient": "yarn",
"packages": [ "packages": [
"packages/*" "packages/*"

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/backend-core", "name": "@budibase/backend-core",
"version": "1.0.207-alpha.5", "version": "1.0.207-alpha.6",
"description": "Budibase backend core libraries used in server and worker", "description": "Budibase backend core libraries used in server and worker",
"main": "dist/src/index.js", "main": "dist/src/index.js",
"types": "dist/src/index.d.ts", "types": "dist/src/index.d.ts",
@ -20,7 +20,7 @@
"test:watch": "jest --watchAll" "test:watch": "jest --watchAll"
}, },
"dependencies": { "dependencies": {
"@budibase/types": "^1.0.207-alpha.5", "@budibase/types": "^1.0.207-alpha.6",
"@techpass/passport-openidconnect": "0.3.2", "@techpass/passport-openidconnect": "0.3.2",
"aws-sdk": "2.1030.0", "aws-sdk": "2.1030.0",
"bcrypt": "5.0.1", "bcrypt": "5.0.1",

View File

@ -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": "1.0.207-alpha.5", "version": "1.0.207-alpha.6",
"license": "MPL-2.0", "license": "MPL-2.0",
"svelte": "src/index.js", "svelte": "src/index.js",
"module": "dist/bbui.es.js", "module": "dist/bbui.es.js",
@ -38,7 +38,7 @@
], ],
"dependencies": { "dependencies": {
"@adobe/spectrum-css-workflow-icons": "^1.2.1", "@adobe/spectrum-css-workflow-icons": "^1.2.1",
"@budibase/string-templates": "^1.0.207-alpha.5", "@budibase/string-templates": "^1.0.207-alpha.6",
"@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actionbutton": "^1.0.1",
"@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1",
"@spectrum-css/avatar": "^3.0.2", "@spectrum-css/avatar": "^3.0.2",

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/builder", "name": "@budibase/builder",
"version": "1.0.207-alpha.5", "version": "1.0.207-alpha.6",
"license": "GPL-3.0", "license": "GPL-3.0",
"private": true, "private": true,
"scripts": { "scripts": {
@ -69,10 +69,10 @@
} }
}, },
"dependencies": { "dependencies": {
"@budibase/bbui": "^1.0.207-alpha.5", "@budibase/bbui": "^1.0.207-alpha.6",
"@budibase/client": "^1.0.207-alpha.5", "@budibase/client": "^1.0.207-alpha.6",
"@budibase/frontend-core": "^1.0.207-alpha.5", "@budibase/frontend-core": "^1.0.207-alpha.6",
"@budibase/string-templates": "^1.0.207-alpha.5", "@budibase/string-templates": "^1.0.207-alpha.6",
"@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",

View File

@ -2,22 +2,47 @@
import { import {
Body, Body,
Input, Input,
Select, Label,
ModalContent, ModalContent,
notifications, notifications,
Select,
Toggle, Toggle,
Label,
} from "@budibase/bbui" } from "@budibase/bbui"
import { createValidationStore, emailValidator } from "helpers/validation" import { createValidationStore, emailValidator } from "helpers/validation"
import { users } from "stores/portal" import { users } from "stores/portal"
export let disabled const password = Math.random().toString(36).substring(2, 22)
const options = ["Email onboarding", "Basic onboarding"] const options = ["Email onboarding", "Basic onboarding"]
let selected = options[0]
let builder, admin
const [email, error, touched] = createValidationStore("", emailValidator) const [email, error, touched] = createValidationStore("", emailValidator)
let disabled
let builder
let admin
let selected = "Email onboarding"
$: basic = selected === "Basic onboarding"
function addUser() {
if (basic) {
createUser()
} else {
createUserFlow()
}
}
async function createUser() {
try {
await users.create({
email: $email,
password,
builder,
admin,
forceResetPassword: true,
})
notifications.success("Successfully created user")
} catch (error) {
notifications.error("Error creating user")
}
}
async function createUserFlow() { async function createUserFlow() {
try { try {
@ -30,7 +55,7 @@
</script> </script>
<ModalContent <ModalContent
onConfirm={createUserFlow} onConfirm={addUser}
size="M" size="M"
title="Add new user" title="Add new user"
confirmText="Add user" confirmText="Add user"
@ -47,17 +72,22 @@
<Select <Select
placeholder={null} placeholder={null}
bind:value={selected} bind:value={selected}
on:change
{options} {options}
label="Add new user via:" label="Add new user via:"
/> />
<Input <Input
type="email" type="email"
label="Email"
bind:value={$email} bind:value={$email}
error={$touched && $error} error={$touched && $error}
placeholder="john@doe.com" placeholder="john@doe.com"
label="Email"
/> />
{#if basic}
<Input disabled label="Password" value={password} />
{/if}
<div> <div>
<div class="toggle"> <div class="toggle">
<Label size="L">Development access</Label> <Label size="L">Development access</Label>

View File

@ -1,74 +0,0 @@
<script>
import {
ModalContent,
Body,
Input,
notifications,
Toggle,
Label,
} from "@budibase/bbui"
import { createValidationStore, emailValidator } from "helpers/validation"
import { users } from "stores/portal"
const [email, error, touched] = createValidationStore("", emailValidator)
const password = Math.random().toString(36).slice(2, 20)
let builder = false,
admin = false
async function createUser() {
try {
await users.create({
email: $email,
password,
builder,
admin,
forceResetPassword: true,
})
notifications.success("Successfully created user")
} catch (error) {
notifications.error(error.message)
}
}
</script>
<ModalContent
onConfirm={createUser}
size="M"
title="Basic user onboarding"
confirmText="Continue"
cancelText="Cancel"
disabled={$error}
error={$touched && $error}
showCloseIcon={false}
>
<Body size="S">
Below you will find the users username and password. The password will not
be accessible from this point. Please save the credentials.
</Body>
<Input
type="email"
label="Email"
bind:value={$email}
error={$touched && $error}
/>
<Input readonly label="Password" value={password} />
<div>
<div class="toggle">
<Label size="L">Development access</Label>
<Toggle text="" bind:value={builder} />
</div>
<div class="toggle">
<Label size="L">Administration access</Label>
<Toggle text="" bind:value={admin} />
</div>
</div>
</ModalContent>
<style>
.toggle {
display: grid;
grid-template-columns: 78% 1fr;
align-items: center;
width: 50%;
}
</style>

View File

@ -15,7 +15,6 @@
} from "@budibase/bbui" } from "@budibase/bbui"
import TagsRenderer from "./_components/TagsTableRenderer.svelte" import TagsRenderer from "./_components/TagsTableRenderer.svelte"
import AddUserModal from "./_components/AddUserModal.svelte" import AddUserModal from "./_components/AddUserModal.svelte"
import BasicOnboardingModal from "./_components/BasicOnboardingModal.svelte"
import { users } from "stores/portal" import { users } from "stores/portal"
import { onMount } from "svelte" import { onMount } from "svelte"
@ -30,7 +29,6 @@
} }
let search let search
let email
$: filteredUsers = $users $: filteredUsers = $users
.filter(user => user.email.includes(search || "")) .filter(user => user.email.includes(search || ""))
.map(user => ({ .map(user => ({
@ -41,12 +39,6 @@
})) }))
let createUserModal let createUserModal
let basicOnboardingModal
function openBasicOnboardingModal() {
createUserModal.hide()
basicOnboardingModal.show()
}
onMount(async () => { onMount(async () => {
try { try {
@ -93,9 +85,8 @@
</Layout> </Layout>
<Modal bind:this={createUserModal}> <Modal bind:this={createUserModal}>
<AddUserModal on:change={openBasicOnboardingModal} /> <AddUserModal />
</Modal> </Modal>
<Modal bind:this={basicOnboardingModal}><BasicOnboardingModal {email} /></Modal>
<style> <style>
.field { .field {

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/cli", "name": "@budibase/cli",
"version": "1.0.207-alpha.5", "version": "1.0.207-alpha.6",
"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": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/client", "name": "@budibase/client",
"version": "1.0.207-alpha.5", "version": "1.0.207-alpha.6",
"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",
@ -19,9 +19,9 @@
"dev:builder": "rollup -cw" "dev:builder": "rollup -cw"
}, },
"dependencies": { "dependencies": {
"@budibase/bbui": "^1.0.207-alpha.5", "@budibase/bbui": "^1.0.207-alpha.6",
"@budibase/frontend-core": "^1.0.207-alpha.5", "@budibase/frontend-core": "^1.0.207-alpha.6",
"@budibase/string-templates": "^1.0.207-alpha.5", "@budibase/string-templates": "^1.0.207-alpha.6",
"@spectrum-css/button": "^3.0.3", "@spectrum-css/button": "^3.0.3",
"@spectrum-css/card": "^3.0.3", "@spectrum-css/card": "^3.0.3",
"@spectrum-css/divider": "^1.0.3", "@spectrum-css/divider": "^1.0.3",

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,12 @@
{ {
"name": "@budibase/frontend-core", "name": "@budibase/frontend-core",
"version": "1.0.207-alpha.5", "version": "1.0.207-alpha.6",
"description": "Budibase frontend core libraries used in builder and client", "description": "Budibase frontend core libraries used in builder and client",
"author": "Budibase", "author": "Budibase",
"license": "MPL-2.0", "license": "MPL-2.0",
"svelte": "src/index.js", "svelte": "src/index.js",
"dependencies": { "dependencies": {
"@budibase/bbui": "^1.0.207-alpha.5", "@budibase/bbui": "^1.0.207-alpha.6",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"svelte": "^3.46.2" "svelte": "^3.46.2"
} }

View File

@ -1,7 +1,7 @@
{ {
"name": "@budibase/server", "name": "@budibase/server",
"email": "hi@budibase.com", "email": "hi@budibase.com",
"version": "1.0.207-alpha.5", "version": "1.0.207-alpha.6",
"description": "Budibase Web Server", "description": "Budibase Web Server",
"main": "src/index.ts", "main": "src/index.ts",
"repository": { "repository": {
@ -77,11 +77,11 @@
"license": "GPL-3.0", "license": "GPL-3.0",
"dependencies": { "dependencies": {
"@apidevtools/swagger-parser": "10.0.3", "@apidevtools/swagger-parser": "10.0.3",
"@budibase/backend-core": "^1.0.207-alpha.5", "@budibase/backend-core": "^1.0.207-alpha.6",
"@budibase/client": "^1.0.207-alpha.5", "@budibase/client": "^1.0.207-alpha.6",
"@budibase/pro": "1.0.207-alpha.5", "@budibase/pro": "1.0.207-alpha.6",
"@budibase/string-templates": "^1.0.207-alpha.5", "@budibase/string-templates": "^1.0.207-alpha.6",
"@budibase/types": "^1.0.207-alpha.5", "@budibase/types": "^1.0.207-alpha.6",
"@bull-board/api": "3.7.0", "@bull-board/api": "3.7.0",
"@bull-board/koa": "3.9.4", "@bull-board/koa": "3.9.4",
"@elastic/elasticsearch": "7.10.0", "@elastic/elasticsearch": "7.10.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/string-templates", "name": "@budibase/string-templates",
"version": "1.0.207-alpha.5", "version": "1.0.207-alpha.6",
"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",

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/types", "name": "@budibase/types",
"version": "1.0.207-alpha.5", "version": "1.0.207-alpha.6",
"description": "Budibase types", "description": "Budibase types",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",

View File

@ -1,7 +1,7 @@
{ {
"name": "@budibase/worker", "name": "@budibase/worker",
"email": "hi@budibase.com", "email": "hi@budibase.com",
"version": "1.0.207-alpha.5", "version": "1.0.207-alpha.6",
"description": "Budibase background service", "description": "Budibase background service",
"main": "src/index.ts", "main": "src/index.ts",
"repository": { "repository": {
@ -34,10 +34,10 @@
"author": "Budibase", "author": "Budibase",
"license": "GPL-3.0", "license": "GPL-3.0",
"dependencies": { "dependencies": {
"@budibase/backend-core": "^1.0.207-alpha.5", "@budibase/backend-core": "^1.0.207-alpha.6",
"@budibase/pro": "1.0.207-alpha.5", "@budibase/pro": "1.0.207-alpha.6",
"@budibase/string-templates": "^1.0.207-alpha.5", "@budibase/string-templates": "^1.0.207-alpha.6",
"@budibase/types": "^1.0.207-alpha.5", "@budibase/types": "^1.0.207-alpha.6",
"@koa/router": "8.0.8", "@koa/router": "8.0.8",
"@sentry/node": "6.17.7", "@sentry/node": "6.17.7",
"@techpass/passport-openidconnect": "0.3.2", "@techpass/passport-openidconnect": "0.3.2",