Releases: vivid-planet/comet
5.9.2
7.5.0
@comet/admin@7.5.0
Minor Changes
-
bb7c2de: Adapt the
DeleteDialog
inCrudContextMenu
to match the updated Comet CI -
c59a600: Add a
CrudMoreActionsMenu
componentThe component can be used to create a "More actions" menu for a list of items.
It is typically used in a toolbar above a Data Grid.Example
<CrudMoreActionsMenu selectionSize={selectionSize} overallActions={[ { label: "Export to excel", onClick: handleExportToExcelClick, }, ]} selectiveActions={[ { label: "move", onClick: handleMoveClick, icon: <Move />, divider: true, }, { label: "download", onClick: handleDownloadClick, icon: <Download />, }, ]} />
-
4cea3e3: Make it easier to render DataGrid cell content based on the cell's
valueOptions
Objects inside a cell's
valueOptions
now support an optionalcellContent
property to allow defining a React node in addition to thelabel
, which can only be a string.When using the new
renderStaticSelectCell
helper as therenderCell
function in the column definition, the helper will render thecellContent
node of the selected option if defined.
Thelabel
or the string value of the option will be used as the cell's content if nocellContent
node is provided.The following example would behave as follows:
- If the cell's value is "Shirt", it will render the
cellContent
node (the H2 Typography) - If the cell's value is "Cap", it will render the
label
(the string "This Cap") - If the cell's value is anything else, it will render the value as a string, e.g. "Tie"
{ headerName: "Category", field: "category", valueOptions: [ { value: "Shirt", label: "Shirt" cellContent: ( <Typography variant="h2"> A Shirt </Typography> ), }, { value: "Cap", label: "This Cap", }, "Tie", ], renderCell: renderStaticSelectCell, }
- If the cell's value is "Shirt", it will render the
-
216d93a: File Uploads: Add image endpoint
Add support for viewing images in the browser.
This can be useful for file upload previews, profile pictures etc.
The image URL can be obtained by querying theimageUrl
field of theFileUpload
type.
AresizeWidth
argument needs to be provided.Example
query Product($id: ID!) { product(id: $id) { id updatedAt priceList { id imageUrl(resizeWidth: 640) } } }
Patch Changes
- 9a6a64e: Fix a bug where the initial values of
RadioGroupField
andCheckboxListField
would not be shown in the input - b583820: Fix an issue where the clear button of
SelectField
would be shown, even if the value isundefined
- c8f37fb: Allow setting all props of
FinalFormSelect
viacomponentsProps
inSelectField
@comet/cms-admin@7.5.0
Minor Changes
-
5a48ae4: Add file size to
DamFileDownloadLinkBlock
-
2639fe5: Add "License" column to DAM Data Grid
It is only shown if the license feature is enabled by setting
enableLicenseFeature
inDamConfigProvider
totrue
. -
216d93a: File Uploads: Add image endpoint
Add support for viewing images in the browser.
This can be useful for file upload previews, profile pictures etc.
The image URL can be obtained by querying theimageUrl
field of theFileUpload
type.
AresizeWidth
argument needs to be provided.Example
query Product($id: ID!) { product(id: $id) { id updatedAt priceList { id imageUrl(resizeWidth: 640) } } }
@comet/cms-api@7.5.0
Minor Changes
-
f2da11d: API Generator: Add support for position field
Add a field named
position
to enable this feature. This field will hold and update the position. This should be an integer number field >= 1. It's also possible to define fields (in CrudGenerator-Decorator) to group position by. -
5a48ae4: Add file size to
DamFileDownloadLinkBlock
-
216d93a: File Uploads: Add image endpoint
Add support for viewing images in the browser.
This can be useful for file upload previews, profile pictures etc.
The image URL can be obtained by querying theimageUrl
field of theFileUpload
type.
AresizeWidth
argument needs to be provided.Example
query Product($id: ID!) { product(id: $id) { id updatedAt priceList { id imageUrl(resizeWidth: 640) } } }
@comet/cli@7.5.0
Patch Changes
- bc0570f: Fix setting prelogin domain for deployment with site-configs
6.17.9
7.4.2
@comet/cms-site@7.4.2
Patch Changes
-
d95b0cb: Fix Next peer dependency
The peer dependency was incorrectly set to
14
.
We require14.2.0
or later due to relying on optimizePackageImports.
7.4.1
6.17.8
7.4.0
@comet/admin@7.4.0
Minor Changes
-
22863c2: Add an
options
prop toSelectField
as an alternative tochildren
Note: the behavior of the
options
prop differs fromFinalFormSelect
and is only intended to work with static options.
Use the existingAsyncSelectField
for dynamic options.- Each option must have the
value
andlabel
properties. A custom structure is not supported. - There are no
getOptionLabel
andgetOptionValue
props. Thelabel
andvalue
properties are used directly. - The value stored in the form state is the
value
property, not the whole option object.
const options: SelectFieldOption[] = [ { value: "chocolate", label: "Chocolate" }, { value: "strawberry", label: "Strawberry" }, { value: "raspberry", label: "Raspberry", disabled: true }, ]; // ... <SelectField name="flavor" label="Select a flavor" options={options} fullWidth />;
- Each option must have the
-
cab7c42: Add support for downloading previously uploaded files to
FileUploadField
-
1ca46e8: Add support for
badgeContent
prop inMenuItemRouterLink
Example usage in
masterMenuData
:const masterMenuData = [ // ... { type: "route", primary: "Some Route", to: "/someRoute", badgeContent: 2, }, // ... ];
Example usage as element:
<MenuItemRouterLink primary="Some Route" to="/someRoute" badgeContent={2} />
-
1ca46e8: Extend
MenuItemAnchorLink
to define a correctly styledLinkExternal
icon if nosecondaryAction
is passed -
bef162a: Add possibility for uncontrolled (promise-based) behavior to
FeedbackButton
Previously the
FeedbackButton
was controlled by the propsloading
andhasErrors
. To enable more use cases and easier usage, a promise-based way was added. If neither of the mentioned props are passed, the component uses the promise returned byonClick
to evaluate the idle, loading and error state. -
3e013b0: Add the ability to disable individual
CheckboxListField
andRadioGroupField
optionsconst options = [ { label: "Selectable", value: "selectable", }, { label: "Disabled", value: "disabled", disabled: true, }, ]; const FormFields = () => ( <> <CheckboxListField label="Checkbox List" name="checkboxList" options={options} /> <RadioGroupField label="Radio Group" name="radioGroup" fullWdth options={options} /> </> );
Patch Changes
-
48d1403: Fix
FieldContainer
layout on first renderPreviously,
FieldContainer
displayed vertically on desktop instead of horizontally due to the container width not being available during the first render (becauseref.current
was null).
The layout corrected itself after interacting with the field, triggering a rerender.Now, the rerender is triggered automatically when
ref.current
is set resulting in the correct layout from the start. -
bc1ed88: FinalFormSelect: Fix value
0
andfalse
not being clearable
@comet/cms-admin@7.4.0
Minor Changes
-
aad4eef: Use a
Chip
in combination with aMenu
for the page visibility selectionThis replaces a
Button
which was used previously as trigger for the menu. -
44f1c59: Add dialog to confirm manually starting a cron job
-
cab7c42: Add support for downloading previously uploaded files to
FileUploadField
-
1ca46e8: Add support for
badgeContent
prop inMenuItemRouterLink
Example usage in
masterMenuData
:const masterMenuData = [ // ... { type: "route", primary: "Some Route", to: "/someRoute", badgeContent: 2, }, // ... ];
Example usage as element:
<MenuItemRouterLink primary="Some Route" to="/someRoute" badgeContent={2} />
-
bfb8f04: Add
VimeoVideoBlock
to support Vimeo videos -
5fc1fc3: Add info alert for dependents and duplicates in DAM
@comet/cms-api@7.4.0
Minor Changes
-
f1d9e44: Support filtering for document types in the
paginatedPageTreeNodes
queryExample
query PredefinedPages($scope: PageTreeNodeScopeInput!) { paginatedPageTreeNodes(scope: $scope, documentType: "PredefinedPage") { nodes { id } } }
-
cab7c42: Add support for downloading previously uploaded files to
FileUploadField
-
bfb8f04: Add
VimeoVideoBlock
to support Vimeo videos -
a970190: File Uploads: Add download endpoint
The endpoint can be enabled by providing the
download
option in the module config:FileUploadsModule.register({ /* ... */, download: { secret: "your secret", }, })
@comet/cms-site@7.4.0
Minor Changes
-
bfb8f04: Add
VimeoVideoBlock
to support Vimeo videos -
b132010: Add helper functions and components to prevent loading third-party cookies until explicit user consent
See the docs for information on usage and configuration: https://docs.comet-dxp.com/docs/working-with-cookies/
-
53d896b: Add optional
icon
prop toVideoPreviewImage
to enable setting a custom play icon
@comet/blocks-admin@7.4.0
Patch Changes
-
46f9322: Fix the top position of the rich text editor toolbar
Previously, the rich text editor's toolbar would be moved too far down when used inside
AdminComponentRoot
, but not as a direct child.
@comet/cli@7.4.0
Patch Changes
-
a101ed6: inject-site-configs: Add sane defaults for preloginEnabled
When
preloginEnabled
isundefined
ornull
set it totrue
on environments !=prod
orlocal
.