refs https://github.com/TryGhost/Team/issues/3151
- updates data providers to include roles as well as cleaner api syntax
- updates api methods to cleaner syntax and add roles api
- updated wiring for staff user profile editing and save
- updated data provider location in main app, is used before the modal provider so it has access to common context
- added `useRoles` hook that providers access to roles data for admin
- added `currentUser` to the staff provider
refs: https://github.com/TryGhost/Ghost/issues/16628
This adds a library for interpolating strings with React components, which allows us to pass HTML elements / React components into our i18n templates. We can further templatize those components to have fully translated, nested components.
refs: https://github.com/TryGhost/Ghost/issues/16628
Separate commit for these, this change was a little more complex since the string "Complimentary" was repeated several times, with different additional context.
I decided to keep "Complimentary" by itself as a translatable string, and concatenated a second string for the expiry.
If this would be better as 3 strings, then we could switch to having these:
- "Complimentary"
- "Complimentary ({{label}})"
- "Complimentary - Expires {{expiry date}}"
^ Makes sense only if the use of parentheses & hyphens would be changed in other locales
refs https://github.com/TryGhost/Team/issues/2808
Updated the test to ensure that the date assertions do not unexpectedly
fail if the dates used are computed precisely at the start of a second
(no milliseconds `.000Z`)
refs https://github.com/TryGhost/Team/issues/3234
Added an e2e for the update check script to detect potential breakages
in the script due to uninitialised dependencies in the isolated
execution environment
fixes https://github.com/TryGhost/Team/issues/3296
Adds a new `signupForm` feature flag, that will enable/disable the new embeddable signup form code generation.
Since the new flag shares its name with a new config value (that contains the script location), this also fixes the feature helper to only use a config with the same name if it is a boolean.
refs https://github.com/TryGhost/Team/issues/3151
Using svg imports in React *.tsx files was throwing error as Module `*.svg` did not have any exported member as `ReactComponent`. This change updates the typings to declare the module with exported ReactComponent as an SVG element, allowing svg files to be imported normally.
closes https://github.com/TryGhost/Team/issues/3311
- added event handler to the mobiledoc editor for cut and copy operations that reads mobiledoc from the event data, converts to lexical using `@tryghost/kg-converters` and stores the converted data on the event under the `application/x-lexical-editor` mimetype ready to be pasted into a lexical editor
refs https://github.com/TryGhost/Team/issues/3199
- when content is copied from the Lexical editor the converted mobiledoc post is placed in the clipboardData's `application/x-mobiledoc-editor` mimetype
- added custom paste handling to extract that data and place it into the html content in the same format as a typical mobiledoc copy/paste so that it can then be handled internally by mobiledoc
refs https://github.com/TryGhost/Team/issues/3151
- adds api to fetch staff users
- adds provider to use users data in the application
- wires Users UI to show real owner and other staff users
- combines all data providers for application under a single provider
Rather than using `require` we can add a type definition file, this allows us
to add custom types in the future if we want. We need to add some config for
ts-node to pick up the types correctly.