/** * @typedef MenuItem * @property {string} name * @property {string} [value] * @property {Record} [children] * @property {() => void} [handler] */ export default class SeriesListMenu extends ContextMenuContainer { /** * @param {unknown} position * @param {unknown} bbox * @param {{ type: string, options: Record, uid: string, }} track */ getConfigureSeriesMenu(position: unknown, bbox: unknown, track: { type: string; options: Record; uid: string; }): React.JSX.Element | null; /** * Return a list of track types that can be used * with the data for this track * * @param {Object} position The position where to draw ths menu (e.g. {left: 42, top: 88}) * * @param {Object} bbox * The bounding box of the parent menu, used to determine whether * to draw the child menu on the left or the right * * @param {{ uid: string, type: string, datatype: string }} track The track definition for this series (as in the viewconf) */ getTrackTypeItems(position: Object, bbox: Object, track: { uid: string; type: string; datatype: string; }): React.JSX.Element; getSubmenu(): React.JSX.Element | null; getDivideByMenuItem(): React.JSX.Element; componentWillUnmount(): void; } export type ContextMenuHandler = { label: string; onClick: (evt: unknown, onTrackOptionsChanged: (options: Record) => void) => void; }; export type MenuItem = { name: string; value?: string | undefined; children?: Record | undefined; handler?: (() => void) | undefined; }; import ContextMenuContainer from './ContextMenuContainer'; import React from 'react';