@deephaven/app-utils 1.7.1 → 1.7.2-beta.3
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/components/AppBootstrap.js +1 -2
- package/dist/components/AppBootstrap.js.map +1 -1
- package/dist/components/AppDashboards.js.map +1 -1
- package/dist/components/AuthBootstrap.js +1 -3
- package/dist/components/AuthBootstrap.js.map +1 -1
- package/dist/components/ConnectionBootstrap.js +2 -4
- package/dist/components/ConnectionBootstrap.js.map +1 -1
- package/dist/components/ConnectionContext.js.map +1 -1
- package/dist/components/FontBootstrap.js +1 -3
- package/dist/components/FontBootstrap.js.map +1 -1
- package/dist/components/FontsLoaded.js +1 -2
- package/dist/components/FontsLoaded.js.map +1 -1
- package/dist/components/LoginNotifier.js.map +1 -1
- package/dist/components/PluginsBootstrap.js.map +1 -1
- package/dist/components/ServerConfigBootstrap.js.map +1 -1
- package/dist/components/ThemeBootstrap.js.map +1 -1
- package/dist/components/UserBootstrap.js.map +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/useConnection.js.map +1 -1
- package/dist/components/useServerConfig.js.map +1 -1
- package/dist/components/useUser.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/plugins/PluginUtils.js.map +1 -1
- package/dist/plugins/RemoteComponent.js.map +1 -1
- package/dist/plugins/index.js.map +1 -1
- package/dist/plugins/loadRemoteModule.js.map +1 -1
- package/dist/plugins/remote-component.config.js.map +1 -1
- package/dist/storage/LayoutStorage.js.map +1 -1
- package/dist/storage/LocalWorkspaceStorage.js +2 -3
- package/dist/storage/LocalWorkspaceStorage.js.map +1 -1
- package/dist/storage/UserLayoutUtils.js.map +1 -1
- package/dist/storage/grpc/GrpcFileStorage.js.map +1 -1
- package/dist/storage/grpc/GrpcFileStorageTable.js +7 -8
- package/dist/storage/grpc/GrpcFileStorageTable.js.map +1 -1
- package/dist/storage/grpc/GrpcLayoutStorage.js.map +1 -1
- package/dist/storage/grpc/index.js.map +1 -1
- package/dist/storage/index.js.map +1 -1
- package/dist/utils/ConnectUtils.js.map +1 -1
- package/dist/utils/createExportLogsContextAction.js.map +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +22 -26
|
@@ -14,8 +14,7 @@ import FontsLoaded from "./FontsLoaded.js";
|
|
|
14
14
|
import UserBootstrap from "./UserBootstrap.js";
|
|
15
15
|
import ServerConfigBootstrap from "./ServerConfigBootstrap.js";
|
|
16
16
|
import ThemeBootstrap from "./ThemeBootstrap.js";
|
|
17
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
18
|
/**
|
|
20
19
|
* AppBootstrap component. Handles loading the fonts, client, and authentication.
|
|
21
20
|
* Will display the children when everything is loaded and authenticated.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppBootstrap.js","names":["React","useCallback","useMemo","useState","Provider","store","ClientBootstrap","useBroadcastLoginListener","ContextActions","ContextMenuRoot","FontBootstrap","PluginsBootstrap","AuthBootstrap","ConnectionBootstrap","getConnectOptions","createExportLogsContextAction","FontsLoaded","UserBootstrap","ServerConfigBootstrap","ThemeBootstrap","jsx","_jsx","jsxs","_jsxs","AppBootstrap","_ref","fontClassNames","pluginsUrl","getCorePlugins","serverUrl","logMetadata","children","clientOptions","logoutCount","setLogoutCount","onLogin","undefined","onLogout","requestAnimationFrame","value","contextActions","options","actions"],"sources":["../../src/components/AppBootstrap.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useState } from 'react';\nimport { Provider } from 'react-redux';\nimport { store } from '@deephaven/redux';\nimport '@deephaven/components/scss/BaseStyleSheet.scss';\nimport { ClientBootstrap } from '@deephaven/jsapi-bootstrap';\nimport { useBroadcastLoginListener } from '@deephaven/jsapi-components';\nimport { type Plugin } from '@deephaven/plugin';\nimport { ContextActions, ContextMenuRoot } from '@deephaven/components';\nimport FontBootstrap from './FontBootstrap';\nimport PluginsBootstrap from './PluginsBootstrap';\nimport AuthBootstrap from './AuthBootstrap';\nimport ConnectionBootstrap from './ConnectionBootstrap';\nimport { getConnectOptions, createExportLogsContextAction } from '../utils';\nimport FontsLoaded from './FontsLoaded';\nimport UserBootstrap from './UserBootstrap';\nimport ServerConfigBootstrap from './ServerConfigBootstrap';\nimport ThemeBootstrap from './ThemeBootstrap';\n\nexport type AppBootstrapProps = {\n /** URL of the server. */\n serverUrl: string;\n\n /** Properties included in support logs. */\n logMetadata?: Record<string, unknown>;\n\n /** URL of the plugins to load. */\n pluginsUrl: string;\n\n /** The core plugins to load. */\n getCorePlugins?: () => Promise<Plugin[]>;\n\n /** Font class names to load. */\n fontClassNames?: string[];\n\n /**\n * The children to render wrapped when everything is loaded and authenticated.\n */\n children: React.ReactNode;\n};\n\n/**\n * AppBootstrap component. Handles loading the fonts, client, and authentication.\n * Will display the children when everything is loaded and authenticated.\n */\nexport function AppBootstrap({\n fontClassNames,\n pluginsUrl,\n getCorePlugins,\n serverUrl,\n logMetadata,\n children,\n}: AppBootstrapProps): JSX.Element {\n const clientOptions = useMemo(() => getConnectOptions(), []);\n\n // On logout, we reset the client and have user login again\n const [logoutCount, setLogoutCount] = useState(0);\n const onLogin = useCallback(() => undefined, []);\n const onLogout = useCallback(() => {\n requestAnimationFrame(() => {\n setLogoutCount(value => value + 1);\n });\n }, []);\n useBroadcastLoginListener(onLogin, onLogout);\n\n const contextActions = useMemo(\n () => [createExportLogsContextAction(logMetadata, true)],\n [logMetadata]\n );\n\n return (\n <Provider store={store}>\n <FontBootstrap fontClassNames={fontClassNames}>\n <PluginsBootstrap\n getCorePlugins={getCorePlugins}\n pluginsUrl={pluginsUrl}\n >\n <ThemeBootstrap>\n <ClientBootstrap\n serverUrl={serverUrl}\n options={clientOptions}\n key={logoutCount}\n >\n <AuthBootstrap>\n <ServerConfigBootstrap>\n <UserBootstrap>\n <ConnectionBootstrap>\n <FontsLoaded>{children}</FontsLoaded>\n </ConnectionBootstrap>\n </UserBootstrap>\n </ServerConfigBootstrap>\n </AuthBootstrap>\n <ContextActions actions={contextActions} />\n </ClientBootstrap>\n </ThemeBootstrap>\n </PluginsBootstrap>\n </FontBootstrap>\n <ContextMenuRoot />\n </Provider>\n );\n}\n\nexport default AppBootstrap;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC7D,SAASC,QAAQ,QAAQ,aAAa;AACtC,SAASC,KAAK,QAAQ,kBAAkB;AACxC,OAAO,gDAAgD;AACvD,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,SAASC,yBAAyB,QAAQ,6BAA6B;AAEvE,SAASC,cAAc,EAAEC,eAAe,QAAQ,uBAAuB;AAAC,OACjEC,aAAa;AAAA,OACbC,gBAAgB;AAAA,OAChBC,aAAa;AAAA,OACbC,mBAAmB;AAAA,SACjBC,iBAAiB,EAAEC,6BAA6B;AAAA,OAClDC,WAAW;AAAA,OACXC,aAAa;AAAA,OACbC,qBAAqB;AAAA,OACrBC,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA
|
|
1
|
+
{"version":3,"file":"AppBootstrap.js","names":["React","useCallback","useMemo","useState","Provider","store","ClientBootstrap","useBroadcastLoginListener","ContextActions","ContextMenuRoot","FontBootstrap","PluginsBootstrap","AuthBootstrap","ConnectionBootstrap","getConnectOptions","createExportLogsContextAction","FontsLoaded","UserBootstrap","ServerConfigBootstrap","ThemeBootstrap","jsx","_jsx","jsxs","_jsxs","AppBootstrap","_ref","fontClassNames","pluginsUrl","getCorePlugins","serverUrl","logMetadata","children","clientOptions","logoutCount","setLogoutCount","onLogin","undefined","onLogout","requestAnimationFrame","value","contextActions","options","actions"],"sources":["../../src/components/AppBootstrap.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useState } from 'react';\nimport { Provider } from 'react-redux';\nimport { store } from '@deephaven/redux';\nimport '@deephaven/components/scss/BaseStyleSheet.scss';\nimport { ClientBootstrap } from '@deephaven/jsapi-bootstrap';\nimport { useBroadcastLoginListener } from '@deephaven/jsapi-components';\nimport { type Plugin } from '@deephaven/plugin';\nimport { ContextActions, ContextMenuRoot } from '@deephaven/components';\nimport FontBootstrap from './FontBootstrap';\nimport PluginsBootstrap from './PluginsBootstrap';\nimport AuthBootstrap from './AuthBootstrap';\nimport ConnectionBootstrap from './ConnectionBootstrap';\nimport { getConnectOptions, createExportLogsContextAction } from '../utils';\nimport FontsLoaded from './FontsLoaded';\nimport UserBootstrap from './UserBootstrap';\nimport ServerConfigBootstrap from './ServerConfigBootstrap';\nimport ThemeBootstrap from './ThemeBootstrap';\n\nexport type AppBootstrapProps = {\n /** URL of the server. */\n serverUrl: string;\n\n /** Properties included in support logs. */\n logMetadata?: Record<string, unknown>;\n\n /** URL of the plugins to load. */\n pluginsUrl: string;\n\n /** The core plugins to load. */\n getCorePlugins?: () => Promise<Plugin[]>;\n\n /** Font class names to load. */\n fontClassNames?: string[];\n\n /**\n * The children to render wrapped when everything is loaded and authenticated.\n */\n children: React.ReactNode;\n};\n\n/**\n * AppBootstrap component. Handles loading the fonts, client, and authentication.\n * Will display the children when everything is loaded and authenticated.\n */\nexport function AppBootstrap({\n fontClassNames,\n pluginsUrl,\n getCorePlugins,\n serverUrl,\n logMetadata,\n children,\n}: AppBootstrapProps): JSX.Element {\n const clientOptions = useMemo(() => getConnectOptions(), []);\n\n // On logout, we reset the client and have user login again\n const [logoutCount, setLogoutCount] = useState(0);\n const onLogin = useCallback(() => undefined, []);\n const onLogout = useCallback(() => {\n requestAnimationFrame(() => {\n setLogoutCount(value => value + 1);\n });\n }, []);\n useBroadcastLoginListener(onLogin, onLogout);\n\n const contextActions = useMemo(\n () => [createExportLogsContextAction(logMetadata, true)],\n [logMetadata]\n );\n\n return (\n <Provider store={store}>\n <FontBootstrap fontClassNames={fontClassNames}>\n <PluginsBootstrap\n getCorePlugins={getCorePlugins}\n pluginsUrl={pluginsUrl}\n >\n <ThemeBootstrap>\n <ClientBootstrap\n serverUrl={serverUrl}\n options={clientOptions}\n key={logoutCount}\n >\n <AuthBootstrap>\n <ServerConfigBootstrap>\n <UserBootstrap>\n <ConnectionBootstrap>\n <FontsLoaded>{children}</FontsLoaded>\n </ConnectionBootstrap>\n </UserBootstrap>\n </ServerConfigBootstrap>\n </AuthBootstrap>\n <ContextActions actions={contextActions} />\n </ClientBootstrap>\n </ThemeBootstrap>\n </PluginsBootstrap>\n </FontBootstrap>\n <ContextMenuRoot />\n </Provider>\n );\n}\n\nexport default AppBootstrap;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC7D,SAASC,QAAQ,QAAQ,aAAa;AACtC,SAASC,KAAK,QAAQ,kBAAkB;AACxC,OAAO,gDAAgD;AACvD,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,SAASC,yBAAyB,QAAQ,6BAA6B;AAEvE,SAASC,cAAc,EAAEC,eAAe,QAAQ,uBAAuB;AAAC,OACjEC,aAAa;AAAA,OACbC,gBAAgB;AAAA,OAChBC,aAAa;AAAA,OACbC,mBAAmB;AAAA,SACjBC,iBAAiB,EAAEC,6BAA6B;AAAA,OAClDC,WAAW;AAAA,OACXC,aAAa;AAAA,OACbC,qBAAqB;AAAA,OACrBC,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAwBrB;AACA;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAAAC,IAAA,EAOO;EAAA,IAPN;IAC3BC,cAAc;IACdC,UAAU;IACVC,cAAc;IACdC,SAAS;IACTC,WAAW;IACXC;EACiB,CAAC,GAAAN,IAAA;EAClB,IAAMO,aAAa,GAAG9B,OAAO,CAAC,MAAMY,iBAAiB,CAAC,CAAC,EAAE,EAAE,CAAC;;EAE5D;EACA,IAAM,CAACmB,WAAW,EAAEC,cAAc,CAAC,GAAG/B,QAAQ,C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,CAACZ,eAAe,IAAE,CAAC;EAAA,CACX,CAAC;AAEf;AAEA,eAAee,YAAY","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppDashboards.js","names":["React","useCallback","classNames","DashboardUtils","LazyDashboard","useObjectFetcher","LoadingOverlay","jsx","_jsx","AppDashboards","_ref","dashboards","activeDashboard","onLayoutInitialized","onGoldenLayoutChange","plugins","emptyDashboard","fetchObject","hydratePanel","hydrateProps","id","metadata","_objectSpread","fetch","_fetch","_asyncToGenerator","apply","arguments","localDashboardId","e","hydrate","className","children","map","d","active","isActive","layoutConfig","layoutSettings","key"],"sources":["../../src/components/AppDashboards.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\nimport classNames from 'classnames';\nimport {\n DashboardUtils,\n type
|
|
1
|
+
{"version":3,"file":"AppDashboards.js","names":["React","useCallback","classNames","DashboardUtils","LazyDashboard","useObjectFetcher","LoadingOverlay","jsx","_jsx","AppDashboards","_ref","dashboards","activeDashboard","onLayoutInitialized","onGoldenLayoutChange","plugins","emptyDashboard","fetchObject","hydratePanel","hydrateProps","id","metadata","_objectSpread","fetch","_fetch","_asyncToGenerator","apply","arguments","localDashboardId","e","hydrate","className","children","map","d","active","isActive","layoutConfig","layoutSettings","key"],"sources":["../../src/components/AppDashboards.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\nimport classNames from 'classnames';\nimport {\n DashboardUtils,\n type DehydratedPanelProps,\n LazyDashboard,\n} from '@deephaven/dashboard';\nimport { useObjectFetcher } from '@deephaven/jsapi-bootstrap';\nimport {\n type ItemConfig,\n type Settings as LayoutSettings,\n} from '@deephaven/golden-layout';\nimport type LayoutManager from '@deephaven/golden-layout';\nimport { LoadingOverlay } from '@deephaven/components';\n\ninterface AppDashboardsProps {\n dashboards: {\n id: string;\n layoutConfig: ItemConfig[];\n layoutSettings?: Partial<LayoutSettings>;\n key?: string;\n }[];\n activeDashboard: string;\n onLayoutInitialized?: () => void;\n onGoldenLayoutChange: (goldenLayout: LayoutManager) => void;\n plugins: JSX.Element[];\n emptyDashboard?: JSX.Element;\n}\n\nexport function AppDashboards({\n dashboards,\n activeDashboard,\n onLayoutInitialized,\n onGoldenLayoutChange,\n plugins,\n emptyDashboard = <LoadingOverlay data-testid=\"app-dashboards-loading\" />,\n}: AppDashboardsProps): JSX.Element {\n const fetchObject = useObjectFetcher();\n\n const hydratePanel = useCallback(\n (hydrateProps: DehydratedPanelProps, id: string) => {\n const { metadata } = hydrateProps;\n try {\n if (metadata != null) {\n return {\n fetch: async () => fetchObject(metadata),\n ...hydrateProps,\n localDashboardId: id,\n };\n }\n } catch (e: unknown) {\n // Ignore being unable to get the variable descriptor, do the default dashboard hydration\n }\n return DashboardUtils.hydrate(hydrateProps, id);\n },\n [fetchObject]\n );\n\n return (\n <div className=\"tab-content\">\n {dashboards.map(d => (\n <div\n key={d.id}\n className={classNames('tab-pane', {\n active: d.id === activeDashboard,\n })}\n >\n <LazyDashboard\n id={d.id}\n key={d.key}\n isActive={d.id === activeDashboard}\n emptyDashboard={emptyDashboard}\n layoutConfig={d.layoutConfig}\n layoutSettings={d.layoutSettings}\n onLayoutInitialized={onLayoutInitialized}\n onGoldenLayoutChange={onGoldenLayoutChange}\n hydrate={hydratePanel}\n plugins={plugins}\n />\n </div>\n ))}\n </div>\n );\n}\n\nexport default AppDashboards;\n"],"mappings":";;;;;;;AAAA,OAAOA,KAAK,IAAIC,WAAW,QAAQ,OAAO;AAC1C,OAAOC,UAAU,MAAM,YAAY;AACnC,SACEC,cAAc,EAEdC,aAAa,QACR,sBAAsB;AAC7B,SAASC,gBAAgB,QAAQ,4BAA4B;AAM7D,SAASC,cAAc,QAAQ,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAgBvD,OAAO,SAASC,aAAaA,CAAAC,IAAA,EAOO;EAAA,IAPN;IAC5BC,UAAU;IACVC,eAAe;IACfC,mBAAmB;IACnBC,oBAAoB;IACpBC,OAAO;IACPC,cAAc,gBAAGR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,oBAAoB,EAAEA,oBAAqB;QAC3CgB,OAAO,EAAEZ,YAAa;QACtBH,OAAO,EAAEA;MAAQ,GARZmB,CAAC,CAACK,GASR;IAAC,GAhBGL,CAAC,CAACd,EAiBJ,CACN;EAAC,CACC,CAAC;AAEV;AAEA,eAAeX,aAAa","ignoreList":[]}
|
|
@@ -8,9 +8,7 @@ import { getErrorMessage } from '@deephaven/utils';
|
|
|
8
8
|
import { PluginsContext } from '@deephaven/plugin';
|
|
9
9
|
import { getAuthPluginComponent } from "../plugins/index.js";
|
|
10
10
|
import LoginNotifier from "./LoginNotifier.js";
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
12
|
/** Core auth plugins that are always loaded */
|
|
15
13
|
var CORE_AUTH_PLUGINS = new Map([['@deephaven/auth-plugins.AuthPluginParent', {
|
|
16
14
|
AuthPlugin: AuthPluginParent
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthBootstrap.js","names":["React","useContext","useEffect","useMemo","useState","AuthPluginAnonymous","AuthPluginParent","AuthPluginPsk","LoadingOverlay","useClient","getErrorMessage","PluginsContext","getAuthPluginComponent","LoginNotifier","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","CORE_AUTH_PLUGINS","Map","AuthPlugin","AuthBootstrap","_ref","children","client","plugins","authConfig","setAuthConfig","error","setError","initAuthConfigValues","isCanceled","loadAuthConfigValues","_loadAuthConfigValues","apply","arguments","_asyncToGenerator","newAuthConfigValues","getAuthConfigValues","e","AuthComponent","undefined","isLoading","errorMessage","authConfigValues"],"sources":["../../src/components/AuthBootstrap.tsx"],"sourcesContent":["import React, { useContext, useEffect, useMemo, useState } from 'react';\nimport {\n type AuthConfigMap,\n AuthPluginAnonymous,\n AuthPluginParent,\n AuthPluginPsk,\n} from '@deephaven/auth-plugins';\nimport { LoadingOverlay } from '@deephaven/components';\nimport { useClient } from '@deephaven/jsapi-bootstrap';\nimport { getErrorMessage } from '@deephaven/utils';\nimport { PluginsContext } from '@deephaven/plugin';\nimport { getAuthPluginComponent } from '../plugins';\nimport LoginNotifier from './LoginNotifier';\n\nexport type AuthBootstrapProps = {\n /**\n * The children to render after authentication is completed.\n */\n children: React.ReactNode;\n};\n\n/** Core auth plugins that are always loaded */\nconst CORE_AUTH_PLUGINS = new Map([\n [\n '@deephaven/auth-plugins.AuthPluginParent',\n { AuthPlugin: AuthPluginParent },\n ],\n ['@deephaven/auth-plugins.AuthPluginPsk', { AuthPlugin: AuthPluginPsk }],\n [\n '@deephaven/auth-plugins.AuthPluginAnonymous',\n { AuthPlugin: AuthPluginAnonymous },\n ],\n]);\n\n/**\n * AuthBootstrap component. Handles displaying the auth plugin and authenticating.\n */\nexport function AuthBootstrap({ children }: AuthBootstrapProps): JSX.Element {\n const client = useClient();\n // `useContext` instead of `usePlugins` so that we don't have to wait for the plugins to load\n // We want to load the auth config values in parallel with the plugins\n const plugins = useContext(PluginsContext);\n const [authConfig, setAuthConfig] = useState<AuthConfigMap>();\n const [error, setError] = useState<unknown>();\n\n useEffect(\n function initAuthConfigValues() {\n let isCanceled = false;\n async function loadAuthConfigValues(): Promise<void> {\n try {\n const newAuthConfigValues = (await client.getAuthConfigValues()) as [\n string,\n string,\n ][];\n if (!isCanceled) {\n setAuthConfig(new Map(newAuthConfigValues));\n }\n } catch (e) {\n if (!isCanceled) {\n setError(e);\n }\n }\n }\n loadAuthConfigValues();\n return () => {\n isCanceled = true;\n };\n },\n [client]\n );\n\n const AuthComponent = useMemo(() => {\n if (plugins == null || authConfig == null) {\n return undefined;\n }\n\n try {\n return getAuthPluginComponent(plugins, authConfig, CORE_AUTH_PLUGINS);\n } catch (e) {\n setError(e);\n }\n }, [authConfig, plugins]);\n\n const isLoading = AuthComponent == null || authConfig == null;\n\n if (isLoading || error != null) {\n return (\n <LoadingOverlay\n isLoading={isLoading && error == null}\n errorMessage={getErrorMessage(error)}\n data-testid=\"auth-bootstrap-loading-error\"\n />\n );\n }\n return (\n <AuthComponent authConfigValues={authConfig}>\n <>\n <LoginNotifier />\n {children}\n </>\n </AuthComponent>\n );\n}\n\nexport default AuthBootstrap;\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AACvE,SAEEC,mBAAmB,EACnBC,gBAAgB,EAChBC,aAAa,QACR,yBAAyB;AAChC,SAASC,cAAc,QAAQ,uBAAuB;AACtD,SAASC,SAAS,QAAQ,4BAA4B;AACtD,SAASC,eAAe,QAAQ,kBAAkB;AAClD,SAASC,cAAc,QAAQ,mBAAmB;AAAC,SAC1CC,sBAAsB;AAAA,OACxBC,aAAa;AAAA,SAAAC,GAAA,IAAAC,IAAA
|
|
1
|
+
{"version":3,"file":"AuthBootstrap.js","names":["React","useContext","useEffect","useMemo","useState","AuthPluginAnonymous","AuthPluginParent","AuthPluginPsk","LoadingOverlay","useClient","getErrorMessage","PluginsContext","getAuthPluginComponent","LoginNotifier","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","CORE_AUTH_PLUGINS","Map","AuthPlugin","AuthBootstrap","_ref","children","client","plugins","authConfig","setAuthConfig","error","setError","initAuthConfigValues","isCanceled","loadAuthConfigValues","_loadAuthConfigValues","apply","arguments","_asyncToGenerator","newAuthConfigValues","getAuthConfigValues","e","AuthComponent","undefined","isLoading","errorMessage","authConfigValues"],"sources":["../../src/components/AuthBootstrap.tsx"],"sourcesContent":["import React, { useContext, useEffect, useMemo, useState } from 'react';\nimport {\n type AuthConfigMap,\n AuthPluginAnonymous,\n AuthPluginParent,\n AuthPluginPsk,\n} from '@deephaven/auth-plugins';\nimport { LoadingOverlay } from '@deephaven/components';\nimport { useClient } from '@deephaven/jsapi-bootstrap';\nimport { getErrorMessage } from '@deephaven/utils';\nimport { PluginsContext } from '@deephaven/plugin';\nimport { getAuthPluginComponent } from '../plugins';\nimport LoginNotifier from './LoginNotifier';\n\nexport type AuthBootstrapProps = {\n /**\n * The children to render after authentication is completed.\n */\n children: React.ReactNode;\n};\n\n/** Core auth plugins that are always loaded */\nconst CORE_AUTH_PLUGINS = new Map([\n [\n '@deephaven/auth-plugins.AuthPluginParent',\n { AuthPlugin: AuthPluginParent },\n ],\n ['@deephaven/auth-plugins.AuthPluginPsk', { AuthPlugin: AuthPluginPsk }],\n [\n '@deephaven/auth-plugins.AuthPluginAnonymous',\n { AuthPlugin: AuthPluginAnonymous },\n ],\n]);\n\n/**\n * AuthBootstrap component. Handles displaying the auth plugin and authenticating.\n */\nexport function AuthBootstrap({ children }: AuthBootstrapProps): JSX.Element {\n const client = useClient();\n // `useContext` instead of `usePlugins` so that we don't have to wait for the plugins to load\n // We want to load the auth config values in parallel with the plugins\n const plugins = useContext(PluginsContext);\n const [authConfig, setAuthConfig] = useState<AuthConfigMap>();\n const [error, setError] = useState<unknown>();\n\n useEffect(\n function initAuthConfigValues() {\n let isCanceled = false;\n async function loadAuthConfigValues(): Promise<void> {\n try {\n const newAuthConfigValues = (await client.getAuthConfigValues()) as [\n string,\n string,\n ][];\n if (!isCanceled) {\n setAuthConfig(new Map(newAuthConfigValues));\n }\n } catch (e) {\n if (!isCanceled) {\n setError(e);\n }\n }\n }\n loadAuthConfigValues();\n return () => {\n isCanceled = true;\n };\n },\n [client]\n );\n\n const AuthComponent = useMemo(() => {\n if (plugins == null || authConfig == null) {\n return undefined;\n }\n\n try {\n return getAuthPluginComponent(plugins, authConfig, CORE_AUTH_PLUGINS);\n } catch (e) {\n setError(e);\n }\n }, [authConfig, plugins]);\n\n const isLoading = AuthComponent == null || authConfig == null;\n\n if (isLoading || error != null) {\n return (\n <LoadingOverlay\n isLoading={isLoading && error == null}\n errorMessage={getErrorMessage(error)}\n data-testid=\"auth-bootstrap-loading-error\"\n />\n );\n }\n return (\n <AuthComponent authConfigValues={authConfig}>\n <>\n <LoginNotifier />\n {children}\n </>\n </AuthComponent>\n );\n}\n\nexport default AuthBootstrap;\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AACvE,SAEEC,mBAAmB,EACnBC,gBAAgB,EAChBC,aAAa,QACR,yBAAyB;AAChC,SAASC,cAAc,QAAQ,uBAAuB;AACtD,SAASC,SAAS,QAAQ,4BAA4B;AACtD,SAASC,eAAe,QAAQ,kBAAkB;AAClD,SAASC,cAAc,QAAQ,mBAAmB;AAAC,SAC1CC,sBAAsB;AAAA,OACxBC,aAAa;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AASpB;AACA,IAAMC,iBAAiB,GAAG,IAAIC,GAAG,CAAC,CAChC,CACE,0CAA0C,EAC1C;EAAEC,UAAU,EAAEhB;AAAiB,CAAC,CACjC,EACD,CAAC,uCAAuC,EAAE;EAAEgB,UAAU,EAAEf;AAAc,CAAC,CAAC,EACxE,CACE,6CAA6C,EAC7C;EAAEe,UAAU,EAAEjB;AAAoB,CAAC,CACpC,CACF,CAAC;;AAEF;AACA;AACA;AACA,OAAO,SAASkB,aAAaA,CAAAC,IAAA,EAAgD;EAAA,IAA/C;IAAEC;EAA6B,CAAC,GAAAD,IAAA;EAC5D,IAAME,MAAM,GAAGjB,SAAS,CAAC,CAAC;EAC1B;EACA;EACA,IAAMkB,OAAO,GAAG1B,UAAU,CAACU,cAAc,CAAC;EAC1C,IAAM,CAACiB,UAAU,EAAEC,aAAa,CAAC,GAAGzB,QAAQ,CAAgB,CAAC;EAC7D,IAAM,CAAC0B,KAAK,EAAEC,QAAQ,CAAC,GAAG3B,QAAQ,CAAU,CAAC;EAE7CF,SAAS,CACP,SAAS8B,oBAAoBA,CAAA,EAAG;IAC9B,IAAIC,UAAU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3C,CAAC;EAEN;EACA,oBACEf,IAAA,CAAC2B,aAAa;IAACI,gBAAgB,EAAElB,UAAW;IAAAH,QAAA,eAC1CN,KAAA,CAAAF,SAAA;MAAAQ,QAAA,gBACEV,IAAA,CAACF,aAAa,IAAE,CAAC,EAChBY,QAAQ;IAAA,CACT;EAAC,CACU,CAAC;AAEpB;AAEA,eAAeF,aAAa","ignoreList":[]}
|
|
@@ -7,9 +7,7 @@ import Log from '@deephaven/log';
|
|
|
7
7
|
import { assertNotNull } from '@deephaven/utils';
|
|
8
8
|
import { vsDebugDisconnect } from '@deephaven/icons';
|
|
9
9
|
import ConnectionContext from "./ConnectionContext.js";
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
12
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
11
|
var log = Log.module('@deephaven/app-utils.ConnectionBootstrap');
|
|
14
12
|
/**
|
|
15
13
|
* ConnectionBootstrap component. Handles initializing the connection.
|
|
@@ -114,7 +112,7 @@ export function ConnectionBootstrap(_ref) {
|
|
|
114
112
|
var removerFn = connection.addEventListener(api.CoreClient.EVENT_RECONNECT_AUTH_FAILED, handleAuthFailed);
|
|
115
113
|
return removerFn;
|
|
116
114
|
}, [api, connection, isShutdown]);
|
|
117
|
-
var objectFetcher = useCallback(
|
|
115
|
+
var objectFetcher = useCallback(/*#__PURE__*/function () {
|
|
118
116
|
var _ref2 = _asyncToGenerator(function* (descriptor) {
|
|
119
117
|
assertNotNull(connection, 'No connection available to fetch object with');
|
|
120
118
|
if (typeof descriptor === 'string') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectionBootstrap.js","names":["React","useCallback","useEffect","useMemo","useState","BasicModal","DebouncedModal","InfoModal","LoadingOverlay","LoadingSpinner","ObjectFetcherContext","ObjectFetchManagerContext","sanitizeVariableDescriptor","useApi","useClient","Log","assertNotNull","vsDebugDisconnect","ConnectionContext","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","log","module","ConnectionBootstrap","_ref","children","api","client","error","setError","connection","setConnection","connectionState","setConnectionState","isAuthFailed","isShutdown","isReconnecting","isNotConnecting","initConnection","isCanceled","loadConnection","_loadConnection","apply","arguments","_asyncToGenerator","newConnection","getAsIdeConnection","e","listenForDisconnect","handleDisconnect","event","detail","info","concat","JSON","stringify","removerFn","addEventListener","IdeConnection","EVENT_DISCONNECT","listenForReconnect","handleReconnect","CoreClient","EVENT_RECONNECT","listenForShutdown","handleShutdown","EVENT_SHUTDOWN","listenForAuthFailed","handleAuthFailed","warn","EVENT_RECONNECT_AUTH_FAILED","objectFetcher","_ref2","descriptor","Error","getObject","_x","objectManager","subscribe","onUpdate","fetch","status","handleRefresh","window","location","reload","isLoading","errorMessage","undefined","Provider","value","isOpen","debounceMs","icon","title","subtitle","confirmButtonText","onConfirm","headerText","bodyText"],"sources":["../../src/components/ConnectionBootstrap.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport {\n BasicModal,\n DebouncedModal,\n InfoModal,\n LoadingOverlay,\n LoadingSpinner,\n} from '@deephaven/components';\nimport {\n ObjectFetcherContext,\n type ObjectFetchManager,\n ObjectFetchManagerContext,\n sanitizeVariableDescriptor,\n type UriVariableDescriptor,\n useApi,\n useClient,\n} from '@deephaven/jsapi-bootstrap';\nimport type { dh } from '@deephaven/jsapi-types';\nimport Log from '@deephaven/log';\nimport { assertNotNull } from '@deephaven/utils';\nimport { vsDebugDisconnect } from '@deephaven/icons';\nimport ConnectionContext from './ConnectionContext';\n\nconst log = Log.module('@deephaven/app-utils.ConnectionBootstrap');\n\nexport type ConnectionBootstrapProps = {\n /**\n * The children to render wrapped with the ConnectionContext.\n * Will not render children until the connection is created.\n */\n children: React.ReactNode;\n};\n\n/**\n * ConnectionBootstrap component. Handles initializing the connection.\n */\nexport function ConnectionBootstrap({\n children,\n}: ConnectionBootstrapProps): JSX.Element {\n const api = useApi();\n const client = useClient();\n const [error, setError] = useState<unknown>();\n const [connection, setConnection] = useState<dh.IdeConnection>();\n const [connectionState, setConnectionState] = useState<\n | 'not_connecting'\n | 'connecting'\n | 'connected'\n | 'reconnecting'\n | 'failed'\n | 'shutdown'\n >('connecting');\n const isAuthFailed = connectionState === 'failed';\n const isShutdown = connectionState === 'shutdown';\n const isReconnecting = connectionState === 'reconnecting';\n const isNotConnecting = connectionState === 'not_connecting';\n\n useEffect(\n function initConnection() {\n let isCanceled = false;\n async function loadConnection(): Promise<void> {\n try {\n const newConnection = await client.getAsIdeConnection();\n if (isCanceled) {\n return;\n }\n setConnection(newConnection);\n setConnectionState('connected');\n } catch (e) {\n if (isCanceled) {\n return;\n }\n setError(e);\n setConnectionState('not_connecting');\n }\n }\n loadConnection();\n return () => {\n isCanceled = true;\n };\n },\n [api, client]\n );\n\n useEffect(\n function listenForDisconnect() {\n if (connection == null || isShutdown) return;\n\n // handles the disconnect event\n function handleDisconnect(event: dh.Event<unknown>): void {\n const { detail } = event;\n log.info('Disconnect', `${JSON.stringify(detail)}`);\n setConnectionState('reconnecting');\n }\n const removerFn = connection.addEventListener(\n api.IdeConnection.EVENT_DISCONNECT,\n handleDisconnect\n );\n\n return removerFn;\n },\n [api, connection, isShutdown]\n );\n\n useEffect(\n function listenForReconnect() {\n if (connection == null || isShutdown) return;\n\n // handles the reconnect event\n function handleReconnect(event: dh.Event<unknown>): void {\n const { detail } = event;\n log.info('Reconnect', `${JSON.stringify(detail)}`);\n setConnectionState('connected');\n }\n const removerFn = connection.addEventListener(\n api.CoreClient.EVENT_RECONNECT,\n handleReconnect\n );\n\n return removerFn;\n },\n [api, connection, isShutdown]\n );\n\n useEffect(\n function listenForShutdown() {\n if (connection == null) return;\n\n // handles the shutdown event\n function handleShutdown(event: dh.Event<unknown>): void {\n const { detail } = event;\n log.info('Shutdown', `${JSON.stringify(detail)}`);\n setError(`Server shutdown: ${detail ?? 'Unknown reason'}`);\n setConnectionState('shutdown');\n }\n const removerFn = connection.addEventListener(\n api.IdeConnection.EVENT_SHUTDOWN,\n handleShutdown\n );\n\n return removerFn;\n },\n [api, connection]\n );\n\n useEffect(\n function listenForAuthFailed() {\n if (connection == null || isShutdown) return;\n\n // handles the auth failed event\n function handleAuthFailed(event: dh.Event<unknown>): void {\n const { detail } = event;\n log.warn(\n 'Reconnect authentication failed',\n `${JSON.stringify(detail)}`\n );\n setError(\n `Reconnect authentication failed: ${detail ?? 'Unknown reason'}`\n );\n setConnectionState('failed');\n }\n const removerFn = connection.addEventListener(\n api.CoreClient.EVENT_RECONNECT_AUTH_FAILED,\n handleAuthFailed\n );\n\n return removerFn;\n },\n [api, connection, isShutdown]\n );\n\n const objectFetcher = useCallback(\n async (descriptor: dh.ide.VariableDescriptor | UriVariableDescriptor) => {\n assertNotNull(connection, 'No connection available to fetch object with');\n if (typeof descriptor === 'string') {\n throw new Error('No URI resolvers available in Core');\n }\n return connection.getObject(sanitizeVariableDescriptor(descriptor));\n },\n [connection]\n );\n\n /** We don't really need to do anything fancy in Core to manage an object, just fetch it */\n const objectManager: ObjectFetchManager = useMemo(\n () => ({\n subscribe: (descriptor, onUpdate) => {\n // We send an update with the fetch right away\n onUpdate({\n fetch: () => objectFetcher(descriptor),\n status: 'ready',\n });\n return () => {\n // no-op\n // For Core, if the server dies then we can't reconnect anyway, so no need to bother listening for subscription or cleaning up\n };\n },\n }),\n [objectFetcher]\n );\n\n function handleRefresh(): void {\n log.info('Refreshing application');\n window.location.reload();\n }\n\n if (isShutdown || connectionState === 'connecting' || isNotConnecting) {\n return (\n <LoadingOverlay\n data-testid=\"connection-bootstrap-loading\"\n isLoading={false}\n errorMessage={error != null ? `${error}` : undefined}\n />\n );\n }\n\n return (\n <ConnectionContext.Provider value={connection ?? null}>\n <ObjectFetcherContext.Provider value={objectFetcher}>\n <ObjectFetchManagerContext.Provider value={objectManager}>\n {children}\n <DebouncedModal isOpen={isReconnecting} debounceMs={1000}>\n <InfoModal\n icon={vsDebugDisconnect}\n title={\n <>\n <LoadingSpinner /> Attempting to reconnect...\n </>\n }\n subtitle=\"Please check your network connection.\"\n />\n </DebouncedModal>\n <BasicModal\n confirmButtonText=\"Refresh\"\n onConfirm={handleRefresh}\n isOpen={isAuthFailed}\n headerText=\"Authentication failed\"\n bodyText=\"Credentials are invalid. Please refresh your browser to try and reconnect.\"\n />\n </ObjectFetchManagerContext.Provider>\n </ObjectFetcherContext.Provider>\n </ConnectionContext.Provider>\n );\n}\n\nexport default ConnectionBootstrap;\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AACxE,SACEC,UAAU,EACVC,cAAc,EACdC,SAAS,EACTC,cAAc,EACdC,cAAc,QACT,uBAAuB;AAC9B,SACEC,oBAAoB,EAEpBC,yBAAyB,EACzBC,0BAA0B,EAE1BC,MAAM,EACNC,SAAS,QACJ,4BAA4B;AAEnC,OAAOC,GAAG,MAAM,gBAAgB;AAChC,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,iBAAiB,QAAQ,kBAAkB;AAAC,OAC9CC,iBAAiB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAExB,IAAMC,GAAG,GAAGV,GAAG,CAACW,MAAM,CAAC,0CAA0C,CAAC;AAUlE;AACA;AACA;AACA,OAAO,SAASC,mBAAmBA,CAAAC,IAAA,EAEO;EAAA,IAFN;IAClCC;EACwB,CAAC,GAAAD,IAAA;EACzB,IAAME,GAAG,GAAGjB,MAAM,CAAC,CAAC;EACpB,IAAMkB,MAAM,GAAGjB,SAAS,CAAC,CAAC;EAC1B,IAAM,CAACkB,KAAK,EAAEC,QAAQ,CAAC,GAAG7B,QAAQ,CAAU,CAAC;EAC7C,IAAM,CAA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E,IAAK;UAAAnE,QAAA,eACvDT,IAAA,CAACb,SAAS;YACR0F,IAAI,EAAEhF,iBAAkB;YACxBiF,KAAK,eACH1E,KAAA,CAAAF,SAAA;cAAAO,QAAA,gBACET,IAAA,CAACX,cAAc,IAAE,CAAC,+BACpB;YAAA,CAAE,CACH;YACD0F,QAAQ,EAAC;UAAuC,CACjD;QAAC,CACY,CAAC,eACjB/E,IAAA,CAACf,UAAU;UACT+F,iBAAiB,EAAC,SAAS;UAC3BC,SAAS,EAAEf,aAAc;UACzBS,MAAM,EAAEzD,YAAa;UACrBgE,UAAU,EAAC,uBAAuB;UAClCC,QAAQ,EAAC;QAA4E,CACtF,CAAC;MAAA,CACgC;IAAC,CACR;EAAC,CACN,CAAC;AAEjC;AAEA,eAAe5E,mBAAmB"}
|
|
1
|
+
{"version":3,"file":"ConnectionBootstrap.js","names":["React","useCallback","useEffect","useMemo","useState","BasicModal","DebouncedModal","InfoModal","LoadingOverlay","LoadingSpinner","ObjectFetcherContext","ObjectFetchManagerContext","sanitizeVariableDescriptor","useApi","useClient","Log","assertNotNull","vsDebugDisconnect","ConnectionContext","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","log","module","ConnectionBootstrap","_ref","children","api","client","error","setError","connection","setConnection","connectionState","setConnectionState","isAuthFailed","isShutdown","isReconnecting","isNotConnecting","initConnection","isCanceled","loadConnection","_loadConnection","apply","arguments","_asyncToGenerator","newConnection","getAsIdeConnection","e","listenForDisconnect","handleDisconnect","event","detail","info","concat","JSON","stringify","removerFn","addEventListener","IdeConnection","EVENT_DISCONNECT","listenForReconnect","handleReconnect","CoreClient","EVENT_RECONNECT","listenForShutdown","handleShutdown","EVENT_SHUTDOWN","listenForAuthFailed","handleAuthFailed","warn","EVENT_RECONNECT_AUTH_FAILED","objectFetcher","_ref2","descriptor","Error","getObject","_x","objectManager","subscribe","onUpdate","fetch","status","handleRefresh","window","location","reload","isLoading","errorMessage","undefined","Provider","value","isOpen","debounceMs","icon","title","subtitle","confirmButtonText","onConfirm","headerText","bodyText"],"sources":["../../src/components/ConnectionBootstrap.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport {\n BasicModal,\n DebouncedModal,\n InfoModal,\n LoadingOverlay,\n LoadingSpinner,\n} from '@deephaven/components';\nimport {\n ObjectFetcherContext,\n type ObjectFetchManager,\n ObjectFetchManagerContext,\n sanitizeVariableDescriptor,\n type UriVariableDescriptor,\n useApi,\n useClient,\n} from '@deephaven/jsapi-bootstrap';\nimport type { dh } from '@deephaven/jsapi-types';\nimport Log from '@deephaven/log';\nimport { assertNotNull } from '@deephaven/utils';\nimport { vsDebugDisconnect } from '@deephaven/icons';\nimport ConnectionContext from './ConnectionContext';\n\nconst log = Log.module('@deephaven/app-utils.ConnectionBootstrap');\n\nexport type ConnectionBootstrapProps = {\n /**\n * The children to render wrapped with the ConnectionContext.\n * Will not render children until the connection is created.\n */\n children: React.ReactNode;\n};\n\n/**\n * ConnectionBootstrap component. Handles initializing the connection.\n */\nexport function ConnectionBootstrap({\n children,\n}: ConnectionBootstrapProps): JSX.Element {\n const api = useApi();\n const client = useClient();\n const [error, setError] = useState<unknown>();\n const [connection, setConnection] = useState<dh.IdeConnection>();\n const [connectionState, setConnectionState] = useState<\n | 'not_connecting'\n | 'connecting'\n | 'connected'\n | 'reconnecting'\n | 'failed'\n | 'shutdown'\n >('connecting');\n const isAuthFailed = connectionState === 'failed';\n const isShutdown = connectionState === 'shutdown';\n const isReconnecting = connectionState === 'reconnecting';\n const isNotConnecting = connectionState === 'not_connecting';\n\n useEffect(\n function initConnection() {\n let isCanceled = false;\n async function loadConnection(): Promise<void> {\n try {\n const newConnection = await client.getAsIdeConnection();\n if (isCanceled) {\n return;\n }\n setConnection(newConnection);\n setConnectionState('connected');\n } catch (e) {\n if (isCanceled) {\n return;\n }\n setError(e);\n setConnectionState('not_connecting');\n }\n }\n loadConnection();\n return () => {\n isCanceled = true;\n };\n },\n [api, client]\n );\n\n useEffect(\n function listenForDisconnect() {\n if (connection == null || isShutdown) return;\n\n // handles the disconnect event\n function handleDisconnect(event: dh.Event<unknown>): void {\n const { detail } = event;\n log.info('Disconnect', `${JSON.stringify(detail)}`);\n setConnectionState('reconnecting');\n }\n const removerFn = connection.addEventListener(\n api.IdeConnection.EVENT_DISCONNECT,\n handleDisconnect\n );\n\n return removerFn;\n },\n [api, connection, isShutdown]\n );\n\n useEffect(\n function listenForReconnect() {\n if (connection == null || isShutdown) return;\n\n // handles the reconnect event\n function handleReconnect(event: dh.Event<unknown>): void {\n const { detail } = event;\n log.info('Reconnect', `${JSON.stringify(detail)}`);\n setConnectionState('connected');\n }\n const removerFn = connection.addEventListener(\n api.CoreClient.EVENT_RECONNECT,\n handleReconnect\n );\n\n return removerFn;\n },\n [api, connection, isShutdown]\n );\n\n useEffect(\n function listenForShutdown() {\n if (connection == null) return;\n\n // handles the shutdown event\n function handleShutdown(event: dh.Event<unknown>): void {\n const { detail } = event;\n log.info('Shutdown', `${JSON.stringify(detail)}`);\n setError(`Server shutdown: ${detail ?? 'Unknown reason'}`);\n setConnectionState('shutdown');\n }\n const removerFn = connection.addEventListener(\n api.IdeConnection.EVENT_SHUTDOWN,\n handleShutdown\n );\n\n return removerFn;\n },\n [api, connection]\n );\n\n useEffect(\n function listenForAuthFailed() {\n if (connection == null || isShutdown) return;\n\n // handles the auth failed event\n function handleAuthFailed(event: dh.Event<unknown>): void {\n const { detail } = event;\n log.warn(\n 'Reconnect authentication failed',\n `${JSON.stringify(detail)}`\n );\n setError(\n `Reconnect authentication failed: ${detail ?? 'Unknown reason'}`\n );\n setConnectionState('failed');\n }\n const removerFn = connection.addEventListener(\n api.CoreClient.EVENT_RECONNECT_AUTH_FAILED,\n handleAuthFailed\n );\n\n return removerFn;\n },\n [api, connection, isShutdown]\n );\n\n const objectFetcher = useCallback(\n async (descriptor: dh.ide.VariableDescriptor | UriVariableDescriptor) => {\n assertNotNull(connection, 'No connection available to fetch object with');\n if (typeof descriptor === 'string') {\n throw new Error('No URI resolvers available in Core');\n }\n return connection.getObject(sanitizeVariableDescriptor(descriptor));\n },\n [connection]\n );\n\n /** We don't really need to do anything fancy in Core to manage an object, just fetch it */\n const objectManager: ObjectFetchManager = useMemo(\n () => ({\n subscribe: (descriptor, onUpdate) => {\n // We send an update with the fetch right away\n onUpdate({\n fetch: () => objectFetcher(descriptor),\n status: 'ready',\n });\n return () => {\n // no-op\n // For Core, if the server dies then we can't reconnect anyway, so no need to bother listening for subscription or cleaning up\n };\n },\n }),\n [objectFetcher]\n );\n\n function handleRefresh(): void {\n log.info('Refreshing application');\n window.location.reload();\n }\n\n if (isShutdown || connectionState === 'connecting' || isNotConnecting) {\n return (\n <LoadingOverlay\n data-testid=\"connection-bootstrap-loading\"\n isLoading={false}\n errorMessage={error != null ? `${error}` : undefined}\n />\n );\n }\n\n return (\n <ConnectionContext.Provider value={connection ?? null}>\n <ObjectFetcherContext.Provider value={objectFetcher}>\n <ObjectFetchManagerContext.Provider value={objectManager}>\n {children}\n <DebouncedModal isOpen={isReconnecting} debounceMs={1000}>\n <InfoModal\n icon={vsDebugDisconnect}\n title={\n <>\n <LoadingSpinner /> Attempting to reconnect...\n </>\n }\n subtitle=\"Please check your network connection.\"\n />\n </DebouncedModal>\n <BasicModal\n confirmButtonText=\"Refresh\"\n onConfirm={handleRefresh}\n isOpen={isAuthFailed}\n headerText=\"Authentication failed\"\n bodyText=\"Credentials are invalid. Please refresh your browser to try and reconnect.\"\n />\n </ObjectFetchManagerContext.Provider>\n </ObjectFetcherContext.Provider>\n </ConnectionContext.Provider>\n );\n}\n\nexport default ConnectionBootstrap;\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AACxE,SACEC,UAAU,EACVC,cAAc,EACdC,SAAS,EACTC,cAAc,EACdC,cAAc,QACT,uBAAuB;AAC9B,SACEC,oBAAoB,EAEpBC,yBAAyB,EACzBC,0BAA0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AIlD,UAAU,IAAIH,eAAe,KAAK,YAAY,IAAIK,eAAe,EAAE;IACrE,oBACErB,IAAA,CAACZ,cAAc;MACb,eAAY,8BAA8B;MAC1CkF,SAAS,EAAE,KAAM;MACjBC,YAAY,EAAE3D,KAAK,IAAI,IAAI,MAAAyB,MAAA,CAAMzB,KAAK,IAAK4D;IAAU,CACtD,CAAC;EAEN;EAEA,oBACExE,IAAA,CAACF,iBAAiB,CAAC2E,QAAQ;IAACC,KAAK,EAAE5D,UAAU,aAAVA,UAAU,cAAVA,UAAU,GAAI,IAAK;IAAAL,QAAA,eACpDT,IAAA,CAACV,oBAAoB,CAACmF,QAAQ;MAACC,KAAK,EAAEnB,aAAc;MAAA9C,QAAA,eAClDL,KAAA,CAACb,yBAAyB,CAACkF,QAAQ;QAACC,KAAK,EAAEb,aAAc;QAAApD,QAAA,GACtDA,QAAQ,eACTT,IAAA,CAACd,cAAc;UAACyF,MAAM,EAAEvD,cAAe;UAACwD,UAAU,EAAE,IAAK;UAAAnE,QAAA,eACvDT,IAAA,CAACb,SAAS;YACR0F,IAAI,EAAEhF,iBAAkB;YACxBiF,KAAK,eACH1E,KAAA,CAAAF,SAAA;cAAAO,QAAA,gBACET,IAAA,CAACX,cAAc,IAAE,CAAC,+BACpB;YAAA,CAAE,CACH;YACD0F,QAAQ,EAAC;UAAuC,CACjD;QAAC,CACY,CAAC,eACjB/E,IAAA,CAACf,UAAU;UACT+F,iBAAiB,EAAC,SAAS;UAC3BC,SAAS,EAAEf,aAAc;UACzBS,MAAM,EAAEzD,YAAa;UACrBgE,UAAU,EAAC,uBAAuB;UAClCC,QAAQ,EAAC;QAA4E,CACtF,CAAC;MAAA,CACgC;IAAC,CACR;EAAC,CACN,CAAC;AAEjC;AAEA,eAAe5E,mBAAmB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectionContext.js","names":["createContext","ConnectionContext","displayName"],"sources":["../../src/components/ConnectionContext.ts"],"sourcesContent":["import { createContext } from 'react';\nimport type { dh } from '@deephaven/jsapi-types';\n\nexport const ConnectionContext = createContext<dh.IdeConnection | null>(null);\nConnectionContext.displayName = 'ConnectionContext';\n\nexport default ConnectionContext;\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,OAAO;AAGrC,OAAO,IAAMC,iBAAiB,gBAAGD,aAAa,CAA0B,IAAI,CAAC;AAC7EC,iBAAiB,CAACC,WAAW,GAAG,mBAAmB;AAEnD,eAAeD,iBAAiB"}
|
|
1
|
+
{"version":3,"file":"ConnectionContext.js","names":["createContext","ConnectionContext","displayName"],"sources":["../../src/components/ConnectionContext.ts"],"sourcesContent":["import { createContext } from 'react';\nimport type { dh } from '@deephaven/jsapi-types';\n\nexport const ConnectionContext = createContext<dh.IdeConnection | null>(null);\nConnectionContext.displayName = 'ConnectionContext';\n\nexport default ConnectionContext;\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,OAAO;AAGrC,OAAO,IAAMC,iBAAiB,gBAAGD,aAAa,CAA0B,IAAI,CAAC;AAC7EC,iBAAiB,CAACC,WAAW,GAAG,mBAAmB;AAEnD,eAAeD,iBAAiB","ignoreList":[]}
|
|
@@ -10,9 +10,7 @@ import '@fontsource/fira-sans/500.css';
|
|
|
10
10
|
import '@fontsource/fira-sans/600.css';
|
|
11
11
|
import '@fontsource/fira-sans/700.css';
|
|
12
12
|
import '@fontsource/fira-sans/700-italic.css';
|
|
13
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
15
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
14
|
export var FontsLoadedContext = /*#__PURE__*/createContext(false);
|
|
17
15
|
FontsLoadedContext.displayName = 'FontsLoadedContext';
|
|
18
16
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FontBootstrap.js","names":["React","createContext","useEffect","useState","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","FontsLoadedContext","displayName","FontBootstrap","_ref","fontClassNames","children","isLoaded","setIsLoaded","initFonts","document","fonts","ready","then","Provider","value","id","style","visibility","position","top","map","className"],"sources":["../../src/components/FontBootstrap.tsx"],"sourcesContent":["import React, { createContext, useEffect, useState } from 'react';\nimport '@fontsource/fira-mono/400.css';\nimport '@fontsource/fira-mono/500.css';\nimport '@fontsource/fira-mono/700.css';\nimport '@fontsource/fira-sans/300.css';\nimport '@fontsource/fira-sans/300-italic.css';\nimport '@fontsource/fira-sans/400.css';\nimport '@fontsource/fira-sans/400-italic.css';\nimport '@fontsource/fira-sans/500.css';\nimport '@fontsource/fira-sans/600.css';\nimport '@fontsource/fira-sans/700.css';\nimport '@fontsource/fira-sans/700-italic.css';\n\nexport const FontsLoadedContext = createContext<boolean>(false);\nFontsLoadedContext.displayName = 'FontsLoadedContext';\n\nexport type FontBootstrapProps = {\n /**\n * Class names of the font elements to pre load\n */\n fontClassNames?: string[];\n\n /**\n * The children to render wrapped with the FontsLoadedContext.\n * Note that it renders the children even if the fonts aren't loaded yet.\n */\n children: React.ReactNode;\n};\n\n/**\n * FontBootstrap component. Handles preloading fonts.\n */\nexport function FontBootstrap({\n fontClassNames = ['fira-sans-regular', 'fira-sans-semibold', 'fira-mono'],\n children,\n}: FontBootstrapProps): JSX.Element {\n const [isLoaded, setIsLoaded] = useState(false);\n useEffect(function initFonts() {\n document.fonts.ready.then(() => {\n setIsLoaded(true);\n });\n }, []);\n\n return (\n <>\n <FontsLoadedContext.Provider value={isLoaded}>\n {children}\n </FontsLoadedContext.Provider>\n {/*\n Need to preload any monaco and Deephaven grid fonts.\n We hide text with all the fonts we need on the root app.jsx page\n Load the Fira Mono font so that Monaco calculates word wrapping properly.\n This element doesn't need to be visible, just load the font and stay hidden.\n https://github.com/microsoft/vscode/issues/88689\n Can be replaced with a rel=\"preload\" when firefox adds support\n https://developer.mozilla.org/en-US/docs/Web/HTML/Preloading_content\n */}\n <div\n id=\"preload-fonts\"\n style={{ visibility: 'hidden', position: 'absolute', top: -10000 }}\n >\n {/* trigger loading of fonts needed by monaco and iris grid */}\n {fontClassNames.map(className => (\n <p key={className} className={className}>\n preload\n </p>\n ))}\n </div>\n </>\n );\n}\n\nexport default FontBootstrap;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AACjE,OAAO,+BAA+B;AACtC,OAAO,+BAA+B;AACtC,OAAO,+BAA+B;AACtC,OAAO,+BAA+B;AACtC,OAAO,sCAAsC;AAC7C,OAAO,+BAA+B;AACtC,OAAO,sCAAsC;AAC7C,OAAO,+BAA+B;AACtC,OAAO,+BAA+B;AACtC,OAAO,+BAA+B;AACtC,OAAO,sCAAsC;AAAC,SAAAC,GAAA,IAAAC,IAAA
|
|
1
|
+
{"version":3,"file":"FontBootstrap.js","names":["React","createContext","useEffect","useState","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","FontsLoadedContext","displayName","FontBootstrap","_ref","fontClassNames","children","isLoaded","setIsLoaded","initFonts","document","fonts","ready","then","Provider","value","id","style","visibility","position","top","map","className"],"sources":["../../src/components/FontBootstrap.tsx"],"sourcesContent":["import React, { createContext, useEffect, useState } from 'react';\nimport '@fontsource/fira-mono/400.css';\nimport '@fontsource/fira-mono/500.css';\nimport '@fontsource/fira-mono/700.css';\nimport '@fontsource/fira-sans/300.css';\nimport '@fontsource/fira-sans/300-italic.css';\nimport '@fontsource/fira-sans/400.css';\nimport '@fontsource/fira-sans/400-italic.css';\nimport '@fontsource/fira-sans/500.css';\nimport '@fontsource/fira-sans/600.css';\nimport '@fontsource/fira-sans/700.css';\nimport '@fontsource/fira-sans/700-italic.css';\n\nexport const FontsLoadedContext = createContext<boolean>(false);\nFontsLoadedContext.displayName = 'FontsLoadedContext';\n\nexport type FontBootstrapProps = {\n /**\n * Class names of the font elements to pre load\n */\n fontClassNames?: string[];\n\n /**\n * The children to render wrapped with the FontsLoadedContext.\n * Note that it renders the children even if the fonts aren't loaded yet.\n */\n children: React.ReactNode;\n};\n\n/**\n * FontBootstrap component. Handles preloading fonts.\n */\nexport function FontBootstrap({\n fontClassNames = ['fira-sans-regular', 'fira-sans-semibold', 'fira-mono'],\n children,\n}: FontBootstrapProps): JSX.Element {\n const [isLoaded, setIsLoaded] = useState(false);\n useEffect(function initFonts() {\n document.fonts.ready.then(() => {\n setIsLoaded(true);\n });\n }, []);\n\n return (\n <>\n <FontsLoadedContext.Provider value={isLoaded}>\n {children}\n </FontsLoadedContext.Provider>\n {/*\n Need to preload any monaco and Deephaven grid fonts.\n We hide text with all the fonts we need on the root app.jsx page\n Load the Fira Mono font so that Monaco calculates word wrapping properly.\n This element doesn't need to be visible, just load the font and stay hidden.\n https://github.com/microsoft/vscode/issues/88689\n Can be replaced with a rel=\"preload\" when firefox adds support\n https://developer.mozilla.org/en-US/docs/Web/HTML/Preloading_content\n */}\n <div\n id=\"preload-fonts\"\n style={{ visibility: 'hidden', position: 'absolute', top: -10000 }}\n >\n {/* trigger loading of fonts needed by monaco and iris grid */}\n {fontClassNames.map(className => (\n <p key={className} className={className}>\n preload\n </p>\n ))}\n </div>\n </>\n );\n}\n\nexport default FontBootstrap;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AACjE,OAAO,+BAA+B;AACtC,OAAO,+BAA+B;AACtC,OAAO,+BAA+B;AACtC,OAAO,+BAA+B;AACtC,OAAO,sCAAsC;AAC7C,OAAO,+BAA+B;AACtC,OAAO,sCAAsC;AAC7C,OAAO,+BAA+B;AACtC,OAAO,+BAA+B;AACtC,OAAO,+BAA+B;AACtC,OAAO,sCAAsC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAE9C,OAAO,IAAMC,kBAAkB,gBAAGT,aAAa,CAAU,KAAK,CAAC;AAC/DS,kBAAkB,CAACC,WAAW,GAAG,oBAAoB;AAerD;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAAAC,IAAA,EAGO;EAAA,IAHN;IAC5BC,cAAc,GAAG,CAAC,mBAAmB,EAAE,oBAAoB,EAAE,WAAW,CAAC;IACzEC;EACkB,CAAC,GAAAF,IAAA;EACnB,IAAM,CAACG,QAAQ,EAAEC,WAAW,CAAC,GAAGd,QAAQ,CAAC,KAAK,CAAC;EAC/CD,SAAS,CAAC,SAASgB,SAASA,CAAA,EAAG;IAC7BC,QAAQ,CAACC,KAAK,CAACC,KAAK,CAACC,IAAI,CAAC,MAAM;MAC9BL,WAAW,CAAC,IAAI,CAAC;IACnB,CAAC,CAAC;EACJ,CAAC,EAAE,EAAE,CAAC;EAEN,oBACER,KAAA,CAAAF,SAAA;IAAAQ,QAAA,gBACEV,IAAA,CAACK,kBAAkB,CAACa,QAAQ;MAACC,KAAK,EAAER,QAAS;MAAAD,QAAA,EAC1CA;IAAQ,CACkB,CAAC,eAU9BV,IAAA;MACEoB,EAAE,EAAC,eAAe;MAClBC,KAAK,EAAE;QAAEC,UAAU,EAAE,QAAQ;QAAEC,QAAQ,EAAE,UAAU;QAAEC,GAAG,EAAE,CAAC;MAAM,CAAE;MAAAd,QAAA,EAGlED,cAAc,CAACgB,GAAG,CAACC,SAAS,iBAC3B1B,IAAA;QAAmB0B,SAAS,EAAEA,SAAU;QAAAhB,QAAA,EAAC;MAEzC,GAFQgB,SAEL,CACJ;IAAC,CACC,CAAC;EAAA,CACN,CAAC;AAEP;AAEA,eAAenB,aAAa","ignoreList":[]}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
2
|
import { LoadingOverlay } from '@deephaven/components';
|
|
3
3
|
import { FontsLoadedContext } from "./FontBootstrap.js";
|
|
4
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
4
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
6
5
|
export function FontsLoaded(_ref) {
|
|
7
6
|
var {
|
|
8
7
|
children
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FontsLoaded.js","names":["React","useContext","LoadingOverlay","FontsLoadedContext","jsx","_jsx","Fragment","_Fragment","FontsLoaded","_ref","children","isFontsLoaded"],"sources":["../../src/components/FontsLoaded.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { LoadingOverlay } from '@deephaven/components';\nimport { FontsLoadedContext } from './FontBootstrap';\n\nexport type FontsLoadedProps = {\n /** Children to show when the fonts have completed loading */\n children: React.ReactNode;\n};\n\nexport function FontsLoaded({ children }: FontsLoadedProps): JSX.Element {\n const isFontsLoaded = useContext(FontsLoadedContext);\n\n if (!isFontsLoaded) {\n return <LoadingOverlay data-testid=\"fonts-loaded-loading\" />;\n }\n\n // eslint-disable-next-line react/jsx-no-useless-fragment\n return <>{children}</>;\n}\n\nexport default FontsLoaded;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,cAAc,QAAQ,uBAAuB;AAAC,SAC9CC,kBAAkB;AAAA,SAAAC,GAAA,IAAAC,IAAA
|
|
1
|
+
{"version":3,"file":"FontsLoaded.js","names":["React","useContext","LoadingOverlay","FontsLoadedContext","jsx","_jsx","Fragment","_Fragment","FontsLoaded","_ref","children","isFontsLoaded"],"sources":["../../src/components/FontsLoaded.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { LoadingOverlay } from '@deephaven/components';\nimport { FontsLoadedContext } from './FontBootstrap';\n\nexport type FontsLoadedProps = {\n /** Children to show when the fonts have completed loading */\n children: React.ReactNode;\n};\n\nexport function FontsLoaded({ children }: FontsLoadedProps): JSX.Element {\n const isFontsLoaded = useContext(FontsLoadedContext);\n\n if (!isFontsLoaded) {\n return <LoadingOverlay data-testid=\"fonts-loaded-loading\" />;\n }\n\n // eslint-disable-next-line react/jsx-no-useless-fragment\n return <>{children}</>;\n}\n\nexport default FontsLoaded;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,cAAc,QAAQ,uBAAuB;AAAC,SAC9CC,kBAAkB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA;AAO3B,OAAO,SAASC,WAAWA,CAAAC,IAAA,EAA8C;EAAA,IAA7C;IAAEC;EAA2B,CAAC,GAAAD,IAAA;EACxD,IAAME,aAAa,GAAGV,UAAU,CAACE,kBAAkB,CAAC;EAEpD,IAAI,CAACQ,aAAa,EAAE;IAClB,oBAAON,IAAA,CAACH,cAAc;MAAC,eAAY;IAAsB,CAAE,CAAC;EAC9D;;EAEA;EACA,oBAAOG,IAAA,CAAAE,SAAA;IAAAG,QAAA,EAAGA;EAAQ,CAAG,CAAC;AACxB;AAEA,eAAeF,WAAW","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoginNotifier.js","names":["useBroadcastChannel","BROADCAST_LOGIN_MESSAGE","makeMessage","useEffect","LoginNotifier","channel","notifyLogin","postMessage"],"sources":["../../src/components/LoginNotifier.tsx"],"sourcesContent":["import { useBroadcastChannel } from '@deephaven/jsapi-components';\nimport { BROADCAST_LOGIN_MESSAGE } from '@deephaven/jsapi-utils';\nimport { makeMessage } from '@deephaven/utils';\nimport { useEffect } from 'react';\n\n/**\n * Component that broadcasts a message when mounted. Should be mounted after the user has logged in.\n */\nexport function LoginNotifier(): JSX.Element | null {\n const channel = useBroadcastChannel();\n useEffect(\n function notifyLogin() {\n channel.postMessage(makeMessage(BROADCAST_LOGIN_MESSAGE));\n },\n [channel]\n );\n return null;\n}\n\nexport default LoginNotifier;\n"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,6BAA6B;AACjE,SAASC,uBAAuB,QAAQ,wBAAwB;AAChE,SAASC,WAAW,QAAQ,kBAAkB;AAC9C,SAASC,SAAS,QAAQ,OAAO;;AAEjC;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAAA,EAAuB;EAClD,IAAMC,OAAO,GAAGL,mBAAmB,CAAC,CAAC;EACrCG,SAAS,CACP,SAASG,WAAWA,CAAA,EAAG;IACrBD,OAAO,CAACE,WAAW,CAACL,WAAW,CAACD,uBAAuB,CAAC,CAAC;EAC3D,CAAC,EACD,CAACI,OAAO,CACV,CAAC;EACD,OAAO,IAAI;AACb;AAEA,eAAeD,aAAa"}
|
|
1
|
+
{"version":3,"file":"LoginNotifier.js","names":["useBroadcastChannel","BROADCAST_LOGIN_MESSAGE","makeMessage","useEffect","LoginNotifier","channel","notifyLogin","postMessage"],"sources":["../../src/components/LoginNotifier.tsx"],"sourcesContent":["import { useBroadcastChannel } from '@deephaven/jsapi-components';\nimport { BROADCAST_LOGIN_MESSAGE } from '@deephaven/jsapi-utils';\nimport { makeMessage } from '@deephaven/utils';\nimport { useEffect } from 'react';\n\n/**\n * Component that broadcasts a message when mounted. Should be mounted after the user has logged in.\n */\nexport function LoginNotifier(): JSX.Element | null {\n const channel = useBroadcastChannel();\n useEffect(\n function notifyLogin() {\n channel.postMessage(makeMessage(BROADCAST_LOGIN_MESSAGE));\n },\n [channel]\n );\n return null;\n}\n\nexport default LoginNotifier;\n"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,6BAA6B;AACjE,SAASC,uBAAuB,QAAQ,wBAAwB;AAChE,SAASC,WAAW,QAAQ,kBAAkB;AAC9C,SAASC,SAAS,QAAQ,OAAO;;AAEjC;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAAA,EAAuB;EAClD,IAAMC,OAAO,GAAGL,mBAAmB,CAAC,CAAC;EACrCG,SAAS,CACP,SAASG,WAAWA,CAAA,EAAG;IACrBD,OAAO,CAACE,WAAW,CAACL,WAAW,CAACD,uBAAuB,CAAC,CAAC;EAC3D,CAAC,EACD,CAACI,OAAO,CACV,CAAC;EACD,OAAO,IAAI;AACb;AAEA,eAAeD,aAAa","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginsBootstrap.js","names":["React","useEffect","useState","PluginsContext","loadModulePlugins","jsx","_jsx","PluginsBootstrap","_ref","pluginsUrl","getCorePlugins","children","plugins","setPlugins","initPlugins","isCanceled","loadPlugins","_loadPlugins","apply","arguments","_asyncToGenerator","_yield$getCorePlugins","corePlugins","pluginModules","corePluginPairs","map","plugin","name","Map","Provider","value"],"sources":["../../src/components/PluginsBootstrap.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport {\n type Plugin,\n type PluginModuleMap,\n PluginsContext,\n} from '@deephaven/plugin';\nimport { loadModulePlugins } from '../plugins';\n\nexport type PluginsBootstrapProps = {\n /**\n * Base URL of the plugins to load.\n */\n pluginsUrl: string;\n\n /** The core plugins to load. */\n getCorePlugins?: () => Promise<Plugin[]>;\n\n /**\n * The children to render wrapped with the PluginsContext.\n * Note that it renders the children even if the plugins aren't loaded yet.\n */\n children: React.ReactNode;\n};\n\n/**\n * PluginsBootstrap component. Handles loading the plugins.\n */\nexport function PluginsBootstrap({\n pluginsUrl,\n getCorePlugins,\n children,\n}: PluginsBootstrapProps): JSX.Element {\n const [plugins, setPlugins] = useState<PluginModuleMap | null>(null);\n useEffect(\n function initPlugins() {\n let isCanceled = false;\n async function loadPlugins(): Promise<void> {\n const corePlugins = (await getCorePlugins?.()) ?? [];\n const pluginModules = await loadModulePlugins(pluginsUrl);\n if (!isCanceled) {\n const corePluginPairs = corePlugins.map(\n plugin => [plugin.name, plugin] as const\n );\n setPlugins(new Map([...corePluginPairs, ...pluginModules]));\n }\n }\n loadPlugins();\n return () => {\n isCanceled = true;\n };\n },\n [pluginsUrl, getCorePlugins]\n );\n\n return (\n <PluginsContext.Provider value={plugins}>\n {children}\n </PluginsContext.Provider>\n );\n}\n\nexport default PluginsBootstrap;\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,S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KAAK,EAAElB,OAAQ;IAAAD,QAAA,EACrCA;EAAQ,CACc,CAAC;AAE9B;AAEA,eAAeJ,gBAAgB"}
|
|
1
|
+
{"version":3,"file":"PluginsBootstrap.js","names":["React","useEffect","useState","PluginsContext","loadModulePlugins","jsx","_jsx","PluginsBootstrap","_ref","pluginsUrl","getCorePlugins","children","plugins","setPlugins","initPlugins","isCanceled","loadPlugins","_loadPlugins","apply","arguments","_asyncToGenerator","_yield$getCorePlugins","corePlugins","pluginModules","corePluginPairs","map","plugin","name","Map","Provider","value"],"sources":["../../src/components/PluginsBootstrap.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport {\n type Plugin,\n type PluginModuleMap,\n PluginsContext,\n} from '@deephaven/plugin';\nimport { loadModulePlugins } from '../plugins';\n\nexport type PluginsBootstrapProps = {\n /**\n * Base URL of the plugins to load.\n */\n pluginsUrl: string;\n\n /** The core plugins to load. */\n getCorePlugins?: () => Promise<Plugin[]>;\n\n /**\n * The children to render wrapped with the PluginsContext.\n * Note that it renders the children even if the plugins aren't loaded yet.\n */\n children: React.ReactNode;\n};\n\n/**\n * PluginsBootstrap component. Handles loading the plugins.\n */\nexport function PluginsBootstrap({\n pluginsUrl,\n getCorePlugins,\n children,\n}: PluginsBootstrapProps): JSX.Element {\n const [plugins, setPlugins] = useState<PluginModuleMap | null>(null);\n useEffect(\n function initPlugins() {\n let isCanceled = false;\n async function loadPlugins(): Promise<void> {\n const corePlugins = (await getCorePlugins?.()) ?? [];\n const pluginModules = await loadModulePlugins(pluginsUrl);\n if (!isCanceled) {\n const corePluginPairs = corePlugins.map(\n plugin => [plugin.name, plugin] as const\n );\n setPlugins(new Map([...corePluginPairs, ...pluginModules]));\n }\n }\n loadPlugins();\n return () => {\n isCanceled = true;\n };\n },\n [pluginsUrl, getCorePlugins]\n );\n\n return (\n <PluginsContext.Provider value={plugins}>\n {children}\n </PluginsContext.Provider>\n );\n}\n\nexport default PluginsBootstrap;\n"],"mappings":";;AAAA,OA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AC0B,QAAQ;IAACC,KAAK,EAAElB,OAAQ;IAAAD,QAAA,EACrCA;EAAQ,CACc,CAAC;AAE9B;AAEA,eAAeJ,gBAAgB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerConfigBootstrap.js","names":["React","createContext","useEffect","useState","LoadingOverlay","useClient","getErrorMessage","jsx","_jsx","ServerConfigContext","displayName","ServerConfigBootstrap","_ref","children","client","serverConfig","setServerConfig","error","setError","initServerConfigValues","isCanceled","loadServerConfigValues","_loadServerConfigValues","apply","arguments","_asyncToGenerator","newServerConfigValues","getServerConfigValues","Map","e","isLoading","errorMessage","Provider","value"],"sources":["../../src/components/ServerConfigBootstrap.tsx"],"sourcesContent":["import React, { createContext, useEffect, useState } from 'react';\nimport { LoadingOverlay } from '@deephaven/components';\nimport { useClient } from '@deephaven/jsapi-bootstrap';\nimport { getErrorMessage } from '@deephaven/utils';\n\nexport const ServerConfigContext = createContext<Map<string, string> | null>(\n null\n);\nServerConfigContext.displayName = 'ServerConfigContext';\n\nexport type ServerConfigBootstrapProps = {\n /**\n * The children to render after server config is loaded.\n */\n children: React.ReactNode;\n};\n\n/**\n * ServerConfigBootstrap component. Handles loading the server config.\n */\nexport function ServerConfigBootstrap({\n children,\n}: ServerConfigBootstrapProps): JSX.Element {\n const client = useClient();\n const [serverConfig, setServerConfig] = useState<Map<string, string>>();\n const [error, setError] = useState<unknown>();\n\n useEffect(\n function initServerConfigValues() {\n let isCanceled = false;\n async function loadServerConfigValues(): Promise<void> {\n try {\n const newServerConfigValues =\n (await client.getServerConfigValues()) as [string, string][];\n if (!isCanceled) {\n setServerConfig(new Map(newServerConfigValues));\n }\n } catch (e) {\n if (!isCanceled) {\n setError(e);\n }\n }\n }\n loadServerConfigValues();\n return () => {\n isCanceled = true;\n };\n },\n [client]\n );\n\n const isLoading = serverConfig == null;\n\n if (isLoading || error != null) {\n return (\n <LoadingOverlay\n data-testid=\"server-config-bootstrap-loading\"\n isLoading={isLoading && error == null}\n errorMessage={getErrorMessage(error)}\n />\n );\n }\n\n return (\n <ServerConfigContext.Provider value={serverConfig}>\n {children}\n </ServerConfigContext.Provider>\n );\n}\n\nexport default ServerConfigBootstrap;\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AACjE,SAASC,cAAc,QAAQ,uBAAuB;AACtD,SAASC,SAAS,QAAQ,4BAA4B;AACtD,SAASC,eAAe,QAAQ,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEnD,OAAO,IAAMC,mBAAmB,gBAAGR,aAAa,CAC9C,IACF,CAAC;AACDQ,mBAAmB,CAACC,WAAW,GAAG,qBAAqB;AASvD;AACA;AACA;AACA,OAAO,SAASC,qBAAqBA,CAAAC,IAAA,EAEO;EAAA,IAFN;IACpCC;EAC0B,CAAC,GAAAD,IAAA;EAC3B,IAAME,MAAM,GAAGT,SAAS,CAAC,CAAC;EAC1B,IAAM,CAACU,YAAY,EAAEC,eAAe,CAAC,GAAGb,QAAQ,CAAsB,CAAC;EACvE,IAAM,CAACc,KAAK,EAAEC,QAAQ,CAAC,GAAGf,QAAQ,CAAU,CAAC;EAE7CD,SAAS,CACP,SAASiB,sBAAsBA,CAAA,EAAG;IAChC,IAAIC,UAAU,GAAG,KAAK;IAAC,SACRC,sBAAsBA,CAAA;MAAA,OAAAC,uBAAA,CAAAC,KAAA,OAAAC,SAAA;IAAA;IAAA,SAAAF,wBAAA;MAAAA,uBAAA,GAAAG,iBAAA,CAArC,aAAuD;QACrD,IAAI;UACF,IAAMC,qBAAqB,SAClBZ,MAAM,CAACa,qBAAqB,CAAC,CAAwB;UAC9D,IAAI,CAACP,UAAU,EAAE;YACfJ,eAAe,CAAC,IAAIY,GAAG,CAACF,qBAAqB,CAAC,CAAC;UACjD;QACF,CAAC,CAAC,OAAOG,CAAC,EAAE;UACV,IAAI,CAACT,UAAU,EAAE;YACfF,QAAQ,CAACW,CAAC,CAAC;UACb;QACF;MACF,CAAC;MAAA,OAAAP,uBAAA,CAAAC,KAAA,OAAAC,SAAA;IAAA;IACDH,sBAAsB,CAAC,CAAC;IACxB,OAAO,MAAM;MACXD,UAAU,GAAG,IAAI;IACnB,CAAC;EACH,CAAC,EACD,CAACN,MAAM,CACT,CAAC;EAED,IAAMgB,SAAS,GAAGf,YAAY,IAAI,IAAI;EAEtC,IAAIe,SAAS,IAAIb,KAAK,IAAI,IAAI,EAAE;IAC9B,oBACET,IAAA,CAACJ,cAAc;MACb,eAAY,iCAAiC;MAC7C0B,SAAS,EAAEA,SAAS,IAAIb,KAAK,IAAI,IAAK;MACtCc,YAAY,EAAEzB,eAAe,CAACW,KAAK;IAAE,CACtC,CAAC;EAEN;EAEA,oBACET,IAAA,CAACC,mBAAmB,CAACuB,QAAQ;IAACC,KAAK,EAAElB,YAAa;IAAAF,QAAA,EAC/CA;EAAQ,CACmB,CAAC;AAEnC;AAEA,eAAeF,qBAAqB"}
|
|
1
|
+
{"version":3,"file":"ServerConfigBootstrap.js","names":["React","createContext","useEffect","useState","LoadingOverlay","useClient","getErrorMessage","jsx","_jsx","ServerConfigContext","displayName","ServerConfigBootstrap","_ref","children","client","serverConfig","setServerConfig","error","setError","initServerConfigValues","isCanceled","loadServerConfigValues","_loadServerConfigValues","apply","arguments","_asyncToGenerator","newServerConfigValues","getServerConfigValues","Map","e","isLoading","errorMessage","Provider","value"],"sources":["../../src/components/ServerConfigBootstrap.tsx"],"sourcesContent":["import React, { createContext, useEffect, useState } from 'react';\nimport { LoadingOverlay } from '@deephaven/components';\nimport { useClient } from '@deephaven/jsapi-bootstrap';\nimport { getErrorMessage } from '@deephaven/utils';\n\nexport const ServerConfigContext = createContext<Map<string, string> | null>(\n null\n);\nServerConfigContext.displayName = 'ServerConfigContext';\n\nexport type ServerConfigBootstrapProps = {\n /**\n * The children to render after server config is loaded.\n */\n children: React.ReactNode;\n};\n\n/**\n * ServerConfigBootstrap component. Handles loading the server config.\n */\nexport function ServerConfigBootstrap({\n children,\n}: ServerConfigBootstrapProps): JSX.Element {\n const client = useClient();\n const [serverConfig, setServerConfig] = useState<Map<string, string>>();\n const [error, setError] = useState<unknown>();\n\n useEffect(\n function initServerConfigValues() {\n let isCanceled = false;\n async function loadServerConfigValues(): Promise<void> {\n try {\n const newServerConfigValues =\n (await client.getServerConfigValues()) as [string, string][];\n if (!isCanceled) {\n setServerConfig(new Map(newServerConfigValues));\n }\n } catch (e) {\n if (!isCanceled) {\n setError(e);\n }\n }\n }\n loadServerConfigValues();\n return () => {\n isCanceled = true;\n };\n },\n [client]\n );\n\n const isLoading = serverConfig == null;\n\n if (isLoading || error != null) {\n return (\n <LoadingOverlay\n data-testid=\"server-config-bootstrap-loading\"\n isLoading={isLoading && error == null}\n errorMessage={getErrorMessage(error)}\n />\n );\n }\n\n return (\n <ServerConfigContext.Provider value={serverConfig}>\n {children}\n </ServerConfigContext.Provider>\n );\n}\n\nexport default ServerConfigBootstrap;\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AACjE,SAASC,cAAc,QAAQ,uBAAuB;AACtD,SAASC,SAAS,QAAQ,4BAA4B;AACtD,SAASC,eAAe,QAAQ,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEnD,OAAO,IAAMC,mBAAmB,gBAAGR,aAAa,CAC9C,IACF,CAAC;AACDQ,mBAAmB,CAACC,WAAW,GAAG,qBAAqB;AASvD;AACA;AACA;AACA,OAAO,SAASC,qBAAqBA,CAAAC,IAAA,EAEO;EAAA,IAFN;IACpCC;EAC0B,CAAC,GAAAD,IAAA;EAC3B,IAAME,MAAM,GAAGT,SAAS,CAAC,CAAC;EAC1B,IAAM,CAACU,YAAY,EAAEC,eAAe,CAAC,GAAGb,QAAQ,CAAsB,CAAC;EACvE,IAAM,CAACc,KAAK,EAAEC,QAAQ,CAAC,GAAGf,QAAQ,CAAU,CAAC;EAE7CD,SAAS,CACP,SAASiB,sBAAsBA,CAAA,EAAG;IAChC,IAAIC,UAAU,GAAG,KAAK;IAAC,SACRC,sBAAsBA,CAAA;MAAA,OAAAC,uBAAA,CAAAC,KAAA,OAAAC,SAAA;IAAA;IAAA,SAAAF,wBAAA;MAAAA,uBAAA,GAAAG,iBAAA,CAArC,aAAuD;QACrD,IAAI;UACF,IAAMC,qBAAqB,SAClBZ,MAAM,CAACa,qBAAqB,CAAC,CAAwB;UAC9D,IAAI,CAACP,UAAU,EAAE;YACfJ,eAAe,CAAC,IAAIY,GAAG,CAACF,qBAAqB,CAAC,CAAC;UACjD;QACF,CAAC,CAAC,OAAOG,CAAC,EAAE;UACV,IAAI,CAACT,UAAU,EAAE;YACfF,QAAQ,CAACW,CAAC,CAAC;UACb;QACF;MACF,CAAC;MAAA,OAAAP,uBAAA,CAAAC,KAAA,OAAAC,SAAA;IAAA;IACDH,sBAAsB,CAAC,CAAC;IACxB,OAAO,MAAM;MACXD,UAAU,GAAG,IAAI;IACnB,CAAC;EACH,CAAC,EACD,CAACN,MAAM,CACT,CAAC;EAED,IAAMgB,SAAS,GAAGf,YAAY,IAAI,IAAI;EAEtC,IAAIe,SAAS,IAAIb,KAAK,IAAI,IAAI,EAAE;IAC9B,oBACET,IAAA,CAACJ,cAAc;MACb,eAAY,iCAAiC;MAC7C0B,SAAS,EAAEA,SAAS,IAAIb,KAAK,IAAI,IAAK;MACtCc,YAAY,EAAEzB,eAAe,CAACW,KAAK;IAAE,CACtC,CAAC;EAEN;EAEA,oBACET,IAAA,CAACC,mBAAmB,CAACuB,QAAQ;IAACC,KAAK,EAAElB,YAAa;IAAAF,QAAA,EAC/CA;EAAQ,CACmB,CAAC;AAEnC;AAEA,eAAeF,qBAAqB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeBootstrap.js","names":["useContext","ChartThemeProvider","MonacoThemeProvider","isExternalThemeEnabled","ThemeProvider","useAppSelector","IrisGridThemeProvider","PluginsContext","useCustomThemes","getSettings","jsx","_jsx","ThemeBootstrap","_ref","children","settings","pluginModules","themes","waitForActivation","density","gridDensity"],"sources":["../../src/components/ThemeBootstrap.tsx"],"sourcesContent":["import { useContext } from 'react';\nimport { ChartThemeProvider } from '@deephaven/chart';\nimport { MonacoThemeProvider } from '@deephaven/console';\nimport { isExternalThemeEnabled, ThemeProvider } from '@deephaven/components';\nimport { useAppSelector } from '@deephaven/dashboard';\nimport { IrisGridThemeProvider } from '@deephaven/iris-grid';\nimport { PluginsContext, useCustomThemes } from '@deephaven/plugin';\nimport { getSettings } from '@deephaven/redux';\n\nexport interface ThemeBootstrapProps {\n children: React.ReactNode;\n}\n\nexport function ThemeBootstrap({\n children,\n}: ThemeBootstrapProps): JSX.Element | null {\n const settings = useAppSelector(getSettings);\n\n // The `usePlugins` hook throws if the context value is null. Since this is\n // the state while plugins load asynchronously, we are using `useContext`\n // directly to avoid the exception.\n const pluginModules = useContext(PluginsContext);\n const themes = useCustomThemes(pluginModules);\n const waitForActivation = isExternalThemeEnabled();\n\n return (\n <ThemeProvider themes={themes} waitForActivation={waitForActivation}>\n <ChartThemeProvider>\n <MonacoThemeProvider>\n <IrisGridThemeProvider density={settings.gridDensity}>\n {children}\n </IrisGridThemeProvider>\n </MonacoThemeProvider>\n </ChartThemeProvider>\n </ThemeProvider>\n );\n}\n\nexport default ThemeBootstrap;\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,kBAAkB,QAAQ,kBAAkB;AACrD,SAASC,mBAAmB,QAAQ,oBAAoB;AACxD,SAASC,sBAAsB,EAAEC,aAAa,QAAQ,uBAAuB;AAC7E,SAASC,cAAc,QAAQ,sBAAsB;AACrD,SAASC,qBAAqB,QAAQ,sBAAsB;AAC5D,SAASC,cAAc,EAAEC,eAAe,QAAQ,mBAAmB;AACnE,SAASC,WAAW,QAAQ,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAM/C,OAAO,SAASC,cAAcA,CAAAC,IAAA,EAEc;EAAA,IAFb;IAC7BC;EACmB,CAAC,GAAAD,IAAA;EACpB,IAAME,QAAQ,GAAGV,cAAc,CAACI,WAAW,CAAC;;EAE5C;EACA;EACA;EACA,IAAMO,aAAa,GAAGhB,UAAU,CAACO,cAAc,CAAC;EAChD,IAAMU,MAAM,GAAGT,eAAe,CAACQ,aAAa,CAAC;EAC7C,IAAME,iBAAiB,GAAGf,sBAAsB,CAAC,CAAC;EAElD,oBACEQ,IAAA,CAACP,aAAa;IAACa,MAAM,EAAEA,MAAO;IAACC,iBAAiB,EAAEA,iBAAkB;IAAAJ,QAAA,eAClEH,IAAA,CAACV,kBAAkB;MAAAa,QAAA,eACjBH,IAAA,CAACT,mBAAmB;QAAAY,QAAA,eAClBH,IAAA,CAACL,qBAAqB;UAACa,OAAO,EAAEJ,QAAQ,CAACK,WAAY;UAAAN,QAAA,EAClDA;QAAQ,CACY;MAAC,CACL;IAAC,CACJ;EAAC,CACR,CAAC;AAEpB;AAEA,eAAeF,cAAc"}
|
|
1
|
+
{"version":3,"file":"ThemeBootstrap.js","names":["useContext","ChartThemeProvider","MonacoThemeProvider","isExternalThemeEnabled","ThemeProvider","useAppSelector","IrisGridThemeProvider","PluginsContext","useCustomThemes","getSettings","jsx","_jsx","ThemeBootstrap","_ref","children","settings","pluginModules","themes","waitForActivation","density","gridDensity"],"sources":["../../src/components/ThemeBootstrap.tsx"],"sourcesContent":["import { useContext } from 'react';\nimport { ChartThemeProvider } from '@deephaven/chart';\nimport { MonacoThemeProvider } from '@deephaven/console';\nimport { isExternalThemeEnabled, ThemeProvider } from '@deephaven/components';\nimport { useAppSelector } from '@deephaven/dashboard';\nimport { IrisGridThemeProvider } from '@deephaven/iris-grid';\nimport { PluginsContext, useCustomThemes } from '@deephaven/plugin';\nimport { getSettings } from '@deephaven/redux';\n\nexport interface ThemeBootstrapProps {\n children: React.ReactNode;\n}\n\nexport function ThemeBootstrap({\n children,\n}: ThemeBootstrapProps): JSX.Element | null {\n const settings = useAppSelector(getSettings);\n\n // The `usePlugins` hook throws if the context value is null. Since this is\n // the state while plugins load asynchronously, we are using `useContext`\n // directly to avoid the exception.\n const pluginModules = useContext(PluginsContext);\n const themes = useCustomThemes(pluginModules);\n const waitForActivation = isExternalThemeEnabled();\n\n return (\n <ThemeProvider themes={themes} waitForActivation={waitForActivation}>\n <ChartThemeProvider>\n <MonacoThemeProvider>\n <IrisGridThemeProvider density={settings.gridDensity}>\n {children}\n </IrisGridThemeProvider>\n </MonacoThemeProvider>\n </ChartThemeProvider>\n </ThemeProvider>\n );\n}\n\nexport default ThemeBootstrap;\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,kBAAkB,QAAQ,kBAAkB;AACrD,SAASC,mBAAmB,QAAQ,oBAAoB;AACxD,SAASC,sBAAsB,EAAEC,aAAa,QAAQ,uBAAuB;AAC7E,SAASC,cAAc,QAAQ,sBAAsB;AACrD,SAASC,qBAAqB,QAAQ,sBAAsB;AAC5D,SAASC,cAAc,EAAEC,eAAe,QAAQ,mBAAmB;AACnE,SAASC,WAAW,QAAQ,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAM/C,OAAO,SAASC,cAAcA,CAAAC,IAAA,EAEc;EAAA,IAFb;IAC7BC;EACmB,CAAC,GAAAD,IAAA;EACpB,IAAME,QAAQ,GAAGV,cAAc,CAACI,WAAW,CAAC;;EAE5C;EACA;EACA;EACA,IAAMO,aAAa,GAAGhB,UAAU,CAACO,cAAc,CAAC;EAChD,IAAMU,MAAM,GAAGT,eAAe,CAACQ,aAAa,CAAC;EAC7C,IAAME,iBAAiB,GAAGf,sBAAsB,CAAC,CAAC;EAElD,oBACEQ,IAAA,CAACP,aAAa;IAACa,MAAM,EAAEA,MAAO;IAACC,iBAAiB,EAAEA,iBAAkB;IAAAJ,QAAA,eAClEH,IAAA,CAACV,kBAAkB;MAAAa,QAAA,eACjBH,IAAA,CAACT,mBAAmB;QAAAY,QAAA,eAClBH,IAAA,CAACL,qBAAqB;UAACa,OAAO,EAAEJ,QAAQ,CAACK,WAAY;UAAAN,QAAA,EAClDA;QAAQ,CACY;MAAC,CACL;IAAC,CACJ;EAAC,CACR,CAAC;AAEpB;AAEA,eAAeF,cAAc","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserBootstrap.js","names":["React","useContext","UserContext","UserOverrideContext","UserPermissionsOverrideContext","getUserFromConfig","useServerConfig","jsx","_jsx","UserBootstrap","_ref","children","serverConfig","overrides","permissionsOverrides","user","Provider","value"],"sources":["../../src/components/UserBootstrap.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport {\n UserContext,\n UserOverrideContext,\n UserPermissionsOverrideContext,\n getUserFromConfig,\n} from '@deephaven/auth-plugins';\nimport useServerConfig from './useServerConfig';\n\nexport type UserBootstrapProps = {\n /** The children to render */\n children: React.ReactNode;\n};\n\n/**\n * UserBootstrap component. Derives the UserContext from the ServerConfigContext, UserOverrideContext, and UserPermissionsOverrideContext.\n */\nexport function UserBootstrap({ children }: UserBootstrapProps): JSX.Element {\n const serverConfig = useServerConfig();\n const overrides = useContext(UserOverrideContext);\n const permissionsOverrides = useContext(UserPermissionsOverrideContext);\n const user = getUserFromConfig(serverConfig, overrides, permissionsOverrides);\n return <UserContext.Provider value={user}>{children}</UserContext.Provider>;\n}\n\nexport default UserBootstrap;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SACEC,WAAW,EACXC,mBAAmB,EACnBC,8BAA8B,EAC9BC,iBAAiB,QACZ,yBAAyB;AAAC,OAC1BC,eAAe;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAOtB;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAAAC,IAAA,EAAgD;EAAA,IAA/C;IAAEC;EAA6B,CAAC,GAAAD,IAAA;EAC5D,IAAME,YAAY,GAAGN,eAAe,CAAC,CAAC;EACtC,IAAMO,SAAS,GAAGZ,UAAU,CAACE,mBAAmB,CAAC;EACjD,IAAMW,oBAAoB,GAAGb,UAAU,CAACG,8BAA8B,CAAC;EACvE,IAAMW,IAAI,GAAGV,iBAAiB,CAACO,YAAY,EAAEC,SAAS,EAAEC,oBAAoB,CAAC;EAC7E,oBAAON,IAAA,CAACN,WAAW,CAACc,QAAQ;IAACC,KAAK,EAAEF,IAAK;IAAAJ,QAAA,EAAEA;EAAQ,CAAuB,CAAC;AAC7E;AAEA,eAAeF,aAAa"}
|
|
1
|
+
{"version":3,"file":"UserBootstrap.js","names":["React","useContext","UserContext","UserOverrideContext","UserPermissionsOverrideContext","getUserFromConfig","useServerConfig","jsx","_jsx","UserBootstrap","_ref","children","serverConfig","overrides","permissionsOverrides","user","Provider","value"],"sources":["../../src/components/UserBootstrap.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport {\n UserContext,\n UserOverrideContext,\n UserPermissionsOverrideContext,\n getUserFromConfig,\n} from '@deephaven/auth-plugins';\nimport useServerConfig from './useServerConfig';\n\nexport type UserBootstrapProps = {\n /** The children to render */\n children: React.ReactNode;\n};\n\n/**\n * UserBootstrap component. Derives the UserContext from the ServerConfigContext, UserOverrideContext, and UserPermissionsOverrideContext.\n */\nexport function UserBootstrap({ children }: UserBootstrapProps): JSX.Element {\n const serverConfig = useServerConfig();\n const overrides = useContext(UserOverrideContext);\n const permissionsOverrides = useContext(UserPermissionsOverrideContext);\n const user = getUserFromConfig(serverConfig, overrides, permissionsOverrides);\n return <UserContext.Provider value={user}>{children}</UserContext.Provider>;\n}\n\nexport default UserBootstrap;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SACEC,WAAW,EACXC,mBAAmB,EACnBC,8BAA8B,EAC9BC,iBAAiB,QACZ,yBAAyB;AAAC,OAC1BC,eAAe;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAOtB;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAAAC,IAAA,EAAgD;EAAA,IAA/C;IAAEC;EAA6B,CAAC,GAAAD,IAAA;EAC5D,IAAME,YAAY,GAAGN,eAAe,CAAC,CAAC;EACtC,IAAMO,SAAS,GAAGZ,UAAU,CAACE,mBAAmB,CAAC;EACjD,IAAMW,oBAAoB,GAAGb,UAAU,CAACG,8BAA8B,CAAC;EACvE,IAAMW,IAAI,GAAGV,iBAAiB,CAACO,YAAY,EAAEC,SAAS,EAAEC,oBAAoB,CAAC;EAC7E,oBAAON,IAAA,CAACN,WAAW,CAACc,QAAQ;IAACC,KAAK,EAAEF,IAAK;IAAAJ,QAAA,EAAEA;EAAQ,CAAuB,CAAC;AAC7E;AAEA,eAAeF,aAAa","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/components/index.ts"],"sourcesContent":["export * from './AppBootstrap';\nexport * from './AppDashboards';\nexport * from './AuthBootstrap';\nexport * from './ConnectionBootstrap';\nexport * from './ConnectionContext';\nexport * from './FontBootstrap';\nexport * from './FontsLoaded';\nexport * from './PluginsBootstrap';\nexport * from './ThemeBootstrap';\nexport * from './useConnection';\nexport * from './useServerConfig';\nexport * from './useUser';\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/components/index.ts"],"sourcesContent":["export * from './AppBootstrap';\nexport * from './AppDashboards';\nexport * from './AuthBootstrap';\nexport * from './ConnectionBootstrap';\nexport * from './ConnectionContext';\nexport * from './FontBootstrap';\nexport * from './FontsLoaded';\nexport * from './PluginsBootstrap';\nexport * from './ThemeBootstrap';\nexport * from './useConnection';\nexport * from './useServerConfig';\nexport * from './useUser';\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConnection.js","names":["useContextOrThrow","ConnectionContext","useConnection"],"sources":["../../src/components/useConnection.ts"],"sourcesContent":["import type { dh } from '@deephaven/jsapi-types';\nimport { useContextOrThrow } from '@deephaven/react-hooks';\nimport { ConnectionContext } from './ConnectionContext';\n\n/**\n * Retrieve the connection for the current context.\n *\n * @returns Connection for the current context\n */\nexport function useConnection(): dh.IdeConnection {\n return useContextOrThrow(\n ConnectionContext,\n 'No IdeConnection available in useConnection. Was code wrapped in ConnectionContext.Provider?'\n );\n}\n\nexport default useConnection;\n"],"mappings":"AACA,SAASA,iBAAiB,QAAQ,wBAAwB;AAAC,SAClDC,iBAAiB;AAE1B;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAAA,EAAqB;EAChD,OAAOF,iBAAiB,CACtBC,iBAAiB,EACjB,8FACF,CAAC;AACH;AAEA,eAAeC,aAAa"}
|
|
1
|
+
{"version":3,"file":"useConnection.js","names":["useContextOrThrow","ConnectionContext","useConnection"],"sources":["../../src/components/useConnection.ts"],"sourcesContent":["import type { dh } from '@deephaven/jsapi-types';\nimport { useContextOrThrow } from '@deephaven/react-hooks';\nimport { ConnectionContext } from './ConnectionContext';\n\n/**\n * Retrieve the connection for the current context.\n *\n * @returns Connection for the current context\n */\nexport function useConnection(): dh.IdeConnection {\n return useContextOrThrow(\n ConnectionContext,\n 'No IdeConnection available in useConnection. Was code wrapped in ConnectionContext.Provider?'\n );\n}\n\nexport default useConnection;\n"],"mappings":"AACA,SAASA,iBAAiB,QAAQ,wBAAwB;AAAC,SAClDC,iBAAiB;AAE1B;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAAA,EAAqB;EAChD,OAAOF,iBAAiB,CACtBC,iBAAiB,EACjB,8FACF,CAAC;AACH;AAEA,eAAeC,aAAa","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useServerConfig.js","names":["useContextOrThrow","ServerConfigContext","useServerConfig"],"sources":["../../src/components/useServerConfig.ts"],"sourcesContent":["import { useContextOrThrow } from '@deephaven/react-hooks';\nimport { ServerConfigContext } from './ServerConfigBootstrap';\n\nexport function useServerConfig(): Map<string, string> {\n return useContextOrThrow(\n ServerConfigContext,\n 'No server config available in useServerConfig. Was code wrapped in ServerConfigBootstrap or ServerConfigContext.Provider?'\n );\n}\n\nexport default useServerConfig;\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,wBAAwB;AAAC,SAClDC,mBAAmB;AAE5B,OAAO,SAASC,eAAeA,CAAA,EAAwB;EACrD,OAAOF,iBAAiB,CACtBC,mBAAmB,EACnB,2HACF,CAAC;AACH;AAEA,eAAeC,eAAe"}
|
|
1
|
+
{"version":3,"file":"useServerConfig.js","names":["useContextOrThrow","ServerConfigContext","useServerConfig"],"sources":["../../src/components/useServerConfig.ts"],"sourcesContent":["import { useContextOrThrow } from '@deephaven/react-hooks';\nimport { ServerConfigContext } from './ServerConfigBootstrap';\n\nexport function useServerConfig(): Map<string, string> {\n return useContextOrThrow(\n ServerConfigContext,\n 'No server config available in useServerConfig. Was code wrapped in ServerConfigBootstrap or ServerConfigContext.Provider?'\n );\n}\n\nexport default useServerConfig;\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,wBAAwB;AAAC,SAClDC,mBAAmB;AAE5B,OAAO,SAASC,eAAeA,CAAA,EAAwB;EACrD,OAAOF,iBAAiB,CACtBC,mBAAmB,EACnB,2HACF,CAAC;AACH;AAEA,eAAeC,eAAe","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUser.js","names":["useContextOrThrow","UserContext","useUser"],"sources":["../../src/components/useUser.ts"],"sourcesContent":["import { useContextOrThrow } from '@deephaven/react-hooks';\nimport { UserContext } from '@deephaven/auth-plugins';\nimport type { User } from '@deephaven/redux';\n\nexport function useUser(): User {\n return useContextOrThrow(\n UserContext,\n 'No user available in useUser. Was code wrapped in UserBootstrap or UserContext.Provider?'\n );\n}\n\nexport default useUser;\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,wBAAwB;AAC1D,SAASC,WAAW,QAAQ,yBAAyB;AAGrD,OAAO,SAASC,OAAOA,CAAA,EAAS;EAC9B,OAAOF,iBAAiB,CACtBC,WAAW,EACX,0FACF,CAAC;AACH;AAEA,eAAeC,OAAO"}
|
|
1
|
+
{"version":3,"file":"useUser.js","names":["useContextOrThrow","UserContext","useUser"],"sources":["../../src/components/useUser.ts"],"sourcesContent":["import { useContextOrThrow } from '@deephaven/react-hooks';\nimport { UserContext } from '@deephaven/auth-plugins';\nimport type { User } from '@deephaven/redux';\n\nexport function useUser(): User {\n return useContextOrThrow(\n UserContext,\n 'No user available in useUser. Was code wrapped in UserBootstrap or UserContext.Provider?'\n );\n}\n\nexport default useUser;\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,wBAAwB;AAC1D,SAASC,WAAW,QAAQ,yBAAyB;AAGrD,OAAO,SAASC,OAAOA,CAAA,EAAS;EAC9B,OAAOF,iBAAiB,CACtBC,WAAW,EACX,0FACF,CAAC;AACH;AAEA,eAAeC,OAAO","ignoreList":[]}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["export * from './components';\nexport * from './plugins';\nexport * from './storage';\nexport * from './utils';\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["export * from './components';\nexport * from './plugins';\nexport * from './storage';\nexport * from './utils';\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginUtils.js","names":["Log","isAuthPlugin","PluginType","isLegacyAuthPlugin","isLegacyPlugin","isPlugin","loadRemoteModule","log","module","loadModulePlugin","_x","_loadModulePlugin","apply","arguments","_asyncToGenerator","pluginUrl","myModule","loadJson","_x2","_loadJson","jsonUrl","res","fetch","ok","Error","statusText","json","_unused","hasDefaultExport","value","default","getPluginModuleValue","loadModulePlugins","_x3","_loadModulePlugins","modulePluginsUrl","debug","manifest","concat","Array","isArray","plugins","pluginPromises","i","length","name","main","pluginMainUrl","push","pluginModules","Promise","allSettled","pluginMap","Map","version","status","moduleValue","error","set","_objectSpread","reason","info","e","getAuthHandlers","authConfigValues","_authConfigValues$get","_authConfigValues$get2","get","split","getAuthPluginComponent","corePlugins","undefined","authHandlers","authPlugins","entries","filter","_ref","plugin","map","_ref2","type","AUTH_PLUGIN","component","AuthPlugin","Component","isAvailable","availableAuthPlugins","_ref3","warn","_ref4","join"],"sources":["../../src/plugins/PluginUtils.tsx"],"sourcesContent":["import Log from '@deephaven/log';\nimport {\n type PluginModuleMap,\n type AuthPlugin,\n type AuthPluginComponent,\n isAuthPlugin,\n type LegacyAuthPlugin,\n type LegacyPlugin,\n type Plugin,\n PluginType,\n isLegacyAuthPlugin,\n isLegacyPlugin,\n type PluginModule,\n isPlugin,\n} from '@deephaven/plugin';\nimport loadRemoteModule from './loadRemoteModule';\n\nconst log = Log.module('@deephaven/app-utils.PluginUtils');\n\nexport type PluginManifestPluginInfo = {\n name: string;\n main: string;\n version: string;\n};\n\nexport type PluginManifest = { plugins: PluginManifestPluginInfo[] };\n\n/**\n * Imports a commonjs plugin module from the provided URL\n * @param pluginUrl The URL of the plugin to load\n * @returns The loaded module\n */\nexport async function loadModulePlugin(\n pluginUrl: string\n): Promise<LegacyPlugin | { default: Plugin }> {\n const myModule = await loadRemoteModule(pluginUrl);\n return myModule;\n}\n\n/**\n * Loads a JSON file and returns the JSON object\n * @param jsonUrl The URL of the JSON file to load\n * @returns The JSON object of the manifest file\n */\nexport async function loadJson(jsonUrl: string): Promise<PluginManifest> {\n const res = await fetch(jsonUrl);\n if (!res.ok) {\n throw new Error(res.statusText);\n }\n try {\n return await res.json();\n } catch {\n throw new Error('Could not be parsed as JSON');\n }\n}\n\nfunction hasDefaultExport(value: unknown): value is { default: Plugin } {\n return (\n typeof value === 'object' &&\n value != null &&\n typeof (value as { default?: unknown }).default === 'object'\n );\n}\n\nexport function getPluginModuleValue(\n value: LegacyPlugin | Plugin | { default: Plugin }\n): PluginModule | null {\n // TypeScript builds CJS default exports differently depending on\n // whether there are also named exports. If the default is the only\n // export, it will be the value. If there are also named exports,\n // it will be assigned to the `default` property on the value.\n if (isPlugin(value)) {\n return value;\n }\n if (hasDefaultExport(value) && isPlugin(value.default)) {\n return value.default;\n }\n if (isLegacyPlugin(value)) {\n return value;\n }\n return null;\n}\n\n/**\n * Load all plugin modules available based on the manifest file at the provided base URL\n * @param modulePluginsUrl The base URL of the module plugins to load\n * @returns A map from the name of the plugin to the plugin module that was loaded\n */\nexport async function loadModulePlugins(\n modulePluginsUrl: string\n): Promise<PluginModuleMap> {\n log.debug('Loading plugins...');\n try {\n const manifest = await loadJson(`${modulePluginsUrl}/manifest.json`);\n\n if (!Array.isArray(manifest.plugins)) {\n throw new Error('Plugin manifest JSON does not contain plugins array');\n }\n\n log.debug('Plugin manifest loaded:', manifest);\n const pluginPromises: Promise<LegacyPlugin | { default: Plugin }>[] = [];\n for (let i = 0; i < manifest.plugins.length; i += 1) {\n const { name, main } = manifest.plugins[i];\n const pluginMainUrl = `${modulePluginsUrl}/${name}/${main}`;\n pluginPromises.push(loadModulePlugin(pluginMainUrl));\n }\n\n const pluginModules = await Promise.allSettled(pluginPromises);\n\n const pluginMap: PluginModuleMap = new Map();\n for (let i = 0; i < pluginModules.length; i += 1) {\n const module = pluginModules[i];\n const { name, version } = manifest.plugins[i];\n if (module.status === 'fulfilled') {\n const moduleValue = getPluginModuleValue(module.value);\n if (moduleValue == null) {\n log.error(`Plugin '${name}' is missing an exported value.`);\n } else {\n pluginMap.set(name, { ...moduleValue, version });\n }\n } else {\n log.error(`Unable to load plugin '${name}'`, module.reason);\n }\n }\n log.info('Plugins loaded:', pluginMap);\n\n return pluginMap;\n } catch (e) {\n log.error('Unable to load plugins:', e);\n return new Map();\n }\n}\n\nexport function getAuthHandlers(\n authConfigValues: Map<string, string>\n): string[] {\n return authConfigValues.get('AuthHandlers')?.split(',') ?? [];\n}\n\n/**\n * Get the auth plugin component from the plugin map and current configuration\n * Throws if no auth plugin is available\n *\n * @param pluginMap Map of plugins loaded from the server\n * @param authConfigValues Auth config values from the server\n * @param corePlugins Map of core auth plugins to include in the list. They are added after the loaded plugins\n * @returns The auth plugin component to render\n */\nexport function getAuthPluginComponent(\n pluginMap: PluginModuleMap,\n authConfigValues: Map<string, string>,\n corePlugins = new Map<string, AuthPlugin | LegacyAuthPlugin>()\n): AuthPluginComponent {\n const authHandlers = getAuthHandlers(authConfigValues);\n // User plugins take priority over core plugins\n const authPlugins = (\n [...pluginMap.entries(), ...corePlugins.entries()].filter(\n ([, plugin]) => isAuthPlugin(plugin) || isLegacyAuthPlugin(plugin)\n ) as [string, AuthPlugin | LegacyAuthPlugin][]\n ).map(([name, plugin]) => {\n if (isLegacyAuthPlugin(plugin)) {\n return {\n type: PluginType.AUTH_PLUGIN,\n name,\n component: plugin.AuthPlugin.Component,\n isAvailable: plugin.AuthPlugin.isAvailable,\n };\n }\n\n return plugin;\n });\n\n // Filter the available auth plugins\n const availableAuthPlugins = authPlugins.filter(({ isAvailable }) =>\n isAvailable(authHandlers, authConfigValues)\n );\n\n if (availableAuthPlugins.length === 0) {\n throw new Error(\n `No login plugins found, please register a login plugin for auth handlers: ${authHandlers}`\n );\n } else if (availableAuthPlugins.length > 1) {\n log.warn(\n 'More than one login plugin available, will use the first one: ',\n availableAuthPlugins.map(({ name }) => name).join(', ')\n );\n }\n\n const { name, component } = availableAuthPlugins[0];\n log.info('Using LoginPlugin', name);\n\n return component;\n}\n"],"mappings":";;;;;;;AAAA,OAAOA,GAAG,MAAM,gBAAgB;AAChC,SAIEC,YAAY,EAIZC,UAAU,EACVC,kBAAkB,EAClBC,cAAc,EAEdC,QAAQ,QACH,mBAAmB;AAAC,OACpBC,gBAAgB;AAEvB,IAAMC,GAAG,GAAGP,GAAG,CAACQ,MAAM,CAAC,kCAAkC,CAAC;AAU1D;AACA;AACA;AACA;AACA;AACA,gBAAsBC,gBAAgBA,CAAAC,EAAA;EAAA,OAAAC,iBAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;;AAOt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AM,GAAG,CAAC,EAAE;IAC1CrC,GAAG,CAACiF,IAAI,CACN,gEAAgE,EAChEF,oBAAoB,CAACR,GAAG,CAACW,KAAA;MAAA,IAAC;QAAE5C;MAAK,CAAC,GAAA4C,KAAA;MAAA,OAAK5C,IAAI;IAAA,EAAC,CAAC6C,IAAI,CAAC,IAAI,CACxD,CAAC;EACH;EAEA,IAAM;IAAE7C,IAAI;IAAEqC;EAAU,CAAC,GAAGI,oBAAoB,CAAC,CAAC,CAAC;EACnD/E,GAAG,CAACsD,IAAI,CAAC,mBAAmB,EAAEhB,IAAI,CAAC;EAEnC,OAAOqC,SAAS;AAClB"}
|
|
1
|
+
{"version":3,"file":"PluginUtils.js","names":["Log","isAuthPlugin","PluginType","isLegacyAuthPlugin","isLegacyPlugin","isPlugin","loadRemoteModule","log","module","loadModulePlugin","_x","_loadModulePlugin","apply","arguments","_asyncToGenerator","pluginUrl","myModule","loadJson","_x2","_loadJson","jsonUrl","res","fetch","ok","Error","statusText","json","_unused","hasDefaultExport","value","default","getPluginModuleValue","loadModulePlugins","_x3","_loadModulePlugins","modulePluginsUrl","debug","manifest","concat","Array","isArray","plugins","pluginPromises","i","length","name","main","pluginMainUrl","push","pluginModules","Promise","allSettled","pluginMap","Map","version","status","moduleValue","error","set","_objectSpread","reason","info","e","getAuthHandlers","authConfigValues","_authConfigValues$get","_authConfigValues$get2","get","split","getAuthPluginComponent","corePlugins","undefined","authHandlers","authPlugins","entries","filter","_ref","plugin","map","_ref2","type","AUTH_PLUGIN","component","AuthPlugin","Component","isAvailable","availableAuthPlugins","_ref3","warn","_ref4","join"],"sources":["../../src/plugins/PluginUtils.tsx"],"sourcesContent":["import Log from '@deephaven/log';\nimport {\n type PluginModuleMap,\n type AuthPlugin,\n type AuthPluginComponent,\n isAuthPlugin,\n type LegacyAuthPlugin,\n type LegacyPlugin,\n type Plugin,\n PluginType,\n isLegacyAuthPlugin,\n isLegacyPlugin,\n type PluginModule,\n isPlugin,\n} from '@deephaven/plugin';\nimport loadRemoteModule from './loadRemoteModule';\n\nconst log = Log.module('@deephaven/app-utils.PluginUtils');\n\nexport type PluginManifestPluginInfo = {\n name: string;\n main: string;\n version: string;\n};\n\nexport type PluginManifest = { plugins: PluginManifestPluginInfo[] };\n\n/**\n * Imports a commonjs plugin module from the provided URL\n * @param pluginUrl The URL of the plugin to load\n * @returns The loaded module\n */\nexport async function loadModulePlugin(\n pluginUrl: string\n): Promise<LegacyPlugin | { default: Plugin }> {\n const myModule = await loadRemoteModule(pluginUrl);\n return myModule;\n}\n\n/**\n * Loads a JSON file and returns the JSON object\n * @param jsonUrl The URL of the JSON file to load\n * @returns The JSON object of the manifest file\n */\nexport async function loadJson(jsonUrl: string): Promise<PluginManifest> {\n const res = await fetch(jsonUrl);\n if (!res.ok) {\n throw new Error(res.statusText);\n }\n try {\n return await res.json();\n } catch {\n throw new Error('Could not be parsed as JSON');\n }\n}\n\nfunction hasDefaultExport(value: unknown): value is { default: Plugin } {\n return (\n typeof value === 'object' &&\n value != null &&\n typeof (value as { default?: unknown }).default === 'object'\n );\n}\n\nexport function getPluginModuleValue(\n value: LegacyPlugin | Plugin | { default: Plugin }\n): PluginModule | null {\n // TypeScript builds CJS default exports differently depending on\n // whether there are also named exports. If the default is the only\n // export, it will be the value. If there are also named exports,\n // it will be assigned to the `default` property on the value.\n if (isPlugin(value)) {\n return value;\n }\n if (hasDefaultExport(value) && isPlugin(value.default)) {\n return value.default;\n }\n if (isLegacyPlugin(value)) {\n return value;\n }\n return null;\n}\n\n/**\n * Load all plugin modules available based on the manifest file at the provided base URL\n * @param modulePluginsUrl The base URL of the module plugins to load\n * @returns A map from the name of the plugin to the plugin module that was loaded\n */\nexport async function loadModulePlugins(\n modulePluginsUrl: string\n): Promise<PluginModuleMap> {\n log.debug('Loading plugins...');\n try {\n const manifest = await loadJson(`${modulePluginsUrl}/manifest.json`);\n\n if (!Array.isArray(manifest.plugins)) {\n throw new Error('Plugin manifest JSON does not contain plugins array');\n }\n\n log.debug('Plugin manifest loaded:', manifest);\n const pluginPromises: Promise<LegacyPlugin | { default: Plugin }>[] = [];\n for (let i = 0; i < manifest.plugins.length; i += 1) {\n const { name, main } = manifest.plugins[i];\n const pluginMainUrl = `${modulePluginsUrl}/${name}/${main}`;\n pluginPromises.push(loadModulePlugin(pluginMainUrl));\n }\n\n const pluginModules = await Promise.allSettled(pluginPromises);\n\n const pluginMap: PluginModuleMap = new Map();\n for (let i = 0; i < pluginModules.length; i += 1) {\n const module = pluginModules[i];\n const { name, version } = manifest.plugins[i];\n if (module.status === 'fulfilled') {\n const moduleValue = getPluginModuleValue(module.value);\n if (moduleValue == null) {\n log.error(`Plugin '${name}' is missing an exported value.`);\n } else {\n pluginMap.set(name, { ...moduleValue, version });\n }\n } else {\n log.error(`Unable to load plugin '${name}'`, module.reason);\n }\n }\n log.info('Plugins loaded:', pluginMap);\n\n return pluginMap;\n } catch (e) {\n log.error('Unable to load plugins:', e);\n return new Map();\n }\n}\n\nexport function getAuthHandlers(\n authConfigValues: Map<string, string>\n): string[] {\n return authConfigValues.get('AuthHandlers')?.split(',') ?? [];\n}\n\n/**\n * Get the auth plugin component from the plugin map and current configuration\n * Throws if no auth plugin is available\n *\n * @param pluginMap Map of plugins loaded from the server\n * @param authConfigValues Auth config values from the server\n * @param corePlugins Map of core auth plugins to include in the list. They are added after the loaded plugins\n * @returns The auth plugin component to render\n */\nexport function getAuthPluginComponent(\n pluginMap: PluginModuleMap,\n authConfigValues: Map<string, string>,\n corePlugins = new Map<string, AuthPlugin | LegacyAuthPlugin>()\n): AuthPluginComponent {\n const authHandlers = getAuthHandlers(authConfigValues);\n // User plugins take priority over core plugins\n const authPlugins = (\n [...pluginMap.entries(), ...corePlugins.entries()].filter(\n ([, plugin]) => isAuthPlugin(plugin) || isLegacyAuthPlugin(plugin)\n ) as [string, AuthPlugin | LegacyAuthPlugin][]\n ).map(([name, plugin]) => {\n if (isLegacyAuthPlugin(plugin)) {\n return {\n type: PluginType.AUTH_PLUGIN,\n name,\n component: plugin.AuthPlugin.Component,\n isAvailable: plugin.AuthPlugin.isAvailable,\n };\n }\n\n return plugin;\n });\n\n // Filter the available auth plugins\n const availableAuthPlugins = authPlugins.filter(({ isAvailable }) =>\n isAvailable(authHandlers, authConfigValues)\n );\n\n if (availableAuthPlugins.length === 0) {\n throw new Error(\n `No login plugins found, please register a login plugin for auth handlers: ${authHandlers}`\n );\n } else if (availableAuthPlugins.length > 1) {\n log.warn(\n 'More than one login plugin available, will use the first one: ',\n availableAuthPlugins.map(({ name }) => name).join(', ')\n );\n }\n\n const { name, component } = availableAuthPlugins[0];\n log.info('Using LoginPlugin', name);\n\n return component;\n}\n"],"mappings":";;;;;;;AAAA,OAAOA,GAAG,MAAM,gBAAgB;AAChC,SAIEC,YAAY,EAIZC,UAAU,EACVC,kBAAkB,EAClBC,cAAc,EAEdC,QAAQ,QACH,mBAAmB;AAAC,OACpBC,gBAAgB;AAEvB,IAAMC,GAAG,GAAGP,GAAG,CAACQ,MAAM,CAAC,kCAAkC,CAAC;AAU1D;AACA;AACA;AACA;AACA;AACA,gBAAsBC,gBAAgBA,CAAAC,EAAA;EAAA,OAAAC,iBAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;;AAOtC;AACA;AACA;AACA;AACA;AAJA,SAAAF,kBAAA;EAAAA,iBAAA,GAAAG,iBAAA,CAPO,WACLC,SAAiB,EAC4B;IAC7C,IAAMC,QAAQ,SAASV,gBAAgB,CAACS,SAAS,CAAC;IAClD,OAAOC,QAAQ;EACjB,CAAC;EAAA,OAAAL,iBAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;AAOD,gBAAsBI,QAAQA,CAAAC,GAAA;EAAA,OAAAC,SAAA,CAAAP,KAAA,OAAAC,SAAA;AAAA;AAU7B,SAAAM,UAAA;EAAAA,SAAA,GAAAL,iBAAA,CAVM,WAAwBM,OAAe,EAA2B;IACvE,IAAMC,GAAG,SAASC,KAAK,CAACF,OAAO,CAAC;IAChC,IAAI,CAACC,GA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createRemoteComponent","createRequires","resolve","requires","RemoteComponent"],"sources":["../../src/plugins/RemoteComponent.ts"],"sourcesContent":["import {\n createRemoteComponent,\n createRequires,\n} from '@paciolan/remote-component';\nimport { resolve } from './remote-component.config';\n\nconst requires = createRequires(() => resolve);\n\nexport const RemoteComponent = createRemoteComponent({ requires });\nexport default RemoteComponent;\n"],"mappings":"AAAA,SACEA,qBAAqB,EACrBC,cAAc,QACT,4BAA4B;AAAC,SAC3BC,OAAO;AAEhB,IAAMC,QAAQ,GAAGF,cAAc,CAAC,MAAMC,OAAO,CAAC;AAE9C,OAAO,IAAME,eAAe,GAAGJ,qBAAqB,CAAC;EAAEG;AAAS,CAAC,CAAC;AAClE,eAAeC,eAAe"}
|
|
1
|
+
{"version":3,"file":"RemoteComponent.js","names":["createRemoteComponent","createRequires","resolve","requires","RemoteComponent"],"sources":["../../src/plugins/RemoteComponent.ts"],"sourcesContent":["import {\n createRemoteComponent,\n createRequires,\n} from '@paciolan/remote-component';\nimport { resolve } from './remote-component.config';\n\nconst requires = createRequires(() => resolve);\n\nexport const RemoteComponent = createRemoteComponent({ requires });\nexport default RemoteComponent;\n"],"mappings":"AAAA,SACEA,qBAAqB,EACrBC,cAAc,QACT,4BAA4B;AAAC,SAC3BC,OAAO;AAEhB,IAAMC,QAAQ,GAAGF,cAAc,CAAC,MAAMC,OAAO,CAAC;AAE9C,OAAO,IAAME,eAAe,GAAGJ,qBAAqB,CAAC;EAAEG;AAAS,CAAC,CAAC;AAClE,eAAeC,eAAe","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","RemoteComponent"],"sources":["../../src/plugins/index.ts"],"sourcesContent":["export * from './PluginUtils';\nexport { default as RemoteComponent } from './RemoteComponent';\n"],"mappings":";SACSA,OAAO,IAAIC,eAAe"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","RemoteComponent"],"sources":["../../src/plugins/index.ts"],"sourcesContent":["export * from './PluginUtils';\nexport { default as RemoteComponent } from './RemoteComponent';\n"],"mappings":";SACSA,OAAO,IAAIC,eAAe","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadRemoteModule.js","names":["createLoadRemoteModule","createRequires","resolve","requires","loadRemoteModule"],"sources":["../../src/plugins/loadRemoteModule.ts"],"sourcesContent":["import createLoadRemoteModule, {\n createRequires,\n} from '@paciolan/remote-module-loader';\nimport { resolve } from './remote-component.config';\n\nconst requires = createRequires(resolve);\n\nexport const loadRemoteModule: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (url: string): Promise<any>;\n} = createLoadRemoteModule({\n requires,\n});\n\nexport default loadRemoteModule;\n"],"mappings":"AAAA,OAAOA,sBAAsB,IAC3BC,cAAc,QACT,gCAAgC;AAAC,SAC/BC,OAAO;AAEhB,IAAMC,QAAQ,GAAGF,cAAc,CAACC,OAAO,CAAC;AAExC,OAAO,IAAME,gBAGZ,GAAGJ,sBAAsB,CAAC;EACzBG;AACF,CAAC,CAAC;AAEF,eAAeC,gBAAgB"}
|
|
1
|
+
{"version":3,"file":"loadRemoteModule.js","names":["createLoadRemoteModule","createRequires","resolve","requires","loadRemoteModule"],"sources":["../../src/plugins/loadRemoteModule.ts"],"sourcesContent":["import createLoadRemoteModule, {\n createRequires,\n} from '@paciolan/remote-module-loader';\nimport { resolve } from './remote-component.config';\n\nconst requires = createRequires(resolve);\n\nexport const loadRemoteModule: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (url: string): Promise<any>;\n} = createLoadRemoteModule({\n requires,\n});\n\nexport default loadRemoteModule;\n"],"mappings":"AAAA,OAAOA,sBAAsB,IAC3BC,cAAc,QACT,gCAAgC;AAAC,SAC/BC,OAAO;AAEhB,IAAMC,QAAQ,GAAGF,cAAc,CAACC,OAAO,CAAC;AAExC,OAAO,IAAME,gBAGZ,GAAGJ,sBAAsB,CAAC;EACzBG;AACF,CAAC,CAAC;AAEF,eAAeC,gBAAgB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-component.config.js","names":["react","redux","reactRedux","ReactDOM","AdobeReactSpectrum","DeephavenAuthPlugins","DeephavenChart","DeephavenComponents","DeephavenDashboard","DeephavenDashboardCorePlugins","DeephavenIcons","DeephavenIrisGrid","DeephavenJsapiBootstrap","DeephavenJsapiComponents","DeephavenJsapiUtils","DeephavenConsole","DeephavenLog","DeephavenReactHooks","DeephavenPlugin","resolve"],"sources":["../../src/plugins/remote-component.config.ts"],"sourcesContent":["/**\n * remote-component.config.js\n *\n * Dependencies for Remote Components\n */\nimport react from 'react';\nimport * as redux from 'redux';\nimport * as reactRedux from 'react-redux';\nimport ReactDOM from 'react-dom';\n// eslint-disable-next-line no-restricted-imports\nimport * as AdobeReactSpectrum from '@adobe/react-spectrum';\nimport * as DeephavenAuthPlugins from '@deephaven/auth-plugins';\nimport * as DeephavenChart from '@deephaven/chart';\nimport * as DeephavenComponents from '@deephaven/components';\nimport * as DeephavenDashboard from '@deephaven/dashboard';\nimport * as DeephavenDashboardCorePlugins from '@deephaven/dashboard-core-plugins';\nimport * as DeephavenIcons from '@deephaven/icons';\nimport * as DeephavenIrisGrid from '@deephaven/iris-grid';\nimport * as DeephavenJsapiBootstrap from '@deephaven/jsapi-bootstrap';\nimport * as DeephavenJsapiComponents from '@deephaven/jsapi-components';\nimport * as DeephavenJsapiUtils from '@deephaven/jsapi-utils';\nimport * as DeephavenConsole from '@deephaven/console';\nimport DeephavenLog from '@deephaven/log';\nimport * as DeephavenReactHooks from '@deephaven/react-hooks';\nimport * as DeephavenPlugin from '@deephaven/plugin';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const resolve = {\n react,\n 'react-dom': ReactDOM,\n redux,\n 'react-redux': reactRedux,\n '@adobe/react-spectrum': AdobeReactSpectrum,\n '@deephaven/auth-plugins': DeephavenAuthPlugins,\n '@deephaven/chart': DeephavenChart,\n '@deephaven/components': DeephavenComponents,\n '@deephaven/console': DeephavenConsole,\n '@deephaven/dashboard': DeephavenDashboard,\n '@deephaven/dashboard-core-plugins': DeephavenDashboardCorePlugins,\n '@deephaven/icons': DeephavenIcons,\n '@deephaven/iris-grid': DeephavenIrisGrid,\n '@deephaven/jsapi-bootstrap': DeephavenJsapiBootstrap,\n '@deephaven/jsapi-components': DeephavenJsapiComponents,\n '@deephaven/jsapi-utils': DeephavenJsapiUtils,\n '@deephaven/log': DeephavenLog,\n '@deephaven/plugin': DeephavenPlugin,\n '@deephaven/react-hooks': DeephavenReactHooks,\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAO,KAAKC,UAAU,MAAM,aAAa;AACzC,OAAOC,QAAQ,MAAM,WAAW;AAChC;AACA,OAAO,KAAKC,kBAAkB,MAAM,uBAAuB;AAC3D,OAAO,KAAKC,oBAAoB,MAAM,yBAAyB;AAC/D,OAAO,KAAKC,cAAc,MAAM,kBAAkB;AAClD,OAAO,KAAKC,mBAAmB,MAAM,uBAAuB;AAC5D,OAAO,KAAKC,kBAAkB,MAAM,sBAAsB;AAC1D,OAAO,KAAKC,6BAA6B,MAAM,mCAAmC;AAClF,OAAO,KAAKC,cAAc,MAAM,kBAAkB;AAClD,OAAO,KAAKC,iBAAiB,MAAM,sBAAsB;AACzD,OAAO,KAAKC,uBAAuB,MAAM,4BAA4B;AACrE,OAAO,KAAKC,wBAAwB,MAAM,6BAA6B;AACvE,OAAO,KAAKC,mBAAmB,MAAM,wBAAwB;AAC7D,OAAO,KAAKC,gBAAgB,MAAM,oBAAoB;AACtD,OAAOC,YAAY,MAAM,gBAAgB;AACzC,OAAO,KAAKC,mBAAmB,MAAM,wBAAwB;AAC7D,OAAO,KAAKC,eAAe,MAAM,mBAAmB;;AAEpD;AACA,OAAO,IAAMC,OAAO,GAAG;EACrBnB,KAAK;EACL,WAAW,EAAEG,QAAQ;EACrBF,KAAK;EACL,aAAa,EAAEC,UAAU;EACzB,uBAAuB,EAAEE,kBAAkB;EAC3C,yBAAyB,EAAEC,oBAAoB;EAC/C,kBAAkB,EAAEC,cAAc;EAClC,uBAAuB,EAAEC,mBAAmB;EAC5C,oBAAoB,EAAEQ,gBAAgB;EACtC,sBAAsB,EAAEP,kBAAkB;EAC1C,mCAAmC,EAAEC,6BAA6B;EAClE,kBAAkB,EAAEC,cAAc;EAClC,sBAAsB,EAAEC,iBAAiB;EACzC,4BAA4B,EAAEC,uBAAuB;EACrD,6BAA6B,EAAEC,wBAAwB;EACvD,wBAAwB,EAAEC,mBAAmB;EAC7C,gBAAgB,EAAEE,YAAY;EAC9B,mBAAmB,EAAEE,eAAe;EACpC,wBAAwB,EAAED;AAC5B,CAAC"}
|
|
1
|
+
{"version":3,"file":"remote-component.config.js","names":["react","redux","reactRedux","ReactDOM","AdobeReactSpectrum","DeephavenAuthPlugins","DeephavenChart","DeephavenComponents","DeephavenDashboard","DeephavenDashboardCorePlugins","DeephavenIcons","DeephavenIrisGrid","DeephavenJsapiBootstrap","DeephavenJsapiComponents","DeephavenJsapiUtils","DeephavenConsole","DeephavenLog","DeephavenReactHooks","DeephavenPlugin","resolve"],"sources":["../../src/plugins/remote-component.config.ts"],"sourcesContent":["/**\n * remote-component.config.js\n *\n * Dependencies for Remote Components\n */\nimport react from 'react';\nimport * as redux from 'redux';\nimport * as reactRedux from 'react-redux';\nimport ReactDOM from 'react-dom';\n// eslint-disable-next-line no-restricted-imports\nimport * as AdobeReactSpectrum from '@adobe/react-spectrum';\nimport * as DeephavenAuthPlugins from '@deephaven/auth-plugins';\nimport * as DeephavenChart from '@deephaven/chart';\nimport * as DeephavenComponents from '@deephaven/components';\nimport * as DeephavenDashboard from '@deephaven/dashboard';\nimport * as DeephavenDashboardCorePlugins from '@deephaven/dashboard-core-plugins';\nimport * as DeephavenIcons from '@deephaven/icons';\nimport * as DeephavenIrisGrid from '@deephaven/iris-grid';\nimport * as DeephavenJsapiBootstrap from '@deephaven/jsapi-bootstrap';\nimport * as DeephavenJsapiComponents from '@deephaven/jsapi-components';\nimport * as DeephavenJsapiUtils from '@deephaven/jsapi-utils';\nimport * as DeephavenConsole from '@deephaven/console';\nimport DeephavenLog from '@deephaven/log';\nimport * as DeephavenReactHooks from '@deephaven/react-hooks';\nimport * as DeephavenPlugin from '@deephaven/plugin';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const resolve = {\n react,\n 'react-dom': ReactDOM,\n redux,\n 'react-redux': reactRedux,\n '@adobe/react-spectrum': AdobeReactSpectrum,\n '@deephaven/auth-plugins': DeephavenAuthPlugins,\n '@deephaven/chart': DeephavenChart,\n '@deephaven/components': DeephavenComponents,\n '@deephaven/console': DeephavenConsole,\n '@deephaven/dashboard': DeephavenDashboard,\n '@deephaven/dashboard-core-plugins': DeephavenDashboardCorePlugins,\n '@deephaven/icons': DeephavenIcons,\n '@deephaven/iris-grid': DeephavenIrisGrid,\n '@deephaven/jsapi-bootstrap': DeephavenJsapiBootstrap,\n '@deephaven/jsapi-components': DeephavenJsapiComponents,\n '@deephaven/jsapi-utils': DeephavenJsapiUtils,\n '@deephaven/log': DeephavenLog,\n '@deephaven/plugin': DeephavenPlugin,\n '@deephaven/react-hooks': DeephavenReactHooks,\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAO,KAAKC,UAAU,MAAM,aAAa;AACzC,OAAOC,QAAQ,MAAM,WAAW;AAChC;AACA,OAAO,KAAKC,kBAAkB,MAAM,uBAAuB;AAC3D,OAAO,KAAKC,oBAAoB,MAAM,yBAAyB;AAC/D,OAAO,KAAKC,cAAc,MAAM,kBAAkB;AAClD,OAAO,KAAKC,mBAAmB,MAAM,uBAAuB;AAC5D,OAAO,KAAKC,kBAAkB,MAAM,sBAAsB;AAC1D,OAAO,KAAKC,6BAA6B,MAAM,mCAAmC;AAClF,OAAO,KAAKC,cAAc,MAAM,kBAAkB;AAClD,OAAO,KAAKC,iBAAiB,MAAM,sBAAsB;AACzD,OAAO,KAAKC,uBAAuB,MAAM,4BAA4B;AACrE,OAAO,KAAKC,wBAAwB,MAAM,6BAA6B;AACvE,OAAO,KAAKC,mBAAmB,MAAM,wBAAwB;AAC7D,OAAO,KAAKC,gBAAgB,MAAM,oBAAoB;AACtD,OAAOC,YAAY,MAAM,gBAAgB;AACzC,OAAO,KAAKC,mBAAmB,MAAM,wBAAwB;AAC7D,OAAO,KAAKC,eAAe,MAAM,mBAAmB;;AAEpD;AACA,OAAO,IAAMC,OAAO,GAAG;EACrBnB,KAAK;EACL,WAAW,EAAEG,QAAQ;EACrBF,KAAK;EACL,aAAa,EAAEC,UAAU;EACzB,uBAAuB,EAAEE,kBAAkB;EAC3C,yBAAyB,EAAEC,oBAAoB;EAC/C,kBAAkB,EAAEC,cAAc;EAClC,uBAAuB,EAAEC,mBAAmB;EAC5C,oBAAoB,EAAEQ,gBAAgB;EACtC,sBAAsB,EAAEP,kBAAkB;EAC1C,mCAAmC,EAAEC,6BAA6B;EAClE,kBAAkB,EAAEC,cAAc;EAClC,sBAAsB,EAAEC,iBAAiB;EACzC,4BAA4B,EAAEC,uBAAuB;EACrD,6BAA6B,EAAEC,wBAAwB;EACvD,wBAAwB,EAAEC,mBAAmB;EAC7C,gBAAgB,EAAEE,YAAY;EAC9B,mBAAmB,EAAEE,eAAe;EACpC,wBAAwB,EAAED;AAC5B,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutStorage.js","names":["isLayoutV2","layout","version","isLayoutV1","Array","isArray"],"sources":["../../src/storage/LayoutStorage.ts"],"sourcesContent":["import type { ItemConfig } from '@deephaven/golden-layout';\nimport { type FilterSet, type Link } from '@deephaven/dashboard-core-plugins';\nimport { type PluginDataMap } from '@deephaven/redux';\n\n/**\n * Have a different version to support legacy layout exports\n */\nexport type ExportedLayoutV1 = ItemConfig[];\n\nexport type ExportedLayoutV2 = {\n filterSets: FilterSet[];\n links: Link[];\n layoutConfig: ItemConfig[];\n pluginDataMap?: PluginDataMap;\n version: 2;\n};\n\nexport type ExportedLayout = ExportedLayoutV1 | ExportedLayoutV2;\n\nexport function isLayoutV2(layout: ExportedLayout): layout is ExportedLayoutV2 {\n return (layout as ExportedLayoutV2).version === 2;\n}\n\nexport function isLayoutV1(layout: ExportedLayout): layout is ExportedLayoutV1 {\n return Array.isArray(layout);\n}\n\n/**\n * Interface for accessing layouts from wherever they are stored.\n */\nexport interface LayoutStorage {\n /**\n * Get the name of the layouts available\n * @returns The string array of layout names\n */\n getLayouts: () => Promise<string[]>;\n\n /**\n * Get the layout with the specified name\n * @param name The name of the layout to fetch\n * @returns GoldenLayout layout config\n */\n getLayout: (name: string) => Promise<ExportedLayout>;\n}\n\nexport default LayoutStorage;\n"],"mappings":"AAIA;AACA;AACA;;AAaA,OAAO,SAASA,UAAUA,CAACC,MAAsB,EAA8B;EAC7E,OAAQA,MAAM,CAAsBC,OAAO,KAAK,CAAC;AACnD;AAEA,OAAO,SAASC,UAAUA,CAACF,MAAsB,EAA8B;EAC7E,OAAOG,KAAK,CAACC,OAAO,CAACJ,MAAM,CAAC;AAC9B;;AAEA;AACA;AACA"}
|
|
1
|
+
{"version":3,"file":"LayoutStorage.js","names":["isLayoutV2","layout","version","isLayoutV1","Array","isArray"],"sources":["../../src/storage/LayoutStorage.ts"],"sourcesContent":["import type { ItemConfig } from '@deephaven/golden-layout';\nimport { type FilterSet, type Link } from '@deephaven/dashboard-core-plugins';\nimport { type PluginDataMap } from '@deephaven/redux';\n\n/**\n * Have a different version to support legacy layout exports\n */\nexport type ExportedLayoutV1 = ItemConfig[];\n\nexport type ExportedLayoutV2 = {\n filterSets: FilterSet[];\n links: Link[];\n layoutConfig: ItemConfig[];\n pluginDataMap?: PluginDataMap;\n version: 2;\n};\n\nexport type ExportedLayout = ExportedLayoutV1 | ExportedLayoutV2;\n\nexport function isLayoutV2(layout: ExportedLayout): layout is ExportedLayoutV2 {\n return (layout as ExportedLayoutV2).version === 2;\n}\n\nexport function isLayoutV1(layout: ExportedLayout): layout is ExportedLayoutV1 {\n return Array.isArray(layout);\n}\n\n/**\n * Interface for accessing layouts from wherever they are stored.\n */\nexport interface LayoutStorage {\n /**\n * Get the name of the layouts available\n * @returns The string array of layout names\n */\n getLayouts: () => Promise<string[]>;\n\n /**\n * Get the layout with the specified name\n * @param name The name of the layout to fetch\n * @returns GoldenLayout layout config\n */\n getLayout: (name: string) => Promise<ExportedLayout>;\n}\n\nexport default LayoutStorage;\n"],"mappings":"AAIA;AACA;AACA;;AAaA,OAAO,SAASA,UAAUA,CAACC,MAAsB,EAA8B;EAC7E,OAAQA,MAAM,CAAsBC,OAAO,KAAK,CAAC;AACnD;AAEA,OAAO,SAASC,UAAUA,CAACF,MAAsB,EAA8B;EAC7E,OAAOG,KAAK,CAACC,OAAO,CAACJ,MAAM,CAAC;AAC9B;;AAEA;AACA;AACA","ignoreList":[]}
|
|
@@ -15,10 +15,10 @@ var log = Log.module('LocalWorkspaceStorage');
|
|
|
15
15
|
export class LocalWorkspaceStorage {
|
|
16
16
|
static getBooleanServerConfig(serverConfigValues, key) {
|
|
17
17
|
var _serverConfigValues$g, _serverConfigValues$g2;
|
|
18
|
-
if ((serverConfigValues === null || serverConfigValues === void 0
|
|
18
|
+
if ((serverConfigValues === null || serverConfigValues === void 0 || (_serverConfigValues$g = serverConfigValues.get(key)) === null || _serverConfigValues$g === void 0 ? void 0 : _serverConfigValues$g.toLowerCase()) === 'true') {
|
|
19
19
|
return true;
|
|
20
20
|
}
|
|
21
|
-
if ((serverConfigValues === null || serverConfigValues === void 0
|
|
21
|
+
if ((serverConfigValues === null || serverConfigValues === void 0 || (_serverConfigValues$g2 = serverConfigValues.get(key)) === null || _serverConfigValues$g2 === void 0 ? void 0 : _serverConfigValues$g2.toLowerCase()) === 'false') {
|
|
22
22
|
return false;
|
|
23
23
|
}
|
|
24
24
|
return undefined;
|
|
@@ -63,7 +63,6 @@ export class LocalWorkspaceStorage {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
|
-
|
|
67
66
|
webgl: true,
|
|
68
67
|
webglEditable: true,
|
|
69
68
|
gridDensity: 'regular'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocalWorkspaceStorage.js","names":["Log","DateTimeColumnFormatter","DecimalColumnFormatter","IntegerColumnFormatter","merge","UserLayoutUtils","log","module","LocalWorkspaceStorage","getBooleanServerConfig","serverConfigValues","key","_serverConfigValues$g","_serverConfigValues$g2","get","toLowerCase","undefined","getJSONServerConfig","value","JSON","parse","e","error","concat","makeDefaultWorkspaceSettings","settings","defaultDateTimeFormat","DEFAULT_DATETIME_FORMAT_STRING","formatter","timeZone","DEFAULT_TIME_ZONE_ID","showTimeZone","showTSeparator","disableMoveConfirmation","defaultDecimalFormatOptions","defaultFormatString","DEFAULT_FORMAT_STRING","defaultIntegerFormatOptions","truncateNumbersWithPound","showEmptyStrings","showNullStrings","showExtraGroupColumn","notebookSettings","isMinimapEnabled","formatOnSave","python","linter","isEnabled","webgl","webglEditable","gridDensity","serverSettings","config","makeWorkspaceData","layoutStorage","options","_asyncToGenerator","filterSets","links","layoutConfig","pluginDataMap","getDefaultLayout","isConsoleAvailable","closed","makeDefaultWorkspace","data","constructor","_defineProperty","load","_this","_localStorage$getItem","workspace","localStorage","getItem","STORAGE_KEY","info","save","setItem","stringify"],"sources":["../../src/storage/LocalWorkspaceStorage.ts"],"sourcesContent":["import Log from '@deephaven/log';\nimport {\n type WorkspaceStorage,\n type WorkspaceStorageLoadOptions,\n type CustomizableWorkspaceData,\n type CustomizableWorkspace,\n type WorkspaceSettings,\n type ServerConfigValues,\n} from '@deephaven/redux';\nimport {\n DateTimeColumnFormatter,\n DecimalColumnFormatter,\n IntegerColumnFormatter,\n} from '@deephaven/jsapi-utils';\nimport merge from 'lodash.merge';\nimport UserLayoutUtils from './UserLayoutUtils';\nimport type LayoutStorage from './LayoutStorage';\n\nconst log = Log.module('LocalWorkspaceStorage');\n\n/**\n * Implementation of WorkspaceStorage that just stores the workspace data in localStorage\n */\nexport class LocalWorkspaceStorage implements WorkspaceStorage {\n static readonly STORAGE_KEY = 'deephaven.WorkspaceStorage';\n\n static getBooleanServerConfig(\n serverConfigValues: Map<string, string> | undefined,\n key: string\n ): boolean | undefined {\n if (serverConfigValues?.get(key)?.toLowerCase() === 'true') {\n return true;\n }\n if (serverConfigValues?.get(key)?.toLowerCase() === 'false') {\n return false;\n }\n return undefined;\n }\n\n static getJSONServerConfig(\n serverConfigValues: Map<string, string> | undefined,\n key: string\n ): Record<string, unknown> | undefined {\n const value = serverConfigValues?.get(key);\n\n if (value == null) {\n return undefined;\n }\n\n try {\n return JSON.parse(value);\n } catch (e) {\n log.error(\n `Unable to parse JSON server config for key ${key}. Value: ${value}`\n );\n return undefined;\n }\n }\n\n static makeDefaultWorkspaceSettings(\n serverConfigValues: ServerConfigValues\n ): WorkspaceSettings {\n const settings = {\n defaultDateTimeFormat:\n DateTimeColumnFormatter.DEFAULT_DATETIME_FORMAT_STRING,\n formatter: [],\n timeZone: DateTimeColumnFormatter.DEFAULT_TIME_ZONE_ID,\n showTimeZone: false,\n showTSeparator: true,\n disableMoveConfirmation: false,\n defaultDecimalFormatOptions: {\n defaultFormatString: DecimalColumnFormatter.DEFAULT_FORMAT_STRING,\n },\n defaultIntegerFormatOptions: {\n defaultFormatString: IntegerColumnFormatter.DEFAULT_FORMAT_STRING,\n },\n truncateNumbersWithPound: false,\n showEmptyStrings: true,\n showNullStrings: true,\n showExtraGroupColumn: true,\n notebookSettings: {\n isMinimapEnabled: false,\n formatOnSave: false,\n python: {\n linter: {\n isEnabled: true,\n // Omit default config so default settings are used if the user never changes them\n },\n },\n },\n webgl: true,\n webglEditable: true,\n gridDensity: 'regular',\n } satisfies WorkspaceSettings;\n const serverSettings = {\n defaultDateTimeFormat: serverConfigValues?.get('dateTimeFormat'),\n formatter: [],\n timeZone: serverConfigValues?.get('timeZone'),\n showTimeZone: LocalWorkspaceStorage.getBooleanServerConfig(\n serverConfigValues,\n 'showTimeZone'\n ),\n showTSeparator: LocalWorkspaceStorage.getBooleanServerConfig(\n serverConfigValues,\n 'showTSeparator'\n ),\n disableMoveConfirmation: LocalWorkspaceStorage.getBooleanServerConfig(\n serverConfigValues,\n 'disableMoveConfirmation'\n ),\n defaultDecimalFormatOptions:\n serverConfigValues?.get('decimalFormat') !== undefined\n ? {\n defaultFormatString: serverConfigValues?.get('decimalFormat'),\n }\n : undefined,\n defaultIntegerFormatOptions:\n serverConfigValues?.get('integerFormat') !== undefined\n ? {\n defaultFormatString: serverConfigValues?.get('integerFormat'),\n }\n : undefined,\n truncateNumbersWithPound: LocalWorkspaceStorage.getBooleanServerConfig(\n serverConfigValues,\n 'truncateNumbersWithPound'\n ),\n showEmptyStrings: LocalWorkspaceStorage.getBooleanServerConfig(\n serverConfigValues,\n 'showEmptyStrings'\n ),\n showNullStrings: LocalWorkspaceStorage.getBooleanServerConfig(\n serverConfigValues,\n 'showNullStrings'\n ),\n showExtraGroupColumn: LocalWorkspaceStorage.getBooleanServerConfig(\n serverConfigValues,\n 'showExtraGroupColumn'\n ),\n notebookSettings: {\n isMinimapEnabled: LocalWorkspaceStorage.getBooleanServerConfig(\n serverConfigValues,\n 'web.user.notebookSettings.isMinimapEnabled'\n ),\n formatOnSave: LocalWorkspaceStorage.getBooleanServerConfig(\n serverConfigValues,\n 'web.user.notebookSettings.formatOnSave'\n ),\n python: {\n linter: {\n isEnabled: LocalWorkspaceStorage.getBooleanServerConfig(\n serverConfigValues,\n 'web.user.notebookSettings.python.linter.isEnabled'\n ),\n config: LocalWorkspaceStorage.getJSONServerConfig(\n serverConfigValues,\n 'web.user.notebookSettings.python.linter.config'\n ),\n },\n },\n },\n webgl: LocalWorkspaceStorage.getBooleanServerConfig(\n serverConfigValues,\n 'web.webgl'\n ),\n webglEditable: LocalWorkspaceStorage.getBooleanServerConfig(\n serverConfigValues,\n 'web.webgl.editable'\n ),\n } satisfies Partial<WorkspaceSettings>;\n\n return merge({}, settings, serverSettings);\n }\n\n static async makeWorkspaceData(\n layoutStorage: LayoutStorage,\n options?: WorkspaceStorageLoadOptions\n ): Promise<CustomizableWorkspaceData> {\n const {\n filterSets,\n links,\n layoutConfig,\n pluginDataMap = {},\n } = await UserLayoutUtils.getDefaultLayout(\n layoutStorage,\n options?.isConsoleAvailable\n );\n return {\n settings: {},\n layoutConfig,\n closed: [{}],\n links,\n filterSets,\n pluginDataMap,\n };\n }\n\n static async makeDefaultWorkspace(\n layoutStorage: LayoutStorage,\n options?: WorkspaceStorageLoadOptions\n ): Promise<CustomizableWorkspace> {\n return {\n data: await LocalWorkspaceStorage.makeWorkspaceData(\n layoutStorage,\n options\n ),\n };\n }\n\n private layoutStorage: LayoutStorage;\n\n constructor(layoutStorage: LayoutStorage) {\n this.layoutStorage = layoutStorage;\n }\n\n // eslint-disable-next-line class-methods-use-this\n async load(\n options?: WorkspaceStorageLoadOptions\n ): Promise<CustomizableWorkspace> {\n try {\n const workspace = JSON.parse(\n localStorage.getItem(LocalWorkspaceStorage.STORAGE_KEY) ?? ''\n );\n return workspace;\n } catch (e) {\n log.info('Unable to load workspace data, initializing to default data');\n\n return LocalWorkspaceStorage.makeDefaultWorkspace(\n this.layoutStorage,\n options\n );\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n async save(workspace: CustomizableWorkspace): Promise<CustomizableWorkspace> {\n localStorage.setItem(\n LocalWorkspaceStorage.STORAGE_KEY,\n JSON.stringify(workspace)\n );\n return workspace;\n }\n}\n\nexport default LocalWorkspaceStorage;\n"],"mappings":";;;;;AAAA,OAAOA,GAAG,MAAM,gBAAgB;AAShC,SACEC,uBAAuB,EACvBC,sBAAsB,EACtBC,sBAAsB,QACjB,wBAAwB;AAC/B,OAAOC,KAAK,MAAM,cAAc;AAAC,OAC1BC,eAAe;AAGtB,IAAMC,GAAG,GAAGN,GAAG,CAACO,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A;EACMqB,IAAIA,CAACL,SAAgC,EAAkC;IAAA,OAAAf,iBAAA;MAC3EgB,YAAY,CAACK,OAAO,CAClBrE,qBAAqB,CAACkE,WAAW,EACjCvD,IAAI,CAAC2D,SAAS,CAACP,SAAS,CAC1B,CAAC;MACD,OAAOA,SAAS;IAAC;EACnB;AACF;AAACJ,eAAA,CA1NY3D,qBAAqB,iBACF,4BAA4B;AA2N5D,eAAeA,qBAAqB"}
|
|
1
|
+
{"version":3,"file":"LocalWorkspaceStorage.js","names":["Log","DateTimeColumnFormatter","DecimalColumnFormatter","IntegerColumnFormatter","merge","UserLayoutUtils","log","module","LocalWorkspaceStorage","getBooleanServerConfig","serverConfigValues","key","_serverConfigValues$g","_serverConfigValues$g2","get","toLowerCase","undefined","getJSONServerConfig","value","JSON","parse","e","error","concat","makeDefaultWorkspaceSettings","settings","defaultDateTimeFormat","DEFAULT_DATETIME_FORMAT_STRING","formatter","timeZone","DEFAULT_TIME_ZONE_ID","showTimeZone","showTSeparator","disableMoveConfirmation","defaultDecimalFormatOptions","defaultFormatString","DEFAULT_FORMAT_STRING","defaultIntegerFormatOptions","truncateNumbersWithPound","showEmptyStrings","showNullStrings","showExtraGroupColumn","notebookSettings","isMinimapEnabled","formatOnSave","python","linter","isEnabled","webgl","webglEditable","gridDensity","serverSettings","config","makeWorkspaceData","layoutStorage","options","_asyncToGenerator","filterSets","links","layoutConfig","pluginDataMap","getDefaultLayout","isConsoleAvailable","closed","makeDefaultWorkspace","data","constructor","_defineProperty","load","_this","_localStorage$getItem","workspace","localStorage","getItem","STORAGE_KEY","info","save","setItem","stringify"],"sources":["../../src/storage/LocalWorkspaceStorage.ts"],"sourcesContent":["import Log from '@deephaven/log';\nimport {\n type WorkspaceStorage,\n type WorkspaceStorageLoadOptions,\n type CustomizableWorkspaceData,\n type CustomizableWorkspace,\n type WorkspaceSettings,\n type ServerConfigValues,\n} from '@deephaven/redux';\nimport {\n DateTimeColumnFormatter,\n DecimalColumnFormatter,\n IntegerColumnFormatter,\n} from '@deephaven/jsapi-utils';\nimport merge from 'lodash.merge';\nimport UserLayoutUtils from './UserLayoutUtils';\nimport type LayoutStorage from './LayoutStorage';\n\nconst log = Log.module('LocalWorkspaceStorage');\n\n/**\n * Implementation of WorkspaceStorage that just stores the workspace data in localStorage\n */\nexport class LocalWorkspaceStorage implements WorkspaceStorage {\n static readonly STORAGE_KEY = 'deephaven.WorkspaceStorage';\n\n static getBooleanServerConfig(\n serverConfigValues: Map<string, string> | undefined,\n key: string\n ): boolean | undefined {\n if (serverConfigValues?.get(key)?.toLowerCase() === 'true') {\n return true;\n }\n if (serverConfigValues?.get(key)?.toLowerCase() === 'false') {\n return false;\n }\n return undefined;\n }\n\n static getJSONServerConfig(\n serverConfigValues: Map<string, string> | undefined,\n key: string\n ): Record<string, unknown> | undefined {\n const value = serverConfigValues?.get(key);\n\n if (value == null) {\n return undefined;\n }\n\n try {\n return JSON.parse(value);\n } catch (e) {\n log.error(\n `Unable to parse JSON server config for key ${key}. Value: ${value}`\n );\n return undefined;\n }\n }\n\n static makeDefaultWorkspaceSettings(\n serverConfigValues: ServerConfigValues\n ): WorkspaceSettings {\n const settings = {\n defaultDateTimeFormat:\n DateTimeColumnFormatter.DEFAULT_DATETIME_FORMAT_STRING,\n formatter: [],\n timeZone: DateTimeColumnFormatter.DEFAULT_TIME_ZONE_ID,\n showTimeZone: false,\n showTSeparator: true,\n disableMoveConfirmation: false,\n defaultDecimalFormatOptions: {\n defaultFormatString: DecimalColumnFormatter.DEFAULT_FORMAT_STRING,\n },\n defaultIntegerFormatOptions: {\n defaultFormatString: IntegerColumnFormatter.DEFAULT_FORMAT_STRING,\n },\n truncateNumbersWithPound: false,\n showEmptyStrings: true,\n showNullStrings: true,\n showExtraGroupColumn: true,\n notebookSettings: {\n isMinimapEnabled: false,\n formatOnSave: false,\n python: {\n linter: {\n isEnabled: true,\n // Omit default config so default settings are used if the user never changes them\n },\n },\n },\n webgl: true,\n webglEditable: true,\n gridDensity: 'regular',\n } satisfies WorkspaceSettings;\n const serverSettings = {\n defaultDateTimeFormat: serverConfigValues?.get('dateTimeFormat'),\n formatter: [],\n timeZone: serverConfigValues?.get('timeZone'),\n showTimeZone: LocalWorkspaceStorage.getBooleanServerConfig(\n serverConfigValues,\n 'showTimeZone'\n ),\n showTSeparator: LocalWorkspaceStorage.getBooleanServerConfig(\n serverConfigValues,\n 'showTSeparator'\n ),\n disableMoveConfirmation: LocalWorkspaceStorage.getBooleanServerConfig(\n serverConfigValues,\n 'disableMoveConfirmation'\n ),\n defaultDecimalFormatOptions:\n serverConfigValues?.get('decimalFormat') !== undefined\n ? {\n defaultFormatString: serverConfigValues?.get('decimalFormat'),\n }\n : undefined,\n defaultIntegerFormatOptions:\n serverConfigValues?.get('integerFormat') !== undefined\n ? {\n defaultFormatString: serverConfigValues?.get('integerFormat'),\n }\n : undefined,\n truncateNumbersWithPound: LocalWorkspaceStorage.getBooleanServerConfig(\n serverConfigValues,\n 'truncateNumbersWithPound'\n ),\n showEmptyStrings: LocalWorkspaceStorage.getBooleanServerConfig(\n serverConfigValues,\n 'showEmptyStrings'\n ),\n showNullStrings: LocalWorkspaceStorage.getBooleanServerConfig(\n serverConfigValues,\n 'showNullStrings'\n ),\n showExtraGroupColumn: LocalWorkspaceStorage.getBooleanServerConfig(\n serverConfigValues,\n 'showExtraGroupColumn'\n ),\n notebookSettings: {\n isMinimapEnabled: LocalWorkspaceStorage.getBooleanServerConfig(\n serverConfigValues,\n 'web.user.notebookSettings.isMinimapEnabled'\n ),\n formatOnSave: LocalWorkspaceStorage.getBooleanServerConfig(\n serverConfigValues,\n 'web.user.notebookSettings.formatOnSave'\n ),\n python: {\n linter: {\n isEnabled: LocalWorkspaceStorage.getBooleanServerConfig(\n serverConfigValues,\n 'web.user.notebookSettings.python.linter.isEnabled'\n ),\n config: LocalWorkspaceStorage.getJSONServerConfig(\n serverConfigValues,\n 'web.user.notebookSettings.python.linter.config'\n ),\n },\n },\n },\n webgl: LocalWorkspaceStorage.getBooleanServerConfig(\n serverConfigValues,\n 'web.webgl'\n ),\n webglEditable: LocalWorkspaceStorage.getBooleanServerConfig(\n serverConfigValues,\n 'web.webgl.editable'\n ),\n } satisfies Partial<WorkspaceSettings>;\n\n return merge({}, settings, serverSettings);\n }\n\n static async makeWorkspaceData(\n layoutStorage: LayoutStorage,\n options?: WorkspaceStorageLoadOptions\n ): Promise<CustomizableWorkspaceData> {\n const {\n filterSets,\n links,\n layoutConfig,\n pluginDataMap = {},\n } = await UserLayoutUtils.getDefaultLayout(\n layoutStorage,\n options?.isConsoleAvailable\n );\n return {\n settings: {},\n layoutConfig,\n closed: [{}],\n links,\n filterSets,\n pluginDataMap,\n };\n }\n\n static async makeDefaultWorkspace(\n layoutStorage: LayoutStorage,\n options?: WorkspaceStorageLoadOptions\n ): Promise<CustomizableWorkspace> {\n return {\n data: await LocalWorkspaceStorage.makeWorkspaceData(\n layoutStorage,\n options\n ),\n };\n }\n\n private layoutStorage: LayoutStorage;\n\n constructor(layoutStorage: LayoutStorage) {\n this.layoutStorage = layoutStorage;\n }\n\n // eslint-disable-next-line class-methods-use-this\n async load(\n options?: WorkspaceStorageLoadOptions\n ): Promise<CustomizableWorkspace> {\n try {\n const workspace = JSON.parse(\n localStorage.getItem(LocalWorkspaceStorage.STORAGE_KEY) ?? ''\n );\n return workspace;\n } catch (e) {\n log.info('Unable to load workspace data, initializing to default data');\n\n return LocalWorkspaceStorage.makeDefaultWorkspace(\n this.layoutStorage,\n options\n );\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n async save(workspace: CustomizableWorkspace): Promise<CustomizableWorkspace> {\n localStorage.setItem(\n LocalWorkspaceStorage.STORAGE_KEY,\n JSON.stringify(workspace)\n );\n return workspace;\n }\n}\n\nexport default LocalWorkspaceStorage;\n"],"mappings":";;;;;AAAA,OAAOA,GAAG,MAAM,gBAAgB;AAShC,SACEC,uBAAuB,EACvBC,sBAAsB,EACtBC,sBAAsB,QACjB,wBAAwB;AAC/B,OA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,CAACwD,oBAAoB,CAC/CK,KAAI,CAACf,aAAa,EAClBC,OACF,CAAC;MACH;IAAC;EACH;;EAEA;EACMqB,IAAIA,CAACL,SAAgC,EAAkC;IAAA,OAAAf,iBAAA;MAC3EgB,YAAY,CAACK,OAAO,CAClBrE,qBAAqB,CAACkE,WAAW,EACjCvD,IAAI,CAAC2D,SAAS,CAACP,SAAS,CAC1B,CAAC;MACD,OAAOA,SAAS;IAAC;EACnB;AACF;AAACJ,eAAA,CA1NY3D,qBAAqB,iBACF,4BAA4B;AA2N5D,eAAeA,qBAAqB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserLayoutUtils.js","names":["CommandHistoryPanel","ConsolePanel","FileExplorerPanel","LogPanel","Log","isLayoutV1","isLayoutV2","log","module","DEFAULT_LAYOUT_CONFIG","layoutConfig","type","content","height","component","COMPONENT","title","TITLE","isClosable","width","links","filterSets","version","DEFAULT_LAYOUT_CONFIG_NO_CONSOLE","normalizeLayout","layout","Error","concat","getDefaultLayout","_x","_getDefaultLayout","apply","arguments","_asyncToGenerator","layoutStorage","isConsoleAvailable","length","undefined","layouts","getLayouts","getLayout","err","error","warn","exportLayout","data","pluginDataMap","exportedLayout"],"sources":["../../src/storage/UserLayoutUtils.ts"],"sourcesContent":["import {\n CommandHistoryPanel,\n ConsolePanel,\n FileExplorerPanel,\n LogPanel,\n} from '@deephaven/dashboard-core-plugins';\nimport Log from '@deephaven/log';\nimport { type CustomizableWorkspaceData } from '@deephaven/redux';\nimport {\n type ExportedLayout,\n type ExportedLayoutV2,\n isLayoutV1,\n isLayoutV2,\n} from './LayoutStorage';\nimport type LayoutStorage from './LayoutStorage';\n\nconst log = Log.module('UserLayoutUtils');\n\nexport const DEFAULT_LAYOUT_CONFIG: ExportedLayoutV2 = {\n layoutConfig: [\n {\n type: 'column',\n content: [\n {\n type: 'row',\n height: 40, // slightly smaller than 50-50 to allow more space for tables below\n content: [\n {\n type: 'stack',\n content: [\n {\n type: 'react-component',\n component: ConsolePanel.COMPONENT,\n title: ConsolePanel.TITLE,\n isClosable: false,\n },\n {\n type: 'react-component',\n component: LogPanel.COMPONENT,\n title: LogPanel.TITLE,\n isClosable: false,\n },\n ],\n },\n {\n type: 'stack',\n width: 25,\n content: [\n {\n type: 'react-component',\n component: CommandHistoryPanel.COMPONENT,\n title: CommandHistoryPanel.TITLE,\n isClosable: false,\n },\n {\n type: 'react-component',\n component: FileExplorerPanel.COMPONENT,\n title: FileExplorerPanel.TITLE,\n isClosable: false,\n },\n ],\n },\n ],\n },\n {\n type: 'row',\n content: [\n {\n type: 'stack',\n title: 'Notebooks',\n content: [],\n },\n ],\n },\n ],\n },\n ],\n links: [],\n filterSets: [],\n version: 2,\n};\n\nexport const DEFAULT_LAYOUT_CONFIG_NO_CONSOLE: ExportedLayoutV2 = {\n layoutConfig: [],\n links: [],\n filterSets: [],\n version: 2,\n};\n\nexport function normalizeLayout(layout: ExportedLayout): ExportedLayoutV2 {\n if (isLayoutV2(layout)) {\n return layout;\n }\n if (isLayoutV1(layout)) {\n const layoutConfig = layout;\n return {\n layoutConfig,\n links: [],\n filterSets: [],\n version: 2,\n };\n }\n\n throw new Error(`Unexpected layout import format: ${layout}`);\n}\n\n/**\n * Get the default layout for the user to use. Checks layout storage for any layouts, and uses the first one if found.\n * @param layoutStorage The layout storage to get the default layouts from\n * @param isConsoleAvailable Whether console sessions are available.\n * @returns The default layout config to use\n */\nexport async function getDefaultLayout(\n layoutStorage: LayoutStorage,\n isConsoleAvailable = true\n): Promise<ExportedLayoutV2> {\n try {\n const layouts = await layoutStorage.getLayouts();\n if (layouts.length > 0) {\n try {\n // We found a layout on the server, use it. It could be an empty layout if they want user to build their own\n const layout = await layoutStorage.getLayout(layouts[0]);\n return normalizeLayout(layout);\n } catch (err) {\n log.error('Unable to load layout', layouts[0], ':', err);\n log.warn('No valid layouts found, falling back to default layout');\n }\n }\n } catch (err) {\n log.error('Unable to fetch layout list', err);\n log.warn('Falling back to default layout');\n }\n // Otherwise, do the default layout\n return isConsoleAvailable\n ? DEFAULT_LAYOUT_CONFIG\n : DEFAULT_LAYOUT_CONFIG_NO_CONSOLE;\n}\n\nexport function exportLayout(\n data: CustomizableWorkspaceData\n): ExportedLayoutV2 {\n const { filterSets, layoutConfig, links, pluginDataMap } = data as Omit<\n ExportedLayoutV2,\n 'version'\n >;\n const exportedLayout: ExportedLayoutV2 = {\n filterSets,\n layoutConfig,\n links,\n pluginDataMap,\n version: 2,\n };\n return exportedLayout;\n}\n\nexport default { exportLayout, getDefaultLayout, normalizeLayout };\n"],"mappings":";;AAAA,SACEA,mBAAmB,EACnBC,YAAY,EACZC,iBAAiB,EACjBC,QAAQ,QACH,mCAAmC;AAC1C,OAAOC,GAAG,MAAM,gBAAgB;AAAC,SAK/BC,UAAU,EACVC,UAAU;AAIZ,IAAMC,GAAG,GAAGH,GAAG,CAACI,MAAM,CAAC,iBAAiB,CAAC;AAEzC,OAAO,IAAMC,qBAAuC,GAAG;EACrDC,YAAY,EAAE,CACZ;IACEC,IAAI,EAAE,QAAQ;IACdC,OAAO,EAAE,CACP;MACED,IAAI,EAAE,KAAK;MACXE,MAAM,EAAE,EAAE;MAAE;MACZD,OAAO,EAAE,CACP;QACED,IAAI,EAAE,OAAO;QACbC,OAAO,EAAE,CACP;UACED,IAAI,EAAE,iBAAiB;UACvBG,SAAS,EAAEb,YAAY,CAACc,SAAS;UACjCC,KAAK,EAAEf,YAAY,CAACgB,KAAK;UACzBC,UAAU,EAAE;QACd,CAAC,EACD;UACEP,IAAI,EAAE,iBAAiB;UACvBG,SAAS,EAAEX,QAAQ,CAACY,SAAS;UAC7BC,KAAK,EAAEb,QAAQ,CAACc,KAAK;UACrBC,UAAU,EAAE;QACd,CAAC;MAEL,CAAC,EACD;QACEP,IAAI,EAAE,OAAO;QACbQ,KAAK,EAAE,EAAE;QACTP,OAAO,EAAE,CACP;UACED,IAAI,EAAE,iBAAiB;UACvBG,SAAS,EAAEd,mBAAmB,C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AAAI,MAAA,QAAAJ,SAAA,QAAAK,SAAA,GAAAL,SAAA,MAAG,IAAI;IAEzB,IAAI;MACF,IAAMM,OAAO,SAASJ,aAAa,CAACK,UAAU,CAAC,CAAC;MAChD,IAAID,OAAO,CAACF,MAAM,GAAG,CAAC,EAAE;QACtB,IAAI;UACF;UACA,IAAMX,MAAM,SAASS,aAAa,CAACM,SAAS,CAACF,OAAO,CAAC,CAAC,CAAC,CAAC;UACxD,OAAOd,eAAe,CAACC,MAAM,CAAC;QAChC,CAAC,CAAC,OAAOgB,GAAG,EAAE;UACZlC,GAAG,CAACmC,KAAK,CAAC,uBAAuB,EAAEJ,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EAAEG,GAAG,CAAC;UACxDlC,GAAG,CAACoC,IAAI,CAAC,wDAAwD,CAAC;QACpE;MACF;IACF,CAAC,CAAC,OAAOF,GAAG,EAAE;MACZlC,GAAG,CAACmC,KAAK,CAAC,6BAA6B,EAAED,GAAG,CAAC;MAC7ClC,GAAG,CAACoC,IAAI,CAAC,gCAAgC,CAAC;IAC5C;IACA;IACA,OAAOR,kBAAkB,GACrB1B,qBAAqB,GACrBc,gCAAgC;EACtC,CAAC;EAAA,OAAAO,iBAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;AAED,OAAO,SAASY,YAAYA,CAC1BC,IAA+B,EACb;EAClB,IAAM;IAAExB,UAAU;IAAEX,YAAY;IAAEU,KAAK;IAAE0B;EAAc,CAAC,GAAGD,IAG1D;EACD,IAAME,cAAgC,GAAG;IACvC1B,UAAU;IACVX,YAAY;IACZU,KAAK;IACL0B,aAAa;IACbxB,OAAO,EAAE;EACX,CAAC;EACD,OAAOyB,cAAc;AACvB;AAEA,eAAe;EAAEH,YAAY;EAAEhB,gBAAgB;EAAEJ;AAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"UserLayoutUtils.js","names":["CommandHistoryPanel","ConsolePanel","FileExplorerPanel","LogPanel","Log","isLayoutV1","isLayoutV2","log","module","DEFAULT_LAYOUT_CONFIG","layoutConfig","type","content","height","component","COMPONENT","title","TITLE","isClosable","width","links","filterSets","version","DEFAULT_LAYOUT_CONFIG_NO_CONSOLE","normalizeLayout","layout","Error","concat","getDefaultLayout","_x","_getDefaultLayout","apply","arguments","_asyncToGenerator","layoutStorage","isConsoleAvailable","length","undefined","layouts","getLayouts","getLayout","err","error","warn","exportLayout","data","pluginDataMap","exportedLayout"],"sources":["../../src/storage/UserLayoutUtils.ts"],"sourcesContent":["import {\n CommandHistoryPanel,\n ConsolePanel,\n FileExplorerPanel,\n LogPanel,\n} from '@deephaven/dashboard-core-plugins';\nimport Log from '@deephaven/log';\nimport { type CustomizableWorkspaceData } from '@deephaven/redux';\nimport {\n type ExportedLayout,\n type ExportedLayoutV2,\n isLayoutV1,\n isLayoutV2,\n} from './LayoutStorage';\nimport type LayoutStorage from './LayoutStorage';\n\nconst log = Log.module('UserLayoutUtils');\n\nexport const DEFAULT_LAYOUT_CONFIG: ExportedLayoutV2 = {\n layoutConfig: [\n {\n type: 'column',\n content: [\n {\n type: 'row',\n height: 40, // slightly smaller than 50-50 to allow more space for tables below\n content: [\n {\n type: 'stack',\n content: [\n {\n type: 'react-component',\n component: ConsolePanel.COMPONENT,\n title: ConsolePanel.TITLE,\n isClosable: false,\n },\n {\n type: 'react-component',\n component: LogPanel.COMPONENT,\n title: LogPanel.TITLE,\n isClosable: false,\n },\n ],\n },\n {\n type: 'stack',\n width: 25,\n content: [\n {\n type: 'react-component',\n component: CommandHistoryPanel.COMPONENT,\n title: CommandHistoryPanel.TITLE,\n isClosable: false,\n },\n {\n type: 'react-component',\n component: FileExplorerPanel.COMPONENT,\n title: FileExplorerPanel.TITLE,\n isClosable: false,\n },\n ],\n },\n ],\n },\n {\n type: 'row',\n content: [\n {\n type: 'stack',\n title: 'Notebooks',\n content: [],\n },\n ],\n },\n ],\n },\n ],\n links: [],\n filterSets: [],\n version: 2,\n};\n\nexport const DEFAULT_LAYOUT_CONFIG_NO_CONSOLE: ExportedLayoutV2 = {\n layoutConfig: [],\n links: [],\n filterSets: [],\n version: 2,\n};\n\nexport function normalizeLayout(layout: ExportedLayout): ExportedLayoutV2 {\n if (isLayoutV2(layout)) {\n return layout;\n }\n if (isLayoutV1(layout)) {\n const layoutConfig = layout;\n return {\n layoutConfig,\n links: [],\n filterSets: [],\n version: 2,\n };\n }\n\n throw new Error(`Unexpected layout import format: ${layout}`);\n}\n\n/**\n * Get the default layout for the user to use. Checks layout storage for any layouts, and uses the first one if found.\n * @param layoutStorage The layout storage to get the default layouts from\n * @param isConsoleAvailable Whether console sessions are available.\n * @returns The default layout config to use\n */\nexport async function getDefaultLayout(\n layoutStorage: LayoutStorage,\n isConsoleAvailable = true\n): Promise<ExportedLayoutV2> {\n try {\n const layouts = await layoutStorage.getLayouts();\n if (layouts.length > 0) {\n try {\n // We found a layout on the server, use it. It could be an empty layout if they want user to build their own\n const layout = await layoutStorage.getLayout(layouts[0]);\n return normalizeLayout(layout);\n } catch (err) {\n log.error('Unable to load layout', layouts[0], ':', err);\n log.warn('No valid layouts found, falling back to default layout');\n }\n }\n } catch (err) {\n log.error('Unable to fetch layout list', err);\n log.warn('Falling back to default layout');\n }\n // Otherwise, do the default layout\n return isConsoleAvailable\n ? DEFAULT_LAYOUT_CONFIG\n : DEFAULT_LAYOUT_CONFIG_NO_CONSOLE;\n}\n\nexport function exportLayout(\n data: CustomizableWorkspaceData\n): ExportedLayoutV2 {\n const { filterSets, layoutConfig, links, pluginDataMap } = data as Omit<\n ExportedLayoutV2,\n 'version'\n >;\n const exportedLayout: ExportedLayoutV2 = {\n filterSets,\n layoutConfig,\n links,\n pluginDataMap,\n version: 2,\n };\n return exportedLayout;\n}\n\nexport default { exportLayout, getDefaultLayout, normalizeLayout };\n"],"mappings":";;AAAA,SACEA,mBAAmB,EACnBC,YAAY,EACZC,iBAAiB,EACjBC,QAAQ,QACH,mCAAmC;AAC1C,OAAOC,GAAG,MAAM,gBAAgB;AAAC,SAK/BC,UAAU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C;QACpE;MACF;IACF,CAAC,CAAC,OAAOF,GAAG,EAAE;MACZlC,GAAG,CAACmC,KAAK,CAAC,6BAA6B,EAAED,GAAG,CAAC;MAC7ClC,GAAG,CAACoC,IAAI,CAAC,gCAAgC,CAAC;IAC5C;IACA;IACA,OAAOR,kBAAkB,GACrB1B,qBAAqB,GACrBc,gCAAgC;EACtC,CAAC;EAAA,OAAAO,iBAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;AAED,OAAO,SAASY,YAAYA,CAC1BC,IAA+B,EACb;EAClB,IAAM;IAAExB,UAAU;IAAEX,YAAY;IAAEU,KAAK;IAAE0B;EAAc,CAAC,GAAGD,IAG1D;EACD,IAAME,cAAgC,GAAG;IACvC1B,UAAU;IACVX,YAAY;IACZU,KAAK;IACL0B,aAAa;IACbxB,OAAO,EAAE;EACX,CAAC;EACD,OAAOyB,cAAc;AACvB;AAEA,eAAe;EAAEH,YAAY;EAAEhB,gBAAgB;EAAEJ;AAAgB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GrpcFileStorage.js","names":["throttle","FileNotFoundError","FileUtils","isFileType","Log","GrpcFileStorageTable","log","module","GrpcFileStorage","constructor","dh","storageService","root","arguments","length","undefined","_defineProperty","tables","forEach","table","refresh","REFRESH_THROTTLE","removeRoot","filename","addRoot","path","createDirectory","_this","_asyncToGenerator","refreshTables","type","id","basename","getBaseName","getTable","_this2","push","saveFile","file","_this3","fileContents","storage","FileContents","text","content","loadFile","name","_this4","copyFile","newName","_this5","deleteFile","_this6","deleteItem","moveFile","_this7","moveItem","info","_this8","allItems","listItems","getPath","error","Error","itemDetails","concat"],"sources":["../../../src/storage/grpc/GrpcFileStorage.ts"],"sourcesContent":["import throttle from 'lodash.throttle';\nimport {\n FileNotFoundError,\n type FileStorage,\n type File,\n type FileStorageItem,\n type FileStorageTable,\n FileUtils,\n isFileType,\n} from '@deephaven/file-explorer';\nimport type { dh as DhType } from '@deephaven/jsapi-types';\nimport Log from '@deephaven/log';\nimport GrpcFileStorageTable from './GrpcFileStorageTable';\n\nconst log = Log.module('GrpcFileStorage');\n\nexport class GrpcFileStorage implements FileStorage {\n private static readonly REFRESH_THROTTLE = 150;\n\n private dh: typeof DhType;\n\n private readonly storageService: DhType.storage.StorageService;\n\n private tables = [] as GrpcFileStorageTable[];\n\n private readonly root: string;\n\n /**\n * FileStorage implementation using gRPC\n * @param storageService Storage service to use\n * @param root Root path for this instance. Should not contain trailing slash.\n */\n constructor(\n dh: typeof DhType,\n storageService: DhType.storage.StorageService,\n root = ''\n ) {\n this.dh = dh;\n this.storageService = storageService;\n this.root = root;\n }\n\n private removeRoot(filename: string): string {\n return FileUtils.removeRoot(this.root, filename);\n }\n\n private addRoot(path: string): string {\n return FileUtils.addRoot(this.root, path);\n }\n\n async createDirectory(path: string): Promise<FileStorageItem> {\n await this.storageService.createDirectory(this.addRoot(path));\n this.refreshTables();\n return {\n type: 'directory',\n id: path,\n filename: path,\n basename: FileUtils.getBaseName(path),\n };\n }\n\n async getTable(): Promise<FileStorageTable> {\n const table = new GrpcFileStorageTable(this.storageService, this.root);\n this.tables.push(table);\n return table;\n }\n\n async saveFile(file: File): Promise<File> {\n const fileContents = this.dh.storage.FileContents.text(file.content);\n await this.storageService.saveFile(\n this.addRoot(file.filename),\n fileContents,\n true\n );\n this.refreshTables();\n return file;\n }\n\n async loadFile(name: string): Promise<File> {\n const fileContents = await this.storageService.loadFile(this.addRoot(name));\n const content = await fileContents.text();\n return {\n filename: name,\n basename: FileUtils.getBaseName(name),\n content,\n };\n }\n\n async copyFile(name: string, newName: string): Promise<void> {\n const fileContents = await this.storageService.loadFile(this.addRoot(name));\n await this.storageService.saveFile(\n this.addRoot(newName),\n fileContents,\n false\n );\n this.refreshTables();\n }\n\n async deleteFile(name: string): Promise<void> {\n await this.storageService.deleteItem(this.addRoot(name));\n this.refreshTables();\n }\n\n async moveFile(name: string, newName: string): Promise<void> {\n await this.storageService.moveItem(\n this.addRoot(name),\n this.addRoot(newName)\n );\n this.refreshTables();\n }\n\n async info(name: string): Promise<FileStorageItem> {\n const allItems = await this.storageService.listItems(\n this.addRoot(FileUtils.getPath(name)),\n FileUtils.getBaseName(name)\n );\n if (allItems.length === 0) {\n throw new FileNotFoundError();\n }\n if (allItems.length > 1) {\n log.error(\n 'More than one matching file found, should never happen.',\n allItems\n );\n throw new Error('More than one matching file found');\n }\n\n const itemDetails = allItems[0];\n\n if (!isFileType(itemDetails.type)) {\n throw new Error(`Unexpected file type: ${itemDetails.type}`);\n }\n\n return {\n filename: this.removeRoot(itemDetails.filename),\n basename: itemDetails.basename,\n id: this.removeRoot(itemDetails.filename),\n type: itemDetails.type,\n };\n }\n\n private refreshTables = throttle(() => {\n this.tables.forEach(table => table.refresh());\n }, GrpcFileStorage.REFRESH_THROTTLE);\n}\n\nexport default GrpcFileStorage;\n"],"mappings":";;;;;AAAA,OAAOA,QAAQ,MAAM,iBAAiB;AACtC,SACEC,iBAAiB,EAKjBC,SAAS,EACTC,UAAU,QACL,0BAA0B;AAEjC,OAAOC,GAAG,MAAM,gBAAgB;AAAC,OAC1BC,oBAAoB;AAE3B,IAAMC,GAAG,GAAGF,GAAG,CAACG,MAAM,CAAC,iBAAiB,CAAC;AAEzC,OAAO,MAAMC,eAAe,CAAwB;EAWlD;AACF;AACA;AACA;AACA;EACEC,WAAWA,CACTC,EAAiB,EACjBC,cAA6C,EAE7C;IAAA,IADAC,IAAI,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;IAAAG,eAAA;IAAAA,eAAA;IAAAA,eAAA,iBAZM,EAAE;IAAAA,eAAA;IAAAA,eAAA,wBAsHKhB,QAAQ,CAAC,MAAM;MACrC,IAAI,CAACiB,MAAM,CAACC,OAAO,CAACC,KAAK,IAAIA,KAAK,CAACC,OAAO,CAAC,CAAC,CAAC;IAC/C,CAAC,EAAEZ,eAAe,CAACa,gBAAgB,CAAC;IA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;AAiIhD,eAAeA,eAAe"}
|
|
1
|
+
{"version":3,"file":"GrpcFileStorage.js","names":["throttle","FileNotFoundError","FileUtils","isFileType","Log","GrpcFileStorageTable","log","module","GrpcFileStorage","constructor","dh","storageService","root","arguments","length","undefined","_defineProperty","tables","forEach","table","refresh","REFRESH_THROTTLE","removeRoot","filename","addRoot","path","createDirectory","_this","_asyncToGenerator","refreshTables","type","id","basename","getBaseName","getTable","_this2","push","saveFile","file","_this3","fileContents","storage","FileContents","text","content","loadFile","name","_this4","copyFile","newName","_this5","deleteFile","_this6","deleteItem","moveFile","_this7","moveItem","info","_this8","allItems","listItems","getPath","error","Error","itemDetails","concat"],"sources":["../../../src/storage/grpc/GrpcFileStorage.ts"],"sourcesContent":["import throttle from 'lodash.throttle';\nimport {\n FileNotFoundError,\n type FileStorage,\n type File,\n type FileStorageItem,\n type FileStorageTable,\n FileUtils,\n isFileType,\n} from '@deephaven/file-explorer';\nimport type { dh as DhType } from '@deephaven/jsapi-types';\nimport Log from '@deephaven/log';\nimport GrpcFileStorageTable from './GrpcFileStorageTable';\n\nconst log = Log.module('GrpcFileStorage');\n\nexport class GrpcFileStorage implements FileStorage {\n private static readonly REFRESH_THROTTLE = 150;\n\n private dh: typeof DhType;\n\n private readonly storageService: DhType.storage.StorageService;\n\n private tables = [] as GrpcFileStorageTable[];\n\n private readonly root: string;\n\n /**\n * FileStorage implementation using gRPC\n * @param storageService Storage service to use\n * @param root Root path for this instance. Should not contain trailing slash.\n */\n constructor(\n dh: typeof DhType,\n storageService: DhType.storage.StorageService,\n root = ''\n ) {\n this.dh = dh;\n this.storageService = storageService;\n this.root = root;\n }\n\n private removeRoot(filename: string): string {\n return FileUtils.removeRoot(this.root, filename);\n }\n\n private addRoot(path: string): string {\n return FileUtils.addRoot(this.root, path);\n }\n\n async createDirectory(path: string): Promise<FileStorageItem> {\n await this.storageService.createDirectory(this.addRoot(path));\n this.refreshTables();\n return {\n type: 'directory',\n id: path,\n filename: path,\n basename: FileUtils.getBaseName(path),\n };\n }\n\n async getTable(): Promise<FileStorageTable> {\n const table = new GrpcFileStorageTable(this.storageService, this.root);\n this.tables.push(table);\n return table;\n }\n\n async saveFile(file: File): Promise<File> {\n const fileContents = this.dh.storage.FileContents.text(file.content);\n await this.storageService.saveFile(\n this.addRoot(file.filename),\n fileContents,\n true\n );\n this.refreshTables();\n return file;\n }\n\n async loadFile(name: string): Promise<File> {\n const fileContents = await this.storageService.loadFile(this.addRoot(name));\n const content = await fileContents.text();\n return {\n filename: name,\n basename: FileUtils.getBaseName(name),\n content,\n };\n }\n\n async copyFile(name: string, newName: string): Promise<void> {\n const fileContents = await this.storageService.loadFile(this.addRoot(name));\n await this.storageService.saveFile(\n this.addRoot(newName),\n fileContents,\n false\n );\n this.refreshTables();\n }\n\n async deleteFile(name: string): Promise<void> {\n await this.storageService.deleteItem(this.addRoot(name));\n this.refreshTables();\n }\n\n async moveFile(name: string, newName: string): Promise<void> {\n await this.storageService.moveItem(\n this.addRoot(name),\n this.addRoot(newName)\n );\n this.refreshTables();\n }\n\n async info(name: string): Promise<FileStorageItem> {\n const allItems = await this.storageService.listItems(\n this.addRoot(FileUtils.getPath(name)),\n FileUtils.getBaseName(name)\n );\n if (allItems.length === 0) {\n throw new FileNotFoundError();\n }\n if (allItems.length > 1) {\n log.error(\n 'More than one matching file found, should never happen.',\n allItems\n );\n throw new Error('More than one matching file found');\n }\n\n const itemDetails = allItems[0];\n\n if (!isFileType(itemDetails.type)) {\n throw new Error(`Unexpected file type: ${itemDetails.type}`);\n }\n\n return {\n filename: this.removeRoot(itemDetails.filename),\n basename: itemDetails.basename,\n id: this.removeRoot(itemDetails.filename),\n type: itemDetails.type,\n };\n }\n\n private refreshTables = throttle(() => {\n this.tables.forEach(table => table.refresh());\n }, GrpcFileStorage.REFRESH_THROTTLE);\n}\n\nexport default GrpcFileStorage;\n"],"mappings":";;;;;AAAA,OAAOA,QAAQ,MAAM,iBAAiB;AACtC,SACEC,iBAAiB,EAKjBC,SA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ACwD,KAAK,CACP,yDAAyD,EACzDH,QACF,CAAC;QACD,MAAM,IAAII,KAAK,CAAC,mCAAmC,CAAC;MACtD;MAEA,IAAMC,WAAW,GAAGL,QAAQ,CAAC,CAAC,CAAC;MAE/B,IAAI,CAACxD,UAAU,CAAC6D,WAAW,CAAClC,IAAI,CAAC,EAAE;QACjC,MAAM,IAAIiC,KAAK,0BAAAE,MAAA,CAA0BD,WAAW,CAAClC,IAAI,CAAE,CAAC;MAC9D;MAEA,OAAO;QACLP,QAAQ,EAAEmC,MAAI,CAACpC,UAAU,CAAC0C,WAAW,CAACzC,QAAQ,CAAC;QAC/CS,QAAQ,EAAEgC,WAAW,CAAChC,QAAQ;QAC9BD,EAAE,EAAE2B,MAAI,CAACpC,UAAU,CAAC0C,WAAW,CAACzC,QAAQ,CAAC;QACzCO,IAAI,EAAEkC,WAAW,CAAClC;MACpB,CAAC;IAAC;EACJ;AAKF;AAACd,eAAA,CAhIYR,eAAe,sBACiB,GAAG;AAiIhD,eAAeA,eAAe","ignoreList":[]}
|
|
@@ -16,11 +16,6 @@ var log = Log.module('GrpcFileStorageTable');
|
|
|
16
16
|
* Takes a path to specify what root this table should start at.
|
|
17
17
|
*/
|
|
18
18
|
export class GrpcFileStorageTable {
|
|
19
|
-
/**
|
|
20
|
-
* Map of expanded directory paths to the tables that manage that path.
|
|
21
|
-
* We use a tree of tables to query the server so we just get the directories that are expanded.
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
19
|
/**
|
|
25
20
|
* @param storageService The storage service to use
|
|
26
21
|
* @param baseRoot Base root for the service
|
|
@@ -37,6 +32,10 @@ export class GrpcFileStorageTable {
|
|
|
37
32
|
_defineProperty(this, "listeners", []);
|
|
38
33
|
_defineProperty(this, "viewportUpdatePromise", void 0);
|
|
39
34
|
_defineProperty(this, "currentViewportData", void 0);
|
|
35
|
+
/**
|
|
36
|
+
* Map of expanded directory paths to the tables that manage that path.
|
|
37
|
+
* We use a tree of tables to query the server so we just get the directories that are expanded.
|
|
38
|
+
*/
|
|
40
39
|
_defineProperty(this, "childTables", new Map());
|
|
41
40
|
this.storageService = storageService;
|
|
42
41
|
this.baseRoot = baseRoot;
|
|
@@ -81,12 +80,12 @@ export class GrpcFileStorageTable {
|
|
|
81
80
|
}
|
|
82
81
|
if (remainingPath) {
|
|
83
82
|
var _childTable = this.childTables.get(nextPath);
|
|
84
|
-
_childTable === null || _childTable === void 0
|
|
83
|
+
_childTable === null || _childTable === void 0 || _childTable.setExpanded(remainingPath, expanded);
|
|
85
84
|
}
|
|
86
85
|
} else if (this.childTables.has(nextPath)) {
|
|
87
86
|
if (remainingPath) {
|
|
88
87
|
var _childTable2 = this.childTables.get(nextPath);
|
|
89
|
-
_childTable2 === null || _childTable2 === void 0
|
|
88
|
+
_childTable2 === null || _childTable2 === void 0 || _childTable2.setExpanded(remainingPath, expanded);
|
|
90
89
|
} else {
|
|
91
90
|
this.childTables.delete(nextPath);
|
|
92
91
|
}
|
|
@@ -135,7 +134,7 @@ export class GrpcFileStorageTable {
|
|
|
135
134
|
refresh() {
|
|
136
135
|
var _this$viewportUpdateP2;
|
|
137
136
|
log.debug2('refresh', this.root);
|
|
138
|
-
(_this$viewportUpdateP2 = this.viewportUpdatePromise) === null || _this$viewportUpdateP2 === void 0
|
|
137
|
+
(_this$viewportUpdateP2 = this.viewportUpdatePromise) === null || _this$viewportUpdateP2 === void 0 || _this$viewportUpdateP2.cancel();
|
|
139
138
|
var refreshPromise = new Promise(resolve => {
|
|
140
139
|
this.doRefresh(resolve);
|
|
141
140
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GrpcFileStorageTable.js","names":["Log","CanceledPromiseError","PromiseUtils","FileUtils","debounce","log","module","GrpcFileStorageTable","constructor","storageService","baseRoot","arguments","length","undefined","root","_defineProperty","Map","doRefresh","bind","REFRESH_DEBOUNCE","removeBaseRoot","filename","removeRoot","getViewportData","_this$viewportUpdateP","viewportUpdatePromise","refreshInternal","Promise","resolve","items","offset","getSnapshot","sortedRanges","Error","size","currentSize","setExpanded","path","expanded","paths","split","nextPath","shift","concat","remainingPath","join","childTables","has","childTable","set","get","delete","currentViewport","collapseAll","clear","setSearch","search","setViewport","viewport","setFilters","setSorts","setReversed","close","listeners","onUpdate","callback","filter","other","debug2","fetchData","refresh","_this$viewportUpdateP2","cancel","refreshPromise","makeCancelable","then","viewportData","currentViewportData","sendUpdate","catch","e","isCanceled","error","_this","_asyncToGenerator","dirContents","listItems","map","file","type","basename","id","isExpanded","sort","a","b","localeCompare","i","item","top","bottom","childViewportData","splice","slice","_this$currentViewport","data"],"sources":["../../../src/storage/grpc/GrpcFileStorageTable.ts"],"sourcesContent":["/* eslint-disable class-methods-use-this */\n\nimport Log from '@deephaven/log';\nimport {\n type StorageTableViewport,\n type StorageListenerRemover,\n type ViewportUpdateCallback,\n type ViewportData,\n type IndexRange,\n type StorageSnapshot,\n} from '@deephaven/storage';\nimport {\n type CancelablePromise,\n CanceledPromiseError,\n PromiseUtils,\n} from '@deephaven/utils';\nimport {\n type FileStorageItem,\n type FileStorageTable,\n FileUtils,\n} from '@deephaven/file-explorer';\nimport type { dh } from '@deephaven/jsapi-types';\nimport debounce from 'lodash.debounce';\n\nconst log = Log.module('GrpcFileStorageTable');\n\n/**\n * Implementation of FileStorageTable for gRPC service.\n * Takes a path to specify what root this table should start at.\n */\nexport class GrpcFileStorageTable implements FileStorageTable {\n static REFRESH_DEBOUNCE = 50;\n\n private readonly storageService: dh.storage.StorageService;\n\n private readonly baseRoot: string;\n\n private readonly root: string;\n\n private currentSize = 0;\n\n private currentViewport?: StorageTableViewport;\n\n private listeners: ViewportUpdateCallback<FileStorageItem>[] = [];\n\n private viewportUpdatePromise?: CancelablePromise<\n ViewportData<FileStorageItem>\n >;\n\n private currentViewportData?: ViewportData<FileStorageItem>;\n\n /**\n * Map of expanded directory paths to the tables that manage that path.\n * We use a tree of tables to query the server so we just get the directories that are expanded.\n */\n private childTables: Map<string, GrpcFileStorageTable> = new Map();\n\n /**\n * @param storageService The storage service to use\n * @param baseRoot Base root for the service\n * @param root The root path for this storage table\n */\n constructor(\n storageService: dh.storage.StorageService,\n baseRoot = '',\n root = baseRoot\n ) {\n this.storageService = storageService;\n this.baseRoot = baseRoot;\n this.root = root;\n if (root === baseRoot) {\n this.doRefresh = debounce(\n this.doRefresh.bind(this),\n GrpcFileStorageTable.REFRESH_DEBOUNCE\n );\n }\n }\n\n private removeBaseRoot(filename: string): string {\n return FileUtils.removeRoot(this.baseRoot, filename);\n }\n\n getViewportData(): Promise<ViewportData<FileStorageItem>> {\n if (!this.viewportUpdatePromise) {\n this.refreshInternal();\n }\n return (\n this.viewportUpdatePromise ?? Promise.resolve({ items: [], offset: 0 })\n );\n }\n\n getSnapshot(\n sortedRanges: IndexRange[]\n ): Promise<StorageSnapshot<FileStorageItem>> {\n throw new Error('Method not implemented.');\n }\n\n get size(): number {\n return this.currentSize;\n }\n\n setExpanded(path: string, expanded: boolean): void {\n const paths = path.split('/');\n let nextPath = paths.shift();\n if (nextPath === undefined || nextPath === '') {\n nextPath = paths.shift();\n }\n if (nextPath === undefined || nextPath === '') {\n throw new Error(`Invalid path: ${path}`);\n }\n const remainingPath = paths.join('/');\n if (expanded) {\n if (!this.childTables.has(nextPath)) {\n const childTable = new GrpcFileStorageTable(\n this.storageService,\n this.baseRoot,\n `${this.root}/${nextPath}`\n );\n this.childTables.set(nextPath, childTable);\n }\n if (remainingPath) {\n const childTable = this.childTables.get(nextPath);\n childTable?.setExpanded(remainingPath, expanded);\n }\n } else if (this.childTables.has(nextPath)) {\n if (remainingPath) {\n const childTable = this.childTables.get(nextPath);\n childTable?.setExpanded(remainingPath, expanded);\n } else {\n this.childTables.delete(nextPath);\n }\n }\n if (this.currentViewport) {\n this.refreshInternal();\n }\n }\n\n collapseAll(): void {\n this.childTables.clear();\n if (this.currentViewport) {\n this.refreshInternal();\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n setSearch(search: string): void {\n throw new Error('Method not implemented.');\n }\n\n setViewport(viewport: StorageTableViewport): void {\n this.currentViewport = viewport;\n\n this.refreshInternal();\n }\n\n setFilters(): void {\n throw new Error('Method not implemented.');\n }\n\n setSorts(): void {\n throw new Error('Method not implemented.');\n }\n\n setReversed(): void {\n throw new Error('Method not implemented.');\n }\n\n close(): void {\n this.listeners = [];\n }\n\n onUpdate(\n callback: ViewportUpdateCallback<FileStorageItem>\n ): StorageListenerRemover {\n this.listeners = [...this.listeners, callback];\n return () => {\n this.listeners = this.listeners.filter(other => other !== callback);\n };\n }\n\n doRefresh(\n callback: (fetchPromise: Promise<ViewportData<FileStorageItem>>) => void\n ): void {\n log.debug2('doRefresh', this.root);\n callback(this.fetchData());\n }\n\n refresh(): void {\n log.debug2('refresh', this.root);\n\n this.viewportUpdatePromise?.cancel();\n\n const refreshPromise = new Promise<ViewportData<FileStorageItem>>(\n resolve => {\n this.doRefresh(resolve);\n }\n );\n\n const viewportUpdatePromise = PromiseUtils.makeCancelable(\n refreshPromise.then(viewportData => {\n if (this.viewportUpdatePromise !== viewportUpdatePromise) {\n throw new CanceledPromiseError();\n }\n\n this.currentViewportData = viewportData;\n\n this.sendUpdate();\n\n return viewportData;\n })\n );\n\n // Add a catch here as we're not catching the promises anywhere else\n viewportUpdatePromise.catch(e => {\n if (!PromiseUtils.isCanceled(e)) {\n log.error('Error updating viewport', e);\n }\n });\n\n this.viewportUpdatePromise = viewportUpdatePromise;\n }\n\n /**\n * Refreshes data, but catches any errors and logs them\n */\n private refreshInternal(): void {\n try {\n this.refresh();\n } catch (e) {\n if (!PromiseUtils.isCanceled(e)) {\n log.error('Unable to refresh data', e);\n }\n }\n }\n\n private async fetchData(): Promise<ViewportData<FileStorageItem>> {\n const { currentViewport: viewport } = this;\n if (!viewport) {\n throw new Error('No viewport set');\n }\n\n // First get the root directory contents\n const dirContents = await this.storageService.listItems(this.root);\n let items = dirContents\n .map(file => ({\n type: file.type,\n filename: this.removeBaseRoot(file.filename),\n basename: file.basename,\n id: this.removeBaseRoot(file.filename),\n isExpanded:\n file.type === 'directory'\n ? this.childTables.has(file.basename)\n : undefined,\n }))\n .sort((a, b) => {\n if (a.type !== b.type) {\n return a.type === 'directory' ? -1 : 1;\n }\n return a.basename.localeCompare(b.basename);\n }) as FileStorageItem[];\n\n // Get the data from all expanded directories\n for (let i = 0; i < items.length; i += 1) {\n const item = items[i];\n const { basename, filename } = item;\n if (\n filename === this.removeBaseRoot(`${this.root}/${basename}`) &&\n item.type === 'directory'\n ) {\n const childTable = this.childTables.get(basename);\n if (childTable != null) {\n childTable.setViewport({ top: 0, bottom: viewport.bottom - i });\n // eslint-disable-next-line no-await-in-loop\n const childViewportData = await childTable.getViewportData();\n items.splice(i + 1, 0, ...childViewportData.items);\n }\n }\n }\n\n this.currentSize = items.length;\n\n log.debug2(this.root, 'items', items, viewport);\n\n // Slice it to the correct viewport\n items = items.slice(viewport.top, viewport.bottom);\n\n return { items, offset: viewport.top };\n }\n\n private sendUpdate(): void {\n // Retain a reference to it in case a listener gets removed while sending an update\n const { listeners } = this;\n const data = this.currentViewportData ?? { items: [], offset: 0 };\n for (let i = 0; i < listeners.length; i += 1) {\n listeners[i](data);\n }\n }\n}\n\nexport default GrpcFileStorageTable;\n"],"mappings":";;;;;AAAA;;AAEA,OAAOA,GAAG,MAAM,gBAAgB;AAShC,SAEEC,oBAAoB,EACpBC,YAAY,QACP,kBAAkB;AACzB,SAGEC,SAAS,QACJ,0BAA0B;AAEjC,OAAOC,QAAQ,MAAM,iBAAiB;AAEtC,IAAMC,GAAG,GAAGL,GAAG,CAACM,MAAM,CAAC,sBAAsB,CAAC;;AAE9C;AACA;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,CAA6B;EAqB5D;AACF;AACA;AACA;;EAGE;AACF;AACA;AACA;AACA;EACEC,WAAWA,CACTC,cAAyC,EAGzC;IAAA,IAFAC,QAAQ,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;IA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KAAK,EAAE,EAAE;MAAEC,MAAM,EAAE;IAAE,CAAC;IACjE,KAAK,IAAImE,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGlC,SAAS,CAACnD,MAAM,EAAEqF,CAAC,IAAI,CAAC,EAAE;MAC5ClC,SAAS,CAACkC,CAAC,CAAC,CAACQ,IAAI,CAAC;IACpB;EACF;AACF;AAAC1F,eAAA,CA3QYR,oBAAoB,sBACL,EAAE;AA4Q9B,eAAeA,oBAAoB"}
|
|
1
|
+
{"version":3,"file":"GrpcFileStorageTable.js","names":["Log","CanceledPromiseError","PromiseUtils","FileUtils","debounce","log","module","GrpcFileStorageTable","constructor","storageService","baseRoot","arguments","length","undefined","root","_defineProperty","Map","doRefresh","bind","REFRESH_DEBOUNCE","removeBaseRoot","filename","removeRoot","getViewportData","_this$viewportUpdateP","viewportUpdatePromise","refreshInternal","Promise","resolve","items","offset","getSnapshot","sortedRanges","Error","size","currentSize","setExpanded","path","expanded","paths","split","nextPath","shift","concat","remainingPath","join","childTables","has","childTable","set","get","delete","currentViewport","collapseAll","clear","setSearch","search","setViewport","viewport","setFilters","setSorts","setReversed","close","listeners","onUpdate","callback","filter","other","debug2","fetchData","refresh","_this$viewportUpdateP2","cancel","refreshPromise","makeCancelable","then","viewportData","currentViewportData","sendUpdate","catch","e","isCanceled","error","_this","_asyncToGenerator","dirContents","listItems","map","file","type","basename","id","isExpanded","sort","a","b","localeCompare","i","item","top","bottom","childViewportData","splice","slice","_this$currentViewport","data"],"sources":["../../../src/storage/grpc/GrpcFileStorageTable.ts"],"sourcesContent":["/* eslint-disable class-methods-use-this */\n\nimport Log from '@deephaven/log';\nimport {\n type StorageTableViewport,\n type StorageListenerRemover,\n type ViewportUpdateCallback,\n type ViewportData,\n type IndexRange,\n type StorageSnapshot,\n} from '@deephaven/storage';\nimport {\n type CancelablePromise,\n CanceledPromiseError,\n PromiseUtils,\n} from '@deephaven/utils';\nimport {\n type FileStorageItem,\n type FileStorageTable,\n FileUtils,\n} from '@deephaven/file-explorer';\nimport type { dh } from '@deephaven/jsapi-types';\nimport debounce from 'lodash.debounce';\n\nconst log = Log.module('GrpcFileStorageTable');\n\n/**\n * Implementation of FileStorageTable for gRPC service.\n * Takes a path to specify what root this table should start at.\n */\nexport class GrpcFileStorageTable implements FileStorageTable {\n static REFRESH_DEBOUNCE = 50;\n\n private readonly storageService: dh.storage.StorageService;\n\n private readonly baseRoot: string;\n\n private readonly root: string;\n\n private currentSize = 0;\n\n private currentViewport?: StorageTableViewport;\n\n private listeners: ViewportUpdateCallback<FileStorageItem>[] = [];\n\n private viewportUpdatePromise?: CancelablePromise<\n ViewportData<FileStorageItem>\n >;\n\n private currentViewportData?: ViewportData<FileStorageItem>;\n\n /**\n * Map of expanded directory paths to the tables that manage that path.\n * We use a tree of tables to query the server so we just get the directories that are expanded.\n */\n private childTables: Map<string, GrpcFileStorageTable> = new Map();\n\n /**\n * @param storageService The storage service to use\n * @param baseRoot Base root for the service\n * @param root The root path for this storage table\n */\n constructor(\n storageService: dh.storage.StorageService,\n baseRoot = '',\n root = baseRoot\n ) {\n this.storageService = storageService;\n this.baseRoot = baseRoot;\n this.root = root;\n if (root === baseRoot) {\n this.doRefresh = debounce(\n this.doRefresh.bind(this),\n GrpcFileStorageTable.REFRESH_DEBOUNCE\n );\n }\n }\n\n private removeBaseRoot(filename: string): string {\n return FileUtils.removeRoot(this.baseRoot, filename);\n }\n\n getViewportData(): Promise<ViewportData<FileStorageItem>> {\n if (!this.viewportUpdatePromise) {\n this.refreshInternal();\n }\n return (\n this.viewportUpdatePromise ?? Promise.resolve({ items: [], offset: 0 })\n );\n }\n\n getSnapshot(\n sortedRanges: IndexRange[]\n ): Promise<StorageSnapshot<FileStorageItem>> {\n throw new Error('Method not implemented.');\n }\n\n get size(): number {\n return this.currentSize;\n }\n\n setExpanded(path: string, expanded: boolean): void {\n const paths = path.split('/');\n let nextPath = paths.shift();\n if (nextPath === undefined || nextPath === '') {\n nextPath = paths.shift();\n }\n if (nextPath === undefined || nextPath === '') {\n throw new Error(`Invalid path: ${path}`);\n }\n const remainingPath = paths.join('/');\n if (expanded) {\n if (!this.childTables.has(nextPath)) {\n const childTable = new GrpcFileStorageTable(\n this.storageService,\n this.baseRoot,\n `${this.root}/${nextPath}`\n );\n this.childTables.set(nextPath, childTable);\n }\n if (remainingPath) {\n const childTable = this.childTables.get(nextPath);\n childTable?.setExpanded(remainingPath, expanded);\n }\n } else if (this.childTables.has(nextPath)) {\n if (remainingPath) {\n const childTable = this.childTables.get(nextPath);\n childTable?.setExpanded(remainingPath, expanded);\n } else {\n this.childTables.delete(nextPath);\n }\n }\n if (this.currentViewport) {\n this.refreshInternal();\n }\n }\n\n collapseAll(): void {\n this.childTables.clear();\n if (this.currentViewport) {\n this.refreshInternal();\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n setSearch(search: string): void {\n throw new Error('Method not implemented.');\n }\n\n setViewport(viewport: StorageTableViewport): void {\n this.currentViewport = viewport;\n\n this.refreshInternal();\n }\n\n setFilters(): void {\n throw new Error('Method not implemented.');\n }\n\n setSorts(): void {\n throw new Error('Method not implemented.');\n }\n\n setReversed(): void {\n throw new Error('Method not implemented.');\n }\n\n close(): void {\n this.listeners = [];\n }\n\n onUpdate(\n callback: ViewportUpdateCallback<FileStorageItem>\n ): StorageListenerRemover {\n this.listeners = [...this.listeners, callback];\n return () => {\n this.listeners = this.listeners.filter(other => other !== callback);\n };\n }\n\n doRefresh(\n callback: (fetchPromise: Promise<ViewportData<FileStorageItem>>) => void\n ): void {\n log.debug2('doRefresh', this.root);\n callback(this.fetchData());\n }\n\n refresh(): void {\n log.debug2('refresh', this.root);\n\n this.viewportUpdatePromise?.cancel();\n\n const refreshPromise = new Promise<ViewportData<FileStorageItem>>(\n resolve => {\n this.doRefresh(resolve);\n }\n );\n\n const viewportUpdatePromise = PromiseUtils.makeCancelable(\n refreshPromise.then(viewportData => {\n if (this.viewportUpdatePromise !== viewportUpdatePromise) {\n throw new CanceledPromiseError();\n }\n\n this.currentViewportData = viewportData;\n\n this.sendUpdate();\n\n return viewportData;\n })\n );\n\n // Add a catch here as we're not catching the promises anywhere else\n viewportUpdatePromise.catch(e => {\n if (!PromiseUtils.isCanceled(e)) {\n log.error('Error updating viewport', e);\n }\n });\n\n this.viewportUpdatePromise = viewportUpdatePromise;\n }\n\n /**\n * Refreshes data, but catches any errors and logs them\n */\n private refreshInternal(): void {\n try {\n this.refresh();\n } catch (e) {\n if (!PromiseUtils.isCanceled(e)) {\n log.error('Unable to refresh data', e);\n }\n }\n }\n\n private async fetchData(): Promise<ViewportData<FileStorageItem>> {\n const { currentViewport: viewport } = this;\n if (!viewport) {\n throw new Error('No viewport set');\n }\n\n // First get the root directory contents\n const dirContents = await this.storageService.listItems(this.root);\n let items = dirContents\n .map(file => ({\n type: file.type,\n filename: this.removeBaseRoot(file.filename),\n basename: file.basename,\n id: this.removeBaseRoot(file.filename),\n isExpanded:\n file.type === 'directory'\n ? this.childTables.has(file.basename)\n : undefined,\n }))\n .sort((a, b) => {\n if (a.type !== b.type) {\n return a.type === 'directory' ? -1 : 1;\n }\n return a.basename.localeCompare(b.basename);\n }) as FileStorageItem[];\n\n // Get the data from all expanded directories\n for (let i = 0; i < items.length; i += 1) {\n const item = items[i];\n const { basename, filename } = item;\n if (\n filename === this.removeBaseRoot(`${this.root}/${basename}`) &&\n item.type === 'directory'\n ) {\n const childTable = this.childTables.get(basename);\n if (childTable != null) {\n childTable.setViewport({ top: 0, bottom: viewport.bottom - i });\n // eslint-disable-next-line no-await-in-loop\n const childViewportData = await childTable.getViewportData();\n items.splice(i + 1, 0, ...childViewportData.items);\n }\n }\n }\n\n this.currentSize = items.length;\n\n log.debug2(this.root, 'items', items, viewport);\n\n // Slice it to the correct viewport\n items = items.slice(viewport.top, viewport.bottom);\n\n return { items, offset: viewport.top };\n }\n\n private sendUpdate(): void {\n // Retain a reference to it in case a listener gets removed while sending an update\n const { listeners } = this;\n const data = this.currentViewportData ?? { items: [], offset: 0 };\n for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,CAAChD,WAAW,GAAGN,KAAK,CAACjB,MAAM;MAE/BP,GAAG,CAAC+D,MAAM,CAACe,KAAI,CAACrE,IAAI,EAAE,OAAO,EAAEe,KAAK,EAAE6B,QAAQ,CAAC;;MAE/C;MACA7B,KAAK,GAAGA,KAAK,CAAC0E,KAAK,CAAC7C,QAAQ,CAACyC,GAAG,EAAEzC,QAAQ,CAAC0C,MAAM,CAAC;MAElD,OAAO;QAAEvE,KAAK;QAAEC,MAAM,EAAE4B,QAAQ,CAACyC;MAAI,CAAC;IAAC;EACzC;EAEQrB,UAAUA,CAAA,EAAS;IAAA,IAAA0B,qBAAA;IACzB;IACA,IAAM;MAAEzC;IAAU,CAAC,GAAG,IAAI;IAC1B,IAAM0C,IAAI,IAAAD,qBAAA,GAAG,IAAI,CAAC3B,mBAAmB,cAAA2B,qBAAA,cAAAA,qBAAA,GAAI;MAAE3E,KAAK,EAAE,EAAE;MAAEC,MAAM,EAAE;IAAE,CAAC;IACjE,KAAK,IAAImE,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGlC,SAAS,CAACnD,MAAM,EAAEqF,CAAC,IAAI,CAAC,EAAE;MAC5ClC,SAAS,CAACkC,CAAC,CAAC,CAACQ,IAAI,CAAC;IACpB;EACF;AACF;AAAC1F,eAAA,CA3QYR,oBAAoB,sBACL,EAAE;AA4Q9B,eAAeA,oBAAoB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GrpcLayoutStorage.js","names":["GrpcLayoutStorage","constructor","storageService","root","arguments","length","undefined","_defineProperty","getLayouts","_this","_asyncToGenerator","files","listItems","map","file","basename","getLayout","name","_this2","fileContents","loadFile","concat","content","text","JSON","parse"],"sources":["../../../src/storage/grpc/GrpcLayoutStorage.ts"],"sourcesContent":["import type { dh } from '@deephaven/jsapi-types';\nimport { type ExportedLayout } from '../LayoutStorage';\nimport type LayoutStorage from '../LayoutStorage';\n\nexport class GrpcLayoutStorage implements LayoutStorage {\n readonly storageService: dh.storage.StorageService;\n\n readonly root: string;\n\n /**\n *\n * @param storageService The gRPC storage service to use\n * @param root The root path where the layouts are stored\n */\n constructor(storageService: dh.storage.StorageService, root = '') {\n this.storageService = storageService;\n this.root = root;\n }\n\n async getLayouts(): Promise<string[]> {\n const files = await this.storageService.listItems(this.root, '*.json');\n\n return files.map(file => file.basename);\n }\n\n async getLayout(name: string): Promise<ExportedLayout> {\n const fileContents = await this.storageService.loadFile(\n `${this.root}/${name}`\n );\n const content = await fileContents.text();\n\n return JSON.parse(content);\n }\n}\n\nexport default GrpcLayoutStorage;\n"],"mappings":";;;;;AAIA,OAAO,MAAMA,iBAAiB,CAA0B;EAKtD;AACF;AACA;AACA;AACA;EACEC,WAAWA,CAACC,cAAyC,EAAa;IAAA,IAAXC,IAAI,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;IAAAG,eAAA;IAAAA,eAAA;IAC9D,IAAI,CAACL,cAAc,GAAGA,cAAc;IACpC,IAAI,CAACC,IAAI,GAAGA,IAAI;EAClB;EAEMK,UAAUA,CAAA,EAAsB;IAAA,IAAAC,KAAA;IAAA,OAAAC,iBAAA;MACpC,IAAMC,KAAK,SAASF,KAAI,CAACP,cAAc,CAACU,SAAS,CAACH,KAAI,CAACN,IAAI,EAAE,QAAQ,CAAC;MAEtE,OAAOQ,KAAK,CAACE,GAAG,CAACC,IAAI,IAAIA,IAAI,CAACC,QAAQ,CAAC;IAAC;EAC1C;EAEMC,SAASA,CAACC,IAAY,EAA2B;IAAA,IAAAC,MAAA;IAAA,OAAAR,iBAAA;MACrD,IAAMS,YAAY,SAASD,MAAI,CAAChB,cAAc,CAACkB,QAAQ,IAAAC,MAAA,CAClDH,MAAI,CAACf,IAAI,OAAAkB,MAAA,CAAIJ,IAAI,CACtB,CAAC;MACD,IAAMK,OAAO,SAASH,YAAY,CAACI,IAAI,CAAC,CAAC;MAEzC,OAAOC,IAAI,CAACC,KAAK,CAACH,OAAO,CAAC;IAAC;EAC7B;AACF;AAEA,eAAetB,iBAAiB"}
|
|
1
|
+
{"version":3,"file":"GrpcLayoutStorage.js","names":["GrpcLayoutStorage","constructor","storageService","root","arguments","length","undefined","_defineProperty","getLayouts","_this","_asyncToGenerator","files","listItems","map","file","basename","getLayout","name","_this2","fileContents","loadFile","concat","content","text","JSON","parse"],"sources":["../../../src/storage/grpc/GrpcLayoutStorage.ts"],"sourcesContent":["import type { dh } from '@deephaven/jsapi-types';\nimport { type ExportedLayout } from '../LayoutStorage';\nimport type LayoutStorage from '../LayoutStorage';\n\nexport class GrpcLayoutStorage implements LayoutStorage {\n readonly storageService: dh.storage.StorageService;\n\n readonly root: string;\n\n /**\n *\n * @param storageService The gRPC storage service to use\n * @param root The root path where the layouts are stored\n */\n constructor(storageService: dh.storage.StorageService, root = '') {\n this.storageService = storageService;\n this.root = root;\n }\n\n async getLayouts(): Promise<string[]> {\n const files = await this.storageService.listItems(this.root, '*.json');\n\n return files.map(file => file.basename);\n }\n\n async getLayout(name: string): Promise<ExportedLayout> {\n const fileContents = await this.storageService.loadFile(\n `${this.root}/${name}`\n );\n const content = await fileContents.text();\n\n return JSON.parse(content);\n }\n}\n\nexport default GrpcLayoutStorage;\n"],"mappings":";;;;;AAIA,OAAO,MAAMA,iBAAiB,CAA0B;EAKtD;AACF;AACA;AACA;AACA;EACEC,WAAWA,CAACC,cAAyC,EAAa;IAAA,IAAXC,IAAI,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;IAAAG,eAAA;IAAAA,eAAA;IAC9D,IAAI,CAACL,cAAc,GAAGA,cAAc;IACpC,IAAI,CAACC,IAAI,GAAGA,IAAI;EAClB;EAEMK,UAAUA,CAAA,EAAsB;IAAA,IAAAC,KAAA;IAAA,OAAAC,iBAAA;MACpC,IAAMC,KAAK,SAASF,KAAI,CAACP,cAAc,CAACU,SAAS,CAACH,KAAI,CAACN,IAAI,EAAE,QAAQ,CAAC;MAEtE,OAAOQ,KAAK,CAACE,GAAG,CAACC,IAAI,IAAIA,IAAI,CAACC,QAAQ,CAAC;IAAC;EAC1C;EAEMC,SAASA,CAACC,IAAY,EAA2B;IAAA,IAAAC,MAAA;IAAA,OAAAR,iBAAA;MACrD,IAAMS,YAAY,SAASD,MAAI,CAAChB,cAAc,CAACkB,QAAQ,IAAAC,MAAA,CAClDH,MAAI,CAACf,IAAI,OAAAkB,MAAA,CAAIJ,IAAI,CACtB,CAAC;MACD,IAAMK,OAAO,SAASH,YAAY,CAACI,IAAI,CAAC,CAAC;MAEzC,OAAOC,IAAI,CAACC,KAAK,CAACH,OAAO,CAAC;IAAC;EAC7B;AACF;AAEA,eAAetB,iBAAiB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/storage/grpc/index.ts"],"sourcesContent":["export * from './GrpcFileStorage';\nexport * from './GrpcFileStorageTable';\nexport * from './GrpcLayoutStorage';\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/storage/grpc/index.ts"],"sourcesContent":["export * from './GrpcFileStorage';\nexport * from './GrpcFileStorageTable';\nexport * from './GrpcLayoutStorage';\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","UserLayoutUtils"],"sources":["../../src/storage/index.ts"],"sourcesContent":["export * from './grpc';\nexport * from './LayoutStorage';\nexport * from './LocalWorkspaceStorage';\nexport * from './UserLayoutUtils';\nexport { default as UserLayoutUtils } from './UserLayoutUtils';\n"],"mappings":";;;;SAISA,OAAO,IAAIC,eAAe"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","UserLayoutUtils"],"sources":["../../src/storage/index.ts"],"sourcesContent":["export * from './grpc';\nexport * from './LayoutStorage';\nexport * from './LocalWorkspaceStorage';\nexport * from './UserLayoutUtils';\nexport { default as UserLayoutUtils } from './UserLayoutUtils';\n"],"mappings":";;;;SAISA,OAAO,IAAIC,eAAe","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectUtils.js","names":["getBaseUrl","apiUrl","URL","concat","window","location","getEnvoyPrefix","searchParams","URLSearchParams","search","get","getConnectOptions","envoyPrefix","headers"],"sources":["../../src/utils/ConnectUtils.ts"],"sourcesContent":["import type { dh } from '@deephaven/jsapi-types';\n\n/**\n * Get the base URL of the API\n * @param apiUrl API URL\n * @returns URL for the base of the API\n */\nexport function getBaseUrl(apiUrl: string): URL {\n return new URL(apiUrl, `${window.location}`);\n}\n\n/**\n * Get the Envoy prefix header value\n * @returns Envoy prefix header value\n */\nexport function getEnvoyPrefix(): string | null {\n const searchParams = new URLSearchParams(window.location.search);\n return searchParams.get('envoyPrefix');\n}\n\nexport function getConnectOptions(): dh.ConnectOptions {\n const envoyPrefix = getEnvoyPrefix();\n return envoyPrefix != null\n ? { headers: { 'envoy-prefix': envoyPrefix } }\n : { headers: {} };\n}\n"],"mappings":"AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,UAAUA,CAACC,MAAc,EAAO;EAC9C,OAAO,IAAIC,GAAG,CAACD,MAAM,KAAAE,MAAA,CAAKC,MAAM,CAACC,QAAQ,CAAE,CAAC;AAC9C;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAAA,EAAkB;EAC9C,IAAMC,YAAY,GAAG,IAAIC,eAAe,CAACJ,MAAM,CAACC,QAAQ,CAACI,MAAM,CAAC;EAChE,OAAOF,YAAY,CAACG,GAAG,CAAC,aAAa,CAAC;AACxC;AAEA,OAAO,SAASC,iBAAiBA,CAAA,EAAsB;EACrD,IAAMC,WAAW,GAAGN,cAAc,CAAC,CAAC;EACpC,OAAOM,WAAW,IAAI,IAAI,GACtB;IAAEC,OAAO,EAAE;MAAE,cAAc,EAAED;IAAY;EAAE,CAAC,GAC5C;IAAEC,OAAO,EAAE,CAAC;EAAE,CAAC;AACrB"}
|
|
1
|
+
{"version":3,"file":"ConnectUtils.js","names":["getBaseUrl","apiUrl","URL","concat","window","location","getEnvoyPrefix","searchParams","URLSearchParams","search","get","getConnectOptions","envoyPrefix","headers"],"sources":["../../src/utils/ConnectUtils.ts"],"sourcesContent":["import type { dh } from '@deephaven/jsapi-types';\n\n/**\n * Get the base URL of the API\n * @param apiUrl API URL\n * @returns URL for the base of the API\n */\nexport function getBaseUrl(apiUrl: string): URL {\n return new URL(apiUrl, `${window.location}`);\n}\n\n/**\n * Get the Envoy prefix header value\n * @returns Envoy prefix header value\n */\nexport function getEnvoyPrefix(): string | null {\n const searchParams = new URLSearchParams(window.location.search);\n return searchParams.get('envoyPrefix');\n}\n\nexport function getConnectOptions(): dh.ConnectOptions {\n const envoyPrefix = getEnvoyPrefix();\n return envoyPrefix != null\n ? { headers: { 'envoy-prefix': envoyPrefix } }\n : { headers: {} };\n}\n"],"mappings":"AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,UAAUA,CAACC,MAAc,EAAO;EAC9C,OAAO,IAAIC,GAAG,CAACD,MAAM,KAAAE,MAAA,CAAKC,MAAM,CAACC,QAAQ,CAAE,CAAC;AAC9C;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAAA,EAAkB;EAC9C,IAAMC,YAAY,GAAG,IAAIC,eAAe,CAACJ,MAAM,CAACC,QAAQ,CAACI,MAAM,CAAC;EAChE,OAAOF,YAAY,CAACG,GAAG,CAAC,aAAa,CAAC;AACxC;AAEA,OAAO,SAASC,iBAAiBA,CAAA,EAAsB;EACrD,IAAMC,WAAW,GAAGN,cAAc,CAAC,CAAC;EACpC,OAAOM,WAAW,IAAI,IAAI,GACtB;IAAEC,OAAO,EAAE;MAAE,cAAc,EAAED;IAAY;EAAE,CAAC,GAC5C;IAAEC,OAAO,EAAE,CAAC;EAAE,CAAC;AACrB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createExportLogsContextAction.js","names":["GLOBAL_SHORTCUTS","exportLogs","logHistory","store","createExportLogsContextAction","metadata","isGlobal","arguments","length","undefined","action","_objectSpread","userAgent","navigator","getState","shortcut","EXPORT_LOGS"],"sources":["../../src/utils/createExportLogsContextAction.ts"],"sourcesContent":["import { type ContextAction, GLOBAL_SHORTCUTS } from '@deephaven/components';\nimport { exportLogs, logHistory } from '@deephaven/log';\nimport { store } from '@deephaven/redux';\n\nexport function createExportLogsContextAction(\n metadata?: Record<string, unknown>,\n isGlobal = false\n): ContextAction {\n return {\n action: () => {\n exportLogs(\n logHistory,\n {\n ...metadata,\n userAgent: navigator.userAgent,\n },\n store.getState()\n );\n },\n shortcut: GLOBAL_SHORTCUTS.EXPORT_LOGS,\n isGlobal,\n };\n}\n\nexport default createExportLogsContextAction;\n"],"mappings":";;;;;AAAA,SAA6BA,gBAAgB,QAAQ,uBAAuB;AAC5E,SAASC,UAAU,EAAEC,UAAU,QAAQ,gBAAgB;AACvD,SAASC,KAAK,QAAQ,kBAAkB;AAExC,OAAO,SAASC,6BAA6BA,CAC3CC,QAAkC,EAEnB;EAAA,IADfC,QAAQ,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EAEhB,OAAO;IACLG,MAAM,EAAEA,CAAA,KAAM;MACZT,UAAU,CACRC,UAAU,EAAAS,aAAA,CAAAA,aAAA,KAELN,QAAQ;QACXO,SAAS,EAAEC,SAAS,CAACD;MAAS,IAEhCT,KAAK,CAACW,QAAQ,CAAC,CACjB,CAAC;IACH,CAAC;IACDC,QAAQ,EAAEf,gBAAgB,CAACgB,WAAW;IACtCV;EACF,CAAC;AACH;AAEA,eAAeF,6BAA6B"}
|
|
1
|
+
{"version":3,"file":"createExportLogsContextAction.js","names":["GLOBAL_SHORTCUTS","exportLogs","logHistory","store","createExportLogsContextAction","metadata","isGlobal","arguments","length","undefined","action","_objectSpread","userAgent","navigator","getState","shortcut","EXPORT_LOGS"],"sources":["../../src/utils/createExportLogsContextAction.ts"],"sourcesContent":["import { type ContextAction, GLOBAL_SHORTCUTS } from '@deephaven/components';\nimport { exportLogs, logHistory } from '@deephaven/log';\nimport { store } from '@deephaven/redux';\n\nexport function createExportLogsContextAction(\n metadata?: Record<string, unknown>,\n isGlobal = false\n): ContextAction {\n return {\n action: () => {\n exportLogs(\n logHistory,\n {\n ...metadata,\n userAgent: navigator.userAgent,\n },\n store.getState()\n );\n },\n shortcut: GLOBAL_SHORTCUTS.EXPORT_LOGS,\n isGlobal,\n };\n}\n\nexport default createExportLogsContextAction;\n"],"mappings":";;;;;AAAA,SAA6BA,gBAAgB,QAAQ,uBAAuB;AAC5E,SAASC,UAAU,EAAEC,UAAU,QAAQ,gBAAgB;AACvD,SAASC,KAAK,QAAQ,kBAAkB;AAExC,OAAO,SAASC,6BAA6BA,CAC3CC,QAAkC,EAEnB;EAAA,IADfC,QAAQ,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EAEhB,OAAO;IACLG,MAAM,EAAEA,CAAA,KAAM;MACZT,UAAU,CACRC,UAAU,EAAAS,aAAA,CAAAA,aAAA,KAELN,QAAQ;QACXO,SAAS,EAAEC,SAAS,CAACD;MAAS,IAEhCT,KAAK,CAACW,QAAQ,CAAC,CACjB,CAAC;IACH,CAAC;IACDC,QAAQ,EAAEf,gBAAgB,CAACgB,WAAW;IACtCV;EACF,CAAC;AACH;AAEA,eAAeF,6BAA6B","ignoreList":[]}
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/utils/index.ts"],"sourcesContent":["export * from './ConnectUtils';\nexport * from './createExportLogsContextAction';\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/utils/index.ts"],"sourcesContent":["export * from './ConnectUtils';\nexport * from './createExportLogsContextAction';\n"],"mappings":"","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deephaven/app-utils",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2-beta.3+b369a51e",
|
|
4
4
|
"description": "Deephaven App Utils",
|
|
5
5
|
"author": "Deephaven Data Labs LLC",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -22,34 +22,30 @@
|
|
|
22
22
|
"build:babel": "babel ./src --out-dir ./dist --extensions \".ts,.tsx,.js,.jsx\" --source-maps --root-mode upward"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@deephaven/test-utils": "^1.
|
|
26
|
-
"react": "^17.x",
|
|
27
|
-
"react-dom": "^17.x",
|
|
28
|
-
"react-redux": "^7.x",
|
|
29
|
-
"redux": "^4.x"
|
|
25
|
+
"@deephaven/test-utils": "^1.7.2-beta.3+b369a51e"
|
|
30
26
|
},
|
|
31
27
|
"dependencies": {
|
|
32
28
|
"@adobe/react-spectrum": "3.38.0",
|
|
33
|
-
"@deephaven/auth-plugins": "^1.7.
|
|
34
|
-
"@deephaven/chart": "^1.7.
|
|
35
|
-
"@deephaven/components": "^1.7.
|
|
36
|
-
"@deephaven/console": "^1.7.
|
|
37
|
-
"@deephaven/dashboard": "^1.7.
|
|
38
|
-
"@deephaven/dashboard-core-plugins": "^1.7.
|
|
39
|
-
"@deephaven/file-explorer": "^1.7.
|
|
40
|
-
"@deephaven/golden-layout": "^1.7.
|
|
41
|
-
"@deephaven/icons": "^1.2.
|
|
42
|
-
"@deephaven/iris-grid": "^1.7.
|
|
43
|
-
"@deephaven/jsapi-bootstrap": "^1.7.
|
|
44
|
-
"@deephaven/jsapi-components": "^1.7.
|
|
29
|
+
"@deephaven/auth-plugins": "^1.7.2-beta.3+b369a51e",
|
|
30
|
+
"@deephaven/chart": "^1.7.2-beta.3+b369a51e",
|
|
31
|
+
"@deephaven/components": "^1.7.2-beta.3+b369a51e",
|
|
32
|
+
"@deephaven/console": "^1.7.2-beta.3+b369a51e",
|
|
33
|
+
"@deephaven/dashboard": "^1.7.2-beta.3+b369a51e",
|
|
34
|
+
"@deephaven/dashboard-core-plugins": "^1.7.2-beta.3+b369a51e",
|
|
35
|
+
"@deephaven/file-explorer": "^1.7.2-beta.3+b369a51e",
|
|
36
|
+
"@deephaven/golden-layout": "^1.7.2-beta.3+b369a51e",
|
|
37
|
+
"@deephaven/icons": "^1.7.2-beta.3+b369a51e",
|
|
38
|
+
"@deephaven/iris-grid": "^1.7.2-beta.3+b369a51e",
|
|
39
|
+
"@deephaven/jsapi-bootstrap": "^1.7.2-beta.3+b369a51e",
|
|
40
|
+
"@deephaven/jsapi-components": "^1.7.2-beta.3+b369a51e",
|
|
45
41
|
"@deephaven/jsapi-types": "^1.0.0-dev0.39.4",
|
|
46
|
-
"@deephaven/jsapi-utils": "^1.7.
|
|
47
|
-
"@deephaven/log": "^1.
|
|
48
|
-
"@deephaven/plugin": "^1.7.
|
|
49
|
-
"@deephaven/react-hooks": "^1.7.
|
|
50
|
-
"@deephaven/redux": "^1.7.
|
|
51
|
-
"@deephaven/storage": "^1.
|
|
52
|
-
"@deephaven/utils": "^1.7.
|
|
42
|
+
"@deephaven/jsapi-utils": "^1.7.2-beta.3+b369a51e",
|
|
43
|
+
"@deephaven/log": "^1.7.2-beta.3+b369a51e",
|
|
44
|
+
"@deephaven/plugin": "^1.7.2-beta.3+b369a51e",
|
|
45
|
+
"@deephaven/react-hooks": "^1.7.2-beta.3+b369a51e",
|
|
46
|
+
"@deephaven/redux": "^1.7.2-beta.3+b369a51e",
|
|
47
|
+
"@deephaven/storage": "^1.7.2-beta.3+b369a51e",
|
|
48
|
+
"@deephaven/utils": "^1.7.2-beta.3+b369a51e",
|
|
53
49
|
"@fontsource/fira-mono": "5.0.13",
|
|
54
50
|
"@fontsource/fira-sans": "5.0.20",
|
|
55
51
|
"@paciolan/remote-component": "2.13.0",
|
|
@@ -74,5 +70,5 @@
|
|
|
74
70
|
"publishConfig": {
|
|
75
71
|
"access": "public"
|
|
76
72
|
},
|
|
77
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "b369a51ee94d212641a14c6ce1f19fcc85168339"
|
|
78
74
|
}
|