BlockSuite API Documentation / @blocksuite/affine-fragment-outline
@blocksuite/affine-fragment-outline
Classes
MobileOutlineMenu
Extends
LitElement<this> &DisposableClass<this>
Constructors
Other
styles
staticstyles:CSSResult
Overrides
SignalWatcher( WithDisposable(LitElement) ).styles
editor
renderItem()
renderItem(
item):TemplateResult<1> | typeofnothing
Parameters
item
Returns
TemplateResult<1> | typeof nothing
attributes
controllers
dev-mode
lifecycle
connectedCallback()
connectedCallback():
void
Invoked when the component is added to the document's DOM.
In connectedCallback() you should setup tasks that should only occur when the element is connected to the document. The most common of these is adding event listeners to nodes external to the element, like a keydown event handler added to the window.
connectedCallback() {
super.connectedCallback();
addEventListener('keydown', this._handleKeydown);
}Typically, anything done in connectedCallback() should be undone when the element is disconnected, in disconnectedCallback().
Returns
void
Overrides
SignalWatcher( WithDisposable(LitElement) ).connectedCallback
disconnectedCallback()
disconnectedCallback():
void
Invoked when the component is removed from the document's DOM.
This callback is the main signal to the element that it may no longer be used. disconnectedCallback() should ensure that nothing is holding a reference to the element (such as event listeners added to nodes external to the element), so that it is free to be garbage collected.
disconnectedCallback() {
super.disconnectedCallback();
window.removeEventListener('keydown', this._handleKeydown);
}An element may be re-connected after being disconnected.
Returns
void
Overrides
SignalWatcher( WithDisposable(LitElement) ).disconnectedCallback
properties
rendering
render()
render():
unknown
Invoked on each update to perform rendering tasks. This method may return any value renderable by lit-html's ChildPart - typically a TemplateResult. Setting properties inside this method will not trigger the element to update.
Returns
unknown
Overrides
SignalWatcher( WithDisposable(LitElement) ).render
styles
updates
OutlinePanel
Extends
ShadowlessElement<this> &DisposableClass<this>
Constructors
Other
editor
fitPadding
connectedCallback()
connectedCallback():
void
Returns
void
Overrides
SignalWatcher( WithDisposable(ShadowlessElement) ).connectedCallback
attributes
controllers
dev-mode
lifecycle
properties
rendering
render()
render():
TemplateResult<1> |undefined
Invoked on each update to perform rendering tasks. This method may return any value renderable by lit-html's ChildPart - typically a TemplateResult. Setting properties inside this method will not trigger the element to update.
Returns
TemplateResult<1> | undefined
Overrides
SignalWatcher( WithDisposable(ShadowlessElement) ).render
styles
updates
willUpdate()
willUpdate(
changedProperties):void
Invoked before update() to compute values needed during the update.
Implement willUpdate to compute property values that depend on other properties and are used in the rest of the update process.
willUpdate(changedProperties) {
// only need to check changed properties for an expensive computation.
if (changedProperties.has('firstName') || changedProperties.has('lastName')) {
this.sha = computeSHA(`${this.firstName} ${this.lastName}`);
}
}
render() {
return html`SHA: ${this.sha}`;
}Parameters
changedProperties
PropertyValueMap<OutlinePanel>
Returns
void
Overrides
SignalWatcher( WithDisposable(ShadowlessElement) ).willUpdate
OutlineViewer
Extends
ShadowlessElement<this> &DisposableClass<this>
Constructors
Other
styles
staticstyles:CSSResult
Overrides
SignalWatcher( WithDisposable(ShadowlessElement) ).styles
editor
toggleOutlinePanel
connectedCallback()
connectedCallback():
void
Returns
void
Overrides
SignalWatcher( WithDisposable(ShadowlessElement) ).connectedCallback
disconnectedCallback()
disconnectedCallback():
void
Returns
void
Overrides
SignalWatcher( WithDisposable(ShadowlessElement) ).disconnectedCallback
attributes
controllers
dev-mode
properties
rendering
render()
render():
TemplateResult<1> | typeofnothing
Invoked on each update to perform rendering tasks. This method may return any value renderable by lit-html's ChildPart - typically a TemplateResult. Setting properties inside this method will not trigger the element to update.
Returns
TemplateResult<1> | typeof nothing
Overrides
SignalWatcher( WithDisposable(ShadowlessElement) ).render
styles
updates
willUpdate()
willUpdate(
changedProperties):void
Invoked before update() to compute values needed during the update.
Implement willUpdate to compute property values that depend on other properties and are used in the rest of the update process.
willUpdate(changedProperties) {
// only need to check changed properties for an expensive computation.
if (changedProperties.has('firstName') || changedProperties.has('lastName')) {
this.sha = computeSHA(`${this.firstName} ${this.lastName}`);
}
}
render() {
return html`SHA: ${this.sha}`;
}Parameters
changedProperties
PropertyValueMap<OutlineViewer>
Returns
void
Overrides
SignalWatcher( WithDisposable(ShadowlessElement) ).willUpdate
Variables
AFFINE_MOBILE_OUTLINE_MENU
constAFFINE_MOBILE_OUTLINE_MENU:"affine-mobile-outline-menu"='affine-mobile-outline-menu'
AFFINE_OUTLINE_PANEL
constAFFINE_OUTLINE_PANEL:"affine-outline-panel"='affine-outline-panel'
AFFINE_OUTLINE_VIEWER
constAFFINE_OUTLINE_VIEWER:"affine-outline-viewer"='affine-outline-viewer'