Expand all

ve.ui.MWTransclusionOutlineWidget

Extends

Constructor

new ve.ui.MWTransclusionOutlineWidget() #

Container for the entire transclusion dialog sidebar, may contain a single or multiple templates or raw wikitext snippets.

Properties:

Name Type Description
partWidgets Object.<string, ve.ui.MWTransclusionOutlinePartWidget>

Map of top-level items currently visible in this container, indexed by part id

Source:

Container for the entire transclusion dialog sidebar, may contain a single or multiple templates or raw wikitext snippets.

Methods

addPartWidget(part, [newPosition], [removed])private #

Parameters:

Name Type Attributes Description
part ve.dm.MWTransclusionPartModel
newPosition number optional
removed ve.dm.MWTransclusionPartModel | null optional
Source:

Fires:

clear() #

Removes all {@see ve.ui.MWTransclusionOutlinePartWidget}, i.e. empties the list.

Source:
Removes all {@see ve.ui.MWTransclusionOutlinePartWidget}, i.e.

findPartIdContainingElement(element) → {string|undefined} #

Checks if the provided DOM element belongs to the DOM structure of one of the top-level {@see ve.ui.MWTransclusionOutlinePartWidget}s, and returns its id. Useful for e.g. mouse click or keyboard handlers.

Parameters:

Name Type Description
element HTMLElement
Source:

Returns:

Always a top-level part id, e.g. "part_0"

Type
string | undefined

Checks if the provided DOM element belongs to the DOM structure of one of the top-level {@see ve.ui.MWTransclusionOutlinePartWidget}s, and returns its id.

onFilterParametersByName(visibility)private #

Parameters:

Name Type Description
visibility Object.<string, boolean>
Source:

Fires:

onReplacePart(removed, added, [newPosition]) #

Parameters:

Name Type Attributes Description
removed ve.dm.MWTransclusionPartModel | null

Removed part

added ve.dm.MWTransclusionPartModel | null

Added part

newPosition number optional
Source:

onTransclusionPartSoftSelected(pageName) #

Handle spacebar in a part header

Parameters:

Name Type Description
pageName string
Source:

Fires:

Handle spacebar in a part header

removePartWidget(part)private #

setSelectionByPageName([pageName]) #

This is inspired by {@see OO.ui.SelectWidget.selectItem}, but isn't one.

Parameters:

Name Type Attributes Description
pageName string optional

Symbolic name of page. Omit to remove current selection.

Source:
This is inspired by {@see OO.ui.SelectWidget.selectItem}, but isn't one.

toggleHasValueByPageName(pageName, hasValue) #

Parameters:

Name Type Description
pageName string
hasValue boolean
Source:

Events

filterPagesByName(visibility) #

Parameters:

Name Type Description
visibility Object.<string, boolean>

Keyed by unique id of the {@see OO.ui.BookletLayout} page, e.g. something like "part_1/param1".

Source:

sidebarItemSelected(pageName, [soft]) #

Respond to the intent to select a sidebar item

Parameters:

Name Type Attributes Description
pageName string

Unique id of the {@see OO.ui.BookletLayout} page, e.g. something like "part_1" or "part_1/param1".

soft boolean optional

If true, don't focus the content pane. Defaults to false.

Source:
Respond to the intent to select a sidebar item