DrawerWidgetSessionMixin
Note: this document is automatically generated from mobx-state-tree objects in our source code. See Core concepts and intro to pluggable elements for more info
Source file
packages/product-core/src/Session/DrawerWidgets.ts
DrawerWidgetSessionMixin - Properties
property: drawerPosition
// type signature
IOptionalIType<ISimpleType<string>, [undefined]>
// code
drawerPosition: types.optional(
types.string,
() => localStorageGetItem('drawerPosition') || 'right',
)
property: drawerWidth
// type signature
IOptionalIType<ISimpleType<number>, [undefined]>
// code
drawerWidth: types.optional(
types.refinement(types.integer, width => width >= minDrawerWidth),
384,
)
property: widgets
// type signature
IMapType<IAnyType>
// code
widgets: types.map(widgetStateModelType)
property: activeWidgets
// type signature
IMapType<IMaybe<IReferenceType<IAnyType>>>
// code
activeWidgets: types.map(types.safeReference(widgetStateModelType))
property: minimized
// type signature
IOptionalIType<ISimpleType<boolean>, [undefined]>
// code
minimized: types.optional(types.boolean, false)
DrawerWidgetSessionMixin - Getters
getter: visibleWidget
// type
any
DrawerWidgetSessionMixin - Actions
action: setDrawerPosition
// type signature
setDrawerPosition: (arg: string) => void
action: updateDrawerWidth
// type signature
updateDrawerWidth: (drawerWidth: number) => number
action: resizeDrawer
// type signature
resizeDrawer: (distance: number) => number
action: addWidget
// type signature
addWidget: (typeName: string, id: string, initialState?: {}, conf?: unknown) => any
action: showWidget
// type signature
showWidget: (widget: any) => void
action: hasWidget
// type signature
hasWidget: (widget: any) => boolean
action: hideWidget
// type signature
hideWidget: (widget: any) => void
action: minimizeWidgetDrawer
// type signature
minimizeWidgetDrawer: () => void
action: showWidgetDrawer
// type signature
showWidgetDrawer: () => void
action: hideAllWidgets
// type signature
hideAllWidgets: () => void
action: editConfiguration
opens a configuration editor to configure the given thing, and sets the current task to be configuring it
// type signature
editConfiguration: (configuration: { [x: string]: any; } & NonEmptyObject & { setSubschema(slotName: string, data: unknown): any; } & IStateTreeNode<AnyConfigurationSchemaType>) => void