diff --git a/packages/dashboard-core-plugins/src/events/TabEvent.ts b/packages/dashboard-core-plugins/src/events/TabEvent.ts index 6e5e13b71..d67c3f552 100644 --- a/packages/dashboard-core-plugins/src/events/TabEvent.ts +++ b/packages/dashboard-core-plugins/src/events/TabEvent.ts @@ -1,15 +1,6 @@ -class TabEvent { - static focus = 'TabEvent.focus'; - - static blur = 'TabEvent.blur'; - - static openPQObject = 'TabEvent.openPQObject'; - - static openControl = 'TabEvent.openControl'; - - static reload = 'TabEvent.reload'; - - static clearAllFilters = 'TabEvent.clearAllFilters'; -} +const TabEvent = { + focus: 'TabEvent.focus', + blur: 'TabEvent.blur', +} as const; export default TabEvent; diff --git a/packages/dashboard-core-plugins/src/events/TabEventMap.ts b/packages/dashboard-core-plugins/src/events/TabEventMap.ts new file mode 100644 index 000000000..ce371f55b --- /dev/null +++ b/packages/dashboard-core-plugins/src/events/TabEventMap.ts @@ -0,0 +1,12 @@ +import { ValueOf } from '@deephaven/utils'; +import TabEvent from './TabEvent'; + +export type TabEventType = ValueOf; + +export interface TabEventMap + extends Record void> { + [TabEvent.focus]: () => void; + [TabEvent.blur]: () => void; +} + +export default TabEventMap;