@deephaven/app-utils 0.48.1-beta.0 → 0.48.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.
Files changed (32) hide show
  1. package/dist/components/AppBootstrap.d.ts.map +1 -1
  2. package/dist/components/AppBootstrap.js.map +1 -1
  3. package/dist/components/AuthBootstrap.d.ts.map +1 -1
  4. package/dist/components/AuthBootstrap.js.map +1 -1
  5. package/dist/components/ConnectionBootstrap.d.ts +1 -1
  6. package/dist/components/ConnectionBootstrap.d.ts.map +1 -1
  7. package/dist/components/ConnectionBootstrap.js.map +1 -1
  8. package/dist/components/FontBootstrap.d.ts.map +1 -1
  9. package/dist/components/FontBootstrap.js.map +1 -1
  10. package/dist/components/FontsLoaded.d.ts.map +1 -1
  11. package/dist/components/FontsLoaded.js.map +1 -1
  12. package/dist/components/LoginNotifier.d.ts +2 -1
  13. package/dist/components/LoginNotifier.d.ts.map +1 -1
  14. package/dist/components/LoginNotifier.js.map +1 -1
  15. package/dist/components/PluginsBootstrap.d.ts.map +1 -1
  16. package/dist/components/PluginsBootstrap.js.map +1 -1
  17. package/dist/components/ServerConfigBootstrap.d.ts.map +1 -1
  18. package/dist/components/ServerConfigBootstrap.js.map +1 -1
  19. package/dist/components/UserBootstrap.d.ts.map +1 -1
  20. package/dist/components/UserBootstrap.js.map +1 -1
  21. package/dist/components/useConnection.d.ts +2 -1
  22. package/dist/components/useConnection.d.ts.map +1 -1
  23. package/dist/components/useConnection.js.map +1 -1
  24. package/dist/components/usePlugins.d.ts +2 -1
  25. package/dist/components/usePlugins.d.ts.map +1 -1
  26. package/dist/components/usePlugins.js.map +1 -1
  27. package/dist/components/useServerConfig.d.ts.map +1 -1
  28. package/dist/components/useServerConfig.js.map +1 -1
  29. package/dist/components/useUser.d.ts +2 -1
  30. package/dist/components/useUser.d.ts.map +1 -1
  31. package/dist/components/useUser.js.map +1 -1
  32. package/package.json +13 -12
@@ -1 +1 @@
1
- {"version":3,"file":"AppBootstrap.d.ts","sourceRoot":"","sources":["../../src/components/AppBootstrap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAC9D,OAAO,gDAAgD,CAAC;AAexD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,yBAAyB;IACzB,SAAS,EAAE,MAAM,CAAC;IAElB,kCAAkC;IAClC,UAAU,EAAE,MAAM,CAAC;IAEnB,gCAAgC;IAChC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAE1B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAC3B,cAAc,EACd,UAAU,EACV,SAAS,EACT,QAAQ,GACT,EAAE,iBAAiB,eAiCnB;AAED,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"AppBootstrap.d.ts","sourceRoot":"","sources":["../../src/components/AppBootstrap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAC9D,OAAO,gDAAgD,CAAC;AAexD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,yBAAyB;IACzB,SAAS,EAAE,MAAM,CAAC;IAElB,kCAAkC;IAClC,UAAU,EAAE,MAAM,CAAC;IAEnB,gCAAgC;IAChC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAE1B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAC3B,cAAc,EACd,UAAU,EACV,SAAS,EACT,QAAQ,GACT,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAiCjC;AAED,eAAe,YAAY,CAAC"}
@@ -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;AAAA;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,KAAC,aAAa;IAAC,cAAc,EAAET,cAAe;IAAA,uBAC5C,KAAC,gBAAgB;MAAC,UAAU,EAAEC,UAAW;MAAA,uBACvC,KAAC,eAAe;QACd,SAAS,EAAEC,SAAU;QACrB,OAAO,EAAEE,aAAc;QAAA,uBAGvB,KAAC,qBAAqB;UAAA,uBACpB,KAAC,aAAa;YAAA,uBACZ,KAAC,qBAAqB;cAAA,uBACpB,KAAC,aAAa;gBAAA,uBACZ,KAAC,mBAAmB;kBAAA,uBAClB,KAAC,WAAW;oBAAA,UAAED;kBAAQ;gBAAe;cACjB;YACR;UACM;QACV;MACM,GAZnBE,WAAW;IAaA;EACD,EACL;AAEpB;AAEA,eAAeN,YAAY"}
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): 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 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;AAAA;AAkB5B;AACA;AACA;AACA;AACA,OAAO,SAASC,YAAY,OAKO;EAAA,IALN;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,KAAC,aAAa;IAAC,cAAc,EAAET,cAAe;IAAA,uBAC5C,KAAC,gBAAgB;MAAC,UAAU,EAAEC,UAAW;MAAA,uBACvC,KAAC,eAAe;QACd,SAAS,EAAEC,SAAU;QACrB,OAAO,EAAEE,aAAc;QAAA,uBAGvB,KAAC,qBAAqB;UAAA,uBACpB,KAAC,aAAa;YAAA,uBACZ,KAAC,qBAAqB;cAAA,uBACpB,KAAC,aAAa;gBAAA,uBACZ,KAAC,mBAAmB;kBAAA,uBAClB,KAAC,WAAW;oBAAA,UAAED;kBAAQ;gBAAe;cACjB;YACR;UACM;QACV;MACM,GAZnBE,WAAW;IAaA;EACD,EACL;AAEpB;AAEA,eAAeN,YAAY"}
@@ -1 +1 @@
1
- {"version":3,"file":"AuthBootstrap.d.ts","sourceRoot":"","sources":["../../src/components/AuthBootstrap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAcxE,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAeF;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,kBAAkB,eA6D7D;AAED,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"AuthBootstrap.d.ts","sourceRoot":"","sources":["../../src/components/AuthBootstrap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAcxE,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAeF;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CA6D3E;AAED,eAAe,aAAa,CAAC"}
@@ -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","AuthPlugin","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 [\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) {\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,CACE,0CAA0C,EAC1C;EAAEC,UAAU,EAAEV;AAAiB,CAAC,CACjC,EACD,CAAC,uCAAuC,EAAE;EAAEU,UAAU,EAAET;AAAc,CAAC,CAAC,EACxE,CACE,6CAA6C,EAC7C;EAAES,UAAU,EAAEX;AAAoB,CAAC,CACpC,CACF,CAAC;;AAEF;AACA;AACA;AACA,OAAO,SAASY,aAAa,OAAmC;EAAA,IAAlC;IAAEC;EAA6B,CAAC;EAC5D,IAAMC,MAAM,GAAGV,SAAS,EAAE;EAC1B;EACA;EACA,IAAMW,OAAO,GAAGnB,UAAU,CAACU,cAAc,CAAC;EAC1C,IAAM,CAACU,UAAU,EAAEC,aAAa,CAAC,GAAGlB,QAAQ,EAAiB;EAC7D,IAAM,CAACmB,KAAK,EAAEC,QAAQ,CAAC,GAAGpB,QAAQ,EAAW;EAE7CF,SAAS,CACP,SAASuB,oBAAoB,GAAG;IAC9B,IAAIC,UAAU,GAAG,KAAK;IAAC,SACRC,oBAAoB;MAAA;IAAA;IAAA;MAAA,0CAAnC,aAAsC;QACpC,IAAI;UACF,IAAMC,mBAAmB,SAAST,MAAM,CAACU,mBAAmB,EAAE;UAC9D,IAAI,CAACH,UAAU,EAAE;YACfJ,aAAa,CAAC,IAAIP,GAAG,CAACa,mBAAmB,CAAC,CAAC;UAC7C;QACF,CAAC,CAAC,OAAOE,CAAC,EAAE;UACV,IAAI,CAACJ,UAAU,EAAE;YACfF,QAAQ,CAACM,CAAC,CAAC;UACb;QACF;MACF,CAAC;MAAA;IAAA;IACDH,oBAAoB,EAAE;IACtB,OAAO,MAAM;MACXD,UAAU,GAAG,IAAI;IACnB,CAAC;EACH,CAAC,EACD,CAACP,MAAM,CAAC,CACT;EAED,IAAMY,aAAa,GAAG5B,OAAO,CAAC,MAAM;IAClC,IAAIiB,OAAO,IAAI,IAAI,IAAIC,UAAU,IAAI,IAAI,EAAE;MACzC,OAAOW,SAAS;IAClB;IAEA,IAAI;MACF,OAAOpB,sBAAsB,CAACQ,OAAO,EAAEC,UAAU,EAAEP,iBAAiB,CAAC;IACvE,CAAC,CAAC,OAAOgB,CAAC,EAAE;MACVN,QAAQ,CAACM,CAAC,CAAC;IACb;EACF,CAAC,EAAE,CAACT,UAAU,EAAED,OAAO,CAAC,CAAC;EAEzB,IAAMa,SAAS,GAAGF,aAAa,IAAI,IAAI,IAAIV,UAAU,IAAI,IAAI;EAE7D,IAAIY,SAAS,IAAIV,KAAK,IAAI,IAAI,EAAE;IAC9B,oBACE,KAAC,cAAc;MACb,SAAS,EAAEU,SAAS,IAAIV,KAAK,IAAI,IAAK;MACtC,YAAY,EAAEb,eAAe,CAACa,KAAK;IAAE,EACrC;EAEN;EACA,oBACE,KAAC,aAAa;IAAC,gBAAgB,EAAEF,UAAW;IAAA,uBAC1C;MAAA,wBACE,KAAC,aAAa,KAAG,EAChBH,QAAQ;IAAA;EACR,EACW;AAEpB;AAEA,eAAeD,aAAa"}
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","AuthPlugin","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 [\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();\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,CACE,0CAA0C,EAC1C;EAAEC,UAAU,EAAEV;AAAiB,CAAC,CACjC,EACD,CAAC,uCAAuC,EAAE;EAAEU,UAAU,EAAET;AAAc,CAAC,CAAC,EACxE,CACE,6CAA6C,EAC7C;EAAES,UAAU,EAAEX;AAAoB,CAAC,CACpC,CACF,CAAC;;AAEF;AACA;AACA;AACA,OAAO,SAASY,aAAa,OAAgD;EAAA,IAA/C;IAAEC;EAA6B,CAAC;EAC5D,IAAMC,MAAM,GAAGV,SAAS,EAAE;EAC1B;EACA;EACA,IAAMW,OAAO,GAAGnB,UAAU,CAACU,cAAc,CAAC;EAC1C,IAAM,CAACU,UAAU,EAAEC,aAAa,CAAC,GAAGlB,QAAQ,EAAiB;EAC7D,IAAM,CAACmB,KAAK,EAAEC,QAAQ,CAAC,GAAGpB,QAAQ,EAAW;EAE7CF,SAAS,CACP,SAASuB,oBAAoB,GAAG;IAC9B,IAAIC,UAAU,GAAG,KAAK;IAAC,SACRC,oBAAoB;MAAA;IAAA;IAAA;MAAA,0CAAnC,aAAqD;QACnD,IAAI;UACF,IAAMC,mBAAmB,SAAST,MAAM,CAACU,mBAAmB,EAAE;UAC9D,IAAI,CAACH,UAAU,EAAE;YACfJ,aAAa,CAAC,IAAIP,GAAG,CAACa,mBAAmB,CAAC,CAAC;UAC7C;QACF,CAAC,CAAC,OAAOE,CAAC,EAAE;UACV,IAAI,CAACJ,UAAU,EAAE;YACfF,QAAQ,CAACM,CAAC,CAAC;UACb;QACF;MACF,CAAC;MAAA;IAAA;IACDH,oBAAoB,EAAE;IACtB,OAAO,MAAM;MACXD,UAAU,GAAG,IAAI;IACnB,CAAC;EACH,CAAC,EACD,CAACP,MAAM,CAAC,CACT;EAED,IAAMY,aAAa,GAAG5B,OAAO,CAAC,MAAM;IAClC,IAAIiB,OAAO,IAAI,IAAI,IAAIC,UAAU,IAAI,IAAI,EAAE;MACzC,OAAOW,SAAS;IAClB;IAEA,IAAI;MACF,OAAOpB,sBAAsB,CAACQ,OAAO,EAAEC,UAAU,EAAEP,iBAAiB,CAAC;IACvE,CAAC,CAAC,OAAOgB,CAAC,EAAE;MACVN,QAAQ,CAACM,CAAC,CAAC;IACb;EACF,CAAC,EAAE,CAACT,UAAU,EAAED,OAAO,CAAC,CAAC;EAEzB,IAAMa,SAAS,GAAGF,aAAa,IAAI,IAAI,IAAIV,UAAU,IAAI,IAAI;EAE7D,IAAIY,SAAS,IAAIV,KAAK,IAAI,IAAI,EAAE;IAC9B,oBACE,KAAC,cAAc;MACb,SAAS,EAAEU,SAAS,IAAIV,KAAK,IAAI,IAAK;MACtC,YAAY,EAAEb,eAAe,CAACa,KAAK;IAAE,EACrC;EAEN;EACA,oBACE,KAAC,aAAa;IAAC,gBAAgB,EAAEF,UAAW;IAAA,uBAC1C;MAAA,wBACE,KAAC,aAAa,KAAG,EAChBH,QAAQ;IAAA;EACR,EACW;AAEpB;AAEA,eAAeD,aAAa"}
@@ -11,6 +11,6 @@ export type ConnectionBootstrapProps = {
11
11
  /**
12
12
  * ConnectionBootstrap component. Handles initializing the connection.
13
13
  */
14
- export declare function ConnectionBootstrap({ children }: ConnectionBootstrapProps): JSX.Element;
14
+ export declare function ConnectionBootstrap({ children, }: ConnectionBootstrapProps): JSX.Element;
15
15
  export default ConnectionBootstrap;
16
16
  //# sourceMappingURL=ConnectionBootstrap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectionBootstrap.d.ts","sourceRoot":"","sources":["../../src/components/ConnectionBootstrap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAGlE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAK5D,eAAO,MAAM,iBAAiB,qCAA4C,CAAC;AAE3E,MAAM,MAAM,wBAAwB,GAAG;IACrC;;;OAGG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,EAAE,wBAAwB,eAgEzE;AAED,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"ConnectionBootstrap.d.ts","sourceRoot":"","sources":["../../src/components/ConnectionBootstrap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAGlE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAK5D,eAAO,MAAM,iBAAiB,qCAA4C,CAAC;AAE3E,MAAM,MAAM,wBAAwB,GAAG;IACrC;;;OAGG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,GACT,EAAE,wBAAwB,GAAG,GAAG,CAAC,OAAO,CAgExC;AAED,eAAe,mBAAmB,CAAC"}
@@ -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;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;UACvD,IAAIH,UAAU,EAAE;YACd;UACF;UACAF,aAAa,CAACI,aAAa,CAAC;QAC9B,CAAC,CAAC,OAAOE,CAAC,EAAE;UACV,IAAIJ,UAAU,EAAE;YACd;UACF;UACAJ,QAAQ,CAACQ,CAAC,CAAC;QACb;MACF,CAAC;MAAA;IAAA;IACDH,cAAc,EAAE;IAChB,OAAO,MAAM;MACXD,UAAU,GAAG,IAAI;IACnB,CAAC;EACH,CAAC,EACD,CAACP,GAAG,EAAEC,MAAM,CAAC,CACd;EAEDZ,SAAS,CACP,SAASuB,iBAAiB,GAAG;IAC3B,IAAIR,UAAU,IAAI,IAAI,EAAE;IAExB,SAASS,cAAc,CAACC,KAAkB,EAAE;MAC1C,IAAM;QAAEC;MAAO,CAAC,GAAGD,KAAK;MACxBnB,GAAG,CAACqB,IAAI,CAAC,UAAU,YAAKC,IAAI,CAACC,SAAS,CAACH,MAAM,CAAC,EAAG;MACjDZ,QAAQ,4BAAqBY,MAAM,aAANA,MAAM,cAANA,MAAM,GAAI,gBAAgB,EAAG;IAC5D;IAEA,IAAMI,SAAS,GAAGf,UAAU,CAACgB,gBAAgB,CAC3CpB,GAAG,CAACqB,aAAa,CAACC,cAAc,EAChCT,cAAc,CACf;IACD,OAAOM,SAAS;EAClB,CAAC,EACD,CAACnB,GAAG,EAAEI,UAAU,CAAC,CAClB;EAED,IAAIA,UAAU,IAAI,IAAI,IAAIF,KAAK,IAAI,IAAI,EAAE;IACvC,oBACE,KAAC,cAAc;MACb,eAAY,8BAA8B;MAC1C,SAAS,EAAEE,UAAU,IAAI,IAAK;MAC9B,YAAY,EAAEF,KAAK,IAAI,IAAI,aAAMA,KAAK,IAAKqB;IAAU,EACrD;EAEN;EAEA,oBACE,KAAC,iBAAiB,CAAC,QAAQ;IAAC,KAAK,EAAEnB,UAAW;IAAA,UAC3CL;EAAQ,EACkB;AAEjC;AAEA,eAAeD,mBAAmB"}
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({\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<IdeConnection>();\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 } 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): void {\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,OAEO;EAAA,IAFN;IAClCC;EACwB,CAAC;EACzB,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,aAA+C;QAC7C,IAAI;UACF,IAAMC,aAAa,SAASR,MAAM,CAACS,kBAAkB,EAAE;UACvD,IAAIH,UAAU,EAAE;YACd;UACF;UACAF,aAAa,CAACI,aAAa,CAAC;QAC9B,CAAC,CAAC,OAAOE,CAAC,EAAE;UACV,IAAIJ,UAAU,EAAE;YACd;UACF;UACAJ,QAAQ,CAACQ,CAAC,CAAC;QACb;MACF,CAAC;MAAA;IAAA;IACDH,cAAc,EAAE;IAChB,OAAO,MAAM;MACXD,UAAU,GAAG,IAAI;IACnB,CAAC;EACH,CAAC,EACD,CAACP,GAAG,EAAEC,MAAM,CAAC,CACd;EAEDZ,SAAS,CACP,SAASuB,iBAAiB,GAAG;IAC3B,IAAIR,UAAU,IAAI,IAAI,EAAE;IAExB,SAASS,cAAc,CAACC,KAAkB,EAAQ;MAChD,IAAM;QAAEC;MAAO,CAAC,GAAGD,KAAK;MACxBnB,GAAG,CAACqB,IAAI,CAAC,UAAU,YAAKC,IAAI,CAACC,SAAS,CAACH,MAAM,CAAC,EAAG;MACjDZ,QAAQ,4BAAqBY,MAAM,aAANA,MAAM,cAANA,MAAM,GAAI,gBAAgB,EAAG;IAC5D;IAEA,IAAMI,SAAS,GAAGf,UAAU,CAACgB,gBAAgB,CAC3CpB,GAAG,CAACqB,aAAa,CAACC,cAAc,EAChCT,cAAc,CACf;IACD,OAAOM,SAAS;EAClB,CAAC,EACD,CAACnB,GAAG,EAAEI,UAAU,CAAC,CAClB;EAED,IAAIA,UAAU,IAAI,IAAI,IAAIF,KAAK,IAAI,IAAI,EAAE;IACvC,oBACE,KAAC,cAAc;MACb,eAAY,8BAA8B;MAC1C,SAAS,EAAEE,UAAU,IAAI,IAAK;MAC9B,YAAY,EAAEF,KAAK,IAAI,IAAI,aAAMA,KAAK,IAAKqB;IAAU,EACrD;EAEN;EAEA,oBACE,KAAC,iBAAiB,CAAC,QAAQ;IAAC,KAAK,EAAEnB,UAAW;IAAA,UAC3CL;EAAQ,EACkB;AAEjC;AAEA,eAAeD,mBAAmB"}
@@ -1 +1 @@
1
- {"version":3,"file":"FontBootstrap.d.ts","sourceRoot":"","sources":["../../src/components/FontBootstrap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAClE,OAAO,MAAM,CAAC;AAEd,eAAO,MAAM,kBAAkB,wBAAgC,CAAC;AAEhE,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAE1B;;;OAGG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC5B,cAAyE,EACzE,QAAQ,GACT,EAAE,kBAAkB,eAmCpB;AAED,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"FontBootstrap.d.ts","sourceRoot":"","sources":["../../src/components/FontBootstrap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAClE,OAAO,MAAM,CAAC;AAEd,eAAO,MAAM,kBAAkB,wBAAgC,CAAC;AAEhE,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAE1B;;;OAGG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC5B,cAAyE,EACzE,QAAQ,GACT,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAmClC;AAED,eAAe,aAAa,CAAC"}
@@ -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;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
+ {"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): 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,MAAM;AAAC;AAAA;AAAA;AAEd,OAAO,IAAMC,kBAAkB,gBAAGH,aAAa,CAAU,KAAK,CAAC;AAe/D;AACA;AACA;AACA,OAAO,SAASI,aAAa,OAGO;EAAA,IAHN;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 +1 @@
1
- {"version":3,"file":"FontsLoaded.d.ts","sourceRoot":"","sources":["../../src/components/FontsLoaded.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAI1C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,6DAA6D;IAC7D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE,gBAAgB,eASzD;AAED,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"FontsLoaded.d.ts","sourceRoot":"","sources":["../../src/components/FontsLoaded.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAI1C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,6DAA6D;IAC7D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CASvE;AAED,eAAe,WAAW,CAAC"}
@@ -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;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"}
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): 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;AAAA;AAO3B,OAAO,SAASC,WAAW,OAA8C;EAAA,IAA7C;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"}
@@ -1,6 +1,7 @@
1
+ /// <reference types="react" />
1
2
  /**
2
3
  * Component that broadcasts a message when mounted. Should be mounted after the user has logged in.
3
4
  */
4
- export declare function LoginNotifier(): null;
5
+ export declare function LoginNotifier(): JSX.Element | null;
5
6
  export default LoginNotifier;
6
7
  //# sourceMappingURL=LoginNotifier.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LoginNotifier.d.ts","sourceRoot":"","sources":["../../src/components/LoginNotifier.tsx"],"names":[],"mappings":"AAIA;;GAEG;AACH,wBAAgB,aAAa,SAS5B;AAED,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"LoginNotifier.d.ts","sourceRoot":"","sources":["../../src/components/LoginNotifier.tsx"],"names":[],"mappings":";AAIA;;GAEG;AACH,wBAAgB,aAAa,IAAI,GAAG,CAAC,OAAO,GAAG,IAAI,CASlD;AAED,eAAe,aAAa,CAAC"}
@@ -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, makeMessage } from '@deephaven/jsapi-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() {\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,EAAEC,WAAW,QAAQ,wBAAwB;AAC7E,SAASC,SAAS,QAAQ,OAAO;;AAEjC;AACA;AACA;AACA,OAAO,SAASC,aAAa,GAAG;EAC9B,IAAMC,OAAO,GAAGL,mBAAmB,EAAE;EACrCG,SAAS,CACP,SAASG,WAAW,GAAG;IACrBD,OAAO,CAACE,WAAW,CAACL,WAAW,CAACD,uBAAuB,CAAC,CAAC;EAC3D,CAAC,EACD,CAACI,OAAO,CAAC,CACV;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, makeMessage } from '@deephaven/jsapi-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,EAAEC,WAAW,QAAQ,wBAAwB;AAC7E,SAASC,SAAS,QAAQ,OAAO;;AAEjC;AACA;AACA;AACA,OAAO,SAASC,aAAa,GAAuB;EAClD,IAAMC,OAAO,GAAGL,mBAAmB,EAAE;EACrCG,SAAS,CACP,SAASG,WAAW,GAAG;IACrBD,OAAO,CAACE,WAAW,CAACL,WAAW,CAACD,uBAAuB,CAAC,CAAC;EAC3D,CAAC,EACD,CAACI,OAAO,CAAC,CACV;EACD,OAAO,IAAI;AACb;AAEA,eAAeD,aAAa"}
@@ -1 +1 @@
1
- {"version":3,"file":"PluginsBootstrap.d.ts","sourceRoot":"","sources":["../../src/components/PluginsBootstrap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,eAAe,EAAqB,MAAM,YAAY,CAAC;AAEhE,eAAO,MAAM,cAAc,uCAA8C,CAAC;AAE1E,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,UAAU,EACV,QAAQ,GACT,EAAE,qBAAqB,eAwBvB;AAED,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"PluginsBootstrap.d.ts","sourceRoot":"","sources":["../../src/components/PluginsBootstrap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,eAAe,EAAqB,MAAM,YAAY,CAAC;AAEhE,eAAO,MAAM,cAAc,uCAA8C,CAAC;AAE1E,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,UAAU,EACV,QAAQ,GACT,EAAE,qBAAqB,GAAG,GAAG,CAAC,OAAO,CAwBrC;AAED,eAAe,gBAAgB,CAAC"}
@@ -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;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"}
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): 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 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,OAGO;EAAA,IAHN;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,aAA4C;QAC1C,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"}
@@ -1 +1 @@
1
- {"version":3,"file":"ServerConfigBootstrap.d.ts","sourceRoot":"","sources":["../../src/components/ServerConfigBootstrap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAKlE,eAAO,MAAM,mBAAmB,2CAE/B,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,GACT,EAAE,0BAA0B,eA4C5B;AAED,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"ServerConfigBootstrap.d.ts","sourceRoot":"","sources":["../../src/components/ServerConfigBootstrap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAKlE,eAAO,MAAM,mBAAmB,2CAE/B,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,GACT,EAAE,0BAA0B,GAAG,GAAG,CAAC,OAAO,CA4C1C;AAED,eAAe,qBAAqB,CAAC"}
@@ -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;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
+ {"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): 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 = 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,OAEO;EAAA,IAFN;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,aAAuD;QACrD,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 +1 @@
1
- {"version":3,"file":"UserBootstrap.d.ts","sourceRoot":"","sources":["../../src/components/UserBootstrap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAS1C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,6BAA6B;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,kBAAkB,eAM7D;AAED,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"UserBootstrap.d.ts","sourceRoot":"","sources":["../../src/components/UserBootstrap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAS1C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,6BAA6B;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAM3E;AAED,eAAe,aAAa,CAAC"}
@@ -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;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
+ {"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): 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;AAOtB;AACA;AACA;AACA,OAAO,SAASC,aAAa,OAAgD;EAAA,IAA/C;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,3 +1,4 @@
1
- export declare function useConnection(): import("@deephaven/jsapi-types").IdeConnection;
1
+ import type { IdeConnection } from '@deephaven/jsapi-types';
2
+ export declare function useConnection(): IdeConnection;
2
3
  export default useConnection;
3
4
  //# sourceMappingURL=useConnection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useConnection.d.ts","sourceRoot":"","sources":["../../src/components/useConnection.ts"],"names":[],"mappings":"AAGA,wBAAgB,aAAa,mDAK5B;AAED,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"useConnection.d.ts","sourceRoot":"","sources":["../../src/components/useConnection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAI5D,wBAAgB,aAAa,IAAI,aAAa,CAK7C;AAED,eAAe,aAAa,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useConnection.js","names":["useContextOrThrow","ConnectionContext","useConnection"],"sources":["../../src/components/useConnection.ts"],"sourcesContent":["import { useContextOrThrow } from '@deephaven/react-hooks';\nimport { ConnectionContext } from './ConnectionBootstrap';\n\nexport function useConnection() {\n return useContextOrThrow(\n ConnectionContext,\n 'No IdeConnection available in useConnection. Was code wrapped in ConnectionBootstrap or ConnectionContext.Provider?'\n );\n}\n\nexport default useConnection;\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,wBAAwB;AAAC,SAClDC,iBAAiB;AAE1B,OAAO,SAASC,aAAa,GAAG;EAC9B,OAAOF,iBAAiB,CACtBC,iBAAiB,EACjB,qHAAqH,CACtH;AACH;AAEA,eAAeC,aAAa"}
1
+ {"version":3,"file":"useConnection.js","names":["useContextOrThrow","ConnectionContext","useConnection"],"sources":["../../src/components/useConnection.ts"],"sourcesContent":["import type { IdeConnection } from '@deephaven/jsapi-types';\nimport { useContextOrThrow } from '@deephaven/react-hooks';\nimport { ConnectionContext } from './ConnectionBootstrap';\n\nexport function useConnection(): IdeConnection {\n return useContextOrThrow(\n ConnectionContext,\n 'No IdeConnection available in useConnection. Was code wrapped in ConnectionBootstrap or ConnectionContext.Provider?'\n );\n}\n\nexport default useConnection;\n"],"mappings":"AACA,SAASA,iBAAiB,QAAQ,wBAAwB;AAAC,SAClDC,iBAAiB;AAE1B,OAAO,SAASC,aAAa,GAAkB;EAC7C,OAAOF,iBAAiB,CACtBC,iBAAiB,EACjB,qHAAqH,CACtH;AACH;AAEA,eAAeC,aAAa"}
@@ -1,3 +1,4 @@
1
- export declare function usePlugins(): import("..").PluginModuleMap;
1
+ import type { PluginModuleMap } from '../plugins';
2
+ export declare function usePlugins(): PluginModuleMap;
2
3
  export default usePlugins;
3
4
  //# sourceMappingURL=usePlugins.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePlugins.d.ts","sourceRoot":"","sources":["../../src/components/usePlugins.ts"],"names":[],"mappings":"AAGA,wBAAgB,UAAU,iCAKzB;AAED,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"usePlugins.d.ts","sourceRoot":"","sources":["../../src/components/usePlugins.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAGlD,wBAAgB,UAAU,IAAI,eAAe,CAK5C;AAED,eAAe,UAAU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"usePlugins.js","names":["useContextOrThrow","PluginsContext","usePlugins"],"sources":["../../src/components/usePlugins.ts"],"sourcesContent":["import { useContextOrThrow } from '@deephaven/react-hooks';\nimport { PluginsContext } from './PluginsBootstrap';\n\nexport function usePlugins() {\n return useContextOrThrow(\n PluginsContext,\n 'No Plugins available in usePlugins. Was code wrapped in PluginsBootstrap or PluginsContext.Provider?'\n );\n}\n\nexport default usePlugins;\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,wBAAwB;AAAC,SAClDC,cAAc;AAEvB,OAAO,SAASC,UAAU,GAAG;EAC3B,OAAOF,iBAAiB,CACtBC,cAAc,EACd,sGAAsG,CACvG;AACH;AAEA,eAAeC,UAAU"}
1
+ {"version":3,"file":"usePlugins.js","names":["useContextOrThrow","PluginsContext","usePlugins"],"sources":["../../src/components/usePlugins.ts"],"sourcesContent":["import { useContextOrThrow } from '@deephaven/react-hooks';\nimport type { PluginModuleMap } from '../plugins';\nimport { PluginsContext } from './PluginsBootstrap';\n\nexport function usePlugins(): PluginModuleMap {\n return useContextOrThrow(\n PluginsContext,\n 'No Plugins available in usePlugins. Was code wrapped in PluginsBootstrap or PluginsContext.Provider?'\n );\n}\n\nexport default usePlugins;\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,wBAAwB;AAAC,SAElDC,cAAc;AAEvB,OAAO,SAASC,UAAU,GAAoB;EAC5C,OAAOF,iBAAiB,CACtBC,cAAc,EACd,sGAAsG,CACvG;AACH;AAEA,eAAeC,UAAU"}
@@ -1 +1 @@
1
- {"version":3,"file":"useServerConfig.d.ts","sourceRoot":"","sources":["../../src/components/useServerConfig.ts"],"names":[],"mappings":"AAGA,wBAAgB,eAAe,wBAK9B;AAED,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"useServerConfig.d.ts","sourceRoot":"","sources":["../../src/components/useServerConfig.ts"],"names":[],"mappings":"AAGA,wBAAgB,eAAe,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAKrD;AAED,eAAe,eAAe,CAAC"}
@@ -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() {\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,eAAe,GAAG;EAChC,OAAOF,iBAAiB,CACtBC,mBAAmB,EACnB,2HAA2H,CAC5H;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,eAAe,GAAwB;EACrD,OAAOF,iBAAiB,CACtBC,mBAAmB,EACnB,2HAA2H,CAC5H;AACH;AAEA,eAAeC,eAAe"}
@@ -1,3 +1,4 @@
1
- export declare function useUser(): import("@deephaven/redux").User;
1
+ import type { User } from '@deephaven/redux';
2
+ export declare function useUser(): User;
2
3
  export default useUser;
3
4
  //# sourceMappingURL=useUser.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useUser.d.ts","sourceRoot":"","sources":["../../src/components/useUser.ts"],"names":[],"mappings":"AAGA,wBAAgB,OAAO,oCAKtB;AAED,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"useUser.d.ts","sourceRoot":"","sources":["../../src/components/useUser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7C,wBAAgB,OAAO,IAAI,IAAI,CAK9B;AAED,eAAe,OAAO,CAAC"}
@@ -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';\n\nexport function useUser() {\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;AAErD,OAAO,SAASC,OAAO,GAAG;EACxB,OAAOF,iBAAiB,CACtBC,WAAW,EACX,0FAA0F,CAC3F;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,OAAO,GAAS;EAC9B,OAAOF,iBAAiB,CACtBC,WAAW,EACX,0FAA0F,CAC3F;AACH;AAEA,eAAeC,OAAO"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/app-utils",
3
- "version": "0.48.1-beta.0+302d1c2f",
3
+ "version": "0.48.1-beta.4+a1de0f6e",
4
4
  "description": "Deephaven App Utils",
5
5
  "author": "Deephaven Data Labs LLC",
6
6
  "license": "Apache-2.0",
@@ -28,16 +28,17 @@
28
28
  "redux": "^4.x"
29
29
  },
30
30
  "dependencies": {
31
- "@deephaven/auth-plugins": "^0.48.1-beta.0+302d1c2f",
32
- "@deephaven/components": "^0.48.1-beta.0+302d1c2f",
33
- "@deephaven/jsapi-bootstrap": "^0.48.1-beta.0+302d1c2f",
34
- "@deephaven/jsapi-components": "^0.48.1-beta.0+302d1c2f",
35
- "@deephaven/jsapi-types": "^0.48.1-beta.0+302d1c2f",
36
- "@deephaven/jsapi-utils": "^0.48.1-beta.0+302d1c2f",
37
- "@deephaven/log": "^0.48.1-beta.0+302d1c2f",
38
- "@deephaven/plugin": "^0.48.1-beta.0+302d1c2f",
39
- "@deephaven/react-hooks": "^0.48.1-beta.0+302d1c2f",
40
- "@deephaven/utils": "^0.48.1-beta.0+302d1c2f",
31
+ "@deephaven/auth-plugins": "^0.48.1-beta.4+a1de0f6e",
32
+ "@deephaven/components": "^0.48.1-beta.4+a1de0f6e",
33
+ "@deephaven/jsapi-bootstrap": "^0.48.1-beta.4+a1de0f6e",
34
+ "@deephaven/jsapi-components": "^0.48.1-beta.4+a1de0f6e",
35
+ "@deephaven/jsapi-types": "^0.48.1-beta.4+a1de0f6e",
36
+ "@deephaven/jsapi-utils": "^0.48.1-beta.4+a1de0f6e",
37
+ "@deephaven/log": "^0.48.1-beta.4+a1de0f6e",
38
+ "@deephaven/plugin": "^0.48.1-beta.4+a1de0f6e",
39
+ "@deephaven/react-hooks": "^0.48.1-beta.4+a1de0f6e",
40
+ "@deephaven/redux": "^0.48.1-beta.4+a1de0f6e",
41
+ "@deephaven/utils": "^0.48.1-beta.4+a1de0f6e",
41
42
  "@paciolan/remote-component": "2.13.0",
42
43
  "@paciolan/remote-module-loader": "^3.0.2",
43
44
  "fira": "mozilla/fira#4.202"
@@ -57,5 +58,5 @@
57
58
  "publishConfig": {
58
59
  "access": "public"
59
60
  },
60
- "gitHead": "302d1c2f1af98161da2931ac3413f14938deb257"
61
+ "gitHead": "a1de0f6ee16d3a59c4003a17247a12032fa292eb"
61
62
  }