Releases: alineacms/alinea
v0.6.3
-
Add a preview widget which enables editors to easily switch from previewing
to editing. Enable by setting widget to true:<cms.previews widget />
-
Add a function to retrieve the current logged in user:
console.log(await cms.user())
v0.6.2
- Live-reload changes to
.css
files used for custom fields and views.
v0.6.1
- Allow importing
.css
and.module.css
in custom fields and views. - Make
isContainer
optional ifcontains
is used on Types. - Add i18nId to retrieved entry Link fields when queried.
v0.6.0
-
Field validation (#369)
Introduces two new Field options available for every Field:
required
and
validate
. Therequired
option will make sure the field value is not empty
when saving. Thevalidate
option can be used to validate the field value
using a custom function. The function should returntrue
if the value is
valid,false
if it is not valid and a string if it is not valid and a
message should be shown to the user.alinea.text('Hello field', { help: 'This field only accepts "hello" as a value', validate(value) { if (value !== 'hello') return 'Only "hello" is allowed!' } })
v0.5.12
- Link fields using the
condition
option are now constrained with their locale - Upgrade the tiptap editor and fix a few stability issues with the editor
v0.5.11
-
Fix storing extra
fields
on the Link field correctly for multiple links. -
In conditional configuration functions it's now possible to access fields from
parent contexts. For example field options of a nested field inside aList
field can depend on the value of a field in the entry root.const innerField = alinea.text('Read-only if status is published') const Type = alinea.type('Conditional example', { status: alinea.select('Status', { draft: 'Draft', published: 'Published' }), list: alinea.list('List', { schema: {ListRow: alinea.type({innerField})} }) }) alinea.track.options(innerField, get => { return {readOnly: get(Type.status) === 'published'} })
v0.5.10
- Fix
Entry
fields showing up as typeunkown
in TypeScript. - The
readOnly
option that is included in all fields will now show a lock item
next to the field label. The option is passed down in nested fields such as
theList
andRich text
fields.
v0.5.9
- Changing entry order by dragging them in the sidebar is now applied
immediately making changes much smoother.
v0.5.8
- Fix navigation missing when selecting internal pages in Link fields.
v0.5.7
-
The interval at which Alinea polls the backend for content updates is
now configurable. It can be set in config.syncInterval and overwritten
per query.// Poll for updates every 60 seconds const results = await cms.syncInterval(60).find(Entry()) // Disable syncing all for this query in case you want results fast, // but not necessarily up to date const matches = await cms.disableSync().find(Entry().search('fast'))