Merge branch 'component-sdk' of github.com:Budibase/budibase into feature/page-refactor
This commit is contained in:
commit
060fee722c
|
@ -0,0 +1,115 @@
|
||||||
|
{
|
||||||
|
"files": [
|
||||||
|
"README.md"
|
||||||
|
],
|
||||||
|
"imageSize": 100,
|
||||||
|
"commit": false,
|
||||||
|
"contributors": [
|
||||||
|
{
|
||||||
|
"login": "shogunpurple",
|
||||||
|
"name": "Martin McKeaveney",
|
||||||
|
"avatar_url": "https://avatars1.githubusercontent.com/u/11256663?v=4",
|
||||||
|
"profile": "http://martinmck.com",
|
||||||
|
"contributions": [
|
||||||
|
"code",
|
||||||
|
"doc",
|
||||||
|
"test",
|
||||||
|
"infra"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "mike12345567",
|
||||||
|
"name": "Michael Drury",
|
||||||
|
"avatar_url": "https://avatars2.githubusercontent.com/u/4407001?v=4",
|
||||||
|
"profile": "http://www.michaeldrury.co.uk/",
|
||||||
|
"contributions": [
|
||||||
|
"doc",
|
||||||
|
"code",
|
||||||
|
"test",
|
||||||
|
"infra"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "aptkingston",
|
||||||
|
"name": "Andrew Kingston",
|
||||||
|
"avatar_url": "https://avatars3.githubusercontent.com/u/9075550?v=4",
|
||||||
|
"profile": "https://github.com/aptkingston",
|
||||||
|
"contributions": [
|
||||||
|
"doc",
|
||||||
|
"code",
|
||||||
|
"test",
|
||||||
|
"design"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "mjashanks",
|
||||||
|
"name": "Michael Shanks",
|
||||||
|
"avatar_url": "https://avatars3.githubusercontent.com/u/3524181?v=4",
|
||||||
|
"profile": "https://budibase.com/",
|
||||||
|
"contributions": [
|
||||||
|
"doc",
|
||||||
|
"code",
|
||||||
|
"test"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "kevmodrome",
|
||||||
|
"name": "Kevin Åberg Kultalahti",
|
||||||
|
"avatar_url": "https://avatars3.githubusercontent.com/u/534488?v=4",
|
||||||
|
"profile": "https://github.com/kevmodrome",
|
||||||
|
"contributions": [
|
||||||
|
"doc",
|
||||||
|
"code",
|
||||||
|
"test"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "joebudi",
|
||||||
|
"name": "Joe",
|
||||||
|
"avatar_url": "https://avatars2.githubusercontent.com/u/49767913?v=4",
|
||||||
|
"profile": "https://www.budibase.com/",
|
||||||
|
"contributions": [
|
||||||
|
"doc",
|
||||||
|
"code",
|
||||||
|
"content",
|
||||||
|
"design"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "Conor-Mack",
|
||||||
|
"name": "Conor_Mack",
|
||||||
|
"avatar_url": "https://avatars1.githubusercontent.com/u/36074859?v=4",
|
||||||
|
"profile": "https://github.com/Conor-Mack",
|
||||||
|
"contributions": [
|
||||||
|
"code",
|
||||||
|
"test"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "pngwn",
|
||||||
|
"name": "pngwn",
|
||||||
|
"avatar_url": "https://avatars1.githubusercontent.com/u/12937446?v=4",
|
||||||
|
"profile": "https://github.com/pngwn",
|
||||||
|
"contributions": [
|
||||||
|
"code",
|
||||||
|
"test"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "HugoLd",
|
||||||
|
"name": "HugoLd",
|
||||||
|
"avatar_url": "https://avatars0.githubusercontent.com/u/26521848?v=4",
|
||||||
|
"profile": "https://github.com/HugoLd",
|
||||||
|
"contributions": [
|
||||||
|
"code"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"contributorsPerLine": 7,
|
||||||
|
"projectName": "budibase",
|
||||||
|
"projectOwner": "Budibase",
|
||||||
|
"repoType": "github",
|
||||||
|
"repoHost": "https://github.com",
|
||||||
|
"skipCi": true,
|
||||||
|
"commitConvention": "none"
|
||||||
|
}
|
|
@ -0,0 +1,76 @@
|
||||||
|
# Contributor Covenant Code of Conduct
|
||||||
|
|
||||||
|
## Our Pledge
|
||||||
|
|
||||||
|
In the interest of fostering an open and welcoming environment, we as
|
||||||
|
contributors and maintainers pledge to making participation in our project and
|
||||||
|
our community a harassment-free experience for everyone, regardless of age, body
|
||||||
|
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||||
|
level of experience, education, socio-economic status, nationality, personal
|
||||||
|
appearance, race, religion, or sexual identity and orientation.
|
||||||
|
|
||||||
|
## Our Standards
|
||||||
|
|
||||||
|
Examples of behavior that contributes to creating a positive environment
|
||||||
|
include:
|
||||||
|
|
||||||
|
* Using welcoming and inclusive language
|
||||||
|
* Being respectful of differing viewpoints and experiences
|
||||||
|
* Gracefully accepting constructive criticism
|
||||||
|
* Focusing on what is best for the community
|
||||||
|
* Showing empathy towards other community members
|
||||||
|
|
||||||
|
Examples of unacceptable behavior by participants include:
|
||||||
|
|
||||||
|
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||||
|
advances
|
||||||
|
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||||
|
* Public or private harassment
|
||||||
|
* Publishing others' private information, such as a physical or electronic
|
||||||
|
address, without explicit permission
|
||||||
|
* Other conduct which could reasonably be considered inappropriate in a
|
||||||
|
professional setting
|
||||||
|
|
||||||
|
## Our Responsibilities
|
||||||
|
|
||||||
|
Project maintainers are responsible for clarifying the standards of acceptable
|
||||||
|
behavior and are expected to take appropriate and fair corrective action in
|
||||||
|
response to any instances of unacceptable behavior.
|
||||||
|
|
||||||
|
Project maintainers have the right and responsibility to remove, edit, or
|
||||||
|
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||||
|
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||||
|
permanently any contributor for other behaviors that they deem inappropriate,
|
||||||
|
threatening, offensive, or harmful.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
This Code of Conduct applies both within project spaces and in public spaces
|
||||||
|
when an individual is representing the project or its community. Examples of
|
||||||
|
representing a project or community include using an official project e-mail
|
||||||
|
address, posting via an official social media account, or acting as an appointed
|
||||||
|
representative at an online or offline event. Representation of a project may be
|
||||||
|
further defined and clarified by project maintainers.
|
||||||
|
|
||||||
|
## Enforcement
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
|
reported by contacting the project team at community@budibase.com. All
|
||||||
|
complaints will be reviewed and investigated and will result in a response that
|
||||||
|
is deemed necessary and appropriate to the circumstances. The project team is
|
||||||
|
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||||
|
Further details of specific enforcement policies may be posted separately.
|
||||||
|
|
||||||
|
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||||
|
faith may face temporary or permanent repercussions as determined by other
|
||||||
|
members of the project's leadership.
|
||||||
|
|
||||||
|
## Attribution
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||||
|
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||||
|
|
||||||
|
[homepage]: https://www.contributor-covenant.org
|
||||||
|
|
||||||
|
For answers to common questions about this code of conduct, see
|
||||||
|
https://www.contributor-covenant.org/faq
|
|
@ -0,0 +1,6 @@
|
||||||
|
Each Budibase package has its own license:
|
||||||
|
|
||||||
|
builder: AGPLv3
|
||||||
|
server: GPLv3
|
||||||
|
client: MPLv2.0
|
||||||
|
standard-components: MPLv2.0
|
|
@ -0,0 +1,179 @@
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://www.budibase.com">
|
||||||
|
<img alt="Budibase" src="https://d33wubrfki0l68.cloudfront.net/aac32159d7207b5085e74a7ef67afbb7027786c5/2b1fd/img/logo/bb-emblem.svg" width="60" />
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
<h1 align="center">
|
||||||
|
Budibase
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<h3 align="center">
|
||||||
|
Build business apps 50x faster
|
||||||
|
</h3>
|
||||||
|
<p align="center">
|
||||||
|
Budibase is an open-source low-code platform that helps developers and IT professionals design, build, and ship business apps 50x faster.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3 align="center">
|
||||||
|
🤖 🎨 🚀
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="https://i.imgur.com/tMCahK8.png">
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://github.com/Budibase/budibase/releases">
|
||||||
|
<img alt="GitHub all releases" src="https://img.shields.io/github/downloads/Budibase/budibase/total">
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/Budibase/budibase/releases">
|
||||||
|
<img alt="GitHub release (latest by date)" src="https://img.shields.io/github/v/release/Budibase/budibase">
|
||||||
|
</a>
|
||||||
|
<a href="https://discord.gg/rCYayfe">
|
||||||
|
<img alt="Discord" src="https://img.shields.io/discord/733030666647765003">
|
||||||
|
</a>
|
||||||
|
<a href="https://twitter.com/intent/follow?screen_name=budibase">
|
||||||
|
<img src="https://img.shields.io/twitter/follow/budibase?style=social" alt="Follow @budibase" />
|
||||||
|
</a>
|
||||||
|
<img src="https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg" alt="Code of conduct" />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3 align="center">
|
||||||
|
<a href="https://portal.budi.live/signup">Sign-up</a>
|
||||||
|
<span> · </span>
|
||||||
|
<a href="https://docs.budibase.com">Docs</a>
|
||||||
|
<span> · </span>
|
||||||
|
<a href="https://github.com/Budibase/budibase/discussions?discussions_q=category%3AIdeas">Feature request</a>
|
||||||
|
<span> · </span>
|
||||||
|
<a href="https://github.com/Budibase/budibase/issues">Report a bug</a>
|
||||||
|
<span> · </span>
|
||||||
|
Support: <a href="https://github.com/Budibase/budibase/discussions">Discussions</a>
|
||||||
|
<span> & </span>
|
||||||
|
<a href="https://discord.gg/rCYayfe">Discord</a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
|
||||||
|
## ✨ 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.
|
||||||
|
|
||||||
|
- **Open source and extensable.** Budibase is open-source. The builder is licensed AGPL v3, the server is GPL v3, and the client is MPL. This should fill you with confidence that Budibase will always be around. You can also code against Budibase or fork it and make changes as you please, providing a developer-friendly experience.
|
||||||
|
|
||||||
|
- **Load data or start from scratch.** Budibase pulls in data from multiple sources, whether it’s a CSV, an external database (coming very soon), or a REST API. And unlike other platforms, with Budibase you can start from scratch and create business apps with no data sources. [Request new data sources](https://github.com/Budibase/budibase/discussions?discussions_q=category%3AIdeas).
|
||||||
|
|
||||||
|
- **Design and build apps with powerful pre-made components.** Budibase comes out of the box with beautifully designed, powerful components which you can use like building blocks to build your UI. We also expose a lot of your favourite CSS styling options so you can go that extra creative mile. [Request new components](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 (available) and self-hosting (coming soon).** Users will soon have the option to host with Budibase in AWS (available now) or self-host (coming very soon). From the very beginning, we wanted our users to have the option to self-host. We understand the importance of having full control over data. This is why we are working incredibly hard to offer an easy path to self-hosting. If you are interested in self-hosting, please [join the conversation and add your thoughts](https://github.com/Budibase/budibase/discussions/648).
|
||||||
|
|
||||||
|
|
||||||
|
## ⌛ Status
|
||||||
|
- [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] Public Beta: Anyone can [sign-up and use Budibase](https://portal.budi.live/signup) but it's not production ready. We cannot ensure backwards compatibility
|
||||||
|
- [ ] Official Launch: Production-ready
|
||||||
|
|
||||||
|
|
||||||
|
We are currently in Public Beta. Until our official launch, we cannot ensure backwards compatibility for your Budibase applications between versions. Issues may arise when trying to edit apps created with old versions of the Budibase builder.
|
||||||
|
|
||||||
|
Watch "releases" of this repo to get notified of major updates, and give the star button a click whilst you're there.
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="https://i.imgur.com/cJpgqm8.png">
|
||||||
|
</p>
|
||||||
|
|
||||||
|
If you are having issues between updates of the builder, please use the guide [here](https://github.com/Budibase/budibase/blob/master/CONTRIBUTING.md#troubleshooting) to clear down your environment.
|
||||||
|
|
||||||
|
## 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)
|
||||||
|
|
||||||
|
|
||||||
|
## 🏁 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.
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img alt="Budibase design ui" src="https://imgur.com/v8m6v3q.png">
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
## 🎓 Learning Budibase
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
## ❗ Code of Conduct
|
||||||
|
|
||||||
|
Budibase is dedicated to providing a welcoming, diverse, and harrassment-free experience for everyone. We expect everyone in the Budibase community to abide by our [**Code of Conduct**](https://github.com/Budibase/budibase/blob/master/CODE_OF_CONDUCT.md). Please read it.
|
||||||
|
|
||||||
|
## 🙌 Contributing to Budibase
|
||||||
|
|
||||||
|
From opening a bug report to creating a pull request: every contribution is appreciated and welcomed. If you're planning to implement a new feature or change the API please create an issue first. This way we can ensure your work is not in vain.
|
||||||
|
|
||||||
|
### Not Sure Where to Start?
|
||||||
|
A good place to start contributing, is the [First time issues project](https://github.com/Budibase/budibase/projects/22).
|
||||||
|
|
||||||
|
### How the repository is organized
|
||||||
|
Budibase is a monorepo managed by lerna. Lerna manages the building and publishing of the budibase packages. At a high level, here are the packages that make up Budibase.
|
||||||
|
|
||||||
|
- [packages/builder](https://github.com/Budibase/budibase/tree/master/packages/builder) - contains code for the budibase builder client side svelte application.
|
||||||
|
|
||||||
|
- [packages/client](https://github.com/Budibase/budibase/tree/master/packages/client) - A module that runs in the browser responsible for reading JSON definition and creating living, breathing web apps from it.
|
||||||
|
|
||||||
|
- [packages/server](https://github.com/Budibase/budibase/tree/master/packages/server) - The budibase server. This Koa app is responsible for serving the JS for the builder and budibase apps, as well as providing the API for interaction with the database and file system.
|
||||||
|
|
||||||
|
For more information, see [CONTRIBUTING.md](./CONTRIBUTING.md)
|
||||||
|
|
||||||
|
## 📝 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).
|
||||||
|
|
||||||
|
## 💬 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:
|
||||||
|
|
||||||
|
[Discord chatroom](https://discord.gg/rCYayfe)
|
||||||
|
|
||||||
|
![Discord Shield](https://discordapp.com/api/guilds/733030666647765003/widget.png?style=shield)
|
||||||
|
|
||||||
|
## Contributors ✨
|
||||||
|
|
||||||
|
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
||||||
|
|
||||||
|
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
||||||
|
<!-- prettier-ignore-start -->
|
||||||
|
<!-- markdownlint-disable -->
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td align="center"><a href="http://martinmck.com"><img src="https://avatars1.githubusercontent.com/u/11256663?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Martin McKeaveney</b></sub></a><br /><a href="https://github.com/Budibase/budibase/commits?author=shogunpurple" title="Code">💻</a> <a href="https://github.com/Budibase/budibase/commits?author=shogunpurple" title="Documentation">📖</a> <a href="https://github.com/Budibase/budibase/commits?author=shogunpurple" title="Tests">⚠️</a> <a href="#infra-shogunpurple" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
|
||||||
|
<td align="center"><a href="http://www.michaeldrury.co.uk/"><img src="https://avatars2.githubusercontent.com/u/4407001?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Michael Drury</b></sub></a><br /><a href="https://github.com/Budibase/budibase/commits?author=mike12345567" title="Documentation">📖</a> <a href="https://github.com/Budibase/budibase/commits?author=mike12345567" title="Code">💻</a> <a href="https://github.com/Budibase/budibase/commits?author=mike12345567" title="Tests">⚠️</a> <a href="#infra-mike12345567" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
|
||||||
|
<td align="center"><a href="https://github.com/aptkingston"><img src="https://avatars3.githubusercontent.com/u/9075550?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Andrew Kingston</b></sub></a><br /><a href="https://github.com/Budibase/budibase/commits?author=aptkingston" title="Documentation">📖</a> <a href="https://github.com/Budibase/budibase/commits?author=aptkingston" title="Code">💻</a> <a href="https://github.com/Budibase/budibase/commits?author=aptkingston" title="Tests">⚠️</a> <a href="#design-aptkingston" title="Design">🎨</a></td>
|
||||||
|
<td align="center"><a href="https://budibase.com/"><img src="https://avatars3.githubusercontent.com/u/3524181?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Michael Shanks</b></sub></a><br /><a href="https://github.com/Budibase/budibase/commits?author=mjashanks" title="Documentation">📖</a> <a href="https://github.com/Budibase/budibase/commits?author=mjashanks" title="Code">💻</a> <a href="https://github.com/Budibase/budibase/commits?author=mjashanks" title="Tests">⚠️</a></td>
|
||||||
|
<td align="center"><a href="https://github.com/kevmodrome"><img src="https://avatars3.githubusercontent.com/u/534488?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kevin Åberg Kultalahti</b></sub></a><br /><a href="https://github.com/Budibase/budibase/commits?author=kevmodrome" title="Documentation">📖</a> <a href="https://github.com/Budibase/budibase/commits?author=kevmodrome" title="Code">💻</a> <a href="https://github.com/Budibase/budibase/commits?author=kevmodrome" title="Tests">⚠️</a></td>
|
||||||
|
<td align="center"><a href="https://www.budibase.com/"><img src="https://avatars2.githubusercontent.com/u/49767913?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Joe</b></sub></a><br /><a href="https://github.com/Budibase/budibase/commits?author=joebudi" title="Documentation">📖</a> <a href="https://github.com/Budibase/budibase/commits?author=joebudi" title="Code">💻</a> <a href="#content-joebudi" title="Content">🖋</a> <a href="#design-joebudi" title="Design">🎨</a></td>
|
||||||
|
<td align="center"><a href="https://github.com/Conor-Mack"><img src="https://avatars1.githubusercontent.com/u/36074859?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Conor_Mack</b></sub></a><br /><a href="https://github.com/Budibase/budibase/commits?author=Conor-Mack" title="Code">💻</a> <a href="https://github.com/Budibase/budibase/commits?author=Conor-Mack" title="Tests">⚠️</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center"><a href="https://github.com/pngwn"><img src="https://avatars1.githubusercontent.com/u/12937446?v=4?s=100" width="100px;" alt=""/><br /><sub><b>pngwn</b></sub></a><br /><a href="https://github.com/Budibase/budibase/commits?author=pngwn" title="Code">💻</a> <a href="https://github.com/Budibase/budibase/commits?author=pngwn" title="Tests">⚠️</a></td>
|
||||||
|
<td align="center"><a href="https://github.com/HugoLd"><img src="https://avatars0.githubusercontent.com/u/26521848?v=4?s=100" width="100px;" alt=""/><br /><sub><b>HugoLd</b></sub></a><br /><a href="https://github.com/Budibase/budibase/commits?author=HugoLd" title="Code">💻</a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<!-- markdownlint-restore -->
|
||||||
|
<!-- prettier-ignore-end -->
|
||||||
|
|
||||||
|
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
||||||
|
|
||||||
|
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
|
@ -14,7 +14,7 @@
|
||||||
"prettier-plugin-svelte": "^1.4.0",
|
"prettier-plugin-svelte": "^1.4.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"rollup-plugin-replace": "^2.2.0",
|
"rollup-plugin-replace": "^2.2.0",
|
||||||
"svelte": "^3.28.0"
|
"svelte": "^3.30.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"bootstrap": "lerna bootstrap",
|
"bootstrap": "lerna bootstrap",
|
||||||
|
|
|
@ -115,7 +115,7 @@
|
||||||
"rollup-plugin-terser": "^7.0.2",
|
"rollup-plugin-terser": "^7.0.2",
|
||||||
"rollup-plugin-url": "^2.2.2",
|
"rollup-plugin-url": "^2.2.2",
|
||||||
"start-server-and-test": "^1.11.0",
|
"start-server-and-test": "^1.11.0",
|
||||||
"svelte": "^3.29.0",
|
"svelte": "^3.30.0",
|
||||||
"svelte-jester": "^1.0.6"
|
"svelte-jester": "^1.0.6"
|
||||||
},
|
},
|
||||||
"gitHead": "115189f72a850bfb52b65ec61d932531bf327072"
|
"gitHead": "115189f72a850bfb52b65ec61d932531bf327072"
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
<Table {title} {schema} {data} allowEditing={true} {loading}>
|
<Table {title} {schema} {data} allowEditing={true} {loading}>
|
||||||
<CreateColumnButton />
|
<CreateColumnButton />
|
||||||
{#if Object.keys(schema).length > 0}
|
{#if schema && Object.keys(schema).length > 0}
|
||||||
<CreateRowButton />
|
<CreateRowButton />
|
||||||
<CreateViewButton />
|
<CreateViewButton />
|
||||||
<ExportButton view={tableView} />
|
<ExportButton view={tableView} />
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<script>
|
<script>
|
||||||
import { TextButton, Body, DropdownMenu, ModalContent } from "@budibase/bbui"
|
import { TextButton, Body, DropdownMenu, ModalContent } from "@budibase/bbui"
|
||||||
import { AddIcon, ArrowDownIcon } from "components/common/Icons/"
|
import { AddIcon, ArrowDownIcon } from "components/common/Icons/"
|
||||||
import { EVENT_TYPE_MEMBER_NAME } from "../../../../../client/src/old/state/eventHandlers"
|
|
||||||
import actionTypes from "./actions"
|
import actionTypes from "./actions"
|
||||||
import { createEventDispatcher } from "svelte"
|
import { createEventDispatcher } from "svelte"
|
||||||
|
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
|
const eventTypeKey = "##eventHandlerType"
|
||||||
|
|
||||||
export let event
|
export let event
|
||||||
|
|
||||||
|
@ -18,8 +18,7 @@
|
||||||
$: actions = event || []
|
$: actions = event || []
|
||||||
$: selectedActionComponent =
|
$: selectedActionComponent =
|
||||||
selectedAction &&
|
selectedAction &&
|
||||||
actionTypes.find(t => t.name === selectedAction[EVENT_TYPE_MEMBER_NAME])
|
actionTypes.find(t => t.name === selectedAction[eventTypeKey]).component
|
||||||
.component
|
|
||||||
|
|
||||||
const updateEventHandler = (updatedHandler, index) => {
|
const updateEventHandler = (updatedHandler, index) => {
|
||||||
actions[index] = updatedHandler
|
actions[index] = updatedHandler
|
||||||
|
@ -33,7 +32,7 @@
|
||||||
const addAction = actionType => () => {
|
const addAction = actionType => () => {
|
||||||
const newAction = {
|
const newAction = {
|
||||||
parameters: {},
|
parameters: {},
|
||||||
[EVENT_TYPE_MEMBER_NAME]: actionType.name,
|
[eventTypeKey]: actionType.name,
|
||||||
}
|
}
|
||||||
actions.push(newAction)
|
actions.push(newAction)
|
||||||
selectedAction = newAction
|
selectedAction = newAction
|
||||||
|
@ -79,7 +78,7 @@
|
||||||
{#each actions as action, index}
|
{#each actions as action, index}
|
||||||
<div class="action-container">
|
<div class="action-container">
|
||||||
<div class="action-header" on:click={selectAction(action)}>
|
<div class="action-header" on:click={selectAction(action)}>
|
||||||
<Body small lh>{index + 1}. {action[EVENT_TYPE_MEMBER_NAME]}</Body>
|
<Body small lh>{index + 1}. {action[eventTypeKey]}</Body>
|
||||||
<div class="row-expander" class:rotate={action !== selectedAction}>
|
<div class="row-expander" class:rotate={action !== selectedAction}>
|
||||||
<ArrowDownIcon />
|
<ArrowDownIcon />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1175,7 +1175,7 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Nav Bar",
|
name: "Nav Bar",
|
||||||
_component: "@budibase/standard-components/Navigation",
|
_component: "@budibase/standard-components/navigation",
|
||||||
description:
|
description:
|
||||||
"A component for handling the navigation within your app.",
|
"A component for handling the navigation within your app.",
|
||||||
icon: "ri-navigation-line",
|
icon: "ri-navigation-line",
|
||||||
|
|
|
@ -6878,10 +6878,10 @@ svelte-portal@^1.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/svelte-portal/-/svelte-portal-1.0.0.tgz#36a47c5578b1a4d9b4dc60fa32a904640ec4cdd3"
|
resolved "https://registry.yarnpkg.com/svelte-portal/-/svelte-portal-1.0.0.tgz#36a47c5578b1a4d9b4dc60fa32a904640ec4cdd3"
|
||||||
integrity sha512-nHf+DS/jZ6jjnZSleBMSaZua9JlG5rZv9lOGKgJuaZStfevtjIlUJrkLc3vbV8QdBvPPVmvcjTlazAzfKu0v3Q==
|
integrity sha512-nHf+DS/jZ6jjnZSleBMSaZua9JlG5rZv9lOGKgJuaZStfevtjIlUJrkLc3vbV8QdBvPPVmvcjTlazAzfKu0v3Q==
|
||||||
|
|
||||||
svelte@^3.29.0:
|
svelte@^3.30.0:
|
||||||
version "3.29.7"
|
version "3.30.0"
|
||||||
resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.29.7.tgz#e254eb2d0d609ce0fd60f052d444ac4a66d90f7d"
|
resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.30.0.tgz#cbde341e96bf34f4ac73c8f14f8a014e03bfb7d6"
|
||||||
integrity sha512-rx0g311kBODvEWUU01DFBUl3MJuJven04bvTVFUG/w0On/wuj0PajQY/QlXcJndFxG+W1s8iXKaB418tdHWc3A==
|
integrity sha512-z+hdIACb9TROGvJBQWcItMtlr4s0DBUgJss6qWrtFkOoIInkG+iAMo/FJZQFyDBQZc+dul2+TzYSi/tpTT5/Ag==
|
||||||
|
|
||||||
symbol-observable@^1.1.0:
|
symbol-observable@^1.1.0:
|
||||||
version "1.2.0"
|
version "1.2.0"
|
||||||
|
|
|
@ -0,0 +1,373 @@
|
||||||
|
Mozilla Public License Version 2.0
|
||||||
|
==================================
|
||||||
|
|
||||||
|
1. Definitions
|
||||||
|
--------------
|
||||||
|
|
||||||
|
1.1. "Contributor"
|
||||||
|
means each individual or legal entity that creates, contributes to
|
||||||
|
the creation of, or owns Covered Software.
|
||||||
|
|
||||||
|
1.2. "Contributor Version"
|
||||||
|
means the combination of the Contributions of others (if any) used
|
||||||
|
by a Contributor and that particular Contributor's Contribution.
|
||||||
|
|
||||||
|
1.3. "Contribution"
|
||||||
|
means Covered Software of a particular Contributor.
|
||||||
|
|
||||||
|
1.4. "Covered Software"
|
||||||
|
means Source Code Form to which the initial Contributor has attached
|
||||||
|
the notice in Exhibit A, the Executable Form of such Source Code
|
||||||
|
Form, and Modifications of such Source Code Form, in each case
|
||||||
|
including portions thereof.
|
||||||
|
|
||||||
|
1.5. "Incompatible With Secondary Licenses"
|
||||||
|
means
|
||||||
|
|
||||||
|
(a) that the initial Contributor has attached the notice described
|
||||||
|
in Exhibit B to the Covered Software; or
|
||||||
|
|
||||||
|
(b) that the Covered Software was made available under the terms of
|
||||||
|
version 1.1 or earlier of the License, but not also under the
|
||||||
|
terms of a Secondary License.
|
||||||
|
|
||||||
|
1.6. "Executable Form"
|
||||||
|
means any form of the work other than Source Code Form.
|
||||||
|
|
||||||
|
1.7. "Larger Work"
|
||||||
|
means a work that combines Covered Software with other material, in
|
||||||
|
a separate file or files, that is not Covered Software.
|
||||||
|
|
||||||
|
1.8. "License"
|
||||||
|
means this document.
|
||||||
|
|
||||||
|
1.9. "Licensable"
|
||||||
|
means having the right to grant, to the maximum extent possible,
|
||||||
|
whether at the time of the initial grant or subsequently, any and
|
||||||
|
all of the rights conveyed by this License.
|
||||||
|
|
||||||
|
1.10. "Modifications"
|
||||||
|
means any of the following:
|
||||||
|
|
||||||
|
(a) any file in Source Code Form that results from an addition to,
|
||||||
|
deletion from, or modification of the contents of Covered
|
||||||
|
Software; or
|
||||||
|
|
||||||
|
(b) any new file in Source Code Form that contains any Covered
|
||||||
|
Software.
|
||||||
|
|
||||||
|
1.11. "Patent Claims" of a Contributor
|
||||||
|
means any patent claim(s), including without limitation, method,
|
||||||
|
process, and apparatus claims, in any patent Licensable by such
|
||||||
|
Contributor that would be infringed, but for the grant of the
|
||||||
|
License, by the making, using, selling, offering for sale, having
|
||||||
|
made, import, or transfer of either its Contributions or its
|
||||||
|
Contributor Version.
|
||||||
|
|
||||||
|
1.12. "Secondary License"
|
||||||
|
means either the GNU General Public License, Version 2.0, the GNU
|
||||||
|
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||||
|
Public License, Version 3.0, or any later versions of those
|
||||||
|
licenses.
|
||||||
|
|
||||||
|
1.13. "Source Code Form"
|
||||||
|
means the form of the work preferred for making modifications.
|
||||||
|
|
||||||
|
1.14. "You" (or "Your")
|
||||||
|
means an individual or a legal entity exercising rights under this
|
||||||
|
License. For legal entities, "You" includes any entity that
|
||||||
|
controls, is controlled by, or is under common control with You. For
|
||||||
|
purposes of this definition, "control" means (a) the power, direct
|
||||||
|
or indirect, to cause the direction or management of such entity,
|
||||||
|
whether by contract or otherwise, or (b) ownership of more than
|
||||||
|
fifty percent (50%) of the outstanding shares or beneficial
|
||||||
|
ownership of such entity.
|
||||||
|
|
||||||
|
2. License Grants and Conditions
|
||||||
|
--------------------------------
|
||||||
|
|
||||||
|
2.1. Grants
|
||||||
|
|
||||||
|
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||||
|
non-exclusive license:
|
||||||
|
|
||||||
|
(a) under intellectual property rights (other than patent or trademark)
|
||||||
|
Licensable by such Contributor to use, reproduce, make available,
|
||||||
|
modify, display, perform, distribute, and otherwise exploit its
|
||||||
|
Contributions, either on an unmodified basis, with Modifications, or
|
||||||
|
as part of a Larger Work; and
|
||||||
|
|
||||||
|
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||||
|
for sale, have made, import, and otherwise transfer either its
|
||||||
|
Contributions or its Contributor Version.
|
||||||
|
|
||||||
|
2.2. Effective Date
|
||||||
|
|
||||||
|
The licenses granted in Section 2.1 with respect to any Contribution
|
||||||
|
become effective for each Contribution on the date the Contributor first
|
||||||
|
distributes such Contribution.
|
||||||
|
|
||||||
|
2.3. Limitations on Grant Scope
|
||||||
|
|
||||||
|
The licenses granted in this Section 2 are the only rights granted under
|
||||||
|
this License. No additional rights or licenses will be implied from the
|
||||||
|
distribution or licensing of Covered Software under this License.
|
||||||
|
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||||
|
Contributor:
|
||||||
|
|
||||||
|
(a) for any code that a Contributor has removed from Covered Software;
|
||||||
|
or
|
||||||
|
|
||||||
|
(b) for infringements caused by: (i) Your and any other third party's
|
||||||
|
modifications of Covered Software, or (ii) the combination of its
|
||||||
|
Contributions with other software (except as part of its Contributor
|
||||||
|
Version); or
|
||||||
|
|
||||||
|
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||||
|
its Contributions.
|
||||||
|
|
||||||
|
This License does not grant any rights in the trademarks, service marks,
|
||||||
|
or logos of any Contributor (except as may be necessary to comply with
|
||||||
|
the notice requirements in Section 3.4).
|
||||||
|
|
||||||
|
2.4. Subsequent Licenses
|
||||||
|
|
||||||
|
No Contributor makes additional grants as a result of Your choice to
|
||||||
|
distribute the Covered Software under a subsequent version of this
|
||||||
|
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||||
|
permitted under the terms of Section 3.3).
|
||||||
|
|
||||||
|
2.5. Representation
|
||||||
|
|
||||||
|
Each Contributor represents that the Contributor believes its
|
||||||
|
Contributions are its original creation(s) or it has sufficient rights
|
||||||
|
to grant the rights to its Contributions conveyed by this License.
|
||||||
|
|
||||||
|
2.6. Fair Use
|
||||||
|
|
||||||
|
This License is not intended to limit any rights You have under
|
||||||
|
applicable copyright doctrines of fair use, fair dealing, or other
|
||||||
|
equivalents.
|
||||||
|
|
||||||
|
2.7. Conditions
|
||||||
|
|
||||||
|
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||||
|
in Section 2.1.
|
||||||
|
|
||||||
|
3. Responsibilities
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
3.1. Distribution of Source Form
|
||||||
|
|
||||||
|
All distribution of Covered Software in Source Code Form, including any
|
||||||
|
Modifications that You create or to which You contribute, must be under
|
||||||
|
the terms of this License. You must inform recipients that the Source
|
||||||
|
Code Form of the Covered Software is governed by the terms of this
|
||||||
|
License, and how they can obtain a copy of this License. You may not
|
||||||
|
attempt to alter or restrict the recipients' rights in the Source Code
|
||||||
|
Form.
|
||||||
|
|
||||||
|
3.2. Distribution of Executable Form
|
||||||
|
|
||||||
|
If You distribute Covered Software in Executable Form then:
|
||||||
|
|
||||||
|
(a) such Covered Software must also be made available in Source Code
|
||||||
|
Form, as described in Section 3.1, and You must inform recipients of
|
||||||
|
the Executable Form how they can obtain a copy of such Source Code
|
||||||
|
Form by reasonable means in a timely manner, at a charge no more
|
||||||
|
than the cost of distribution to the recipient; and
|
||||||
|
|
||||||
|
(b) You may distribute such Executable Form under the terms of this
|
||||||
|
License, or sublicense it under different terms, provided that the
|
||||||
|
license for the Executable Form does not attempt to limit or alter
|
||||||
|
the recipients' rights in the Source Code Form under this License.
|
||||||
|
|
||||||
|
3.3. Distribution of a Larger Work
|
||||||
|
|
||||||
|
You may create and distribute a Larger Work under terms of Your choice,
|
||||||
|
provided that You also comply with the requirements of this License for
|
||||||
|
the Covered Software. If the Larger Work is a combination of Covered
|
||||||
|
Software with a work governed by one or more Secondary Licenses, and the
|
||||||
|
Covered Software is not Incompatible With Secondary Licenses, this
|
||||||
|
License permits You to additionally distribute such Covered Software
|
||||||
|
under the terms of such Secondary License(s), so that the recipient of
|
||||||
|
the Larger Work may, at their option, further distribute the Covered
|
||||||
|
Software under the terms of either this License or such Secondary
|
||||||
|
License(s).
|
||||||
|
|
||||||
|
3.4. Notices
|
||||||
|
|
||||||
|
You may not remove or alter the substance of any license notices
|
||||||
|
(including copyright notices, patent notices, disclaimers of warranty,
|
||||||
|
or limitations of liability) contained within the Source Code Form of
|
||||||
|
the Covered Software, except that You may alter any license notices to
|
||||||
|
the extent required to remedy known factual inaccuracies.
|
||||||
|
|
||||||
|
3.5. Application of Additional Terms
|
||||||
|
|
||||||
|
You may choose to offer, and to charge a fee for, warranty, support,
|
||||||
|
indemnity or liability obligations to one or more recipients of Covered
|
||||||
|
Software. However, You may do so only on Your own behalf, and not on
|
||||||
|
behalf of any Contributor. You must make it absolutely clear that any
|
||||||
|
such warranty, support, indemnity, or liability obligation is offered by
|
||||||
|
You alone, and You hereby agree to indemnify every Contributor for any
|
||||||
|
liability incurred by such Contributor as a result of warranty, support,
|
||||||
|
indemnity or liability terms You offer. You may include additional
|
||||||
|
disclaimers of warranty and limitations of liability specific to any
|
||||||
|
jurisdiction.
|
||||||
|
|
||||||
|
4. Inability to Comply Due to Statute or Regulation
|
||||||
|
---------------------------------------------------
|
||||||
|
|
||||||
|
If it is impossible for You to comply with any of the terms of this
|
||||||
|
License with respect to some or all of the Covered Software due to
|
||||||
|
statute, judicial order, or regulation then You must: (a) comply with
|
||||||
|
the terms of this License to the maximum extent possible; and (b)
|
||||||
|
describe the limitations and the code they affect. Such description must
|
||||||
|
be placed in a text file included with all distributions of the Covered
|
||||||
|
Software under this License. Except to the extent prohibited by statute
|
||||||
|
or regulation, such description must be sufficiently detailed for a
|
||||||
|
recipient of ordinary skill to be able to understand it.
|
||||||
|
|
||||||
|
5. Termination
|
||||||
|
--------------
|
||||||
|
|
||||||
|
5.1. The rights granted under this License will terminate automatically
|
||||||
|
if You fail to comply with any of its terms. However, if You become
|
||||||
|
compliant, then the rights granted under this License from a particular
|
||||||
|
Contributor are reinstated (a) provisionally, unless and until such
|
||||||
|
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||||
|
ongoing basis, if such Contributor fails to notify You of the
|
||||||
|
non-compliance by some reasonable means prior to 60 days after You have
|
||||||
|
come back into compliance. Moreover, Your grants from a particular
|
||||||
|
Contributor are reinstated on an ongoing basis if such Contributor
|
||||||
|
notifies You of the non-compliance by some reasonable means, this is the
|
||||||
|
first time You have received notice of non-compliance with this License
|
||||||
|
from such Contributor, and You become compliant prior to 30 days after
|
||||||
|
Your receipt of the notice.
|
||||||
|
|
||||||
|
5.2. If You initiate litigation against any entity by asserting a patent
|
||||||
|
infringement claim (excluding declaratory judgment actions,
|
||||||
|
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||||
|
directly or indirectly infringes any patent, then the rights granted to
|
||||||
|
You by any and all Contributors for the Covered Software under Section
|
||||||
|
2.1 of this License shall terminate.
|
||||||
|
|
||||||
|
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||||
|
end user license agreements (excluding distributors and resellers) which
|
||||||
|
have been validly granted by You or Your distributors under this License
|
||||||
|
prior to termination shall survive termination.
|
||||||
|
|
||||||
|
************************************************************************
|
||||||
|
* *
|
||||||
|
* 6. Disclaimer of Warranty *
|
||||||
|
* ------------------------- *
|
||||||
|
* *
|
||||||
|
* Covered Software is provided under this License on an "as is" *
|
||||||
|
* basis, without warranty of any kind, either expressed, implied, or *
|
||||||
|
* statutory, including, without limitation, warranties that the *
|
||||||
|
* Covered Software is free of defects, merchantable, fit for a *
|
||||||
|
* particular purpose or non-infringing. The entire risk as to the *
|
||||||
|
* quality and performance of the Covered Software is with You. *
|
||||||
|
* Should any Covered Software prove defective in any respect, You *
|
||||||
|
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||||
|
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||||
|
* essential part of this License. No use of any Covered Software is *
|
||||||
|
* authorized under this License except under this disclaimer. *
|
||||||
|
* *
|
||||||
|
************************************************************************
|
||||||
|
|
||||||
|
************************************************************************
|
||||||
|
* *
|
||||||
|
* 7. Limitation of Liability *
|
||||||
|
* -------------------------- *
|
||||||
|
* *
|
||||||
|
* Under no circumstances and under no legal theory, whether tort *
|
||||||
|
* (including negligence), contract, or otherwise, shall any *
|
||||||
|
* Contributor, or anyone who distributes Covered Software as *
|
||||||
|
* permitted above, be liable to You for any direct, indirect, *
|
||||||
|
* special, incidental, or consequential damages of any character *
|
||||||
|
* including, without limitation, damages for lost profits, loss of *
|
||||||
|
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||||
|
* and all other commercial damages or losses, even if such party *
|
||||||
|
* shall have been informed of the possibility of such damages. This *
|
||||||
|
* limitation of liability shall not apply to liability for death or *
|
||||||
|
* personal injury resulting from such party's negligence to the *
|
||||||
|
* extent applicable law prohibits such limitation. Some *
|
||||||
|
* jurisdictions do not allow the exclusion or limitation of *
|
||||||
|
* incidental or consequential damages, so this exclusion and *
|
||||||
|
* limitation may not apply to You. *
|
||||||
|
* *
|
||||||
|
************************************************************************
|
||||||
|
|
||||||
|
8. Litigation
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Any litigation relating to this License may be brought only in the
|
||||||
|
courts of a jurisdiction where the defendant maintains its principal
|
||||||
|
place of business and such litigation shall be governed by laws of that
|
||||||
|
jurisdiction, without reference to its conflict-of-law provisions.
|
||||||
|
Nothing in this Section shall prevent a party's ability to bring
|
||||||
|
cross-claims or counter-claims.
|
||||||
|
|
||||||
|
9. Miscellaneous
|
||||||
|
----------------
|
||||||
|
|
||||||
|
This License represents the complete agreement concerning the subject
|
||||||
|
matter hereof. If any provision of this License is held to be
|
||||||
|
unenforceable, such provision shall be reformed only to the extent
|
||||||
|
necessary to make it enforceable. Any law or regulation which provides
|
||||||
|
that the language of a contract shall be construed against the drafter
|
||||||
|
shall not be used to construe this License against a Contributor.
|
||||||
|
|
||||||
|
10. Versions of the License
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
10.1. New Versions
|
||||||
|
|
||||||
|
Mozilla Foundation is the license steward. Except as provided in Section
|
||||||
|
10.3, no one other than the license steward has the right to modify or
|
||||||
|
publish new versions of this License. Each version will be given a
|
||||||
|
distinguishing version number.
|
||||||
|
|
||||||
|
10.2. Effect of New Versions
|
||||||
|
|
||||||
|
You may distribute the Covered Software under the terms of the version
|
||||||
|
of the License under which You originally received the Covered Software,
|
||||||
|
or under the terms of any subsequent version published by the license
|
||||||
|
steward.
|
||||||
|
|
||||||
|
10.3. Modified Versions
|
||||||
|
|
||||||
|
If you create software not governed by this License, and you want to
|
||||||
|
create a new license for such software, you may create and use a
|
||||||
|
modified version of this License if you rename the license and remove
|
||||||
|
any references to the name of the license steward (except to note that
|
||||||
|
such modified license differs from this License).
|
||||||
|
|
||||||
|
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||||
|
Licenses
|
||||||
|
|
||||||
|
If You choose to distribute Source Code Form that is Incompatible With
|
||||||
|
Secondary Licenses under the terms of this version of the License, the
|
||||||
|
notice described in Exhibit B of this License must be attached.
|
||||||
|
|
||||||
|
Exhibit A - Source Code Form License Notice
|
||||||
|
-------------------------------------------
|
||||||
|
|
||||||
|
This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
|
If it is not possible or desirable to put the notice in a particular
|
||||||
|
file, then You may include the notice in a location (such as a LICENSE
|
||||||
|
file in a relevant directory) where a recipient would be likely to look
|
||||||
|
for such a notice.
|
||||||
|
|
||||||
|
You may add additional accurate notices of copyright ownership.
|
||||||
|
|
||||||
|
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||||
|
---------------------------------------------------------
|
||||||
|
|
||||||
|
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||||
|
defined by the Mozilla Public License, v. 2.0.
|
|
@ -23,11 +23,11 @@
|
||||||
"rollup": "^2.33.2",
|
"rollup": "^2.33.2",
|
||||||
"rollup-plugin-node-builtins": "^2.1.2",
|
"rollup-plugin-node-builtins": "^2.1.2",
|
||||||
"rollup-plugin-node-globals": "^1.4.0",
|
"rollup-plugin-node-globals": "^1.4.0",
|
||||||
|
"rollup-plugin-svelte": "^6.1.1",
|
||||||
"rollup-plugin-node-resolve": "^5.2.0",
|
"rollup-plugin-node-resolve": "^5.2.0",
|
||||||
"rollup-plugin-terser": "^4.0.4",
|
"rollup-plugin-terser": "^4.0.4",
|
||||||
"svelte": "^3.29.7",
|
"svelte": "^3.30.0",
|
||||||
"svelte-jester": "^1.0.6",
|
"svelte-jester": "^1.0.6"
|
||||||
"rollup-plugin-svelte": "^6.1.1"
|
|
||||||
},
|
},
|
||||||
"gitHead": "e4e053cb6ff9a0ddc7115b44ccaa24b8ec41fb9a"
|
"gitHead": "e4e053cb6ff9a0ddc7115b44ccaa24b8ec41fb9a"
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,14 +10,8 @@ export default {
|
||||||
output: [
|
output: [
|
||||||
{
|
{
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
format: "iife",
|
|
||||||
name: "app",
|
|
||||||
file: `./dist/budibase-client.js`,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
file: "dist/budibase-client.esm.mjs",
|
|
||||||
format: "esm",
|
format: "esm",
|
||||||
sourcemap: "inline",
|
file: `./dist/budibase-client.js`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
plugins: [
|
plugins: [
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
export let definition = {}
|
export let definition = {}
|
||||||
|
|
||||||
// Get local data binding context
|
// Get local data binding context
|
||||||
const dataStore = getContext("data")
|
const dataContext = getContext("data")
|
||||||
|
|
||||||
// Create component context
|
// Create component context
|
||||||
const componentStore = writable({})
|
const componentStore = writable({})
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
$: constructor = getComponentConstructor(definition._component)
|
$: constructor = getComponentConstructor(definition._component)
|
||||||
$: children = definition._children
|
$: children = definition._children
|
||||||
$: id = definition._id
|
$: id = definition._id
|
||||||
$: enrichedProps = enrichProps(definition, $dataStore, $bindingStore)
|
$: enrichedProps = enrichProps(definition, $dataContext, $bindingStore)
|
||||||
|
|
||||||
// Update component context
|
// Update component context
|
||||||
// ID is duplicated inside style so that the "styleable" helper can set
|
// ID is duplicated inside style so that the "styleable" helper can set
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
export let row
|
export let row
|
||||||
|
|
||||||
// Clone and create new data context for this component tree
|
// Clone and create new data context for this component tree
|
||||||
const data = getContext("data")
|
const dataContext = getContext("data")
|
||||||
const component = getContext("component")
|
const component = getContext("component")
|
||||||
const newData = createDataStore($data)
|
const newData = createDataStore($dataContext)
|
||||||
setContext("data", newData)
|
setContext("data", newData)
|
||||||
$: newData.actions.addContext(row, $component.id)
|
$: newData.actions.addContext(row, $component.id)
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -30,3 +30,9 @@
|
||||||
<Router on:routeLoading={onRouteLoading} routes={routerConfig} />
|
<Router on:routeLoading={onRouteLoading} routes={routerConfig} />
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
div {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
|
import { fade } from "svelte/transition"
|
||||||
import { screenStore, routeStore } from "../store"
|
import { screenStore, routeStore } from "../store"
|
||||||
import Component from "./Component.svelte"
|
import Component from "./Component.svelte"
|
||||||
|
|
||||||
|
@ -17,5 +18,18 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#each screens as screen (screen._id)}
|
{#each screens as screen (screen._id)}
|
||||||
|
<div in:fade>
|
||||||
<Component definition={screen} />
|
<Component definition={screen} />
|
||||||
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
div {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
align-self: stretch;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: stretch;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -1,88 +0,0 @@
|
||||||
import { attachChildren } from "./render/attachChildren"
|
|
||||||
import { createTreeNode } from "./render/prepareRenderComponent"
|
|
||||||
import { screenRouter } from "./render/screenRouter"
|
|
||||||
import { createStateManager } from "./state/stateManager"
|
|
||||||
import { getAppId } from "@budibase/component-sdk"
|
|
||||||
|
|
||||||
export const createApp = ({
|
|
||||||
componentLibraries,
|
|
||||||
frontendDefinition,
|
|
||||||
window,
|
|
||||||
}) => {
|
|
||||||
let routeTo
|
|
||||||
let currentUrl
|
|
||||||
let screenStateManager
|
|
||||||
|
|
||||||
const onScreenSlotRendered = screenSlotNode => {
|
|
||||||
const onScreenSelected = (screen, url) => {
|
|
||||||
const stateManager = createStateManager({
|
|
||||||
componentLibraries,
|
|
||||||
onScreenSlotRendered: () => {},
|
|
||||||
routeTo,
|
|
||||||
})
|
|
||||||
const getAttachChildrenParams = attachChildrenParams(stateManager)
|
|
||||||
screenSlotNode.props._children = [screen.props]
|
|
||||||
const initialiseChildParams = getAttachChildrenParams(screenSlotNode)
|
|
||||||
attachChildren(initialiseChildParams)(screenSlotNode.rootElement, {
|
|
||||||
hydrate: true,
|
|
||||||
force: true,
|
|
||||||
})
|
|
||||||
if (screenStateManager) screenStateManager.destroy()
|
|
||||||
screenStateManager = stateManager
|
|
||||||
currentUrl = url
|
|
||||||
}
|
|
||||||
|
|
||||||
routeTo = screenRouter({
|
|
||||||
screens: frontendDefinition.screens,
|
|
||||||
onScreenSelected,
|
|
||||||
window,
|
|
||||||
})
|
|
||||||
const fallbackPath = window.location.pathname.replace(getAppId(), "")
|
|
||||||
routeTo(currentUrl || fallbackPath)
|
|
||||||
}
|
|
||||||
|
|
||||||
const attachChildrenParams = stateManager => {
|
|
||||||
const getInitialiseParams = treeNode => ({
|
|
||||||
componentLibraries,
|
|
||||||
treeNode,
|
|
||||||
onScreenSlotRendered,
|
|
||||||
setupState: stateManager.setup,
|
|
||||||
})
|
|
||||||
|
|
||||||
return getInitialiseParams
|
|
||||||
}
|
|
||||||
|
|
||||||
let rootTreeNode
|
|
||||||
const pageStateManager = createStateManager({
|
|
||||||
componentLibraries,
|
|
||||||
onScreenSlotRendered,
|
|
||||||
// seems weird, but the routeTo variable may not be available at this point
|
|
||||||
routeTo: url => routeTo(url),
|
|
||||||
})
|
|
||||||
|
|
||||||
const initialisePage = (page, target, urlPath) => {
|
|
||||||
currentUrl = urlPath
|
|
||||||
|
|
||||||
rootTreeNode = createTreeNode()
|
|
||||||
rootTreeNode.props = {
|
|
||||||
_children: [page.props],
|
|
||||||
}
|
|
||||||
const getInitialiseParams = attachChildrenParams(pageStateManager)
|
|
||||||
const initChildParams = getInitialiseParams(rootTreeNode)
|
|
||||||
|
|
||||||
attachChildren(initChildParams)(target, {
|
|
||||||
hydrate: true,
|
|
||||||
force: true,
|
|
||||||
})
|
|
||||||
|
|
||||||
return rootTreeNode
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
initialisePage,
|
|
||||||
screenStore: () => screenStateManager.store,
|
|
||||||
pageStore: () => pageStateManager.store,
|
|
||||||
routeTo: () => routeTo,
|
|
||||||
rootNode: () => rootTreeNode,
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,59 +0,0 @@
|
||||||
import { createApp } from "./createApp"
|
|
||||||
import { builtins, builtinLibName } from "./render/builtinComponents"
|
|
||||||
import { getAppId } from "@budibase/component-sdk"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* create a web application from static budibase definition files.
|
|
||||||
* @param {object} opts - configuration options for budibase client libary
|
|
||||||
*/
|
|
||||||
export const loadBudibase = async opts => {
|
|
||||||
const _window = (opts && opts.window) || window
|
|
||||||
// const _localStorage = (opts && opts.localStorage) || localStorage
|
|
||||||
const appId = getAppId(window.document.cookie)
|
|
||||||
const frontendDefinition = _window["##BUDIBASE_FRONTEND_DEFINITION##"]
|
|
||||||
|
|
||||||
const user = {}
|
|
||||||
|
|
||||||
const componentLibraryModules = (opts && opts.componentLibraries) || {}
|
|
||||||
|
|
||||||
const libraries = frontendDefinition.libraries || []
|
|
||||||
|
|
||||||
for (let library of libraries) {
|
|
||||||
// fetch the JavaScript for the component libraries from the server
|
|
||||||
componentLibraryModules[library] = await import(
|
|
||||||
`/componentlibrary?library=${encodeURI(library)}&appId=${appId}`
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
componentLibraryModules[builtinLibName] = builtins(_window)
|
|
||||||
|
|
||||||
const {
|
|
||||||
initialisePage,
|
|
||||||
screenStore,
|
|
||||||
pageStore,
|
|
||||||
routeTo,
|
|
||||||
rootNode,
|
|
||||||
} = createApp({
|
|
||||||
componentLibraries: componentLibraryModules,
|
|
||||||
frontendDefinition,
|
|
||||||
user,
|
|
||||||
window: _window,
|
|
||||||
})
|
|
||||||
|
|
||||||
const route = _window.location
|
|
||||||
? _window.location.pathname.replace(`${appId}/`, "").replace(appId, "")
|
|
||||||
: ""
|
|
||||||
|
|
||||||
initialisePage(frontendDefinition.page, _window.document.body, route)
|
|
||||||
|
|
||||||
return {
|
|
||||||
screenStore,
|
|
||||||
pageStore,
|
|
||||||
routeTo,
|
|
||||||
rootNode,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (window) {
|
|
||||||
window.loadBudibase = loadBudibase
|
|
||||||
}
|
|
|
@ -1,138 +0,0 @@
|
||||||
import { prepareRenderComponent } from "./prepareRenderComponent"
|
|
||||||
import { isScreenSlot } from "./builtinComponents"
|
|
||||||
import deepEqual from "deep-equal"
|
|
||||||
import appStore from "../state/store"
|
|
||||||
|
|
||||||
export const attachChildren = initialiseOpts => (htmlElement, options) => {
|
|
||||||
const {
|
|
||||||
componentLibraries,
|
|
||||||
treeNode,
|
|
||||||
onScreenSlotRendered,
|
|
||||||
setupState,
|
|
||||||
} = initialiseOpts
|
|
||||||
|
|
||||||
const anchor = options && options.anchor ? options.anchor : null
|
|
||||||
const force = options ? options.force : false
|
|
||||||
const hydrate = options ? options.hydrate : true
|
|
||||||
const context = options && options.context
|
|
||||||
|
|
||||||
if (!force && treeNode.children.length > 0) return treeNode.children
|
|
||||||
|
|
||||||
for (let childNode of treeNode.children) {
|
|
||||||
childNode.destroy()
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!htmlElement) return
|
|
||||||
|
|
||||||
if (hydrate) {
|
|
||||||
while (htmlElement.firstChild) {
|
|
||||||
htmlElement.removeChild(htmlElement.firstChild)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const contextStoreKeys = []
|
|
||||||
|
|
||||||
// create new context if supplied
|
|
||||||
if (context) {
|
|
||||||
let childIndex = 0
|
|
||||||
// if context is an array, map to new structure
|
|
||||||
const contextArray = Array.isArray(context) ? context : [context]
|
|
||||||
for (let ctx of contextArray) {
|
|
||||||
const key = appStore.create(
|
|
||||||
ctx,
|
|
||||||
treeNode.props._id,
|
|
||||||
childIndex,
|
|
||||||
treeNode.contextStoreKey
|
|
||||||
)
|
|
||||||
contextStoreKeys.push(key)
|
|
||||||
childIndex++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const childNodes = []
|
|
||||||
|
|
||||||
const createChildNodes = contextStoreKey => {
|
|
||||||
for (let childProps of treeNode.props._children) {
|
|
||||||
const { componentName, libName } = splitName(childProps._component)
|
|
||||||
|
|
||||||
if (!componentName || !libName) return
|
|
||||||
|
|
||||||
const ComponentConstructor = componentLibraries[libName][componentName]
|
|
||||||
|
|
||||||
const childNode = prepareRenderComponent({
|
|
||||||
props: childProps,
|
|
||||||
parentNode: treeNode,
|
|
||||||
ComponentConstructor,
|
|
||||||
htmlElement,
|
|
||||||
anchor,
|
|
||||||
// in same context as parent, unless a new one was supplied
|
|
||||||
contextStoreKey,
|
|
||||||
})
|
|
||||||
|
|
||||||
childNodes.push(childNode)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (context) {
|
|
||||||
// if new context(s) is supplied, then create nodes
|
|
||||||
// with keys to new context stores
|
|
||||||
for (let contextStoreKey of contextStoreKeys) {
|
|
||||||
createChildNodes(contextStoreKey)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// otherwise, use same context store as parent
|
|
||||||
// which maybe undefined (therfor using the root state)
|
|
||||||
createChildNodes(treeNode.contextStoreKey)
|
|
||||||
}
|
|
||||||
|
|
||||||
// if everything is equal, then don't re-render
|
|
||||||
if (areTreeNodesEqual(treeNode.children, childNodes)) return treeNode.children
|
|
||||||
|
|
||||||
for (let node of childNodes) {
|
|
||||||
const initialProps = setupState(node)
|
|
||||||
node.render(initialProps)
|
|
||||||
}
|
|
||||||
|
|
||||||
const screenSlot = childNodes.find(n => isScreenSlot(n.props._component))
|
|
||||||
|
|
||||||
if (onScreenSlotRendered && screenSlot) {
|
|
||||||
// assuming there is only ever one screen slot
|
|
||||||
onScreenSlotRendered(screenSlot)
|
|
||||||
}
|
|
||||||
|
|
||||||
treeNode.children = childNodes
|
|
||||||
|
|
||||||
return childNodes
|
|
||||||
}
|
|
||||||
|
|
||||||
const splitName = fullname => {
|
|
||||||
const nameParts = fullname.split("/")
|
|
||||||
|
|
||||||
const componentName = nameParts[nameParts.length - 1]
|
|
||||||
|
|
||||||
const libName = fullname.substring(
|
|
||||||
0,
|
|
||||||
fullname.length - componentName.length - 1
|
|
||||||
)
|
|
||||||
|
|
||||||
return { libName, componentName }
|
|
||||||
}
|
|
||||||
|
|
||||||
const areTreeNodesEqual = (children1, children2) => {
|
|
||||||
if (children1.length !== children2.length) return false
|
|
||||||
if (children1 === children2) return true
|
|
||||||
|
|
||||||
let isEqual = false
|
|
||||||
for (let i = 0; i < children1.length; i++) {
|
|
||||||
// same context and same children, then nothing has changed
|
|
||||||
isEqual =
|
|
||||||
deepEqual(children1[i].context, children2[i].context) &&
|
|
||||||
areTreeNodesEqual(children1[i].children, children2[i].children)
|
|
||||||
if (!isEqual) return false
|
|
||||||
if (isScreenSlot(children1[i].parentNode.props._component)) {
|
|
||||||
isEqual = deepEqual(children1[i].props, children2[i].props)
|
|
||||||
}
|
|
||||||
if (!isEqual) return false
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
import { screenSlotComponent } from "./screenSlotComponent"
|
|
||||||
|
|
||||||
export const builtinLibName = "##builtin"
|
|
||||||
|
|
||||||
export const isScreenSlot = componentName =>
|
|
||||||
componentName === "##builtin/screenslot"
|
|
||||||
|
|
||||||
export const builtins = window => ({
|
|
||||||
screenslot: screenSlotComponent(window),
|
|
||||||
})
|
|
|
@ -1,88 +0,0 @@
|
||||||
import renderTemplateString from "../state/renderTemplateString"
|
|
||||||
import appStore from "../state/store"
|
|
||||||
import hasBinding from "../state/hasBinding"
|
|
||||||
|
|
||||||
export const prepareRenderComponent = ({
|
|
||||||
ComponentConstructor,
|
|
||||||
htmlElement,
|
|
||||||
anchor,
|
|
||||||
props,
|
|
||||||
parentNode,
|
|
||||||
contextStoreKey,
|
|
||||||
}) => {
|
|
||||||
const thisNode = createTreeNode()
|
|
||||||
thisNode.parentNode = parentNode
|
|
||||||
thisNode.props = props
|
|
||||||
thisNode.contextStoreKey = contextStoreKey
|
|
||||||
|
|
||||||
// the treeNode is first created (above), and then this
|
|
||||||
// render method is add. The treeNode is returned, and
|
|
||||||
// render is called later (in attachChildren)
|
|
||||||
thisNode.render = initialProps => {
|
|
||||||
thisNode.component = new ComponentConstructor({
|
|
||||||
target: htmlElement,
|
|
||||||
props: initialProps,
|
|
||||||
hydrate: false,
|
|
||||||
anchor,
|
|
||||||
})
|
|
||||||
|
|
||||||
// finds the root element of the component, which was created by the contructor above
|
|
||||||
// we use this later to attach a className to. This is how styles
|
|
||||||
// are applied by the builder
|
|
||||||
thisNode.rootElement = htmlElement.children[htmlElement.children.length - 1]
|
|
||||||
|
|
||||||
let [componentName] = props._component.match(/[a-z]*$/)
|
|
||||||
if (props._id && thisNode.rootElement) {
|
|
||||||
thisNode.rootElement.classList.add(`${componentName}-${props._id}`)
|
|
||||||
}
|
|
||||||
|
|
||||||
// make this node listen to the store
|
|
||||||
if (thisNode.stateBound) {
|
|
||||||
const unsubscribe = appStore.subscribe(state => {
|
|
||||||
const storeBoundProps = Object.keys(initialProps._bb.props).filter(p =>
|
|
||||||
hasBinding(initialProps._bb.props[p])
|
|
||||||
)
|
|
||||||
if (storeBoundProps.length > 0) {
|
|
||||||
const toSet = {}
|
|
||||||
for (let prop of storeBoundProps) {
|
|
||||||
const propValue = initialProps._bb.props[prop]
|
|
||||||
toSet[prop] = renderTemplateString(propValue, state)
|
|
||||||
}
|
|
||||||
thisNode.component.$set(toSet)
|
|
||||||
}
|
|
||||||
}, thisNode.contextStoreKey)
|
|
||||||
thisNode.unsubscribe = unsubscribe
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return thisNode
|
|
||||||
}
|
|
||||||
|
|
||||||
export const createTreeNode = () => ({
|
|
||||||
context: {},
|
|
||||||
props: {},
|
|
||||||
rootElement: null,
|
|
||||||
parentNode: null,
|
|
||||||
children: [],
|
|
||||||
bindings: [],
|
|
||||||
component: null,
|
|
||||||
unsubscribe: () => {},
|
|
||||||
render: () => {},
|
|
||||||
get destroy() {
|
|
||||||
const node = this
|
|
||||||
return () => {
|
|
||||||
if (node.children) {
|
|
||||||
// destroy children first - from leaf nodes up
|
|
||||||
for (let child of node.children) {
|
|
||||||
child.destroy()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (node.unsubscribe) node.unsubscribe()
|
|
||||||
if (node.component && node.component.$destroy) node.component.$destroy()
|
|
||||||
for (let onDestroyItem of node.onDestroy) {
|
|
||||||
onDestroyItem()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onDestroy: [],
|
|
||||||
})
|
|
|
@ -1,124 +0,0 @@
|
||||||
import regexparam from "regexparam"
|
|
||||||
import appStore from "../state/store"
|
|
||||||
import { getAppId } from "@budibase/component-sdk"
|
|
||||||
|
|
||||||
export const screenRouter = ({ screens, onScreenSelected, window }) => {
|
|
||||||
function sanitize(url) {
|
|
||||||
if (!url) return url
|
|
||||||
return url
|
|
||||||
.split("/")
|
|
||||||
.map(part => {
|
|
||||||
// if parameter, then use as is
|
|
||||||
if (part.startsWith(":")) return part
|
|
||||||
return encodeURIComponent(part)
|
|
||||||
})
|
|
||||||
.join("/")
|
|
||||||
.toLowerCase()
|
|
||||||
}
|
|
||||||
|
|
||||||
const isRunningLocally = () => {
|
|
||||||
const hostname = (window.location && window.location.hostname) || ""
|
|
||||||
return (
|
|
||||||
hostname === "localhost" ||
|
|
||||||
hostname === "127.0.0.1" ||
|
|
||||||
hostname.startsWith("192.168")
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
const makeRootedPath = url => {
|
|
||||||
if (isRunningLocally()) {
|
|
||||||
const appId = getAppId()
|
|
||||||
if (url) {
|
|
||||||
url = sanitize(url)
|
|
||||||
if (!url.startsWith("/")) {
|
|
||||||
url = `/${url}`
|
|
||||||
}
|
|
||||||
if (url.startsWith(`/${appId}`)) {
|
|
||||||
return url
|
|
||||||
}
|
|
||||||
return `/${appId}${url}`
|
|
||||||
}
|
|
||||||
return `/${appId}`
|
|
||||||
}
|
|
||||||
return sanitize(url)
|
|
||||||
}
|
|
||||||
|
|
||||||
const routes = screens.map(screen =>
|
|
||||||
makeRootedPath(screen.routing ? screen.routing.route : null)
|
|
||||||
)
|
|
||||||
let fallback = routes.findIndex(([p]) => p === makeRootedPath("*"))
|
|
||||||
if (fallback < 0) fallback = 0
|
|
||||||
|
|
||||||
let current
|
|
||||||
|
|
||||||
function route(url) {
|
|
||||||
const _url = makeRootedPath(url.state || url)
|
|
||||||
current = routes.findIndex(
|
|
||||||
p =>
|
|
||||||
p !== makeRootedPath("*") &&
|
|
||||||
new RegExp("^" + p.toLowerCase() + "$").test(_url.toLowerCase())
|
|
||||||
)
|
|
||||||
|
|
||||||
const params = {}
|
|
||||||
|
|
||||||
if (current === -1) {
|
|
||||||
routes.forEach((p, i) => {
|
|
||||||
// ignore home - which matched everything
|
|
||||||
if (p === makeRootedPath("*")) return
|
|
||||||
const pm = regexparam(p)
|
|
||||||
const matches = pm.pattern.exec(_url)
|
|
||||||
|
|
||||||
if (!matches) return
|
|
||||||
|
|
||||||
let j = 0
|
|
||||||
while (j < pm.keys.length) {
|
|
||||||
params[pm.keys[j]] = matches[++j] || null
|
|
||||||
}
|
|
||||||
|
|
||||||
current = i
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
appStore.update(state => {
|
|
||||||
state["##routeParams"] = params
|
|
||||||
return state
|
|
||||||
})
|
|
||||||
|
|
||||||
const screenIndex = current !== -1 ? current : fallback
|
|
||||||
|
|
||||||
try {
|
|
||||||
!url.state && history.pushState(_url, null, _url)
|
|
||||||
} catch (_) {
|
|
||||||
// ignoring an exception here as the builder runs an iframe, which does not like this
|
|
||||||
}
|
|
||||||
|
|
||||||
onScreenSelected(screens[screenIndex], _url)
|
|
||||||
}
|
|
||||||
|
|
||||||
function click(e) {
|
|
||||||
const x = e.target.closest("a")
|
|
||||||
const y = x && x.getAttribute("href")
|
|
||||||
|
|
||||||
if (
|
|
||||||
e.ctrlKey ||
|
|
||||||
e.metaKey ||
|
|
||||||
e.altKey ||
|
|
||||||
e.shiftKey ||
|
|
||||||
e.button ||
|
|
||||||
e.defaultPrevented
|
|
||||||
)
|
|
||||||
return
|
|
||||||
|
|
||||||
const target = (x && x.target) || "_self"
|
|
||||||
if (!y || target !== "_self" || x.host !== location.host) return
|
|
||||||
|
|
||||||
e.preventDefault()
|
|
||||||
route(y)
|
|
||||||
}
|
|
||||||
|
|
||||||
addEventListener("popstate", route)
|
|
||||||
addEventListener("pushstate", route)
|
|
||||||
addEventListener("click", click)
|
|
||||||
|
|
||||||
return route
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
export const screenSlotComponent = window => {
|
|
||||||
return function(opts) {
|
|
||||||
const node = window.document.createElement("DIV")
|
|
||||||
const $set = props => {
|
|
||||||
props._bb.attachChildren(node)
|
|
||||||
}
|
|
||||||
const $destroy = () => {
|
|
||||||
if (opts.target && node) opts.target.removeChild(node)
|
|
||||||
}
|
|
||||||
this.$set = $set
|
|
||||||
this.$destroy = $destroy
|
|
||||||
opts.target.appendChild(node)
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,34 +0,0 @@
|
||||||
import setBindableComponentProp from "./setBindableComponentProp"
|
|
||||||
import { attachChildren } from "../render/attachChildren"
|
|
||||||
import store from "./store"
|
|
||||||
|
|
||||||
export const bbFactory = ({
|
|
||||||
componentLibraries,
|
|
||||||
onScreenSlotRendered,
|
|
||||||
runEventActions,
|
|
||||||
}) => {
|
|
||||||
return (treeNode, setupState) => {
|
|
||||||
const attachParams = {
|
|
||||||
componentLibraries,
|
|
||||||
treeNode,
|
|
||||||
onScreenSlotRendered,
|
|
||||||
setupState,
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
attachChildren: attachChildren(attachParams),
|
|
||||||
props: treeNode.props,
|
|
||||||
call: async eventName =>
|
|
||||||
eventName &&
|
|
||||||
(await runEventActions(
|
|
||||||
treeNode.props[eventName],
|
|
||||||
store.getState(treeNode.contextStoreKey)
|
|
||||||
)),
|
|
||||||
setBinding: setBindableComponentProp(treeNode),
|
|
||||||
parent,
|
|
||||||
store: store.getStore(treeNode.contextStoreKey),
|
|
||||||
// these parameters are populated by screenRouter
|
|
||||||
routeParams: () => store.getState()["##routeParams"],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,42 +0,0 @@
|
||||||
import renderTemplateString from "./renderTemplateString"
|
|
||||||
import { updateRow, saveRow, deleteRow } from "@budibase/component-sdk"
|
|
||||||
|
|
||||||
export const EVENT_TYPE_MEMBER_NAME = "##eventHandlerType"
|
|
||||||
|
|
||||||
export const eventHandlers = routeTo => {
|
|
||||||
const handlers = {
|
|
||||||
"Navigate To": param => routeTo(param && param.url),
|
|
||||||
"Update Row": updateRow,
|
|
||||||
"Save Row": saveRow,
|
|
||||||
"Delete Row": deleteRow,
|
|
||||||
}
|
|
||||||
|
|
||||||
// when an event is called, this is what gets run
|
|
||||||
const runEventActions = async (actions, state) => {
|
|
||||||
if (!actions) return
|
|
||||||
// calls event handlers sequentially
|
|
||||||
for (let action of actions) {
|
|
||||||
const handler = handlers[action[EVENT_TYPE_MEMBER_NAME]]
|
|
||||||
const parameters = createParameters(action.parameters, state)
|
|
||||||
if (handler) {
|
|
||||||
await handler(parameters, state)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return runEventActions
|
|
||||||
}
|
|
||||||
|
|
||||||
// this will take a parameters obj, iterate all keys, and do a mustache render
|
|
||||||
// for every string. It will work recursively if it encounnters an {}
|
|
||||||
const createParameters = (parameterTemplateObj, state) => {
|
|
||||||
const parameters = {}
|
|
||||||
for (let key in parameterTemplateObj) {
|
|
||||||
if (typeof parameterTemplateObj[key] === "string") {
|
|
||||||
parameters[key] = renderTemplateString(parameterTemplateObj[key], state)
|
|
||||||
} else if (typeof parameterTemplateObj[key] === "object") {
|
|
||||||
parameters[key] = createParameters(parameterTemplateObj[key], state)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return parameters
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
export const setContext = treeNode => (key, value) =>
|
|
||||||
(treeNode.context[key] = value)
|
|
||||||
|
|
||||||
export const getContext = treeNode => key => {
|
|
||||||
if (treeNode.context && treeNode.context[key] !== undefined)
|
|
||||||
return treeNode.context[key]
|
|
||||||
|
|
||||||
if (!treeNode.context.$parent) return
|
|
||||||
|
|
||||||
return getContext(treeNode.parentNode)(key)
|
|
||||||
}
|
|
|
@ -1 +0,0 @@
|
||||||
export default value => typeof value === "string" && value.includes("{{")
|
|
|
@ -1,17 +0,0 @@
|
||||||
import mustache from "mustache"
|
|
||||||
|
|
||||||
// this is a much more liberal version of mustache's escape function
|
|
||||||
// ...just ignoring < and > to prevent tags from user input
|
|
||||||
// original version here https://github.com/janl/mustache.js/blob/4b7908f5c9fec469a11cfaed2f2bed23c84e1c5c/mustache.js#L78
|
|
||||||
|
|
||||||
const entityMap = {
|
|
||||||
"<": "<",
|
|
||||||
">": ">",
|
|
||||||
}
|
|
||||||
|
|
||||||
mustache.escape = text =>
|
|
||||||
String(text).replace(/[&<>"'`=/]/g, function fromEntityMap(s) {
|
|
||||||
return entityMap[s] || s
|
|
||||||
})
|
|
||||||
|
|
||||||
export default mustache.render
|
|
|
@ -1,13 +0,0 @@
|
||||||
import appStore from "./store"
|
|
||||||
|
|
||||||
export default treeNode => (propName, value) => {
|
|
||||||
if (!propName || propName.length === 0) return
|
|
||||||
if (!treeNode) return
|
|
||||||
const componentId = treeNode.props._id
|
|
||||||
|
|
||||||
appStore.update(state => {
|
|
||||||
state[componentId] = state[componentId] || {}
|
|
||||||
state[componentId][propName] = value
|
|
||||||
return state
|
|
||||||
}, treeNode.contextStoreKey)
|
|
||||||
}
|
|
|
@ -1,65 +0,0 @@
|
||||||
import { eventHandlers } from "./eventHandlers"
|
|
||||||
import { bbFactory } from "./bbComponentApi"
|
|
||||||
import renderTemplateString from "./renderTemplateString"
|
|
||||||
import appStore from "./store"
|
|
||||||
import hasBinding from "./hasBinding"
|
|
||||||
|
|
||||||
const doNothing = () => {}
|
|
||||||
doNothing.isPlaceholder = true
|
|
||||||
|
|
||||||
const isMetaProp = propName =>
|
|
||||||
propName === "_component" ||
|
|
||||||
propName === "_children" ||
|
|
||||||
propName === "_id" ||
|
|
||||||
propName === "_style" ||
|
|
||||||
propName === "_code" ||
|
|
||||||
propName === "_codeMeta" ||
|
|
||||||
propName === "_styles"
|
|
||||||
|
|
||||||
export const createStateManager = ({
|
|
||||||
componentLibraries,
|
|
||||||
onScreenSlotRendered,
|
|
||||||
routeTo,
|
|
||||||
}) => {
|
|
||||||
let runEventActions = eventHandlers(routeTo)
|
|
||||||
|
|
||||||
const bb = bbFactory({
|
|
||||||
componentLibraries,
|
|
||||||
onScreenSlotRendered,
|
|
||||||
runEventActions,
|
|
||||||
})
|
|
||||||
|
|
||||||
const setup = _setup(bb)
|
|
||||||
|
|
||||||
return {
|
|
||||||
setup,
|
|
||||||
destroy: () => {},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const _setup = bb => node => {
|
|
||||||
const props = node.props
|
|
||||||
const initialProps = { ...props }
|
|
||||||
|
|
||||||
for (let propName in props) {
|
|
||||||
if (isMetaProp(propName)) continue
|
|
||||||
|
|
||||||
const propValue = props[propName]
|
|
||||||
|
|
||||||
const isBound = hasBinding(propValue)
|
|
||||||
|
|
||||||
if (isBound) {
|
|
||||||
const state = appStore.getState(node.contextStoreKey)
|
|
||||||
initialProps[propName] = renderTemplateString(propValue, state)
|
|
||||||
|
|
||||||
if (!node.stateBound) {
|
|
||||||
node.stateBound = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const setup = _setup(bb)
|
|
||||||
initialProps._bb = bb(node, setup)
|
|
||||||
|
|
||||||
return initialProps
|
|
||||||
}
|
|
|
@ -1,108 +0,0 @@
|
||||||
import { writable } from "svelte/store"
|
|
||||||
|
|
||||||
// we assume that the reference to this state object
|
|
||||||
// will remain for the life of the application
|
|
||||||
const rootState = {}
|
|
||||||
const rootStore = writable(rootState)
|
|
||||||
const contextStores = {}
|
|
||||||
|
|
||||||
// contextProviderId is the component id that provides the data for the context
|
|
||||||
const contextStoreKey = (dataProviderId, childIndex) =>
|
|
||||||
`${dataProviderId}${childIndex >= 0 ? ":" + childIndex : ""}`
|
|
||||||
|
|
||||||
// creates a store for a datacontext (e.g. each item in a list component)
|
|
||||||
// overrides store if already exists
|
|
||||||
const create = (data, dataProviderId, childIndex, parentContextStoreId) => {
|
|
||||||
const key = contextStoreKey(dataProviderId, childIndex)
|
|
||||||
const state = { data }
|
|
||||||
|
|
||||||
// add reference to parent state object,
|
|
||||||
// so we can use bindings like state.parent.parent
|
|
||||||
// (if no parent, then parent is rootState )
|
|
||||||
state.parent = parentContextStoreId
|
|
||||||
? contextStores[parentContextStoreId].state
|
|
||||||
: rootState
|
|
||||||
|
|
||||||
contextStores[key] = {
|
|
||||||
store: writable(state),
|
|
||||||
subscriberCount: 0,
|
|
||||||
state,
|
|
||||||
parentContextStoreId,
|
|
||||||
}
|
|
||||||
|
|
||||||
return key
|
|
||||||
}
|
|
||||||
|
|
||||||
const subscribe = (subscription, storeKey) => {
|
|
||||||
if (!storeKey) {
|
|
||||||
return rootStore.subscribe(subscription)
|
|
||||||
}
|
|
||||||
const contextStore = contextStores[storeKey]
|
|
||||||
|
|
||||||
// we are subscribing to multiple stores,
|
|
||||||
// we dont want to run our listener for every subscription, the first time
|
|
||||||
// as this could repeatedly run $set on the same component
|
|
||||||
// ... which already has its initial properties set properly
|
|
||||||
const ignoreFirstSubscription = () => {
|
|
||||||
let hasRunOnce = false
|
|
||||||
return () => {
|
|
||||||
if (hasRunOnce) subscription(contextStore.state)
|
|
||||||
hasRunOnce = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const unsubscribes = [rootStore.subscribe(ignoreFirstSubscription())]
|
|
||||||
|
|
||||||
// we subscribe to all stores in the hierarchy
|
|
||||||
const ancestorSubscribe = ctxStore => {
|
|
||||||
// unsubscribe func returned by svelte store
|
|
||||||
const svelteUnsub = ctxStore.store.subscribe(ignoreFirstSubscription())
|
|
||||||
|
|
||||||
// we wrap the svelte unsubscribe, so we can
|
|
||||||
// cleanup stores when they are no longer subscribed to
|
|
||||||
const unsub = () => {
|
|
||||||
ctxStore.subscriberCount = contextStore.subscriberCount - 1
|
|
||||||
// when no subscribers left, we delete the store
|
|
||||||
if (ctxStore.subscriberCount === 0) {
|
|
||||||
delete ctxStore[storeKey]
|
|
||||||
}
|
|
||||||
svelteUnsub()
|
|
||||||
}
|
|
||||||
unsubscribes.push(unsub)
|
|
||||||
if (ctxStore.parentContextStoreId) {
|
|
||||||
ancestorSubscribe(contextStores[ctxStore.parentContextStoreId])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ancestorSubscribe(contextStore)
|
|
||||||
|
|
||||||
// our final unsubscribe function calls unsubscribe on all stores
|
|
||||||
return () => unsubscribes.forEach(u => u())
|
|
||||||
}
|
|
||||||
|
|
||||||
const findStore = (dataProviderId, childIndex) =>
|
|
||||||
dataProviderId
|
|
||||||
? contextStores[contextStoreKey(dataProviderId, childIndex)].store
|
|
||||||
: rootStore
|
|
||||||
|
|
||||||
const update = (updatefunc, dataProviderId, childIndex) =>
|
|
||||||
findStore(dataProviderId, childIndex).update(updatefunc)
|
|
||||||
|
|
||||||
const set = (value, dataProviderId, childIndex) =>
|
|
||||||
findStore(dataProviderId, childIndex).set(value)
|
|
||||||
|
|
||||||
const getState = contextStoreKey =>
|
|
||||||
contextStoreKey ? contextStores[contextStoreKey].state : rootState
|
|
||||||
|
|
||||||
const getStore = contextStoreKey =>
|
|
||||||
contextStoreKey ? contextStores[contextStoreKey].store : rootStore
|
|
||||||
|
|
||||||
export default {
|
|
||||||
subscribe,
|
|
||||||
update,
|
|
||||||
set,
|
|
||||||
getState,
|
|
||||||
create,
|
|
||||||
contextStoreKey,
|
|
||||||
getStore,
|
|
||||||
}
|
|
|
@ -1,24 +1,23 @@
|
||||||
### GNU AFFERO GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
Version 3, 19 November 2007
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc.
|
Preamble
|
||||||
<https://fsf.org/>
|
|
||||||
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies of this
|
The GNU General Public License is a free, copyleft license for
|
||||||
license document, but changing it is not allowed.
|
software and other kinds of works.
|
||||||
|
|
||||||
### Preamble
|
|
||||||
|
|
||||||
The GNU Affero General Public License is a free, copyleft license for
|
|
||||||
software and other kinds of works, specifically designed to ensure
|
|
||||||
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
|
share and change all versions of a program--to make sure it remains free
|
||||||
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
|
||||||
|
@ -27,56 +26,65 @@ 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
|
changed, so that their problems will not be attributed erroneously to
|
||||||
under 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.
|
||||||
|
|
||||||
### TERMS AND CONDITIONS
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
#### 0. Definitions.
|
0. Definitions.
|
||||||
|
|
||||||
"This License" refers to version 3 of the GNU Affero General Public
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
License.
|
|
||||||
|
|
||||||
"Copyright" also means copyright-like laws that apply to other kinds
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
of works, such as semiconductor masks.
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
"The Program" refers to any copyrightable work licensed under this
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
License. Each licensee is addressed as "you". "Licensees" and
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
"recipients" may be individuals or organizations.
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
To "modify" a work means to copy from or adapt all or part of the work
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
in a fashion requiring copyright permission, other than the making of
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
an exact copy. The resulting work is called a "modified version" of
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
the earlier work or a work "based on" the earlier work.
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
A "covered work" means either the unmodified Program or a work based
|
A "covered work" means either the unmodified Program or a work based
|
||||||
on the Program.
|
on the Program.
|
||||||
|
@ -89,12 +97,11 @@ distribution (with or without modification), making available to the
|
||||||
public, and in some countries other activities as well.
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
To "convey" a work means any kind of propagation that enables other
|
To "convey" a work means any kind of propagation that enables other
|
||||||
parties to make or receive copies. Mere interaction with a user
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
through a computer network, with no transfer of a copy, is not
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
conveying.
|
|
||||||
|
|
||||||
An interactive user interface displays "Appropriate Legal Notices" to
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
the extent that it includes a convenient and prominently visible
|
to the extent that it includes a convenient and prominently visible
|
||||||
feature that (1) displays an appropriate copyright notice, and (2)
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
tells the user that there is no warranty for the work (except to the
|
tells the user that there is no warranty for the work (except to the
|
||||||
extent that warranties are provided), that licensees may convey the
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
@ -102,11 +109,11 @@ work under this License, and how to view a copy of this License. If
|
||||||
the interface presents a list of user commands or options, such as a
|
the interface presents a list of user commands or options, such as a
|
||||||
menu, a prominent item in the list meets this criterion.
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
#### 1. Source Code.
|
1. Source Code.
|
||||||
|
|
||||||
The "source code" for a work means the preferred form of the work for
|
The "source code" for a work means the preferred form of the work
|
||||||
making modifications to it. "Object code" means any non-source form of
|
for making modifications to it. "Object code" means any non-source
|
||||||
a work.
|
form of a work.
|
||||||
|
|
||||||
A "Standard Interface" means an interface that either is an official
|
A "Standard Interface" means an interface that either is an official
|
||||||
standard defined by a recognized standards body, or, in the case of
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
@ -137,13 +144,14 @@ linked subprograms that the work is specifically designed to require,
|
||||||
such as by intimate data communication or control flow between those
|
such as by intimate data communication or control flow between those
|
||||||
subprograms and other parts of the work.
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
The Corresponding Source need not include anything that users can
|
The Corresponding Source need not include anything that users
|
||||||
regenerate automatically from other parts of the Corresponding Source.
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
The Corresponding Source for a work in source code form is that same
|
The Corresponding Source for a work in source code form is that
|
||||||
work.
|
same work.
|
||||||
|
|
||||||
#### 2. Basic Permissions.
|
2. Basic Permissions.
|
||||||
|
|
||||||
All rights granted under this License are granted for the term of
|
All rights granted under this License are granted for the term of
|
||||||
copyright on the Program, and are irrevocable provided the stated
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
@ -153,22 +161,22 @@ covered work is covered by this License only if the output, given its
|
||||||
content, constitutes a covered work. This License acknowledges your
|
content, constitutes a covered work. This License acknowledges your
|
||||||
rights of fair use or other equivalent, as provided by copyright law.
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
You may make, run and propagate covered works that you do not convey,
|
You may make, run and propagate covered works that you do not
|
||||||
without conditions so long as your license otherwise remains in force.
|
convey, without conditions so long as your license otherwise remains
|
||||||
You may convey covered works to others for the sole purpose of having
|
in force. You may convey covered works to others for the sole purpose
|
||||||
them make modifications exclusively for you, or provide you with
|
of having them make modifications exclusively for you, or provide you
|
||||||
facilities for running those works, provided that you comply with the
|
with facilities for running those works, provided that you comply with
|
||||||
terms of this License in conveying all material for which you do not
|
the terms of this License in conveying all material for which you do
|
||||||
control copyright. Those thus making or running the covered works for
|
not control copyright. Those thus making or running the covered works
|
||||||
you must do so exclusively on your behalf, under your direction and
|
for you must do so exclusively on your behalf, under your direction
|
||||||
control, on terms that prohibit them from making any copies of your
|
and control, on terms that prohibit them from making any copies of
|
||||||
copyrighted material outside their relationship with you.
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
Conveying under any other circumstances is permitted solely under the
|
Conveying under any other circumstances is permitted solely under
|
||||||
conditions stated below. Sublicensing is not allowed; section 10 makes
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
it unnecessary.
|
makes it unnecessary.
|
||||||
|
|
||||||
#### 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
No covered work shall be deemed part of an effective technological
|
No covered work shall be deemed part of an effective technological
|
||||||
measure under any applicable law fulfilling obligations under article
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
@ -177,14 +185,14 @@ similar laws prohibiting or restricting circumvention of such
|
||||||
measures.
|
measures.
|
||||||
|
|
||||||
When you convey a covered work, you waive any legal power to forbid
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
circumvention of technological measures to the extent such
|
circumvention of technological measures to the extent such circumvention
|
||||||
circumvention is effected by exercising rights under this License with
|
is effected by exercising rights under this License with respect to
|
||||||
respect to the covered work, and you disclaim any intention to limit
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
operation or modification of the work as a means of enforcing, against
|
modification of the work as a means of enforcing, against the work's
|
||||||
the work's users, your or third parties' legal rights to forbid
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
circumvention of technological measures.
|
technological measures.
|
||||||
|
|
||||||
#### 4. Conveying Verbatim Copies.
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
You may convey verbatim copies of the Program's source code as you
|
You may convey verbatim copies of the Program's source code as you
|
||||||
receive it, in any medium, provided that you conspicuously and
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
@ -197,27 +205,29 @@ recipients a copy of this License along with the Program.
|
||||||
You may charge any price or no price for each copy that you convey,
|
You may charge any price or no price for each copy that you convey,
|
||||||
and you may offer support or warranty protection for a fee.
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
#### 5. Conveying Modified Source Versions.
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
You may convey a work based on the Program, or the modifications to
|
You may convey a work based on the Program, or the modifications to
|
||||||
produce it from the Program, in the form of source code under the
|
produce it from the Program, in the form of source code under the
|
||||||
terms of section 4, provided that you also meet all of these
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
conditions:
|
|
||||||
|
|
||||||
- a) The work must carry prominent notices stating that you modified
|
a) The work must carry prominent notices stating that you modified
|
||||||
it, and giving a relevant date.
|
it, and giving a relevant date.
|
||||||
- b) The work must carry prominent notices stating that it is
|
|
||||||
released under this License and any conditions added under
|
b) The work must carry prominent notices stating that it is
|
||||||
section 7. This requirement modifies the requirement in section 4
|
released under this License and any conditions added under section
|
||||||
to "keep intact all notices".
|
7. This requirement modifies the requirement in section 4 to
|
||||||
- c) You must license the entire work, as a whole, under this
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
License to anyone who comes into possession of a copy. This
|
License to anyone who comes into possession of a copy. This
|
||||||
License will therefore apply, along with any applicable section 7
|
License will therefore apply, along with any applicable section 7
|
||||||
additional terms, to the whole of the work, and all its parts,
|
additional terms, to the whole of the work, and all its parts,
|
||||||
regardless of how they are packaged. This License gives no
|
regardless of how they are packaged. This License gives no
|
||||||
permission to license the work in any other way, but it does not
|
permission to license the work in any other way, but it does not
|
||||||
invalidate such permission if you have separately received it.
|
invalidate such permission if you have separately received it.
|
||||||
- d) If the work has interactive user interfaces, each must display
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
Appropriate Legal Notices; however, if the Program has interactive
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
interfaces that do not display Appropriate Legal Notices, your
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
work need not make them do so.
|
work need not make them do so.
|
||||||
|
@ -232,18 +242,19 @@ beyond what the individual works permit. Inclusion of a covered work
|
||||||
in an aggregate does not cause this License to apply to the other
|
in an aggregate does not cause this License to apply to the other
|
||||||
parts of the aggregate.
|
parts of the aggregate.
|
||||||
|
|
||||||
#### 6. Conveying Non-Source Forms.
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
You may convey a covered work in object code form under the terms of
|
You may convey a covered work in object code form under the terms
|
||||||
sections 4 and 5, provided that you also convey the machine-readable
|
of sections 4 and 5, provided that you also convey the
|
||||||
Corresponding Source under the terms of this License, in one of these
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
ways:
|
in one of these ways:
|
||||||
|
|
||||||
- a) Convey the object code in, or embodied in, a physical product
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
(including a physical distribution medium), accompanied by the
|
(including a physical distribution medium), accompanied by the
|
||||||
Corresponding Source fixed on a durable physical medium
|
Corresponding Source fixed on a durable physical medium
|
||||||
customarily used for software interchange.
|
customarily used for software interchange.
|
||||||
- b) Convey the object code in, or embodied in, a physical product
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
(including a physical distribution medium), accompanied by a
|
(including a physical distribution medium), accompanied by a
|
||||||
written offer, valid for at least three years and valid for as
|
written offer, valid for at least three years and valid for as
|
||||||
long as you offer spare parts or customer support for that product
|
long as you offer spare parts or customer support for that product
|
||||||
|
@ -252,14 +263,16 @@ ways:
|
||||||
product that is covered by this License, on a durable physical
|
product that is covered by this License, on a durable physical
|
||||||
medium customarily used for software interchange, for a price no
|
medium customarily used for software interchange, for a price no
|
||||||
more than your reasonable cost of physically performing this
|
more than your reasonable cost of physically performing this
|
||||||
conveying of source, or (2) access to copy the Corresponding
|
conveying of source, or (2) access to copy the
|
||||||
Source from a network server at no charge.
|
Corresponding Source from a network server at no charge.
|
||||||
- c) Convey individual copies of the object code with a copy of the
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
written offer to provide the Corresponding Source. This
|
written offer to provide the Corresponding Source. This
|
||||||
alternative is allowed only occasionally and noncommercially, and
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
only if you received the object code with such an offer, in accord
|
only if you received the object code with such an offer, in accord
|
||||||
with subsection 6b.
|
with subsection 6b.
|
||||||
- d) Convey the object code by offering access from a designated
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
place (gratis or for a charge), and offer equivalent access to the
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
Corresponding Source in the same way through the same place at no
|
Corresponding Source in the same way through the same place at no
|
||||||
further charge. You need not require recipients to copy the
|
further charge. You need not require recipients to copy the
|
||||||
|
@ -271,36 +284,36 @@ ways:
|
||||||
Corresponding Source. Regardless of what server hosts the
|
Corresponding Source. Regardless of what server hosts the
|
||||||
Corresponding Source, you remain obligated to ensure that it is
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
available for as long as needed to satisfy these requirements.
|
available for as long as needed to satisfy these requirements.
|
||||||
- e) Convey the object code using peer-to-peer transmission,
|
|
||||||
provided you inform other peers where the object code and
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
Corresponding Source of the work are being offered to the general
|
you inform other peers where the object code and Corresponding
|
||||||
public at no charge under subsection 6d.
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
A separable portion of the object code, whose source code is excluded
|
A separable portion of the object code, whose source code is excluded
|
||||||
from the Corresponding Source as a System Library, need not be
|
from the Corresponding Source as a System Library, need not be
|
||||||
included in conveying the object code work.
|
included in conveying the object code work.
|
||||||
|
|
||||||
A "User Product" is either (1) a "consumer product", which means any
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
tangible personal property which is normally used for personal,
|
tangible personal property which is normally used for personal, family,
|
||||||
family, or household purposes, or (2) anything designed or sold for
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
incorporation into a dwelling. In determining whether a product is a
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
consumer product, doubtful cases shall be resolved in favor of
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
coverage. For a particular product received by a particular user,
|
product received by a particular user, "normally used" refers to a
|
||||||
"normally used" refers to a typical or common use of that class of
|
typical or common use of that class of product, regardless of the status
|
||||||
product, regardless of the status of the particular user or of the way
|
of the particular user or of the way in which the particular user
|
||||||
in which the particular user actually uses, or expects or is expected
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
to use, the product. A product is a consumer product regardless of
|
is a consumer product regardless of whether the product has substantial
|
||||||
whether the product has substantial commercial, industrial or
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
non-consumer uses, unless such uses represent the only significant
|
the only significant mode of use of the product.
|
||||||
mode of use of the product.
|
|
||||||
|
|
||||||
"Installation Information" for a User Product means any methods,
|
"Installation Information" for a User Product means any methods,
|
||||||
procedures, authorization keys, or other information required to
|
procedures, authorization keys, or other information required to install
|
||||||
install and execute modified versions of a covered work in that User
|
and execute modified versions of a covered work in that User Product from
|
||||||
Product from a modified version of its Corresponding Source. The
|
a modified version of its Corresponding Source. The information must
|
||||||
information must suffice to ensure that the continued functioning of
|
suffice to ensure that the continued functioning of the modified object
|
||||||
the modified object code is in no case prevented or interfered with
|
code is in no case prevented or interfered with solely because
|
||||||
solely because modification has been made.
|
modification has been made.
|
||||||
|
|
||||||
If you convey an object code work under this section in, or with, or
|
If you convey an object code work under this section in, or with, or
|
||||||
specifically for use in, a User Product, and the conveying occurs as
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
@ -314,13 +327,12 @@ modified object code on the User Product (for example, the work has
|
||||||
been installed in ROM).
|
been installed in ROM).
|
||||||
|
|
||||||
The requirement to provide Installation Information does not include a
|
The requirement to provide Installation Information does not include a
|
||||||
requirement to continue to provide support service, warranty, or
|
requirement to continue to provide support service, warranty, or updates
|
||||||
updates for a work that has been modified or installed by the
|
for a work that has been modified or installed by the recipient, or for
|
||||||
recipient, or for the User Product in which it has been modified or
|
the User Product in which it has been modified or installed. Access to a
|
||||||
installed. Access to a network may be denied when the modification
|
network may be denied when the modification itself materially and
|
||||||
itself materially and adversely affects the operation of the network
|
adversely affects the operation of the network or violates the rules and
|
||||||
or violates the rules and protocols for communication across the
|
protocols for communication across the network.
|
||||||
network.
|
|
||||||
|
|
||||||
Corresponding Source conveyed, and Installation Information provided,
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
in accord with this section must be in a format that is publicly
|
in accord with this section must be in a format that is publicly
|
||||||
|
@ -328,7 +340,7 @@ documented (and with an implementation available to the public in
|
||||||
source code form), and must require no special password or key for
|
source code form), and must require no special password or key for
|
||||||
unpacking, reading or copying.
|
unpacking, reading or copying.
|
||||||
|
|
||||||
#### 7. Additional Terms.
|
7. Additional Terms.
|
||||||
|
|
||||||
"Additional permissions" are terms that supplement the terms of this
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
License by making exceptions from one or more of its conditions.
|
License by making exceptions from one or more of its conditions.
|
||||||
|
@ -347,26 +359,31 @@ additional permissions on material, added by you to a covered work,
|
||||||
for which you have or can give appropriate copyright permission.
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, for material you
|
Notwithstanding any other provision of this License, for material you
|
||||||
add to a covered work, you may (if authorized by the copyright holders
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
of that material) supplement the terms of this License with terms:
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
- a) Disclaiming warranty or limiting liability differently from the
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
terms of sections 15 and 16 of this License; or
|
terms of sections 15 and 16 of this License; or
|
||||||
- b) Requiring preservation of specified reasonable legal notices or
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
author attributions in that material or in the Appropriate Legal
|
author attributions in that material or in the Appropriate Legal
|
||||||
Notices displayed by works containing it; or
|
Notices displayed by works containing it; or
|
||||||
- c) Prohibiting misrepresentation of the origin of that material,
|
|
||||||
or requiring that modified versions of such material be marked in
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
reasonable ways as different from the original version; or
|
reasonable ways as different from the original version; or
|
||||||
- d) Limiting the use for publicity purposes of names of licensors
|
|
||||||
or authors of the material; or
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
- e) Declining to grant rights under trademark law for use of some
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
trade names, trademarks, or service marks; or
|
trade names, trademarks, or service marks; or
|
||||||
- f) Requiring indemnification of licensors and authors of that
|
|
||||||
material by anyone who conveys the material (or modified versions
|
f) Requiring indemnification of licensors and authors of that
|
||||||
of it) with contractual assumptions of liability to the recipient,
|
material by anyone who conveys the material (or modified versions of
|
||||||
for any liability that these contractual assumptions directly
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
impose on those licensors and authors.
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
All other non-permissive additional terms are considered "further
|
All other non-permissive additional terms are considered "further
|
||||||
restrictions" within the meaning of section 10. If the Program as you
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
@ -384,10 +401,10 @@ additional terms that apply to those files, or a notice indicating
|
||||||
where to find the applicable terms.
|
where to find the applicable terms.
|
||||||
|
|
||||||
Additional terms, permissive or non-permissive, may be stated in the
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
form of a separately written license, or stated as exceptions; the
|
form of a separately written license, or stated as exceptions;
|
||||||
above requirements apply either way.
|
the above requirements apply either way.
|
||||||
|
|
||||||
#### 8. Termination.
|
8. Termination.
|
||||||
|
|
||||||
You may not propagate or modify a covered work except as expressly
|
You may not propagate or modify a covered work except as expressly
|
||||||
provided under this License. Any attempt otherwise to propagate or
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
@ -395,12 +412,12 @@ modify it is void, and will automatically terminate your rights under
|
||||||
this License (including any patent licenses granted under the third
|
this License (including any patent licenses granted under the third
|
||||||
paragraph of section 11).
|
paragraph of section 11).
|
||||||
|
|
||||||
However, if you cease all violation of this License, then your license
|
However, if you cease all violation of this License, then your
|
||||||
from a particular copyright holder is reinstated (a) provisionally,
|
license from a particular copyright holder is reinstated (a)
|
||||||
unless and until the copyright holder explicitly and finally
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
terminates your license, and (b) permanently, if the copyright holder
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
fails to notify you of the violation by some reasonable means prior to
|
holder fails to notify you of the violation by some reasonable means
|
||||||
60 days after the cessation.
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
Moreover, your license from a particular copyright holder is
|
Moreover, your license from a particular copyright holder is
|
||||||
reinstated permanently if the copyright holder notifies you of the
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
@ -415,10 +432,10 @@ this License. If your rights have been terminated and not permanently
|
||||||
reinstated, you do not qualify to receive new licenses for the same
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
material under section 10.
|
material under section 10.
|
||||||
|
|
||||||
#### 9. Acceptance Not Required for Having Copies.
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
You are not required to accept this License in order to receive or run
|
You are not required to accept this License in order to receive or
|
||||||
a copy of the Program. Ancillary propagation of a covered work
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
occurring solely as a consequence of using peer-to-peer transmission
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
to receive a copy likewise does not require acceptance. However,
|
to receive a copy likewise does not require acceptance. However,
|
||||||
nothing other than this License grants you permission to propagate or
|
nothing other than this License grants you permission to propagate or
|
||||||
|
@ -426,7 +443,7 @@ modify any covered work. These actions infringe copyright if you do
|
||||||
not accept this License. Therefore, by modifying or propagating a
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
covered work, you indicate your acceptance of this License to do so.
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
#### 10. Automatic Licensing of Downstream Recipients.
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
Each time you convey a covered work, the recipient automatically
|
Each time you convey a covered work, the recipient automatically
|
||||||
receives a license from the original licensors, to run, modify and
|
receives a license from the original licensors, to run, modify and
|
||||||
|
@ -451,14 +468,14 @@ rights granted under this License, and you may not initiate litigation
|
||||||
any patent claim is infringed by making, using, selling, offering for
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
sale, or importing the Program or any portion of it.
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
#### 11. Patents.
|
11. Patents.
|
||||||
|
|
||||||
A "contributor" is a copyright holder who authorizes use under this
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
License of the Program or a work on which the Program is based. The
|
License of the Program or a work on which the Program is based. The
|
||||||
work thus licensed is called the contributor's "contributor version".
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
A contributor's "essential patent claims" are all patent claims owned
|
A contributor's "essential patent claims" are all patent claims
|
||||||
or controlled by the contributor, whether already acquired or
|
owned or controlled by the contributor, whether already acquired or
|
||||||
hereafter acquired, that would be infringed by some manner, permitted
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
by this License, of making, using, or selling its contributor version,
|
by this License, of making, using, or selling its contributor version,
|
||||||
but do not include claims that would be infringed only as a
|
but do not include claims that would be infringed only as a
|
||||||
|
@ -501,77 +518,66 @@ or convey a specific copy of the covered work, then the patent license
|
||||||
you grant is automatically extended to all recipients of the covered
|
you grant is automatically extended to all recipients of the covered
|
||||||
work and works based on it.
|
work and works based on it.
|
||||||
|
|
||||||
A patent license is "discriminatory" if it does not include within the
|
A patent license is "discriminatory" if it does not include within
|
||||||
scope of its coverage, prohibits the exercise of, or is conditioned on
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
the non-exercise of one or more of the rights that are specifically
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
granted under this License. You may not convey a covered work if you
|
specifically granted under this License. You may not convey a covered
|
||||||
are a party to an arrangement with a third party that is in the
|
work if you are a party to an arrangement with a third party that is
|
||||||
business of distributing software, under which you make payment to the
|
in the business of distributing software, under which you make payment
|
||||||
third party based on the extent of your activity of conveying the
|
to the third party based on the extent of your activity of conveying
|
||||||
work, and under which the third party grants, to any of the parties
|
the work, and under which the third party grants, to any of the
|
||||||
who would receive the covered work from you, a discriminatory patent
|
parties who would receive the covered work from you, a discriminatory
|
||||||
license (a) in connection with copies of the covered work conveyed by
|
patent license (a) in connection with copies of the covered work
|
||||||
you (or copies made from those copies), or (b) primarily for and in
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
connection with specific products or compilations that contain the
|
for and in connection with specific products or compilations that
|
||||||
covered work, unless you entered into that arrangement, or that patent
|
contain the covered work, unless you entered into that arrangement,
|
||||||
license was granted, prior to 28 March 2007.
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
Nothing in this License shall be construed as excluding or limiting
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
any implied license or other defenses to infringement that may
|
any implied license or other defenses to infringement that may
|
||||||
otherwise be available to you under applicable patent law.
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
#### 12. No Surrender of Others' Freedom.
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
If conditions are imposed on you (whether by court order, agreement or
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
excuse you from the conditions of this License. If you cannot convey a
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
covered work so as to satisfy simultaneously your obligations under
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
this License and any other pertinent obligations, then as a
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
consequence you may not convey it at all. For example, if you agree to
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
terms that obligate you to collect a royalty for further conveying
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
from those to whom you convey the Program, the only way you could
|
the Program, the only way you could satisfy both those terms and this
|
||||||
satisfy both those terms and this License would be to refrain entirely
|
License would be to refrain entirely from conveying the Program.
|
||||||
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
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
of the GNU Affero General Public License from time to time. Such new
|
the GNU General Public License from time to time. Such new versions will
|
||||||
versions will be similar in spirit to the present version, but may
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
differ in detail to address new problems or concerns.
|
address new problems or concerns.
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the Program
|
Each version is given a distinguishing version number. If the
|
||||||
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
|
GNU General Public License, you may choose any version ever published
|
||||||
published by the Free Software Foundation.
|
by the Free Software Foundation.
|
||||||
|
|
||||||
If the Program specifies that a proxy can decide which future versions
|
If the Program specifies that a proxy can decide which future
|
||||||
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.
|
||||||
|
|
||||||
|
@ -580,31 +586,30 @@ permissions. However, no additional obligations are imposed on any
|
||||||
author or copyright holder as a result of your choosing to follow a
|
author or copyright holder as a result of your choosing to follow a
|
||||||
later version.
|
later version.
|
||||||
|
|
||||||
#### 15. Disclaimer of Warranty.
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
CORRECTION.
|
|
||||||
|
|
||||||
#### 16. Limitation of Liability.
|
16. Limitation of Liability.
|
||||||
|
|
||||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
SUCH DAMAGES.
|
||||||
|
|
||||||
#### 17. Interpretation of Sections 15 and 16.
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
If the disclaimer of warranty and limitation of liability provided
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
above cannot be given local legal effect according to their terms,
|
above cannot be given local legal effect according to their terms,
|
||||||
|
@ -615,46 +620,55 @@ copy of the Program in return for a fee.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
### How to Apply These Terms to Your New Programs
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
If you develop a new program, and you want it to be of the greatest
|
||||||
possible use to the public, the best way to achieve this is to make it
|
possible use to the public, the best way to achieve this is to make it
|
||||||
free software which everyone can redistribute and change under these
|
free software which everyone can redistribute and change under these terms.
|
||||||
terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest to
|
To do so, attach the following notices to the program. It is safest
|
||||||
attach them to the start of each source file to most effectively state
|
to attach them to the start of each source file to most effectively
|
||||||
the exclusion of warranty; and each file should have at least the
|
state the exclusion of warranty; and each file should have at least
|
||||||
"copyright" line and a pointer to where the full notice is found.
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
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
|
it under the terms of the GNU General Public License as published by
|
||||||
published by the Free Software Foundation, either version 3 of the
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
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
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
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
|
|
||||||
of the code. There are many ways you could offer source, and different
|
|
||||||
solutions will be better for different programs; see section 13 for
|
|
||||||
the specific requirements.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or
|
<program> Copyright (C) <year> <name of author>
|
||||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
necessary. For more information on this, and how to apply and follow
|
This is free software, and you are welcome to redistribute it
|
||||||
the GNU AGPL, see <https://www.gnu.org/licenses/>.
|
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,
|
||||||
|
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 GPL, see
|
||||||
|
<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>.
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
"pouchdb-all-dbs": "^1.0.2",
|
"pouchdb-all-dbs": "^1.0.2",
|
||||||
"pouchdb-replication-stream": "^1.2.9",
|
"pouchdb-replication-stream": "^1.2.9",
|
||||||
"sanitize-s3-objectkey": "^0.0.1",
|
"sanitize-s3-objectkey": "^0.0.1",
|
||||||
"svelte": "^3.29.4",
|
"svelte": "^3.30.0",
|
||||||
"tar-fs": "^2.1.0",
|
"tar-fs": "^2.1.0",
|
||||||
"to-json-schema": "^0.2.5",
|
"to-json-schema": "^0.2.5",
|
||||||
"uuid": "^3.3.2",
|
"uuid": "^3.3.2",
|
||||||
|
|
|
@ -97,7 +97,10 @@ exports.fetch = async function(ctx) {
|
||||||
if (apps.length === 0) {
|
if (apps.length === 0) {
|
||||||
ctx.body = []
|
ctx.body = []
|
||||||
} else {
|
} else {
|
||||||
ctx.body = await Promise.all(apps)
|
const response = await Promise.allSettled(apps)
|
||||||
|
ctx.body = response
|
||||||
|
.filter(result => result.status === "fulfilled")
|
||||||
|
.map(({ value }) => value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,373 @@
|
||||||
|
Mozilla Public License Version 2.0
|
||||||
|
==================================
|
||||||
|
|
||||||
|
1. Definitions
|
||||||
|
--------------
|
||||||
|
|
||||||
|
1.1. "Contributor"
|
||||||
|
means each individual or legal entity that creates, contributes to
|
||||||
|
the creation of, or owns Covered Software.
|
||||||
|
|
||||||
|
1.2. "Contributor Version"
|
||||||
|
means the combination of the Contributions of others (if any) used
|
||||||
|
by a Contributor and that particular Contributor's Contribution.
|
||||||
|
|
||||||
|
1.3. "Contribution"
|
||||||
|
means Covered Software of a particular Contributor.
|
||||||
|
|
||||||
|
1.4. "Covered Software"
|
||||||
|
means Source Code Form to which the initial Contributor has attached
|
||||||
|
the notice in Exhibit A, the Executable Form of such Source Code
|
||||||
|
Form, and Modifications of such Source Code Form, in each case
|
||||||
|
including portions thereof.
|
||||||
|
|
||||||
|
1.5. "Incompatible With Secondary Licenses"
|
||||||
|
means
|
||||||
|
|
||||||
|
(a) that the initial Contributor has attached the notice described
|
||||||
|
in Exhibit B to the Covered Software; or
|
||||||
|
|
||||||
|
(b) that the Covered Software was made available under the terms of
|
||||||
|
version 1.1 or earlier of the License, but not also under the
|
||||||
|
terms of a Secondary License.
|
||||||
|
|
||||||
|
1.6. "Executable Form"
|
||||||
|
means any form of the work other than Source Code Form.
|
||||||
|
|
||||||
|
1.7. "Larger Work"
|
||||||
|
means a work that combines Covered Software with other material, in
|
||||||
|
a separate file or files, that is not Covered Software.
|
||||||
|
|
||||||
|
1.8. "License"
|
||||||
|
means this document.
|
||||||
|
|
||||||
|
1.9. "Licensable"
|
||||||
|
means having the right to grant, to the maximum extent possible,
|
||||||
|
whether at the time of the initial grant or subsequently, any and
|
||||||
|
all of the rights conveyed by this License.
|
||||||
|
|
||||||
|
1.10. "Modifications"
|
||||||
|
means any of the following:
|
||||||
|
|
||||||
|
(a) any file in Source Code Form that results from an addition to,
|
||||||
|
deletion from, or modification of the contents of Covered
|
||||||
|
Software; or
|
||||||
|
|
||||||
|
(b) any new file in Source Code Form that contains any Covered
|
||||||
|
Software.
|
||||||
|
|
||||||
|
1.11. "Patent Claims" of a Contributor
|
||||||
|
means any patent claim(s), including without limitation, method,
|
||||||
|
process, and apparatus claims, in any patent Licensable by such
|
||||||
|
Contributor that would be infringed, but for the grant of the
|
||||||
|
License, by the making, using, selling, offering for sale, having
|
||||||
|
made, import, or transfer of either its Contributions or its
|
||||||
|
Contributor Version.
|
||||||
|
|
||||||
|
1.12. "Secondary License"
|
||||||
|
means either the GNU General Public License, Version 2.0, the GNU
|
||||||
|
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||||
|
Public License, Version 3.0, or any later versions of those
|
||||||
|
licenses.
|
||||||
|
|
||||||
|
1.13. "Source Code Form"
|
||||||
|
means the form of the work preferred for making modifications.
|
||||||
|
|
||||||
|
1.14. "You" (or "Your")
|
||||||
|
means an individual or a legal entity exercising rights under this
|
||||||
|
License. For legal entities, "You" includes any entity that
|
||||||
|
controls, is controlled by, or is under common control with You. For
|
||||||
|
purposes of this definition, "control" means (a) the power, direct
|
||||||
|
or indirect, to cause the direction or management of such entity,
|
||||||
|
whether by contract or otherwise, or (b) ownership of more than
|
||||||
|
fifty percent (50%) of the outstanding shares or beneficial
|
||||||
|
ownership of such entity.
|
||||||
|
|
||||||
|
2. License Grants and Conditions
|
||||||
|
--------------------------------
|
||||||
|
|
||||||
|
2.1. Grants
|
||||||
|
|
||||||
|
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||||
|
non-exclusive license:
|
||||||
|
|
||||||
|
(a) under intellectual property rights (other than patent or trademark)
|
||||||
|
Licensable by such Contributor to use, reproduce, make available,
|
||||||
|
modify, display, perform, distribute, and otherwise exploit its
|
||||||
|
Contributions, either on an unmodified basis, with Modifications, or
|
||||||
|
as part of a Larger Work; and
|
||||||
|
|
||||||
|
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||||
|
for sale, have made, import, and otherwise transfer either its
|
||||||
|
Contributions or its Contributor Version.
|
||||||
|
|
||||||
|
2.2. Effective Date
|
||||||
|
|
||||||
|
The licenses granted in Section 2.1 with respect to any Contribution
|
||||||
|
become effective for each Contribution on the date the Contributor first
|
||||||
|
distributes such Contribution.
|
||||||
|
|
||||||
|
2.3. Limitations on Grant Scope
|
||||||
|
|
||||||
|
The licenses granted in this Section 2 are the only rights granted under
|
||||||
|
this License. No additional rights or licenses will be implied from the
|
||||||
|
distribution or licensing of Covered Software under this License.
|
||||||
|
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||||
|
Contributor:
|
||||||
|
|
||||||
|
(a) for any code that a Contributor has removed from Covered Software;
|
||||||
|
or
|
||||||
|
|
||||||
|
(b) for infringements caused by: (i) Your and any other third party's
|
||||||
|
modifications of Covered Software, or (ii) the combination of its
|
||||||
|
Contributions with other software (except as part of its Contributor
|
||||||
|
Version); or
|
||||||
|
|
||||||
|
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||||
|
its Contributions.
|
||||||
|
|
||||||
|
This License does not grant any rights in the trademarks, service marks,
|
||||||
|
or logos of any Contributor (except as may be necessary to comply with
|
||||||
|
the notice requirements in Section 3.4).
|
||||||
|
|
||||||
|
2.4. Subsequent Licenses
|
||||||
|
|
||||||
|
No Contributor makes additional grants as a result of Your choice to
|
||||||
|
distribute the Covered Software under a subsequent version of this
|
||||||
|
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||||
|
permitted under the terms of Section 3.3).
|
||||||
|
|
||||||
|
2.5. Representation
|
||||||
|
|
||||||
|
Each Contributor represents that the Contributor believes its
|
||||||
|
Contributions are its original creation(s) or it has sufficient rights
|
||||||
|
to grant the rights to its Contributions conveyed by this License.
|
||||||
|
|
||||||
|
2.6. Fair Use
|
||||||
|
|
||||||
|
This License is not intended to limit any rights You have under
|
||||||
|
applicable copyright doctrines of fair use, fair dealing, or other
|
||||||
|
equivalents.
|
||||||
|
|
||||||
|
2.7. Conditions
|
||||||
|
|
||||||
|
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||||
|
in Section 2.1.
|
||||||
|
|
||||||
|
3. Responsibilities
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
3.1. Distribution of Source Form
|
||||||
|
|
||||||
|
All distribution of Covered Software in Source Code Form, including any
|
||||||
|
Modifications that You create or to which You contribute, must be under
|
||||||
|
the terms of this License. You must inform recipients that the Source
|
||||||
|
Code Form of the Covered Software is governed by the terms of this
|
||||||
|
License, and how they can obtain a copy of this License. You may not
|
||||||
|
attempt to alter or restrict the recipients' rights in the Source Code
|
||||||
|
Form.
|
||||||
|
|
||||||
|
3.2. Distribution of Executable Form
|
||||||
|
|
||||||
|
If You distribute Covered Software in Executable Form then:
|
||||||
|
|
||||||
|
(a) such Covered Software must also be made available in Source Code
|
||||||
|
Form, as described in Section 3.1, and You must inform recipients of
|
||||||
|
the Executable Form how they can obtain a copy of such Source Code
|
||||||
|
Form by reasonable means in a timely manner, at a charge no more
|
||||||
|
than the cost of distribution to the recipient; and
|
||||||
|
|
||||||
|
(b) You may distribute such Executable Form under the terms of this
|
||||||
|
License, or sublicense it under different terms, provided that the
|
||||||
|
license for the Executable Form does not attempt to limit or alter
|
||||||
|
the recipients' rights in the Source Code Form under this License.
|
||||||
|
|
||||||
|
3.3. Distribution of a Larger Work
|
||||||
|
|
||||||
|
You may create and distribute a Larger Work under terms of Your choice,
|
||||||
|
provided that You also comply with the requirements of this License for
|
||||||
|
the Covered Software. If the Larger Work is a combination of Covered
|
||||||
|
Software with a work governed by one or more Secondary Licenses, and the
|
||||||
|
Covered Software is not Incompatible With Secondary Licenses, this
|
||||||
|
License permits You to additionally distribute such Covered Software
|
||||||
|
under the terms of such Secondary License(s), so that the recipient of
|
||||||
|
the Larger Work may, at their option, further distribute the Covered
|
||||||
|
Software under the terms of either this License or such Secondary
|
||||||
|
License(s).
|
||||||
|
|
||||||
|
3.4. Notices
|
||||||
|
|
||||||
|
You may not remove or alter the substance of any license notices
|
||||||
|
(including copyright notices, patent notices, disclaimers of warranty,
|
||||||
|
or limitations of liability) contained within the Source Code Form of
|
||||||
|
the Covered Software, except that You may alter any license notices to
|
||||||
|
the extent required to remedy known factual inaccuracies.
|
||||||
|
|
||||||
|
3.5. Application of Additional Terms
|
||||||
|
|
||||||
|
You may choose to offer, and to charge a fee for, warranty, support,
|
||||||
|
indemnity or liability obligations to one or more recipients of Covered
|
||||||
|
Software. However, You may do so only on Your own behalf, and not on
|
||||||
|
behalf of any Contributor. You must make it absolutely clear that any
|
||||||
|
such warranty, support, indemnity, or liability obligation is offered by
|
||||||
|
You alone, and You hereby agree to indemnify every Contributor for any
|
||||||
|
liability incurred by such Contributor as a result of warranty, support,
|
||||||
|
indemnity or liability terms You offer. You may include additional
|
||||||
|
disclaimers of warranty and limitations of liability specific to any
|
||||||
|
jurisdiction.
|
||||||
|
|
||||||
|
4. Inability to Comply Due to Statute or Regulation
|
||||||
|
---------------------------------------------------
|
||||||
|
|
||||||
|
If it is impossible for You to comply with any of the terms of this
|
||||||
|
License with respect to some or all of the Covered Software due to
|
||||||
|
statute, judicial order, or regulation then You must: (a) comply with
|
||||||
|
the terms of this License to the maximum extent possible; and (b)
|
||||||
|
describe the limitations and the code they affect. Such description must
|
||||||
|
be placed in a text file included with all distributions of the Covered
|
||||||
|
Software under this License. Except to the extent prohibited by statute
|
||||||
|
or regulation, such description must be sufficiently detailed for a
|
||||||
|
recipient of ordinary skill to be able to understand it.
|
||||||
|
|
||||||
|
5. Termination
|
||||||
|
--------------
|
||||||
|
|
||||||
|
5.1. The rights granted under this License will terminate automatically
|
||||||
|
if You fail to comply with any of its terms. However, if You become
|
||||||
|
compliant, then the rights granted under this License from a particular
|
||||||
|
Contributor are reinstated (a) provisionally, unless and until such
|
||||||
|
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||||
|
ongoing basis, if such Contributor fails to notify You of the
|
||||||
|
non-compliance by some reasonable means prior to 60 days after You have
|
||||||
|
come back into compliance. Moreover, Your grants from a particular
|
||||||
|
Contributor are reinstated on an ongoing basis if such Contributor
|
||||||
|
notifies You of the non-compliance by some reasonable means, this is the
|
||||||
|
first time You have received notice of non-compliance with this License
|
||||||
|
from such Contributor, and You become compliant prior to 30 days after
|
||||||
|
Your receipt of the notice.
|
||||||
|
|
||||||
|
5.2. If You initiate litigation against any entity by asserting a patent
|
||||||
|
infringement claim (excluding declaratory judgment actions,
|
||||||
|
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||||
|
directly or indirectly infringes any patent, then the rights granted to
|
||||||
|
You by any and all Contributors for the Covered Software under Section
|
||||||
|
2.1 of this License shall terminate.
|
||||||
|
|
||||||
|
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||||
|
end user license agreements (excluding distributors and resellers) which
|
||||||
|
have been validly granted by You or Your distributors under this License
|
||||||
|
prior to termination shall survive termination.
|
||||||
|
|
||||||
|
************************************************************************
|
||||||
|
* *
|
||||||
|
* 6. Disclaimer of Warranty *
|
||||||
|
* ------------------------- *
|
||||||
|
* *
|
||||||
|
* Covered Software is provided under this License on an "as is" *
|
||||||
|
* basis, without warranty of any kind, either expressed, implied, or *
|
||||||
|
* statutory, including, without limitation, warranties that the *
|
||||||
|
* Covered Software is free of defects, merchantable, fit for a *
|
||||||
|
* particular purpose or non-infringing. The entire risk as to the *
|
||||||
|
* quality and performance of the Covered Software is with You. *
|
||||||
|
* Should any Covered Software prove defective in any respect, You *
|
||||||
|
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||||
|
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||||
|
* essential part of this License. No use of any Covered Software is *
|
||||||
|
* authorized under this License except under this disclaimer. *
|
||||||
|
* *
|
||||||
|
************************************************************************
|
||||||
|
|
||||||
|
************************************************************************
|
||||||
|
* *
|
||||||
|
* 7. Limitation of Liability *
|
||||||
|
* -------------------------- *
|
||||||
|
* *
|
||||||
|
* Under no circumstances and under no legal theory, whether tort *
|
||||||
|
* (including negligence), contract, or otherwise, shall any *
|
||||||
|
* Contributor, or anyone who distributes Covered Software as *
|
||||||
|
* permitted above, be liable to You for any direct, indirect, *
|
||||||
|
* special, incidental, or consequential damages of any character *
|
||||||
|
* including, without limitation, damages for lost profits, loss of *
|
||||||
|
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||||
|
* and all other commercial damages or losses, even if such party *
|
||||||
|
* shall have been informed of the possibility of such damages. This *
|
||||||
|
* limitation of liability shall not apply to liability for death or *
|
||||||
|
* personal injury resulting from such party's negligence to the *
|
||||||
|
* extent applicable law prohibits such limitation. Some *
|
||||||
|
* jurisdictions do not allow the exclusion or limitation of *
|
||||||
|
* incidental or consequential damages, so this exclusion and *
|
||||||
|
* limitation may not apply to You. *
|
||||||
|
* *
|
||||||
|
************************************************************************
|
||||||
|
|
||||||
|
8. Litigation
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Any litigation relating to this License may be brought only in the
|
||||||
|
courts of a jurisdiction where the defendant maintains its principal
|
||||||
|
place of business and such litigation shall be governed by laws of that
|
||||||
|
jurisdiction, without reference to its conflict-of-law provisions.
|
||||||
|
Nothing in this Section shall prevent a party's ability to bring
|
||||||
|
cross-claims or counter-claims.
|
||||||
|
|
||||||
|
9. Miscellaneous
|
||||||
|
----------------
|
||||||
|
|
||||||
|
This License represents the complete agreement concerning the subject
|
||||||
|
matter hereof. If any provision of this License is held to be
|
||||||
|
unenforceable, such provision shall be reformed only to the extent
|
||||||
|
necessary to make it enforceable. Any law or regulation which provides
|
||||||
|
that the language of a contract shall be construed against the drafter
|
||||||
|
shall not be used to construe this License against a Contributor.
|
||||||
|
|
||||||
|
10. Versions of the License
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
10.1. New Versions
|
||||||
|
|
||||||
|
Mozilla Foundation is the license steward. Except as provided in Section
|
||||||
|
10.3, no one other than the license steward has the right to modify or
|
||||||
|
publish new versions of this License. Each version will be given a
|
||||||
|
distinguishing version number.
|
||||||
|
|
||||||
|
10.2. Effect of New Versions
|
||||||
|
|
||||||
|
You may distribute the Covered Software under the terms of the version
|
||||||
|
of the License under which You originally received the Covered Software,
|
||||||
|
or under the terms of any subsequent version published by the license
|
||||||
|
steward.
|
||||||
|
|
||||||
|
10.3. Modified Versions
|
||||||
|
|
||||||
|
If you create software not governed by this License, and you want to
|
||||||
|
create a new license for such software, you may create and use a
|
||||||
|
modified version of this License if you rename the license and remove
|
||||||
|
any references to the name of the license steward (except to note that
|
||||||
|
such modified license differs from this License).
|
||||||
|
|
||||||
|
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||||
|
Licenses
|
||||||
|
|
||||||
|
If You choose to distribute Source Code Form that is Incompatible With
|
||||||
|
Secondary Licenses under the terms of this version of the License, the
|
||||||
|
notice described in Exhibit B of this License must be attached.
|
||||||
|
|
||||||
|
Exhibit A - Source Code Form License Notice
|
||||||
|
-------------------------------------------
|
||||||
|
|
||||||
|
This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
|
If it is not possible or desirable to put the notice in a particular
|
||||||
|
file, then You may include the notice in a location (such as a LICENSE
|
||||||
|
file in a relevant directory) where a recipient would be likely to look
|
||||||
|
for such a notice.
|
||||||
|
|
||||||
|
You may add additional accurate notices of copyright ownership.
|
||||||
|
|
||||||
|
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||||
|
---------------------------------------------------------
|
||||||
|
|
||||||
|
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||||
|
defined by the Mozilla Public License, v. 2.0.
|
|
@ -13,7 +13,7 @@
|
||||||
"embed": "string"
|
"embed": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Navigation": {
|
"navigation": {
|
||||||
"name": "Navigation",
|
"name": "Navigation",
|
||||||
"description": "A basic header navigation component",
|
"description": "A basic header navigation component",
|
||||||
"children": true,
|
"children": true,
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
"build": "rollup -c",
|
"build": "rollup -c",
|
||||||
"prepublishOnly": "npm run build",
|
"prepublishOnly": "npm run build",
|
||||||
"postpublish": "node scripts/deploy.js",
|
"postpublish": "node scripts/deploy.js",
|
||||||
"testbuild": "rollup -w -c rollup.testconfig.js",
|
|
||||||
"dev": "run-p start:dev testbuild",
|
"dev": "run-p start:dev testbuild",
|
||||||
"start:dev": "sirv public --single --dev",
|
"start:dev": "sirv public --single --dev",
|
||||||
"dev:builder": "rollup -cw"
|
"dev:builder": "rollup -cw"
|
||||||
|
@ -23,11 +22,8 @@
|
||||||
"rollup-plugin-postcss": "^3.1.5",
|
"rollup-plugin-postcss": "^3.1.5",
|
||||||
"rollup-plugin-svelte": "^6.1.1",
|
"rollup-plugin-svelte": "^6.1.1",
|
||||||
"rollup-plugin-terser": "^7.0.2",
|
"rollup-plugin-terser": "^7.0.2",
|
||||||
"shortid": "^2.2.15",
|
"sirv-cli": "^0.4.4",
|
||||||
"sirv-cli": "^0.4.4"
|
"svelte": "^3.30.0"
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"svelte": "^3.29.0"
|
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"svelte"
|
"svelte"
|
||||||
|
@ -36,12 +32,10 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"gitHead": "284cceb9b703c38566c6e6363c022f79a08d5691",
|
"gitHead": "284cceb9b703c38566c6e6363c022f79a08d5691",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^1.50.1",
|
"@budibase/bbui": "^1.51.0",
|
||||||
"@budibase/svelte-ag-grid": "^0.0.13",
|
"@budibase/svelte-ag-grid": "^0.0.16",
|
||||||
"@fortawesome/fontawesome-free": "^5.14.0",
|
"@fortawesome/fontawesome-free": "^5.14.0",
|
||||||
"@svelteschool/svelte-forms": "^0.7.0",
|
|
||||||
"apexcharts": "^3.22.1",
|
"apexcharts": "^3.22.1",
|
||||||
"fast-sort": "^2.2.0",
|
|
||||||
"flatpickr": "^4.6.6",
|
"flatpickr": "^4.6.6",
|
||||||
"lodash.debounce": "^4.0.8",
|
"lodash.debounce": "^4.0.8",
|
||||||
"quill": "^1.3.7",
|
"quill": "^1.3.7",
|
||||||
|
|
|
@ -15,7 +15,6 @@ export default {
|
||||||
{
|
{
|
||||||
file: "dist/index.js",
|
file: "dist/index.js",
|
||||||
format: "esm",
|
format: "esm",
|
||||||
name: "budibaseStandardComponents",
|
|
||||||
sourcemap: false,
|
sourcemap: false,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
@ -1,138 +0,0 @@
|
||||||
import svelte from "rollup-plugin-svelte"
|
|
||||||
import resolve from "rollup-plugin-node-resolve"
|
|
||||||
import commonjs from "rollup-plugin-commonjs"
|
|
||||||
import livereload from "rollup-plugin-livereload"
|
|
||||||
import { terser } from "rollup-plugin-terser"
|
|
||||||
import json from "rollup-plugin-json"
|
|
||||||
|
|
||||||
const production = !process.env.ROLLUP_WATCH
|
|
||||||
|
|
||||||
const lodash_fp_exports = [
|
|
||||||
"find",
|
|
||||||
"isUndefined",
|
|
||||||
"split",
|
|
||||||
"max",
|
|
||||||
"last",
|
|
||||||
"union",
|
|
||||||
"reduce",
|
|
||||||
"isObject",
|
|
||||||
"cloneDeep",
|
|
||||||
"some",
|
|
||||||
"isArray",
|
|
||||||
"map",
|
|
||||||
"filter",
|
|
||||||
"keys",
|
|
||||||
"isFunction",
|
|
||||||
"isEmpty",
|
|
||||||
"countBy",
|
|
||||||
"join",
|
|
||||||
"includes",
|
|
||||||
"flatten",
|
|
||||||
"constant",
|
|
||||||
"first",
|
|
||||||
"intersection",
|
|
||||||
"take",
|
|
||||||
"has",
|
|
||||||
"mapValues",
|
|
||||||
"isString",
|
|
||||||
"isBoolean",
|
|
||||||
"isNull",
|
|
||||||
"isNumber",
|
|
||||||
"isObjectLike",
|
|
||||||
"isDate",
|
|
||||||
"clone",
|
|
||||||
"values",
|
|
||||||
"keyBy",
|
|
||||||
"isNaN",
|
|
||||||
"isInteger",
|
|
||||||
"toNumber",
|
|
||||||
]
|
|
||||||
|
|
||||||
const lodash_exports = [
|
|
||||||
"flow",
|
|
||||||
"head",
|
|
||||||
"find",
|
|
||||||
"each",
|
|
||||||
"tail",
|
|
||||||
"findIndex",
|
|
||||||
"startsWith",
|
|
||||||
"dropRight",
|
|
||||||
"takeRight",
|
|
||||||
"trim",
|
|
||||||
"split",
|
|
||||||
"replace",
|
|
||||||
"merge",
|
|
||||||
"assign",
|
|
||||||
]
|
|
||||||
|
|
||||||
const coreExternal = [
|
|
||||||
"lodash",
|
|
||||||
"lodash/fp",
|
|
||||||
"date-fns",
|
|
||||||
"lunr",
|
|
||||||
"safe-buffer",
|
|
||||||
"shortid",
|
|
||||||
"@nx-js/compiler-util",
|
|
||||||
"bcryptjs",
|
|
||||||
]
|
|
||||||
|
|
||||||
export default {
|
|
||||||
input: "src/Test/testMain.js",
|
|
||||||
output: {
|
|
||||||
sourcemap: true,
|
|
||||||
format: "iife",
|
|
||||||
name: "app",
|
|
||||||
file: "public/bundle.js",
|
|
||||||
globals: {
|
|
||||||
crypto: "crypto",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
plugins: [
|
|
||||||
svelte({
|
|
||||||
// enable run-time checks when not in production
|
|
||||||
dev: !production,
|
|
||||||
// we'll extract any component CSS out into
|
|
||||||
// a separate file — better for performance
|
|
||||||
css: css => {
|
|
||||||
css.write("bundle.css")
|
|
||||||
},
|
|
||||||
|
|
||||||
hydratable: true,
|
|
||||||
}),
|
|
||||||
|
|
||||||
// If you have external dependencies installed from
|
|
||||||
// npm, you'll most likely need these plugins. In
|
|
||||||
// some cases you'll need additional configuration —
|
|
||||||
// consult the documentation for details:
|
|
||||||
// https://github.com/rollup/rollup-plugin-commonjs
|
|
||||||
resolve({
|
|
||||||
browser: true,
|
|
||||||
dedupe: importee => {
|
|
||||||
return (
|
|
||||||
importee === "svelte" ||
|
|
||||||
importee.startsWith("svelte/") ||
|
|
||||||
coreExternal.includes(importee)
|
|
||||||
)
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
commonjs({
|
|
||||||
namedExports: {
|
|
||||||
"lodash/fp": lodash_fp_exports,
|
|
||||||
lodash: lodash_exports,
|
|
||||||
shortid: ["generate"],
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
json(),
|
|
||||||
|
|
||||||
// Watch the `public` directory and refresh the
|
|
||||||
// browser on changes when not in production
|
|
||||||
!production && livereload("public"),
|
|
||||||
|
|
||||||
// If we're building for production (npm run build
|
|
||||||
// instead of npm run dev), minify
|
|
||||||
production && terser(),
|
|
||||||
],
|
|
||||||
watch: {
|
|
||||||
clearScreen: false,
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
const { styleable, API } = getContext("sdk")
|
const { styleable, API } = getContext("sdk")
|
||||||
const component = getContext("component")
|
const component = getContext("component")
|
||||||
const data = getContext("data")
|
const dataContext = getContext("data")
|
||||||
|
|
||||||
export let wide = false
|
export let wide = false
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
let fields = []
|
let fields = []
|
||||||
|
|
||||||
// Fetch info about the closest data context
|
// Fetch info about the closest data context
|
||||||
$: getFormData($data[$data.closestComponentId])
|
$: getFormData($dataContext[$dataContext.closestComponentId])
|
||||||
|
|
||||||
const getFormData = async context => {
|
const getFormData = async context => {
|
||||||
if (context) {
|
if (context) {
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
fields = Object.keys(schema)
|
fields = Object.keys(schema)
|
||||||
|
|
||||||
// Use the draft version for editing
|
// Use the draft version for editing
|
||||||
row = $data[`${$data.closestComponentId}_draft`]
|
row = $dataContext[`${$dataContext.closestComponentId}_draft`]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
const { API, styleable, DataProvider } = getContext("sdk")
|
const { API, styleable, DataProvider } = getContext("sdk")
|
||||||
const component = getContext("component")
|
const component = getContext("component")
|
||||||
const data = getContext("data")
|
const dataContext = getContext("data")
|
||||||
|
|
||||||
export let datasource = []
|
export let datasource = []
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
if (!isEmpty(datasource)) {
|
if (!isEmpty(datasource)) {
|
||||||
rows = await API.fetchDatasource(datasource, $data)
|
rows = await API.fetchDatasource(datasource, $dataContext)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
import { isEmpty } from "lodash/fp"
|
import { isEmpty } from "lodash/fp"
|
||||||
|
|
||||||
const { API } = getContext("sdk")
|
const { API } = getContext("sdk")
|
||||||
|
const dataContext = getContext("data")
|
||||||
|
|
||||||
export let title
|
export let title
|
||||||
export let datasource
|
export let datasource
|
||||||
|
@ -34,7 +35,7 @@
|
||||||
|
|
||||||
// Fetch, filter and sort data
|
// Fetch, filter and sort data
|
||||||
const schema = (await API.fetchTableDefinition(datasource.tableId)).schema
|
const schema = (await API.fetchTableDefinition(datasource.tableId)).schema
|
||||||
const result = await API.fetchDatasource(datasource)
|
const result = await API.fetchDatasource(datasource, $dataContext)
|
||||||
const reducer = row => (valid, column) => valid && row[column] != null
|
const reducer = row => (valid, column) => valid && row[column] != null
|
||||||
const hasAllColumns = row => allCols.reduce(reducer(row), true)
|
const hasAllColumns = row => allCols.reduce(reducer(row), true)
|
||||||
const data = result
|
const data = result
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
import { isEmpty } from "lodash/fp"
|
import { isEmpty } from "lodash/fp"
|
||||||
|
|
||||||
const { API } = getContext("sdk")
|
const { API } = getContext("sdk")
|
||||||
|
const dataContext = getContext("data")
|
||||||
|
|
||||||
export let title
|
export let title
|
||||||
export let datasource
|
export let datasource
|
||||||
|
@ -32,7 +33,7 @@
|
||||||
|
|
||||||
// Fetch, filter and sort data
|
// Fetch, filter and sort data
|
||||||
const schema = (await API.fetchTableDefinition(datasource.tableId)).schema
|
const schema = (await API.fetchTableDefinition(datasource.tableId)).schema
|
||||||
const result = await API.fetchDatasource(datasource)
|
const result = await API.fetchDatasource(datasource, $dataContext)
|
||||||
const reducer = row => (valid, column) => valid && row[column] != null
|
const reducer = row => (valid, column) => valid && row[column] != null
|
||||||
const hasAllColumns = row => allCols.reduce(reducer(row), true)
|
const hasAllColumns = row => allCols.reduce(reducer(row), true)
|
||||||
const data = result
|
const data = result
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
import { isEmpty } from "lodash/fp"
|
import { isEmpty } from "lodash/fp"
|
||||||
|
|
||||||
const { API } = getContext("sdk")
|
const { API } = getContext("sdk")
|
||||||
|
const dataContext = getContext("data")
|
||||||
|
|
||||||
// Common props
|
// Common props
|
||||||
export let title
|
export let title
|
||||||
|
@ -40,7 +41,7 @@
|
||||||
|
|
||||||
// Fetch, filter and sort data
|
// Fetch, filter and sort data
|
||||||
const schema = (await API.fetchTableDefinition(datasource.tableId)).schema
|
const schema = (await API.fetchTableDefinition(datasource.tableId)).schema
|
||||||
const result = await API.fetchDatasource(datasource)
|
const result = await API.fetchDatasource(datasource, $dataContext)
|
||||||
const reducer = row => (valid, column) => valid && row[column] != null
|
const reducer = row => (valid, column) => valid && row[column] != null
|
||||||
const hasAllColumns = row => allCols.reduce(reducer(row), true)
|
const hasAllColumns = row => allCols.reduce(reducer(row), true)
|
||||||
const data = result
|
const data = result
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
import { isEmpty } from "lodash/fp"
|
import { isEmpty } from "lodash/fp"
|
||||||
|
|
||||||
const { API } = getContext("sdk")
|
const { API } = getContext("sdk")
|
||||||
|
const dataContext = getContext("data")
|
||||||
|
|
||||||
export let title
|
export let title
|
||||||
export let datasource
|
export let datasource
|
||||||
|
@ -30,7 +31,7 @@
|
||||||
|
|
||||||
// Fetch, filter and sort data
|
// Fetch, filter and sort data
|
||||||
const schema = (await API.fetchTableDefinition(datasource.tableId)).schema
|
const schema = (await API.fetchTableDefinition(datasource.tableId)).schema
|
||||||
const result = await API.fetchDatasource(datasource)
|
const result = await API.fetchDatasource(datasource, $dataContext)
|
||||||
const data = result
|
const data = result
|
||||||
.filter(row => row[labelColumn] != null && row[valueColumn] != null)
|
.filter(row => row[labelColumn] != null && row[valueColumn] != null)
|
||||||
.slice(0, 20)
|
.slice(0, 20)
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
const setters = new Map([["number", number]])
|
const setters = new Map([["number", number]])
|
||||||
const SDK = getContext("sdk")
|
const SDK = getContext("sdk")
|
||||||
const component = getContext("component")
|
const component = getContext("component")
|
||||||
|
const dataContext = getContext("data")
|
||||||
const { API, styleable } = SDK
|
const { API, styleable } = SDK
|
||||||
|
|
||||||
export let datasource = {}
|
export let datasource = {}
|
||||||
|
@ -58,7 +59,7 @@
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
if (!isEmpty(datasource)) {
|
if (!isEmpty(datasource)) {
|
||||||
data = await API.fetchDatasource(datasource)
|
data = await API.fetchDatasource(datasource, $dataContext)
|
||||||
let schema
|
let schema
|
||||||
|
|
||||||
// Get schema for datasource
|
// Get schema for datasource
|
||||||
|
@ -142,12 +143,6 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
|
||||||
<link
|
|
||||||
rel="stylesheet"
|
|
||||||
href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css" />
|
|
||||||
</svelte:head>
|
|
||||||
|
|
||||||
<div class="container" use:styleable={gridStyles}>
|
<div class="container" use:styleable={gridStyles}>
|
||||||
{#if dataLoaded}
|
{#if dataLoaded}
|
||||||
{#if canAddDelete}
|
{#if canAddDelete}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import "@budibase/bbui/dist/bbui.css"
|
import "@budibase/bbui/dist/bbui.css"
|
||||||
|
import "flatpickr/dist/flatpickr.css"
|
||||||
|
|
||||||
export { default as container } from "./Container.svelte"
|
export { default as container } from "./Container.svelte"
|
||||||
export { default as text } from "./Text.svelte"
|
export { default as text } from "./Text.svelte"
|
||||||
|
@ -10,7 +11,7 @@ export { default as button } from "./Button.svelte"
|
||||||
export { default as login } from "./Login.svelte"
|
export { default as login } from "./Login.svelte"
|
||||||
export { default as link } from "./Link.svelte"
|
export { default as link } from "./Link.svelte"
|
||||||
export { default as image } from "./Image.svelte"
|
export { default as image } from "./Image.svelte"
|
||||||
export { default as Navigation } from "./Navigation.svelte"
|
export { default as navigation } from "./Navigation.svelte"
|
||||||
export { default as datagrid } from "./grid/Component.svelte"
|
export { default as datagrid } from "./grid/Component.svelte"
|
||||||
export { default as dataform } from "./DataForm.svelte"
|
export { default as dataform } from "./DataForm.svelte"
|
||||||
export { default as dataformwide } from "./DataFormWide.svelte"
|
export { default as dataformwide } from "./DataFormWide.svelte"
|
||||||
|
|
45
readme.md
45
readme.md
|
@ -1,45 +0,0 @@
|
||||||
# Budibase
|
|
||||||
[Budibase](https://www.budibase.com) is an open source no-code platform for building and deploying custom software, without coding.
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="https://i.imgur.com/tMCahK8.png">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
# Status
|
|
||||||
- [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] Public Beta: Anyone can [sign-up and use Budibase](https://portal.budi.live/signup) but it's not production ready. We cannot ensure backwards compatibility
|
|
||||||
- [ ] Official Launch: Production-ready
|
|
||||||
|
|
||||||
|
|
||||||
We are currently in Public Beta. Until our official launch, we cannot ensure backwards compatibility for your budibase applications between versions. Issues may arise when trying to edit apps created with old versions of the budibase builder.
|
|
||||||
|
|
||||||
Watch "releases" of this repo to get notified of major updates, and give the star button a click whilst you're there.
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="https://i.imgur.com/cJpgqm8.png">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
If you are having issues between updates of the builder, please use the guide [here](https://github.com/Budibase/budibase/blob/master/CONTRIBUTING.md#troubleshooting) to clear down your environment.
|
|
||||||
|
|
||||||
|
|
||||||
# Getting Started with Budibase
|
|
||||||
|
|
||||||
The Budibase builder runs in Electron, on Mac, PC and Linux. [Download the latest release](https://github.com/Budibase/budibase/releases), and start building!
|
|
||||||
|
|
||||||
|
|
||||||
## Documentation and tutorial
|
|
||||||
|
|
||||||
Our documentation and tutorials live here: https://docs.budibase.com
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
Contributors, see [CONTRIBUTING.md](./CONTRIBUTING.md)
|
|
||||||
|
|
||||||
## 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:
|
|
||||||
|
|
||||||
[Discord chatroom](https://discord.gg/rCYayfe)
|
|
||||||
|
|
||||||
![Discord Shield](https://discordapp.com/api/guilds/733030666647765003/widget.png?style=shield)
|
|
|
@ -27,14 +27,14 @@ const SYMLINK_PATHS = [
|
||||||
symlink: `${devDir}/@budibase/standard-components`,
|
symlink: `${devDir}/@budibase/standard-components`,
|
||||||
destination: resolve("packages/standard-components"),
|
destination: resolve("packages/standard-components"),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
symlink: `${devDir}/budibase-client.esm.mjs`,
|
|
||||||
destination: resolve("packages/client/dist/budibase-client.esm.mjs"),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
symlink: `${devDir}/budibase-client.js`,
|
symlink: `${devDir}/budibase-client.js`,
|
||||||
destination: resolve("packages/client/dist/budibase-client.js"),
|
destination: resolve("packages/client/dist/budibase-client.js"),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
symlink: `${devDir}/budibase-client.js.map`,
|
||||||
|
destination: resolve("packages/client/dist/budibase-client.js.map"),
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
SYMLINK_PATHS.forEach(sym => {
|
SYMLINK_PATHS.forEach(sym => {
|
||||||
|
|
|
@ -4417,10 +4417,10 @@ supports-color@^5.3.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
has-flag "^3.0.0"
|
has-flag "^3.0.0"
|
||||||
|
|
||||||
svelte@^3.28.0:
|
svelte@^3.30.0:
|
||||||
version "3.29.0"
|
version "3.30.0"
|
||||||
resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.29.0.tgz#80acac4254341ad8f3301e5ef03f4127ea967d96"
|
resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.30.0.tgz#cbde341e96bf34f4ac73c8f14f8a014e03bfb7d6"
|
||||||
integrity sha512-f+A65eyOQ5ujETLy+igNXtlr6AEjAQLYd1yJE1VwNiXMQO5Z/Vmiy3rL+zblV/9jd7rtTTWqO1IcuXsP2Qv0OA==
|
integrity sha512-z+hdIACb9TROGvJBQWcItMtlr4s0DBUgJss6qWrtFkOoIInkG+iAMo/FJZQFyDBQZc+dul2+TzYSi/tpTT5/Ag==
|
||||||
|
|
||||||
table@^5.2.3:
|
table@^5.2.3:
|
||||||
version "5.4.6"
|
version "5.4.6"
|
||||||
|
|
Loading…
Reference in New Issue