@deephaven/plugin 0.94.1-beta.0 → 0.95.0
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.
- package/dist/PluginUtils.d.ts +1 -1
- package/dist/PluginUtils.d.ts.map +1 -1
- package/dist/PluginUtils.js.map +1 -1
- package/dist/TablePlugin.d.ts +1 -1
- package/dist/TablePlugin.d.ts.map +1 -1
- package/dist/TablePlugin.js.map +1 -1
- package/dist/useDashboardPlugins.d.ts +1 -1
- package/dist/useDashboardPlugins.d.ts.map +1 -1
- package/dist/useDashboardPlugins.js.map +1 -1
- package/package.json +9 -9
package/dist/PluginUtils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ThemeData } from '@deephaven/components';
|
|
2
|
-
import { type PluginModule, PluginModuleMap } 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
|
/**
|
|
@@ -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,eAAe,
|
|
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"}
|
package/dist/PluginUtils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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 PluginModuleMap,\n 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,KAAKJ,IAAI,CAAC;AAC7D;AAEA,OAAO,SAASK,gBAAgBA,CAACN,MAAoB,EAAsB;EACzE,IAAMO,WAAW,gBAAGX,IAAA,CAACP,eAAe;IAACmB,IAAI,EAAEjB;EAAU,CAAE,CAAC;EACxD,IAAI,CAACE,cAAc,CAACO,MAAM,CAAC,EAAE;IAC3B,OAAOO,WAAW;EACpB;EAEA,IAAM;IAAEC;EAAK,CAAC,GAAGR,MAAM;EAEvB,IAAIQ,IAAI,IAAI,IAAI,EAAE;IAChB,OAAOD,WAAW;EACpB;EAEA,kBAAInB,cAAc,CAACoB,IAAI,CAAC,EAAE;IACxB,OAAOA,IAAI;EACb;EAEA,oBAAOZ,IAAA,CAACP,eAAe;IAACmB,IAAI,EAAEA;EAAK,CAAE,CAAC;AACxC;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAuBA,CACrCC,SAA0B,EACb;EACb,IAAMC,kBAAkB,GAAG,CAAC,GAAGD,SAAS,CAACE,OAAO,CAAC,CAAC,CAAC,CAACC,MAAM,CACvDC,KAAK,IAAqCpB,aAAa,CAACoB,KAAK,CAAC,CAAC,CAAC,CACnE,CAAC;EAEDjB,GAAG,CAACkB,KAAK,CAAC,iCAAiC,EAAEJ,kBAAkB,CAAC;EAEhE,OAAOA,kBAAkB,CACtBK,GAAG,CAACC,IAAA,IAA0B;IAAA,IAAzB,CAACC,UAAU,EAAElB,MAAM,CAAC,GAAAiB,IAAA;IACxB;IACA;IACA,IAAME,OAAO,GAAGC,KAAK,CAACC,OAAO,CAACrB,MAAM,CAACsB,MAAM,CAAC,GACxCtB,MAAM,CAACsB,MAAM,GACb,CAACtB,MAAM,CAACsB,MAAM,CAAC;IAEnB,OAAOH,OAAO,CAACH,GAAG,CAChBO,KAAA;MAAA,IAAC;QAAEC,IAAI;QAAEC,SAAS;QAAEC;MAAa,CAAC,GAAAH,KAAA;MAAA,OAC/B;QACCI,YAAY,aAAAC,MAAA,CAAaH,SAAS,aAATA,SAAS,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"}
|
|
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,KAAKJ,IAAI,CAAC;AAC7D;AAEA,OAAO,SAASK,gBAAgBA,CAACN,MAAoB,EAAsB;EACzE,IAAMO,WAAW,gBAAGX,IAAA,CAACP,eAAe;IAACmB,IAAI,EAAEjB;EAAU,CAAE,CAAC;EACxD,IAAI,CAACE,cAAc,CAACO,MAAM,CAAC,EAAE;IAC3B,OAAOO,WAAW;EACpB;EAEA,IAAM;IAAEC;EAAK,CAAC,GAAGR,MAAM;EAEvB,IAAIQ,IAAI,IAAI,IAAI,EAAE;IAChB,OAAOD,WAAW;EACpB;EAEA,kBAAInB,cAAc,CAACoB,IAAI,CAAC,EAAE;IACxB,OAAOA,IAAI;EACb;EAEA,oBAAOZ,IAAA,CAACP,eAAe;IAACmB,IAAI,EAAEA;EAAK,CAAE,CAAC;AACxC;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAuBA,CACrCC,SAA0B,EACb;EACb,IAAMC,kBAAkB,GAAG,CAAC,GAAGD,SAAS,CAACE,OAAO,CAAC,CAAC,CAAC,CAACC,MAAM,CACvDC,KAAK,IAAqCpB,aAAa,CAACoB,KAAK,CAAC,CAAC,CAAC,CACnE,CAAC;EAEDjB,GAAG,CAACkB,KAAK,CAAC,iCAAiC,EAAEJ,kBAAkB,CAAC;EAEhE,OAAOA,kBAAkB,CACtBK,GAAG,CAACC,IAAA,IAA0B;IAAA,IAAzB,CAACC,UAAU,EAAElB,MAAM,CAAC,GAAAiB,IAAA;IACxB;IACA;IACA,IAAME,OAAO,GAAGC,KAAK,CAACC,OAAO,CAACrB,MAAM,CAACsB,MAAM,CAAC,GACxCtB,MAAM,CAACsB,MAAM,GACb,CAACtB,MAAM,CAACsB,MAAM,CAAC;IAEnB,OAAOH,OAAO,CAACH,GAAG,CAChBO,KAAA;MAAA,IAAC;QAAEC,IAAI;QAAEC,SAAS;QAAEC;MAAa,CAAC,GAAAH,KAAA;MAAA,OAC/B;QACCI,YAAY,aAAAC,MAAA,CAAaH,SAAS,aAATA,SAAS,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"}
|
package/dist/TablePlugin.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { ColumnName, InputFilter, IrisGridContextMenuData, IrisGridModel } from '@deephaven/iris-grid';
|
|
3
|
-
import { GridRange } from '@deephaven/grid';
|
|
3
|
+
import { type GridRange } from '@deephaven/grid';
|
|
4
4
|
import type { ResolvableContextAction } from '@deephaven/components';
|
|
5
5
|
import type { dh } from '@deephaven/jsapi-types';
|
|
6
6
|
export interface TablePluginElement {
|
|
@@ -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,aAAa,EACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;
|
|
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,aAAa,EACd,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,CAAC,OAAO,EAAE,WAAW,EAAE,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"}
|
package/dist/TablePlugin.js.map
CHANGED
|
@@ -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 IrisGridModel,\n} from '@deephaven/iris-grid';\nimport { 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":""}
|
|
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":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDashboardPlugins.d.ts","sourceRoot":"","sources":["../src/useDashboardPlugins.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,eAAe,
|
|
1
|
+
{"version":3,"file":"useDashboardPlugins.d.ts","sourceRoot":"","sources":["../src/useDashboardPlugins.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,eAAe,EAGrB,MAAM,eAAe,CAAC;AAGvB,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,EAAE,CAc3E;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,GAAG,CAAC,OAAO,EAAE,CASnD;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDashboardPlugins.js","names":["useMemo","isDashboardPlugin","isLegacyDashboardPlugin","usePlugins","jsx","_jsx","getDashboardPlugins","plugins","dbPlugins","entries","filter","_ref","plugin","map","_ref2","pluginName","DashboardPlugin","DPlugin","_DPlugin","component","useDashboardPlugins","dashboardPlugins"],"sources":["../src/useDashboardPlugins.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport {\n isDashboardPlugin,\n isLegacyDashboardPlugin,\n PluginModuleMap,\n type DashboardPlugin,\n type LegacyDashboardPlugin,\n} from './PluginTypes';\nimport { usePlugins } from './usePlugins';\n\nexport function getDashboardPlugins(plugins: PluginModuleMap): JSX.Element[] {\n const dbPlugins = [...plugins.entries()].filter(\n ([, plugin]) => isDashboardPlugin(plugin) || isLegacyDashboardPlugin(plugin)\n ) as [string, DashboardPlugin | LegacyDashboardPlugin][];\n\n return dbPlugins.map(([pluginName, plugin]) => {\n if (isLegacyDashboardPlugin(plugin)) {\n const { DashboardPlugin: DPlugin } = plugin;\n return <DPlugin key={pluginName} />;\n }\n\n const { component: DPlugin } = plugin;\n return <DPlugin key={pluginName} />;\n });\n}\n\n/**\n * Get all DashboardPlugin elements from the plugins context\n * @returns Array of DashboardPlugin elements\n */\nexport function useDashboardPlugins(): JSX.Element[] {\n const plugins = usePlugins();\n\n const dashboardPlugins = useMemo(\n () => getDashboardPlugins(plugins),\n [plugins]\n );\n\n return dashboardPlugins;\n}\n\nexport default useDashboardPlugins;\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,OAAO;AAAC,SAE9BC,iBAAiB,EACjBC,uBAAuB;AAAA,SAKhBC,UAAU;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEnB,OAAO,SAASC,mBAAmBA,CAACC,OAAwB,EAAiB;EAC3E,IAAMC,SAAS,GAAG,CAAC,GAAGD,OAAO,CAACE,OAAO,CAAC,CAAC,CAAC,CAACC,MAAM,CAC7CC,IAAA;IAAA,IAAC,GAAGC,MAAM,CAAC,GAAAD,IAAA;IAAA,OAAKV,iBAAiB,CAACW,MAAM,CAAC,IAAIV,uBAAuB,CAACU,MAAM,CAAC;EAAA,CAC9E,CAAwD;EAExD,OAAOJ,SAAS,CAACK,GAAG,CAACC,KAAA,IAA0B;IAAA,IAAzB,CAACC,UAAU,EAAEH,MAAM,CAAC,GAAAE,KAAA;IACxC,IAAIZ,uBAAuB,CAACU,MAAM,CAAC,EAAE;MACnC,IAAM;QAAEI,eAAe,EAAEC;MAAQ,CAAC,GAAGL,MAAM;MAC3C,oBAAOP,IAAA,CAACa,QAAO,MAAMH,UAAa,CAAC;IACrC;IAEA,IAAM;MAAEI,SAAS,EAAEF;IAAQ,CAAC,GAAGL,MAAM;IACrC,oBAAOP,IAAA,CAACY,OAAO,MAAMF,UAAa,CAAC;EACrC,CAAC,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASK,mBAAmBA,CAAA,EAAkB;EACnD,IAAMb,OAAO,GAAGJ,UAAU,CAAC,CAAC;EAE5B,IAAMkB,gBAAgB,GAAGrB,OAAO,CAC9B,MAAMM,mBAAmB,CAACC,OAAO,CAAC,EAClC,CAACA,OAAO,CACV,CAAC;EAED,OAAOc,gBAAgB;AACzB;AAEA,eAAeD,mBAAmB"}
|
|
1
|
+
{"version":3,"file":"useDashboardPlugins.js","names":["useMemo","isDashboardPlugin","isLegacyDashboardPlugin","usePlugins","jsx","_jsx","getDashboardPlugins","plugins","dbPlugins","entries","filter","_ref","plugin","map","_ref2","pluginName","DashboardPlugin","DPlugin","_DPlugin","component","useDashboardPlugins","dashboardPlugins"],"sources":["../src/useDashboardPlugins.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport {\n isDashboardPlugin,\n isLegacyDashboardPlugin,\n type PluginModuleMap,\n type DashboardPlugin,\n type LegacyDashboardPlugin,\n} from './PluginTypes';\nimport { usePlugins } from './usePlugins';\n\nexport function getDashboardPlugins(plugins: PluginModuleMap): JSX.Element[] {\n const dbPlugins = [...plugins.entries()].filter(\n ([, plugin]) => isDashboardPlugin(plugin) || isLegacyDashboardPlugin(plugin)\n ) as [string, DashboardPlugin | LegacyDashboardPlugin][];\n\n return dbPlugins.map(([pluginName, plugin]) => {\n if (isLegacyDashboardPlugin(plugin)) {\n const { DashboardPlugin: DPlugin } = plugin;\n return <DPlugin key={pluginName} />;\n }\n\n const { component: DPlugin } = plugin;\n return <DPlugin key={pluginName} />;\n });\n}\n\n/**\n * Get all DashboardPlugin elements from the plugins context\n * @returns Array of DashboardPlugin elements\n */\nexport function useDashboardPlugins(): JSX.Element[] {\n const plugins = usePlugins();\n\n const dashboardPlugins = useMemo(\n () => getDashboardPlugins(plugins),\n [plugins]\n );\n\n return dashboardPlugins;\n}\n\nexport default useDashboardPlugins;\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,OAAO;AAAC,SAE9BC,iBAAiB,EACjBC,uBAAuB;AAAA,SAKhBC,UAAU;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEnB,OAAO,SAASC,mBAAmBA,CAACC,OAAwB,EAAiB;EAC3E,IAAMC,SAAS,GAAG,CAAC,GAAGD,OAAO,CAACE,OAAO,CAAC,CAAC,CAAC,CAACC,MAAM,CAC7CC,IAAA;IAAA,IAAC,GAAGC,MAAM,CAAC,GAAAD,IAAA;IAAA,OAAKV,iBAAiB,CAACW,MAAM,CAAC,IAAIV,uBAAuB,CAACU,MAAM,CAAC;EAAA,CAC9E,CAAwD;EAExD,OAAOJ,SAAS,CAACK,GAAG,CAACC,KAAA,IAA0B;IAAA,IAAzB,CAACC,UAAU,EAAEH,MAAM,CAAC,GAAAE,KAAA;IACxC,IAAIZ,uBAAuB,CAACU,MAAM,CAAC,EAAE;MACnC,IAAM;QAAEI,eAAe,EAAEC;MAAQ,CAAC,GAAGL,MAAM;MAC3C,oBAAOP,IAAA,CAACa,QAAO,MAAMH,UAAa,CAAC;IACrC;IAEA,IAAM;MAAEI,SAAS,EAAEF;IAAQ,CAAC,GAAGL,MAAM;IACrC,oBAAOP,IAAA,CAACY,OAAO,MAAMF,UAAa,CAAC;EACrC,CAAC,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASK,mBAAmBA,CAAA,EAAkB;EACnD,IAAMb,OAAO,GAAGJ,UAAU,CAAC,CAAC;EAE5B,IAAMkB,gBAAgB,GAAGrB,OAAO,CAC9B,MAAMM,mBAAmB,CAACC,OAAO,CAAC,EAClC,CAACA,OAAO,CACV,CAAC;EAED,OAAOc,gBAAgB;AACzB;AAEA,eAAeD,mBAAmB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deephaven/plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.95.0",
|
|
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": "^0.
|
|
26
|
-
"@deephaven/golden-layout": "^0.
|
|
27
|
-
"@deephaven/grid": "^0.
|
|
28
|
-
"@deephaven/icons": "^0.
|
|
29
|
-
"@deephaven/iris-grid": "^0.
|
|
25
|
+
"@deephaven/components": "^0.95.0",
|
|
26
|
+
"@deephaven/golden-layout": "^0.95.0",
|
|
27
|
+
"@deephaven/grid": "^0.95.0",
|
|
28
|
+
"@deephaven/icons": "^0.95.0",
|
|
29
|
+
"@deephaven/iris-grid": "^0.95.0",
|
|
30
30
|
"@deephaven/jsapi-types": "^1.0.0-dev0.34.0",
|
|
31
|
-
"@deephaven/log": "^0.
|
|
32
|
-
"@deephaven/react-hooks": "^0.
|
|
31
|
+
"@deephaven/log": "^0.95.0",
|
|
32
|
+
"@deephaven/react-hooks": "^0.95.0",
|
|
33
33
|
"@fortawesome/fontawesome-common-types": "^6.1.1",
|
|
34
34
|
"@fortawesome/react-fontawesome": "^0.2.0"
|
|
35
35
|
},
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "ec9b41e921e2122879f53e9a266084d529664680"
|
|
46
46
|
}
|