@deephaven/app-utils 0.41.2-beta.4 → 0.41.2-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,7 @@ import { PluginsContext } from "./PluginsBootstrap.js";
9
9
  import { getAuthPluginComponent } from "../plugins/index.js";
10
10
  import LoginNotifier from "./LoginNotifier.js";
11
11
  /** Core auth plugins that are always loaded */
12
- var CORE_AUTH_PLUGINS = new Map([['@deephaven/auth-plugins.AuthPluginPsk', AuthPluginPsk], ['@deephaven/auth-plugins.AuthPluginParent', AuthPluginParent], ['@deephaven/auth-plugins.AuthPluginAnonymous', AuthPluginAnonymous]]);
12
+ var CORE_AUTH_PLUGINS = new Map([['@deephaven/auth-plugins.AuthPluginParent', AuthPluginParent], ['@deephaven/auth-plugins.AuthPluginPsk', AuthPluginPsk], ['@deephaven/auth-plugins.AuthPluginAnonymous', AuthPluginAnonymous]]);
13
13
 
14
14
  /**
15
15
  * AuthBootstrap component. Handles displaying the auth plugin and authenticating.
@@ -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.AuthPluginPsk', AuthPluginPsk],\n ['@deephaven/auth-plugins.AuthPluginParent', AuthPluginParent],\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,E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;MACXD,UAAU,GAAG,IAAI;IACnB,CAAC;EACH,CAAC,EACD,CAACP,MAAM,CAAC,CACT;EAED,IAAMY,aAAa,GAAG3B,OAAO,CAAC,MAAM;IAClC,IAAIgB,OAAO,IAAI,IAAI,IAAIC,UAAU,IAAI,IAAI,EAAE;MACzC,OAAOW,SAAS;IAClB;IAEA,IAAI;MACF,OAAOnB,sBAAsB,CAACO,OAAO,EAAEC,UAAU,EAAEN,iBAAiB,CAAC;IACvE,CAAC,CAAC,OAAOe,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,oBAAC,cAAc;MACb,SAAS,EAAEU,SAAS,IAAIV,KAAK,IAAI,IAAK;MACtC,YAAY,EAAEZ,eAAe,CAACY,KAAK;IAAE,EACrC;EAEN;EACA,oBACE,oBAAC,aAAa;IAAC,gBAAgB,EAAEF;EAAW,gBAC1C,uDACE,oBAAC,aAAa,OAAG,EAChBH,QAAQ,CACR,CACW;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","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,UAAU,CAACU,cAAc,CAAC;EAC1C,IAAM,CAACS,UAAU,EAAEC,aAAa,CAAC,GAAGjB,QAAQ,EAAiB;EAC7D,IAAM,CAACkB,KAAK,EAAEC,QAAQ,CAAC,GAAGnB,QAAQ,EAAW;EAE7CF,SAAS,CACP,SAASsB,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,IAAIN,GAAG,CAACY,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,GAAG3B,OAAO,CAAC,MAAM;IAClC,IAAIgB,OAAO,IAAI,IAAI,IAAIC,UAAU,IAAI,IAAI,EAAE;MACzC,OAAOW,SAAS;IAClB;IAEA,IAAI;MACF,OAAOnB,sBAAsB,CAACO,OAAO,EAAEC,UAAU,EAAEN,iBAAiB,CAAC;IACvE,CAAC,CAAC,OAAOe,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,oBAAC,cAAc;MACb,SAAS,EAAEU,SAAS,IAAIV,KAAK,IAAI,IAAK;MACtC,YAAY,EAAEZ,eAAe,CAACY,KAAK;IAAE,EACrC;EAEN;EACA,oBACE,oBAAC,aAAa;IAAC,gBAAgB,EAAEF;EAAW,gBAC1C,uDACE,oBAAC,aAAa,OAAG,EAChBH,QAAQ,CACR,CACW;AAEpB;AAEA,eAAeD,aAAa"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/app-utils",
3
- "version": "0.41.2-beta.4+ed3a8c5f",
3
+ "version": "0.41.2-beta.8+e23695d4",
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.41.2-beta.4+ed3a8c5f",
32
- "@deephaven/components": "^0.41.2-beta.4+ed3a8c5f",
33
- "@deephaven/jsapi-bootstrap": "^0.41.2-beta.4+ed3a8c5f",
34
- "@deephaven/jsapi-components": "^0.41.2-beta.4+ed3a8c5f",
35
- "@deephaven/jsapi-types": "^0.41.2-beta.4+ed3a8c5f",
36
- "@deephaven/jsapi-utils": "^0.41.2-beta.4+ed3a8c5f",
37
- "@deephaven/log": "^0.41.2-beta.4+ed3a8c5f",
38
- "@deephaven/react-hooks": "^0.41.2-beta.4+ed3a8c5f",
39
- "@deephaven/utils": "^0.41.2-beta.4+ed3a8c5f",
31
+ "@deephaven/auth-plugins": "^0.41.2-beta.8+e23695d4",
32
+ "@deephaven/components": "^0.41.2-beta.8+e23695d4",
33
+ "@deephaven/jsapi-bootstrap": "^0.41.2-beta.8+e23695d4",
34
+ "@deephaven/jsapi-components": "^0.41.2-beta.8+e23695d4",
35
+ "@deephaven/jsapi-types": "^0.41.2-beta.8+e23695d4",
36
+ "@deephaven/jsapi-utils": "^0.41.2-beta.8+e23695d4",
37
+ "@deephaven/log": "^0.41.2-beta.8+e23695d4",
38
+ "@deephaven/react-hooks": "^0.41.2-beta.8+e23695d4",
39
+ "@deephaven/utils": "^0.41.2-beta.8+e23695d4",
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": "ed3a8c5f224094306ff55f9b41706cb58ff709e2"
59
+ "gitHead": "e23695d4baf232720ca89cb7d24e9a918f3fe913"
60
60
  }