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