Open Ecoacoustics Web Components

API

Note about CSS parts

When targeting an annotate, indicator, or axes components css parts, you must target the component that is being wrapped.

For example, if you want to change the colour of the axes components grid lines (::part(grid-lines)), you must use the following format:

oe-axes *::part(grid-lines),
oe-axes::part(grid-lines) {
  color: red;
}

<oe-annotate>

Attributes

NameDescriptionTypeDefault
tag-styleChanges how to labels are displayed on annotations. `hidden` - All tag content/labels will be hidden. Annotation bounding boxes will still be shown. `edge` - The tag content/labels will be shown on the edge of the associated bounding box `spectrogram-top` - The tag content/labels will be shown above the spectrogram.AnnotationTagStyle
readonlyMakes all annotations readonly (not currently implemented; all annotations are readonly)booleantrue

Properties

NameAttributeDescriptionTypeDefault
tagStyletag-styleChanges how to labels are displayed on annotations. `hidden` - All tag content/labels will be hidden. Annotation bounding boxes will still be shown. `edge` - The tag content/labels will be shown on the edge of the associated bounding box `spectrogram-top` - The tag content/labels will be shown above the spectrogram.AnnotationTagStyle
readonlyreadonlyMakes all annotations readonly (not currently implemented; all annotations are readonly)booleantrue
annotationsSurfaceHTMLDivElement
spectrogramSpectrogramComponent | undefined
annotationElementsReadonlyArray | undefined
topChromeHeight
labelElementsLabelElement[][]
templateTagElementsTemplateTagElement[][]
unitConverterReadonly | undefined
tagOverflowObserverIntersectionObserver | undefined
annotationUpdateEventHandler
labelRefsRef[]
instantiatedLabelRefs
annotationModelsAnnotation[]

Methods

NameParametersDescriptionReturn
chromeRenderedvoid
handleSlotChangevoid
chromeOverlayChromeTemplate
chromeTopChromeTemplate

Events

NameDescriptionType
emittedEventNameCustomEvent
oe-annotation-created
oe-annotation-removed
oe-annotation-selected
oe-annotation-deselected
oe-annotation-changed
oe-annotation-updating(not implemented)
oe-annotation-updated(not implemented)

Slots

NameDescription
(default)A spectrogram element to add annotations to

CSS Shadow Parts

NameDescription
annotation-bounding-boxThe "box part" of the annotation. E.g. The "green" square around the event.
annotation-labelSelector for the annotation label

CSS Custom Properties

NameDescription
--oe-annotation-color
--oe-annotation-font-color
--oe-annotation-weight
--oe-annotation-selected-color

<oe-annotation>

Attributes

NameDescriptionTypeDefault
low-frequencyHertz
high-frequencyHertz
start-timeSeconds
end-timeSeconds
readonlyMakes the annotation non-editablebooleantrue
tagsA comma separated list of tag names for the annotation regionTag[][]

Properties

NameAttributeDescriptionTypeDefault
createdEventNamestring"oe-annotation-created"
updatedEventNamestring"oe-annotation-updated"
removedEventNamestring"oe-annotation-removed"
selectedEventNamestring"oe-annotation-selected"
deselectedEventNamestring"oe-annotation-deselected"
updatingEventNamestring"oe-annotation-updating"
annotationChangedEventNamestring"oe-annotation-changed"
lowFrequencylow-frequencyHertz
highFrequencyhigh-frequencyHertz
startTimestart-timeSeconds
endTimeend-timeSeconds
readonlyreadonlyMakes the annotation non-editablebooleantrue
tagstagsA comma separated list of tag names for the annotation regionTag[][]
tagComponentsReadonlyArray | undefined
modelReadonly
selectedboolean
_selectedbooleanfalse

Methods

NameParametersDescriptionReturn
tagModelsTag[]

Events

NameDescriptionType
oe-annotation-createdFires when the annotation component is created
oe-annotation-updatingFires when the user starts dragging / modifying the annotation (not currently implemented; all annotations are readonly)
oe-annotation-updated(not implemented) Fires when the low-frequency, high-frequency, start-time, end-time, or tag properties are updated.
oe-annotation-removedFires when the annotation is deleted / removed from the DOM
oe-annotation-selectedFires when the annotation is selected. Triggered by `focus`, and also emits an `Annotation` model.
oe-annotation-deselectedFires when the annotation is de-selected. Triggered by `blur` and emits and `annotation` model
oe-annotation-changedFires when something about the elements lit DOM template has changed E.g. the DOM node has been copied or moved.

Slots

NameDescription
(default)A slot for elements

<oe-axes>

Attributes

NameDescriptionTypeDefault
x-stepThe step size for the x-axisSeconds | undefined
y-stepThe step size for the y-axisHertz | undefined
x-titleThe text to show next to the x-axisstring"Time (Seconds)"
y-titleThe text to show next to the y-axisstring"Frequency (KHz)"
x-title-visibleWhether to show/hide the x-axis titlebooleantrue
y-title-visibleWhether to show/hide the y-axis titlebooleantrue
x-axisShows/hides x-axis labels and ticksbooleantrue
y-axisShows/hides y-axis labels and ticksbooleantrue
x-gridShows/hides x-axis labels and grid linesbooleantrue
y-gridShows/hides y-axis labels and grid linesbooleantrue

Properties

NameAttributeDescriptionTypeDefault
fontCanvasHTMLCanvasElement
labelPaddingEmUnit0.25
tickSizeEmUnit0.75
titleOffsetEmUnit0.25
xStepOverridex-stepThe step size for the x-axisSeconds | undefined
yStepOverridey-stepThe step size for the y-axisHertz | undefined
xTitlex-titleThe text to show next to the x-axisstring"Time (Seconds)"
yTitley-titleThe text to show next to the y-axisstring"Frequency (KHz)"
showXTitlex-title-visibleWhether to show/hide the x-axis titlebooleantrue
showYTitley-title-visibleWhether to show/hide the y-axis titlebooleantrue
showXAxisx-axisShows/hides x-axis labels and ticksbooleantrue
showYAxisy-axisShows/hides y-axis labels and ticksbooleantrue
showXGridx-gridShows/hides x-axis labels and grid linesbooleantrue
showYGridy-gridShows/hides y-axis labels and grid linesbooleantrue
spectrogramReadonly | undefined
unitConverterReadonly | undefined
emUnitFontSizeSize
xAxisTemplateHTMLTemplateResult
yAxisTemplateHTMLTemplateResult
labelPaddingSize
tickSizeSize
titleOffsetSize

Methods

NameParametersDescriptionReturn
handleSlotChangevoid
chromeLeftChromeTemplate
chromeBottomChromeTemplate
chromeOverlayChromeTemplate

Slots

NameDescription
(default)A spectrogram element to add axes to

CSS Shadow Parts

NameDescription
tickApply styles to both x and y tick lines
x-tickApply styles to only the x axis tick lines
y-tickApply styles to only the y axis tick lines
gridApply styles to both x and y grid lines
x-gridApply styles to only the x grid lines
y-gridApply styles to only the y grid lines
labelApply styles to both x and y labels
x-labelApply styles to only the x axis label
y-labelApply styles to only the x axis label
titleApply styles to both the x and y titles
x-titleApply styles to only the x axis title
y-titleApply styles to only the y axis title

<oe-verification-bootstrap>

Properties

NameAttributeDescriptionTypeDefault
openEventNamestring"open"
closeEventNamestring"close"
injectorVerificationGridInjector
decisionElementsReadonlyArray
hasVerificationTaskboolean
hasClassificationTaskboolean
isMobileboolean
slidesBootstrapSlide[][]
dialogElementHTMLDialogElement
tutorialSlideCarouselElementSlCarousel
isAdvancedDialogbooleanfalse
keydownHandler
openboolean
autoDismissPreferenceboolean
decisionShortcutsReadonlyArray
demoDecisionButtonReadonly

Methods

NameParametersDescriptionReturn
showTutorialDialogvoid
showAdvancedDialogvoid

Events

NameDescriptionType
openDispatched when the dialog is opened
closeDispatched when the dialog is closed

<oe-data-source>

Attributes

NameDescriptionTypeDefault
srcA remote JSON or CSV file to use as the data sourcestring | File | undefined
forA verification grid component that the derived page fetcher callback will be applied tostring
localWhether to allow for local file inputs through a system UI dialogbooleanfalse
randomRandomly sample rows from a local or remote data sourcebooleanfalse
allow-downloadsToggles the viability a "Download Results" button in the user interface. Note if allow-downloads is set to "false", results download can still be invoked by host applications through the "downloadResults" method.booleantrue

Properties

NameAttributeDescriptionTypeDefault
srcsrcA remote JSON or CSV file to use as the data sourcestring | File | undefined
forforA verification grid component that the derived page fetcher callback will be applied tostring
locallocalWhether to allow for local file inputs through a system UI dialogbooleanfalse
randomrandomRandomly sample rows from a local or remote data sourcebooleanfalse
allowDownloadsallow-downloadsToggles the viability a "Download Results" button in the user interface. Note if allow-downloads is set to "false", results download can still be invoked by host applications through the "downloadResults" method.booleantrue
canDownloadbooleanfalse
fileNamestring | undefined
fileInputHTMLInputElement
urlSourcedFetcherUrlSourcedFetcher | undefined
verificationGridVerificationGridComponent | undefined
decisionHandler

Methods

NameParametersDescriptionReturn
downloadResultsPromise
downloadResultsTemplateHTMLTemplateResult

Slots

NameDescription
(default)A custom result download button to use instead of the default download button.

CSS Shadow Parts

NameDescription
file-pickerA css target to style the file picker button

<oe-decision>

Attributes

NameDescriptionTypeDefault
disabledDisables the decision button and prevents decision events from firingbooleanfalse
whenWhenPredicate

Properties

NameAttributeDescriptionTypeDefault
decisionEventNamestring"decision"
injectorVerificationGridInjector{ colorService: decisionColor, }
disableddisabledDisables the decision button and prevents decision events from firingbooleanfalse
whenwhenWhenPredicate
isMobileToggles the decision button in and out of mobile compatibility when decision buttons are rendered in a mobile context, they should be larger, and without shortcut keysbooleanfalse
verificationGridVerificationGridComponent | undefined
decisionConstructorConstructor
shouldEmitNextbooleantrue
keyboardHeldDownbooleanfalse
keyUpHandler
keyDownHandler

Methods

NameParametersDescriptionReturn
handleShortcutKey
NameDescriptionType
eventKeyboardEvent
void
isShortcutKey
NameDescriptionType
eventKeyboardEvent
boolean
shortcutKeysKeyboardShortcut[]
emitDecision
NameDescriptionType
valueDecision[]
void

Events

NameDescriptionType
decision

<oe-indicator>

Properties

NameAttributeDescriptionTypeDefault
spectrogramSpectrogramComponent | undefined
indicatorSvgReadonly
unitConverterUnitConverter | undefined
computedTimePxReadonlySignal

Methods

NameParametersDescriptionReturn
handleSlotChangevoid
chromeOverlayChromeTemplate

Slots

NameDescription
(default)A spectrogram component to add an indicator to

CSS Shadow Parts

NameDescription
indicator-lineA css target to style the indicator line
seek-iconA css target to style the seek icon underneath the indicator line

<oe-info-card>

Attributes

NameDescriptionTypeDefault
default-linesNumber of subject key/values pairs to show before the "Show More" button is clickednumber3

Properties

NameAttributeDescriptionTypeDefault
tileVerificationGridTileContext | undefined
defaultLinesdefault-linesNumber of subject key/values pairs to show before the "Show More" button is clickednumber3
showExpandedbooleanfalse
identityStrategyInfoCardTemplate
numberStrategyInfoCardTemplate
urlStrategy

<undefined>

Properties

NameAttributeDescriptionTypeDefault
loggerIRootContext | undefined

Methods

NameParametersDescriptionReturn
doThingvoid

<oe-media-controls>

A simple media player with play/pause and seek functionality that can be used with the open ecoacoustics spectrograms and components.

Attributes

NameDescriptionTypeDefault
forA DOM selector or element reference to target the attached spectrogram element.string | SpectrogramComponent""
playIconPositionPreferenceLocation"default"

Properties

NameAttributeDescriptionTypeDefault
playShortcutSPACE_KEY
recursiveAxesSearch
forforA DOM selector or element reference to target the attached spectrogram element.string | SpectrogramComponent""
playIconPositionplayIconPositionPreferenceLocation"default"
areSettingsOpenWe use a state variable to track whether the settings menu is open or not because Shoelace sub-menus use getComputedStyle to determine whether they are in ltr or rtl mode. This causes some performance issues when there are a lot of sub-menus or media controls on the page because each submenu causes a reflow whenever they are created. By maintaining our own open/close state we can defer the creation of the sub-menu contents until the menu is open, meaning that we only hit this reflow cost when the user actually wants to see the menu. see: https://github.com/shoelace-style/shoelace/discussions/2527booleanfalse
axesElementAxesComponent | null | undefined
spectrogramElementSpectrogramComponent | null | undefined
playHandler
keyDownHandler
optionsChangeHandler

Methods

NameParametersDescriptionReturn
toggleAudio
NameDescriptionType
keyboardShortcut
void
isSpectrogramPlayingboolean

Slots

NameDescription
play-iconThe icon to display when the media is stopped
pause-iconThe icon to display when the media is playing

CSS Shadow Parts

NameDescription
play-iconStyling applied to the play icon (including default)
pause-iconStyling applied to the pause icon (including default)

<oe-progress-bar>

Attributes

NameDescriptionTypeDefault
history-headWhere the verification head is atnumber0
totalThe total number of items in the data setnumber | undefined
completedThe completion headnumber0

Properties

NameAttributeDescriptionTypeDefault
historyHeadhistory-headWhere the verification head is atnumber0
totaltotalThe total number of items in the data setnumber | undefined
completedcompletedThe completion headnumber0

<oe-spectrogram>

Attributes

NameDescriptionTypeDefault
windowRenderWindow | undefined
pausedWhether the spectrogram is pausedbooleantrue
srcThe source of the audio filestring""
scalingThe aspect ratio of the spectrogram stretch should scale without aspect ratio natural should scale with the correct aspect ratio to fill the container it is in. One dimension will be constrained by the container, the other by the aspect ratio. original will set the spectrogram to the native resolution of the FFT output. It will not scale the image at all.SpectrogramCanvasScale
window-sizeThe size of the fft windowPowerTwoWindowSize | undefined512
window-functionThe window function to use for the spectrogramWindowFunctionName | undefined"hann"
window-overlapThe amount of overlap between fft windowsnumber | undefined0
mel-scaleA boolean attribute representing if the spectrogram should be shown in mel-scale.boolean | undefinedfalse
color-mapA color map to use for the spectrogramColorMapName | undefined"grayscale"
brightnessAn increase in brightnessnumber | undefined0
contrastA scalar multiplier that should be applied to fft valuesnumber | undefined1
offsetAn offset (seconds) from the start of a larger audio recordingSeconds0
mediaControlOptionsISpectrogramOptions{}

Properties

NameAttributeDescriptionTypeDefault
playEventNamestring"play"
loadingEventNamestring"loading"
loadedEventNamestring"loaded"
optionsChangeEventNamestring"options-change"
defaultOptions{ windowSize: 512, windowOverlap: 0, windowFunction: "hann", melScale: false, brightness: 0, contrast: 1, colorMap: "audacity", scaling: SpectrogramCanvasScale.STRETCH, } as const satisfies Required
ancestorOptionsISpectrogramOptions | undefined
domRenderWindowwindowRenderWindow | undefined
pausedpausedWhether the spectrogram is pausedbooleantrue
srcsrcThe source of the audio filestring""
scalingscalingThe aspect ratio of the spectrogram stretch should scale without aspect ratio natural should scale with the correct aspect ratio to fill the container it is in. One dimension will be constrained by the container, the other by the aspect ratio. original will set the spectrogram to the native resolution of the FFT output. It will not scale the image at all.SpectrogramCanvasScale
windowSizewindow-sizeThe size of the fft windowPowerTwoWindowSize | undefined512
windowFunctionwindow-functionThe window function to use for the spectrogramWindowFunctionName | undefined"hann"
windowOverlapwindow-overlapThe amount of overlap between fft windowsnumber | undefined0
melScalemel-scaleA boolean attribute representing if the spectrogram should be shown in mel-scale.boolean | undefinedfalse
colorMapcolor-mapA color map to use for the spectrogramColorMapName | undefined"grayscale"
brightnessbrightnessAn increase in brightnessnumber | undefined0
contrastcontrastA scalar multiplier that should be applied to fft valuesnumber | undefined1
offsetoffsetAn offset (seconds) from the start of a larger audio recordingSeconds0
mediaControlOptionsmediaControlOptionsISpectrogramOptions{}
slottedSourceElementsReadonlyArray
spectrogramContainerReadonly
mediaElementHTMLMediaElement
canvasHTMLCanvasElement
currentTimeReadonlySignal
unitConvertersReadonlySignal
possibleWindowOverlapsReadonlyArray
componentOptionsISpectrogramOptions
spectrogramOptionsSpectrogramOptions
renderedSourcestring
hasSourceboolean
possibleWindowSizes[ 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, ] as const satisfies PowerTwoWindowSize[]
renderWindow
audio
renderCanvasSize
_unitConverters
_currentTime
audioHelpernew AudioHelper()
audioContextnew AudioContext()
highAccuracyTimeBuffernew SharedArrayBuffer(Float32Array.BYTES_PER_ELEMENT)
currentTimeBuffernew Float32Array(this.highAccuracyTimeBuffer)
canvasResizeCallbackAnimationIdentifier
interpolationCancelReferencenumber | nullnull
doneFirstRenderbooleanfalse

Methods

NameParametersDescriptionReturn
setComponentOption
NameDescriptionType
optionT
valuethis[T]
void
setMediaControlsOption
NameDescriptionType
optionT
valueISpectrogramOptions[T]
void
resetMediaControlSettingsvoid
play
NameDescriptionType
keyboardShortcut
void
pause
NameDescriptionType
keyboardShortcut
void
stopvoid
renderSurface

Events

NameDescriptionType
loading
loaded
play
options-change

Slots

NameDescription
(default)A `` element to provide the audio source

CSS Shadow Parts

NameDescription
canvasAllows you to size the spectrogram component from the size of the canvas

<oe-subject-tag>

Properties

NameAttributeDescriptionTypeDefault
tileVerificationGridTileContext | undefined
originalTag
originalTagTextstring
newTag
newTagTextstring

<oe-tag>

Attributes

NameDescriptionTypeDefault
valuestring""

Properties

NameAttributeDescriptionTypeDefault
valuevaluestring""
innerElementsNode[]
modelReadonly

Slots

NameDescription
(default)Content that can be displayed to describe the tag

<oe-task-meter>

Properties

NameAttributeDescriptionTypeDefault
tileVerificationGridTileContext | undefined
injectorVerificationGridInjector

<oe-typeahead>

Attributes

NameDescriptionTypeDefault
text-converterTypeaheadTextConverter
searchTypeaheadCallback
max-itemsnumber10
recent-used-countnumber5

Properties

NameAttributeDescriptionTypeDefault
selectedEventNamestring"oe-typeahead-selected"
textConvertertext-converterTypeaheadTextConverter
searchsearchTypeaheadCallback
maxItemsmax-itemsnumber10
recentlyUsedCountrecent-used-countnumber5
typeaheadResultsT[][]
focusedIndexnumber0
tagInputHTMLInputElement
recentlyUsedT[][]

Methods

NameParametersDescriptionReturn
focusvoid
resetvoid
clearRecentlyUsedvoid

Events

NameDescriptionType
oe-typeahead-selected

<oe-verification-grid>

Attributes

NameDescriptionTypeDefault
grid-sizeThe number of items to display in a single gridnumber10
selection-behaviorThe selection behavior of the verification gridSelectionObserverType"default"
empty-subject-messagestring"No content"
progress-bar-positionProgressBarPosition
get-pageA callback function that returns a page of recordingsPageFetcher | undefined
url-transformerA callback function that will be applied to all subject urlsUrlTransformeran identity function that returns the url unchanged
loading-timeoutA duration of time that the verification grid can be in a "loading" state before it times out and shows an error message.Seconds
autofocusbooleanfalse

Properties

NameAttributeDescriptionTypeDefault
decisionMadeEventNamestring"decision-made"
loadedEventNamestring"grid-loaded"
defaultGridTileTemplateIdstring"oe-default-tile-template"
defaultSkipButtonIdstring"oe-default-skip-button"
autoPageTimeout0.3 satisfies Seconds
slowLoadThreshold0.2 satisfies Seconds
defaultGridTileTemplatestaticHtml` `
settingsVerificationGridSettings{ isFullscreen: signal(false), }
spectrogramOptionsPartial{}
injectorVerificationGridInjector{ colorService: decisionColor, }
targetGridSizegrid-sizeThe number of items to display in a single gridnumber10
selectionBehaviorselection-behaviorThe selection behavior of the verification gridSelectionObserverType"default"
emptySubjectTextempty-subject-messagestring"No content"
progressBarPositionprogress-bar-positionProgressBarPosition
getPageget-pageA callback function that returns a page of recordingsPageFetcher | undefined
urlTransformerurl-transformerA callback function that will be applied to all subject urlsUrlTransformeran identity function that returns the url unchanged
loadingTimeoutloading-timeoutA duration of time that the verification grid can be in a "loading" state before it times out and shows an error message.Seconds
autofocusautofocusbooleanfalse
verificationDecisionElementsselector for oe-verification elementsReadonlyArray
classificationDecisionElementsselector for oe-classification elementsReadonlyArray
tagPromptDecisionElementsselector for oe-classification elementsReadonlyArray
decisionElementsA selector for all oe-verification and oe-classification elementsReadonlyArray
skipButtonsReadonlyArray
customTileTemplatesReadonlyArray
defaultSkipButtonReadonlyArray | undefined
gridTilesNodeListOf
defaultTemplateElementHTMLTemplateElement
bootstrapDialogVerificationBootstrapComponent
gridContainerHTMLDivElement
decisionsContainerHTMLDivElement
highlightBoxHTMLDivElement
columns
rowsnumber1
currentSubSelectionSubjectWrapper[][]
_loadStateGridState
_viewHeadIndexnumber0
_decisionHeadIndexnumber0
gridShapeGridShape
viewHeadIndexThe index from the `subjects` array indicating up to which point decisions have been made It is updated as each page is completednumber
decisionHeadIndexThe index from the `subjects` array indicating up to which point decisions have been made It is updated as each page is completednumber
slottedDecisionComponentsAll decisions provided by the user, excluding the default skip button.DecisionComponentUnion[]
availableGridCellsA count of grid cells available for grid tile components. Not all grid cells may be currently populated with grid tiles. If you want the total number of tiles currently populated/visible on the screen, use the `pageSize` getter.number
pageSizeA count of the number of tiles currently visible on the screennumber
subjectsBecause subject wrappers are highly sensitive to changes (e.g. changing a subject reference might break downloading), we only expose a readonly array of subjects.ReadonlyArray
loadStateGridState
currentPageIndicesCurrentPage
emptyTileCount
userSelectionBehaviorReturns the current users selection behavior, collapsing the "default" behavior into either "tablet" or "desktop" depending on the users device type.SelectionObserverType
isSingleTileViewModeWhen in a single tile view mode, there is some special functionality such as disabling the sub-selection feature, and not being able to draw a selection highlight box.boolean
hasDatasourceboolean
hasFinishedDatasourceboolean
keydownHandler
keyupHandler
blurHandler
selectionHandler
decisionHandler
pointerDownHandler
pointerUpHandler
pointerMoveHandler
scrollHandler
singleDecisionMode"single decision mode" will automatically advance the selection head if: 1. There is only one tile selected 2. All tasks on the selected tile is completed A user can enter this mode at any time by selecting just one tile. They remain in the mode by completing all tasks on the single selected tile, at which point the selection is advanced. Once in this mode, there is some special functionality like the first tile of each new page being automatically selected.booleanfalse
requiredClassificationTagsTag[][]
requiredDecisionsRequiredDecision[][]
showingSelectionShortcutsbooleanfalse
_subjectsSubjectWrapper[][]
_loadingTimeoutSeconds8
anyOverlap
gridControllernew DynamicGridSizeController(this, this.anyOverlap)
datasetLoadingControllernew LoadingController(this, { slowLoadThreshold: VerificationGridComponent.slowLoadThreshold, timeoutThreshold: this.loadingTimeout, })
paginationFetcherGridPageFetcher | undefined
subjectWriterSubjectWriter | undefined
highlightSelectionAnimation
highlightHighlightSelection{ start: { x: 0, y: 0 }, current: { x: 0, y: 0 }, highlighting: false, pointerId: null, capturedPointer: false, observedElements: [], // Poorly created webpages may not have a body element. // In this case, we should use the component host as the highlight host. // // I store the highlight host in the highlight object so if a tag // is dynamically added/removed from the page, we will maintain the same // highlight host and not leak event listeners. highlightHost: document.body ?? this, }
focusHeadnumber | nullnull
_rangeSelectionHeadnumber | nullnull
rangeSelectionHeadWhere range selection will start from. This pointer moves independently from the focus head.
nextLeftIndexnumber
nextRightIndexnumber
nextUpIndexnumber
nextDownIndexnumber
lastTileIndexnumber

Methods

NameParametersDescriptionReturn
focus
isViewingHistoryboolean
resetSpectrogramSettingsvoid
isBootstrapDialogOpenboolean
flushAllSubjects
transitionError
transitionConfigurationError
transitionDatasetFetching

Events

NameDescriptionType
decision-madeEmits information about a batch of decisions that was madeDecisionMadeEvent
grid-loadedEmits when all the spectrograms have been loaded

Slots

NameDescription
(default)A template element that will be used to create each grid tile
(default)Decision elements that will be used to create the decision buttons
data-sourceAn `oe-data-source` element that provides the data

CSS Shadow Parts

NameDescription
highlight-boxA CSS target for the highlight box so that you can change the color/style.

<oe-verification-grid-settings>

Attributes

NameDescriptionTypeDefault
max-grid-sizenumber36

Properties

NameAttributeDescriptionTypeDefault
settingsVerificationGridSettings
maxGridSizemax-grid-sizenumber36
gridSizeAn internal representation of the verification grids sizenumber | undefined
verificationGridVerificationGridComponent | undefined
fullscreenChangeHandler

<oe-verification-grid-tile>

Properties

NameAttributeDescriptionTypeDefault
selectedEventNamestring"oe-selected"
loadingEventNamestring"oe-tile-loading"
loadedEventNamestring"oe-tile-loaded"
overlapEventNamestring"overlap"
tileVerificationGridTileContext
showKeyboardShortcutsbooleanfalse
selectedbooleanfalse
indexThe index position of the tile within a verification grid that is used to determine the selection keyboard shortcut associated with the grid tilenumber0
singleTileViewModeA property that can be set if the grid tile is the only tile in the verification grid. This is useful for disabling selection events and styling.booleanfalse
requiredDecisionsRequiredDecision[][]
modelSubjectWrapper
isOverlappingbooleanfalse
tileTemplateHTMLTemplateElement
spectrogramSpectrogramComponent | undefined
templateContentHTMLDivElement
contentsWrapperHTMLDivElement
keyDownHandler
loadedHandler
loadedbooleanfalse
shortcutsstring[][]
intersectionObserverIntersectionObserver
taskCompletedboolean

Methods

NameParametersDescriptionReturn
focusAn override of the default HTMLElement focus() method so that tab index's and location is consistent.
updateSubject
NameDescriptionType
subjectSubjectWrapper
void
resetSettingsvoid
addDecision
NameDescriptionType
decisionDecision
SubjectChange
removeDecision
NameDescriptionType
decisionDecision
SubjectChange
skipUndecided
NameDescriptionType
hasVerificationTaskboolean
hasNewTagTaskboolean
requiredClassificationTagsTag[]
SubjectChange

Events

NameDescriptionType
oe-selected
oe-tile-loading
oe-tile-loaded

<oe-classification>

Attributes

NameDescriptionTypeDefault
tagTag
true-shortcutA shortcut key that when pressed will trigger a true classification decision to be emittedstring | undefined
false-shortcutA shortcut key that when pressed will trigger a false classification decision to be emittedstring | undefined
disabledDisables the decision button and prevents decision events from firingbooleanfalse
whenWhenPredicate

Properties

NameAttributeDescriptionTypeDefault
tagtagTag
trueShortcuttrue-shortcutA shortcut key that when pressed will trigger a true classification decision to be emittedstring | undefined
falseShortcutfalse-shortcutA shortcut key that when pressed will trigger a false classification decision to be emittedstring | undefined
trueDecisionButtonHTMLButtonElement
falseDecisionButtonHTMLButtonElement
decisionModelsPartial>
decisionConstructorConstructor
_decisionModelsPartial>{}
trueKeyboardShortcutKeyboardShortcut | undefined
falseKeyboardShortcutKeyboardShortcut | undefined
decisionEventNamestring"decision"
injectorVerificationGridInjector{ colorService: decisionColor, }
disableddisabledDisables the decision button and prevents decision events from firingbooleanfalse
whenwhenWhenPredicate
isMobileToggles the decision button in and out of mobile compatibility when decision buttons are rendered in a mobile context, they should be larger, and without shortcut keysbooleanfalse
verificationGridVerificationGridComponent | undefined
shouldEmitNextbooleantrue
keyboardHeldDownbooleanfalse
keyUpHandler
keyDownHandler

Methods

NameParametersDescriptionReturn
shortcutKeysKeyboardShortcut[]
handleShortcutKey
NameDescriptionType
eventKeyboardEvent
void
isShortcutKey
NameDescriptionType
eventKeyboardEvent
boolean
emitDecision
NameDescriptionType
valueDecision[]
void

Events

NameDescriptionType
decision

Slots

NameDescription
(default)Additional content to be displayed in the decision groups title

CSS Shadow Parts

NameDescription
true-decision-buttonStyling selector to target the true decision button
false-decision-buttonStyling selector to target the false decision button

<oe-skip>

Attributes

NameDescriptionTypeDefault
verifiedDecisionOptions
additional-tagsValue that will be added to the oe-additional-tags columnTag[][]
shortcutA keyboard key that when pressed will act as a click event on the buttonstring""
disabledDisables the decision button and prevents decision events from firingbooleanfalse
whenWhenPredicate

Properties

NameAttributeDescriptionTypeDefault
verifiedverifiedDecisionOptions
additionalTagsadditional-tagsValue that will be added to the oe-additional-tags columnTag[][]
shortcutshortcutA keyboard key that when pressed will act as a click event on the buttonstring""
decisionButtonHTMLButtonElement
decisionConstructorConstructor
isTaskReturns a boolean indicating if using this verification component creates a verification task.boolean
decisionEventNamestring"decision"
injectorVerificationGridInjector{ colorService: decisionColor, }
disableddisabledDisables the decision button and prevents decision events from firingbooleanfalse
whenwhenWhenPredicate
isMobileToggles the decision button in and out of mobile compatibility when decision buttons are rendered in a mobile context, they should be larger, and without shortcut keysbooleanfalse
verificationGridVerificationGridComponent | undefined
shouldEmitNextbooleantrue
keyboardHeldDownbooleanfalse
keyUpHandler
keyDownHandler

Methods

NameParametersDescriptionReturn
shortcutKeysKeyboardShortcut[]
handleShortcutKey
NameDescriptionType
eventKeyboardEvent
void
isShortcutKey
NameDescriptionType
eventKeyboardEvent
boolean
handleDecisionvoid
emitDecision
NameDescriptionType
valueDecision[]
void

Events

NameDescriptionType
decision

Slots

NameDescription
(default)Additional content to be displayed in the decision button

CSS Shadow Parts

NameDescription
decision-buttonThe button that triggers the decision

<oe-tag-prompt>

Attributes

NameDescriptionTypeDefault
shortcutstring""
searchTypeaheadCallback
disabledDisables the decision button and prevents decision events from firingbooleanfalse
whenWhenPredicate

Properties

NameAttributeDescriptionTypeDefault
shortcutshortcutstring""
searchsearchTypeaheadCallback
tagPopoverHTMLDialogElement
tagTypeaheadTypeaheadComponent
decisionConstructorConstructor
decisionEventNamestring"decision"
injectorVerificationGridInjector{ colorService: decisionColor, }
disableddisabledDisables the decision button and prevents decision events from firingbooleanfalse
whenwhenWhenPredicate
isMobileToggles the decision button in and out of mobile compatibility when decision buttons are rendered in a mobile context, they should be larger, and without shortcut keysbooleanfalse
verificationGridVerificationGridComponent | undefined
shouldEmitNextbooleantrue
keyboardHeldDownbooleanfalse
keyUpHandler
keyDownHandler

Methods

NameParametersDescriptionReturn
closeClose the tag prompt popovervoid
handleShortcutKey
NameDescriptionType
eventKeyboardEvent
void
isShortcutKey
NameDescriptionType
eventKeyboardEvent
boolean
shortcutKeysKeyboardShortcut[]
emitDecision
NameDescriptionType
valueDecision[]
void

Events

NameDescriptionType
decision

<oe-verification>

Attributes

NameDescriptionTypeDefault
verifiedDecisionOptions
additional-tagsValue that will be added to the oe-additional-tags columnTag[][]
shortcutA keyboard key that when pressed will act as a click event on the buttonstring""
disabledDisables the decision button and prevents decision events from firingbooleanfalse
whenWhenPredicate

Properties

NameAttributeDescriptionTypeDefault
verifiedverifiedDecisionOptions
additionalTagsadditional-tagsValue that will be added to the oe-additional-tags columnTag[][]
shortcutshortcutA keyboard key that when pressed will act as a click event on the buttonstring""
decisionButtonHTMLButtonElement
decisionConstructorConstructor
isTaskReturns a boolean indicating if using this verification component creates a verification task.boolean
decisionEventNamestring"decision"
injectorVerificationGridInjector{ colorService: decisionColor, }
disableddisabledDisables the decision button and prevents decision events from firingbooleanfalse
whenwhenWhenPredicate
isMobileToggles the decision button in and out of mobile compatibility when decision buttons are rendered in a mobile context, they should be larger, and without shortcut keysbooleanfalse
verificationGridVerificationGridComponent | undefined
shouldEmitNextbooleantrue
keyboardHeldDownbooleanfalse
keyUpHandler
keyDownHandler

Methods

NameParametersDescriptionReturn
shortcutKeysKeyboardShortcut[]
handleShortcutKey
NameDescriptionType
eventKeyboardEvent
void
isShortcutKey
NameDescriptionType
eventKeyboardEvent
boolean
handleDecisionvoid
emitDecision
NameDescriptionType
valueDecision[]
void

Events

NameDescriptionType
decision

Slots

NameDescription
(default)Additional content to be displayed in the decision button

CSS Shadow Parts

NameDescription
decision-buttonThe button that triggers the decision