Merge branch 'master' of github.com:Budibase/budibase into fix/cypress-fixes

This commit is contained in:
mike12345567 2021-06-01 12:15:34 +01:00
commit 807379168e
121 changed files with 772 additions and 807 deletions

View File

@ -8,7 +8,7 @@ on:
jobs: jobs:
release: release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/setup-node@v1 - uses: actions/setup-node@v1
@ -24,10 +24,22 @@ jobs:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
- run: yarn test - run: yarn test
# - name: Publish budibase packages to NPM - name: Configure AWS Credentials
# env: uses: aws-actions/configure-aws-credentials@v1
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }} with:
# run: yarn release aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-1
- name: Publish budibase packages to NPM
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
# setup the username and email. I tend to use 'GitHub Actions Bot' with no email by default
git config user.name "Budibase Release Bot"
git config user.email "<>"
echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} >> .npmrc
yarn release
- name: Build/release Docker images - name: Build/release Docker images
run: | run: |

View File

@ -1,8 +1,12 @@
Copyright 2019-2021, Budibase Ltd Copyright 2019-2021, Budibase Inc.
Each Budibase package has its own license: Each Budibase package has its own license:
builder: AGPLv3 builder: GPLv3
server: GPLv3 server: GPLv3
client: MPLv2.0 client: MPLv2.0
standard-components: MPLv2.0 standard-components: MPLv2.0
You can consider Budibase to be GPLv3 licensed.
The apps that you build with Budibase do not fall under GPLv3 - hence why our components and client library are licensed differently.

View File

@ -8,10 +8,10 @@
</h1> </h1>
<h3 align="center"> <h3 align="center">
Build custom business tools in minutes and on your own infrastructure Build internal tools on your own infrastructure in minutes
</h3> </h3>
<p align="center"> <p align="center">
Budibase is an open-source low-code platform, helping developers and IT professionals build, automate, and ship custom business apps in minutes and on their own infrastructure. Budibase is an open-source low-code platform, helping developers and IT professionals build, automate, and ship internal tools on their own infrastructure in minutes.
</p> </p>
<h3 align="center"> <h3 align="center">
@ -58,7 +58,6 @@
## ✨ Features ## ✨ Features
When other platforms chose the closed source route, we decided to go open source. When other platforms chose cloud builders, we decided a local builder offered the better developer experience. We like to do things differently at Budibase.
- **Build and ship real software.** Unlike other platforms, with Budibase you build and ship single page applications. Budibase applications have performance baked in and can be designed responsively, providing your users with a great experience. - **Build and ship real software.** Unlike other platforms, with Budibase you build and ship single page applications. Budibase applications have performance baked in and can be designed responsively, providing your users with a great experience.
@ -70,13 +69,14 @@ When other platforms chose the closed source route, we decided to go open source
- **Automate processes, integrate with other tools, and connect to webhooks.** Save time by automating manual processes and workflows. From connecting to webhooks, to automating emails, simply tell Budibase what to do and let it work for you. You can easily [create new automations for Budibase here](https://github.com/Budibase/automations) or [request new integrations here](https://github.com/Budibase/budibase/discussions?discussions_q=category%3AIdeas). - **Automate processes, integrate with other tools, and connect to webhooks.** Save time by automating manual processes and workflows. From connecting to webhooks, to automating emails, simply tell Budibase what to do and let it work for you. You can easily [create new automations for Budibase here](https://github.com/Budibase/automations) or [request new integrations here](https://github.com/Budibase/budibase/discussions?discussions_q=category%3AIdeas).
- **Cloud hosting and self-hosting.** Users can self-host (see below), or host their apps with Budibase. Currently, our cloud hosting offering is limited to the free tier but we aim to change this in the future. For heavy usage, we advise users to self-host.
<p align="center"> <p align="center">
<img alt="Budibase design ui" src="https://imgur.com/v8m6v3q.png"> <img alt="Budibase design ui" src="https://imgur.com/v8m6v3q.png">
</p> </p>
---
## ⌛ Status ## ⌛ Status
- [x] Alpha: We are demoing Budibase to users and receiving feedback - [x] Alpha: We are demoing Budibase to users and receiving feedback
- [x] Private Beta: We are testing Budibase with a closed set of customers - [x] Private Beta: We are testing Budibase with a closed set of customers
@ -96,25 +96,43 @@ Watch "releases" of this repo to get notified of major updates, and give the sta
If you are having issues between updates of the builder, please use the guide [here](https://github.com/Budibase/budibase/blob/HEAD/.github/CONTRIBUTING.md#troubleshooting) to clear down your environment. If you are having issues between updates of the builder, please use the guide [here](https://github.com/Budibase/budibase/blob/HEAD/.github/CONTRIBUTING.md#troubleshooting) to clear down your environment.
## 🏁 Getting Started with Budibase ---
The Budibase builder runs in Electron, on Mac, PC and Linux. Follow the steps below to get started:
- [ ] [Sign-up to Budibase](https://portal.budi.live/signup)
- [ ] Create a username and password
- [ ] Copy your API key
- [ ] Download Budibase
- [ ] Open Budibase and enter your API key
[Here is a guided tutorial](https://docs.budibase.com/tutorial/tutorial-signing-up) if you need extra help.
## 🤖 Self-hosting ## 🏁 Getting Started with Budibase in 5 minutes
Budibase wants to make sure anyone can use the tools we develop and we know a lot of people need to be able to host the apps they make on their own systems - that is why we've decided to try and make self hosting as easy as possible! To get started, you must have docker and docker compose installed on your machine.
Once you have Docker installed, the process takes 5 minutes, with these four steps:
Currently, you can host your apps using Docker or Digital Ocean. The documentation for self-hosting can be found [here](https://docs.budibase.com/self-hosting/introduction-to-self-hosting). 1. Install the Budibase CLI.
[![Deploy to DO](https://www.deploytodo.com/do-btn-blue.svg)](https://cloud.digitalocean.com/droplets/new?onboarding_origin=marketplace&i=09038e&fleetUuid=bb04f9c8-1de8-4687-b2ae-1d5177a0535b&appId=77729671&type=applications&size=s-4vcpu-8gb&region=nyc1&refcode=0caaa6085a82&image=budibase-20-04) ```
$ npm i -g @budibase/cli
```
2. Setup Budibase (select where to store Budibase, and the port to run it on)
```
budi hosting --init
```
3. Run Budibase
```
budi hosting --start
```
4. Create your admin user
Enter the email and password for the new admin user.
Done! You are now ready to build powerful internal tools in minutes. For additional information on how to get started and learn Budibase, visit our [docs](https://docs.budibase.com/getting-started).
---
## 🎓 Learning Budibase ## 🎓 Learning Budibase
@ -124,6 +142,9 @@ The Budibase [documentation lives here](https://docs.budibase.com).
You can also follow a quick tutorial on [how to build a CRM with Budibase](https://docs.budibase.com/tutorial/tutorial-introduction) You can also follow a quick tutorial on [how to build a CRM with Budibase](https://docs.budibase.com/tutorial/tutorial-introduction)
---
## Roadmap ## Roadmap
Checkout our [Public Roadmap](https://github.com/Budibase/budibase/projects/10). If you would like to discuss some of the items on the roadmap, please feel to reach out on [Discord](https://discord.gg/rCYayfe), or via [Github discussions](https://github.com/Budibase/budibase/discussions) Checkout our [Public Roadmap](https://github.com/Budibase/budibase/projects/10). If you would like to discuss some of the items on the roadmap, please feel to reach out on [Discord](https://discord.gg/rCYayfe), or via [Github discussions](https://github.com/Budibase/budibase/discussions)
@ -151,10 +172,18 @@ Budibase is a monorepo managed by lerna. Lerna manages the building and publishi
For more information, see [CONTRIBUTING.md](https://github.com/Budibase/budibase/blob/HEAD/.github/CONTRIBUTING.md) For more information, see [CONTRIBUTING.md](https://github.com/Budibase/budibase/blob/HEAD/.github/CONTRIBUTING.md)
---
## 📝 License ## 📝 License
Budibase is open-source. The builder is licensed [AGPL v3](https://www.gnu.org/licenses/agpl-3.0.en.html), the server is licensed [GPL v3](https://www.gnu.org/licenses/gpl-3.0.en.html), and the client is licensed [MPL](https://directory.fsf.org/wiki/License:MPL-2.0). Budibase is open-source. The builder is licensed [AGPL v3](https://www.gnu.org/licenses/agpl-3.0.en.html), the server is licensed [GPL v3](https://www.gnu.org/licenses/gpl-3.0.en.html), and the client is licensed [MPL](https://directory.fsf.org/wiki/License:MPL-2.0).
---
## 💬 Get in touch ## 💬 Get in touch
If you have a question or would like to talk with other Budibase users, please hop over to [Github discussions](https://github.com/Budibase/budibase/discussions) or join our Discord server: If you have a question or would like to talk with other Budibase users, please hop over to [Github discussions](https://github.com/Budibase/budibase/discussions) or join our Discord server:
@ -164,6 +193,9 @@ If you have a question or would like to talk with other Budibase users, please h
![Discord Shield](https://discordapp.com/api/guilds/733030666647765003/widget.png?style=shield) ![Discord Shield](https://discordapp.com/api/guilds/733030666647765003/widget.png?style=shield)
---
## Contributors ✨ ## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

View File

@ -1,5 +1,5 @@
{ {
"version": "0.9.5", "version": "0.9.18",
"npmClient": "yarn", "npmClient": "yarn",
"packages": [ "packages": [
"packages/*" "packages/*"

View File

@ -23,7 +23,7 @@
"initialise": "lerna run initialise", "initialise": "lerna run initialise",
"publishdev": "lerna run publishdev", "publishdev": "lerna run publishdev",
"publishnpm": "yarn build && lerna publish --force-publish", "publishnpm": "yarn build && lerna publish --force-publish",
"release": "lerna publish --force-publish --yes", "release": "yarn build && lerna publish patch --yes --force-publish",
"restore": "yarn run clean && yarn run bootstrap && yarn run build", "restore": "yarn run clean && yarn run bootstrap && yarn run build",
"nuke": "yarn run nuke:packages && yarn run nuke:docker", "nuke": "yarn run nuke:packages && yarn run nuke:docker",
"nuke:packages": "yarn run restore", "nuke:packages": "yarn run restore",

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/auth", "name": "@budibase/auth",
"version": "0.9.5", "version": "0.9.18",
"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",

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": "0.9.5", "version": "0.9.18",
"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",

View File

@ -11,6 +11,7 @@
export let icon = "" export let icon = ""
export let dataCy = null export let dataCy = null
export let size = "M" export let size = "M"
export let active = false
function longPress(element) { function longPress(element) {
if (!longPressable) return if (!longPressable) return
@ -40,6 +41,7 @@
class:spectrum-ActionButton--emphasized={emphasized} class:spectrum-ActionButton--emphasized={emphasized}
class:is-selected={selected} class:is-selected={selected}
class="spectrum-ActionButton spectrum-ActionButton--size{size}" class="spectrum-ActionButton spectrum-ActionButton--size{size}"
class:active
{disabled} {disabled}
on:longPress on:longPress
on:click|preventDefault on:click|preventDefault
@ -67,3 +69,10 @@
<span class="spectrum-ActionButton-label"><slot /></span> <span class="spectrum-ActionButton-label"><slot /></span>
{/if} {/if}
</button> </button>
<style>
.active,
.active svg {
color: var(--spectrum-global-color-blue-600);
}
</style>

View File

@ -39,7 +39,7 @@
color: white; color: white;
display: grid; display: grid;
place-items: center; place-items: center;
font-weight: 500; font-weight: 600;
background: #3aab87; background: #3aab87;
border-radius: 50%; border-radius: 50%;
overflow: hidden; overflow: hidden;

View File

@ -50,7 +50,7 @@
.name { .name {
text-align: left; text-align: left;
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 600;
letter-spacing: 0.14px; letter-spacing: 0.14px;
color: var(--ink); color: var(--ink);
flex: 1 1 auto; flex: 1 1 auto;

View File

@ -285,9 +285,6 @@
--spectrum-global-dimension-font-size-400 --spectrum-global-dimension-font-size-400
); );
} }
.container * {
font-family: "Inter", sans-serif !important;
}
.gallery, .gallery,
.spectrum-Dropzone { .spectrum-Dropzone {
@ -346,7 +343,7 @@
.extension { .extension {
color: var(--spectrum-global-color-gray-600); color: var(--spectrum-global-color-gray-600);
text-transform: uppercase; text-transform: uppercase;
font-weight: 500; font-weight: 600;
margin-bottom: 5px; margin-bottom: 5px;
} }

View File

@ -95,7 +95,7 @@
overflow: visible; overflow: visible;
} }
.spectrum-Dialog-heading { .spectrum-Dialog-heading {
font-family: var(--spectrum-alias-body-text-font-family); font-family: var(--font-sans);
} }
.spectrum-Dialog-buttonGroup { .spectrum-Dialog-buttonGroup {

View File

@ -49,7 +49,7 @@
border: 1px solid var(--spectrum-global-color-gray-300); border: 1px solid var(--spectrum-global-color-gray-300);
border-radius: 2px; border-radius: 2px;
text-transform: uppercase; text-transform: uppercase;
font-weight: 500; font-weight: 600;
font-size: 11px; font-size: 11px;
} }
</style> </style>

View File

@ -40,11 +40,6 @@
--rounded-medium: 8px; --rounded-medium: 8px;
--rounded-large: 16px; --rounded-large: 16px;
--font-normal: "Inter";
--font-black: "Inter Black";
--font-bold: "Inter Bold";
--font-medium: "Inter Medium";
--font-light: "Inter Light";
--font-sans: Source Sans Pro, -apple-system, BlinkMacSystemFont, Segoe UI, "Inter", --font-sans: Source Sans Pro, -apple-system, BlinkMacSystemFont, Segoe UI, "Inter",
"Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";

View File

@ -1,21 +1,23 @@
GNU AFFERO GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
Version 3, 19 November 2007 Version 3, 29 June 2007
Copyright 2019-2021, Budibase Ltd Copyright 2019-2021, Budibase Inc
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.
Preamble Preamble
The GNU Affero General Public License is a free, copyleft license for The GNU General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure software and other kinds of works.
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast, to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free share and change all versions of a program--to make sure it remains free
software for all its users. software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you price. Our General Public Licenses are designed to make sure that you
@ -24,34 +26,44 @@ them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things. free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights To protect your rights, we need to prevent others from denying you
with two steps: (1) assert copyright on the software, and (2) offer these rights or asking you to surrender the rights. Therefore, you have
you this License which gives you legal permission to copy, distribute certain responsibilities if you distribute copies of the software, or if
and/or modify the software. you modify it: responsibilities to respect the freedom of others.
A secondary benefit of defending all users' freedom is that For example, if you distribute copies of such a program, whether
improvements made in alternate versions of the program, if they gratis or for a fee, you must pass on to the recipients the same
receive widespread use, become available for other developers to freedoms that you received. You must make sure that they, too, receive
incorporate. Many developers of free software are heartened and or can get the source code. And you must show them these terms so they
encouraged by the resulting cooperation. However, in the case of know their rights.
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to Developers that use the GNU GPL protect your rights with two steps:
ensure that, in such cases, the modified source code becomes available (1) assert copyright on the software, and (2) offer you this License
to the community. It requires the operator of a network server to giving you legal permission to copy, distribute and/or modify it.
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and For the developers' and authors' protection, the GPL clearly explains
published by Affero, was designed to accomplish similar goals. This is that there is no warranty for this free software. For both users' and
a different license, not a version of the Affero GPL, but Affero has authors' sake, the GPL requires that modified versions be marked as
released a new version of the Affero GPL which permits relicensing under changed, so that their problems will not be attributed erroneously to
this license. authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and The precise terms and conditions for copying, distribution and
modification follow. modification follow.
@ -60,7 +72,7 @@ modification follow.
0. Definitions. 0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License. "This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks. works, such as semiconductor masks.
@ -537,45 +549,35 @@ to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program. License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License. 13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work, License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version but the special requirements of the GNU Affero General Public License,
3 of the GNU General Public License. section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License. 14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions the GNU General Public License from time to time. Such new versions will
will be similar in spirit to the present version, but may differ in detail to be similar in spirit to the present version, but may differ in detail to
address new problems or concerns. address new problems or concerns.
Each version is given a distinguishing version number. If the Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published GNU General Public License, you may choose any version ever published
by the Free Software Foundation. by the Free Software Foundation.
If the Program specifies that a proxy can decide which future If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you public statement of acceptance of a version permanently authorizes you
to choose that version for the Program. to choose that version for the Program.
@ -633,29 +635,40 @@ the "copyright" line and a pointer to where the full notice is found.
Copyright (C) <year> <name of author> Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published it under the terms of the GNU General Public License as published by
by the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail. Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer If the program does terminal interaction, make it output a short
network, you should also make sure that it provides a way for users to notice like this when it starts in an interactive mode:
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive <program> Copyright (C) <year> <name of author>
of the code. There are many ways you could offer source, and different This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
solutions will be better for different programs; see section 13 for the This is free software, and you are welcome to redistribute it
specific requirements. under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school, You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary. if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>. <https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

View File

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.1.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 128 128" style="enable-background:new 0 0 128 128;" xml:space="preserve">
<style type="text/css">
.st0{fill:#393C44;}
.st1{fill:#FFFFFF;}
</style>
<g>
<path class="st0" d="M117.33,128H10.67C4.78,128,0,123.22,0,117.33V10.67C0,4.78,4.78,0,10.67,0h106.67
C123.22,0,128,4.78,128,10.67v106.67C128,123.22,123.22,128,117.33,128z"/>
<g>
<path class="st1" d="M75.94,32v27.84c3.14-3.38,7.07-5.07,11.79-5.07c2.8,0,5.37,0.54,7.7,1.63c2.33,1.09,4.32,2.55,5.97,4.39
c1.65,1.84,2.93,4.01,3.87,6.51c0.93,2.5,1.4,5.16,1.4,7.98c0,2.87-0.48,5.57-1.44,8.09c-0.96,2.52-2.3,4.72-4.02,6.58
c-1.72,1.87-3.75,3.34-6.08,4.43C92.8,95.46,90.28,96,87.58,96c-4.91,0-8.79-1.84-11.64-5.52v4.31H62.6V32H75.94z M92.74,75.5
c0-1.21-0.22-2.36-0.66-3.44c-0.44-1.08-1.06-2.03-1.84-2.84c-0.79-0.81-1.7-1.45-2.73-1.93c-1.03-0.48-2.16-0.72-3.39-0.72
c-1.18,0-2.28,0.23-3.32,0.68c-1.03,0.45-1.93,1.09-2.69,1.89c-0.76,0.81-1.38,1.75-1.84,2.84c-0.47,1.09-0.7,2.23-0.7,3.44
s0.22,2.34,0.66,3.4c0.44,1.06,1.06,1.98,1.84,2.76c0.79,0.78,1.71,1.41,2.76,1.89c1.06,0.48,2.17,0.72,3.35,0.72
c1.18,0,2.28-0.23,3.32-0.68c1.03-0.45,1.93-1.08,2.69-1.89c0.76-0.81,1.37-1.74,1.84-2.8C92.51,77.77,92.74,76.66,92.74,75.5z"/>
</g>
<g>
<path class="st1" d="M34.67,32v27.84c3.14-3.38,7.07-5.07,11.79-5.07c2.8,0,5.37,0.54,7.7,1.63c2.33,1.09,4.32,2.55,5.97,4.39
c1.65,1.84,2.93,4.01,3.87,6.51c0.93,2.5,1.4,5.16,1.4,7.98c0,2.87-0.48,5.57-1.44,8.09c-0.96,2.52-2.3,4.72-4.02,6.58
c-1.72,1.87-3.75,3.34-6.08,4.43C51.53,95.46,49.01,96,46.31,96c-4.91,0-8.79-1.84-11.64-5.52v4.31H21.33V32H34.67z M51.47,75.5
c0-1.21-0.22-2.36-0.66-3.44c-0.44-1.08-1.06-2.03-1.84-2.84c-0.79-0.81-1.7-1.45-2.73-1.93c-1.03-0.48-2.16-0.72-3.39-0.72
c-1.18,0-2.28,0.23-3.32,0.68c-1.03,0.45-1.93,1.09-2.69,1.89c-0.76,0.81-1.38,1.75-1.84,2.84c-0.47,1.09-0.7,2.23-0.7,3.44
s0.22,2.34,0.66,3.4c0.44,1.06,1.06,1.98,1.84,2.76c0.79,0.78,1.71,1.41,2.76,1.89c1.06,0.48,2.17,0.72,3.35,0.72
c1.18,0,2.28-0.23,3.32-0.68c1.03-0.45,1.93-1.08,2.69-1.89c0.76-0.81,1.37-1.74,1.84-2.8C51.24,77.77,51.47,76.66,51.47,75.5z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -1,44 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.1.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 115 40" style="enable-background:new 0 0 115 40;" xml:space="preserve">
<style type="text/css">
.st0{fill:#393C44;}
.st1{fill:#FFFFFF;}
</style>
<path class="st0" d="M111.16,40H3.91c-2.15,0-3.89-1.74-3.89-3.89V4.04c0-2.15,1.74-3.89,3.89-3.89h107.25
c2.15,0,3.89,1.74,3.89,3.89v32.07C115.05,38.26,113.31,40,111.16,40z"/>
<path class="st1" d="M10.37,10.03v8.57c0.93-1.26,2.33-1.67,3.61-1.67c1.58,0,3.01,0.59,4.02,1.54c1.12,1.05,1.82,2.62,1.82,4.53
c0,1.78-0.62,3.42-1.82,4.61c-1.01,1.03-2.26,1.57-3.97,1.57c-2.05,0-3.09-0.95-3.66-1.78v1.39H6.63V10.03H10.37z M10.97,20.98
c-0.44,0.46-0.82,1.13-0.82,2.11c0,0.95,0.41,1.64,0.85,2.05c0.59,0.57,1.41,0.85,2.11,0.85c0.64,0,1.36-0.26,1.93-0.8
c0.54-0.51,0.9-1.26,0.9-2.11c0-0.92-0.36-1.67-0.9-2.18c-0.59-0.57-1.23-0.77-1.98-0.77C12.26,20.14,11.56,20.37,10.97,20.98z"/>
<path class="st1" d="M25.08,17.35v6.32c0,0.51,0.05,1.31,0.64,1.85c0.26,0.23,0.72,0.54,1.54,0.54c0.69,0,1.23-0.23,1.56-0.54
c0.54-0.51,0.62-1.28,0.62-1.85v-6.32h3.74v6.68c0,1.31-0.13,2.54-1.28,3.67c-1.31,1.28-3.23,1.49-4.59,1.49
c-1.41,0-3.31-0.21-4.62-1.49c-1.05-1.03-1.26-2.18-1.26-3.44v-6.91H25.08z"/>
<path class="st1" d="M47.88,28.79h-3.74V27.4c-0.57,0.82-1.61,1.78-3.66,1.78c-1.71,0-2.96-0.54-3.97-1.57
c-1.19-1.18-1.82-2.83-1.82-4.61c0-1.9,0.7-3.47,1.82-4.53c1.01-0.95,2.44-1.54,4.02-1.54c1.27,0,2.67,0.41,3.61,1.67v-8.57h3.74
V28.79z M39.53,20.91c-0.54,0.51-0.9,1.26-0.9,2.18c0,0.85,0.36,1.59,0.9,2.11c0.57,0.54,1.28,0.8,1.93,0.8
c0.69,0,1.52-0.28,2.11-0.85c0.44-0.41,0.85-1.1,0.85-2.05c0-0.98-0.39-1.64-0.82-2.11c-0.59-0.62-1.28-0.85-2.08-0.85
C40.77,20.14,40.12,20.34,39.53,20.91z"/>
<path class="st1" d="M52.32,10.3c1.21,0,2.16,0.95,2.16,2.16c0,1.21-0.95,2.16-2.16,2.16c-1.21,0-2.16-0.95-2.16-2.16
C50.17,11.25,51.12,10.3,52.32,10.3z M54.19,17.35v11.44h-3.74V17.35H54.19z"/>
<path class="st1" d="M60.49,10.03v8.57c0.93-1.26,2.33-1.67,3.61-1.67c1.58,0,3.01,0.59,4.02,1.54c1.12,1.05,1.82,2.62,1.82,4.53
c0,1.78-0.62,3.42-1.82,4.61c-1.01,1.03-2.26,1.57-3.97,1.57c-2.05,0-3.09-0.95-3.66-1.78v1.39h-3.74V10.03H60.49z M61.06,20.98
c-0.44,0.46-0.82,1.13-0.82,2.11c0,0.95,0.41,1.64,0.85,2.05c0.59,0.57,1.41,0.85,2.11,0.85c0.64,0,1.36-0.26,1.93-0.8
c0.54-0.51,0.9-1.26,0.9-2.11c0-0.92-0.36-1.67-0.9-2.18c-0.59-0.57-1.23-0.77-1.98-0.77C62.34,20.14,61.65,20.37,61.06,20.98z"/>
<path class="st1" d="M80.26,17.35H84v11.44h-3.74v-1.39c-1.01,1.54-2.46,1.77-3.42,1.77c-1.66,0-3.06-0.41-4.33-1.74
c-1.22-1.28-1.69-2.77-1.69-4.28c0-1.92,0.73-3.57,1.79-4.62c1.01-1,2.41-1.56,4.02-1.56c0.99,0,2.57,0.23,3.63,1.67V17.35z
M75.57,20.96c-0.39,0.39-0.85,1.05-0.85,2.08c0,1.03,0.44,1.7,0.77,2.05c0.51,0.54,1.31,0.9,2.18,0.9c0.74,0,1.44-0.31,1.93-0.8
c0.49-0.46,0.9-1.18,0.9-2.16c0-0.82-0.31-1.59-0.85-2.11c-0.57-0.54-1.39-0.8-2.05-0.8C76.8,20.14,76.06,20.47,75.57,20.96z"/>
<path class="st1" d="M93.21,20.26c-0.57-0.33-1.31-0.64-2.03-0.64c-0.39,0-0.82,0.1-1.05,0.33c-0.13,0.13-0.23,0.33-0.23,0.51
c0,0.26,0.18,0.41,0.36,0.51c0.26,0.15,0.64,0.23,1.1,0.39l0.98,0.31c0.64,0.21,1.31,0.46,1.9,1c0.67,0.62,0.9,1.31,0.9,2.18
c0,1.52-0.67,2.49-1.18,3.01c-1.13,1.13-2.52,1.31-3.72,1.31c-1.54,0-3.21-0.33-4.7-1.64l1.57-2.49c0.36,0.31,0.87,0.67,1.26,0.85
c0.51,0.26,1.05,0.36,1.54,0.36c0.23,0,0.82,0,1.16-0.26c0.23-0.18,0.39-0.46,0.39-0.74c0-0.21-0.08-0.46-0.41-0.67
c-0.26-0.15-0.59-0.26-1.13-0.41l-0.92-0.28c-0.67-0.21-1.36-0.57-1.85-1.05c-0.54-0.57-0.82-1.21-0.82-2.08
c0-1.1,0.44-2.03,1.1-2.65c1.03-0.95,2.41-1.16,3.47-1.16c1.7,0,2.88,0.44,3.8,0.98L93.21,20.26z"/>
<path class="st1" d="M108.43,23.73h-8.55c0,0.62,0.23,1.44,0.69,1.95c0.57,0.62,1.34,0.72,1.9,0.72c0.54,0,1.1-0.1,1.49-0.33
c0.05-0.03,0.49-0.31,0.8-0.95l3.49,0.36c-0.51,1.62-1.54,2.47-2.21,2.88c-1.1,0.67-2.34,0.85-3.62,0.85
c-1.72,0-3.24-0.31-4.57-1.64c-1-1-1.72-2.52-1.72-4.42c0-1.64,0.59-3.34,1.75-4.52c1.39-1.39,3.11-1.64,4.39-1.64
c1.28,0,3.13,0.23,4.55,1.72c1.36,1.44,1.62,3.24,1.62,4.65V23.73z M105.03,21.48c-0.03-0.1-0.21-0.82-0.74-1.34
c-0.41-0.39-1-0.64-1.75-0.64c-0.95,0-1.52,0.39-1.87,0.74c-0.28,0.31-0.54,0.72-0.64,1.23H105.03z"/>
</svg>

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 MiB

View File

@ -4,7 +4,12 @@
<meta charset='utf8'> <meta charset='utf8'>
<meta name='viewport' content='width=device-width'> <meta name='viewport' content='width=device-width'>
<title>Budibase</title> <title>Budibase</title>
<link rel='icon' href='./src/favicon.ico'> <link rel='icon' href='/src/favicon.ico'>
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap"
rel="stylesheet"
/>
</head> </head>
<body id="app"> <body id="app">
<script type="module" src='/src/main.js'></script> <script type="module" src='/src/main.js'></script>

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/builder", "name": "@budibase/builder",
"version": "0.9.5", "version": "0.9.18",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"private": true, "private": true,
"scripts": { "scripts": {
@ -65,10 +65,10 @@
} }
}, },
"dependencies": { "dependencies": {
"@budibase/bbui": "^0.9.5", "@budibase/bbui": "^0.9.18",
"@budibase/client": "^0.9.5", "@budibase/client": "^0.9.18",
"@budibase/colorpicker": "1.1.2", "@budibase/colorpicker": "1.1.2",
"@budibase/string-templates": "^0.9.5", "@budibase/string-templates": "^0.9.18",
"@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

@ -1,157 +0,0 @@
/* Budibase Component Styles */
.budibase__title {
font-weight: 900;
font-size: 42px;
}
.budibase__title--2 {
font-weight: 700;
font-size: 32px;
}
.budibase__title--3 {
font-weight: 700;
font-size: 24px;
}
.budibase__title--4 {
font-weight: 700;
font-size: 18px;
}
.budibase__label--big {
font-weight: 400;
font-size: 14px;
opacity: 0.6;
text-transform: uppercase;
}
.budibase__label--medium {
font-weight: 500;
font-size: 13px;
opacity: 0.6;
text-transform: uppercase;
}
.budibase__label--small {
font-weight: 500;
font-size: 10px;
opacity: 0.6;
text-transform: uppercase;
}
.budibase__sub-heading {
font-weight: 500;
font-size: 16px;
opacity: 0.6;
}
.budibase__nav-item {
cursor: pointer;
padding: 0 4px 0 2px;
height: 36px;
margin: 0px 0px 0px 0px;
border-radius: 5px;
display: flex;
align-items: center;
font-size: 14px;
transition: 0.2s;
border-top: var(--grey-1) .5px solid;
}
.budibase__nav-item.selected {
color: var(--ink);
background: var(--grey-2);
}
.budibase__nav-item:hover {
background: var(--grey-1);
}
.budibase__input {
height: 36px;
background-color: var(--grey-2);
border: none;
border-radius: 5px;
width: 100%;
text-align: left;
color: var(--ink);
font-size: 14px;
padding-left: 8px;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.budibase__table {
border: 1px solid var(--grey-4);
background: #fff;
border-radius: 2px;
}
.budibase__table thead {
background: var(--blue-light);
}
.budibase__table thead > tr > th {
color: var(--ink);
text-transform: capitalize;
font-weight: 500;
}
.budibase__table tr {
border-bottom: 1px solid var(--grey-1);
}
.button--toggled {
background: var(--blue-light);
color: var(--grey-7);
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
}
/* Table styles */
.bb-table {
border-collapse: collapse;
border-spacing: 0;
width: 100%;
margin-bottom: var(--spacing-xl);
}
* + .bb-table {
margin-top: var(--spacing-xl)
}
.bb-table th {
padding: var(--spacing-l) var(--spacing-m);
text-align: left;
vertical-align: bottom;
}
.bb-table td {
padding: var(--spacing-l) var(--spacing-m);
vertical-align: top;
}
.bb-table td > :last-child { margin-bottom: 0; }
.bb__alert {
position: relative;
margin-bottom: var(--spacing-m);
padding: var(--spacing-l);
}
.bb__alert--danger {
background: #fef4f6;
color: #f0506e;
}
a {
text-decoration: none;
}

View File

@ -32,8 +32,7 @@ function generateTitleContainer(table, title, formId, repeaterId) {
"border-width": "0", "border-width": "0",
"border-style": "None", "border-style": "None",
color: "#fff", color: "#fff",
"font-family": "Inter", "font-weight": "600",
"font-weight": "500",
"font-size": "14px", "font-size": "14px",
}) })
@ -43,8 +42,7 @@ function generateTitleContainer(table, title, formId, repeaterId) {
"border-width": "0", "border-width": "0",
"border-style": "None", "border-style": "None",
color: "#9e9e9e", color: "#9e9e9e",
"font-family": "Inter", "font-weight": "600",
"font-weight": "500",
"font-size": "14px", "font-size": "14px",
"margin-right": "8px", "margin-right": "8px",
"margin-left": "16px", "margin-left": "16px",

View File

@ -24,8 +24,7 @@ function generateTitleContainer(table) {
"border-width": "0", "border-width": "0",
"border-style": "None", "border-style": "None",
color: "#fff", color: "#fff",
"font-family": "Inter", "font-weight": "600",
"font-weight": "500",
"font-size": "14px", "font-size": "14px",
}) })
.hoverStyle({ .hoverStyle({
@ -52,7 +51,7 @@ function generateTitleContainer(table) {
flex: "1 1 auto", flex: "1 1 auto",
"text-transform": "capitalize", "text-transform": "capitalize",
}) })
.type("h3") .type("h2")
.instanceName("Title") .instanceName("Title")
.text(table.name) .text(table.name)
@ -111,8 +110,7 @@ const createScreen = table => {
.instanceName("View Button") .instanceName("View Button")
.normalStyle({ .normalStyle({
background: "transparent", background: "transparent",
"font-family": "Inter, sans-serif", "font-weight": "600",
"font-weight": "500",
color: "#888", color: "#888",
"border-width": "0", "border-width": "0",
}) })

View File

@ -97,8 +97,7 @@ export function makeSaveButton(table, formId) {
"border-width": "0", "border-width": "0",
"border-style": "None", "border-style": "None",
color: "#fff", color: "#fff",
"font-family": "Inter", "font-weight": "600",
"font-weight": "500",
"font-size": "14px", "font-size": "14px",
"margin-left": "16px", "margin-left": "16px",
}) })
@ -145,7 +144,7 @@ export function makeTitleContainer(title) {
flex: "1 1 auto", flex: "1 1 auto",
}) })
.customStyle(spectrumColor(900)) .customStyle(spectrumColor(900))
.type("h3") .type("h2")
.instanceName("Title") .instanceName("Title")
.text(title) .text(title)

View File

@ -67,7 +67,7 @@
header { header {
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: 600;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: flex-start; justify-content: flex-start;

View File

@ -130,7 +130,7 @@
} }
.block-label { .block-label {
font-weight: 500; font-weight: 600;
font-size: var(--font-size-s); font-size: var(--font-size-s);
color: var(--grey-7); color: var(--grey-7);
} }

View File

@ -16,12 +16,13 @@
</script> </script>
<div class="block-field"> <div class="block-field">
<Select bind:value={value.queryId} extraThin secondary> <Select
<option value="">Choose an option</option> label="Query"
{#each $queries.list as query} bind:value={value.queryId}
<option value={query._id}>{query.name}</option> options={$queries.list}
{/each} getOptionValue={query => query._id}
</Select> getOptionLabel={query => query.name}
/>
</div> </div>
{#if parameters.length} {#if parameters.length}

View File

@ -99,7 +99,7 @@
.block-label { .block-label {
font-size: var(--spectrum-global-dimension-font-size-75); font-size: var(--spectrum-global-dimension-font-size-75);
font-weight: 500; font-weight: 600;
color: var(--grey-7); color: var(--grey-7);
} }
</style> </style>

View File

@ -88,7 +88,7 @@
text-align: justify; text-align: justify;
} }
.finished-text { .finished-text {
font-weight: 500; font-weight: 600;
text-align: center; text-align: center;
color: var(--blue); color: var(--blue);
} }

View File

@ -25,7 +25,7 @@
{:else if type === "attachment"} {:else if type === "attachment"}
<Dropzone {label} bind:value /> <Dropzone {label} bind:value />
{:else if type === "boolean"} {:else if type === "boolean"}
<Toggle text={label} bind:checked={value} data-cy="{meta.name}-input" /> <Toggle text={label} bind:value data-cy="{meta.name}-input" />
{:else if type === "link"} {:else if type === "link"}
<LinkedRowSelector bind:linkedRows={value} schema={meta} /> <LinkedRowSelector bind:linkedRows={value} schema={meta} />
{:else if type === "longform"} {:else if type === "longform"}

View File

@ -45,10 +45,18 @@
schema[field].editable = false schema[field].editable = false
} }
}) })
schema.email.displayName = "Email" if (schema.email) {
schema.roleId.displayName = "Role" schema.email.displayName = "Email"
schema.firstName.displayName = "First Name" }
schema.lastName.displayName = "Last Name" if (schema.roleId) {
schema.roleId.displayName = "Role"
}
if (schema.firstName) {
schema.firstName.displayName = "First Name"
}
if (schema.lastName) {
schema.lastName.displayName = "Last Name"
}
if (schema.status) { if (schema.status) {
schema.status.displayName = "Status" schema.status.displayName = "Status"
} }
@ -143,7 +151,7 @@
} }
.table-title h1 { .table-title h1 {
font-size: var(--font-size-m); font-size: var(--font-size-m);
font-weight: 500; font-weight: 600;
margin: 0; margin: 0;
} }
.table-title > div { .table-title > div {
@ -158,7 +166,7 @@
gap: var(--spacing-s); gap: var(--spacing-s);
} }
.popovers :global(button) { .popovers :global(button) {
font-weight: 500; font-weight: 600;
margin-top: var(--spacing-l); margin-top: var(--spacing-l);
} }
.popovers :global(button svg) { .popovers :global(button svg) {

View File

@ -7,7 +7,7 @@
<div> <div>
<Button icon="UsersLock" primary size="S" quiet on:click={modal.show}> <Button icon="UsersLock" primary size="S" quiet on:click={modal.show}>
Edit Roles Edit roles
</Button> </Button>
</div> </div>
<Modal bind:this={modal}> <Modal bind:this={modal}>

View File

@ -15,7 +15,7 @@
active={!!view.groupBy} active={!!view.groupBy}
on:click={modal.show} on:click={modal.show}
> >
Group By Group by
</Button> </Button>
<Modal bind:this={modal}> <Modal bind:this={modal}>
<GroupByModal {view} /> <GroupByModal {view} />

View File

@ -291,7 +291,7 @@
/> />
{#if relationshipOptions && relationshipOptions.length > 0} {#if relationshipOptions && relationshipOptions.length > 0}
<RadioGroup <RadioGroup
disabled={originalName} disabled={originalName != null}
label="Define the relationship" label="Define the relationship"
bind:value={field.relationshipType} bind:value={field.relationshipType}
options={relationshipOptions} options={relationshipOptions}

View File

@ -1,5 +1,5 @@
<script> <script>
import { Label, Input, Layout } from "@budibase/bbui" import { Label, Input, Layout, Toggle } from "@budibase/bbui"
import KeyValueBuilder from "components/integration/KeyValueBuilder.svelte" import KeyValueBuilder from "components/integration/KeyValueBuilder.svelte"
import { capitalise } from "helpers" import { capitalise } from "helpers"
@ -16,6 +16,11 @@
defaults={schema[configKey].default} defaults={schema[configKey].default}
bind:object={integration[configKey]} bind:object={integration[configKey]}
/> />
{:else if schema[configKey].type === "boolean"}
<div class="form-row">
<Label>{capitalise(configKey)}</Label>
<Toggle text="" bind:value={integration[configKey]} />
</div>
{:else} {:else}
<div class="form-row"> <div class="form-row">
<Label>{capitalise(configKey)}</Label> <Label>{capitalise(configKey)}</Label>

View File

@ -170,7 +170,7 @@
.field-status { .field-status {
color: var(--green); color: var(--green);
justify-self: center; justify-self: center;
font-weight: 500; font-weight: 600;
} }
.error { .error {
@ -192,7 +192,7 @@
label { label {
font-family: var(--font-sans); font-family: var(--font-sans);
cursor: pointer; cursor: pointer;
font-weight: 500; font-weight: 600;
box-sizing: border-box; box-sizing: border-box;
overflow: hidden; overflow: hidden;
border-radius: var(--border-radius-s); border-radius: var(--border-radius-s);

View File

@ -115,7 +115,7 @@
div.delete-items div { div.delete-items div {
margin-top: 4px; margin-top: 4px;
font-weight: 500; font-weight: 600;
} }
.actions { .actions {
@ -127,7 +127,7 @@
h5 { h5 {
margin: 0; margin: 0;
font-weight: 500; font-weight: 600;
} }
footer { footer {

View File

@ -48,7 +48,7 @@
} }
.title { .title {
font-weight: 500; font-weight: 600;
} }
.subtitle { .subtitle {

View File

@ -23,7 +23,7 @@
.error { .error {
font-size: var(--font-size-xs); font-size: var(--font-size-xs);
font-weight: 500; font-weight: 600;
} }
.error:first-letter { .error:first-letter {
text-transform: uppercase; text-transform: uppercase;

View File

@ -98,7 +98,7 @@
.text { .text {
flex: 1 1 auto; flex: 1 1 auto;
font-weight: 500; font-weight: 600;
font-size: var(--spectrum-global-dimension-font-size-75); font-size: var(--spectrum-global-dimension-font-size-75);
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;

View File

@ -141,7 +141,7 @@
cursor: pointer; cursor: pointer;
} }
.binding__label { .binding__label {
font-weight: 500; font-weight: 600;
text-transform: capitalize; text-transform: capitalize;
} }
.binding__description { .binding__description {
@ -160,7 +160,7 @@
border-radius: var(--border-radius-m); border-radius: var(--border-radius-m);
padding: 2px; padding: 2px;
margin-left: 2px; margin-left: 2px;
font-weight: 500; font-weight: 600;
} }
.syntax-error { .syntax-error {

View File

@ -209,7 +209,7 @@
.deploy-time { .deploy-time {
color: var(--grey-7); color: var(--grey-7);
font-weight: 500; font-weight: 600;
font-size: var(--font-size-s); font-size: var(--font-size-s);
} }
@ -224,7 +224,7 @@
font-size: var(--font-size-s); font-size: var(--font-size-s);
padding: var(--spacing-s); padding: var(--spacing-s);
border-radius: var(--border-radius-s); border-radius: var(--border-radius-s);
font-weight: 500; font-weight: 600;
text-transform: lowercase; text-transform: lowercase;
width: 80px; width: 80px;
text-align: center; text-align: center;
@ -235,7 +235,7 @@
a { a {
color: var(--blue); color: var(--blue);
font-weight: 500; font-weight: 600;
font-size: var(--font-size-s); font-size: var(--font-size-s);
} }

View File

@ -61,8 +61,7 @@
"icon": "More", "icon": "More",
"children": [ "children": [
"screenslot", "screenslot",
"navigation", "navigation"
"login"
] ]
} }
] ]

View File

@ -1,15 +1,28 @@
export default ` export default `
<html> <html>
<head> <head>
<link rel="stylesheet" href="https://rsms.me/inter/inter.css"> <link rel="stylesheet" href="https://rsms.me/inter/inter.css" />
<link href="https://cdn.jsdelivr.net/npm/remixicon@2.5.0/fonts/remixicon.css" rel="stylesheet"> <link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap"
rel="stylesheet"
/>
<link
href="https://cdn.jsdelivr.net/npm/remixicon@2.5.0/fonts/remixicon.css"
rel="stylesheet"
/>
<style> <style>
body, html { html,
height: 100% !important; body {
font-family: Inter, sans-serif !important; height: 100%;
margin: 0 !important; width: 100%;
margin: 0;
padding: 0;
} }
*, *:before, *:after {
*,
*:before,
*:after {
box-sizing: border-box; box-sizing: border-box;
} }
</style> </style>

View File

@ -24,7 +24,7 @@
align-items: center; align-items: center;
list-style: none; list-style: none;
font-size: var(--font-size-m); font-size: var(--font-size-m);
font-weight: 500; font-weight: 600;
height: 24px; height: 24px;
} }

View File

@ -87,7 +87,7 @@
font-size: var(--spectrum-global-dimension-font-size-75); font-size: var(--spectrum-global-dimension-font-size-75);
margin-bottom: var(--spacing-m); margin-bottom: var(--spacing-m);
margin-top: var(--spacing-xs); margin-top: var(--spacing-xs);
font-weight: 500; font-weight: 600;
color: var(--grey-7); color: var(--grey-7);
} }
</style> </style>

View File

@ -252,7 +252,7 @@
i:hover { i:hover {
transform: scale(1.1); transform: scale(1.1);
font-weight: 500; font-weight: 600;
cursor: pointer; cursor: pointer;
} }
</style> </style>

View File

@ -144,7 +144,7 @@
margin-bottom: var(--spacing-m); margin-bottom: var(--spacing-m);
font-size: var(--font-size-s); font-size: var(--font-size-s);
color: var(--grey-7); color: var(--grey-7);
font-weight: 500; font-weight: 600;
} }
.action-header:hover, .action-header:hover,

View File

@ -24,18 +24,18 @@
} }
</script> </script>
<Layout noGap noPadding> <Layout>
<Label>Datasource</Label>
<Select <Select
label="Datasource"
bind:value={parameters.datasourceId} bind:value={parameters.datasourceId}
option={$datasources.list} options={$datasources.list}
getOptionLabel={source => source.name} getOptionLabel={source => source.name}
getOptionValue={source => source._id} getOptionValue={source => source._id}
/> />
{#if parameters.datasourceId} {#if parameters.datasourceId}
<Label>Query</Label>
<Select <Select
label="Query"
bind:value={parameters.queryId} bind:value={parameters.queryId}
options={$queries.list.filter( options={$queries.list.filter(
query => query.datasourceId === datasource._id query => query.datasourceId === datasource._id
@ -46,17 +46,19 @@
{/if} {/if}
{#if query?.parameters?.length > 0} {#if query?.parameters?.length > 0}
<ParameterBuilder <div>
bind:customParams={parameters.queryParams} <ParameterBuilder
parameters={query.parameters} bind:customParams={parameters.queryParams}
bindings={bindableProperties} parameters={query.parameters}
/> bindings={bindableProperties}
<IntegrationQueryEditor />
height={200} <IntegrationQueryEditor
{query} height={200}
schema={fetchQueryDefinition(query)} {query}
editable={false} schema={fetchQueryDefinition(query)}
{datasource} editable={false}
/> {datasource}
/>
</div>
{/if} {/if}
</Layout> </Layout>

View File

@ -195,10 +195,10 @@
/> />
{:else if expression.type === "boolean"} {:else if expression.type === "boolean"}
<Combobox <Combobox
disabled disabled={expression.noValue}
options={[ options={[
{ label: "True", value: true }, { label: "True", value: "true" },
{ label: "False", value: false }, { label: "False", value: "false" },
]} ]}
bind:value={expression.value} bind:value={expression.value}
/> />

View File

@ -30,7 +30,7 @@
color: var(--grey-7); color: var(--grey-7);
border-radius: var(--border-radius-m); border-radius: var(--border-radius-m);
font-size: var(--spectrum-global-dimension-font-size-75); font-size: var(--spectrum-global-dimension-font-size-75);
font-weight: 500; font-weight: 600;
transition: all 0.3s; transition: all 0.3s;
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
} }

View File

@ -386,8 +386,7 @@ export const typography = [
{ label: "Impact", value: "Impact" }, { label: "Impact", value: "Impact" },
{ label: "Inter", value: "Inter" }, { label: "Inter", value: "Inter" },
{ label: "Lucida Sans Unicode", value: "Lucida Sans Unicode" }, { label: "Lucida Sans Unicode", value: "Lucida Sans Unicode" },
{ label: "Roboto", value: "Roboto" }, { label: "Source Sans Pro", value: "Source Sans Pro" },
{ label: "Roboto Mono", value: "Roboto Mono" },
{ label: "Times New Roman", value: "Times New Roman" }, { label: "Times New Roman", value: "Times New Roman" },
{ label: "Verdana", value: "Verdana" }, { label: "Verdana", value: "Verdana" },
], ],

View File

@ -36,7 +36,7 @@
cursor: pointer; cursor: pointer;
color: var(--grey-7); color: var(--grey-7);
margin: 0 12px 0 0; margin: 0 12px 0 0;
font-weight: 500; font-weight: 600;
font-size: 1rem; font-size: 1rem;
display: flex; display: flex;
flex-direction: row; flex-direction: row;

View File

@ -25,7 +25,7 @@
cursor: pointer; cursor: pointer;
color: var(--grey-7); color: var(--grey-7);
margin: 0 12px 0 0; margin: 0 12px 0 0;
font-weight: 500; font-weight: 600;
font-size: 1rem; font-size: 1rem;
display: flex; display: flex;
flex-direction: row; flex-direction: row;

View File

@ -57,6 +57,6 @@
span { span {
font-size: var(--font-size-xs); font-size: var(--font-size-xs);
font-weight: 500; font-weight: 600;
} }
</style> </style>

View File

@ -1,56 +0,0 @@
/* latin-ext */
/* Inter-regular - latin-ext_latin */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
src: local('Inter'), local('Inter-Regular'),
url('/assets/Inter-Regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('/assets/Inter-Regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* Inter-500 - latin-ext_latin */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 500;
src: local('Inter Medium'), local('Inter-Medium'),
url('/assets/Inter-Medium.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('/assets/Inter-Medium.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* Inter-600 - latin-ext_latin */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 600;
src: local('Inter SemiBold'), local('Inter-SemiBold'),
url('/assets/Inter-SemiBold.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('/assets/Inter-SemiBold.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* Inter-700 - latin-ext_latin */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 700;
src: local('Inter Bold'), local('Inter-Bold'),
url('/assets/Inter-Bold.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('/assets/Inter-Bold.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* Inter-800 - latin-ext_latin */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 700;
src: local('Inter ExtraBold'), local('Inter-ExtraBold'),
url('/assets/Inter-ExtraBold.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('/assets/Inter-ExtraBold.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* Inter-900 - latin-ext_latin */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 900;
src: local('Inter Black'), local('Inter-Black'),
url('/assets/Inter-Black.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('/assets/Inter-Black.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

View File

@ -36,6 +36,9 @@ body {
.hoverable:hover { .hoverable:hover {
cursor: pointer; cursor: pointer;
} }
a {
text-decoration: none;
}
/* Top bottom spacing */ /* Top bottom spacing */
.bb-margin-m { .bb-margin-m {
@ -44,11 +47,9 @@ body {
* + .bb-margin-m { * + .bb-margin-m {
margin-top: var(--spacing-m); margin-top: var(--spacing-m);
} }
.bb-margin-xl { .bb-margin-xl {
margin-bottom: var(--spacing-xl); margin-bottom: var(--spacing-xl);
} }
* + .bb-margin-xl { * + .bb-margin-xl {
margin-top: var(--spacing-xl); margin-top: var(--spacing-xl);
} }

View File

@ -7,9 +7,6 @@ import "@spectrum-css/vars/dist/spectrum-light.css"
import "@spectrum-css/vars/dist/spectrum-lightest.css" import "@spectrum-css/vars/dist/spectrum-lightest.css"
import "@spectrum-css/page/dist/index-vars.css" import "@spectrum-css/page/dist/index-vars.css"
import "./global.css" import "./global.css"
import "./fonts.css"
import "./budibase.css"
import "./fonts.css"
import loadSpectrumIcons from "@budibase/bbui/spectrum-icons-vite.js" import loadSpectrumIcons from "@budibase/bbui/spectrum-icons-vite.js"
loadSpectrumIcons() loadSpectrumIcons()

View File

@ -164,7 +164,7 @@
.topnavitemright a:hover { .topnavitemright a:hover {
color: var(--ink); color: var(--ink);
font-weight: 500; font-weight: 600;
} }
.home-logo { .home-logo {

View File

@ -13,7 +13,7 @@
} from "@budibase/bbui" } from "@budibase/bbui"
import { onMount } from "svelte" import { onMount } from "svelte"
import { apps, organisation, auth } from "stores/portal" import { apps, organisation, auth } from "stores/portal"
import { goto } from "@roxi/routify" import { goto, redirect } from "@roxi/routify"
import { AppStatus } from "constants" import { AppStatus } from "constants"
import { gradient } from "actions" import { gradient } from "actions"
import UpdateUserInfoModal from "components/settings/UpdateUserInfoModal.svelte" import UpdateUserInfoModal from "components/settings/UpdateUserInfoModal.svelte"
@ -28,10 +28,17 @@
onMount(async () => { onMount(async () => {
await organisation.init() await organisation.init()
await apps.load() await apps.load()
loaded = true // Skip the portal if you only have one app
if (!$auth.isBuilder && $apps.filter(publishedAppsOnly).length === 1) {
window.location = `/${publishedApps[0].prodId}`
} else {
loaded = true
}
}) })
$: publishedApps = $apps.filter(app => app.status === AppStatus.DEPLOYED) const publishedAppsOnly = app => app.status === AppStatus.DEPLOYED
$: publishedApps = $apps.filter(publishedAppsOnly)
</script> </script>
{#if $auth.user && loaded} {#if $auth.user && loaded}

View File

@ -1,7 +1,6 @@
<script> <script>
import { onMount } from "svelte"
import { ActionButton } from "@budibase/bbui" import { ActionButton } from "@budibase/bbui"
import GoogleLogo from "/assets/google-logo.png" import GoogleLogo from "assets/google-logo.png"
import { admin } from "stores/portal" import { admin } from "stores/portal"
let show = false let show = false

View File

@ -7,12 +7,12 @@
// Check this onMount rather than a reactive statement to avoid trumping // Check this onMount rather than a reactive statement to avoid trumping
// the login return URL functionality. // the login return URL functionality.
onMount(() => { onMount(() => {
if ($auth.user) { if ($auth.user && !$auth.user.forceResetPassword) {
$redirect("../") $redirect("../")
} }
}) })
</script> </script>
{#if !$auth.user} {#if !$auth.user || $auth.user.forceResetPassword}
<slot /> <slot />
{/if} {/if}

View File

@ -186,7 +186,7 @@
span { span {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
font-weight: 500; font-weight: 600;
} }
.content { .content {
overflow: auto; overflow: auto;

View File

@ -104,9 +104,10 @@
} }
const exportApp = app => { const exportApp = app => {
const id = app.deployed ? app.prodId : app.devId
try { try {
download( download(
`/api/backups/export?appId=${app.appId}&appname=${encodeURIComponent( `/api/backups/export?appId=${id}&appname=${encodeURIComponent(
app.name app.name
)}` )}`
) )

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/cli", "name": "@budibase/cli",
"version": "0.9.5", "version": "0.9.18",
"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,7 +1,7 @@
Mozilla Public License Version 2.0 Mozilla Public License Version 2.0
================================== ==================================
Copyright 2019-2021, Budibase Ltd Copyright 2019-2021, Budibase Inc
1. Definitions 1. Definitions
-------------- --------------

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/client", "name": "@budibase/client",
"version": "0.9.5", "version": "0.9.18",
"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,13 +18,13 @@
"dev:builder": "rollup -cw" "dev:builder": "rollup -cw"
}, },
"dependencies": { "dependencies": {
"@budibase/string-templates": "^0.9.5", "@budibase/string-templates": "^0.9.18",
"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"
}, },
"devDependencies": { "devDependencies": {
"@budibase/standard-components": "^0.9.5", "@budibase/standard-components": "^0.9.18",
"@rollup/plugin-commonjs": "^18.0.0", "@rollup/plugin-commonjs": "^18.0.0",
"@rollup/plugin-node-resolve": "^11.2.1", "@rollup/plugin-node-resolve": "^11.2.1",
"fs-extra": "^8.1.0", "fs-extra": "^8.1.0",

View File

@ -6,7 +6,16 @@ import { enrichRows } from "./rows"
* Since definitions cannot change at runtime, the result is cached. * Since definitions cannot change at runtime, the result is cached.
*/ */
export const fetchTableDefinition = async tableId => { export const fetchTableDefinition = async tableId => {
return await API.get({ url: `/api/tables/${tableId}`, cache: true }) const res = await API.get({ url: `/api/tables/${tableId}`, cache: true })
// Wipe any HBS formulae, as these interfere with handlebars enrichment
Object.keys(res?.schema || {}).forEach(field => {
if (res.schema[field]?.type === "formula") {
delete res.schema[field].formula
}
})
return res
} }
/** /**

View File

@ -55,6 +55,6 @@
padding: 10px; padding: 10px;
display: block; display: block;
color: white; color: white;
font-weight: 500; font-weight: 600;
} }
</style> </style>

View File

@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007 Version 3, 29 June 2007
Copyright 2019-2021, Budibase Ltd Copyright 2019-2021, Budibase Inc
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.

View File

@ -1,7 +1,7 @@
{ {
"name": "@budibase/server", "name": "@budibase/server",
"email": "hi@budibase.com", "email": "hi@budibase.com",
"version": "0.9.5", "version": "0.9.18",
"description": "Budibase Web Server", "description": "Budibase Web Server",
"main": "src/electron.js", "main": "src/electron.js",
"repository": { "repository": {
@ -55,9 +55,9 @@
"author": "Budibase", "author": "Budibase",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"dependencies": { "dependencies": {
"@budibase/auth": "^0.9.5", "@budibase/auth": "^0.9.18",
"@budibase/client": "^0.9.5", "@budibase/client": "^0.9.18",
"@budibase/string-templates": "^0.9.5", "@budibase/string-templates": "^0.9.18",
"@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",
@ -107,7 +107,7 @@
"zlib": "1.0.5" "zlib": "1.0.5"
}, },
"devDependencies": { "devDependencies": {
"@budibase/standard-components": "^0.9.5", "@budibase/standard-components": "^0.9.18",
"@jest/test-sequencer": "^24.8.0", "@jest/test-sequencer": "^24.8.0",
"docker-compose": "^0.23.6", "docker-compose": "^0.23.6",
"eslint": "^6.8.0", "eslint": "^6.8.0",

View File

@ -101,6 +101,7 @@ async function createInstance(template) {
if (!ok) { if (!ok) {
throw "Error loading database dump from template." throw "Error loading database dump from template."
} }
var { _rev } = await db.get(DocumentTypes.APP_METADATA)
} else { } else {
// create the users table // create the users table
await db.put(USERS_TABLE_SCHEMA) await db.put(USERS_TABLE_SCHEMA)
@ -111,7 +112,7 @@ async function createInstance(template) {
await createRoutingView(appId) await createRoutingView(appId)
await createAllSearchIndex(appId) await createAllSearchIndex(appId)
return { _id: appId } return { _id: appId, _rev }
} }
exports.fetch = async function (ctx) { exports.fetch = async function (ctx) {
@ -194,6 +195,9 @@ exports.create = async function (ctx) {
updatedAt: new Date().toISOString(), updatedAt: new Date().toISOString(),
createdAt: new Date().toISOString(), createdAt: new Date().toISOString(),
} }
if (instance._rev) {
newApplication._rev = instance._rev
}
const instanceDb = new CouchDB(appId) const instanceDb = new CouchDB(appId)
await instanceDb.put(newApplication) await instanceDb.put(newApplication)

View File

@ -14,6 +14,11 @@
<title>{title}</title> <title>{title}</title>
<link rel="icon" type="image/png" href={favicon} /> <link rel="icon" type="image/png" href={favicon} />
<link rel="stylesheet" href="https://rsms.me/inter/inter.css" /> <link rel="stylesheet" href="https://rsms.me/inter/inter.css" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap"
rel="stylesheet"
/>
<link <link
href="https://cdn.jsdelivr.net/npm/remixicon@2.5.0/fonts/remixicon.css" href="https://cdn.jsdelivr.net/npm/remixicon@2.5.0/fonts/remixicon.css"
rel="stylesheet" rel="stylesheet"
@ -21,11 +26,10 @@
<style> <style>
html, html,
body { body {
font-family: Inter;
height: 100%; height: 100%;
width: 100%; width: 100%;
margin: 0px; margin: 0;
padding: 0px; padding: 0;
} }
*, *,

View File

@ -1,10 +1,8 @@
const Router = require("@koa/router") const Router = require("@koa/router")
const authorized = require("../../middleware/authorized")
const controller = require("../controllers/analytics") const controller = require("../controllers/analytics")
const { BUILDER } = require("@budibase/auth/permissions")
const router = Router() const router = Router()
router.get("/api/analytics", authorized(BUILDER), controller.isEnabled) router.get("/api/analytics", controller.isEnabled)
module.exports = router module.exports = router

View File

@ -7,12 +7,8 @@ const router = Router()
router router
.get("/api/applications/:appId/definition", controller.fetchAppDefinition) .get("/api/applications/:appId/definition", controller.fetchAppDefinition)
.get("/api/applications", authorized(BUILDER), controller.fetch) .get("/api/applications", controller.fetch)
.get( .get("/api/applications/:appId/appPackage", controller.fetchAppPackage)
"/api/applications/:appId/appPackage",
authorized(BUILDER),
controller.fetchAppPackage
)
.put("/api/applications/:appId", authorized(BUILDER), controller.update) .put("/api/applications/:appId", authorized(BUILDER), controller.update)
.post("/api/applications", authorized(BUILDER), controller.create) .post("/api/applications", authorized(BUILDER), controller.create)
.delete("/api/applications/:appId", authorized(BUILDER), controller.delete) .delete("/api/applications/:appId", authorized(BUILDER), controller.delete)

View File

@ -61,14 +61,6 @@ describe("/applications", () => {
// two created apps + the inited app // two created apps + the inited app
expect(res.body.length).toBe(3) expect(res.body.length).toBe(3)
}) })
it("should apply authorization to endpoint", async () => {
await checkBuilderEndpoint({
config,
method: "GET",
url: `/api/applications`,
})
})
}) })
describe("fetchAppDefinition", () => { describe("fetchAppDefinition", () => {

View File

@ -1,13 +1,15 @@
const { BUILTIN_ROLE_IDS } = require("@budibase/auth/roles") const { BUILTIN_ROLE_IDS } = require("@budibase/auth/roles")
const { checkPermissionsEndpoint } = require("./utilities/TestFunctions") const { checkPermissionsEndpoint } = require("./utilities/TestFunctions")
const setup = require("./utilities") const setup = require("./utilities")
const { basicUser } = setup.structures
const workerRequests = require("../../../utilities/workerRequests") const workerRequests = require("../../../utilities/workerRequests")
jest.mock("../../../utilities/workerRequests", () => ({ jest.mock("../../../utilities/workerRequests", () => ({
getGlobalUsers: jest.fn(() => { getGlobalUsers: jest.fn(() => {
return {} return {}
}), }),
getGlobalSelf: jest.fn(() => {
return {}
}),
addAppRoleToUser: jest.fn(), addAppRoleToUser: jest.fn(),
deleteGlobalUser: jest.fn(), deleteGlobalUser: jest.fn(),
})) }))

View File

@ -8,6 +8,11 @@ jest.mock("../../../../utilities/workerRequests", () => ({
_id: "us_uuid1", _id: "us_uuid1",
} }
}), }),
getGlobalSelf: jest.fn(() => {
return {
_id: "us_uuid1",
}
}),
})) }))
exports.delay = ms => new Promise(resolve => setTimeout(resolve, ms)) exports.delay = ms => new Promise(resolve => setTimeout(resolve, ms))

View File

@ -2,8 +2,6 @@ const { BUILTIN_ROLE_IDS } = require("@budibase/auth/roles")
const { UserStatus } = require("@budibase/auth").constants const { UserStatus } = require("@budibase/auth").constants
const { ObjectStoreBuckets } = require("@budibase/auth").objectStore const { ObjectStoreBuckets } = require("@budibase/auth").objectStore
exports.LOGO_URL = "https://i.imgur.com/ycNeYTy.png"
exports.JobQueues = { exports.JobQueues = {
AUTOMATIONS: "automationQueue", AUTOMATIONS: "automationQueue",
} }

View File

@ -1,5 +1,3 @@
const { LOGO_URL } = require("../constants")
const BASE_LAYOUT_PROP_IDS = { const BASE_LAYOUT_PROP_IDS = {
PRIVATE: "layout_private_master", PRIVATE: "layout_private_master",
PUBLIC: "layout_public_master", PUBLIC: "layout_public_master",
@ -100,7 +98,6 @@ const BASE_LAYOUTS = [
"margin-left": "auto", "margin-left": "auto",
"margin-right": "auto", "margin-right": "auto",
padding: "20px", padding: "20px",
color: "#757575",
"font-weight": "400", "font-weight": "400",
"font-size": "16px", "font-size": "16px",
flex: "1 1 auto", flex: "1 1 auto",
@ -109,7 +106,6 @@ const BASE_LAYOUTS = [
active: {}, active: {},
selected: {}, selected: {},
}, },
logoUrl: LOGO_URL,
title: "", title: "",
backgroundColor: "", backgroundColor: "",
color: "", color: "",
@ -123,9 +119,7 @@ const BASE_LAYOUTS = [
_component: "@budibase/standard-components/link", _component: "@budibase/standard-components/link",
_styles: { _styles: {
normal: { normal: {
"font-family": "Inter", "font-weight": "600",
"font-weight": "500",
color: "#000000",
"text-decoration-line": "none", "text-decoration-line": "none",
"font-size": "16px", "font-size": "16px",
}, },

View File

@ -6,6 +6,7 @@ exports.QUERY_TYPES = {
exports.FIELD_TYPES = { exports.FIELD_TYPES = {
STRING: "string", STRING: "string",
BOOLEAN: "boolean",
NUMBER: "number", NUMBER: "number",
PASSWORD: "password", PASSWORD: "password",
LIST: "list", LIST: "list",

View File

@ -31,6 +31,10 @@ const SCHEMA = {
type: FIELD_TYPES.STRING, type: FIELD_TYPES.STRING,
default: "root", default: "root",
}, },
encrypt: {
type: FIELD_TYPES.BOOLEAN,
default: true,
},
}, },
query: { query: {
create: { create: {
@ -51,6 +55,10 @@ const SCHEMA = {
class SqlServerIntegration { class SqlServerIntegration {
constructor(config) { constructor(config) {
this.config = config this.config = config
this.config.options = {
encrypt: this.config.encrypt,
}
delete this.config.encrypt
if (!pool) { if (!pool) {
pool = new sqlServer.ConnectionPool(this.config) pool = new sqlServer.ConnectionPool(this.config)
} }

View File

@ -1,4 +1,5 @@
const { Pool } = require("pg") const { Pool } = require("pg")
const { FIELD_TYPES } = require("./Integration")
let pool let pool
@ -9,30 +10,34 @@ const SCHEMA = {
"PostgreSQL, also known as Postgres, is a free and open-source relational database management system emphasizing extensibility and SQL compliance.", "PostgreSQL, also known as Postgres, is a free and open-source relational database management system emphasizing extensibility and SQL compliance.",
datasource: { datasource: {
host: { host: {
type: "string", type: FIELD_TYPES.STRING,
default: "localhost", default: "localhost",
required: true, required: true,
}, },
port: { port: {
type: "number", type: FIELD_TYPES.NUMBER,
required: true, required: true,
default: 5432, default: 5432,
}, },
database: { database: {
type: "string", type: FIELD_TYPES.STRING,
default: "postgres", default: "postgres",
required: true, required: true,
}, },
user: { user: {
type: "string", type: FIELD_TYPES.STRING,
default: "root", default: "root",
required: true, required: true,
}, },
password: { password: {
type: "password", type: FIELD_TYPES.PASSWORD,
default: "root", default: "root",
required: true, required: true,
}, },
ssl: {
type: FIELD_TYPES.OBJECT,
required: false,
},
}, },
query: { query: {
create: { create: {
@ -53,6 +58,11 @@ const SCHEMA = {
class PostgresIntegration { class PostgresIntegration {
constructor(config) { constructor(config) {
this.config = config this.config = config
if (this.config.ssl && this.config.ssl.rejectUnauthorized) {
this.config.ssl.rejectUnauthorized =
this.config.ssl.rejectUnauthorized === "true"
}
if (!pool) { if (!pool) {
pool = new Pool(this.config) pool = new Pool(this.config)
} }
@ -65,7 +75,9 @@ class PostgresIntegration {
} catch (err) { } catch (err) {
throw new Error(err) throw new Error(err)
} finally { } finally {
this.client.release() if (this.client) {
this.client.release()
}
} }
} }

View File

@ -20,6 +20,7 @@ const SCHEMA = {
}, },
query: { query: {
create: { create: {
readable: true,
displayName: "POST", displayName: "POST",
type: QUERY_TYPES.FIELDS, type: QUERY_TYPES.FIELDS,
urlDisplay: true, urlDisplay: true,
@ -40,6 +41,7 @@ const SCHEMA = {
}, },
read: { read: {
displayName: "GET", displayName: "GET",
readable: true,
type: QUERY_TYPES.FIELDS, type: QUERY_TYPES.FIELDS,
urlDisplay: true, urlDisplay: true,
fields: { fields: {
@ -56,6 +58,7 @@ const SCHEMA = {
}, },
update: { update: {
displayName: "PUT", displayName: "PUT",
readable: true,
type: QUERY_TYPES.FIELDS, type: QUERY_TYPES.FIELDS,
urlDisplay: true, urlDisplay: true,
fields: { fields: {

Some files were not shown because too many files have changed in this diff Show More