Skip to content

6.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 30 Jan 14:19
· 1326 commits to main since this release
dbfc979

@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