Add standard record page layout (#17567)
This commit is contained in:
+9
-1
@@ -1,5 +1,6 @@
|
||||
import { type msg } from '@lingui/core/macro';
|
||||
|
||||
import { type GenericValidateFlatPageLayoutWidgetTypeSpecificitiesArgs } from 'src/engine/metadata-modules/flat-page-layout-widget/services/flat-page-layout-widget-type-validator.service';
|
||||
import { type FlatPageLayoutWidgetValidationError } from 'src/engine/metadata-modules/flat-page-layout-widget/types/flat-page-layout-widget-validation-error.type';
|
||||
import { type WidgetType } from 'src/engine/metadata-modules/page-layout-widget/enums/widget-type.enum';
|
||||
import { PageLayoutWidgetExceptionCode } from 'src/engine/metadata-modules/page-layout-widget/exceptions/page-layout-widget.exception';
|
||||
@@ -9,7 +10,14 @@ export const rejectWidgetType = (
|
||||
message: string,
|
||||
userFriendlyMessage: ReturnType<typeof msg>,
|
||||
) => {
|
||||
return (): FlatPageLayoutWidgetValidationError[] => {
|
||||
return (
|
||||
args: GenericValidateFlatPageLayoutWidgetTypeSpecificitiesArgs,
|
||||
): FlatPageLayoutWidgetValidationError[] => {
|
||||
// Allow standard widgets to use widget types that are not yet supported for user creation
|
||||
if (args.buildOptions.isSystemBuild) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return [
|
||||
{
|
||||
code: PageLayoutWidgetExceptionCode.INVALID_PAGE_LAYOUT_WIDGET_DATA,
|
||||
|
||||
Reference in New Issue
Block a user