refs https://github.com/TryGhost/Team/issues/1403
- currently, all tiers are grouped together in dropdowns with list of tiers
- this separates them into active and archived groups, so that the status of the tiers is clear when making choices
refs https://github.com/TryGhost/Team/issues/3248
- API queries for tiers are now using the TiersRepository with internal caching
- the repository had a bug with it's `toPrimitive()` method which meant the cached tier objects had very few properties
- the Tier object has all properties as private getters except for standard `events` property which meant the spread operator didn't have anything to spread into the object resulting in all tiers having a shape like `{events: [], active: true, type: 'paid', id: 'abcd'}`
- the `getAll()` method uses nql to match against the cached tier objects but with them not being fully populated it wasn't able to match and so returned an empty array
---
- changing the spread to use `tier.toJSON()` means we're populating all of the tier data properly allowing filter matches to work
refs https://github.com/TryGhost/Team/issues/3240
- this adds support for `--lexical` to `yarn dev`, which sets the
env variable so Ghost uses a local Lexical instance and not the CDN version
refs. https://github.com/TryGhost/Team/issues/3150
There was an opportunity to make a reusable interaction within the Setting Group component so that switching between different states are implicitly handled. With this change it's possible to just add a Setting Group component without the need to build the logic over and over again. The component expects only the "contents" (ie. values in view state or input fields in edit state) as its children. There's a built in header with Edit/Cancel/Save buttons which is overridable with the `customButtons` parameter. A completely custom header can be used via the `customHeader` parameter.
See `TitleAndDescription.tsx` for a working example.
refs https://github.com/TryGhost/Team/issues/3224
When a product has a slug that is a single letter, checking if a user
had access to view a post associated with that product would cause a 500
error. The underlying cause of this issue is
https://github.com/TryGhost/NQL/issues/20 This fix circumvents this
issue by providing a value that the nql lexer will not error out on
refs https://github.com/TryGhost/Team/issues/3151
- adds new settings provider that fetches settings for a site and allows saving them
- adds new helpers for making admin api calls and fetching setting values
refs. https://github.com/TryGhost/Team/issues/3150
- Setting group values were taking their input parameters statically which meant that it didn't auto-extend as new props have been added