@deephaven/app-utils 0.60.1-object-fetcher.6 → 0.60.1-object-fetcher.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectionBootstrap.d.ts","sourceRoot":"","sources":["../../src/components/ConnectionBootstrap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAchE,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,CA0ExC;AAED,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"ConnectionBootstrap.d.ts","sourceRoot":"","sources":["../../src/components/ConnectionBootstrap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAehE,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,CA0ExC;AAED,eAAe,mBAAmB,CAAC"}
@@ -2,7 +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, { useCallback, useEffect, useState } from 'react';
4
4
  import { LoadingOverlay } from '@deephaven/components';
5
- import { ObjectFetcherContext, useApi, useClient } from '@deephaven/jsapi-bootstrap';
5
+ import { ObjectFetcherContext, sanitizeVariableDescriptor, useApi, useClient } from '@deephaven/jsapi-bootstrap';
6
6
  import Log from '@deephaven/log';
7
7
  import { assertNotNull } from '@deephaven/utils';
8
8
  import ConnectionContext from "./ConnectionContext.js";
@@ -61,7 +61,7 @@ export function ConnectionBootstrap(_ref) {
61
61
  var objectFetcher = useCallback( /*#__PURE__*/function () {
62
62
  var _ref2 = _asyncToGenerator(function* (descriptor) {
63
63
  assertNotNull(connection, 'connection');
64
- return connection.getObject(descriptor);
64
+ return connection.getObject(sanitizeVariableDescriptor(descriptor));
65
65
  });
66
66
  return function (_x) {
67
67
  return _ref2.apply(this, arguments);
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectionBootstrap.js","names":["React","useCallback","useEffect","useState","LoadingOverlay","ObjectFetcherContext","useApi","useClient","Log","assertNotNull","ConnectionContext","jsx","_jsx","log","module","ConnectionBootstrap","_ref","children","api","client","error","setError","connection","setConnection","initConnection","isCanceled","loadConnection","_loadConnection","apply","arguments","_asyncToGenerator","newConnection","getAsIdeConnection","e","listenForShutdown","handleShutdown","event","detail","info","concat","JSON","stringify","removerFn","addEventListener","IdeConnection","EVENT_SHUTDOWN","objectFetcher","_ref2","descriptor","getObject","_x","isLoading","errorMessage","undefined","Provider","value"],"sources":["../../src/components/ConnectionBootstrap.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from 'react';\nimport { LoadingOverlay } from '@deephaven/components';\nimport {\n ObjectFetcherContext,\n useApi,\n useClient,\n} from '@deephaven/jsapi-bootstrap';\nimport type { IdeConnection, VariableDescriptor } from '@deephaven/jsapi-types';\nimport Log from '@deephaven/log';\nimport { assertNotNull } from '@deephaven/utils';\nimport ConnectionContext from './ConnectionContext';\n\nconst log = Log.module('@deephaven/app-utils.ConnectionBootstrap');\n\nexport type ConnectionBootstrapProps = {\n /**\n * The children to render wrapped with the ConnectionContext.\n * Will not render children until the connection is created.\n */\n children: React.ReactNode;\n};\n\n/**\n * ConnectionBootstrap component. Handles initializing the connection.\n */\nexport function ConnectionBootstrap({\n children,\n}: ConnectionBootstrapProps): JSX.Element {\n const api = useApi();\n const client = useClient();\n const [error, setError] = useState<unknown>();\n const [connection, setConnection] = useState<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 const objectFetcher = useCallback(\n async (descriptor: VariableDescriptor) => {\n assertNotNull(connection, 'connection');\n return connection.getObject(descriptor);\n },\n [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 <ObjectFetcherContext.Provider value={objectFetcher}>\n {children}\n </ObjectFetcherContext.Provider>\n </ConnectionContext.Provider>\n );\n}\n\nexport default ConnectionBootstrap;\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC/D,SAASC,cAAc,QAAQ,uBAAuB;AACtD,SACEC,oBAAoB,EACpBC,MAAM,EACNC,SAAS,QACJ,4BAA4B;AAEnC,OAAOC,GAAG,MAAM,gBAAgB;AAChC,SAASC,aAAa,QAAQ,kBAAkB;A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AC;AAEjC;AAEA,eAAeF,mBAAmB"}
1
+ {"version":3,"file":"ConnectionBootstrap.js","names":["React","useCallback","useEffect","useState","LoadingOverlay","ObjectFetcherContext","sanitizeVariableDescriptor","useApi","useClient","Log","assertNotNull","ConnectionContext","jsx","_jsx","log","module","ConnectionBootstrap","_ref","children","api","client","error","setError","connection","setConnection","initConnection","isCanceled","loadConnection","_loadConnection","apply","arguments","_asyncToGenerator","newConnection","getAsIdeConnection","e","listenForShutdown","handleShutdown","event","detail","info","concat","JSON","stringify","removerFn","addEventListener","IdeConnection","EVENT_SHUTDOWN","objectFetcher","_ref2","descriptor","getObject","_x","isLoading","errorMessage","undefined","Provider","value"],"sources":["../../src/components/ConnectionBootstrap.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from 'react';\nimport { LoadingOverlay } from '@deephaven/components';\nimport {\n ObjectFetcherContext,\n sanitizeVariableDescriptor,\n useApi,\n useClient,\n} from '@deephaven/jsapi-bootstrap';\nimport type { IdeConnection, VariableDescriptor } from '@deephaven/jsapi-types';\nimport Log from '@deephaven/log';\nimport { assertNotNull } from '@deephaven/utils';\nimport ConnectionContext from './ConnectionContext';\n\nconst log = Log.module('@deephaven/app-utils.ConnectionBootstrap');\n\nexport type ConnectionBootstrapProps = {\n /**\n * The children to render wrapped with the ConnectionContext.\n * Will not render children until the connection is created.\n */\n children: React.ReactNode;\n};\n\n/**\n * ConnectionBootstrap component. Handles initializing the connection.\n */\nexport function ConnectionBootstrap({\n children,\n}: ConnectionBootstrapProps): JSX.Element {\n const api = useApi();\n const client = useClient();\n const [error, setError] = useState<unknown>();\n const [connection, setConnection] = useState<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 const objectFetcher = useCallback(\n async (descriptor: VariableDescriptor) => {\n assertNotNull(connection, 'connection');\n return connection.getObject(sanitizeVariableDescriptor(descriptor));\n },\n [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 <ObjectFetcherContext.Provider value={objectFetcher}>\n {children}\n </ObjectFetcherContext.Provider>\n </ConnectionContext.Provider>\n );\n}\n\nexport default ConnectionBootstrap;\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC/D,SAASC,cAAc,QAAQ,uBAAuB;AACtD,SACEC,oBAAoB,EACpBC,0BAA0B,EAC1BC,MAAM,EACNC,SAAS,QACJ,4BAA4B;AAEnC,OAAOC,GAAG,MAAM,gBAAgB;AAChC,SAASC,aAAa,QAAQ,kBAAkB;AAAC,OAC1CC,iBAAiB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAExB,IAAMC,GAAG,GAAGL,GAAG,CAACM,MAAM,CAAC,0CAA0C,CAAC;AAUlE;AACA;AACA;AACA,OAAO,SAASC,mBAAmBA,CAAAC,IAAA,EAEO;EAAA,IAFN;IAClCC;EACwB,CAAC,GAAAD,IAAA;EACzB,IAAME,GAAG,GAAGZ,MAAM,CAAC,CAAC;EACpB,IAAMa,MAAM,GAAGZ,SAAS,CAAC,CAAC;EAC1B,IAAM,CAACa,KAAK,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C0B,aAAa,CAACC,cAAc,EAChCV,cACF,CAAC;IACD,OAAOO,SAAS;EAClB,CAAC,EACD,CAACxB,GAAG,EAAEI,UAAU,CAClB,CAAC;EAED,IAAMwB,aAAa,GAAG9C,WAAW;IAAA,IAAA+C,KAAA,GAAAjB,iBAAA,CAC/B,WAAOkB,UAA8B,EAAK;MACxCvC,aAAa,CAACa,UAAU,EAAE,YAAY,CAAC;MACvC,OAAOA,UAAU,CAAC2B,SAAS,CAAC5C,0BAA0B,CAAC2C,UAAU,CAAC,CAAC;IACrE,CAAC;IAAA,iBAAAE,EAAA;MAAA,OAAAH,KAAA,CAAAnB,KAAA,OAAAC,SAAA;IAAA;EAAA,KACD,CAACP,UAAU,CACb,CAAC;EAED,IAAIA,UAAU,IAAI,IAAI,IAAIF,KAAK,IAAI,IAAI,EAAE;IACvC,oBACER,IAAA,CAACT,cAAc;MACb,eAAY,8BAA8B;MAC1CgD,SAAS,EAAE7B,UAAU,IAAI,IAAK;MAC9B8B,YAAY,EAAEhC,KAAK,IAAI,IAAI,MAAAmB,MAAA,CAAMnB,KAAK,IAAKiC;IAAU,CACtD,CAAC;EAEN;EAEA,oBACEzC,IAAA,CAACF,iBAAiB,CAAC4C,QAAQ;IAACC,KAAK,EAAEjC,UAAW;IAAAL,QAAA,eAC5CL,IAAA,CAACR,oBAAoB,CAACkD,QAAQ;MAACC,KAAK,EAAET,aAAc;MAAA7B,QAAA,EACjDA;IAAQ,CACoB;EAAC,CACN,CAAC;AAEjC;AAEA,eAAeF,mBAAmB"}
@@ -1,4 +1,9 @@
1
1
  import type { IdeConnection } from '@deephaven/jsapi-types';
2
+ /**
3
+ * Retrieve the connection for the current context.
4
+ *
5
+ * @returns Connection for the current context
6
+ */
2
7
  export declare function useConnection(): IdeConnection;
3
8
  export default useConnection;
4
9
  //# sourceMappingURL=useConnection.d.ts.map
@@ -1 +1 @@
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
+ {"version":3,"file":"useConnection.d.ts","sourceRoot":"","sources":["../../src/components/useConnection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAI5D;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,aAAa,CAK7C;AAED,eAAe,aAAa,CAAC"}
@@ -1,5 +1,10 @@
1
1
  import { useContextOrThrow } from '@deephaven/react-hooks';
2
2
  import { ConnectionContext } from "./ConnectionContext.js";
3
+ /**
4
+ * Retrieve the connection for the current context.
5
+ *
6
+ * @returns Connection for the current context
7
+ */
3
8
  export function useConnection() {
4
9
  return useContextOrThrow(ConnectionContext, 'No IdeConnection available in useConnection. Was code wrapped in ConnectionContext.Provider?');
5
10
  }
@@ -1 +1 @@
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 './ConnectionContext';\n\nexport function useConnection(): IdeConnection {\n return useContextOrThrow(\n ConnectionContext,\n 'No IdeConnection available in useConnection. Was code wrapped in ConnectionContext.Provider?'\n );\n}\n\nexport default useConnection;\n"],"mappings":"AACA,SAASA,iBAAiB,QAAQ,wBAAwB;AAAC,SAClDC,iBAAiB;AAE1B,OAAO,SAASC,aAAaA,CAAA,EAAkB;EAC7C,OAAOF,iBAAiB,CACtBC,iBAAiB,EACjB,8FACF,CAAC;AACH;AAEA,eAAeC,aAAa"}
1
+ {"version":3,"file":"useConnection.js","names":["useContextOrThrow","ConnectionContext","useConnection"],"sources":["../../src/components/useConnection.ts"],"sourcesContent":["import type { IdeConnection } from '@deephaven/jsapi-types';\nimport { useContextOrThrow } from '@deephaven/react-hooks';\nimport { ConnectionContext } from './ConnectionContext';\n\n/**\n * Retrieve the connection for the current context.\n *\n * @returns Connection for the current context\n */\nexport function useConnection(): IdeConnection {\n return useContextOrThrow(\n ConnectionContext,\n 'No IdeConnection available in useConnection. Was code wrapped in ConnectionContext.Provider?'\n );\n}\n\nexport default useConnection;\n"],"mappings":"AACA,SAASA,iBAAiB,QAAQ,wBAAwB;AAAC,SAClDC,iBAAiB;AAE1B;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAAA,EAAkB;EAC7C,OAAOF,iBAAiB,CACtBC,iBAAiB,EACjB,8FACF,CAAC;AACH;AAEA,eAAeC,aAAa"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/app-utils",
3
- "version": "0.60.1-object-fetcher.6+6a7af1e6",
3
+ "version": "0.60.1-object-fetcher.7+443993f3",
4
4
  "description": "Deephaven App Utils",
5
5
  "author": "Deephaven Data Labs LLC",
6
6
  "license": "Apache-2.0",
@@ -29,22 +29,22 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@adobe/react-spectrum": "^3.29.0",
32
- "@deephaven/auth-plugins": "^0.60.1-object-fetcher.6+6a7af1e6",
33
- "@deephaven/chart": "^0.60.1-object-fetcher.6+6a7af1e6",
34
- "@deephaven/components": "^0.60.1-object-fetcher.6+6a7af1e6",
35
- "@deephaven/console": "^0.60.1-object-fetcher.6+6a7af1e6",
36
- "@deephaven/dashboard": "^0.60.1-object-fetcher.6+6a7af1e6",
37
- "@deephaven/icons": "^0.60.1-object-fetcher.6+6a7af1e6",
38
- "@deephaven/iris-grid": "^0.60.1-object-fetcher.6+6a7af1e6",
39
- "@deephaven/jsapi-bootstrap": "^0.60.1-object-fetcher.6+6a7af1e6",
40
- "@deephaven/jsapi-components": "^0.60.1-object-fetcher.6+6a7af1e6",
41
- "@deephaven/jsapi-types": "^0.60.1-object-fetcher.6+6a7af1e6",
42
- "@deephaven/jsapi-utils": "^0.60.1-object-fetcher.6+6a7af1e6",
43
- "@deephaven/log": "^0.60.1-object-fetcher.6+6a7af1e6",
44
- "@deephaven/plugin": "^0.60.1-object-fetcher.6+6a7af1e6",
45
- "@deephaven/react-hooks": "^0.60.1-object-fetcher.6+6a7af1e6",
46
- "@deephaven/redux": "^0.60.1-object-fetcher.6+6a7af1e6",
47
- "@deephaven/utils": "^0.60.1-object-fetcher.6+6a7af1e6",
32
+ "@deephaven/auth-plugins": "^0.60.1-object-fetcher.7+443993f3",
33
+ "@deephaven/chart": "^0.60.1-object-fetcher.7+443993f3",
34
+ "@deephaven/components": "^0.60.1-object-fetcher.7+443993f3",
35
+ "@deephaven/console": "^0.60.1-object-fetcher.7+443993f3",
36
+ "@deephaven/dashboard": "^0.60.1-object-fetcher.7+443993f3",
37
+ "@deephaven/icons": "^0.60.1-object-fetcher.7+443993f3",
38
+ "@deephaven/iris-grid": "^0.60.1-object-fetcher.7+443993f3",
39
+ "@deephaven/jsapi-bootstrap": "^0.60.1-object-fetcher.7+443993f3",
40
+ "@deephaven/jsapi-components": "^0.60.1-object-fetcher.7+443993f3",
41
+ "@deephaven/jsapi-types": "^0.60.1-object-fetcher.7+443993f3",
42
+ "@deephaven/jsapi-utils": "^0.60.1-object-fetcher.7+443993f3",
43
+ "@deephaven/log": "^0.60.1-object-fetcher.7+443993f3",
44
+ "@deephaven/plugin": "^0.60.1-object-fetcher.7+443993f3",
45
+ "@deephaven/react-hooks": "^0.60.1-object-fetcher.7+443993f3",
46
+ "@deephaven/redux": "^0.60.1-object-fetcher.7+443993f3",
47
+ "@deephaven/utils": "^0.60.1-object-fetcher.7+443993f3",
48
48
  "@paciolan/remote-component": "2.13.0",
49
49
  "@paciolan/remote-module-loader": "^3.0.2",
50
50
  "fira": "mozilla/fira#4.202"
@@ -64,5 +64,5 @@
64
64
  "publishConfig": {
65
65
  "access": "public"
66
66
  },
67
- "gitHead": "6a7af1e6366a33dddcd7534fbc0d50d82509a137"
67
+ "gitHead": "443993f3fcc4a7501c154248468f65ff23f0ef23"
68
68
  }