feat: simplification of default-value specification in FieldMetadata (#4592)
* feat: wip refactor default-value * feat: health check to migrate default value * fix: tests * fix: refactor defaultValue to make it more clean * fix: unit tests * fix: front-end default value
This commit is contained in:
@ -33,7 +33,7 @@ export class ViewFieldObjectMetadata extends BaseObjectMetadata {
|
||||
label: 'Visible',
|
||||
description: 'View Field visibility',
|
||||
icon: 'IconEye',
|
||||
defaultValue: { value: true },
|
||||
defaultValue: true,
|
||||
})
|
||||
isVisible: boolean;
|
||||
|
||||
@ -43,7 +43,7 @@ export class ViewFieldObjectMetadata extends BaseObjectMetadata {
|
||||
label: 'Size',
|
||||
description: 'View Field size',
|
||||
icon: 'IconEye',
|
||||
defaultValue: { value: 0 },
|
||||
defaultValue: 0,
|
||||
})
|
||||
size: number;
|
||||
|
||||
@ -53,7 +53,7 @@ export class ViewFieldObjectMetadata extends BaseObjectMetadata {
|
||||
label: 'Position',
|
||||
description: 'View Field position',
|
||||
icon: 'IconList',
|
||||
defaultValue: { value: 0 },
|
||||
defaultValue: 0,
|
||||
})
|
||||
position: number;
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ export class ViewFilterObjectMetadata extends BaseObjectMetadata {
|
||||
type: FieldMetadataType.TEXT,
|
||||
label: 'Operand',
|
||||
description: 'View Filter operand',
|
||||
defaultValue: { value: 'Contains' },
|
||||
defaultValue: "'Contains'",
|
||||
})
|
||||
operand: string;
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ export class ViewSortObjectMetadata extends BaseObjectMetadata {
|
||||
type: FieldMetadataType.TEXT,
|
||||
label: 'Direction',
|
||||
description: 'View Sort direction',
|
||||
defaultValue: { value: 'asc' },
|
||||
defaultValue: "'asc'",
|
||||
})
|
||||
direction: string;
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ export class ViewObjectMetadata extends BaseObjectMetadata {
|
||||
type: FieldMetadataType.TEXT,
|
||||
label: 'Type',
|
||||
description: 'View type',
|
||||
defaultValue: { value: 'table' },
|
||||
defaultValue: "'table'",
|
||||
})
|
||||
type: string;
|
||||
|
||||
@ -53,7 +53,7 @@ export class ViewObjectMetadata extends BaseObjectMetadata {
|
||||
label: 'Key',
|
||||
description: 'View key',
|
||||
options: [{ value: 'INDEX', label: 'Index', position: 0, color: 'red' }],
|
||||
defaultValue: { value: 'INDEX' },
|
||||
defaultValue: "'INDEX'",
|
||||
})
|
||||
@IsNullable()
|
||||
key: string;
|
||||
@ -88,7 +88,7 @@ export class ViewObjectMetadata extends BaseObjectMetadata {
|
||||
type: FieldMetadataType.BOOLEAN,
|
||||
label: 'Compact View',
|
||||
description: 'Describes if the view is in compact mode',
|
||||
defaultValue: { value: false },
|
||||
defaultValue: false,
|
||||
})
|
||||
isCompact: boolean;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user