Skip to content

BlockSuite API Documentation / @blocksuite/data-view / PropertyConfig

Type Alias: PropertyConfig<Data, RawValue, JsonValue>

PropertyConfig<Data, RawValue, JsonValue> = object

Defined in: packages/affine/data-view/src/core/property/types.ts:16

Type Parameters

Data

Data

RawValue

RawValue = unknown

JsonValue

JsonValue = unknown

Properties

addGroup()?

optional addGroup: (config) => Data

Defined in: packages/affine/data-view/src/core/property/types.ts:83

Parameters

config

WithCommonPropertyConfig<{ oldData: Data; text: string; }>

Returns

Data


fixed?

optional fixed: object

Defined in: packages/affine/data-view/src/core/property/types.ts:77

defaultData

defaultData: Data

defaultOrder?

optional defaultOrder: string

defaultShow?

optional defaultShow: boolean


hide?

optional hide: boolean

Defined in: packages/affine/data-view/src/core/property/types.ts:18


jsonValue

jsonValue: object

Defined in: packages/affine/data-view/src/core/property/types.ts:64

isEmpty()

isEmpty: (config) => boolean

Parameters
config

WithCommonPropertyConfig<{ value: JsonValue; }>

Returns

boolean

schema

schema: ZodType<JsonValue>

type()

type: (config) => TypeInstance

Parameters
config

WithCommonPropertyConfig<{ data: Data; }>

Returns

TypeInstance


minWidth?

optional minWidth: number

Defined in: packages/affine/data-view/src/core/property/types.ts:82


name

name: string

Defined in: packages/affine/data-view/src/core/property/types.ts:17


propertyData

propertyData: object

Defined in: packages/affine/data-view/src/core/property/types.ts:19

default()

default: () => Data

Returns

Data

schema

schema: ZodType<Data>


rawValue

rawValue: object

Defined in: packages/affine/data-view/src/core/property/types.ts:23

default()

default: () => RawValue

Returns

RawValue

fromJson()

fromJson: (config) => RawValue | undefined

Parameters
config

WithCommonPropertyConfig<{ data: Data; value: JsonValue; }>

Returns

RawValue | undefined

fromString()

fromString: (config) => object

Parameters
config

WithCommonPropertyConfig<{ data: Data; value: string; }>

Returns

object

data?

optional data: Record<string, unknown>

value

value: unknown

onUpdate()?

optional onUpdate: (config) => Disposable

Parameters
config

WithCommonPropertyConfig<{ callback: () => void; data: Data; value: RawValue; }>

Returns

Disposable

schema

schema: ZodType<RawValue>

setValue()?

optional setValue: (config) => void

Parameters
config

WithCommonPropertyConfig<{ data: Data; newValue: RawValue; setValue: (value) => void; value: RawValue; }>

Returns

void

toJson()

toJson: (config) => JsonValue

Parameters
config

WithCommonPropertyConfig<{ data: Data; value: RawValue; }>

Returns

JsonValue

toString()

toString: (config) => string

Parameters
config
data

Data

value

RawValue

Returns

string