CMS / foldkit-cms
API
| Call | Meaning |
|---|---|
Cms.roles({ label?, slug?, published? }) | Pipe step: the members of an Entity that play a CMS part. |
Cms.rolesOf(entity) | Those roles, as Fields; undefined for a part nobody named. |
Cms.content(name, { entity, form, publish, words, preview? }) | A type of content: its Entity, form, publish operations, and name. |
Cms.editor(name, { content, rest?, version?, untitled? }) | The authoring editor: bundle, Message, and at({ data, model }). |
Cms.newEntryId() | An id for something new. |
Cms.editorView(view) | A form's Submodel view as its editor's, for Bundle.withView. |
Cms.slug(from, options?), Cms.dateTime(), Cms.slugify(text) | Controls for a form's inputs. |
Cms.Input.{Slug, DateTime}, Cms.Display.{State, Moment} | The kinds: .of(data), .is(x). |
Cms.controlRenderers(), Cms.displayRenderers() | Their renderers, to spread beside the mixins' own. |
Cms.state(facts, now) | The state of an entry, with its schedule. |
Cms.offers(facts, now, content) | The transitions it offers now. |
Cms.Entities, Cms.Operations, Cms.operations | The CMS's own Entities and mutations. |
Cms.Entries | The worklist query: one content type's entries, by label, archived or not. |
Cms.bySlug(content) | The query <name>BySlug: the content at an address, a connection of one or none. Throws with no slug role. |
Cms.refusal | What a server refuses SaveDraft and Publish with: field(key, reason) for one key of the form, conflict for work saved or published since. Both operations declare it as their Refusal. |
End-to-end example
examples/cms takes a post from its first keystroke to being
taken off show, from a writer's, an editor's and a visitor's chair, over SQLite,
with its transcript pinned by a test.