@deephaven/app-utils 0.46.1-beta.2 → 0.46.1-beta.4
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 +24 -9
- package/dist/components/AppBootstrap.js.map +1 -1
- package/dist/components/AuthBootstrap.js +10 -4
- package/dist/components/AuthBootstrap.js.map +1 -1
- package/dist/components/ConnectionBootstrap.js +6 -4
- package/dist/components/ConnectionBootstrap.js.map +1 -1
- package/dist/components/FontBootstrap.js +20 -13
- package/dist/components/FontBootstrap.js.map +1 -1
- package/dist/components/FontsLoaded.js +6 -2
- package/dist/components/FontsLoaded.js.map +1 -1
- package/dist/components/PluginsBootstrap.js +5 -3
- package/dist/components/PluginsBootstrap.js.map +1 -1
- package/dist/components/ServerConfigBootstrap.js +6 -4
- package/dist/components/ServerConfigBootstrap.js.map +1 -1
- package/dist/components/UserBootstrap.js +5 -3
- package/dist/components/UserBootstrap.js.map +1 -1
- package/dist/plugins/PluginUtils.js +12 -6
- package/dist/plugins/PluginUtils.js.map +1 -1
- package/package.json +11 -11
|
@@ -10,6 +10,7 @@ import { getConnectOptions } from "../utils/index.js";
|
|
|
10
10
|
import FontsLoaded from "./FontsLoaded.js";
|
|
11
11
|
import UserBootstrap from "./UserBootstrap.js";
|
|
12
12
|
import ServerConfigBootstrap from "./ServerConfigBootstrap.js";
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
14
|
/**
|
|
14
15
|
* AppBootstrap component. Handles loading the fonts, client, and authentication.
|
|
15
16
|
* Will display the children when everything is loaded and authenticated.
|
|
@@ -30,15 +31,29 @@ export function AppBootstrap(_ref) {
|
|
|
30
31
|
setLogoutCount(value => value + 1);
|
|
31
32
|
}, []);
|
|
32
33
|
useBroadcastLoginListener(onLogin, onLogout);
|
|
33
|
-
return /*#__PURE__*/
|
|
34
|
-
fontClassNames: fontClassNames
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
return /*#__PURE__*/_jsx(FontBootstrap, {
|
|
35
|
+
fontClassNames: fontClassNames,
|
|
36
|
+
children: /*#__PURE__*/_jsx(PluginsBootstrap, {
|
|
37
|
+
pluginsUrl: pluginsUrl,
|
|
38
|
+
children: /*#__PURE__*/_jsx(ClientBootstrap, {
|
|
39
|
+
serverUrl: serverUrl,
|
|
40
|
+
options: clientOptions,
|
|
41
|
+
children: /*#__PURE__*/_jsx(RefreshTokenBootstrap, {
|
|
42
|
+
children: /*#__PURE__*/_jsx(AuthBootstrap, {
|
|
43
|
+
children: /*#__PURE__*/_jsx(ServerConfigBootstrap, {
|
|
44
|
+
children: /*#__PURE__*/_jsx(UserBootstrap, {
|
|
45
|
+
children: /*#__PURE__*/_jsx(ConnectionBootstrap, {
|
|
46
|
+
children: /*#__PURE__*/_jsx(FontsLoaded, {
|
|
47
|
+
children: children
|
|
48
|
+
})
|
|
49
|
+
})
|
|
50
|
+
})
|
|
51
|
+
})
|
|
52
|
+
})
|
|
53
|
+
})
|
|
54
|
+
}, logoutCount)
|
|
55
|
+
})
|
|
56
|
+
});
|
|
42
57
|
}
|
|
43
58
|
export default AppBootstrap;
|
|
44
59
|
//# sourceMappingURL=AppBootstrap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppBootstrap.js","names":["React","useCallback","useMemo","useState","ClientBootstrap","RefreshTokenBootstrap","useBroadcastLoginListener","FontBootstrap","PluginsBootstrap","AuthBootstrap","ConnectionBootstrap","getConnectOptions","FontsLoaded","UserBootstrap","ServerConfigBootstrap","AppBootstrap","fontClassNames","pluginsUrl","serverUrl","children","clientOptions","logoutCount","setLogoutCount","onLogin","undefined","onLogout","value"],"sources":["../../src/components/AppBootstrap.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useState } from 'react';\nimport '@deephaven/components/scss/BaseStyleSheet.scss';\nimport { ClientBootstrap } from '@deephaven/jsapi-bootstrap';\nimport {\n RefreshTokenBootstrap,\n useBroadcastLoginListener,\n} from '@deephaven/jsapi-components';\nimport FontBootstrap from './FontBootstrap';\nimport PluginsBootstrap from './PluginsBootstrap';\nimport AuthBootstrap from './AuthBootstrap';\nimport ConnectionBootstrap from './ConnectionBootstrap';\nimport { getConnectOptions } from '../utils';\nimport FontsLoaded from './FontsLoaded';\nimport UserBootstrap from './UserBootstrap';\nimport ServerConfigBootstrap from './ServerConfigBootstrap';\n\nexport type AppBootstrapProps = {\n /** URL of the server. */\n serverUrl: string;\n\n /** URL of the plugins to load. */\n pluginsUrl: string;\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 serverUrl,\n children,\n}: AppBootstrapProps) {\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 setLogoutCount(value => value + 1);\n }, []);\n useBroadcastLoginListener(onLogin, onLogout);\n return (\n <FontBootstrap fontClassNames={fontClassNames}>\n <PluginsBootstrap pluginsUrl={pluginsUrl}>\n <ClientBootstrap\n serverUrl={serverUrl}\n options={clientOptions}\n key={logoutCount}\n >\n <RefreshTokenBootstrap>\n <AuthBootstrap>\n <ServerConfigBootstrap>\n <UserBootstrap>\n <ConnectionBootstrap>\n <FontsLoaded>{children}</FontsLoaded>\n </ConnectionBootstrap>\n </UserBootstrap>\n </ServerConfigBootstrap>\n </AuthBootstrap>\n </RefreshTokenBootstrap>\n </ClientBootstrap>\n </PluginsBootstrap>\n </FontBootstrap>\n );\n}\n\nexport default AppBootstrap;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC7D,OAAO,gDAAgD;AACvD,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,SACEC,qBAAqB,EACrBC,yBAAyB,QACpB,6BAA6B;AAAC,OAC9BC,aAAa;AAAA,OACbC,gBAAgB;AAAA,OAChBC,aAAa;AAAA,OACbC,mBAAmB;AAAA,SACjBC,iBAAiB;AAAA,OACnBC,WAAW;AAAA,OACXC,aAAa;AAAA,OACbC,qBAAqB;AAkB5B;AACA;AACA;AACA;AACA,OAAO,SAASC,YAAY,OAKN;EAAA,IALO;IAC3BC,cAAc;IACdC,UAAU;IACVC,SAAS;IACTC;EACiB,CAAC;EAClB,IAAMC,aAAa,GAAGlB,OAAO,CAAC,MAAMS,iBAAiB,EAAE,EAAE,EAAE,CAAC;;EAE5D;EACA,IAAM,CAACU,WAAW,EAAEC,cAAc,CAAC,GAAGnB,QAAQ,CAAC,CAAC,CAAC;EACjD,IAAMoB,OAAO,GAAGtB,WAAW,CAAC,MAAMuB,SAAS,EAAE,EAAE,CAAC;EAChD,IAAMC,QAAQ,GAAGxB,WAAW,CAAC,MAAM;IACjCqB,cAAc,CAACI,KAAK,IAAIA,KAAK,GAAG,CAAC,CAAC;EACpC,CAAC,EAAE,EAAE,CAAC;EACNpB,yBAAyB,CAACiB,OAAO,EAAEE,QAAQ,CAAC;EAC5C,oBACE,
|
|
1
|
+
{"version":3,"file":"AppBootstrap.js","names":["React","useCallback","useMemo","useState","ClientBootstrap","RefreshTokenBootstrap","useBroadcastLoginListener","FontBootstrap","PluginsBootstrap","AuthBootstrap","ConnectionBootstrap","getConnectOptions","FontsLoaded","UserBootstrap","ServerConfigBootstrap","AppBootstrap","fontClassNames","pluginsUrl","serverUrl","children","clientOptions","logoutCount","setLogoutCount","onLogin","undefined","onLogout","value"],"sources":["../../src/components/AppBootstrap.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useState } from 'react';\nimport '@deephaven/components/scss/BaseStyleSheet.scss';\nimport { ClientBootstrap } from '@deephaven/jsapi-bootstrap';\nimport {\n RefreshTokenBootstrap,\n useBroadcastLoginListener,\n} from '@deephaven/jsapi-components';\nimport FontBootstrap from './FontBootstrap';\nimport PluginsBootstrap from './PluginsBootstrap';\nimport AuthBootstrap from './AuthBootstrap';\nimport ConnectionBootstrap from './ConnectionBootstrap';\nimport { getConnectOptions } from '../utils';\nimport FontsLoaded from './FontsLoaded';\nimport UserBootstrap from './UserBootstrap';\nimport ServerConfigBootstrap from './ServerConfigBootstrap';\n\nexport type AppBootstrapProps = {\n /** URL of the server. */\n serverUrl: string;\n\n /** URL of the plugins to load. */\n pluginsUrl: string;\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 serverUrl,\n children,\n}: AppBootstrapProps) {\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 setLogoutCount(value => value + 1);\n }, []);\n useBroadcastLoginListener(onLogin, onLogout);\n return (\n <FontBootstrap fontClassNames={fontClassNames}>\n <PluginsBootstrap pluginsUrl={pluginsUrl}>\n <ClientBootstrap\n serverUrl={serverUrl}\n options={clientOptions}\n key={logoutCount}\n >\n <RefreshTokenBootstrap>\n <AuthBootstrap>\n <ServerConfigBootstrap>\n <UserBootstrap>\n <ConnectionBootstrap>\n <FontsLoaded>{children}</FontsLoaded>\n </ConnectionBootstrap>\n </UserBootstrap>\n </ServerConfigBootstrap>\n </AuthBootstrap>\n </RefreshTokenBootstrap>\n </ClientBootstrap>\n </PluginsBootstrap>\n </FontBootstrap>\n );\n}\n\nexport default AppBootstrap;\n"],"mappings":"AAAA,OAAOA,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Q;gBAAe;cACjB;YACR;UACM;QACV;MACM,GAZnBE,WAAW;IAaA;EACD,EACL;AAEpB;AAEA,eAAeN,YAAY"}
|
|
@@ -8,6 +8,9 @@ import { getErrorMessage } from '@deephaven/utils';
|
|
|
8
8
|
import { PluginsContext } from "./PluginsBootstrap.js";
|
|
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
14
|
/** Core auth plugins that are always loaded */
|
|
12
15
|
var CORE_AUTH_PLUGINS = new Map([['@deephaven/auth-plugins.AuthPluginParent', AuthPluginParent], ['@deephaven/auth-plugins.AuthPluginPsk', AuthPluginPsk], ['@deephaven/auth-plugins.AuthPluginAnonymous', AuthPluginAnonymous]]);
|
|
13
16
|
|
|
@@ -61,14 +64,17 @@ export function AuthBootstrap(_ref) {
|
|
|
61
64
|
}, [authConfig, plugins]);
|
|
62
65
|
var isLoading = AuthComponent == null || authConfig == null;
|
|
63
66
|
if (isLoading || error != null) {
|
|
64
|
-
return /*#__PURE__*/
|
|
67
|
+
return /*#__PURE__*/_jsx(LoadingOverlay, {
|
|
65
68
|
isLoading: isLoading && error == null,
|
|
66
69
|
errorMessage: getErrorMessage(error)
|
|
67
70
|
});
|
|
68
71
|
}
|
|
69
|
-
return /*#__PURE__*/
|
|
70
|
-
authConfigValues: authConfig
|
|
71
|
-
|
|
72
|
+
return /*#__PURE__*/_jsx(AuthComponent, {
|
|
73
|
+
authConfigValues: authConfig,
|
|
74
|
+
children: /*#__PURE__*/_jsxs(_Fragment, {
|
|
75
|
+
children: [/*#__PURE__*/_jsx(LoginNotifier, {}), children]
|
|
76
|
+
})
|
|
77
|
+
});
|
|
72
78
|
}
|
|
73
79
|
export default AuthBootstrap;
|
|
74
80
|
//# sourceMappingURL=AuthBootstrap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthBootstrap.js","names":["React","useContext","useEffect","useMemo","useState","AuthPluginAnonymous","AuthPluginParent","AuthPluginPsk","LoadingOverlay","useClient","getErrorMessage","PluginsContext","getAuthPluginComponent","LoginNotifier","CORE_AUTH_PLUGINS","Map","AuthBootstrap","children","client","plugins","authConfig","setAuthConfig","error","setError","initAuthConfigValues","isCanceled","loadAuthConfigValues","newAuthConfigValues","getAuthConfigValues","e","AuthComponent","undefined","isLoading"],"sources":["../../src/components/AuthBootstrap.tsx"],"sourcesContent":["import React, { useContext, useEffect, useMemo, useState } from 'react';\nimport {\n 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 './PluginsBootstrap';\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 ['@deephaven/auth-plugins.AuthPluginParent', AuthPluginParent],\n ['@deephaven/auth-plugins.AuthPluginPsk', AuthPluginPsk],\n ['@deephaven/auth-plugins.AuthPluginAnonymous', AuthPluginAnonymous],\n]);\n\n/**\n * AuthBootstrap component. Handles displaying the auth plugin and authenticating.\n */\nexport function AuthBootstrap({ children }: AuthBootstrapProps) {\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() {\n try {\n const newAuthConfigValues = await client.getAuthConfigValues();\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 />\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;AAAC,SAC1CC,cAAc;AAAA,SACdC,sBAAsB;AAAA,OACxBC,aAAa;AASpB;AACA,IAAMC,iBAAiB,GAAG,IAAIC,GAAG,CAAC,CAChC,CAAC,0CAA0C,EAAET,gBAAgB,CAAC,EAC9D,CAAC,uCAAuC,EAAEC,aAAa,CAAC,EACxD,CAAC,6CAA6C,EAAEF,mBAAmB,CAAC,CACrE,CAAC;;AAEF;AACA;AACA;AACA,OAAO,SAASW,aAAa,OAAmC;EAAA,IAAlC;IAAEC;EAA6B,CAAC;EAC5D,IAAMC,MAAM,GAAGT,SAAS,EAAE;EAC1B;EACA;EACA,IAAMU,OAAO,GAAGlB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useMemo","useState","AuthPluginAnonymous","AuthPluginParent","AuthPluginPsk","LoadingOverlay","useClient","getErrorMessage","PluginsContext","getAuthPluginComponent","LoginNotifier","CORE_AUTH_PLUGINS","Map","AuthBootstrap","children","client","plugins","authConfig","setAuthConfig","error","setError","initAuthConfigValues","isCanceled","loadAuthConfigValues","newAuthConfigValues","getAuthConfigValues","e","AuthComponent","undefined","isLoading"],"sources":["../../src/components/AuthBootstrap.tsx"],"sourcesContent":["import React, { useContext, useEffect, useMemo, useState } from 'react';\nimport {\n 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 './PluginsBootstrap';\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 ['@deephaven/auth-plugins.AuthPluginParent', AuthPluginParent],\n ['@deephaven/auth-plugins.AuthPluginPsk', AuthPluginPsk],\n ['@deephaven/auth-plugins.AuthPluginAnonymous', AuthPluginAnonymous],\n]);\n\n/**\n * AuthBootstrap component. Handles displaying the auth plugin and authenticating.\n */\nexport function AuthBootstrap({ children }: AuthBootstrapProps) {\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() {\n try {\n const newAuthConfigValues = await client.getAuthConfigValues();\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 />\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;AAAC,SAC1CC,cAAc;AAAA,SACdC,sBAAsB;AAAA,OACxBC,aAAa;AAAA;AAAA;AAAA;AASpB;AACA,IAAMC,iBAAiB,GAAG,IAAIC,GAAG,CAAC,CAChC,CAAC,0CAA0C,EAAET,gBAAgB,CAAC,EAC9D,CAAC,uCAAuC,EAAEC,aAAa,CAAC,EACxD,CAAC,6CAA6C,EAAEF,mBAAmB,CAAC,CACrE,CAAC;;AAEF;AACA;AACA;AACA,OAAO,SAASW,aAAa,OAAmC;EAAA,IAAlC;IAAEC;EAA6B,CAAC;EAC5D,IAAMC,MAAM,GAAGT,SAAS,EAAE;EAC1B;EACA;EACA,IAAMU,OAAO,GAAGlB,UAAU,CAACU,cAAc,CAAC;EAC1C,IAAM,CAACS,UAAU,EAAEC,aAAa,CAAC,GAAGjB,QAA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Aa;IAAC,gBAAgB,EAAEF,UAAW;IAAA,uBAC1C;MAAA,wBACE,KAAC,aAAa,KAAG,EAChBH,QAAQ;IAAA;EACR,EACW;AAEpB;AAEA,eAAeD,aAAa"}
|
|
@@ -4,6 +4,7 @@ import React, { createContext, useEffect, useState } from 'react';
|
|
|
4
4
|
import { LoadingOverlay } from '@deephaven/components';
|
|
5
5
|
import { useApi, useClient } from '@deephaven/jsapi-bootstrap';
|
|
6
6
|
import Log from '@deephaven/log';
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
8
|
var log = Log.module('@deephaven/jsapi-components.ConnectionBootstrap');
|
|
8
9
|
export var ConnectionContext = /*#__PURE__*/createContext(null);
|
|
9
10
|
/**
|
|
@@ -57,15 +58,16 @@ export function ConnectionBootstrap(_ref) {
|
|
|
57
58
|
return removerFn;
|
|
58
59
|
}, [api, connection]);
|
|
59
60
|
if (connection == null || error != null) {
|
|
60
|
-
return /*#__PURE__*/
|
|
61
|
+
return /*#__PURE__*/_jsx(LoadingOverlay, {
|
|
61
62
|
"data-testid": "connection-bootstrap-loading",
|
|
62
63
|
isLoading: connection == null,
|
|
63
64
|
errorMessage: error != null ? "".concat(error) : undefined
|
|
64
65
|
});
|
|
65
66
|
}
|
|
66
|
-
return /*#__PURE__*/
|
|
67
|
-
value: connection
|
|
68
|
-
|
|
67
|
+
return /*#__PURE__*/_jsx(ConnectionContext.Provider, {
|
|
68
|
+
value: connection,
|
|
69
|
+
children: children
|
|
70
|
+
});
|
|
69
71
|
}
|
|
70
72
|
export default ConnectionBootstrap;
|
|
71
73
|
//# sourceMappingURL=ConnectionBootstrap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectionBootstrap.js","names":["React","createContext","useEffect","useState","LoadingOverlay","useApi","useClient","Log","log","module","ConnectionContext","ConnectionBootstrap","children","api","client","error","setError","connection","setConnection","initConnection","isCanceled","loadConnection","newConnection","getAsIdeConnection","e","listenForShutdown","handleShutdown","event","detail","info","JSON","stringify","removerFn","addEventListener","IdeConnection","EVENT_SHUTDOWN","undefined"],"sources":["../../src/components/ConnectionBootstrap.tsx"],"sourcesContent":["import React, { createContext, useEffect, useState } from 'react';\nimport { LoadingOverlay } from '@deephaven/components';\nimport { useApi, useClient } from '@deephaven/jsapi-bootstrap';\nimport type { IdeConnection } from '@deephaven/jsapi-types';\nimport Log from '@deephaven/log';\n\nconst log = Log.module('@deephaven/jsapi-components.ConnectionBootstrap');\n\nexport const ConnectionContext = createContext<IdeConnection | null>(null);\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({ children }: ConnectionBootstrapProps) {\n const api = useApi();\n const client = useClient();\n const [error, setError] = useState<unknown>();\n const [connection, setConnection] = useState<IdeConnection>();\n useEffect(\n function initConnection() {\n let isCanceled = false;\n async function loadConnection() {\n try {\n const newConnection = await client.getAsIdeConnection();\n if (isCanceled) {\n return;\n }\n setConnection(newConnection);\n } catch (e) {\n if (isCanceled) {\n return;\n }\n setError(e);\n }\n }\n loadConnection();\n return () => {\n isCanceled = true;\n };\n },\n [api, client]\n );\n\n useEffect(\n function listenForShutdown() {\n if (connection == null) return;\n\n function handleShutdown(event: CustomEvent) {\n const { detail } = event;\n log.info('Shutdown', `${JSON.stringify(detail)}`);\n setError(`Server shutdown: ${detail ?? 'Unknown reason'}`);\n }\n\n const removerFn = connection.addEventListener(\n api.IdeConnection.EVENT_SHUTDOWN,\n handleShutdown\n );\n return removerFn;\n },\n [api, connection]\n );\n\n if (connection == null || error != null) {\n return (\n <LoadingOverlay\n data-testid=\"connection-bootstrap-loading\"\n isLoading={connection == null}\n errorMessage={error != null ? `${error}` : undefined}\n />\n );\n }\n\n return (\n <ConnectionContext.Provider value={connection}>\n {children}\n </ConnectionContext.Provider>\n );\n}\n\nexport default ConnectionBootstrap;\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AACjE,SAASC,cAAc,QAAQ,uBAAuB;AACtD,SAASC,MAAM,EAAEC,SAAS,QAAQ,4BAA4B;AAE9D,OAAOC,GAAG,MAAM,gBAAgB;
|
|
1
|
+
{"version":3,"file":"ConnectionBootstrap.js","names":["React","createContext","useEffect","useState","LoadingOverlay","useApi","useClient","Log","log","module","ConnectionContext","ConnectionBootstrap","children","api","client","error","setError","connection","setConnection","initConnection","isCanceled","loadConnection","newConnection","getAsIdeConnection","e","listenForShutdown","handleShutdown","event","detail","info","JSON","stringify","removerFn","addEventListener","IdeConnection","EVENT_SHUTDOWN","undefined"],"sources":["../../src/components/ConnectionBootstrap.tsx"],"sourcesContent":["import React, { createContext, useEffect, useState } from 'react';\nimport { LoadingOverlay } from '@deephaven/components';\nimport { useApi, useClient } from '@deephaven/jsapi-bootstrap';\nimport type { IdeConnection } from '@deephaven/jsapi-types';\nimport Log from '@deephaven/log';\n\nconst log = Log.module('@deephaven/jsapi-components.ConnectionBootstrap');\n\nexport const ConnectionContext = createContext<IdeConnection | null>(null);\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({ children }: ConnectionBootstrapProps) {\n const api = useApi();\n const client = useClient();\n const [error, setError] = useState<unknown>();\n const [connection, setConnection] = useState<IdeConnection>();\n useEffect(\n function initConnection() {\n let isCanceled = false;\n async function loadConnection() {\n try {\n const newConnection = await client.getAsIdeConnection();\n if (isCanceled) {\n return;\n }\n setConnection(newConnection);\n } catch (e) {\n if (isCanceled) {\n return;\n }\n setError(e);\n }\n }\n loadConnection();\n return () => {\n isCanceled = true;\n };\n },\n [api, client]\n );\n\n useEffect(\n function listenForShutdown() {\n if (connection == null) return;\n\n function handleShutdown(event: CustomEvent) {\n const { detail } = event;\n log.info('Shutdown', `${JSON.stringify(detail)}`);\n setError(`Server shutdown: ${detail ?? 'Unknown reason'}`);\n }\n\n const removerFn = connection.addEventListener(\n api.IdeConnection.EVENT_SHUTDOWN,\n handleShutdown\n );\n return removerFn;\n },\n [api, connection]\n );\n\n if (connection == null || error != null) {\n return (\n <LoadingOverlay\n data-testid=\"connection-bootstrap-loading\"\n isLoading={connection == null}\n errorMessage={error != null ? `${error}` : undefined}\n />\n );\n }\n\n return (\n <ConnectionContext.Provider value={connection}>\n {children}\n </ConnectionContext.Provider>\n );\n}\n\nexport default ConnectionBootstrap;\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AACjE,SAASC,cAAc,QAAQ,uBAAuB;AACtD,SAASC,MAAM,EAAEC,SAAS,QAAQ,4BAA4B;AAE9D,OAAOC,GAAG,MAAM,gBAAgB;AAAC;AAEjC,IAAMC,GAAG,GAAGD,GAAG,CAACE,MAAM,CAAC,iDAAiD,CAAC;AAEzE,OAAO,IAAMC,iBAAiB,gBAAGT,aAAa,CAAuB,IAAI,CAAC;AAU1E;AACA;AACA;AACA,OAAO,SAASU,mBAAmB,OAAyC;EAAA,IAAxC;IAAEC;EAAmC,CAAC;EACxE,IAAMC,GAAG,GAAGR,MAAM,EAAE;EACpB,IAAMS,MAAM,GAAGR,SAAS,EAAE;EAC1B,IAAM,CAACS,KAAK,EAAEC,QAAQ,CAAC,GAAGb,QAAQ,EAAW;EAC7C,IAAM,CAACc,UAAU,EAAEC,aAAa,CAAC,GAAGf,QAAQ,EAAiB;EAC7DD,SAAS,CACP,SAASiB,cAAc,GAAG;IACxB,IAAIC,UAAU,GAAG,KAAK;IAAC,SACRC,cAAc;MAAA;IAAA;IAAA;MAAA,oCAA7B,aAAgC;QAC9B,IAAI;UACF,IAAMC,aAAa,SAASR,MAAM,CAACS,kBAAkB,EAAE;U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useEffect, useState } from 'react';
|
|
2
2
|
import 'fira';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
5
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
6
|
export var FontsLoadedContext = /*#__PURE__*/createContext(false);
|
|
4
7
|
/**
|
|
5
8
|
* FontBootstrap component. Handles preloading fonts.
|
|
@@ -15,19 +18,23 @@ export function FontBootstrap(_ref) {
|
|
|
15
18
|
setIsLoaded(true);
|
|
16
19
|
});
|
|
17
20
|
}, []);
|
|
18
|
-
return /*#__PURE__*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
22
|
+
children: [/*#__PURE__*/_jsx(FontsLoadedContext.Provider, {
|
|
23
|
+
value: isLoaded,
|
|
24
|
+
children: children
|
|
25
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
26
|
+
id: "preload-fonts",
|
|
27
|
+
style: {
|
|
28
|
+
visibility: 'hidden',
|
|
29
|
+
position: 'absolute',
|
|
30
|
+
top: -10000
|
|
31
|
+
},
|
|
32
|
+
children: fontClassNames.map(className => /*#__PURE__*/_jsx("p", {
|
|
33
|
+
className: className,
|
|
34
|
+
children: "preload"
|
|
35
|
+
}, className))
|
|
36
|
+
})]
|
|
37
|
+
});
|
|
31
38
|
}
|
|
32
39
|
export default FontBootstrap;
|
|
33
40
|
//# sourceMappingURL=FontBootstrap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FontBootstrap.js","names":["React","createContext","useEffect","useState","FontsLoadedContext","FontBootstrap","fontClassNames","children","isLoaded","setIsLoaded","initFonts","document","fonts","ready","then","visibility","position","top","map","className"],"sources":["../../src/components/FontBootstrap.tsx"],"sourcesContent":["import React, { createContext, useEffect, useState } from 'react';\nimport 'fira';\n\nexport const FontsLoadedContext = createContext<boolean>(false);\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) {\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,MAAM;
|
|
1
|
+
{"version":3,"file":"FontBootstrap.js","names":["React","createContext","useEffect","useState","FontsLoadedContext","FontBootstrap","fontClassNames","children","isLoaded","setIsLoaded","initFonts","document","fonts","ready","then","visibility","position","top","map","className"],"sources":["../../src/components/FontBootstrap.tsx"],"sourcesContent":["import React, { createContext, useEffect, useState } from 'react';\nimport 'fira';\n\nexport const FontsLoadedContext = createContext<boolean>(false);\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) {\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,MAAM;AAAC;AAAA;AAAA;AAEd,OAAO,IAAMC,kBAAkB,gBAAGH,aAAa,CAAU,KAAK,CAAC;AAe/D;AACA;AACA;AACA,OAAO,SAASI,aAAa,OAGN;EAAA,IAHO;IAC5BC,cAAc,GAAG,CAAC,mBAAmB,EAAE,oBAAoB,EAAE,WAAW,CAAC;IACzEC;EACkB,CAAC;EACnB,IAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAGN,QAAQ,CAAC,KAAK,CAAC;EAC/CD,SAAS,CAAC,SAASQ,SAAS,GAAG;IAC7BC,QAAQ,CAACC,KAAK,CAACC,KAAK,CAACC,IAAI,CAAC,MAAM;MAC9BL,WAAW,CAAC,IAAI,CAAC;IACnB,CAAC,CAAC;EACJ,CAAC,EAAE,EAAE,CAAC;EAEN,oBACE;IAAA,wBACE,KAAC,kBAAkB,CAAC,QAAQ;MAAC,KAAK,EAAED,QAAS;MAAA,UAC1CD;IAAQ,EACmB,eAU9B;MACE,EAAE,EAAC,eAAe;MAClB,KAAK,EAAE;QAAEQ,UAAU,EAAE,QAAQ;QAAEC,QAAQ,EAAE,UAAU;QAAEC,GAAG,EAAE,CAAC;MAAM,CAAE;MAAA,UAGlEX,cAAc,CAACY,GAAG,CAACC,SAAS,iBAC3B;QAAmB,SAAS,EAAEA,SAAU;QAAA,UAAC;MAEzC,GAFQA,SAAS,CAGlB;IAAC,EACE;EAAA,EACL;AAEP;AAEA,eAAed,aAAa"}
|
|
@@ -1,19 +1,23 @@
|
|
|
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
6
|
export function FontsLoaded(_ref) {
|
|
5
7
|
var {
|
|
6
8
|
children
|
|
7
9
|
} = _ref;
|
|
8
10
|
var isFontsLoaded = useContext(FontsLoadedContext);
|
|
9
11
|
if (!isFontsLoaded) {
|
|
10
|
-
return /*#__PURE__*/
|
|
12
|
+
return /*#__PURE__*/_jsx(LoadingOverlay, {
|
|
11
13
|
"data-testid": "fonts-loaded-loading"
|
|
12
14
|
});
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
16
|
-
return /*#__PURE__*/
|
|
18
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
19
|
+
children: children
|
|
20
|
+
});
|
|
17
21
|
}
|
|
18
22
|
export default FontsLoaded;
|
|
19
23
|
//# sourceMappingURL=FontsLoaded.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FontsLoaded.js","names":["React","useContext","LoadingOverlay","FontsLoadedContext","FontsLoaded","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) {\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;AAO3B,OAAO,SAASC,WAAW,OAAiC;EAAA,IAAhC;IAAEC;EAA2B,CAAC;EACxD,IAAMC,aAAa,GAAGL,UAAU,CAACE,kBAAkB,CAAC;EAEpD,IAAI,CAACG,aAAa,EAAE;IAClB,oBAAO,
|
|
1
|
+
{"version":3,"file":"FontsLoaded.js","names":["React","useContext","LoadingOverlay","FontsLoadedContext","FontsLoaded","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) {\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;AAAA;AAO3B,OAAO,SAASC,WAAW,OAAiC;EAAA,IAAhC;IAAEC;EAA2B,CAAC;EACxD,IAAMC,aAAa,GAAGL,UAAU,CAACE,kBAAkB,CAAC;EAEpD,IAAI,CAACG,aAAa,EAAE;IAClB,oBAAO,KAAC,cAAc;MAAC,eAAY;IAAsB,EAAG;EAC9D;;EAEA;EACA,oBAAO;IAAA,UAAGD;EAAQ,EAAI;AACxB;AAEA,eAAeD,WAAW"}
|
|
@@ -2,6 +2,7 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
2
2
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
3
3
|
import React, { createContext, useEffect, useState } from 'react';
|
|
4
4
|
import { loadModulePlugins } from "../plugins/index.js";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
6
|
export var PluginsContext = /*#__PURE__*/createContext(null);
|
|
6
7
|
/**
|
|
7
8
|
* PluginsBootstrap component. Handles loading the plugins.
|
|
@@ -31,9 +32,10 @@ export function PluginsBootstrap(_ref) {
|
|
|
31
32
|
isCanceled = true;
|
|
32
33
|
};
|
|
33
34
|
}, [pluginsUrl]);
|
|
34
|
-
return /*#__PURE__*/
|
|
35
|
-
value: plugins
|
|
36
|
-
|
|
35
|
+
return /*#__PURE__*/_jsx(PluginsContext.Provider, {
|
|
36
|
+
value: plugins,
|
|
37
|
+
children: children
|
|
38
|
+
});
|
|
37
39
|
}
|
|
38
40
|
export default PluginsBootstrap;
|
|
39
41
|
//# sourceMappingURL=PluginsBootstrap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginsBootstrap.js","names":["React","createContext","useEffect","useState","loadModulePlugins","PluginsContext","PluginsBootstrap","pluginsUrl","children","plugins","setPlugins","initPlugins","isCanceled","loadPlugins","pluginModules"],"sources":["../../src/components/PluginsBootstrap.tsx"],"sourcesContent":["import React, { createContext, useEffect, useState } from 'react';\nimport { PluginModuleMap, loadModulePlugins } from '../plugins';\n\nexport const PluginsContext = createContext<PluginModuleMap | null>(null);\n\nexport type PluginsBootstrapProps = {\n /**\n * Base URL of the plugins to load.\n */\n pluginsUrl: string;\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 children,\n}: PluginsBootstrapProps) {\n const [plugins, setPlugins] = useState<PluginModuleMap | null>(null);\n useEffect(\n function initPlugins() {\n let isCanceled = false;\n async function loadPlugins() {\n const pluginModules = await loadModulePlugins(pluginsUrl);\n if (!isCanceled) {\n setPlugins(pluginModules);\n }\n }\n loadPlugins();\n return () => {\n isCanceled = true;\n };\n },\n [pluginsUrl]\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,aAAa,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAAC,SACxCC,iBAAiB;AAE3C,OAAO,IAAMC,cAAc,gBAAGJ,aAAa,CAAyB,IAAI,CAAC;AAezE;AACA;AACA;AACA,OAAO,SAASK,gBAAgB,OAGN;EAAA,IAHO;IAC/BC,UAAU;IACVC;EACqB,CAAC;EACtB,IAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGP,QAAQ,CAAyB,IAAI,CAAC;EACpED,SAAS,CACP,SAASS,WAAW,GAAG;IACrB,IAAIC,UAAU,GAAG,KAAK;IAAC,SACRC,WAAW;MAAA;IAAA;IAAA;MAAA,iCAA1B,aAA6B;QAC3B,IAAMC,aAAa,SAASV,iBAAiB,CAACG,UAAU,CAAC;QACzD,IAAI,CAACK,UAAU,EAAE;UACfF,UAAU,CAACI,aAAa,CAAC;QAC3B;MACF,CAAC;MAAA;IAAA;IACDD,WAAW,EAAE;IACb,OAAO,MAAM;MACXD,UAAU,GAAG,IAAI;IACnB,CAAC;EACH,CAAC,EACD,CAACL,UAAU,CAAC,CACb;EAED,oBACE,
|
|
1
|
+
{"version":3,"file":"PluginsBootstrap.js","names":["React","createContext","useEffect","useState","loadModulePlugins","PluginsContext","PluginsBootstrap","pluginsUrl","children","plugins","setPlugins","initPlugins","isCanceled","loadPlugins","pluginModules"],"sources":["../../src/components/PluginsBootstrap.tsx"],"sourcesContent":["import React, { createContext, useEffect, useState } from 'react';\nimport { PluginModuleMap, loadModulePlugins } from '../plugins';\n\nexport const PluginsContext = createContext<PluginModuleMap | null>(null);\n\nexport type PluginsBootstrapProps = {\n /**\n * Base URL of the plugins to load.\n */\n pluginsUrl: string;\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 children,\n}: PluginsBootstrapProps) {\n const [plugins, setPlugins] = useState<PluginModuleMap | null>(null);\n useEffect(\n function initPlugins() {\n let isCanceled = false;\n async function loadPlugins() {\n const pluginModules = await loadModulePlugins(pluginsUrl);\n if (!isCanceled) {\n setPlugins(pluginModules);\n }\n }\n loadPlugins();\n return () => {\n isCanceled = true;\n };\n },\n [pluginsUrl]\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,aAAa,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAAC,SACxCC,iBAAiB;AAAA;AAE3C,OAAO,IAAMC,cAAc,gBAAGJ,aAAa,CAAyB,IAAI,CAAC;AAezE;AACA;AACA;AACA,OAAO,SAASK,gBAAgB,OAGN;EAAA,IAHO;IAC/BC,UAAU;IACVC;EACqB,CAAC;EACtB,IAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGP,QAAQ,CAAyB,IAAI,CAAC;EACpED,SAAS,CACP,SAASS,WAAW,GAAG;IACrB,IAAIC,UAAU,GAAG,KAAK;IAAC,SACRC,WAAW;MAAA;IAAA;IAAA;MAAA,iCAA1B,aAA6B;QAC3B,IAAMC,aAAa,SAASV,iBAAiB,CAACG,UAAU,CAAC;QACzD,IAAI,CAACK,UAAU,EAAE;UACfF,UAAU,CAACI,aAAa,CAAC;QAC3B;MACF,CAAC;MAAA;IAAA;IACDD,WAAW,EAAE;IACb,OAAO,MAAM;MACXD,UAAU,GAAG,IAAI;IACnB,CAAC;EACH,CAAC,EACD,CAACL,UAAU,CAAC,CACb;EAED,oBACE,KAAC,cAAc,CAAC,QAAQ;IAAC,KAAK,EAAEE,OAAQ;IAAA,UACrCD;EAAQ,EACe;AAE9B;AAEA,eAAeF,gBAAgB"}
|
|
@@ -4,6 +4,7 @@ import React, { createContext, useEffect, useState } from 'react';
|
|
|
4
4
|
import { LoadingOverlay } from '@deephaven/components';
|
|
5
5
|
import { useClient } from '@deephaven/jsapi-bootstrap';
|
|
6
6
|
import { getErrorMessage } from '@deephaven/utils';
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
8
|
export var ServerConfigContext = /*#__PURE__*/createContext(null);
|
|
8
9
|
/**
|
|
9
10
|
* ServerConfigBootstrap component. Handles loading the server config.
|
|
@@ -42,14 +43,15 @@ export function ServerConfigBootstrap(_ref) {
|
|
|
42
43
|
}, [client]);
|
|
43
44
|
var isLoading = serverConfig == null;
|
|
44
45
|
if (isLoading || error != null) {
|
|
45
|
-
return /*#__PURE__*/
|
|
46
|
+
return /*#__PURE__*/_jsx(LoadingOverlay, {
|
|
46
47
|
isLoading: isLoading && error == null,
|
|
47
48
|
errorMessage: getErrorMessage(error)
|
|
48
49
|
});
|
|
49
50
|
}
|
|
50
|
-
return /*#__PURE__*/
|
|
51
|
-
value: serverConfig
|
|
52
|
-
|
|
51
|
+
return /*#__PURE__*/_jsx(ServerConfigContext.Provider, {
|
|
52
|
+
value: serverConfig,
|
|
53
|
+
children: children
|
|
54
|
+
});
|
|
53
55
|
}
|
|
54
56
|
export default ServerConfigBootstrap;
|
|
55
57
|
//# sourceMappingURL=ServerConfigBootstrap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerConfigBootstrap.js","names":["React","createContext","useEffect","useState","LoadingOverlay","useClient","getErrorMessage","ServerConfigContext","ServerConfigBootstrap","children","client","serverConfig","setServerConfig","error","setError","initServerConfigValues","isCanceled","loadServerConfigValues","newServerConfigValues","getServerConfigValues","Map","e","isLoading"],"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);\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) {\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() {\n try {\n const newServerConfigValues = await client.getServerConfigValues();\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 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;
|
|
1
|
+
{"version":3,"file":"ServerConfigBootstrap.js","names":["React","createContext","useEffect","useState","LoadingOverlay","useClient","getErrorMessage","ServerConfigContext","ServerConfigBootstrap","children","client","serverConfig","setServerConfig","error","setError","initServerConfigValues","isCanceled","loadServerConfigValues","newServerConfigValues","getServerConfigValues","Map","e","isLoading"],"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);\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) {\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() {\n try {\n const newServerConfigValues = await client.getServerConfigValues();\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 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;AAEnD,OAAO,IAAMC,mBAAmB,gBAAGN,aAAa,CAC9C,IAAI,CACL;AASD;AACA;AACA;AACA,OAAO,SAASO,qBAAqB,OAEN;EAAA,IAFO;IACpCC;EAC0B,CAAC;EAC3B,IAAMC,MAAM,GAAGL,SAAS,EAAE;EAC1B,IAAM,CAACM,YAAY,EAAEC,eAAe,CAAC,GAAGT,QAAQ,EAAuB;EACvE,IAAM,CAACU,KAAK,EAAEC,QAAQ,CAAC,GAAGX,QAAQ,EAAW;EAE7CD,SAAS,CACP,SAASa,sBAAsB,GAAG;IAChC,IAAIC,UAAU,GAAG,KAAK;IAAC,SACRC,sBAAsB;MAAA;IAAA;IAAA;MAAA,4CAArC,aAAwC;QACtC,IAAI;UACF,IAAMC,qBAAqB,SAASR,MAAM,CAACS,qBAAqB,EAAE;UAClE,IAAI,CAACH,UAAU,EAAE;YACfJ,eAAe,CAAC,IAAIQ,GAAG,CAACF,qBAAqB,CAAC,CAAC;UACjD;QACF,CAAC,CAAC,OAAOG,CAAC,EAAE;UACV,IAAI,CAACL,UAAU,EAAE;YACfF,QAAQ,CAACO,CAAC,CAAC;UACb;QACF;MACF,CAAC;MAAA;IAAA;IACDJ,sBAAsB,EAAE;IACxB,OAAO,MAAM;MACXD,UAAU,GAAG,IAAI;IACnB,CAAC;EACH,CAAC,EACD,CAACN,MAAM,CAAC,CACT;EAED,IAAMY,SAAS,GAAGX,YAAY,IAAI,IAAI;EAEtC,IAAIW,SAAS,IAAIT,KAAK,IAAI,IAAI,EAAE;IAC9B,oBACE,KAAC,cAAc;MACb,SAAS,EAAES,SAAS,IAAIT,KAAK,IAAI,IAAK;MACtC,YAAY,EAAEP,eAAe,CAACO,KAAK;IAAE,EACrC;EAEN;EAEA,oBACE,KAAC,mBAAmB,CAAC,QAAQ;IAAC,KAAK,EAAEF,YAAa;IAAA,UAC/CF;EAAQ,EACoB;AAEnC;AAEA,eAAeD,qBAAqB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
2
|
import { UserContext, UserOverrideContext, UserPermissionsOverrideContext, getUserFromConfig } from '@deephaven/auth-plugins';
|
|
3
3
|
import useServerConfig from "./useServerConfig.js";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
5
|
/**
|
|
5
6
|
* UserBootstrap component. Derives the UserContext from the ServerConfigContext, UserOverrideContext, and UserPermissionsOverrideContext.
|
|
6
7
|
*/
|
|
@@ -12,9 +13,10 @@ export function UserBootstrap(_ref) {
|
|
|
12
13
|
var overrides = useContext(UserOverrideContext);
|
|
13
14
|
var permissionsOverrides = useContext(UserPermissionsOverrideContext);
|
|
14
15
|
var user = getUserFromConfig(serverConfig, overrides, permissionsOverrides);
|
|
15
|
-
return /*#__PURE__*/
|
|
16
|
-
value: user
|
|
17
|
-
|
|
16
|
+
return /*#__PURE__*/_jsx(UserContext.Provider, {
|
|
17
|
+
value: user,
|
|
18
|
+
children: children
|
|
19
|
+
});
|
|
18
20
|
}
|
|
19
21
|
export default UserBootstrap;
|
|
20
22
|
//# sourceMappingURL=UserBootstrap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserBootstrap.js","names":["React","useContext","UserContext","UserOverrideContext","UserPermissionsOverrideContext","getUserFromConfig","useServerConfig","UserBootstrap","children","serverConfig","overrides","permissionsOverrides","user"],"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) {\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;AAOtB;AACA;AACA;AACA,OAAO,SAASC,aAAa,OAAmC;EAAA,IAAlC;IAAEC;EAA6B,CAAC;EAC5D,IAAMC,YAAY,GAAGH,eAAe,EAAE;EACtC,IAAMI,SAAS,GAAGT,UAAU,CAACE,mBAAmB,CAAC;EACjD,IAAMQ,oBAAoB,GAAGV,UAAU,CAACG,8BAA8B,CAAC;EACvE,IAAMQ,IAAI,GAAGP,iBAAiB,CAACI,YAAY,EAAEC,SAAS,EAAEC,oBAAoB,CAAC;EAC7E,oBAAO,
|
|
1
|
+
{"version":3,"file":"UserBootstrap.js","names":["React","useContext","UserContext","UserOverrideContext","UserPermissionsOverrideContext","getUserFromConfig","useServerConfig","UserBootstrap","children","serverConfig","overrides","permissionsOverrides","user"],"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) {\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;AAOtB;AACA;AACA;AACA,OAAO,SAASC,aAAa,OAAmC;EAAA,IAAlC;IAAEC;EAA6B,CAAC;EAC5D,IAAMC,YAAY,GAAGH,eAAe,EAAE;EACtC,IAAMI,SAAS,GAAGT,UAAU,CAACE,mBAAmB,CAAC;EACjD,IAAMQ,oBAAoB,GAAGV,UAAU,CAACG,8BAA8B,CAAC;EACvE,IAAMQ,IAAI,GAAGP,iBAAiB,CAACI,YAAY,EAAEC,SAAS,EAAEC,oBAAoB,CAAC;EAC7E,oBAAO,KAAC,WAAW,CAAC,QAAQ;IAAC,KAAK,EAAEC,IAAK;IAAA,UAAEJ;EAAQ,EAAwB;AAC7E;AAEA,eAAeD,aAAa"}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
2
2
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
3
|
-
function
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
7
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
8
|
import React from 'react';
|
|
5
9
|
import { isAuthPlugin } from '@deephaven/auth-plugins';
|
|
6
10
|
import Log from '@deephaven/log';
|
|
7
11
|
import RemoteComponent from "./RemoteComponent.js";
|
|
8
12
|
import loadRemoteModule from "./loadRemoteModule.js";
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
14
|
var log = Log.module('@deephaven/app-utils.PluginUtils');
|
|
10
15
|
|
|
11
16
|
// A PluginModule. This interface should have new fields added to it from different levels of plugins.
|
|
@@ -20,7 +25,7 @@ var log = Log.module('@deephaven/app-utils.PluginUtils');
|
|
|
20
25
|
export function loadComponentPlugin(baseURL, pluginName) {
|
|
21
26
|
var pluginUrl = new URL("".concat(pluginName, ".js"), baseURL);
|
|
22
27
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
23
|
-
var Plugin = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/
|
|
28
|
+
var Plugin = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/_jsx(RemoteComponent, {
|
|
24
29
|
url: pluginUrl.href
|
|
25
30
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
26
31
|
,
|
|
@@ -32,12 +37,13 @@ export function loadComponentPlugin(baseURL, pluginName) {
|
|
|
32
37
|
if (err != null && err !== '') {
|
|
33
38
|
var errorMessage = "Error loading plugin ".concat(pluginName, " from ").concat(pluginUrl, " due to ").concat(err);
|
|
34
39
|
log.error(errorMessage);
|
|
35
|
-
return /*#__PURE__*/
|
|
36
|
-
className: "error-message"
|
|
37
|
-
|
|
40
|
+
return /*#__PURE__*/_jsx("div", {
|
|
41
|
+
className: "error-message",
|
|
42
|
+
children: "".concat(errorMessage)
|
|
43
|
+
});
|
|
38
44
|
}
|
|
39
45
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
40
|
-
return /*#__PURE__*/
|
|
46
|
+
return /*#__PURE__*/_jsx(Component, _objectSpread({
|
|
41
47
|
ref: ref
|
|
42
48
|
}, props));
|
|
43
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginUtils.js","names":["React","isAuthPlugin","Log","RemoteComponent","loadRemoteModule","log","module","loadComponentPlugin","baseURL","pluginName","pluginUrl","URL","Plugin","forwardRef","props","ref","href","err","Component","errorMessage","error","displayName","loadModulePlugin","myModule","loadJson","jsonUrl","res","fetch","ok","Error","statusText","json","loadModulePlugins","modulePluginsUrl","debug","manifest","Array","isArray","plugins","pluginPromises","i","length","name","main","pluginMainUrl","push","pluginModules","Promise","allSettled","pluginMap","Map","status","set","value","reason","info","e","getAuthHandlers","authConfigValues","get","split","getAuthPluginComponent","corePlugins","authHandlers","authPlugins","entries","filter","plugin","AuthPlugin","map","availableAuthPlugins","authPlugin","isAvailable","warn","join","loginPluginName","NewLoginPlugin"],"sources":["../../src/plugins/PluginUtils.tsx"],"sourcesContent":["import React, { ForwardRefExoticComponent } from 'react';\nimport {\n AuthPlugin,\n AuthPluginComponent,\n isAuthPlugin,\n} from '@deephaven/auth-plugins';\nimport Log from '@deephaven/log';\nimport RemoteComponent from './RemoteComponent';\nimport loadRemoteModule from './loadRemoteModule';\n\nconst log = Log.module('@deephaven/app-utils.PluginUtils');\n\n// A PluginModule. This interface should have new fields added to it from different levels of plugins.\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface PluginModule {}\n\nexport type PluginModuleMap = Map<string, PluginModule>;\n\nexport type PluginManifestPluginInfo = {\n name: string;\n main: string;\n version: string;\n};\n\nexport type PluginManifest = { plugins: PluginManifestPluginInfo[] };\n\n/**\n * Load a component plugin from the server.\n * @param baseURL Base URL of the plugin server\n * @param pluginName Name of the component plugin to load\n * @returns A lazily loaded JSX.Element from the plugin\n */\nexport function loadComponentPlugin(\n baseURL: URL,\n pluginName: string\n): ForwardRefExoticComponent<React.RefAttributes<unknown>> {\n const pluginUrl = new URL(`${pluginName}.js`, baseURL);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const Plugin: any = React.forwardRef((props, ref) => (\n <RemoteComponent\n url={pluginUrl.href}\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n render={({ err, Component }: { err: unknown; Component: any }) => {\n if (err != null && err !== '') {\n const errorMessage = `Error loading plugin ${pluginName} from ${pluginUrl} due to ${err}`;\n log.error(errorMessage);\n return <div className=\"error-message\">{`${errorMessage}`}</div>;\n }\n // eslint-disable-next-line react/jsx-props-no-spreading\n return <Component ref={ref} {...props} />;\n }}\n />\n ));\n Plugin.pluginName = pluginName;\n Plugin.displayName = 'Plugin';\n return Plugin;\n}\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<PluginModule> {\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\n/**\n * Load all plugin modules available.\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<PluginModule>[] = [];\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 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 } = manifest.plugins[i];\n if (module.status === 'fulfilled') {\n pluginMap.set(name, module.value);\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?: Map<string, AuthPlugin>\n): AuthPluginComponent {\n const authHandlers = getAuthHandlers(authConfigValues);\n // Filter out all the plugins that are auth plugins, and then map them to [pluginName, AuthPlugin] pairs\n // Uses some pretty disgusting casting, because TypeScript wants to treat it as an (string | AuthPlugin)[] array instead\n const authPlugins = (\n [...pluginMap.entries()].filter(\n ([, plugin]: [string, { AuthPlugin?: AuthPlugin }]) =>\n isAuthPlugin(plugin.AuthPlugin)\n ) as [string, { AuthPlugin: AuthPlugin }][]\n ).map(([name, plugin]) => [name, plugin.AuthPlugin]) as [\n string,\n AuthPlugin,\n ][];\n\n // Add all the core plugins in priority\n authPlugins.push(...(corePlugins ?? []));\n\n // Filter the available auth plugins\n\n const availableAuthPlugins = authPlugins.filter(([name, authPlugin]) =>\n authPlugin.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 [loginPluginName, NewLoginPlugin] = availableAuthPlugins[0];\n log.info('Using LoginPlugin', loginPluginName);\n\n return NewLoginPlugin.Component;\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAqC,OAAO;AACxD,SAGEC,YAAY,QACP,yBAAyB;AAChC,OAAOC,GAAG,MAAM,gBAAgB;AAAC,OAC1BC,eAAe;AAAA,OACfC,gBAAgB;AAEvB,IAAMC,GAAG,GAAGH,GAAG,CAACI,MAAM,CAAC,kCAAkC,CAAC;;AAE1D;AACA;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,mBAAmB,CACjCC,OAAY,EACZC,UAAkB,EACuC;EACzD,IAAMC,SAAS,GAAG,IAAIC,GAAG,WAAIF,UAAU,UAAOD,OAAO,CAAC;EACtD;EACA,IAAMI,MAAW,gBAAGZ,KAAK,CAACa,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,kBAC9C,oBAAC,eAAe;IACd,GAAG,EAAEL,SAAS,CAACM;IACf;IAAA;IACA,MAAM,EAAE,QAA0D;MAAA,IAAzD;QAAEC,GAAG;QAAEC;MAA4C,CAAC;MAC3D,IAAID,GAAG,IAAI,IAAI,IAAIA,GAAG,KAAK,EAAE,EAAE;QAC7B,IAAME,YAAY,kCAA2BV,UAAU,mBAASC,SAAS,qBAAWO,GAAG,CAAE;QACzFZ,GAAG,CAACe,KAAK,CAACD,YAAY,CAAC;QACvB,oBAAO;UAAK,SAAS,EAAC;QAAe,aAAKA,YAAY,EAAS;MACjE;MACA;MACA,oBAAO,oBAAC,SAAS;QAAC,GAAG,EAAEJ;MAAI,GAAKD,KAAK,EAAI;IAC3C;EAAE,EAEL,CAAC;EACFF,MAAM,CAACH,UAAU,GAAGA,UAAU;EAC9B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AAI,CAAC,mBAAmB,EAAEoB,eAAe,CAAC;EAE9C,OAAOC,cAAc,CAAC1D,SAAS;AACjC"}
|
|
1
|
+
{"version":3,"file":"PluginUtils.js","names":["React","isAuthPlugin","Log","RemoteComponent","loadRemoteModule","log","module","loadComponentPlugin","baseURL","pluginName","pluginUrl","URL","Plugin","forwardRef","props","ref","href","err","Component","errorMessage","error","displayName","loadModulePlugin","myModule","loadJson","jsonUrl","res","fetch","ok","Error","statusText","json","loadModulePlugins","modulePluginsUrl","debug","manifest","Array","isArray","plugins","pluginPromises","i","length","name","main","pluginMainUrl","push","pluginModules","Promise","allSettled","pluginMap","Map","status","set","value","reason","info","e","getAuthHandlers","authConfigValues","get","split","getAuthPluginComponent","corePlugins","authHandlers","authPlugins","entries","filter","plugin","AuthPlugin","map","availableAuthPlugins","authPlugin","isAvailable","warn","join","loginPluginName","NewLoginPlugin"],"sources":["../../src/plugins/PluginUtils.tsx"],"sourcesContent":["import React, { ForwardRefExoticComponent } from 'react';\nimport {\n AuthPlugin,\n AuthPluginComponent,\n isAuthPlugin,\n} from '@deephaven/auth-plugins';\nimport Log from '@deephaven/log';\nimport RemoteComponent from './RemoteComponent';\nimport loadRemoteModule from './loadRemoteModule';\n\nconst log = Log.module('@deephaven/app-utils.PluginUtils');\n\n// A PluginModule. This interface should have new fields added to it from different levels of plugins.\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface PluginModule {}\n\nexport type PluginModuleMap = Map<string, PluginModule>;\n\nexport type PluginManifestPluginInfo = {\n name: string;\n main: string;\n version: string;\n};\n\nexport type PluginManifest = { plugins: PluginManifestPluginInfo[] };\n\n/**\n * Load a component plugin from the server.\n * @param baseURL Base URL of the plugin server\n * @param pluginName Name of the component plugin to load\n * @returns A lazily loaded JSX.Element from the plugin\n */\nexport function loadComponentPlugin(\n baseURL: URL,\n pluginName: string\n): ForwardRefExoticComponent<React.RefAttributes<unknown>> {\n const pluginUrl = new URL(`${pluginName}.js`, baseURL);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const Plugin: any = React.forwardRef((props, ref) => (\n <RemoteComponent\n url={pluginUrl.href}\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n render={({ err, Component }: { err: unknown; Component: any }) => {\n if (err != null && err !== '') {\n const errorMessage = `Error loading plugin ${pluginName} from ${pluginUrl} due to ${err}`;\n log.error(errorMessage);\n return <div className=\"error-message\">{`${errorMessage}`}</div>;\n }\n // eslint-disable-next-line react/jsx-props-no-spreading\n return <Component ref={ref} {...props} />;\n }}\n />\n ));\n Plugin.pluginName = pluginName;\n Plugin.displayName = 'Plugin';\n return Plugin;\n}\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<PluginModule> {\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\n/**\n * Load all plugin modules available.\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<PluginModule>[] = [];\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 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 } = manifest.plugins[i];\n if (module.status === 'fulfilled') {\n pluginMap.set(name, module.value);\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?: Map<string, AuthPlugin>\n): AuthPluginComponent {\n const authHandlers = getAuthHandlers(authConfigValues);\n // Filter out all the plugins that are auth plugins, and then map them to [pluginName, AuthPlugin] pairs\n // Uses some pretty disgusting casting, because TypeScript wants to treat it as an (string | AuthPlugin)[] array instead\n const authPlugins = (\n [...pluginMap.entries()].filter(\n ([, plugin]: [string, { AuthPlugin?: AuthPlugin }]) =>\n isAuthPlugin(plugin.AuthPlugin)\n ) as [string, { AuthPlugin: AuthPlugin }][]\n ).map(([name, plugin]) => [name, plugin.AuthPlugin]) as [\n string,\n AuthPlugin,\n ][];\n\n // Add all the core plugins in priority\n authPlugins.push(...(corePlugins ?? []));\n\n // Filter the available auth plugins\n\n const availableAuthPlugins = authPlugins.filter(([name, authPlugin]) =>\n authPlugin.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 [loginPluginName, NewLoginPlugin] = availableAuthPlugins[0];\n log.info('Using LoginPlugin', loginPluginName);\n\n return NewLoginPlugin.Component;\n}\n"],"mappings":";;;;;;;AAAA,OAAOA,KAAK,MAAqC,OAAO;AACxD,SAGEC,YAAY,QACP,yBAAyB;AAChC,OAAOC,GAAG,MAAM,gBAAgB;AAAC,OAC1BC,eAAe;AAAA,OACfC,gBAAgB;AAAA;AAEvB,IAAMC,GAAG,GAAGH,GAAG,CAACI,MAAM,CAAC,kCAAkC,CAAC;;AAE1D;AACA;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,mBAAmB,CACjCC,OAAY,EACZC,UAAkB,EACuC;EACzD,IAAMC,SAAS,GAAG,IAAIC,GAAG,WAAIF,UAAU,UAAOD,OAAO,CAAC;EACtD;EACA,IAAMI,MAAW,gBAAGZ,KAAK,CAACa,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,kBAC9C,KAAC,eAAe;IACd,GAAG,EAAEL,SAAS,CAACM;IACf;IAAA;IACA,MAAM,EAAE,QAA0D;MAAA,IAAzD;QAAEC,GAAG;QAAEC;MAA4C,CAAC;MAC3D,IAAID,GAAG,IAAI,IAAI,IAAIA,GAAG,KAAK,EAAE,EAAE;QAC7B,IAAME,YAAY,kCAA2BV,UAAU,mBAASC,SAAS,qBAAWO,GAAG,CAAE;QACzFZ,GAAG,CAACe,KAAK,CAACD,YAAY,CAAC;QACvB,oBAAO;UAAK,SAAS,EAAC,eAAe;UAAA,oBAAKA,YAAY;QAAA,EAAS;MACjE;MACA;MACA,oBAAO,KAAC,SAAS;QAAC,GAAG,EAAEJ;MAAI,GAAKD,KAAK,EAAI;IAC3C;EAAE,EAEL,CAAC;EACFF,MAAM,CAACH,UAAU,GAAGA,UAAU;EAC9BG,MAAM,CAACS,WAAW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EAAEoB,eAAe,CAAC;EAE9C,OAAOC,cAAc,CAAC1D,SAAS;AACjC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deephaven/app-utils",
|
|
3
|
-
"version": "0.46.1-beta.
|
|
3
|
+
"version": "0.46.1-beta.4+6ff27a67",
|
|
4
4
|
"description": "Deephaven App Utils",
|
|
5
5
|
"author": "Deephaven Data Labs LLC",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,15 +28,15 @@
|
|
|
28
28
|
"redux": "^4.x"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@deephaven/auth-plugins": "^0.46.1-beta.
|
|
32
|
-
"@deephaven/components": "^0.46.1-beta.
|
|
33
|
-
"@deephaven/jsapi-bootstrap": "^0.46.1-beta.
|
|
34
|
-
"@deephaven/jsapi-components": "^0.46.1-beta.
|
|
35
|
-
"@deephaven/jsapi-types": "^0.46.1-beta.
|
|
36
|
-
"@deephaven/jsapi-utils": "^0.46.1-beta.
|
|
37
|
-
"@deephaven/log": "^0.46.1-beta.
|
|
38
|
-
"@deephaven/react-hooks": "^0.46.1-beta.
|
|
39
|
-
"@deephaven/utils": "^0.46.1-beta.
|
|
31
|
+
"@deephaven/auth-plugins": "^0.46.1-beta.4+6ff27a67",
|
|
32
|
+
"@deephaven/components": "^0.46.1-beta.4+6ff27a67",
|
|
33
|
+
"@deephaven/jsapi-bootstrap": "^0.46.1-beta.4+6ff27a67",
|
|
34
|
+
"@deephaven/jsapi-components": "^0.46.1-beta.4+6ff27a67",
|
|
35
|
+
"@deephaven/jsapi-types": "^0.46.1-beta.4+6ff27a67",
|
|
36
|
+
"@deephaven/jsapi-utils": "^0.46.1-beta.4+6ff27a67",
|
|
37
|
+
"@deephaven/log": "^0.46.1-beta.4+6ff27a67",
|
|
38
|
+
"@deephaven/react-hooks": "^0.46.1-beta.4+6ff27a67",
|
|
39
|
+
"@deephaven/utils": "^0.46.1-beta.4+6ff27a67",
|
|
40
40
|
"@paciolan/remote-component": "2.13.0",
|
|
41
41
|
"@paciolan/remote-module-loader": "^3.0.2",
|
|
42
42
|
"fira": "mozilla/fira#4.202"
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"publishConfig": {
|
|
57
57
|
"access": "public"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "6ff27a67fded2d6a7affe5ec8480faf01ff1af00"
|
|
60
60
|
}
|