Releases: vivid-planet/comet
7.13.0
@comet/[email protected]
Minor Changes
-
bd562d3: Add
disableForcePromptRoute
option toStackSwitch
This can be useful when a navigation in a switch shouldn't trigger a prompt, e.g., when navigating inside a block.
-
5c06e4b: Reduce
MainContent
padding on mobile -
b918c81: Add support for custom components to
CrudMoreActionsMenu
Example
const CustomAction = () => ( <CrudMoreActionsMenuItem onClick={() => { // Perform action }} > <ListItemIcon> <Favorite /> </ListItemIcon> Custom Action </CrudMoreActionsMenuItem> ); <CrudMoreActionsMenu overallActions={[<CustomAction key="custom-action" />]} />;
Note: Use the
CrudMoreActionsMenuItem
component orCrudMoreActionsMenuContext
to close the menu after clicking an item.
@comet/[email protected]
Patch Changes
- 86c1d59: Set correct editor height when using the
minHeight
option
@comet/[email protected]
Patch Changes
- bd562d3: Prevent router prompt when using a block with subroutes in a form
@comet/[email protected]
Patch Changes
-
f49370a: Improve SVG validation
Following tags are banned in SVGs:
- script
- [new] foreignObject
- [new] use
- [new] image
- [new] animate
- [new] animateMotion
- [new] animateTransform
- [new] set
Following attributes are banned:
- Event handlers (
onload
,onclick
, ...) - [new]
href
andxlink:href
(if the value starts withhttp://
,https://
orjavascript:
)
@comet/[email protected]
Patch Changes
-
f49370a: Improve SVG validation
Following tags are banned in SVGs:
- script
- [new] foreignObject
- [new] use
- [new] image
- [new] animate
- [new] animateMotion
- [new] animateTransform
- [new] set
Following attributes are banned:
- Event handlers (
onload
,onclick
, ...) - [new]
href
andxlink:href
(if the value starts withhttp://
,https://
orjavascript:
)
@comet/[email protected]
Minor Changes
-
f60b636: Extend the
usePreview
-helpersisSelected
andisHovered
with optional partial match support- When
exactMatch
is set totrue
(default), the function checks for exact URL matches. - When
exactMatch
is set tofalse
, the function checks if the selected route starts with the given URL.
- When
7.12.0
@comet/[email protected]
Minor Changes
-
af51bb4: Make the width of
GridToolbarQuickFilter
responsive when used insideDataGridToolbar
-
92b3255: Hide group title in
CrudMoreActionsMenu
when only one group is present -
e8003f9: Add a new
FillSpace
component to replaceToolbarFillSpace
andAppHeaderFillSpace
ToolbarFillSpace
andAppHeaderFillSpace
are now deprecated. -
4f6e6b0: Deprecate
FinalFormRadio
andFinalFormCheckbox
-
5583c9c: Export
renderFinalFormChildren
helper -
7da81fa: Add a new
Button
component to replaceToolbarActionButton
and MUI'sButton
Compared to MUI's
Button
component, thecolor
prop has been removed, and thevariant
prop now defines those variants, defined by the Comet design guidelines,primary
is the default variant.-import { Button } from "@mui/material"; +import { Button } from "@comet/admin"; export const AllButtonVariants = () => ( <> - <Button variant="contained" color="primary">Primary</Button> + <Button>Primary</Button> - <Button variant="contained" color="secondary">Secondary</Button> + <Button variant="secondary">Secondary</Button> - <Button variant="outlined">Outlined</Button> + <Button variant="outlined">Outlined</Button> - <Button variant="outlined" color="error">Destructive</Button> + <Button variant="destructive">Destructive</Button> - <Button variant="contained" color="success">Success</Button> + <Button variant="success">Success</Button> - <Button variant="text" sx={{ color: "white" }}>Text Light</Button> + <Button variant="textLight">Text Light</Button> - <Button variant="text" sx={{ color: "black" }}>Text Dark</Button> + <Button variant="textDark">Text Dark</Button> </> );
Responsive behavior
ToolbarActionButton
is now deprecated.
Previously,ToolbarActionButton
would hide its text content on mobile and add it with a tooltip instead.
This behavior can now be achieved by setting theresponsive
prop on theButton
component.-import { ToolbarActionButton } from "@comet/admin/lib/common/toolbar/actions/ToolbarActionButton"; +import { Button } from "@comet/admin"; import { Favorite } from "@comet/admin-icons"; const Example = () => { - return <ToolbarActionButton startIcon={<Favorite />}>Hello</ToolbarActionButton>; + return <Button responsive startIcon={<Favorite />}>Hello</Button>; };
Patch Changes
- 9546356: Fix mobile styling of
AppHeaderMenuButton
- 3ddc227: Adjust the spacings inside
Toolbar
andDataGridToolbar
to match the Comet design - 0bb181a:
usePersistentColumnState
: Prevent Data Grids with the same name to overwrite each others pinned and column-visibility states
@comet/[email protected]
Minor Changes
- ee59753: Add styling of
Card
andCardHeader
to align with Comet DXP design
Patch Changes
- 47be4eb: Adapt styling of
DialogActions
,DialogContent
, andDialogTitle
to match the Comet DXP design - af51bb4: Prevent the input value of
GridToolbarQuickFilter
from being truncated too early
@comet/[email protected]
Minor Changes
-
86479e7: Simplify setting field props when using
createCompositeBlockTextField
orcreateCompositeBlockSelectField
The props can now be set directly without nesting them inside the
fieldProps
object.block: createCompositeBlockTextField({ - fieldProps: { label: "Title", fullWidth: true, - }, }),
-
af350d0: Add
createCompositeBlockSwitchField
helper functionTo simplify the creation of a switch field block by hiding the verbose definition of
Form
,Field
and items. -
86479e7: Support
disabled
in select options when usingcreateCompositeBlockSelectField
Patch Changes
- 5583c9c: Allow passing a function as child to
BlocksFinalForm
@comet/[email protected]
Minor Changes
-
604491d: Validate filename length for uploads to DAM or FileUploads
The filename can't exceed 255 characters.
Patch Changes
-
64173b5: Fix page tree node slug validation to prevent URL encoded characters
-
0837c4c: Hide the "Dependents" tab in the DAM for users without the permission
dependencies
-
cf1a829: Remove
video/avi
,image/psd
andvideo/x-m4v
from default accepted mimetypesNone of this mimetypes had an actual impact:
video/avi
doesn't actually existimage/psd
doesn't exist / is non-standardvideo/x-m4v
is a niche format and the mimetype is not widely used (e.g., Google Chrome and MacOS usevideo/mp4
instead)
So removing them shouldn't have any noticeable effects.
-
cf1a829: Add
image/x-icon
to default accepted mimetypesPreviously, only
image/vnd.microsoft.icon
was supported. That could lead to problems uploading .ico files, since
image/vnd.microsoft.icon
andimage/x-icon
are valid mimetypes for this format. -
02dd20a: Export
useDamScope
hookThis allows accessing the DAM scope in the application. This might be necessary when developing integrations with a third-party DAM.
-
9546356: Update default icon of
ContentScopeSelect
and fix mobile styling forAppHeader
components- Update the default icon in
ContentScopeSelect
from<Domain />
to<Language />
- Fix mobile styling of
BuildEntry
andContentScopeSelect
andUserHeaderItem
- Update the default icon in
@comet/[email protected]
Minor Changes
-
604491d: Validate filename length for uploads to DAM or FileUploads
The filename can't exceed 255 characters.
-
575f1a7: Add
ExceptionFilter
to replaceExceptionInterceptor
The main motivation for this change was that the
ExceptionInterceptor
didn't capture exceptions thrown in guards. This could lead to information leaks, e.g., details about the database schema or the underlying code. This is considered a security risk.The
ExceptionFilter
also catches error within guards. The error format remains unchanged.Switching from the
ExceptionInterceptor
to theExceptionFilter
must be done in the project:// main.ts - app.useGlobalInterceptors(new ExceptionInterceptor(config.debug)); + app.useGlobalFilters(new ExceptionFilter(config.debug));
Patch Changes
-
64173b5: Fix page tree node slug validation to prevent URL encoded characters
-
c66a403: Migrate from deprecated
@azure/openai
package toopenai
See https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/migration-javascript for more information.
-
6b4866a: Pass
x-preview-dam-urls
andx-relative-dam-urls
headers tourl
field resolver inFileImagesResolver
-
cf1a829: Remove
video/avi
,image/psd
andvideo/x-m4v
from default accepted mimetypesNone of these mimetypes had an actual impact:
video/avi
doesn't actually existimage/psd
doesn't exist / is non-standardvideo/x-m4v
is a niche format and the mimetype is not widely used (e.g., Google Chrome and MacOS usevideo/mp4
instead)
So removing them shouldn't have any noticeable effects.
-
cf1a829: Add
image/x-icon
to default accepted mimetypesPreviously, only
image/vnd.microsoft.icon
was supported. That could lead to problems uploading .ico files, since
image/vnd.microsoft.icon
andimage/x-icon
are valid mimetypes for this format. -
ff0a037: Prevent image uploads from failing if exif data cannot be parsed
@comet/[email protected]
Minor Changes
- 753cd6f: Add option for base64 encoding in
inject-site-configs
command
@comet/[email protected]
Patch Changes
- e92e6df: Prevent the block-preview from becoming unresponsive when rendering an
input
6.19.0
@comet/[email protected]
Minor Changes
-
2fd22e7: Add
ExceptionFilter
to replaceExceptionInterceptor
The main motivation for this change was that the
ExceptionInterceptor
didn't capture exceptions thrown in guards. This could lead to information leaks, e.g., details about the database schema or the underlying code. This is considered a security risk.The
ExceptionFilter
also catches error within guards. The error format remains unchanged.Switching from the
ExceptionInterceptor
to theExceptionFilter
must be done in the project:// main.ts - app.useGlobalInterceptors(new ExceptionInterceptor(config.debug)); + app.useGlobalFilters(new ExceptionFilter(config.debug));
5.11.0
@comet/[email protected]
Minor Changes
-
f0dd6c2: Add
ExceptionFilter
to replaceExceptionInterceptor
The main motivation for this change was that the
ExceptionInterceptor
didn't capture exceptions thrown in guards. This could lead to information leaks, e.g., details about the database schema or the underlying code. This is considered a security risk.The
ExceptionFilter
also catches error within guards. The error format remains unchanged.Switching from the
ExceptionInterceptor
to theExceptionFilter
must be done in the project:// main.ts - app.useGlobalInterceptors(new ExceptionInterceptor(config.debug)); + app.useGlobalFilters(new ExceptionFilter(config.debug));
6.18.3
@comet/[email protected]
Patch Changes
- 3f6a819: Pass
x-preview-dam-urls
header tourl
field resolver inFileImagesResolver
6.18.2
@comet/[email protected]
Patch Changes
-
d16b369: Export
useDamScope
hookThis allows accessing the DAM scope in the application. This might be necessary when developing integrations with a third-party DAM.
6.18.1
@comet/[email protected]
Patch Changes
- e61ebdd: Hide the "Dependents" tab in the DAM for users without the permission
dependencies
6.18.0
@comet/[email protected]
Minor Changes
-
ed126f8: Validate filename length for uploads to DAM or FileUploads
The filename can't exceed 255 characters.
@comet/[email protected]
Minor Changes
-
ed126f8: Validate filename length for uploads to DAM or FileUploads
The filename can't exceed 255 characters.
5.10.0
@comet/[email protected]
Minor Changes
-
453f0c4: Validate filename length for uploads to DAM or FileUploads
The filename can't exceed 255 characters.
@comet/[email protected]
Minor Changes
-
453f0c4: Validate filename length for uploads to DAM or FileUploads
The filename can't exceed 255 characters.
7.11.0
@comet/[email protected]
Minor Changes
-
b8b8e27: Make
GridFilterButton
andGridColumnsButton
responsive by moving their text to a tooltip on mobile- This also makes the button's styles consistent with the standard
Button
component GridFilterButton
now supports props to override the default button props
- This also makes the button's styles consistent with the standard
-
e9f547d: Adjust how tooltips are triggered
This is to achieve a more consistent and user-friendly experience by ensuring tooltips are always shown when the user interacts with the underlying element.
- When using the default
hover
trigger, tooltips will now be shown on bothhover
andfocus
. Previously, you had to choose betweenhover
andfocus
. - The
trigger
prop is deprecated and will be removed in a future major version. The combinedhover
/focus
trigger will be the only supported behavior. - Tooltips on touch devices will be shown immediately when the user starts interacting with the underlying element.
- When using the default
Patch Changes
-
1e01cca: Prevent scrolling of
DialogTitle
andDialogActions
inEditDialog
-
a30f0ee: Fix
border-color
ofInputBase
on default and hover state -
20f6341: Prevent the page content from overflowing the window, causing a horizontal scrollbar
This happened when using elements like
Tabs
that are intended to be horizontally scrollable and could, therefore, be wider than the window. -
8114a6a: Fix
onClick
and other props not being passed to the icon version of some button components
@comet/[email protected]
Minor Changes
-
a4fcdeb: Enable vertical resizing for
TextAreaField
and other multiline inputs -
5ba64aa: Add support and styling for full screen dialogs using the
fullScreen
prop<Dialog open fullScreen> <DialogTitle>Dialog Title</DialogTitle> <DialogContent>Dialog content</DialogContent> </Dialog>
Patch Changes
- 9f2a127: Fix an issue where setting
defaultProps
ofMuiDataGrid
would override thedefaultProps
defined bycreateCometTheme()
- a30f0ee: Fix
border-color
ofInputBase
on default and hover state
@comet/[email protected]
Minor Changes
- 3acbb04: Update design of the user menu in the header and add information about the impersonated user
Patch Changes
- 94cc411: Adapt styling of
ContentScopeSelect
to match the Comet design - 6778c4e: Prevent the creation of a second home page
- 7992a9a: Enable setting
importSourceId
andimportSourceType
for each individual file in theuseDamFileUpload#uploadFiles
function
@comet/[email protected]
Patch Changes
- 58a99bb: Fix input validation for missing child blocks