@deephaven/plugin 1.1.2-beta.5 → 1.1.2-bisect-12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,6 @@ export declare const PluginType: Readonly<{
9
9
  WIDGET_PLUGIN: "WidgetPlugin";
10
10
  TABLE_PLUGIN: "TablePlugin";
11
11
  THEME_PLUGIN: "ThemePlugin";
12
- ELEMENT_PLUGIN: "ElementPlugin";
13
12
  }>;
14
13
  /**
15
14
  * @deprecated Use DashboardPlugin instead
@@ -170,17 +169,5 @@ export interface ThemePlugin extends Plugin {
170
169
  }
171
170
  /** Type guard to check if given plugin is a `ThemePlugin` */
172
171
  export declare function isThemePlugin(plugin: PluginModule): plugin is ThemePlugin;
173
- export type ElementName = string;
174
- /** A mapping of element names to their React components. */
175
- export type ElementPluginMappingDefinition = Record<ElementName, React.ComponentType>;
176
- export type ElementMap = ReadonlyMap<ElementName, React.ComponentType>;
177
- /** An element plugin is used by deephaven.ui to render custom components
178
- * The mapping contains the element names as keys and the React components as values.
179
- */
180
- export interface ElementPlugin extends Plugin {
181
- type: typeof PluginType.ELEMENT_PLUGIN;
182
- mapping: ElementPluginMappingDefinition;
183
- }
184
- export declare function isElementPlugin(plugin: PluginModule): plugin is ElementPlugin;
185
172
  export declare function isPlugin(plugin: unknown): plugin is Plugin;
186
173
  //# sourceMappingURL=PluginTypes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PluginTypes.d.ts","sourceRoot":"","sources":["../src/PluginTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,aAAa,EACnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,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LE_PLUGIN: 'TablePlugin',
6
- THEME_PLUGIN: 'ThemePlugin',
7
- ELEMENT_PLUGIN: 'ElementPlugin'
6
+ THEME_PLUGIN: 'ThemePlugin'
8
7
  });
9
8
 
10
9
  /**
@@ -69,17 +68,7 @@ export function isAuthPlugin(plugin) {
69
68
  export function isThemePlugin(plugin) {
70
69
  return 'type' in plugin && plugin.type === PluginType.THEME_PLUGIN;
71
70
  }
72
-
73
- /** A mapping of element names to their React components. */
74
-
75
- /** An element plugin is used by deephaven.ui to render custom components
76
- * The mapping contains the element names as keys and the React components as values.
77
- */
78
-
79
- export function isElementPlugin(plugin) {
80
- return 'type' in plugin && plugin.type === PluginType.ELEMENT_PLUGIN;
81
- }
82
71
  export function isPlugin(plugin) {
83
- return isDashboardPlugin(plugin) || isAuthPlugin(plugin) || isTablePlugin(plugin) || isThemePlugin(plugin) || isWidgetPlugin(plugin) || isElementPlugin(plugin);
72
+ return isDashboardPlugin(plugin) || isAuthPlugin(plugin) || isTablePlugin(plugin) || isThemePlugin(plugin) || isWidgetPlugin(plugin);
84
73
  }
85
74
  //# sourceMappingURL=PluginTypes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PluginTypes.js","names":["PluginType","Object","freeze","AUTH_PLUGIN","DASHBOARD_PLUGIN","WIDGET_PLUGIN","TABLE_PLUGIN","THEME_PLUGIN","ELEMENT_PLUGIN","isLegacyDashboardPlugin","plugin","isLegacyAuthPlugin","isLegacyTablePlugin","isLegacyPlugin","isDashboardPlugin","type","isWidgetPlugin","isTablePlugin","isAuthPlugin","isThemePlugin","isElementPlugin","isPlugin"],"sources":["../src/PluginTypes.ts"],"sourcesContent":["import type { BaseThemeType } from '@deephaven/components';\nimport {\n type EventEmitter,\n type ItemContainer,\n} from '@deephaven/golden-layout';\nimport type { dh } from '@deephaven/jsapi-types';\nimport type { IconDefinition } from '@fortawesome/fontawesome-common-types';\nimport type { TablePluginComponent } from './TablePlugin';\n\nexport const PluginType = Object.freeze({\n AUTH_PLUGIN: 'AuthPlugin',\n DASHBOARD_PLUGIN: 'DashboardPlugin',\n WIDGET_PLUGIN: 'WidgetPlugin',\n TABLE_PLUGIN: 'TablePlugin',\n THEME_PLUGIN: 'ThemePlugin',\n ELEMENT_PLUGIN: 'ElementPlugin',\n});\n\n/**\n * @deprecated Use DashboardPlugin instead\n */\nexport type LegacyDashboardPlugin = { DashboardPlugin: React.ComponentType };\n\nexport function isLegacyDashboardPlugin(\n plugin: PluginModule\n): plugin is LegacyDashboardPlugin {\n return 'DashboardPlugin' in plugin;\n}\n\n/**\n * @deprecated Use AuthPlugin instead\n */\nexport type LegacyAuthPlugin = {\n AuthPlugin: {\n Component: React.ComponentType<AuthPluginProps>;\n isAvailable: (authHandlers: string[], authConfig: AuthConfigMap) => boolean;\n };\n};\n\nexport function isLegacyAuthPlugin(\n plugin: PluginModule\n): plugin is LegacyAuthPlugin {\n return 'AuthPlugin' in plugin;\n}\n\nexport type PluginModuleMap = Map<string, VersionedPluginModule>;\n\n/**\n * @deprecated Use TablePlugin instead\n */\nexport type LegacyTablePlugin = {\n TablePlugin: TablePluginComponent;\n};\n\nexport function isLegacyTablePlugin(\n plugin: PluginModule\n): plugin is LegacyTablePlugin {\n return 'TablePlugin' in plugin;\n}\n\n/**\n * @deprecated Use Plugin instead\n */\nexport type LegacyPlugin =\n | LegacyDashboardPlugin\n | LegacyAuthPlugin\n | LegacyTablePlugin;\n\nexport function isLegacyPlugin(plugin: unknown): plugin is LegacyPlugin {\n return (\n isLegacyDashboardPlugin(plugin as PluginModule) ||\n isLegacyAuthPlugin(plugin as PluginModule) ||\n isLegacyTablePlugin(plugin as PluginModule)\n );\n}\n\nexport type PluginModule = Plugin | LegacyPlugin;\n\nexport type VersionedPluginModule = PluginModule & { version?: string };\n\nexport interface Plugin {\n /**\n * The name of the plugin. This will be used as an identifier for the plugin and should be unique.\n */\n name: string;\n\n /**\n * The type of plugin.\n */\n type: (typeof PluginType)[keyof typeof PluginType];\n}\n\n/**\n * A plugin that will be mounted to the dashboard.\n */\nexport interface DashboardPlugin extends Plugin {\n type: typeof PluginType.DASHBOARD_PLUGIN;\n /**\n * The component to mount for the dashboard plugin.\n * This component is used to initialize the plugin and will only be mounted to the dashboard once.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n component: React.ComponentType<any>;\n}\n\nexport function isDashboardPlugin(\n plugin: PluginModule\n): plugin is DashboardPlugin {\n return 'type' in plugin && plugin.type === PluginType.DASHBOARD_PLUGIN;\n}\n\nexport interface WidgetComponentProps<T = unknown> {\n /**\n * Function to fetch the widget data.\n * @returns A promise that resolves to the widget data.\n */\n fetch: () => Promise<T>;\n /**\n * A unique identifier for the widget.\n * dh.ui uses this to identify widgets within a dashboard or panel.\n */\n __dhId?: string;\n}\n\nexport interface WidgetPanelProps<T = unknown> extends WidgetComponentProps<T> {\n metadata?: dh.ide.VariableDescriptor;\n localDashboardId: string;\n glContainer: ItemContainer;\n glEventHub: EventEmitter;\n}\n\nexport interface WidgetPlugin<T = unknown> extends Plugin {\n type: typeof PluginType.WIDGET_PLUGIN;\n /**\n * The component that can render the widget types the plugin supports.\n *\n * If the widget should be opened as a panel by itself (determined by the UI),\n * then `panelComponent` will be used instead.\n * The component will be wrapped in a default panel if `panelComponent` is not provided.\n */\n component: React.ComponentType<WidgetComponentProps<T>>;\n\n /**\n * The server widget types that this plugin will handle.\n */\n supportedTypes: string | string[];\n\n /**\n * The title to display for widgets handled by the plugin.\n * This is a user friendly name to denote the type of widget.\n * Does not have to be unique across plugins.\n * If not specified, the plugin name will be used as the title.\n *\n * A plugin may have a name of `@deehaven/pandas` and a title of `Pandas`.\n * This way, the user will just see `Pandas panel` instead of `@deephaven/pandas panel`.\n */\n title?: string;\n\n /**\n * The component to use if the widget should be mounted as a panel.\n * If omitted, the default panel will be used.\n * This provides access to panel events such as onHide and onTabFocus.\n *\n * See @deephaven/dashboard-core-plugins WidgetPanel for the component that should be used here.\n */\n panelComponent?: React.ComponentType<WidgetPanelProps<T>>;\n\n /**\n * The icon to display next to the console button.\n * If a react node is provided (including a string), it will be rendered directly.\n * If no icon is specified, the default widget icon will be used.\n */\n icon?: IconDefinition | React.ReactElement<unknown>;\n}\n\nexport function isWidgetPlugin(plugin: PluginModule): plugin is WidgetPlugin {\n return 'type' in plugin && plugin.type === PluginType.WIDGET_PLUGIN;\n}\n\nexport interface TablePlugin extends Plugin {\n type: typeof PluginType.TABLE_PLUGIN;\n component: TablePluginComponent;\n}\n\nexport function isTablePlugin(plugin: PluginModule): plugin is TablePlugin {\n return 'type' in plugin && plugin.type === PluginType.TABLE_PLUGIN;\n}\n\n/**\n * Map from auth config keys to their values\n * E.g. Map { AuthHandlers → \"io.deephaven.auth.AnonymousAuthenticationHandler\" }\n */\nexport type AuthConfigMap = Map<string, string>;\n\n/**\n * Props for the auth plugin component to render\n */\nexport type AuthPluginProps = {\n /** Map from config keys to their values */\n authConfigValues: AuthConfigMap;\n\n /**\n * The children to render after authentication is completed.\n */\n children: React.ReactNode;\n};\n\nexport type AuthPluginComponent = React.ComponentType<AuthPluginProps>;\n\nexport interface AuthPlugin extends Plugin {\n type: typeof PluginType.AUTH_PLUGIN;\n /**\n * The component to mount if the AuthPlugin is available\n */\n component: AuthPluginComponent;\n /**\n * Whether the auth plugin is available given the current configuration\n */\n isAvailable: (authHandlers: string[], authConfig: AuthConfigMap) => boolean;\n}\n\nexport function isAuthPlugin(plugin: PluginModule): plugin is AuthPlugin {\n return 'type' in plugin && plugin.type === PluginType.AUTH_PLUGIN;\n}\n\nexport interface ThemeConfig {\n name: string;\n baseTheme?: BaseThemeType;\n styleContent: string;\n}\n\nexport interface ThemePlugin extends Plugin {\n type: typeof PluginType.THEME_PLUGIN;\n themes: ThemeConfig | ThemeConfig[];\n}\n\n/** Type guard to check if given plugin is a `ThemePlugin` */\nexport function isThemePlugin(plugin: PluginModule): plugin is ThemePlugin {\n return 'type' in plugin && plugin.type === PluginType.THEME_PLUGIN;\n}\n\nexport type ElementName = string;\n\n/** A mapping of element names to their React components. */\nexport type ElementPluginMappingDefinition = Record<\n ElementName,\n React.ComponentType\n>;\n\nexport type ElementMap = ReadonlyMap<ElementName, React.ComponentType>;\n\n/** An element plugin is used by deephaven.ui to render custom components\n * The mapping contains the element names as keys and the React components as values.\n */\nexport interface ElementPlugin extends Plugin {\n type: typeof PluginType.ELEMENT_PLUGIN;\n mapping: ElementPluginMappingDefinition;\n}\n\nexport function isElementPlugin(plugin: PluginModule): plugin is ElementPlugin {\n return 'type' in plugin && plugin.type === PluginType.ELEMENT_PLUGIN;\n}\n\nexport function isPlugin(plugin: unknown): plugin is Plugin {\n return (\n isDashboardPlugin(plugin as PluginModule) ||\n isAuthPlugin(plugin as PluginModule) ||\n isTablePlugin(plugin as PluginModule) ||\n isThemePlugin(plugin as PluginModule) ||\n isWidgetPlugin(plugin as PluginModule) ||\n isElementPlugin(plugin as PluginModule)\n );\n}\n"],"mappings":"AASA,OAAO,IAAMA,UAAU,GAAGC,MAAM,CAACC,MAAM,CAAC;EACtCC,WAAW,EAAE,YAAY;EACzBC,gBAAgB,EAAE,iBAAiB;EACnCC,aAAa,EAAE,cAAc;EAC7BC,YAAY,EAAE,aAAa;EAC3BC,YAAY,EAAE,aAAa;EAC3BC,cAAc,EAAE;AAClB,CAAC,CAAC;;AAEF;AACA;AACA;;AAGA,OAAO,SAASC,uBAAuBA,CACrCC,MAAoB,EACa;EACjC,OAAO,iBAAiB,IAAIA,MAAM;AACpC;;AAEA;AACA;AACA;;AAQA,OAAO,SAASC,kBAAkBA,CAChCD,MAAoB,EACQ;EAC5B,OAAO,YAAY,IAAIA,MAAM;AAC/B;;AAIA;AACA;AACA;;AAKA,OAAO,SAASE,mBAAmBA,CACjCF,MAAoB,EACS;EAC7B,OAAO,aAAa,IAAIA,MAAM;AAChC;;AAEA;AACA;AACA;;AAMA,OAAO,SAASG,cAAcA,CAACH,MAAe,EAA0B;EACtE,OACED,uBAAuB,CAACC,MAAsB,CAAC,IAC/CC,kBAAkB,CAACD,MAAsB,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":3,"file":"PluginTypes.js","names":["PluginType","Object","freeze","AUTH_PLUGIN","DASHBOARD_PLUGIN","WIDGET_PLUGIN","TABLE_PLUGIN","THEME_PLUGIN","isLegacyDashboardPlugin","plugin","isLegacyAuthPlugin","isLegacyTablePlugin","isLegacyPlugin","isDashboardPlugin","type","isWidgetPlugin","isTablePlugin","isAuthPlugin","isThemePlugin","isPlugin"],"sources":["../src/PluginTypes.ts"],"sourcesContent":["import type { BaseThemeType } from '@deephaven/components';\nimport {\n type EventEmitter,\n type ItemContainer,\n} from '@deephaven/golden-layout';\nimport type { dh } from '@deephaven/jsapi-types';\nimport type { IconDefinition } from '@fortawesome/fontawesome-common-types';\nimport type { TablePluginComponent } from './TablePlugin';\n\nexport const PluginType = Object.freeze({\n AUTH_PLUGIN: 'AuthPlugin',\n DASHBOARD_PLUGIN: 'DashboardPlugin',\n WIDGET_PLUGIN: 'WidgetPlugin',\n TABLE_PLUGIN: 'TablePlugin',\n THEME_PLUGIN: 'ThemePlugin',\n});\n\n/**\n * @deprecated Use DashboardPlugin instead\n */\nexport type LegacyDashboardPlugin = { DashboardPlugin: React.ComponentType };\n\nexport function isLegacyDashboardPlugin(\n plugin: PluginModule\n): plugin is LegacyDashboardPlugin {\n return 'DashboardPlugin' in plugin;\n}\n\n/**\n * @deprecated Use AuthPlugin instead\n */\nexport type LegacyAuthPlugin = {\n AuthPlugin: {\n Component: React.ComponentType<AuthPluginProps>;\n isAvailable: (authHandlers: string[], authConfig: AuthConfigMap) => boolean;\n };\n};\n\nexport function isLegacyAuthPlugin(\n plugin: PluginModule\n): plugin is LegacyAuthPlugin {\n return 'AuthPlugin' in plugin;\n}\n\nexport type PluginModuleMap = Map<string, VersionedPluginModule>;\n\n/**\n * @deprecated Use TablePlugin instead\n */\nexport type LegacyTablePlugin = {\n TablePlugin: TablePluginComponent;\n};\n\nexport function isLegacyTablePlugin(\n plugin: PluginModule\n): plugin is LegacyTablePlugin {\n return 'TablePlugin' in plugin;\n}\n\n/**\n * @deprecated Use Plugin instead\n */\nexport type LegacyPlugin =\n | LegacyDashboardPlugin\n | LegacyAuthPlugin\n | LegacyTablePlugin;\n\nexport function isLegacyPlugin(plugin: unknown): plugin is LegacyPlugin {\n return (\n isLegacyDashboardPlugin(plugin as PluginModule) ||\n isLegacyAuthPlugin(plugin as PluginModule) ||\n isLegacyTablePlugin(plugin as PluginModule)\n );\n}\n\nexport type PluginModule = Plugin | LegacyPlugin;\n\nexport type VersionedPluginModule = PluginModule & { version?: string };\n\nexport interface Plugin {\n /**\n * The name of the plugin. This will be used as an identifier for the plugin and should be unique.\n */\n name: string;\n\n /**\n * The type of plugin.\n */\n type: (typeof PluginType)[keyof typeof PluginType];\n}\n\n/**\n * A plugin that will be mounted to the dashboard.\n */\nexport interface DashboardPlugin extends Plugin {\n type: typeof PluginType.DASHBOARD_PLUGIN;\n /**\n * The component to mount for the dashboard plugin.\n * This component is used to initialize the plugin and will only be mounted to the dashboard once.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n component: React.ComponentType<any>;\n}\n\nexport function isDashboardPlugin(\n plugin: PluginModule\n): plugin is DashboardPlugin {\n return 'type' in plugin && plugin.type === PluginType.DASHBOARD_PLUGIN;\n}\n\nexport interface WidgetComponentProps<T = unknown> {\n /**\n * Function to fetch the widget data.\n * @returns A promise that resolves to the widget data.\n */\n fetch: () => Promise<T>;\n /**\n * A unique identifier for the widget.\n * dh.ui uses this to identify widgets within a dashboard or panel.\n */\n __dhId?: string;\n}\n\nexport interface WidgetPanelProps<T = unknown> extends WidgetComponentProps<T> {\n metadata?: dh.ide.VariableDescriptor;\n localDashboardId: string;\n glContainer: ItemContainer;\n glEventHub: EventEmitter;\n}\n\nexport interface WidgetPlugin<T = unknown> extends Plugin {\n type: typeof PluginType.WIDGET_PLUGIN;\n /**\n * The component that can render the widget types the plugin supports.\n *\n * If the widget should be opened as a panel by itself (determined by the UI),\n * then `panelComponent` will be used instead.\n * The component will be wrapped in a default panel if `panelComponent` is not provided.\n */\n component: React.ComponentType<WidgetComponentProps<T>>;\n\n /**\n * The server widget types that this plugin will handle.\n */\n supportedTypes: string | string[];\n\n /**\n * The title to display for widgets handled by the plugin.\n * This is a user friendly name to denote the type of widget.\n * Does not have to be unique across plugins.\n * If not specified, the plugin name will be used as the title.\n *\n * A plugin may have a name of `@deehaven/pandas` and a title of `Pandas`.\n * This way, the user will just see `Pandas panel` instead of `@deephaven/pandas panel`.\n */\n title?: string;\n\n /**\n * The component to use if the widget should be mounted as a panel.\n * If omitted, the default panel will be used.\n * This provides access to panel events such as onHide and onTabFocus.\n *\n * See @deephaven/dashboard-core-plugins WidgetPanel for the component that should be used here.\n */\n panelComponent?: React.ComponentType<WidgetPanelProps<T>>;\n\n /**\n * The icon to display next to the console button.\n * If a react node is provided (including a string), it will be rendered directly.\n * If no icon is specified, the default widget icon will be used.\n */\n icon?: IconDefinition | React.ReactElement<unknown>;\n}\n\nexport function isWidgetPlugin(plugin: PluginModule): plugin is WidgetPlugin {\n return 'type' in plugin && plugin.type === PluginType.WIDGET_PLUGIN;\n}\n\nexport interface TablePlugin extends Plugin {\n type: typeof PluginType.TABLE_PLUGIN;\n component: TablePluginComponent;\n}\n\nexport function isTablePlugin(plugin: PluginModule): plugin is TablePlugin {\n return 'type' in plugin && plugin.type === PluginType.TABLE_PLUGIN;\n}\n\n/**\n * Map from auth config keys to their values\n * E.g. Map { AuthHandlers → \"io.deephaven.auth.AnonymousAuthenticationHandler\" }\n */\nexport type AuthConfigMap = Map<string, string>;\n\n/**\n * Props for the auth plugin component to render\n */\nexport type AuthPluginProps = {\n /** Map from config keys to their values */\n authConfigValues: AuthConfigMap;\n\n /**\n * The children to render after authentication is completed.\n */\n children: React.ReactNode;\n};\n\nexport type AuthPluginComponent = React.ComponentType<AuthPluginProps>;\n\nexport interface AuthPlugin extends Plugin {\n type: typeof PluginType.AUTH_PLUGIN;\n /**\n * The component to mount if the AuthPlugin is available\n */\n component: AuthPluginComponent;\n /**\n * Whether the auth plugin is available given the current configuration\n */\n isAvailable: (authHandlers: string[], authConfig: AuthConfigMap) => boolean;\n}\n\nexport function isAuthPlugin(plugin: PluginModule): plugin is AuthPlugin {\n return 'type' in plugin && plugin.type === PluginType.AUTH_PLUGIN;\n}\n\nexport interface ThemeConfig {\n name: string;\n baseTheme?: BaseThemeType;\n styleContent: string;\n}\n\nexport interface ThemePlugin extends Plugin {\n type: typeof PluginType.THEME_PLUGIN;\n themes: ThemeConfig | ThemeConfig[];\n}\n\n/** Type guard to check if given plugin is a `ThemePlugin` */\nexport function isThemePlugin(plugin: PluginModule): plugin is ThemePlugin {\n return 'type' in plugin && plugin.type === PluginType.THEME_PLUGIN;\n}\n\nexport function isPlugin(plugin: unknown): plugin is Plugin {\n return (\n isDashboardPlugin(plugin as PluginModule) ||\n isAuthPlugin(plugin as PluginModule) ||\n isTablePlugin(plugin as PluginModule) ||\n isThemePlugin(plugin as PluginModule) ||\n isWidgetPlugin(plugin as PluginModule)\n );\n}\n"],"mappings":"AASA,OAAO,IAAMA,UAAU,GAAGC,MAAM,CAACC,MAAM,CAAC;EACtCC,WAAW,EAAE,YAAY;EACzBC,gBAAgB,EAAE,iBAAiB;EACnCC,aAAa,EAAE,cAAc;EAC7BC,YAAY,EAAE,aAAa;EAC3BC,YAAY,EAAE;AAChB,CAAC,CAAC;;AAEF;AACA;AACA;;AAGA,OAAO,SAASC,uBAAuBA,CACrCC,MAAoB,EACa;EACjC,OAAO,iBAAiB,IAAIA,MAAM;AACpC;;AAEA;AACA;AACA;;AAQA,OAAO,SAASC,kBAAkBA,CAChCD,MAAoB,EACQ;EAC5B,OAAO,YAAY,IAAIA,MAAM;AAC/B;;AAIA;AACA;AACA;;AAKA,OAAO,SAASE,mBAAmBA,CACjCF,MAAoB,EACS;EAC7B,OAAO,aAAa,IAAIA,MAAM;AAChC;;AAEA;AACA;AACA;;AAMA,OAAO,SAASG,cAAcA,CAACH,MAAe,EAA0B;EACtE,OACED,uBAAuB,CAACC,MAAsB,CAAC,IAC/CC,kBAAkB,CAACD,MAAsB,CAAC,IAC1CE,mBAAmB,CAACF,MAAsB,CAAC;AAE/C;;AAkBA;AACA;AACA;;AAWA,OAAO,SAASI,iBAAiBA,CAC/BJ,MAAoB,EACO;EAC3B,OAAO,MAAM,IAAIA,MAAM,IAAIA,MAAM,CAACK,IAAI,KAAKd,UAAU,CAACI,gBAAgB;AACxE;AAkEA,OAAO,SAASW,cAAcA,CAACN,MAAoB,EAA0B;EAC3E,OAAO,MAAM,IAAIA,MAAM,IAAIA,MAAM,CAACK,IAAI,KAAKd,UAAU,CAACK,aAAa;AACrE;AAOA,OAAO,SAASW,aAAaA,CAACP,MAAoB,EAAyB;EACzE,OAAO,MAAM,IAAIA,MAAM,IAAIA,MAAM,CAACK,IAAI,KAAKd,UAAU,CAACM,YAAY;AACpE;;AAEA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAyBA,OAAO,SAASW,YAAYA,CAACR,MAAoB,EAAwB;EACvE,OAAO,MAAM,IAAIA,MAAM,IAAIA,MAAM,CAACK,IAAI,KAAKd,UAAU,CAACG,WAAW;AACnE;AAaA;AACA,OAAO,SAASe,aAAaA,CAACT,MAAoB,EAAyB;EACzE,OAAO,MAAM,IAAIA,MAAM,IAAIA,MAAM,CAACK,IAAI,KAAKd,UAAU,CAACO,YAAY;AACpE;AAEA,OAAO,SAASY,QAAQA,CAACV,MAAe,EAAoB;EAC1D,OACEI,iBAAiB,CAACJ,MAAsB,CAAC,IACzCQ,YAAY,CAACR,MAAsB,CAAC,IACpCO,aAAa,CAACP,MAAsB,CAAC,IACrCS,aAAa,CAACT,MAAsB,CAAC,IACrCM,cAAc,CAACN,MAAsB,CAAC;AAE1C","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import { type ThemeData } from '@deephaven/components';
2
- import { type PluginModule, type PluginModuleMap, type ElementMap } from './PluginTypes';
2
+ import { type PluginModule, type PluginModuleMap } from './PluginTypes';
3
3
  export declare function pluginSupportsType(plugin: PluginModule | undefined, type: string): boolean;
4
4
  export declare function getIconForPlugin(plugin: PluginModule): React.ReactElement;
5
5
  /**
@@ -7,10 +7,4 @@ export declare function getIconForPlugin(plugin: PluginModule): React.ReactEleme
7
7
  * @param pluginMap
8
8
  */
9
9
  export declare function getThemeDataFromPlugins(pluginMap: PluginModuleMap): ThemeData[];
10
- /**
11
- * Get a mapping of element names to their React components from the given plugin map.
12
- * @param pluginMap The plugin map to extract element plugins from.
13
- * @returns A Map of element names to their React components.
14
- */
15
- export declare function getPluginsElementMap(pluginMap: PluginModuleMap): ElementMap;
16
10
  //# sourceMappingURL=PluginUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PluginUtils.d.ts","sourceRoot":"","sources":["../src/PluginUtils.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGpE,OAAO,EACL,KAAK,YAAY,EAEjB,KAAK,eAAe,EAKpB,KAAK,UAAU,EAChB,MAAM,eAAe,CAAC;AAIvB,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,YAAY,GAAG,SAAS,EAChC,IAAI,EAAE,MAAM,GACX,OAAO,CAMT;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,KAAK,CAAC,YAAY,CAiBzE;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,eAAe,GACzB,SAAS,EAAE,CA0Bb;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,eAAe,GAAG,UAAU,CAW3E"}
1
+ {"version":3,"file":"PluginUtils.d.ts","sourceRoot":"","sources":["../src/PluginUtils.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGpE,OAAO,EACL,KAAK,YAAY,EAEjB,KAAK,eAAe,EAGrB,MAAM,eAAe,CAAC;AAIvB,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,YAAY,GAAG,SAAS,EAChC,IAAI,EAAE,MAAM,GACX,OAAO,CAMT;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,KAAK,CAAC,YAAY,CAiBzE;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,eAAe,GACzB,SAAS,EAAE,CA0Bb"}
@@ -3,7 +3,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
3
  import { getThemeKey } from '@deephaven/components';
4
4
  import { vsPreview } from '@deephaven/icons';
5
5
  import Log from '@deephaven/log';
6
- import { isWidgetPlugin, isThemePlugin, isElementPlugin } from "./PluginTypes.js";
6
+ import { isWidgetPlugin, isThemePlugin } from "./PluginTypes.js";
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
8
  var log = Log.module('@deephaven/plugin.PluginUtils');
9
9
  export function pluginSupportsType(plugin, type) {
@@ -60,18 +60,4 @@ export function getThemeDataFromPlugins(pluginMap) {
60
60
  });
61
61
  }).flat();
62
62
  }
63
-
64
- /**
65
- * Get a mapping of element names to their React components from the given plugin map.
66
- * @param pluginMap The plugin map to extract element plugins from.
67
- * @returns A Map of element names to their React components.
68
- */
69
- export function getPluginsElementMap(pluginMap) {
70
- var elementPluginEntries = [...pluginMap.entries()].filter(entry => isElementPlugin(entry[1]) && entry[1].mapping != null);
71
- log.debug('Getting element plugin mapping', elementPluginEntries);
72
- return new Map(elementPluginEntries.flatMap(_ref3 => {
73
- var [, plugin] = _ref3;
74
- return Object.entries(plugin.mapping);
75
- }));
76
- }
77
63
  //# sourceMappingURL=PluginUtils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PluginUtils.js","names":["isValidElement","FontAwesomeIcon","getThemeKey","vsPreview","Log","isWidgetPlugin","isThemePlugin","isElementPlugin","jsx","_jsx","log","module","pluginSupportsType","plugin","type","supportedTypes","flat","some","t","getIconForPlugin","defaultIcon","icon","getThemeDataFromPlugins","pluginMap","themePluginEntries","entries","filter","entry","debug","map","_ref","pluginName","configs","Array","isArray","themes","_ref2","name","baseTheme","styleContent","baseThemeKey","concat","themeKey","getPluginsElementMap","elementPluginEntries","mapping","Map","flatMap","_ref3","Object"],"sources":["../src/PluginUtils.tsx"],"sourcesContent":["import { isValidElement } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { getThemeKey, type ThemeData } from '@deephaven/components';\nimport { vsPreview } from '@deephaven/icons';\nimport Log from '@deephaven/log';\nimport {\n type PluginModule,\n isWidgetPlugin,\n type PluginModuleMap,\n type ThemePlugin,\n isThemePlugin,\n isElementPlugin,\n type ElementPlugin,\n type ElementMap,\n} from './PluginTypes';\n\nconst log = Log.module('@deephaven/plugin.PluginUtils');\n\nexport function pluginSupportsType(\n plugin: PluginModule | undefined,\n type: string\n): boolean {\n if (plugin == null || !isWidgetPlugin(plugin)) {\n return false;\n }\n\n return [plugin.supportedTypes].flat().some(t => t === type);\n}\n\nexport function getIconForPlugin(plugin: PluginModule): React.ReactElement {\n const defaultIcon = <FontAwesomeIcon icon={vsPreview} />;\n if (!isWidgetPlugin(plugin)) {\n return defaultIcon;\n }\n\n const { icon } = plugin;\n\n if (icon == null) {\n return defaultIcon;\n }\n\n if (isValidElement(icon)) {\n return icon;\n }\n\n return <FontAwesomeIcon icon={icon} />;\n}\n\n/**\n * Extract theme data from theme plugins in the given plugin map.\n * @param pluginMap\n */\nexport function getThemeDataFromPlugins(\n pluginMap: PluginModuleMap\n): ThemeData[] {\n const themePluginEntries = [...pluginMap.entries()].filter(\n (entry): entry is [string, ThemePlugin] => isThemePlugin(entry[1])\n );\n\n log.debug('Getting theme data from plugins', themePluginEntries);\n\n return themePluginEntries\n .map(([pluginName, plugin]) => {\n // Normalize to an array since config can be an array of configs or a\n // single config\n const configs = Array.isArray(plugin.themes)\n ? plugin.themes\n : [plugin.themes];\n\n return configs.map(\n ({ name, baseTheme, styleContent }) =>\n ({\n baseThemeKey: `default-${baseTheme ?? 'dark'}`,\n themeKey: getThemeKey(pluginName, name),\n name,\n styleContent,\n }) as const\n );\n })\n .flat();\n}\n\n/**\n * Get a mapping of element names to their React components from the given plugin map.\n * @param pluginMap The plugin map to extract element plugins from.\n * @returns A Map of element names to their React components.\n */\nexport function getPluginsElementMap(pluginMap: PluginModuleMap): ElementMap {\n const elementPluginEntries = [...pluginMap.entries()].filter(\n (entry): entry is [string, ElementPlugin] =>\n isElementPlugin(entry[1]) && entry[1].mapping != null\n );\n\n log.debug('Getting element plugin mapping', elementPluginEntries);\n\n return new Map(\n elementPluginEntries.flatMap(([, plugin]) => Object.entries(plugin.mapping))\n );\n}\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,OAAO;AACtC,SAASC,eAAe,QAAQ,gCAAgC;AAChE,SAASC,WAAW,QAAwB,uBAAuB;AACnE,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,OAAOC,GAAG,MAAM,gBAAgB;AAAC,SAG/BC,cAAc,EAGdC,aAAa,EACbC,eAAe;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAKjB,IAAMC,GAAG,GAAGN,GAAG,CAACO,MAAM,CAAC,+BAA+B,CAAC;AAEvD,OAAO,SAASC,kBAAkBA,CAChCC,MAAgC,EAChCC,IAAY,EACH;EACT,IAAID,MAAM,IAAI,IAAI,IAAI,CAACR,cAAc,CAACQ,MAAM,CAAC,EAAE;IAC7C,OAAO,KAAK;EACd;EAEA,OAAO,CAACA,MAAM,CAACE,cAAc,CAAC,CAACC,IAAI,CAAC,CAAC,CAACC,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAKJ,IAAI,CAAC;AAC7D;AAEA,OAAO,SAASK,gBAAgBA,CAACN,MAAoB,EAAsB;EACzE,IAAMO,WAAW,gBAAGX,IAAA,CAACR,eAAe;IAACoB,IAAI,EAAElB;EAAU,CAAE,CAAC;EACxD,IAAI,CAACE,cAAc,CAACQ,MAAM,CAAC,EAAE;IAC3B,OAAOO,WAAW;EACpB;EAEA,IAAM;IAAEC;EAAK,CAAC,GAAGR,MA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,oBAAoB,GAAG,CAAC,GAAGrB,SAAS,CAACE,OAAO,CAAC,CAAC,CAAC,CAACC,MAAM,CACzDC,KAAK,IACJpB,eAAe,CAACoB,KAAK,CAAC,CAAC,CAAC,CAAC,IAAIA,KAAK,CAAC,CAAC,CAAC,CAACkB,OAAO,IAAI,IACrD,CAAC;EAEDnC,GAAG,CAACkB,KAAK,CAAC,gCAAgC,EAAEgB,oBAAoB,CAAC;EAEjE,OAAO,IAAIE,GAAG,CACZF,oBAAoB,CAACG,OAAO,CAACC,KAAA;IAAA,IAAC,GAAGnC,MAAM,CAAC,GAAAmC,KAAA;IAAA,OAAKC,MAAM,CAACxB,OAAO,CAACZ,MAAM,CAACgC,OAAO,CAAC;EAAA,EAC7E,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"file":"PluginUtils.js","names":["isValidElement","FontAwesomeIcon","getThemeKey","vsPreview","Log","isWidgetPlugin","isThemePlugin","jsx","_jsx","log","module","pluginSupportsType","plugin","type","supportedTypes","flat","some","t","getIconForPlugin","defaultIcon","icon","getThemeDataFromPlugins","pluginMap","themePluginEntries","entries","filter","entry","debug","map","_ref","pluginName","configs","Array","isArray","themes","_ref2","name","baseTheme","styleContent","baseThemeKey","concat","themeKey"],"sources":["../src/PluginUtils.tsx"],"sourcesContent":["import { isValidElement } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { getThemeKey, type ThemeData } from '@deephaven/components';\nimport { vsPreview } from '@deephaven/icons';\nimport Log from '@deephaven/log';\nimport {\n type PluginModule,\n isWidgetPlugin,\n type PluginModuleMap,\n type ThemePlugin,\n isThemePlugin,\n} from './PluginTypes';\n\nconst log = Log.module('@deephaven/plugin.PluginUtils');\n\nexport function pluginSupportsType(\n plugin: PluginModule | undefined,\n type: string\n): boolean {\n if (plugin == null || !isWidgetPlugin(plugin)) {\n return false;\n }\n\n return [plugin.supportedTypes].flat().some(t => t === type);\n}\n\nexport function getIconForPlugin(plugin: PluginModule): React.ReactElement {\n const defaultIcon = <FontAwesomeIcon icon={vsPreview} />;\n if (!isWidgetPlugin(plugin)) {\n return defaultIcon;\n }\n\n const { icon } = plugin;\n\n if (icon == null) {\n return defaultIcon;\n }\n\n if (isValidElement(icon)) {\n return icon;\n }\n\n return <FontAwesomeIcon icon={icon} />;\n}\n\n/**\n * Extract theme data from theme plugins in the given plugin map.\n * @param pluginMap\n */\nexport function getThemeDataFromPlugins(\n pluginMap: PluginModuleMap\n): ThemeData[] {\n const themePluginEntries = [...pluginMap.entries()].filter(\n (entry): entry is [string, ThemePlugin] => isThemePlugin(entry[1])\n );\n\n log.debug('Getting theme data from plugins', themePluginEntries);\n\n return themePluginEntries\n .map(([pluginName, plugin]) => {\n // Normalize to an array since config can be an array of configs or a\n // single config\n const configs = Array.isArray(plugin.themes)\n ? plugin.themes\n : [plugin.themes];\n\n return configs.map(\n ({ name, baseTheme, styleContent }) =>\n ({\n baseThemeKey: `default-${baseTheme ?? 'dark'}`,\n themeKey: getThemeKey(pluginName, name),\n name,\n styleContent,\n }) as const\n );\n })\n .flat();\n}\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,OAAO;AACtC,SAASC,eAAe,QAAQ,gCAAgC;AAChE,SAASC,WAAW,QAAwB,uBAAuB;AACnE,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,OAAOC,GAAG,MAAM,gBAAgB;AAAC,SAG/BC,cAAc,EAGdC,aAAa;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAGf,IAAMC,GAAG,GAAGL,GAAG,CAACM,MAAM,CAAC,+BAA+B,CAAC;AAEvD,OAAO,SAASC,kBAAkBA,CAChCC,MAAgC,EAChCC,IAAY,EACH;EACT,IAAID,MAAM,IAAI,IAAI,IAAI,CAACP,cAAc,CAACO,MAAM,CAAC,EAAE;IAC7C,OAAO,KAAK;EACd;EAEA,OAAO,CAACA,MAAM,CAACE,cAAc,CAAC,CAACC,IAAI,CAAC,CAAC,CAACC,IAAI,CAACC,CAAC,IAAIA,CAAC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cAATA,SAAS,GAAI,MAAM,CAAE;QAC9CI,QAAQ,EAAEvC,WAAW,CAAC4B,UAAU,EAAEM,IAAI,CAAC;QACvCA,IAAI;QACJE;MACF,CAAC;IAAA,CACL,CAAC;EACH,CAAC,CAAC,CACDvB,IAAI,CAAC,CAAC;AACX","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import type React from 'react';
2
- import type { ColumnName, InputFilter, IrisGridContextMenuData, IrisGridTableModelTemplate } from '@deephaven/iris-grid';
2
+ import type { ColumnName, InputFilter, IrisGridContextMenuData, IrisGridModel } from '@deephaven/iris-grid';
3
3
  import { type GridRange } from '@deephaven/grid';
4
4
  import type { ResolvableContextAction } from '@deephaven/components';
5
5
  import type { dh } from '@deephaven/jsapi-types';
@@ -20,7 +20,7 @@ export interface TablePluginProps<S = unknown> {
20
20
  /**
21
21
  * The model for the table this plugin is associated with.
22
22
  */
23
- model: IrisGridTableModelTemplate;
23
+ model: IrisGridModel;
24
24
  /**
25
25
  * The table this plugin was associated with.
26
26
  */
@@ -1 +1 @@
1
- {"version":3,"file":"TablePlugin.d.ts","sourceRoot":"","sources":["../src/TablePlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,uBAAuB,EACvB,0BAA0B,EAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AAEjD,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,uBAAuB,KAAK,uBAAuB,EAAE,CAAC;CACxE;AAED,MAAM,WAAW,gBAAgB,CAAC,CAAC,GAAG,OAAO;IAC3C;;;OAGG;IACH,MAAM,EAAE,C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AE,KAAK,IAAI,CAAC;IAEzC;;;OAGG;IACH,YAAY,EAAE,CAAC,kBAAkB,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;IAEzD;;OAEG;IACH,KAAK,EAAE,aAAa,CAAC;IAErB;;OAEG;IACH,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,cAAc,EAAE,SAAS,SAAS,EAAE,GAAG,SAAS,CAAC;IAEjD;;;;OAIG;IACH,aAAa,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,IAAI,CAAC;IAExC;;OAEG;IACH,WAAW,EAAE,CAAC,CAAC;CAChB;AAED,MAAM,MAAM,oBAAoB,CAAC,CAAC,GAAG,OAAO,IAAI,KAAK,CAAC,aAAa,CACjE,gBAAgB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAC9D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TablePlugin.js","names":[],"sources":["../src/TablePlugin.ts"],"sourcesContent":["import type React from 'react';\nimport type {\n ColumnName,\n InputFilter,\n IrisGridContextMenuData,\n IrisGridTableModelTemplate,\n} from '@deephaven/iris-grid';\nimport { type GridRange } from '@deephaven/grid';\nimport type { ResolvableContextAction } from '@deephaven/components';\nimport type { dh } from '@deephaven/jsapi-types';\n\nexport interface TablePluginElement {\n getMenu?: (data: IrisGridContextMenuData) => ResolvableContextAction[];\n}\n\nexport interface TablePluginProps<S = unknown> {\n /**\n * Apply filters to the table\n * @param filters Filters to apply to the table\n */\n filter: (filters: InputFilter[]) => void;\n\n /**\n * Set columns that should always be fetched, even if they're outside the viewport\n * @param pluginFetchColumns Names of columns to always fetch\n */\n fetchColumns: (pluginFetchColumns: ColumnName[]) => void;\n\n /**\n * The model for the table this plugin is associated with.\n */\n model: IrisGridTableModelTemplate;\n\n /**\n * The table this plugin was associated with.\n */\n table: dh.Table;\n\n /**\n * The name of the table this plugin is associated with.\n */\n tableName: string;\n\n /**\n * The currently selected ranges in the table.\n */\n selectedRanges: readonly GridRange[] | undefined;\n\n /**\n * Notify of a state change in the plugin state. Will be saved with the panel data.\n * Should be an object that can be serialized to JSON.\n * @param pluginState State of the plugin to save\n */\n onStateChange: (pluginState: S) => void;\n\n /**\n * Current plugin state. Use to load.\n */\n pluginState: S;\n}\n\nexport type TablePluginComponent<S = unknown> = React.ComponentType<\n TablePluginProps<S> & React.RefAttributes<TablePluginElement>\n>;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"TablePlugin.js","names":[],"sources":["../src/TablePlugin.ts"],"sourcesContent":["import type React from 'react';\nimport type {\n ColumnName,\n InputFilter,\n IrisGridContextMenuData,\n IrisGridModel,\n} from '@deephaven/iris-grid';\nimport { type GridRange } from '@deephaven/grid';\nimport type { ResolvableContextAction } from '@deephaven/components';\nimport type { dh } from '@deephaven/jsapi-types';\n\nexport interface TablePluginElement {\n getMenu?: (data: IrisGridContextMenuData) => ResolvableContextAction[];\n}\n\nexport interface TablePluginProps<S = unknown> {\n /**\n * Apply filters to the table\n * @param filters Filters to apply to the table\n */\n filter: (filters: InputFilter[]) => void;\n\n /**\n * Set columns that should always be fetched, even if they're outside the viewport\n * @param pluginFetchColumns Names of columns to always fetch\n */\n fetchColumns: (pluginFetchColumns: ColumnName[]) => void;\n\n /**\n * The model for the table this plugin is associated with.\n */\n model: IrisGridModel;\n\n /**\n * The table this plugin was associated with.\n */\n table: dh.Table;\n\n /**\n * The name of the table this plugin is associated with.\n */\n tableName: string;\n\n /**\n * The currently selected ranges in the table.\n */\n selectedRanges: readonly GridRange[] | undefined;\n\n /**\n * Notify of a state change in the plugin state. Will be saved with the panel data.\n * Should be an object that can be serialized to JSON.\n * @param pluginState State of the plugin to save\n */\n onStateChange: (pluginState: S) => void;\n\n /**\n * Current plugin state. Use to load.\n */\n pluginState: S;\n}\n\nexport type TablePluginComponent<S = unknown> = React.ComponentType<\n TablePluginProps<S> & React.RefAttributes<TablePluginElement>\n>;\n"],"mappings":"","ignoreList":[]}
package/dist/index.d.ts CHANGED
@@ -8,5 +8,4 @@ export * from './usePlugins';
8
8
  export * from './WidgetView';
9
9
  export * from './PersistentStateContext';
10
10
  export * from './usePersistentState';
11
- export * from './usePluginsElementMap';
12
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC"}
package/dist/index.js CHANGED
@@ -8,5 +8,4 @@ export * from "./usePlugins.js";
8
8
  export * from "./WidgetView.js";
9
9
  export * from "./PersistentStateContext.js";
10
10
  export * from "./usePersistentState.js";
11
- export * from "./usePluginsElementMap.js";
12
11
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["export * from './PluginsContext';\nexport * from './PluginTypes';\nexport * from './PluginUtils';\nexport * from './TablePlugin';\nexport * from './useCustomThemes';\nexport * from './useDashboardPlugins';\nexport * from './usePlugins';\nexport * from './WidgetView';\nexport * from './PersistentStateContext';\nexport * from './usePersistentState';\nexport * from './usePluginsElementMap';\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["export * from './PluginsContext';\nexport * from './PluginTypes';\nexport * from './PluginUtils';\nexport * from './TablePlugin';\nexport * from './useCustomThemes';\nexport * from './useDashboardPlugins';\nexport * from './usePlugins';\nexport * from './WidgetView';\nexport * from './PersistentStateContext';\nexport * from './usePersistentState';\n"],"mappings":"","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/plugin",
3
- "version": "1.1.2-beta.5+d51277b7",
3
+ "version": "1.1.2-bisect-12.2+77850904",
4
4
  "description": "Deephaven JS Plugin Core",
5
5
  "author": "Deephaven Data Labs LLC",
6
6
  "license": "Apache-2.0",
@@ -22,14 +22,14 @@
22
22
  "build:babel": "babel ./src --out-dir ./dist --extensions \".ts,.tsx,.js,.jsx\" --source-maps --root-mode upward"
23
23
  },
24
24
  "dependencies": {
25
- "@deephaven/components": "^1.1.2-beta.5+d51277b7",
26
- "@deephaven/golden-layout": "^1.1.2-beta.5+d51277b7",
27
- "@deephaven/grid": "^1.1.2-beta.5+d51277b7",
28
- "@deephaven/icons": "^1.1.2-beta.5+d51277b7",
29
- "@deephaven/iris-grid": "^1.1.2-beta.5+d51277b7",
25
+ "@deephaven/components": "^1.1.2-bisect-12.2+77850904",
26
+ "@deephaven/golden-layout": "^1.1.2-bisect-12.2+77850904",
27
+ "@deephaven/grid": "^1.1.2-bisect-12.2+77850904",
28
+ "@deephaven/icons": "^1.1.2-bisect-12.2+77850904",
29
+ "@deephaven/iris-grid": "^1.1.2-bisect-12.2+77850904",
30
30
  "@deephaven/jsapi-types": "^1.0.0-dev0.39.4",
31
- "@deephaven/log": "^1.1.2-beta.5+d51277b7",
32
- "@deephaven/react-hooks": "^1.1.2-beta.5+d51277b7",
31
+ "@deephaven/log": "^1.1.2-bisect-12.2+77850904",
32
+ "@deephaven/react-hooks": "^1.1.2-bisect-12.2+77850904",
33
33
  "@fortawesome/fontawesome-common-types": "^6.1.1",
34
34
  "@fortawesome/react-fontawesome": "^0.2.0",
35
35
  "nanoid": "^5.0.7"
@@ -43,5 +43,5 @@
43
43
  "publishConfig": {
44
44
  "access": "public"
45
45
  },
46
- "gitHead": "d51277b746d24fd4f2a0f40e030496863fba7765"
46
+ "gitHead": "77850904bd6b121fcf1bf18f24a7525dc9275e5e"
47
47
  }
@@ -1,8 +0,0 @@
1
- import type { ElementMap } from './PluginTypes';
2
- /**
3
- * Get all ElementPlugin elements from the plugins context
4
- * @returns ElementPlugin mapping as a Map of plugin name to component type
5
- */
6
- export declare function usePluginsElementMap(): ElementMap;
7
- export default usePluginsElementMap;
8
- //# sourceMappingURL=usePluginsElementMap.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usePluginsElementMap.d.ts","sourceRoot":"","sources":["../src/usePluginsElementMap.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,UAAU,CAUjD;AAED,eAAe,oBAAoB,CAAC"}
@@ -1,15 +0,0 @@
1
- import { useMemo } from 'react';
2
- import { usePlugins } from "./usePlugins.js";
3
- import { getPluginsElementMap } from "./PluginUtils.js";
4
- /**
5
- * Get all ElementPlugin elements from the plugins context
6
- * @returns ElementPlugin mapping as a Map of plugin name to component type
7
- */
8
- export function usePluginsElementMap() {
9
- // Get all plugins from the context
10
- var plugins = usePlugins();
11
- var elementPlugins = useMemo(() => getPluginsElementMap(plugins), [plugins]);
12
- return elementPlugins;
13
- }
14
- export default usePluginsElementMap;
15
- //# sourceMappingURL=usePluginsElementMap.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usePluginsElementMap.js","names":["useMemo","usePlugins","getPluginsElementMap","usePluginsElementMap","plugins","elementPlugins"],"sources":["../src/usePluginsElementMap.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { usePlugins } from './usePlugins';\nimport { getPluginsElementMap } from './PluginUtils';\nimport type { ElementMap } from './PluginTypes';\n\n/**\n * Get all ElementPlugin elements from the plugins context\n * @returns ElementPlugin mapping as a Map of plugin name to component type\n */\nexport function usePluginsElementMap(): ElementMap {\n // Get all plugins from the context\n const plugins = usePlugins();\n\n const elementPlugins = useMemo(\n () => getPluginsElementMap(plugins),\n [plugins]\n );\n\n return elementPlugins;\n}\n\nexport default usePluginsElementMap;\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,OAAO;AAAC,SACvBC,UAAU;AAAA,SACVC,oBAAoB;AAG7B;AACA;AACA;AACA;AACA,OAAO,SAASC,oBAAoBA,CAAA,EAAe;EACjD;EACA,IAAMC,OAAO,GAAGH,UAAU,CAAC,CAAC;EAE5B,IAAMI,cAAc,GAAGL,OAAO,CAC5B,MAAME,oBAAoB,CAACE,OAAO,CAAC,EACnC,CAACA,OAAO,CACV,CAAC;EAED,OAAOC,cAAc;AACvB;AAEA,eAAeF,oBAAoB","ignoreList":[]}