Releases: vivid-planet/comet
6.18.0
5.10.0
7.11.0
@comet/admin@7.11.0
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/admin-theme@7.11.0
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/cms-admin@7.11.0
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/blocks-api@7.11.0
Patch Changes
- 58a99bb: Fix input validation for missing child blocks
@comet/cms-api@7.11.0
Patch Changes
6.17.17
5.9.6
7.10.0
@comet/admin@7.10.0
Minor Changes
-
8f924d5: Add new custom
Dialog
The component extends the MUI
Dialog
component to enable common use cases:- The
title
prop can be used to set the dialog title - A close button is shown when the
onClose
is used
Example
<Dialog title="Dialog Title" onClose={() => { // Handle dialog closing here }} />
- The
-
6eba5ab: Add a
forceVerticalContainerSize
prop toFieldContainer
Use it to define below which container size the
vertical
styling is applied when using thehorizontal
variant. -
589b0b9: Enhance
FieldContainer
withsecondaryHelperText
prop andhelperTextIcon
prophelperTextIcon
displays an icon alongside the text forhelperText
,error
orwarning
.secondaryHelperText
provides an additional helper text positioned beneath the input field, aligned to the bottom-right corner.
Example:
<FieldContainer label="Helper Text Icon" helperTextIcon={<Info />} helperText="Helper Text with icon" secondaryHelperText="0/100"> <InputBase onChange={handleChange} value={value} placeholder="Placeholder" /> </FieldContainer>
Patch Changes
- aa02ca1: Fix a bug in
useDataGridExcelExport
that would cause an Excel export to fail when a cell's value wasundefined
- 6eba5ab: Prevent unintended layout shift after the initial render of
FieldContainer
when using thehorizontal
variant - bf6b03f: Fix alignment of
Alert
icon with the title
@comet/admin-theme@7.10.0
Minor Changes
-
7e94c55: Rework
GridFilterPanel
to match the updated Comet CI -
22f3d40: Adapt
Chip
styling to align with Comet DXP design- Fix hover styling
- Add new styling for
<Chip variant="filled" color="info">
-
589b0b9: Enhance
FieldContainer
withsecondaryHelperText
prop andhelperTextIcon
prophelperTextIcon
displays an icon alongside the text forhelperText
,error
orwarning
.secondaryHelperText
provides an additional helper text positioned beneath the input field, aligned to the bottom-right corner.
Example:
<FieldContainer label="Helper Text Icon" helperTextIcon={<Info />} helperText="Helper Text with icon" secondaryHelperText="0/100"> <InputBase onChange={handleChange} value={value} placeholder="Placeholder" /> </FieldContainer>
Patch Changes
-
b51bf6d: Adapt
Radio
andCheckbox
styling to Comet DXP designFix colors of disabled states.
-
71876ea: Adapt size of arrow in
Select
andAutocomplete
fields according to Comet DXP design
@comet/cms-admin@7.10.0
Minor Changes
-
2b9fac2: Add support for passing title and alt text to
useDamFileUpload
This can be useful when importing files from an external DAM.
Patch Changes
- d210ef7: Remove vertical and horizontal scroll bars from block preview iframe
@comet/cms-api@7.10.0
Patch Changes
- 7b2adae: API Generator: Don't generate an update input for the single generator
7.9.0
@comet/admin@7.9.0
Minor Changes
-
6d6131b: Add the
dataGridDateColumn
anddataGridDateTimeColumn
helpers for using the "date" and "dateTime" types in Data Grid-import { GridColDef } from "@comet/admin"; +import { GridColDef, dataGridDateColumn, dataGridDateTimeColumn } from "@comet/admin"; // ... const columns: GridColDef[] = [ { - type: "date", - valueGetter: ({ value }) => value && new Date(value), - renderCell: ({ value }) => value && <FormattedDate value={value} dateStyle="medium" />, + ...dataGridDateColumn, field: "createdAt", headerName: "Created At", }, { - type: "dateTime", - valueGetter: ({ value }) => value && new Date(value), - renderCell: ({ value }) => value && <FormattedDate value={value} dateStyle="medium" timeStyle="short" />, + ...dataGridDateTimeColumn, field: "updatedAt", headerName: "Updated At", }, ];
-
7cea765: Add UI for Impersonation Feature
- Add indicator to display when impersonation mode is active in
UserHeaderItem
- Add button to allow users to switch on impersonation in the
UserGrid
- Integrate
CrudMoreActionsMenu
inUserPageToolbar
with an impersonation entry for easy access to this feature. - Add
ImpersonateUser
icon
- Add indicator to display when impersonation mode is active in
Patch Changes
-
48cac4d: Fix styling issues of inputs like
FinalFormInput
,FinalFormNumberInput
,FinalFormSelect
,TextAreaField
- Change background-color, border-color and color of the label for different states (
default
,disabled
andfocused
). - For required inputs, fix spacing between the label and asterisk.
- Fix font-weight and margin of
helperText
.
- Change background-color, border-color and color of the label for different states (
-
0919e3b: Remove right padding from form fields without an end adornment
@comet/admin-color-picker@7.9.0
Patch Changes
- 1d73f3f: Add missing spacing to the clear-color button of
ColorPicker
@comet/admin-icons@7.9.0
Minor Changes
-
7cea765: Add UI for Impersonation Feature
- Add indicator to display when impersonation mode is active in
UserHeaderItem
- Add button to allow users to switch on impersonation in the
UserGrid
- Integrate
CrudMoreActionsMenu
inUserPageToolbar
with an impersonation entry for easy access to this feature. - Add
ImpersonateUser
icon
- Add indicator to display when impersonation mode is active in
Patch Changes
- 55d40ef: Add icon for indeterminate checkbox
@comet/admin-theme@7.9.0
Minor Changes
- 9aa6947: Add hover styling for MUI's
Switch
Patch Changes
-
48cac4d: Fix styling issues of inputs like
FinalFormInput
,FinalFormNumberInput
,FinalFormSelect
,TextAreaField
- Change background-color, border-color and color of the label for different states (
default
,disabled
andfocused
). - For required inputs, fix spacing between the label and asterisk.
- Fix font-weight and margin of
helperText
.
- Change background-color, border-color and color of the label for different states (
-
55d40ef: Add icon for indeterminate checkbox
@comet/blocks-admin@7.9.0
Minor Changes
-
92f9d07: Add
hiddenForState
option tocreateCompositeBlock
This function can be used to hide a block in the
AdminComponent
for a given state.Example
const TextWithMediaVariantBlock = createCompositeBlock({ name: "TextWithMediaVariant", blocks: { variant: { block: createCompositeBlockSelectField<string>({ defaultValue: "text-image", fieldProps: { label: "Variant", fullWidth: true }, options: [ { value: "text-image", label: "Text Image" }, { value: "text-only", label: "Text Only" }, ], }), }, text: { block: RichTextBlock, }, media: { block: MediaBlock, // The media block isn't needed for the "text-only" variant hiddenForState: (state) => state.variant === "text-only", }, }, });
-
047b9d1: Add
label
prop toColumnsLayoutPreview
Use it to customize the label of the column displayed in the
FinalFormLayoutSelect
.
For instance, to add an icon or add custom text:<ColumnsLayoutPreviewContent width={10} label={<Image />} />
-
59b4b6f: Add
visibleOrderedBlocksForState
option tocreateCompositeBlock
The option can be used to hide and order child blocks in the
AdminComponent
.
It should return an array of visible block keys for a given state.
The order of the keys define the order in which the blocks will be rendered.
If key is not present in the array, the block will not be rendered.Example
const LayoutBlock = createCompositeBlock({ /* ... */ blocks: { layout: { /* A layout select */ }, headline1: { block: HeadlineBlock }, image1: { block: DamImageBlock }, headline2: { block: HeadlineBlock }, image2: { block: DamImageBlock }, }, visibleOrderedBlocksForState: (state: LayoutBlockData) => { if (state.layout === "compact") { // headline2 and image2 will be hidden return ["headline1", "image1"]; } else { return ["headline1", "image1", "headline2", "image2"]; } }, });
@comet/cms-admin@7.9.0
Minor Changes
-
7cea765: Add UI for Impersonation Feature
- Add indicator to display when impersonation mode is active in
UserHeaderItem
- Add button to allow users to switch on impersonation in the
UserGrid
- Integrate
CrudMoreActionsMenu
inUserPageToolbar
with an impersonation entry for easy access to this feature. - Add
ImpersonateUser
icon
- Add indicator to display when impersonation mode is active in
Patch Changes
7.8.0
@comet/admin@7.8.0
Minor Changes
-
139616b: Add
FullHeightContent
componentUsed to help components take advantage of all the available content height, e.g., when using a
DataGrid
insideTabs
already contained in aMainContent
component.Usage example for
FullHeightContent
:<MainContent> <RouterTabs> <RouterTab label="DataGrid Example" path=""> <FullHeightContent> <DataGrid /> </FullHeightContent> </RouterTab> <RouterTab label="Another tab" path="/another-tab"> Content of another tab </RouterTab> </RouterTabs> </MainContent>
Example where
MainContent
withfullHeight
should be used, instead ofFullHeightContent
:<MainContent fullHeight> <DataGrid /> </MainContent>
-
d8fca05: Add second
InitialFormValues
generic toFinalForm
This allows differentiating between a form's values and initial values.
-
d8298d5: Add the
StackMainContent
componentThis version of
MainContent
only adds content spacing and height when it's the last visibleStackSwitch
.
UsingStackMainContent
instead ofMainContent
prevents unintended or duplicate spacings in cases where multipleMainContent
components are used inside nestedStackSwitch
components.
Patch Changes
-
a168e55: Open collapsible menu item on refresh if its child or sub-child is selected
-
e16ad1a: Fix a bug that prevented dynamically rendered tabs in
Tabs
-
139616b: Fix the
fullHeight
behavior ofMainContent
When used inside certain elements, e.g. with
position: relative
, the height would be calculated incorrectly. -
eefb054: Render empty values correctly when using
renderStaticSelectCell
as aDataGrid
column'srenderCell
function -
795ec73: Fix the spacing between the text and chip in
CrudMoreActionsMenu
-
8617c3b: Fix URL prefix in
SubRouteIndexRoute
-
daacf1e: Fix a bug in
ToolbarBreadcrumbs
where it was possible to open the mobile breadcrumbs menu when there were no items to be shown in the menu -
9cc75c1: Prevent the width of the mobile breadcrumbs menu of
ToolbarBreadcrumbs
from being far too small
@comet/admin-icons@7.8.0
Minor Changes
@comet/blocks-admin@7.8.0
Minor Changes
-
059636a: Pass the
graphQLApiUrl
foruseBlockPreviewFetch
through theIFrameBridge
It's not necessary to set it in the site anymore. To migrate, remove the argument from
useBlockPreviewFetch()
:const PreviewPage = () => { const iFrameBridge = useIFrameBridge(); - const { fetch, graphQLFetch } = useBlockPreviewFetch(graphQLApiUrl); + const { fetch, graphQLFetch } = useBlockPreviewFetch(); const [blockData, setBlockData] = useState<PageContentBlockData>(); useEffect(() => { async function load() { + if (!graphQLFetch) { + return; + } if (!iFrameBridge.block) { setBlockData(undefined); return; } const newData = await recursivelyLoadBlockData({ blockType: "PageContent", blockData: iFrameBridge.block, graphQLFetch, fetch, pageTreeNodeId: undefined, //we don't have a pageTreeNodeId in preview }); setBlockData(newData); } load(); }, [iFrameBridge.block, fetch, graphQLFetch]); return <div>{blockData && <PageContentBlock data={blockData} />}</div>; };
Patch Changes
- 4338a6c: Make the space select required in the form when using
createSpaceBlock()
@comet/cms-admin@7.8.0
Minor Changes
-
44a5455: Allow replacing a file with a new one on the file detail page in the DAM
-
b721ac0: Harmonize the size and alignment of the DAM filters
-
c6d3ac3: Add support for file replacement on upload in the DAM
When uploading a file to the DAM with the same filename as an existing file, it's now possible to replace the existing file.
This is useful when you want to update a file without changing its URL. -
4037b4d: Rework the DAM crop/focus settings UI
-
059636a: Pass the
graphQLApiUrl
foruseBlockPreviewFetch
through theIFrameBridge
It's not necessary to set it in the site anymore. To migrate, remove the argument from
useBlockPreviewFetch()
:const PreviewPage = () => { const iFrameBridge = useIFrameBridge(); - const { fetch, graphQLFetch } = useBlockPreviewFetch(graphQLApiUrl); + const { fetch, graphQLFetch } = useBlockPreviewFetch(); const [blockData, setBlockData] = useState<PageContentBlockData>(); useEffect(() => { async function load() { + if (!graphQLFetch) { + return; + } if (!iFrameBridge.block) { setBlockData(undefined); return; } const newData = await recursivelyLoadBlockData({ blockType: "PageContent", blockData: iFrameBridge.block, graphQLFetch, fetch, pageTreeNodeId: undefined, //we don't have a pageTreeNodeId in preview }); setBlockData(newData); } load(); }, [iFrameBridge.block, fetch, graphQLFetch]); return <div>{blockData && <PageContentBlock data={blockData} />}</div>; };
Patch Changes
-
bfa5dba: Fix schema generation if
FileUpload
object type isn't usedPreviously, the file uploads module always added the
downloadUrl
andimageUrl
fields to theFileUpload
object type, even if the type wasn't used in the application.
This lead to errors when generating the GraphQL schema.Now, the fields are only added if the
download
option of the module is used.Note: As a consequence, the
finalFormFileUploadFragment
doesn't include the fields anymore.
To enable downloading file uploads in forms, use the newly addedfinalFormFileUploadDownloadableFragment
:export const productFormFragment = gql` fragment ProductFormFragment on Product { priceList { - ...FinalFormFileUpload + ...FinalFormFileUploadDownloadable } } - ${finalFormFileUploadFragment} + ${finalFormFileUploadDownloadableFragment} `;
-
62ead06: Master Menu: render collapsible or grouped menu items only when at least one item of the submenu is allowed.
@comet/blocks-api@7.8.0
Patch Changes
- f20ec6c: Make class-validator a peer dependency
@comet/cms-api@7.8.0
Minor Changes
-
44a5455: Allow replacing a file with a new one on the file detail page in the DAM
-
45fbc54: Rename
User
toUserPermissionsUser
in GraphQL schemaThis prevents naming collisions if a web wants to use a
User
type.Additionally prefix remaining user permissions-specific actions with
UserPermissions
. -
c6d3ac3: Add support for file replacement on upload in the DAM
When uploading a file to the DAM with the same filename as an existing file, it's now possible to replace the existing file.
This is useful when you want to update a file without changing its URL.
Patch Changes
-
bfa5dba: Fix schema generation if
FileUpload
object type isn't usedPreviously, the file uploads module always added the
downloadUrl
andimageUrl
fields to theFileUpload
object type, even if the type wasn't used in the application.
This lead to errors when generating the GraphQL schema.Now, the fields are only added if the
download
option of the module is used.Note: As a consequence, the
finalFormFileUploadFragment
doesn't include the fields anymore.
To enable downloading file uploads in forms, use the newly addedfinalFormFileUploadDownloadableFragment
:export const productFormFragment = gql` fragment ProductFormFragment on Product { priceList { - ...FinalFormFileUpload + ...FinalFormFileUploadDownloadable } } - ${finalFormFileUploadFragment} + ${finalFormFileUploadDownloadableFragment} `;
-
02a5bdc: API Generator: Fix generated types for position code
-
f20ec6c: Make class-validator a peer dependency
@comet/cms-site@7.8.0
Minor Changes
-
2352959: Export
convertPreviewDataToHeaders
to makecreateGraphQLFetch
more configurable -
059636a: Pass the
graphQLApiUrl
foruseBlockPreviewFetch
through theIFrameBridge
It's not necessary to set it in the site anymore. To migrate, remove the argument from
useBlockPreviewFetch()
:const PreviewPage = () => { const iFrameBridge = useIFrameBridge(); - const { fetch, graphQLFetch } = useBlockPreviewFetch(graphQLApiUrl); + const { fetch, graphQLFetch } = useBlockPreviewFetch(); const [blockData, setBlockData] = useState<PageContentBlockData>(); useEffect(() => { async function load() { + if (!graphQLFetch) { + return; + } if (!iFrameBridge.block) { ...