Skip to content

Releases: vivid-planet/comet

7.13.0

29 Jan 15:33
437293c
Compare
Choose a tag to compare

@comet/[email protected]

Minor Changes

  • bd562d3: Add disableForcePromptRoute option to StackSwitch

    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 or CrudMoreActionsMenuContext 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 and xlink:href (if the value starts with http://, https:// or javascript:)

@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 and xlink:href (if the value starts with http://, https:// or javascript:)

@comet/[email protected]

Minor Changes

  • f60b636: Extend the usePreview-helpers isSelected and isHovered with optional partial match support

    • When exactMatch is set to true (default), the function checks for exact URL matches.
    • When exactMatch is set to false, the function checks if the selected route starts with the given URL.

7.12.0

21 Jan 10:07
2fe1aab
Compare
Choose a tag to compare

@comet/[email protected]

Minor Changes

  • af51bb4: Make the width of GridToolbarQuickFilter responsive when used inside DataGridToolbar

  • 92b3255: Hide group title in CrudMoreActionsMenu when only one group is present

  • e8003f9: Add a new FillSpace component to replace ToolbarFillSpace and AppHeaderFillSpace

    ToolbarFillSpace and AppHeaderFillSpace are now deprecated.

  • 4f6e6b0: Deprecate FinalFormRadio and FinalFormCheckbox

  • 5583c9c: Export renderFinalFormChildren helper

  • 7da81fa: Add a new Button component to replace ToolbarActionButton and MUI's Button

    Compared to MUI's Button component, the color prop has been removed, and the variant 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 the responsive prop on the Button 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 and DataGridToolbar 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 and CardHeader to align with Comet DXP design

Patch Changes

  • 47be4eb: Adapt styling of DialogActions, DialogContent, and DialogTitle 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 or createCompositeBlockSelectField

    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 function

    To 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 using createCompositeBlockSelectField

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 and video/x-m4v from default accepted mimetypes

    None of this mimetypes had an actual impact:

    • video/avi doesn't actually exist
    • image/psd doesn't exist / is non-standard
    • video/x-m4v is a niche format and the mimetype is not widely used (e.g., Google Chrome and MacOS use video/mp4 instead)

    So removing them shouldn't have any noticeable effects.

  • cf1a829: Add image/x-icon to default accepted mimetypes

    Previously, only image/vnd.microsoft.icon was supported. That could lead to problems uploading .ico files, since
    image/vnd.microsoft.icon and image/x-icon are valid mimetypes for this format.

  • 02dd20a: Export useDamScope hook

    This 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 for AppHeader components

    • Update the default icon in ContentScopeSelect from <Domain /> to <Language />
    • Fix mobile styling of BuildEntry and ContentScopeSelect and UserHeaderItem

@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 replace ExceptionInterceptor

    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 the ExceptionFilter 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 to openai

    See https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/migration-javascript for more information.

  • 6b4866a: Pass x-preview-dam-urls and x-relative-dam-urls headers to url field resolver in FileImagesResolver

  • cf1a829: Remove video/avi, image/psd and video/x-m4v from default accepted mimetypes

    None of these mimetypes had an actual impact:

    • video/avi doesn't actually exist
    • image/psd doesn't exist / is non-standard
    • video/x-m4v is a niche format and the mimetype is not widely used (e.g., Google Chrome and MacOS use video/mp4 instead)

    So removing them shouldn't have any noticeable effects.

  • cf1a829: Add image/x-icon to default accepted mimetypes

    Previously, only image/vnd.microsoft.icon was supported. That could lead to problems uploading .ico files, since
    image/vnd.microsoft.icon and image/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

21 Jan 15:44
baed503
Compare
Choose a tag to compare

@comet/[email protected]

Minor Changes

  • 2fd22e7: Add ExceptionFilter to replace ExceptionInterceptor

    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 the ExceptionFilter must be done in the project:

    // main.ts
    
    - app.useGlobalInterceptors(new ExceptionInterceptor(config.debug));
    + app.useGlobalFilters(new ExceptionFilter(config.debug));

5.11.0

21 Jan 15:43
baed503
Compare
Choose a tag to compare

@comet/[email protected]

Minor Changes

  • f0dd6c2: Add ExceptionFilter to replace ExceptionInterceptor

    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 the ExceptionFilter must be done in the project:

    // main.ts
    
    - app.useGlobalInterceptors(new ExceptionInterceptor(config.debug));
    + app.useGlobalFilters(new ExceptionFilter(config.debug));

6.18.3

20 Jan 10:07
47be4eb
Compare
Choose a tag to compare

@comet/[email protected]

Patch Changes

  • 3f6a819: Pass x-preview-dam-urls header to url field resolver in FileImagesResolver

6.18.2

20 Jan 08:26
af350d0
Compare
Choose a tag to compare

@comet/[email protected]

Patch Changes

  • d16b369: Export useDamScope hook

    This allows accessing the DAM scope in the application. This might be necessary when developing integrations with a third-party DAM.

6.18.1

17 Jan 09:23
63b2acd
Compare
Choose a tag to compare

@comet/[email protected]

Patch Changes

  • e61ebdd: Hide the "Dependents" tab in the DAM for users without the permission dependencies

6.18.0

10 Jan 11:43
5583c9c
Compare
Choose a tag to compare

@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

10 Jan 11:37
5583c9c
Compare
Choose a tag to compare

@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

08 Jan 08:20
578437c
Compare
Choose a tag to compare

@comet/[email protected]

Minor Changes

  • b8b8e27: Make GridFilterButton and GridColumnsButton 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
  • 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 both hover and focus. Previously, you had to choose between hover and focus.
    • The trigger prop is deprecated and will be removed in a future major version. The combined hover/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.

Patch Changes

  • 1e01cca: Prevent scrolling of DialogTitle and DialogActions in EditDialog

  • a30f0ee: Fix border-color of InputBase 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 of MuiDataGrid would override the defaultProps defined by createCometTheme()
  • a30f0ee: Fix border-color of InputBase 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 and importSourceType for each individual file in the useDamFileUpload#uploadFiles function

@comet/[email protected]

Patch Changes

  • 58a99bb: Fix input validation for missing child blocks

@comet/[email protected]

Patch Changes

  • fb2297b: Fix notEqual operation for enum filter
  • 6778c4e: Prevent the creation of a second home page