Skip to content

Releases: vivid-planet/comet

4.7.2

22 Feb 13:28
04afb3e
Compare
Choose a tag to compare

@comet/cms-api@4.7.2

Patch Changes

  • b201d49: Fix attached document deletion when deleting a page tree node

6.1.0

20 Feb 23:56
d82e5fb
Compare
Choose a tag to compare

@comet/admin@6.1.0

Minor Changes

  • b35bb8d: Add basis for content translation

    Wrap a component with a ContentTranslationServiceProvider to add support for content translation to all underlying FinalFormInput inputs.

    <ContentTranslationServiceProvider
        enabled={true}
        translate={async function (text: string): Promise<string> {
            return yourTranslationFnc(text);
        }}
    >
        ...
    </ContentTranslationServiceProvider>

    You can disable translation for a specific FinalFormInput by using the disableContentTranslation prop.

    <Field
        required
        fullWidth
        name="myField"
        component={FinalFormInput}
        label={<FormattedMessage id="myField" defaultMessage="My Field" />}
    +   disableContentTranslation
    />
  • 8eb1375: Add SaveBoundary and SaveBoundarySaveButton that helps implementing multiple forms with a centralized save button

    Render a Savable Component anywhere below a SaveBoundary. For FinalForm this doesn't have to be done manually.

  • a4fac91: Rework Alert component

    • Use theme wherever possible
    • Move styles where they're more fitting
    • Fix some paddings

Patch Changes

  • dcfa03c: Fix a crash when using the Alert component inside a MUI Snackbar

@comet/admin-rte@6.1.0

Minor Changes

  • f1fc9e2: Add support for content translation

@comet/admin-theme@6.1.0

Minor Changes

  • a4fac91: Rework Alert component

    • Use theme wherever possible
    • Move styles where they're more fitting
    • Fix some paddings

@comet/cms-api@6.1.0

Minor Changes

  • 7ea43eb: Make the UserService option of the UserPermissionsModule optional.

    The service is still necessary though for the administration panel.

  • 86cd5c6: Allow a callback for the availableContentScopes option of the UserPermissionsModule

    Please be aware that when using this possibility to make sure to cache the
    response properly as this is called for every request to the API.

  • 737ab3b: Allow returning multiple content scopes in @ScopedEntity() decorator

  • f416510: Remove CurrentUserLoader and CurrentUserInterface

    Overriding the current user in the application isn't supported anymore when using the new UserPermissionsModule, which provides the current user DTO itself.

Patch Changes

  • ef84331: Fix type of @RequiredPermission() to accept a non-array string for a single permission
  • 8e158f8: Add missing @RequiredPermission() decorator to FileLicensesResolver
  • 5018441: API Generator: Add missing scope argument and filter to <entity>BySlug query
  • 1f6c58e: API Generator: support GraphQLJSONObject input for fields that are not an InputType class
  • b437f75: API Generator: Disable input generation if create and update are set to false in the decorator

@comet/admin-icons@6.1.0

Patch Changes

  • 08e0da0: Fix icons inside tooltips by forwarding the ref

@comet/cms-admin@6.1.0

Patch Changes

  • 7ea5f61: Use useCurrentUser hook where possible

  • 693cbdb: Add loading state for edit StackPage in PagesPage

    Prevents flash of "Document not found" error message when reloading the page editor

5.6.1

20 Feb 20:08
45295a5
Compare
Choose a tag to compare

@comet/cms-admin@5.6.1

Patch Changes

  • f79080b: Add loading state for edit StackPage in PagesPage

    Prevents flash of "Document not found" error message when reloading the page editor

6.0.0

30 Jan 14:19
dbfc979
Compare
Choose a tag to compare

@comet/admin@6.0.0

Major Changes

  • 298b63b: FinalForm: Remove default onAfterSubmit implementation

    In most cases the default implementation is not wanted anymore. When upgrading, an empty
    function override of onAfterSubmit can be removed as it is no longer necessary.

    To get back the old behavior use the following in application code:

    const stackApi = React.useContext(StackApiContext);
    const editDialog = React.useContext(EditDialogApiContext);
    
    // ...
    
    <FinalForm
        onAfterSubmit={() => {
            stackApi?.goBack();
            editDialog?.closeDialog({ delay: true });
        }}
    >
  • 0d76854: FinalForm: Don't handle sync submit differently than async submit

  • 6277912: FinalFormContext: Change the signatures of shouldScrollToField, shouldShowFieldError and shouldShowFieldWarning in FinalFormContext to match the corresponding methods in Field

    The API in FinalFormContext was changed from

    // ❌
    export interface FinalFormContext {
        shouldScrollToField: ({ fieldMeta }: { fieldMeta: FieldMetaState<any> }) => boolean;
        shouldShowFieldError: ({ fieldMeta }: { fieldMeta: FieldMetaState<any> }) => boolean;
        shouldShowFieldWarning: ({ fieldMeta }: { fieldMeta: FieldMetaState<any> }) => boolean;
    }

    to

    // ✅
    export interface FinalFormContext {
        shouldScrollToField: (fieldMeta: FieldMetaState<any>) => boolean;
        shouldShowFieldError: (fieldMeta: FieldMetaState<any>) => boolean;
        shouldShowFieldWarning: (fieldMeta: FieldMetaState<any>) => boolean;
    }

    Now the corresponding methods in Field and FinalFormContext have the same signature.

Minor Changes

  • 921f637: Add helperText prop to Field and FieldContainer to provide additional information

@comet/admin-icons@6.0.0

Major Changes

  • a525766: Remove deprecated icons Betrieb, LogischeFilter, Pool, Pool2, StateGreen, StateGreenRing, StateOrange, StateOrangeRing, StateRed, StateRedRing, Vignette1 and Vignette2.

Patch Changes

@comet/cms-admin@6.0.0

Major Changes

  • d20f59c: Enhance CronJob module

    • Show latest job run on CronJobsPage
    • Add option to manually trigger cron jobs to CronJobsPage
    • Add subpage to CronJobsPage that shows all job runs

    Warning: Only include this module if all your users should be able to trigger cron jobs manually or you have sufficient access control in place.

    Includes the following breaking changes:

    • Rename JobStatus to KubernetesJobStatus to avoid naming conflicts
    • Rename BuildRuntime to JobRuntime
  • d86d5a9: Make sites config generic

    The sites config was previously assumed to be Record<string, SiteConfig>.
    However, as the sites config is solely used in application code, it could be of any shape.
    Therefore, the SitesConfigProvider and useSitesConfig are made generic.
    The following changes have to be made in the application:

    1. Define the type of your sites config

      Preferably this should be done in config.ts:

      export function createConfig() {
          // ...
      
          return {
              ...cometConfig,
              apiUrl: environmentVariables.API_URL,
              adminUrl: environmentVariables.ADMIN_URL,
      +       sitesConfig: JSON.parse(environmentVariables.SITES_CONFIG) as SitesConfig,
          };
      }
      
      + export type SitesConfig = Record<string, SiteConfig>;
    2. Use the type when using useSitesConfig

      - const sitesConfig = useSitesConfig();
      + const sitesConfig = useSitesConfig<SitesConfig>();
    3. Optional: Remove type annotation from ContentScopeProvider#resolveSiteConfigForScope (as it's now inferred)

      - resolveSiteConfigForScope: (configs: Record<string, SiteConfig>, scope: ContentScope) => configs[scope.domain],
      + resolveSiteConfigForScope: (configs, scope: ContentScope) => configs[scope.domain],

Minor Changes

  • 0f814c5: Add MasterMenu and MasterMenuRoutes components which both take a single data structure to define menu and routes.

@comet/cms-api@6.0.0

Major Changes

  • d20f59c: Enhance CronJob module

    • Show latest job run on CronJobsPage
    • Add option to manually trigger cron jobs to CronJobsPage
    • Add subpage to CronJobsPage that shows all job runs

    Warning: Only include this module if all your users should be able to trigger cron jobs manually or you have sufficient access control in place.

    Includes the following breaking changes:

    • Rename JobStatus to KubernetesJobStatus to avoid naming conflicts
    • Rename BuildRuntime to JobRuntime
  • b3ceaef: Replace ContentScopeModule with UserPermissionsModule

    Breaking changes:

    • ContentScopeModule has been removed
    • canAccessScope has been moved to AccessControlService and refactored into isAllowed
    • contentScopes and permissions fields have been added to CurrentUser object
    • role and rights fields has been removed from CurrentUser object
    • AllowForRole decorator has been removed
    • Rename SubjectEntity decorator to AffectedEntity
    • Add RequiredPermission decorator and make it mandatory when using UserPermissionsModule

@comet/eslint-config@6.0.0

Major Changes

  • 72f98c7: Enable import/newline-after-import rule by default
  • 47eb81c: Enable no-other-module-relative-import rule by default

@comet/admin-rte@6.0.0

Patch Changes

  • 803f504: Retain headings 4 - 6, blockquote and strikethrough formatting when copying from one RTE to another

5.6.0

23 Jan 21:51
c4a3fa9
Compare
Choose a tag to compare

@comet/admin-theme@5.6.0

Minor Changes

  • fb6c806: Change DataGrid's noRowsLabel from "No rows" to "No results found."

@comet/blocks-admin@5.6.0

Patch Changes

  • 76f85ab: Fix linking from block preview to block admin for non-trivial composite/list block combinations

@comet/cms-admin@5.6.0

Minor Changes

  • fe26a6e: Show an error message when trying to edit a non-existing document and when trying to edit an archived document
  • 3ee4ce0: Return newly uploaded items from useDamFileUpload#uploadFiles

@comet/blocks-api@5.6.0

Minor Changes

  • fd10b80: Add support for a custom block name and migrations to createRichTextBlock

5.5.0

17 Jan 08:31
32414d6
Compare
Choose a tag to compare

@comet/cms-admin@5.5.0

Patch Changes

  • 1b37b1f: Show additionalToolbarItems in ChooseFileDialog

    The additionalToolbarItems were only shown inside the DamPage, but not in the ChooseFileDialog.
    To fix this, use the additionalToolbarItems option in DamConfigProvider.
    The additionalToolbarItems prop of DamPage has been deprecated in favor of this option.

    Previously:

    <DamPage
        // ...
        additionalToolbarItems={<ImportFromExternalDam />}
    />

    Now:

    <DamConfigProvider
        value={{
            // ...
            additionalToolbarItems: <ImportFromExternalDam />,
        }}
    >
        {/*...*/}
    </DamConfigProvider>
  • 85aa962: Set unhandled dependencies to undefined when copying documents to another scope

    This prevents leaks between scopes. In practice, this mostly concerns links to documents that don't exist in the target scope.

    Example:

    • Page A links to Page B
    • Page A is copied from Scope A to Scope B
    • Link to Page B is removed from Page A by replacing the id with undefined (since Page B doesn't exist in Scope B)

    Note: The link is only retained if both pages are copied in the same operation.

  • c4639be: Clip crop values when cropping an image in the DAM or PixelImageBlock

    Previously, negative values could occur, causing the image proxy to fail on delivery.

@comet/cms-api@5.5.0

Minor Changes

  • bb2c76d: Deprecate FileUploadInterface interface

    Use FileUploadInput instead.

  • bb2c76d: Deprecate download helper

    The helper is primarily used to create a FileUploadInput (previously FileUploadInterface) input for FilesService#upload while creating fixtures.
    However, the name of the helper is too generic to be part of the package's public API.
    Instead, use the newly added FileUploadService#createFileUploadInputFromUrl.

    Example:

    @Injectable()
    class ImageFixtureService {
        constructor(private readonly filesService: FilesService, private readonly fileUploadService: FileUploadService) {}
    
        async generateImage(url: string): Promise<FileInterface> {
            const upload = await this.fileUploadService.createFileUploadInputFromUrl(url);
            return this.filesService.upload(upload, {});
        }
    }

@comet/eslint-config@5.5.0

Patch Changes

  • 80a6d8d: Move import restriction for MUI's Alert to correct ESLint config

4.7.1

17 Jan 10:11
32414d6
Compare
Choose a tag to compare

@comet/admin@4.7.1

Patch Changes

  • 56b33ff: Fix submit implementation for DirtyHandler in FinalForm

    The submit mutation wasn't correctly awaited if a FinalForm using an asynchronous validation was saved via the saveAction provided in the RouterPrompt.

    In practice, this affected FinalForms within an EditDialog. The EditDialog closed before the submission was completed. All changes were omitted. The result of the submission (fail or success) was never shown.

@comet/cms-admin@4.7.1

Patch Changes

  • 3275154: Prevent false positive save conflicts while editing documents (e.g. Page):

    • Stop checking for conflicts while saving is in progress
    • Ensure that all "CheckForChanges" polls are cleared
  • 56b33ff: Improved the EditPageNode dialog ("Page Properties" dialog):

    • Execute the asynchronous slug validation less often (increased the debounce wait time from 200ms to 500ms)
    • Cache the slug validation results. Evict the cache on the initial render of the dialog

5.4.0

09 Jan 11:17
5208f16
Compare
Choose a tag to compare

@comet/admin@5.4.0

Minor Changes

  • 60a1839: Add Alert component

    Example:

    import { Alert, OkayButton, SaveButton } from "@comet/admin";
    
    <Alert
        severity="warning"
        title="Title"
        action={
            <Button variant="text" startIcon={<ArrowRight />}>
                Action Text
            </Button>
        }
    >
        Notification Text
    </Alert>;

Patch Changes

  • ba80016: Allow passing a mix of elements and arrays to Tabs and RouterTabs as children

    For example:

    <RouterTabs>
        <RouterTab label="One" path="">
            One
        </RouterTab>
        {content.map((value) => (
            <RouterTab key={value} label={value} path={`/${value}`}>
                {value}
            </RouterTab>
        ))}
        {showFourthTab && (
            <RouterTab label="Four" path="/four">
                Four
            </RouterTab>
        )}
    </RouterTabs>

@comet/admin-rte@5.4.0

Minor Changes

  • 981bf48: Allow setting a tooltip to the button of custom-inline-styles using the tooltipText prop

  • 51d6c2b: Move soft-hyphen functionality to @comet/admin-rte

    This allows using the soft-hyphen functionality in plain RTEs, and not only in RichTextBlock

    const [useRteApi] = makeRteApi();
    
    export default function MyRte() {
        const { editorState, setEditorState } = useRteApi();
        return (
            <Rte
                value={editorState}
                onChange={setEditorState}
                options={{
                    supports: [
                        // Soft Hyphen
                        "soft-hyphen",
                        // Other options you may wish to support
                        "bold",
                        "italic",
                    ],
                }}
            />
        );
    }

@comet/cms-admin@5.4.0

Minor Changes

  • e146d8b: Support the import of files from external DAMs

    To connect an external DAM, implement a component with the necessary logic (asset picker, upload functionality, ...). Pass this component to the DamPage via the additionalToolbarItems prop.

    <DamPage
        // ...
        additionalToolbarItems={<ImportFromExternalDam />}
    />

    You can find an example in the demo project.

  • 51d6c2b: Move soft-hyphen functionality to @comet/admin-rte

    This allows using the soft-hyphen functionality in plain RTEs, and not only in RichTextBlock

    const [useRteApi] = makeRteApi();
    
    export default function MyRte() {
        const { editorState, setEditorState } = useRteApi();
        return (
            <Rte
                value={editorState}
                onChange={setEditorState}
                options={{
                    supports: [
                        // Soft Hyphen
                        "soft-hyphen",
                        // Other options you may wish to support
                        "bold",
                        "italic",
                    ],
                }}
            />
        );
    }
  • dcaf750: Make all DAM license fields optional if LicenseType is ROYALTY_FREE even if requireLicense is true in DamConfig

Patch Changes

  • 087cb01: Enable copying documents from one PageTree category to another (e.g. from "Main navigation" to "Top menu" in Demo)

@comet/cms-api@5.4.0

Minor Changes

  • e146d8b: Support the import of files from external DAMs

    To connect an external DAM, implement a component with the necessary logic (asset picker, upload functionality, ...). Pass this component to the DamPage via the additionalToolbarItems prop.

    <DamPage
        // ...
        additionalToolbarItems={<ImportFromExternalDam />}
    />

    You can find an example in the demo project.

  • 27bf643: Add PublicUploadsService to public API

    The service can be used to programmatically create public uploads, such as when creating fixtures.

  • df5c959: Remove license types MICRO and SUBSCRIPTION

    The LicenseType enum no longer contains the values MICRO and SUBSCRIPTION. The database migration will automatically update all licenses of type MICRO or SUBSCRIPTION to RIGHTS_MANAGED.

Patch Changes

  • 60f5208: Fix encoding of special characters in names of uploaded files

    For example:

    Previously:

    • €.jpg -> a.jpg
    • ä.jpg -> ai.jpg

    Now:

    • €.jpg -> euro.jpg
    • ä.jpg -> ae.jpg

@comet/cms-site@5.4.0

Minor Changes

  • f906386: Add hasRichTextBlockContent helper

    The helper can be used to conditionally render a RichTextBlock.

    Example:

    import { hasRichTextBlockContent } from "@comet/cms-site";
    
    function TeaserBlock({ data: { image, text } }: PropsWithData<TeaserBlockData>) {
        return (
            <>
                <DamImageBlock data={image} />
                {hasRichTextBlockContent(text) && <RichTextBlock data={text} />}
            </>
        );
    }

5.3.0

18 Dec 10:10
16a47c9
Compare
Choose a tag to compare

@comet/admin@5.3.0

Minor Changes

  • 60cc1b2: Add FieldSet component with accordion behavior for better structuring of big forms.

Patch Changes

  • a677a16: Fix RouterPromptHandler to not show a prompt when navigating to a path with params that is not a sub route

  • 5435b27: Fix shouldScrollTo(), shouldShowError() and shouldShowWarning() in Field

    Previously, the meta argument was passed to these methods incorrectly. Now, the argument is passed as defined by the typing.

@comet/admin-icons@5.3.0

Minor Changes

  • 0ff9b9b: Deprecate icons StateGreen, StateGreenRing, StateOrange, StateOrangeRing, StateRed, and StateRedRing,

Patch Changes

  • 0ff9b9b: Fix various icons

    Since version 5.2.0 several icons were not displayed correctly. This problem has been fixed.

@comet/blocks-admin@5.3.0

Minor Changes

  • a227388: Add support for custom block categories

    Allows specifying custom block categories in application code.

    Example:

    In src/common/blocks/customBlockCategories.tsx:

    import { BlockCategory, CustomBlockCategory } from "@comet/blocks-admin";
    import React from "react";
    import { FormattedMessage } from "react-intl";
    
    const productsBlockCategory: CustomBlockCategory = {
        id: "Products",
        label: <FormattedMessage id="blocks.category.products" defaultMessage="Products" />,
        // Specify where category will be shown in drawer
        insertBefore: BlockCategory.Teaser,
    };
    
    export { productsBlockCategory };

    In src/documents/pages/blocks/MyBlock.tsx:

    import { productsBlockCategory } from "@src/common/blocks/customBlockCategories";
    
    const MyBlock: BlockInterface = {
        category: productsBlockCategory,
        ...
    };

@comet/cms-admin@5.3.0

Patch Changes

  • 0fdf4ea: Always use the /preview file URLs in the admin application

    This is achieved by setting the x-preview-dam-urls in the includeInvisibleContentContext.

    This fixes a page copy bug where all files were downloaded and uploaded again, even when copying within the same environment.

5.2.0

13 Dec 07:26
e8158b0
Compare
Choose a tag to compare

@comet/admin@5.2.0

Minor Changes

  • 0bed4e7: Add optional hasConflict prop to SaveButton, FinalFormSaveButton and FinalFormSaveSplitButton

    If set to true, a new "conflict" display state is triggered.
    You should pass the hasConflict prop returned by useSaveConflict(), useSaveConflictQuery() and useFormSaveConflict().

Patch Changes

  • 25daac0: Avoid remount of RouterTab with forceRender={true} when RouterTabs are used inside a Stack

@comet/admin-icons@5.2.0

Minor Changes

  • 9fc7d47: Add new icons from the Comet UX library. Replace existing icons with new versions. Mark icons Pool, Pool2, Vignette1, Vignette2, Betrieb, LogischeFilter as deprecated.

@comet/blocks-admin@5.2.0

Minor Changes

  • 824ea66: Improve layout selection UX in createColumnsBlock

    Hide select when there's only one layout for a specific number of columns

Patch Changes

  • 3702bb2: Infer additional item fields in BlocksBlock and ListBlock

    Additional fields in the item prop of AdditionalItemContextMenuItems and AdditionalItemContent will be typed correctly if the additionalItemFields option is strongly typed.

@comet/cms-admin@5.2.0

Minor Changes

  • 0bed4e7: Improve the SaveConflictDialog

    • extend the text in the dialog to explain
      • what happened
      • what the next steps are
      • what can be done to avoid conflicts
    • make the button labels more precise
    • once the save dialog is closed
      • stop polling
      • mark the save button red and with an error icon
  • 0bed4e7: useSaveConflict(), useSaveConflictQuery() and useFormSaveConflict() now return a hasConflict prop

    If hasConflict is true, a save conflict has been detected.
    You should pass hasConflict on to SaveButton, FinalFormSaveButton or FinalFormSaveSplitButton. The button will then display a "conflict" state.

  • 0bed4e7: Admin Generator: In the generated form, the hasConflict prop is passed from the useFormSaveConflict() hook to the FinalFormSaveSplitButton

  • 6fda5a5: CRUD Generator: Change the file ending of the private sibling GraphQL files from .gql.tsx to .gql.ts

    The GraphQL files do not contain JSX.
    Regenerate the files to apply this change to a project.

@comet/cms-api@5.2.0

Minor Changes

  • bbc0a0a: Add access logging to log information about the request to standard output. The log contains information about the requester and the request itself. This can be useful for fulfilling legal requirements regarding data integrity or for forensics.

    There are two ways to integrate logging into an application:

    First option: Use the default implementation

    imports: [
        ...
        AccessLogModule,
        ...
    ]

    Second option: Configure logging

    Use the shouldLogRequest to prevent logging for specific requests. For instance, one may filter requests for system users.

    imports: [
        ...
        AccessLogModule.forRoot({
            shouldLogRequest: ({user, req}) => {
                // do something
                return true; //or false
            },
        }),
        ...
    ]

    More information can be found in the documentation under 'Authentication > Access Logging'.

Patch Changes

  • 1a170b9: API Generator: Use correct type for where when getFindCondition service method is not used
  • 6b240a0: CRUD Generator: Correctly support type: "text" fields in input

@comet/cms-site@5.2.0

Minor Changes

  • 6244d6c: Add the YouTubeVideoBlock to the @comet/cms-site package.