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()?
optionaladdGroup: (config) =>Data
Defined in: packages/affine/data-view/src/core/property/types.ts:83
Parameters
config
WithCommonPropertyConfig<{ oldData: Data; text: string; }>
Returns
Data
fixed?
optionalfixed:object
Defined in: packages/affine/data-view/src/core/property/types.ts:77
defaultData
defaultData:
Data
defaultOrder?
optionaldefaultOrder:string
defaultShow?
optionaldefaultShow:boolean
hide?
optionalhide: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
minWidth?
optionalminWidth: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?
optionaldata:Record<string,unknown>
value
value:
unknown
onUpdate()?
optionalonUpdate: (config) =>Disposable
Parameters
config
WithCommonPropertyConfig<{ callback: () => void; data: Data; value: RawValue; }>
Returns
Disposable
schema
schema:
ZodType<RawValue>
setValue()?
optionalsetValue: (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