6.0.0
@comet/admin@6.0.0
Major Changes
-
298b63b:
FinalForm
: Remove defaultonAfterSubmit
implementationIn most cases the default implementation is not wanted anymore. When upgrading, an empty
function override ofonAfterSubmit
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 ofshouldScrollToField
,shouldShowFieldError
andshouldShowFieldWarning
inFinalFormContext
to match the corresponding methods inField
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
andFinalFormContext
have the same signature.
Minor Changes
- 921f637: Add
helperText
prop toField
andFieldContainer
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
andVignette2
.
Patch Changes
- 76e50aa: Fix broken
Logout
icon
@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
toKubernetesJobStatus
to avoid naming conflicts - Rename
BuildRuntime
toJobRuntime
- Show latest job run on
-
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, theSitesConfigProvider
anduseSitesConfig
are made generic.
The following changes have to be made in the application:-
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>;
-
Use the type when using
useSitesConfig
- const sitesConfig = useSitesConfig(); + const sitesConfig = useSitesConfig<SitesConfig>();
-
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
andMasterMenuRoutes
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
toKubernetesJobStatus
to avoid naming conflicts - Rename
BuildRuntime
toJobRuntime
- Show latest job run on
-
b3ceaef: Replace
ContentScopeModule
withUserPermissionsModule
Breaking changes:
ContentScopeModule
has been removedcanAccessScope
has been moved toAccessControlService
and refactored intoisAllowed
contentScopes
andpermissions
fields have been added toCurrentUser
objectrole
andrights
fields has been removed fromCurrentUser
objectAllowForRole
decorator has been removed- Rename
SubjectEntity
decorator toAffectedEntity
- Add
RequiredPermission
decorator and make it mandatory when usingUserPermissionsModule
@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