7.8.0
@comet/[email protected]
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/[email protected]
Minor Changes
@comet/[email protected]
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/[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
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/[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
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/[email protected]
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) { 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 usescredentials: "include"
This is necessary for the block preview when using block loaders because they load the data from the API on the client side.