Merge branch 'develop' of github.com:Budibase/budibase into feature/portal-usage

This commit is contained in:
mike12345567 2022-05-19 10:45:26 +01:00
commit 663f5aef7b
17 changed files with 84 additions and 76 deletions

View File

@ -1,5 +1,5 @@
{
"version": "1.0.164-alpha.3",
"version": "1.0.167-alpha.3",
"npmClient": "yarn",
"packages": [
"packages/*"

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/backend-core",
"version": "1.0.164-alpha.3",
"version": "1.0.167-alpha.3",
"description": "Budibase backend core libraries used in server and worker",
"main": "src/index.js",
"author": "Budibase",

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/bbui",
"description": "A UI solution used in the different Budibase projects.",
"version": "1.0.164-alpha.3",
"version": "1.0.167-alpha.3",
"license": "MPL-2.0",
"svelte": "src/index.js",
"module": "dist/bbui.es.js",
@ -38,7 +38,7 @@
],
"dependencies": {
"@adobe/spectrum-css-workflow-icons": "^1.2.1",
"@budibase/string-templates": "^1.0.164-alpha.3",
"@budibase/string-templates": "^1.0.167-alpha.3",
"@spectrum-css/actionbutton": "^1.0.1",
"@spectrum-css/actiongroup": "^1.0.1",
"@spectrum-css/avatar": "^3.0.2",

View File

@ -1,4 +1,5 @@
import filterTests from "../support/filterTests"
const interact = require('../support/interact')
filterTests(['all'], () => {
context("Add Multi-Option Datatype", () => {
@ -17,19 +18,19 @@ filterTests(['all'], () => {
cy.navigateToFrontend()
cy.wait(500)
// Add data provider
cy.get(`[data-cy="category-Data"]`).click()
cy.get(`[data-cy="component-Data Provider"]`).click()
cy.get('[data-cy="dataSource-prop-control"]').click()
cy.get(".dropdown").contains("Multi Data").click()
cy.get(interact.CATEGORY_DATA).click()
cy.get(interact.COMPONENT_DATA_PROVIDER).click()
cy.get(interact.DATASOURCE_PROP_CONTROL).click()
cy.get(interact.DROPDOWN).contains("Multi Data").click()
cy.wait(500)
// Add Form with schema to match table
cy.addComponent("Form", "Form")
cy.get('[data-cy="dataSource-prop-control"').click()
cy.get(".dropdown").contains("Multi Data").click()
cy.get(interact.DATASOURCE_PROP_CONTROL).click()
cy.get(interact.DROPDOWN).contains("Multi Data").click()
cy.wait(500)
// Add multi-select picker to form
cy.addComponent("Form", "Multi-select Picker").then(componentId => {
cy.get('[data-cy="field-prop-control"]').type("Test Data").type("{enter}")
cy.get(interact.DATASOURCE_FIELD_CONTROL).type("Test Data").type("{enter}")
cy.wait(1000)
cy.getComponent(componentId).contains("Choose some options").click()
// Check picker has 5 items
@ -40,7 +41,7 @@ filterTests(['all'], () => {
}
// Check items have been selected
cy.getComponent(componentId)
.find(".spectrum-Picker-label")
.find(interact.SPECTRUM_Picker_LABEL)
.contains("(5)")
})
})

View File

@ -1,4 +1,5 @@
import filterTests from "../support/filterTests"
const interact = require('../support/interact')
filterTests(['all'], () => {
context("Add Radio Buttons", () => {
@ -12,10 +13,10 @@ filterTests(['all'], () => {
cy.addComponent("Form", "Form")
cy.addComponent("Form", "Options Picker").then((componentId) => {
// Provide field setting
cy.get(`[data-cy="field-prop-control"]`).type("1")
cy.get(interact.DATASOURCE_FIELD_CONTROL).type("1")
// Open dropdown and select Radio buttons
cy.get(`[data-cy="optionsType-prop-control"]`).click().then(() => {
cy.get('.spectrum-Popover').contains('Radio buttons')
cy.get(interact.OPTION_TYPE_PROP_CONTROL).click().then(() => {
cy.get(interact.SPECTRUM_POPOVER).contains('Radio buttons')
.wait(500)
.click()
})
@ -28,8 +29,8 @@ filterTests(['all'], () => {
})
const addRadioButtonData = (totalRadioButtons) => {
cy.get(`[data-cy="optionsSource-prop-control"]`).click().then(() => {
cy.get('.spectrum-Popover').contains('Custom')
cy.get(interact.OPTION_SOURCE_PROP_CONROL).click().then(() => {
cy.get(interact.SPECTRUM_POPOVER).contains('Custom')
.wait(500)
.click()
})

View File

@ -643,13 +643,14 @@ Cypress.Commands.add("addDatasourceConfig", (datasource, skipFetch) => {
.click({ force: true })
})
} else {
cy.intercept("**/tables").as("datasourceTables")
cy.get(".spectrum-Dialog-grid").within(() => {
cy.get(".spectrum-Button")
.contains("Save and fetch tables")
.click({ force: true })
// Check modal closes after datasource config & fetch
cy.get(".spectrum-Dialog-grid", { timeout: 7000 }).should("not.exist")
})
// Wait for tables to be fetched
cy.wait("@datasourceTables", { timeout: 60000 })
}
})

View File

@ -8,6 +8,19 @@ export const TEMPLATE_CATEGORY_ACTIONGROUP = ".template-category"
export const TEMPLATE_CATEGORY_FILTER_ACTIONBUTTON =
".template-category-filters .spectrum-ActionButton"
export const SPECTRUM_MODAL = ".spectrum-Modal"
export const APP_NAME_INPUT = "input" // we need to update this with atribute cy-data
export const APP_NAME_INPUT = "input" // we need to update this with atribute cy-data;
export const SPECTRUM_BUTTON_GROUP = ".spectrum-ButtonGroup"
export const SPECTRUM_MODAL_INPUT = ".spectrum-Modal input"
//AddMultiOptionDatatype test
export const CATEGORY_DATA = '[data-cy="category-Data"]'
export const COMPONENT_DATA_PROVIDER = '[data-cy="component-Data Provider"]'
export const DATASOURCE_PROP_CONTROL = '[data-cy="dataSource-prop-control"]'
export const DROPDOWN = ".dropdown"
export const SPECTRUM_Picker_LABEL = ".spectrum-Picker-label"
export const DATASOURCE_FIELD_CONTROL = '[data-cy="field-prop-control"]'
export const OPTION_TYPE_PROP_CONTROL = '[data-cy="optionsType-prop-control'
//AddRadioButtons
export const SPECTRUM_POPOVER = ".spectrum-Popover"
export const OPTION_SOURCE_PROP_CONROL = '[data-cy="optionsSource-prop-control'

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/builder",
"version": "1.0.164-alpha.3",
"version": "1.0.167-alpha.3",
"license": "GPL-3.0",
"private": true,
"scripts": {
@ -67,10 +67,10 @@
}
},
"dependencies": {
"@budibase/bbui": "^1.0.164-alpha.3",
"@budibase/client": "^1.0.164-alpha.3",
"@budibase/frontend-core": "^1.0.164-alpha.3",
"@budibase/string-templates": "^1.0.164-alpha.3",
"@budibase/bbui": "^1.0.167-alpha.3",
"@budibase/client": "^1.0.167-alpha.3",
"@budibase/frontend-core": "^1.0.167-alpha.3",
"@budibase/string-templates": "^1.0.167-alpha.3",
"@sentry/browser": "5.19.1",
"@spectrum-css/page": "^3.0.1",
"@spectrum-css/vars": "^3.0.1",

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/cli",
"version": "1.0.164-alpha.3",
"version": "1.0.167-alpha.3",
"description": "Budibase CLI, for developers, self hosting and migrations.",
"main": "src/index.js",
"bin": {

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/client",
"version": "1.0.164-alpha.3",
"version": "1.0.167-alpha.3",
"license": "MPL-2.0",
"module": "dist/budibase-client.js",
"main": "dist/budibase-client.js",
@ -19,9 +19,9 @@
"dev:builder": "rollup -cw"
},
"dependencies": {
"@budibase/bbui": "^1.0.164-alpha.3",
"@budibase/frontend-core": "^1.0.164-alpha.3",
"@budibase/string-templates": "^1.0.164-alpha.3",
"@budibase/bbui": "^1.0.167-alpha.3",
"@budibase/frontend-core": "^1.0.167-alpha.3",
"@budibase/string-templates": "^1.0.167-alpha.3",
"@spectrum-css/button": "^3.0.3",
"@spectrum-css/card": "^3.0.3",
"@spectrum-css/divider": "^1.0.3",

View File

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

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/server",
"email": "hi@budibase.com",
"version": "1.0.164-alpha.3",
"version": "1.0.167-alpha.3",
"description": "Budibase Web Server",
"main": "src/index.ts",
"repository": {
@ -69,10 +69,10 @@
"license": "GPL-3.0",
"dependencies": {
"@apidevtools/swagger-parser": "^10.0.3",
"@budibase/backend-core": "^1.0.164-alpha.3",
"@budibase/client": "^1.0.164-alpha.3",
"@budibase/pro": "1.0.164-alpha.3",
"@budibase/string-templates": "^1.0.164-alpha.3",
"@budibase/backend-core": "^1.0.167-alpha.3",
"@budibase/client": "^1.0.167-alpha.3",
"@budibase/pro": "1.0.167-alpha.3",
"@budibase/string-templates": "^1.0.167-alpha.3",
"@bull-board/api": "^3.7.0",
"@bull-board/koa": "^3.7.0",
"@elastic/elasticsearch": "7.10.0",
@ -146,6 +146,7 @@
"@budibase/standard-components": "^0.9.139",
"@jest/test-sequencer": "^24.8.0",
"@types/apidoc": "^0.50.0",
"@types/bson": "^4.2.0",
"@types/bull": "^3.15.1",
"@types/google-spreadsheet": "^3.1.5",
"@types/jest": "^27.4.1",

View File

@ -113,29 +113,20 @@ module MongoDBModule {
}
parseQueryParams(params: string, mode: string) {
let queryParams = params.split(/(?<=(},)).*{/g)
let group1 = queryParams[0]
let group2 = queryParams[2]
let group3 = queryParams[4]
if (group1) {
group1 = JSON.parse(group1.replace(/,+$/, ""))
}
if (group2) {
group2 = JSON.parse("{" + group2.replace(/,+$/, ""))
}
if (group3) {
group3 = JSON.parse("{" + group3.replace(/,+$/, ""))
}
let queryParams = params.split(/(?<=}),[\n\s]*(?={)/g)
let group1 = queryParams[0] ? JSON.parse(queryParams[0]) : {}
let group2 = queryParams[1] ? JSON.parse(queryParams[1]) : {}
let group3 = queryParams[2] ? JSON.parse(queryParams[2]) : {}
if (mode === "update") {
return {
filter: group1,
update: group2,
options: group3 ?? {},
options: group3,
}
}
return {
filter: group1,
options: group2 ?? {},
options: group2,
}
}

View File

@ -1014,10 +1014,10 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
"@budibase/backend-core@1.0.164-alpha.3":
version "1.0.164-alpha.3"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.0.164-alpha.3.tgz#305c79ded2da369d087ac192ffc7c2a4e9445f44"
integrity sha512-EYh/N1osHv2VQs0KEoY3sXiR9N18dSVzwGwJauc6ucCP3cUUMv/rzPI6t7Amk2JRIjBaJmGTV+gMb0BBZiQBHw==
"@budibase/backend-core@1.0.167-alpha.3":
version "1.0.167-alpha.3"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.0.167-alpha.3.tgz#bb82ba4bbd6aaca47ceb97cb97047f4f615fd9a9"
integrity sha512-sETe50Nid+uuwg0/liEjhy9/o9ygjrYSOJJf1CzuC8xW1ni9wHMMrPx3vsHxYs21aE1+nW1hNgkCUw5kpw7Kjg==
dependencies:
"@techpass/passport-openidconnect" "^0.3.0"
aws-sdk "^2.901.0"
@ -1091,12 +1091,12 @@
svelte-flatpickr "^3.2.3"
svelte-portal "^1.0.0"
"@budibase/pro@1.0.164-alpha.3":
version "1.0.164-alpha.3"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.0.164-alpha.3.tgz#ad599aea5ebfb5fe7a8587e0b96ca1329a2f7671"
integrity sha512-VYu1SxVt2gTRj7U/600DYTzORDcXkPWfTxRUgNQSJRZxaro2y69RFsQtQc+5Aa/dykLCQ9P7b8Nyyf9Wgs7gIg==
"@budibase/pro@1.0.167-alpha.3":
version "1.0.167-alpha.3"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.0.167-alpha.3.tgz#22fa274ffbd50e08dfe5ca4bb546f14d68ba02d4"
integrity sha512-y6bQmNxRRChGJUVRu/FEUdkBlYZlGpxMC8xBSd8oj1FDRdTofbL0it2XUEI3P8H5zBM0J33pw6x27dlWnrOItg==
dependencies:
"@budibase/backend-core" "1.0.164-alpha.3"
"@budibase/backend-core" "1.0.167-alpha.3"
node-fetch "^2.6.1"
"@budibase/standard-components@^0.9.139":
@ -2430,7 +2430,7 @@
"@types/connect" "*"
"@types/node" "*"
"@types/bson@*":
"@types/bson@*", "@types/bson@^4.2.0":
version "4.2.0"
resolved "https://registry.yarnpkg.com/@types/bson/-/bson-4.2.0.tgz#a2f71e933ff54b2c3bf267b67fa221e295a33337"
integrity sha512-ELCPqAdroMdcuxqwMgUpifQyRoTpyYCNr1V9xKyF40VsBobsj+BbWNRvwGchMgBPGqkw655ypkjj2MEF5ywVwg==

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/string-templates",
"version": "1.0.164-alpha.3",
"version": "1.0.167-alpha.3",
"description": "Handlebars wrapper for Budibase templating.",
"main": "src/index.cjs",
"module": "dist/bundle.mjs",

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/worker",
"email": "hi@budibase.com",
"version": "1.0.164-alpha.3",
"version": "1.0.167-alpha.3",
"description": "Budibase background service",
"main": "src/index.ts",
"repository": {
@ -31,9 +31,9 @@
"author": "Budibase",
"license": "GPL-3.0",
"dependencies": {
"@budibase/backend-core": "^1.0.164-alpha.3",
"@budibase/pro": "1.0.164-alpha.3",
"@budibase/string-templates": "^1.0.164-alpha.3",
"@budibase/backend-core": "^1.0.167-alpha.3",
"@budibase/pro": "1.0.167-alpha.3",
"@budibase/string-templates": "^1.0.167-alpha.3",
"@koa/router": "^8.0.0",
"@sentry/node": "6.17.7",
"@techpass/passport-openidconnect": "^0.3.0",

View File

@ -293,10 +293,10 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
"@budibase/backend-core@1.0.164-alpha.3":
version "1.0.164-alpha.3"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.0.164-alpha.3.tgz#305c79ded2da369d087ac192ffc7c2a4e9445f44"
integrity sha512-EYh/N1osHv2VQs0KEoY3sXiR9N18dSVzwGwJauc6ucCP3cUUMv/rzPI6t7Amk2JRIjBaJmGTV+gMb0BBZiQBHw==
"@budibase/backend-core@1.0.167-alpha.3":
version "1.0.167-alpha.3"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.0.167-alpha.3.tgz#bb82ba4bbd6aaca47ceb97cb97047f4f615fd9a9"
integrity sha512-sETe50Nid+uuwg0/liEjhy9/o9ygjrYSOJJf1CzuC8xW1ni9wHMMrPx3vsHxYs21aE1+nW1hNgkCUw5kpw7Kjg==
dependencies:
"@techpass/passport-openidconnect" "^0.3.0"
aws-sdk "^2.901.0"
@ -321,12 +321,12 @@
uuid "^8.3.2"
zlib "^1.0.5"
"@budibase/pro@1.0.164-alpha.3":
version "1.0.164-alpha.3"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.0.164-alpha.3.tgz#ad599aea5ebfb5fe7a8587e0b96ca1329a2f7671"
integrity sha512-VYu1SxVt2gTRj7U/600DYTzORDcXkPWfTxRUgNQSJRZxaro2y69RFsQtQc+5Aa/dykLCQ9P7b8Nyyf9Wgs7gIg==
"@budibase/pro@1.0.167-alpha.3":
version "1.0.167-alpha.3"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.0.167-alpha.3.tgz#22fa274ffbd50e08dfe5ca4bb546f14d68ba02d4"
integrity sha512-y6bQmNxRRChGJUVRu/FEUdkBlYZlGpxMC8xBSd8oj1FDRdTofbL0it2XUEI3P8H5zBM0J33pw6x27dlWnrOItg==
dependencies:
"@budibase/backend-core" "1.0.164-alpha.3"
"@budibase/backend-core" "1.0.167-alpha.3"
node-fetch "^2.6.1"
"@cspotcode/source-map-consumer@0.8.0":