apostrophe
Advanced tools
Changelog
3.54.0 (2023-08-16)
@apostrophecms/log
module to allow structured logging. All modules have logDebug
, logInfo
, logWarn
and logError
methods now. See the documentation for more details.@apostrophecms/settings
translations.moduleIf
property, which tests options at the module level
the same way that if
tests properties of the document to determine if the operation should be
offered for a particular document. Note that not all options are passed to the front end unless
getBrowserData
is extended to suit the need.column.extraWidth
option (number) for AposTreeHeader.vue
to allow control over the tree cell width.AposDocContextMenu.vue
business logic to a mixin.column.extraWidth
option (number) for AposTreeHeader.vue
to allow control over the tree cell width.projection
parameter into options
in self.find
method signature for
@apostrophecms/any-doc-type
, @apostrophecms/any-page-type
& @apostrophecms/piece-type
.
This was never really a projection in A3, so it is not a backwards compatibility issue.moduleName
for typical
actions on the context document is automatically passed to the
modal associated with a custom context operation, unless moduleName
is explicitly specified. The moduleName
parameter to addContextOperation
is no longer required and should not be passed at all in most cases
(just pass the object argument). If you do wish to specify a moduleName
to override that prop given to the modal, then it is recommended to pass
it as a moduleName
property of the object, not as a separate argument.
For backwards compatibility the two-argument syntax is still permitted.getFieldsByCategory
method in the AposEditorMixin.js
by checking for a property before accessing it.data.url
now includes any sitewide and locale URL prefixes. This fixes local prefixing for pagination of piece-type index pages.getTarget
method of the page module should use findForEditing
to make sure it is able to see
pages that would be filtered out of a public view by project level or npm module overrides.Changelog
3.53.0 (2023-08-03)
dialog
HTML element soon.if
property in addContextOperation
in order to show or not a context operation based on the current document properties.update-doc-fields
event to call AposDocEditor.updateDocFields
methodhidden
property to always hide a fieldAposDocEditor
when all fields are hidden due to if
conditions_aposEditorModal
and _aposAutopublish
properties of a document if present, and otherwise falls back to module
configuration. This is a powerful addition to custom editor components
for piece and page types, allowing "virtual piece types" on the back end that
deal with many content types to give better hints to the UI._aposAutopublish
property of a document if present, otherwise
fall back to module configuration.type
, the original type of the document being copied or edited.copyOfId
, which implies
the custom editor should fetch the original itself by its means of choice.
For backwards compatibility copyOf
is still passed, but it may be an
incomplete projection and should not be used in new code.docId
prop, which should
be used in preference to doc
because doc
may be an incomplete
projection.props
object for additional properties to be passed to
their modal and a docProps
object to map properties from the document
to props of their choosing.@apostrophecms/i18n
module. The new options allow control over the default admin UI language and configures the list of languages, that any individual logged in user can choose from. See the documentation for more details.adminLocale
User field to allow users to set their preferred admin UI language, but only when the @apostrophecms/i18n
is configured accordingly (see above).@apostrophecms/settings
module and a "Personal Settings" feature. See the documentation for more details.$and
operator on addContextOperation
if
property in order to check multiple fields before showing or hiding a context operation.AposDocEditor
onSave
method signature. We now always expect an object when a parameter is passed to the function to check
the value of navigate
flag.public
or i18n
subdirectory no longer generate a
warning if they export no code.npm link
ed to
the project no longer have to be listed in package.json
as
dependencies. To prevent surprises this is still a requirement for modules
that are not symlinked.Changelog
3.52.0 (2023-07-06)
conditions
property in addContextOperation
and validation of addContextOperation
configuration.if
condition fails to satisfy a condition such as min
or max
or is otherwise invalid. Instead the invalid value is discarded for safety.
Note that required
has always been ignored when an if
condition is not
satisfied.@apostrophecms/login:afterSessionLogin
event handlers are now properly passed back to Passport as such, avoiding a process restart.Changelog
3.51.1 (2023-06-23)
Changelog
3.51.0 (2023-06-21)
user: true
option when calling self.apos.adminBar.add
.
This should be reserved for items that manage personal settings._id
properties of
array items, widgets and areas are still regenerated to ensure
uniqueness across documents. However, an _originalId
property
is now available for reference while the document remains in memory.
This facilitates change detection within array items in
beforeSave
handlers and the like.addBar()
method from the admin-bar
module.array
and object
field schema. See the documentation for more information.findForEditing
method in the page put route.Changelog
3.50.0 (2023-06-09)
@apostrophecms/page:reattach
task has been added. This command line task
takes the _id
or slug
of a page and reattaches it to the page tree as
the last child of the home page, even if page tree data for that page
is corrupted. You may wish to use the --new-slug
and --locale
options. This task should not
be needed in normal circumstances.Changelog
3.49.0 (2023-06-08)
done
and cancel
for proper RT cleanup. close
still supported for BC, acts as done
..vue
file to project level without copying all of the business logic. If you have already copied the components to style them,
we encourage you to consider replacing your script
tag with the new version, which just imports the mixin, so that fixes we make there will be
available in your project.pnpm
support. Introduces new optional Apostrophe root configuration pnpm
to force opt-in/out when auto detection fails. See the documentation for more details.apostrophe:modulesRegistered
handler has fired.
If you need to call Apostrophe's find()
methods at startup,
it is best to wait for the @apostrophecms/doc:beforeReplicate
event.@
when a piece is a template and /@
for page templates (doc-template-library module).prefix
option to the http frontend util module.
If explicitly set to false
, prevents the prefix from being automatically added to the URL,
when making calls with already-prefixed URLs for instance.redirectToFirstLocale
option to the i18n
module to prevent users from reaching a version of their site that would not match any locale when requesting the site without a locale prefix in the URL.singletonAuto
option may now be set to true
or to an object with a slug
option in
order to guarantee it. This implicitly sets singleton: true
as well. This is now used
internally by @apostrophecms/global
as well as the optional @apostrophecms-pro/palette
module.async apos.doc.bestAposDocId(criteria)
method to
help identify the right aposDocId
when inserting a document that might exist in
other locales.Changelog
3.48.0 (2023-05-26)
apos.modules['piece-type']getManagerApiProjection
method to reduce the amount of data returned in the manager
modal. The projection will contain the fields returned in the method in addition to the existing manager modal
columns.apos.schema.getRelationshipQueryBuilderChoicesProjection
method to set the projection used in
apos.schema.relationshipQueryBuilderChoices
.alt
attribute from the original image from the Media Library.stripPlaceholderBrs
and restorePlaceholderBrs
from AposRichTextWidgetEditor.vue
component.Gapcursor
display to use a vertical blinking cursor instead of an horizontal cursor, which allow users to add text before and after inline images and tables.max-width
on .apos-rich-text-toolbar__inner
to define the width of the rich-text toolbar. It will now
flow on multiple lines if needed.utilityRail
prop of AposSchema
now defaults to false
, removing
the need to explicitly pass it in almost all contexts.apos.modules['doc-type']
methods getAutocompleteTitle
, getAutocompleteProjection
and autocomplete
as
deprecated. Our admin UI does not use them, it uses the autocomplete('...')
query builder.
More info at https://v3.docs.apostrophecms.org/reference/query-builders.html#autocomplete'.index.js
file contains
no module.exports
object (often due to a typo), or it is empty.type
. Thanks to NuktukDev for this contribution.