Skip to content

7.8.0

Compare
Choose a tag to compare
@github-actions github-actions released this 27 Nov 10:21
· 84 commits to main since this release
2ae7216

@comet/[email protected]

Minor Changes

  • 139616b: Add FullHeightContent component

    Used to help components take advantage of all the available content height, e.g., when using a DataGrid inside Tabs already contained in a MainContent 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 with fullHeight should be used, instead of FullHeightContent:

    <MainContent fullHeight>
        <DataGrid />
    </MainContent>
  • d8fca05: Add second InitialFormValues generic to FinalForm

    This allows differentiating between a form's values and initial values.

  • d8298d5: Add the StackMainContent component

    This version of MainContent only adds content spacing and height when it's the last visible StackSwitch.
    Using StackMainContent instead of MainContent prevents unintended or duplicate spacings in cases where multiple MainContent components are used inside nested StackSwitch 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 of MainContent

    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 a DataGrid column's renderCell 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/[email protected]

Minor Changes

  • e78315c: Add ContactPage icon
  • c6d3ac3: Add new icons Backward and Forward

@comet/[email protected]

Minor Changes

  • 059636a: Pass the graphQLApiUrl for useBlockPreviewFetch through the IFrameBridge

    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/[email protected]

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 for useBlockPreviewFetch through the IFrameBridge

    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 used

    Previously, the file uploads module always added the downloadUrl and imageUrl fields to the FileUpload 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 added finalFormFileUploadDownloadableFragment:

    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/[email protected]

Patch Changes

  • f20ec6c: Make class-validator a peer dependency

@comet/[email protected]

Minor Changes

  • 44a5455: Allow replacing a file with a new one on the file detail page in the DAM

  • 45fbc54: Rename User to UserPermissionsUser in GraphQL schema

    This 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 used

    Previously, the file uploads module always added the downloadUrl and imageUrl fields to the FileUpload 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 added finalFormFileUploadDownloadableFragment:

    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/[email protected]

Minor Changes

  • 2352959: Export convertPreviewDataToHeaders to make createGraphQLFetch more configurable

  • 059636a: Pass the graphQLApiUrl for useBlockPreviewFetch through the IFrameBridge

    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

  • e032353: The graphQLFetch helper for block preview uses credentials: "include"

    This is necessary for the block preview when using block loaders because they load the data from the API on the client side.