1
0
Fork 0
mirror of synced 2024-07-14 10:45:51 +12:00
budibase/packages/bbui
Rory Powell ec06f13aa6 Per user pricing (#10378)
* Update pro version to 2.4.44-alpha.9 (#10231)

Co-authored-by: Budibase Staging Release Bot <>

* Track installation and unique tenant id on licence activate (#10146)

* changes and exports

* removing the extend

* Lint + tidy

* Update account.ts

---------

Co-authored-by: Rory Powell <rory.codes@gmail.com>
Co-authored-by: mike12345567 <me@michaeldrury.co.uk>

* Type updates for loading new plans (#10245)

* Add new quota for max users on free plan

* Split available vs purchased plan & price type definitions. Update usages of available prices and plans

* Type fixes

* Add types for minimums

* New `PlanModel` type for `PER_USER` and `DAY_PASS` (#10247)

* Add new quota for max users on free plan

* Split available vs purchased plan & price type definitions. Update usages of available prices and plans

* Type fixes

* Add types for minimums

* New `PlanModel` type for `PER_USER` and `DAY_PASS`

* Add loadEnvFiles to lerna config for run command to prevent local test failures

* Fix types in license test structure

* Add quotas integration to user create / delete + migration (#10250)

* Add new quota for max users on free plan

* Split available vs purchased plan & price type definitions. Update usages of available prices and plans

* Type fixes

* Add types for minimums

* New `PlanModel` type for `PER_USER` and `DAY_PASS`

* Add loadEnvFiles to lerna config for run command to prevent local test failures

* Fix types in license test structure

* Add quotas integration to user create / delete

* Always sync user count from view total_rows value for accuracy

* Add migration to sync users

* Add syncUsers.spec.ts

* Lint

* Types and structures for user subscription quantity sync (#10280)

* Add new quota for max users on free plan

* Split available vs purchased plan & price type definitions. Update usages of available prices and plans

* Type fixes

* Add types for minimums

* New `PlanModel` type for `PER_USER` and `DAY_PASS`

* Add loadEnvFiles to lerna config for run command to prevent local test failures

* Fix types in license test structure

* Add quotas integration to user create / delete

* Always sync user count from view total_rows value for accuracy

* Add migration to sync users

* Add syncUsers.spec.ts

* Prevent old installs from activating, track install info via get license request instead of on activation.

* Add usesInvoicing to PurchasedPlan

* Add min/max users to PurchasedPlan

* Additional test structures for generating a license, remove maxUsers from PurchasedPlan - this is already present in the license quotas

* Stripe integration for monthly prorations on annual plans

* Integrate annual prorations with test clocks

* Updated types, test utils and date processing for licensing (#10346)

* Add new quota for max users on free plan

* Split available vs purchased plan & price type definitions. Update usages of available prices and plans

* Type fixes

* Add types for minimums

* New `PlanModel` type for `PER_USER` and `DAY_PASS`

* Add loadEnvFiles to lerna config for run command to prevent local test failures

* Fix types in license test structure

* Add quotas integration to user create / delete

* Always sync user count from view total_rows value for accuracy

* Add migration to sync users

* Add syncUsers.spec.ts

* Prevent old installs from activating, track install info via get license request instead of on activation.

* Add usesInvoicing to PurchasedPlan

* Add min/max users to PurchasedPlan

* Additional test structures for generating a license, remove maxUsers from PurchasedPlan - this is already present in the license quotas

* Stripe integration for monthly prorations on annual plans

* Integrate annual prorations with test clocks

* Updated types, test utils and date processing

* Lint

* Pricing/billing page (#10353)

* bbui updates for billing page

* Require all PlanTypes in PlanMinimums for compile time safety

* fix test package utils

* Incoming user limits warnings (#10379)

* incoming user limits warning

* fix inlinealert button

* add corretc button link and text to user alert

* pr comments

* simplify limit check

* Types and test updates for subscription quantity changes in account-portal (#10372)

* Add chance extensions for `arrayOf`. Update events spies with license events

* Add generics to doInTenant response

* Update account structure with quota usage

* User count limits (#10385)

* incoming user limits warning

* fix inlinealert button

* add corretc button link and text to user alert

* pr comments

* simplify limit check

* user limit messaging on add users modal

* user limit messaging on import users modal

* update licensing store to be more generic

* some styling updates

* remove console log

* Store tweaks

* Add startDate to Quota type

---------

Co-authored-by: Rory Powell <rory.codes@gmail.com>

* Lint

* Support custom lock options

* Reactivity fixes for add user modals

* Update ethereal email creds

* Add warn for getting invite from code error

* Extract disabling user import condition

* Handling unlimited users in modals logic and adding start date processing to store

* Lint

* Integration testing fixes (#10389)

* lint

---------

Co-authored-by: Mateus Badan de Pieri <mateuspieri@gmail.com>
Co-authored-by: mike12345567 <me@michaeldrury.co.uk>
Co-authored-by: Peter Clement <PClmnt@users.noreply.github.com>
2023-04-24 09:31:48 +01:00
..
src Per user pricing (#10378) 2023-04-24 09:31:48 +01:00
.gitignore Add BBUI package to monorepo 2021-03-31 10:59:07 +01:00
LICENSE License cleanup 2021-11-17 14:21:16 +00:00
package.json v2.5.6-alpha.16 2023-04-21 13:45:11 +00:00
README.md Fixing issue that refactoring file caused (some strings renamed to ts rather than js). 2022-09-22 15:18:10 +01:00
rollup.config.js Fixing issue that refactoring file caused (some strings renamed to ts rather than js). 2022-09-22 15:18:10 +01:00

Budibase bbui

A package that handles all common components across the Budibase organisation. You can find the current live version Here.

Install

  1. Clone
  2. npm install
  3. npm run svench

(Note: yarn won't work!)

Example workflow to create a component

  1. Create a file: Headline.svelte
  2. Create a Svench file: Headline.svench
  3. Build component and add variants to the Svench file.
  4. Once done, re-export the file in src/index.js.
  5. Publish, update the package in the main project and profit.

Guidelines

Making components

  1. Think about re-usability
  2. Use the css custom properties (variables) that are in the css stylesheet. This makes it easy to tweak things later down the line.
  3. Opt to forward events (<button on:click> for example) rather than using callbacks.
  4. Avoid adding margins to the outermost container of the component.

Using components and the styleguide

  1. Get familiar with the different props that exist on the component. If something vital is missing, make a PR and add it.
  2. Take advantage of the css custom properties in the stylesheet and avoid writing hard-coded values.
  3. Since there is no margin on the components, think about the structure of the DOM and how to achieve correct spacing, etc. This can be done using css grid + grid gap or with a container div where you specify a padding or margin. The best solution depends on the circumstance.

TODO

  • Figure out a good documentation situation
  • Add testing suite (E2E using Playwright?)

Other

The project uses Svench. It is somewhat akin to Storybook but a lot less bloated and much easier to setup. It also supports HMR for quick development.